code
stringlengths
2
1.05M
/* * __ ___ * _____/ /___ __/ (_)____ * / ___/ __/ / / / / / ___/ * (__ ) /_/ /_/ / / (__ ) * /____/\__/\__, /_/_/____/ * /____/ * * stylis is a feature-rich css preprocessor * * @licence MIT */ (function (factory) { if (typeof exports === 'object' && typeof module !== 'undefined') { module.exports = factory(global); } else if (typeof define === 'function' && define.amd) { define(factory(window)); } else { window.stylis = factory(window); } }(function (window) { 'use strict'; // plugins var plugins = []; // regular expressions var andPattern = /&/g; var andSpacePattern = / +&/; var splitPattern = /,\n/g; var globalPattern = /:global\(%?((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g; var globalsPattern = /(?:&| ):global\(%?((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g; var hostPattern = /:host\((.*)\)/g; var hostContextPattern = /:host-context\((.*)\)/g; var newLinePattern = /\n/g; var placeholderPattern = /::place/g; var colonPattern = /: +/g; var animationPattern = /[ .#~+><\d]+/g; var transformPattern = / *(transform)/g; // prefixes var moz = '-moz-'; var ms = '-ms-'; var webkit = '-webkit-'; /** * css preprocessor * * @param {String} selector - i.e `.class` or `#id` or `[attr=id]` * @param {String} styles - css string * @param {Boolean=} animations - prefix animations and keyframes, true by default * @param {Boolean=} compact - enable additional shadow dom features(:host, :host-context) * @param {Function|Array} middlewares * @return {string} */ function stylis (selector, styles, animations, compact, middlewares) { selector += ''; var middleware = middlewares; var prefix = ''; var namespace = ''; var char; var attr; var animns; var type = selector.charCodeAt(0); // ` selector` -> `selector` if (type < 33) { type = (selector = selector.trim()).charCodeAt(0); } switch (type) { // `#` `.` id and class selectors case 35: case 46: { namespace = (prefix = selector).substring(1); break; } // [ attr selector case 91: { // `[data-id=namespace]` -> ['data-id', 'namespace'] attr = selector.substring(1, selector.length - 1).split('='); char = (namespace = attr[1] || attr[0]).charCodeAt(0); // [data-id="namespace"]/[data-id='namespace'] // --> "namespace"/'namspace' --> namespace if (char === 34 || char === 39) { namespace = namespace.substring(1, namespace.length - 1); } prefix = '['+ attr[0] + (attr.length > 1 ? ('="' + namespace +'"]') : ']') break; } // element selector default: { namespace = prefix = selector; } } // reset type signature type = 0; // animation and keyframe namespace if (animations === true || animations === undefined || animations === null) { animations = true; animns = namespace.replace(animationPattern, '-'); } else { animns = ''; animations = false; } // middleware var has; var uses = middleware !== void 0 && middleware !== null; var length = plugins.length; if (uses === true) { has = (typeof middleware).charCodeAt(0); // o, array if (has === 111) { use(middleware); } // f, function else if (has === 102) { plugins[length++] = middleware; } else { uses = false; } } if (length !== 0) { middleware = length === 1 ? plugins[0] : proxy; uses = true; } // declare var character; var colon; var inner; var selectors; var build; var temp; var prev; var indexOf; var first; var second; var third; var sel; var blob; var nest; var str; var media; // buffers var buff = ''; var blck = ''; var flat = ''; // character code var code = 0; var nextcode; // context signatures var medias = 0; var special = 0; var close = 0; var closed = 0; var nested = 0; var func = 0; var strings = 0; var globs = 0; var isplace = 0; var join = 0; // context(flat) signatures var levels = 0; // comments var comment = 0; var comblck = 0; var comline = 0; // pre-process if (uses === true) { temp = middleware(0, styles, line, column, prefix, 0); if (temp != null) { styles = temp; } str = ''; } // positions var caret = 0; var depth = 0; var column = 0; var line = 1; var eof = styles.length; // compiled output var output = ''; // parse + compile while (caret < eof) { code = styles.charCodeAt(caret); // {, }, ; characters, parse line by line if ( (medias === 1 && caret === eof - 1) || ( strings === 0 && func === 0 && comment === 0 && ( // {, }, ; (code === 123 || code === 125 || code === 59) || // eof buffer (caret === eof - 1 && buff.length !== 0) ) ) ) { buff += styles.charAt(caret); // middleware, selector/property context, } if (uses === true && code !== 125) { // { pre-processed selector context if (code === 123) { temp = middleware( 1, buff.substring(0, buff.length - 1).trim(), line, column, prefix, output.length ); } // ; property context else { temp = middleware(2, buff, line, column, prefix, output.length); } if (temp != null) { buff = code === 123 ? temp + ' {' : temp; } } first = buff.charCodeAt(0); // only trim when the first character is a space ` ` if (first === 32) { first = (buff = buff.trim()).charCodeAt(0); } second = buff.charCodeAt(1); third = buff.charCodeAt(2); // @, special block if (first === 64) { // push flat css if (levels === 1 && flat.length !== 0) { levels = 0; flat = prefix + ' {' + flat + '}'; // middleware, flat context if (uses === true) { temp = middleware(4, flat, line, column, prefix, output.length); if (temp != null) { flat = temp; } } output += flat; flat = ''; } // ; if (code !== 59) { // @keyframe, `k` if (second === 107) { blob = buff.substring(1, 11) + animns + buff.substring(11); buff = '@' + webkit + blob; type = 1; } // @media `m`, `e` characters, // @supports `s` `u` characters, // @global `g` character else if ( (second === 109 && third === 101) || (second === 115 && third === 117) || (second === 103) ) { caret++; column++; if (media === undefined) { media = ''; } inner = ''; // keep track of opening `{` and `}` occurrences closed = 1; // travel to the end of the block while (caret < eof) { char = styles.charCodeAt(caret); // {, }, nested blocks may have nested blocks if (char === 123) { closed++; } else if (char === 125) { closed--; } // break when the nested block has ended if (closed === 0) { caret++; break; } // build content of nested block inner += styles.charAt(caret++); // move column and line position column = (char === 13 || char === 10) ? (line++, 0) : column + 1; } selector = depth === 0 ? prefix : prev.substring(0, prev.length-1).replace(newLinePattern, '').trim(); // build block media += (buff + stylis( selector, inner.trim(), animations, compact, null ).trim() + '}'); // middleware, block context if (uses === true) { temp = middleware(3, media, line, column, prefix, output.length); if (temp != null) { media = temp; } } buff = ''; medias = 1; if (caret === eof) { eof++; } continue; } // unknown else { type = 6; } } // flag special, i.e @keyframes, @font-face ... if (code !== 59 && second !== 105) { // k, m if (second !== 107 && second !== 109 && second !== 115 && second !== 103) { type = 5; } close = -1; special++; } } // property/selector else { // { character, selector declaration if (code === 123) { depth++; // push flat css if (levels === 1 && flat.length !== 0) { levels = 0; flat = prefix + ' {' + flat + '}'; // middleware, flat context if (uses === true) { temp = middleware(4, flat, line, column, prefix, output.length); if (temp != null) { flat = temp; } } output += flat; flat = ''; } // nested selector if (depth === 2) { // discard first character { caret++; column++; // inner content of block inner = ''; var nestSelector = buff.substring(0, buff.length - 1).split(splitPattern); var prevSelector = prev.substring(0, prev.length - 1).split(splitPattern); // keep track of opening `{` and `}` occurrences closed = 1; // travel to the end of the block while (caret < eof) { char = styles.charCodeAt(caret); // {, nested blocks may have nested blocks if (char === 123) { closed++; } // }, else if (char === 125) { closed--; } // break when the nested block has ended if (closed === 0) { break; } // build content of nested block inner += styles.charAt(caret++); // move column and line position column = (char === 13 || char === 10) ? (line++, 0) : column + 1; } // handle multiple selectors: h1, h2 { div, h4 {} } should generate // -> h1 div, h2 div, h2 h4, h2 div {} length = prevSelector.length; for (var j = 0; j < length; j++) { // extract value, prep index for reuse temp = prevSelector[j]; indexOf = temp.indexOf(prefix); prevSelector[j] = ''; // since there could also be multiple nested selectors for (var k = 0, l = nestSelector.length; k < l; k++) { if (indexOf > 0) { selector = ':global(%)' + temp.trim(); } else { selector = temp.replace(prefix, '&').trim(); } sel = nestSelector[k].trim(); if (sel.indexOf(' &') > 0) { selector = sel.replace('&', '').trim() + ' ' + selector; } else if (globalPattern.exec(sel) !== null) { selector = sel; } else { selector = selector + ' ' + sel; } prevSelector[j] += selector.replace(andSpacePattern, '').trim() + (k === l - 1 ? '' : ','); } } if (nest === undefined) { nest = ''; } // concat nest nest += ( '\n' + prevSelector.join(',').replace(globalsPattern, ' $1') + ' {'+inner+'}' ); // signature nested = 1; // clear current line, to avoid adding nested blocks to the normal flow buff = ''; // decreament depth depth--; } // top-level selector else if (special === 0 || type === 2) { // register block with placeholder selector if (isplace === 0 && buff.indexOf('::place') !== -1) { isplace = 1; } selectors = buff.split(splitPattern); // current selector build = ''; // previous selector prev = ''; length = selectors.length; // prefix multiple selectors with namesapces // @example h1, h2, h3 --> [namespace] h1, [namespace] h1, .... for (var j = 0; j < length; j++) { char = (selector = selectors[j]).charCodeAt(0); // ` `, trim if first character is a space if (char === 32) { char = (selector = selector.trim()).charCodeAt(0); } // & if (char === 38) { // before: & { / &&... { selector = prefix + selector.substring(1).replace(andPattern, prefix); // after: ${prefix} { / ${prefix}${prefix}... } else { // default to :global if & exists outside of the first non-space character if ((indexOf = selector.indexOf(' &')) > 0) { // before: html & { selector = selector.replace(andPattern, prefix).trim(); // after: html ${prefix} { } // : else if (char === 58) { nextcode = selector.charCodeAt(1); // h, t, :host if (compact === true && nextcode === 104 && selector.charCodeAt(4) === 116) { nextcode = selector.charCodeAt(5); // (, :host(selector) if (nextcode === 40) { // before: `(selector)` selector = ( prefix + ( selector .replace(hostPattern, '$1') .replace(andPattern, prefix) ) ); // after: ${prefx} selector { } // -, :host-context(selector) else if (nextcode === 45) { // before: `-context(selector)` selector = selector .replace(hostContextPattern, '$1 ' + prefix) .replace(andPattern, prefix) // after: selector ${prefix} { } // :host else { selector = prefix + selector.substring(5); } } // g, :global(selector) else if ( nextcode === 103 && ( compact === true || ((nextcode = selector.charCodeAt(8)) === 37) ) ) { globs = 1; // before: `:global(selector)` selector = ( selector .replace(globalPattern, '$1') .replace(andPattern, prefix).trim() ); // after: selector } // :hover, :active, :focus, etc... else { selector = prefix + selector; } } // non-pseudo selectors else if (globs === 0) { selector = prefix + ' ' + selector; } } // middleware, post-processed selector context if (uses === true) { temp = middleware( 1.5, j === length - 1 ? selector.substring(0, selector.length - 1).trim() : selector, line, column, prefix, output.length ); if (temp != null) { selector = j === length - 1 ? temp + ' {' : temp; } } // if first selector do not prefix with `,` prev += (j !== 0 ? ',\n' : '') + (globs !== 1 ? selector : ':global(%)' + selector); build += j !== 0 ? ',' + selector : selector; // reset :global flag globs = 0; } buff = build; } else { prev = buff; } } // not single `}` else if ((code === 125 && buff.length === 1) === false) { if (join === 1) { buff = buff.replace(newLinePattern, ''); } // ; if (code !== 59) { buff = (code === 125 ? buff.substring(0, buff.length - 1) : buff.trim()) + ';'; } // animation: a, n, i characters if (first === 97 && second === 110 && third === 105) { // removes ; buff = buff.substring(0, buff.length - 1); // position of : colon = buff.indexOf(':')+1; // left hand side everything before `:` build = buff.substring(0, colon); // short hand animation syntax if (animations === true && buff.charCodeAt(9) !== 45) { var anims = buff.substring(colon).trim().split(','); length = anims.length; // because we can have multiple animations `animation: slide 4s, slideOut 2s` for (var j = 0; j < length; j++) { var anim = anims[j]; var props = anim.split(' '); // since we can't be sure of the position of the name of the animation we have to find it for (var k = 0, l = props.length; k < l; k++) { var prop = props[k].trim(); var frst = prop.charCodeAt(0); var thrd = prop.charCodeAt(2); var len = prop.length; var last = prop.charCodeAt(len - 1); // animation name parser if ( // first character ( // letters (frst > 64 && frst < 90) || (frst > 96 && frst < 122) || // the exception `underscores or dashes` frst === 45 || // but two dashes at the beginning are forbidden (frst === 95 && prop.charCodeAt(1) !== 95) ) && // cubic-bezier()/steps(), ) last !== 41 && len !== 0 && !( frst === 105 && ( // infinite, i, f, e (thrd === 102 && last === 101 && len === 8) || // initial (thrd === 105 && last === 108 && len === 7) || // inherit (thrd === 104 && last === 116 && len === 7) ) ) && // unset !(frst === 117 && thrd === 115 && last === 116 && len === 5) && // linear, l, n, r !(frst === 108 && thrd === 110 && last === 114 && len === 6) && // alternate/alternate-reverse, a, t, e !(frst === 97 && thrd === 116 && last === 101 && (len === 9 || len === 17)) && // normal, n, r, l !(frst === 110 && thrd === 114 && last === 108 && len === 6) && // backwards, b, c, s !(frst === 98 && thrd === 99 && last === 115 && len === 9) && // forwards, f, r, s !(frst === 102 && thrd === 114 && last === 115 && len === 8) && // both, b, t, h !(frst === 98 && thrd === 116 && last === 104 && len === 4) && // none, n, n, e !(frst === 110 && thrd === 110 && last === 101 && len === 4)&& // running, r, n, g !(frst === 114 && thrd === 110 && last === 103 && len === 7) && // paused, p, u, d !(frst === 112 && thrd === 117 && last === 100 && len === 6) && // reversed, r, v, d !(frst === 114 && thrd === 118 && last === 100 && len === 8) && // step-start/step-end, s, e, (t/d) !( frst === 115 && thrd === 101 && ((last === 116 && len === 10) || (last === 100 && len === 8)) ) && // ease/ease-in/ease-out/ease-in-out, e, s, e !( frst === 101 && thrd === 115 && ( (last === 101 && len === 4) || (len === 11 || len === 7 || len === 8) && prop.charCodeAt(4) === 45 ) ) && // durations, 0.4ms, .4s, 400ms ... isNaN(parseFloat(prop)) && // handle spaces in cubic-bezier()/steps() functions prop.indexOf('(') === -1 ) { props[k] = animns + prop; } } build += (j === 0 ? '' : ',') + props.join(' ').trim(); } } // explicit syntax, anims array should have only one element else { build += ( (buff.charCodeAt(10) !== 110 ? '' : animns) + buff.substring(colon).trim().trim() ); } // vendor prefix buff = webkit + build + ';' + build + (code === 125 ? ';}' : ';'); } // appearance: a, p, p else if (first === 97 && second === 112 && third === 112) { // vendor prefix -webkit- and -moz- buff = ( webkit + buff + moz + buff + buff ); } // display: d, i, s else if (first === 100 && second === 105 && third === 115) { // flex/inline-flex if ((indexOf = buff.indexOf('flex')) !== -1) { // e, inline-flex temp = buff.charCodeAt(indexOf-2) === 101 ? 'inline-' : ''; buff = buff.indexOf(' !important') !== -1 ? ' !important' : ''; // vendor prefix buff = ( 'display: ' + webkit + temp + 'box' + buff + ';' + 'display: ' + webkit + temp + 'flex' + buff + ';' + 'display: ' + ms + 'flexbox' + buff + ';' + 'display: ' + temp + 'flex' + buff + ';' ); } } // transforms & transitions: t, r, a // text-size-adjust: t, e, x else if ( first === 116 && ( (second === 114 && third === 97) || (second === 101 && third === 120) ) ) { // vendor prefix -webkit- and -ms- if transform buff = ( webkit + buff + (buff.charCodeAt(5) === 102 ? ms + buff : '') + buff ); if (second + third === 211 && buff.charCodeAt(12) === 115 && buff.indexOf(' transform') > -1) { buff = buff.substring(0, buff.indexOf(';')+1).replace(transformPattern, ' '+webkit+'$1') + buff; } } // hyphens: h, y, p // user-select: u, s, e else if ( (first === 104 && second === 121 && third === 112) || (first === 117 && second === 115 && third === 101) ) { // vendor prefix all buff = ( webkit + buff + moz + buff + ms + buff + buff ); } // flex: f, l, e else if (first === 102 && second === 108 && third === 101) { // vendor prefix all but moz buff = ( webkit + buff + ms + buff + buff ); } // order: o, r, d else if (first === 111 && second === 114 && third === 100) { // vendor prefix all but moz buff = ( webkit + buff + ms + 'flex-' + buff + buff ); } // align-items, align-center, align-self: a, l, i, - else if (first === 97 && second === 108 && third === 105 && buff.charCodeAt(5) === 45) { switch (buff.charCodeAt(6)) { // align-items, i case 105: { temp = buff.replace('-items', ''); buff = ( webkit + buff + webkit + 'box-' + temp + ms + 'flex-'+ temp + buff ); break; } // align-self, s case 115: { buff = ( ms + 'flex-item-' + buff.replace('-self', '') + buff ); break; } // align-content default: { buff = ( ms + 'flex-line-pack' + buff.replace('align-content', '') + buff ); break; } } } // justify-content, j, u, s else if (first === 106 && second === 117 && third === 115) { colon = buff.indexOf(':'); temp = buff.substring(colon).replace('flex-', '') buff = ( webkit + 'box-pack' + temp + webkit + buff + ms + 'flex-pack' + temp + buff ); } // cursor, c, u, r else if (first === 99 && second === 117 && third === 114 && /zoo|gra/.exec(buff) !== null) { buff = ( buff.replace(colonPattern, ': ' + webkit) + buff.replace(colonPattern, ': ' + moz) + buff ); } // width: min-content / width: max-content else if (first === 119 && second === 105 && third === 100 && (indexOf = buff.indexOf('-content')) !== -1) { temp = buff.substring(indexOf - 3); // vendor prefix buff = ( 'width: ' + webkit + temp + 'width: ' + moz + temp + 'width: ' + temp ); } if (code !== 59) { buff = buff.substring(0, buff.length - 1); // } if (code === 125) { buff += '}'; } } } // } character if (code === 125) { if (depth !== 0) { depth--; } // concat nested css if (depth === 0 && nested === 1) { styles = styles.substring(0, caret + 1) + nest + styles.substring(caret + 1); eof += nest.length; nest = ''; nested = 0; close++; } // }, ` ` whitespace if (first !== 125 && buff.charCodeAt(buff.length - 2) === 32) { buff = buff.substring(0, buff.length-1).trim() + '}'; } } // @keyframes if (special !== 0) { // }, find closing tag if (code === 125) { close++; } // { else if (code === 123 && close !== 0) { close--; } // closing tag if (close === 0) { // @keyframes if (type === 1) { // vendor prefix buff = '}@'+blob+'}'; // reset blob = ''; } // reset signatures type = 0; close--; special--; } // @keyframes else if (type === 1) { blob += buff; } } // flat context else if (depth === 0 && code !== 125) { levels = 1; flat = flat === undefined ? buff : flat + buff; buff = ''; } } // append line to blck buffer blck += buff; // add blck buffer to output if (code === 125 && type === 0) { char = blck.charCodeAt(blck.length - 2); // {, @ if (char !== 123) { // middleware, block context if (uses === true) { temp = middleware(3, blck, line, column, prefix, output.length); if (temp != null) { blck = temp; } } if (isplace === 1) { isplace = 0; blck = ( blck.replace(placeholderPattern, '::'+webkit+'input-place') + blck.replace(placeholderPattern, '::'+moz+'place') + blck.replace(placeholderPattern, ':'+ms+'input-place') + blck ); } // append blck buffer output += blck; } // reset blck buffer blck = ''; } if (medias === 1) { // middleware, block context if (uses === true) { temp = middleware(3, blck, line, column, prefix, output.length); if (temp != null) { media = temp; } } output += media; medias = 0; media = ''; } join = 0 // reset line buffer buff = ''; } // build line by line else { // \r, \n, new lines if (code === 13 || code === 10) { if (comline === 1) { comment = comline = 0; buff = buff.substring(0, buff.indexOf('//')).trim(); } // / else if (uses === true && comment === 0 && (length = (str = str.trim()).length) !== 0 && str.charCodeAt(0) !== 47) { if (buff.length !== 0) { temp = middleware(7, str, line, column, prefix, output.length); if (temp != null) { buff = buff.replace(new RegExp(str+'$'), temp).trim(); } } str = ''; } column = 0; line++; } else { // not `\t` tab character if (code !== 9) { character = styles.charAt(caret); // build line buffer if (uses === true && comment === 0) { str += character; } // build character buffer buff += character; switch (code) { // , case 44: { if (strings === 0 && comment === 0 && func === 0) { join = 1; buff += '\n'; } break; } // " character case 34: { if (comment === 0) { // exit string " context / enter string context strings = strings === 34 ? 0 : (strings === 39 ? 39 : 34); } break; } // ' character case 39: { if (comment === 0) { // exit string ' context / enter string context strings = strings === 39 ? 0 : (strings === 34 ? 34 : 39); } break; } // ( character case 40: { if (strings === 0 && comment === 0) { func = 1; } break; } // ) character case 41: { if (strings === 0 && comment === 0) { func = 0; } break; } // / character case 47: { if (strings === 0 && func === 0) { char = styles.charCodeAt(caret - 1); // /, begin line comment if (comblck === 0 && char === 47) { comment = comline = 1; } // *, end block comment else if (char === 42) { comment = comblck = 0; buff = buff.substring(0, buff.indexOf('/*')).trim(); } } break; } // * character case 42: { if (strings === 0 && func === 0 && comline === 0 && comblck === 0) { // /, begin block comment if (styles.charCodeAt(caret - 1) === 47) { comment = comblck = 1; } } break; } } } // move column position column++; } } // move caret position caret++; } // trailing flat css if (flat !== undefined && flat.length !== 0) { flat = prefix + ' {' + flat + '}'; // middleware, flat context if (uses === true) { temp = middleware(4, flat, line, column, prefix, output.length); if (temp != null) { flat = temp; } } // append flat css output += flat; } // middleware, output context if (uses === true) { temp = middleware(6, output, line, column, prefix, output.length); if (temp != null) { output = temp; } } return output; } /** * use plugin * * @param {string|function|function[]} key * @param {function?} plugin * @return {Object} {plugins} */ function use (plugin) { var length = plugins.length; if (plugin != null) { // array of plugins if (plugin.constructor === Array) { for (var i = 0, l = plugin.length; i < l; i++) { plugins[length++] = plugin[i]; } } // single un-keyed plugin else { plugins[length] = plugin; } } return stylis; }; /** * Middleware Proxy * * @param {Number} ctx * @param {String} str * @param {Number} line * @param {Number} col * @param {String} prefix * @param {Number} length * @return {String?} */ function proxy (ctx, str, line, col, prefix, length) { var output = str; for (var i = 0, l = plugins.length; i < l; i++) { output = plugins[i](ctx, output, line, col, prefix, length) || output; } if (output !== str) { return output; } } stylis.use = use; /** * plugin store * * @type {Function[]} */ stylis.p = plugins; /** * regular expresions * * @type {Object<string, RegExp>} */ stylis.r = { a: andPattern, s: splitPattern, g: globalPattern, n: globalsPattern }; return stylis; }));
exports.Employee = require("./employee"); exports.Staff = require("./staff"); exports.Manager = require("./manager"); exports.Executive = require("./executive");
import type { Action } from '../actions/types'; import { SET_INDEX } from '../actions/list'; export type State = { list: string } const initialState = { list: [ 'React Native starter kit', 'RN Navigator', 'NB Easy Grid', 'NativeBase', 'CodePush', 'Redux', ], selectedIndex: undefined, }; export default function (state:State = initialState, action:Action): State { if (action.type === SET_INDEX) { return { ...state, selectedIndex: action.payload, }; } return state; }
'use strict'; var expect = require('chai').expect, countdown = require('../../countdown'), moment = require('moment-timezone'); describe('Countdown', function() { it('returns formatted time', function(done) { countdown.liveDateResponse = '2014-11-01 11:00 +0800'; expect(countdown.calculateCountdown).to.not.throw(Error); expect(countdown.formattedTime).to.equal('1 Nov 2014, Sat @11:00 am +08:00 GMT'); done(); }); it('returns days, hours, minutes, seconds', function(done) { countdown.liveDateResponse = '2014-11-01 11:00 +0800'; expect(function() { countdown.calculateCountdown(moment('2014-10-21 23:48:33 GMT+0800', 'YYYY-MM-DD HH:mm:ss Z')); }).to.not.throw(Error); expect(countdown.days).to.equal(10); expect(countdown.hours).to.equal(11); expect(countdown.minutes).to.equal(11); expect(countdown.seconds).to.equal(27); done(); }); });
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const models = require('./index'); /** * Geographic and time constraints for Azure reachability report. * */ class AzureReachabilityReportParameters { /** * Create a AzureReachabilityReportParameters. * @member {object} providerLocation * @member {string} [providerLocation.country] The name of the country. * @member {string} [providerLocation.state] The name of the state. * @member {string} [providerLocation.city] The name of the city or town. * @member {array} [providers] List of Internet service providers. * @member {array} [azureLocations] Optional Azure regions to scope the query * to. * @member {date} startTime The start time for the Azure reachability report. * @member {date} endTime The end time for the Azure reachability report. */ constructor() { } /** * Defines the metadata of AzureReachabilityReportParameters * * @returns {object} metadata of AzureReachabilityReportParameters * */ mapper() { return { required: false, serializedName: 'AzureReachabilityReportParameters', type: { name: 'Composite', className: 'AzureReachabilityReportParameters', modelProperties: { providerLocation: { required: true, serializedName: 'providerLocation', type: { name: 'Composite', className: 'AzureReachabilityReportLocation' } }, providers: { required: false, serializedName: 'providers', type: { name: 'Sequence', element: { required: false, serializedName: 'StringElementType', type: { name: 'String' } } } }, azureLocations: { required: false, serializedName: 'azureLocations', type: { name: 'Sequence', element: { required: false, serializedName: 'StringElementType', type: { name: 'String' } } } }, startTime: { required: true, serializedName: 'startTime', type: { name: 'DateTime' } }, endTime: { required: true, serializedName: 'endTime', type: { name: 'DateTime' } } } } }; } } module.exports = AzureReachabilityReportParameters;
/* Battle Feature */ exports.id = 'battle'; exports.desc = 'Automated battle bot'; var BattleBot = exports.BattleBot = require('./battle-bot.js'); var TeamBuilder = exports.TeamBuilder = require('./teambuilder.js'); var ChallManager = exports.ChallManager = require('./challenges.js'); var TourManager = exports.TourManager = require('./tournaments.js'); var LadderManager = exports.LadderManager = require('./ladder.js'); exports.init = function () { BattleBot.init(); BattleBot.clearData(); TourManager.clearData(); TeamBuilder.loadTeamList(); }; exports.parse = function (room, message, isIntro, spl) { switch (spl[0]) { case 'updatechallenges': ChallManager.parse(room, message, isIntro, spl); break; case 'tournament': TourManager.parse(room, message, isIntro, spl); break; case 'rated': LadderManager.reportBattle(room); break; } if (!Bot.rooms[room]) { if (spl[0] !== 'init' || spl[2] !== 'battle') return; } else if (Bot.rooms[room].type !== "battle") return; try { BattleBot.receive(room, message); } catch (e) { errlog(e.stack); error("BattleBot crash"); } }; exports.getInitCmds = function () { return BattleBot.tryJoinAbandonedBattles(); }; exports.readyToDie = function () { var battles = Object.keys(BattleBot.data); if (battles.length) return ("There are " + battles.length + " battles in progress"); }; exports.destroy = function () { LadderManager.destroy(); if (Features[exports.id]) delete Features[exports.id]; };
/** * @fileoverview Tests for no-wrap-func rule. * @author Ilya Volodin * @copyright 2013 Ilya Volodin. All rights reserved. */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var eslint = require("../../../lib/eslint"), ESLintTester = require("eslint-tester"); //------------------------------------------------------------------------------ // Tests //------------------------------------------------------------------------------ var eslintTester = new ESLintTester(eslint); eslintTester.addRuleTest("lib/rules/no-wrap-func", { valid: [ "(function() {})()", "var a = function() {}", "new Object(function() {})" ], invalid: [ { code: "(() => {});", ecmaFeatures: { arrowFunctions: true }, errors: [{ message: "Wrapping non-IIFE function literals in parens is unnecessary.", type: "ArrowFunctionExpression"}] }, { code: "(function() {});", errors: [{ message: "Wrapping non-IIFE function literals in parens is unnecessary.", type: "FunctionExpression"}] }, { code: "var a = (function() {});", errors: [{ message: "Wrapping non-IIFE function literals in parens is unnecessary.", type: "FunctionExpression"}] } ] });
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; function load(id = 0) { return [ { id: id + 1, name: '1' }, { id: id + 2, name: '2' }, { id: id + 3, name: '3' }, { id: id + 4, name: '4' }, ]; } export default class DefaultParameters extends Component { static propTypes = { onReady: PropTypes.func.isRequired, }; constructor(props) { super(props); this.state = { users: [] }; } async componentDidMount() { const users = load(); this.setState({ users }); } componentDidUpdate() { this.props.onReady(); } render() { return ( <div id="feature-default-parameters"> {this.state.users.map(user => ( <div key={user.id}>{user.name}</div> ))} </div> ); } }
const stylelint = require('stylelint'); const utils = require('./stylelint-utils'); const utilityClasses = require('./utility-classes-map.js'); const ruleName = 'stylelint-gitlab/utility-classes'; const messages = stylelint.utils.ruleMessages(ruleName, { expected: (selector1, selector2) => { return `"${selector1}" has the same properties as our BS4 utility class "${selector2}" so please use that instead.`; }, }); module.exports = stylelint.createPlugin(ruleName, function(enabled) { if (!enabled) { return; } return function(root, result) { utils.createPropertiesHashmap(root, result, ruleName, messages, utilityClasses, false); }; }); module.exports.ruleName = ruleName; module.exports.messages = messages;
var notify = require("gulp-notify"); var gutil = require("gulp-util"); var beep = require("./beep"); module.exports = function() { var args = Array.prototype.slice.call(arguments); // Send error to notification center with gulp-notify notify.onError({ title: "Compile Error", message: "<%= error.message %>" }).apply(this, args); // Keep gulp from hanging on this task this.emit('end'); };
'use strict'; /** * Here is the problem: http://bugs.jquery.com/ticket/7292 * basically jQuery treats change event on some browsers (IE) as a * special event and changes it form 'change' to 'click/keydown' and * few others. This horrible hack removes the special treatment */ _jQuery.event.special.change = undefined; bindJQuery(); beforeEach(function() { publishExternalAPI(angular); // workaround for IE bug https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT // IE overwrite window.jQuery with undefined because of empty jQuery var statement, so we have to // correct this, but only if we are not running in jqLite mode if (!_jqLiteMode && _jQuery !== jQuery) { jQuery = _jQuery; } // This resets global id counter; uid = ['0', '0', '0']; // reset to jQuery or default to us. bindJQuery(); jqLite(document.body).html(''); }); afterEach(function() { if (this.$injector) { var $rootScope = this.$injector.get('$rootScope'); var $log = this.$injector.get('$log'); // release the injector dealoc($rootScope); // check $log mock $log.assertEmpty && $log.assertEmpty(); } // complain about uncleared jqCache references var count = 0; // This line should be enabled as soon as this bug is fixed: http://bugs.jquery.com/ticket/11775 //var cache = jqLite.cache; var cache = JQLite.cache; forEachSorted(cache, function(expando, key){ forEach(expando.data, function(value, key){ count ++; if (value.$element) { dump('LEAK', key, value.$id, sortedHtml(value.$element)); } else { dump('LEAK', key, toJson(value)); } }); }); if (count) { throw new Error('Found jqCache references that were not deallocated! count: ' + count); } }); function dealoc(obj) { var jqCache = jqLite.cache; if (obj) { if (isElement(obj)) { cleanup(jqLite(obj)); } else { for(var key in jqCache) { var value = jqCache[key]; if (value.data && value.data.$scope == obj) { delete jqCache[key]; } } } } function cleanup(element) { element.unbind().removeData(); for ( var i = 0, children = element.contents() || []; i < children.length; i++) { cleanup(jqLite(children[i])); } } } /** * @param {DOMElement} element * @param {boolean=} showNgClass */ function sortedHtml(element, showNgClass) { var html = ""; forEach(jqLite(element), function toString(node) { if (node.nodeName == "#text") { html += node.nodeValue. replace(/&(\w+[&;\W])?/g, function(match, entity){return entity?match:'&amp;';}). replace(/</g, '&lt;'). replace(/>/g, '&gt;'); } else { html += '<' + (node.nodeName || '?NOT_A_NODE?').toLowerCase(); var attributes = node.attributes || []; var attrs = []; var className = node.className || ''; if (!showNgClass) { className = className.replace(/ng-[\w-]+\s*/g, ''); } className = trim(className); if (className) { attrs.push(' class="' + className + '"'); } for(var i=0; i<attributes.length; i++) { if (i>0 && attributes[i] == attributes[i-1]) continue; //IE9 creates dupes. Ignore them! var attr = attributes[i]; if(attr.name.match(/^ng[\:\-]/) || attr.value && attr.value !='null' && attr.value !='auto' && attr.value !='false' && attr.value !='inherit' && (attr.value !='0' || attr.name =='value') && attr.name !='loop' && attr.name !='complete' && attr.name !='maxLength' && attr.name !='size' && attr.name !='class' && attr.name !='start' && attr.name !='tabIndex' && attr.name !='style' && attr.name.substr(0, 6) != 'jQuery') { // in IE we need to check for all of these. if (!/ng-\d+/.exec(attr.name) && attr.name != 'getElementById' && // IE7 has `selected` in attributes attr.name !='selected' && // IE7 adds `value` attribute to all LI tags (node.nodeName != 'LI' || attr.name != 'value')) attrs.push(' ' + attr.name + '="' + attr.value + '"'); } } attrs.sort(); html += attrs.join(''); if (node.style) { var style = []; if (node.style.cssText) { forEach(node.style.cssText.split(';'), function(value){ value = trim(value); if (value) { style.push(lowercase(value)); } }); } for(var css in node.style){ var value = node.style[css]; if (isString(value) && isString(css) && css != 'cssText' && value && (1*css != css)) { var text = lowercase(css + ': ' + value); if (value != 'false' && indexOf(style, text) == -1) { style.push(text); } } } style.sort(); var tmp = style; style = []; forEach(tmp, function(value){ if (!value.match(/^max[^\-]/)) style.push(value); }); if (style.length) { html += ' style="' + style.join('; ') + ';"'; } } html += '>'; var children = node.childNodes; for(var j=0; j<children.length; j++) { toString(children[j]); } html += '</' + node.nodeName.toLowerCase() + '>'; } }); return html; } // TODO(vojta): migrate these helpers into jasmine matchers /**a * This method is a cheap way of testing if css for a given node is not set to 'none'. It doesn't * actually test if an element is displayed by the browser. Be aware!!! */ function isCssVisible(node) { var display = node.css('display'); return display != 'none'; } function assertHidden(node) { if (isCssVisible(node)) { throw new Error('Node should be hidden but was visible: ' + angular.module.ngMock.dump(node)); } } function assertVisible(node) { if (!isCssVisible(node)) { throw new Error('Node should be visible but was hidden: ' + angular.module.ngMock.dump(node)); } } function provideLog($provide) { $provide.factory('log', function() { var messages = []; function log(msg) { messages.push(msg); return msg; } log.toString = function() { return messages.join('; '); } log.toArray = function() { return messages; } log.reset = function() { messages = []; } log.fn = function(msg) { return function() { log(msg); } } log.$$log = true; return log; }); } function pending() { dump('PENDING'); }; function trace(name) { dump(new Error(name).stack); }
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core */ /* eslint-disable no-func-assign */ 'use strict'; const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils'); let React; let ReactFeatureFlags; let ReactDOM; let ReactDOMServer; let useState; let useReducer; let useEffect; let useContext; let useCallback; let useMemo; let useRef; let useImperativeHandle; let useLayoutEffect; let useDebugValue; let forwardRef; let yieldedValues; let yieldValue; let clearYields; function initModules() { // Reset warning cache. jest.resetModuleRegistry(); ReactFeatureFlags = require('shared/ReactFeatureFlags'); ReactFeatureFlags.debugRenderPhaseSideEffectsForStrictMode = false; React = require('react'); ReactDOM = require('react-dom'); ReactDOMServer = require('react-dom/server'); useState = React.useState; useReducer = React.useReducer; useEffect = React.useEffect; useContext = React.useContext; useCallback = React.useCallback; useMemo = React.useMemo; useRef = React.useRef; useDebugValue = React.useDebugValue; useImperativeHandle = React.useImperativeHandle; useLayoutEffect = React.useLayoutEffect; forwardRef = React.forwardRef; yieldedValues = []; yieldValue = value => { yieldedValues.push(value); }; clearYields = () => { const ret = yieldedValues; yieldedValues = []; return ret; }; // Make them available to the helpers. return { ReactDOM, ReactDOMServer, }; } const { resetModules, itRenders, itThrowsWhenRendering, serverRender, } = ReactDOMServerIntegrationUtils(initModules); describe('ReactDOMServerHooks', () => { beforeEach(() => { resetModules(); }); function Text(props) { yieldValue(props.text); return <span>{props.text}</span>; } describe('useState', () => { itRenders('basic render', async render => { function Counter(props) { const [count] = useState(0); return <span>Count: {count}</span>; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('Count: 0'); }); itRenders('lazy state initialization', async render => { function Counter(props) { const [count] = useState(() => { return 0; }); return <span>Count: {count}</span>; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('Count: 0'); }); it('does not trigger a re-renders when updater is invoked outside current render function', async () => { function UpdateCount({setCount, count, children}) { if (count < 3) { setCount(c => c + 1); } return <span>{children}</span>; } function Counter() { let [count, setCount] = useState(0); return ( <div> <UpdateCount setCount={setCount} count={count}> Count: {count} </UpdateCount> </div> ); } const domNode = await serverRender(<Counter />); expect(domNode.textContent).toEqual('Count: 0'); }); itThrowsWhenRendering( 'if used inside a class component', async render => { class Counter extends React.Component { render() { let [count] = useState(0); return <Text text={count} />; } } return render(<Counter />); }, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', ); itRenders('multiple times when an updater is called', async render => { function Counter() { let [count, setCount] = useState(0); if (count < 12) { setCount(c => c + 1); setCount(c => c + 1); setCount(c => c + 1); } return <Text text={'Count: ' + count} />; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('Count: 12'); }); itRenders('until there are no more new updates', async render => { function Counter() { let [count, setCount] = useState(0); if (count < 3) { setCount(count + 1); } return <span>Count: {count}</span>; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('Count: 3'); }); itThrowsWhenRendering( 'after too many iterations', async render => { function Counter() { let [count, setCount] = useState(0); setCount(count + 1); return <span>{count}</span>; } return render(<Counter />); }, 'Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.', ); }); describe('useReducer', () => { itRenders('with initial state', async render => { function reducer(state, action) { return action === 'increment' ? state + 1 : state; } function Counter() { let [count] = useReducer(reducer, 0); yieldValue('Render: ' + count); return <Text text={count} />; } const domNode = await render(<Counter />); expect(clearYields()).toEqual(['Render: 0', 0]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('0'); }); itRenders('lazy initialization', async render => { function reducer(state, action) { return action === 'increment' ? state + 1 : state; } function Counter() { let [count] = useReducer(reducer, 0, c => c + 1); yieldValue('Render: ' + count); return <Text text={count} />; } const domNode = await render(<Counter />); expect(clearYields()).toEqual(['Render: 1', 1]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('1'); }); itRenders( 'multiple times when updates happen during the render phase', async render => { function reducer(state, action) { return action === 'increment' ? state + 1 : state; } function Counter() { let [count, dispatch] = useReducer(reducer, 0); if (count < 3) { dispatch('increment'); } yieldValue('Render: ' + count); return <Text text={count} />; } const domNode = await render(<Counter />); expect(clearYields()).toEqual([ 'Render: 0', 'Render: 1', 'Render: 2', 'Render: 3', 3, ]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('3'); }, ); itRenders( 'using reducer passed at time of render, not time of dispatch', async render => { // This test is a bit contrived but it demonstrates a subtle edge case. // Reducer A increments by 1. Reducer B increments by 10. function reducerA(state, action) { switch (action) { case 'increment': return state + 1; case 'reset': return 0; } } function reducerB(state, action) { switch (action) { case 'increment': return state + 10; case 'reset': return 0; } } function Counter() { let [reducer, setReducer] = useState(() => reducerA); let [count, dispatch] = useReducer(reducer, 0); if (count < 20) { dispatch('increment'); // Swap reducers each time we increment if (reducer === reducerA) { setReducer(() => reducerB); } else { setReducer(() => reducerA); } } yieldValue('Render: ' + count); return <Text text={count} />; } const domNode = await render(<Counter />); expect(clearYields()).toEqual([ // The count should increase by alternating amounts of 10 and 1 // until we reach 21. 'Render: 0', 'Render: 10', 'Render: 11', 'Render: 21', 21, ]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('21'); }, ); }); describe('useMemo', () => { itRenders('basic render', async render => { function CapitalizedText(props) { const text = props.text; const capitalizedText = useMemo( () => { yieldValue(`Capitalize '${text}'`); return text.toUpperCase(); }, [text], ); return <Text text={capitalizedText} />; } const domNode = await render(<CapitalizedText text="hello" />); expect(clearYields()).toEqual(["Capitalize 'hello'", 'HELLO']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('HELLO'); }); itRenders('if no inputs are provided', async render => { function LazyCompute(props) { const computed = useMemo(props.compute); return <Text text={computed} />; } function computeA() { yieldValue('compute A'); return 'A'; } const domNode = await render(<LazyCompute compute={computeA} />); expect(clearYields()).toEqual(['compute A', 'A']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('A'); }); itRenders( 'multiple times when updates happen during the render phase', async render => { function CapitalizedText(props) { const [text, setText] = useState(props.text); const capitalizedText = useMemo( () => { yieldValue(`Capitalize '${text}'`); return text.toUpperCase(); }, [text], ); if (text === 'hello') { setText('hello, world.'); } return <Text text={capitalizedText} />; } const domNode = await render(<CapitalizedText text="hello" />); expect(clearYields()).toEqual([ "Capitalize 'hello'", "Capitalize 'hello, world.'", 'HELLO, WORLD.', ]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('HELLO, WORLD.'); }, ); itRenders( 'should only invoke the memoized function when the inputs change', async render => { function CapitalizedText(props) { const [text, setText] = useState(props.text); const [count, setCount] = useState(0); const capitalizedText = useMemo( () => { yieldValue(`Capitalize '${text}'`); return text.toUpperCase(); }, [text], ); yieldValue(count); if (count < 3) { setCount(count + 1); } if (text === 'hello' && count === 2) { setText('hello, world.'); } return <Text text={capitalizedText} />; } const domNode = await render(<CapitalizedText text="hello" />); expect(clearYields()).toEqual([ "Capitalize 'hello'", 0, 1, 2, // `capitalizedText` only recomputes when the text has changed "Capitalize 'hello, world.'", 3, 'HELLO, WORLD.', ]); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('HELLO, WORLD.'); }, ); itRenders('with a warning for useState inside useMemo', async render => { function App() { useMemo(() => { useState(); return 0; }); return 'hi'; } const domNode = await render(<App />, 1); expect(domNode.textContent).toEqual('hi'); }); itThrowsWhenRendering( 'with a warning for useRef inside useReducer', async render => { function App() { const [value, dispatch] = useReducer((state, action) => { useRef(0); return state + 1; }, 0); if (value === 0) { dispatch(); } return value; } const domNode = await render(<App />, 1); expect(domNode.textContent).toEqual('1'); }, 'Rendered more hooks than during the previous render', ); itRenders('with a warning for useRef inside useState', async render => { function App() { const [value] = useState(() => { useRef(0); return 0; }); return value; } const domNode = await render(<App />, 1); expect(domNode.textContent).toEqual('0'); }); }); describe('useRef', () => { itRenders('basic render', async render => { function Counter(props) { const count = useRef(0); return <span>Count: {count.current}</span>; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('Count: 0'); }); itRenders( 'multiple times when updates happen during the render phase', async render => { function Counter(props) { const [count, setCount] = useState(0); const ref = useRef(count); if (count < 3) { const newCount = count + 1; ref.current = newCount; setCount(newCount); } yieldValue(count); return <span>Count: {ref.current}</span>; } const domNode = await render(<Counter />); expect(clearYields()).toEqual([0, 1, 2, 3]); expect(domNode.textContent).toEqual('Count: 3'); }, ); itRenders( 'always return the same reference through multiple renders', async render => { let firstRef = null; function Counter(props) { const [count, setCount] = useState(0); const ref = useRef(count); if (firstRef === null) { firstRef = ref; } else if (firstRef !== ref) { throw new Error('should never change'); } if (count < 3) { setCount(count + 1); } else { firstRef = null; } yieldValue(count); return <span>Count: {ref.current}</span>; } const domNode = await render(<Counter />); expect(clearYields()).toEqual([0, 1, 2, 3]); expect(domNode.textContent).toEqual('Count: 0'); }, ); }); describe('useEffect', () => { itRenders('should ignore effects on the server', async render => { function Counter(props) { useEffect(() => { yieldValue('should not be invoked'); }); return <Text text={'Count: ' + props.count} />; } const domNode = await render(<Counter count={0} />); expect(clearYields()).toEqual(['Count: 0']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('Count: 0'); }); }); describe('useCallback', () => { itRenders('should ignore callbacks on the server', async render => { function Counter(props) { useCallback(() => { yieldValue('should not be invoked'); }); return <Text text={'Count: ' + props.count} />; } const domNode = await render(<Counter count={0} />); expect(clearYields()).toEqual(['Count: 0']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('Count: 0'); }); itRenders('should support render time callbacks', async render => { function Counter(props) { const renderCount = useCallback(increment => { return 'Count: ' + (props.count + increment); }); return <Text text={renderCount(3)} />; } const domNode = await render(<Counter count={2} />); expect(clearYields()).toEqual(['Count: 5']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('Count: 5'); }); }); describe('useImperativeHandle', () => { it('should not be invoked on the server', async () => { function Counter(props, ref) { useImperativeHandle(ref, () => { throw new Error('should not be invoked'); }); return <Text text={props.label + ': ' + ref.current} />; } Counter = forwardRef(Counter); const counter = React.createRef(); counter.current = 0; const domNode = await serverRender( <Counter label="Count" ref={counter} />, ); expect(clearYields()).toEqual(['Count: 0']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('Count: 0'); }); }); describe('useLayoutEffect', () => { it('should warn when invoked during render', async () => { function Counter() { useLayoutEffect(() => { throw new Error('should not be invoked'); }); return <Text text="Count: 0" />; } const domNode = await serverRender(<Counter />, 1); expect(clearYields()).toEqual(['Count: 0']); expect(domNode.tagName).toEqual('SPAN'); expect(domNode.textContent).toEqual('Count: 0'); }); }); describe('useContext', () => { itThrowsWhenRendering( 'if used inside a class component', async render => { const Context = React.createContext({}, () => {}); class Counter extends React.Component { render() { let [count] = useContext(Context); return <Text text={count} />; } } return render(<Counter />); }, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', ); }); itRenders( 'can use the same context multiple times in the same function', async render => { const Context = React.createContext({foo: 0, bar: 0, baz: 0}); function Provider(props) { return ( <Context.Provider value={{foo: props.foo, bar: props.bar, baz: props.baz}}> {props.children} </Context.Provider> ); } function FooAndBar() { const {foo} = useContext(Context); const {bar} = useContext(Context); return <Text text={`Foo: ${foo}, Bar: ${bar}`} />; } function Baz() { const {baz} = useContext(Context); return <Text text={'Baz: ' + baz} />; } class Indirection extends React.Component { render() { return this.props.children; } } function App(props) { return ( <div> <Provider foo={props.foo} bar={props.bar} baz={props.baz}> <Indirection> <Indirection> <FooAndBar /> </Indirection> <Indirection> <Baz /> </Indirection> </Indirection> </Provider> </div> ); } const domNode = await render(<App foo={1} bar={3} baz={5} />); expect(clearYields()).toEqual(['Foo: 1, Bar: 3', 'Baz: 5']); expect(domNode.childNodes.length).toBe(2); expect(domNode.firstChild.tagName).toEqual('SPAN'); expect(domNode.firstChild.textContent).toEqual('Foo: 1, Bar: 3'); expect(domNode.lastChild.tagName).toEqual('SPAN'); expect(domNode.lastChild.textContent).toEqual('Baz: 5'); }, ); itRenders('warns when bitmask is passed to useContext', async render => { let Context = React.createContext('Hi'); function Foo() { return <span>{useContext(Context, 1)}</span>; } const domNode = await render(<Foo />, 1); expect(domNode.textContent).toBe('Hi'); }); describe('useDebugValue', () => { itRenders('is a noop', async render => { function Counter(props) { const debugValue = useDebugValue(123); return <Text text={typeof debugValue} />; } const domNode = await render(<Counter />); expect(domNode.textContent).toEqual('undefined'); }); }); describe('readContext', () => { function readContext(Context, observedBits) { const dispatcher = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED .ReactCurrentDispatcher.current; return dispatcher.readContext(Context, observedBits); } itRenders( 'can read the same context multiple times in the same function', async render => { const Context = React.createContext( {foo: 0, bar: 0, baz: 0}, (a, b) => { let result = 0; if (a.foo !== b.foo) { result |= 0b001; } if (a.bar !== b.bar) { result |= 0b010; } if (a.baz !== b.baz) { result |= 0b100; } return result; }, ); function Provider(props) { return ( <Context.Provider value={{foo: props.foo, bar: props.bar, baz: props.baz}}> {props.children} </Context.Provider> ); } function FooAndBar() { const {foo} = readContext(Context, 0b001); const {bar} = readContext(Context, 0b010); return <Text text={`Foo: ${foo}, Bar: ${bar}`} />; } function Baz() { const {baz} = readContext(Context, 0b100); return <Text text={'Baz: ' + baz} />; } class Indirection extends React.Component { shouldComponentUpdate() { return false; } render() { return this.props.children; } } function App(props) { return ( <div> <Provider foo={props.foo} bar={props.bar} baz={props.baz}> <Indirection> <Indirection> <FooAndBar /> </Indirection> <Indirection> <Baz /> </Indirection> </Indirection> </Provider> </div> ); } const domNode = await render(<App foo={1} bar={3} baz={5} />); expect(clearYields()).toEqual(['Foo: 1, Bar: 3', 'Baz: 5']); expect(domNode.childNodes.length).toBe(2); expect(domNode.firstChild.tagName).toEqual('SPAN'); expect(domNode.firstChild.textContent).toEqual('Foo: 1, Bar: 3'); expect(domNode.lastChild.tagName).toEqual('SPAN'); expect(domNode.lastChild.textContent).toEqual('Baz: 5'); }, ); itRenders('with a warning inside useMemo and useReducer', async render => { const Context = React.createContext(42); function ReadInMemo(props) { let count = React.useMemo(() => readContext(Context), []); return <Text text={count} />; } function ReadInReducer(props) { let [count, dispatch] = React.useReducer(() => readContext(Context)); if (count !== 42) { dispatch(); } return <Text text={count} />; } const domNode1 = await render(<ReadInMemo />, 1); expect(domNode1.textContent).toEqual('42'); const domNode2 = await render(<ReadInReducer />, 1); expect(domNode2.textContent).toEqual('42'); }); }); });
/** * $Id: editor_plugin_src.js 162 2007-01-03 16:16:52Z spocke $ * * @author Moxiecode * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. */ /* Import theme specific language pack */ tinyMCE.importPluginLanguagePack('print'); var TinyMCE_PrintPlugin = { getInfo : function() { return { longname : 'Print', author : 'Moxiecode Systems AB', authorurl : 'http://tinymce.moxiecode.com', infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_print.html', version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion }; }, getControlHTML : function(cn) { switch (cn) { case "print": return tinyMCE.getButtonHTML(cn, 'lang_print_desc', '{$pluginurl}/images/print.gif', 'mcePrint'); } return ""; }, /** * Executes the search/replace commands. */ execCommand : function(editor_id, element, command, user_interface, value) { // Handle commands switch (command) { case "mcePrint": tinyMCE.getInstanceById(editor_id).contentWindow.print(); return true; } // Pass to next handler in chain return false; } }; tinyMCE.addPlugin("print", TinyMCE_PrintPlugin);
angular .module('automata-simulation') .controller('DFACtrl', DFACtrl); function DFACtrl($scope) { $scope.saveApply = scopeSaveApply; $scope.automatonData = new autoSim.AutomatonData(); $scope.core = new autoSim.DFACore($scope); $scope.states = new autoSim.States($scope); $scope.transitions = new autoSim.Transitions($scope); }
import path from "path"; import normalizePath from "normalize-path"; export default function normalizeRelativeDir(testDir, filePath) { return normalizePath( path.relative(testDir, filePath) ); }
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var _utils = require("@material-ui/utils"); var _createBreakpoints = _interopRequireDefault(require("./createBreakpoints")); var _createMixins = _interopRequireDefault(require("./createMixins")); var _createPalette = _interopRequireDefault(require("./createPalette")); var _createTypography = _interopRequireDefault(require("./createTypography")); var _shadows = _interopRequireDefault(require("./shadows")); var _shape = _interopRequireDefault(require("./shape")); var _createSpacing = _interopRequireDefault(require("./createSpacing")); var _transitions = _interopRequireDefault(require("./transitions")); var _zIndex = _interopRequireDefault(require("./zIndex")); function createMuiTheme() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _options$breakpoints = options.breakpoints, breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints, _options$mixins = options.mixins, mixinsInput = _options$mixins === void 0 ? {} : _options$mixins, _options$palette = options.palette, paletteInput = _options$palette === void 0 ? {} : _options$palette, spacingInput = options.spacing, _options$typography = options.typography, typographyInput = _options$typography === void 0 ? {} : _options$typography, other = (0, _objectWithoutProperties2.default)(options, ["breakpoints", "mixins", "palette", "spacing", "typography"]); var palette = (0, _createPalette.default)(paletteInput); var breakpoints = (0, _createBreakpoints.default)(breakpointsInput); var spacing = (0, _createSpacing.default)(spacingInput); var muiTheme = (0, _utils.deepmerge)({ breakpoints: breakpoints, direction: 'ltr', mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput), overrides: {}, // Inject custom styles palette: palette, props: {}, // Provide default props shadows: _shadows.default, typography: (0, _createTypography.default)(palette, typographyInput), spacing: spacing, shape: _shape.default, transitions: _transitions.default, variants: {}, zIndex: _zIndex.default }, other); for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } muiTheme = args.reduce(function (acc, argument) { return (0, _utils.deepmerge)(acc, argument); }, muiTheme); if (process.env.NODE_ENV !== 'production') { var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; var traverse = function traverse(node, parentKey) { var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax for (key in node) { var child = node[key]; if (depth === 1) { if (key.indexOf('Mui') === 0 && child) { traverse(child, key, depth + 1); } } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) { if (process.env.NODE_ENV !== 'production') { console.error(["Material-UI: The `".concat(parentKey, "` component increases ") + "the CSS specificity of the `".concat(key, "` internal state."), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({ root: (0, _defineProperty2.default)({}, "&$".concat(key), child) }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\n')); } // Remove the style to prevent global conflicts. node[key] = {}; } } }; traverse(muiTheme.overrides); } return muiTheme; } var _default = createMuiTheme; exports.default = _default;
module('Ember.String.fmt'); if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) { test("String.prototype.fmt is not modified without EXTEND_PROTOTYPES", function() { ok("undefined" === typeof String.prototype.fmt, 'String.prototype helper disabled'); }); } test("'Hello %@ %@'.fmt('John', 'Doe') => 'Hello John Doe'", function() { equal(Ember.String.fmt('Hello %@ %@', ['John', 'Doe']), 'Hello John Doe'); if (Ember.EXTEND_PROTOTYPES) { equal('Hello %@ %@'.fmt('John', 'Doe'), 'Hello John Doe'); } }); test("'Hello %@2 %@1'.fmt('John', 'Doe') => 'Hello Doe John'", function() { equal(Ember.String.fmt('Hello %@2 %@1', ['John', 'Doe']), 'Hello Doe John'); if (Ember.EXTEND_PROTOTYPES) { equal('Hello %@2 %@1'.fmt('John', 'Doe'), 'Hello Doe John'); } }); test("'%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01'.fmt('One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight') => 'Eight Seven Six Five Four Three Two One'", function() { equal(Ember.String.fmt('%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01', ['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight']), 'Eight Seven Six Five Four Three Two One'); if (Ember.EXTEND_PROTOTYPES) { equal('%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01'.fmt('One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight'), 'Eight Seven Six Five Four Three Two One'); } }); test("'data: %@'.fmt({id: 3}) => 'data: {id: 3}'", function() { equal(Ember.String.fmt('data: %@', [{id: 3}]), 'data: {id: 3}'); if (Ember.EXTEND_PROTOTYPES) { equal('data: %@'.fmt({id: 3}), 'data: {id: 3}'); } });
'use strict'; var P = require('bluebird'); var R = require('ramda'); var plaidEnvironments = require('./plaidEnvironments'); var plaidRequest = require('./plaidRequest'); var wrapPromise = require('./wrapPromise'); // Default version of Plaid API, if not specified by the client. const DEFAULT_VERSION = '2020-09-14'; // Client(String, String, String, String, Object?) function Client(configs) { if (!R.is(Object, configs)) { throw new Error('Unexpected parameter type. ' + 'Refer to https://github.com/plaid/plaid-node ' + 'for how to create a Plaid client.'); } if (R.isNil(configs.clientID)) { throw new Error('Missing Plaid "clientID"'); } if (R.isNil(configs.secret)) { throw new Error('Missing Plaid "secret"'); } if (!R.any(R.equals(configs.env), R.values(plaidEnvironments))) { throw new Error('Invalid Plaid environment'); } if (arguments.length > 1) { throw new Error('Too many arguments to constructor'); } this.client_id = configs.clientID; this.secret = configs.secret; this.env = configs.env; if (configs.options == null) { configs.options = {}; } if (configs.options.version == null) { configs.options.version = DEFAULT_VERSION; } this.client_request_opts = configs.options; } // Private var requestWithAccessToken = function(path) { return function(access_token, options, cb) { return this._authenticatedRequest({ path: path, body: { access_token: access_token, } }, options, cb); }; }; var requestWithIncomeVerificationId = function(path) { return function(incomeVerificationId, options, cb) { return this._authenticatedRequest({ path: path, body: { income_verification_id: incomeVerificationId, } }, cb); }; }; Client.prototype._authenticatedRequest = function _authenticatedRequest(requestSpec, options, cb) { // juggle arguments if (typeof options === 'function') { cb = options; options = {}; } else { requestSpec.body.options = options; } var context = R.merge({env: this.env}, { client_id: this.client_id, secret: this.secret, }); return plaidRequest(context, requestSpec, this.client_request_opts, cb); }; // createPublicToken(String, Object, Function) Client.prototype.createPublicToken = function(access_token, options, cb) { const createPublicTokenRequest = requestWithAccessToken('/item/public_token/create', false); console.warn(`Warning: this method will be deprecated in a future version. To replace the public_token for initializing Link, look into the link_token at https://plaid.com/docs/api/tokens/#linktokencreate`); return createPublicTokenRequest.call(this, access_token, options, cb); }; const linkTokenConfigFields = [ 'user', 'client_name', 'products', 'country_codes', 'language', 'webhook', 'access_token', 'link_customization_name', 'redirect_uri', 'android_package_name', 'account_filters', 'cross_app_item_add', 'payment_initiation', ]; // createLinkToken(CreateLinkTokenOptions, Function) Client.prototype.createLinkToken = function(options, cb) { const body = linkTokenConfigFields.reduce((body, field) => { body[field] = options[field]; return body; }, {}); return this._authenticatedRequest({ path: '/link/token/create', body: body, }, cb); }; // getLinkToken(CreateLinkTokenOptions, Function) Client.prototype.getLinkToken = function(link_token, cb) { return this._authenticatedRequest({ path: '/link/token/get', body: { link_token }, }, cb); }; // exchangePublicToken(String, Function) Client.prototype.exchangePublicToken = function(public_token, cb) { return this._authenticatedRequest({ path: '/item/public_token/exchange', body: { public_token: public_token, } }, cb); }; // updateItemWebhook(String, String, Function) Client.prototype.updateItemWebhook = function(access_token, webhook, cb) { return this._authenticatedRequest({ path: '/item/webhook/update', body: { access_token: access_token, webhook: webhook, } }, cb); }; // createProcessorToken(String, String, String, Function) Client.prototype.createProcessorToken = function(access_token, account_id, processor, cb) { var endpoint = '/processor/token/create'; const options = { access_token, account_id, processor, }; if (processor === 'stripe') { endpoint = '/processor/stripe/bank_account_token/create'; delete options.processor; } else if (processor === 'apex') { endpoint = '/processor/apex/processor_token/create'; delete options.processor; } return this._authenticatedRequest({ path: endpoint, body: options, }, cb); }; Client.prototype.createStripeToken = function(access_token, account_id, cb) { return this.createProcessorToken(access_token, account_id, 'stripe', cb); }; // invalidateAccessToken(String, Function) Client.prototype.invalidateAccessToken = requestWithAccessToken('/item/access_token/invalidate'); // removeItem(String, Function) Client.prototype.removeItem = requestWithAccessToken('/item/remove'); // getItem(String, Function) Client.prototype.getItem = requestWithAccessToken('/item/get'); // importItem([String], Object, Object?, Function) Client.prototype.importItem = function(products, user_auth, options, cb) { return this._authenticatedRequest({ path: '/item/import', body: { products: products, user_auth: user_auth, } }, options, cb); }; // getAccounts(String, Object?, Function) Client.prototype.getAccounts = requestWithAccessToken('/accounts/get'); // getBalance(String, Object?, Function) Client.prototype.getBalance = requestWithAccessToken('/accounts/balance/get'); // getAuth(String, Object?, Function) Client.prototype.getAuth = requestWithAccessToken('/auth/get'); // getIncome(String, Function) // getIdentity(String, Function) Client.prototype.getIdentity = requestWithAccessToken('/identity/get'); // getIncome(String, Function) Client.prototype.getIncome = requestWithAccessToken('/income/get'); // getTransactions(String, Date, Date, Object?, Function) Client.prototype.getTransactions = function(access_token, start_date, end_date, options, cb) { return this._authenticatedRequest({ path: '/transactions/get', body: { access_token: access_token, start_date: start_date, end_date: end_date, }, }, options, cb); }; // getAllTransactions(String, Date, Date, Object?, Function) Client.prototype.getAllTransactions = function(access_token, start_date, end_date, options, cb) { // juggle arguments if (typeof options === 'function') { cb = options; options = {}; } else { options = R.defaultTo({}, options); } var self = this; return wrapPromise(P.coroutine(function*() { var transactions = []; var transactionsCount = 0; var response = {}; while (true) { const transactionsResponse = yield self.getTransactions( access_token, start_date, end_date, R.merge(options, { count: 500, // largest allowed value offset: transactions.length, }) ); response.accounts = transactionsResponse.accounts; response.item = transactionsResponse.item; if (transactionsResponse.transactions != null) { transactions = R.concat( transactions, transactionsResponse.transactions); transactionsCount += transactionsResponse.transactions.length; } if (transactionsCount >= transactionsResponse.total_transactions) { break; } } response.total_transactions = transactionsCount; response.transactions = transactions; return response; })(), cb, {no_spread: true}); }; // transactionsRefresh(String, Function) Client.prototype.refreshTransactions = requestWithAccessToken('/transactions/refresh'); // getCreditDetails(String, Function) Client.prototype.getCreditDetails = requestWithAccessToken('/credit_details/get'); // getHoldings(String, Function) Client.prototype.getHoldings = requestWithAccessToken('/investments/holdings/get'); // getPaystub(String, Function) Client.prototype.getPaystub = requestWithIncomeVerificationId('/income/verification/paystub/get'); // getSummary(String, Function) Client.prototype.getSummary = requestWithIncomeVerificationId('/income/verification/summary/get'); // getInvestmentTransactions(String, Date, Date, Object?, Function) Client.prototype.getInvestmentTransactions = function(access_token, start_date, end_date, options, cb) { return this._authenticatedRequest({ path: '/investments/transactions/get', body: { access_token: access_token, start_date: start_date, end_date: end_date, }, }, options, cb); }; // getLiabilities(String, Function) Client.prototype.getLiabilities = requestWithAccessToken('/liabilities/get'); // createAssetReport([String], Number, Object, Function) Client.prototype.createAssetReport = function(access_tokens, days_requested, options, cb) { return this._authenticatedRequest({ path: '/asset_report/create', body: { access_tokens: access_tokens, days_requested: days_requested, }, }, options, cb); }; // filterAssetReport(String, [String], Function) Client.prototype.filterAssetReport = function(asset_report_token, account_ids_to_exclude, cb) { return this._authenticatedRequest({ path: '/asset_report/filter', body: { asset_report_token: asset_report_token, account_ids_to_exclude: account_ids_to_exclude, }, }, cb); }; // refreshAssetReport(String, Number, Object?, Function) Client.prototype.refreshAssetReport = function(asset_report_token, days_requested, options, cb) { return this._authenticatedRequest({ path: '/asset_report/refresh', body: { asset_report_token: asset_report_token, days_requested: days_requested, }, }, options, cb); }; // getAssetReport(String, Boolean, Function) Client.prototype.getAssetReport = function(asset_report_token, include_insights, cb) { return this._authenticatedRequest({ path: '/asset_report/get', body: { asset_report_token: asset_report_token, include_insights: include_insights, }, }, cb); }; // getAssetReportPdf(String, Function) Client.prototype.getAssetReportPdf = function(asset_report_token, cb) { return this._authenticatedRequest({ path: '/asset_report/pdf/get', body: { asset_report_token: asset_report_token, }, binary: true, }, cb); }; // createAuditCopy(String, String, Function) Client.prototype.createAuditCopy = function(asset_report_token, auditor_id, cb) { return this._authenticatedRequest({ path: '/asset_report/audit_copy/create', body: { asset_report_token: asset_report_token, auditor_id: auditor_id, }, }, cb); }; // getAuditCopy(String, Function) Client.prototype.getAuditCopy = function(audit_copy_token, cb) { return this._authenticatedRequest({ path: '/asset_report/audit_copy/get', body: { audit_copy_token: audit_copy_token, }, }, cb); }; // removeAuditCopy(String, Function) Client.prototype.removeAuditCopy = function(audit_copy_token, cb) { return this._authenticatedRequest({ path: '/asset_report/audit_copy/remove', body: { audit_copy_token: audit_copy_token, }, }, cb); }; // removeAssetReport(String, Function) Client.prototype.removeAssetReport = function(asset_report_token, cb) { return this._authenticatedRequest({ path: '/asset_report/remove', body: { asset_report_token: asset_report_token, }, }, cb); }; // createPaymentRecipient(String, String, Object, Object, Function) Client.prototype.createPaymentRecipient = function(name, iban, address, bacs, cb) { return this._authenticatedRequest({ path: '/payment_initiation/recipient/create', body: { name: name, iban: iban != null ? iban : undefined, address: address, bacs: bacs != null ? bacs : undefined, }, }, cb); }; // getPaymentRecipient(String, Function) Client.prototype.getPaymentRecipient = function(recipient_id, cb) { return this._authenticatedRequest({ path: '/payment_initiation/recipient/get', body: {recipient_id: recipient_id}, }, cb); }; // listPaymentRecipients(Function) Client.prototype.listPaymentRecipients = function(cb) { return this._authenticatedRequest({ path: '/payment_initiation/recipient/list', }, cb); }; // createPayment(String, String, Object, Function) Client.prototype.createPayment = function(recipient_id, reference, amount, cb) { return this._authenticatedRequest({ path: '/payment_initiation/payment/create', body: { recipient_id: recipient_id, reference: reference, amount: amount, }, }, cb); }; // createPaymentToken(String, Function) Client.prototype.createPaymentToken = function(payment_id, cb) { console.warn(`Warning: this method will be deprecated in a future version. To replace the payment_token, look into the link_token at https://plaid.com/docs/api/tokens/#linktokencreate.`); return this._authenticatedRequest({ path: '/payment_initiation/payment/token/create', body: { payment_id: payment_id, }, }, cb); }; // getPayment(String, Function) Client.prototype.getPayment = function(payment_id, cb) { return this._authenticatedRequest({ path: '/payment_initiation/payment/get', body: {payment_id: payment_id}, }, cb); }; // listPayments(Object, Function) Client.prototype.listPayments = function(options, cb) { return this._authenticatedRequest({ path: '/payment_initiation/payment/list', body: options, }, cb); }; // getDepositSwitch(String, Object?, Function) Client.prototype.getDepositSwitch = function(deposit_switch_id, options, cb) { return this._authenticatedRequest({ path: '/deposit_switch/get', body: { deposit_switch_id: deposit_switch_id, }, }, options, cb); }; // createDepositSwitch(String, String, Object?, Function) Client.prototype.createDepositSwitch = function(target_account_id, target_access_token, options, cb) { return this._authenticatedRequest({ path: '/deposit_switch/create', body: { target_account_id: target_account_id, target_access_token: target_access_token, }, }, options, cb); }; // createDepositSwitchToken(String, Object?, Function) Client.prototype.createDepositSwitchToken = function(deposit_switch_id, options, cb) { return this._authenticatedRequest({ path: '/deposit_switch/token/create', body: { deposit_switch_id: deposit_switch_id, }, }, options, cb); }; // getInstitutions(Number, Number, [String], Object?, Function); Client.prototype.getInstitutions = function(count, offset, country_codes, options, cb) { return this._authenticatedRequest({ path: '/institutions/get', body: { count: count, offset: offset, country_codes: country_codes }, }, options, cb); }; // getInstitutionById(String, [String], Object?, Function); Client.prototype.getInstitutionById = function(institution_id, country_codes, options, cb) { return this._authenticatedRequest({ path: '/institutions/get_by_id', body: { institution_id: institution_id, country_codes: country_codes } }, options, cb); }; // searchInstitutionsByName(String, [String], Object?, Function) Client.prototype.searchInstitutionsByName = function(query, products, country_codes, options, cb) { return this._authenticatedRequest({ path: '/institutions/search', body: { query: query, products: products, country_codes: country_codes } }, options, cb); }; // getCategories(Function) Client.prototype.getCategories = function(cb) { return plaidRequest({ env: this.env }, { path: '/categories/get' }, this.client_request_opts, cb); }; // resetLogin(String, Function) - sandbox only Client.prototype.resetLogin = requestWithAccessToken('/sandbox/item/reset_login'); // getWebhookVerificationKey(String, Function) Client.prototype.getWebhookVerificationKey = function(key_id, cb) { return this._authenticatedRequest({ path: '/webhook_verification_key/get', body: { key_id: key_id, }, }, cb); }; // sandboxPublicTokenCreate(String, Array, Object?, Function) - sandbox only Client.prototype.sandboxPublicTokenCreate = function(institution_id, initial_products, options, cb) { return this._authenticatedRequest({ path: '/sandbox/public_token/create', body: { institution_id: institution_id, initial_products: initial_products, }, }, options, cb); }; // sandboxItemFireWebhook(String, String, Function) - sandbox only Client.prototype.sandboxItemFireWebhook = function(access_token, webhook_code, cb) { return this._authenticatedRequest({ path: '/sandbox/item/fire_webhook', body: { access_token: access_token, webhook_code: webhook_code, }, }, cb); }; // sandboxItemSetVerificationStatus(String, String, String, Function) // - sandbox only Client.prototype.sandboxItemSetVerificationStatus = function(access_token, account_id, verification_status, cb) { return this._authenticatedRequest({ path: '/sandbox/item/set_verification_status', body: { access_token: access_token, account_id: account_id, verification_status: verification_status, }, }, cb); }; module.exports = Client;
function _slicedToArray(r,t){return _arrayWithHoles(r)||_iterableToArrayLimit(r,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(r,t){if(Symbol.iterator in Object(r)||"[object Arguments]"===Object.prototype.toString.call(r)){var e=[],o=!0,a=!1,n=void 0;try{for(var i,l=r[Symbol.iterator]();!(o=(i=l.next()).done)&&(e.push(i.value),!t||e.length!==t);o=!0);}catch(r){a=!0,n=r}finally{try{o||null==l.return||l.return()}finally{if(a)throw n}}return e}}function _arrayWithHoles(r){if(Array.isArray(r))return r}import shallowEqual from"shallowequal";import{useState,useCallback}from"react";import{useIsomorphicLayoutEffect}from"./useIsomorphicLayoutEffect";export function useCollector(r,t,e){var o=_slicedToArray(useState(function(){return t(r)}),2),a=o[0],n=o[1],i=useCallback(function(){var o=t(r);shallowEqual(a,o)||(n(o),e&&e())},[a,r,e]);return useIsomorphicLayoutEffect(i,[]),[a,i]};
import{useMemo}from"react";import{TargetConnector}from"../../internals";import{useDragDropManager}from"../useDragDropManager";import{useIsomorphicLayoutEffect}from"../useIsomorphicLayoutEffect";function useDropTargetConnector(r){var o=useDragDropManager(),e=useMemo(function(){return new TargetConnector(o.getBackend())},[o]);return useIsomorphicLayoutEffect(function(){return e.dropTargetOptions=r||null,e.reconnect(),function(){return e.disconnectDropTarget()}},[r]),e}export{useDropTargetConnector};
/** * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v21.2.1 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var context_1 = require("../context/context"); var sortController_1 = require("../sortController"); var valueService_1 = require("../valueService/valueService"); var gridOptionsWrapper_1 = require("../gridOptionsWrapper"); var columnController_1 = require("../columnController/columnController"); var utils_1 = require("../utils"); var SortService = /** @class */ (function () { function SortService() { } SortService.prototype.init = function () { this.postSortFunc = this.gridOptionsWrapper.getPostSortFunc(); }; SortService.prototype.sort = function (sortOptions, sortActive, deltaSort, dirtyLeafNodes, changedPath, noAggregations) { var _this = this; var callback = function (rowNode) { // we clear out the 'pull down open parents' first, as the values mix up the sorting _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterFilter, true); // Javascript sort is non deterministic when all the array items are equals, ie Comparator always returns 0, // so to ensure the array keeps its order, add an additional sorting condition manually, in this case we // are going to inspect the original array position. This is what sortedRowNodes is for. if (sortActive) { var sortedRowNodes = deltaSort ? _this.doDeltaSort(rowNode, sortOptions, dirtyLeafNodes, changedPath, noAggregations) : _this.doFullSort(rowNode, sortOptions); rowNode.childrenAfterSort = sortedRowNodes.map(function (sorted) { return sorted.rowNode; }); } else { rowNode.childrenAfterSort = rowNode.childrenAfterFilter.slice(0); } _this.updateChildIndexes(rowNode); if (_this.postSortFunc) { _this.postSortFunc(rowNode.childrenAfterSort); } }; changedPath.forEachChangedNodeDepthFirst(callback); this.updateGroupDataForHiddenOpenParents(changedPath); }; SortService.prototype.doFullSort = function (rowNode, sortOptions) { var sortedRowNodes = rowNode.childrenAfterFilter .map(this.mapNodeToSortedNode.bind(this)); sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions)); return sortedRowNodes; }; SortService.prototype.mapNodeToSortedNode = function (rowNode, pos) { return { currentPos: pos, rowNode: rowNode }; }; SortService.prototype.doDeltaSort = function (rowNode, sortOptions, dirtyLeafNodes, changedPath, noAggregations) { // clean nodes will be a list of all row nodes that remain in the set // and ordered. we start with the old sorted set and take out any nodes // that were removed or changed (but not added, added doesn't make sense, // if a node was added, there is no way it could be here from last time). var cleanNodes = rowNode.childrenAfterSort .filter(function (rowNode) { // take out all nodes that were changed as part of the current transaction. // a changed node could a) be in a different sort position or b) may // no longer be in this set as the changed node may not pass filtering, // or be in a different group. var passesDirtyNodesCheck = !dirtyLeafNodes[rowNode.id]; // also remove group nodes in the changed path, as they can have different aggregate // values which could impact the sort order. // note: changed path is not active if a) no value columns or b) no transactions. it is never // (b) in deltaSort as we only do deltaSort for transactions. for (a) if no value columns, then // there is no value in the group that could of changed (ie no aggregate values) var passesChangedPathCheck = noAggregations || changedPath.canSkip(rowNode); return passesDirtyNodesCheck && passesChangedPathCheck; }) .map(this.mapNodeToSortedNode.bind(this)); // for fast access below, we map them var cleanNodesMapped = {}; cleanNodes.forEach(function (sortedRowNode) { return cleanNodesMapped[sortedRowNode.rowNode.id] = sortedRowNode.rowNode; }); // these are all nodes that need to be placed var changedNodes = rowNode.childrenAfterFilter // ignore nodes in the clean list .filter(function (rowNode) { return !cleanNodesMapped[rowNode.id]; }) .map(this.mapNodeToSortedNode.bind(this)); // sort changed nodes. note that we don't need to sort cleanNodes as they are // already sorted from last time. changedNodes.sort(this.compareRowNodes.bind(this, sortOptions)); if (changedNodes.length === 0) { return cleanNodes; } else if (cleanNodes.length === 0) { return changedNodes; } else { return this.mergeSortedArrays(sortOptions, cleanNodes, changedNodes); } }; // Merge two sorted arrays into each other SortService.prototype.mergeSortedArrays = function (sortOptions, arr1, arr2) { var res = []; var i = 0; var j = 0; // Traverse both array, adding them in order while (i < arr1.length && j < arr2.length) { // Check if current element of first // array is smaller than current element // of second array. If yes, store first // array element and increment first array // index. Otherwise do same with second array var compareResult = this.compareRowNodes(sortOptions, arr1[i], arr2[j]); if (compareResult < 0) { res.push(arr1[i++]); } else { res.push(arr2[j++]); } } // add remaining from arr1 while (i < arr1.length) { res.push(arr1[i++]); } // add remaining from arr2 while (j < arr2.length) { res.push(arr2[j++]); } return res; }; SortService.prototype.compareRowNodes = function (sortOptions, sortedNodeA, sortedNodeB) { var nodeA = sortedNodeA.rowNode; var nodeB = sortedNodeB.rowNode; // Iterate columns, return the first that doesn't match for (var i = 0, len = sortOptions.length; i < len; i++) { var sortOption = sortOptions[i]; // let compared = compare(nodeA, nodeB, sortOption.column, sortOption.inverter === -1); var isInverted = sortOption.inverter === -1; var valueA = this.getValue(nodeA, sortOption.column); var valueB = this.getValue(nodeB, sortOption.column); var comparatorResult = void 0; if (sortOption.column.getColDef().comparator) { //if comparator provided, use it comparatorResult = sortOption.column.getColDef().comparator(valueA, valueB, nodeA, nodeB, isInverted); } else { //otherwise do our own comparison comparatorResult = utils_1._.defaultComparator(valueA, valueB, this.gridOptionsWrapper.isAccentedSort()); } if (comparatorResult !== 0) { return comparatorResult * sortOption.inverter; } } // All matched, we make is so that the original sort order is kept: return sortedNodeA.currentPos - sortedNodeB.currentPos; }; SortService.prototype.getValue = function (nodeA, column) { return this.valueService.getValue(column, nodeA); }; SortService.prototype.updateChildIndexes = function (rowNode) { if (utils_1._.missing(rowNode.childrenAfterSort)) { return; } var listToSort = rowNode.childrenAfterSort; for (var i = 0; i < listToSort.length; i++) { var child = listToSort[i]; var firstChild = i === 0; var lastChild = i === rowNode.childrenAfterSort.length - 1; child.setFirstChild(firstChild); child.setLastChild(lastChild); child.setChildIndex(i); } }; SortService.prototype.updateGroupDataForHiddenOpenParents = function (changedPath) { var _this = this; if (!this.gridOptionsWrapper.isGroupHideOpenParents()) { return; } // recurse breadth first over group nodes after sort to 'pull down' group data to child groups var callback = function (rowNode) { _this.pullDownGroupDataForHideOpenParents(rowNode.childrenAfterSort, false); rowNode.childrenAfterSort.forEach(function (child) { if (child.hasChildren()) { callback(child); } }); }; changedPath.executeFromRootNode(function (rowNode) { return callback(rowNode); }); }; SortService.prototype.pullDownGroupDataForHideOpenParents = function (rowNodes, clearOperation) { var _this = this; if (utils_1._.missing(rowNodes)) { return; } if (!this.gridOptionsWrapper.isGroupHideOpenParents()) { return; } rowNodes.forEach(function (childRowNode) { var groupDisplayCols = _this.columnController.getGroupDisplayColumns(); groupDisplayCols.forEach(function (groupDisplayCol) { var showRowGroup = groupDisplayCol.getColDef().showRowGroup; if (typeof showRowGroup !== 'string') { console.error('ag-Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup'); return; } var displayingGroupKey = showRowGroup; var rowGroupColumn = _this.columnController.getPrimaryColumn(displayingGroupKey); var thisRowNodeMatches = rowGroupColumn === childRowNode.rowGroupColumn; if (thisRowNodeMatches) { return; } if (clearOperation) { // if doing a clear operation, we clear down the value for every possible group column childRowNode.setGroupValue(groupDisplayCol.getId(), null); } else { // if doing a set operation, we set only where the pull down is to occur var parentToStealFrom = childRowNode.getFirstChildOfFirstChild(rowGroupColumn); if (parentToStealFrom) { childRowNode.setGroupValue(groupDisplayCol.getId(), parentToStealFrom.key); } } }); }); }; __decorate([ context_1.Autowired('sortController'), __metadata("design:type", sortController_1.SortController) ], SortService.prototype, "sortController", void 0); __decorate([ context_1.Autowired('columnController'), __metadata("design:type", columnController_1.ColumnController) ], SortService.prototype, "columnController", void 0); __decorate([ context_1.Autowired('valueService'), __metadata("design:type", valueService_1.ValueService) ], SortService.prototype, "valueService", void 0); __decorate([ context_1.Autowired('gridOptionsWrapper'), __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper) ], SortService.prototype, "gridOptionsWrapper", void 0); __decorate([ context_1.PostConstruct, __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0) ], SortService.prototype, "init", null); SortService = __decorate([ context_1.Bean('sortService') ], SortService); return SortService; }()); exports.SortService = SortService;
(function() { this.AwardsHandler = (function() { const FROM_SENTENCE_REGEX = /(?:, and | and |, )/; //For separating lists produced by ruby's Array#toSentence function AwardsHandler() { this.aliases = gl.emojiAliases(); $(document).off('click', '.js-add-award').on('click', '.js-add-award', (function(_this) { return function(e) { e.stopPropagation(); e.preventDefault(); return _this.showEmojiMenu($(e.currentTarget)); }; })(this)); $('html').on('click', function(e) { var $target; $target = $(e.target); if (!$target.closest('.emoji-menu-content').length) { $('.js-awards-block.current').removeClass('current'); } if (!$target.closest('.emoji-menu').length) { if ($('.emoji-menu').is(':visible')) { $('.js-add-award.is-active').removeClass('is-active'); return $('.emoji-menu').removeClass('is-visible'); } } }); $(document).off('click', '.js-emoji-btn').on('click', '.js-emoji-btn', (function(_this) { return function(e) { var $target, emoji; e.preventDefault(); $target = $(e.currentTarget); emoji = $target.find('.icon').data('emoji'); $target.closest('.js-awards-block').addClass('current'); return _this.addAward(_this.getVotesBlock(), _this.getAwardUrl(), emoji); }; })(this)); } AwardsHandler.prototype.showEmojiMenu = function($addBtn) { var $holder, $menu, url; $menu = $('.emoji-menu'); if ($addBtn.hasClass('js-note-emoji')) { $addBtn.closest('.note').find('.js-awards-block').addClass('current'); } else { $addBtn.closest('.js-awards-block').addClass('current'); } if ($menu.length) { $holder = $addBtn.closest('.js-award-holder'); if ($menu.is('.is-visible')) { $addBtn.removeClass('is-active'); $menu.removeClass('is-visible'); return $('#emoji_search').blur(); } else { $addBtn.addClass('is-active'); this.positionMenu($menu, $addBtn); $menu.addClass('is-visible'); return $('#emoji_search').focus(); } } else { $addBtn.addClass('is-loading is-active'); url = this.getAwardMenuUrl(); return this.createEmojiMenu(url, (function(_this) { return function() { $addBtn.removeClass('is-loading'); $menu = $('.emoji-menu'); _this.positionMenu($menu, $addBtn); if (!_this.frequentEmojiBlockRendered) { _this.renderFrequentlyUsedBlock(); } return setTimeout(function() { $menu.addClass('is-visible'); $('#emoji_search').focus(); return _this.setupSearch(); }, 200); }; })(this)); } }; AwardsHandler.prototype.createEmojiMenu = function(awardMenuUrl, callback) { return $.get(awardMenuUrl, function(response) { $('body').append(response); return callback(); }); }; AwardsHandler.prototype.positionMenu = function($menu, $addBtn) { var css, position; position = $addBtn.data('position'); // The menu could potentially be off-screen or in a hidden overflow element // So we position the element absolute in the body css = { top: ($addBtn.offset().top + $addBtn.outerHeight()) + "px" }; if ((position != null) && position === 'right') { css.left = (($addBtn.offset().left - $menu.outerWidth()) + 20) + "px"; $menu.addClass('is-aligned-right'); } else { css.left = ($addBtn.offset().left) + "px"; $menu.removeClass('is-aligned-right'); } return $menu.css(css); }; AwardsHandler.prototype.addAward = function(votesBlock, awardUrl, emoji, checkMutuality, callback) { if (checkMutuality == null) { checkMutuality = true; } emoji = this.normilizeEmojiName(emoji); this.postEmoji(awardUrl, emoji, (function(_this) { return function() { _this.addAwardToEmojiBar(votesBlock, emoji, checkMutuality); return typeof callback === "function" ? callback() : void 0; }; })(this)); return $('.emoji-menu').removeClass('is-visible'); }; AwardsHandler.prototype.addAwardToEmojiBar = function(votesBlock, emoji, checkForMutuality) { var $emojiButton, counter; if (checkForMutuality == null) { checkForMutuality = true; } if (checkForMutuality) { this.checkMutuality(votesBlock, emoji); } this.addEmojiToFrequentlyUsedList(emoji); emoji = this.normilizeEmojiName(emoji); $emojiButton = this.findEmojiIcon(votesBlock, emoji).parent(); if ($emojiButton.length > 0) { if (this.isActive($emojiButton)) { return this.decrementCounter($emojiButton, emoji); } else { counter = $emojiButton.find('.js-counter'); counter.text(parseInt(counter.text()) + 1); $emojiButton.addClass('active'); this.addYouToUserList(votesBlock, emoji); return this.animateEmoji($emojiButton); } } else { votesBlock.removeClass('hidden'); return this.createEmoji(votesBlock, emoji); } }; AwardsHandler.prototype.getVotesBlock = function() { var currentBlock; currentBlock = $('.js-awards-block.current'); if (currentBlock.length) { return currentBlock; } else { return $('.js-awards-block').eq(0); } }; AwardsHandler.prototype.getAwardUrl = function() { return this.getVotesBlock().data('award-url'); }; AwardsHandler.prototype.checkMutuality = function(votesBlock, emoji) { var $emojiButton, awardUrl, isAlreadyVoted, mutualVote; awardUrl = this.getAwardUrl(); if (emoji === 'thumbsup' || emoji === 'thumbsdown') { mutualVote = emoji === 'thumbsup' ? 'thumbsdown' : 'thumbsup'; $emojiButton = votesBlock.find("[data-emoji=" + mutualVote + "]").parent(); isAlreadyVoted = $emojiButton.hasClass('active'); if (isAlreadyVoted) { this.addAward(votesBlock, awardUrl, mutualVote, false); } } }; AwardsHandler.prototype.isActive = function($emojiButton) { return $emojiButton.hasClass('active'); }; AwardsHandler.prototype.decrementCounter = function($emojiButton, emoji) { var counter, counterNumber; counter = $('.js-counter', $emojiButton); counterNumber = parseInt(counter.text(), 10); if (counterNumber > 1) { counter.text(counterNumber - 1); this.removeYouFromUserList($emojiButton, emoji); } else if (emoji === 'thumbsup' || emoji === 'thumbsdown') { $emojiButton.tooltip('destroy'); counter.text('0'); this.removeYouFromUserList($emojiButton, emoji); if ($emojiButton.parents('.note').length) { this.removeEmoji($emojiButton); } } else { this.removeEmoji($emojiButton); } return $emojiButton.removeClass('active'); }; AwardsHandler.prototype.removeEmoji = function($emojiButton) { var $votesBlock; $emojiButton.tooltip('destroy'); $emojiButton.remove(); $votesBlock = this.getVotesBlock(); if ($votesBlock.find('.js-emoji-btn').length === 0) { return $votesBlock.addClass('hidden'); } }; AwardsHandler.prototype.getAwardTooltip = function($awardBlock) { return $awardBlock.attr('data-original-title') || $awardBlock.attr('data-title') || ''; }; AwardsHandler.prototype.toSentence = function(list) { if(list.length <= 2){ return list.join(' and '); } else{ return list.slice(0, -1).join(', ') + ', and ' + list[list.length - 1]; } }; AwardsHandler.prototype.removeYouFromUserList = function($emojiButton, emoji) { var authors, awardBlock, newAuthors, originalTitle; awardBlock = $emojiButton; originalTitle = this.getAwardTooltip(awardBlock); authors = originalTitle.split(FROM_SENTENCE_REGEX); authors.splice(authors.indexOf('You'), 1); return awardBlock .closest('.js-emoji-btn') .removeData('title') .removeAttr('data-title') .removeAttr('data-original-title') .attr('title', this.toSentence(authors)) .tooltip('fixTitle'); }; AwardsHandler.prototype.addYouToUserList = function(votesBlock, emoji) { var awardBlock, origTitle, users; awardBlock = this.findEmojiIcon(votesBlock, emoji).parent(); origTitle = this.getAwardTooltip(awardBlock); users = []; if (origTitle) { users = origTitle.trim().split(FROM_SENTENCE_REGEX); } users.unshift('You'); return awardBlock .attr('title', this.toSentence(users)) .tooltip('fixTitle'); }; AwardsHandler.prototype.createEmoji_ = function(votesBlock, emoji) { var $emojiButton, buttonHtml, emojiCssClass; emojiCssClass = this.resolveNameToCssClass(emoji); buttonHtml = "<button class='btn award-control js-emoji-btn has-tooltip active' title='You' data-placement='bottom'> <div class='icon emoji-icon " + emojiCssClass + "' data-emoji='" + emoji + "'></div> <span class='award-control-text js-counter'>1</span> </button>"; $emojiButton = $(buttonHtml); $emojiButton.insertBefore(votesBlock.find('.js-award-holder')).find('.emoji-icon').data('emoji', emoji); this.animateEmoji($emojiButton); $('.award-control').tooltip(); return votesBlock.removeClass('current'); }; AwardsHandler.prototype.animateEmoji = function($emoji) { var className = 'pulse animated once short'; $emoji.addClass(className); $emoji.on('webkitAnimationEnd animationEnd', function() { $(this).removeClass(className); }); }; AwardsHandler.prototype.createEmoji = function(votesBlock, emoji) { if ($('.emoji-menu').length) { return this.createEmoji_(votesBlock, emoji); } return this.createEmojiMenu(this.getAwardMenuUrl(), (function(_this) { return function() { return _this.createEmoji_(votesBlock, emoji); }; })(this)); }; AwardsHandler.prototype.getAwardMenuUrl = function() { return gon.award_menu_url; }; AwardsHandler.prototype.resolveNameToCssClass = function(emoji) { var emojiIcon, unicodeName; emojiIcon = $(".emoji-menu-content [data-emoji='" + emoji + "']"); if (emojiIcon.length > 0) { unicodeName = emojiIcon.data('unicode-name'); } else { // Find by alias unicodeName = $(".emoji-menu-content [data-aliases*=':" + emoji + ":']").data('unicode-name'); } return "emoji-" + unicodeName; }; AwardsHandler.prototype.postEmoji = function(awardUrl, emoji, callback) { return $.post(awardUrl, { name: emoji }, function(data) { if (data.ok) { return callback(); } }); }; AwardsHandler.prototype.findEmojiIcon = function(votesBlock, emoji) { return votesBlock.find(".js-emoji-btn [data-emoji='" + emoji + "']"); }; AwardsHandler.prototype.scrollToAwards = function() { var options; options = { scrollTop: $('.awards').offset().top - 110 }; return $('body, html').animate(options, 200); }; AwardsHandler.prototype.normilizeEmojiName = function(emoji) { return this.aliases[emoji] || emoji; }; AwardsHandler.prototype.addEmojiToFrequentlyUsedList = function(emoji) { var frequentlyUsedEmojis; frequentlyUsedEmojis = this.getFrequentlyUsedEmojis(); frequentlyUsedEmojis.push(emoji); return $.cookie('frequently_used_emojis', frequentlyUsedEmojis.join(','), { path: gon.relative_url_root || '/', expires: 365 }); }; AwardsHandler.prototype.getFrequentlyUsedEmojis = function() { var frequentlyUsedEmojis; frequentlyUsedEmojis = ($.cookie('frequently_used_emojis') || '').split(','); return _.compact(_.uniq(frequentlyUsedEmojis)); }; AwardsHandler.prototype.renderFrequentlyUsedBlock = function() { var emoji, frequentlyUsedEmojis, i, len, ul; if ($.cookie('frequently_used_emojis')) { frequentlyUsedEmojis = this.getFrequentlyUsedEmojis(); ul = $("<ul class='clearfix emoji-menu-list frequent-emojis'>"); for (i = 0, len = frequentlyUsedEmojis.length; i < len; i++) { emoji = frequentlyUsedEmojis[i]; $(".emoji-menu-content [data-emoji='" + emoji + "']").closest('li').clone().appendTo(ul); } $('.emoji-menu-content').prepend(ul).prepend($('<h5>').text('Frequently used')); } return this.frequentEmojiBlockRendered = true; }; AwardsHandler.prototype.setupSearch = function() { return $('input.emoji-search').on('keyup', (function(_this) { return function(ev) { var found_emojis, h5, term, ul; term = $(ev.target).val(); // Clean previous search results $('ul.emoji-menu-search, h5.emoji-search').remove(); if (term) { // Generate a search result block h5 = $('<h5 class="emoji-search" />').text('Search results'); found_emojis = _this.searchEmojis(term).show(); ul = $('<ul>').addClass('emoji-menu-list emoji-menu-search').append(found_emojis); $('.emoji-menu-content ul, .emoji-menu-content h5').hide(); return $('.emoji-menu-content').append(h5).append(ul); } else { return $('.emoji-menu-content').children().show(); } }; })(this)); }; AwardsHandler.prototype.searchEmojis = function(term) { return $(".emoji-menu-list:not(.frequent-emojis) [data-emoji*='" + term + "']").closest('li').clone(); }; return AwardsHandler; })(); }).call(this);
/*! * Bootstrap-select v1.13.8 (https://developer.snapappointments.com/bootstrap-select) * * Copyright 2012-2019 SnapAppointments, LLC * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) */ (function (root, factory) { if (root === undefined && window !== undefined) root = window; if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define(["jquery"], function (a0) { return (factory(a0)); }); } else if (typeof module === 'object' && module.exports) { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(require("jquery")); } else { factory(root["jQuery"]); } }(this, function (jQuery) { (function ($) { $.fn.selectpicker.defaults = { noneSelectedText: 'Nada selecionado', noneResultsText: 'Nada encontrado contendo {0}', countSelectedText: 'Selecionado {0} de {1}', maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']], multipleSeparator: ', ', selectAllText: 'Selecionar Todos', deselectAllText: 'Desmarcar Todos' }; })(jQuery); })); //# sourceMappingURL=defaults-pt_BR.js.map
export function ensureProtocol(protocol, url) { if (url && url.match(/^\/\//)) { return `${protocol}:${url}`; } return url; }
"use strict"; exports.__esModule = true; exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = undefined; var _getIterator2 = require("babel-runtime/core-js/get-iterator"); var _getIterator3 = _interopRequireDefault(_getIterator2); exports.WithStatement = WithStatement; exports.IfStatement = IfStatement; exports.ForStatement = ForStatement; exports.WhileStatement = WhileStatement; exports.DoWhileStatement = DoWhileStatement; exports.LabeledStatement = LabeledStatement; exports.TryStatement = TryStatement; exports.CatchClause = CatchClause; exports.SwitchStatement = SwitchStatement; exports.SwitchCase = SwitchCase; exports.DebuggerStatement = DebuggerStatement; exports.VariableDeclaration = VariableDeclaration; exports.VariableDeclarator = VariableDeclarator; var _babelTypes = require("babel-types"); var t = _interopRequireWildcard(_babelTypes); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function WithStatement(node) { this.keyword("with"); this.token("("); this.print(node.object, node); this.token(")"); this.printBlock(node); } function IfStatement(node) { this.keyword("if"); this.token("("); this.print(node.test, node); this.token(")"); this.space(); var needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent)); if (needsBlock) { this.token("{"); this.newline(); this.indent(); } this.printAndIndentOnComments(node.consequent, node); if (needsBlock) { this.dedent(); this.newline(); this.token("}"); } if (node.alternate) { if (this.endsWith("}")) this.space(); this.word("else"); this.space(); this.printAndIndentOnComments(node.alternate, node); } } // Recursively get the last statement. function getLastStatement(statement) { if (!t.isStatement(statement.body)) return statement; return getLastStatement(statement.body); } function ForStatement(node) { this.keyword("for"); this.token("("); this._inForStatementInitCounter++; this.print(node.init, node); this._inForStatementInitCounter--; this.token(";"); if (node.test) { this.space(); this.print(node.test, node); } this.token(";"); if (node.update) { this.space(); this.print(node.update, node); } this.token(")"); this.printBlock(node); } function WhileStatement(node) { this.keyword("while"); this.token("("); this.print(node.test, node); this.token(")"); this.printBlock(node); } var buildForXStatement = function buildForXStatement(op) { return function (node) { this.keyword("for"); this.token("("); this.print(node.left, node); this.space(); this.word(op); this.space(); this.print(node.right, node); this.token(")"); this.printBlock(node); }; }; var ForInStatement = exports.ForInStatement = buildForXStatement("in"); var ForOfStatement = exports.ForOfStatement = buildForXStatement("of"); function DoWhileStatement(node) { this.word("do"); this.space(); this.print(node.body, node); this.space(); this.keyword("while"); this.token("("); this.print(node.test, node); this.token(")"); this.semicolon(); } function buildLabelStatement(prefix) { var key = arguments.length <= 1 || arguments[1] === undefined ? "label" : arguments[1]; return function (node) { this.word(prefix); var label = node[key]; if (label) { this.space(); var terminatorState = this.startTerminatorless(); this.print(label, node); this.endTerminatorless(terminatorState); } this.semicolon(); }; } var ContinueStatement = exports.ContinueStatement = buildLabelStatement("continue"); var ReturnStatement = exports.ReturnStatement = buildLabelStatement("return", "argument"); var BreakStatement = exports.BreakStatement = buildLabelStatement("break"); var ThrowStatement = exports.ThrowStatement = buildLabelStatement("throw", "argument"); function LabeledStatement(node) { this.print(node.label, node); this.token(":"); this.space(); this.print(node.body, node); } function TryStatement(node) { this.keyword("try"); this.print(node.block, node); this.space(); // Esprima bug puts the catch clause in a `handlers` array. // see https://code.google.com/p/esprima/issues/detail?id=433 // We run into this from regenerator generated ast. if (node.handlers) { this.print(node.handlers[0], node); } else { this.print(node.handler, node); } if (node.finalizer) { this.space(); this.word("finally"); this.space(); this.print(node.finalizer, node); } } function CatchClause(node) { this.keyword("catch"); this.token("("); this.print(node.param, node); this.token(")"); this.space(); this.print(node.body, node); } function SwitchStatement(node) { this.keyword("switch"); this.token("("); this.print(node.discriminant, node); this.token(")"); this.space(); this.token("{"); this.printSequence(node.cases, node, { indent: true, addNewlines: function addNewlines(leading, cas) { if (!leading && node.cases[node.cases.length - 1] === cas) return -1; } }); this.token("}"); } function SwitchCase(node) { if (node.test) { this.word("case"); this.space(); this.print(node.test, node); this.token(":"); } else { this.word("default"); this.token(":"); } if (node.consequent.length) { this.newline(); this.printSequence(node.consequent, node, { indent: true }); } } function DebuggerStatement() { this.word("debugger"); this.semicolon(); } function variableDeclarationIdent() { // "let " or "var " indentation. this.token(","); this.newline(); for (var i = 0; i < 4; i++) { this.space(true); } } function constDeclarationIdent() { // "const " indentation. this.token(","); this.newline(); for (var i = 0; i < 6; i++) { this.space(true); } } function VariableDeclaration(node, parent) { this.word(node.kind); this.space(); var hasInits = false; // don't add whitespace to loop heads if (!t.isFor(parent)) { for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } var declar = _ref; if (declar.init) { // has an init so let's split it up over multiple lines hasInits = true; } } } // // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on // this will format declarations like: // // let foo = "bar", bar = "foo"; // // into // // let foo = "bar", // bar = "foo"; // var separator = void 0; if (!this.format.compact && !this.format.concise && hasInits && !this.format.retainLines) { separator = node.kind === "const" ? constDeclarationIdent : variableDeclarationIdent; } // this.printList(node.declarations, node, { separator: separator }); if (t.isFor(parent)) { // don't give semicolons to these nodes since they'll be inserted in the parent generator if (parent.left === node || parent.init === node) return; } this.semicolon(); } function VariableDeclarator(node) { this.print(node.id, node); this.print(node.id.typeAnnotation, node); if (node.init) { this.space(); this.token("="); this.space(); this.print(node.init, node); } }
/* Highcharts JS v7.1.0 (2019-04-01) Indicator series type for Highstock (c) 2010-2019 Pawe Fus License: www.highcharts.com/license */ (function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/indicators/bollinger-bands",["highcharts","highcharts/modules/stock"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,d,b,n){a.hasOwnProperty(d)||(a[d]=n.apply(null,b))}a=a?a._modules:{};b(a,"mixins/multipe-lines.js",[a["parts/Globals.js"]],function(a){var d=a.each,b=a.merge,n=a.error, z=a.defined,p=a.seriesTypes.sma;return{pointArrayMap:["top","bottom"],pointValKey:"top",linesApiNames:["bottomLine"],getTranslatedLinesNames:function(l){var a=[];d(this.pointArrayMap,function(c){c!==l&&a.push("plot"+c.charAt(0).toUpperCase()+c.slice(1))});return a},toYData:function(l){var a=[];d(this.pointArrayMap,function(c){a.push(l[c])});return a},translate:function(){var a=this,b=a.pointArrayMap,c=[],k,c=a.getTranslatedLinesNames();p.prototype.translate.apply(a,arguments);d(a.points,function(l){d(b, function(b,e){k=l[b];null!==k&&(l[c[e]]=a.yAxis.toPixels(k,!0))})})},drawGraph:function(){var a=this,A=a.linesApiNames,c=a.points,k=c.length,q=a.options,r=a.graph,e={options:{gapSize:q.gapSize}},f=[],g=a.getTranslatedLinesNames(a.pointValKey),h;d(g,function(a,b){for(f[b]=[];k--;)h=c[k],f[b].push({x:h.x,plotX:h.plotX,plotY:h[a],isNull:!z(h[a])});k=c.length});d(A,function(c,d){f[d]?(a.points=f[d],q[c]?a.options=b(q[c].styles,e):n('Error: "There is no '+c+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'), a.graph=a["graph"+c],p.prototype.drawGraph.call(a),a["graph"+c]=a.graph):n('Error: "'+c+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=c;a.options=q;a.graph=r;p.prototype.drawGraph.call(a)}}});b(a,"indicators/bollinger-bands.src.js",[a["parts/Globals.js"],a["mixins/multipe-lines.js"]],function(a,b){var d=a.merge,n=a.isArray,v=a.seriesTypes.sma;a.seriesType("bb","sma",{params:{period:20,standardDeviation:2,index:3},bottomLine:{styles:{lineWidth:1, lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e\x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eTop: {point.top}\x3cbr/\x3eMiddle: {point.middle}\x3cbr/\x3eBottom: {point.bottom}\x3cbr/\x3e'},marker:{enabled:!1},dataGrouping:{approximation:"averages"}},a.merge(b,{pointArrayMap:["top","middle","bottom"],pointValKey:"middle",nameComponents:["period","standardDeviation"],linesApiNames:["topLine","bottomLine"], init:function(){v.prototype.init.apply(this,arguments);this.options=d({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)},getValues:function(a,b){var d=b.period,c=b.standardDeviation,k=a.xData,l=(a=a.yData)?a.length:0,r=[],e,f,g,h,p=[],w=[],x,m;if(k.length<d)return!1;x=n(a[0]);for(m=d;m<=l;m++){h=k.slice(m-d,m);f=a.slice(m-d,m);e=v.prototype.getValues.call(this,{xData:h,yData:f},b);h=e.xData[0];e=e.yData[0];g=0;for(var y=f.length,t=0,u;t<y;t++)u=(x? f[t][b.index]:f[t])-e,g+=u*u;g=Math.sqrt(g/(y-1));f=e+c*g;g=e-c*g;r.push([h,f,e,g]);p.push(h);w.push([f,e,g])}return{values:r,xData:p,yData:w}}}))});b(a,"masters/indicators/bollinger-bands.src.js",[],function(){})}); //# sourceMappingURL=bollinger-bands.js.map
/** * https://github.com/facebook/react-native/blob/master/Libraries/Components/StatusBar/StatusBar.js */ import React from 'react'; import ColorPropType from '../propTypes/ColorPropType'; let _backgroundColor = ''; let _barStyle = {}; let _hidden = false; let _networkActivityIndicatorVisible = false; let _translucent = false; const StatusBar = React.createClass({ propTypes: { animated: React.PropTypes.bool, barStyle: React.PropTypes.oneOf(['default', 'light-content']), backgroundColor: ColorPropType, hidden: React.PropTypes.bool, networkActivityIndicatorVisible: React.PropTypes.bool, showHideTransition: React.PropTypes.oneOf(['fade', 'slide']), translucent: React.PropTypes.bool }, statics: { setBackgroundColor(backgroundColor, animated) { _backgroundColor = backgroundColor; }, setBarStyle(barStyle, animated) { _barStyle = barStyle; }, setHidden(hidden, animated) { _hidden = hidden; }, setNetworkActivityIndicatorVisible(visible) { _networkActivityIndicatorVisible = visible; }, setTranslucent(translucent) { _translucent = translucent; }, __getBackgroundColor() { return _backgroundColor; }, __getBarStyle() { return _barStyle; }, __getHidden() { return _hidden; }, __getNetworkActivityIndicatorVisible() { return _networkActivityIndicatorVisible; }, __getTranslucent() { return _translucent; } }, render() { return null; } }); module.exports = StatusBar;
const encodeBase64URL = require('./encodeBase64URL'); const fetch = require('node-fetch'); // Exchanges an access token from OAuth provider. module.exports = async function exchangeAccessToken( tokenURL, clientID, clientSecret, code, redirectURI, state, codeVerifier ) { const params = new URLSearchParams({ client_id: clientID, ...(clientSecret ? { client_secret: clientSecret } : {}), code, code_verifier: codeVerifier, grant_type: 'authorization_code', redirect_uri: redirectURI, state }); const accessTokenRes = await fetch(tokenURL, { body: params.toString(), headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' }, method: 'POST' }); if (!accessTokenRes.ok) { console.error(await accessTokenRes.json()); throw new Error(`OAuth: Failed to exchange access token`); } const { access_token: accessToken } = await accessTokenRes.json(); return accessToken; };
import Ember from 'ember'; import LayoutRules from '../mixins/layout-rules'; var MdToolbar = Ember.Component.extend(LayoutRules, { tagName: ['md-toolbar'], shrinkSpeedFactor: 0.5, setupScrollShrink: function() { } }); export default MdToolbar;
'use strict'; const assert = require('assert').strict; const common = require('./../../common'); let battle; const unimportantPokemon = {species: 'magikarp', moves: ['splash']}; describe(`[Hackmons] Arceus`, function () { it(`in untyped forme should change its type to match the plate held`, function () { battle = common.gen(4).createBattle([[ {species: 'arceus', ability: 'multitype', item: 'flameplate', moves: ['rest']}, ], [ unimportantPokemon, ]]); const arceus = battle.p1.active[0]; assert(arceus.hasType('Fire')); }); it(`in Steel forme should should be Water-typed to match the held Splash Plate`, function () { battle = common.gen(4).createBattle([[ {species: 'arceussteel', ability: 'multitype', item: 'splashplate', moves: ['rest']}, ], [ unimportantPokemon, ]]); const arceus = battle.p1.active[0]; assert(arceus.hasType('Water')); }); it(`in a typed forme should be Normal-typed if no plate is held`, function () { battle = common.gen(4).createBattle([[ {species: 'arceusfire', ability: 'multitype', item: 'leftovers', moves: ['rest']}, ], [ unimportantPokemon, ]]); const arceus = battle.p1.active[0]; assert(arceus.hasType('Normal')); }); it(`in a typed forme should be Normal-typed despite holding a plate if Arceus does not have the Multitype ability`, function () { battle = common.gen(4).createBattle([[ {species: 'arceusfire', ability: 'truant', item: 'flameplate', moves: ['rest']}, ], [ unimportantPokemon, ]]); const arceus = battle.p1.active[0]; assert(arceus.hasType('Normal')); }); it(`should not be able to lose its typing`, function () { battle = common.createBattle([[ {species: 'arceus', ability: 'multitype', item: 'flameplate', moves: ['burnup']}, ], [ {species: 'reuniclus', moves: ['soak']}, ]]); battle.makeChoices(); const arceus = battle.p1.active[0]; assert(arceus.hasType('Fire'), 'Arceus should not change type.'); }); it(`should use Arceus's real type for Revelation Dance`, function () { battle = common.gen(7).createBattle([[ {species: 'arceusfire', ability: 'sandrush', moves: ['revelationdance']}, ], [ {species: 'aggron', ability: 'colorchange', moves: ['sleeptalk']}, ]]); battle.makeChoices(); const aggron = battle.p2.active[0]; assert(aggron.hasType('Normal'), 'Aggron should become Normal-type.'); }); });
require('babel-register'); require('./server/index.js');
/* * @package jsDAV * @subpackage DAV * @copyright Copyright(c) 2011 Ajax.org B.V. <info AT ajax DOT org> * @author Mike de Boer <info AT mikedeboer DOT nl> * @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License */ "use strict"; // DAV classes used directly by the Handler object var jsDAV = require("./../jsdav"); var jsDAV_Server = require("./server"); var jsDAV_Property_Response = require("./property/response"); var jsDAV_Property_GetLastModified = require("./property/getLastModified"); var jsDAV_Property_ResourceType = require("./property/resourceType"); var jsDAV_Property_SupportedReportSet = require("./property/supportedReportSet"); // interfaces to check for: var jsDAV_iFile = require("./interfaces/iFile"); var jsDAV_iCollection = require("./interfaces/iCollection"); var jsDAV_iExtendedCollection = require("./interfaces/iExtendedCollection") var jsDAV_iQuota = require("./interfaces/iQuota"); var jsDAV_iProperties = require("./interfaces/iProperties"); var Url = require("url"); var Fs = require("fs"); var Path = require("path"); var AsyncEventEmitter = require("./../shared/asyncEvents").EventEmitter; var Exc = require("./../shared/exceptions"); var Util = require("./../shared/util"); var Xml = require("./../shared/xml"); var Async = require("asyncjs"); var Formidable = require("formidable"); var requestCounter = 0; /** * Called when an http request comes in, pass it on to invoke and handle any * exceptions that might be thrown * * @param {jsDav_Server} server * @param {ServerRequest} req * @param {ServerResponse} resp * @return {jsDAV_Handler} */ var jsDAV_Handler = module.exports = function(server, req, resp) { this.server = server; this.httpRequest = Util.streamBuffer(req); this.httpResponse = resp; this.plugins = {}; this.nodeCache = {}; for (var plugin in server.plugins) { if (typeof server.plugins[plugin] != "object") continue; this.plugins[plugin] = server.plugins[plugin].new(this); } try { this.invoke(); } catch (ex) { this.handleError(ex); } }; /** * Inifinity is used for some request supporting the HTTP Depth header and indicates * that the operation should traverse the entire tree */ jsDAV_Handler.DEPTH_INFINITY = -1; /** * Nodes that are files, should have this as the type property */ jsDAV_Handler.NODE_FILE = 1; /** * Nodes that are directories, should use this value as the type property */ jsDAV_Handler.NODE_DIRECTORY = 2; jsDAV_Handler.PROP_SET = 1; jsDAV_Handler.PROP_REMOVE = 2; jsDAV_Handler.STATUS_MAP = { "100": "Continue", "101": "Switching Protocols", "200": "OK", "201": "Created", "202": "Accepted", "203": "Non-Authorative Information", "204": "No Content", "205": "Reset Content", "206": "Partial Content", "207": "Multi-Status", // RFC 4918 "208": "Already Reported", // RFC 5842 "300": "Multiple Choices", "301": "Moved Permanently", "302": "Found", "303": "See Other", "304": "Not Modified", "305": "Use Proxy", "307": "Temporary Redirect", "400": "Bad request", "401": "Unauthorized", "402": "Payment Required", "403": "Forbidden", "404": "Not Found", "405": "Method Not Allowed", "406": "Not Acceptable", "407": "Proxy Authentication Required", "408": "Request Timeout", "409": "Conflict", "410": "Gone", "411": "Length Required", "412": "Precondition failed", "413": "Request Entity Too Large", "414": "Request-URI Too Long", "415": "Unsupported Media Type", "416": "Requested Range Not Satisfiable", "417": "Expectation Failed", "418": "I'm a teapot", // RFC 2324 "422": "Unprocessable Entity", // RFC 4918 "423": "Locked", // RFC 4918 "424": "Failed Dependency", // RFC 4918 "500": "Internal Server Error", "501": "Not Implemented", "502": "Bad Gateway", "503": "Service Unavailable", "504": "Gateway Timeout", "505": "HTTP Version not supported", "507": "Unsufficient Storage", // RFC 4918 "508": "Loop Detected" // RFC 5842 }; (function() { /** * httpResponse * * @var HTTP_Response */ this.httpResponse = /** * httpRequest * * @var HTTP_Request */ this.httpRequest = null; /** * The propertymap can be used to map properties from * requests to property classes. * * @var array */ this.propertyMap = { "{DAV:}resourcetype": jsDAV_Property_ResourceType }; this.protectedProperties = [ // RFC4918 "{DAV:}getcontentlength", "{DAV:}getetag", "{DAV:}getlastmodified", "{DAV:}lockdiscovery", "{DAV:}resourcetype", "{DAV:}supportedlock", // RFC4331 "{DAV:}quota-available-bytes", "{DAV:}quota-used-bytes", // RFC3744 "{DAV:}alternate-URI-set", "{DAV:}principal-URL", "{DAV:}group-membership", "{DAV:}supported-privilege-set", "{DAV:}current-user-privilege-set", "{DAV:}acl", "{DAV:}acl-restrictions", "{DAV:}inherited-acl-set", "{DAV:}principal-collection-set", // RFC5397 "{DAV:}current-user-principal" ]; /** * This property allows you to automatically add the 'resourcetype' value * based on a node's classname or interface. * * The preset ensures that {DAV:}collection is automaticlly added for nodes * implementing jsDAV_iCollection. * * @var object */ this.resourceTypeMapping = { "{DAV:}collection": jsDAV_iCollection }; var internalMethods = { "OPTIONS":1, "GET":1, "HEAD":1, "DELETE":1, "PROPFIND":1, "MKCOL":1, "PUT":1, "PROPPATCH":1, "COPY":1, "MOVE":1, "REPORT":1 }; /** * Handles a http request, and execute a method based on its name * * @return void */ this.invoke = function() { var method = this.httpRequest.method.toUpperCase(), self = this; if (jsDAV.debugMode) { this.id = ++requestCounter; Util.log("{" + this.id + "}", method, this.httpRequest.url); Util.log("{" + this.id + "}", this.httpRequest.headers); var wh = this.httpResponse.writeHead, we = this.httpResponse.end; this.httpResponse.writeHead = function(code, headers) { Util.log("{" + self.id + "}", code, headers); this.writeHead = wh; this.writeHead(code, headers); }; this.httpResponse.end = function(content) { Util.log("{" + self.id + "}", "'" + (content || "") + "'"); this.end = we; this.end(content); }; } var uri = this.getRequestUri(); this.dispatchEvent("beforeMethod", method, uri, function(stop) { if (stop === true) return; if (stop) return self.handleError(stop); // Make sure this is a HTTP method we support if (internalMethods[method]) { self["http" + method.charAt(0) + method.toLowerCase().substr(1)](); } else { self.dispatchEvent("unknownMethod", method, uri, function(stop) { if (stop === true) return; // Unsupported method self.handleError(stop || new Exc.NotImplemented()); }); } }); }; /** * Centralized error and exception handler, which constructs a proper WebDAV * 500 server error, or different depending on the error object implementation * and/ or extensions. * * @param {Error} e Error string or Exception object * @return {void} */ this.handleError = function(e) { //if (jsDAV.debugMode) // console.trace(); if (e === true) return; // plugins should return TRUE to prevent error reporting. if (typeof e == "string") e = new Exc.jsDAV_Exception(e); var xml = '<?xml version="1.0" encoding="utf-8"?>\n' + '<d:error xmlns:d="DAV:" xmlns:a="' + Xml.NS_AJAXORG + '">\n' + ' <a:exception>' + (e.type || e.toString()) + '</a:exception>\n' + ' <a:message>' + e.message + '</a:message>\n'; if (this.server.debugExceptions) { xml += '<a:file>' + (e.filename || "") + '</a:file>\n' + '<a:line>' + (e.line || "") + '</a:line>\n'; } xml += '<a:jsdav-version>' + jsDAV_Server.VERSION + '</a:jsdav-version>\n'; var code = 500; var self = this; if (e instanceof Exc.jsDAV_Exception) { code = e.code; xml = e.serialize(this, xml); e.getHTTPHeaders(this, function(err, h) { afterHeaders(h); }); } else { afterHeaders({}); } function afterHeaders(headers) { headers["Content-Type"] = "application/xml; charset=utf-8"; self.httpResponse.writeHead(code, headers); self.httpResponse.end(xml + '</d:error>', "utf-8"); if (jsDAV.debugMode) { Util.log(e, "error"); console.log(e.stack); //throw e; // DEBUGGING! } } }; /** * Caching version of jsDAV_Server#tree#getNodeForPath(), to make node lookups * during the same request (the scope of a handler instance) more cheap. * * @param {String} path * @param {Function} cbgetnodefp * @returns {void} */ this.getNodeForPath = function(path, cbgetnodefp) { if (this.nodeCache[path]) return cbgetnodefp(null, this.nodeCache[path]); var self = this; this.server.tree.getNodeForPath(path, function(err, node) { if (err) return cbgetnodefp(err); self.nodeCache[path] = node; cbgetnodefp(null, node); }); }; /** * This method is called with every tree update * * Examples of tree updates are: * * node deletions * * node creations * * copy * * move * * renaming nodes * * If Tree classes implement a form of caching, this will allow * them to make sure caches will be expired. * * If a path is passed, it is assumed that the entire subtree is dirty * * @param {String} path * @return void */ this.markDirty = function(path) { // We don't care enough about sub-paths // flushing the entire cache path = Util.trim(path, "/"); for (var nodePath in this.nodeCache) { if (nodePath.indexOf(path) === 0) delete this.nodeCache[nodePath]; } }; /** * HTTP OPTIONS * * @return {void} * @throws {Error} */ this.httpOptions = function() { var uri = this.getRequestUri(); var self = this; this.getAllowedMethods(uri, function(err, methods) { if (!Util.empty(err)) return self.handleError(err); var headers = { "Allow": methods.join(",").toUpperCase(), "MS-Author-Via" : "DAV", "Accept-Ranges" : "bytes", "X-jsDAV-Version" : jsDAV_Server.VERSION, "Content-Length" : 0 }; var features = ["1", "3", "extended-mkcol"]; for (var plugin in self.plugins) { if (!self.plugins[plugin].getFeatures) Util.log("method getFeatures() NOT implemented for plugin " + plugin, "error"); else features = features.concat(self.plugins[plugin].getFeatures()); } headers["DAV"] = features.join(","); self.httpResponse.writeHead(200, headers); self.httpResponse.end(); }); }; /** * HTTP GET * * This method simply fetches the contents of a uri, like normal * * @return {void} * @throws {Error} */ this.httpGet = function() { var node; var uri = this.getRequestUri(); var self = this; this.checkPreconditions(true, function(err, redirected) { if (!Util.empty(err)) return self.handleError(err); if (redirected) return; self.getNodeForPath(uri, function(err, n) { if (!Util.empty(err)) return self.handleError(err); node = n; afterCheck(); }); }); function afterCheck() { if (!node.hasFeature(jsDAV_iFile)) { return self.handleError(new Exc.NotImplemented( "GET is only implemented on File objects")); } var hasStream = !!node.getStream; self.getHTTPHeaders(uri, function(err, httpHeaders) { if (!Util.empty(err)) return self.handleError(err); var nodeSize = null; // ContentType needs to get a default, because many webservers // will otherwise default to text/html, and we don't want this // for security reasons. if (!httpHeaders["content-type"]) httpHeaders["content-type"] = "application/octet-stream"; if (httpHeaders["content-length"]) { nodeSize = httpHeaders["content-length"]; // Need to unset Content-Length, because we'll handle that // during figuring out the range delete httpHeaders["content-length"]; } var range = self.getHTTPRange(); var ifRange = self.httpRequest.headers["if-range"]; var ignoreRangeHeader = false; // If ifRange is set, and range is specified, we first need // to check the precondition. if (nodeSize && range && ifRange) { // if IfRange is parsable as a date we'll treat it as a // DateTime otherwise, we must treat it as an etag. try { var ifRangeDate = new Date(ifRange); // It's a date. We must check if the entity is modified // since the specified date. if (!httpHeaders["last-modified"]) { ignoreRangeHeader = true; } else { var modified = new Date(httpHeaders["last-modified"]); if (modified > ifRangeDate) ignoreRangeHeader = true; } } catch (ex) { // It's an entity. We can do a simple comparison. if (!httpHeaders["etag"]) ignoreRangeHeader = true; else if (httpHeaders["etag"] !== ifRange) ignoreRangeHeader = true; } } // We're only going to support HTTP ranges if the backend // provided a filesize if (!ignoreRangeHeader && nodeSize && range) { // Determining the exact byte offsets var start, end; if (range[0] !== null) { start = range[0]; // the browser/ client sends 'end' offsets as factor of nodeSize - 1, // so we need to correct it, because NodeJS streams byte offsets // are inclusive end = range[1] !== null ? range[1] + 1 : nodeSize; if (start > nodeSize) { return self.handleError(new Exc.RequestedRangeNotSatisfiable( "The start offset (" + range[0] + ") exceeded the size of the entity (" + nodeSize + ")") ); } if (end < start) { return self.handleError(new Exc.RequestedRangeNotSatisfiable( "The end offset (" + range[1] + ") is lower than the start offset (" + range[0] + ")") ); } if (end > nodeSize) end = nodeSize; } else { start = nodeSize - range[1]; end = nodeSize; if (start < 0) start = 0; } var offlen = end - start; // Prevent buffer error // https://github.com/joyent/node/blob/v0.4.5/lib/buffer.js#L337 if (end < start) { var swapTmp = end; end = start; start = swapTmp; } // report a different end offset, corrected by 1: var clientEnd = end > 0 ? end - 1 : end; httpHeaders["content-length"] = offlen; httpHeaders["content-range"] = "bytes " + start + "-" + clientEnd + "/" + nodeSize; if (hasStream) { var writeStreamingHeader = function () { self.httpResponse.writeHead(206, httpHeaders); }; node.getStream(start, end, function(err, data) { if (err) { if (!writeStreamingHeader) { self.httpResponse.end(); console.error("jsDAV GET error", err); } else { self.handleError(err); } return; } // write header on first incoming buffer if (writeStreamingHeader) { writeStreamingHeader(); writeStreamingHeader = null; } if (!data) return self.httpResponse.end(); self.httpResponse.write(data); }); } else { node.get(function(err, body) { if (!Util.empty(err)) return self.handleError(err); // New read/write stream var newStream = new Buffer(offlen); body.copy(newStream, 0, start, offlen); self.httpResponse.writeHead(206, httpHeaders); self.httpResponse.end(newStream); }); } } else { var since = self.httpRequest.headers["if-modified-since"]; var oldEtag = self.httpRequest.headers["if-none-match"]; var lastModified = httpHeaders["last-modified"]; var etag = httpHeaders["etag"]; since = since && Date.parse(since).valueOf(); lastModified = lastModified && Date.parse(lastModified).valueOf(); // If there is no match, then move on. if (!((since && lastModified === since) || (etag && oldEtag === etag))) { if (nodeSize) httpHeaders["content-length"] = nodeSize; if (hasStream) { var writeStreamingHeader = function () { self.httpResponse.writeHead(200, httpHeaders); }; // no start or end means: get all file contents. node.getStream(null, null, function(err, data) { if (err) { if (!writeStreamingHeader) { self.httpResponse.end(); console.error("jsDAV GET error", err); } else { self.handleError(err); } return; } // write header on first incoming buffer if (writeStreamingHeader) { writeStreamingHeader(); writeStreamingHeader = null; } if (!data) return self.httpResponse.end(); self.httpResponse.write(data); }); } else { node.get(function(err, body) { if (!Util.empty(err)) return self.handleError(err); self.httpResponse.writeHead(200, httpHeaders); self.httpResponse.end(body); }); } } else { // Filter out any Content based headers since there // is no content. var newHeaders = {}; Object.keys(httpHeaders).forEach(function(key) { if (key.indexOf("content") < 0) newHeaders[key] = httpHeaders[key]; }); self.httpResponse.writeHead(304, newHeaders); self.httpResponse.end(); } } }); } }; /** * HTTP HEAD * * This method is normally used to take a peak at a url, and only get the * HTTP response headers, without the body. * This is used by clients to determine if a remote file was changed, so * they can use a local cached version, instead of downloading it again * * @return {void} * @throws {Error} */ this.httpHead = function() { var uri = this.getRequestUri(), self = this; this.getNodeForPath(uri, function(err, node) { if (!Util.empty(err)) return self.handleError(err); /* This information is only collection for File objects. * Ideally we want to throw 405 Method Not Allowed for every * non-file, but MS Office does not like this */ var headers = {}; if (node.hasFeature(jsDAV_iFile)) { self.getHTTPHeaders(uri, function(err, headersFetched) { if (!Util.empty(err)) return self.handleError(err); headers = headersFetched; if (!headers["content-type"]) headers["content-type"] = "application/octet-stream"; afterHeaders(); }); } else { afterHeaders(); } function afterHeaders() { self.httpResponse.writeHead(200, headers); self.httpResponse.end(); } }); }; /** * HTTP Delete * * The HTTP delete method, deletes a given uri * * @return {void} * @throws {Error} */ this.httpDelete = function() { var uri = this.getRequestUri(); var self = this; this.getNodeForPath(uri, function(err, node) { if (!Util.empty(err)) return self.handleError(err); self.dispatchEvent("beforeUnbind", uri, function(stop) { if (stop === true) return; node["delete"](function(err) { if (!Util.empty(err)) return self.handleError(err); self.markDirty(uri); self.httpResponse.writeHead(204, {"content-length": "0"}); self.httpResponse.end(); self.dispatchEvent("afterDelete", uri); }); }); }); }; /** * WebDAV PROPFIND * * This WebDAV method requests information about an uri resource, or a list * of resources * If a client wants to receive the properties for a single resource it will * add an HTTP Depth: header with a 0 value. * If the value is 1, it means that it also expects a list of sub-resources * (e.g.: files in a directory) * * The request body contains an XML data structure that has a list of * properties the client understands. * The response body is also an xml document, containing information about * every uri resource and the requested properties * * It has to return a HTTP 207 Multi-status status code * * @throws {Error} */ this.httpPropfind = function() { var self = this; this.getRequestBody("utf8", null, false, function(err, data) { if (!Util.empty(err)) return self.handleError(err); //if (jsDAV.debugMode) // Util.log("{" + self.id + "}", "data received " + data); self.parsePropfindRequest(data, function(err, requestedProperties) { if (!Util.empty(err)) return self.handleError(err); var depth = self.getHTTPDepth(1); // The only two options for the depth of a propfind is 0 or 1 if (depth !== 0) depth = 1; // The requested path var path; try { path = self.getRequestUri(); } catch (ex) { return self.handleError(ex); } //if (jsDAV.debugMode) // Util.log("httpPropfind BEFORE getPropertiesForPath '" + path + "';", requestedProperties); self.getPropertiesForPath(path, requestedProperties, depth, function(err, newProperties) { if (!Util.empty(err)) return self.handleError(err); // Normally this header is only needed for OPTIONS responses, however.. // iCal seems to also depend on these being set for PROPFIND. Since // this is not harmful, we'll add it. var features = ["1", "3", "extended-mkcol"]; for (var plugin in self.plugins) { if (!self.plugins[plugin].getFeatures) Util.log("method getFeatures() NOT implemented for plugin " + plugin, "error"); else features = features.concat(self.plugins[plugin].getFeatures()); } // This is a multi-status response. self.httpResponse.writeHead(207, { "content-type": "application/xml; charset=utf-8", "vary": "Brief,Prefer", "DAV": features.join(",") }); var prefer = self.getHTTPPrefer(); self.httpResponse.end(self.generateMultiStatus(newProperties, prefer["return-minimal"])); }); }); }); }; /** * WebDAV PROPPATCH * * This method is called to update properties on a Node. The request is an * XML body with all the mutations. * In this XML body it is specified which properties should be set/updated * and/or deleted * * @return {void} */ this.httpProppatch = function() { var self = this; this.getRequestBody("utf8", null, false, function(err, data) { if (!Util.empty(err)) return self.handleError(err); //if (jsDAV.debugMode) // Util.log("{" + self.id + "}", "data received " + data); self.parseProppatchRequest(data, function(err, newProperties) { if (!Util.empty(err)) return self.handleError(err); self.updateProperties(self.getRequestUri(), newProperties, function(err, result) { if (!Util.empty(err)) return self.handleError(err); var prefer = self.getHTTPPrefer(); if (prefer["return-minimal"]) { // If return-minimal is specified, we only have to check if the // request was succesful, and don't need to return the // multi-status. var prop; var ok = true; for (var code in result) { prop = result[code]; if (parseInt(code, 10) > 299) { ok = false; break; } } if (ok) { self.httpResponse.writeHead(204, { "vary": "Brief, Prefer" }); self.httpResponse.end(); return; } } self.httpResponse.writeHead(207, { "content-type": "application/xml; charset=utf-8", "vary": "Brief, Prefer" }); self.httpResponse.end(self.generateMultiStatus(result)); }); }); }); }; /** * HTTP PUT method * * This HTTP method updates a file, or creates a new one. * If a new resource was created, a 201 Created status code should be returned. * If an existing resource is updated, it's a 200 Ok * * @return {void} */ this.httpPut = function() { var self = this; var uri = this.getRequestUri(); // Intercepting Content-Range if (this.httpRequest.headers["content-range"]) { /* Content-Range is dangerous for PUT requests: PUT per definition stores a full resource. draft-ietf-httpbis-p2-semantics-15 says in section 7.6: An origin server SHOULD reject any PUT request that contains a Content-Range header field, since it might be misinterpreted as partial content (or might be partial content that is being mistakenly PUT as a full representation). Partial content updates are possible by targeting a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method that has been specifically defined for partial updates (for example, the PATCH method defined in [RFC5789]). This clarifies RFC2616 section 9.6: The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a 501 (Not Implemented) response in such cases. OTOH is a PUT request with a Content-Range currently the only way to continue an aborted upload request and is supported by curl, mod_dav, Tomcat and others. Since some clients do use this feature which results in unexpected behaviour (cf PEAR::HTTP_WebDAV_Client 1.0.1), we reject all PUT requests with a Content-Range for now. */ return this.handleError(new Exc.NotImplemented("PUT with Content-Range is not allowed.")); } // First we'll do a check to see if the resource already exists this.getNodeForPath(uri, function(err, node) { if (!Util.empty(err)) { if (err instanceof Exc.FileNotFound) { // If we got here, the resource didn't exist yet. // `data` is set to `null` to use streamed write. self.createFile(uri, null, "binary", function(err, etag) { if (!Util.empty(err)) return self.handleError(err); var headers = {"content-length": "0"}; if (etag) headers.etag = etag; self.httpResponse.writeHead(201, headers); self.httpResponse.end(); self.dispatchEvent("afterWriteContent", uri); }); } else { return self.handleError(err); } } else { var hasStream = !!node.putStream; // Checking If-None-Match and related headers. self.checkPreconditions(false, function(err, redirected) { if (!Util.empty(err)) return self.handleError(err); if (redirected) return false; // If the node is a collection, we'll deny it if (!node.hasFeature(jsDAV_iFile)) return self.handleError(new Exc.Conflict("PUT is not allowed on non-files.")); self.dispatchEvent("beforeWriteContent", uri, node, function(stop) { if (stop === true) return; if (hasStream) { node.putStream(self, "binary", afterPut); } else { self.getRequestBody("binary", null, false, function(err, body) { if (!Util.empty(err)) return self.handleError(err); node.put(body, "binary", afterPut); }); } function afterPut(err, etag) { if (!Util.empty(err)) return self.handleError(err); var headers = {"content-length": "0"}; if (etag) headers.etag = etag; self.httpResponse.writeHead(200, headers); self.httpResponse.end(); self.dispatchEvent("afterWriteContent", uri); } }); }); } }); }; /** * WebDAV MKCOL * * The MKCOL method is used to create a new collection (directory) on the server * * @return {void} */ this.httpMkcol = function() { var resourceType; var properties = {}; var self = this; var req = this.httpRequest; this.getRequestBody("utf8", null, false, function(err, requestBody) { if (!Util.empty(err)) return self.handleError(err); if (requestBody) { var contentType = req.headers["content-type"]; if (contentType.indexOf("application/xml") !== 0 && contentType.indexOf("text/xml") !== 0) { // We must throw 415 for unsupported mkcol bodies return self.handleError(new Exc.UnsupportedMediaType( "The request body for the MKCOL request must have an xml Content-Type")); } Xml.loadDOMDocument(requestBody, self.server.options.parser, function(err, dom) { var firstChild = dom.firstChild; if (Xml.toClarkNotation(firstChild) !== "{DAV:}mkcol") { // We must throw 415 for unsupport mkcol bodies return self.handleError(new Exc.UnsupportedMediaType( "The request body for the MKCOL request must be a {DAV:}mkcol request construct.")); } var childNode; var i = 0; var c = firstChild.childNodes; var l = c.length; for (; i < l; ++i) { childNode = c[i]; if (Xml.toClarkNotation(childNode) !== "{DAV:}set") continue; properties = Util.extend(properties, Xml.parseProperties(childNode, self.propertyMap)); } if (!properties["{DAV:}resourcetype"]) { return self.handleError(new Exc.BadRequest( "The mkcol request must include a {DAV:}resourcetype property") ); } delete properties["{DAV:}resourcetype"]; resourceType = []; // Need to parse out all the resourcetypes var rtNode = firstChild.getElementsByTagNameNS("urn:DAV", "resourcetype")[0]; for (i = 0, c = rtNode.childNodes, l = c.length; i < l; ++i) resourceType.push(Xml.toClarkNotation(c[i])); afterParse(); }); } else { resourceType = ["{DAV:}collection"]; afterParse(); } function afterParse() { try { var uri = self.getRequestUri() } catch (ex) { return self.handleError(ex); } self.createCollection(uri, resourceType, properties, function(err, result) { if (!Util.empty(err)) return self.handleError(err); if (result && result.length) { self.httpResponse.writeHead(207, {"content-type": "application/xml; charset=utf-8"}); self.httpResponse.end(self.generateMultiStatus(result)); } else { self.httpResponse.writeHead(201, {"content-length": "0"}); self.httpResponse.end(); } }); } }); }; /** * WebDAV HTTP MOVE method * * This method moves one uri to a different uri. A lot of the actual request * processing is done in getCopyMoveInfo * * @return {void} */ this.httpMove = function() { var self = this; this.getCopyAndMoveInfo(function(err, moveInfo) { if (!Util.empty(err)) return self.handleError(err); if (moveInfo.destinationExists) { self.dispatchEvent("beforeUnbind", moveInfo.destination, function(stop) { if (stop === true) return false; moveInfo.destinationNode["delete"](function(err) { if (!Util.empty(err)) return self.handleError(err); afterDelete(); }); }); } else { afterDelete(); } function afterDelete() { self.dispatchEvent("beforeUnbind", moveInfo.source, function(stop) { if (stop === true) return false; self.dispatchEvent("beforeBind", moveInfo.destination, function(stop) { if (stop === true) return false; self.server.tree.move(moveInfo.source, moveInfo.destination, function(err, sourceDir, destinationDir) { if (!Util.empty(err)) return self.handleError(err); self.markDirty(moveInfo.source); self.markDirty(moveInfo.destination); self.dispatchEvent("afterBind", moveInfo.destination, Path.join(self.server.tree.basePath, moveInfo.destination)); // If a resource was overwritten we should send a 204, otherwise a 201 self.httpResponse.writeHead(moveInfo.destinationExists ? 204 : 201, {"content-length": "0"}); self.httpResponse.end(); self.dispatchEvent("afterMove", moveInfo.destination); }); }); }); } }); }; /** * WebDAV HTTP COPY method * * This method copies one uri to a different uri, and works much like the MOVE request * A lot of the actual request processing is done in getCopyMoveInfo * * @return {void} */ this.httpCopy = function() { var self = this; this.getCopyAndMoveInfo(function(err, copyInfo) { if (!Util.empty(err)) return self.handleError(err); if (copyInfo.destinationExists) { self.dispatchEvent("beforeUnbind", copyInfo.destination, function(stop) { if (stop === true) return false; copyInfo.destinationNode["delete"](function(err) { if (!Util.empty(err)) return self.handleError(err); afterDelete(); }); }); } else { afterDelete(); } function afterDelete() { self.dispatchEvent("beforeBind", copyInfo.destination, function(stop) { if (stop === true) return false; self.server.tree.copy(copyInfo.source, copyInfo.destination, function(err) { if (!Util.empty(err)) return self.handleError(err); self.markDirty(copyInfo.destination); self.dispatchEvent("afterBind", copyInfo.destination, Path.join(self.server.tree.basePath, copyInfo.destination)); // If a resource was overwritten we should send a 204, otherwise a 201 self.httpResponse.writeHead(copyInfo.destinationExists ? 204 : 201, {"Content-Length": "0"}); self.httpResponse.end(); self.dispatchEvent("afterCopy", copyInfo.destination); }); }); } }); }; /** * HTTP REPORT method implementation * * Although the REPORT method is not part of the standard WebDAV spec (it's from rfc3253) * It's used in a lot of extensions, so it made sense to implement it into the core. * * @return {void} */ this.httpReport = function() { var self = this; this.getRequestBody("utf8", null, false, function(err, data) { Xml.loadDOMDocument(data, self.server.options.parser, function(err, dom) { var reportName = Xml.toClarkNotation(dom); self.dispatchEvent("report", reportName, dom, function(stop) { if (stop !== true) { // if dispatchEvent didn't return true, it means the report was not supported return self.handleError(new Exc.ReportNotImplemented()); } }); }); }); }; /** * Returns an array with all the supported HTTP methods for a specific uri. * * @param {String} uri * @param {Function} cbmethods Callback that is the return body of this function * @return {Array} */ this.getAllowedMethods = function(uri, cbmethods) { var self = this; var methods = [ "OPTIONS", "GET", "HEAD", "DELETE", "PROPFIND", "PUT", "PROPPATCH", "COPY", "MOVE", "REPORT" ]; // The MKCOL is only allowed on an unmapped uri this.getNodeForPath(uri, function(err, node) { if (!Util.empty(err)) methods.push("MKCOL"); // We're also checking if any of the plugins register any new methods for (var plugin in self.plugins) { if (!self.plugins[plugin].getHTTPMethods) Util.log("method getHTTPMethods() NOT implemented for plugin " + plugin, "error"); else methods = methods.concat(self.plugins[plugin].getHTTPMethods(uri, node)); } cbmethods(null, Util.makeUnique(methods)); }); }; /** * Gets the uri for the request, keeping the base uri into consideration * * @return {String} * @throws {Error} */ this.getRequestUri = function() { return this.calculateUri(this.httpRequest.url); }; /** * Fetch the binary data for the HTTP request and return it to a callback OR * write it to a WritableStream instance. * * @param {String} enc * @param {WritableStream} [stream] * @param {Boolean} [forceStream] * @param {Function} callback * @return {void} */ this.getRequestBody = function(enc, stream, forceStream, cbreqbody) { if (!cbreqbody) { cbreqbody = stream; stream = null; forceStream = false; } var ctype; var self = this; var req = this.httpRequest; var isStream = forceStream === true ? true : (!(ctype = req.headers["content-type"]) || !ctype.match(/(urlencoded|multipart)/i)); // HACK: MacOSX Finder and NodeJS don't play nice together with files // that start with '._' //if (/\/\.[D_]{1}[^\/]+$/.test(req.url)) // return cbreqbody(null, "", cleanup); enc = (enc || "utf8").replace("-", ""); if (enc == "raw") enc = "binary"; if (req.$data) { return cbreqbody(req.$data.err || null, enc == "binary" ? req.$data : req.$data.toString(enc)); } if (isStream) { var buff = []; var contentLength = req.headers["content-length"]; var lengthCount = 0; var err; if (stream) stream.on("error", function(ex) { err = ex; }); req.streambuffer.ondata(function(data) { lengthCount += data.length; if (stream && stream.writable) stream.write(data); else buff.push(data); }); req.streambuffer.onend(function() { // TODO: content-length check and rollback... if (stream) { if (err) return cbreqbody(err); stream.on("close", function() { cbreqbody(err); }); stream.end(); } else { buff = Util.concatBuffers(buff); if (contentLength && parseInt(contentLength, 10) != buff.length) { readDone(new Exc.BadRequest("Content-Length mismatch: Request Header claimed " + contentLength + " bytes, but received " + buff.length + " bytes"), buff); } else readDone(null, buff); } }); } else { var form = new Formidable.IncomingForm(); form.uploadDir = this.server.tmpDir; form.on("file", function(field, file) { // in the case of a streamed write, we can move the file to its // correct position right away: if (stream) { stream.on("close", function() { Fs.rename(file.path, stream.path, cbreqbody); }); stream.end(); } else { Fs.readFile(file.path, function(err, data) { readDone(err, data); Fs.unlink(file.path); }); } }); form.on("error", cbreqbody); form.parse(req); } function readDone(err, data) { req.$data = data; if (err) req.$data.err = err; if (jsDAV.debugMode && enc != "binary") Util.log("{" + self.id + "}", req.$data.toString("utf8")); cbreqbody(err, enc == "binary" ? req.$data : req.$data.toString(enc)); } }; /** * Calculates the uri for a request, making sure that the base uri is stripped out * * @param {String} uri * @throws {Exc.Forbidden} A permission denied exception is thrown * whenever there was an attempt to supply a uri outside of the base uri * @return {String} */ this.calculateUri = function(uri) { if (uri.charAt(0) != "/") { if (uri.indexOf("://") > -1) uri = Url.parse(uri).pathname; else uri = "/" + uri; } else if (uri.indexOf("?") > -1) uri = Url.parse(uri).pathname; uri = uri.replace("//", "/"); if (uri.indexOf(this.server.baseUri) === 0) { return Util.trim(decodeURIComponent(uri.substr(this.server.baseUri.length)), "/"); } // A special case, if the baseUri was accessed without a trailing // slash, we'll accept it as well. else if (uri + "/" === this.server.baseUri) { return ""; } else { throw new Exc.Forbidden("Requested uri (" + uri + ") is out of base uri (" + this.server.baseUri + ")"); } }; /** * This method checks the main HTTP preconditions. * * Currently these are: * * If-Match * * If-None-Match * * If-Modified-Since * * If-Unmodified-Since * * The method will return true if all preconditions are met * The method will return false, or throw an exception if preconditions * failed. If false is returned the operation should be aborted, and * the appropriate HTTP response headers are already set. * * Normally this method will throw 412 Precondition Failed for failures * related to If-None-Match, If-Match and If-Unmodified Since. It will * set the status to 304 Not Modified for If-Modified_since. * * If the handleAsGET argument is set to true, it will also return 304 * Not Modified for failure of the If-None-Match precondition. This is the * desired behaviour for HTTP GET and HTTP HEAD requests. * * @param {Boolean} handleAsGET * @param {Function} cbprecond Callback that is the return body of this function * @return {void} */ this.checkPreconditions = function(handleAsGET, cbprecond) { handleAsGET = handleAsGET || false; var uri, ifMatch, ifNoneMatch, ifModifiedSince, ifUnmodifiedSince; var node = null; var lastMod = null; var etag = null; var self = this; try { uri = this.getRequestUri(); } catch (ex) { return cbprecond(ex); } if (ifMatch = this.httpRequest.headers["if-match"]) { // If-Match contains an entity tag. Only if the entity-tag // matches we are allowed to make the request succeed. // If the entity-tag is '*' we are only allowed to make the // request succeed if a resource exists at that url. this.getNodeForPath(uri, function(err, n) { if (!Util.empty(err)) { return cbprecond(new Exc.PreconditionFailed( "An If-Match header was specified and the resource did not exist", "If-Match")); } node = n; // Only need to check entity tags if they are not * if (ifMatch !== "*") { node.getETag(function(err, etag) { if (err) return cbprecond(err); var haveMatch = false; // There can be multiple etags ifMatch = ifMatch.split(","); var ifMatchItem; for (var i = 0, l = ifMatch.length; i < l; ++i) { // Stripping any extra spaces ifMatchItem = Util.trim(ifMatch[i], " "); if (etag === ifMatchItem) { haveMatch = true; break; } else { // Evolution has a bug where it sometimes prepends the " // with a \. This is our workaround. if (ifMatchItem.replace('\\"','"') === etag) { haveMatch = true; break; } } } if (!haveMatch) { return cbprecond(new Exc.PreconditionFailed( "An If-Match header was specified, but none of the specified the ETags matched", "If-Match") ); } afterIfMatch(); }); return; } afterIfMatch(); }); } else { afterIfMatch(); } function afterIfMatch() { if (ifNoneMatch = self.httpRequest.headers["if-none-match"]) { // The If-None-Match header contains an etag. // Only if the ETag does not match the current ETag, the request will succeed // The header can also contain *, in which case the request // will only succeed if the entity does not exist at all. var nodeExists = true; if (!node) { self.getNodeForPath(uri, function(err, n) { if (!Util.empty(err)) nodeExists = false; else node = n; if (nodeExists) { // The Etag is surrounded by double-quotes, so those must be // stripped. ifNoneMatch = Util.trim(ifNoneMatch, '"'); node.getETag(function(err, etag) { if (err) return cbprecond(err); if (ifNoneMatch === "*" || etag === ifNoneMatch) { if (handleAsGET) { self.httpResponse.writeHead(304); self.httpResponse.end(); cbprecond(null, true); // @todo call cbprecond() differently here? } else { cbprecond(new Exc.PreconditionFailed( "An If-None-Match header was specified, but the ETag " + "matched (or * was specified).", "If-None-Match") ); } } else { afterIfNoneMatch(); } }); return; } else { afterIfNoneMatch(); } }); } else { afterIfNoneMatch(); } } else { afterIfNoneMatch(); } function afterIfNoneMatch() { if (!ifNoneMatch && (ifModifiedSince = self.httpRequest.headers["if-modified-since"])) { // The If-Modified-Since header contains a date. We // will only return the entity if it has been changed since // that date. If it hasn't been changed, we return a 304 // header // Note that this header only has to be checked if there was no // If-None-Match header as per the HTTP spec. var date = new Date(ifModifiedSince); if (!node) self.getNodeForPath(uri, function(err, n) { if (!Util.empty(err)) return cbprecond(err); node = n; node.getLastModified(function(err, lastMod) { if (lastMod) { lastMod = new Date("@" + lastMod); if (lastMod <= date) { self.httpResponse.writeHead(304); self.httpResponse.end(); cbprecond(null, true); // @todo call cbprecond() differently here? return; } } afterIfModifiedSince(); }); }); } else { afterIfModifiedSince(); } function afterIfModifiedSince() { var date; if (ifUnmodifiedSince = self.httpRequest.headers["if-unmodified-since"]) { // The If-Unmodified-Since will allow the request if the // entity has not changed since the specified date. date = new Date(ifUnmodifiedSince); if (!node) { self.getNodeForPath(uri, function(err, n) { if (!Util.empty(err)) return cbprecond(err); node = n; finale(); }); } else { finale(); } } else { cbprecond(null, false); } function finale() { node.getLastModified(function(err, lastMod) { if (lastMod) { lastMod = new Date("@" + lastMod); if (lastMod > date) { return cbprecond(new Exc.PreconditionFailed( "An If-Unmodified-Since header was specified, but the " + "entity has been changed since the specified date.", "If-Unmodified-Since") ); } } cbprecond(null, false); }); } } } } }; /** * Generates a WebDAV propfind response body based on a list of nodes * * @param {Array} fileProperties The list with nodes * @return {String} */ this.generateMultiStatus = function(fileProperties, strip404s) { var namespace, prefix, entry, href, response; var xml = '<?xml version="1.0" encoding="utf-8"?><d:multistatus'; // Adding in default namespaces for (namespace in Xml.xmlNamespaces) { prefix = Xml.xmlNamespaces[namespace]; xml += ' xmlns:' + prefix + '="' + namespace + '"'; } xml += ">"; for (var i in fileProperties) { entry = fileProperties[i]; href = entry["href"]; //delete entry["href"]; if (strip404s && entry["404"]) delete entry["404"]; response = jsDAV_Property_Response.new(href, entry); xml = response.serialize(this, xml); } return xml + "</d:multistatus>"; }; /** * Returns a list of HTTP headers for a particular resource * * The generated http headers are based on properties provided by the * resource. The method basically provides a simple mapping between * DAV property and HTTP header. * * The headers are intended to be used for HEAD and GET requests. * * @param {String} path */ this.getHTTPHeaders = function(path, cbheaders) { var header; var propertyMap = { "{DAV:}getcontenttype" : "content-type", "{DAV:}getcontentlength" : "content-length", "{DAV:}getlastmodified" : "last-modified", "{DAV:}getetag" : "etag" }; var headers = { "pragma" : "no-cache", "cache-control" : "no-cache, no-transform" }; this.getProperties(path, ["{DAV:}getcontenttype", "{DAV:}getcontentlength", "{DAV:}getlastmodified", "{DAV:}getetag"], function(err, properties) { if (!Util.empty(err)) return cbheaders(err, headers); for (var prop in propertyMap) { header = propertyMap[prop]; if (properties[prop]) { // GetLastModified gets special cased if (properties[prop].hasFeature && properties[prop].hasFeature(jsDAV_Property_GetLastModified)) headers[header] = Util.dateFormat(properties[prop].getTime(), Util.DATE_RFC1123); else if (typeof properties[prop] != "object") headers[header] = properties[prop]; } } cbheaders(null, headers); }); }; /** * Returns a list of properties for a path * * This is a simplified version getPropertiesForPath. * if you aren't interested in status codes, but you just * want to have a flat list of properties. Use this method. * * @param {String} path * @param {Array} propertyNames */ this.getProperties = function(path, propertyNames, cbgetprops) { this.getPropertiesForPath(path, propertyNames, 0, function(err, result) { if (!Util.empty(err)) return cbgetprops(err); return cbgetprops(null, result[path]["200"]); }); }; /** * Returns a list of properties for a given path * * The path that should be supplied should have the baseUrl stripped out * The list of properties should be supplied in Clark notation. If the list * is empty 'allprops' is assumed. * * If a depth of 1 is requested child elements will also be returned. * * @param {String} path * @param {Array} propertyNames * @param {Number} depth * @return {Array} */ this.getPropertiesForPath = function(path, propertyNames, depth, cbgetpropspath) { propertyNames = propertyNames || []; depth = depth || 0; if (depth !== 0) depth = 1; path = Util.rtrim(path, "/"); var returnPropertyList = {}; var self = this; var reportPlugins = []; Object.keys(this.plugins).forEach(function(pluginName) { if (self.plugins[pluginName].getSupportedReportSet) reportPlugins.push(self.plugins[pluginName]); }); this.getNodeForPath(path, function(err, parentNode) { if (!Util.empty(err)) return cbgetpropspath(err); var nodes = {}; var nodesPath = []; nodes[path] = parentNode; nodesPath.push(path); //if (jsDAV.debugMode) // Util.log("getPropertiesForPath", depth, parentNode,parentNode.hasFeature(jsDAV_iCollection)); if (depth === 1 && parentNode.hasFeature(jsDAV_iCollection)) { parentNode.getChildren(function(err, cNodes) { if (!Util.empty(err)) return cbgetpropspath(err); for (var i = 0, l = cNodes.length; i < l; ++i) { nodes[path + "/" + cNodes[i].getName()] = cNodes[i]; nodesPath.push(path + "/" + cNodes[i].getName()); } afterGetChildren(nodes, nodesPath); }); } else { afterGetChildren(nodes, nodesPath); } function afterGetChildren(nodes, nodesPath) { // If the propertyNames array is empty, it means all properties are requested. // We shouldn't actually return everything we know though, and only return a // sensible list. var allProperties = (propertyNames.length === 0); if (allProperties) { // Default list of propertyNames, when all properties were requested. propertyNames = [ "{DAV:}getlastmodified", "{DAV:}getcontentlength", "{DAV:}resourcetype", "{DAV:}quota-used-bytes", "{DAV:}quota-available-bytes", "{DAV:}getetag", "{DAV:}getcontenttype" ]; } // If the resourceType was not part of the list, we manually add it // and mark it for removal. We need to know the resourcetype in order // to make certain decisions about the entry. // WebDAV dictates we should add a / and the end of href's for collections var removeRT = false; if (propertyNames.indexOf("{DAV:}resourcetype") === -1) { propertyNames.push("{DAV:}resourcetype"); removeRT = true; } function afterGetProperty(rprop, rpath, newProps, cbnext) { // If we were unable to find the property, we will list it as 404. if (!allProperties && !newProps["200"][rprop]) newProps["404"][rprop] = null; var node = nodes[rpath]; rpath = Util.trim(rpath, "/"); self.dispatchEvent("afterGetProperties", rpath, newProps, node, function() { if (parentNode.hasFeature(jsDAV_iCollection)) { // correct href when mountpoint is different than the // absolute location of the path var s = Util.trim(self.server.tree.basePath, "/"); if (s.charAt(0) != ".") { rpath = s.indexOf(self.server.baseUri) !== 0 ? rpath.replace(new RegExp("^" + Util.escapeRegExp(s)), "").replace(/^[\/]+/, "") : rpath; } } newProps["href"] = rpath; // Its is a WebDAV recommendation to add a trailing slash to collectionnames. // Apple's iCal also requires a trailing slash for principals (rfc 3744). // Therefore we add a trailing / for any non-file. This might need adjustments // if we find there are other edge cases. var rt = newProps["200"]["{DAV:}resourcetype"]; if (rpath !== "" && rt && (rt.is("{DAV:}collection") || rt.is("{DAV:}principal"))) { newProps["href"] += "/"; } // If the resourcetype property was manually added to the requested property list, // we will remove it again. if (removeRT) delete newProps["200"]["{DAV:}resourcetype"]; returnPropertyList[rpath] = newProps; cbnext(); }); } Async.list(nodesPath) .delay(0, 10) .each(function(myPath, cbnextpfp) { var node = nodes[myPath]; var newProperties = { "200" : {}, "403" : {}, "404" : {} }; var myProperties = [].concat(propertyNames); var propertyMap = Util.arrayToMap(myProperties); self.dispatchEvent("beforeGetProperties", myPath, node, propertyMap, newProperties, function(stop) { if (stop === true) return cbnextpfp(); myProperties = Object.keys(propertyMap); if (node.hasFeature(jsDAV_iProperties)) { node.getProperties(myProperties, function(err, props) { // The getProperties method may give us too much, // properties, in case the implementor was lazy. // // So as we loop through this list, we will only take the // properties that were actually requested and discard the // rest. for (var i = myProperties.length - 1; i >= 0; --i) { if (props[myProperties[i]]) { newProperties["200"][myProperties[i]] = props[myProperties[i]]; myProperties.splice(i, 1); } } buildProperties(); }); } else buildProperties(); function buildProperties() { // next loop! Async.list(myProperties) .delay(0, 10) .each(function(prop, cbnextprops) { if (typeof newProperties["200"][prop] != "undefined") return cbnextprops(); if (prop == "{DAV:}getlastmodified") { node.getLastModified(function(err, dt) { if (!err && dt) newProperties["200"][prop] = jsDAV_Property_GetLastModified.new(dt); afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}getcontentlength" && node.hasFeature(jsDAV_iFile)) { node.getSize(function(err, size) { if (!err && typeof size != "undefined") newProperties["200"][prop] = parseInt(size, 10); afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}quota-used-bytes" && node.hasFeature(jsDAV_iQuota)) { node.getQuotaInfo(function(err, quotaInfoUsed) { if (!err && quotaInfoUsed.length) newProperties["200"][prop] = quotaInfoUsed[0]; afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}quota-available-bytes" && node.hasFeature(jsDAV_iQuota)) { node.getQuotaInfo(function(err, quotaInfoAvail) { if (!err && quotaInfoAvail.length) newProperties["200"][prop] = quotaInfoAvail[1]; afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}getetag" && node.hasFeature(jsDAV_iFile)) { node.getETag(function(err, etag) { if (!err && etag) newProperties["200"][prop] = etag; afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}getcontenttype" && node.hasFeature(jsDAV_iFile)) { node.getContentType(function(err, ct) { if (!err && ct) newProperties["200"][prop] = ct; afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}supported-report-set") { var reports = []; Async.list(reportPlugins) .each(function(plugin, cbnextplugin) { plugin.getSupportedReportSet(myPath, function(err, rset) { if (!err && rset.length) reports = reports.concat(rset); cbnextplugin(); }); }) .end(function() { newProperties["200"][prop] = jsDAV_Property_SupportedReportSet.new(reports); afterGetProperty(prop, myPath, newProperties, cbnextprops); }); } else if (prop == "{DAV:}resourcetype") { newProperties["200"][prop] = jsDAV_Property_ResourceType.new(); for (var resourceType in self.resourceTypeMapping) { if (node.hasFeature(self.resourceTypeMapping[resourceType])) newProperties["200"][prop].add(resourceType); } afterGetProperty(prop, myPath, newProperties, cbnextprops); } else { afterGetProperty(prop, myPath, newProperties, cbnextprops); } }) .end(function(err) { cbnextpfp(err); }); } }); }) .end(function(err) { if (!Util.empty(err)) return cbgetpropspath(err); cbgetpropspath(null, returnPropertyList); }); } }); }; /** * Returns the HTTP range header * * This method returns null if there is no well-formed HTTP range request * header or array(start, end). * * The first number is the offset of the first byte in the range. * The second number is the offset of the last byte in the range. * * If the second offset is null, it should be treated as the offset of the * last byte of the entity. * If the first offset is null, the second offset should be used to retrieve * the last x bytes of the entity. * * return mixed */ this.getHTTPRange = function() { var range = this.httpRequest.headers["range"]; if (!range) return null; // Matching "Range: bytes=1234-5678: both numbers are optional var matches = range.match(/^bytes=([0-9]*)-([0-9]*)$/i); if (!matches || !matches.length) return null; if (matches[1] === "" && matches[2] === "") return null; return matches.slice(1).map(function(rangePart) { rangePart = parseFloat(rangePart); return isNaN(rangePart) ? null : rangePart; }); }; /** * Returns the HTTP depth header * * This method returns the contents of the HTTP depth request header. If the * depth header was 'infinity' it will return the jsDAV_Handler.DEPTH_INFINITY object * It is possible to supply a default depth value, which is used when the depth * header has invalid content, or is completely non-existant * * @param {mixed} default * @return {Number} */ this.getHTTPDepth = function(def) { def = def || jsDAV_Handler.DEPTH_INFINITY; // If its not set, we'll grab the default var depth = this.httpRequest.headers["depth"]; if (!depth) return def; if (depth == "infinity") return jsDAV_Handler.DEPTH_INFINITY; depth = parseInt(depth, 10); // If its an unknown value. we'll grab the default if (isNaN(depth)) return def; return depth; }; /** * Returns the HTTP Prefer header information. * * The prefer header is defined in: * http://tools.ietf.org/html/draft-snell-http-prefer-14 * * This method will return an array with options. * * Currently, the following options may be returned: * { * "return-asynch" : true, * "return-minimal" : true, * "return-representation" : true, * "wait" : 30, * "strict" : true, * "lenient" : true, * } * * This method also supports the Brief header, and will also return * 'return-minimal' if the brief header was set to 't'. * * For the boolean options, false will be returned if the headers are not * specified. For the integer options it will be 'null'. * * @return array */ this.getHTTPPrefer = function() { var result = { "return-asynch" : false, "return-minimal" : false, "return-representation" : false, "wait" : null, "strict" : false, "lenient" : false }; var prefer = this.httpRequest.headers.prefer; if (prefer) { prefer.split(",").map(function(item) { return Util.trim(item); }).forEach(function(parameter) { // Right now our regex only supports the tokens actually // specified in the draft. We may need to expand this if new // tokens get registered. var matches = parameter.match(/^([a-z0-9\-]+)(?:=([0-9a-z]+))?$/); var token = matches[1]; // Early RFC drafts declares return-minimal, return-asynch, etc... // Now http://tools.ietf.org/html/rfc7240 declares return=minimal, etc... if (token == "return" && matches[2]) { // Convert return=??? to return-??? for backward compatibility token = token + "-" + matches[2]; } switch(token) { case "return-asynch" : case "return-minimal" : case "return-representation" : case "strict" : case "lenient" : result[token] = true; break; case "wait" : result[token] = matches[2]; break; } }); } var brief = this.httpRequest.headers.brief; if (brief && brief == "t") result["return-minimal"] = true; return result; }; /** * This method parses the PROPFIND request and returns its information * * This will either be a list of properties, or an empty array; in which case * an {DAV:}allprop was requested. * * @param {String} body * @return {Array} */ this.parsePropfindRequest = function(body, cbpropfindreq) { // If the propfind body was empty, it means IE is requesting 'all' properties if (!body) return cbpropfindreq(null, []); Xml.loadDOMDocument(body, this.server.options.parser, function(err, oXml) { //Util.log("XML ", oXml); if (!Util.empty(err)) return cbpropfindreq(err); cbpropfindreq(null, Object.keys(Xml.parseProperties(oXml.propfind || oXml))); }); }; /** * This method parses a Proppatch request * * Proppatch changes the properties for a resource. This method * returns a list of properties. * * The keys in the returned array contain the property name (e.g.: {DAV:}displayname, * and the value contains the property value. If a property is to be removed * the value will be null. * * @param {String} body Xml body * @param {Function} cbproppatchreq Callback that is the return body of this function * @return {Object} list of properties in need of updating or deletion */ this.parseProppatchRequest = function(body, cbproppatchreq) { //We'll need to change the DAV namespace declaration to something else //in order to make it parsable var operation, innerProperties, propertyValue; var self = this; Xml.loadDOMDocument(body, this.server.options.parser, function(err, dom) { if (!Util.empty(err)) return cbproppatchreq(err); var child, propertyName; var newProperties = {}; var i = 0; var c = dom.childNodes; var l = c.length; for (; i < l; ++i) { child = c[i]; operation = Xml.toClarkNotation(child); if (!operation || operation !== "{DAV:}set" && operation !== "{DAV:}remove") continue; innerProperties = Xml.parseProperties(child, self.propertyMap); for (propertyName in innerProperties) { propertyValue = innerProperties[propertyName]; if (operation === "{DAV:}remove") propertyValue = null; newProperties[propertyName] = propertyValue; } } cbproppatchreq(null, newProperties); }); }; /** * This method updates a resource's properties * * The properties array must be a list of properties. Array-keys are * property names in clarknotation, array-values are it's values. * If a property must be deleted, the value should be null. * * Note that this request should either completely succeed, or * completely fail. * * The response is an array with statuscodes for keys, which in turn * contain arrays with propertynames. This response can be used * to generate a multistatus body. * * @param {String} uri * @param {Object} properties * @return {Object} */ this.updateProperties = function(uri, properties, cbupdateprops) { // we'll start by grabbing the node, this will throw the appropriate // exceptions if it doesn't. var props; var self = this; var remainingProperties = Util.extend({}, properties); var hasError = false; var result = {}; result[uri] = { "200" : [], "403" : [], "424" : [] }; this.getNodeForPath(uri, function(err, node) { if (!Util.empty(err)) return cbupdateprops(err); // If the node is not an instance of jsDAV_iProperties, every // property is 403 Forbidden // simply return a 405. var propertyName; if (!node.hasFeature(jsDAV_iProperties)) { hasError = true; for (propertyName in properties) Util.arrayRemove(result[uri]["403"], propertyName); remainingProperties = {}; } // Running through all properties to make sure none of them are protected if (!hasError) { for (propertyName in properties) { if (self.protectedProperties.indexOf(propertyName) > -1) { Util.arrayRemove(result[uri]["403"], propertyName); delete remainingProperties[propertyName]; hasError = true; } } } // Only if there were no errors we may attempt to update the resource if (!hasError) { node.updateProperties(properties, function(err, updateResult) { if (err) return cbupdateprops(err); remainingProperties = {}; if (updateResult === true) { // success for (propertyName in properties) Util.arrayRemove(result[uri]["200"], propertyName); } else if (updateResult === false) { // The node failed to update the properties for an // unknown reason for (propertyName in properties) Util.arrayRemove(result[uri]["403"], propertyName); } else if (typeof updateResult == "object") { // The node has detailed update information result = updateResult; } else { return cbupdateprops(new Exc.jsDAV_Exception("Invalid result from updateProperties")); } afterUpdateProperties(); }); } else afterUpdateProperties(); function afterUpdateProperties() { for (propertyName in remainingProperties) { // if there are remaining properties, it must mean // there's a dependency failure Util.arrayRemove(result[uri]["424"], propertyName); } // Removing empty array values for (var status in result[uri]) { if (!result[uri][status].length) delete result[uri][status]; } result[uri]["href"] = uri; cbupdateprops(null, result); } }); }; /** * This method is invoked by sub-systems creating a new file. * * Currently this is done by HTTP PUT and HTTP LOCK (in the Locks_Plugin). * It was important to get this done through a centralized function, * allowing plugins to intercept this using the beforeCreateFile event. * * @param {String} uri * @param {Buffer} dataOrStream. Set to `null` to use a stream * @param {String} [enc] * @return {void} */ this.createFile = function(uri, dataOrStream, enc, cbcreatefile) { var parts = Util.splitPath(uri); var dir = parts[0]; var name = parts[1]; var self = this; this.dispatchEvent("beforeBind", uri, function(stop, etag) { if (stop === true) return cbcreatefile(null, etag); self.getNodeForPath(dir, function(err, parent) { if (!Util.empty(err)) return cbcreatefile(err); self.dispatchEvent("beforeCreateFile", uri, dataOrStream, enc, parent, function(stop, etag) { if (stop === true) return cbcreatefile(null, etag); if (dataOrStream === null) { if (!parent.createFileStream) { self.getRequestBody(enc, null, false, function(err, body) { if (err) return cbcreatefile(err); parent.createFile(name, body, enc || "utf8", afterBind); }); } else parent.createFileStream(self, name, enc || "utf8", afterBind); } else { if (parent.createFileStreamRaw && dataOrStream instanceof Fs.ReadStream) parent.createFileStreamRaw(name, dataOrStream, enc || "utf8", afterBind); else parent.createFile(name, dataOrStream, enc || "utf8", afterBind); } function afterBind(err, etag) { if (!Util.empty(err)) return cbcreatefile(err); var path = Path.join(dir, name); self.markDirty(path); self.dispatchEvent("afterBind", path); cbcreatefile(null, etag); } }); }); }); }; /** * This method is invoked by sub-systems creating a new directory. * * @param {String} uri * @param {Function} cbcreatedir * @return {void} */ this.createDirectory = function(uri, cbcreatedir) { this.createCollection(uri, ["{DAV:}collection"], {}, cbcreatedir); }; /** * Use this method to create a new collection * * The {DAV:}resourcetype is specified using the resourceType array. * At the very least it must contain {DAV:}collection. * * The properties array can contain a list of additional properties. * * @param {string} uri The new uri * @param {Array} resourceType The resourceType(s) * @param {Object} properties A list of properties * @return {void} */ this.createCollection = function(uri, resourceType, properties, cbcreatecoll) { var self = this; var path = Util.splitPath(uri); var parentUri = path[0]; var newName = path[1]; // Making sure {DAV:}collection was specified as resourceType if (resourceType.indexOf("{DAV:}collection") == -1) { return cbcreatecoll(new Exc.InvalidResourceType( "The resourceType for this collection must at least include {DAV:}collection") ); } // Making sure the parent exists this.getNodeForPath(parentUri, function(err, parent) { if (!Util.empty(err)) return cbcreatecoll(new Exc.Conflict("Parent node does not exist")); // Making sure the parent is a collection if (!parent.hasFeature(jsDAV_iCollection)) return cbcreatecoll(new Exc.Conflict("Parent node is not a collection")); // Making sure the child does not already exist parent.getChild(newName, function(err, ch) { // If we got here.. it means there's already a node on that url, // and we need to throw a 405 if (typeof ch != "undefined") { return cbcreatecoll(new Exc.MethodNotAllowed( "The resource you tried to create already exists") ); } if (err && err.type != "FileNotFound") return cbcreatecoll(err); self.dispatchEvent("beforeBind", uri, function(stop) { if (stop) return cbcreatecoll(stop === true ? null : stop); // There are 2 modes of operation. The standard collection // creates the directory, and then updates properties // the extended collection can create it directly. if (parent.hasFeature(jsDAV_iExtendedCollection)) { parent.createExtendedCollection(newName, resourceType, properties, cbcreatecoll); } else { // No special resourcetypes are supported if (resourceType.length > 1) { return cbcreatecoll(new Exc.InvalidResourceType( "The {DAV:}resourcetype you specified is not supported here.") ); } parent.createDirectory(newName, function(err, res) { if (!Util.empty(err)) return cbcreatecoll(err); if (properties.length > 0) { self.updateProperties(uri, properties, function(err, errorResult) { if (err || !errorResult["200"].length) return rollback(err, errorResult); onDone(); }); } else onDone(); function rollback(exc, res) { self.server.tree.getNodeForPath(uri, function(err, node) { if (err) return cbcreatecoll(err); self.dispatchEvent("beforeUnbind", uri, function(stop) { if (stop === true) return cbcreatecoll(); node["delete"](); // Re-throwing exception cbcreatecoll(exc, err); }); }); } function onDone() { self.markDirty(parentUri); self.dispatchEvent("afterBind", uri, Path.join(parent.path, newName)); cbcreatecoll(); } }); } }); }); }); }; /** * Returns information about Copy and Move requests * * This function is created to help getting information about the source and * the destination for the WebDAV MOVE and COPY HTTP request. It also * validates a lot of information and throws proper exceptions * * The returned value is an array with the following keys: * * source - Source path * * destination - Destination path * * destinationExists - Wether or not the destination is an existing url * (and should therefore be overwritten) * * @return {Object} */ this.getCopyAndMoveInfo = function(cbcopymove) { var source, destination; try { source = this.getRequestUri(); } catch (ex) { return cbcopymove(ex); } // Collecting the relevant HTTP headers if (!this.httpRequest.headers["destination"]) return cbcopymove(new Exc.BadRequest("The destination header was not supplied")); try { destination = this.calculateUri(this.httpRequest.headers["destination"]); } catch (ex) { return cbcopymove(ex); } var overwrite = this.httpRequest.headers["overwrite"]; if (!overwrite) overwrite = "T"; if (overwrite.toUpperCase() == "T") { overwrite = true; } else if (overwrite.toUpperCase() == "F") { overwrite = false; } else { // We need to throw a bad request exception, if the header was invalid return cbcopymove(new Exc.BadRequest( "The HTTP Overwrite header should be either T or F") ); } var destinationDir = Util.splitPath(destination)[0]; var self = this; // Collection information on relevant existing nodes this.getNodeForPath(destinationDir, function(err, destinationParent) { if (!Util.empty(err)) { // If the destination parent node is not found, we throw a 409 return cbcopymove(err.type == "FileNotFound" ? new Exc.Conflict("The destination node is not found") : err); } if (!destinationParent.hasFeature(jsDAV_iCollection)) { return cbcopymove(new Exc.UnsupportedMediaType( "The destination node is not a collection") ); } self.getNodeForPath(destination, function(err, destinationNode) { // Destination didn't exist, we're all good if (!Util.empty(err)) { if (err.type == "FileNotFound") destinationNode = false; else return cbcopymove(err); } // If this succeeded, it means the destination already exists // we"ll need to throw precondition failed in case overwrite is false if (destinationNode && !overwrite) { return cbcopymove(new Exc.PreconditionFailed( "The destination node already exists, and the overwrite header is set to false", "Overwrite")); } // These are the three relevant properties we need to return cbcopymove(null, { "source" : source, "destination" : destination, "destinationExists" : !Util.empty(destinationNode), "destinationNode" : destinationNode }); }); }); }; /** * Returns a full HTTP status message for an HTTP status code * * @param {Number} code * @return {string} */ this.getStatusMessage = function(code) { code = String(code); return "HTTP/1.1 " + code + " " + jsDAV_Handler.STATUS_MAP[code]; }; }).call(jsDAV_Handler.prototype = new AsyncEventEmitter());
/* */ System.register(['core-js', './state', './segments'], function (_export) { var core, State, StaticSegment, DynamicSegment, StarSegment, EpsilonSegment, _classCallCheck, RouteRecognizer, RecognizeResults; function parse(route, names, types) { if (route.charAt(0) === '/') { route = route.substr(1); } var results = []; for (var _iterator3 = route.split('/'), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { var _ref3; if (_isArray3) { if (_i3 >= _iterator3.length) break; _ref3 = _iterator3[_i3++]; } else { _i3 = _iterator3.next(); if (_i3.done) break; _ref3 = _i3.value; } var segment = _ref3; var match = undefined; if (match = segment.match(/^:([^\/]+)$/)) { results.push(new DynamicSegment(match[1])); names.push(match[1]); types.dynamics++; } else if (match = segment.match(/^\*([^\/]+)$/)) { results.push(new StarSegment(match[1])); names.push(match[1]); types.stars++; } else if (segment === '') { results.push(new EpsilonSegment()); } else { results.push(new StaticSegment(segment)); types.statics++; } } return results; } function sortSolutions(states) { return states.sort(function (a, b) { if (a.types.stars !== b.types.stars) { return a.types.stars - b.types.stars; } if (a.types.stars) { if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; } if (a.types.dynamics !== b.types.dynamics) { return b.types.dynamics - a.types.dynamics; } } if (a.types.dynamics !== b.types.dynamics) { return a.types.dynamics - b.types.dynamics; } if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; } return 0; }); } function recognizeChar(states, ch) { var nextStates = []; for (var i = 0, l = states.length; i < l; i++) { var state = states[i]; nextStates = nextStates.concat(state.match(ch)); } return nextStates; } function findHandler(state, path, queryParams) { var handlers = state.handlers, regex = state.regex; var captures = path.match(regex), currentCapture = 1; var result = new RecognizeResults(queryParams); for (var i = 0, l = handlers.length; i < l; i++) { var handler = handlers[i], names = handler.names, params = {}; for (var j = 0, m = names.length; j < m; j++) { params[names[j]] = captures[currentCapture++]; } result.push({ handler: handler.handler, params: params, isDynamic: !!names.length }); } return result; } function addSegment(currentState, segment) { segment.eachChar(function (ch) { currentState = currentState.put(ch); }); return currentState; } return { setters: [function (_coreJs) { core = _coreJs['default']; }, function (_state) { State = _state.State; }, function (_segments) { StaticSegment = _segments.StaticSegment; DynamicSegment = _segments.DynamicSegment; StarSegment = _segments.StarSegment; EpsilonSegment = _segments.EpsilonSegment; }], execute: function () { 'use strict'; _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; RouteRecognizer = (function () { function RouteRecognizer() { _classCallCheck(this, RouteRecognizer); this.rootState = new State(); this.names = {}; } RouteRecognizer.prototype.add = function add(route) { if (Array.isArray(route)) { for (var _iterator = route, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } var r = _ref; this.add(r); } return; } var currentState = this.rootState, regex = '^', types = { statics: 0, dynamics: 0, stars: 0 }, names = [], routeName = route.handler.name, isEmpty = true; var segments = parse(route.path, names, types); for (var _iterator2 = segments, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { var _ref2; if (_isArray2) { if (_i2 >= _iterator2.length) break; _ref2 = _iterator2[_i2++]; } else { _i2 = _iterator2.next(); if (_i2.done) break; _ref2 = _i2.value; } var segment = _ref2; if (segment instanceof EpsilonSegment) { continue; } isEmpty = false; currentState = currentState.put({ validChars: '/' }); regex += '/'; currentState = addSegment(currentState, segment); regex += segment.regex(); } if (isEmpty) { currentState = currentState.put({ validChars: '/' }); regex += '/'; } var handlers = [{ handler: route.handler, names: names }]; if (routeName) { this.names[routeName] = { segments: segments, handlers: handlers }; } currentState.handlers = handlers; currentState.regex = new RegExp(regex + '$'); currentState.types = types; return currentState; }; RouteRecognizer.prototype.handlersFor = function handlersFor(name) { var route = this.names[name], result = []; if (!route) { throw new Error('There is no route named ' + name); } for (var i = 0, l = route.handlers.length; i < l; i++) { result.push(route.handlers[i]); } return result; }; RouteRecognizer.prototype.hasRoute = function hasRoute(name) { return !!this.names[name]; }; RouteRecognizer.prototype.generate = function generate(name, params) { params = Object.assign({}, params); var route = this.names[name], consumed = {}, output = ''; if (!route) { throw new Error('There is no route named ' + name); } var segments = route.segments; for (var i = 0, l = segments.length; i < l; i++) { var segment = segments[i]; if (segment instanceof EpsilonSegment) { continue; } output += '/'; var segmentValue = segment.generate(params, consumed); if (segmentValue === null || segmentValue === undefined) { throw new Error('A value is required for route parameter \'' + segment.name + '\' in route \'' + name + '\'.'); } output += segmentValue; } if (output.charAt(0) !== '/') { output = '/' + output; } for (var param in consumed) { delete params[param]; } output += this.generateQueryString(params); return output; }; RouteRecognizer.prototype.generateQueryString = function generateQueryString(params) { var pairs = [], keys = [], encode = encodeURIComponent; for (var key in params) { if (params.hasOwnProperty(key)) { keys.push(key); } } keys.sort(); for (var i = 0, len = keys.length; i < len; i++) { key = keys[i]; var value = params[key]; if (value === null || value === undefined) { continue; } if (Array.isArray(value)) { var arrayKey = '' + encode(key) + '[]'; for (var j = 0, l = value.length; j < l; j++) { pairs.push('' + arrayKey + '=' + encode(value[j])); } } else { pairs.push('' + encode(key) + '=' + encode(value)); } } if (pairs.length === 0) { return ''; } return '?' + pairs.join('&'); }; RouteRecognizer.prototype.parseQueryString = function parseQueryString(queryString) { var queryParams = {}; if (!queryString || typeof queryString !== 'string') { return queryParams; } if (queryString.charAt(0) === '?') { queryString = queryString.substr(1); } var pairs = queryString.split('&'); for (var i = 0; i < pairs.length; i++) { var pair = pairs[i].split('='), key = decodeURIComponent(pair[0]), keyLength = key.length, isArray = false, value; if (!key) { continue; } else if (pair.length === 1) { value = true; } else { if (keyLength > 2 && key.slice(keyLength - 2) === '[]') { isArray = true; key = key.slice(0, keyLength - 2); if (!queryParams[key]) { queryParams[key] = []; } } value = pair[1] ? decodeURIComponent(pair[1]) : ''; } if (isArray) { queryParams[key].push(value); } else { queryParams[key] = value; } } return queryParams; }; RouteRecognizer.prototype.recognize = function recognize(path) { var states = [this.rootState], pathLen, i, l, queryStart, queryParams = {}, isSlashDropped = false; queryStart = path.indexOf('?'); if (queryStart !== -1) { var queryString = path.substr(queryStart + 1, path.length); path = path.substr(0, queryStart); queryParams = this.parseQueryString(queryString); } path = decodeURI(path); if (path.charAt(0) !== '/') { path = '/' + path; } pathLen = path.length; if (pathLen > 1 && path.charAt(pathLen - 1) === '/') { path = path.substr(0, pathLen - 1); isSlashDropped = true; } for (i = 0, l = path.length; i < l; i++) { states = recognizeChar(states, path.charAt(i)); if (!states.length) { break; } } var solutions = []; for (i = 0, l = states.length; i < l; i++) { if (states[i].handlers) { solutions.push(states[i]); } } states = sortSolutions(solutions); var state = solutions[0]; if (state && state.handlers) { if (isSlashDropped && state.regex.source.slice(-5) === '(.+)$') { path = path + '/'; } return findHandler(state, path, queryParams); } }; return RouteRecognizer; })(); _export('RouteRecognizer', RouteRecognizer); RecognizeResults = function RecognizeResults(queryParams) { _classCallCheck(this, RecognizeResults); this.splice = Array.prototype.splice; this.slice = Array.prototype.slice; this.push = Array.prototype.push; this.length = 0; this.queryParams = queryParams || {}; }; } }; });
var pizza = 'pizza is alright'; pizza = pizza.replace('alright', 'wonderful'); console.log(pizza);
/* * grunt-bless * https://github.com/Ponginae/grunt-bless * * Copyright (c) 2013 Aki Alexandra Nofftz * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON( "../package.json" ), // Configuration to be run (and then tested). bless: { default_options: { options: {}, files: { 'tmp/above-limit.css': 'input/above-limit.css' } }, custom_options: { options: { banner: '/* This file has been blessed by <%= pkg.name %> v<%= pkg.version %> */', compress: true }, files: { 'tmp/below-limit.css': 'input/below-limit.css' } }, sourcemaps: { options: { sourceMaps: true }, files: { 'tmp/above-limit.css': 'input/above-limit.css' } }, // Just counting files with logging, without write check: { options: { logCount: true }, src: [ 'test/input/*.css' ] }, // This issue was discovered while investigating Issue #14, the force // option is not implemented by the bless parser. A custom force // implementation was added in version 0.2.0. // // This test should normally fail. issue_fourteen: { options: { compress: true, force: false }, files: { 'test/input/above-limit.css': 'test/input/above-limit.css' } } }, }); // Actually load this plugin's task(s). grunt.loadTasks('../tasks'); grunt.registerTask('all', ['bless']); // By default, lint and run all tests. grunt.registerTask('default', ['bless:default_options', 'bless:custom_options', 'bless:check', 'bless:sourcemaps']); };
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['sap/m/semantic/SemanticButton'],function(S){"use strict";var a=S.extend("sap.m.semantic.SendEmailAction",{});return a;},true);
define(["knockout", "service!taskever/user"], function (ko, userService) { var currentUser = ko.mapping.fromJS({}); var start = function () { return userService.getCurrentUserInfo({ }).done(function(data) { ko.mapping.fromJS(data.user, currentUser); }); }; return { start: start, getCurrentUser: function () { return currentUser; } }; });
'use strict'; const assert = require('./../../assert'); const common = require('./../../common'); let battle; describe('Truant', function () { afterEach(function () { battle.destroy(); }); it('should prevent the user from acting the turn after using a move', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', moves: ['scratch']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', moves: ['endure']}]}); let pokemon = battle.p2.active[0]; assert.hurts(pokemon, () => battle.makeChoices()); assert.false.hurts(pokemon, () => battle.makeChoices()); }); it('should allow the user to act after a recharge turn', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', moves: ['hyperbeam']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', moves: ['endure']}]}); let pokemon = battle.p2.active[0]; assert.hurts(pokemon, () => battle.makeChoices()); assert.false.hurts(pokemon, () => battle.makeChoices()); assert.hurts(pokemon, () => battle.makeChoices()); }); it('should not allow the user to act the turn it wakes up, if it moved the turn it fell asleep', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', moves: ['scratch', 'rest']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', moves: ['endure', 'quickattack']}]}); let pokemon = battle.p2.active[0]; battle.makeChoices('move rest', 'move quickattack'); assert.false.hurts(pokemon, () => battle.makeChoices('move scratch', 'move endure'), 'Attacked on turn 1 of sleep'); assert.false.hurts(pokemon, () => battle.makeChoices('move scratch', 'move endure'), 'Attacked on turn 2 of sleep'); assert.false.hurts(pokemon, () => battle.makeChoices('move scratch', 'move endure'), 'Attacked after waking up'); }); it('should allow the user to act the turn it wakes up, if it was loafing the turn it fell asleep', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', moves: ['scratch', 'irondefense']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', moves: ['endure', 'spore']}]}); let user = battle.p1.active[0]; let pokemon = battle.p2.active[0]; battle.makeChoices('move irondefense', 'move endure'); battle.makeChoices('move irondefense', 'move spore'); while (user.status === 'slp') { assert.fullHP(pokemon); battle.makeChoices('move scratch', 'move endure'); } assert.false.fullHP(pokemon); }); it('should cause two-turn moves to fail', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', moves: ['razorwind']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', moves: ['endure']}]}); let pokemon = battle.p2.active[0]; assert.false.hurts(pokemon, () => battle.makeChoices()); assert.false.hurts(pokemon, () => battle.makeChoices()); }); it('should prevent a newly-Mega Evolved Pokemon from acting if given the ability', function () { battle = common.createBattle(); battle.setPlayer('p1', {team: [{species: "Slaking", ability: 'truant', item: 'choicescarf', moves: ['entrainment']}]}); battle.setPlayer('p2', {team: [{species: "Steelix", ability: 'sturdy', item: 'steelixite', moves: ['heavyslam']}]}); assert.false.hurts(battle.p1.active[0], () => battle.makeChoices('move entrainment', 'move heavyslam mega')); }); });
import Base from './base'; class Award extends Base { _type = 'Award'; } export default Award;
// defer script // By Theodoor van Donge Modernizr.addTest('scriptdefer', 'defer' in document.createElement('script'));
import React from 'react' import { createDevTools } from 'redux-devtools' import LogMonitor from 'redux-devtools-log-monitor' import DockMonitor from 'redux-devtools-dock-monitor' export default createDevTools( <DockMonitor toggleVisibilityKey="ctrl-H" changePositionKey="ctrl-Q"> <LogMonitor /> </DockMonitor> )
export interface Environment1 extends GenericEnvironment< SomeType, AnotherType, YetAnotherType, > { m(): void; }; export class Environment2 extends GenericEnvironment< SomeType, AnotherType, YetAnotherType, DifferentType1, DifferentType2, DifferentType3, DifferentType4, > { m() {}; }; // Declare Interface Break declare interface ExtendsOne extends ASingleInterface { x: string; } declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { x: string; } declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { x: string; } // Interface declaration break interface ExtendsOne extends ASingleInterface { x: string; } interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { x: string; } interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { s: string; } // Generic Types interface ExtendsOne extends ASingleInterface<string> { x: string; } interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { x: string; } interface ExtendsMany extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { x: string; } interface ExtendsManyWithGenerics extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { x: string; } export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {}
var mysql = require('mysql'); var _ = require('underscore'); _.str = require('underscore.string'); var utils = require('./utils'); var sql = { // Convert mysql format to standard javascript object normalizeSchema: function (schema) { return _.reduce(schema, function(memo, field) { // Marshal mysql DESCRIBE to waterline collection semantics var attrName = field.Field; var type = field.Type; // Remove (n) column-size indicators type = type.replace(/\([0-9]+\)$/,''); memo[attrName] = { type: type, defaultsTo: field.Default, autoIncrement: field.Extra === 'auto_increment' }; if(field.primaryKey) { memo[attrName].primaryKey = field.primaryKey; } if(field.unique) { memo[attrName].unique = field.unique; } if(field.indexed) { memo[attrName].indexed = field.indexed; } return memo; }, {}); }, // @returns ALTER query for adding a column addColumn: function (collectionName, attrName, attrDef) { // Escape table name and attribute name var tableName = mysql.escapeId(collectionName); // sails.log.verbose("ADDING ",attrName, "with",attrDef); // Build column definition var columnDefinition = sql._schema(collectionName, attrDef, attrName); return 'ALTER TABLE ' + tableName + ' ADD ' + columnDefinition; }, // @returns ALTER query for dropping a column removeColumn: function (collectionName, attrName) { // Escape table name and attribute name var tableName = mysql.escapeId(collectionName); attrName = mysql.escapeId(attrName); return 'ALTER TABLE ' + tableName + ' DROP COLUMN ' + attrName; }, selectQuery: function (collectionName, options) { // Escape table name var tableName = mysql.escapeId(collectionName); // Build query var query = utils.buildSelectStatement(options, collectionName); return query += sql.serializeOptions(collectionName, options); }, insertQuery: function (collectionName, data) { // Escape table name var tableName = mysql.escapeId(collectionName); // Build query return 'INSERT INTO ' + tableName + ' ' + '(' + sql.attributes(collectionName, data) + ')' + ' VALUES (' + sql.values(collectionName, data) + ')'; }, // Create a schema csv for a DDL query schema: function(collectionName, attributes) { return sql.build(collectionName, attributes, sql._schema); }, _schema: function(collectionName, attribute, attrName) { attrName = mysql.escapeId(attrName); var type = sqlTypeCast(attribute); // Process PK field if(attribute.primaryKey) { // If type is an integer, set auto increment if(type === 'INT') { return attrName + ' ' + type + ' NOT NULL AUTO_INCREMENT PRIMARY KEY'; } // Just set NOT NULL on other types return attrName + ' VARCHAR(255) NOT NULL PRIMARY KEY'; } // Process UNIQUE field if(attribute.unique) { return attrName + ' ' + type + ' UNIQUE KEY'; } return attrName + ' ' + type + ' '; }, // Create an attribute csv for a DQL query attributes: function(collectionName, attributes) { return sql.build(collectionName, attributes, sql.prepareAttribute); }, // Create a value csv for a DQL query // key => optional, overrides the keys in the dictionary values: function(collectionName, values, key) { return sql.build(collectionName, values, sql.prepareValue, ', ', key); }, updateCriteria: function(collectionName, values) { var query = sql.build(collectionName, values, sql.prepareCriterion); query = query.replace(/IS NULL/g, '=NULL'); return query; }, prepareCriterion: function(collectionName, value, key, parentKey) { // Special sub-attr case if (validSubAttrCriteria(value)) { return sql.where(collectionName, value, null, key); } // Build escaped attr and value strings using either the key, // or if one exists, the parent key var attrStr, valueStr; // Special comparator case if (parentKey) { attrStr = sql.prepareAttribute(collectionName, value, parentKey); valueStr = sql.prepareValue(collectionName, value, parentKey); // Why don't we strip you out of those bothersome apostrophes? var nakedButClean = _.str.trim(valueStr,'\''); if (key === '<' || key === 'lessThan') return attrStr + '<' + valueStr; else if (key === '<=' || key === 'lessThanOrEqual') return attrStr + '<=' + valueStr; else if (key === '>' || key === 'greaterThan') return attrStr + '>' + valueStr; else if (key === '>=' || key === 'greaterThanOrEqual') return attrStr + '>=' + valueStr; else if (key === '!' || key === 'not') { if (value === null) return attrStr + ' IS NOT NULL'; else if (_.isArray(value)) return attrStr + ' NOT IN(' + valueStr + ')'; else return attrStr + '<>' + valueStr; } else if (key === 'like') return attrStr + ' LIKE \'' + nakedButClean + '\''; else if (key === 'contains') return attrStr + ' LIKE \'%' + nakedButClean + '%\''; else if (key === 'startsWith') return attrStr + ' LIKE \'' + nakedButClean + '%\''; else if (key === 'endsWith') return attrStr + ' LIKE \'%' + nakedButClean + '\''; else throw new Error('Unknown comparator: ' + key); } else { attrStr = sql.prepareAttribute(collectionName, value, key); valueStr = sql.prepareValue(collectionName, value, key); // Special IS NULL case if (_.isNull(value)) { return attrStr + " IS NULL"; } else return attrStr + "=" + valueStr; } }, prepareValue: function(collectionName, value, attrName) { // Cast dates to SQL if (_.isDate(value)) { value = toSqlDate(value); } // Cast functions to strings if (_.isFunction(value)) { value = value.toString(); } // Escape (also wraps in quotes) return mysql.escape(value); }, prepareAttribute: function(collectionName, value, attrName) { return mysql.escapeId(attrName); }, // Starting point for predicate evaluation // parentKey => if set, look for comparators and apply them to the parent key where: function(collectionName, where, key, parentKey) { return sql.build(collectionName, where, sql.predicate, ' AND ', undefined, parentKey); }, // Recursively parse a predicate calculus and build a SQL query predicate: function(collectionName, criterion, key, parentKey) { var queryPart = ''; if (parentKey) { return sql.prepareCriterion(collectionName, criterion, key, parentKey); } // OR if (key.toLowerCase() === 'or') { queryPart = sql.build(collectionName, criterion, sql.where, ' OR '); return ' ( ' + queryPart + ' ) '; } // AND else if (key.toLowerCase() === 'and') { queryPart = sql.build(collectionName, criterion, sql.where, ' AND '); return ' ( ' + queryPart + ' ) '; } // IN else if (_.isArray(criterion)) { queryPart = sql.prepareAttribute(collectionName, null, key) + " IN (" + sql.values(collectionName, criterion, key) + ")"; return queryPart; } // LIKE else if (key.toLowerCase() === 'like') { return sql.build(collectionName, criterion, function(collectionName, value, attrName) { var attrStr = sql.prepareAttribute(collectionName, value, attrName); // TODO: Handle regexp criterias if (_.isRegExp(value)) { throw new Error('RegExp LIKE criterias not supported by the MySQLAdapter yet. Please contribute @ http://github.com/balderdashy/sails-mysql'); } var valueStr = sql.prepareValue(collectionName, value, attrName); // Handle escaped percent (%) signs [encoded as %%%] valueStr = valueStr.replace(/%%%/g, '\\%'); return attrStr + " LIKE " + valueStr; }, ' AND '); } // NOT else if (key.toLowerCase() === 'not') { throw new Error('NOT not supported yet!'); } // Basic criteria item else { return sql.prepareCriterion(collectionName, criterion, key); } }, serializeOptions: function(collectionName, options) { var queryPart = ''; if (options.where) { queryPart += 'WHERE ' + sql.where(collectionName, options.where) + ' '; } if (options.groupBy) { queryPart += 'GROUP BY '; // Normalize to array if(!Array.isArray(options.groupBy)) options.groupBy = [options.groupBy]; options.groupBy.forEach(function(key) { queryPart += key + ', '; }); // Remove trailing comma queryPart = queryPart.slice(0, -2) + ' '; } if (options.sort) { queryPart += 'ORDER BY '; // Sort through each sort attribute criteria _.each(options.sort, function(direction, attrName) { queryPart += sql.prepareAttribute(collectionName, null, attrName) + ' '; // Basic MongoDB-style numeric sort direction if (direction === 1) { queryPart += 'ASC, '; } else { queryPart += 'DESC, '; } }); // Remove trailing comma if(queryPart.slice(-2) === ', ') { queryPart = queryPart.slice(0, -2) + ' '; } } if (options.limit) { queryPart += 'LIMIT ' + options.limit + ' '; } if (options.skip) { // Some MySQL hackery here. For details, see: // http://stackoverflow.com/questions/255517/mysql-offset-infinite-rows if (!options.limit) { queryPart += 'LIMIT 18446744073709551610 '; } queryPart += 'OFFSET ' + options.skip + ' '; } return queryPart; }, // Put together the CSV aggregation // separator => optional, defaults to ', ' // keyOverride => optional, overrides the keys in the dictionary // (used for generating value lists in IN queries) // parentKey => key of the parent to this object build: function(collectionName, collection, fn, separator, keyOverride, parentKey) { separator = separator || ', '; var $sql = ''; _.each(collection, function(value, key) { $sql += fn(collectionName, value, keyOverride || key, parentKey); // (always append separator) $sql += separator; }); // (then remove final one) return _.str.rtrim($sql, separator); } }; // Cast waterline types into SQL data types function sqlTypeCast(attr) { var type = attr.type; type = type && type.toLowerCase(); switch (type) { case 'string': { var size = 255; // By default. // If attr.size is positive integer, use it as size of varchar. if(!isNaN(attr.size) && (parseInt(attr.size) == parseFloat(attr.size)) && (parseInt(attr.size) > 0)) size = attr.size; return 'VARCHAR(' + size + ')'; } case 'text': case 'array': case 'json': return 'TEXT'; case 'boolean': return 'BOOL'; case 'int': case 'integer': return 'INT'; case 'float': case 'double': return 'FLOAT'; case 'date': return 'DATE'; case 'datetime': return 'DATETIME'; case 'time': return 'TIME'; default: console.error("Unregistered type given: " + type); return "TEXT"; } } function wrapInQuotes(val) { return '"' + val + '"'; } function toSqlDate(date) { date = date.getUTCFullYear() + '-' + ('00' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('00' + date.getUTCDate()).slice(-2) + ' ' + ('00' + date.getUTCHours()).slice(-2) + ':' + ('00' + date.getUTCMinutes()).slice(-2) + ':' + ('00' + date.getUTCSeconds()).slice(-2); return date; } // Return whether this criteria is valid as an object inside of an attribute function validSubAttrCriteria(c) { return _.isObject(c) && ( !_.isUndefined(c.not) || !_.isUndefined(c.greaterThan) || !_.isUndefined(c.lessThan) || !_.isUndefined(c.greaterThanOrEqual) || !_.isUndefined(c.lessThanOrEqual) || !_.isUndefined(c['<']) || !_.isUndefined(c['<=']) || !_.isUndefined(c['!']) || !_.isUndefined(c['>']) || !_.isUndefined(c['>=']) || !_.isUndefined(c.startsWith) || !_.isUndefined(c.endsWith) || !_.isUndefined(c.contains) || !_.isUndefined(c.like)); } module.exports = sql;
module.exports = { name: 'ember-masonry-grid', description: 'Add ember-masonry-grid bower dependencies to app.', normalizeEntityName: function () { }, afterInstall: function () { return this.addBowerPackagesToProject([ { name: 'jquery-masonry' }, { name: 'imagesloaded' } ]); } };
exports.worker = function (task, config) { var input = JSON.parse(task.config.input); task.respondCompleted({ _OUTPUT: input._INPUT.reverse() }); };
/* Ratings and how they work: -2: Extremely detrimental The sort of ability that relegates Pokemon with Uber-level BSTs into NU. ex. Slow Start, Truant -1: Detrimental An ability that does more harm than good. ex. Defeatist, Normalize 0: Useless An ability with no net effect on a Pokemon during a battle. ex. Pickup, Illuminate 1: Ineffective An ability that has a minimal effect. Should never be chosen over any other ability. ex. Damp, Shell Armor 2: Situationally useful An ability that can be useful in certain situations. ex. Blaze, Insomnia 3: Useful An ability that is generally useful. ex. Volt Absorb, Iron Fist 4: Very useful One of the most popular abilities. The difference between 3 and 4 can be ambiguous. ex. Technician, Protean 5: Essential The sort of ability that defines metagames. ex. Drizzle, Shadow Tag */ exports.BattleAbilities = { "adaptability": { desc: "This Pokemon's attacks that receive STAB (Same Type Attack Bonus) are increased from 50% to 100%.", shortDesc: "This Pokemon's same-type attack bonus (STAB) is increased from 1.5x to 2x.", onModifyMove: function (move) { move.stab = 2; }, id: "adaptability", name: "Adaptability", rating: 3.5, num: 91 }, "aftermath": { desc: "If a contact move knocks out this Pokemon, the opponent receives damage equal to one-fourth of its max HP.", shortDesc: "If this Pokemon is KOed with a contact move, that move's user loses 1/4 its max HP.", id: "aftermath", name: "Aftermath", onFaint: function (target, source, effect) { if (effect && effect.effectType === 'Move' && effect.isContact && source) { this.damage(source.maxhp / 4, source, target); } }, rating: 3, num: 106 }, "aerilate": { desc: "Turns all of this Pokemon's Normal-typed attacks into Flying-type and deal 1.3x damage. Does not affect Hidden Power.", shortDesc: "This Pokemon's Normal moves become Flying-type and do 1.3x damage.", onModifyMove: function (move, pokemon) { if (move.type === 'Normal' && move.id !== 'hiddenpower') { move.type = 'Flying'; pokemon.addVolatile('aerilate'); } }, effect: { duration: 1, onBasePowerPriority: 8, onBasePower: function (basePower, pokemon, target, move) { return this.chainModify([0x14CD, 0x1000]); } }, id: "aerilate", name: "Aerilate", rating: 3, num: -6, gen: 6 }, "airlock": { desc: "While this Pokemon is active, all weather conditions and their effects are disabled.", shortDesc: "While this Pokemon is active, all weather conditions and their effects are disabled.", onStart: function (pokemon) { this.add('-message', 'The effects of weather disappeared. (placeholder)'); }, onAnyModifyPokemon: function (pokemon) { pokemon.ignore['WeatherTarget'] = true; }, onAnyTryWeather: false, id: "airlock", name: "Air Lock", rating: 3, num: 76 }, "analytic": { desc: "If the user moves last, the power of that move is increased by 30%.", shortDesc: "This Pokemon's attacks do 1.3x damage if it is the last to move in a turn.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (!this.willMove(defender)) { this.debug('Analytic boost'); return this.chainModify([0x14CD, 0x1000]); // The Analytic modifier is slightly higher than the normal 1.3 (0x14CC) } }, id: "analytic", name: "Analytic", rating: 1, num: 148 }, "angerpoint": { desc: "If this Pokemon, or its Substitute, is struck by a Critical Hit, its Attack is boosted to six stages.", shortDesc: "If this Pokemon (not a Substitute) is hit by a critical hit, its Attack is boosted by 12.", onCriticalHit: function (target) { if (!target.volatiles['substitute']) { target.setBoost({atk: 6}); this.add('-setboost', target, 'atk', 12, '[from] ability: Anger Point'); } }, id: "angerpoint", name: "Anger Point", rating: 2, num: 83 }, "anticipation": { desc: "A warning is displayed if an opposing Pokemon has the moves Fissure, Guillotine, Horn Drill, Sheer Cold, or any attacking move from a type that is considered super effective against this Pokemon (including Counter, Mirror Coat, and Metal Burst). Hidden Power, Judgment, Natural Gift and Weather Ball are considered Normal-type moves. Flying Press is considered a Fighting-type move.", shortDesc: "On switch-in, this Pokemon shudders if any foe has a super effective or OHKO move.", onStart: function (pokemon) { var targets = pokemon.side.foe.active; for (var i = 0; i < targets.length; i++) { if (!targets[i] || targets[i].fainted) continue; for (var j = 0; j < targets[i].moveset.length; j++) { var move = this.getMove(targets[i].moveset[j].move); if (move.category !== 'Status' && (this.getImmunity(move.type, pokemon) && this.getEffectiveness(move.type, pokemon) > 0 || move.ohko)) { this.add('-message', pokemon.name + ' shuddered! (placeholder)'); return; } } } }, id: "anticipation", name: "Anticipation", rating: 1, num: 107 }, "arenatrap": { desc: "When this Pokemon enters the field, its opponents cannot switch or flee the battle unless they are part Flying-type, have the Levitate ability, are holding Shed Shell, or they use the moves Baton Pass or U-Turn. Flying-type and Levitate Pokemon cannot escape if they are holding Iron Ball or Gravity is in effect. Levitate Pokemon also cannot escape if their ability is disabled through other means, such as Skill Swap or Gastro Acid.", shortDesc: "Prevents foes from switching out normally unless they have immunity to Ground.", onFoeModifyPokemon: function (pokemon) { if (pokemon.runImmunity('Ground', false)) { pokemon.tryTrap(); } }, onFoeMaybeTrapPokemon: function (pokemon) { if (pokemon.runImmunity('Ground', false)) { pokemon.maybeTrapped = true; } }, id: "arenatrap", name: "Arena Trap", rating: 5, num: 71 }, "aromaveil": { desc: "Protects allies from attacks that limit their move choices.", shortDesc: "Protects allies from attacks that limit their move choices.", onAllyTryHit: function (target, source, move) { if (move && move.id in {disable:1, encore:1, healblock:1, imprison:1, taunt:1, torment:1}) { return false; } }, id: "aromaveil", name: "Aroma Veil", rating: 3, num: -6, gen: 6 }, "aurabreak": { desc: "Reverses the effect of Dark Aura and Fairy Aura.", shortDesc: "Reverses the effect of Aura abilities.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Aura Break'); }, id: "aurabreak", name: "Aura Break", rating: 2, num: -6, gen: 6 }, "baddreams": { desc: "If asleep, each of this Pokemon's opponents receives damage equal to one-eighth of its max HP.", shortDesc: "Causes sleeping adjacent foes to lose 1/8 of their max HP at the end of each turn.", onResidualOrder: 26, onResidualSubOrder: 1, onResidual: function (pokemon) { if (!pokemon.hp) return; for (var i = 0; i < pokemon.side.foe.active.length; i++) { var target = pokemon.side.foe.active[i]; if (!target || !target.hp) continue; if (target.status === 'slp') { this.damage(target.maxhp / 8, target); } } }, id: "baddreams", name: "Bad Dreams", rating: 2, num: 123 }, "battlearmor": { desc: "Critical Hits cannot strike this Pokemon.", shortDesc: "This Pokemon cannot be struck by a critical hit.", onCriticalHit: false, id: "battlearmor", name: "Battle Armor", rating: 1, num: 4 }, "bigpecks": { desc: "Prevents the Pokemon's Defense stat from being reduced.", shortDesc: "Prevents other Pokemon from lowering this Pokemon's Defense.", onBoost: function (boost, target, source, effect) { if (source && target === source) return; if (boost['def'] && boost['def'] < 0) { boost['def'] = 0; if (!effect.secondaries) this.add("-fail", target, "unboost", "Defense", "[from] ability: Big Pecks", "[of] " + target); } }, id: "bigpecks", name: "Big Pecks", rating: 1, num: 145 }, "blaze": { desc: "When its health reaches one-third or less of its max HP, this Pokemon's Fire-type attacks receive a 50% boost in power.", shortDesc: "When this Pokemon has 1/3 or less of its max HP, its Fire attacks do 1.5x damage.", onModifyAtkPriority: 5, onModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Fire' && attacker.hp <= attacker.maxhp / 3) { this.debug('Blaze boost'); return this.chainModify(1.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Fire' && attacker.hp <= attacker.maxhp / 3) { this.debug('Blaze boost'); return this.chainModify(1.5); } }, id: "blaze", name: "Blaze", rating: 2, num: 66 }, "bulletproof": { desc: "This Pokemon is protected from some Ball and Bomb moves.", shortDesc: "This Pokemon is protected from ball and bomb moves.", onTryHit: function (pokemon, target, move) { if (move.isBullet) { this.add('-immune', pokemon, '[msg]', '[from] Bulletproof'); return null; } }, id: "bulletproof", name: "Bulletproof", rating: 3, num: -6, gen: 6 }, "cheekpouch": { desc: "Restores HP when this Pokemon consumes a berry.", shortDesc: "Restores HP when this Pokemon consumes a berry.", onEatItem: function (item, pokemon) { this.heal(pokemon.maxhp / 4); }, id: "cheekpouch", name: "Cheek Pouch", rating: 2, num: -6, gen: 6 }, "chlorophyll": { desc: "If this Pokemon is active while Sunny Day is in effect, its speed is temporarily doubled.", shortDesc: "If Sunny Day is active, this Pokemon's Speed is doubled.", onModifySpe: function (speMod) { if (this.isWeather('sunnyday')) { return this.chain(speMod, 2); } }, id: "chlorophyll", name: "Chlorophyll", rating: 2, num: 34 }, "clearbody": { desc: "Opponents cannot reduce this Pokemon's stats; they can, however, modify stat changes with Power Swap, Guard Swap and Heart Swap and inflict stat boosts with Swagger and Flatter. This ability does not prevent self-inflicted stat reductions.", shortDesc: "Prevents other Pokemon from lowering this Pokemon's stat stages.", onBoost: function (boost, target, source, effect) { if (source && target === source) return; var showMsg = false; for (var i in boost) { if (boost[i] < 0) { delete boost[i]; showMsg = true; } } if (showMsg && !effect.secondaries) this.add("-fail", target, "unboost", "[from] ability: Clear Body", "[of] " + target); }, id: "clearbody", name: "Clear Body", rating: 2, num: 29 }, "cloudnine": { desc: "While this Pokemon is active, all weather conditions and their effects are disabled.", shortDesc: "While this Pokemon is active, all weather conditions and their effects are disabled.", onStart: function (pokemon) { this.add('-message', 'The effects of weather disappeared. (placeholder)'); }, onAnyModifyPokemon: function (pokemon) { pokemon.ignore['WeatherTarget'] = true; }, onAnyTryWeather: false, id: "cloudnine", name: "Cloud Nine", rating: 3, num: 13 }, "colorchange": { desc: "This Pokemon's type changes according to the type of the last move that hit this Pokemon.", shortDesc: "This Pokemon's type changes to match the type of the last move that hit it.", onAfterMoveSecondary: function (target, source, move) { if (target.isActive && move && move.effectType === 'Move' && move.category !== 'Status') { if (!target.hasType(move.type)) { if (!target.setType(move.type)) return false; this.add('-start', target, 'typechange', move.type, '[from] Color Change'); target.update(); } } }, id: "colorchange", name: "Color Change", rating: 2, num: 16 }, "competitive": { desc: "Raises the user's Special Attack stat by two stages when a stat is lowered, including the Special Attack stat. This does not include self-induced stat drops like those from Close Combat.", shortDesc: "This Pokemon's SpAtk is boosted by 2 for each of its stats that is lowered by a foe.", onAfterEachBoost: function (boost, target, source) { if (!source || target.side === source.side) { return; } var statsLowered = false; for (var i in boost) { if (boost[i] < 0) { statsLowered = true; } } if (statsLowered) { this.boost({spa: 2}); } }, id: "competitive", name: "Competitive", rating: 2, num: -6, gen: 6 }, "compoundeyes": { desc: "The accuracy of this Pokemon's moves receives a 30% increase; for example, a 75% accurate move becomes 97.5% accurate.", shortDesc: "This Pokemon's moves have their accuracy boosted to 1.3x.", onModifyMove: function (move) { if (typeof move.accuracy !== 'number') return; this.debug('compoundeyes - enhancing accuracy'); move.accuracy *= 1.3; }, id: "compoundeyes", name: "Compound Eyes", rating: 3.5, num: 14 }, "contrary": { desc: "Stat changes are inverted.", shortDesc: "If this Pokemon has a stat boosted it is lowered instead, and vice versa.", onBoost: function (boost) { for (var i in boost) { boost[i] *= -1; } }, id: "contrary", name: "Contrary", rating: 4, num: 126 }, "cursedbody": { desc: "30% chance of disabling one of the opponent's moves when attacked. This works even if the attacker is behind a Substitute, but will not activate if the Pokemon with Cursed Body is behind a Substitute.", shortDesc: "If this Pokemon is hit by an attack, there is a 30% chance that move gets Disabled.", onAfterDamage: function (damage, target, source, move) { if (!source || source.volatiles['disable']) return; if (source !== target && move && move.effectType === 'Move') { if (this.random(10) < 3) { source.addVolatile('disable'); } } }, id: "cursedbody", name: "Cursed Body", rating: 2, num: 130 }, "cutecharm": { desc: "If an opponent of the opposite gender directly attacks this Pokemon, there is a 30% chance that the opponent will become Attracted to this Pokemon.", shortDesc: "30% chance of infatuating Pokemon of the opposite gender if they make contact.", onAfterDamage: function (damage, target, source, move) { if (move && move.isContact) { if (this.random(10) < 3) { source.addVolatile('attract', target); } } }, id: "cutecharm", name: "Cute Charm", rating: 1, num: 56 }, "damp": { desc: "While this Pokemon is active, no Pokemon on the field can use Selfdestruct or Explosion.", shortDesc: "While this Pokemon is active, Selfdestruct, Explosion, and Aftermath do not work.", id: "damp", onAnyTryMove: function (target, source, effect) { if (effect.id === 'selfdestruct' || effect.id === 'explosion') { this.attrLastMove('[still]'); this.add('-activate', this.effectData.target, 'ability: Damp'); return false; } }, onAnyDamage: function (damage, target, source, effect) { if (effect && effect.id === 'aftermath') { return false; } }, name: "Damp", rating: 0.5, num: 6 }, "darkaura": { desc: "Increases the power of all Dark-type moves in battle to 1.33x.", shortDesc: "Increases the power of all Dark-type moves in battle to 1.33x.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Dark Aura'); }, onBasePowerPriority: 8, onAnyBasePower: function (basePower, attacker, defender, move) { var reverseAura = false; for (var p in attacker.side.active) { if (attacker.side.active[p] && attacker.side.active[p].hasAbility('aurabreak')) { reverseAura = true; this.debug('Reversing Dark Aura due to Aura Break'); } } for (var p in defender.side.active) { if (defender.side.active[p] && defender.side.active[p].hasAbility('aurabreak')) { reverseAura = true; this.debug('Reversing Dark Aura due to Aura Break'); } } if (move.type === 'Dark') { return this.chainModify(reverseAura? 0.75 : 4 / 3); } }, id: "darkaura", name: "Dark Aura", rating: 3, num: -6, gen: 6 }, "defeatist": { desc: "Attack and Special Attack are halved when HP is less than half.", shortDesc: "When this Pokemon has 1/2 or less of its max HP, its Attack and Sp. Atk are halved.", onModifyAtkPriority: 5, onModifyAtk: function (atk, pokemon) { if (pokemon.hp < pokemon.maxhp / 2) { return this.chainModify(0.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, pokemon) { if (pokemon.hp < pokemon.maxhp / 2) { return this.chainModify(0.5); } }, onResidual: function (pokemon) { pokemon.update(); }, id: "defeatist", name: "Defeatist", rating: -1, num: 129 }, "defiant": { desc: "Raises the user's Attack stat by two stages when a stat is lowered, including the Attack stat. This does not include self-induced stat drops like those from Close Combat.", shortDesc: "This Pokemon's Attack is boosted by 2 for each of its stats that is lowered by a foe.", onAfterEachBoost: function (boost, target, source) { if (!source || target.side === source.side) { return; } var statsLowered = false; for (var i in boost) { if (boost[i] < 0) { statsLowered = true; } } if (statsLowered) { this.boost({atk: 2}); } }, id: "defiant", name: "Defiant", rating: 2, num: 128 }, "download": { desc: "If this Pokemon switches into an opponent with equal Defenses or higher Defense than Special Defense, this Pokemon's Special Attack receives a 50% boost. If this Pokemon switches into an opponent with higher Special Defense than Defense, this Pokemon's Attack receive a 50% boost.", shortDesc: "On switch-in, Attack or Sp. Atk is boosted by 1 based on the foes' weaker Defense.", onStart: function (pokemon) { var foeactive = pokemon.side.foe.active; var totaldef = 0; var totalspd = 0; for (var i = 0; i < foeactive.length; i++) { if (!foeactive[i] || foeactive[i].fainted) continue; totaldef += foeactive[i].getStat('def', false, true); totalspd += foeactive[i].getStat('spd', false, true); } if (totaldef && totaldef >= totalspd) { this.boost({spa:1}); } else if (totalspd) { this.boost({atk:1}); } }, id: "download", name: "Download", rating: 4, num: 88 }, "drizzle": { desc: "When this Pokemon enters the battlefield, the weather becomes Rain Dance (for 5 turns normally, or 8 turns while holding Damp Rock).", shortDesc: "On switch-in, the weather becomes Rain Dance.", onStart: function (source) { this.setWeather('raindance'); }, id: "drizzle", name: "Drizzle", rating: 5, num: 2 }, "drought": { desc: "When this Pokemon enters the battlefield, the weather becomes Sunny Day (for 5 turns normally, or 8 turns while holding Heat Rock).", shortDesc: "On switch-in, the weather becomes Sunny Day.", onStart: function (source) { this.setWeather('sunnyday'); }, id: "drought", name: "Drought", rating: 5, num: 70 }, "dryskin": { desc: "This Pokemon absorbs Water attacks and gains a weakness to Fire attacks. If Sunny Day is in effect, this Pokemon takes damage. If Rain Dance is in effect, this Pokemon recovers health.", shortDesc: "This Pokemon is healed 1/4 by Water, 1/8 by Rain; is hurt 1.25x by Fire, 1/8 by Sun.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Water') { if (!this.heal(target.maxhp / 4)) { this.add('-immune', target, '[msg]'); } return null; } }, onBasePowerPriority: 7, onFoeBasePower: function (basePower, attacker, defender, move) { if (this.effectData.target !== defender) return; if (move.type === 'Fire') { return this.chainModify(1.25); } }, onWeather: function (target, source, effect) { if (effect.id === 'raindance') { this.heal(target.maxhp / 8); } else if (effect.id === 'sunnyday') { this.damage(target.maxhp / 8); } }, id: "dryskin", name: "Dry Skin", rating: 3.5, num: 87 }, "earlybird": { desc: "This Pokemon will remain asleep for half as long as it normally would; this includes both opponent-induced sleep and user-induced sleep via Rest.", shortDesc: "This Pokemon's sleep status lasts half as long as usual, self-induced or not.", id: "earlybird", name: "Early Bird", isHalfSleep: true, rating: 2.5, num: 48 }, "effectspore": { desc: "If an opponent directly attacks this Pokemon, there is a 30% chance that the opponent will become either poisoned, paralyzed or put to sleep. There is an equal chance to inflict each status.", shortDesc: "30% chance of poisoning, paralyzing, or causing sleep on Pokemon making contact.", onAfterDamage: function (damage, target, source, move) { if (move && move.isContact && !source.status) { var r = this.random(100); if (r < 11) source.setStatus('slp', target); else if (r < 21) source.setStatus('par', target); else if (r < 30) source.setStatus('psn', target); } }, id: "effectspore", name: "Effect Spore", rating: 2, num: 27 }, "fairyaura": { desc: "Increases the power of all Fairy-type moves in battle to 1.33x.", shortDesc: "Increases the power of all Fairy-type moves in battle to 1.33x.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Fairy Aura'); }, onBasePowerPriority: 8, onAnyBasePower: function (basePower, attacker, defender, move) { var reverseAura = false; for (var p in attacker.side.active) { if (attacker.side.active[p] && attacker.side.active[p].hasAbility('aurabreak')) { reverseAura = true; this.debug('Reversing Fairy Aura due to Aura Break'); } } for (var p in defender.side.active) { if (defender.side.active[p] && defender.side.active[p].hasAbility('aurabreak')) { reverseAura = true; this.debug('Reversing Fairy Aura due to Aura Break'); } } if (move.type === 'Fairy') { return this.chainModify(reverseAura? 0.75 : 4 / 3); } }, id: "fairyaura", name: "Fairy Aura", rating: 3, num: -6, gen: 6 }, "filter": { desc: "This Pokemon receives one-fourth reduced damage from Super Effective attacks.", shortDesc: "This Pokemon receives 3/4 damage from super effective attacks.", onSourceModifyDamage: function (damage, source, target, move) { if (this.getEffectiveness(move, target) > 0) { this.debug('Filter neutralize'); return this.chainModify(0.75); } }, id: "filter", name: "Filter", rating: 3, num: 111 }, "flamebody": { desc: "If an opponent directly attacks this Pokemon, there is a 30% chance that the opponent will become burned.", shortDesc: "30% chance of burning a Pokemon making contact with this Pokemon.", onAfterDamage: function (damage, target, source, move) { if (move && move.isContact) { if (this.random(10) < 3) { source.trySetStatus('brn', target, move); } } }, id: "flamebody", name: "Flame Body", rating: 2, num: 49 }, "flareboost": { desc: "When the user with this ability is burned, its Special Attack is raised by 50%.", shortDesc: "When this Pokemon is burned, its special attacks do 1.5x damage.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (attacker.status === 'brn' && move.category === 'Special') { return this.chainModify(1.5); } }, id: "flareboost", name: "Flare Boost", rating: 3, num: 138 }, "flashfire": { desc: "This Pokemon is immune to all Fire-type attacks; additionally, its own Fire-type attacks receive a 50% boost if a Fire-type move hits this Pokemon. Multiple boosts do not occur if this Pokemon is hit with multiple Fire-type attacks.", shortDesc: "This Pokemon's Fire attacks do 1.5x damage if hit by one Fire move; Fire immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Fire') { move.accuracy = true; if (!target.addVolatile('flashfire')) { this.add('-immune', target, '[msg]'); } return null; } }, effect: { noCopy: true, // doesn't get copied by Baton Pass onStart: function (target) { this.add('-start', target, 'ability: Flash Fire'); }, onModifyAtkPriority: 5, onModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Fire') { this.debug('Flash Fire boost'); return this.chainModify(1.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Fire') { this.debug('Flash Fire boost'); return this.chainModify(1.5); } } }, id: "flashfire", name: "Flash Fire", rating: 3, num: 18 }, "flowergift": { desc: "If this Pokemon is active while Sunny Day is in effect, its Attack and Special Defense stats (as well as its partner's stats in double battles) receive a 50% boost.", shortDesc: "If user is Cherrim and Sunny Day is active, it and allies' Attack and Sp. Def are 1.5x.", onStart: function (pokemon) { delete this.effectData.forme; }, onUpdate: function (pokemon) { if (!pokemon.isActive || pokemon.speciesid !== 'cherrim') return; if (this.isWeather('sunnyday')) { if (this.effectData.forme !== 'Sunshine') { this.effectData.forme = 'Sunshine'; this.add('-formechange', pokemon, 'Cherrim-Sunshine'); this.add('-message', pokemon.name + ' transformed! (placeholder)'); } } else { if (this.effectData.forme) { delete this.effectData.forme; this.add('-formechange', pokemon, 'Cherrim'); this.add('-message', pokemon.name + ' transformed! (placeholder)'); } } }, onModifyAtkPriority: 3, onAllyModifyAtk: function (atk) { if (this.effectData.target.template.speciesid !== 'cherrim') return; if (this.isWeather('sunnyday')) { return this.chainModify(1.5); } }, onModifySpDPriority: 4, onAllyModifySpD: function (spd) { if (this.effectData.target.template.speciesid !== 'cherrim') return; if (this.isWeather('sunnyday')) { return this.chainModify(1.5); } }, id: "flowergift", name: "Flower Gift", rating: 3, num: 122 }, "flowerveil": { desc: "Prevents ally Grass-type Pokemon from being statused or having their stats lowered.", shortDesc: "Prevents lowering of ally Grass-type Pokemon's stats.", onAllyBoost: function (boost, target, source, effect) { if ((source && target === source) || !target.hasType('Grass')) return; var showMsg = false; for (var i in boost) { if (boost[i] < 0) { delete boost[i]; showMsg = true; } } if (showMsg && !effect.secondaries) this.add("-fail", target, "unboost", "[from] ability: Flower Veil", "[of] " + target); }, onAllySetStatus: function (status, target) { if (target.hasType('Grass')) return false; }, id: "flowerveil", name: "Flower Veil", rating: 0, num: -6, gen: 6 }, "forecast": { desc: "This Pokemon's type changes according to the current weather conditions: it becomes Fire-type during Sunny Day, Water-type during Rain Dance, Ice-type during Hail and remains its regular type otherwise.", shortDesc: "Castform's type changes to the current weather condition's type, except Sandstorm.", onUpdate: function (pokemon) { if (pokemon.baseTemplate.species !== 'Castform' || pokemon.transformed) return; var forme = null; switch (this.effectiveWeather()) { case 'sunnyday': if (pokemon.template.speciesid !== 'castformsunny') forme = 'Castform-Sunny'; break; case 'raindance': if (pokemon.template.speciesid !== 'castformrainy') forme = 'Castform-Rainy'; break; case 'hail': if (pokemon.template.speciesid !== 'castformsnowy') forme = 'Castform-Snowy'; break; default: if (pokemon.template.speciesid !== 'castform') forme = 'Castform'; break; } if (pokemon.isActive && forme) { pokemon.formeChange(forme); this.add('-formechange', pokemon, forme); this.add('-message', pokemon.name + ' transformed! (placeholder)'); } }, id: "forecast", name: "Forecast", rating: 4, num: 59 }, "forewarn": { desc: "The move with the highest Base Power in the opponent's moveset is revealed.", shortDesc: "On switch-in, this Pokemon is alerted to the foes' move with the highest Base Power.", onStart: function (pokemon) { var targets = pokemon.side.foe.active; var warnMoves = []; var warnBp = 1; for (var i = 0; i < targets.length; i++) { if (targets[i].fainted) continue; for (var j = 0; j < targets[i].moveset.length; j++) { var move = this.getMove(targets[i].moveset[j].move); var bp = move.basePower; if (move.ohko) bp = 160; if (move.id === 'counter' || move.id === 'metalburst' || move.id === 'mirrorcoat') bp = 120; if (!bp && move.category !== 'Status') bp = 80; if (bp > warnBp) { warnMoves = [[move, targets[i]]]; warnBp = bp; } else if (bp === warnBp) { warnMoves.push([move, targets[i]]); } } } if (!warnMoves.length) return; var warnMove = warnMoves[this.random(warnMoves.length)]; this.add('-activate', pokemon, 'ability: Forewarn', warnMove[0], warnMove[1]); }, id: "forewarn", name: "Forewarn", rating: 1, num: 108 }, "friendguard": { desc: "Reduces the damage received from an ally in a double or triple battle.", shortDesc: "This Pokemon's allies receive 3/4 damage from other Pokemon's attacks.", id: "friendguard", name: "Friend Guard", onAnyModifyDamage: function (damage, source, target, move) { if (target !== this.effectData.target && target.side === this.effectData.target.side) { this.debug('Friend Guard weaken'); return this.chainModify(0.75); } }, rating: 0, num: 132 }, "frisk": { desc: "When this Pokemon enters the field, it identifies all the opponent's held items.", shortDesc: "On switch-in, this Pokemon identifies the foe's held items.", onStart: function (pokemon) { var foeactive = pokemon.side.foe.active; for (var i = 0; i < foeactive.length; i++) { if (!foeactive[i] || foeactive[i].fainted) continue; if (foeactive[i].item) { this.add('-item', foeactive[i], foeactive[i].getItem().name, '[from] ability: Frisk', '[of] ' + pokemon, '[identify]'); } } }, id: "frisk", name: "Frisk", rating: 1.5, num: 119 }, "furcoat": { desc: "Halves the damage done to this Pokemon by physical attacks.", shortDesc: "Halves physical damage done to this Pokemon.", onModifyAtkPriority: 6, onSourceModifyAtk: function (atk, attacker, defender, move) { return this.chainModify(0.5); }, id: "furcoat", name: "Fur Coat", rating: 3.5, num: -6, gen: 6 }, "galewings": { desc: "This Pokemon's Flying-type moves have their priority increased by 1.", shortDesc: "Gives priority to Flying-type moves.", onModifyPriority: function (priority, pokemon, target, move) { if (move && move.type === 'Flying') return priority + 1; }, id: "galewings", name: "Gale Wings", rating: 4.5, num: -6, gen: 6 }, "gluttony": { desc: "This Pokemon consumes its held berry when its health reaches 50% max HP or lower.", shortDesc: "When this Pokemon has 1/2 or less of its max HP, it uses certain Berries early.", id: "gluttony", name: "Gluttony", rating: 1.5, num: 82 }, "gooey": { desc: "Contact with this Pokemon lowers the attacker's Speed stat by 1.", shortDesc: "Contact with this Pokemon lowers the attacker's Speed.", onAfterDamage: function (damage, target, source, effect) { if (effect && effect.isContact) this.boost({spe: -1}, source, target); }, id: "gooey", name: "Gooey", rating: 3, num: -6, gen: 6 }, "grasspelt": { desc: "This Pokemon's Defense is boosted in Grassy Terrain", shortDesc: "This Pokemon's Defense is boosted in Grassy Terrain.", onModifyDefPriority: 6, onModifyDef: function (pokemon) { if (this.isTerrain('grassyterrain')) return this.chainModify(1.5); }, id: "grasspelt", name: "Grass Pelt", rating: 2, num: -6, gen: 6 }, "guts": { desc: "When this Pokemon is poisoned (including Toxic), burned, paralyzed or asleep (including self-induced Rest), its Attack stat receives a 50% boost; the burn status' Attack drop is also ignored.", shortDesc: "If this Pokemon is statused, its Attack is 1.5x; burn's Attack drop is ignored.", onModifyAtkPriority: 5, onModifyAtk: function (atk, pokemon) { if (pokemon.status) { return this.chainModify(1.5); } }, id: "guts", name: "Guts", rating: 3, num: 62 }, "harvest": { desc: "When the user uses a held Berry, it has a 50% chance of having it restored at the end of the turn. This chance becomes 100% during Sunny Day.", shortDesc: "50% chance this Pokemon's Berry is restored at the end of each turn. 100% in Sun.", id: "harvest", name: "Harvest", onResidualOrder: 26, onResidualSubOrder: 1, onResidual: function (pokemon) { if (this.isWeather('sunnyday') || this.random(2) === 0) { if (pokemon.hp && !pokemon.item && this.getItem(pokemon.lastItem).isBerry) { pokemon.setItem(pokemon.lastItem); this.add('-item', pokemon, pokemon.getItem(), '[from] ability: Harvest'); } } }, rating: 2, num: 139 }, "healer": { desc: "Has a 30% chance of curing an adjacent ally's status ailment at the end of each turn in Double and Triple Battles.", shortDesc: "30% chance of curing an adjacent ally's status at the end of each turn.", id: "healer", name: "Healer", onResidualOrder: 5, onResidualSubOrder: 1, onResidual: function (pokemon) { var allyActive = pokemon.side.active; if (allyActive.length === 1) { return; } for (var i = 0; i < allyActive.length; i++) { if (allyActive[i] && this.isAdjacent(pokemon, allyActive[i]) && allyActive[i].status && this.random(10) < 3) { allyActive[i].cureStatus(); } } }, rating: 0, num: 131 }, "heatproof": { desc: "This Pokemon receives half damage from both Fire-type attacks and residual burn damage.", shortDesc: "This Pokemon receives half damage from Fire-type attacks and burn damage.", onBasePowerPriority: 7, onSourceBasePower: function (basePower, attacker, defender, move) { if (move.type === 'Fire') { return this.chainModify(0.5); } }, onDamage: function (damage, target, source, effect) { if (effect && effect.id === 'brn') { return damage / 2; } }, id: "heatproof", name: "Heatproof", rating: 2.5, num: 85 }, "heavymetal": { desc: "The user's weight is doubled. This increases user's base power of Heavy Slam and Heat Crash, as well as damage taken from the opponent's Low Kick and Grass Knot, due to these moves being calculated by the target's weight.", shortDesc: "This Pokemon's weight is doubled.", onModifyPokemon: function (pokemon) { pokemon.weightkg *= 2; }, id: "heavymetal", name: "Heavy Metal", rating: -1, num: 134 }, "honeygather": { desc: "If it is not already holding an item, this Pokemon may find and be holding Honey after a battle.", shortDesc: "No competitive use.", id: "honeygather", name: "Honey Gather", rating: 0, num: 118 }, "hugepower": { desc: "This Pokemon's Attack stat is doubled. Therefore, if this Pokemon's Attack stat on the status screen is 200, it effectively has an Attack stat of 400; which is then subject to the full range of stat boosts and reductions.", shortDesc: "This Pokemon's Attack is doubled.", onModifyAtkPriority: 5, onModifyAtk: function (atk) { return this.chainModify(2); }, id: "hugepower", name: "Huge Power", rating: 5, num: 37 }, "hustle": { desc: "This Pokemon's Attack receives a 50% boost but its Physical attacks receive a 20% drop in Accuracy. For example, a 100% accurate move would become an 80% accurate move. The accuracy of moves that never miss, such as Aerial Ace, remains unaffected.", shortDesc: "This Pokemon's Attack is 1.5x and accuracy of its physical attacks is 0.8x.", // This should be applied directly to the stat as opposed to chaining witht he others onModifyAtkPriority: 5, onModifyAtk: function (atk) { return this.modify(atk, 1.5); }, onModifyMove: function (move) { if (move.category === 'Physical' && typeof move.accuracy === 'number') { move.accuracy *= 0.8; } }, id: "hustle", name: "Hustle", rating: 3, num: 55 }, "hydration": { desc: "If this Pokemon is active while Rain Dance is in effect, it recovers from poison, paralysis, burn, sleep and freeze at the end of the turn.", shortDesc: "This Pokemon has its status cured at the end of each turn if Rain Dance is active.", onResidualOrder: 5, onResidualSubOrder: 1, onResidual: function (pokemon) { if (pokemon.status && this.isWeather('raindance')) { this.debug('hydration'); pokemon.cureStatus(); } }, id: "hydration", name: "Hydration", rating: 2, num: 93 }, "hypercutter": { desc: "Opponents cannot reduce this Pokemon's Attack stat; they can, however, modify stat changes with Power Swap or Heart Swap and inflict a stat boost with Swagger. This ability does not prevent self-inflicted stat reductions.", shortDesc: "Prevents other Pokemon from lowering this Pokemon's Attack.", onBoost: function (boost, target, source, effect) { if (source && target === source) return; if (boost['atk'] && boost['atk'] < 0) { boost['atk'] = 0; if (!effect.secondaries) this.add("-fail", target, "unboost", "Attack", "[from] ability: Hyper Cutter", "[of] " + target); } }, id: "hypercutter", name: "Hyper Cutter", rating: 1.5, num: 52 }, "icebody": { desc: "If active while Hail is in effect, this Pokemon recovers one-sixteenth of its max HP after each turn. If a non-Ice-type Pokemon receives this ability through Skill Swap, Role Play or the Trace ability, it will not take damage from Hail.", shortDesc: "If Hail is active, this Pokemon heals 1/16 of its max HP each turn; immunity to Hail.", onWeather: function (target, source, effect) { if (effect.id === 'hail') { this.heal(target.maxhp / 16); } }, onImmunity: function (type, pokemon) { if (type === 'hail') return false; }, id: "icebody", name: "Ice Body", rating: 3, num: 115 }, "illuminate": { desc: "When this Pokemon is in the first slot of the player's party, it doubles the rate of wild encounters.", shortDesc: "No competitive use.", id: "illuminate", name: "Illuminate", rating: 0, num: 35 }, "illusion": { desc: "Illusion will change the appearance of the Pokemon to a different species. This is dependent on the last Pokemon in the player's party. Along with the species itself, Illusion is broken when the user is damaged, but is not broken by Substitute, weather conditions, status ailments, or entry hazards. Illusion will replicate the type of Poke Ball, the species name, and the gender of the Pokemon it is masquerading as.", shortDesc: "This Pokemon appears as the last Pokemon in the party until it takes direct damage.", onBeforeSwitchIn: function (pokemon) { pokemon.illusion = null; for (var i = pokemon.side.pokemon.length - 1; i > pokemon.position; i--) { if (!pokemon.side.pokemon[i]) continue; if (!pokemon.side.pokemon[i].fainted) break; } if (!pokemon.side.pokemon[i]) return; if (pokemon === pokemon.side.pokemon[i]) return; pokemon.illusion = pokemon.side.pokemon[i]; }, // illusion clearing is hardcoded in the damage function id: "illusion", name: "Illusion", rating: 4.5, num: 149 }, "immunity": { desc: "This Pokemon cannot become poisoned nor Toxic poisoned.", shortDesc: "This Pokemon cannot be poisoned. Gaining this Ability while poisoned cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'psn' || pokemon.status === 'tox') { pokemon.cureStatus(); } }, onImmunity: function (type) { if (type === 'psn') return false; }, id: "immunity", name: "Immunity", rating: 1, num: 17 }, "imposter": { desc: "As soon as the user comes into battle, it Transforms into its opponent, copying the opponent's stats exactly, with the exception of HP. Imposter copies all stat changes on the target originating from moves and abilities such as Swords Dance and Intimidate, but not from items such as Choice Specs. Imposter will not Transform the user if the opponent is an Illusion or if the opponent is behind a Substitute.", shortDesc: "On switch-in, this Pokemon copies the foe it's facing; stats, moves, types, Ability.", onStart: function (pokemon) { var target = pokemon.side.foe.active[pokemon.side.foe.active.length - 1 - pokemon.position]; if (target) { pokemon.transformInto(target, pokemon); } }, id: "imposter", name: "Imposter", rating: 5, num: 150 }, "infiltrator": { desc: "Ignores Substitute, Reflect, Light Screen, and Safeguard on the target.", shortDesc: "This Pokemon's moves ignore the foe's Substitute, Reflect, Light Screen, Safeguard, and Mist.", onModifyMove: function (move) { move.notSubBlocked = true; move.ignoreScreens = true; }, id: "infiltrator", name: "Infiltrator", rating: 2.5, num: 151 }, "innerfocus": { desc: "This Pokemon cannot be made to flinch.", shortDesc: "This Pokemon cannot be made to flinch.", onFlinch: false, id: "innerfocus", name: "Inner Focus", rating: 1, num: 39 }, "insomnia": { desc: "This Pokemon cannot be put to sleep; this includes both opponent-induced sleep as well as user-induced sleep via Rest.", shortDesc: "This Pokemon cannot fall asleep. Gaining this Ability while asleep cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'slp') { pokemon.cureStatus(); } }, onImmunity: function (type, pokemon) { if (type === 'slp') return false; }, id: "insomnia", name: "Insomnia", rating: 2, num: 15 }, "intimidate": { desc: "When this Pokemon enters the field, the Attack stat of each of its opponents lowers by one stage.", shortDesc: "On switch-in, this Pokemon lowers adjacent foes' Attack by 1.", onStart: function (pokemon) { var foeactive = pokemon.side.foe.active; for (var i = 0; i < foeactive.length; i++) { if (!foeactive[i] || foeactive[i].fainted) continue; if (foeactive[i].volatiles['substitute']) { // does it give a message? this.add('-activate', foeactive[i], 'Substitute', 'ability: Intimidate', '[of] ' + pokemon); } else { this.add('-ability', pokemon, 'Intimidate', '[of] ' + foeactive[i]); this.boost({atk: -1}, foeactive[i], pokemon); } } }, id: "intimidate", name: "Intimidate", rating: 3.5, num: 22 }, "ironbarbs": { desc: "All moves that make contact with the Pokemon with Iron Barbs will damage the user by 1/8 of their maximum HP after damage is dealt.", shortDesc: "This Pokemon causes other Pokemon making contact to lose 1/8 of their max HP.", onAfterDamageOrder: 1, onAfterDamage: function (damage, target, source, move) { if (source && source !== target && move && move.isContact) { this.damage(source.maxhp / 8, source, target); } }, id: "ironbarbs", name: "Iron Barbs", rating: 3, num: 160 }, "ironfist": { desc: "This Pokemon receives a 20% power boost for the following attacks: Bullet Punch, Comet Punch, Dizzy Punch, Drain Punch, Dynamicpunch, Fire Punch, Focus Punch, Hammer Arm, Ice Punch, Mach Punch, Mega Punch, Meteor Mash, Shadow Punch, Sky Uppercut, and Thunderpunch. Sucker Punch, which is known Ambush in Japan, is not boosted.", shortDesc: "This Pokemon's punch-based attacks do 1.2x damage. Sucker Punch is not boosted.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (move.isPunchAttack) { this.debug('Iron Fist boost'); return this.chainModify(1.2); } }, id: "ironfist", name: "Iron Fist", rating: 3, num: 89 }, "justified": { desc: "Will raise the user's Attack stat one level when hit by any Dark-type moves. Unlike other abilities with immunity to certain typed moves, the user will still receive damage from the attack. Justified will raise Attack one level for each hit of a multi-hit move like Beat Up.", shortDesc: "This Pokemon's Attack is boosted by 1 after it is damaged by a Dark-type attack.", onAfterDamage: function (damage, target, source, effect) { if (effect && effect.type === 'Dark') { this.boost({atk:1}); } }, id: "justified", name: "Justified", rating: 2, num: 154 }, "keeneye": { desc: "This Pokemon's Accuracy cannot be lowered.", shortDesc: "Prevents other Pokemon from lowering this Pokemon's accuracy.", onBoost: function (boost, target, source, effect) { if (source && target === source) return; if (boost['accuracy'] && boost['accuracy'] < 0) { boost['accuracy'] = 0; if (!effect.secondaries) this.add("-fail", target, "unboost", "accuracy", "[from] ability: Keen Eye", "[of] " + target); } }, onModifyMove: function (move) { move.ignoreEvasion = true; }, id: "keeneye", name: "Keen Eye", rating: 1, num: 51 }, "klutz": { desc: "This Pokemon ignores both the positive and negative effects of its held item, other than the speed-halving and EV-enhancing effects of Macho Brace, Power Anklet, Power Band, Power Belt, Power Bracer, Power Lens, and Power Weight. Fling cannot be used.", shortDesc: "This Pokemon's held item has no effect, except Macho Brace. Fling cannot be used.", onModifyPokemonPriority: 1, onModifyPokemon: function (pokemon) { pokemon.ignore['Item'] = true; }, id: "klutz", name: "Klutz", rating: 0, num: 103 }, "leafguard": { desc: "If this Pokemon is active while Sunny Day is in effect, it cannot become poisoned, burned, paralyzed or put to sleep (other than user-induced Rest). Leaf Guard does not heal status effects that existed before Sunny Day came into effect.", shortDesc: "If Sunny Day is active, this Pokemon cannot be statused and Rest will fail for it.", onSetStatus: function (pokemon) { if (this.isWeather('sunnyday')) { return false; } }, onTryHit: function (target, source, move) { if (move && move.id === 'yawn' && this.isWeather('sunnyday')) { return false; } }, id: "leafguard", name: "Leaf Guard", rating: 1, num: 102 }, "levitate": { desc: "This Pokemon is immune to Ground-type attacks, Spikes, Toxic Spikes and the Arena Trap ability; it loses these immunities while holding Iron Ball, after using Ingrain or if Gravity is in effect.", shortDesc: "This Pokemon is immune to Ground; Gravity, Ingrain, Smack Down, Iron Ball nullify it.", onImmunity: function (type) { if (type === 'Ground') return false; }, id: "levitate", name: "Levitate", rating: 3.5, num: 26 }, "lightmetal": { desc: "The user's weight is halved. This decreases the damage taken from Low Kick and Grass Knot, and also lowers user's base power of Heavy Slam and Heat Crash, due these moves being calculated by the target and user's weight.", shortDesc: "This Pokemon's weight is halved.", onModifyPokemon: function (pokemon) { pokemon.weightkg /= 2; }, id: "lightmetal", name: "Light Metal", rating: 1, num: 135 }, "lightningrod": { desc: "During double battles, this Pokemon draws any single-target Electric-type attack to itself. If an opponent uses an Electric-type attack that affects multiple Pokemon, those targets will be hit. This ability does not affect Electric Hidden Power or Judgment. The user is immune to Electric and its Special Attack is increased one stage when hit by one.", shortDesc: "This Pokemon draws Electric moves to itself to boost Sp. Atk by 1; Electric immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Electric') { if (!this.boost({spa:1})) { this.add('-immune', target, '[msg]'); } return null; } }, onAnyRedirectTargetPriority: 1, onAnyRedirectTarget: function (target, source, source2, move) { if (move.type !== 'Electric') return; if (this.validTarget(this.effectData.target, source, move.target)) { return this.effectData.target; } }, id: "lightningrod", name: "Lightningrod", rating: 3.5, num: 32 }, "limber": { desc: "This Pokemon cannot become paralyzed.", shortDesc: "This Pokemon cannot be paralyzed. Gaining this Ability while paralyzed cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'par') { pokemon.cureStatus(); } }, onImmunity: function (type, pokemon) { if (type === 'par') return false; }, id: "limber", name: "Limber", rating: 2, num: 7 }, "liquidooze": { desc: "When another Pokemon uses Absorb, Drain Punch, Dream Eater, Giga Drain, Leech Life, Leech Seed or Mega Drain against this Pokemon, the attacking Pokemon loses the amount of health that it would have gained.", shortDesc: "This Pokemon damages those draining HP from it for as much as they would heal.", id: "liquidooze", onSourceTryHeal: function (damage, target, source, effect) { this.debug("Heal is occurring: " + target + " <- " + source + " :: " + effect.id); var canOoze = {drain: 1, leechseed: 1}; if (canOoze[effect.id]) { this.damage(damage); return 0; } }, name: "Liquid Ooze", rating: 1, num: 64 }, "magician": { desc: "If this Pokemon is not holding an item, it steals the held item of a target it hits with a move.", shortDesc: "This Pokemon steals the held item of a target it hits with a move.", onHit: function (target, source, move) { // We need to hard check if the ability is Magician since the event will be run both ways. if (target && target !== source && move && source.ability === 'magician') { if (source.item) return; var yourItem = target.takeItem(source); if (!yourItem) return; if (!source.setItem(yourItem)) { target.item = yourItem.id; // bypass setItem so we don't break choicelock or anything return; } this.add('-item', source, yourItem, '[from] ability: Magician', '[of] ' + target); } }, id: "magician", name: "Magician", rating: 2, num: -6, gen: 6 }, "magicbounce": { desc: "Non-damaging moves are reflected back at the user.", shortDesc: "This Pokemon blocks certain status moves and uses the move itself.", id: "magicbounce", name: "Magic Bounce", onTryHitPriority: 1, onTryHit: function (target, source, move) { if (target === source) return; if (move.hasBounced) return; if (typeof move.isBounceable === 'undefined') { move.isBounceable = !!(move.category === 'Status' && (move.status || move.boosts || move.volatileStatus === 'confusion' || move.forceSwitch)); } if (move.isBounceable) { var newMove = this.getMoveCopy(move.id); newMove.hasBounced = true; this.useMove(newMove, target, source); return null; } }, onAllyTryHitSide: function (target, source, move) { if (target.side === source.side) return; if (move.hasBounced) return; if (typeof move.isBounceable === 'undefined') { move.isBounceable = !!(move.category === 'Status' && (move.status || move.boosts || move.volatileStatus === 'confusion' || move.forceSwitch)); } if (move.isBounceable) { var newMove = this.getMoveCopy(move.id); newMove.hasBounced = true; this.useMove(newMove, target, source); return null; } }, effect: { duration: 1 }, rating: 5, num: 156 }, "magicguard": { desc: "Prevents all damage except from direct attacks.", shortDesc: "This Pokemon can only be damaged by direct attacks.", onDamage: function (damage, target, source, effect) { if (effect.effectType !== 'Move') { return false; } }, id: "magicguard", name: "Magic Guard", rating: 4.5, num: 98 }, "magmaarmor": { desc: "This Pokemon cannot become frozen.", shortDesc: "This Pokemon cannot be frozen. Gaining this Ability while frozen cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'frz') { pokemon.cureStatus(); } }, onImmunity: function (type, pokemon) { if (type === 'frz') return false; }, id: "magmaarmor", name: "Magma Armor", rating: 0.5, num: 40 }, "magnetpull": { desc: "When this Pokemon enters the field, Steel-type opponents cannot switch out nor flee the battle unless they are holding Shed Shell or use attacks like U-Turn or Baton Pass.", shortDesc: "Prevents Steel-type foes from switching out normally.", onFoeModifyPokemon: function (pokemon) { if (pokemon.hasType('Steel')) { pokemon.tryTrap(); } }, onFoeMaybeTrapPokemon: function (pokemon) { if (pokemon.hasType('Steel')) { pokemon.maybeTrapped = true; } }, id: "magnetpull", name: "Magnet Pull", rating: 4.5, num: 42 }, "marvelscale": { desc: "When this Pokemon becomes burned, poisoned (including Toxic), paralyzed, frozen or put to sleep (including self-induced sleep via Rest), its Defense receives a 50% boost.", shortDesc: "If this Pokemon is statused, its Defense is 1.5x.", onModifyDefPriority: 6, onModifyDef: function (def, pokemon) { if (pokemon.status) { return this.chainModify(1.5); } }, id: "marvelscale", name: "Marvel Scale", rating: 3, num: 63 }, "megalauncher": { desc: "Boosts the power of Aura and Pulse moves, such as Aura Sphere and Dark Pulse, by 50%.", shortDesc: "Boosts the power of Aura/Pulse moves by 50%.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (move.isPulseMove) { return this.chainModify(1.5); } }, id: "megalauncher", name: "Mega Launcher", rating: 3, num: -6, gen: 6 }, "minus": { desc: "This Pokemon's Special Attack receives a 50% boost in double battles if a partner has the Plus or Minus ability.", shortDesc: "If an ally has the Ability Plus or Minus, this Pokemon's Sp. Atk is 1.5x.", onModifySpAPriority: 5, onModifySpA: function (spa, pokemon) { var allyActive = pokemon.side.active; if (allyActive.length === 1) { return; } for (var i = 0; i < allyActive.length; i++) { if (allyActive[i] && allyActive[i].position !== pokemon.position && !allyActive[i].fainted && allyActive[i].hasAbility(['minus', 'plus'])) { return this.chainModify(1.5); } } }, id: "minus", name: "Minus", rating: 0, num: 58 }, "moldbreaker": { desc: "When this Pokemon becomes active, it nullifies the abilities of opposing active Pokemon that hinder this Pokemon's attacks. These abilities include Battle Armor, Clear Body, Damp, Dry Skin, Filter, Flash Fire, Flower Gift, Heatproof, Herbivore, Hyper Cutter, Immunity, Inner Focus, Insomnia, Keen Eye, Leaf Guard, Levitate, Lightningrod, Limber, Magma Armor, Marvel Scale, Motor Drive, Oblivious, Own Tempo, Sand Veil, Shell Armor, Shield Dust, Simple, Snow Cloak, Solid Rock, Soundproof, Sticky Hold, Storm Drain, Sturdy, Suction Cups, Tangled Feet, Thick Fat, Unaware, Vital Spirit, Volt Absorb, Water Absorb, Water Veil, White Smoke and Wonder Guard.", shortDesc: "This Pokemon's moves ignore the target's Ability if it could modify the effectiveness.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Mold Breaker'); }, onAllyModifyPokemonPriority: 100, onAllyModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target && pokemon !== this.activePokemon) { pokemon.ignore['Ability'] = 'A'; } }, onFoeModifyPokemonPriority: 100, onFoeModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target) { pokemon.ignore['Ability'] = 'A'; } }, id: "moldbreaker", name: "Mold Breaker", rating: 3, num: 104 }, "moody": { desc: "At the end of each turn, the Pokemon raises a random stat that isn't already +6 by two stages, and lowers a random stat that isn't already -6 by one stage. These stats include accuracy and evasion.", shortDesc: "Boosts a random stat by 2 and lowers another stat by 1 at the end of each turn.", onResidualOrder: 26, onResidualSubOrder: 1, onResidual: function (pokemon) { var stats = [], i = ''; var boost = {}; for (var i in pokemon.boosts) { if (pokemon.boosts[i] < 6) { stats.push(i); } } if (stats.length) { i = stats[this.random(stats.length)]; boost[i] = 2; } stats = []; for (var j in pokemon.boosts) { if (pokemon.boosts[j] > -6 && j !== i) { stats.push(j); } } if (stats.length) { i = stats[this.random(stats.length)]; boost[i] = -1; } this.boost(boost); }, id: "moody", name: "Moody", rating: 5, num: 141 }, "motordrive": { desc: "This Pokemon is immune to all Electric-type moves (including Status moves). If hit by an Electric-type attack, its Speed increases by one stage.", shortDesc: "This Pokemon's Speed is boosted by 1 if hit by an Electric move; Electric immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Electric') { if (!this.boost({spe:1})) { this.add('-immune', target, '[msg]'); } return null; } }, id: "motordrive", name: "Motor Drive", rating: 3, num: 78 }, "moxie": { desc: "If this Pokemon knocks out another Pokemon with a damaging attack, its Attack is raised by one stage.", shortDesc: "This Pokemon's Attack is boosted by 1 if it attacks and faints another Pokemon.", onSourceFaint: function (target, source, effect) { if (effect && effect.effectType === 'Move') { this.boost({atk:1}, source); } }, id: "moxie", name: "Moxie", rating: 4, num: 153 }, "multiscale": { desc: "If this Pokemon is at full HP, it takes half damage from attacks.", shortDesc: "If this Pokemon is at full HP, it takes half damage from attacks.", onSourceModifyDamage: function (damage, source, target, move) { if (target.hp >= target.maxhp) { this.debug('Multiscale weaken'); return this.chainModify(0.5); } }, id: "multiscale", name: "Multiscale", rating: 4, num: 136 }, "multitype": { desc: "If this Pokemon is Arceus, its type and sprite change to match its held Plate. Either way, this Pokemon is holding a Plate, the Plate cannot be taken (such as by Trick or Thief). This ability cannot be Skill Swapped, Role Played or Traced.", shortDesc: "If this Pokemon is Arceus, its type changes to match its held Plate.", // Multitype's type-changing itself is implemented in statuses.js onTakeItem: function (item) { if (item.onPlate) return false; }, id: "multitype", name: "Multitype", rating: 4, num: 121 }, "mummy": { desc: "When the user is attacked by a contact move, the opposing Pokemon's ability is turned into Mummy as well. Multitype, Wonder Guard and Mummy itself are the only abilities not affected by Mummy. The effect of Mummy is not removed by Mold Breaker, Turboblaze, or Teravolt.", shortDesc: "Pokemon making contact with this Pokemon have their Ability changed to Mummy.", id: "mummy", name: "Mummy", onAfterDamage: function (damage, target, source, move) { if (source && source !== target && move && move.isContact) { if (source.setAbility('mummy', source, 'mummy', true)) { this.add('-ability', source, 'Mummy', '[from] Mummy'); } } }, rating: 1, num: 152 }, "naturalcure": { desc: "When this Pokemon switches out of battle, it is cured of poison (including Toxic), paralysis, burn, freeze and sleep (including self-induced Rest).", shortDesc: "This Pokemon has its status cured when it switches out.", onSwitchOut: function (pokemon) { pokemon.setStatus(''); }, id: "naturalcure", name: "Natural Cure", rating: 4, num: 30 }, "noguard": { desc: "Every attack used by or against this Pokemon will always hit, even during evasive two-turn moves such as Fly and Dig.", shortDesc: "Every move used by or against this Pokemon will always hit.", onAnyAccuracy: function (accuracy, target, source, move) { if (move && (source === this.effectData.target || target === this.effectData.target)) { return true; } return accuracy; }, id: "noguard", name: "No Guard", rating: 4, num: 99 }, "normalize": { desc: "Makes all of this Pokemon's attacks Normal-typed.", shortDesc: "This Pokemon's moves all become Normal-typed.", onModifyMove: function (move) { if (move.id !== 'struggle') { move.type = 'Normal'; } }, id: "normalize", name: "Normalize", rating: -1, num: 96 }, "oblivious": { desc: "This Pokemon cannot be infatuated (by Attract or Cute Charm) or taunted. Gaining this Ability while afflicted by either condition cures it.", shortDesc: "This Pokemon cannot be infatuated or taunted. Gaining this Ability cures it.", onUpdate: function (pokemon) { if (pokemon.volatiles['attract']) { pokemon.removeVolatile('attract'); this.add("-message", pokemon.name + " got over its infatuation. (placeholder)"); } if (pokemon.volatiles['taunt']) { pokemon.removeVolatile('taunt'); // TODO: Research proper message. this.add("-message", pokemon.name + " got over its taunt. (placeholder)"); } }, onImmunity: function (type, pokemon) { if (type === 'attract') { this.add('-immune', pokemon, '[from] Oblivious'); return false; } }, onTryHit: function (pokemon, target, move) { if (move.id === 'captivate' || move.id === 'taunt') { this.add('-immune', pokemon, '[msg]', '[from] Oblivious'); return null; } }, id: "oblivious", name: "Oblivious", rating: 0.5, num: 12 }, "overcoat": { desc: "In battle, the Pokemon does not take damage from weather conditions like Sandstorm or Hail. It is also immune to powder moves.", shortDesc: "This Pokemon is immune to residual weather damage, and powder moves.", onImmunity: function (type, pokemon) { if (type === 'sandstorm' || type === 'hail' || type === 'powder') return false; }, id: "overcoat", name: "Overcoat", rating: 2, num: 142 }, "overgrow": { desc: "When its health reaches one-third or less of its max HP, this Pokemon's Grass-type attacks receive a 50% boost in power.", shortDesc: "When this Pokemon has 1/3 or less of its max HP, its Grass attacks do 1.5x damage.", onModifyAtkPriority: 5, onModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Grass' && attacker.hp <= attacker.maxhp / 3) { this.debug('Overgrow boost'); return this.chainModify(1.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Grass' && attacker.hp <= attacker.maxhp / 3) { this.debug('Overgrow boost'); return this.chainModify(1.5); } }, id: "overgrow", name: "Overgrow", rating: 2, num: 65 }, "owntempo": { desc: "This Pokemon cannot be confused. Gaining this Ability while confused cures it.", shortDesc: "This Pokemon cannot be confused. Gaining this Ability while confused cures it.", onUpdate: function (pokemon) { if (pokemon.volatiles['confusion']) { pokemon.removeVolatile('confusion'); } }, onImmunity: function (type, pokemon) { if (type === 'confusion') { this.add('-immune', pokemon, 'confusion'); return false; } }, id: "owntempo", name: "Own Tempo", rating: 1, num: 20 }, "parentalbond": { desc: "Allows the Pokemon to hit twice with the same move in one turn. Second hit has 0.5x base power. Does not affect Status, multihit, or spread moves (in doubles).", shortDesc: "Hits twice in one turn. Second hit has 0.5x base power.", onModifyMove: function (move, pokemon, target) { if (move.category !== 'Status' && !move.selfdestruct && !move.multihit && ((target.side && target.side.active.length < 2) || move.target in {any:1, normal:1, randomNormal:1})) { move.multihit = 2; pokemon.addVolatile('parentalbond'); } }, effect: { duration: 1, onBasePowerPriority: 8, onBasePower: function (basePower) { if (this.effectData.hit) { return this.chainModify(0.5); } else { this.effectData.hit = true; } } }, id: "parentalbond", name: "Parental Bond", rating: 4.5, num: -6, gen: 6 }, "pickup": { desc: "If an opponent uses a consumable item, Pickup will give the Pokemon the item used, if it is not holding an item. If multiple Pickup Pokemon are in play, one will pick up a copy of the used Berry, and may or may not use it immediately. Works on Berries, Gems, Absorb Bulb, Focus Sash, Herbs, Cell Battery, Red Card, and anything that is thrown with Fling.", shortDesc: "If this Pokemon has no item, it finds one used by an adjacent Pokemon this turn.", onResidualOrder: 26, onResidualSubOrder: 1, onResidual: function (pokemon) { var foe = pokemon.side.foe.randomActive(); if (!foe) return; if (!pokemon.item && foe.lastItem && foe.usedItemThisTurn && foe.lastItem !== 'airballoon' && foe.lastItem !== 'ejectbutton') { pokemon.setItem(foe.lastItem); foe.lastItem = ''; var item = pokemon.getItem(); this.add('-item', pokemon, item, '[from] Pickup'); if (item.isBerry) pokemon.update(); } }, id: "pickup", name: "Pickup", rating: 0, num: 53 }, "pickpocket": { desc: "If this Pokemon has no item, it steals an item off an attacking Pokemon making contact.", shortDesc: "If this Pokemon has no item, it steals an item off a Pokemon making contact.", onAfterDamage: function (damage, target, source, move) { if (source && source !== target && move && move.isContact) { if (target.item) { return; } var yourItem = source.takeItem(target); if (!yourItem) { return; } if (!target.setItem(yourItem)) { source.item = yourItem.id; return; } this.add('-item', target, yourItem, '[from] ability: Pickpocket'); } }, id: "pickpocket", name: "Pickpocket", rating: 1, num: 124 }, "pixilate": { desc: "Turns all of this Pokemon's Normal-typed attacks into Fairy-type and deal 1.3x damage. Does not affect Hidden Power.", shortDesc: "This Pokemon's Normal moves become Fairy-type and do 1.3x damage.", onModifyMove: function (move, pokemon) { if (move.type === 'Normal' && move.id !== 'hiddenpower') { move.type = 'Fairy'; pokemon.addVolatile('pixilate'); } }, effect: { duration: 1, onBasePowerPriority: 8, onBasePower: function (basePower, pokemon, target, move) { return this.chainModify([0x14CD, 0x1000]); } }, id: "pixilate", name: "Pixilate", rating: 3, num: -6, gen: 6 }, "plus": { desc: "This Pokemon's Special Attack receives a 50% boost in double battles if a partner has the Plus or Minus ability.", shortDesc: "If an ally has the Ability Plus or Minus, this Pokemon's Sp. Atk is 1.5x.", onModifySpAPriority: 5, onModifySpA: function (spa, pokemon) { var allyActive = pokemon.side.active; if (allyActive.length === 1) { return; } for (var i = 0; i < allyActive.length; i++) { if (allyActive[i] && allyActive[i].position !== pokemon.position && !allyActive[i].fainted && allyActive[i].hasAbility(['minus', 'plus'])) { return this.chainModify(1.5); } } }, id: "plus", name: "Plus", rating: 0, num: 57 }, "poisonheal": { desc: "If this Pokemon becomes poisoned (including Toxic), it will recover 1/8 of its max HP after each turn.", shortDesc: "This Pokemon is healed by 1/8 of its max HP each turn when poisoned; no HP loss.", onDamage: function (damage, target, source, effect) { if (effect.id === 'psn' || effect.id === 'tox') { this.heal(target.maxhp / 8); return false; } }, id: "poisonheal", name: "Poison Heal", rating: 4, num: 90 }, "poisonpoint": { desc: "If an opponent contact attacks this Pokemon, there is a 30% chance that the opponent will become poisoned.", shortDesc: "30% chance of poisoning a Pokemon making contact with this Pokemon.", onAfterDamage: function (damage, target, source, move) { if (move && move.isContact) { if (this.random(10) < 3) { source.trySetStatus('psn', target, move); } } }, id: "poisonpoint", name: "Poison Point", rating: 2, num: 38 }, "poisontouch": { desc: "This Pokemon's contact attacks have a 30% chance of poisoning the target.", shortDesc: "This Pokemon's contact moves have a 30% chance of poisoning.", // upokecenter says this is implemented as an added secondary effect onModifyMove: function (move) { if (!move || !move.isContact) return; if (!move.secondaries) { move.secondaries = []; } move.secondaries.push({ chance: 30, status: 'psn' }); }, id: "poisontouch", name: "Poison Touch", rating: 2, num: 143 }, "prankster": { desc: "This Pokemon's Status moves have their priority increased by 1 stage.", shortDesc: "This Pokemon's Status moves have their priority increased by 1.", onModifyPriority: function (priority, pokemon, target, move) { if (move && move.category === 'Status') { return priority + 1; } }, id: "prankster", name: "Prankster", rating: 4.5, num: 158 }, "pressure": { desc: "If this Pokemon is the target of a foe's move, that move loses one additional PP.", shortDesc: "If this Pokemon is the target of a foe's move, that move loses one additional PP.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Pressure'); }, onSourceDeductPP: function (pp, target, source) { if (target.side === source.side) return; return pp + 1; }, id: "pressure", name: "Pressure", rating: 1.5, num: 46 }, "protean": { desc: "Right before this Pokemon uses a move, it changes its type to match that move. Hidden Power is interpreted as its Hidden Power type, rather than Normal.", shortDesc: "Right before this Pokemon uses a move, it changes its type to match that move.", onBeforeMove: function (pokemon, target, move) { if (!move || pokemon.volatiles.mustrecharge) return; var moveType = (move.id === 'hiddenpower' ? pokemon.hpType : move.type); if (pokemon.getTypes().join() !== moveType) { if (!pokemon.setType(moveType)) return false; this.add('-start', pokemon, 'typechange', moveType, '[from] Protean'); } }, id: "protean", name: "Protean", rating: 4, num: -6, gen: 6 }, "purepower": { desc: "This Pokemon's Attack stat is doubled. Note that this is the Attack stat itself, not the base Attack stat of its species.", shortDesc: "This Pokemon's Attack is doubled.", onModifyAtkPriority: 5, onModifyAtk: function (atk) { return this.chainModify(2); }, id: "purepower", name: "Pure Power", rating: 5, num: 74 }, "quickfeet": { desc: "When this Pokemon is poisoned (including Toxic), burned, paralyzed, asleep (including self-induced Rest) or frozen, its Speed stat receives a 50% boost; the paralysis status' Speed drop is also ignored.", shortDesc: "If this Pokemon is statused, its Speed is 1.5x; paralysis' Speed drop is ignored.", onModifySpe: function (speMod, pokemon) { if (pokemon.status) { return this.chain(speMod, 1.5); } }, id: "quickfeet", name: "Quick Feet", rating: 3, num: 95 }, "raindish": { desc: "If the weather is Rain Dance, this Pokemon recovers 1/16 of its max HP after each turn.", shortDesc: "If the weather is Rain Dance, this Pokemon heals 1/16 of its max HP each turn.", onWeather: function (target, source, effect) { if (effect.id === 'raindance') { this.heal(target.maxhp / 16); } }, id: "raindish", name: "Rain Dish", rating: 1.5, num: 44 }, "rattled": { desc: "Raises the user's Speed one stage when hit by a Dark-, Bug-, or Ghost-type move.", shortDesc: "This Pokemon gets +1 Speed if hit by a Dark-, Bug-, or Ghost-type attack.", onAfterDamage: function (damage, target, source, effect) { if (effect && (effect.type === 'Dark' || effect.type === 'Bug' || effect.type === 'Ghost')) { this.boost({spe:1}); } }, id: "rattled", name: "Rattled", rating: 2, num: 155 }, "reckless": { desc: "When this Pokemon uses an attack that causes recoil damage, or an attack that has a chance to cause recoil damage such as Jump Kick and High Jump Kick, the attacks's power receives a 20% boost.", shortDesc: "This Pokemon's attacks with recoil or crash damage do 1.2x damage; not Struggle.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (move.recoil || move.hasCustomRecoil) { this.debug('Reckless boost'); return this.chainModify(1.2); } }, id: "reckless", name: "Reckless", rating: 3, num: 120 }, "refrigerate": { desc: "Turns all of this Pokemon's Normal-typed attacks into Ice-typed and deal 1.3x damage. Does not affect Hidden Power.", shortDesc: "This Pokemon's Normal moves become Ice-type and do 1.3x damage.", onModifyMove: function (move, pokemon) { if (move.type === 'Normal' && move.id !== 'hiddenpower') { move.type = 'Ice'; pokemon.addVolatile('refrigerate'); } }, effect: { duration: 1, onBasePowerPriority: 8, onBasePower: function (basePower, pokemon, target, move) { return this.chainModify([0x14CD, 0x1000]); } }, id: "refrigerate", name: "Refrigerate", rating: 3, num: -6, gen: 6 }, "regenerator": { desc: "This Pokemon heals 1/3 of its max HP when it switches out.", shortDesc: "This Pokemon heals 1/3 of its max HP when it switches out.", onSwitchOut: function (pokemon) { pokemon.heal(pokemon.maxhp / 3); }, id: "regenerator", name: "Regenerator", rating: 4, num: 144 }, "rivalry": { desc: "This Pokemon's attacks do 1.25x damage if their target is the same gender, but 0.75x if their target is the opposite gender.", shortDesc: "This Pokemon's attacks do 1.25x on same gender targets; 0.75x on opposite gender.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (attacker.gender && defender.gender) { if (attacker.gender === defender.gender) { this.debug('Rivalry boost'); return this.chainModify(1.25); } else { this.debug('Rivalry weaken'); return this.chainModify(0.75); } } }, id: "rivalry", name: "Rivalry", rating: 0.5, num: 79 }, "rockhead": { desc: "This Pokemon does not receive recoil damage except from Struggle, Life Orb, or crash damage from Jump Kick or High Jump Kick.", shortDesc: "This Pokemon does not take recoil damage besides Struggle, Life Orb, crash damage.", onModifyMove: function (move) { delete move.recoil; }, id: "rockhead", name: "Rock Head", rating: 3, num: 69 }, "roughskin": { desc: "Causes recoil damage equal to 1/8 of the opponent's max HP if an opponent makes contact.", shortDesc: "This Pokemon causes other Pokemon making contact to lose 1/8 of their max HP.", onAfterDamageOrder: 1, onAfterDamage: function (damage, target, source, move) { if (source && source !== target && move && move.isContact) { this.damage(source.maxhp / 8, source, target); } }, id: "roughskin", name: "Rough Skin", rating: 3, num: 24 }, "runaway": { desc: "Unless this Pokemon is under the effects of a trapping move or ability, such as Mean Look or Shadow Tag, it will escape from wild Pokemon battles without fail.", shortDesc: "No competitive use.", id: "runaway", name: "Run Away", rating: 0, num: 50 }, "sandforce": { desc: "Raises the power of this Pokemon's Rock, Ground, and Steel-type moves by 1.3x if the weather is Sandstorm. This Pokemon is also immune to residual Sandstorm damage.", shortDesc: "This Pokemon's Rock/Ground/Steel attacks do 1.3x in Sandstorm; immunity to it.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (this.isWeather('sandstorm')) { if (move.type === 'Rock' || move.type === 'Ground' || move.type === 'Steel') { this.debug('Sand Force boost'); return this.chainModify([0x14CD, 0x1000]); // The Sand Force modifier is slightly higher than the normal 1.3 (0x14CC) } } }, onImmunity: function (type, pokemon) { if (type === 'sandstorm') return false; }, id: "sandforce", name: "Sand Force", rating: 2, num: 159 }, "sandrush": { desc: "This Pokemon's Speed is doubled if the weather is Sandstorm. This Pokemon is also immune to residual Sandstorm damage.", shortDesc: "If Sandstorm is active, this Pokemon's Speed is doubled; immunity to Sandstorm.", onModifySpe: function (speMod, pokemon) { if (this.isWeather('sandstorm')) { return this.chain(speMod, 2); } }, onImmunity: function (type, pokemon) { if (type === 'sandstorm') return false; }, id: "sandrush", name: "Sand Rush", rating: 2, num: 146 }, "sandstream": { desc: "When this Pokemon enters the battlefield, the weather becomes Sandstorm (for 5 turns normally, or 8 turns while holding Smooth Rock).", shortDesc: "On switch-in, the weather becomes Sandstorm.", onStart: function (source) { this.setWeather('sandstorm'); }, id: "sandstream", name: "Sand Stream", rating: 4.5, num: 45 }, "sandveil": { desc: "This Pokemon's Evasion is boosted by 1.25x if the weather is Sandstorm. This Pokemon is also immune to residual Sandstorm damage.", shortDesc: "If Sandstorm is active, this Pokemon's evasion is 1.25x; immunity to Sandstorm.", onImmunity: function (type, pokemon) { if (type === 'sandstorm') return false; }, onAccuracy: function (accuracy) { if (typeof accuracy !== 'number') return; if (this.isWeather('sandstorm')) { this.debug('Sand Veil - decreasing accuracy'); return accuracy * 0.8; } }, id: "sandveil", name: "Sand Veil", rating: 1.5, num: 8 }, "sapsipper": { desc: "This Pokemon is immune to Grass moves. If hit by a Grass move, its Attack is increased by one stage (once for each hit of Bullet Seed). Does not affect Aromatherapy.", shortDesc: "This Pokemon's Attack is boosted by 1 if hit by any Grass move; Grass immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Grass') { if (!this.boost({atk:1})) { this.add('-immune', target, '[msg]'); } return null; } }, id: "sapsipper", name: "Sap Sipper", rating: 3.5, num: 157 }, "scrappy": { desc: "This Pokemon has the ability to hit Ghost-type Pokemon with Normal-type and Fighting-type moves. Effectiveness of these moves takes into account the Ghost-type Pokemon's other weaknesses and resistances.", shortDesc: "This Pokemon can hit Ghost-types with Normal- and Fighting-type moves.", onModifyMove: function (move) { if (move.type in {'Fighting':1, 'Normal':1}) { move.affectedByImmunities = false; } }, id: "scrappy", name: "Scrappy", rating: 3, num: 113 }, "serenegrace": { desc: "This Pokemon's moves have their secondary effect chance doubled. For example, if this Pokemon uses Ice Beam, it will have a 20% chance to freeze its target.", shortDesc: "This Pokemon's moves have their secondary effect chance doubled.", onModifyMove: function (move) { if (move.secondaries) { this.debug('doubling secondary chance'); for (var i = 0; i < move.secondaries.length; i++) { move.secondaries[i].chance *= 2; } } }, id: "serenegrace", name: "Serene Grace", rating: 4, num: 32 }, "shadowtag": { desc: "When this Pokemon enters the field, its non-Ghost-type opponents cannot switch or flee the battle unless they have the same ability, are holding Shed Shell, or they use the moves Baton Pass or U-Turn.", shortDesc: "Prevents foes from switching out normally unless they also have this Ability.", onFoeModifyPokemon: function (pokemon) { if (!pokemon.hasAbility('shadowtag')) { pokemon.tryTrap(); } }, onFoeMaybeTrapPokemon: function (pokemon) { if (!pokemon.hasAbility('shadowtag')) { pokemon.maybeTrapped = true; } }, id: "shadowtag", name: "Shadow Tag", rating: 5, num: 23 }, "shedskin": { desc: "At the end of each turn, this Pokemon has a 33% chance to heal itself from poison (including Toxic), paralysis, burn, freeze or sleep (including self-induced Rest).", shortDesc: "This Pokemon has a 33% chance to have its status cured at the end of each turn.", onResidualOrder: 5, onResidualSubOrder: 1, onResidual: function (pokemon) { if (pokemon.hp && pokemon.status && this.random(3) === 0) { this.debug('shed skin'); this.add('-activate', pokemon, 'ability: Shed Skin'); pokemon.cureStatus(); } }, id: "shedskin", name: "Shed Skin", rating: 4, num: 61 }, "sheerforce": { desc: "Raises the base power of all moves that have any secondary effects by 30%, but the secondary effects are ignored. Some side effects of moves, such as recoil, draining, stat reduction, and switching out usually aren't considered secondary effects. If a Pokemon with Sheer Force is holding a Life Orb and uses an attack that would be boosted by Sheer Force, then the move gains both boosts and the user receives no Life Orb recoil (only if the attack is boosted by Sheer Force).", shortDesc: "This Pokemon's attacks with secondary effects do 1.3x damage; nullifies the effects.", onModifyMove: function (move, pokemon) { if (move.secondaries) { delete move.secondaries; move.negateSecondary = true; pokemon.addVolatile('sheerforce'); } }, effect: { duration: 1, onBasePowerPriority: 8, onBasePower: function (basePower, pokemon, target, move) { return this.chainModify([0x14CD, 0x1000]); // The Sheer Force modifier is slightly higher than the normal 1.3 (0x14CC) } }, id: "sheerforce", name: "Sheer Force", rating: 4, num: 125 }, "shellarmor": { desc: "Attacks targeting this Pokemon can't be critical hits.", shortDesc: "This Pokemon cannot be struck by a critical hit.", onCriticalHit: false, id: "shellarmor", name: "Shell Armor", rating: 1, num: 75 }, "shielddust": { desc: "If the opponent uses a move that has secondary effects that affect this Pokemon in addition to damage, the move's secondary effects will not trigger (For example, Ice Beam loses its 10% freeze chance).", shortDesc: "This Pokemon is not affected by the secondary effect of another Pokemon's attack.", onTrySecondaryHit: function () { this.debug('Shield Dust prevent secondary'); return null; }, id: "shielddust", name: "Shield Dust", rating: 2, num: 19 }, "simple": { desc: "This Pokemon doubles all of its positive and negative stat modifiers. For example, if this Pokemon uses Curse, its Attack and Defense stats increase by two stages and its Speed stat decreases by two stages.", shortDesc: "This Pokemon has its own stat boosts and drops doubled as they happen.", onBoost: function (boost) { for (var i in boost) { boost[i] *= 2; } }, id: "simple", name: "Simple", rating: 4, num: 86 }, "skilllink": { desc: "When this Pokemon uses an attack that strikes multiple times in one turn, such as Fury Attack or Spike Cannon, such attacks will always strike for the maximum number of hits.", shortDesc: "This Pokemon's multi-hit attacks always hit the maximum number of times.", onModifyMove: function (move) { if (move.multihit && move.multihit.length) { move.multihit = move.multihit[1]; } }, id: "skilllink", name: "Skill Link", rating: 4, num: 92 }, "slowstart": { desc: "After this Pokemon switches into the battle, its Attack and Speed stats are halved for five turns. For example, if this Pokemon has an Attack stat of 400, its Attack will be 200 until the effects of Slow Start wear off.", shortDesc: "On switch-in, this Pokemon's Attack and Speed are halved for 5 turns.", onStart: function (pokemon) { pokemon.addVolatile('slowstart'); }, effect: { duration: 5, onStart: function (target) { this.add('-start', target, 'Slow Start'); }, onModifyAtkPriority: 5, onModifyAtk: function (atk, pokemon) { if (!pokemon.hasAbility('slowstart')) { pokemon.removeVolatile('slowstart'); return; } return this.chainModify(0.5); }, onModifySpe: function (speMod, pokemon) { if (!pokemon.hasAbility('slowstart')) { pokemon.removeVolatile('slowstart'); return; } return this.chain(speMod, 0.5); }, onEnd: function (target) { this.add('-end', target, 'Slow Start'); } }, id: "slowstart", name: "Slow Start", rating: -2, num: 112 }, "sniper": { desc: "When this Pokemon lands a Critical Hit, the damage is increased to another 1.5x.", shortDesc: "If this Pokemon strikes with a critical hit, the damage is increased by 50%", onModifyDamage: function (damage, source, target, move) { if (move.crit) { this.debug('Sniper boost'); return this.chainModify(1.5); } }, id: "sniper", name: "Sniper", rating: 1, num: 97 }, "snowcloak": { desc: "This Pokemon's Evasion is boosted by 1.25x if the weather is Hail. This Pokemon is also immune to residual Hail damage.", shortDesc: "If Hail is active, this Pokemon's evasion is 1.25x; immunity to Hail.", onImmunity: function (type, pokemon) { if (type === 'hail') return false; }, onAccuracy: function (accuracy) { if (typeof accuracy !== 'number') return; if (this.isWeather('hail')) { this.debug('Snow Cloak - decreasing accuracy'); return accuracy * 0.8; } }, id: "snowcloak", name: "Snow Cloak", rating: 1, num: 81 }, "snowwarning": { desc: "When this Pokemon enters the battlefield, the weather becomes Hail (for 5 turns normally, or 8 turns while holding Icy Rock).", shortDesc: "On switch-in, the weather becomes Hail.", onStart: function (source) { this.setWeather('hail'); }, id: "snowwarning", name: "Snow Warning", rating: 4, num: 117 }, "solarpower": { desc: "If the weather is Sunny Day, this Pokemon's Special Attack is 1.5x, but it loses 1/8 of its max HP at the end of every turn.", shortDesc: "If Sunny Day is active, this Pokemon's Sp. Atk is 1.5x and loses 1/8 max HP per turn.", onModifySpAPriority: 5, onModifySpA: function (spa, pokemon) { if (this.isWeather('sunnyday')) { return this.chainModify(1.5); } }, onWeather: function (target, source, effect) { if (effect.id === 'sunnyday') { this.damage(target.maxhp / 8); } }, id: "solarpower", name: "Solar Power", rating: 1.5, num: 94 }, "solidrock": { desc: "Super-effective attacks only deal 3/4 their usual damage against this Pokemon.", shortDesc: "This Pokemon receives 3/4 damage from super effective attacks.", onSourceModifyDamage: function (damage, source, target, move) { if (this.getEffectiveness(move, target) > 0) { this.debug('Solid Rock neutralize'); return this.chainModify(0.75); } }, id: "solidrock", name: "Solid Rock", rating: 3, num: 116 }, "soundproof": { desc: "This Pokemon is immune to the effects of sound-based moves, which are: Bug Buzz, Chatter, Echoed Voice, Grasswhistle, Growl, Heal Bell, Hyper Voice, Metal Sound, Perish Song, Relic Song, Roar, Round, Screech, Sing, Snarl, Snore, Supersonic, and Uproar. This ability doesn't affect Heal Bell.", shortDesc: "This Pokemon is immune to sound-based moves, except Heal Bell.", onTryHit: function (target, source, move) { if (target !== source && move.isSoundBased) { this.add('-immune', target, '[msg]'); return null; } }, id: "soundproof", name: "Soundproof", rating: 2, num: 43 }, "speedboost": { desc: "At the end of every turn, this Pokemon's Speed increases by one stage (except the turn it switched in).", shortDesc: "This Pokemon's Speed is boosted by 1 at the end of each full turn on the field.", onResidualOrder: 26, onResidualSubOrder: 1, onResidual: function (pokemon) { if (pokemon.activeTurns) { this.boost({spe:1}); } }, id: "speedboost", name: "Speed Boost", rating: 4.5, num: 3 }, "stall": { desc: "This Pokemon moves last among Pokemon using the same or greater priority moves.", shortDesc: "This Pokemon moves last among Pokemon using the same or greater priority moves.", onModifyPriority: function (priority) { return priority - 0.1; }, id: "stall", name: "Stall", rating: -1, num: 100 }, "stancechange": { desc: "Only affects Aegislash. If this Pokemon uses a Physical or Special move, it changes to Blade forme. If this Pokemon uses King's Shield, it changes to Shield forme.", shortDesc: "The Pokemon changes form depending on how it battles.", onBeforeMovePriority: 10, onBeforeMove: function (attacker, defender, move) { if (attacker.template.baseSpecies !== 'Aegislash') return; if (move.category === 'Status' && move.id !== 'kingsshield') return; var targetSpecies = (move.id === 'kingsshield' ? 'Aegislash' : 'Aegislash-Blade'); if (attacker.template.species !== targetSpecies && attacker.formeChange(targetSpecies)) { this.add('-formechange', attacker, targetSpecies); } }, id: "stancechange", name: "Stance Change", rating: 4.5, num: -6, gen: 6 }, "static": { desc: "If an opponent contact attacks this Pokemon, there is a 30% chance that the opponent will become paralyzed.", shortDesc: "30% chance of paralyzing a Pokemon making contact with this Pokemon.", onAfterDamage: function (damage, target, source, effect) { if (effect && effect.isContact) { if (this.random(10) < 3) { source.trySetStatus('par', target, effect); } } }, id: "static", name: "Static", rating: 2, num: 9 }, "steadfast": { desc: "If this Pokemon flinches, its Speed increases by one stage.", shortDesc: "If this Pokemon flinches, its Speed is boosted by 1.", onFlinch: function (pokemon) { this.boost({spe: 1}); }, id: "steadfast", name: "Steadfast", rating: 1, num: 80 }, "stench": { desc: "This Pokemon's damaging moves that don't already have a flinch chance gain a 10% chance to cause flinch.", shortDesc: "This Pokemon's attacks without a chance to flinch have a 10% chance to flinch.", onModifyMove: function (move) { if (move.category !== "Status") { this.debug('Adding Stench flinch'); if (!move.secondaries) move.secondaries = []; for (var i = 0; i < move.secondaries.length; i++) { if (move.secondaries[i].volatileStatus === 'flinch') return; } move.secondaries.push({ chance: 10, volatileStatus: 'flinch' }); } }, id: "stench", name: "Stench", rating: 0, num: 1 }, "stickyhold": { desc: "This Pokemon cannot lose its held item due to another Pokemon's attack.", shortDesc: "This Pokemon cannot lose its held item due to another Pokemon's attack.", onTakeItem: function (item, pokemon, source) { if (source && source !== pokemon) return false; }, id: "stickyhold", name: "Sticky Hold", rating: 1, num: 60 }, "stormdrain": { desc: "During double battles, this Pokemon draws any single-target Water-type attack to itself. If an opponent uses an Water-type attack that affects multiple Pokemon, those targets will be hit. This ability does not affect Water Hidden Power, Judgment or Weather Ball. The user is immune to Water and its Special Attack is increased one stage when hit by one.", shortDesc: "This Pokemon draws Water moves to itself to boost Sp. Atk by 1; Water immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Water') { if (!this.boost({spa:1})) { this.add('-immune', target, '[msg]'); } return null; } }, onAnyRedirectTargetPriority: 1, onAnyRedirectTarget: function (target, source, source2, move) { if (move.type !== 'Water') return; if (this.validTarget(this.effectData.target, source, move.target)) { move.accuracy = true; return this.effectData.target; } }, id: "stormdrain", name: "Storm Drain", rating: 3.5, num: 114 }, "strongjaw": { desc: "This Pokemon receives a 50% power boost for jaw attacks such as Bite and Crunch.", shortDesc: "This Pokemon's bite-based attacks do 1.5x damage.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (move.isBiteAttack) { return this.chainModify(1.5); } }, id: "strongjaw", name: "Strong Jaw", rating: 3, num: -6, gen: 6 }, "sturdy": { desc: "This Pokemon is immune to OHKO moves, and will survive with 1 HP if hit by an attack which would KO it while at full health.", shortDesc: "If this Pokemon is at full HP, it lives one hit with at least 1HP. OHKO moves fail on it.", onDamagePriority: -100, onDamage: function (damage, target, source, effect) { if (effect && effect.ohko) { this.add('-activate', target, 'Sturdy'); return 0; } if (target.hp === target.maxhp && damage >= target.hp && effect && effect.effectType === 'Move') { this.add('-activate', target, 'Sturdy'); return target.hp - 1; } }, id: "sturdy", name: "Sturdy", rating: 3, num: 5 }, "suctioncups": { desc: "This Pokemon cannot be forced to switch out by another Pokemon's attack or item.", shortDesc: "This Pokemon cannot be forced to switch out by another Pokemon's attack or item.", onDragOutPriority: 1, onDragOut: function (pokemon) { this.add('-activate', pokemon, 'ability: Suction Cups'); return null; }, id: "suctioncups", name: "Suction Cups", rating: 2.5, num: 21 }, "superluck": { desc: "This Pokemon's critical hit ratio is boosted by 1.", shortDesc: "This Pokemon's critical hit ratio is boosted by 1.", onModifyMove: function (move) { move.critRatio++; }, id: "superluck", name: "Super Luck", rating: 1, num: 105 }, "swarm": { desc: "When its health reaches 1/3 or less of its max HP, this Pokemon's Bug-type attacks do 1.5x damage.", shortDesc: "When this Pokemon has 1/3 or less of its max HP, its Bug attacks do 1.5x damage.", onModifyAtkPriority: 5, onModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Bug' && attacker.hp <= attacker.maxhp / 3) { this.debug('Swarm boost'); return this.chainModify(1.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Bug' && attacker.hp <= attacker.maxhp / 3) { this.debug('Swarm boost'); return this.chainModify(1.5); } }, id: "swarm", name: "Swarm", rating: 2, num: 68 }, "sweetveil": { desc: "Prevents allies from being put to Sleep.", shortDesc: "Prevents allies from being put to Sleep.", id: "sweetveil", name: "Sweet Veil", onAllySetStatus: function (status, target, source, effect) { if (status.id === 'slp') { this.debug('Sweet Veil interrupts sleep'); return false; } }, onAllyTryHit: function (target, source, move) { if (move && move.id === 'yawn') { this.debug('Sweet Veil blocking yawn'); return false; } }, rating: 0, num: -6, gen: 6 }, "swiftswim": { desc: "If the weather is Rain Dance, this Pokemon's Speed is doubled.", shortDesc: "If the weather is Rain Dance, this Pokemon's Speed is doubled.", onModifySpe: function (speMod, pokemon) { if (this.isWeather('raindance')) { return this.chain(speMod, 2); } }, id: "swiftswim", name: "Swift Swim", rating: 2, num: 33 }, "symbiosis": { desc: "This Pokemon immediately passes its item to an ally after their item is consumed.", shortDesc: "This Pokemon passes its item to an ally after their item is consumed.", onAllyAfterUseItem: function (item, pokemon) { var sourceItem = this.effectData.target.takeItem(); if (!sourceItem) { return; } if (pokemon.setItem(sourceItem)) { this.add('-activate', pokemon, 'ability: Symbiosis', sourceItem, '[of] ' + this.effectData.target); } }, id: "symbiosis", name: "Symbiosis", rating: 0, num: -6, gen: 6 }, "synchronize": { desc: "If an opponent burns, poisons or paralyzes this Pokemon, it receives the same condition.", shortDesc: "If another Pokemon burns/poisons/paralyzes this Pokemon, it also gets that status.", onAfterSetStatus: function (status, target, source) { if (!source || source === target) return; if (status.id === 'slp' || status.id === 'frz') return; source.trySetStatus(status, target); }, id: "synchronize", name: "Synchronize", rating: 3, num: 28 }, "tangledfeet": { desc: "When this Pokemon is confused, attacks targeting it have a 50% chance of missing.", shortDesc: "This Pokemon's evasion is doubled as long as it is confused.", onAccuracy: function (accuracy, target) { if (typeof accuracy !== 'number') return; if (target && target.volatiles['confusion']) { this.debug('Tangled Feet - decreasing accuracy'); return accuracy * 0.5; } }, id: "tangledfeet", name: "Tangled Feet", rating: 1, num: 77 }, "technician": { desc: "When this Pokemon uses an attack that has 60 Base Power or less (including Struggle), the move's Base Power receives a 50% boost. For example, a move with 60 Base Power effectively becomes a move with 90 Base Power.", shortDesc: "This Pokemon's attacks of 60 Base Power or less do 1.5x damage. Includes Struggle.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (basePower <= 60) { this.debug('Technician boost'); return this.chainModify(1.5); } }, id: "technician", name: "Technician", rating: 4, num: 101 }, "telepathy": { desc: "This Pokemon will not take damage from its allies' spread moves in double and triple battles.", shortDesc: "This Pokemon does not take damage from its allies' attacks.", onTryHit: function (target, source, move) { if (target.side === source.side && move.category !== 'Status') { this.add('-activate', target, 'ability: Telepathy'); return null; } }, id: "telepathy", name: "Telepathy", rating: 0, num: 140 }, "teravolt": { desc: "When this Pokemon becomes active, it nullifies the abilities of opposing active Pokemon that hinder this Pokemon's attacks. These abilities include Battle Armor, Clear Body, Damp, Dry Skin, Filter, Flash Fire, Flower Gift, Heatproof, Hyper Cutter, Immunity, Inner Focus, Insomnia, Keen Eye, Leaf Guard, Levitate, Lightningrod, Limber, Magma Armor, Marvel Scale, Motor Drive, Oblivious, Own Tempo, Sand Veil, Shell Armor, Shield Dust, Simple, Snow Cloak, Solid Rock, Soundproof, Sticky Hold, Storm Drain, Sturdy, Suction Cups, Tangled Feet, Thick Fat, Unaware, Vital Spirit, Volt Absorb, Water Absorb, Water Veil, White Smoke and Wonder Guard.", shortDesc: "This Pokemon's moves ignore the target's Ability if it could modify the effectiveness.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Teravolt'); }, onAllyModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target && pokemon !== this.activePokemon) { pokemon.ignore['Ability'] = 'A'; } }, onFoeModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target) { pokemon.ignore['Ability'] = 'A'; } }, id: "teravolt", name: "Teravolt", rating: 3, num: 164 }, "thickfat": { desc: "This Pokemon receives half damage from Ice-type and Fire-type attacks.", shortDesc: "This Pokemon receives half damage from Fire- and Ice-type attacks.", onModifyAtkPriority: 6, onSourceModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Ice' || move.type === 'Fire') { this.debug('Thick Fat weaken'); return this.chainModify(0.5); } }, onModifySpAPriority: 5, onSourceModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Ice' || move.type === 'Fire') { this.debug('Thick Fat weaken'); return this.chainModify(0.5); } }, id: "thickfat", name: "Thick Fat", rating: 3, num: 47 }, "tintedlens": { desc: "This Pokemon's attacks that are not very effective on a target do double damage.", shortDesc: "This Pokemon's attacks that are not very effective on a target do double damage.", onModifyDamage: function (damage, source, target, move) { if (this.getEffectiveness(move, target) < 0) { this.debug('Tinted Lens boost'); return this.chainModify(2); } }, id: "tintedlens", name: "Tinted Lens", rating: 4, num: 110 }, "torrent": { desc: "When its health reaches 1/3 or less of its max HP, this Pokemon's Water-type attacks do 1.5x damage.", shortDesc: "When this Pokemon has 1/3 or less of its max HP, its Water attacks do 1.5x damage.", onModifyAtkPriority: 5, onModifyAtk: function (atk, attacker, defender, move) { if (move.type === 'Water' && attacker.hp <= attacker.maxhp / 3) { this.debug('Torrent boost'); return this.chainModify(1.5); } }, onModifySpAPriority: 5, onModifySpA: function (atk, attacker, defender, move) { if (move.type === 'Water' && attacker.hp <= attacker.maxhp / 3) { this.debug('Torrent boost'); return this.chainModify(1.5); } }, id: "torrent", name: "Torrent", rating: 2, num: 67 }, "toxicboost": { desc: "When this Pokemon is poisoned, its physical attacks do 1.5x damage.", shortDesc: "When this Pokemon is poisoned, its physical attacks do 1.5x damage.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if ((attacker.status === 'psn' || attacker.status === 'tox') && move.category === 'Physical') { return this.chainModify(1.5); } }, id: "toxicboost", name: "Toxic Boost", rating: 3, num: 137 }, "toughclaws": { desc: "This Pokemon's contact attacks do 1.33x damage.", shortDesc: "This Pokemon's contact attacks do 33% more damage.", onBasePowerPriority: 8, onBasePower: function (basePower, attacker, defender, move) { if (move.isContact) { return this.chainModify(1.33); } }, id: "toughclaws", name: "Tough Claws", rating: 3, num: -6, gen: 6 }, "trace": { desc: "When this Pokemon enters the field, it temporarily copies an opponent's ability. This ability remains with this Pokemon until it leaves the field.", shortDesc: "On switch-in, or when it can, this Pokemon copies a random adjacent foe's Ability.", onUpdate: function (pokemon) { var target = pokemon.side.foe.randomActive(); if (!target) return; var ability = this.getAbility(target.ability); var bannedAbilities = {flowergift:1, forecast:1, illusion:1, imposter:1, multitype:1, stancechange:1, trace:1, zenmode:1}; if (bannedAbilities[target.ability]) { return; } this.add('-ability', pokemon, ability, '[from] ability: Trace', '[of] ' + target); pokemon.setAbility(ability); }, id: "trace", name: "Trace", rating: 3.5, num: 36 }, "truant": { desc: "After this Pokemon is switched into battle, it skips every other turn.", shortDesc: "This Pokemon skips every other turn instead of using a move.", onBeforeMove: function (pokemon, target, move) { if (pokemon.removeVolatile('truant')) { this.add('cant', pokemon, 'ability: Truant', move); return false; } pokemon.addVolatile('truant'); }, onBeforeMovePriority: 99, effect: { duration: 2 }, id: "truant", name: "Truant", rating: -2, num: 54 }, "turboblaze": { desc: "When this Pokemon becomes active, it nullifies the abilities of opposing active Pokemon that hinder this Pokemon's attacks. These abilities include Battle Armor, Clear Body, Damp, Dry Skin, Filter, Flash Fire, Flower Gift, Heatproof, Hyper Cutter, Immunity, Inner Focus, Insomnia, Keen Eye, Leaf Guard, Levitate, Lightningrod, Limber, Magma Armor, Marvel Scale, Motor Drive, Oblivious, Own Tempo, Sand Veil, Shell Armor, Shield Dust, Simple, Snow Cloak, Solid Rock, Soundproof, Sticky Hold, Storm Drain, Sturdy, Suction Cups, Tangled Feet, Thick Fat, Unaware, Vital Spirit, Volt Absorb, Water Absorb, Water Veil, White Smoke and Wonder Guard.", shortDesc: "This Pokemon's moves ignore the target's Ability if it could modify the effectiveness.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Turboblaze'); }, onAllyModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target && pokemon !== this.activePokemon) { pokemon.ignore['Ability'] = 'A'; } }, onFoeModifyPokemon: function (pokemon) { if (this.activePokemon === this.effectData.target) { pokemon.ignore['Ability'] = 'A'; } }, id: "turboblaze", name: "Turboblaze", rating: 3, num: 163 }, "unaware": { desc: "This Pokemon ignores an opponent's stat boosts for Attack, Defense, Special Attack and Special Defense. These boosts will still affect Base Power calculation for Punishment and Stored Power.", shortDesc: "This Pokemon ignores other Pokemon's stat changes when taking or doing damage.", id: "unaware", name: "Unaware", onModifyMove: function (move, user, target) { move.ignoreEvasion = true; move.ignoreDefensive = true; }, onSourceModifyMove: function (move, user, target) { if (user.hasAbility(['moldbreaker', 'turboblaze', 'teravolt'])) return; move.ignoreAccuracy = true; move.ignoreOffensive = true; }, rating: 3, num: 109 }, "unburden": { desc: "Doubles this Pokemon's Speed if it loses its held item (such as by eating Berries, using Gems, or via Thief, Knock Off, etc).", shortDesc: "Speed is doubled on held item loss; boost is lost if it switches, gets new item/Ability.", onUseItem: function (item, pokemon) { pokemon.addVolatile('unburden'); }, onTakeItem: function (item, pokemon) { pokemon.addVolatile('unburden'); }, effect: { onModifySpe: function (speMod, pokemon) { if (!pokemon.hasAbility('unburden')) { pokemon.removeVolatile('unburden'); return; } if (!pokemon.item) { return this.chain(speMod, 2); } } }, id: "unburden", name: "Unburden", rating: 3.5, num: 84 }, "unnerve": { desc: "While this Pokemon is active, prevents opposing Pokemon from using their Berries.", shortDesc: "While this Pokemon is active, prevents opposing Pokemon from using their Berries.", onStart: function (pokemon) { this.add('-ability', pokemon, 'Unnerve', pokemon.side.foe); }, onFoeEatItem: false, id: "unnerve", name: "Unnerve", rating: 1, num: 127 }, "victorystar": { desc: "Raises every friendly Pokemon's Accuracy, including this Pokemon's, by 10% (multiplied).", shortDesc: "This Pokemon and its allies' moves have their accuracy boosted to 1.1x.", onAllyModifyMove: function (move) { if (typeof move.accuracy === 'number') { move.accuracy *= 1.1; } }, id: "victorystar", name: "Victory Star", rating: 2, num: 162 }, "vitalspirit": { desc: "This Pokemon cannot fall asleep (Rest will fail if it tries to use it). Gaining this Ability while asleep cures it.", shortDesc: "This Pokemon cannot fall asleep. Gaining this Ability while asleep cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'slp') { pokemon.cureStatus(); } }, onImmunity: function (type) { if (type === 'slp') return false; }, id: "vitalspirit", name: "Vital Spirit", rating: 2, num: 72 }, "voltabsorb": { desc: "This Pokemon is immune to Electric moves. If hit by an Electric move, it recovers 25% of its max HP.", shortDesc: "This Pokemon heals 1/4 of its max HP when hit by Electric moves; Electric immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Electric') { if (!this.heal(target.maxhp / 4)) { this.add('-immune', target, '[msg]'); } return null; } }, id: "voltabsorb", name: "Volt Absorb", rating: 3.5, num: 10 }, "waterabsorb": { desc: "This Pokemon is immune to Water moves. If hit by an Water move, it recovers 25% of its max HP.", shortDesc: "This Pokemon heals 1/4 of its max HP when hit by Water moves; Water immunity.", onTryHit: function (target, source, move) { if (target !== source && move.type === 'Water') { if (!this.heal(target.maxhp / 4)) { this.add('-immune', target, '[msg]'); } return null; } }, id: "waterabsorb", name: "Water Absorb", rating: 3.5, num: 11 }, "waterveil": { desc: "This Pokemon cannot become burned. Gaining this Ability while burned cures it.", shortDesc: "This Pokemon cannot be burned. Gaining this Ability while burned cures it.", onUpdate: function (pokemon) { if (pokemon.status === 'brn') { pokemon.cureStatus(); } }, onImmunity: function (type, pokemon) { if (type === 'brn') return false; }, id: "waterveil", name: "Water Veil", rating: 1.5, num: 41 }, "weakarmor": { desc: "Causes physical moves to lower the Pokemon's Defense and increase its Speed stat by one stage.", shortDesc: "If a physical attack hits this Pokemon, Defense is lowered 1 and Speed is boosted 1.", onAfterDamage: function (damage, target, source, move) { if (move.category === 'Physical') { this.boost({spe:1, def:-1}); } }, id: "weakarmor", name: "Weak Armor", rating: 0, num: 133 }, "whitesmoke": { desc: "Opponents cannot reduce this Pokemon's stats; they can, however, modify stat changes with Power Swap, Guard Swap and Heart Swap and inflict stat boosts with Swagger and Flatter. This ability does not prevent self-inflicted stat reductions. [Field Effect]\u00a0If this Pokemon is in the lead spot, the rate of wild Pokemon battles decreases by 50%.", shortDesc: "Prevents other Pokemon from lowering this Pokemon's stat stages.", onBoost: function (boost, target, source, effect) { if (source && target === source) return; var showMsg = false; for (var i in boost) { if (boost[i] < 0) { delete boost[i]; showMsg = true; } } if (showMsg && !effect.secondaries) this.add("-fail", target, "unboost", "[from] ability: White Smoke", "[of] " + target); }, id: "whitesmoke", name: "White Smoke", rating: 2, num: 73 }, "wonderguard": { desc: "This Pokemon only receives damage from attacks belonging to types that cause Super Effective to this Pokemon. Wonder Guard does not protect a Pokemon from status ailments (burn, freeze, paralysis, poison, sleep, Toxic or any of their side effects or damage), recoil damage nor the moves Beat Up, Bide, Doom Desire, Fire Fang, Future Sight, Hail, Leech Seed, Sandstorm, Spikes, Stealth Rock and Struggle. Wonder Guard cannot be Skill Swapped nor Role Played. Trace, however, does copy Wonder Guard.", shortDesc: "This Pokemon can only be damaged by super effective moves and indirect damage.", onTryHit: function (target, source, move) { if (target === source || move.category === 'Status' || move.type === '???' || move.id === 'struggle') return; this.debug('Wonder Guard immunity: ' + move.id); if (this.getEffectiveness(move, target) <= 0) { this.add('-activate', target, 'ability: Wonder Guard'); return null; } }, id: "wonderguard", name: "Wonder Guard", rating: 5, num: 25 }, "wonderskin": { desc: "Causes the chance of a status move working to be halved. It does not affect moves that inflict status as a secondary effect like Thunder's chance to paralyze.", shortDesc: "All status moves with a set % accuracy are 50% accurate if used on this Pokemon.", onAccuracyPriority: 10, onAccuracy: function (accuracy, target, source, move) { if (move.category === 'Status' && typeof move.accuracy === 'number') { this.debug('Wonder Skin - setting accuracy to 50'); return 50; } }, id: "wonderskin", name: "Wonder Skin", rating: 3, num: 147 }, "zenmode": { desc: "When Darmanitan's HP drops to below half, it will enter Zen Mode at the end of the turn. If it loses its ability, or recovers HP to above half while in Zen mode, it will change back. This ability only works on Darmanitan, even if it is copied by Role Play, Entrainment, or swapped with Skill Swap.", shortDesc: "If this Pokemon is Darmanitan, it changes to Zen Mode whenever it is below half HP.", onResidualOrder: 27, onResidual: function (pokemon) { if (pokemon.baseTemplate.species !== 'Darmanitan') { return; } if (pokemon.hp <= pokemon.maxhp / 2 && pokemon.template.speciesid === 'darmanitan'){ pokemon.addVolatile('zenmode'); } else if (pokemon.hp > pokemon.maxhp / 2 && pokemon.template.speciesid === 'darmanitanzen') { pokemon.removeVolatile('zenmode'); } }, effect: { onStart: function (pokemon) { if (pokemon.formeChange('Darmanitan-Zen')) { this.add('-formechange', pokemon, 'Darmanitan-Zen'); this.add('-message', 'Zen Mode triggered! (placeholder)'); } else { return false; } }, onEnd: function (pokemon) { if (pokemon.formeChange('Darmanitan')) { this.add('-formechange', pokemon, 'Darmanitan'); this.add('-message', 'Zen Mode ended! (placeholder)'); } else { return false; } }, onUpdate: function (pokemon) { if (!pokemon.hasAbility('zenmode')) { pokemon.transformed = false; pokemon.removeVolatile('zenmode'); } } }, id: "zenmode", name: "Zen Mode", rating: -1, num: 161 }, // CAP "mountaineer": { desc: "This Pokémon avoids all Rock-type attacks and hazards when switching in.", shortDesc: "On switch-in, this Pokemon avoids all Rock-type attacks and Stealth Rock.", onDamage: function (damage, target, source, effect) { if (effect && effect.id === 'stealthrock') { return false; } }, onImmunity: function (type, target) { if (type === 'Rock' && !target.activeTurns) { return false; } }, id: "mountaineer", isNonstandard: true, name: "Mountaineer", rating: 3.5, num: -2 }, "rebound": { desc: "It can reflect the effect of status moves when switching in.", shortDesc: "On switch-in, this Pokemon blocks certain status moves and uses the move itself.", id: "rebound", isNonstandard: true, name: "Rebound", onTryHitPriority: 1, onTryHit: function (target, source, move) { if (this.effectData.target.activeTurns) return; if (target === source) return; if (move.hasBounced) return; if (typeof move.isBounceable === 'undefined') { move.isBounceable = !!(move.category === 'Status' && (move.status || move.boosts || move.volatileStatus === 'confusion' || move.forceSwitch)); } if (move.isBounceable) { var newMove = this.getMoveCopy(move.id); newMove.hasBounced = true; this.useMove(newMove, target, source); return null; } }, onAllyTryHitSide: function (target, source, move) { if (this.effectData.target.activeTurns) return; if (target.side === source.side) return; if (move.hasBounced) return; if (typeof move.isBounceable === 'undefined') { move.isBounceable = !!(move.category === 'Status' && (move.status || move.boosts || move.volatileStatus === 'confusion' || move.forceSwitch)); } if (move.isBounceable) { var newMove = this.getMoveCopy(move.id); newMove.hasBounced = true; this.useMove(newMove, target, source); return null; } }, effect: { duration: 1 }, rating: 4, num: -3 }, "persistent": { desc: "Increases the duration of many field effects by two turns when used by this Pokémon.", shortDesc: "The duration of certain field effects is increased by 2 turns if used by this Pokemon.", id: "persistent", isNonstandard: true, name: "Persistent", // implemented in the corresponding move rating: 4, num: -4 } };
var Base = require("../base.js"); var C = require("../interface/constants.js"); var VSProgram = require("./vs-program.js"); var CLProgram = require("./cl-program.js"); /** * Data for a OperatorList, generated by an Executor * @constructor */ var ProgramData = function(){ /** * @type {Array.<ProgramInputConnection>} */ this.inputs = []; /** * * @type {Array.<DataSlot>} */ this.outputs = []; /** * iterateCount: How often we iterate with the default execution model * iterFlag: Per input: true if the input can be iterated, otherwise false * customData: Per instance data that users can persist between operator invocations * @type {Array.<{iterateCount: number, iterFlag: Array, customData: {}}>} */ this.operatorData = []; }; ProgramData.prototype.getChannel = function(index){ return this.inputs[index].channel; }; ProgramData.prototype.getDataEntry = function(index){ var entry = this.inputs[index]; var channel = entry.channel; if(!channel) return null; var key = 0; if(entry.sequenceKeySourceChannel){ var keyDataEntry = entry.sequenceKeySourceChannel.getDataEntry(); key = keyDataEntry && keyDataEntry._value ? keyDataEntry._value[0] : 0; } return channel.getDataEntry(entry.sequenceAccessType, key); }; /** * @constructor */ var ProgramInputConnection = function(){ /** * @type {Channel} */ this.channel = null; /** * Is this input a uniform array * @type {boolean} */ this.arrayAccess = false; /** * @type {C.SEQUENCE} */ this.sequenceAccessType = C.SEQUENCE.NO_ACCESS; /** * * @type {Channel|null} */ this.sequenceKeySourceChannel = null; }; /** * Hash-able key to identify equal inputs within executor * @returns {string} */ ProgramInputConnection.prototype.getKey = function(){ return (this.channel ? this.channel.id : "NULL") + ";" + this.arrayAccess + ";" + this.sequenceAccessType + ";" + ( this.sequenceKeySourceChannel ? this.sequenceKeySourceChannel.id : ""); }; var c_program_cache = {}; var createProgram = function(operatorList){ var firstOperator; if(operatorList.entries.length === 0) { return null; } firstOperator = operatorList.entries[0].operator; var key = operatorList.getKey(); if(!c_program_cache[key]){ // GLSL operators are implemented in a different way, so platform information is fetched from the operatorList // as a fallback mode to not break the old implementations if(operatorList.platform === C.PLATFORM.GLSL){ c_program_cache[key] = new VSProgram(operatorList); } else if (firstOperator.platform === C.PLATFORM.CL) { c_program_cache[key] = new CLProgram(operatorList); }else if(firstOperator.platform === C.PLATFORM.JAVASCRIPT && operatorList.entries.length === 1 ) { c_program_cache[key] = new SingleProgram(operatorList); }else { Base.notifyError("Could not create program from operatorList"); } } return c_program_cache[key]; }; var SingleProgram = function(operatorList){ this.list = operatorList; this.entry = operatorList.entries[0]; this.operator = this.entry.operator; this._inlineLoop = null; }; SingleProgram.prototype.run = function(programData, asyncCallback){ var operatorData = prepareOperatorData(this.list, 0, programData); if(asyncCallback) applyAsyncOperator(this.entry, programData, operatorData, asyncCallback); else if(this.operator.evaluate_core){ applyCoreOperation(this, programData, operatorData); } else{ applyDefaultOperation(this.entry, programData, operatorData); } }; function applyDefaultOperation(entry, programData, operatorData){ var args = assembleFunctionArgs(entry, programData); args.push(operatorData); entry.operator.evaluate.apply(operatorData, args); handlePostProcessOutput(entry, programData, args, false); } function applyAsyncOperator(entry, programData, operatorData, asyncCallback){ var args = assembleFunctionArgs(entry, programData, true); args.push(operatorData); args.push(function(){ handlePostProcessOutput(entry, programData, args, true); asyncCallback(); }); entry.operator.evaluate_async.apply(operatorData, args); } function applyCoreOperation(program, programData, operatorData){ var args = assembleFunctionArgs(program.entry, programData); args.push(operatorData.iterateCount); if(!program._inlineLoop){ program._inlineLoop = createOperatorInlineLoop(program.operator, operatorData); } program._inlineLoop.apply(operatorData, args); } var c_VarPattern = /var\s+(.)+[;\n]/; var c_InnerVarPattern = /[^=,\s]+\s*(=[^,]+)?(,)?/; function createOperatorInlineLoop(operator, operatorData){ var code = "function ("; var funcData = parseFunction(operator.evaluate_core); code += funcData.args.join(",") + ",__xflowMax) {\n"; code += " var __xflowI = __xflowMax\n" + " while(__xflowI--){\n"; var body = funcData.body; body = replaceArrayAccess(body, funcData.args, operator, operatorData); code += body + "\n }\n}"; var inlineFunc = eval("(" + code + ")"); return inlineFunc; } var c_FunctionPattern = /function\s*([^(]*)\(([^)]*)\)\s*\{([\s\S]*)\}/; function parseFunction(func){ var result = {}; var matches = func.toString().match(c_FunctionPattern); if(!matches){ Base.notifyError("Xflow Internal: Could not parse function: " + func); return null; } result.args = matches[2].split(","); for(var i in result.args) result.args[i] = result.args[i].trim(); result.body = matches[3]; return result; } var c_bracketPattern = /([a-zA-Z_$][\w$]*)(\[)/; function replaceArrayAccess(code, args, operator, operatorData){ var result = ""; var index = 0, bracketIndex = code.indexOf("[", index); while(bracketIndex != -1){ var key = code.substr(index).match(c_bracketPattern)[1]; var argIdx = args.indexOf(key); var addIndex = false, tupleCnt = 0; if(argIdx != -1){ if(argIdx < operator.outputs.length){ addIndex = true; tupleCnt = C.DATA_TYPE_TUPLE_SIZE[[operator.outputs[argIdx].type]]; } else{ var i = argIdx - operator.outputs.length; addIndex = operatorData.iterFlag[i]; tupleCnt = C.DATA_TYPE_TUPLE_SIZE[operator.mapping[i].internalType]; } } result += code.substring(index, bracketIndex) + "["; if(addIndex){ result += tupleCnt + "*__xflowI + "; } index = bracketIndex + 1; bracketIndex = code.indexOf("[", index); } result += code.substring(index); return result; } function prepareOperatorData(list, idx, programData){ var data = programData.operatorData[0]; var entry = list.entries[idx]; var mapping = entry.operator.mapping; data.iterFlag = {}; for(var i = 0; i < mapping.length; ++i){ var doIterate = (entry.isTransferInput(i) || list.isInputIterate(entry.getDirectInputIndex(i))); data.iterFlag[i] = doIterate; } data.iterateCount = list.getIterateCount(programData); if(!data.customData) data.customData = {}; return data; } function assembleFunctionArgs(entry, programData, async){ var args = []; var outputs = entry.operator.outputs; for(var i = 0; i < outputs.length; ++i){ if(outputs[i].noAlloc){ args.push({assign: null}); } else{ var dataSlot = programData.outputs[entry.getOutputIndex(i)]; var dataEntry = async ? dataSlot.asyncDataEntry : dataSlot.dataEntry; args.push(dataEntry ? dataEntry.getValue() : null); } } addInputToArgs(args, entry, programData); return args; } function handlePostProcessOutput(entry, programData, parameters, async){ var outputs = entry.operator.outputs; for(var i = 0; i < outputs.length; ++i){ var dataSlot = programData.outputs[entry.getOutputIndex(i)]; if(outputs[i].noAlloc){ var dataEntry = async ? dataSlot.asyncDataEntry : dataSlot.dataEntry; if(dataEntry.type == C.DATA_TYPE.TEXTURE ){ dataEntry._setImage(parameters[i].assign); } else{ dataEntry._setValue(parameters[i].assign); } } if(async){ dataSlot.swapAsync(); } } } function addInputToArgs(args, entry, programData){ var mapping = entry.operator.mapping; for(var i = 0; i < mapping.length; ++i){ var mapEntry = mapping[i]; var dataEntry = programData.getDataEntry(entry.getDirectInputIndex(i)); args.push(dataEntry ? dataEntry.getValue() : null); } } module.exports = { createProgram: createProgram, ProgramData: ProgramData, ProgramInputConnection: ProgramInputConnection };
/*--------------------------------------------------------------- :: sails-mongo -> adapter ---------------------------------------------------------------*/ var util = require('util'); var async = require('async'); var _ = require('@sailshq/lodash'); var ObjectId = require('mongodb').ObjectID; var Errors = require('waterline-errors').adapter; var _runJoins = require('waterline-cursor'); var Connection = require('./connection'); var Collection = require('./collection'); var utils = require('./utils'); module.exports = (function() { // Keep track of all the connections used by the app var connections = {}; var adapter = { // Which type of primary key is used by default pkFormat: 'string', // to track schema internally syncable: true, // Expose all the connection options with default settings defaults: { // Connection Configuration host: 'localhost', database: 'sails', port: 27017, user: null, password: null, schema: false, // Allow a URL Config String url: null, // DB Options w: 1, wtimeout: 0, fsync: false, journal: false, readPreference: null, nativeParser: false, forceServerObjectId: false, recordQueryStats: false, retryMiliSeconds: 5000, numberOfRetries: 5, // Server Options ssl: false, poolSize: 5, socketOptions: { noDelay: true, keepAlive: 0, connectTimeoutMS: 0, socketTimeoutMS: 0 }, auto_reconnect: true, disableDriverBSONSizeCheck: false, reconnectTries: 30, // defaults to mongodb recommended settings reconnectInterval: 1000, // defaults to mongodb recommended settings // Waterline NEXT // These are flags that can be toggled today and expose future features. If any of the following are turned // on the adapter tests will probably not pass. If you toggle these know what you are getting into. wlNext: { // Case sensitive - false // In the next version of WL queries will be case sensitive by default. // Set this to true to experiment with that feature today. caseSensitive: false } }, /** * Register A Connection * * Will open up a new connection using the configuration provided and store the DB * object to run commands off of. This creates a new pool for each connection config. * * @param {Object} connection * @param {Object} collections * @param {Function} callback */ registerConnection: function(connection, collections, cb) { if(!connection.identity) return cb(Errors.IdentityMissing); if(connections[connection.identity]) return cb(Errors.IdentityDuplicate); // Merging default options connection = _.defaults(connection, this.defaults); // Store the connection connections[connection.identity] = { config: connection, collections: {} }; // Create a new active connection new Connection(connection, function(_err, db) { if(_err) { return cb((function _createError(){ var msg = util.format('Failed to connect to MongoDB. Are you sure your configured Mongo instance is running?\n Error details:\n%s', util.inspect(_err, false, null)); var err = new Error(msg); err.originalError = _err; return err; })()); } connections[connection.identity].connection = db; // Build up a registry of collections Object.keys(collections).forEach(function(key) { connections[connection.identity].collections[key] = new Collection(collections[key], db); }); cb(); }); }, /** * Teardown * * Closes the connection pool and removes the connection object from the registry. * * @param {String} connectionName * @param {Function} callback */ teardown: function (conn, cb) { if (typeof conn == 'function') { cb = conn; conn = null; } if (conn === null) { var _connections = _.pluck(_.values(connections), 'connection'); if(!_connections.length) { return cb(); } var dbs = _.pluck(_connections, 'db'); if(!dbs.length) { return cb(); } connections = {}; return async.each(dbs, function (db, onClosed) { if(db === undefined) { return onClosed(); } db.close(onClosed); }, cb); } if(!connections[conn]) return cb(); var dbConnection = connections[conn].connection.db; dbConnection.close(function () { delete connections[conn]; cb(); }); }, /** * Describe * * Return the Schema of a collection after first creating the collection * and indexes if they don't exist. * * @param {String} connectionName * @param {String} collectionName * @param {Function} callback */ describe: function(connectionName, collectionName, cb) { var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; var schema = collection.schema; var names = connectionObject.connection.db.listCollections(collectionName); if(names.length > 0) return cb(null, schema); cb(); }, /** * Define * * Create a new Mongo Collection and set Index Values * * @param {String} connectionName * @param {String} collectionName * @param {Object} definition * @param {Function} callback */ define: function(connectionName, collectionName, definition, cb) { var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Create the collection and indexes connectionObject.connection.createCollection(collectionName, collection, cb); }, /** * Drop * * Drop a Collection * * @param {String} connectionName * @param {String} collectionName * @param {Array} relations * @param {Function} callback */ drop: function(connectionName, collectionName, relations, cb) { if(typeof relations === 'function') { cb = relations; relations = []; } var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Drop the collection and indexes connectionObject.connection.dropCollection(collectionName, function(err) { // Don't error if droping a collection which doesn't exist if(err && err.errmsg === 'ns not found') return cb(); if(err) return cb(err); cb(); }); }, /** * Native * * Give access to a native mongo collection object for running custom * queries. * * @param {String} connectionName * @param {String} collectionName * @param {Function} callback */ native: function(connectionName, collectionName, cb) { var connectionObject = connections[connectionName]; cb(null, connectionObject.connection.db.collection(collectionName)); }, /** * Mongo object with mongoDB native methods */ mongo: { /** * ObjectId * * Return a Mongo ObjectID from a string * * @param {String} id */ objectId: function(id){ if(!id) return null; try { return new ObjectId(id); } catch(err) { return null; } } }, /** * Create * * Insert a single document into a collection. * * @param {String} connectionName * @param {String} collectionName * @param {Object} data * @param {Function} callback */ create: function(connectionName, collectionName, data, cb) { var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Insert a new document into the collection collection.insert(data, function(err, results) { if(err) return cb(utils.clarifyError(err)); cb(null, results[0]); }); }, /** * Create Each * * Insert an array of documents into a collection. * * @param {String} connectionName * @param {String} collectionName * @param {Object} data * @param {Function} callback */ createEach: function(connectionName, collectionName, data, cb) { if (data.length === 0) {return cb(null, []);} var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Insert a new document into the collection collection.insert(data, function(err, results) { if(err) return cb(utils.clarifyError(err)); cb(null, results); }); }, /** * Find * * Find all matching documents in a collection. * * @param {String} connectionName * @param {String} collectionName * @param {Object} options * @param {Function} callback */ find: function(connectionName, collectionName, options, cb) { options = options || {}; var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Find all matching documents collection.find(options, function(err, results) { if(err) return cb(err); cb(null, results); }); }, /** * Update * * Update all documents matching a criteria object in a collection. * * @param {String} connectionName * @param {String} collectionName * @param {Object} options * @param {Object} values * @param {Function} callback */ update: function(connectionName, collectionName, options, values, cb) { options = options || {}; var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Update matching documents collection.update(options, values, function(err, results) { if(err) return cb(utils.clarifyError(err)); cb(null, results); }); }, /** * Destroy * * Destroy all documents matching a criteria object in a collection. * * @param {String} connectionName * @param {String} collectionName * @param {Object} options * @param {Function} callback */ destroy: function(connectionName, collectionName, options, cb) { options = options || {}; var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Find matching documents collection.find(options, function(err, results) { if(err) return cb(err); // Destroy matching documents collection.destroy(options, function(err) { if(err) return cb(err); cb(null, results); }); }); }, /** * Count * * Return a count of the number of records matching a criteria. * * @param {String} connectionName * @param {String} collectionName * @param {Object} options * @param {Function} callback */ count: function(connectionName, collectionName, options, cb) { options = options || {}; var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Find matching documents and return the count collection.count(options, function(err, results) { if(err) return cb(err); cb(null, results); }); }, /** * Join * * Peforms a join between 2-3 mongo collections when Waterline core * needs to satisfy a `.populate()`. * * @param {[type]} connectionName [description] * @param {[type]} collectionName [description] * @param {[type]} criteria [description] * @param {Function} cb [description] * @return {[type]} [description] */ join: function (connectionName, collectionName, criteria, cb) { // Ignore `select` from waterline core if (typeof criteria === 'object') { delete criteria.select; } var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; // Populate associated records for each parent result // (or do them all at once as an optimization, if possible) _runJoins({ instructions: criteria, parentCollection: collectionName, /** * Find some records directly (using only this adapter) * from the specified collection. * * @param {String} collectionIdentity * @param {Object} criteria * @param {Function} cb */ $find: function (collectionIdentity, criteria, cb) { var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionIdentity]; return collection.find(criteria, cb); }, /** * Look up the name of the primary key field * for the collection with the specified identity. * * @param {String} collectionIdentity * @return {String} */ $getPK: function (collectionIdentity) { if (!collectionIdentity) return; var connectionObject = connections[connectionName]; if (!connectionObject) { throw new Error('Consistency violation in sails-mongo: Unrecognized datastore (i.e. connection): `'+connectionName+'`.'); } var collection = connectionObject.collections[collectionIdentity]; if (!collection) { throw new Error('Consistency violation in sails-mongo: Unrecognized collection: `'+collectionIdentity+'` in datastore (i.e. connection): `'+connectionName+'`.'); } return collection._getPK(); } }, cb); }, /** * Stream * * Stream one or more documents from the collection * using where, limit, skip, and order * In where: handle `or`, `and`, and `like` queries * * @param {String} connectionName * @param {String} collectionName * @param {Object} options * @param {Object} stream */ stream: function(connectionName, collectionName, options, stream) { options = options || {}; var connectionObject = connections[connectionName]; var collection = connectionObject.collections[collectionName]; collection.stream(options, stream); }, identity: 'sails-mongo' }; return adapter; })();
import { Meteor } from 'meteor/meteor'; import { hasPermission } from '../../../authorization'; import { Imports } from '../../../models'; import { Importers } from '..'; Meteor.methods({ getImportProgress() { if (!Meteor.userId()) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'getImportProgress' }); } if (!hasPermission(Meteor.userId(), 'run-import')) { throw new Meteor.Error('error-action-not-allowed', 'Importing is not allowed', { method: 'setupImporter' }); } const operation = Imports.findLastImport(); if (!operation) { throw new Meteor.Error('error-operation-not-found', 'Import Operation Not Found', { method: 'getImportProgress' }); } const { importerKey } = operation; const importer = Importers.get(importerKey); if (!importer) { throw new Meteor.Error('error-importer-not-defined', `The importer (${ importerKey }) has no import class defined.`, { method: 'getImportProgress' }); } importer.instance = new importer.importer(importer, operation); // eslint-disable-line new-cap return importer.instance.getProgress(); }, });
/* * Copyright © 2017 Regular Labs - All Rights Reserved * License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ (function($){$(document).ready(function(){$(".rl_multiselect").each(function(){var controls=$(this).find("div.rl_multiselect-controls");var list=$(this).find("ul.rl_multiselect-ul");var menu=$(this).find("div.rl_multiselect-menu-block").html();var maxheight=list.css("max-height");list.find("li").each(function(){var $li=$(this);var $div=$li.find("div.rl_multiselect-item:first");$li.prepend('<span class="pull-left icon-"></span>');$div.after('<div class="clearfix"></div>');if($li.find("ul.rl_multiselect-sub").length){$li.find("span.icon-").addClass("rl_multiselect-toggle icon-minus"); $div.find("label:first").after(menu);if(!$li.find("ul.rl_multiselect-sub ul.rl_multiselect-sub").length)$li.find("div.rl_multiselect-menu-expand").remove()}});list.find("span.rl_multiselect-toggle").click(function(){var $icon=$(this);if($icon.parent().find("ul.rl_multiselect-sub").is(":visible")){$icon.removeClass("icon-minus").addClass("icon-plus");$icon.parent().find("ul.rl_multiselect-sub").hide();$icon.parent().find("ul.rl_multiselect-sub span.rl_multiselect-toggle").removeClass("icon-minus").addClass("icon-plus")}else{$icon.removeClass("icon-plus").addClass("icon-minus"); $icon.parent().find("ul.rl_multiselect-sub").show();$icon.parent().find("ul.rl_multiselect-sub span.rl_multiselect-toggle").removeClass("icon-plus").addClass("icon-minus")}});controls.find("input.rl_multiselect-filter").keyup(function(){var $text=$(this).val().toLowerCase();list.find("li").each(function(){var $li=$(this);if($li.text().toLowerCase().indexOf($text)==-1)$li.hide();else $li.show()})});controls.find("a.rl_multiselect-checkall").click(function(){list.find("input").prop("checked",true)}); controls.find("a.rl_multiselect-uncheckall").click(function(){list.find("input").prop("checked",false)});controls.find("a.rl_multiselect-toggleall").click(function(){list.find("input").each(function(){var $input=$(this);if($input.prop("checked"))$input.prop("checked",false);else $input.prop("checked",true)})});controls.find("a.rl_multiselect-expandall").click(function(){list.find("ul.rl_multiselect-sub").show();list.find("span.rl_multiselect-toggle").removeClass("icon-plus").addClass("icon-minus")}); controls.find("a.rl_multiselect-collapseall").click(function(){list.find("ul.rl_multiselect-sub").hide();list.find("span.rl_multiselect-toggle").removeClass("icon-minus").addClass("icon-plus")});controls.find("a.rl_multiselect-showall").click(function(){list.find("li").show()});controls.find("a.rl_multiselect-showselected").click(function(){list.find("li").each(function(){var $li=$(this);var $hide=true;$li.find("input").each(function(){if($(this).prop("checked")){$hide=false;return false}});if($hide){$li.hide(); return}$li.show()})});controls.find("a.rl_multiselect-maximize").click(function(){list.css("max-height","");controls.find("a.rl_multiselect-maximize").hide();controls.find("a.rl_multiselect-minimize").show()});controls.find("a.rl_multiselect-minimize").click(function(){list.css("max-height",maxheight);controls.find("a.rl_multiselect-minimize").hide();controls.find("a.rl_multiselect-maximize").show()})});$("div.rl_multiselect a.checkall").click(function(){$(this).parent().parent().parent().parent().parent().parent().find("ul.rl_multiselect-sub input").prop("checked", true)});$("div.rl_multiselect a.uncheckall").click(function(){$(this).parent().parent().parent().parent().parent().parent().find("ul.rl_multiselect-sub input").prop("checked",false)});$("div.rl_multiselect a.expandall").click(function(){var $parent=$(this).parent().parent().parent().parent().parent().parent().parent();$parent.find("ul.rl_multiselect-sub").show();$parent.find("ul.rl_multiselect-sub span.rl_multiselect-toggle").removeClass("icon-plus").addClass("icon-minus")});$("div.rl_multiselect a.collapseall").click(function(){var $parent= $(this).parent().parent().parent().parent().parent().parent().parent();$parent.find("li ul.rl_multiselect-sub").hide();$parent.find("li span.rl_multiselect-toggle").removeClass("icon-minus").addClass("icon-plus")});$("div.rl_multiselect-item.hidechildren").click(function(){var $parent=$(this).parent();$(this).find("input").each(function(){var $sub=$parent.find("ul.rl_multiselect-sub").first();var $input=$(this);if($input.prop("checked")){$parent.find("span.rl_multiselect-toggle, div.rl_multiselect-menu").css("visibility", "hidden");if(!$sub.parent().hasClass("hidelist"))$sub.wrap('<div style="display:none;" class="hidelist"></div>')}else{$parent.find("span.rl_multiselect-toggle, div.rl_multiselect-menu").css("visibility","visible");if($sub.parent().hasClass("hidelist"))$sub.unwrap()}})})})})(jQuery);
import Embed from '../blots/embed'; import Quill from '../core/quill'; import Module from '../core/module'; class FormulaBlot extends Embed { static create(value) { let node = super.create(value); if (typeof value === 'string') { window.katex.render(value, node); node.setAttribute('data-value', value); } return node; } static value(domNode) { return domNode.getAttribute('data-value'); } } FormulaBlot.blotName = 'formula'; FormulaBlot.className = 'ql-formula'; FormulaBlot.tagName = 'SPAN'; class Formula extends Module { static register() { Quill.register(FormulaBlot, true); } constructor() { super(); if (window.katex == null) { throw new Error('Formula module requires KaTeX.'); } } } export { FormulaBlot, Formula as default };
jasmine.TrivialReporter = function(doc) { this.document = doc || document; this.suiteDivs = {}; this.logRunningSpecs = false; }; jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) { var el = document.createElement(type); for (var i = 2; i < arguments.length; i++) { var child = arguments[i]; if (typeof child === 'string') { el.appendChild(document.createTextNode(child)); } else { if (child) { el.appendChild(child); } } } for (var attr in attrs) { if (attr == "className") { el[attr] = attrs[attr]; } else { el.setAttribute(attr, attrs[attr]); } } return el; }; jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) { var showPassed, showSkipped; this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' }, this.createDom('div', { className: 'banner' }, this.createDom('div', { className: 'logo' }, this.createDom('span', { className: 'title' }, "Jasmine"), this.createDom('span', { className: 'version' }, runner.env.versionString())), this.createDom('div', { className: 'options' }, "Show ", showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }), this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "), showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }), this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped") ) ), this.runnerDiv = this.createDom('div', { className: 'runner running' }, this.createDom('a', { className: 'run_spec', href: '?' }, "run all"), this.runnerMessageSpan = this.createDom('span', {}, "Running..."), this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, "")) ); this.document.body.appendChild(this.outerDiv); var suites = runner.suites(); for (var i = 0; i < suites.length; i++) { var suite = suites[i]; var suiteDiv = this.createDom('div', { className: 'suite' }, this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"), this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description)); this.suiteDivs[suite.id] = suiteDiv; var parentDiv = this.outerDiv; if (suite.parentSuite) { parentDiv = this.suiteDivs[suite.parentSuite.id]; } parentDiv.appendChild(suiteDiv); } this.startedAt = new Date(); var self = this; showPassed.onclick = function(evt) { if (showPassed.checked) { self.outerDiv.className += ' show-passed'; } else { self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, ''); } }; showSkipped.onclick = function(evt) { if (showSkipped.checked) { self.outerDiv.className += ' show-skipped'; } else { self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, ''); } }; }; jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) { var results = runner.results(); var className = (results.failedCount > 0) ? "runner failed" : "runner passed"; this.runnerDiv.setAttribute("class", className); //do it twice for IE this.runnerDiv.setAttribute("className", className); var specs = runner.specs(); var specCount = 0; for (var i = 0; i < specs.length; i++) { if (this.specFilter(specs[i])) { specCount++; } } var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s"); message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s"; this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild); this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString())); }; jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) { var results = suite.results(); var status = results.passed() ? 'passed' : 'failed'; if (results.totalCount === 0) { // todo: change this to check results.skipped status = 'skipped'; } this.suiteDivs[suite.id].className += " " + status; }; jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) { if (this.logRunningSpecs) { this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...'); } }; jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) { var results = spec.results(); var status = results.passed() ? 'passed' : 'failed'; if (results.skipped) { status = 'skipped'; } var specDiv = this.createDom('div', { className: 'spec ' + status }, this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"), this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(spec.getFullName()), title: spec.getFullName() }, spec.description)); var resultItems = results.getItems(); var messagesDiv = this.createDom('div', { className: 'messages' }); for (var i = 0; i < resultItems.length; i++) { var result = resultItems[i]; if (result.type == 'log') { messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString())); } else if (result.type == 'expect' && result.passed && !result.passed()) { messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message)); if (result.trace.stack) { messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack)); } } } if (messagesDiv.childNodes.length > 0) { specDiv.appendChild(messagesDiv); } this.suiteDivs[spec.suite.id].appendChild(specDiv); }; jasmine.TrivialReporter.prototype.log = function() { var console = jasmine.getGlobal().console; if (console && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { console.log(arguments); // ie fix: console.log.apply doesn't exist on ie } } }; jasmine.TrivialReporter.prototype.getLocation = function() { return this.document.location; }; jasmine.TrivialReporter.prototype.specFilter = function(spec) { var paramMap = {}; var params = this.getLocation().search.substring(1).split('&'); for (var i = 0; i < params.length; i++) { var p = params[i].split('='); paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]); } if (!paramMap.spec) { return true; } return spec.getFullName().indexOf(paramMap.spec) === 0; };
version https://git-lfs.github.com/spec/v1 oid sha256:493787bfad6152faa3fa4c50c22539315cb90cb5157e76b9705d9f1509a97c7a size 3137
(function() { function updateProgressBar(successFullCompressions) { var totalToOptimize = parseInt(jQuery("div#compression-progress-bar").data("number-to-optimize")) var optimizedSoFar = parseInt(jQuery("#optimized-so-far").text()) jQuery("#optimized-so-far").html(successFullCompressions + optimizedSoFar) var percentage = "100%" if (totalToOptimize > 0) { percentage = Math.round((successFullCompressions + optimizedSoFar) / totalToOptimize * 100, 1) + "%" } jQuery("div#compression-progress-bar #progress-size").css("width", percentage) jQuery("div#compression-progress-bar #percentage").html("(" + percentage + ")") var numberToOptimize = parseInt(jQuery("#optimizable-image-sizes").html()) jQuery("#optimizable-image-sizes").html(numberToOptimize - successFullCompressions) } function updateSavings(successFullCompressions, successFullSaved, newHumanReadableLibrarySize) { window.currentLibraryBytes = window.currentLibraryBytes + successFullSaved var imagesSizedOptimized = parseInt(jQuery("#optimized-image-sizes").text()) + successFullCompressions var initialLibraryBytes = parseInt(jQuery("#unoptimized-library-size").data("bytes")) var percentage = (1 - window.currentLibraryBytes / initialLibraryBytes) var chartSize = jQuery("div#optimization-chart").data("full-circle-size") jQuery("#optimized-image-sizes").html(imagesSizedOptimized) jQuery("#optimized-library-size").attr("data-bytes", window.currentLibraryBytes) jQuery("#optimized-library-size").html(newHumanReadableLibrarySize) jQuery("#savings-percentage").html(Math.round(percentage * 1000) / 10 + "%") jQuery("div#optimization-chart svg circle.main").css("stroke-dasharray", "" + (chartSize * percentage) + " " + chartSize) } function handleCancellation() { jQuery("div#bulk-optimization-actions").hide() jQuery("div.progress").css("animation", "none") } function updateRowAfterCompression(row, data) { var successFullCompressions = parseInt(data.success) var successFullSaved = parseInt(data.size_change) var newHumanReadableLibrarySize = data.human_readable_library_size if (successFullCompressions == 0) { row.find(".status").html(tinyCompress.L10nNoActionTaken) } else { row.find(".status").html(successFullCompressions + " " + tinyCompress.L10nCompressed) updateProgressBar(successFullCompressions); updateSavings(successFullCompressions, successFullSaved, newHumanReadableLibrarySize) } } function bulkOptimizationCallback(error, data, items, i) { if (window.optimizationCancelled) { handleCancellation(); } var row = jQuery("#optimization-items tr").eq(parseInt(i)+1) if (error) { row.addClass("failed") row.find(".status").html(tinyCompress.L10nInternalError + "<br>" + error.toString()) row.find(".status").attr("title", error.toString()) } else if (data == null) { row.addClass("failed") row.find(".status").html(tinyCompress.L10nCancelled) } else if (data.error) { row.addClass("failed") row.find(".status").html(tinyCompress.L10nError + "<br>" + data.error) row.find(".status").attr("title", data.error) } else if (data.failed > 0) { row.addClass("failed") row.find(".status").html("<span class=\"icon dashicons dashicons-no error\"></span><span class=\"message\">" + tinyCompress.L10nLatestError + ": " + data.message + "</span>"); row.find(".status").attr("title", data.message) } else { row.addClass("success") updateRowAfterCompression(row, data) } row.find(".name").html(items[i].post_title + "<button class=\"toggle-row\" type=\"button\"><span class=\"screen-reader-text\">" + tinyCompress.L10nShowMoreDetails + "</span></button>") if (!data.image_sizes_optimized) { data.image_sizes_optimized = "-"; } if (!data.initial_total_size) { data.initial_total_size = "-"; } if (!data.optimized_total_size) { data.optimized_total_size = "-"; } if (!data.savings || data.savings == 0) { data.savings = "-"; } else { data.savings += "%"; } row.find(".thumbnail").html(data.thumbnail) row.find(".sizes-optimized").html(data.image_sizes_optimized) row.find(".initial-size").html(data.initial_total_size) row.find(".optimized-size").html(data.optimized_total_size) row.find(".savings").html(data.savings) if (items[++i]) { if (!window.optimizationCancelled) { drawSomeRows(items, 1); } bulkOptimizeItem(items, i) } else { var message = jQuery("<div class=\"updated\"><p></p></div>") message.find("p").html(tinyCompress.L10nAllDone) message.insertAfter(jQuery("#tiny-bulk-optimization h1")) jQuery("div#optimization-spinner").css("display", "none") jQuery("div.progress").css("width", "100%") jQuery("div#bulk-optimization-actions").hide() jQuery("div.progress").css("animation", "none") } } function bulkOptimizeItem(items, i) { if (window.optimizationCancelled) { return; } var item = items[i] var row = jQuery("#optimization-items tr").eq(parseInt(i)+1) row.find(".status").removeClass("todo") row.find(".status").html(tinyCompress.L10nCompressing) jQuery.ajax({ url: ajaxurl, type: "POST", dataType: "json", data: { _nonce: tinyCompress.nonce, action: "tiny_compress_image_for_bulk", id: items[i].ID, current_size: window.currentLibraryBytes }, success: function(data) { bulkOptimizationCallback(null, data, items, i)}, error: function(xhr, textStatus, errorThrown) { bulkOptimizationCallback(errorThrown, null, items, i) } }) jQuery("#tiny-progress span").html(i + 1) } function prepareBulkOptimization(items) { window.allBulkOptimizationItems = items updateProgressBar(0) } function startBulkOptimization(items) { window.optimizationCancelled = false window.totalRowsDrawn = 0 window.currentLibraryBytes = parseInt(jQuery("#optimized-library-size").data("bytes")) jQuery("div.progress").css("animation", "progress-bar 80s linear infinite") jQuery("div#optimization-spinner").css("display", "inline-block") updateProgressBar(0) drawSomeRows(items, 10) bulkOptimizeItem(items, 0) } function drawSomeRows(items, rowsToDraw) { var list = jQuery("#optimization-items tbody") var row for (var drawNow = window.totalRowsDrawn; drawNow < Math.min( rowsToDraw + window.totalRowsDrawn, items.length); drawNow++) { row = jQuery("<tr class=\"media-item\">" + "<th class=\"thumbnail\" />" + "<td class=\"column-primary name\" />" + "<td class=\"column-author sizes-optimized\" data-colname=\"" + tinyCompress.L10nSizesOptimized + "\" ></>" + "<td class=\"column-author initial-size\" data-colname=\"" + tinyCompress.L10nInitialSize + "\" ></>" + "<td class=\"column-author optimized-size\" data-colname=\"" + tinyCompress.L10nCurrentSize + "\" ></>" + "<td class=\"column-author savings\" data-colname=\"" + tinyCompress.L10nSavings + "\" ></>" + "<td class=\"status todo\" data-colname=\"" + tinyCompress.L10nStatus + "\" />" + "</tr>") row.find(".status").html(tinyCompress.L10nWaiting) row.find(".name").html(items[drawNow].post_title) list.append(row) } window.totalRowsDrawn = drawNow } function cancelOptimization() { window.optimizationCancelled = true; jQuery("div#optimization-spinner").css("display", "none"); jQuery(jQuery("#optimization-items tr td.status.todo")).html(tinyCompress.L10nCancelled) jQuery("div#bulk-optimization-actions input").removeClass("visible") jQuery("div#bulk-optimization-actions input#id-cancelling").addClass("visible") } jQuery("div#bulk-optimization-actions input").click(function() { if ((jQuery(this).attr("id") == "id-start") && jQuery(this).hasClass("visible")) { jQuery("div#bulk-optimization-actions input#id-start").removeClass("visible") jQuery("div#bulk-optimization-actions input#id-optimizing").addClass("visible") startBulkOptimization(window.allBulkOptimizationItems); } if ((jQuery(this).attr("id") == "id-cancel") && jQuery(this).hasClass("visible")) { cancelOptimization(); } }); jQuery("div#bulk-optimization-actions input").hover(function() { if ((jQuery(this).attr("id") == "id-optimizing") && jQuery(this).hasClass("visible")) { window.lastActiveButton = jQuery("div#bulk-optimization-actions input.visible") lastActiveButton.removeClass("visible") jQuery("div#bulk-optimization-actions input#id-cancel").addClass("visible") } }, function() { if ((jQuery(this).attr("id") == "id-cancel") && jQuery(this).hasClass("visible")) { window.lastActiveButton.addClass("visible") jQuery("div#bulk-optimization-actions input#id-cancel").removeClass("visible") } }); function attachToolTipEventHandlers() { var tooltip = '#tiny-bulk-optimization div.tooltip' var tip = 'div.tip' var toolTipTimeout = null jQuery(tooltip).mouseleave(function(){ var that = this toolTipTimeout = setTimeout(function() { if (jQuery(that).find(tip).is(':visible')) { jQuery(tooltip).find(tip).hide() } }, 100) }) jQuery(tooltip).mouseenter(function(){ jQuery(this).find(tip).show() clearTimeout(toolTipTimeout) }) jQuery(tooltip).find(tip).mouseenter(function(){ clearTimeout(toolTipTimeout) }) } attachToolTipEventHandlers() window.bulkOptimizationAutorun = startBulkOptimization window.bulkOptimization = prepareBulkOptimization }).call()
var searchData= [ ['input',['input',['../class_graphics.html#a8e717bcc093d11075aa97bc488585d10',1,'Graphics']]], ['isbuttonclicked',['isButtonClicked',['../class_graphics.html#a385271f5dd02e8a2e6f74c72b5cb2639',1,'Graphics::isButtonClicked(String tag, ShieldEvent *shieldEvent=0)'],['../class_graphics.html#a8407aa0c6b91b37f3a0d0f4f9ebd3a0d',1,'Graphics::isButtonClicked(int id, ShieldEvent *shieldEvent=0)']]], ['isevent',['isEvent',['../class_sensor.html#a5bc23fe802f627336bc46fdcfcbcc950',1,'Sensor::isEvent(const char *tag, const char *action, ShieldEvent *shieldEvent)'],['../class_sensor.html#a1baa215e4a43f921a3910bca6ad2021e',1,'Sensor::isEvent(int id, const char *action, ShieldEvent *shieldEvent)']]], ['ispressed',['isPressed',['../class_graphics.html#acb8932bc775332ead41b904d4cd18b03',1,'Graphics::isPressed(int id, ShieldEvent *shieldEvent=0)'],['../class_graphics.html#a20b63871638a7201035a65ab5b295556',1,'Graphics::isPressed(String tag, ShieldEvent *shieldEvent=0)']]], ['isreleased',['isReleased',['../class_graphics.html#ad07816ca44294ac90151ab31cdf7778e',1,'Graphics::isReleased(int id, ShieldEvent *shieldEvent=0)'],['../class_graphics.html#adfa69f0cc0fca93c9573f725edff00fd',1,'Graphics::isReleased(String tag, ShieldEvent *shieldEvent=0)']]], ['istouchevent',['isTouchEvent',['../class_graphics.html#a866acaa59d46bad0656276847d8c772b',1,'Graphics']]], ['isupdated',['isUpdated',['../class_sensor.html#ac6037416459904a23b264f5580ca1184',1,'Sensor']]] ];
/** * @author alteredq / http://alteredqualia.com/ * * - shows point light color, intensity, position and distance */ THREE.PointLightHelper = function ( light, sphereSize ) { THREE.Object3D.call( this ); this.light = light; // position this.position = light.position; // color this.color = light.color.clone(); var intensity = THREE.Math.clamp( light.intensity, 0, 1 ); this.color.r *= intensity; this.color.g *= intensity; this.color.b *= intensity; var hexColor = this.color.getHex(); // light helper var bulbGeometry = new THREE.SphereGeometry( sphereSize, 16, 8 ); var raysGeometry = new THREE.AsteriskGeometry( sphereSize * 1.25, sphereSize * 2.25 ); var distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 ); var bulbMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false } ); var raysMaterial = new THREE.LineBasicMaterial( { color: hexColor, fog: false } ); var distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); this.lightRays = new THREE.Line( raysGeometry, raysMaterial, THREE.LinePieces ); this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); var d = light.distance; if ( d === 0.0 ) { this.lightDistance.visible = false; } else { this.lightDistance.scale.set( d, d, d ); } this.add( this.lightSphere ); this.add( this.lightRays ); this.add( this.lightDistance ); // this.lightSphere.properties.isGizmo = true; this.lightSphere.properties.gizmoSubject = light; this.lightSphere.properties.gizmoRoot = this; // this.properties.isGizmo = true; } THREE.PointLightHelper.prototype = Object.create( THREE.Object3D.prototype ); THREE.PointLightHelper.prototype.update = function () { // update sphere and rays colors to light color * light intensity this.color.copy( this.light.color ); var intensity = THREE.Math.clamp( this.light.intensity, 0, 1 ); this.color.r *= intensity; this.color.g *= intensity; this.color.b *= intensity; this.lightSphere.material.color.copy( this.color ); this.lightRays.material.color.copy( this.color ); this.lightDistance.material.color.copy( this.color ); // var d = this.light.distance; if ( d === 0.0 ) { this.lightDistance.visible = false; } else { this.lightDistance.visible = true; this.lightDistance.scale.set( d, d, d ); } }
'use strict'; describe('ok', function() { it('ok', function() { }); });
import relativeDep from './nonexistent-relative-dependency.js'; relativeDep.wasAltered = true;
QUnit.extend( QUnit, { imageEqual: function(actual, expected, message) { var passes = actual === expected || imagediff.equal(actual, expected); QUnit.push(passes, actual, expected, message); }, imageClose: function(actual, expected, maxDifference, message) { var passes = actual === expected || imagediff.equal(actual, expected, maxDifference); QUnit.push(passes, actual, expected, message); } });
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const asyncLib = require("neo-async"); const EntryDependency = require("./dependencies/EntryDependency"); const { someInIterable } = require("./util/IterableHelpers"); const { compareModulesById } = require("./util/comparators"); const { dirname, mkdirp } = require("./util/fs"); /** @typedef {import("./Compiler")} Compiler */ /** * @typedef {Object} ManifestModuleData * @property {string | number} id * @property {Object} buildMeta * @property {boolean | string[]} exports */ class LibManifestPlugin { constructor(options) { this.options = options; } /** * Apply the plugin * @param {Compiler} compiler the compiler instance * @returns {void} */ apply(compiler) { compiler.hooks.emit.tapAsync( "LibManifestPlugin", (compilation, callback) => { const moduleGraph = compilation.moduleGraph; asyncLib.forEach( Array.from(compilation.chunks), (chunk, callback) => { if (!chunk.canBeInitial()) { callback(); return; } const chunkGraph = compilation.chunkGraph; const targetPath = compilation.getPath(this.options.path, { chunk }); const name = this.options.name && compilation.getPath(this.options.name, { chunk }); const content = Object.create(null); for (const module of chunkGraph.getOrderedChunkModulesIterable( chunk, compareModulesById(chunkGraph) )) { if ( this.options.entryOnly && !someInIterable( moduleGraph.getIncomingConnections(module), c => c.dependency instanceof EntryDependency ) ) { continue; } const ident = module.libIdent({ context: this.options.context || compiler.options.context, associatedObjectForCache: compiler.root }); if (ident) { const exportsInfo = moduleGraph.getExportsInfo(module); const providedExports = exportsInfo.getProvidedExports(); /** @type {ManifestModuleData} */ const data = { id: chunkGraph.getModuleId(module), buildMeta: module.buildMeta, exports: Array.isArray(providedExports) ? providedExports : undefined }; content[ident] = data; } } const manifest = { name, type: this.options.type, content }; // Apply formatting to content if format flag is true; const manifestContent = this.options.format ? JSON.stringify(manifest, null, 2) : JSON.stringify(manifest); const buffer = Buffer.from(manifestContent, "utf8"); mkdirp( compiler.intermediateFileSystem, dirname(compiler.intermediateFileSystem, targetPath), err => { if (err) return callback(err); compiler.intermediateFileSystem.writeFile( targetPath, buffer, callback ); } ); }, callback ); } ); } } module.exports = LibManifestPlugin;
console.log(require('path').relative('.', __dirname));
/* global __webpack_public_path__ __HOST__ __PORT__ */ /* eslint no-native-reassign: 0 camelcase: 0 */ if (process.env.NODE_ENV === 'production') { __webpack_public_path__ = chrome.extension.getURL('/js/'); } else { // In development mode, // the iframe of injectpage cannot get correct path, // it need to get parent page protocol. const path = `//${__HOST__}:${__PORT__}/js/`; if (location.protocol === 'https:' || location.search.indexOf('protocol=https') !== -1) { __webpack_public_path__ = `https:${path}`; } else { __webpack_public_path__ = `http:${path}`; } }
'use strict'; var clc = require('cli-color'); var write = require('./printers').write; var shell = require('./shell').getInstance(); function DrawUtil(numOfLines) { var width = shell.getWidth() * 0.75 | 0; var maxHeight = shell.getHeight() - 1; this.numberOfLines = Math.max(4, Math.min(numOfLines, maxHeight)); this.nyanCatWidth = 11; this.scoreboardWidth = 5; this.tick = 0; this.trajectories = []; for(var i = 0; i < this.numberOfLines; i++) { this.trajectories[i] = []; } this.trajectoryWidthMax = (width - this.nyanCatWidth); this.appendRainbow = function(rainbowifier){ var segment = this.tick ? '_' : '-'; var rainbowified = rainbowifier.rainbowify(segment); for (var index = 0; index < this.numberOfLines; index++) { var trajectory = this.trajectories[index]; if (trajectory.length >= this.trajectoryWidthMax) { trajectory.shift(); } trajectory.push(rainbowified); } }; this.drawScoreboard = function(stats) { write(' ' + clc.yellow(stats.total) + '\n'); write(' ' + clc.green(stats.success) + '\n'); write(' ' + clc.red(stats.failed) + '\n'); write(' ' + clc.cyan(stats.skipped) + '\n'); this.fillWithNewlines(5); this.cursorUp(this.numberOfLines); }; this.drawRainbow = function(){ var self = this; this.trajectories.forEach(function(line) { write('\u001b[' + self.scoreboardWidth + 'C'); write(line.join('')); write('\n'); }); this.cursorUp(this.numberOfLines); }; this.drawNyanCat = function(stats) { var startWidth = this.scoreboardWidth + this.trajectories[0].length; var color = '\u001b[' + startWidth + 'C'; var padding = ''; write(color); write('_,------,'); write('\n'); write(color); padding = this.tick ? ' ' : ' '; write('_|' + padding + '/\\_/\\ '); write('\n'); write(color); padding = this.tick ? '_' : '__'; var tail = this.tick ? '~' : '^'; write(tail + '|' + padding + this.face(stats) + ' '); write('\n'); write(color); padding = this.tick ? ' ' : ' '; write(padding + '"" "" '); write('\n'); this.fillWithNewlines(5); this.cursorUp(this.numberOfLines); }; this.face = function(stats) { if (stats.failed) { return '( x .x)'; } else if (stats.skipped) { return '( o .o)'; } else if(stats.success) { return '( ^ .^)'; } else { return '( - .-)'; } }; this.cursorUp = function(n) { write(clc.up(n)); }; this.fillWithNewlines = function(startFrom) { var i = startFrom ? startFrom : 0; for(; i < this.numberOfLines + 1; i++) { write('\n'); } }; } exports.getInstance = function(numOfLines) { return new DrawUtil(numOfLines); };
var gateway = require(__dirname+'/../../'); function getKey(){ gateway.api.getKey(function(err, key){ if (err) { console.log('error:', err); return }; console.log(key); }); } module.exports = getKey;
"use strict"; var ConnectionManager = require("./ConnectionManager"), DomainManager = require("./DomainManager"); function init(srv) { var root = srv.httpRoot + "-ext", apiUrl = root + "/api"; srv.httpServer.on("request", function (req, res) { if (req.url.startsWith(apiUrl)) { res.setHeader("Content-Type", "application/json"); res.end( JSON.stringify(DomainManager.getDomainDescriptions(), null, 4) ); } }); srv.io .of(root) .on("connection", ConnectionManager.createConnection); DomainManager.httpRoot = srv.httpRoot; DomainManager.supportDir = srv.supportDir; DomainManager.projectsDir = srv.projectsDir; DomainManager.samplesDir = srv.samplesDir; DomainManager.allowUserDomains = srv.allowUserDomains; DomainManager.loadDomainModulesFromPaths(["./BaseDomain"]); } exports.init = init;
'use strict'; var React = require('react'); var expect = require('chai').expect; var buildMarty = require('../../../test/lib/buildMarty'); var renderIntoDocument = require('react/addons').addons.TestUtils.renderIntoDocument; describe('Container application Propagation', function () { var Marty, app; beforeEach(function () { Marty = buildMarty(); app = new Marty.Application(); }); describe('when I have a container component', function () { var childApp = undefined; beforeEach(function () { var Child = React.createClass({ displayName: 'Child', render: function render() { return false; }, getInitialState: function getInitialState() { childApp = this.app; return {}; } }); var ChildContainer = Marty.createContainer(Child); var Parent = React.createClass({ displayName: 'Parent', render: function render() { return React.createElement(ChildContainer, null); } }); var ParentContainer = Marty.createContainer(Parent); renderIntoDocument(React.createElement(ParentContainer, { app: app })); }); it('should pass the component to any children', function () { expect(childApp).to.equal(app); }); }); });
/************************************************************* * * MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Fraktur.js * * Copyright (c) 2009-2016 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ MathJax.Hub.Insert( MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['STIXGeneral'], { 0x1D504: [695,22,785,47,742], // MATHEMATICAL FRAKTUR CAPITAL A 0x1D505: [704,24,822,48,774], // MATHEMATICAL FRAKTUR CAPITAL B 0x1D507: [695,24,868,50,817], // MATHEMATICAL FRAKTUR CAPITAL D 0x1D508: [695,24,729,50,678], // MATHEMATICAL FRAKTUR CAPITAL E 0x1D509: [695,204,767,50,716], // MATHEMATICAL FRAKTUR CAPITAL F 0x1D50A: [695,24,806,50,755], // MATHEMATICAL FRAKTUR CAPITAL G 0x1D50D: [695,204,772,50,721], // MATHEMATICAL FRAKTUR CAPITAL J 0x1D50E: [695,22,846,50,801], // MATHEMATICAL FRAKTUR CAPITAL K 0x1D50F: [695,24,669,47,626], // MATHEMATICAL FRAKTUR CAPITAL L 0x1D510: [695,22,1083,50,1031], // MATHEMATICAL FRAKTUR CAPITAL M 0x1D511: [695,22,827,50,775], // MATHEMATICAL FRAKTUR CAPITAL N 0x1D512: [695,24,837,37,786], // MATHEMATICAL FRAKTUR CAPITAL O 0x1D513: [695,204,823,40,773], // MATHEMATICAL FRAKTUR CAPITAL P 0x1D514: [695,64,865,37,814], // MATHEMATICAL FRAKTUR CAPITAL Q 0x1D516: [695,24,856,55,801], // MATHEMATICAL FRAKTUR CAPITAL S 0x1D517: [695,24,766,47,722], // MATHEMATICAL FRAKTUR CAPITAL T 0x1D518: [696,22,787,50,744], // MATHEMATICAL FRAKTUR CAPITAL U 0x1D519: [695,24,831,48,781], // MATHEMATICAL FRAKTUR CAPITAL V 0x1D51A: [695,24,1075,48,1025], // MATHEMATICAL FRAKTUR CAPITAL W 0x1D51B: [695,31,763,46,735], // MATHEMATICAL FRAKTUR CAPITAL X 0x1D51C: [695,204,766,47,714], // MATHEMATICAL FRAKTUR CAPITAL Y 0x1D51E: [468,18,530,51,479], // MATHEMATICAL FRAKTUR SMALL A 0x1D51F: [695,18,513,46,462], // MATHEMATICAL FRAKTUR SMALL B 0x1D520: [468,18,385,57,344], // MATHEMATICAL FRAKTUR SMALL C 0x1D521: [695,18,506,45,455], // MATHEMATICAL FRAKTUR SMALL D 0x1D522: [468,18,420,47,379], // MATHEMATICAL FRAKTUR SMALL E 0x1D523: [694,209,327,27,316], // MATHEMATICAL FRAKTUR SMALL F 0x1D524: [468,209,499,51,461], // MATHEMATICAL FRAKTUR SMALL G 0x1D525: [695,209,528,48,476], // MATHEMATICAL FRAKTUR SMALL H 0x1D526: [694,18,384,42,338], // MATHEMATICAL FRAKTUR SMALL I 0x1D527: [695,209,345,44,311], // MATHEMATICAL FRAKTUR SMALL J 0x1D528: [695,18,420,48,368], // MATHEMATICAL FRAKTUR SMALL K 0x1D529: [695,18,398,46,350], // MATHEMATICAL FRAKTUR SMALL L 0x1D52A: [468,25,910,59,856], // MATHEMATICAL FRAKTUR SMALL M 0x1D52B: [468,25,636,60,582], // MATHEMATICAL FRAKTUR SMALL N 0x1D52C: [468,18,503,50,452], // MATHEMATICAL FRAKTUR SMALL O 0x1D52D: [586,209,555,38,504], // MATHEMATICAL FRAKTUR SMALL P 0x1D52E: [468,209,507,51,459], // MATHEMATICAL FRAKTUR SMALL Q 0x1D52F: [468,18,463,38,426], // MATHEMATICAL FRAKTUR SMALL R 0x1D530: [623,24,518,49,469], // MATHEMATICAL FRAKTUR SMALL S 0x1D531: [656,18,374,38,337], // MATHEMATICAL FRAKTUR SMALL T 0x1D532: [478,18,647,60,593], // MATHEMATICAL FRAKTUR SMALL U 0x1D533: [586,18,515,47,464], // MATHEMATICAL FRAKTUR SMALL V 0x1D534: [586,25,759,41,708], // MATHEMATICAL FRAKTUR SMALL W 0x1D535: [468,189,456,45,406], // MATHEMATICAL FRAKTUR SMALL X 0x1D536: [586,209,516,48,464], // MATHEMATICAL FRAKTUR SMALL Y 0x1D537: [468,209,457,43,407] // MATHEMATICAL FRAKTUR SMALL Z } ); MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir + "/General/Regular/Fraktur.js");
(function() { var Ext = window.Ext4 || window.Ext; /** * Allows configuring of rows for the cardboard * * * @example * Ext.create('Ext.Container', { * items: [{ * xtype: 'rowsettingsfield', * value: { * show: true, * field: 'c_ClassofService' * } * }], * renderTo: Ext.getBody().dom * }); * */ Ext.define('Rally.apps.common.RowSettingsField', { alias: 'widget.rowsettingsfield', extend: 'Ext.form.FieldContainer', requires: [ 'Rally.ui.CheckboxField', 'Rally.ui.combobox.ComboBox', 'Rally.ui.plugin.FieldValidationUi', 'Rally.data.ModelFactory', 'Rally.data.wsapi.ModelBuilder' ], mixins: { field: 'Ext.form.field.Field' }, layout: 'hbox', cls: 'row-settings', config: { /** * @cfg {Object} * * The row settings value for this field */ value: undefined, /** * @cfg {Function} * A function which should return true if the specified field should * be included in the list of available swimlane fields * @param {Rally.data.wsapi.Field} field */ isAllowedFieldFn: Ext.emptyFn, /** * @cfg {Object[]} * * Array of objects with name and value keys to be used by the row combobox * [{'name': 'Blocked', 'value': 'Blocked'},{'name': 'Owner', 'value': 'Owner'}] */ explicitFields: [], /** * @cfg {String[]} * Array of models for which to list fields for */ modelNames: ['userstory', 'defect'], /** * @cfg {String[]} * Array of field display names to show if found on at least 1 model, sortable and are not hidden */ whiteListFields: [] }, initComponent: function() { this.callParent(arguments); this.mixins.field.initField.call(this); this.add([ { xtype: 'rallycheckboxfield', name: 'showRows', boxLabel: '', margin: '0', submitValue: false, value: this.getValue().showRows, listeners: { change: function(checkbox, checked) { this.down('rallycombobox').setDisabled(!checked); }, scope: this } }, { xtype: 'rallycombobox', plugins: ['rallyfieldvalidationui'], name: 'rowsField', margin: '0 6px', width: 130, emptyText: 'Choose Field...', displayField: 'name', valueField: 'value', disabled: this.getValue().showRows !== 'true', editable: false, submitValue: false, storeType: 'Ext.data.Store', storeConfig: { remoteFilter: false, fields: ['name', 'value'], data: [] } } ]); this._loadModels(); }, _loadModels: function() { Rally.data.ModelFactory.getModels({ types: this.getModelNames(), context: this.context, success: this._onModelsRetrieved, scope: this }); }, _onModelsRetrieved: function (models) { var fields = _.uniq(Ext.Array.merge(this.explicitFields, this._getRowableFields(_.values(models))), 'name'); var combobox = this.down('rallycombobox'); combobox.getStore().loadData(_.sortBy(fields, 'name')); combobox.setValue(this.getValue().rowsField); this.fireEvent('ready', this); }, _getRowableFields: function (models) { var artifactModel = Rally.data.wsapi.ModelBuilder.buildCompositeArtifact(models, this.context), allFields = artifactModel.getFields(), rowableFields = _.filter(allFields, function (field) { var attr = field.attributeDefinition; return attr && !attr.Hidden && attr.Sortable && ((artifactModel.getModelsForField(field).length === models.length && this.isAllowedFieldFn(field)) || _.contains(this.whiteListFields, field.displayName)); }, this); return _.map(rowableFields, function(field) { return { name: field.displayName, value: field.name }; }); }, /** * When a form asks for the data this field represents, * give it the name of this field and the ref of the selected project (or an empty string). * Used when persisting the value of this field. * @return {Object} */ getSubmitData: function() { var data = {}, showField = this.down('rallycheckboxfield'), rowsField = this.down('rallycombobox'), showRows = showField.getValue() && !_.isEmpty(rowsField.getValue()); data[showField.name] = showRows; if (showRows) { data[rowsField.name] = rowsField.getValue(); } return data; }, refreshWithNewModelType: function(type) { this.setModelNames([type]); this._loadModels(); } }); })();
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. 'use strict'; describe('error', function() { let assert = require('assert'); let error = require('../../lib/error'); describe('checkResponse', function() { it('defaults to WebDriverError if type is unrecognized', function() { assert.throws( () => error.checkResponse({error: 'foo', message: 'hi there'}), (e) => { assert.equal(e.constructor, error.WebDriverError); return true; }); }); it('does not throw if error property is not a string', function() { let resp = {error: 123, message: 'abc123'}; let out = error.checkResponse(resp); assert.strictEqual(out, resp); }); test('unknown error', error.WebDriverError); test('element not interactable', error.ElementNotInteractableError); test('element not selectable', error.ElementNotSelectableError); test('element not visible', error.ElementNotVisibleError); test('invalid argument', error.InvalidArgumentError); test('invalid cookie domain', error.InvalidCookieDomainError); test('invalid element coordinates', error.InvalidElementCoordinatesError); test('invalid element state', error.InvalidElementStateError); test('invalid selector', error.InvalidSelectorError); test('invalid session id', error.NoSuchSessionError); test('javascript error', error.JavascriptError); test('move target out of bounds', error.MoveTargetOutOfBoundsError); test('no such alert', error.NoSuchAlertError); test('no such element', error.NoSuchElementError); test('no such frame', error.NoSuchFrameError); test('no such window', error.NoSuchWindowError); test('script timeout', error.ScriptTimeoutError); test('session not created', error.SessionNotCreatedError); test('stale element reference', error.StaleElementReferenceError); test('timeout', error.TimeoutError); test('unable to set cookie', error.UnableToSetCookieError); test('unable to capture screen', error.UnableToCaptureScreenError); test('unexpected alert open', error.UnexpectedAlertOpenError); test('unknown command', error.UnknownCommandError); test('unknown method', error.UnknownMethodError); test('unsupported operation', error.UnsupportedOperationError); function test(status, expectedType) { it(`"${status}" => ${expectedType.name}`, function() { assert.throws( () => error.checkResponse({error: status, message: 'oops'}), (e) => { assert.equal(expectedType, e.constructor); assert.equal(e.message, 'oops'); return true; }); }); } }); describe('encodeError', function() { describe('defaults to an unknown error', function() { it('for a generic error value', function() { runTest('hi', 'unknown error', 'hi'); runTest(1, 'unknown error', '1'); runTest({}, 'unknown error', '[object Object]'); }); it('for a generic Error object', function() { runTest(Error('oops'), 'unknown error', 'oops'); runTest(TypeError('bad value'), 'unknown error', 'bad value'); }); }); test(error.WebDriverError, 'unknown error'); test(error.ElementNotSelectableError, 'element not selectable'); test(error.ElementNotVisibleError, 'element not visible'); test(error.InvalidArgumentError, 'invalid argument'); test(error.InvalidCookieDomainError, 'invalid cookie domain'); test(error.InvalidElementStateError, 'invalid element state'); test(error.InvalidSelectorError, 'invalid selector'); test(error.NoSuchSessionError, 'invalid session id'); test(error.JavascriptError, 'javascript error'); test(error.MoveTargetOutOfBoundsError, 'move target out of bounds'); test(error.NoSuchAlertError, 'no such alert'); test(error.NoSuchElementError, 'no such element'); test(error.NoSuchFrameError, 'no such frame'); test(error.NoSuchWindowError, 'no such window'); test(error.ScriptTimeoutError, 'script timeout'); test(error.SessionNotCreatedError, 'session not created'); test(error.StaleElementReferenceError, 'stale element reference'); test(error.TimeoutError, 'timeout'); test(error.UnableToSetCookieError, 'unable to set cookie'); test(error.UnableToCaptureScreenError, 'unable to capture screen'); test(error.UnexpectedAlertOpenError, 'unexpected alert open'); test(error.UnknownCommandError, 'unknown command'); test(error.UnknownMethodError, 'unknown method'); test(error.UnsupportedOperationError, 'unsupported operation'); function test(ctor, code) { it(`${ctor.name} => "${code}"`, () => { runTest(new ctor('oops'), code, 'oops'); }); } function runTest(err, code, message) { let obj = error.encodeError(err); assert.strictEqual(obj['error'], code); assert.strictEqual(obj['message'], message); } }); describe('throwDecodedError', function() { it('defaults to WebDriverError if type is unrecognized', function() { assert.throws( () => error.throwDecodedError({error: 'foo', message: 'hi there'}), (e) => { assert.equal(e.constructor, error.WebDriverError); return true; }); }); it('throws generic error if encoded data is not valid', function() { assert.throws( () => error.throwDecodedError({error: 123, message: 'abc123'}), (e) => { assert.strictEqual(e.constructor, error.WebDriverError); return true; }); assert.throws( () => error.throwDecodedError('null'), (e) => { assert.strictEqual(e.constructor, error.WebDriverError); return true; }); assert.throws( () => error.throwDecodedError(''), (e) => { assert.strictEqual(e.constructor, error.WebDriverError); return true; }); }); test('unknown error', error.WebDriverError); test('element not selectable', error.ElementNotSelectableError); test('element not visible', error.ElementNotVisibleError); test('invalid argument', error.InvalidArgumentError); test('invalid cookie domain', error.InvalidCookieDomainError); test('invalid element coordinates', error.InvalidElementCoordinatesError); test('invalid element state', error.InvalidElementStateError); test('invalid selector', error.InvalidSelectorError); test('invalid session id', error.NoSuchSessionError); test('javascript error', error.JavascriptError); test('move target out of bounds', error.MoveTargetOutOfBoundsError); test('no such alert', error.NoSuchAlertError); test('no such element', error.NoSuchElementError); test('no such frame', error.NoSuchFrameError); test('no such window', error.NoSuchWindowError); test('script timeout', error.ScriptTimeoutError); test('session not created', error.SessionNotCreatedError); test('stale element reference', error.StaleElementReferenceError); test('timeout', error.TimeoutError); test('unable to set cookie', error.UnableToSetCookieError); test('unable to capture screen', error.UnableToCaptureScreenError); test('unexpected alert open', error.UnexpectedAlertOpenError); test('unknown command', error.UnknownCommandError); test('unknown method', error.UnknownMethodError); test('unsupported operation', error.UnsupportedOperationError); it('leaves remoteStacktrace empty if not in encoding', function() { assert.throws( () => error.throwDecodedError({ error: 'session not created', message: 'oops' }), (e) => { assert.strictEqual(e.constructor, error.SessionNotCreatedError); assert.strictEqual(e.message, 'oops'); assert.strictEqual(e.remoteStacktrace, ''); return true; }); }); function test(status, expectedType) { it(`"${status}" => ${expectedType.name}`, function() { assert.throws( () => error.throwDecodedError({ error: status, message: 'oops', stacktrace: 'some-stacktrace' }), (e) => { assert.strictEqual(e.constructor, expectedType); assert.strictEqual(e.message, 'oops'); assert.strictEqual(e.remoteStacktrace, 'some-stacktrace'); return true; }); }); } }); describe('checkLegacyResponse', function() { it('does not throw for success', function() { let resp = {status: error.ErrorCode.SUCCESS}; assert.strictEqual(resp, error.checkLegacyResponse(resp)); }); test('NO_SUCH_ELEMENT', error.NoSuchElementError); test('NO_SUCH_FRAME', error.NoSuchFrameError); test('UNKNOWN_COMMAND', error.UnsupportedOperationError); test('UNSUPPORTED_OPERATION', error.UnsupportedOperationError); test('STALE_ELEMENT_REFERENCE', error.StaleElementReferenceError); test('ELEMENT_NOT_VISIBLE', error.ElementNotVisibleError); test('INVALID_ELEMENT_STATE', error.InvalidElementStateError); test('UNKNOWN_ERROR', error.WebDriverError); test('ELEMENT_NOT_SELECTABLE', error.ElementNotSelectableError); test('JAVASCRIPT_ERROR', error.JavascriptError); test('XPATH_LOOKUP_ERROR', error.InvalidSelectorError); test('TIMEOUT', error.TimeoutError); test('NO_SUCH_WINDOW', error.NoSuchWindowError); test('INVALID_COOKIE_DOMAIN', error.InvalidCookieDomainError); test('UNABLE_TO_SET_COOKIE', error.UnableToSetCookieError); test('UNEXPECTED_ALERT_OPEN', error.UnexpectedAlertOpenError); test('NO_SUCH_ALERT', error.NoSuchAlertError); test('SCRIPT_TIMEOUT', error.ScriptTimeoutError); test('INVALID_ELEMENT_COORDINATES', error.InvalidElementCoordinatesError); test('INVALID_SELECTOR_ERROR', error.InvalidSelectorError); test('SESSION_NOT_CREATED', error.SessionNotCreatedError); test('MOVE_TARGET_OUT_OF_BOUNDS', error.MoveTargetOutOfBoundsError); test('INVALID_XPATH_SELECTOR', error.InvalidSelectorError); test('INVALID_XPATH_SELECTOR_RETURN_TYPE', error.InvalidSelectorError); test('METHOD_NOT_ALLOWED', error.UnsupportedOperationError); describe('UnexpectedAlertOpenError', function() { it('includes alert text from the response object', function() { let response = { status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, value: { message: 'hi', alert: {text: 'alert text here'} } }; assert.throws( () => error.checkLegacyResponse(response), (e) => { assert.equal(error.UnexpectedAlertOpenError, e.constructor); assert.equal(e.message, 'hi'); assert.equal(e.getAlertText(), 'alert text here'); return true; }); }); it('uses an empty string if alert text omitted', function() { let response = { status: error.ErrorCode.UNEXPECTED_ALERT_OPEN, value: { message: 'hi' } }; assert.throws( () => error.checkLegacyResponse(response), (e) => { assert.equal(error.UnexpectedAlertOpenError, e.constructor); assert.equal(e.message, 'hi'); assert.equal(e.getAlertText(), ''); return true; }); }); }); function test(codeKey, expectedType) { it(`${codeKey} => ${expectedType.name}`, function() { let code = error.ErrorCode[codeKey]; let resp = {status: code, value: {message: 'hi'}}; assert.throws( () => error.checkLegacyResponse(resp), (e) => { assert.equal(expectedType, e.constructor); assert.equal(e.message, 'hi'); return true; }); }); } }); });
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * @name: S15.5.4.15_A1_T11; * @section: 15.5.4.15; * @assertion: String.prototype.substring (start, end); * @description: Arguments are objects, and instance is string, objects have overrided valueOf function, that return exception; */ var __obj = {valueOf:function(){throw "instart";}}; var __obj2 = {valueOf:function(){throw "inend";}}; var __str = {str__:"ABB\u0041BABAB"}; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 with(__str){ with(str__){ try { var x = substring(__obj,__obj2); $FAIL('#1: "var x = substring(__obj,__obj2)" lead to throw exception'); } catch (e) { if (e!=="instart") { $ERROR('#1.1: Exception === "instart". Actual: '+e); } } } } // //////////////////////////////////////////////////////////////////////////////
var vows = require("vows"), assert = require("assert"), transformProperties = require("../lib/topojson/transform-properties"); var suite = vows.describe("transform-properties"); suite.addBatch({ "transform-properties": { "by default, deletes properties from Features": function() { assert.deepEqual(transformProperties({ foo: { type: "Feature", properties: {"foo": 42}, geometry: { type: "LineString", coordinates: [0] } } }).foo, { type: "Feature", geometry: { type: "LineString", coordinates: [0] } }); }, "observes the specified property transform function": function() { assert.deepEqual(transformProperties({ foo: { type: "Feature", properties: {"foo": 42}, geometry: { type: "LineString", coordinates: [0] } } }, function(properties, key, value) { properties.bar = value; return true; }).foo, { type: "Feature", properties: {"bar": 42}, geometry: { type: "LineString", coordinates: [0] } }); } } }); suite.export(module);
describe('materialIcon directive', function() { });
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_precision) { var v = opt_precision; if (undefined === v) { v = Math.min(getDecimals(n), 3); } var base = Math.pow(10, v); var f = ((n * base) | 0) % base; return {v: v, f: f}; } $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u014bdi", "\u0263etr\u0254" ], "DAY": [ "k\u0254si\u0256a", "dzo\u0256a", "bla\u0256a", "ku\u0256a", "yawo\u0256a", "fi\u0256a", "memle\u0256a" ], "MONTH": [ "dzove", "dzodze", "tedoxe", "af\u0254f\u0129e", "dama", "masa", "siaml\u0254m", "deasiamime", "any\u0254ny\u0254", "kele", "ade\u025bmekp\u0254xe", "dzome" ], "SHORTDAY": [ "k\u0254s", "dzo", "bla", "ku\u0256", "yaw", "fi\u0256", "mem" ], "SHORTMONTH": [ "dzv", "dzd", "ted", "af\u0254", "dam", "mas", "sia", "dea", "any", "kel", "ade", "dzm" ], "fullDate": "EEEE, MMMM d 'lia' y", "longDate": "MMMM d 'lia' y", "medium": "MMM d 'lia', y a 'ga' h:mm:ss", "mediumDate": "MMM d 'lia', y", "mediumTime": "a 'ga' h:mm:ss", "short": "M/d/yy a 'ga' h:mm", "shortDate": "M/d/yy", "shortTime": "a 'ga' h:mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "CFA", "DECIMAL_SEP": ".", "GROUP_SEP": ",", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "\u00a4-", "negSuf": "", "posPre": "\u00a4", "posSuf": "" } ] }, "id": "ee-tg", "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]);
// Parallax Occlusion shaders from // http://sunandblackcat.com/tipFullView.php?topicid=28 // No tangent-space transforms logic based on // http://mmikkelsen3d.blogspot.sk/2012/02/parallaxpoc-mapping-and-no-tangent.html var ParallaxShader = { // Ordered from fastest to best quality. modes: { none: 'NO_PARALLAX', basic: 'USE_BASIC_PARALLAX', steep: 'USE_STEEP_PARALLAX', occlusion: 'USE_OCLUSION_PARALLAX', // a.k.a. POM relief: 'USE_RELIEF_PARALLAX' }, uniforms: { "bumpMap": { value: null }, "map": { value: null }, "parallaxScale": { value: null }, "parallaxMinLayers": { value: null }, "parallaxMaxLayers": { value: null } }, vertexShader: [ "varying vec2 vUv;", "varying vec3 vViewPosition;", "varying vec3 vNormal;", "void main() {", "vUv = uv;", "vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );", "vViewPosition = -mvPosition.xyz;", "vNormal = normalize( normalMatrix * normal );", "gl_Position = projectionMatrix * mvPosition;", "}" ].join( "\n" ), fragmentShader: [ "uniform sampler2D bumpMap;", "uniform sampler2D map;", "uniform float parallaxScale;", "uniform float parallaxMinLayers;", "uniform float parallaxMaxLayers;", "varying vec2 vUv;", "varying vec3 vViewPosition;", "varying vec3 vNormal;", "#ifdef USE_BASIC_PARALLAX", "vec2 parallaxMap( in vec3 V ) {", "float initialHeight = texture2D( bumpMap, vUv ).r;", // No Offset Limitting: messy, floating output at grazing angles. //"vec2 texCoordOffset = parallaxScale * V.xy / V.z * initialHeight;", // Offset Limiting "vec2 texCoordOffset = parallaxScale * V.xy * initialHeight;", "return vUv - texCoordOffset;", "}", "#else", "vec2 parallaxMap( in vec3 V ) {", // Determine number of layers from angle between V and N "float numLayers = mix( parallaxMaxLayers, parallaxMinLayers, abs( dot( vec3( 0.0, 0.0, 1.0 ), V ) ) );", "float layerHeight = 1.0 / numLayers;", "float currentLayerHeight = 0.0;", // Shift of texture coordinates for each iteration "vec2 dtex = parallaxScale * V.xy / V.z / numLayers;", "vec2 currentTextureCoords = vUv;", "float heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", // while ( heightFromTexture > currentLayerHeight ) // Infinite loops are not well supported. Do a "large" finite // loop, but not too large, as it slows down some compilers. "for ( int i = 0; i < 30; i += 1 ) {", "if ( heightFromTexture <= currentLayerHeight ) {", "break;", "}", "currentLayerHeight += layerHeight;", // Shift texture coordinates along vector V "currentTextureCoords -= dtex;", "heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", "}", "#ifdef USE_STEEP_PARALLAX", "return currentTextureCoords;", "#elif defined( USE_RELIEF_PARALLAX )", "vec2 deltaTexCoord = dtex / 2.0;", "float deltaHeight = layerHeight / 2.0;", // Return to the mid point of previous layer "currentTextureCoords += deltaTexCoord;", "currentLayerHeight -= deltaHeight;", // Binary search to increase precision of Steep Parallax Mapping "const int numSearches = 5;", "for ( int i = 0; i < numSearches; i += 1 ) {", "deltaTexCoord /= 2.0;", "deltaHeight /= 2.0;", "heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;", // Shift along or against vector V "if( heightFromTexture > currentLayerHeight ) {", // Below the surface "currentTextureCoords -= deltaTexCoord;", "currentLayerHeight += deltaHeight;", "} else {", // above the surface "currentTextureCoords += deltaTexCoord;", "currentLayerHeight -= deltaHeight;", "}", "}", "return currentTextureCoords;", "#elif defined( USE_OCLUSION_PARALLAX )", "vec2 prevTCoords = currentTextureCoords + dtex;", // Heights for linear interpolation "float nextH = heightFromTexture - currentLayerHeight;", "float prevH = texture2D( bumpMap, prevTCoords ).r - currentLayerHeight + layerHeight;", // Proportions for linear interpolation "float weight = nextH / ( nextH - prevH );", // Interpolation of texture coordinates "return prevTCoords * weight + currentTextureCoords * ( 1.0 - weight );", "#else", // NO_PARALLAX "return vUv;", "#endif", "}", "#endif", "vec2 perturbUv( vec3 surfPosition, vec3 surfNormal, vec3 viewPosition ) {", "vec2 texDx = dFdx( vUv );", "vec2 texDy = dFdy( vUv );", "vec3 vSigmaX = dFdx( surfPosition );", "vec3 vSigmaY = dFdy( surfPosition );", "vec3 vR1 = cross( vSigmaY, surfNormal );", "vec3 vR2 = cross( surfNormal, vSigmaX );", "float fDet = dot( vSigmaX, vR1 );", "vec2 vProjVscr = ( 1.0 / fDet ) * vec2( dot( vR1, viewPosition ), dot( vR2, viewPosition ) );", "vec3 vProjVtex;", "vProjVtex.xy = texDx * vProjVscr.x + texDy * vProjVscr.y;", "vProjVtex.z = dot( surfNormal, viewPosition );", "return parallaxMap( vProjVtex );", "}", "void main() {", "vec2 mapUv = perturbUv( -vViewPosition, normalize( vNormal ), normalize( vViewPosition ) );", "gl_FragColor = texture2D( map, mapUv );", "}" ].join( "\n" ) }; export { ParallaxShader };
"use strict"; /** * Validates a device token * * Will convert to string and removes invalid characters as required. */ function token(input) { let token; if (typeof input === "string") { token = input; } else if (Buffer.isBuffer(input)) { token = input.toString("hex"); } token = token.replace(/[^0-9a-f]/gi, ""); if (token.length === 0) { throw new Error("Token has invalid length"); } return token; } module.exports = token;
/* ____ ___ _ _ ___ _____ _____ ____ ___ _____ | _ \ / _ \ | \ | |/ _ \_ _| | ____| _ \_ _|_ _| | | | | | | | | \| | | | || | | _| | | | | | | | | |_| | |_| | | |\ | |_| || | | |___| |_| | | | | |____/ \___/ |_| \_|\___/ |_| |_____|____/___| |_| _____ _ _ ___ ____ _____ ___ _ _____ |_ _| | | |_ _/ ___| | ___|_ _| | | ____| | | | |_| || |\___ \ | |_ | || | | _| | | | _ || | ___) | | _| | || |___| |___ |_| |_| |_|___|____/ |_| |___|_____|_____| */ (function() { var template = Handlebars.compile(solve()()); // Sample test 1 var data = { title: 'Conspiracy Theories', posts: [{ author: '', text: 'Dear God,', comments: [{ author: 'G', text: 'Yes, my child?' }, { author: '', text: 'I would like to file a bug report.' }] }, { author: 'Cuki', text: '<a href="https://xkcd.com/258/">link</a>', comments: [] }] }; // Sample test 2 // var data = { // title: 'JS UI & DOM 2016', // posts: [{ // author: 'Cuki', // text: 'Hello guys', // comments: [{ // author: 'Kon', // text: 'Hello' // }, { // text: 'Hello' // }] // }, { // author: 'Cuki', // text: 'This works', // comments: [{ // author: 'Cuki', // text: 'Well, ofcourse!\nRegards' // }, { // text: 'You are fat', // deleted: true // }] // }, { // author: 'Pesho', // text: 'Is anybody out <a href="https://facebook.com/">there</a>?', // comments: [] // }] // }; document.getElementById('forum-container') .innerHTML = template(data); }());
const a = { "3": "three", "foo": "bar" }; const { [3]: omit } = a, rest = babelHelpers.objectWithoutProperties(a, ["3"]); assert.deepEqual(rest, { "foo": "bar" }); assert.equal(omit, "three"); const [k1, k2, k3, k4, k5] = [null, undefined, true, false, { toString() { return "warrior"; } }]; const c = { [k1]: "1", [k2]: "2", [k3]: "3", [k4]: "4", [k5]: "5" }; const { [k1]: v1, [k2]: v2, [k3]: v3, [k4]: v4, [k5]: v5 } = c, vrest = babelHelpers.objectWithoutProperties(c, [k1, k2, k3, k4, k5].map(babelHelpers.toPropertyKey)); assert.equal(v1, "1"); assert.equal(v2, "2"); assert.equal(v3, "3"); assert.equal(v4, "4"); assert.equal(v5, "5"); assert.deepEqual(vrest, {}); // shouldn't convert symbols to strings const sx = Symbol(); const sy = Symbol(); const d = { [sx]: "sx", [sy]: "sy" }; const { [sx]: dx, [sy]: dy } = d; assert.equal(dx, "sx"); assert.equal(dy, "sy");
/*global google */ /*jshint unused:true */ define([ 'dojo/_base/declare', 'dijit/_WidgetBase', 'dijit/_TemplatedMixin', 'dijit/_WidgetsInTemplateMixin', 'dojo/_base/lang', 'dojo/aspect', 'dojo/topic', 'esri/layers/GraphicsLayer', 'esri/graphic', 'esri/renderers/SimpleRenderer', 'dojo/text!./StreetView/templates/StreetView.html', 'esri/symbols/PictureMarkerSymbol', 'dojo/dom-style', 'esri/geometry/Point', 'esri/SpatialReference', 'dijit/MenuItem', '//cdnjs.cloudflare.com/ajax/libs/proj4js/2.2.2/proj4.js', 'dijit/form/Button', 'xstyle/css!./StreetView/css/StreetView.css', 'gis/plugins/async!//maps.google.com/maps/api/js?v=3&sensor=false' ], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, lang, aspect, topic, GraphicsLayer, Graphic, SimpleRenderer, template, PictureMarkerSymbol, domStyle, Point, SpatialReference, MenuItem, proj4) { return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { widgetsInTemplate: true, templateString: template, mapClickMode: null, panoOptions: { addressControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT }, linksControl: false, panControl: false, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }, enableCloseButton: false }, // in case this changes some day proj4BaseURL: 'http://spatialreference.org/', // options are ESRI, EPSG and SR-ORG // See http://spatialreference.org/ for more information proj4Catalog: 'EPSG', // if desired, you can load a projection file from your server // instead of using one from spatialreference.org // i.e., http://server/projections/102642.js projCustomURL: null, postCreate: function () { this.inherited(arguments); this.createGraphicsLayer(); this.map.on('click', lang.hitch(this, 'getStreetView')); this.own(topic.subscribe('mapClickMode/currentSet', lang.hitch(this, 'setMapClickMode'))); if (this.parentWidget) { if (this.parentWidget.toggleable) { this.own(aspect.after(this.parentWidget, 'toggle', lang.hitch(this, function () { this.onLayoutChange(this.parentWidget.open); }))); } this.own(aspect.after(this.parentWidget, 'resize', lang.hitch(this, function () { if (this.panorama) { google.maps.event.trigger(this.panorama, 'resize'); } }))); } // spatialreference.org uses the old // Proj4js style so we need an alias // https://github.com/proj4js/proj4js/issues/23 window.Proj4js = proj4; if (this.mapRightClickMenu) { this.addRightClickMenu(); } }, createGraphicsLayer: function () { this.pointSymbol = new PictureMarkerSymbol(require.toUrl('gis/dijit/StreetView/images/blueArrow.png'), 30, 30); this.pointGraphics = new GraphicsLayer({ id: 'streetview_graphics', title: 'Street View' }); this.pointRenderer = new SimpleRenderer(this.pointSymbol); this.pointRenderer.label = 'Street View'; this.pointRenderer.description = 'Street View'; this.pointGraphics.setRenderer(this.pointRenderer); this.map.addLayer(this.pointGraphics); }, addRightClickMenu: function () { this.map.on('MouseDown', lang.hitch(this, function (evt) { this.mapRightClickPoint = evt.mapPoint; })); this.mapRightClickMenu.addChild(new MenuItem({ label: 'See Street View here', onClick: lang.hitch(this, 'streetViewFromMapRightClick') })); }, onOpen: function () { this.pointGraphics.show(); if (!this.panorama || !this.panoramaService) { this.panorama = new google.maps.StreetViewPanorama(this.panoNode, this.panoOptions); this.panoramaService = new google.maps.StreetViewService(); } if (this.panorama) { google.maps.event.trigger(this.panorama, 'resize'); } }, onClose: function () { // end streetview on close of title pane this.pointGraphics.hide(); if (this.mapClickMode === 'streetview') { this.connectMapClick(); } }, onLayoutChange: function (open) { if (open) { this.onOpen(); } else { this.onClose(); } }, placePoint: function () { this.disconnectMapClick(); //get map click, set up listener in post create }, disconnectMapClick: function () { this.map.setMapCursor('crosshair'); topic.publish('mapClickMode/setCurrent', 'streetview'); }, connectMapClick: function () { this.map.setMapCursor('auto'); topic.publish('mapClickMode/setDefault'); }, clearGraphics: function () { this.pointGraphics.clear(); domStyle.set(this.noStreetViewResults, 'display', 'block'); }, enableStreetViewClick: function () { this.disconnectMapClick(); }, disableStreetViewClick: function () { this.connectMapClick(); }, getStreetView: function (evt, overRide) { if (this.mapClickMode === 'streetview' || overRide) { var mapPoint = evt.mapPoint; if (!mapPoint) { return; } if (this.parentWidget && !this.parentWidget.open) { this.parentWidget.toggle(); } // convert the map point's coordinate system into lat/long var geometry = null, wkid = mapPoint.spatialReference.wkid; if (wkid === 102100) { wkid = 3857; } var key = this.proj4Catalog + ':' + wkid; if (!proj4.defs[key]) { var url = this.proj4CustomURL || this.proj4BaseURL + 'ref/' + this.proj4Catalog.toLowerCase() + '/' + wkid + '/proj4js/'; require([url], lang.hitch(this, 'getStreetView', evt, true)); return; } // only need one projection as we are // converting to WGS84 lat/long var projPoint = proj4(proj4.defs[key]).inverse([mapPoint.x, mapPoint.y]); if (projPoint) { geometry = { x: projPoint[0], y: projPoint[1] }; } if (geometry) { domStyle.set(this.noStreetViewResults, 'display', 'none'); domStyle.set(this.loadingStreetView, 'display', 'inline-block'); this.getPanoramaLocation(geometry); } else { this.setPanoPlace = null; this.clearGraphics(); domStyle.set(this.noStreetViewResults, 'display', 'block'); } } }, getPanoramaLocation: function (geoPoint) { var place = new google.maps.LatLng(geoPoint.y, geoPoint.x); this.panoramaService.getPanoramaByLocation(place, 50, lang.hitch(this, 'getPanoramaByLocationComplete', geoPoint)); // Panorama Events -- Changed location google.maps.event.addListener(this.panorama, 'position_changed', lang.hitch(this, 'setPlaceMarkerPosition')); // Panorama Events -- Changed Rotation google.maps.event.addListener(this.panorama, 'pov_changed', lang.hitch(this, 'setPlaceMarkerRotation')); }, getPanoramaByLocationComplete: function (geoPoint, StreetViewPanoramaData, StreetViewStatus) { domStyle.set(this.loadingStreetView, 'display', 'none'); if (StreetViewStatus === 'OK') { this.disableStreetViewClick(); var place = new google.maps.LatLng(geoPoint.y, geoPoint.x); this.setPanoPlace = place; this.firstSet = true; this.panorama.setPosition(place); } else if (StreetViewStatus === 'ZERO_RESULTS') { this.setPanoPlace = null; this.clearGraphics(); // reset default map click mode this.connectMapClick(); domStyle.set(this.noStreetViewResults, 'display', 'block'); } else { this.setPanoPlace = null; this.clearGraphics(); topic.publish('viewer/handleError', { source: 'StreetView', error: 'Unknown.' }); } }, setPlaceMarkerPosition: function () { if (!this.placeMarker || this.pointGraphics.graphics.length === 0) { this.placeMarker = new Graphic(); // Add graphic to the map this.pointGraphics.add(this.placeMarker); } // get the new lat/long from streetview var panoPosition = this.panorama.getPosition(); var positionLat = panoPosition.lat(); var positionLong = panoPosition.lng(); // Make sure they are numbers if (!isNaN(positionLat) && !isNaN(positionLong)) { // convert the resulting lat/long to the map's spatial reference var xy = null, wkid = this.map.spatialReference.wkid; if (wkid === 102100) { wkid = 3857; } var key = this.proj4Catalog + ':' + wkid; if (!proj4.defs[key]) { var url = this.proj4CustomURL || this.proj4BaseURL + 'ref/' + this.proj4Catalog.toLowerCase() + '/' + wkid + '/proj4js/'; require([url], lang.hitch(this, 'setPlaceMarkerPosition')); return; } // only need the one projection as we are // converting from WGS84 lat/long xy = proj4(proj4.defs[key]).forward([positionLong, positionLat]); if (xy) { var point = new Point(xy, new SpatialReference({ wkid: wkid })); // change point position on the map this.placeMarker.setGeometry(point); if (this.setPanoPlace && !this.firstSet) { var heading = google.maps.geometry.spherical.computeHeading(panoPosition, this.setPanoPlace); this.panorama.setPov({ heading: heading, pitch: 0 }); setTimeout(lang.hitch(this, function () { this.setPanoPlace = null; }), 1000); } else { this.firstSet = false; } } } }, setPlaceMarkerRotation: function () { if (this.placeMarker) { var pov = this.panorama.getPov(); this.pointSymbol.setAngle(pov.heading); this.pointGraphics.refresh(); } }, streetViewFromMapRightClick: function () { var evt = { mapPoint: this.mapRightClickPoint }; this.getStreetView(evt, true); }, setMapClickMode: function (mode) { this.mapClickMode = mode; } }); });
// ==UserScript== // @id ingress-intel-total-conversion@jonatkins // @name IITC: Ingress intel map total conversion // @version 0.25.2.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ // @description [@@BUILDNAME@@-@@BUILDDATE@@] Total conversion for the ingress intel map. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* // @include https://www.ingress.com/mission/* // @include http://www.ingress.com/mission/* // @match https://www.ingress.com/mission/* // @match http://www.ingress.com/mission/* // @grant none // ==/UserScript== // REPLACE ORIG SITE /////////////////////////////////////////////////// if(document.getElementsByTagName('html')[0].getAttribute('itemscope') != null) throw('Ingress Intel Website is down, not a userscript issue.'); window.iitcBuildDate = '@@BUILDDATE@@'; // disable vanilla JS window.onload = function() {}; document.body.onload = function() {}; //originally code here parsed the <Script> tags from the page to find the one that defined the PLAYER object //however, that's already been executed, so we can just access PLAYER - no messing around needed! if (typeof(window.PLAYER)!="object" || typeof(window.PLAYER.nickname) != "string") { // page doesn’t have a script tag with player information. if(document.getElementById('header_email')) { // however, we are logged in. // it used to be regularly common to get temporary 'account not enabled' messages from the intel site. // however, this is no longer common. more common is users getting account suspended/banned - and this // currently shows the 'not enabled' message. so it's safer to not repeatedly reload in this case // setTimeout('location.reload();', 3*1000); throw("Page doesn't have player data, but you are logged in."); } // FIXME: handle nia takedown in progress throw("Couldn't retrieve player data. Are you logged in?"); } // player information is now available in a hash like this: // window.PLAYER = {"ap": "123", "energy": 123, "available_invites": 123, "nickname": "somenick", "team": "ENLIGHTENED||RESISTANCE"}; // remove complete page. We only wanted the user-data and the page’s // security context so we can access the API easily. Setup as much as // possible without requiring scripts. document.getElementsByTagName('head')[0].innerHTML = '' + '<title>Ingress Intel Map</title>' + '<style>@@INCLUDESTRING:style.css@@</style>' + '<style>@@INCLUDESTRING:external/leaflet.css@@</style>' //note: smartphone.css injection moved into code/smartphone.js + '<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic"/>'; document.getElementsByTagName('body')[0].innerHTML = '' + '<div id="map">Loading, please wait</div>' + '<div id="chatcontrols" style="display:none">' + '<a accesskey="0" title="[0]"><span class="toggle expand"></span></a>' + '<a accesskey="1" title="[1]">all</a>' + '<a accesskey="2" title="[2]" class="active">faction</a>' + '<a accesskey="3" title="[3]">alerts</a>' + '</div>' + '<div id="chat" style="display:none">' + ' <div id="chatfaction"></div>' + ' <div id="chatall"></div>' + ' <div id="chatalerts"></div>' + '</div>' + '<form id="chatinput" style="display:none"><table><tr>' + ' <td><time></time></td>' + ' <td><mark>tell faction:</mark></td>' + ' <td><input id="chattext" type="text" maxlength="256" accesskey="c" title="[c]" /></td>' + '</tr></table></form>' + '<a id="sidebartoggle" accesskey="i" title="Toggle sidebar [i]"><span class="toggle close"></span></a>' + '<div id="scrollwrapper">' // enable scrolling for small screens + ' <div id="sidebar" style="display: none">' + ' <div id="playerstat">t</div>' + ' <div id="gamestat">&nbsp;loading global control stats</div>' + ' <div id="searchwrapper">' + ' <img src="@@INCLUDEIMAGE:images/current-location.png@@"/ title="Current Location" id="buttongeolocation">' + ' <input id="search" placeholder="Search location…" type="search" accesskey="f" title="Search for a place [f]"/>' + ' </div>' + ' <div id="portaldetails"></div>' + ' <input id="redeem" placeholder="Redeem code…" type="text"/>' + ' <div id="toolbox">' + ' <a onmouseover="setPermaLink(this)" onclick="setPermaLink(this);return androidPermalink()" title="URL link to this map view">Permalink</a>' + ' <a onclick="window.aboutIITC()" style="cursor: help">About IITC</a>' + ' <a onclick="window.regionScoreboard()" title="View regional scoreboard">Region scores</a>' + ' </div>' + ' </div>' + '</div>' + '<div id="updatestatus"><div id="innerstatus"></div></div>' // avoid error by stock JS + '<div id="play_button"></div>'; // putting everything in a wrapper function that in turn is placed in a // script tag on the website allows us to execute in the site’s context // instead of in the Greasemonkey/Extension/etc. context. function wrapper(info) { // a cut-down version of GM_info is passed as a parameter to the script // (not the full GM_info - it contains the ENTIRE script source!) window.script_info = info; // LEAFLET PREFER CANVAS /////////////////////////////////////////////// // Set to true if Leaflet should draw things using Canvas instead of SVG // Disabled for now because it has several bugs: flickering, constant // CPU usage and it continuously fires the moveend event. //L_PREFER_CANVAS = false; // CONFIG OPTIONS //////////////////////////////////////////////////// window.REFRESH = 30; // refresh view every 30s (base time) window.ZOOM_LEVEL_ADJ = 5; // add 5 seconds per zoom level window.ON_MOVE_REFRESH = 2.5; //refresh time to use after a movement event window.MINIMUM_OVERRIDE_REFRESH = 10; //limit on refresh time since previous refresh, limiting repeated move refresh rate window.REFRESH_GAME_SCORE = 15*60; // refresh game score every 15 minutes window.MAX_IDLE_TIME = 15*60; // stop updating map after 15min idling window.HIDDEN_SCROLLBAR_ASSUMED_WIDTH = 20; window.SIDEBAR_WIDTH = 300; // how many pixels to the top before requesting new data window.CHAT_REQUEST_SCROLL_TOP = 200; window.CHAT_SHRINKED = 60; // Minimum area to zoom ratio that field MU's will display window.FIELD_MU_DISPLAY_AREA_ZOOM_RATIO = 0.001; // Point tolerance for displaying MU's window.FIELD_MU_DISPLAY_POINT_TOLERANCE = 60 window.COLOR_SELECTED_PORTAL = '#f0f'; window.COLORS = ['#FF6600', '#0088FF', '#03DC03']; // none, res, enl window.COLORS_LVL = ['#000', '#FECE5A', '#FFA630', '#FF7315', '#E40000', '#FD2992', '#EB26CD', '#C124E0', '#9627F4']; window.COLORS_MOD = {VERY_RARE: '#b08cff', RARE: '#73a8ff', COMMON: '#8cffbf'}; window.MOD_TYPE = {RES_SHIELD:'Shield', MULTIHACK:'Multi-hack', FORCE_AMP:'Force Amp', HEATSINK:'Heat Sink', TURRET:'Turret', LINK_AMPLIFIER: 'Link Amp'}; // circles around a selected portal that show from where you can hack // it and how far the portal reaches (i.e. how far links may be made // from this portal) window.ACCESS_INDICATOR_COLOR = 'orange'; window.RANGE_INDICATOR_COLOR = 'red' // min zoom for intel map - should match that used by stock intel window.MIN_ZOOM = 3; window.DEFAULT_PORTAL_IMG = '//commondatastorage.googleapis.com/ingress.com/img/default-portal-image.png'; //window.NOMINATIM = '//open.mapquestapi.com/nominatim/v1/search.php?format=json&polygon_geojson=1&q='; window.NOMINATIM = '//nominatim.openstreetmap.org/search?format=json&polygon_geojson=1&q='; // INGRESS CONSTANTS ///////////////////////////////////////////////// // http://decodeingress.me/2012/11/18/ingress-portal-levels-and-link-range/ window.RESO_NRG = [0, 1000, 1500, 2000, 2500, 3000, 4000, 5000, 6000]; window.HACK_RANGE = 40; // in meters, max. distance from portal to be able to access it window.OCTANTS = ['E', 'NE', 'N', 'NW', 'W', 'SW', 'S', 'SE']; window.OCTANTS_ARROW = ['→', '↗', '↑', '↖', '←', '↙', '↓', '↘']; window.DESTROY_RESONATOR = 75; //AP for destroying portal window.DESTROY_LINK = 187; //AP for destroying link window.DESTROY_FIELD = 750; //AP for destroying field window.CAPTURE_PORTAL = 500; //AP for capturing a portal window.DEPLOY_RESONATOR = 125; //AP for deploying a resonator window.COMPLETION_BONUS = 250; //AP for deploying all resonators on portal window.UPGRADE_ANOTHERS_RESONATOR = 65; //AP for upgrading another's resonator window.MAX_PORTAL_LEVEL = 8; window.MAX_RESO_PER_PLAYER = [0, 8, 4, 4, 4, 2, 2, 1, 1]; // OTHER MORE-OR-LESS CONSTANTS ////////////////////////////////////// window.TEAM_NONE = 0; window.TEAM_RES = 1; window.TEAM_ENL = 2; window.TEAM_TO_CSS = ['none', 'res', 'enl']; window.SLOT_TO_LAT = [0, Math.sqrt(2)/2, 1, Math.sqrt(2)/2, 0, -Math.sqrt(2)/2, -1, -Math.sqrt(2)/2]; window.SLOT_TO_LNG = [1, Math.sqrt(2)/2, 0, -Math.sqrt(2)/2, -1, -Math.sqrt(2)/2, 0, Math.sqrt(2)/2]; window.EARTH_RADIUS=6378137; window.DEG2RAD = Math.PI / 180; // STORAGE /////////////////////////////////////////////////////////// // global variables used for storage. Most likely READ ONLY. Proper // way would be to encapsulate them in an anonymous function and write // getters/setters, but if you are careful enough, this works. window.refreshTimeout = undefined; window.urlPortal = null; window.urlPortalLL = null; window.selectedPortal = null; window.portalRangeIndicator = null; window.portalAccessIndicator = null; window.mapRunsUserAction = false; //var portalsLayers, linksLayer, fieldsLayer; var portalsFactionLayers, linksFactionLayers, fieldsFactionLayers; // contain references to all entities loaded from the server. If render limits are hit, // not all may be added to the leaflet layers window.portals = {}; window.links = {}; window.fields = {}; window.resonators = {}; // contain current status(on/off) of overlay layerGroups. // But you should use isLayerGroupDisplayed(name) to check the status window.overlayStatus = {}; // plugin framework. Plugins may load earlier than iitc, so don’t // overwrite data if(typeof window.plugin !== 'function') window.plugin = function() {}; @@INJECTCODE@@ } // end of wrapper // inject code into site context var script = document.createElement('script'); var info = { buildName: '@@BUILDNAME@@', dateTimeVersion: '@@DATETIMEVERSION@@' }; if (this.GM_info && this.GM_info.script) info.script = { version: GM_info.script.version, name: GM_info.script.name, description: GM_info.script.description }; script.appendChild(document.createTextNode('('+ wrapper +')('+JSON.stringify(info)+');')); (document.body || document.head || document.documentElement).appendChild(script);
version https://git-lfs.github.com/spec/v1 oid sha256:80841356ff68b9a03b926a06f556fa7e6df2cc8f7a9908e449a5918f9c2279a7 size 3740
'use strict'; /* eslint-disable no-for-of-loops/no-for-of-loops */ // Copies the contents of the new fork into the old fork const {promisify} = require('util'); const glob = promisify(require('glob')); const {spawnSync} = require('child_process'); const fs = require('fs'); const minimist = require('minimist'); const stat = promisify(fs.stat); const copyFile = promisify(fs.copyFile); const argv = minimist(process.argv.slice(2), { boolean: ['reverse'], }); async function main() { const oldFilenames = await glob('packages/react-reconciler/**/*.old.js'); await Promise.all(oldFilenames.map(unforkFile)); // Use ESLint to autofix imports spawnSync('yarn', ['linc', '--fix']); } async function unforkFile(oldFilename) { let oldStats; try { oldStats = await stat(oldFilename); } catch { return; } if (!oldStats.isFile()) { return; } const newFilename = oldFilename.replace(/\.old.js$/, '.new.js'); let newStats; try { newStats = await stat(newFilename); } catch { return; } if (!newStats.isFile()) { return; } if (argv.reverse) { await copyFile(oldFilename, newFilename); } else { await copyFile(newFilename, oldFilename); } } main();
/** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint maxlen: false */ 'use strict'; var createAPIRequest = require('../../lib/apirequest'); /** * DFA Reporting API * * @classdesc Lets you create, run and download reports. * @namespace dfareporting * @version v1.3 * @variation v1.3 * @this Dfareporting * @param {object=} options Options for Dfareporting */ function Dfareporting(options) { var self = this; this._options = options || {}; this.dimensionValues = { /** * dfareporting.dimensionValues.query * * @desc Retrieves list of report dimension values for a list of filters. * * @alias dfareporting.dimensionValues.query * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {integer=} params.maxResults - Maximum number of results to return. * @param {string=} params.pageToken - The value of the nextToken from the previous result page. * @param {string} params.profileId - The DFA user profile ID. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ query: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/dimensionvalues/query', method: 'POST' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); } }; this.files = { /** * dfareporting.files.get * * @desc Retrieves a report file by its report ID and file ID. * * @alias dfareporting.files.get * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.fileId - The ID of the report file. * @param {string} params.reportId - The ID of the report. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/reports/{reportId}/files/{fileId}', method: 'GET' }, params: params, requiredParams: ['reportId', 'fileId'], pathParams: ['fileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.files.list * * @desc Lists files for a user profile. * * @alias dfareporting.files.list * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {integer=} params.maxResults - Maximum number of results to return. * @param {string=} params.pageToken - The value of the nextToken from the previous result page. * @param {string} params.profileId - The DFA profile ID. * @param {string=} params.scope - The scope that defines which results are returned, default is 'MINE'. * @param {string=} params.sortField - The field by which to sort the list. * @param {string=} params.sortOrder - Order of sorted results, default is 'DESCENDING'. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/files', method: 'GET' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); } }; this.reports = { /** * dfareporting.reports.delete * * @desc Deletes a report by its ID. * * @alias dfareporting.reports.delete * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {string} params.reportId - The ID of the report. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ delete: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}', method: 'DELETE' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.get * * @desc Retrieves a report by its ID. * * @alias dfareporting.reports.get * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {string} params.reportId - The ID of the report. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}', method: 'GET' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.insert * * @desc Creates a report. * * @alias dfareporting.reports.insert * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ insert: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports', method: 'POST' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.list * * @desc Retrieves list of reports. * * @alias dfareporting.reports.list * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {integer=} params.maxResults - Maximum number of results to return. * @param {string=} params.pageToken - The value of the nextToken from the previous result page. * @param {string} params.profileId - The DFA user profile ID. * @param {string=} params.scope - The scope that defines which results are returned, default is 'MINE'. * @param {string=} params.sortField - The field by which to sort the list. * @param {string=} params.sortOrder - Order of sorted results, default is 'DESCENDING'. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports', method: 'GET' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.patch * * @desc Updates a report. This method supports patch semantics. * * @alias dfareporting.reports.patch * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {string} params.reportId - The ID of the report. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ patch: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}', method: 'PATCH' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.run * * @desc Runs a report. * * @alias dfareporting.reports.run * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA profile ID. * @param {string} params.reportId - The ID of the report. * @param {boolean=} params.synchronous - If set and true, tries to run the report synchronously. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ run: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}/run', method: 'POST' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.update * * @desc Updates a report. * * @alias dfareporting.reports.update * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {string} params.reportId - The ID of the report. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ update: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}', method: 'PUT' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, compatibleFields: { /** * dfareporting.reports.compatibleFields.query * * @desc Returns the fields that are compatible to be selected in the respective sections of a report criteria, given the fields already selected in the input report and user permissions. * * @alias dfareporting.reports.compatibleFields.query * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The DFA user profile ID. * @param {object} params.resource - Request body data * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ query: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/compatiblefields/query', method: 'POST' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); } }, files: { /** * dfareporting.reports.files.get * * @desc Retrieves a report file. * * @alias dfareporting.reports.files.get * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.fileId - The ID of the report file. * @param {string} params.profileId - The DFA profile ID. * @param {string} params.reportId - The ID of the report. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}/files/{fileId}', method: 'GET' }, params: params, requiredParams: ['profileId', 'reportId', 'fileId'], pathParams: ['fileId', 'profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.reports.files.list * * @desc Lists files for a report. * * @alias dfareporting.reports.files.list * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {integer=} params.maxResults - Maximum number of results to return. * @param {string=} params.pageToken - The value of the nextToken from the previous result page. * @param {string} params.profileId - The DFA profile ID. * @param {string} params.reportId - The ID of the parent report. * @param {string=} params.sortField - The field by which to sort the list. * @param {string=} params.sortOrder - Order of sorted results, default is 'DESCENDING'. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}/reports/{reportId}/files', method: 'GET' }, params: params, requiredParams: ['profileId', 'reportId'], pathParams: ['profileId', 'reportId'], context: self }; return createAPIRequest(parameters, callback); } } }; this.userProfiles = { /** * dfareporting.userProfiles.get * * @desc Gets one user profile by ID. * * @alias dfareporting.userProfiles.get * @memberOf! dfareporting(v1.3) * * @param {object} params - Parameters for request * @param {string} params.profileId - The user profile ID. * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ get: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles/{profileId}', method: 'GET' }, params: params, requiredParams: ['profileId'], pathParams: ['profileId'], context: self }; return createAPIRequest(parameters, callback); }, /** * dfareporting.userProfiles.list * * @desc Retrieves list of user profiles for a user. * * @alias dfareporting.userProfiles.list * @memberOf! dfareporting(v1.3) * * @param {object=} params - Parameters for request * @param {callback} callback - The callback that handles the response. * @return {object} Request object */ list: function(params, callback) { var parameters = { options: { url: 'https://www.googleapis.com/dfareporting/v1.3/userprofiles', method: 'GET' }, params: params, requiredParams: [], pathParams: [], context: self }; return createAPIRequest(parameters, callback); } }; } /** * Exports Dfareporting object * @type Dfareporting */ module.exports = Dfareporting;
export default function(event) { var message; if (event.wasClean === false && event.code !== 1000 && event.code !== 1006) { var reason = event.reason || 'Unkown reason.'; message = 'Disconnected from live stream: ' + event.code + ' ' + reason; } return message; }
// Generated on 2013-07-08 using generator-angular-module 0.2.0 'use strict'; module.exports = function(grunt) { // Configurable paths var yoConfig = { livereload: 35729, src: 'src', dist: 'dist' }; // Livereload setup var lrSnippet = require('connect-livereload')({port: yoConfig.livereload}); var mountFolder = function (connect, dir) { return connect.static(require('path').resolve(dir)); }; // Load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); // Project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), yo: yoConfig, meta: { banner: '/**\n' + ' * <%= pkg.name %>\n' + ' * @version v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' + ' * @link <%= pkg.homepage %>\n' + ' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' + ' * @license MIT License, http://www.opensource.org/licenses/MIT\n' + ' */\n' }, open: { server: { path: 'http://localhost:<%= connect.options.port %>' } }, clean: { dist: { files: [{ dot: true, src: [ '.tmp', '<%= yo.dist %>/*', '!<%= yo.dist %>/.git*' ] }] }, server: '.tmp' }, watch: { gruntfile: { files: '<%= jshint.gruntfile.src %>', tasks: ['jshint:gruntfile'] }, less: { files: ['<%= yo.src %>/{,*/}*.less'], tasks: ['less:dist'] }, app: { files: [ '<%= yo.src %>/{,*/}*.html', '{.tmp,<%= yo.src %>}/{,*/}*.css', '{.tmp,<%= yo.src %>}/{,*/}*.js' ], options: { livereload: yoConfig.livereload } }, test: { files: '<%= jshint.test.src %>', tasks: ['jshint:test', 'qunit'] } }, connect: { options: { port: 9000, hostname: '0.0.0.0' // Change this to '0.0.0.0' to access the server from outside. }, livereload: { options: { middleware: function (connect) { return [ lrSnippet, mountFolder(connect, '.tmp'), mountFolder(connect, yoConfig.src) ]; } } } }, less: { options: { // dumpLineNumbers: 'all', paths: ['<%= yo.src %>'] }, dist: { files: { '<%= yo.src %>/<%= yo.name %>.css': '<%= yo.src %>/<%= yo.name %>.less' } } }, jshint: { gruntfile: { options: { jshintrc: '.jshintrc' }, src: 'Gruntfile.js' }, src: { options: { jshintrc: '.jshintrc' }, src: ['<%= yo.src %>/*.js'] }, test: { options: { jshintrc: 'test/.jshintrc' }, src: ['test/**/*.js'] } }, karma: { options: { configFile: 'karma.conf.js', browsers: ['PhantomJS'] }, unit: { singleRun: true }, server: { autoWatch: true } }, ngmin: { options: { banner: '<%= meta.banner %>' }, dist: { src: ['<%= yo.src %>/*.js'], dest: '<%= yo.dist %>/<%= pkg.name %>.js' } }, uglify: { options: { banner: '<%= meta.banner %>' }, dist: { src: '<%= ngmin.dist.dest %>', dest: '<%= yo.dist %>/<%= pkg.name %>.min.js' } }, bump: { options: { files: ['package.json', 'bower.json'], commitMessage: 'chore(release): bump v<%= pkg.version %>', tagName: 'v<%= pkg.version %>', tagMessage: 'chore(release): bump v<%= pkg.version %>', commitFiles: ['-a'], pushTo: 'mgcrea' } } }); grunt.registerTask('test', [ 'jshint', 'karma:unit' ]); grunt.registerTask('build', [ 'clean:dist', 'less:dist', 'ngmin:dist', 'uglify:dist' ]); grunt.registerTask('release', [ // 'test', 'bump-only', 'build', 'bump-commit' ]); grunt.registerTask('default', ['build']); };
import xs from 'xstream'; import {div, ul, li, a, section, h1, p} from '@cycle/dom'; function renderMenu() { return ( ul([ li([ a('.link', {attrs: {href: '/'}}, 'Home') ]), li([ a('.link', {attrs: {href: '/about'}}, 'About') ]), ]) ); } function renderHomePage() { return ( section('.home', [ h1('The homepage'), p('Welcome to our spectacular web page with nothing special here.'), renderMenu(), ]) ); } function renderAboutPage() { return ( section('.about', [ h1('Read more about us'), p('This is the page where we describe ourselves.'), p('Contact us'), renderMenu(), ]) ); } export default function app(sources) { const click$ = sources.DOM.select('.link').events('click'); const preventedEvent$ = click$; const contextFromClick$ = click$ .map(ev => ({route: ev.currentTarget.attributes.href.value})); const context$ = xs.merge(sources.context, contextFromClick$); const vdom$ = context$ .map(({route}) => { if (typeof window !== 'undefined') { window.history.pushState(null, '', route); } switch (route) { case '/': return renderHomePage(); case '/about': return renderAboutPage(); default: return div(`Unknown page ${route}`) } }); return { DOM: vdom$, PreventDefault: preventedEvent$ }; }
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * @name: S11.4.4_A2.2_T1; * @section: 11.4.4, 8.6.2.6; * @assertion: Operator ++x uses [[Default Value]]; * @description: If Type(value) is Object, evaluate ToPrimitive(value, Number); */ //CHECK#1 var object = {valueOf: function() {return 1}}; if (++object !== 1 + 1) { $ERROR('#1: var object = {valueOf: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#1: var object = {valueOf: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object)); } } //CHECK#2 var object = {valueOf: function() {return 1}, toString: function() {return 0}}; if (++object !== 1 + 1) { $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ++object; object === 1 + 1. Actual: ' + (object)); } } //CHECK#3 var object = {valueOf: function() {return 1}, toString: function() {return {}}}; if (++object !== 1 + 1) { $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ++object; object === 1 + 1. Actual: ' + (object)); } } //CHECK#4 try { var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; if (++object !== 1 + 1) { $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ++object; object === 1 + 1. Actual: ' + (object)); } } } catch (e) { if (e === "error") { $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ++object not throw "error"'); } else { $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw "error"}}; ++object not throw Error. Actual: ' + (e)); } } //CHECK#5 var object = {toString: function() {return 1}}; if (++object !== 1 + 1) { $ERROR('#5.1: var object = {toString: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#5.2: var object = {toString: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object)); } } //CHECK#6 var object = {valueOf: function() {return {}}, toString: function() {return 1}} if (++object !== 1 + 1) { $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object)); } else { if (object !== 1 + 1) { $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object)); } } //CHECK#7 try { var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; ++object; $ERROR('#7.1: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; ++object throw "error". Actual: ' + (++object)); } catch (e) { if (e !== "error") { $ERROR('#7.2: var object = {valueOf: function() {throw "error"}, toString: function() {return 1}}; ++object throw "error". Actual: ' + (e)); } } //CHECK#8 try { var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object; $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object throw TypeError. Actual: ' + (++object)); } catch (e) { if ((e instanceof TypeError) !== true) { $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object throw TypeError. Actual: ' + (e)); } }
import { mod } from './second'; assert.strictEqual(mod.a, 1); assert.strictEqual(mod.b, 2);
/*global describe, beforeEach, it*/ 'use strict'; var assert = require('assert'); describe('bespoke generator', function () { it('can be imported without blowing up', function () { var app = require('../app'); assert(app !== undefined); }); });
import _ from 'lodash' import React, { PropTypes } from 'react' import { getUnhandledProps, META } from '../../lib' import Button from '../../elements/Button' import Modal from '../../modules/Modal' /** * A Confirm modal gives the user a choice to confirm or cancel an action * @see Modal */ function Confirm(props) { const { open, cancelButton, confirmButton, header, content, onConfirm, onCancel } = props const rest = getUnhandledProps(Confirm, props) // `open` is auto controlled by the Modal // It cannot be present (even undefined) with `defaultOpen` // only apply it if the user provided an open prop const openProp = {} if (_.has(props, 'open')) openProp.open = open return ( <Modal {...openProp} size='small' onClose={onCancel} {...rest}> {header && <Modal.Header>{header}</Modal.Header>} {content && <Modal.Content>{content}</Modal.Content>} <Modal.Actions> <Button onClick={onCancel}>{cancelButton}</Button> <Button primary onClick={onConfirm}>{confirmButton}</Button> </Modal.Actions> </Modal> ) } Confirm._meta = { name: 'Confirm', type: META.TYPES.ADDON, } Confirm.propTypes = { /** Whether or not the modal is visible */ open: PropTypes.bool, /** The cancel button text */ cancelButton: PropTypes.string, /** The OK button text */ confirmButton: PropTypes.string, /** The ModalHeader text */ header: PropTypes.string, /** The ModalContent text. */ content: PropTypes.string, /** Called when the OK button is clicked */ onConfirm: PropTypes.func, /** Called when the Cancel button is clicked */ onCancel: PropTypes.func, } Confirm.defaultProps = { cancelButton: 'Cancel', confirmButton: 'OK', content: 'Are you sure?', } export default Confirm
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("vue")); else if(typeof define === 'function' && define.amd) define(["vue"], factory); else if(typeof exports === 'object') exports["Vuetify"] = factory(require("vue")); else root["Vuetify"] = factory(root["Vue"]); })(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_vue__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./src/components/VAlert/VAlert.ts": /*!*****************************************!*\ !*** ./src/components/VAlert/VAlert.ts ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_alerts.styl */ "./src/stylus/components/_alerts.styl"); /* harmony import */ var _stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_alerts_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Styles // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__["default"]).extend({ name: 'v-alert', props: { dismissible: Boolean, icon: String, outline: Boolean, type: { type: String, validator: function validator(val) { return ['info', 'error', 'success', 'warning'].includes(val); } } }, data: function data() { return { defaultColor: 'error' }; }, computed: { classes: function classes() { var color = this.type && !this.color ? this.type : this.computedColor; var classes = { 'v-alert--outline': this.outline }; return this.outline ? this.addTextColorClassChecks(classes, color) : this.addBackgroundColorClassChecks(classes, color); }, computedIcon: function computedIcon() { if (this.icon || !this.type) return this.icon; switch (this.type) { case 'info': return '$vuetify.icons.info'; case 'error': return '$vuetify.icons.error'; case 'success': return '$vuetify.icons.success'; case 'warning': return '$vuetify.icons.warning'; } } }, render: function render(h) { var _this = this; var children = [h('div', this.$slots.default)]; if (this.computedIcon) { children.unshift(h(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], { 'class': 'v-alert__icon' }, this.computedIcon)); } if (this.dismissible) { var close = h('a', { 'class': 'v-alert__dismissible', on: { click: function click() { _this.isActive = false; } } }, [h(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { right: true } }, '$vuetify.icons.cancel')]); children.push(close); } var alert = h('div', { staticClass: 'v-alert', 'class': this.classes, directives: [{ name: 'show', value: this.isActive }], on: this.$listeners }, children); if (!this.transition) return alert; return h('transition', { props: { name: this.transition, origin: this.origin, mode: this.mode } }, [alert]); } })); /***/ }), /***/ "./src/components/VAlert/index.ts": /*!****************************************!*\ !*** ./src/components/VAlert/index.ts ***! \****************************************/ /*! exports provided: VAlert, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAlert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAlert */ "./src/components/VAlert/VAlert.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAlert", function() { return _VAlert__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VAlert__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VAlert__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VAlert__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VAlert__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VApp/VApp.js": /*!*************************************!*\ !*** ./src/components/VApp/VApp.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_app.styl */ "./src/stylus/components/_app.styl"); /* harmony import */ var _stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_app_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_app_theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/app-theme */ "./src/components/VApp/mixins/app-theme.js"); /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts"); // Component level mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-app', directives: { Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_2__["default"] }, mixins: [_mixins_app_theme__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { id: { type: String, default: 'app' }, dark: Boolean }, computed: { classes: function classes() { var _a; return _a = {}, _a["theme--" + (this.dark ? 'dark' : 'light')] = true, _a['application--is-rtl'] = this.$vuetify.rtl, _a; } }, watch: { dark: function dark() { this.$vuetify.dark = this.dark; } }, mounted: function mounted() { this.$vuetify.dark = this.dark; }, render: function render(h) { var data = { staticClass: 'application', 'class': this.classes, attrs: { 'data-app': true }, domProps: { id: this.id } }; var wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default); return h('div', data, [wrapper]); } }); /***/ }), /***/ "./src/components/VApp/index.js": /*!**************************************!*\ !*** ./src/components/VApp/index.js ***! \**************************************/ /*! exports provided: VApp, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VApp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VApp */ "./src/components/VApp/VApp.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VApp", function() { return _VApp__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VApp__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VApp__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VApp__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VApp__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VApp/mixins/app-theme.js": /*!*************************************************!*\ !*** ./src/components/VApp/mixins/app-theme.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_colorUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/colorUtils */ "./src/util/colorUtils.ts"); /* harmony import */ var _util_theme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/theme */ "./src/util/theme.ts"); /* harmony default export */ __webpack_exports__["default"] = ({ data: function data() { return { style: null }; }, computed: { parsedTheme: function parsedTheme() { return _util_theme__WEBPACK_IMPORTED_MODULE_1__["parse"](this.$vuetify.theme); }, /** @return string */ generatedStyles: function generatedStyles() { var theme = this.parsedTheme; var css; if (this.$vuetify.options.themeCache != null) { css = this.$vuetify.options.themeCache.get(theme); if (css != null) return css; } var colors = Object.keys(theme); if (!colors.length) return ''; css = "a { color: " + Object(_util_colorUtils__WEBPACK_IMPORTED_MODULE_0__["intToHex"])(theme.primary) + "; }"; for (var i = 0; i < colors.length; ++i) { var name = colors[i]; var value = theme[name]; if (this.$vuetify.options.themeVariations.includes(name)) { css += _util_theme__WEBPACK_IMPORTED_MODULE_1__["genVariations"](name, value).join(''); } else { css += _util_theme__WEBPACK_IMPORTED_MODULE_1__["genBaseColor"](name, value); } } if (this.$vuetify.options.minifyTheme != null) { css = this.$vuetify.options.minifyTheme(css); } if (this.$vuetify.options.themeCache != null) { this.$vuetify.options.themeCache.set(theme, css); } return css; }, vueMeta: function vueMeta() { if (this.$vuetify.theme === false) return; var options = { cssText: this.generatedStyles, id: 'vuetify-theme-stylesheet', type: 'text/css' }; if (this.$vuetify.options.cspNonce) { options.nonce = this.$vuetify.options.cspNonce; } return { style: [options] }; } }, // Regular vue-meta metaInfo: function metaInfo() { return this.vueMeta; }, // Nuxt head: function head() { return this.vueMeta; }, watch: { generatedStyles: function generatedStyles() { !this.meta && this.applyTheme(); } }, created: function created() { if (this.$vuetify.theme === false) return; if (this.$meta) { // Vue-meta // Handled by metaInfo()/nuxt() } else if (typeof document === 'undefined' && this.$ssrContext) { // SSR var nonce = this.$vuetify.options.cspNonce ? " nonce=\"" + this.$vuetify.options.cspNonce + "\"" : ''; this.$ssrContext.head = this.$ssrContext.head || ''; this.$ssrContext.head += "<style type=\"text/css\" id=\"vuetify-theme-stylesheet\"" + nonce + ">" + this.generatedStyles + "</style>"; } else if (typeof document !== 'undefined') { // Client-side this.genStyle(); this.applyTheme(); } }, methods: { applyTheme: function applyTheme() { if (this.style) this.style.innerHTML = this.generatedStyles; }, genStyle: function genStyle() { var style = document.getElementById('vuetify-theme-stylesheet'); if (!style) { style = document.createElement('style'); style.type = 'text/css'; style.id = 'vuetify-theme-stylesheet'; if (this.$vuetify.options.cspNonce) { style.setAttribute('nonce', this.$vuetify.options.cspNonce); } document.head.appendChild(style); } this.style = style; } } }); /***/ }), /***/ "./src/components/VAutocomplete/VAutocomplete.js": /*!*******************************************************!*\ !*** ./src/components/VAutocomplete/VAutocomplete.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_autocompletes.styl */ "./src/stylus/components/_autocompletes.styl"); /* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSelect/VSelect */ "./src/components/VSelect/VSelect.js"); /* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Styles // Extensions // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-autocomplete', extends: _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"], props: { allowOverflow: { type: Boolean, default: true }, browserAutocomplete: { type: String, default: 'off' }, filter: { type: Function, default: function _default(item, queryText, itemText) { var hasValue = function hasValue(val) { return val != null ? val : ''; }; var text = hasValue(itemText); var query = hasValue(queryText); return text.toString().toLowerCase().indexOf(query.toString().toLowerCase()) > -1; } }, hideNoData: Boolean, noFilter: Boolean, offsetY: { type: Boolean, default: true }, offsetOverflow: { type: Boolean, default: true }, searchInput: { default: undefined }, transition: { type: [Boolean, String], default: false } }, data: function data(vm) { return { attrsInput: null, lazySearch: vm.searchInput }; }, computed: { classes: function classes() { return Object.assign({}, _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.classes.call(this), { 'v-autocomplete': true, 'v-autocomplete--is-selecting-index': this.selectedIndex > -1 }); }, computedItems: function computedItems() { return this.filteredItems; }, displayedItemsCount: function displayedItemsCount() { return this.hideSelected ? this.filteredItems.length - this.selectedItems.length : this.filteredItems.length; }, /** * The range of the current input text * * @return {Number} */ currentRange: function currentRange() { if (this.selectedItem == null) return 0; return this.getText(this.selectedItem).toString().length; }, filteredItems: function filteredItems() { var _this = this; if (!this.isSearching || this.noFilter) return this.allItems; return this.allItems.filter(function (i) { return _this.filter(i, _this.internalSearch, _this.getText(i)); }); }, internalSearch: { get: function get() { return this.lazySearch; }, set: function set(val) { this.lazySearch = val; this.$emit('update:searchInput', val); } }, isAnyValueAllowed: function isAnyValueAllowed() { return false; }, isDirty: function isDirty() { return this.searchIsDirty || this.selectedItems.length > 0; }, isSearching: function isSearching() { if (this.multiple) return this.searchIsDirty; return this.searchIsDirty && this.internalSearch !== this.getText(this.selectedItem); }, menuCanShow: function menuCanShow() { if (!this.isFocused) return false; return this.displayedItemsCount > 0 || !this.hideNoData; }, menuProps: function menuProps() { return Object.assign(_VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.menuProps.call(this), { contentClass: ("v-autocomplete__content " + (this.contentClass || '')).trim(), value: this.menuCanShow && this.isMenuActive }); }, searchIsDirty: function searchIsDirty() { return this.internalSearch != null && this.internalSearch !== ''; }, selectedItem: function selectedItem() { var _this = this; if (this.multiple) return null; return this.selectedItems.find(function (i) { return _this.valueComparator(_this.getValue(i), _this.getValue(_this.internalValue)); }); }, listData: function listData() { var data = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.listData.call(this); Object.assign(data.props, { items: this.virtualizedItems, noFilter: this.noFilter || !this.isSearching || !this.filteredItems.length, searchInput: this.internalSearch }); return data; } }, watch: { filteredItems: function filteredItems(val) { this.onFilteredItemsChanged(val); }, internalValue: function internalValue() { this.setSearch(); }, isFocused: function isFocused(val) { if (val) { this.$refs.input && this.$refs.input.select(); } else { this.updateSelf(); } }, isMenuActive: function isMenuActive(val) { if (val || !this.hasSlot) return; this.lazySearch = null; }, items: function items(val) { // If we are focused, the menu // is not active and items change // User is probably async loading // items, try to activate the menu if (this.isFocused && !this.isMenuActive && val.length) this.activateMenu(); }, searchInput: function searchInput(val) { this.lazySearch = val; }, internalSearch: function internalSearch(val) { this.onInternalSearchChanged(val); } }, created: function created() { this.setSearch(); }, methods: { onFilteredItemsChanged: function onFilteredItemsChanged(val) { var _this = this; this.setMenuIndex(-1); this.$nextTick(function () { _this.setMenuIndex(val.length === 1 ? 0 : -1); }); }, onInternalSearchChanged: function onInternalSearchChanged(val) { this.updateMenuDimensions(); }, activateMenu: function activateMenu() { if (this.menuCanShow) { this.isMenuActive = true; } }, updateMenuDimensions: function updateMenuDimensions() { if (this.isMenuActive && this.$refs.menu) { this.$refs.menu.updateDimensions(); } }, changeSelectedIndex: function changeSelectedIndex(keyCode) { // Do not allow changing of selectedIndex // when search is dirty if (this.searchIsDirty) return; if (![_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].backspace, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].left, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].right, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].delete].includes(keyCode)) return; var indexes = this.selectedItems.length - 1; if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].left) { this.selectedIndex = this.selectedIndex === -1 ? indexes : this.selectedIndex - 1; } else if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].right) { this.selectedIndex = this.selectedIndex >= indexes ? -1 : this.selectedIndex + 1; } else if (this.selectedIndex === -1) { this.selectedIndex = indexes; return; } var currentItem = this.selectedItems[this.selectedIndex]; if ([_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].backspace, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].delete].includes(keyCode) && !this.getDisabled(currentItem)) { var newIndex = this.selectedIndex === indexes ? this.selectedIndex - 1 : this.selectedItems[this.selectedIndex + 1] ? this.selectedIndex : -1; if (newIndex === -1) { this.internalValue = this.multiple ? [] : undefined; } else { this.selectItem(currentItem); } this.selectedIndex = newIndex; } }, clearableCallback: function clearableCallback() { this.internalSearch = undefined; _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.clearableCallback.call(this); }, genInput: function genInput() { var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_2__["default"].methods.genInput.call(this); input.data.attrs.role = 'combobox'; input.data.domProps.value = this.internalSearch; return input; }, genSelections: function genSelections() { return this.hasSlot || this.multiple ? _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genSelections.call(this) : []; }, onClick: function onClick() { if (this.isDisabled) return; this.selectedIndex > -1 ? this.selectedIndex = -1 : this.onFocus(); this.activateMenu(); }, onEnterDown: function onEnterDown() { // Avoid invoking this method // will cause updateSelf to // be called emptying search }, onInput: function onInput(e) { if (this.selectedIndex > -1) return; // If typing and menu is not currently active if (e.target.value) { this.activateMenu(); if (!this.isAnyValueAllowed) this.setMenuIndex(0); } this.mask && this.resetSelections(e.target); this.internalSearch = e.target.value; this.badInput = e.target.validity && e.target.validity.badInput; }, onKeyDown: function onKeyDown(e) { var keyCode = e.keyCode; _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onKeyDown.call(this, e); // The ordering is important here // allows new value to be updated // and then moves the index to the // proper location this.changeSelectedIndex(keyCode); }, onTabDown: function onTabDown(e) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onTabDown.call(this, e); this.updateSelf(); }, selectItem: function selectItem(item) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.selectItem.call(this, item); this.setSearch(); }, setSelectedItems: function setSelectedItems() { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.setSelectedItems.call(this); // #4273 Don't replace if searching // #4403 Don't replace if focused if (!this.isFocused) this.setSearch(); }, setSearch: function setSearch() { var _this = this; // Wait for nextTick so selectedItem // has had time to update this.$nextTick(function () { _this.internalSearch = !_this.selectedItem || _this.multiple || _this.hasSlot ? null : _this.getText(_this.selectedItem); }); }, setValue: function setValue() { this.internalValue = this.internalSearch; this.$emit('change', this.internalSearch); }, updateSelf: function updateSelf() { this.updateAutocomplete(); }, updateAutocomplete: function updateAutocomplete() { if (!this.searchIsDirty && !this.internalValue) return; if (!this.valueComparator(this.internalSearch, this.getValue(this.internalValue))) { this.setSearch(); } } } }); /***/ }), /***/ "./src/components/VAutocomplete/index.js": /*!***********************************************!*\ !*** ./src/components/VAutocomplete/index.js ***! \***********************************************/ /*! exports provided: VAutocomplete, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAutocomplete */ "./src/components/VAutocomplete/VAutocomplete.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAutocomplete", function() { return _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VAutocomplete__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VAvatar/VAvatar.ts": /*!*******************************************!*\ !*** ./src/components/VAvatar/VAvatar.ts ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_avatars.styl */ "./src/stylus/components/_avatars.styl"); /* harmony import */ var _stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_avatars_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_3__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-avatar', functional: true, props: { // TODO: inherit these color: String, size: { type: [Number, String], default: 48 }, tile: Boolean }, render: function render(h, _a) { var data = _a.data, props = _a.props, children = _a.children; data.staticClass = ("v-avatar " + (data.staticClass || '')).trim(); if (props.tile) data.staticClass += ' v-avatar--tile'; var size = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(props.size); data.style = __assign({ height: size, width: size }, data.style); data.class = [data.class, _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.addBackgroundColorClassChecks.call(props, {}, props.color)]; return h('div', data, children); } })); /***/ }), /***/ "./src/components/VAvatar/index.ts": /*!*****************************************!*\ !*** ./src/components/VAvatar/index.ts ***! \*****************************************/ /*! exports provided: VAvatar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAvatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VAvatar */ "./src/components/VAvatar/VAvatar.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAvatar", function() { return _VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBadge/VBadge.ts": /*!*****************************************!*\ !*** ./src/components/VBadge/VBadge.ts ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_badges.styl */ "./src/stylus/components/_badges.styl"); /* harmony import */ var _stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_badges_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Styles // Mixins /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_mixins_positionable__WEBPACK_IMPORTED_MODULE_3__["factory"])(['left', 'bottom']), _mixins_transitionable__WEBPACK_IMPORTED_MODULE_4__["default"] /* @vue/component */ ).extend({ name: 'v-badge', props: { color: { type: String, default: 'primary' }, overlap: Boolean, transition: { type: String, default: 'fab-transition' }, value: { default: true } }, computed: { classes: function classes() { return { 'v-badge--bottom': this.bottom, 'v-badge--left': this.left, 'v-badge--overlap': this.overlap }; } }, render: function render(h) { var badge = this.$slots.badge ? [h('span', { staticClass: 'v-badge__badge', 'class': this.addBackgroundColorClassChecks(), attrs: this.$attrs, directives: [{ name: 'show', value: this.isActive }] }, this.$slots.badge)] : undefined; return h('span', { staticClass: 'v-badge', 'class': this.classes }, [this.$slots.default, h('transition', { props: { name: this.transition, origin: this.origin, mode: this.mode } }, badge)]); } })); /***/ }), /***/ "./src/components/VBadge/index.ts": /*!****************************************!*\ !*** ./src/components/VBadge/index.ts ***! \****************************************/ /*! exports provided: VBadge, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBadge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBadge */ "./src/components/VBadge/VBadge.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBadge", function() { return _VBadge__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VBadge__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBadge__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VBadge__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBadge__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBottomNav/VBottomNav.ts": /*!*************************************************!*\ !*** ./src/components/VBottomNav/VBottomNav.ts ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_bottom-navs.styl */ "./src/stylus/components/_bottom-navs.styl"); /* harmony import */ var _stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_bottom_navs_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts"); /* harmony import */ var _mixins_button_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/button-group */ "./src/mixins/button-group.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Styles // Mixins // Util /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])('bottom', ['height', 'value']), _mixins_button_group__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"] /* @vue/component */ ).extend({ name: 'v-bottom-nav', props: { active: [Number, String], height: { default: 56, type: [Number, String], validator: function validator(v) { return !isNaN(parseInt(v)); } }, shift: Boolean, value: null }, computed: { classes: function classes() { return { 'v-bottom-nav--absolute': this.absolute, 'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed), 'v-bottom-nav--shift': this.shift, 'v-bottom-nav--active': this.value }; }, computedHeight: function computedHeight() { return parseInt(this.height); } }, watch: { active: function active() { this.update(); } }, methods: { isSelected: function isSelected(i) { var item = this.getValue(i); return this.active === item; }, updateApplication: function updateApplication() { return !this.value ? 0 : this.computedHeight; }, updateValue: function updateValue(i) { var item = this.getValue(i); this.$emit('update:active', item); } }, render: function render(h) { return h('div', { staticClass: 'v-bottom-nav', class: this.addBackgroundColorClassChecks(this.classes), style: { height: parseInt(this.computedHeight) + "px" }, ref: 'content' }, this.$slots.default); } })); /***/ }), /***/ "./src/components/VBottomNav/index.ts": /*!********************************************!*\ !*** ./src/components/VBottomNav/index.ts ***! \********************************************/ /*! exports provided: VBottomNav, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBottomNav__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBottomNav */ "./src/components/VBottomNav/VBottomNav.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomNav", function() { return _VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBottomNav__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBottomSheet/VBottomSheet.js": /*!*****************************************************!*\ !*** ./src/components/VBottomSheet/VBottomSheet.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_bottom-sheets.styl */ "./src/stylus/components/_bottom-sheets.styl"); /* harmony import */ var _stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_bottom_sheets_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VDialog_VDialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VDialog/VDialog */ "./src/components/VDialog/VDialog.js"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-bottom-sheet', props: { disabled: Boolean, fullWidth: Boolean, hideOverlay: Boolean, inset: Boolean, lazy: Boolean, maxWidth: { type: [String, Number], default: 'auto' }, persistent: Boolean, value: null }, render: function render(h) { var activator = h('template', { slot: 'activator' }, this.$slots.activator); var contentClass = ['v-bottom-sheet', this.inset ? 'v-bottom-sheet--inset' : ''].join(' '); return h(_VDialog_VDialog__WEBPACK_IMPORTED_MODULE_1__["default"], { attrs: __assign({}, this.$props), on: __assign({}, this.$listeners), props: { contentClass: contentClass, noClickAnimation: true, transition: 'bottom-sheet-transition', value: this.value } }, [activator, this.$slots.default]); } }); /***/ }), /***/ "./src/components/VBottomSheet/index.js": /*!**********************************************!*\ !*** ./src/components/VBottomSheet/index.js ***! \**********************************************/ /*! exports provided: VBottomSheet, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBottomSheet */ "./src/components/VBottomSheet/VBottomSheet.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomSheet", function() { return _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBottomSheet__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBreadcrumbs/VBreadcrumbs.js": /*!*****************************************************!*\ !*** ./src/components/VBreadcrumbs/VBreadcrumbs.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_breadcrumbs.styl */ "./src/stylus/components/_breadcrumbs.styl"); /* harmony import */ var _stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_breadcrumbs_styl__WEBPACK_IMPORTED_MODULE_0__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-breadcrumbs', props: { divider: { type: String, default: '/' }, large: Boolean, justifyCenter: Boolean, justifyEnd: Boolean }, computed: { classes: function classes() { return { 'v-breadcrumbs--large': this.large }; }, computedDivider: function computedDivider() { return this.$slots.divider ? this.$slots.divider : this.divider; }, styles: function styles() { var justify = this.justifyCenter ? 'center' : this.justifyEnd ? 'flex-end' : 'flex-start'; return { 'justify-content': justify }; } }, methods: { /** * Add dividers between * v-breadcrumbs-item * * @return {array} */ genChildren: function genChildren() { if (!this.$slots.default) return null; var h = this.$createElement; var children = []; var dividerData = { staticClass: 'v-breadcrumbs__divider' }; var createDividers = false; for (var i = 0; i < this.$slots.default.length; i++) { var elm = this.$slots.default[i]; if (!elm.componentOptions || elm.componentOptions.Ctor.options.name !== 'v-breadcrumbs-item') { children.push(elm); } else { if (createDividers) { children.push(h('li', dividerData, this.computedDivider)); } children.push(elm); createDividers = true; } } return children; } }, render: function render(h) { return h('ul', { staticClass: 'v-breadcrumbs', 'class': this.classes, style: this.styles }, this.genChildren()); } }); /***/ }), /***/ "./src/components/VBreadcrumbs/VBreadcrumbsItem.js": /*!*********************************************************!*\ !*** ./src/components/VBreadcrumbs/VBreadcrumbsItem.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-breadcrumbs-item', mixins: [_mixins_routable__WEBPACK_IMPORTED_MODULE_0__["default"]], props: { // In a breadcrumb, the currently // active item should be dimmed activeClass: { type: String, default: 'v-breadcrumbs__item--disabled' } }, computed: { classes: function classes() { var _a; return _a = { 'v-breadcrumbs__item': true }, _a[this.activeClass] = this.disabled, _a; } }, render: function render(h) { var _a = this.generateRouteLink(), tag = _a.tag, data = _a.data; return h('li', [h(tag, data, this.$slots.default)]); } }); /***/ }), /***/ "./src/components/VBreadcrumbs/index.js": /*!**********************************************!*\ !*** ./src/components/VBreadcrumbs/index.js ***! \**********************************************/ /*! exports provided: VBreadcrumbs, VBreadcrumbsItem, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBreadcrumbs */ "./src/components/VBreadcrumbs/VBreadcrumbs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBreadcrumbs", function() { return _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VBreadcrumbsItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VBreadcrumbsItem */ "./src/components/VBreadcrumbs/VBreadcrumbsItem.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBreadcrumbsItem", function() { return _VBreadcrumbsItem__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* istanbul ignore next */ _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VBreadcrumbsItem__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VBreadcrumbsItem__WEBPACK_IMPORTED_MODULE_1__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBreadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBtn/VBtn.ts": /*!*************************************!*\ !*** ./src/components/VBtn/VBtn.ts ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_buttons_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_buttons.styl */ "./src/stylus/components/_buttons.styl"); /* harmony import */ var _stylus_components_buttons_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_buttons_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _VProgressCircular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VProgressCircular */ "./src/components/VProgressCircular/index.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Components // Mixins /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_1__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_positionable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_mixins_toggleable__WEBPACK_IMPORTED_MODULE_7__["factory"])('inputValue'), Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_8__["inject"])('buttonGroup') /* @vue/component */ ).extend({ name: 'v-btn', props: { activeClass: { type: String, default: 'v-btn--active' }, block: Boolean, depressed: Boolean, fab: Boolean, flat: Boolean, icon: Boolean, large: Boolean, loading: Boolean, outline: Boolean, ripple: { type: [Boolean, Object], default: true }, round: Boolean, small: Boolean, tag: { type: String, default: 'button' }, type: { type: String, default: 'button' }, value: null }, computed: { classes: function classes() { var _a; var classes = __assign((_a = { 'v-btn': true }, _a[this.activeClass] = this.isActive, _a['v-btn--absolute'] = this.absolute, _a['v-btn--block'] = this.block, _a['v-btn--bottom'] = this.bottom, _a['v-btn--disabled'] = this.disabled, _a['v-btn--flat'] = this.flat, _a['v-btn--floating'] = this.fab, _a['v-btn--fixed'] = this.fixed, _a['v-btn--icon'] = this.icon, _a['v-btn--large'] = this.large, _a['v-btn--left'] = this.left, _a['v-btn--loader'] = this.loading, _a['v-btn--outline'] = this.outline, _a['v-btn--depressed'] = this.depressed && !this.flat || this.outline, _a['v-btn--right'] = this.right, _a['v-btn--round'] = this.round, _a['v-btn--router'] = this.to, _a['v-btn--small'] = this.small, _a['v-btn--top'] = this.top, _a), this.themeClasses); return !this.outline && !this.flat ? this.addBackgroundColorClassChecks(classes) : this.addTextColorClassChecks(classes); } }, mounted: function mounted() { if (this.buttonGroup) { this.buttonGroup.register(this); } }, beforeDestroy: function beforeDestroy() { if (this.buttonGroup) { this.buttonGroup.unregister(this); } }, methods: { // Prevent focus to match md spec click: function click(e) { !this.fab && e.detail && this.$el.blur(); this.$emit('click', e); }, genContent: function genContent() { return this.$createElement('div', { 'class': 'v-btn__content' }, [this.$slots.default]); }, genLoader: function genLoader() { var children = []; if (!this.$slots.loader) { children.push(this.$createElement(_VProgressCircular__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { indeterminate: true, size: 26, width: 2 } })); } else { children.push(this.$slots.loader); } return this.$createElement('span', { 'class': 'v-btn__loading' }, children); } }, render: function render(h) { var _a = this.generateRouteLink(), tag = _a.tag, data = _a.data; var children = [this.genContent()]; tag === 'button' && (data.attrs.type = this.type); this.loading && children.push(this.genLoader()); data.attrs.value = ['string', 'number'].includes(_typeof(this.value)) ? this.value : JSON.stringify(this.value); return h(tag, data, children); } })); /***/ }), /***/ "./src/components/VBtn/index.ts": /*!**************************************!*\ !*** ./src/components/VBtn/index.ts ***! \**************************************/ /*! exports provided: VBtn, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBtn */ "./src/components/VBtn/VBtn.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBtn", function() { return _VBtn__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VBtn__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBtn__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VBtn__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBtn__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VBtnToggle/VBtnToggle.ts": /*!*************************************************!*\ !*** ./src/components/VBtnToggle/VBtnToggle.ts ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_button_toggle_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_button-toggle.styl */ "./src/stylus/components/_button-toggle.styl"); /* harmony import */ var _stylus_components_button_toggle_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_button_toggle_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _mixins_button_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/button-group */ "./src/mixins/button-group.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); // Mixins // Util /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_1__["default"])(_mixins_button_group__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]).extend({ name: 'v-btn-toggle', model: { prop: 'inputValue', event: 'change' }, props: { inputValue: { required: false }, mandatory: Boolean, multiple: Boolean }, computed: { classes: function classes() { return { 'v-btn-toggle': true, 'v-btn-toggle--selected': this.hasValue, 'theme--light': this.light, 'theme--dark': this.dark }; }, hasValue: function hasValue() { return this.multiple && this.inputValue.length || !this.multiple && this.inputValue !== null && typeof this.inputValue !== 'undefined'; } }, watch: { inputValue: { handler: function handler() { this.update(); }, deep: true } }, created: function created() { if (this.multiple && !Array.isArray(this.inputValue)) { Object(_util_console__WEBPACK_IMPORTED_MODULE_4__["consoleWarn"])('Model must be bound to an array if the multiple property is true.', this); } }, methods: { isSelected: function isSelected(i) { var item = this.getValue(i); if (!this.multiple) { return this.inputValue === item; } return this.inputValue.includes(item); }, updateValue: function updateValue(i) { var item = this.getValue(i); if (!this.multiple) { if (this.mandatory && this.inputValue === item) return; this.$emit('change', this.inputValue === item ? null : item); return; } var items = this.inputValue.slice(); var index = items.indexOf(item); if (index > -1) { if (this.mandatory && items.length === 1) return; items.length >= 1 && items.splice(index, 1); } else { items.push(item); } this.$emit('change', items); }, updateAllValues: function updateAllValues() { if (!this.multiple) return; var items = []; for (var i = 0; i < this.buttons.length; ++i) { var item = this.getValue(i); var index = this.inputValue.indexOf(item); if (index !== -1) { items.push(item); } } this.$emit('change', items); } }, render: function render(h) { return h('div', { class: this.classes }, this.$slots.default); } })); /***/ }), /***/ "./src/components/VBtnToggle/index.ts": /*!********************************************!*\ !*** ./src/components/VBtnToggle/index.ts ***! \********************************************/ /*! exports provided: VBtnToggle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VBtnToggle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VBtnToggle */ "./src/components/VBtnToggle/VBtnToggle.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBtnToggle", function() { return _VBtnToggle__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VBtnToggle__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VBtnToggle__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VBtnToggle__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VBtnToggle__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VCard/VCard.ts": /*!***************************************!*\ !*** ./src/components/VCard/VCard.ts ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_cards.styl */ "./src/stylus/components/_cards.styl"); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Mixins // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_5__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]).extend({ name: 'v-card', props: { flat: Boolean, height: [Number, String], hover: Boolean, img: String, raised: Boolean, tag: { type: String, default: 'div' }, tile: Boolean, width: [String, Number] }, computed: { classes: function classes() { return this.addBackgroundColorClassChecks({ 'v-card': true, 'v-card--flat': this.flat, 'v-card--hover': this.hover, 'v-card--raised': this.raised, 'v-card--tile': this.tile, 'theme--light': this.light, 'theme--dark': this.dark }); }, styles: function styles() { var style = { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["convertToUnit"])(this.height) }; if (this.img) { style.background = "url(\"" + this.img + "\") center center / cover no-repeat"; } if (this.width) { style.width = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["convertToUnit"])(this.width); } return style; } }, render: function render(h) { var _a = this.generateRouteLink(), tag = _a.tag, data = _a.data; data.style = this.styles; return h(tag, data, this.$slots.default); } })); /***/ }), /***/ "./src/components/VCard/VCardMedia.ts": /*!********************************************!*\ !*** ./src/components/VCard/VCardMedia.ts ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); // Helpers // Types /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_1___default.a.extend({ name: 'v-card-media', props: { contain: Boolean, height: { type: [Number, String], default: 'auto' }, src: { type: String } }, render: function render(h) { var data = { 'class': 'v-card__media', style: { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["convertToUnit"])(this.height) }, on: this.$listeners }; var children = []; if (this.src) { children.push(h('div', { 'class': 'v-card__media__background', style: { background: "url(\"" + this.src + "\") center center / " + (this.contain ? 'contain' : 'cover') + " no-repeat" } })); } children.push(h('div', { 'class': 'v-card__media__content' }, this.$slots.default)); return h('div', data, children); } })); /***/ }), /***/ "./src/components/VCard/VCardTitle.ts": /*!********************************************!*\ !*** ./src/components/VCard/VCardTitle.ts ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); // Types /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'v-card-title', functional: true, props: { primaryTitle: Boolean }, render: function render(h, _a) { var data = _a.data, props = _a.props, children = _a.children; data.staticClass = ("v-card__title " + (data.staticClass || '')).trim(); if (props.primaryTitle) data.staticClass += ' v-card__title--primary'; return h('div', data, children); } })); /***/ }), /***/ "./src/components/VCard/index.ts": /*!***************************************!*\ !*** ./src/components/VCard/index.ts ***! \***************************************/ /*! exports provided: VCard, VCardMedia, VCardTitle, VCardActions, VCardText, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCardActions", function() { return VCardActions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCardText", function() { return VCardText; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VCard */ "./src/components/VCard/VCard.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCard", function() { return _VCard__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VCardMedia__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VCardMedia */ "./src/components/VCard/VCardMedia.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCardMedia", function() { return _VCardMedia__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VCardTitle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VCardTitle */ "./src/components/VCard/VCardTitle.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCardTitle", function() { return _VCardTitle__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_4__); var VCardActions = vue__WEBPACK_IMPORTED_MODULE_4___default.a.extend(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-card__actions')); var VCardText = vue__WEBPACK_IMPORTED_MODULE_4___default.a.extend(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-card__text')); /* istanbul ignore next */ _VCard__WEBPACK_IMPORTED_MODULE_1__["default"].install = function install(Vue) { Vue.component(_VCard__WEBPACK_IMPORTED_MODULE_1__["default"].options.name, _VCard__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VCardMedia__WEBPACK_IMPORTED_MODULE_2__["default"].options.name, _VCardMedia__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(_VCardTitle__WEBPACK_IMPORTED_MODULE_3__["default"].options.name, _VCardTitle__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(VCardActions.options.name, VCardActions); Vue.component(VCardText.options.name, VCardText); }; /* harmony default export */ __webpack_exports__["default"] = (_VCard__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "./src/components/VCarousel/VCarousel.js": /*!***********************************************!*\ !*** ./src/components/VCarousel/VCarousel.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_carousel_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_carousel.styl */ "./src/stylus/components/_carousel.styl"); /* harmony import */ var _stylus_components_carousel_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_carousel_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_bootable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/bootable */ "./src/mixins/bootable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-carousel', directives: { Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_6__["default"] }, mixins: [_mixins_bootable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_5__["provide"])('carousel')], props: { cycle: { type: Boolean, default: true }, delimiterIcon: { type: String, default: '$vuetify.icons.delimiter' }, hideControls: Boolean, hideDelimiters: Boolean, interval: { type: [Number, String], default: 6000, validator: function validator(value) { return value > 0; } }, nextIcon: { type: [Boolean, String], default: '$vuetify.icons.next' }, prevIcon: { type: [Boolean, String], default: '$vuetify.icons.prev' }, value: Number }, data: function data() { return { inputValue: null, items: [], slideTimeout: null, reverse: false }; }, watch: { items: function items() { if (this.inputValue >= this.items.length) { this.inputValue = this.items.length - 1; } }, inputValue: function inputValue() { // Evaluates items when inputValue changes to // account for dynamic changing of children var uid = (this.items[this.inputValue] || {}).uid; for (var index = this.items.length; --index >= 0;) { this.items[index].open(uid, this.reverse); } this.$emit('input', this.inputValue); this.restartTimeout(); }, value: function value(val) { this.inputValue = val; }, interval: function interval() { this.restartTimeout(); }, cycle: function cycle(val) { if (val) { this.restartTimeout(); } else { clearTimeout(this.slideTimeout); this.slideTimeout = null; } } }, mounted: function mounted() { this.init(); }, methods: { genDelimiters: function genDelimiters() { return this.$createElement('div', { staticClass: 'v-carousel__controls' }, this.genItems()); }, genIcon: function genIcon(direction, icon, fn) { if (!icon) return null; return this.$createElement('div', { staticClass: "v-carousel__" + direction }, [this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { icon: true, dark: this.dark || !this.light, light: this.light }, on: { click: fn } }, [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { 'size': '46px' } }, icon)])]); }, genItems: function genItems() { var _this = this; return this.items.map(function (item, index) { return _this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_1__["default"], { class: { 'v-carousel__controls__item': true, 'v-carousel__controls__item--active': index === _this.inputValue }, props: { icon: true, small: true, dark: _this.dark || !_this.light, light: _this.light }, key: index, on: { click: _this.select.bind(_this, index) } }, [_this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { size: '18px' } }, _this.delimiterIcon)]); }); }, restartTimeout: function restartTimeout() { this.slideTimeout && clearTimeout(this.slideTimeout); this.slideTimeout = null; var raf = requestAnimationFrame || setTimeout; raf(this.startTimeout); }, init: function init() { this.inputValue = this.value || 0; }, next: function next() { this.reverse = false; this.inputValue = (this.inputValue + 1) % this.items.length; }, prev: function prev() { this.reverse = true; this.inputValue = (this.inputValue + this.items.length - 1) % this.items.length; }, select: function select(index) { this.reverse = index < this.inputValue; this.inputValue = index; }, startTimeout: function startTimeout() { var _this = this; if (!this.cycle) return; this.slideTimeout = setTimeout(function () { return _this.next(); }, this.interval > 0 ? this.interval : 6000); }, register: function register(uid, open) { this.items.push({ uid: uid, open: open }); }, unregister: function unregister(uid) { this.items = this.items.filter(function (i) { return i.uid !== uid; }); } }, render: function render(h) { return h('div', { staticClass: 'v-carousel', directives: [{ name: 'touch', value: { left: this.next, right: this.prev } }] }, [this.hideControls ? null : this.genIcon('prev', this.$vuetify.rtl ? this.nextIcon : this.prevIcon, this.prev), this.hideControls ? null : this.genIcon('next', this.$vuetify.rtl ? this.prevIcon : this.nextIcon, this.next), this.hideDelimiters ? null : this.genDelimiters(), this.$slots.default]); } }); /***/ }), /***/ "./src/components/VCarousel/VCarouselItem.js": /*!***************************************************!*\ !*** ./src/components/VCarousel/VCarouselItem.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VJumbotron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../VJumbotron */ "./src/components/VJumbotron/index.js"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-carousel-item', mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_1__["inject"])('carousel', 'v-carousel-item', 'v-carousel')], inheritAttrs: false, props: { transition: { type: String, default: 'tab-transition' }, reverseTransition: { type: String, default: 'tab-reverse-transition' } }, data: function data() { return { active: false, reverse: false }; }, computed: { computedTransition: function computedTransition() { return this.reverse === !this.$vuetify.rtl ? this.reverseTransition : this.transition; } }, mounted: function mounted() { this.carousel.register(this._uid, this.open); }, beforeDestroy: function beforeDestroy() { this.carousel.unregister(this._uid, this.open); }, methods: { open: function open(id, reverse) { this.active = this._uid === id; this.reverse = reverse; } }, render: function render(h) { var item = h(_VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"], { props: __assign({}, this.$attrs, { height: '100%' }), on: this.$listeners, directives: [{ name: 'show', value: this.active }] }, this.$slots.default); return h('transition', { props: { name: this.computedTransition } }, [item]); } }); /***/ }), /***/ "./src/components/VCarousel/index.js": /*!*******************************************!*\ !*** ./src/components/VCarousel/index.js ***! \*******************************************/ /*! exports provided: VCarousel, VCarouselItem, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VCarousel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VCarousel */ "./src/components/VCarousel/VCarousel.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCarousel", function() { return _VCarousel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VCarouselItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VCarouselItem */ "./src/components/VCarousel/VCarouselItem.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCarouselItem", function() { return _VCarouselItem__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* istanbul ignore next */ _VCarousel__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VCarousel__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VCarousel__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VCarouselItem__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VCarouselItem__WEBPACK_IMPORTED_MODULE_1__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VCarousel__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VCheckbox/VCheckbox.js": /*!***********************************************!*\ !*** ./src/components/VCheckbox/VCheckbox.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_selection-controls.styl */ "./src/stylus/components/_selection-controls.styl"); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_selectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/selectable */ "./src/mixins/selectable.js"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Components // import { VFadeTransition } from '../transitions' // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-checkbox', mixins: [_mixins_selectable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { indeterminate: Boolean, indeterminateIcon: { type: String, default: '$vuetify.icons.checkboxIndeterminate' }, onIcon: { type: String, default: '$vuetify.icons.checkboxOn' }, offIcon: { type: String, default: '$vuetify.icons.checkboxOff' } }, data: function data(vm) { return { inputIndeterminate: vm.indeterminate }; }, computed: { classes: function classes() { return { 'v-input--selection-controls': true, 'v-input--checkbox': true }; }, computedIcon: function computedIcon() { if (this.inputIndeterminate) { return this.indeterminateIcon; } else if (this.isActive) { return this.onIcon; } else { return this.offIcon; } } }, watch: { indeterminate: function indeterminate(val) { this.inputIndeterminate = val; } }, methods: { genCheckbox: function genCheckbox() { return this.$createElement('div', { staticClass: 'v-input--selection-controls__input' }, [this.genInput('checkbox', __assign({}, this.$attrs, { 'aria-checked': this.inputIndeterminate ? 'mixed' : this.isActive.toString() })), !this.disabled && this.genRipple({ 'class': this.classesSelectable }), this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], { 'class': this.classesSelectable, props: { dark: this.dark, light: this.light } }, this.computedIcon)]); }, genDefaultSlot: function genDefaultSlot() { return [this.genCheckbox(), this.genLabel()]; } } }); /***/ }), /***/ "./src/components/VCheckbox/index.js": /*!*******************************************!*\ !*** ./src/components/VCheckbox/index.js ***! \*******************************************/ /*! exports provided: VCheckbox, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VCheckbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VCheckbox */ "./src/components/VCheckbox/VCheckbox.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCheckbox", function() { return _VCheckbox__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VCheckbox__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VCheckbox__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VCheckbox__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VCheckbox__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VChip/VChip.ts": /*!***************************************!*\ !*** ./src/components/VChip/VChip.ts ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_chips_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_chips.styl */ "./src/stylus/components/_chips.styl"); /* harmony import */ var _stylus_components_chips_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_chips_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_1__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_5__["default"]).extend({ name: 'v-chip', props: { close: Boolean, disabled: Boolean, label: Boolean, outline: Boolean, // Used for selects/tagging selected: Boolean, small: Boolean, textColor: String, value: { type: Boolean, default: true } }, computed: { classes: function classes() { var classes = this.addBackgroundColorClassChecks({ 'v-chip--disabled': this.disabled, 'v-chip--selected': this.selected && !this.disabled, 'v-chip--label': this.label, 'v-chip--outline': this.outline, 'v-chip--small': this.small, 'v-chip--removable': this.close, 'theme--light': this.light, 'theme--dark': this.dark }); return this.textColor || this.outline ? this.addTextColorClassChecks(classes, this.textColor || this.color) : classes; } }, methods: { genClose: function genClose(h) { var _this = this; var data = { staticClass: 'v-chip__close', on: { click: function click(e) { e.stopPropagation(); _this.$emit('input', false); } } }; return h('div', data, [h(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], '$vuetify.icons.delete')]); }, genContent: function genContent(h) { var children = [this.$slots.default]; this.close && children.push(this.genClose(h)); return h('span', { staticClass: 'v-chip__content' }, children); } }, render: function render(h) { var data = { staticClass: 'v-chip', 'class': this.classes, attrs: { tabindex: this.disabled ? -1 : 0 }, directives: [{ name: 'show', value: this.isActive }], on: this.$listeners }; return h('span', data, [this.genContent(h)]); } })); /***/ }), /***/ "./src/components/VChip/index.ts": /*!***************************************!*\ !*** ./src/components/VChip/index.ts ***! \***************************************/ /*! exports provided: VChip, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VChip */ "./src/components/VChip/VChip.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VChip", function() { return _VChip__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VChip__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VChip__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VChip__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VChip__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VCombobox/VCombobox.js": /*!***********************************************!*\ !*** ./src/components/VCombobox/VCombobox.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_autocompletes.styl */ "./src/stylus/components/_autocompletes.styl"); /* harmony import */ var _stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_autocompletes_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSelect/VSelect */ "./src/components/VSelect/VSelect.js"); /* harmony import */ var _VAutocomplete_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VAutocomplete/VAutocomplete */ "./src/components/VAutocomplete/VAutocomplete.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Styles // Extensions // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-combobox', extends: _VAutocomplete_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"], props: { delimiters: { type: Array, default: function _default() { return []; } }, returnObject: { type: Boolean, default: true } }, data: function data() { return { editingIndex: -1 }; }, computed: { counterValue: function counterValue() { return this.multiple ? this.selectedItems.length : (this.internalSearch || '').toString().length; }, hasSlot: function hasSlot() { return _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].computed.hasSlot.call(this) || this.multiple; }, isAnyValueAllowed: function isAnyValueAllowed() { return true; }, menuCanShow: function menuCanShow() { if (!this.isFocused) return false; return this.displayedItemsCount > 0 || !!this.$slots['no-data'] && !this.hideNoData; } }, methods: { onFilteredItemsChanged: function onFilteredItemsChanged() { // nop }, onInternalSearchChanged: function onInternalSearchChanged(val) { if (val && this.multiple && this.delimiters) { var delimiter = this.delimiters.find(function (d) { return val.endsWith(d); }); if (delimiter == null) return; this.internalSearch = val.slice(0, val.length - delimiter.length); this.updateTags(); } this.updateMenuDimensions(); }, genChipSelection: function genChipSelection(item, index) { var _this = this; var chip = _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genChipSelection.call(this, item, index); // Allow user to update an existing value if (this.multiple) { chip.componentOptions.listeners.dblclick = function () { _this.editingIndex = index; _this.internalSearch = _this.getText(item); _this.selectedIndex = -1; }; } return chip; }, onChipInput: function onChipInput(item) { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onChipInput.call(this, item); this.editingIndex = -1; }, // Requires a manual definition // to overwrite removal in v-autocomplete onEnterDown: function onEnterDown() { this.updateSelf(); _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onEnterDown.call(this); }, onKeyDown: function onKeyDown(e) { var keyCode = e.keyCode; _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onKeyDown.call(this, e); // If user is at selection index of 0 // create a new tag if (this.multiple && keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].left && this.$refs.input.selectionStart === 0) { this.updateSelf(); } // The ordering is important here // allows new value to be updated // and then moves the index to the // proper location this.changeSelectedIndex(keyCode); }, onTabDown: function onTabDown(e) { // When adding tags, if searching and // there is not a filtered options, // add the value to the tags list if (this.multiple && this.internalSearch && this.getMenuIndex() === -1) { e.preventDefault(); e.stopPropagation(); return this.updateTags(); } _VAutocomplete_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].methods.onTabDown.call(this, e); }, selectItem: function selectItem(item) { // Currently only supports items:<string[]> if (this.editingIndex > -1) { this.updateEditing(); } else { _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.selectItem.call(this, item); } this.setSearch(); }, setSelectedItems: function setSelectedItems() { if (this.internalValue == null || this.internalValue === '') { this.selectedItems = []; } else { this.selectedItems = this.multiple ? this.internalValue : [this.internalValue]; } }, updateEditing: function updateEditing() { var value = this.internalValue.slice(); value[this.editingIndex] = this.internalSearch; this.internalValue = value; this.editingIndex = -1; }, updateCombobox: function updateCombobox() { var isUsingSlot = Boolean(this.$scopedSlots.selection) || this.hasChips; // If search is not dirty and is // using slot, do nothing if (isUsingSlot && !this.searchIsDirty) return; // The internal search is not matching // the internal value, update the input if (this.internalSearch !== this.getText(this.internalValue)) this.setValue(); // Reset search if using slot // to avoid a double input if (isUsingSlot) this.internalSearch = undefined; }, updateSelf: function updateSelf() { this.multiple ? this.updateTags() : this.updateCombobox(); }, updateTags: function updateTags() { var menuIndex = this.getMenuIndex(); // If the user is not searching // and no menu item is selected // do nothing if (menuIndex < 0 && !this.searchIsDirty) return; if (this.editingIndex > -1) { return this.updateEditing(); } var index = this.selectedItems.indexOf(this.internalSearch); // If it already exists, do nothing // this might need to change to bring // the duplicated item to the last entered if (index > -1) { this.internalValue.splice(index, 1); } // If menu index is greater than 1 // the selection is handled elsewhere // TODO: find out where if (menuIndex > -1) return this.internalSearch = null; this.selectItem(this.internalSearch); this.internalSearch = null; } } }); /***/ }), /***/ "./src/components/VCombobox/index.js": /*!*******************************************!*\ !*** ./src/components/VCombobox/index.js ***! \*******************************************/ /*! exports provided: VCombobox, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VCombobox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VCombobox */ "./src/components/VCombobox/VCombobox.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCombobox", function() { return _VCombobox__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VCombobox__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VCombobox__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VCombobox__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VCombobox__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VCounter/VCounter.js": /*!*********************************************!*\ !*** ./src/components/VCounter/VCounter.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_counters_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_counters.styl */ "./src/stylus/components/_counters.styl"); /* harmony import */ var _stylus_components_counters_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_counters_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-counter', functional: true, mixins: [_mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { value: { type: [Number, String], default: '' }, max: [Number, String] }, render: function render(h, _a) { var props = _a.props; var max = parseInt(props.max, 10); var value = parseInt(props.value, 10); var content = max ? value + " / " + max : props.value; var isGreater = max && value > max; return h('div', { staticClass: 'v-counter', class: __assign({ 'error--text': isGreater }, _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"].options.computed.themeClasses.call(props)) }, content); } }); /***/ }), /***/ "./src/components/VCounter/index.js": /*!******************************************!*\ !*** ./src/components/VCounter/index.js ***! \******************************************/ /*! exports provided: VCounter, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VCounter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VCounter */ "./src/components/VCounter/VCounter.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCounter", function() { return _VCounter__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VCounter__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VCounter__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VCounter__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VCounter__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VDataIterator/VDataIterator.js": /*!*******************************************************!*\ !*** ./src/components/VDataIterator/VDataIterator.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_data_iterator_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_data-iterator.styl */ "./src/stylus/components/_data-iterator.styl"); /* harmony import */ var _stylus_components_data_iterator_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_data_iterator_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_data_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/data-iterable */ "./src/mixins/data-iterable.js"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-data-iterator', mixins: [_mixins_data_iterable__WEBPACK_IMPORTED_MODULE_1__["default"]], inheritAttrs: false, props: { contentTag: { type: String, default: 'div' }, contentProps: { type: Object, required: false }, contentClass: { type: String, required: false } }, computed: { classes: function classes() { return { 'v-data-iterator': true, 'v-data-iterator--select-all': this.selectAll !== false, 'theme--dark': this.dark, 'theme--light': this.light }; } }, created: function created() { this.initPagination(); }, methods: { genContent: function genContent() { var children = this.genItems(); var data = { 'class': this.contentClass, attrs: this.$attrs, on: this.$listeners, props: this.contentProps }; return this.$createElement(this.contentTag, data, children); }, genEmptyItems: function genEmptyItems(content) { return [this.$createElement('div', { 'class': 'text-xs-center', style: 'width: 100%' }, content)]; }, genFilteredItems: function genFilteredItems() { if (!this.$scopedSlots.item) { return null; } var items = []; for (var index = 0, len = this.filteredItems.length; index < len; ++index) { var item = this.filteredItems[index]; var props = this.createProps(item, index); items.push(this.$scopedSlots.item(props)); } return items; }, genFooter: function genFooter() { var children = []; if (this.$slots.footer) { children.push(this.$slots.footer); } if (!this.hideActions) { children.push(this.genActions()); } if (!children.length) return null; return this.$createElement('div', children); }, genHeader: function genHeader() { var children = []; if (this.$slots.header) { children.push(this.$slots.header); } if (!children.length) return null; return this.$createElement('div', children); } }, render: function render(h) { return h('div', { 'class': this.classes }, [this.genHeader(), this.genContent(), this.genFooter()]); } }); /***/ }), /***/ "./src/components/VDataIterator/index.js": /*!***********************************************!*\ !*** ./src/components/VDataIterator/index.js ***! \***********************************************/ /*! exports provided: VDataIterator, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VDataIterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VDataIterator */ "./src/components/VDataIterator/VDataIterator.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDataIterator", function() { return _VDataIterator__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VDataIterator__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VDataIterator__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VDataIterator__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VDataIterator__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VDataTable/VDataTable.js": /*!*************************************************!*\ !*** ./src/components/VDataTable/VDataTable.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_tables_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_tables.styl */ "./src/stylus/components/_tables.styl"); /* harmony import */ var _stylus_components_tables_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_tables_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _stylus_components_data_table_styl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stylus/components/_data-table.styl */ "./src/stylus/components/_data-table.styl"); /* harmony import */ var _stylus_components_data_table_styl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_data_table_styl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _mixins_data_iterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/data-iterable */ "./src/mixins/data-iterable.js"); /* harmony import */ var _mixins_head__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mixins/head */ "./src/components/VDataTable/mixins/head.js"); /* harmony import */ var _mixins_body__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mixins/body */ "./src/components/VDataTable/mixins/body.js"); /* harmony import */ var _mixins_foot__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mixins/foot */ "./src/components/VDataTable/mixins/foot.js"); /* harmony import */ var _mixins_progress__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mixins/progress */ "./src/components/VDataTable/mixins/progress.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Importing does not work properly var VTableOverflow = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["createSimpleFunctional"])('v-table__overflow'); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-data-table', mixins: [_mixins_data_iterable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_head__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_body__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_foot__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_progress__WEBPACK_IMPORTED_MODULE_6__["default"]], props: { headers: { type: Array, default: function _default() { return []; } }, headersLength: { type: Number }, headerText: { type: String, default: 'text' }, hideHeaders: Boolean, rowsPerPageText: { type: String, default: '$vuetify.dataTable.rowsPerPageText' }, customFilter: { type: Function, default: function _default(items, search, filter, headers) { search = search.toString().toLowerCase(); if (search.trim() === '') return items; var props = headers.map(function (h) { return h.value; }); return items.filter(function (item) { return props.some(function (prop) { return filter(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["getObjectValueByPath"])(item, prop), search); }); }); } } }, data: function data() { return { actionsClasses: 'v-datatable__actions', actionsRangeControlsClasses: 'v-datatable__actions__range-controls', actionsSelectClasses: 'v-datatable__actions__select', actionsPaginationClasses: 'v-datatable__actions__pagination' }; }, computed: { classes: function classes() { return { 'v-datatable v-table': true, 'v-datatable--select-all': this.selectAll !== false, 'theme--dark': this.dark, 'theme--light': this.light }; }, filteredItems: function filteredItems() { return this.filteredItemsImpl(this.headers); }, headerColumns: function headerColumns() { return this.headersLength || this.headers.length + (this.selectAll !== false); } }, created: function created() { var firstSortable = this.headers.find(function (h) { return !('sortable' in h) || h.sortable; }); this.defaultPagination.sortBy = !this.disableInitialSort && firstSortable ? firstSortable.value : null; this.initPagination(); }, methods: { hasTag: function hasTag(elements, tag) { return Array.isArray(elements) && elements.find(function (e) { return e.tag === tag; }); }, genTR: function genTR(children, data) { if (data === void 0) { data = {}; } return this.$createElement('tr', data, children); } }, render: function render(h) { var tableOverflow = h(VTableOverflow, {}, [h('table', { 'class': this.classes }, [this.genTHead(), this.genTBody(), this.genTFoot()])]); return h('div', [tableOverflow, this.genActionsFooter()]); } }); /***/ }), /***/ "./src/components/VDataTable/VEditDialog.js": /*!**************************************************!*\ !*** ./src/components/VDataTable/VEditDialog.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_small_dialog_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_small-dialog.styl */ "./src/stylus/components/_small-dialog.styl"); /* harmony import */ var _stylus_components_small_dialog_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_small_dialog_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_returnable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/returnable */ "./src/mixins/returnable.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _VMenu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../VMenu */ "./src/components/VMenu/index.js"); // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-edit-dialog', mixins: [_mixins_returnable__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { cancelText: { default: 'Cancel' }, large: Boolean, lazy: Boolean, persistent: Boolean, saveText: { default: 'Save' }, transition: { type: String, default: 'slide-x-reverse-transition' } }, data: function data() { return { isActive: false }; }, watch: { isActive: function isActive(val) { if (val) { this.$emit('open'); setTimeout(this.focus, 50); // Give DOM time to paint } else { this.$emit('close'); } } }, methods: { cancel: function cancel() { this.isActive = false; this.$emit('cancel'); }, focus: function focus() { var input = this.$refs.content.querySelector('input'); input && input.focus(); }, genButton: function genButton(fn, text) { return this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_3__["default"], { props: { flat: true, color: 'primary', light: true }, on: { click: fn } }, text); }, genActions: function genActions() { var _this = this; return this.$createElement('div', { 'class': 'v-small-dialog__actions' }, [this.genButton(this.cancel, this.cancelText), this.genButton(function () { _this.save(_this.returnValue); _this.$emit('save'); }, this.saveText)]); }, genContent: function genContent() { var _this = this; return this.$createElement('div', { on: { keydown: function keydown(e) { var input = _this.$refs.content.querySelector('input'); e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_2__["keyCodes"].esc && _this.cancel(); if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_2__["keyCodes"].enter && input) { _this.save(input.value); _this.$emit('save'); } } }, ref: 'content' }, [this.$slots.input]); } }, render: function render(h) { var _this = this; return h(_VMenu__WEBPACK_IMPORTED_MODULE_4__["default"], { 'class': 'v-small-dialog', props: { contentClass: 'v-small-dialog__content', transition: this.transition, origin: 'top right', right: true, value: this.isActive, closeOnClick: !this.persistent, closeOnContentClick: false, lazy: this.lazy }, on: { input: function input(val) { return _this.isActive = val; } } }, [h('a', { slot: 'activator' }, this.$slots.default), this.genContent(), this.large ? this.genActions() : null]); } }); /***/ }), /***/ "./src/components/VDataTable/index.js": /*!********************************************!*\ !*** ./src/components/VDataTable/index.js ***! \********************************************/ /*! exports provided: VDataTable, VEditDialog, VTableOverflow, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VTableOverflow", function() { return VTableOverflow; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VDataTable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VDataTable */ "./src/components/VDataTable/VDataTable.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDataTable", function() { return _VDataTable__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VEditDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VEditDialog */ "./src/components/VDataTable/VEditDialog.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VEditDialog", function() { return _VEditDialog__WEBPACK_IMPORTED_MODULE_2__["default"]; }); var VTableOverflow = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-table__overflow'); /* istanbul ignore next */ _VDataTable__WEBPACK_IMPORTED_MODULE_1__["default"].install = function install(Vue) { Vue.component(_VDataTable__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VDataTable__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VEditDialog__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VEditDialog__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(VTableOverflow.name, VTableOverflow); }; /* harmony default export */ __webpack_exports__["default"] = (_VDataTable__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "./src/components/VDataTable/mixins/body.js": /*!**************************************************!*\ !*** ./src/components/VDataTable/mixins/body.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transitions_expand_transition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../transitions/expand-transition */ "./src/components/transitions/expand-transition.js"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genTBody: function genTBody() { var children = this.genItems(); return this.$createElement('tbody', children); }, genExpandedRow: function genExpandedRow(props) { var children = []; if (this.isExpanded(props.item)) { var expand = this.$createElement('div', { class: 'v-datatable__expand-content', key: props.item[this.itemKey] }, this.$scopedSlots.expand(props)); children.push(expand); } var transition = this.$createElement('transition-group', { class: 'v-datatable__expand-col', attrs: { colspan: this.headerColumns }, props: { tag: 'td' }, on: Object(_transitions_expand_transition__WEBPACK_IMPORTED_MODULE_0__["default"])('v-datatable__expand-col--expanded') }, children); return this.genTR([transition], { class: 'v-datatable__expand-row' }); }, genFilteredItems: function genFilteredItems() { if (!this.$scopedSlots.items) { return null; } var rows = []; for (var index = 0, len = this.filteredItems.length; index < len; ++index) { var item = this.filteredItems[index]; var props = this.createProps(item, index); var row = this.$scopedSlots.items(props); rows.push(this.hasTag(row, 'td') ? this.genTR(row, { key: this.itemKey ? props.item[this.itemKey] : index, attrs: { active: this.isSelected(item) } }) : row); if (this.$scopedSlots.expand) { var expandRow = this.genExpandedRow(props); rows.push(expandRow); } } return rows; }, genEmptyItems: function genEmptyItems(content) { if (this.hasTag(content, 'tr')) { return content; } else if (this.hasTag(content, 'td')) { return this.genTR(content); } else { return this.genTR([this.$createElement('td', { class: { 'text-xs-center': typeof content === 'string' }, attrs: { colspan: this.headerColumns } }, content)]); } } } }); /***/ }), /***/ "./src/components/VDataTable/mixins/foot.js": /*!**************************************************!*\ !*** ./src/components/VDataTable/mixins/foot.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genTFoot: function genTFoot() { if (!this.$slots.footer) { return null; } var footer = this.$slots.footer; var row = this.hasTag(footer, 'td') ? this.genTR(footer) : footer; return this.$createElement('tfoot', [row]); }, genActionsFooter: function genActionsFooter() { if (this.hideActions) { return null; } return this.$createElement('div', { 'class': this.classes }, this.genActions()); } } }); /***/ }), /***/ "./src/components/VDataTable/mixins/head.js": /*!**************************************************!*\ !*** ./src/components/VDataTable/mixins/head.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/console */ "./src/util/console.ts"); /* harmony import */ var _VCheckbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../VCheckbox */ "./src/components/VCheckbox/index.js"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../VIcon */ "./src/components/VIcon/index.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ props: { sortIcon: { type: String, default: '$vuetify.icons.sort' } }, methods: { genTHead: function genTHead() { var _this = this; if (this.hideHeaders) return; // Exit Early since no headers are needed. var children = []; if (this.$scopedSlots.headers) { var row = this.$scopedSlots.headers({ headers: this.headers, indeterminate: this.indeterminate, all: this.everyItem }); children = [this.hasTag(row, 'th') ? this.genTR(row) : row, this.genTProgress()]; } else { var row = this.headers.map(function (o) { return _this.genHeader(o); }); var checkbox = this.$createElement(_VCheckbox__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { dark: this.dark, light: this.light, color: this.selectAll === true ? '' : this.selectAll, hideDetails: true, inputValue: this.everyItem, indeterminate: this.indeterminate }, on: { change: this.toggle } }); this.hasSelectAll && row.unshift(this.$createElement('th', [checkbox])); children = [this.genTR(row), this.genTProgress()]; } return this.$createElement('thead', [children]); }, genHeader: function genHeader(header) { var array = [this.$scopedSlots.headerCell ? this.$scopedSlots.headerCell({ header: header }) : header[this.headerText]]; return this.$createElement.apply(this, __spread(['th'], this.genHeaderData(header, array))); }, genHeaderData: function genHeaderData(header, children) { var classes = ['column']; var data = { key: header[this.headerText], attrs: { role: 'columnheader', scope: 'col', width: header.width || null, 'aria-label': header[this.headerText] || '', 'aria-sort': 'none' } }; if (header.sortable == null || header.sortable) { this.genHeaderSortingData(header, children, data, classes); } else { data.attrs['aria-label'] += ': Not sorted.'; // TODO: Localization } classes.push("text-xs-" + (header.align || 'left')); if (Array.isArray(header.class)) { classes.push.apply(classes, __spread(header.class)); } else if (header.class) { classes.push(header.class); } data.class = classes; return [data, children]; }, genHeaderSortingData: function genHeaderSortingData(header, children, data, classes) { var _this = this; if (!('value' in header)) { Object(_util_console__WEBPACK_IMPORTED_MODULE_0__["consoleWarn"])('Headers must have a value property that corresponds to a value in the v-model array', this); } data.attrs.tabIndex = 0; data.on = { click: function click() { _this.expanded = {}; _this.sort(header.value); }, keydown: function keydown(e) { // check for space if (e.keyCode === 32) { e.preventDefault(); _this.sort(header.value); } } }; classes.push('sortable'); var icon = this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { small: true } }, this.sortIcon); if (!header.align || header.align === 'left') { children.push(icon); } else { children.unshift(icon); } var pagination = this.computedPagination; var beingSorted = pagination.sortBy === header.value; if (beingSorted) { classes.push('active'); if (pagination.descending) { classes.push('desc'); data.attrs['aria-sort'] = 'descending'; data.attrs['aria-label'] += ': Sorted descending. Activate to remove sorting.'; // TODO: Localization } else { classes.push('asc'); data.attrs['aria-sort'] = 'ascending'; data.attrs['aria-label'] += ': Sorted ascending. Activate to sort descending.'; // TODO: Localization } } else { data.attrs['aria-label'] += ': Not sorted. Activate to sort ascending.'; // TODO: Localization } } } }); /***/ }), /***/ "./src/components/VDataTable/mixins/progress.js": /*!******************************************************!*\ !*** ./src/components/VDataTable/mixins/progress.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genTProgress: function genTProgress() { var col = this.$createElement('th', { staticClass: 'column', attrs: { colspan: this.headerColumns } }, [this.genProgress()]); return this.genTR([col], { staticClass: 'v-datatable__progress' }); } } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePicker.js": /*!***************************************************!*\ !*** ./src/components/VDatePicker/VDatePicker.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VDatePickerTitle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VDatePickerTitle */ "./src/components/VDatePicker/VDatePickerTitle.js"); /* harmony import */ var _VDatePickerHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VDatePickerHeader */ "./src/components/VDatePicker/VDatePickerHeader.js"); /* harmony import */ var _VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VDatePickerDateTable */ "./src/components/VDatePicker/VDatePickerDateTable.js"); /* harmony import */ var _VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VDatePickerMonthTable */ "./src/components/VDatePicker/VDatePickerMonthTable.js"); /* harmony import */ var _VDatePickerYears__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VDatePickerYears */ "./src/components/VDatePicker/VDatePickerYears.js"); /* harmony import */ var _mixins_picker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/picker */ "./src/mixins/picker.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ "./src/components/VDatePicker/util/index.js"); /* harmony import */ var _util_isDateAllowed__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/isDateAllowed */ "./src/components/VDatePicker/util/isDateAllowed.js"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; // Components // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker', mixins: [_mixins_picker__WEBPACK_IMPORTED_MODULE_5__["default"]], props: { allowedDates: Function, // Function formatting the day in date picker table dayFormat: { type: Function, default: null }, events: { type: [Array, Object, Function], default: function _default() { return null; } }, eventColor: { type: [String, Function, Object], default: 'warning' }, firstDayOfWeek: { type: [String, Number], default: 0 }, // Function formatting the tableDate in the day/month table header headerDateFormat: { type: Function, default: null }, locale: { type: String, default: 'en-us' }, max: String, min: String, // Function formatting month in the months table monthFormat: { type: Function, default: null }, nextIcon: { type: String, default: '$vuetify.icons.next' }, pickerDate: String, prevIcon: { type: String, default: '$vuetify.icons.prev' }, reactive: Boolean, readonly: Boolean, scrollable: Boolean, showCurrent: { type: [Boolean, String], default: true }, // Function formatting currently selected date in the picker title titleDateFormat: { type: Function, default: null }, type: { type: String, default: 'date', validator: function validator(type) { return ['date', 'month'].includes(type); } // TODO: year }, value: String, // Function formatting the year in table header and pickup title yearFormat: { type: Function, default: null }, yearIcon: String }, data: function data() { var _this = this; var now = new Date(); return { activePicker: this.type.toUpperCase(), defaultColor: 'accent', inputDay: null, inputMonth: null, inputYear: null, isReversing: false, now: now, // tableDate is a string in 'YYYY' / 'YYYY-M' format (leading zero for month is not required) tableDate: function () { if (_this.pickerDate) { return _this.pickerDate; } var date = _this.value || now.getFullYear() + "-" + (now.getMonth() + 1); var type = _this.type === 'date' ? 'month' : 'year'; return _this.sanitizeDateString(date, type); }() }; }, computed: { current: function current() { if (this.showCurrent === true) { return this.sanitizeDateString(this.now.getFullYear() + "-" + (this.now.getMonth() + 1) + "-" + this.now.getDate(), this.type); } return this.showCurrent || null; }, inputDate: function inputDate() { return this.type === 'date' ? this.inputYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.inputMonth + 1) + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.inputDay) : this.inputYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.inputMonth + 1); }, tableMonth: function tableMonth() { return (this.pickerDate || this.tableDate).split('-')[1] - 1; }, tableYear: function tableYear() { return (this.pickerDate || this.tableDate).split('-')[0] * 1; }, minMonth: function minMonth() { return this.min ? this.sanitizeDateString(this.min, 'month') : null; }, maxMonth: function maxMonth() { return this.max ? this.sanitizeDateString(this.max, 'month') : null; }, minYear: function minYear() { return this.min ? this.sanitizeDateString(this.min, 'year') : null; }, maxYear: function maxYear() { return this.max ? this.sanitizeDateString(this.max, 'year') : null; }, formatters: function formatters() { return { year: this.yearFormat || Object(_util__WEBPACK_IMPORTED_MODULE_6__["createNativeLocaleFormatter"])(this.locale, { year: 'numeric', timeZone: 'UTC' }, { length: 4 }), titleDate: this.titleDateFormat || this.defaultTitleDateFormatter }; }, defaultTitleDateFormatter: function defaultTitleDateFormatter() { var titleFormats = { year: { year: 'numeric', timeZone: 'UTC' }, month: { month: 'long', timeZone: 'UTC' }, date: { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'UTC' } }; var titleDateFormatter = Object(_util__WEBPACK_IMPORTED_MODULE_6__["createNativeLocaleFormatter"])(this.locale, titleFormats[this.type], { start: 0, length: { date: 10, month: 7, year: 4 }[this.type] }); var landscapeFormatter = function landscapeFormatter(date) { return titleDateFormatter(date).replace(/([^\d\s])([\d])/g, function (match, nonDigit, digit) { return nonDigit + " " + digit; }).replace(', ', ',<br>'); }; return this.landscape ? landscapeFormatter : titleDateFormatter; } }, watch: { tableDate: function tableDate(val, prev) { // Make a ISO 8601 strings from val and prev for comparision, otherwise it will incorrectly // compare for example '2000-9' and '2000-10' var sanitizeType = this.type === 'month' ? 'year' : 'month'; this.isReversing = this.sanitizeDateString(val, sanitizeType) < this.sanitizeDateString(prev, sanitizeType); this.$emit('update:pickerDate', val); }, pickerDate: function pickerDate(val) { if (val) { this.tableDate = val; } else if (this.value && this.type === 'date') { this.tableDate = this.sanitizeDateString(this.value, 'month'); } else if (this.value && this.type === 'month') { this.tableDate = this.sanitizeDateString(this.value, 'year'); } }, value: function value() { this.setInputDate(); if (this.value && !this.pickerDate) { this.tableDate = this.sanitizeDateString(this.inputDate, this.type === 'month' ? 'year' : 'month'); } }, type: function type(_type) { this.activePicker = _type.toUpperCase(); if (this.value) { var date = this.sanitizeDateString(this.value, _type); this.$emit('input', this.isDateAllowed(date) ? date : null); } } }, created: function created() { if (this.pickerDate !== this.tableDate) { this.$emit('update:pickerDate', this.tableDate); } this.setInputDate(); }, methods: { isDateAllowed: function isDateAllowed(value) { return Object(_util_isDateAllowed__WEBPACK_IMPORTED_MODULE_7__["default"])(value, this.min, this.max, this.allowedDates); }, yearClick: function yearClick(value) { this.inputYear = value; if (this.type === 'month') { this.tableDate = "" + value; } else { this.tableDate = value + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.tableMonth + 1); } this.activePicker = 'MONTH'; this.reactive && this.isDateAllowed(this.inputDate) && this.$emit('input', this.inputDate); }, monthClick: function monthClick(value) { this.inputYear = parseInt(value.split('-')[0], 10); this.inputMonth = parseInt(value.split('-')[1], 10) - 1; if (this.type === 'date') { this.tableDate = value; this.activePicker = 'DATE'; this.reactive && this.isDateAllowed(this.inputDate) && this.$emit('input', this.inputDate); } else { this.$emit('input', this.inputDate); this.$emit('change', this.inputDate); } }, dateClick: function dateClick(value) { this.inputYear = parseInt(value.split('-')[0], 10); this.inputMonth = parseInt(value.split('-')[1], 10) - 1; this.inputDay = parseInt(value.split('-')[2], 10); this.$emit('input', this.inputDate); this.$emit('change', this.inputDate); }, genPickerTitle: function genPickerTitle() { var _this = this; return this.$createElement(_VDatePickerTitle__WEBPACK_IMPORTED_MODULE_0__["default"], { props: { date: this.value ? this.formatters.titleDate(this.value) : '', selectingYear: this.activePicker === 'YEAR', year: this.formatters.year("" + this.inputYear), yearIcon: this.yearIcon, value: this.value }, slot: 'title', style: this.readonly ? { 'pointer-events': 'none' } : undefined, on: { 'update:selectingYear': function updateSelectingYear(value) { return _this.activePicker = value ? 'YEAR' : _this.type.toUpperCase(); } } }); }, genTableHeader: function genTableHeader() { var _this = this; return this.$createElement(_VDatePickerHeader__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { nextIcon: this.nextIcon, color: this.color, dark: this.dark, disabled: this.readonly, format: this.headerDateFormat, light: this.light, locale: this.locale, min: this.activePicker === 'DATE' ? this.minMonth : this.minYear, max: this.activePicker === 'DATE' ? this.maxMonth : this.maxYear, prevIcon: this.prevIcon, value: this.activePicker === 'DATE' ? this.tableYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.tableMonth + 1) : "" + this.tableYear }, on: { toggle: function toggle() { return _this.activePicker = _this.activePicker === 'DATE' ? 'MONTH' : 'YEAR'; }, input: function input(value) { return _this.tableDate = value; } } }); }, genDateTable: function genDateTable() { var _this = this; return this.$createElement(_VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { allowedDates: this.allowedDates, color: this.color, current: this.current, dark: this.dark, disabled: this.readonly, events: this.events, eventColor: this.eventColor, firstDayOfWeek: this.firstDayOfWeek, format: this.dayFormat, light: this.light, locale: this.locale, min: this.min, max: this.max, tableDate: this.tableYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(this.tableMonth + 1), scrollable: this.scrollable, value: this.value }, ref: 'table', on: { input: this.dateClick, tableDate: function tableDate(value) { return _this.tableDate = value; } } }); }, genMonthTable: function genMonthTable() { var _this = this; return this.$createElement(_VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_3__["default"], { props: { allowedDates: this.type === 'month' ? this.allowedDates : null, color: this.color, current: this.current ? this.sanitizeDateString(this.current, 'month') : null, dark: this.dark, disabled: this.readonly, format: this.monthFormat, light: this.light, locale: this.locale, min: this.minMonth, max: this.maxMonth, scrollable: this.scrollable, value: !this.value || this.type === 'month' ? this.value : this.value.substr(0, 7), tableDate: "" + this.tableYear }, ref: 'table', on: { input: this.monthClick, tableDate: function tableDate(value) { return _this.tableDate = value; } } }); }, genYears: function genYears() { return this.$createElement(_VDatePickerYears__WEBPACK_IMPORTED_MODULE_4__["default"], { props: { color: this.color, format: this.yearFormat, locale: this.locale, min: this.minYear, max: this.maxYear, value: "" + this.tableYear }, on: { input: this.yearClick } }); }, genPickerBody: function genPickerBody() { var children = this.activePicker === 'YEAR' ? [this.genYears()] : [this.genTableHeader(), this.activePicker === 'DATE' ? this.genDateTable() : this.genMonthTable()]; return this.$createElement('div', { key: this.activePicker, style: this.readonly ? { 'pointer-events': 'none' } : undefined }, children); }, // Adds leading zero to month/day if necessary, returns 'YYYY' if type = 'year', // 'YYYY-MM' if 'month' and 'YYYY-MM-DD' if 'date' sanitizeDateString: function sanitizeDateString(dateString, type) { var _a = __read(dateString.split('-'), 3), year = _a[0], _b = _a[1], month = _b === void 0 ? 1 : _b, _c = _a[2], date = _c === void 0 ? 1 : _c; return (year + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(month) + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_6__["pad"])(date)).substr(0, { date: 10, month: 7, year: 4 }[type]); }, setInputDate: function setInputDate() { if (this.value) { var array = this.value.split('-'); this.inputYear = parseInt(array[0], 10); this.inputMonth = parseInt(array[1], 10) - 1; if (this.type === 'date') { this.inputDay = parseInt(array[2], 10); } } else { this.inputYear = this.inputYear || this.now.getFullYear(); this.inputMonth = this.inputMonth == null ? this.inputMonth : this.now.getMonth(); this.inputDay = this.inputDay || this.now.getDate(); } } }, render: function render() { return this.genPicker('v-picker--date'); } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePickerDateTable.js": /*!************************************************************!*\ !*** ./src/components/VDatePicker/VDatePickerDateTable.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_date_picker_table__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/date-picker-table */ "./src/components/VDatePicker/mixins/date-picker-table.js"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/components/VDatePicker/util/index.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker-date-table', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_0__["default"], _mixins_date_picker_table__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { events: { type: [Array, Object, Function], default: function _default() { return null; } }, eventColor: { type: [String, Function, Object], default: 'warning' }, firstDayOfWeek: { type: [String, Number], default: 0 }, weekdayFormat: { type: Function, default: null } }, computed: { formatter: function formatter() { return this.format || Object(_util__WEBPACK_IMPORTED_MODULE_3__["createNativeLocaleFormatter"])(this.locale, { day: 'numeric', timeZone: 'UTC' }, { start: 8, length: 2 }); }, weekdayFormatter: function weekdayFormatter() { return this.weekdayFormat || Object(_util__WEBPACK_IMPORTED_MODULE_3__["createNativeLocaleFormatter"])(this.locale, { weekday: 'narrow', timeZone: 'UTC' }); }, weekDays: function weekDays() { var _this = this; var first = parseInt(this.firstDayOfWeek, 10); return this.weekdayFormatter ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["createRange"])(7).map(function (i) { return _this.weekdayFormatter("2017-01-" + (first + i + 15)); }) // 2017-01-15 is Sunday : Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["createRange"])(7).map(function (i) { return ['S', 'M', 'T', 'W', 'T', 'F', 'S'][(i + first) % 7]; }); } }, methods: { calculateTableDate: function calculateTableDate(delta) { return Object(_util__WEBPACK_IMPORTED_MODULE_3__["monthChange"])(this.tableDate, Math.sign(delta || 1)); }, genTHead: function genTHead() { var _this = this; var days = this.weekDays.map(function (day) { return _this.$createElement('th', day); }); return this.$createElement('thead', this.genTR(days)); }, genEvent: function genEvent(date) { var eventColor; if (typeof this.eventColor === 'string') { eventColor = this.eventColor; } else if (typeof this.eventColor === 'function') { eventColor = this.eventColor(date); } else { eventColor = this.eventColor[date]; } return this.$createElement('div', { staticClass: 'v-date-picker-table__event', class: this.addBackgroundColorClassChecks({}, eventColor || this.color) }); }, // Returns number of the days from the firstDayOfWeek to the first day of the current month weekDaysBeforeFirstDayOfTheMonth: function weekDaysBeforeFirstDayOfTheMonth() { var firstDayOfTheMonth = new Date(this.displayedYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_3__["pad"])(this.displayedMonth + 1) + "-01T00:00:00+00:00"); var weekDay = firstDayOfTheMonth.getUTCDay(); return (weekDay - parseInt(this.firstDayOfWeek) + 7) % 7; }, isEvent: function isEvent(date) { if (Array.isArray(this.events)) { return this.events.indexOf(date) > -1; } else if (this.events instanceof Function) { return this.events(date); } else { return false; } }, genTBody: function genTBody() { var children = []; var daysInMonth = new Date(this.displayedYear, this.displayedMonth + 1, 0).getDate(); var rows = []; var day = this.weekDaysBeforeFirstDayOfTheMonth(); while (day--) { rows.push(this.$createElement('td')); }for (day = 1; day <= daysInMonth; day++) { var date = this.displayedYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_3__["pad"])(this.displayedMonth + 1) + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_3__["pad"])(day); rows.push(this.$createElement('td', [this.genButton(date, true), this.isEvent(date) ? this.genEvent(date) : null])); if (rows.length % 7 === 0) { children.push(this.genTR(rows)); rows = []; } } if (rows.length) { children.push(this.genTR(rows)); } return this.$createElement('tbody', children); }, genTR: function genTR(children) { return [this.$createElement('tr', children)]; } }, render: function render() { return this.genTable('v-date-picker-table v-date-picker-table--date', [this.genTHead(), this.genTBody()]); } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePickerHeader.js": /*!*********************************************************!*\ !*** ./src/components/VDatePicker/VDatePickerHeader.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_date_picker_header_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_date-picker-header.styl */ "./src/stylus/components/_date-picker-header.styl"); /* harmony import */ var _stylus_components_date_picker_header_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_date_picker_header_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util */ "./src/components/VDatePicker/util/index.js"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; // Components // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker-header', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__["default"]], props: { disabled: Boolean, format: { type: Function, default: null }, locale: { type: String, default: 'en-us' }, min: String, max: String, nextIcon: { type: String, default: '$vuetify.icons.next' }, prevIcon: { type: String, default: '$vuetify.icons.prev' }, value: { type: [Number, String], required: true } }, data: function data() { return { isReversing: false, defaultColor: 'accent' }; }, computed: { formatter: function formatter() { if (this.format) { return this.format; } else if (String(this.value).split('-')[1]) { return Object(_util__WEBPACK_IMPORTED_MODULE_5__["createNativeLocaleFormatter"])(this.locale, { month: 'long', year: 'numeric', timeZone: 'UTC' }, { length: 7 }); } else { return Object(_util__WEBPACK_IMPORTED_MODULE_5__["createNativeLocaleFormatter"])(this.locale, { year: 'numeric', timeZone: 'UTC' }, { length: 4 }); } } }, watch: { value: function value(newVal, oldVal) { this.isReversing = newVal < oldVal; } }, methods: { genBtn: function genBtn(change) { var _this = this; var disabled = this.disabled || change < 0 && this.min && this.calculateChange(change) < this.min || change > 0 && this.max && this.calculateChange(change) > this.max; return this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { dark: this.dark, disabled: disabled, icon: true, light: this.light }, nativeOn: { click: function click(e) { e.stopPropagation(); _this.$emit('input', _this.calculateChange(change)); } } }, [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], change < 0 === !this.$vuetify.rtl ? this.prevIcon : this.nextIcon)]); }, calculateChange: function calculateChange(sign) { var _a = __read(String(this.value).split('-').map(function (v) { return 1 * v; }), 2), year = _a[0], month = _a[1]; if (month == null) { return "" + (year + sign); } else { return Object(_util__WEBPACK_IMPORTED_MODULE_5__["monthChange"])(String(this.value), sign); } }, genHeader: function genHeader() { var _this = this; var header = this.$createElement('strong', { 'class': this.disabled ? undefined : this.addTextColorClassChecks(), key: String(this.value), on: { click: function click() { return _this.$emit('toggle'); } } }, [this.$slots.default || this.formatter(String(this.value))]); var transition = this.$createElement('transition', { props: { name: this.isReversing === !this.$vuetify.rtl ? 'tab-reverse-transition' : 'tab-transition' } }, [header]); return this.$createElement('div', { staticClass: 'v-date-picker-header__value', class: { 'v-date-picker-header__value--disabled': this.disabled } }, [transition]); } }, render: function render() { return this.$createElement('div', { staticClass: 'v-date-picker-header', class: this.themeClasses }, [this.genBtn(-1), this.genHeader(), this.genBtn(+1)]); } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePickerMonthTable.js": /*!*************************************************************!*\ !*** ./src/components/VDatePicker/VDatePickerMonthTable.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_date_picker_table__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/date-picker-table */ "./src/components/VDatePicker/mixins/date-picker-table.js"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/components/VDatePicker/util/index.js"); // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker-month-table', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_0__["default"], _mixins_date_picker_table__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], computed: { formatter: function formatter() { return this.format || Object(_util__WEBPACK_IMPORTED_MODULE_3__["createNativeLocaleFormatter"])(this.locale, { month: 'short', timeZone: 'UTC' }, { start: 5, length: 2 }); } }, methods: { calculateTableDate: function calculateTableDate(delta) { return "" + (parseInt(this.tableDate, 10) + Math.sign(delta || 1)); }, genTBody: function genTBody() { var _this = this; var children = []; var cols = Array(3).fill(null); var rows = 12 / cols.length; var _loop_1 = function _loop_1(row) { var tds = cols.map(function (_, col) { var month = row * cols.length + col; return _this.$createElement('td', { key: month }, [_this.genButton(_this.displayedYear + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_3__["pad"])(month + 1), false)]); }); children.push(this_1.$createElement('tr', { key: row }, tds)); }; var this_1 = this; for (var row = 0; row < rows; row++) { _loop_1(row); } return this.$createElement('tbody', children); } }, render: function render() { return this.genTable('v-date-picker-table v-date-picker-table--month', [this.genTBody()]); } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePickerTitle.js": /*!********************************************************!*\ !*** ./src/components/VDatePicker/VDatePickerTitle.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_date_picker_title_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_date-picker-title.styl */ "./src/stylus/components/_date-picker-title.styl"); /* harmony import */ var _stylus_components_date_picker_title_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_date_picker_title_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_picker_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/picker-button */ "./src/mixins/picker-button.js"); // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker-title', mixins: [_mixins_picker_button__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { date: { type: String, default: '' }, selectingYear: Boolean, year: { type: [Number, String], default: '' }, yearIcon: { type: String }, value: { type: String } }, data: function data() { return { isReversing: false }; }, computed: { computedTransition: function computedTransition() { return this.isReversing ? 'picker-reverse-transition' : 'picker-transition'; } }, watch: { value: function value(val, prev) { this.isReversing = val < prev; } }, methods: { genYearIcon: function genYearIcon() { return this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { dark: true } }, this.yearIcon); }, getYearBtn: function getYearBtn() { return this.genPickerButton('selectingYear', true, [this.year, this.yearIcon ? this.genYearIcon() : null], 'v-date-picker-title__year'); }, genTitleText: function genTitleText() { return this.$createElement('transition', { props: { name: this.computedTransition } }, [this.$createElement('div', { domProps: { innerHTML: this.date || '&nbsp;' }, key: this.value })]); }, genTitleDate: function genTitleDate(title) { return this.genPickerButton('selectingYear', false, this.genTitleText(title), 'v-date-picker-title__date'); } }, render: function render(h) { return h('div', { staticClass: 'v-date-picker-title' }, [this.getYearBtn(), this.genTitleDate()]); } }); /***/ }), /***/ "./src/components/VDatePicker/VDatePickerYears.js": /*!********************************************************!*\ !*** ./src/components/VDatePicker/VDatePickerYears.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_date_picker_years_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_date-picker-years.styl */ "./src/stylus/components/_date-picker-years.styl"); /* harmony import */ var _stylus_components_date_picker_years_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_date_picker_years_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./src/components/VDatePicker/util/index.js"); // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-date-picker-years', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { format: { type: Function, default: null }, locale: { type: String, default: 'en-us' }, min: [Number, String], max: [Number, String], value: [Number, String] }, data: function data() { return { defaultColor: 'primary' }; }, computed: { formatter: function formatter() { return this.format || Object(_util__WEBPACK_IMPORTED_MODULE_2__["createNativeLocaleFormatter"])(this.locale, { year: 'numeric', timeZone: 'UTC' }, { length: 4 }); } }, mounted: function mounted() { var activeItem = this.$el.getElementsByClassName('active')[0]; if (activeItem) { this.$el.scrollTop = activeItem.offsetTop - this.$el.offsetHeight / 2 + activeItem.offsetHeight / 2; } else { this.$el.scrollTop = this.$el.scrollHeight / 2 - this.$el.offsetHeight / 2; } }, methods: { genYearItem: function genYearItem(year) { var _this = this; var formatted = this.formatter("" + year); return this.$createElement('li', { key: year, 'class': parseInt(this.value, 10) === year ? this.addTextColorClassChecks({ active: true }) : {}, on: { click: function click() { return _this.$emit('input', year); } } }, formatted); }, genYearItems: function genYearItems() { var children = []; var selectedYear = this.value ? parseInt(this.value, 10) : new Date().getFullYear(); var maxYear = this.max ? parseInt(this.max, 10) : selectedYear + 100; var minYear = Math.min(maxYear, this.min ? parseInt(this.min, 10) : selectedYear - 100); for (var year = maxYear; year >= minYear; year--) { children.push(this.genYearItem(year)); } return children; } }, render: function render() { return this.$createElement('ul', { staticClass: 'v-date-picker-years', ref: 'years' }, this.genYearItems()); } }); /***/ }), /***/ "./src/components/VDatePicker/index.js": /*!*********************************************!*\ !*** ./src/components/VDatePicker/index.js ***! \*********************************************/ /*! exports provided: VDatePicker, VDatePickerTitle, VDatePickerHeader, VDatePickerDateTable, VDatePickerMonthTable, VDatePickerYears, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VDatePicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VDatePicker */ "./src/components/VDatePicker/VDatePicker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePicker", function() { return _VDatePicker__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VDatePickerTitle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VDatePickerTitle */ "./src/components/VDatePicker/VDatePickerTitle.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePickerTitle", function() { return _VDatePickerTitle__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VDatePickerHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VDatePickerHeader */ "./src/components/VDatePicker/VDatePickerHeader.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePickerHeader", function() { return _VDatePickerHeader__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VDatePickerDateTable */ "./src/components/VDatePicker/VDatePickerDateTable.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePickerDateTable", function() { return _VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VDatePickerMonthTable */ "./src/components/VDatePicker/VDatePickerMonthTable.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePickerMonthTable", function() { return _VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _VDatePickerYears__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./VDatePickerYears */ "./src/components/VDatePicker/VDatePickerYears.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePickerYears", function() { return _VDatePickerYears__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* istanbul ignore next */ _VDatePicker__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VDatePicker__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VDatePicker__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VDatePickerTitle__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VDatePickerTitle__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VDatePickerHeader__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VDatePickerHeader__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(_VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_3__["default"].name, _VDatePickerDateTable__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(_VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_4__["default"].name, _VDatePickerMonthTable__WEBPACK_IMPORTED_MODULE_4__["default"]); Vue.component(_VDatePickerYears__WEBPACK_IMPORTED_MODULE_5__["default"].name, _VDatePickerYears__WEBPACK_IMPORTED_MODULE_5__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VDatePicker__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VDatePicker/mixins/date-picker-table.js": /*!****************************************************************!*\ !*** ./src/components/VDatePicker/mixins/date-picker-table.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_date_picker_table_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../stylus/components/_date-picker-table.styl */ "./src/stylus/components/_date-picker-table.styl"); /* harmony import */ var _stylus_components_date_picker_table_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_date_picker_table_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../directives/touch */ "./src/directives/touch.ts"); /* harmony import */ var _util_isDateAllowed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! .././util/isDateAllowed */ "./src/components/VDatePicker/util/isDateAllowed.js"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Directives // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ directives: { Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_1__["default"] }, props: { allowedDates: Function, current: String, disabled: Boolean, format: { type: Function, default: null }, locale: { type: String, default: 'en-us' }, min: String, max: String, scrollable: Boolean, tableDate: { type: String, required: true }, value: { type: String, required: false } }, data: function data() { return { defaultColor: 'accent', isReversing: false }; }, computed: { computedTransition: function computedTransition() { return this.isReversing === !this.$vuetify.rtl ? 'tab-reverse-transition' : 'tab-transition'; }, displayedMonth: function displayedMonth() { return this.tableDate.split('-')[1] - 1; }, displayedYear: function displayedYear() { return this.tableDate.split('-')[0] * 1; } }, watch: { tableDate: function tableDate(newVal, oldVal) { this.isReversing = newVal < oldVal; } }, methods: { genButtonClasses: function genButtonClasses(value, isAllowed, isFloating) { var isSelected = value === this.value; var isCurrent = value === this.current; var classes = __assign({ 'v-btn--active': isSelected, 'v-btn--flat': !isSelected, 'v-btn--icon': isSelected && isAllowed && isFloating, 'v-btn--floating': isFloating, 'v-btn--depressed': !isFloating && isSelected, 'v-btn--disabled': !isAllowed || this.disabled && isSelected, 'v-btn--outline': isCurrent && !isSelected }, this.themeClasses); if (isSelected) return this.addBackgroundColorClassChecks(classes); if (isCurrent) return this.addTextColorClassChecks(classes); return classes; }, genButton: function genButton(value, isFloating) { var _this = this; var isAllowed = Object(_util_isDateAllowed__WEBPACK_IMPORTED_MODULE_2__["default"])(value, this.min, this.max, this.allowedDates); return this.$createElement('button', { staticClass: 'v-btn', 'class': this.genButtonClasses(value, isAllowed, isFloating), attrs: { type: 'button' }, domProps: { disabled: !isAllowed, innerHTML: "<div class=\"v-btn__content\">" + this.formatter(value) + "</div>" }, on: this.disabled || !isAllowed ? {} : { click: function click() { return _this.$emit('input', value); } } }); }, wheel: function wheel(e) { e.preventDefault(); this.$emit('tableDate', this.calculateTableDate(e.deltaY)); }, touch: function touch(value) { this.$emit('tableDate', this.calculateTableDate(value)); }, genTable: function genTable(staticClass, children) { var _this = this; var transition = this.$createElement('transition', { props: { name: this.computedTransition } }, [this.$createElement('table', { key: this.tableDate }, children)]); var touchDirective = { name: 'touch', value: { left: function left(e) { return e.offsetX < -15 && _this.touch(1); }, right: function right(e) { return e.offsetX > 15 && _this.touch(-1); } } }; return this.$createElement('div', { staticClass: staticClass, class: this.themeClasses, on: this.scrollable ? { wheel: this.wheel } : undefined, directives: [touchDirective] }, [transition]); } } }); /***/ }), /***/ "./src/components/VDatePicker/util/createNativeLocaleFormatter.js": /*!************************************************************************!*\ !*** ./src/components/VDatePicker/util/createNativeLocaleFormatter.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.js"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; /* harmony default export */ __webpack_exports__["default"] = (function (locale, options, _a) { var _b = _a === void 0 ? { start: 0, length: 0 } : _a, start = _b.start, length = _b.length; var makeIsoString = function makeIsoString(dateString) { var _a = __read(dateString.trim().split(' ')[0].split('-'), 3), year = _a[0], month = _a[1], date = _a[2]; return [year, Object(_pad__WEBPACK_IMPORTED_MODULE_0__["default"])(month || 1), Object(_pad__WEBPACK_IMPORTED_MODULE_0__["default"])(date || 1)].join('-'); }; try { var intlFormatter_1 = new Intl.DateTimeFormat(locale || undefined, options); return function (dateString) { return intlFormatter_1.format(new Date(makeIsoString(dateString) + "T00:00:00+00:00")); }; } catch (e) { return start || length ? function (dateString) { return makeIsoString(dateString).substr(start, length); } : null; } }); /***/ }), /***/ "./src/components/VDatePicker/util/index.js": /*!**************************************************!*\ !*** ./src/components/VDatePicker/util/index.js ***! \**************************************************/ /*! exports provided: createNativeLocaleFormatter, monthChange, pad */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _createNativeLocaleFormatter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createNativeLocaleFormatter */ "./src/components/VDatePicker/util/createNativeLocaleFormatter.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createNativeLocaleFormatter", function() { return _createNativeLocaleFormatter__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _monthChange__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./monthChange */ "./src/components/VDatePicker/util/monthChange.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "monthChange", function() { return _monthChange__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pad", function() { return _pad__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "./src/components/VDatePicker/util/isDateAllowed.js": /*!**********************************************************!*\ !*** ./src/components/VDatePicker/util/isDateAllowed.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isDateAllowed; }); function isDateAllowed(date, min, max, allowedFn) { return (!allowedFn || allowedFn(date)) && (!min || date >= min) && (!max || date <= max); } /***/ }), /***/ "./src/components/VDatePicker/util/monthChange.js": /*!********************************************************!*\ !*** ./src/components/VDatePicker/util/monthChange.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.js"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; /** * @param {String} value YYYY-MM format * @param {Number} sign -1 or +1 */ /* harmony default export */ __webpack_exports__["default"] = (function (value, sign) { var _a = __read(value.split('-').map(function (v) { return 1 * v; }), 2), year = _a[0], month = _a[1]; if (month + sign === 0) { return year - 1 + "-12"; } else if (month + sign === 13) { return year + 1 + "-01"; } else { return year + "-" + Object(_pad__WEBPACK_IMPORTED_MODULE_0__["default"])(month + sign); } }); /***/ }), /***/ "./src/components/VDatePicker/util/pad.js": /*!************************************************!*\ !*** ./src/components/VDatePicker/util/pad.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var padStart = function padStart(string, targetLength, padString) { targetLength = targetLength >> 0; string = String(string); padString = String(padString); if (string.length > targetLength) { return String(string); } targetLength = targetLength - string.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); } return padString.slice(0, targetLength) + String(string); }; /* harmony default export */ __webpack_exports__["default"] = (function (n, length) { if (length === void 0) { length = 2; } return padStart(n, length, '0'); }); /***/ }), /***/ "./src/components/VDialog/VDialog.js": /*!*******************************************!*\ !*** ./src/components/VDialog/VDialog.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_dialogs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_dialogs.styl */ "./src/stylus/components/_dialogs.styl"); /* harmony import */ var _stylus_components_dialogs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_dialogs_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_dependent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/dependent */ "./src/mixins/dependent.js"); /* harmony import */ var _mixins_detachable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/detachable */ "./src/mixins/detachable.js"); /* harmony import */ var _mixins_overlayable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/overlayable */ "./src/mixins/overlayable.js"); /* harmony import */ var _mixins_returnable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/returnable */ "./src/mixins/returnable.js"); /* harmony import */ var _mixins_stackable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/stackable */ "./src/mixins/stackable.js"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins // Directives // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-dialog', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_7__["default"] }, mixins: [_mixins_dependent__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_detachable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_overlayable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_returnable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_stackable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__["default"]], props: { disabled: Boolean, persistent: Boolean, fullscreen: Boolean, fullWidth: Boolean, noClickAnimation: Boolean, maxWidth: { type: [String, Number], default: 'none' }, origin: { type: String, default: 'center center' }, width: { type: [String, Number], default: 'auto' }, scrollable: Boolean, transition: { type: [String, Boolean], default: 'dialog-transition' } }, data: function data() { return { animate: false, animateTimeout: null, stackClass: 'v-dialog__content--active', stackMinZIndex: 200 }; }, computed: { classes: function classes() { var _a; return _a = {}, _a[("v-dialog " + this.contentClass).trim()] = true, _a['v-dialog--active'] = this.isActive, _a['v-dialog--persistent'] = this.persistent, _a['v-dialog--fullscreen'] = this.fullscreen, _a['v-dialog--scrollable'] = this.scrollable, _a['v-dialog--animated'] = this.animate, _a; }, contentClasses: function contentClasses() { return { 'v-dialog__content': true, 'v-dialog__content--active': this.isActive }; } }, watch: { isActive: function isActive(val) { if (val) { this.show(); } else { this.removeOverlay(); this.unbind(); } } }, mounted: function mounted() { this.isBooted = this.isActive; this.isActive && this.show(); }, beforeDestroy: function beforeDestroy() { if (typeof window !== 'undefined') this.unbind(); }, methods: { animateClick: function animateClick() { var _this = this; this.animate = false; // Needed for when clicking very fast // outside of the dialog this.$nextTick(function () { _this.animate = true; clearTimeout(_this.animateTimeout); _this.animateTimeout = setTimeout(function () { return _this.animate = false; }, 150); }); }, closeConditional: function closeConditional(e) { // If the dialog content contains // the click event, or if the // dialog is not active if (this.$refs.content.contains(e.target) || !this.isActive) return false; // If we made it here, the click is outside // and is active. If persistent, and the // click is on the overlay, animate if (this.persistent) { if (!this.noClickAnimation && this.overlay === e.target) this.animateClick(); return false; } // close dialog if !persistent, clicked outside and we're the topmost dialog. // Since this should only be called in a capture event (bottom up), we shouldn't need to stop propagation return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["getZIndex"])(this.$refs.content) >= this.getMaxZIndex(); }, show: function show() { !this.fullscreen && !this.hideOverlay && this.genOverlay(); this.fullscreen && this.hideScroll(); this.$refs.content.focus(); this.$listeners.keydown && this.bind(); }, bind: function bind() { window.addEventListener('keydown', this.onKeydown); }, unbind: function unbind() { window.removeEventListener('keydown', this.onKeydown); }, onKeydown: function onKeydown(e) { this.$emit('keydown', e); } }, render: function render(h) { var _this = this; var children = []; var data = { 'class': this.classes, ref: 'dialog', directives: [{ name: 'click-outside', value: function value() { return _this.isActive = false; }, args: { closeConditional: this.closeConditional, include: this.getOpenDependentElements } }, { name: 'show', value: this.isActive }], on: { click: function click(e) { e.stopPropagation(); } } }; if (!this.fullscreen) { data.style = { maxWidth: this.maxWidth === 'none' ? undefined : Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["convertToUnit"])(this.maxWidth), width: this.width === 'auto' ? undefined : Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["convertToUnit"])(this.width) }; } if (this.$slots.activator) { children.push(h('div', { staticClass: 'v-dialog__activator', 'class': { 'v-dialog__activator--disabled': this.disabled }, on: { click: function click(e) { e.stopPropagation(); if (!_this.disabled) _this.isActive = !_this.isActive; } } }, [this.$slots.activator])); } var dialog = h('div', data, this.showLazyContent(this.$slots.default)); if (this.transition) { dialog = h('transition', { props: { name: this.transition, origin: this.origin } }, [dialog]); } children.push(h('div', { 'class': this.contentClasses, attrs: __assign({ tabIndex: '-1' }, this.getScopeIdAttrs()), style: { zIndex: this.activeZIndex }, ref: 'content' }, [dialog])); return h('div', { staticClass: 'v-dialog__container', style: { display: !this.$slots.activator || this.fullWidth ? 'block' : 'inline-block' } }, children); } }); /***/ }), /***/ "./src/components/VDialog/index.js": /*!*****************************************!*\ !*** ./src/components/VDialog/index.js ***! \*****************************************/ /*! exports provided: VDialog, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VDialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VDialog */ "./src/components/VDialog/VDialog.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDialog", function() { return _VDialog__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VDialog__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VDialog__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VDialog__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VDialog__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VDivider/VDivider.ts": /*!*********************************************!*\ !*** ./src/components/VDivider/VDivider.ts ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_dividers_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_dividers.styl */ "./src/stylus/components/_dividers.styl"); /* harmony import */ var _stylus_components_dividers_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_dividers_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Types // Mixins /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_1___default.a.extend({ name: 'v-divider', functional: true, props: __assign({}, _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"].options.props, { inset: Boolean, vertical: Boolean }), render: function render(h, _a) { var props = _a.props, data = _a.data; data.staticClass = ("v-divider " + (data.staticClass || '')).trim(); if (props.inset) data.staticClass += ' v-divider--inset'; if (props.vertical) data.staticClass += ' v-divider--vertical'; if (props.light) data.staticClass += ' theme--light'; if (props.dark) data.staticClass += ' theme--dark'; return h('hr', data); } })); /***/ }), /***/ "./src/components/VDivider/index.ts": /*!******************************************!*\ !*** ./src/components/VDivider/index.ts ***! \******************************************/ /*! exports provided: VDivider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VDivider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VDivider */ "./src/components/VDivider/VDivider.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDivider", function() { return _VDivider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VDivider__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VDivider__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VDivider__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VDivider__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VExpansionPanel/VExpansionPanel.ts": /*!***********************************************************!*\ !*** ./src/components/VExpansionPanel/VExpansionPanel.ts ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_expansion_panel_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_expansion-panel.styl */ "./src/stylus/components/_expansion-panel.styl"); /* harmony import */ var _stylus_components_expansion_panel_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_expansion_panel_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_3__["default"])(_mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_2__["provide"])('expansionPanel')).extend({ name: 'v-expansion-panel', provide: function provide() { return { expansionPanel: this }; }, props: { disabled: Boolean, readonly: Boolean, expand: Boolean, focusable: Boolean, inset: Boolean, popout: Boolean, value: { type: [Number, Array], default: function _default() { return null; } } }, data: function data() { return { items: [], open: [] }; }, computed: { classes: function classes() { return __assign({ 'v-expansion-panel--focusable': this.focusable, 'v-expansion-panel--popout': this.popout, 'v-expansion-panel--inset': this.inset }, this.themeClasses); } }, watch: { expand: function expand(v) { var openIndex = -1; if (!v) { // Close all panels unless only one is open var openCount = this.open.reduce(function (acc, val) { return val ? acc + 1 : acc; }, 0); var open = Array(this.items.length).fill(false); if (openCount === 1) { openIndex = this.open.indexOf(true); } if (openIndex > -1) { open[openIndex] = true; } this.open = open; } this.$emit('input', v ? this.open : openIndex > -1 ? openIndex : null); }, value: function value(v) { this.updateFromValue(v); } }, mounted: function mounted() { this.value !== null && this.updateFromValue(this.value); }, methods: { updateFromValue: function updateFromValue(v) { if (Array.isArray(v) && !this.expand) return; var open = Array(this.items.length).fill(false); if (typeof v === 'number') { open[v] = true; } else if (v !== null) { open = v; } this.updatePanels(open); }, updatePanels: function updatePanels(open) { this.open = open; for (var i = 0; i < this.items.length; i++) { var active = open && open[i]; this.items[i].toggle(active); } }, panelClick: function panelClick(uid) { var open = this.expand ? this.open.slice() : Array(this.items.length).fill(false); for (var i = 0; i < this.items.length; i++) { if (this.items[i]._uid === uid) { open[i] = !this.open[i]; !this.expand && this.$emit('input', open[i] ? i : null); } } this.updatePanels(open); if (this.expand) this.$emit('input', open); }, register: function register(content) { this.items.push(content); this.open.push(false); }, unregister: function unregister(content) { var index = this.items.findIndex(function (i) { return i._uid === content._uid; }); this.items.splice(index, 1); this.open.splice(index, 1); } }, render: function render(h) { return h('ul', { staticClass: 'v-expansion-panel', class: this.classes }, this.$slots.default); } })); /***/ }), /***/ "./src/components/VExpansionPanel/VExpansionPanelContent.ts": /*!******************************************************************!*\ !*** ./src/components/VExpansionPanel/VExpansionPanelContent.ts ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); /* harmony import */ var _mixins_bootable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/bootable */ "./src/mixins/bootable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_rippleable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/rippleable */ "./src/mixins/rippleable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_6__["default"])(_mixins_bootable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_rippleable__WEBPACK_IMPORTED_MODULE_3__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_4__["inject"])('expansionPanel', 'v-expansion-panel-content', 'v-expansion-panel') /* @vue/component */ ).extend({ name: 'v-expansion-panel-content', props: { disabled: Boolean, readonly: Boolean, expandIcon: { type: String, default: '$vuetify.icons.expand' }, hideActions: Boolean, ripple: { type: [Boolean, Object], default: false } }, data: function data() { return { height: 'auto' }; }, computed: { containerClasses: function containerClasses() { return { 'v-expansion-panel__container--active': this.isActive, 'v-expansion-panel__container--disabled': this.isDisabled }; }, isDisabled: function isDisabled() { return this.expansionPanel.disabled || this.disabled; }, isReadonly: function isReadonly() { return this.expansionPanel.readonly || this.readonly; } }, mounted: function mounted() { this.expansionPanel.register(this); // Can be removed once fully deprecated if (typeof this.value !== 'undefined') Object(_util_console__WEBPACK_IMPORTED_MODULE_7__["consoleWarn"])('v-model has been deprecated', this); }, beforeDestroy: function beforeDestroy() { this.expansionPanel.unregister(this); }, methods: { onKeydown: function onKeydown(e) { // Ensure element is the activeElement if (e.keyCode === 13 && this.$el === document.activeElement) this.expansionPanel.panelClick(this._uid); }, onHeaderClick: function onHeaderClick() { this.isReadonly || this.expansionPanel.panelClick(this._uid); }, genBody: function genBody() { return this.$createElement('div', { ref: 'body', class: 'v-expansion-panel__body', directives: [{ name: 'show', value: this.isActive }] }, this.showLazyContent(this.$slots.default)); }, genHeader: function genHeader() { var children = __spread(this.$slots.header); if (!this.hideActions) children.push(this.genIcon()); return this.$createElement('div', { staticClass: 'v-expansion-panel__header', directives: [{ name: 'ripple', value: this.ripple }], on: { click: this.onHeaderClick } }, children); }, genIcon: function genIcon() { var icon = this.$slots.actions || [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_5__["default"], this.expandIcon)]; return this.$createElement('transition', { attrs: { name: 'fade-transition' } }, [this.$createElement('div', { staticClass: 'v-expansion-panel__header__icon', directives: [{ name: 'show', value: !this.isDisabled }] }, icon)]); }, toggle: function toggle(active) { var _this = this; if (active) this.isBooted = true; // We treat bootable differently // Needs time to calc height this.$nextTick(function () { return _this.isActive = active; }); } }, render: function render(h) { var children = []; this.$slots.header && children.push(this.genHeader()); children.push(h(_transitions__WEBPACK_IMPORTED_MODULE_0__["VExpandTransition"], [this.genBody()])); return h('li', { staticClass: 'v-expansion-panel__container', class: this.containerClasses, attrs: { tabindex: this.isReadonly || this.isDisabled ? null : 0 }, on: { keydown: this.onKeydown } }, children); } })); /***/ }), /***/ "./src/components/VExpansionPanel/index.ts": /*!*************************************************!*\ !*** ./src/components/VExpansionPanel/index.ts ***! \*************************************************/ /*! exports provided: VExpansionPanel, VExpansionPanelContent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VExpansionPanel */ "./src/components/VExpansionPanel/VExpansionPanel.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VExpansionPanel", function() { return _VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VExpansionPanelContent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VExpansionPanelContent */ "./src/components/VExpansionPanel/VExpansionPanelContent.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VExpansionPanelContent", function() { return _VExpansionPanelContent__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* istanbul ignore next */ _VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VExpansionPanelContent__WEBPACK_IMPORTED_MODULE_1__["default"].options.name, _VExpansionPanelContent__WEBPACK_IMPORTED_MODULE_1__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VFooter/VFooter.js": /*!*******************************************!*\ !*** ./src/components/VFooter/VFooter.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_footer_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_footer.styl */ "./src/stylus/components/_footer.styl"); /* harmony import */ var _stylus_components_footer_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_footer_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); // Styles // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-footer', mixins: [Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])('footer', ['height']), _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { height: { default: 32, type: [Number, String] }, inset: Boolean }, computed: { computedMarginBottom: function computedMarginBottom() { if (!this.app) return; return this.$vuetify.application.bottom; }, computedPaddingLeft: function computedPaddingLeft() { return !this.app || !this.inset ? 0 : this.$vuetify.application.left; }, computedPaddingRight: function computedPaddingRight() { return !this.app ? 0 : this.$vuetify.application.right; }, styles: function styles() { var styles = { height: isNaN(this.height) ? this.height : this.height + "px" }; if (this.computedPaddingLeft) { styles.paddingLeft = this.computedPaddingLeft + "px"; } if (this.computedPaddingRight) { styles.paddingRight = this.computedPaddingRight + "px"; } if (this.computedMarginBottom) { styles.marginBottom = this.computedMarginBottom + "px"; } return styles; } }, methods: { /** * Update the application layout * * @return {number} */ updateApplication: function updateApplication() { var height = parseInt(this.height); return isNaN(height) ? this.$el ? this.$el.clientHeight : 0 : height; } }, render: function render(h) { var data = { staticClass: 'v-footer', 'class': this.addBackgroundColorClassChecks({ 'v-footer--absolute': this.absolute, 'v-footer--fixed': !this.absolute && (this.app || this.fixed), 'v-footer--inset': this.inset, 'theme--dark': this.dark, 'theme--light': this.light }), style: this.styles, ref: 'content' }; return h('footer', data, this.$slots.default); } }); /***/ }), /***/ "./src/components/VFooter/index.js": /*!*****************************************!*\ !*** ./src/components/VFooter/index.js ***! \*****************************************/ /*! exports provided: VFooter, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VFooter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VFooter */ "./src/components/VFooter/VFooter.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VFooter", function() { return _VFooter__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VFooter__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VFooter__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VFooter__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VFooter__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VForm/VForm.js": /*!***************************************!*\ !*** ./src/components/VForm/VForm.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_forms_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_forms.styl */ "./src/stylus/components/_forms.styl"); /* harmony import */ var _stylus_components_forms_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_forms_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); // Styles /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-form', mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_1__["provide"])('form')], inheritAttrs: false, props: { value: Boolean, lazyValidation: Boolean }, data: function data() { return { inputs: [], watchers: [], errorBag: {} }; }, watch: { errorBag: { handler: function handler() { var errors = Object.values(this.errorBag).includes(true); this.$emit('input', !errors); }, deep: true, immediate: true } }, methods: { watchInput: function watchInput(input) { var _this = this; var watcher = function watcher(input) { return input.$watch('hasError', function (val) { _this.$set(_this.errorBag, input._uid, val); }, { immediate: true }); }; var watchers = { _uid: input._uid, valid: undefined, shouldValidate: undefined }; if (this.lazyValidation) { // Only start watching inputs if we need to watchers.shouldValidate = input.$watch('shouldValidate', function (val) { if (!val) return; // Only watch if we're not already doing it if (_this.errorBag.hasOwnProperty(input._uid)) return; watchers.valid = watcher(input); }); } else { watchers.valid = watcher(input); } return watchers; }, validate: function validate() { var errors = this.inputs.filter(function (input) { return !input.validate(true); }).length; return !errors; }, reset: function reset() { var _this = this; for (var i = this.inputs.length; i--;) { this.inputs[i].reset(); } if (this.lazyValidation) { // Account for timeout in validatable setTimeout(function () { _this.errorBag = {}; }, 0); } }, register: function register(input) { var unwatch = this.watchInput(input); this.inputs.push(input); this.watchers.push(unwatch); }, unregister: function unregister(input) { var found = this.inputs.find(function (i) { return i._uid === input._uid; }); if (!found) return; var unwatch = this.watchers.find(function (i) { return i._uid === found._uid; }); unwatch.valid && unwatch.valid(); unwatch.shouldValidate && unwatch.shouldValidate(); this.watchers = this.watchers.filter(function (i) { return i._uid !== found._uid; }); this.inputs = this.inputs.filter(function (i) { return i._uid !== found._uid; }); this.$delete(this.errorBag, found._uid); } }, render: function render(h) { var _this = this; return h('form', { staticClass: 'v-form', attrs: Object.assign({ novalidate: true }, this.$attrs), on: { submit: function submit(e) { return _this.$emit('submit', e); } } }, this.$slots.default); } }); /***/ }), /***/ "./src/components/VForm/index.js": /*!***************************************!*\ !*** ./src/components/VForm/index.js ***! \***************************************/ /*! exports provided: VForm, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VForm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VForm */ "./src/components/VForm/VForm.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VForm", function() { return _VForm__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VForm__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VForm__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VForm__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VForm__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VGrid/VContainer.js": /*!********************************************!*\ !*** ./src/components/VGrid/VContainer.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_grid.styl */ "./src/stylus/components/_grid.styl"); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./grid */ "./src/components/VGrid/grid.js"); /* harmony default export */ __webpack_exports__["default"] = (Object(_grid__WEBPACK_IMPORTED_MODULE_1__["default"])('container')); /***/ }), /***/ "./src/components/VGrid/VContent.js": /*!******************************************!*\ !*** ./src/components/VGrid/VContent.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_content_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_content.styl */ "./src/stylus/components/_content.styl"); /* harmony import */ var _stylus_components_content_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_content_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/ssr-bootable */ "./src/mixins/ssr-bootable.ts"); // Styles // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-content', mixins: [_mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { tag: { type: String, default: 'main' } }, computed: { styles: function styles() { var _a = this.$vuetify.application, bar = _a.bar, top = _a.top, right = _a.right, footer = _a.footer, bottom = _a.bottom, left = _a.left; return { paddingTop: top + bar + "px", paddingRight: right + "px", paddingBottom: footer + bottom + "px", paddingLeft: left + "px" }; } }, render: function render(h) { var data = { staticClass: 'v-content', style: this.styles, ref: 'content' }; return h(this.tag, data, [h('div', { staticClass: 'v-content__wrap' }, this.$slots.default)]); } }); /***/ }), /***/ "./src/components/VGrid/VFlex.js": /*!***************************************!*\ !*** ./src/components/VGrid/VFlex.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_grid.styl */ "./src/stylus/components/_grid.styl"); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./grid */ "./src/components/VGrid/grid.js"); /* harmony default export */ __webpack_exports__["default"] = (Object(_grid__WEBPACK_IMPORTED_MODULE_1__["default"])('flex')); /***/ }), /***/ "./src/components/VGrid/VLayout.js": /*!*****************************************!*\ !*** ./src/components/VGrid/VLayout.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_grid.styl */ "./src/stylus/components/_grid.styl"); /* harmony import */ var _stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_grid_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./grid */ "./src/components/VGrid/grid.js"); /* harmony default export */ __webpack_exports__["default"] = (Object(_grid__WEBPACK_IMPORTED_MODULE_1__["default"])('layout')); /***/ }), /***/ "./src/components/VGrid/grid.js": /*!**************************************!*\ !*** ./src/components/VGrid/grid.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Grid; }); function Grid(name) { /* @vue/component */ return { name: "v-" + name, functional: true, props: { id: String, tag: { type: String, default: 'div' } }, render: function render(h, _a) { var props = _a.props, data = _a.data, children = _a.children; data.staticClass = (name + " " + (data.staticClass || '')).trim(); if (data.attrs) { var classes = Object.keys(data.attrs).filter(function (key) { // TODO: Remove once resolved // https://github.com/vuejs/vue/issues/7841 if (key === 'slot') return false; var value = data.attrs[key]; return value || typeof value === 'string'; }); if (classes.length) data.staticClass += " " + classes.join(' '); delete data.attrs; } if (props.id) { data.domProps = data.domProps || {}; data.domProps.id = props.id; } return h(props.tag, data, children); } }; } /***/ }), /***/ "./src/components/VGrid/index.js": /*!***************************************!*\ !*** ./src/components/VGrid/index.js ***! \***************************************/ /*! exports provided: VContainer, VContent, VFlex, VLayout, VSpacer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSpacer", function() { return VSpacer; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VContent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VContent */ "./src/components/VGrid/VContent.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VContent", function() { return _VContent__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VContainer */ "./src/components/VGrid/VContainer.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VContainer", function() { return _VContainer__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VFlex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VFlex */ "./src/components/VGrid/VFlex.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VFlex", function() { return _VFlex__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _VLayout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VLayout */ "./src/components/VGrid/VLayout.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VLayout", function() { return _VLayout__WEBPACK_IMPORTED_MODULE_4__["default"]; }); var VSpacer = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('spacer', 'div', 'v-spacer'); var VGrid = {}; /* istanbul ignore next */ VGrid.install = function install(Vue) { Vue.component(_VContent__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VContent__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VContainer__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VContainer__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(_VFlex__WEBPACK_IMPORTED_MODULE_3__["default"].name, _VFlex__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(_VLayout__WEBPACK_IMPORTED_MODULE_4__["default"].name, _VLayout__WEBPACK_IMPORTED_MODULE_4__["default"]); Vue.component(VSpacer.name, VSpacer); }; /* harmony default export */ __webpack_exports__["default"] = (VGrid); /***/ }), /***/ "./src/components/VIcon/VIcon.ts": /*!***************************************!*\ !*** ./src/components/VIcon/VIcon.ts ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_icons_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_icons.styl */ "./src/stylus/components/_icons.styl"); /* harmony import */ var _stylus_components_icons_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_icons_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins // Util var SIZE_MAP; (function (SIZE_MAP) { SIZE_MAP["small"] = "16px"; SIZE_MAP["default"] = "24px"; SIZE_MAP["medium"] = "28px"; SIZE_MAP["large"] = "36px"; SIZE_MAP["xLarge"] = "40px"; })(SIZE_MAP || (SIZE_MAP = {})); function isFontAwesome5(iconType) { return ['fas', 'far', 'fal', 'fab'].some(function (val) { return iconType.includes(val); }); } var ICONS_PREFIX = '$vuetify.icons.'; // This remaps internal names like '$vuetify.icons.cancel' to the current name // for that icon. Note the parent component is needed for $vuetify because // VIcon is a functional component. This function only looks at the // immediate parent, so it won't remap for a nested functional components. function remapInternalIcon(parent, iconName) { if (!iconName.startsWith(ICONS_PREFIX)) { // return original icon name unchanged return iconName; } // Now look up icon indirection name, e.g. '$vuetify.icons.cancel': return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["getObjectValueByPath"])(parent, iconName) || iconName; } var addTextColorClassChecks = _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"].options.methods.addTextColorClassChecks; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_4__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-icon', functional: true, props: { // TODO: inherit these color: String, dark: Boolean, light: Boolean, disabled: Boolean, large: Boolean, left: Boolean, medium: Boolean, right: Boolean, size: { type: [Number, String] }, small: Boolean, xLarge: Boolean }, render: function render(h, _a) { var props = _a.props, data = _a.data, parent = _a.parent, _b = _a.listeners, listeners = _b === void 0 ? {} : _b, _c = _a.children, children = _c === void 0 ? [] : _c; var small = props.small, medium = props.medium, large = props.large, xLarge = props.xLarge; var sizes = { small: small, medium: medium, large: large, xLarge: xLarge }; var explicitSize = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keys"])(sizes).find(function (key) { return sizes[key] && !!key; }); var fontSize = explicitSize && SIZE_MAP[explicitSize] || Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["convertToUnit"])(props.size); var newChildren = []; if (fontSize) data.style = __assign({ fontSize: fontSize }, data.style); var iconName = ''; if (children.length) iconName = children[0].text; // Support usage of v-text and v-html else if (data.domProps) { iconName = data.domProps.textContent || data.domProps.innerHTML || iconName; // Remove nodes so it doesn't // overwrite our changes delete data.domProps.textContent; delete data.domProps.innerHTML; } // Remap internal names like '$vuetify.icons.cancel' to the current name for that icon iconName = remapInternalIcon(parent, iconName); var iconType = 'material-icons'; // Material Icon delimiter is _ // https://material.io/icons/ var delimiterIndex = iconName.indexOf('-'); var isCustomIcon = delimiterIndex > -1; if (isCustomIcon) { iconType = iconName.slice(0, delimiterIndex); if (isFontAwesome5(iconType)) iconType = ''; // Assume if not a custom icon // is Material Icon font } else newChildren.push(iconName); data.attrs = data.attrs || {}; if (!('aria-hidden' in data.attrs)) { data.attrs['aria-hidden'] = true; } var classes = __assign({}, props.color && addTextColorClassChecks.call(props, {}, props.color), { 'v-icon--disabled': props.disabled, 'v-icon--left': props.left, 'v-icon--link': listeners.click || listeners['!click'], 'v-icon--right': props.right, 'theme--dark': props.dark, 'theme--light': props.light }); // Order classes // * Component class // * Vuetify classes // * Icon Classes data.staticClass = ['v-icon', data.staticClass, Object.keys(classes).filter(function (k) { return classes[k]; }).join(' '), iconType, isCustomIcon ? iconName : null].filter(function (val) { return !!val; }).join(' ').trim(); return h('i', data, newChildren); } })); /***/ }), /***/ "./src/components/VIcon/index.ts": /*!***************************************!*\ !*** ./src/components/VIcon/index.ts ***! \***************************************/ /*! exports provided: VIcon, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VIcon */ "./src/components/VIcon/VIcon.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VIcon", function() { return _VIcon__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VIcon__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VIcon__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VInput/VInput.js": /*!*****************************************!*\ !*** ./src/components/VInput/VInput.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_inputs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_inputs.styl */ "./src/stylus/components/_inputs.styl"); /* harmony import */ var _stylus_components_inputs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_inputs_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _VLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VLabel */ "./src/components/VLabel/index.js"); /* harmony import */ var _VMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VMessages */ "./src/components/VMessages/index.js"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_loadable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/loadable */ "./src/mixins/loadable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_validatable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/validatable */ "./src/mixins/validatable.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Components // Mixins // Utilities /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-input', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_loadable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__["default"], _mixins_validatable__WEBPACK_IMPORTED_MODULE_7__["default"]], props: { appendIcon: String, /** @deprecated */ appendIconCb: Function, backgroundColor: { type: String, default: '' }, disabled: Boolean, height: [Number, String], hideDetails: Boolean, hint: String, label: String, persistentHint: Boolean, prependIcon: String, /** @deprecated */ prependIconCb: Function, readonly: Boolean, value: { required: false } }, data: function data(vm) { return { lazyValue: vm.value, isFocused: false }; }, computed: { classesInput: function classesInput() { return __assign({}, this.classes, { 'v-input--has-state': this.hasState, 'v-input--hide-details': this.hideDetails, 'v-input--is-label-active': this.isLabelActive, 'v-input--is-dirty': this.isDirty, 'v-input--is-disabled': this.disabled, 'v-input--is-focused': this.isFocused, 'v-input--is-loading': this.loading !== false, 'v-input--is-readonly': this.readonly }, this.addTextColorClassChecks({}, this.validationState), this.themeClasses); }, directivesInput: function directivesInput() { return []; }, hasHint: function hasHint() { return !this.hasMessages && this.hint && (this.persistentHint || this.isFocused); }, hasLabel: function hasLabel() { return Boolean(this.$slots.label || this.label); }, // Proxy for `lazyValue` // This allows an input // to function without // a provided model internalValue: { get: function get() { return this.lazyValue; }, set: function set(val) { this.lazyValue = val; this.$emit('input', val); } }, isDirty: function isDirty() { return !!this.lazyValue; }, isDisabled: function isDisabled() { return Boolean(this.disabled || this.readonly); }, isLabelActive: function isLabelActive() { return this.isDirty; } }, watch: { value: function value(val) { this.lazyValue = val; } }, methods: { genContent: function genContent() { return [this.genPrependSlot(), this.genControl(), this.genAppendSlot()]; }, genControl: function genControl() { return this.$createElement('div', { staticClass: 'v-input__control' }, [this.genInputSlot(), this.genMessages()]); }, genDefaultSlot: function genDefaultSlot() { return [this.genLabel(), this.$slots.default]; }, // TODO: remove shouldDeprecate (2.0), used for clearIcon genIcon: function genIcon(type, cb, shouldDeprecate) { var _this = this; if (shouldDeprecate === void 0) { shouldDeprecate = true; } var icon = this[type + "Icon"]; var eventName = "click:" + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["kebabCase"])(type); cb = cb || this[type + "IconCb"]; if (shouldDeprecate && type && cb) { Object(_util_console__WEBPACK_IMPORTED_MODULE_9__["deprecate"])(":" + type + "-icon-cb", "@" + eventName, this); } var data = { props: { color: this.validationState, dark: this.dark, disabled: this.disabled, light: this.light }, on: !(this.$listeners[eventName] || cb) ? null : { click: function click(e) { e.preventDefault(); e.stopPropagation(); _this.$emit(eventName, e); cb && cb(e); }, // Container has mouseup event that will // trigger menu open if enclosed mouseup: function mouseup(e) { e.preventDefault(); e.stopPropagation(); } } }; return this.$createElement('div', { staticClass: "v-input__icon v-input__icon--" + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["kebabCase"])(type), key: "" + type + icon }, [this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], data, icon)]); }, genInputSlot: function genInputSlot() { return this.$createElement('div', { staticClass: 'v-input__slot', class: this.addBackgroundColorClassChecks({}, this.backgroundColor), style: { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["convertToUnit"])(this.height) }, directives: this.directivesInput, on: { click: this.onClick, mousedown: this.onMouseDown, mouseup: this.onMouseUp }, ref: 'input-slot' }, [this.genDefaultSlot(), this.genProgress()]); }, genLabel: function genLabel() { if (!this.hasLabel) return null; return this.$createElement(_VLabel__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { color: this.validationState, dark: this.dark, focused: this.hasState, for: this.$attrs.id, light: this.light } }, this.$slots.label || this.label); }, genMessages: function genMessages() { if (this.hideDetails) return null; var messages = this.hasHint ? [this.hint] : this.validations; return this.$createElement(_VMessages__WEBPACK_IMPORTED_MODULE_3__["default"], { props: { color: this.hasHint ? '' : this.validationState, dark: this.dark, light: this.light, value: this.hasMessages || this.hasHint ? messages : [] } }); }, genSlot: function genSlot(type, location, slot) { if (!slot.length) return null; var ref = type + "-" + location; return this.$createElement('div', { staticClass: "v-input__" + ref, ref: ref }, slot); }, genPrependSlot: function genPrependSlot() { var slot = []; if (this.$slots['prepend']) { slot.push(this.$slots['prepend']); } else if (this.prependIcon) { slot.push(this.genIcon('prepend')); } return this.genSlot('prepend', 'outer', slot); }, genAppendSlot: function genAppendSlot() { var slot = []; // Append icon for text field was really // an appended inner icon, v-text-field // will overwrite this method in order to obtain // backwards compat if (this.$slots['append']) { slot.push(this.$slots['append']); } else if (this.appendIcon) { slot.push(this.genIcon('append')); } return this.genSlot('append', 'outer', slot); }, onClick: function onClick(e) { this.$emit('click', e); }, onMouseDown: function onMouseDown(e) { this.$emit('mousedown', e); }, onMouseUp: function onMouseUp(e) { this.$emit('mouseup', e); } }, render: function render(h) { return h('div', { staticClass: 'v-input', attrs: this.attrsInput, 'class': this.classesInput }, this.genContent()); } }); /***/ }), /***/ "./src/components/VInput/index.js": /*!****************************************!*\ !*** ./src/components/VInput/index.js ***! \****************************************/ /*! exports provided: VInput, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VInput */ "./src/components/VInput/VInput.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VInput", function() { return _VInput__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VInput__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VInput__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VInput__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VInput__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VJumbotron/VJumbotron.js": /*!*************************************************!*\ !*** ./src/components/VJumbotron/VJumbotron.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_jumbotrons_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_jumbotrons.styl */ "./src/stylus/components/_jumbotrons.styl"); /* harmony import */ var _stylus_components_jumbotrons_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_jumbotrons_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-jumbotron', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { gradient: String, height: { type: [Number, String], default: '400px' }, src: String, tag: { type: String, default: 'div' } }, computed: { backgroundStyles: function backgroundStyles() { var styles = {}; if (this.gradient) { styles.background = "linear-gradient(" + this.gradient + ")"; } return styles; }, classes: function classes() { return { 'theme--dark': this.dark, 'theme--light': this.light }; }, styles: function styles() { return { height: this.height }; } }, methods: { genBackground: function genBackground() { return this.$createElement('div', { staticClass: 'v-jumbotron__background', 'class': this.addBackgroundColorClassChecks(), style: this.backgroundStyles }); }, genContent: function genContent() { return this.$createElement('div', { staticClass: 'v-jumbotron__content' }, this.$slots.default); }, genImage: function genImage() { if (!this.src) return null; if (this.$slots.img) return this.$slots.img({ src: this.src }); return this.$createElement('img', { staticClass: 'v-jumbotron__image', attrs: { src: this.src } }); }, genWrapper: function genWrapper() { return this.$createElement('div', { staticClass: 'v-jumbotron__wrapper' }, [this.genImage(), this.genBackground(), this.genContent()]); } }, render: function render(h) { var _a = this.generateRouteLink(), tag = _a.tag, data = _a.data; data.staticClass = 'v-jumbotron'; data.style = this.styles; return h(tag, data, [this.genWrapper()]); } }); /***/ }), /***/ "./src/components/VJumbotron/index.js": /*!********************************************!*\ !*** ./src/components/VJumbotron/index.js ***! \********************************************/ /*! exports provided: VJumbotron, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VJumbotron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VJumbotron */ "./src/components/VJumbotron/VJumbotron.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VJumbotron", function() { return _VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VJumbotron__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VLabel/VLabel.js": /*!*****************************************!*\ !*** ./src/components/VLabel/VLabel.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_labels_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_labels.styl */ "./src/stylus/components/_labels.styl"); /* harmony import */ var _stylus_components_labels_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_labels_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Mixins // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-label', functional: true, mixins: [_mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { absolute: Boolean, color: { type: [Boolean, String], default: 'primary' }, disabled: Boolean, focused: Boolean, for: String, left: { type: [Number, String], default: 0 }, right: { type: [Number, String], default: 'auto' }, value: Boolean }, render: function render(h, _a) { var children = _a.children, listeners = _a.listeners, props = _a.props; var data = { staticClass: 'v-label', 'class': __assign({ 'v-label--active': props.value, 'v-label--is-disabled': props.disabled }, _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"].options.computed.themeClasses.call(props)), attrs: { for: props.for, 'aria-hidden': !props.for }, on: listeners, style: { left: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["convertToUnit"])(props.left), right: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["convertToUnit"])(props.right), position: props.absolute ? 'absolute' : 'relative' } }; if (props.focused) { data.class = _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"].options.methods.addTextColorClassChecks(data.class, props.color); } return h('label', data, children); } }); /***/ }), /***/ "./src/components/VLabel/index.js": /*!****************************************!*\ !*** ./src/components/VLabel/index.js ***! \****************************************/ /*! exports provided: VLabel, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VLabel */ "./src/components/VLabel/VLabel.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VLabel", function() { return _VLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VLabel__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VLabel__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VLabel__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VLabel__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VList/VList.js": /*!***************************************!*\ !*** ./src/components/VList/VList.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_lists_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_lists.styl */ "./src/stylus/components/_lists.styl"); /* harmony import */ var _stylus_components_lists_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_lists_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); // Styles // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-list', mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_2__["provide"])('list'), _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]], provide: function provide() { return { 'listClick': this.listClick }; }, props: { dense: Boolean, expand: Boolean, subheader: Boolean, threeLine: Boolean, twoLine: Boolean }, data: function data() { return { groups: [] }; }, computed: { classes: function classes() { return { 'v-list--dense': this.dense, 'v-list--subheader': this.subheader, 'v-list--two-line': this.twoLine, 'v-list--three-line': this.threeLine, 'theme--dark': this.dark, 'theme--light': this.light }; } }, methods: { register: function register(uid, cb) { this.groups.push({ uid: uid, cb: cb }); }, unregister: function unregister(uid) { var index = this.groups.findIndex(function (g) { return g.uid === uid; }); if (index > -1) { this.groups.splice(index, 1); } }, listClick: function listClick(uid) { if (this.expand) return; for (var i = this.groups.length; i--;) { this.groups[i].cb(uid); } } }, render: function render(h) { var data = { staticClass: 'v-list', 'class': this.classes }; return h('div', data, [this.$slots.default]); } }); /***/ }), /***/ "./src/components/VList/VListGroup.js": /*!********************************************!*\ !*** ./src/components/VList/VListGroup.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_VIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../components/VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _mixins_bootable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/bootable */ "./src/mixins/bootable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); // Components // Mixins // Transitions /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-list-group', mixins: [_mixins_bootable__WEBPACK_IMPORTED_MODULE_1__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_3__["inject"])('list', 'v-list-group', 'v-list'), _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"]], inject: ['listClick'], props: { activeClass: { type: String, default: 'primary--text' }, appendIcon: { type: String, default: '$vuetify.icons.expand' }, disabled: Boolean, group: String, noAction: Boolean, prependIcon: String, subGroup: Boolean }, data: function data() { return { groups: [] }; }, computed: { groupClasses: function groupClasses() { return { 'v-list__group--active': this.isActive, 'v-list__group--disabled': this.disabled }; }, headerClasses: function headerClasses() { return { 'v-list__group__header--active': this.isActive, 'v-list__group__header--sub-group': this.subGroup }; }, itemsClasses: function itemsClasses() { return { 'v-list__group__items--no-action': this.noAction }; } }, watch: { isActive: function isActive(val) { if (!this.subGroup && val) { this.listClick(this._uid); } }, $route: function $route(to) { var isActive = this.matchRoute(to.path); if (this.group) { if (isActive && this.isActive !== isActive) { this.listClick(this._uid); } this.isActive = isActive; } } }, mounted: function mounted() { this.list.register(this._uid, this.toggle); if (this.group && this.$route && this.value == null) { this.isActive = this.matchRoute(this.$route.path); } }, beforeDestroy: function beforeDestroy() { this.list.unregister(this._uid); }, methods: { click: function click() { if (this.disabled) return; this.isActive = !this.isActive; }, genIcon: function genIcon(icon) { return this.$createElement(_components_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"], icon); }, genAppendIcon: function genAppendIcon() { var icon = !this.subGroup ? this.appendIcon : false; if (!icon && !this.$slots.appendIcon) return null; return this.$createElement('div', { staticClass: 'v-list__group__header__append-icon' }, [this.$slots.appendIcon || this.genIcon(icon)]); }, genGroup: function genGroup() { return this.$createElement('div', { staticClass: 'v-list__group__header', 'class': this.headerClasses, on: Object.assign({}, { click: this.click }, this.$listeners), ref: 'item' }, [this.genPrependIcon(), this.$slots.activator, this.genAppendIcon()]); }, genItems: function genItems() { return this.$createElement('div', { staticClass: 'v-list__group__items', 'class': this.itemsClasses, directives: [{ name: 'show', value: this.isActive }], ref: 'group' }, this.showLazyContent(this.$slots.default)); }, genPrependIcon: function genPrependIcon() { var _a; var icon = this.prependIcon ? this.prependIcon : this.subGroup ? '$vuetify.icons.subgroup' : false; if (!icon && !this.$slots.prependIcon) return null; return this.$createElement('div', { staticClass: 'v-list__group__header__prepend-icon', 'class': (_a = {}, _a[this.activeClass] = this.isActive, _a) }, [this.$slots.prependIcon || this.genIcon(icon)]); }, toggle: function toggle(uid) { this.isActive = this._uid === uid; }, matchRoute: function matchRoute(to) { if (!this.group) return false; return to.match(this.group) !== null; } }, render: function render(h) { return h('div', { staticClass: 'v-list__group', 'class': this.groupClasses }, [this.genGroup(), h(_transitions__WEBPACK_IMPORTED_MODULE_4__["VExpandTransition"], [this.genItems()])]); } }); /***/ }), /***/ "./src/components/VList/VListTile.js": /*!*******************************************!*\ !*** ./src/components/VList/VListTile.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../directives/ripple */ "./src/directives/ripple.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-list-tile', directives: { Ripple: _directives_ripple__WEBPACK_IMPORTED_MODULE_3__["default"] }, mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_0__["default"], _mixins_routable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"]], inheritAttrs: false, props: { activeClass: { type: String, default: 'primary--text' }, avatar: Boolean, inactive: Boolean, tag: String }, data: function data() { return { proxyClass: 'v-list__tile--active' }; }, computed: { listClasses: function listClasses() { return this.disabled ? 'v-list--disabled' : this.color ? this.addTextColorClassChecks() : this.defaultColor; }, classes: function classes() { var _a; return _a = { 'v-list__tile': true, 'v-list__tile--link': this.isLink && !this.inactive, 'v-list__tile--avatar': this.avatar, 'v-list__tile--disabled': this.disabled, 'v-list__tile--active': !this.to && this.isActive }, _a[this.activeClass] = this.isActive, _a; }, isLink: function isLink() { return this.href || this.to || this.$listeners && (this.$listeners.click || this.$listeners['!click']); } }, render: function render(h) { var isRouteLink = !this.inactive && this.isLink; var _a = isRouteLink ? this.generateRouteLink() : { tag: this.tag || 'div', data: { class: this.classes } }, tag = _a.tag, data = _a.data; data.attrs = Object.assign({}, data.attrs, this.$attrs); return h('div', { 'class': this.listClasses, attrs: { disabled: this.disabled }, on: __assign({}, this.$listeners) }, [h(tag, data, this.$slots.default)]); } }); /***/ }), /***/ "./src/components/VList/VListTileAction.js": /*!*************************************************!*\ !*** ./src/components/VList/VListTileAction.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-list-tile-action', functional: true, render: function render(h, _a) { var data = _a.data, children = _a.children; data.staticClass = data.staticClass ? "v-list__tile__action " + data.staticClass : 'v-list__tile__action'; if ((children || []).length > 1) data.staticClass += ' v-list__tile__action--stack'; return h('div', data, children); } }); /***/ }), /***/ "./src/components/VList/VListTileAvatar.js": /*!*************************************************!*\ !*** ./src/components/VList/VListTileAvatar.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VAvatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../VAvatar */ "./src/components/VAvatar/index.ts"); // Components /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-list-tile-avatar', functional: true, props: { color: String, size: { type: [Number, String], default: 40 }, tile: Boolean }, render: function render(h, _a) { var data = _a.data, children = _a.children, props = _a.props; data.staticClass = ("v-list__tile__avatar " + (data.staticClass || '')).trim(); var avatar = h(_VAvatar__WEBPACK_IMPORTED_MODULE_0__["default"], { props: { color: props.color, size: props.size, tile: props.tile } }, [children]); return h('div', data, [avatar]); } }); /***/ }), /***/ "./src/components/VList/index.js": /*!***************************************!*\ !*** ./src/components/VList/index.js ***! \***************************************/ /*! exports provided: VList, VListGroup, VListTile, VListTileAction, VListTileAvatar, VListTileActionText, VListTileContent, VListTileTitle, VListTileSubTitle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VListTileActionText", function() { return VListTileActionText; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VListTileContent", function() { return VListTileContent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VListTileTitle", function() { return VListTileTitle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VListTileSubTitle", function() { return VListTileSubTitle; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VList */ "./src/components/VList/VList.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VList", function() { return _VList__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VListGroup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VListGroup */ "./src/components/VList/VListGroup.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VListGroup", function() { return _VListGroup__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VListTile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VListTile */ "./src/components/VList/VListTile.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VListTile", function() { return _VListTile__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _VListTileAction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VListTileAction */ "./src/components/VList/VListTileAction.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VListTileAction", function() { return _VListTileAction__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _VListTileAvatar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./VListTileAvatar */ "./src/components/VList/VListTileAvatar.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VListTileAvatar", function() { return _VListTileAvatar__WEBPACK_IMPORTED_MODULE_5__["default"]; }); var VListTileActionText = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-list__tile__action-text', 'span'); var VListTileContent = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-list__tile__content', 'div'); var VListTileTitle = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-list__tile__title', 'div'); var VListTileSubTitle = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-list__tile__sub-title', 'div'); /* istanbul ignore next */ _VList__WEBPACK_IMPORTED_MODULE_1__["default"].install = function install(Vue) { Vue.component(_VList__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VList__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VListGroup__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VListGroup__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(_VListTile__WEBPACK_IMPORTED_MODULE_3__["default"].name, _VListTile__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(_VListTileAction__WEBPACK_IMPORTED_MODULE_4__["default"].name, _VListTileAction__WEBPACK_IMPORTED_MODULE_4__["default"]); Vue.component(VListTileActionText.name, VListTileActionText); Vue.component(_VListTileAvatar__WEBPACK_IMPORTED_MODULE_5__["default"].name, _VListTileAvatar__WEBPACK_IMPORTED_MODULE_5__["default"]); Vue.component(VListTileContent.name, VListTileContent); Vue.component(VListTileSubTitle.name, VListTileSubTitle); Vue.component(VListTileTitle.name, VListTileTitle); }; /* harmony default export */ __webpack_exports__["default"] = (_VList__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "./src/components/VMenu/VMenu.js": /*!***************************************!*\ !*** ./src/components/VMenu/VMenu.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_menus_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_menus.styl */ "./src/stylus/components/_menus.styl"); /* harmony import */ var _stylus_components_menus_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_menus_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_delayable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/delayable */ "./src/mixins/delayable.ts"); /* harmony import */ var _mixins_dependent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/dependent */ "./src/mixins/dependent.js"); /* harmony import */ var _mixins_detachable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/detachable */ "./src/mixins/detachable.js"); /* harmony import */ var _mixins_menuable_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/menuable.js */ "./src/mixins/menuable.js"); /* harmony import */ var _mixins_returnable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/returnable */ "./src/mixins/returnable.js"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_menu_activator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mixins/menu-activator */ "./src/components/VMenu/mixins/menu-activator.js"); /* harmony import */ var _mixins_menu_generators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./mixins/menu-generators */ "./src/components/VMenu/mixins/menu-generators.js"); /* harmony import */ var _mixins_menu_keyable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./mixins/menu-keyable */ "./src/components/VMenu/mixins/menu-keyable.js"); /* harmony import */ var _mixins_menu_position__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./mixins/menu-position */ "./src/components/VMenu/mixins/menu-position.js"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Mixins // Component level mixins // Directives // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-menu', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_11__["default"], Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_12__["default"] }, mixins: [_mixins_menu_activator__WEBPACK_IMPORTED_MODULE_7__["default"], _mixins_dependent__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_delayable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_detachable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_menu_generators__WEBPACK_IMPORTED_MODULE_8__["default"], _mixins_menu_keyable__WEBPACK_IMPORTED_MODULE_9__["default"], _mixins_menuable_js__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_menu_position__WEBPACK_IMPORTED_MODULE_10__["default"], _mixins_returnable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__["default"]], props: { auto: Boolean, closeOnClick: { type: Boolean, default: true }, closeOnContentClick: { type: Boolean, default: true }, disabled: Boolean, fullWidth: Boolean, maxHeight: { default: 'auto' }, offsetX: Boolean, offsetY: Boolean, openOnClick: { type: Boolean, default: true }, openOnHover: Boolean, origin: { type: String, default: 'top left' }, transition: { type: [Boolean, String], default: 'v-menu-transition' } }, data: function data() { return { defaultOffset: 8, maxHeightAutoDefault: '200px', startIndex: 3, stopIndex: 0, hasJustFocused: false, resizeTimeout: null }; }, computed: { calculatedLeft: function calculatedLeft() { if (!this.auto) return this.calcLeft(); return this.calcXOverflow(this.calcLeftAuto()) + "px"; }, calculatedMaxHeight: function calculatedMaxHeight() { return this.auto ? '200px' : Object(_util_helpers__WEBPACK_IMPORTED_MODULE_13__["convertToUnit"])(this.maxHeight); }, calculatedMaxWidth: function calculatedMaxWidth() { return isNaN(this.maxWidth) ? this.maxWidth : this.maxWidth + "px"; }, calculatedMinWidth: function calculatedMinWidth() { if (this.minWidth) { return isNaN(this.minWidth) ? this.minWidth : this.minWidth + "px"; } var minWidth = this.dimensions.activator.width + this.nudgeWidth + (this.auto ? 16 : 0); var calculatedMaxWidth = isNaN(parseInt(this.calculatedMaxWidth)) ? minWidth : parseInt(this.calculatedMaxWidth); return Math.min(calculatedMaxWidth, minWidth) + "px"; }, calculatedTop: function calculatedTop() { if (!this.auto || this.isAttached) return this.calcTop(); return this.calcYOverflow(this.calcTopAuto()) + "px"; }, styles: function styles() { return { maxHeight: this.calculatedMaxHeight, minWidth: this.calculatedMinWidth, maxWidth: this.calculatedMaxWidth, top: this.calculatedTop, left: this.calculatedLeft, transformOrigin: this.origin, zIndex: this.zIndex || this.activeZIndex }; }, tileHeight: function tileHeight() { return this.dense ? 36 : 48; } }, watch: { activator: function activator(newActivator, oldActivator) { this.removeActivatorEvents(oldActivator); this.addActivatorEvents(newActivator); }, isContentActive: function isContentActive(val) { this.hasJustFocused = val; } }, methods: { activate: function activate() { // This exists primarily for v-select // helps determine which tiles to activate this.getTiles(); // Update coordinates and dimensions of menu // and its activator this.updateDimensions(); // Start the transition requestAnimationFrame(this.startTransition); // Once transitioning, calculate scroll position setTimeout(this.calculateScroll, 50); }, closeConditional: function closeConditional() { return this.isActive && this.closeOnClick; }, onResize: function onResize() { if (!this.isActive) return; // Account for screen resize // and orientation change // eslint-disable-next-line no-unused-expressions this.$refs.content.offsetWidth; this.updateDimensions(); // When resizing to a smaller width // content width is evaluated before // the new activator width has been // set, causing it to not size properly // hacky but will revisit in the future clearTimeout(this.resizeTimeout); this.resizeTimeout = setTimeout(this.updateDimensions, 100); } }, render: function render(h) { var data = { staticClass: 'v-menu', class: { 'v-menu--inline': !this.fullWidth && this.$slots.activator }, directives: [{ arg: 500, name: 'resize', value: this.onResize }], on: { keydown: this.changeListIndex } }; return h('div', data, [this.genActivator(), this.genTransition()]); } }); /***/ }), /***/ "./src/components/VMenu/index.js": /*!***************************************!*\ !*** ./src/components/VMenu/index.js ***! \***************************************/ /*! exports provided: VMenu, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VMenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VMenu */ "./src/components/VMenu/VMenu.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VMenu", function() { return _VMenu__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VMenu__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VMenu__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VMenu__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VMenu__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VMenu/mixins/menu-activator.js": /*!*******************************************************!*\ !*** ./src/components/VMenu/mixins/menu-activator.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Menu activator * * @mixin * * Handles the click and hover activation * Supports slotted and detached activators */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { activatorClickHandler: function activatorClickHandler(e) { if (this.disabled) return; if (this.openOnClick && !this.isActive) { this.getActivator().focus(); this.isActive = true; this.absoluteX = e.clientX; this.absoluteY = e.clientY; } else if (this.closeOnClick && this.isActive) { this.getActivator().blur(); this.isActive = false; } }, mouseEnterHandler: function mouseEnterHandler() { var _this = this; this.runDelay('open', function () { if (_this.hasJustFocused) return; _this.hasJustFocused = true; _this.isActive = true; }); }, mouseLeaveHandler: function mouseLeaveHandler(e) { var _this = this; // Prevent accidental re-activation this.runDelay('close', function () { if (_this.$refs.content.contains(e.relatedTarget)) return; requestAnimationFrame(function () { _this.isActive = false; _this.callDeactivate(); }); }); }, addActivatorEvents: function addActivatorEvents(activator) { if (activator === void 0) { activator = null; } if (!activator) return; activator.addEventListener('click', this.activatorClickHandler); }, removeActivatorEvents: function removeActivatorEvents(activator) { if (activator === void 0) { activator = null; } if (!activator) return; activator.removeEventListener('click', this.activatorClickHandler); } } }); /***/ }), /***/ "./src/components/VMenu/mixins/menu-generators.js": /*!********************************************************!*\ !*** ./src/components/VMenu/mixins/menu-generators.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /** * Menu generators * * @mixin * * Used for creating the DOM elements for VMenu */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genActivator: function genActivator() { if (!this.$slots.activator) return null; var options = { staticClass: 'v-menu__activator', 'class': { 'v-menu__activator--active': this.hasJustFocused || this.isActive, 'v-menu__activator--disabled': this.disabled }, ref: 'activator', on: {} }; if (this.openOnHover) { options.on['mouseenter'] = this.mouseEnterHandler; options.on['mouseleave'] = this.mouseLeaveHandler; } else if (this.openOnClick) { options.on['click'] = this.activatorClickHandler; } return this.$createElement('div', options, this.$slots.activator); }, genTransition: function genTransition() { if (!this.transition) return this.genContent(); return this.$createElement('transition', { props: { name: this.transition } }, [this.genContent()]); }, genDirectives: function genDirectives() { var _this = this; // Do not add click outside for hover menu var directives = !this.openOnHover && this.closeOnClick ? [{ name: 'click-outside', value: function value() { return _this.isActive = false; }, args: { closeConditional: this.closeConditional, include: function include() { return __spread([_this.$el], _this.getOpenDependentElements()); } } }] : []; directives.push({ name: 'show', value: this.isContentActive }); return directives; }, genContent: function genContent() { var _this = this; var _a; var options = { attrs: this.getScopeIdAttrs(), staticClass: 'v-menu__content', 'class': (_a = {}, _a[this.contentClass.trim()] = true, _a['v-menu__content--auto'] = this.auto, _a['menuable__content__active'] = this.isActive, _a['theme--dark'] = this.dark, _a['theme--light'] = this.light, _a), style: this.styles, directives: this.genDirectives(), ref: 'content', on: { click: function click(e) { e.stopPropagation(); if (e.target.getAttribute('disabled')) return; if (_this.closeOnContentClick) _this.isActive = false; } } }; !this.disabled && this.openOnHover && (options.on.mouseenter = this.mouseEnterHandler); this.openOnHover && (options.on.mouseleave = this.mouseLeaveHandler); return this.$createElement('div', options, this.showLazyContent(this.$slots.default)); } } }); /***/ }), /***/ "./src/components/VMenu/mixins/menu-keyable.js": /*!*****************************************************!*\ !*** ./src/components/VMenu/mixins/menu-keyable.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/helpers */ "./src/util/helpers.ts"); /** * Menu keyable * * @mixin * * Primarily used to support VSelect * Handles opening and closing of VMenu from keystrokes * Will conditionally highlight VListTiles for VSelect */ // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ data: function data() { return { listIndex: -1, tiles: [] }; }, watch: { isActive: function isActive(val) { if (!val) this.listIndex = -1; }, listIndex: function listIndex(next, prev) { if (next in this.tiles) { var tile = this.tiles[next]; tile.classList.add('v-list__tile--highlighted'); this.$refs.content.scrollTop = tile.offsetTop - tile.clientHeight; } prev in this.tiles && this.tiles[prev].classList.remove('v-list__tile--highlighted'); } }, methods: { changeListIndex: function changeListIndex(e) { if ([_util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].down, _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].up, _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].enter].includes(e.keyCode)) e.preventDefault(); if ([_util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].esc, _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].tab].includes(e.keyCode)) { return this.isActive = false; } // For infinite scroll and autocomplete, re-evaluate children this.getTiles(); if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].down && this.listIndex < this.tiles.length - 1) { this.listIndex++; // Allow user to set listIndex to -1 so // that the list can be un-highlighted } else if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].up && this.listIndex > -1) { this.listIndex--; } else if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_0__["keyCodes"].enter && this.listIndex !== -1) { this.tiles[this.listIndex].click(); } }, getTiles: function getTiles() { this.tiles = this.$refs.content.querySelectorAll('.v-list__tile'); } } }); /***/ }), /***/ "./src/components/VMenu/mixins/menu-position.js": /*!******************************************************!*\ !*** ./src/components/VMenu/mixins/menu-position.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Menu position * * @mixin * * Used for calculating an automatic position (used for VSelect) * Will position the VMenu content properly over the VSelect */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { // Revisit this calculateScroll: function calculateScroll() { if (this.selectedIndex === null) return; var scrollTop = 0; if (this.selectedIndex >= this.stopIndex) { scrollTop = this.$refs.content.scrollHeight; } else if (this.selectedIndex > this.startIndex) { scrollTop = // Top position of selected item this.selectedIndex * this.tileHeight + // Remove half of a tile's height this.tileHeight / 2 + // Account for padding offset on lists this.defaultOffset / 2 - // Half of the auto content's height 100; } if (this.$refs.content) { this.$refs.content.scrollTop = scrollTop; } }, calcLeftAuto: function calcLeftAuto() { if (this.isAttached) return 0; return parseInt(this.dimensions.activator.left - this.defaultOffset * 2); }, calcTopAuto: function calcTopAuto() { var selectedIndex = Array.from(this.tiles).findIndex(function (n) { return n.classList.contains('v-list__tile--active'); }); if (selectedIndex === -1) { this.selectedIndex = null; return this.computedTop; } this.selectedIndex = selectedIndex; this.stopIndex = this.tiles.length > 4 ? this.tiles.length - 4 : this.tiles.length; var additionalOffset = this.defaultOffset; var offsetPadding; // Menu should be centered if (selectedIndex > this.startIndex && selectedIndex < this.stopIndex) { offsetPadding = 1.5 * this.tileHeight; // Menu should be offset top } else if (selectedIndex >= this.stopIndex) { // Being offset top means // we have to account for top // and bottom list padding additionalOffset *= 2; offsetPadding = (selectedIndex - this.stopIndex) * this.tileHeight; // Menu should be offset bottom } else { offsetPadding = selectedIndex * this.tileHeight; } return this.computedTop + additionalOffset - offsetPadding - this.tileHeight / 2; } } }); /***/ }), /***/ "./src/components/VMessages/VMessages.js": /*!***********************************************!*\ !*** ./src/components/VMessages/VMessages.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_messages_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_messages.styl */ "./src/stylus/components/_messages.styl"); /* harmony import */ var _stylus_components_messages_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_messages_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-messages', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { value: { type: Array, default: function _default() { return []; } } }, computed: { classes: function classes() { return this.addTextColorClassChecks(); } }, methods: { genChildren: function genChildren() { var _this = this; return this.$createElement('transition-group', { staticClass: 'v-messages__wrapper', attrs: { name: 'message-transition', tag: 'div' } }, this.value.map(function (m) { return _this.genMessage(m); })); }, genMessage: function genMessage(key) { return this.$createElement('div', { staticClass: 'v-messages__message', key: key, domProps: { innerHTML: key } }); } }, render: function render(h) { return h('div', { staticClass: 'v-messages', 'class': __assign({}, this.classes, this.themeClasses) }, [this.genChildren()]); } }); /***/ }), /***/ "./src/components/VMessages/index.js": /*!*******************************************!*\ !*** ./src/components/VMessages/index.js ***! \*******************************************/ /*! exports provided: VMessages, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VMessages */ "./src/components/VMessages/VMessages.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VMessages", function() { return _VMessages__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VMessages__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VMessages__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VMessages__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VMessages__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VNavigationDrawer/VNavigationDrawer.js": /*!***************************************************************!*\ !*** ./src/components/VNavigationDrawer/VNavigationDrawer.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_navigation_drawer_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_navigation-drawer.styl */ "./src/stylus/components/_navigation-drawer.styl"); /* harmony import */ var _stylus_components_navigation_drawer_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_navigation_drawer_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts"); /* harmony import */ var _mixins_overlayable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/overlayable */ "./src/mixins/overlayable.js"); /* harmony import */ var _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/ssr-bootable */ "./src/mixins/ssr-bootable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Mixins // Directives // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-navigation-drawer', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_5__["default"], Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_6__["default"], Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_7__["default"] }, mixins: [Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])(null, ['miniVariant', 'right', 'width']), _mixins_overlayable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_4__["default"]], props: { clipped: Boolean, disableRouteWatcher: Boolean, disableResizeWatcher: Boolean, height: { type: [Number, String], default: '100%' }, floating: Boolean, miniVariant: Boolean, miniVariantWidth: { type: [Number, String], default: 80 }, mobileBreakPoint: { type: [Number, String], default: 1264 }, permanent: Boolean, right: Boolean, stateless: Boolean, temporary: Boolean, touchless: Boolean, width: { type: [Number, String], default: 300 }, value: { required: false } }, data: function data() { return { isActive: false, touchArea: { left: 0, right: 0 } }; }, computed: { /** * Used for setting an app * value from a dynamic * property. Called from * applicationable.js * * @return {string} */ applicationProperty: function applicationProperty() { return this.right ? 'right' : 'left'; }, calculatedTransform: function calculatedTransform() { if (this.isActive) return 0; return this.right ? this.calculatedWidth : -this.calculatedWidth; }, calculatedWidth: function calculatedWidth() { return this.miniVariant ? this.miniVariantWidth : this.width; }, classes: function classes() { return { 'v-navigation-drawer': true, 'v-navigation-drawer--absolute': this.absolute, 'v-navigation-drawer--clipped': this.clipped, 'v-navigation-drawer--close': !this.isActive, 'v-navigation-drawer--fixed': !this.absolute && (this.app || this.fixed), 'v-navigation-drawer--floating': this.floating, 'v-navigation-drawer--is-mobile': this.isMobile, 'v-navigation-drawer--mini-variant': this.miniVariant, 'v-navigation-drawer--open': this.isActive, 'v-navigation-drawer--right': this.right, 'v-navigation-drawer--temporary': this.temporary, 'theme--dark': this.dark, 'theme--light': this.light }; }, hasApp: function hasApp() { return this.app && !this.isMobile && !this.temporary; }, isMobile: function isMobile() { return !this.stateless && !this.permanent && !this.temporary && this.$vuetify.breakpoint.width < parseInt(this.mobileBreakPoint, 10); }, marginTop: function marginTop() { if (!this.hasApp) return 0; var marginTop = this.$vuetify.application.bar; marginTop += this.clipped ? this.$vuetify.application.top : 0; return marginTop; }, maxHeight: function maxHeight() { if (!this.hasApp) return null; var maxHeight = this.$vuetify.application.bottom + this.$vuetify.application.footer + this.$vuetify.application.bar; if (!this.clipped) return maxHeight; return maxHeight + this.$vuetify.application.top; }, reactsToClick: function reactsToClick() { return !this.stateless && !this.permanent && (this.isMobile || this.temporary); }, reactsToMobile: function reactsToMobile() { return !this.disableResizeWatcher && !this.stateless && !this.permanent && !this.temporary; }, reactsToRoute: function reactsToRoute() { return !this.disableRouteWatcher && !this.stateless && (this.temporary || this.isMobile); }, resizeIsDisabled: function resizeIsDisabled() { return this.disableResizeWatcher || this.stateless; }, showOverlay: function showOverlay() { return this.isActive && (this.isMobile || this.temporary); }, styles: function styles() { var styles = { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_8__["convertToUnit"])(this.height), marginTop: this.marginTop + "px", maxHeight: "calc(100% - " + +this.maxHeight + "px)", transform: "translateX(" + this.calculatedTransform + "px)", width: this.calculatedWidth + "px" }; return styles; } }, watch: { $route: function $route() { if (this.reactsToRoute && this.closeConditional()) { this.isActive = false; } }, isActive: function isActive(val) { this.$emit('input', val); this.callUpdate(); }, /** * When mobile changes, adjust * the active state only when * there has been a previous * value */ isMobile: function isMobile(val, prev) { !val && this.isActive && !this.temporary && this.removeOverlay(); if (prev == null || this.resizeIsDisabled || !this.reactsToMobile) return; this.isActive = !val; this.callUpdate(); }, permanent: function permanent(val) { // If enabling prop // enable the drawer if (val) { this.isActive = true; } this.callUpdate(); }, showOverlay: function showOverlay(val) { if (val) this.genOverlay();else this.removeOverlay(); }, temporary: function temporary() { this.callUpdate(); }, value: function value(val) { if (this.permanent) return; if (val == null) return this.init(); if (val !== this.isActive) this.isActive = val; } }, beforeMount: function beforeMount() { this.init(); }, methods: { calculateTouchArea: function calculateTouchArea() { if (!this.$el.parentNode) return; var parentRect = this.$el.parentNode.getBoundingClientRect(); this.touchArea = { left: parentRect.left + 50, right: parentRect.right - 50 }; }, closeConditional: function closeConditional() { return this.isActive && this.reactsToClick; }, genDirectives: function genDirectives() { var _this = this; var directives = [{ name: 'click-outside', value: function value() { return _this.isActive = false; }, args: { closeConditional: this.closeConditional } }]; !this.touchless && directives.push({ name: 'touch', value: { parent: true, left: this.swipeLeft, right: this.swipeRight } }); return directives; }, /** * Sets state before mount to avoid * entry transitions in SSR * * @return {void} */ init: function init() { if (this.permanent) { this.isActive = true; } else if (this.stateless || this.value != null) { this.isActive = this.value; } else if (!this.temporary) { this.isActive = !this.isMobile; } }, swipeRight: function swipeRight(e) { if (this.isActive && !this.right) return; this.calculateTouchArea(); if (Math.abs(e.touchendX - e.touchstartX) < 100) return; if (!this.right && e.touchstartX <= this.touchArea.left) this.isActive = true;else if (this.right && this.isActive) this.isActive = false; }, swipeLeft: function swipeLeft(e) { if (this.isActive && this.right) return; this.calculateTouchArea(); if (Math.abs(e.touchendX - e.touchstartX) < 100) return; if (this.right && e.touchstartX >= this.touchArea.right) this.isActive = true;else if (!this.right && this.isActive) this.isActive = false; }, /** * Update the application layout * * @return {number} */ updateApplication: function updateApplication() { return !this.isActive || this.temporary || this.isMobile ? 0 : this.calculatedWidth; } }, render: function render(h) { var _this = this; var data = { 'class': this.classes, style: this.styles, directives: this.genDirectives(), on: { click: function click() { if (!_this.miniVariant) return; _this.$emit('update:miniVariant', false); }, transitionend: function transitionend(e) { if (e.target !== e.currentTarget) return; _this.$emit('transitionend', e); // IE11 does not support new Event('resize') var resizeEvent = document.createEvent('UIEvents'); resizeEvent.initUIEvent('resize', true, false, window, 0); window.dispatchEvent(resizeEvent); } } }; return h('aside', data, [this.$slots.default, h('div', { 'class': 'v-navigation-drawer__border' })]); } }); /***/ }), /***/ "./src/components/VNavigationDrawer/index.js": /*!***************************************************!*\ !*** ./src/components/VNavigationDrawer/index.js ***! \***************************************************/ /*! exports provided: VNavigationDrawer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VNavigationDrawer */ "./src/components/VNavigationDrawer/VNavigationDrawer.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VNavigationDrawer", function() { return _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VNavigationDrawer__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VOverflowBtn/VOverflowBtn.js": /*!*****************************************************!*\ !*** ./src/components/VOverflowBtn/VOverflowBtn.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_overflow_buttons_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_overflow-buttons.styl */ "./src/stylus/components/_overflow-buttons.styl"); /* harmony import */ var _stylus_components_overflow_buttons_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_overflow_buttons_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSelect/VSelect */ "./src/components/VSelect/VSelect.js"); /* harmony import */ var _VAutocomplete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VAutocomplete */ "./src/components/VAutocomplete/index.js"); /* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.js"); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); // Styles // Extensions /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-overflow-btn', extends: _VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"], props: { segmented: Boolean, editable: Boolean, transition: _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].props.transition }, computed: { classes: function classes() { return Object.assign(_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].computed.classes.call(this), { 'v-overflow-btn': true, 'v-overflow-btn--segmented': this.segmented, 'v-overflow-btn--editable': this.editable }); }, isAnyValueAllowed: function isAnyValueAllowed() { return this.editable || _VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].computed.isAnyValueAllowed.call(this); }, isSingle: function isSingle() { return true; }, computedItems: function computedItems() { return this.segmented ? this.allItems : this.filteredItems; } }, methods: { genSelections: function genSelections() { return this.editable ? _VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"].methods.genSelections.call(this) : _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genSelections.call(this); // Override v-autocomplete's override }, genCommaSelection: function genCommaSelection(item, index, last) { return this.segmented ? this.genSegmentedBtn(item) : _VSelect_VSelect__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genCommaSelection.call(this, item, index, last); }, genInput: function genInput() { var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_3__["default"].methods.genInput.call(this); input.data.domProps.value = this.editable ? this.internalSearch : ''; input.data.attrs.readonly = !this.isAnyValueAllowed; return input; }, genLabel: function genLabel() { if (this.editable && this.isFocused) return null; var label = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_3__["default"].methods.genLabel.call(this); if (!label) return label; // Reset previously set styles from parent label.data.style = {}; return label; }, genSegmentedBtn: function genSegmentedBtn(item) { var _this = this; var itemValue = this.getValue(item); var itemObj = this.computedItems.find(function (i) { return _this.getValue(i) === itemValue; }) || item; if (!itemObj.text || !itemObj.callback) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["consoleWarn"])('When using \'segmented\' prop without a selection slot, items must contain both a text and callback property', this); return null; } return this.$createElement(_VBtn__WEBPACK_IMPORTED_MODULE_4__["default"], { props: { flat: true }, on: { click: function click(e) { e.stopPropagation(); itemObj.callback(e); } } }, [itemObj.text]); }, setSelectedItems: function setSelectedItems() { if (this.internalValue == null) { this.selectedItems = []; } else { this.selectedItems = [this.internalValue]; } } } }); /***/ }), /***/ "./src/components/VOverflowBtn/index.js": /*!**********************************************!*\ !*** ./src/components/VOverflowBtn/index.js ***! \**********************************************/ /*! exports provided: VOverflowBtn, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VOverflowBtn */ "./src/components/VOverflowBtn/VOverflowBtn.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VOverflowBtn", function() { return _VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VOverflowBtn__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VPagination/VPagination.js": /*!***************************************************!*\ !*** ./src/components/VPagination/VPagination.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_pagination_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_pagination.styl */ "./src/stylus/components/_pagination.styl"); /* harmony import */ var _stylus_components_pagination_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_pagination_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-pagination', directives: { Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_2__["default"] }, mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { circle: Boolean, disabled: Boolean, length: { type: Number, default: 0, validator: function validator(val) { return val % 1 === 0; } }, totalVisible: [Number, String], nextIcon: { type: String, default: '$vuetify.icons.next' }, prevIcon: { type: String, default: '$vuetify.icons.prev' }, value: { type: Number, default: 0 } }, data: function data() { return { maxButtons: 0, defaultColor: 'primary' }; }, computed: { classes: function classes() { return { 'v-pagination': true, 'v-pagination--circle': this.circle, 'v-pagination--disabled': this.disabled }; }, items: function items() { var maxLength = this.totalVisible || this.maxButtons; if (this.length <= maxLength) { return this.range(1, this.length); } var even = maxLength % 2 === 0 ? 1 : 0; var left = Math.floor(maxLength / 2); var right = this.length - left + 1 + even; if (this.value > left && this.value < right) { var start = this.value - left + 2; var end = this.value + left - 2 - even; return __spread([1, '...'], this.range(start, end), ['...', this.length]); } else { return __spread(this.range(1, left), ['...'], this.range(this.length - left + 1 + even, this.length)); } } }, watch: { value: function value() { this.init(); } }, mounted: function mounted() { this.init(); }, methods: { init: function init() { var _this = this; this.selected = null; this.$nextTick(this.onResize); // TODO: Change this (f75dee3a, cbdf7caa) setTimeout(function () { return _this.selected = _this.value; }, 100); }, onResize: function onResize() { var width = this.$el && this.$el.parentNode ? this.$el.parentNode.clientWidth : window.innerWidth; this.maxButtons = Math.floor((width - 96) / 42); }, next: function next(e) { e.preventDefault(); this.$emit('input', this.value + 1); this.$emit('next'); }, previous: function previous(e) { e.preventDefault(); this.$emit('input', this.value - 1); this.$emit('previous'); }, range: function range(from, to) { var range = []; from = from > 0 ? from : 1; for (var i = from; i <= to; i++) { range.push(i); } return range; }, genIcon: function genIcon(h, icon, disabled, fn) { return h('li', [h('button', { staticClass: 'v-pagination__navigation', class: { 'v-pagination__navigation--disabled': disabled }, on: disabled ? {} : { click: fn } }, [h(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], [icon])])]); }, genItem: function genItem(h, i) { var _this = this; return h('button', { staticClass: 'v-pagination__item', class: i === this.value ? this.addBackgroundColorClassChecks({ 'v-pagination__item--active': true }) : {}, on: { click: function click() { return _this.$emit('input', i); } } }, [i]); }, genItems: function genItems(h) { var _this = this; return this.items.map(function (i, index) { return h('li', { key: index }, [isNaN(i) ? h('span', { class: 'v-pagination__more' }, [i]) : _this.genItem(h, i)]); }); } }, render: function render(h) { var children = [this.genIcon(h, this.$vuetify.rtl ? this.nextIcon : this.prevIcon, this.value <= 1, this.previous), this.genItems(h), this.genIcon(h, this.$vuetify.rtl ? this.prevIcon : this.nextIcon, this.value >= this.length, this.next)]; return h('ul', { directives: [{ modifiers: { quiet: true }, name: 'resize', value: this.onResize }], class: this.classes }, children); } }); /***/ }), /***/ "./src/components/VPagination/index.js": /*!*********************************************!*\ !*** ./src/components/VPagination/index.js ***! \*********************************************/ /*! exports provided: VPagination, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VPagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VPagination */ "./src/components/VPagination/VPagination.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VPagination", function() { return _VPagination__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VPagination__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VPagination__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VPagination__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VPagination__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VParallax/VParallax.ts": /*!***********************************************!*\ !*** ./src/components/VParallax/VParallax.ts ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_parallax_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_parallax.styl */ "./src/stylus/components/_parallax.styl"); /* harmony import */ var _stylus_components_parallax_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_parallax_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_translatable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/translatable */ "./src/mixins/translatable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Style // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_mixins_translatable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-parallax', props: { alt: String, height: { type: [String, Number], default: 500 }, src: String }, data: function data() { return { isBooted: false }; }, computed: { styles: function styles() { return { display: 'block', opacity: this.isBooted ? 1 : 0, transform: "translate(-50%, " + this.parallax + "px)" }; } }, watch: { parallax: function parallax() { this.isBooted = true; } }, mounted: function mounted() { this.init(); }, methods: { init: function init() { var _this = this; var img = this.$refs.img; if (!img) return; if (img.complete) { this.translate(); this.listeners(); } else { img.addEventListener('load', function () { _this.translate(); _this.listeners(); }, false); } }, objHeight: function objHeight() { return this.$refs.img.naturalHeight; } }, render: function render(h) { var imgData = { staticClass: 'v-parallax__image', style: this.styles, attrs: { src: this.src }, ref: 'img' }; if (this.alt) imgData.attrs.alt = this.alt; var container = h('div', { staticClass: 'v-parallax__image-container' }, [h('img', imgData)]); var content = h('div', { staticClass: 'v-parallax__content' }, this.$slots.default); return h('div', { staticClass: 'v-parallax', style: { height: this.height + "px" }, on: this.$listeners }, [container, content]); } })); /***/ }), /***/ "./src/components/VParallax/index.ts": /*!*******************************************!*\ !*** ./src/components/VParallax/index.ts ***! \*******************************************/ /*! exports provided: VParallax, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VParallax__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VParallax */ "./src/components/VParallax/VParallax.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VParallax", function() { return _VParallax__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VParallax__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VParallax__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VParallax__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VParallax__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VPicker/VPicker.js": /*!*******************************************!*\ !*** ./src/components/VPicker/VPicker.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_pickers_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_pickers.styl */ "./src/stylus/components/_pickers.styl"); /* harmony import */ var _stylus_components_pickers_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_pickers_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stylus/components/_cards.styl */ "./src/stylus/components/_cards.styl"); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-picker', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { fullWidth: Boolean, landscape: Boolean, transition: { type: String, default: 'fade-transition' }, width: { type: [Number, String], default: 290, validator: function validator(value) { return parseInt(value, 10) > 0; } } }, data: function data() { return { defaultColor: 'primary' }; }, computed: { computedTitleColor: function computedTitleColor() { var darkTheme = this.dark || !this.light && this.$vuetify.dark; var defaultTitleColor = darkTheme ? null : this.computedColor; return this.color || defaultTitleColor; } }, methods: { genTitle: function genTitle() { return this.$createElement('div', { staticClass: 'v-picker__title', 'class': this.addBackgroundColorClassChecks({ 'v-picker__title--landscape': this.landscape }, this.computedTitleColor) }, this.$slots.title); }, genBodyTransition: function genBodyTransition() { return this.$createElement('transition', { props: { name: this.transition } }, this.$slots.default); }, genBody: function genBody() { return this.$createElement('div', { staticClass: 'v-picker__body', 'class': this.themeClasses, style: this.fullWidth ? undefined : { width: this.width + 'px' } }, [this.genBodyTransition()]); }, genActions: function genActions() { return this.$createElement('div', { staticClass: 'v-picker__actions v-card__actions' }, this.$slots.actions); } }, render: function render(h) { return h('div', { staticClass: 'v-picker v-card', 'class': __assign({ 'v-picker--landscape': this.landscape }, this.themeClasses) }, [this.$slots.title ? this.genTitle() : null, this.genBody(), this.$slots.actions ? this.genActions() : null]); } }); /***/ }), /***/ "./src/components/VPicker/index.js": /*!*****************************************!*\ !*** ./src/components/VPicker/index.js ***! \*****************************************/ /*! exports provided: VPicker, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VPicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VPicker */ "./src/components/VPicker/VPicker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VPicker", function() { return _VPicker__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VPicker__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VPicker__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VPicker__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VPicker__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VProgressCircular/VProgressCircular.ts": /*!***************************************************************!*\ !*** ./src/components/VProgressCircular/VProgressCircular.ts ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_progress_circular_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_progress-circular.styl */ "./src/stylus/components/_progress-circular.styl"); /* harmony import */ var _stylus_components_progress_circular_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_progress_circular_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_2__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-progress-circular', props: { button: Boolean, indeterminate: Boolean, rotate: { type: Number, default: 0 }, size: { type: [Number, String], default: 32 }, width: { type: Number, default: 4 }, value: { type: Number, default: 0 } }, computed: { calculatedSize: function calculatedSize() { return Number(this.size) + (this.button ? 8 : 0); }, circumference: function circumference() { return 2 * Math.PI * this.radius; }, classes: function classes() { return this.addTextColorClassChecks({ 'v-progress-circular': true, 'v-progress-circular--indeterminate': this.indeterminate, 'v-progress-circular--button': this.button }); }, normalizedValue: function normalizedValue() { if (this.value < 0) { return 0; } if (this.value > 100) { return 100; } return this.value; }, radius: function radius() { return 20; }, strokeDashArray: function strokeDashArray() { return Math.round(this.circumference * 1000) / 1000; }, strokeDashOffset: function strokeDashOffset() { return (100 - this.normalizedValue) / 100 * this.circumference + 'px'; }, strokeWidth: function strokeWidth() { return this.width / +this.size * this.viewBoxSize * 2; }, styles: function styles() { return { height: this.calculatedSize + "px", width: this.calculatedSize + "px" }; }, svgStyles: function svgStyles() { return { transform: "rotate(" + this.rotate + "deg)" }; }, viewBoxSize: function viewBoxSize() { return this.radius / (1 - this.width / +this.size); } }, methods: { genCircle: function genCircle(h, name, offset) { return h('circle', { class: "v-progress-circular__" + name, attrs: { fill: 'transparent', cx: 2 * this.viewBoxSize, cy: 2 * this.viewBoxSize, r: this.radius, 'stroke-width': this.strokeWidth, 'stroke-dasharray': this.strokeDashArray, 'stroke-dashoffset': offset } }); }, genSvg: function genSvg(h) { var children = [this.indeterminate || this.genCircle(h, 'underlay', 0), this.genCircle(h, 'overlay', this.strokeDashOffset)]; return h('svg', { style: this.svgStyles, attrs: { xmlns: 'http://www.w3.org/2000/svg', viewBox: this.viewBoxSize + " " + this.viewBoxSize + " " + 2 * this.viewBoxSize + " " + 2 * this.viewBoxSize } }, children); } }, render: function render(h) { var info = h('div', { class: 'v-progress-circular__info' }, [this.$slots.default]); var svg = this.genSvg(h); return h('div', { class: this.classes, style: this.styles, on: this.$listeners }, [svg, info]); } })); /***/ }), /***/ "./src/components/VProgressCircular/index.ts": /*!***************************************************!*\ !*** ./src/components/VProgressCircular/index.ts ***! \***************************************************/ /*! exports provided: VProgressCircular, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VProgressCircular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VProgressCircular */ "./src/components/VProgressCircular/VProgressCircular.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VProgressCircular", function() { return _VProgressCircular__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VProgressCircular__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VProgressCircular__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VProgressCircular__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VProgressCircular__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VProgressLinear/VProgressLinear.ts": /*!***********************************************************!*\ !*** ./src/components/VProgressLinear/VProgressLinear.ts ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_progress_linear_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_progress-linear.styl */ "./src/stylus/components/_progress-linear.styl"); /* harmony import */ var _stylus_components_progress_linear_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_progress_linear_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); // Mixins // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_3__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"]).extend({ name: 'v-progress-linear', props: { active: { type: Boolean, default: true }, backgroundColor: { type: String, default: null }, backgroundOpacity: { type: [Number, String], default: null }, bufferValue: { type: [Number, String], default: 100 }, color: { type: String, default: 'primary' }, height: { type: [Number, String], default: 7 }, indeterminate: Boolean, query: Boolean, value: { type: [Number, String], default: 0 } }, computed: { styles: function styles() { var styles = {}; if (!this.active) { styles.height = 0; } if (!this.indeterminate && parseInt(this.bufferValue, 10) !== 100) { styles.width = this.bufferValue + "%"; } return styles; }, effectiveWidth: function effectiveWidth() { if (!this.bufferValue) { return 0; } return +this.value * 100 / +this.bufferValue; }, backgroundStyle: function backgroundStyle() { var backgroundOpacity = this.backgroundOpacity == null ? this.backgroundColor ? 1 : 0.3 : parseFloat(this.backgroundOpacity); return { height: this.active ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.height) : 0, opacity: backgroundOpacity, width: this.bufferValue + "%" }; } }, methods: { genDeterminate: function genDeterminate(h) { return h('div', { ref: 'front', staticClass: "v-progress-linear__bar__determinate", class: this.addBackgroundColorClassChecks(), style: { width: this.effectiveWidth + "%" } }); }, genBar: function genBar(h, name) { var _a; return h('div', { staticClass: 'v-progress-linear__bar__indeterminate', class: this.addBackgroundColorClassChecks((_a = {}, _a[name] = true, _a)) }); }, genIndeterminate: function genIndeterminate(h) { return h('div', { ref: 'front', staticClass: 'v-progress-linear__bar__indeterminate', class: { 'v-progress-linear__bar__indeterminate--active': this.active } }, [this.genBar(h, 'long'), this.genBar(h, 'short')]); } }, render: function render(h) { var fade = h(_transitions__WEBPACK_IMPORTED_MODULE_4__["VFadeTransition"], this.indeterminate ? [this.genIndeterminate(h)] : []); var slide = h(_transitions__WEBPACK_IMPORTED_MODULE_4__["VSlideXTransition"], this.indeterminate ? [] : [this.genDeterminate(h)]); var bar = h('div', { staticClass: 'v-progress-linear__bar', style: this.styles }, [fade, slide]); var background = h('div', { staticClass: 'v-progress-linear__background', class: [this.backgroundColor || this.color], style: this.backgroundStyle }); return h('div', { staticClass: 'v-progress-linear', class: { 'v-progress-linear--query': this.query }, style: { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["convertToUnit"])(this.height) }, on: this.$listeners }, [background, bar]); } })); /***/ }), /***/ "./src/components/VProgressLinear/index.ts": /*!*************************************************!*\ !*** ./src/components/VProgressLinear/index.ts ***! \*************************************************/ /*! exports provided: VProgressLinear, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VProgressLinear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VProgressLinear */ "./src/components/VProgressLinear/VProgressLinear.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VProgressLinear", function() { return _VProgressLinear__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VProgressLinear__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VProgressLinear__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VProgressLinear__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VProgressLinear__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VRadioGroup/VRadio.js": /*!**********************************************!*\ !*** ./src/components/VRadioGroup/VRadio.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_radios_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_radios.styl */ "./src/stylus/components/_radios.styl"); /* harmony import */ var _stylus_components_radios_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_radios_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _VLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VLabel */ "./src/components/VLabel/index.js"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_rippleable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/rippleable */ "./src/mixins/rippleable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Components // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-radio', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_rippleable__WEBPACK_IMPORTED_MODULE_4__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_6__["inject"])('radio', 'v-radio', 'v-radio-group'), _mixins_themeable__WEBPACK_IMPORTED_MODULE_5__["default"]], inheritAttrs: false, props: { color: { type: [Boolean, String], default: 'accent' }, disabled: Boolean, label: String, onIcon: { type: String, default: '$vuetify.icons.radioOn' }, offIcon: { type: String, default: '$vuetify.icons.radioOff' }, readonly: Boolean, value: null }, data: function data() { return { isActive: false, isFocused: false, parentError: false }; }, computed: { classes: function classes() { var classes = { 'v-radio--is-disabled': this.isDisabled, 'v-radio--is-focused': this.isFocused, 'theme--dark': this.dark, 'theme--light': this.light }; if (!this.parentError && this.isActive) { return this.addTextColorClassChecks(classes); } return classes; }, classesSelectable: function classesSelectable() { return this.addTextColorClassChecks({}, this.isActive ? this.color : this.radio.validationState || false); }, computedIcon: function computedIcon() { return this.isActive ? this.onIcon : this.offIcon; }, hasState: function hasState() { return this.isActive || !!this.radio.validationState; }, isDisabled: function isDisabled() { return this.disabled || !!this.radio.disabled; }, isReadonly: function isReadonly() { return this.readonly || !!this.radio.readonly; } }, mounted: function mounted() { this.radio.register(this); }, beforeDestroy: function beforeDestroy() { this.radio.unregister(this); }, methods: { genInput: function genInput(type, attrs) { var _this = this; return this.$createElement('input', { attrs: Object.assign({}, attrs, { 'aria-label': this.label, name: this.radio.name || (this.radio._uid ? 'v-radio-' + this.radio._uid : false), value: this.value, role: type, type: type }), domProps: { checked: this.isActive }, on: { blur: this.onBlur, change: this.onChange, focus: this.onFocus, keydown: function keydown(e) { if ([_util_helpers__WEBPACK_IMPORTED_MODULE_7__["keyCodes"].enter, _util_helpers__WEBPACK_IMPORTED_MODULE_7__["keyCodes"].space].includes(e.keyCode)) { e.preventDefault(); _this.onChange(); } } }, ref: 'input' }); }, genLabel: function genLabel() { return this.$createElement(_VLabel__WEBPACK_IMPORTED_MODULE_2__["default"], { on: { click: this.onChange }, attrs: { for: this.id }, props: { color: this.radio.validationState || false, dark: this.dark, focused: this.hasState, light: this.light } }, this.$slots.label || this.label); }, genRadio: function genRadio() { return this.$createElement('div', { staticClass: 'v-input--selection-controls__input' }, [this.genInput('radio', __assign({ 'aria-checked': this.isActive.toString() }, this.$attrs)), !this.isDisabled && this.genRipple({ 'class': this.classesSelectable }), this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], { 'class': this.classesSelectable, props: { dark: this.dark, light: this.light } }, this.computedIcon)]); }, onFocus: function onFocus() { this.isFocused = true; }, onBlur: function onBlur(e) { this.isFocused = false; this.$emit('blur', e); }, onChange: function onChange() { if (this.isDisabled || this.isReadonly) return; if (!this.isDisabled && (!this.isActive || !this.radio.mandatory)) { this.$emit('change', this.value); } } }, render: function render(h) { return h('div', { staticClass: 'v-radio', class: this.classes }, [this.genRadio(), this.genLabel()]); } }); /***/ }), /***/ "./src/components/VRadioGroup/VRadioGroup.js": /*!***************************************************!*\ !*** ./src/components/VRadioGroup/VRadioGroup.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_selection-controls.styl */ "./src/stylus/components/_selection-controls.styl"); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _stylus_components_radio_group_styl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stylus/components/_radio-group.styl */ "./src/stylus/components/_radio-group.styl"); /* harmony import */ var _stylus_components_radio_group_styl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_radio_group_styl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _VInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VInput */ "./src/components/VInput/index.js"); /* harmony import */ var _mixins_comparable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/comparable */ "./src/mixins/comparable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); // Styles // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-radio-group', extends: _VInput__WEBPACK_IMPORTED_MODULE_2__["default"], mixins: [_mixins_comparable__WEBPACK_IMPORTED_MODULE_3__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_4__["provide"])('radio')], model: { prop: 'value', event: 'change' }, provide: function provide() { return { radio: this }; }, props: { column: { type: Boolean, default: true }, height: { type: [Number, String], default: 'auto' }, mandatory: { type: Boolean, default: true }, name: String, row: Boolean, // If no value set on VRadio // will match valueComparator // force default to null value: { default: null } }, data: function data() { return { internalTabIndex: -1, radios: [] }; }, computed: { classes: function classes() { return { 'v-input--selection-controls v-input--radio-group': true, 'v-input--radio-group--column': this.column && !this.row, 'v-input--radio-group--row': this.row }; } }, watch: { hasError: 'setErrorState', internalValue: 'setActiveRadio' }, mounted: function mounted() { this.setErrorState(this.hasError); this.setActiveRadio(); }, methods: { genDefaultSlot: function genDefaultSlot() { return this.$createElement('div', { staticClass: 'v-input--radio-group__input', attrs: { role: 'radiogroup' } }, _VInput__WEBPACK_IMPORTED_MODULE_2__["default"].methods.genDefaultSlot.call(this)); }, onRadioChange: function onRadioChange(value) { if (this.disabled) return; this.hasInput = true; this.internalValue = value; this.$emit('change', value); this.setActiveRadio(); this.$nextTick(this.validate); }, onRadioBlur: function onRadioBlur(e) { if (!e.relatedTarget || !e.relatedTarget.classList.contains('v-radio')) { this.hasInput = true; this.$emit('blur', e); } }, register: function register(radio) { radio.isActive = this.valueComparator(this.internalValue, radio.value); radio.$on('change', this.onRadioChange); radio.$on('blur', this.onRadioBlur); this.radios.push(radio); }, setErrorState: function setErrorState(val) { for (var index = this.radios.length; --index >= 0;) { this.radios[index].parentError = val; } }, setActiveRadio: function setActiveRadio() { for (var index = this.radios.length; --index >= 0;) { var radio = this.radios[index]; radio.isActive = this.valueComparator(this.internalValue, radio.value); } }, unregister: function unregister(radio) { radio.$off('change', this.onRadioChange); radio.$off('blur', this.onRadioBlur); var index = this.radios.findIndex(function (r) { return r === radio; }); /* istanbul ignore else */ if (index > -1) this.radios.splice(index, 1); } } }); /***/ }), /***/ "./src/components/VRadioGroup/index.js": /*!*********************************************!*\ !*** ./src/components/VRadioGroup/index.js ***! \*********************************************/ /*! exports provided: VRadioGroup, VRadio, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VRadioGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VRadioGroup */ "./src/components/VRadioGroup/VRadioGroup.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VRadioGroup", function() { return _VRadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VRadio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VRadio */ "./src/components/VRadioGroup/VRadio.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VRadio", function() { return _VRadio__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* istanbul ignore next */ _VRadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VRadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VRadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VRadio__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VRadio__WEBPACK_IMPORTED_MODULE_1__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VRadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VRangeSlider/VRangeSlider.js": /*!*****************************************************!*\ !*** ./src/components/VRangeSlider/VRangeSlider.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_range_sliders_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_range-sliders.styl */ "./src/stylus/components/_range-sliders.styl"); /* harmony import */ var _stylus_components_range_sliders_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_range_sliders_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VSlider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VSlider */ "./src/components/VSlider/index.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Styles // Extensions /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-range-slider', extends: _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"], props: { value: { type: Array, default: function _default() { return []; } } }, data: function data(vm) { return { activeThumb: null, lazyValue: !vm.value.length ? [0, 0] : vm.value }; }, computed: { classes: function classes() { return Object.assign({}, { 'v-input--range-slider': true }, _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"].computed.classes.call(this)); }, internalValue: { get: function get() { return this.lazyValue; }, set: function set(val) { var _this = this; var _a = this, min = _a.min, max = _a.max; // Round value to ensure the // entire slider range can // be selected with step var value = val.map(function (v) { return _this.roundValue(Math.min(Math.max(v, min), max)); }); // Switch values if range and wrong order if (value[0] > value[1] || value[1] < value[0]) { if (this.activeThumb !== null) this.activeThumb = this.activeThumb === 1 ? 0 : 1; value = [value[1], value[0]]; } this.lazyValue = value; if (!Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["deepEqual"])(value, this.value)) this.$emit('input', value); this.validate(); } }, inputWidth: function inputWidth() { var _this = this; return this.internalValue.map(function (v) { return (_this.roundValue(v) - _this.min) / (_this.max - _this.min) * 100; }); }, isDirty: function isDirty() { var _this = this; return this.internalValue.some(function (v) { return v !== _this.min; }) || this.alwaysDirty; }, trackFillStyles: function trackFillStyles() { var styles = _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"].computed.trackFillStyles.call(this); var fillPercent = Math.abs(this.inputWidth[0] - this.inputWidth[1]); styles.width = "calc(" + fillPercent + "% - " + this.trackPadding + "px)"; styles[this.$vuetify.rtl ? 'right' : 'left'] = this.inputWidth[0] + "%"; return styles; }, trackPadding: function trackPadding() { if (this.isDirty || this.internalValue[0]) return 0; return _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"].computed.trackPadding.call(this); } }, methods: { getIndexOfClosestValue: function getIndexOfClosestValue(arr, v) { if (Math.abs(arr[0] - v) < Math.abs(arr[1] - v)) return 0;else return 1; }, genInput: function genInput() { var _this = this; return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["createRange"])(2).map(function (i) { var input = _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genInput.call(_this); input.data.attrs.value = _this.internalValue[i]; input.data.on.focus = function (e) { _this.activeThumb = i; _VSlider__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onFocus.call(_this, e); }; return input; }); }, genChildren: function genChildren() { var _this = this; return [this.genInput(), this.genTrackContainer(), this.genSteps(), Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["createRange"])(2).map(function (i) { var value = _this.internalValue[i]; var onDrag = function onDrag(e) { _this.isActive = true; _this.activeThumb = i; _this.onThumbMouseDown(e); }; var valueWidth = _this.inputWidth[i]; var isActive = (_this.isFocused || _this.isActive) && _this.activeThumb === i; return _this.genThumbContainer(value, valueWidth, isActive, onDrag); })]; }, onSliderClick: function onSliderClick(e) { if (!this.isActive) { this.isFocused = true; this.onMouseMove(e, true); this.$emit('change', this.internalValue); } }, onMouseMove: function onMouseMove(e, trackClick) { if (trackClick === void 0) { trackClick = false; } var _a = this.parseMouseMove(e), value = _a.value, isInsideTrack = _a.isInsideTrack; if (isInsideTrack) { if (trackClick) this.activeThumb = this.getIndexOfClosestValue(this.internalValue, value); this.setInternalValue(value); } }, onKeyDown: function onKeyDown(e) { var value = this.parseKeyDown(e, this.internalValue[this.activeThumb]); if (value == null) return; this.setInternalValue(value); }, setInternalValue: function setInternalValue(value) { var _this = this; this.internalValue = this.internalValue.map(function (v, i) { if (i === _this.activeThumb) return value;else return Number(v); }); } } }); /***/ }), /***/ "./src/components/VRangeSlider/index.js": /*!**********************************************!*\ !*** ./src/components/VRangeSlider/index.js ***! \**********************************************/ /*! exports provided: VRangeSlider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VRangeSlider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VRangeSlider */ "./src/components/VRangeSlider/VRangeSlider.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VRangeSlider", function() { return _VRangeSlider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VRangeSlider__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VRangeSlider__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VRangeSlider__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VRangeSlider__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VSelect/VSelect.js": /*!*******************************************!*\ !*** ./src/components/VSelect/VSelect.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_text-fields.styl */ "./src/stylus/components/_text-fields.styl"); /* harmony import */ var _stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _stylus_components_select_styl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stylus/components/_select.styl */ "./src/stylus/components/_select.styl"); /* harmony import */ var _stylus_components_select_styl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_select_styl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _VChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VChip */ "./src/components/VChip/index.ts"); /* harmony import */ var _VMenu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VMenu */ "./src/components/VMenu/index.js"); /* harmony import */ var _VSelectList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VSelectList */ "./src/components/VSelect/VSelectList.js"); /* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.js"); /* harmony import */ var _mixins_comparable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/comparable */ "./src/mixins/comparable.ts"); /* harmony import */ var _mixins_filterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/filterable */ "./src/mixins/filterable.js"); /* harmony import */ var _mixins_menuable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../mixins/menuable */ "./src/mixins/menuable.js"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; var __values = undefined && undefined.__values || function (o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function next() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; }; // Styles // Components // Extensions // Mixins // Directives // Helpers // For api-generator var fakeVMenu = { name: 'v-menu', props: _VMenu__WEBPACK_IMPORTED_MODULE_3__["default"].props // TODO: remove some, just for testing }; var fakeMenuable = { name: 'menuable', props: _mixins_menuable__WEBPACK_IMPORTED_MODULE_8__["default"].props }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-select', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_9__["default"] }, extends: _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__["default"], mixins: [fakeVMenu, fakeMenuable, _mixins_comparable__WEBPACK_IMPORTED_MODULE_6__["default"], _mixins_filterable__WEBPACK_IMPORTED_MODULE_7__["default"]], props: { appendIcon: { type: String, default: '$vuetify.icons.dropdown' }, appendIconCb: Function, attach: { type: null, default: false }, auto: Boolean, browserAutocomplete: { type: String, default: 'on' }, cacheItems: Boolean, chips: Boolean, clearable: Boolean, contentClass: String, deletableChips: Boolean, dense: Boolean, hideSelected: Boolean, items: { type: Array, default: function _default() { return []; } }, itemAvatar: { type: [String, Array, Function], default: 'avatar' }, itemDisabled: { type: [String, Array, Function], default: 'disabled' }, itemText: { type: [String, Array, Function], default: 'text' }, itemValue: { type: [String, Array, Function], default: 'value' }, maxHeight: { type: [Number, String], default: 300 }, minWidth: { type: [Boolean, Number, String], default: 0 }, multiple: Boolean, multiLine: Boolean, openOnClear: Boolean, returnObject: Boolean, searchInput: { default: null }, smallChips: Boolean, singleLine: Boolean }, data: function data(vm) { return { attrsInput: { role: 'combobox' }, cachedItems: vm.cacheItems ? vm.items : [], content: null, isBooted: false, isMenuActive: false, lastItem: 20, // As long as a value is defined, show it // Otherwise, check if multiple // to determine which default to provide lazyValue: vm.value !== undefined ? vm.value : vm.multiple ? [] : undefined, selectedIndex: -1, selectedItems: [] }; }, computed: { /* All items that the select has */ allItems: function allItems() { return this.filterDuplicates(this.cachedItems.concat(this.items)); }, classes: function classes() { return Object.assign({}, _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__["default"].computed.classes.call(this), { 'v-select': true, 'v-select--chips': this.hasChips, 'v-select--chips--small': this.smallChips, 'v-select--is-menu-active': this.isMenuActive }); }, /* Used by other components to overwrite */ computedItems: function computedItems() { return this.allItems; }, counterValue: function counterValue() { return this.multiple ? this.selectedItems.length : (this.getText(this.selectedItems[0]) || '').toString().length; }, directives: function directives() { return this.isFocused ? [{ name: 'click-outside', value: this.blur, args: { closeConditional: this.closeConditional } }] : undefined; }, dynamicHeight: function dynamicHeight() { return 'auto'; }, hasChips: function hasChips() { return this.chips || this.smallChips; }, hasSlot: function hasSlot() { return Boolean(this.hasChips || this.$scopedSlots.selection); }, isDirty: function isDirty() { return this.selectedItems.length > 0; }, menuProps: function menuProps() { return { closeOnClick: false, closeOnContentClick: false, openOnClick: false, value: this.isMenuActive, offsetY: this.offsetY, nudgeBottom: this.nudgeBottom ? this.nudgeBottom : this.offsetY ? 1 : 0 // convert to int }; }, listData: function listData() { return { props: { action: this.multiple && !this.isHidingSelected, color: this.color, dark: this.dark, dense: this.dense, hideSelected: this.hideSelected, items: this.virtualizedItems, light: this.light, noDataText: this.$vuetify.t(this.noDataText), selectedItems: this.selectedItems, itemAvatar: this.itemAvatar, itemDisabled: this.itemDisabled, itemValue: this.itemValue, itemText: this.itemText }, on: { select: this.selectItem }, scopedSlots: { item: this.$scopedSlots.item } }; }, staticList: function staticList() { if (this.$slots['no-data']) { Object(_util_console__WEBPACK_IMPORTED_MODULE_11__["consoleError"])('assert: staticList should not be called if slots are used'); } return this.$createElement(_VSelectList__WEBPACK_IMPORTED_MODULE_4__["default"], this.listData); }, virtualizedItems: function virtualizedItems() { return !this.auto ? this.computedItems.slice(0, this.lastItem) : this.computedItems; } }, watch: { internalValue: function internalValue(val) { this.initialValue = val; this.$emit('change', this.internalValue); this.setSelectedItems(); }, isBooted: function isBooted() { var _this = this; this.$nextTick(function () { if (_this.content && _this.content.addEventListener) { _this.content.addEventListener('scroll', _this.onScroll, false); } }); }, isMenuActive: function isMenuActive(val) { if (!val) return; this.isBooted = true; }, items: { immediate: true, handler: function handler(val) { if (this.cacheItems) { this.cachedItems = this.filterDuplicates(this.cachedItems.concat(val)); } this.setSelectedItems(); } } }, mounted: function mounted() { this.content = this.$refs.menu && this.$refs.menu.$refs.content; }, methods: { /** @public */ blur: function blur() { this.isMenuActive = false; this.isFocused = false; this.$refs.input && this.$refs.input.blur(); this.selectedIndex = -1; }, /** @public */ activateMenu: function activateMenu() { this.isMenuActive = true; }, clearableCallback: function clearableCallback() { var _this = this; this.internalValue = this.multiple ? [] : undefined; this.$nextTick(function () { return _this.$refs.input.focus(); }); if (this.openOnClear) this.isMenuActive = true; }, closeConditional: function closeConditional(e) { return ( // Click originates from outside the menu content !!this.content && !this.content.contains(e.target) && // Click originates from outside the element !!this.$el && !this.$el.contains(e.target) && e.target !== this.$el ); }, filterDuplicates: function filterDuplicates(arr) { var uniqueValues = new Map(); for (var index = 0; index < arr.length; ++index) { var item = arr[index]; var val = this.getValue(item); // TODO: comparator !uniqueValues.has(val) && uniqueValues.set(val, item); } return Array.from(uniqueValues.values()); }, findExistingIndex: function findExistingIndex(item) { var _this = this; var itemValue = this.getValue(item); return (this.internalValue || []).findIndex(function (i) { return _this.valueComparator(_this.getValue(i), itemValue); }); }, genChipSelection: function genChipSelection(item, index) { var _this = this; var isDisabled = this.disabled || this.readonly || this.getDisabled(item); var focus = function focus(e, cb) { if (isDisabled) return; e.stopPropagation(); _this.onFocus(); cb && cb(); }; return this.$createElement(_VChip__WEBPACK_IMPORTED_MODULE_2__["default"], { staticClass: 'v-chip--select-multi', props: { close: this.deletableChips && !isDisabled, dark: this.dark, disabled: isDisabled, selected: index === this.selectedIndex, small: this.smallChips }, on: { click: function click(e) { focus(e, function () { _this.selectedIndex = index; }); }, focus: focus, input: function input() { return _this.onChipInput(item); } }, key: this.getValue(item) }, this.getText(item)); }, genCommaSelection: function genCommaSelection(item, index, last) { // Item may be an object // TODO: Remove JSON.stringify var key = JSON.stringify(this.getValue(item)); var isDisabled = this.disabled || this.readonly || this.getDisabled(item); var classes = index === this.selectedIndex ? this.addTextColorClassChecks() : {}; classes['v-select__selection--disabled'] = isDisabled; return this.$createElement('div', { staticClass: 'v-select__selection v-select__selection--comma', 'class': classes, key: key }, "" + this.getText(item) + (last ? '' : ', ')); }, genDefaultSlot: function genDefaultSlot() { var selections = this.genSelections(); var input = this.genInput(); // If the return is an empty array // push the input if (Array.isArray(selections)) { selections.push(input); // Otherwise push it into children } else { selections.children = selections.children || []; selections.children.push(input); } var activator = this.genSelectSlot([this.genLabel(), this.prefix ? this.genAffix('prefix') : null, selections, this.suffix ? this.genAffix('suffix') : null, this.genClearIcon(), this.genIconSlot()]); return [this.genMenu(activator)]; }, genInput: function genInput() { var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__["default"].methods.genInput.call(this); input.data.domProps.value = null; input.data.attrs.readonly = true; input.data.attrs['aria-readonly'] = String(this.readonly); return input; }, genList: function genList() { // If there's no slots, we can use a cached VNode to improve performance if (this.$slots['no-data']) { return this.genListWithSlot(); } else { return this.staticList; } }, genListWithSlot: function genListWithSlot() { // Requires destructuring due to Vue // modifying the `on` property when passed // as a referenced object return this.$createElement(_VSelectList__WEBPACK_IMPORTED_MODULE_4__["default"], __assign({}, this.listData), [this.$createElement('template', { slot: 'no-data' }, this.$slots['no-data'])]); }, genMenu: function genMenu(activator) { var _this = this; var e_1, _a; var props = { contentClass: this.contentClass }; var inheritedProps = Object.keys(_VMenu__WEBPACK_IMPORTED_MODULE_3__["default"].props).concat(Object.keys(_mixins_menuable__WEBPACK_IMPORTED_MODULE_8__["default"].props)); try { // Later this might be filtered for (var inheritedProps_1 = __values(inheritedProps), inheritedProps_1_1 = inheritedProps_1.next(); !inheritedProps_1_1.done; inheritedProps_1_1 = inheritedProps_1.next()) { var prop = inheritedProps_1_1.value; props[prop] = this[prop]; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (inheritedProps_1_1 && !inheritedProps_1_1.done && (_a = inheritedProps_1.return)) _a.call(inheritedProps_1); } finally { if (e_1) throw e_1.error; } } props.activator = this.$refs['input-slot']; Object.assign(props, this.menuProps); // Attach to root el so that // menu covers prepend/append icons if ( // TODO: make this a computed property or helper or something this.attach === '' || // If used as a boolean prop (<v-menu attach>) this.attach === true || // If bound to a boolean (<v-menu :attach="true">) this.attach === 'attach' // If bound as boolean prop in pug (v-menu(attach)) ) { props.attach = this.$el; } else { props.attach = this.attach; } return this.$createElement(_VMenu__WEBPACK_IMPORTED_MODULE_3__["default"], { props: props, on: { input: function input(val) { _this.isMenuActive = val; _this.isFocused = val; } }, ref: 'menu' }, [activator, this.genList()]); }, genSelections: function genSelections() { var length = this.selectedItems.length; var children = new Array(length); var genSelection; if (this.$scopedSlots.selection) { genSelection = this.genSlotSelection; } else if (this.hasChips) { genSelection = this.genChipSelection; } else { genSelection = this.genCommaSelection; } while (length--) { children[length] = genSelection(this.selectedItems[length], length, length === children.length - 1); } return this.$createElement('div', { staticClass: 'v-select__selections' }, children); }, genSelectSlot: function genSelectSlot(children) { return this.$createElement('div', { staticClass: 'v-select__slot', directives: this.directives, slot: 'activator' }, children); }, genSlotSelection: function genSlotSelection(item, index) { return this.$scopedSlots.selection({ parent: this, item: item, index: index, selected: index === this.selectedIndex, disabled: this.disabled || this.readonly }); }, getMenuIndex: function getMenuIndex() { return this.$refs.menu ? this.$refs.menu.listIndex : -1; }, getDisabled: function getDisabled(item) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["getPropertyFromItem"])(item, this.itemDisabled, false); }, getText: function getText(item) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["getPropertyFromItem"])(item, this.itemText, item); }, getValue: function getValue(item) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_10__["getPropertyFromItem"])(item, this.itemValue, this.getText(item)); }, onBlur: function onBlur(e) { this.$emit('blur', e); }, onChipInput: function onChipInput(item) { if (this.multiple) this.selectItem(item);else this.internalValue = null; // If all items have been deleted, // open `v-menu` if (this.selectedItems.length === 0) { this.isMenuActive = true; } this.selectedIndex = -1; }, onClick: function onClick() { if (this.isDisabled) return; this.isMenuActive = true; if (!this.isFocused) { this.isFocused = true; this.$emit('focus'); } }, onEnterDown: function onEnterDown() { this.onBlur(); }, onEscDown: function onEscDown(e) { e.preventDefault(); this.isMenuActive = false; }, // Detect tab and call original onBlur method onKeyDown: function onKeyDown(e) { var keyCode = e.keyCode; // If enter, space, up, or down is pressed, open menu if (!this.isMenuActive && [_util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].enter, _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].space, _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].up, _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].down].includes(keyCode)) this.activateMenu(); // This should do something different if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].enter) return this.onEnterDown(); // If escape deactivate the menu if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].esc) return this.onEscDown(e); // If tab - select item or close menu if (keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_10__["keyCodes"].tab) return this.onTabDown(e); }, onMouseUp: function onMouseUp(e) { var _this = this; var appendInner = this.$refs['append-inner']; // If append inner is present // and the target is itself // or inside, toggle menu if (this.isMenuActive && appendInner && (appendInner === e.target || appendInner.contains(e.target))) { this.$nextTick(function () { return _this.isMenuActive = !_this.isMenuActive; }); // If user is clicking in the container // and field is enclosed, activate it } else if (this.isEnclosed) { this.isMenuActive = true; } _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__["default"].methods.onMouseUp.call(this, e); }, onScroll: function onScroll() { var _this = this; if (!this.isMenuActive) { requestAnimationFrame(function () { return _this.content.scrollTop = 0; }); } else { if (this.lastItem >= this.computedItems.length) return; var showMoreItems = this.content.scrollHeight - (this.content.scrollTop + this.content.clientHeight) < 200; if (showMoreItems) { this.lastItem += 20; } } }, onTabDown: function onTabDown(e) { var menuIndex = this.getMenuIndex(); var listTile = this.$refs.menu.tiles[menuIndex]; // An item that is selected by // menu-index should toggled if (listTile && listTile.className.indexOf('v-list__tile--highlighted') > -1 && this.isMenuActive && menuIndex > -1) { e.preventDefault(); e.stopPropagation(); listTile.click(); } else { // If we make it here, // the user has no selected indexes // and is probably tabbing out _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_5__["default"].methods.onBlur.call(this, e); } }, selectItem: function selectItem(item) { var _this = this; if (!this.multiple) { this.internalValue = this.returnObject ? item : this.getValue(item); this.isMenuActive = false; } else { var internalValue = (this.internalValue || []).slice(); var i = this.findExistingIndex(item); i !== -1 ? internalValue.splice(i, 1) : internalValue.push(item); this.internalValue = internalValue.map(function (i) { return _this.returnObject ? i : _this.getValue(i); }); // When selecting multiple // adjust menu after each // selection this.$nextTick(function () { _this.$refs.menu && _this.$refs.menu.updateDimensions(); }); } }, setMenuIndex: function setMenuIndex(index) { this.$refs.menu && (this.$refs.menu.listIndex = index); }, setSelectedItems: function setSelectedItems() { var _this = this; var e_2, _a; var selectedItems = []; var values = !this.multiple || !Array.isArray(this.internalValue) ? [this.internalValue] : this.internalValue; var _loop_1 = function _loop_1(value) { var index = this_1.allItems.findIndex(function (v) { return _this.valueComparator(_this.getValue(v), _this.getValue(value)); }); if (index > -1) { selectedItems.push(this_1.allItems[index]); } }; var this_1 = this; try { for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) { var value = values_1_1.value; _loop_1(value); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1); } finally { if (e_2) throw e_2.error; } } this.selectedItems = selectedItems; } } }); /***/ }), /***/ "./src/components/VSelect/VSelectList.js": /*!***********************************************!*\ !*** ./src/components/VSelect/VSelectList.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_cards.styl */ "./src/stylus/components/_cards.styl"); /* harmony import */ var _stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_cards_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VCheckbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VCheckbox */ "./src/components/VCheckbox/index.js"); /* harmony import */ var _VDivider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VDivider */ "./src/components/VDivider/index.ts"); /* harmony import */ var _VSubheader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VSubheader */ "./src/components/VSubheader/index.js"); /* harmony import */ var _VList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../VList */ "./src/components/VList/index.js"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); var __values = undefined && undefined.__values || function (o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function next() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; }; // Components // Mixins // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-select-list', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_6__["default"]], props: { action: Boolean, dense: Boolean, hideSelected: Boolean, items: { type: Array, default: function _default() { return []; } }, itemAvatar: { type: [String, Array, Function], default: 'avatar' }, itemDisabled: { type: [String, Array, Function], default: 'disabled' }, itemText: { type: [String, Array, Function], default: 'text' }, itemValue: { type: [String, Array, Function], default: 'value' }, noDataText: String, noFilter: Boolean, searchInput: { default: null }, selectedItems: { type: Array, default: function _default() { return []; } } }, computed: { parsedItems: function parsedItems() { var _this = this; return this.selectedItems.map(function (item) { return _this.getValue(item); }); }, tileActiveClass: function tileActiveClass() { return Object.keys(this.addTextColorClassChecks()).join(' '); }, staticNoDataTile: function staticNoDataTile() { var tile = { on: { mousedown: function mousedown(e) { return e.preventDefault(); } // Prevent onBlur from being called } }; return this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTile"], tile, [this.genTileContent(this.noDataText)]); } }, methods: { genAction: function genAction(item, inputValue) { var _this = this; var data = { on: { click: function click(e) { e.stopPropagation(); _this.$emit('select', item); } } }; return this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTileAction"], data, [this.$createElement(_VCheckbox__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { color: this.computedColor, inputValue: inputValue } })]); }, genDivider: function genDivider(props) { return this.$createElement(_VDivider__WEBPACK_IMPORTED_MODULE_2__["default"], { props: props }); }, genFilteredText: function genFilteredText(text) { text = (text || '').toString(); if (!this.searchInput || this.noFilter) return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["escapeHTML"])(text); var _a = this.getMaskedCharacters(text), start = _a.start, middle = _a.middle, end = _a.end; return "" + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["escapeHTML"])(start) + this.genHighlight(middle) + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["escapeHTML"])(end); }, genHeader: function genHeader(props) { return this.$createElement(_VSubheader__WEBPACK_IMPORTED_MODULE_3__["default"], { props: props }, props.header); }, genHighlight: function genHighlight(text) { return "<span class=\"v-list__tile__mask\">" + Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["escapeHTML"])(text) + "</span>"; }, getMaskedCharacters: function getMaskedCharacters(text) { var searchInput = (this.searchInput || '').toString().toLowerCase(); var index = text.toLowerCase().indexOf(searchInput); if (index < 0) return { start: '', middle: text, end: '' }; var start = text.slice(0, index); var middle = text.slice(index, index + searchInput.length); var end = text.slice(index + searchInput.length); return { start: start, middle: middle, end: end }; }, genTile: function genTile(item, disabled, avatar, value) { var _this = this; if (disabled === void 0) { disabled = null; } if (avatar === void 0) { avatar = false; } if (value === void 0) { value = this.hasItem(item); } if (item === Object(item)) { avatar = this.getAvatar(item); disabled = disabled !== null ? disabled : this.getDisabled(item); } var tile = { on: { mousedown: function mousedown(e) { // Prevent onBlur from being called e.preventDefault(); }, click: function click() { return disabled || _this.$emit('select', item); } }, props: { activeClass: this.tileActiveClass, avatar: avatar, disabled: disabled, ripple: true, value: value } }; if (!this.$scopedSlots.item) { return this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTile"], tile, [this.action && !this.hideSelected && this.items.length > 0 ? this.genAction(item, value) : null, this.genTileContent(item)]); } var parent = this; var scopedSlot = this.$scopedSlots.item({ parent: parent, item: item, tile: tile }); return this.needsTile(scopedSlot) ? this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTile"], tile, [scopedSlot]) : scopedSlot; }, genTileContent: function genTileContent(item) { var innerHTML = this.genFilteredText(this.getText(item)); return this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTileContent"], [this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VListTileTitle"], { domProps: { innerHTML: innerHTML } })]); }, hasItem: function hasItem(item) { return this.parsedItems.indexOf(this.getValue(item)) > -1; }, needsTile: function needsTile(tile) { return tile.componentOptions == null || tile.componentOptions.Ctor.options.name !== 'v-list-tile'; }, getAvatar: function getAvatar(item) { return Boolean(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["getPropertyFromItem"])(item, this.itemAvatar, false)); }, getDisabled: function getDisabled(item) { return Boolean(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["getPropertyFromItem"])(item, this.itemDisabled, false)); }, getText: function getText(item) { return String(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["getPropertyFromItem"])(item, this.itemText, item)); }, getValue: function getValue(item) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["getPropertyFromItem"])(item, this.itemValue, this.getText(item)); } }, render: function render() { var e_1, _a; var children = []; try { for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) { var item = _c.value; if (this.hideSelected && this.hasItem(item)) continue; if (item == null) children.push(this.genTile(item));else if (item.header) children.push(this.genHeader(item));else if (item.divider) children.push(this.genDivider(item));else children.push(this.genTile(item)); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } children.length || children.push(this.$slots['no-data'] || this.staticNoDataTile); return this.$createElement('div', { staticClass: 'v-select-list v-card', 'class': this.themeClasses }, [this.$createElement(_VList__WEBPACK_IMPORTED_MODULE_4__["VList"], { props: { dense: this.dense } }, children)]); } }); /***/ }), /***/ "./src/components/VSelect/index.js": /*!*****************************************!*\ !*** ./src/components/VSelect/index.js ***! \*****************************************/ /*! exports provided: VSelect, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSelect", function() { return wrapper; }); /* harmony import */ var _VSelect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSelect */ "./src/components/VSelect/VSelect.js"); /* harmony import */ var _VOverflowBtn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VOverflowBtn */ "./src/components/VOverflowBtn/index.js"); /* harmony import */ var _VAutocomplete__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VAutocomplete */ "./src/components/VAutocomplete/index.js"); /* harmony import */ var _VCombobox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VCombobox */ "./src/components/VCombobox/index.js"); /* harmony import */ var _util_rebuildFunctionalSlots__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/rebuildFunctionalSlots */ "./src/util/rebuildFunctionalSlots.js"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); /* @vue/component */ var wrapper = { functional: true, $_wrapperFor: _VSelect__WEBPACK_IMPORTED_MODULE_0__["default"], props: { // VAutoComplete /** @deprecated */ autocomplete: Boolean, /** @deprecated */ combobox: Boolean, multiple: Boolean, /** @deprecated */ tags: Boolean, // VOverflowBtn /** @deprecated */ editable: Boolean, /** @deprecated */ overflow: Boolean, /** @deprecated */ segmented: Boolean }, render: function render(h, _a) { var props = _a.props, data = _a.data, slots = _a.slots, parent = _a.parent; delete data.model; var children = Object(_util_rebuildFunctionalSlots__WEBPACK_IMPORTED_MODULE_4__["default"])(slots(), h); if (props.autocomplete) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select autocomplete>', '<v-autocomplete>', wrapper, parent); } if (props.combobox) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select combobox>', '<v-combobox>', wrapper, parent); } if (props.tags) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select tags>', '<v-combobox multiple>', wrapper, parent); } if (props.overflow) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select overflow>', '<v-overflow-btn>', wrapper, parent); } if (props.segmented) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select segmented>', '<v-overflow-btn segmented>', wrapper, parent); } if (props.editable) { Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["deprecate"])('<v-select editable>', '<v-overflow-btn editable>', wrapper, parent); } if (props.combobox || props.tags) { data.attrs.multiple = props.tags; return h(_VCombobox__WEBPACK_IMPORTED_MODULE_3__["default"], data, children); } else if (props.autocomplete) { data.attrs.multiple = props.multiple; return h(_VAutocomplete__WEBPACK_IMPORTED_MODULE_2__["default"], data, children); } else if (props.overflow || props.segmented || props.editable) { data.attrs.segmented = props.segmented; data.attrs.editable = props.editable; return h(_VOverflowBtn__WEBPACK_IMPORTED_MODULE_1__["default"], data, children); } else { data.attrs.multiple = props.multiple; return h(_VSelect__WEBPACK_IMPORTED_MODULE_0__["default"], data, children); } } }; /* istanbul ignore next */ wrapper.install = function install(Vue) { Vue.component(_VSelect__WEBPACK_IMPORTED_MODULE_0__["default"].name, wrapper); }; /* harmony default export */ __webpack_exports__["default"] = (wrapper); /***/ }), /***/ "./src/components/VSlider/VSlider.js": /*!*******************************************!*\ !*** ./src/components/VSlider/VSlider.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_sliders_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_sliders.styl */ "./src/stylus/components/_sliders.styl"); /* harmony import */ var _stylus_components_sliders_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_sliders_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); /* harmony import */ var _VInput__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VInput */ "./src/components/VInput/index.js"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Components // Extensions // Directives // Utilities /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-slider', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_3__["default"] }, extends: _VInput__WEBPACK_IMPORTED_MODULE_2__["default"], props: { alwaysDirty: Boolean, inverseLabel: Boolean, label: String, min: { type: [Number, String], default: 0 }, max: { type: [Number, String], default: 100 }, range: Boolean, step: { type: [Number, String], default: 1 }, ticks: { type: [Boolean, String], default: false, validator: function validator(v) { return typeof v === 'boolean' || v === 'always'; } }, tickLabels: { type: Array, default: function _default() { return []; } }, tickSize: { type: [Number, String], default: 1 }, thumbColor: { type: String, default: null }, thumbLabel: { type: [Boolean, String], default: null, validator: function validator(v) { return typeof v === 'boolean' || v === 'always'; } }, thumbSize: { type: [Number, String], default: 32 }, trackColor: { type: String, default: null }, value: [Number, String] }, data: function data(vm) { return { app: {}, defaultColor: 'primary', isActive: false, keyPressed: 0, lazyValue: typeof vm.value !== 'undefined' ? vm.value : Number(vm.min), oldValue: null }; }, computed: { classes: function classes() { return { 'v-input--slider': true, 'v-input--slider--ticks': this.showTicks, 'v-input--slider--inverse-label': this.inverseLabel, 'v-input--slider--ticks-labels': this.tickLabels.length > 0, 'v-input--slider--thumb-label': this.thumbLabel || this.$scopedSlots.thumbLabel }; }, showTicks: function showTicks() { return this.tickLabels.length > 0 || !this.disabled && this.stepNumeric && !!this.ticks; }, showThumbLabel: function showThumbLabel() { return !this.disabled && (!!this.thumbLabel || this.thumbLabel === '' || this.$scopedSlots['thumb-label']); }, computedColor: function computedColor() { if (this.disabled) return null; return this.validationState || this.color || this.defaultColor; }, computedTrackColor: function computedTrackColor() { return this.disabled ? null : this.trackColor || null; }, computedThumbColor: function computedThumbColor() { if (this.disabled || !this.isDirty) return null; return this.validationState || this.thumbColor || this.color || this.defaultColor; }, internalValue: { get: function get() { return this.lazyValue; }, set: function set(val) { var _a = this, min = _a.min, max = _a.max; // Round value to ensure the // entire slider range can // be selected with step var value = this.roundValue(Math.min(Math.max(val, min), max)); if (value === this.lazyValue) return; this.lazyValue = value; this.$emit('input', value); this.validate(); } }, stepNumeric: function stepNumeric() { return this.step > 0 ? parseFloat(this.step) : 0; }, trackFillStyles: function trackFillStyles() { var left = this.$vuetify.rtl ? 'auto' : 0; var right = this.$vuetify.rtl ? 0 : 'auto'; var width = this.inputWidth + "%"; if (this.disabled) width = "calc(" + this.inputWidth + "% - 8px)"; return { transition: this.trackTransition, left: left, right: right, width: width }; }, trackPadding: function trackPadding() { return this.isActive || this.inputWidth > 0 || this.disabled ? 0 : 7; }, trackStyles: function trackStyles() { var trackPadding = this.disabled ? "calc(" + this.inputWidth + "% + 8px)" : this.trackPadding + "px"; var left = this.$vuetify.rtl ? 'auto' : trackPadding; var right = this.$vuetify.rtl ? trackPadding : 'auto'; var width = this.disabled ? "calc(" + (100 - this.inputWidth) + "% - 8px)" : '100%'; return { transition: this.trackTransition, left: left, right: right, width: width }; }, tickStyles: function tickStyles() { var size = Number(this.tickSize); return { 'border-width': size + "px", 'border-radius': size > 1 ? '50%' : null, transform: size > 1 ? "translateX(-" + size + "px) translateY(-" + (size - 1) + "px)" : null }; }, trackTransition: function trackTransition() { return this.keyPressed >= 2 ? 'none' : ''; }, numTicks: function numTicks() { return Math.ceil((this.max - this.min) / this.stepNumeric); }, inputWidth: function inputWidth() { return (this.roundValue(this.internalValue) - this.min) / (this.max - this.min) * 100; }, isDirty: function isDirty() { return this.internalValue > this.min || this.alwaysDirty; } }, watch: { min: function min(val) { val > this.internalValue && this.$emit('input', parseFloat(val)); }, max: function max(val) { val < this.internalValue && this.$emit('input', parseFloat(val)); }, value: function value(val) { this.internalValue = val; } }, mounted: function mounted() { // Without a v-app, iOS does not work with body selectors this.app = document.querySelector('[data-app]') || Object(_util_console__WEBPACK_IMPORTED_MODULE_5__["consoleWarn"])('Missing v-app or a non-body wrapping element with the [data-app] attribute', this); }, methods: { genDefaultSlot: function genDefaultSlot() { var children = [this.genLabel()]; var slider = this.genSlider(); this.inverseLabel ? children.unshift(slider) : children.push(slider); return children; }, genListeners: function genListeners() { return { blur: this.onBlur, click: this.onSliderClick, focus: this.onFocus, keydown: this.onKeyDown, keyup: this.onKeyUp }; }, genInput: function genInput() { return this.$createElement('input', { attrs: { 'aria-label': this.label, name: this.name, role: 'slider', tabindex: this.disabled ? -1 : this.$attrs.tabindex, value: this.internalValue, readonly: true, 'aria-readonly': String(this.readonly) }, on: this.genListeners(), ref: 'input' }); }, genSlider: function genSlider() { return this.$createElement('div', { staticClass: 'v-slider', 'class': { 'v-slider--is-active': this.isActive }, directives: [{ name: 'click-outside', value: this.onBlur }] }, this.genChildren()); }, genChildren: function genChildren() { return [this.genInput(), this.genTrackContainer(), this.genSteps(), this.genThumbContainer(this.internalValue, this.inputWidth, this.isFocused || this.isActive, this.onThumbMouseDown)]; }, genSteps: function genSteps() { var _this = this; if (!this.step || !this.showTicks) return null; var ticks = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["createRange"])(this.numTicks + 1).map(function (i) { var children = []; if (_this.tickLabels[i]) { children.push(_this.$createElement('span', _this.tickLabels[i])); } return _this.$createElement('span', { key: i, staticClass: 'v-slider__ticks', class: { 'v-slider__ticks--always-show': _this.ticks === 'always' || _this.tickLabels.length > 0 }, style: __assign({}, _this.tickStyles, { left: i * (100 / _this.numTicks) + "%" }) }, children); }); return this.$createElement('div', { staticClass: 'v-slider__ticks-container' }, ticks); }, genThumb: function genThumb() { return this.$createElement('div', { staticClass: 'v-slider__thumb', 'class': this.addBackgroundColorClassChecks({}, this.computedThumbColor) }); }, genThumbContainer: function genThumbContainer(value, valueWidth, isActive, onDrag) { var children = [this.genThumb()]; var thumbLabelContent = this.getLabel(value); this.showThumbLabel && children.push(this.genThumbLabel(thumbLabelContent)); return this.$createElement('div', { staticClass: 'v-slider__thumb-container', 'class': this.addTextColorClassChecks({ 'v-slider__thumb-container--is-active': isActive, 'v-slider__thumb-container--show-label': this.showThumbLabel }, this.computedThumbColor), style: { transition: this.trackTransition, left: (this.$vuetify.rtl ? 100 - valueWidth : valueWidth) + "%" }, on: { touchstart: onDrag, mousedown: onDrag } }, children); }, genThumbLabel: function genThumbLabel(content) { var size = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["convertToUnit"])(this.thumbSize); return this.$createElement(_transitions__WEBPACK_IMPORTED_MODULE_1__["VScaleTransition"], { props: { origin: 'bottom center' } }, [this.$createElement('div', { staticClass: 'v-slider__thumb-label__container', directives: [{ name: 'show', value: this.isFocused || this.isActive || this.thumbLabel === 'always' }] }, [this.$createElement('div', { staticClass: 'v-slider__thumb-label', 'class': this.addBackgroundColorClassChecks({}, this.computedThumbColor), style: { height: size, width: size } }, [content])])]); }, genTrackContainer: function genTrackContainer() { var children = [this.$createElement('div', { staticClass: 'v-slider__track', 'class': this.addBackgroundColorClassChecks({}, this.computedTrackColor), style: this.trackStyles }), this.$createElement('div', { staticClass: 'v-slider__track-fill', 'class': this.addBackgroundColorClassChecks(), style: this.trackFillStyles })]; return this.$createElement('div', { staticClass: 'v-slider__track__container', ref: 'track' }, children); }, getLabel: function getLabel(value) { return this.$scopedSlots['thumb-label'] ? this.$scopedSlots['thumb-label']({ value: value }) : this.$createElement('span', value); }, onBlur: function onBlur(e) { if (this.keyPressed === 2) return; this.isActive = false; this.isFocused = false; this.$emit('blur', e); }, onFocus: function onFocus(e) { this.isFocused = true; this.$emit('focus', e); }, onThumbMouseDown: function onThumbMouseDown(e) { this.oldValue = this.internalValue; this.keyPressed = 2; var options = { passive: true }; this.isActive = true; this.isFocused = false; if ('touches' in e) { this.app.addEventListener('touchmove', this.onMouseMove, options); Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["addOnceEventListener"])(this.app, 'touchend', this.onMouseUp); } else { this.app.addEventListener('mousemove', this.onMouseMove, options); Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["addOnceEventListener"])(this.app, 'mouseup', this.onMouseUp); } this.$emit('start', this.internalValue); }, onMouseUp: function onMouseUp() { this.keyPressed = 0; var options = { passive: true }; this.isActive = false; this.isFocused = false; this.app.removeEventListener('touchmove', this.onMouseMove, options); this.app.removeEventListener('mousemove', this.onMouseMove, options); this.$emit('end', this.internalValue); if (!Object(_util_helpers__WEBPACK_IMPORTED_MODULE_4__["deepEqual"])(this.oldValue, this.internalValue)) { this.$emit('change', this.internalValue); } }, onMouseMove: function onMouseMove(e) { var _a = this.parseMouseMove(e), value = _a.value, isInsideTrack = _a.isInsideTrack; if (isInsideTrack) { this.setInternalValue(value); } }, onKeyDown: function onKeyDown(e) { if (this.disabled || this.readonly) return; var value = this.parseKeyDown(e); if (value == null) return; this.setInternalValue(value); this.$emit('change', value); }, onKeyUp: function onKeyUp() { this.keyPressed = 0; }, onSliderClick: function onSliderClick(e) { this.isFocused = true; this.onMouseMove(e); this.$emit('change', this.internalValue); }, parseMouseMove: function parseMouseMove(e) { var _a = this.$refs.track.getBoundingClientRect(), offsetLeft = _a.left, trackWidth = _a.width; var clientX = 'touches' in e ? e.touches[0].clientX : e.clientX; // It is possible for left to be NaN, force to number var left = Math.min(Math.max((clientX - offsetLeft) / trackWidth, 0), 1) || 0; if (this.$vuetify.rtl) left = 1 - left; var isInsideTrack = clientX >= offsetLeft - 8 && clientX <= offsetLeft + trackWidth + 8; var value = parseFloat(this.min) + left * (this.max - this.min); return { value: value, isInsideTrack: isInsideTrack }; }, parseKeyDown: function parseKeyDown(e, value) { if (value === void 0) { value = this.internalValue; } if (this.disabled) return; var pageup = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].pageup, pagedown = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].pagedown, end = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].end, home = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].home, left = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].left, right = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].right, down = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].down, up = _util_helpers__WEBPACK_IMPORTED_MODULE_4__["keyCodes"].up; if (![pageup, pagedown, end, home, left, right, down, up].includes(e.keyCode)) return; e.preventDefault(); var step = this.stepNumeric || 1; var steps = (this.max - this.min) / step; if ([left, right, down, up].includes(e.keyCode)) { this.keyPressed += 1; var increase = this.$vuetify.rtl ? [left, up] : [right, up]; var direction = increase.includes(e.keyCode) ? 1 : -1; var multiplier = e.shiftKey ? 3 : e.ctrlKey ? 2 : 1; value = value + direction * step * multiplier; } else if (e.keyCode === home) { value = parseFloat(this.min); } else if (e.keyCode === end) { value = parseFloat(this.max); } else /* if (e.keyCode === keyCodes.pageup || e.keyCode === pagedown) */{ // Page up/down var direction = e.keyCode === pagedown ? 1 : -1; value = value - direction * step * (steps > 100 ? steps / 10 : 10); } return value; }, roundValue: function roundValue(value) { if (!this.stepNumeric) return value; // Format input value using the same number // of decimals places as in the step prop var trimmedStep = this.step.toString().trim(); var decimals = trimmedStep.indexOf('.') > -1 ? trimmedStep.length - trimmedStep.indexOf('.') - 1 : 0; var offset = this.min % this.stepNumeric; var newValue = Math.round((value - offset) / this.stepNumeric) * this.stepNumeric + offset; return parseFloat(Math.min(newValue, this.max).toFixed(decimals)); }, setInternalValue: function setInternalValue(value) { this.internalValue = value; } } }); /***/ }), /***/ "./src/components/VSlider/index.js": /*!*****************************************!*\ !*** ./src/components/VSlider/index.js ***! \*****************************************/ /*! exports provided: VSlider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSlider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSlider */ "./src/components/VSlider/VSlider.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSlider", function() { return _VSlider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSlider__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSlider__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VSlider__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSlider__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VSnackbar/VSnackbar.ts": /*!***********************************************!*\ !*** ./src/components/VSnackbar/VSnackbar.ts ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_snackbars_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_snackbars.styl */ "./src/stylus/components/_snackbars.styl"); /* harmony import */ var _stylus_components_snackbars_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_snackbars_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/mixins */ "./src/util/mixins.ts"); /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_4__["default"])(_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_mixins_positionable__WEBPACK_IMPORTED_MODULE_3__["factory"])(['absolute', 'top', 'bottom', 'left', 'right']) /* @vue/component */ ).extend({ name: 'v-snackbar', props: { autoHeight: Boolean, multiLine: Boolean, // TODO: change this to closeDelay to match other API in delayable.js timeout: { type: Number, default: 6000 }, vertical: Boolean }, data: function data() { return { activeTimeout: -1 }; }, computed: { classes: function classes() { return { 'v-snack--active': this.isActive, 'v-snack--absolute': this.absolute, 'v-snack--auto-height': this.autoHeight, 'v-snack--bottom': this.bottom || !this.top, 'v-snack--left': this.left, 'v-snack--multi-line': this.multiLine && !this.vertical, 'v-snack--right': this.right, 'v-snack--top': this.top, 'v-snack--vertical': this.vertical }; } }, watch: { isActive: function isActive() { this.setTimeout(); } }, mounted: function mounted() { this.setTimeout(); }, methods: { setTimeout: function setTimeout() { var _this = this; window.clearTimeout(this.activeTimeout); if (this.isActive && this.timeout) { this.activeTimeout = window.setTimeout(function () { _this.isActive = false; }, this.timeout); } } }, render: function render(h) { var children = []; if (this.isActive) { children.push(h('div', { staticClass: 'v-snack', class: this.classes, on: this.$listeners }, [h('div', { staticClass: 'v-snack__wrapper', class: this.addBackgroundColorClassChecks() }, [h('div', { staticClass: 'v-snack__content' }, this.$slots.default)])])); } return h('transition', { attrs: { name: 'v-snack-transition' } }, children); } })); /***/ }), /***/ "./src/components/VSnackbar/index.ts": /*!*******************************************!*\ !*** ./src/components/VSnackbar/index.ts ***! \*******************************************/ /*! exports provided: VSnackbar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSnackbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSnackbar */ "./src/components/VSnackbar/VSnackbar.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSnackbar", function() { return _VSnackbar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSnackbar__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSnackbar__WEBPACK_IMPORTED_MODULE_0__["default"].options.name, _VSnackbar__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSnackbar__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VSpeedDial/VSpeedDial.js": /*!*************************************************!*\ !*** ./src/components/VSpeedDial/VSpeedDial.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_speed_dial_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_speed-dial.styl */ "./src/stylus/components/_speed-dial.styl"); /* harmony import */ var _stylus_components_speed_dial_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_speed_dial_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _mixins_positionable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _mixins_transitionable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/transitionable */ "./src/mixins/transitionable.ts"); /* harmony import */ var _directives_click_outside__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../directives/click-outside */ "./src/directives/click-outside.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-speed-dial', directives: { ClickOutside: _directives_click_outside__WEBPACK_IMPORTED_MODULE_4__["default"] }, mixins: [_mixins_positionable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_transitionable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { direction: { type: String, default: 'top', validator: function validator(val) { return ['top', 'right', 'bottom', 'left'].includes(val); } }, openOnHover: Boolean, transition: { type: String, default: 'scale-transition' } }, computed: { classes: function classes() { var _a; return _a = { 'v-speed-dial': true, 'v-speed-dial--top': this.top, 'v-speed-dial--right': this.right, 'v-speed-dial--bottom': this.bottom, 'v-speed-dial--left': this.left, 'v-speed-dial--absolute': this.absolute, 'v-speed-dial--fixed': this.fixed }, _a["v-speed-dial--direction-" + this.direction] = true, _a; } }, render: function render(h) { var _this = this; var children = []; var data = { 'class': this.classes, directives: [{ name: 'click-outside', value: function value() { return _this.isActive = false; } }], on: { click: function click() { return _this.isActive = !_this.isActive; } } }; if (this.openOnHover) { data.on.mouseenter = function () { return _this.isActive = true; }; data.on.mouseleave = function () { return _this.isActive = false; }; } if (this.isActive) { children = (this.$slots.default || []).map(function (b, i) { b.key = i; return b; }); } var list = h('transition-group', { 'class': 'v-speed-dial__list', props: { name: this.transition, mode: this.mode, origin: this.origin, tag: 'div' } }, children); return h('div', data, [this.$slots.activator, list]); } }); /***/ }), /***/ "./src/components/VSpeedDial/index.js": /*!********************************************!*\ !*** ./src/components/VSpeedDial/index.js ***! \********************************************/ /*! exports provided: VSpeedDial, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSpeedDial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSpeedDial */ "./src/components/VSpeedDial/VSpeedDial.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSpeedDial", function() { return _VSpeedDial__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSpeedDial__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSpeedDial__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VSpeedDial__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSpeedDial__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VStepper/VStepper.js": /*!*********************************************!*\ !*** ./src/components/VStepper/VStepper.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_steppers_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_steppers.styl */ "./src/stylus/components/_steppers.styl"); /* harmony import */ var _stylus_components_steppers_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_steppers_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-stepper', mixins: [_mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]], provide: function provide() { return { stepClick: this.stepClick }; }, props: { nonLinear: Boolean, altLabels: Boolean, vertical: Boolean, value: [Number, String] }, data: function data() { return { inputValue: null, isBooted: false, steps: [], content: [], isReverse: false }; }, computed: { classes: function classes() { return { 'v-stepper': true, 'v-stepper--is-booted': this.isBooted, 'v-stepper--vertical': this.vertical, 'v-stepper--alt-labels': this.altLabels, 'v-stepper--non-linear': this.nonLinear, 'theme--dark': this.dark, 'theme--light': this.light }; } }, watch: { inputValue: function inputValue(val, prev) { this.isReverse = Number(val) < Number(prev); for (var index = this.steps.length; --index >= 0;) { this.steps[index].toggle(this.inputValue); } for (var index = this.content.length; --index >= 0;) { this.content[index].toggle(this.inputValue, this.isReverse); } this.$emit('input', this.inputValue); prev && (this.isBooted = true); }, value: function value() { var _this = this; this.getSteps(); this.$nextTick(function () { return _this.inputValue = _this.value; }); } }, mounted: function mounted() { this.getSteps(); this.inputValue = this.value || this.steps[0].step || 1; }, methods: { getSteps: function getSteps() { this.steps = []; this.content = []; for (var index = 0; index < this.$children.length; index++) { var child = this.$children[index]; if (child.$options.name === 'v-stepper-step') { this.steps.push(child); } else if (child.$options.name === 'v-stepper-content') { child.isVertical = this.vertical; this.content.push(child); } } }, stepClick: function stepClick(step) { var _this = this; this.getSteps(); this.$nextTick(function () { return _this.inputValue = step; }); } }, render: function render(h) { return h('div', { 'class': this.classes }, this.$slots.default); } }); /***/ }), /***/ "./src/components/VStepper/VStepperContent.js": /*!****************************************************!*\ !*** ./src/components/VStepper/VStepperContent.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-stepper-content', props: { step: { type: [Number, String], required: true } }, data: function data() { return { height: 0, // Must be null to allow // previous comparison isActive: null, isReverse: false, isVertical: false }; }, computed: { classes: function classes() { return { 'v-stepper__content': true }; }, computedTransition: function computedTransition() { return this.isReverse ? _transitions__WEBPACK_IMPORTED_MODULE_0__["VTabReverseTransition"] : _transitions__WEBPACK_IMPORTED_MODULE_0__["VTabTransition"]; }, styles: function styles() { if (!this.isVertical) return {}; return { height: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["convertToUnit"])(this.height) }; }, wrapperClasses: function wrapperClasses() { return { 'v-stepper__wrapper': true }; } }, watch: { isActive: function isActive(current, previous) { // If active and the previous state // was null, is just booting up if (current && previous == null) { return this.height = 'auto'; } if (!this.isVertical) return; if (this.isActive) this.enter();else this.leave(); } }, mounted: function mounted() { this.$refs.wrapper.addEventListener('transitionend', this.onTransition, false); }, beforeDestroy: function beforeDestroy() { this.$refs.wrapper.removeEventListener('transitionend', this.onTransition, false); }, methods: { onTransition: function onTransition(e) { if (!this.isActive || e.propertyName !== 'height') return; this.height = 'auto'; }, enter: function enter() { var _this = this; var scrollHeight = 0; // Render bug with height requestAnimationFrame(function () { scrollHeight = _this.$refs.wrapper.scrollHeight; }); this.height = 0; // Give the collapsing element time to collapse setTimeout(function () { return _this.height = scrollHeight || 'auto'; }, 450); }, leave: function leave() { var _this = this; this.height = this.$refs.wrapper.clientHeight; setTimeout(function () { return _this.height = 0; }, 10); }, toggle: function toggle(step, reverse) { this.isActive = step.toString() === this.step.toString(); this.isReverse = reverse; } }, render: function render(h) { var contentData = { 'class': this.classes }; var wrapperData = { 'class': this.wrapperClasses, style: this.styles, ref: 'wrapper' }; if (!this.isVertical) { contentData.directives = [{ name: 'show', value: this.isActive }]; } var wrapper = h('div', wrapperData, [this.$slots.default]); var content = h('div', contentData, [wrapper]); return h(this.computedTransition, { on: this.$listeners }, [content]); } }); /***/ }), /***/ "./src/components/VStepper/VStepperStep.js": /*!*************************************************!*\ !*** ./src/components/VStepper/VStepperStep.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../directives/ripple */ "./src/directives/ripple.ts"); // Components // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-stepper-step', directives: { Ripple: _directives_ripple__WEBPACK_IMPORTED_MODULE_1__["default"] }, inject: ['stepClick'], props: { color: { type: String, default: 'primary' }, complete: Boolean, completeIcon: { type: String, default: '$vuetify.icons.complete' }, editIcon: { type: String, default: '$vuetify.icons.edit' }, errorIcon: { type: String, default: '$vuetify.icons.error' }, editable: Boolean, rules: { type: Array, default: function _default() { return []; } }, step: [Number, String] }, data: function data() { return { isActive: false, isInactive: true }; }, computed: { classes: function classes() { return { 'v-stepper__step': true, 'v-stepper__step--active': this.isActive, 'v-stepper__step--editable': this.editable, 'v-stepper__step--inactive': this.isInactive, 'v-stepper__step--error': this.hasError, 'v-stepper__step--complete': this.complete, 'error--text': this.hasError }; }, hasError: function hasError() { return this.rules.some(function (i) { return i() !== true; }); } }, methods: { click: function click(e) { e.stopPropagation(); if (this.editable) { this.stepClick(this.step); } }, toggle: function toggle(step) { this.isActive = step.toString() === this.step.toString(); this.isInactive = Number(step) < Number(this.step); } }, render: function render(h) { var _a; var data = { 'class': this.classes, directives: [{ name: 'ripple', value: this.editable }], on: { click: this.click } }; var stepContent; if (this.hasError) { stepContent = [h(_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"], {}, this.errorIcon)]; } else if (this.complete) { if (this.editable) { stepContent = [h(_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"], {}, this.editIcon)]; } else { stepContent = [h(_VIcon__WEBPACK_IMPORTED_MODULE_0__["default"], {}, this.completeIcon)]; } } else { stepContent = this.step; } var step = h('span', { staticClass: 'v-stepper__step__step', 'class': (_a = {}, _a[this.color] = !this.hasError && (this.complete || this.isActive), _a) }, stepContent); var label = h('div', { staticClass: 'v-stepper__label' }, this.$slots.default); return h('div', data, [step, label]); } }); /***/ }), /***/ "./src/components/VStepper/index.js": /*!******************************************!*\ !*** ./src/components/VStepper/index.js ***! \******************************************/ /*! exports provided: VStepper, VStepperContent, VStepperStep, VStepperHeader, VStepperItems, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VStepperHeader", function() { return VStepperHeader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VStepperItems", function() { return VStepperItems; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VStepper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VStepper */ "./src/components/VStepper/VStepper.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VStepper", function() { return _VStepper__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VStepperStep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VStepperStep */ "./src/components/VStepper/VStepperStep.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VStepperStep", function() { return _VStepperStep__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VStepperContent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VStepperContent */ "./src/components/VStepper/VStepperContent.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VStepperContent", function() { return _VStepperContent__WEBPACK_IMPORTED_MODULE_3__["default"]; }); var VStepperHeader = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-stepper__header'); var VStepperItems = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-stepper__items'); /* istanbul ignore next */ _VStepper__WEBPACK_IMPORTED_MODULE_1__["default"].install = function install(Vue) { Vue.component(_VStepper__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VStepper__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VStepperContent__WEBPACK_IMPORTED_MODULE_3__["default"].name, _VStepperContent__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(_VStepperStep__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VStepperStep__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(VStepperHeader.name, VStepperHeader); Vue.component(VStepperItems.name, VStepperItems); }; /* harmony default export */ __webpack_exports__["default"] = (_VStepper__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "./src/components/VSubheader/VSubheader.js": /*!*************************************************!*\ !*** ./src/components/VSubheader/VSubheader.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_subheaders_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_subheaders.styl */ "./src/stylus/components/_subheaders.styl"); /* harmony import */ var _stylus_components_subheaders_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_subheaders_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-subheader', functional: true, mixins: [_mixins_themeable__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { inset: Boolean }, render: function render(h, _a) { var data = _a.data, children = _a.children, props = _a.props; data.staticClass = ("v-subheader " + (data.staticClass || '')).trim(); if (props.inset) data.staticClass += ' v-subheader--inset'; if (props.light) data.staticClass += ' theme--light'; if (props.dark) data.staticClass += ' theme--dark'; return h('div', data, children); } }); /***/ }), /***/ "./src/components/VSubheader/index.js": /*!********************************************!*\ !*** ./src/components/VSubheader/index.js ***! \********************************************/ /*! exports provided: VSubheader, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSubheader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSubheader */ "./src/components/VSubheader/VSubheader.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSubheader", function() { return _VSubheader__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSubheader__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSubheader__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VSubheader__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSubheader__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VSwitch/VSwitch.js": /*!*******************************************!*\ !*** ./src/components/VSwitch/VSwitch.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_selection-controls.styl */ "./src/stylus/components/_selection-controls.styl"); /* harmony import */ var _stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_selection_controls_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _stylus_components_switch_styl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stylus/components/_switch.styl */ "./src/stylus/components/_switch.styl"); /* harmony import */ var _stylus_components_switch_styl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_switch_styl__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _mixins_selectable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/selectable */ "./src/mixins/selectable.js"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-switch', directives: { Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_3__["default"] }, mixins: [_mixins_selectable__WEBPACK_IMPORTED_MODULE_2__["default"]], computed: { classes: function classes() { return { 'v-input--selection-controls v-input--switch': true }; } }, methods: { genDefaultSlot: function genDefaultSlot() { return [this.genSwitch(), this.genLabel()]; }, genSwitch: function genSwitch() { return this.$createElement('div', { staticClass: 'v-input--selection-controls__input' }, [this.genInput('checkbox', this.$attrs), !this.disabled && this.genRipple({ 'class': this.classesSelectable, directives: [{ name: 'touch', value: { left: this.onSwipeLeft, right: this.onSwipeRight } }] }), this.genSwitchPart('track'), this.genSwitchPart('thumb')]); }, // Switches have default colors for thumb/track // that do not tie into theme colors // this avoids a visual issue where // the color takes too long to transition genSwitchPart: function genSwitchPart(target) { return this.$createElement('div', { staticClass: "v-input--switch__" + target, 'class': __assign({}, this.classesSelectable, this.themeClasses), // Avoid cache collision key: target }); }, onSwipeLeft: function onSwipeLeft() { if (this.isActive) this.onChange(); }, onSwipeRight: function onSwipeRight() { if (!this.isActive) this.onChange(); } } }); /***/ }), /***/ "./src/components/VSwitch/index.js": /*!*****************************************!*\ !*** ./src/components/VSwitch/index.js ***! \*****************************************/ /*! exports provided: VSwitch, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSwitch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSwitch */ "./src/components/VSwitch/VSwitch.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSwitch", function() { return _VSwitch__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSwitch__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSwitch__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VSwitch__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSwitch__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VSystemBar/VSystemBar.js": /*!*************************************************!*\ !*** ./src/components/VSystemBar/VSystemBar.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_system_bars_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_system-bars.styl */ "./src/stylus/components/_system-bars.styl"); /* harmony import */ var _stylus_components_system_bars_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_system_bars_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-system-bar', mixins: [Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])('bar', ['height', 'window']), _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { height: { type: [Number, String], validator: function validator(v) { return !isNaN(parseInt(v)); } }, lightsOut: Boolean, status: Boolean, window: Boolean }, computed: { classes: function classes() { return this.addBackgroundColorClassChecks(Object.assign({ 'v-system-bar--lights-out': this.lightsOut, 'v-system-bar--absolute': this.absolute, 'v-system-bar--fixed': !this.absolute && (this.app || this.fixed), 'v-system-bar--status': this.status, 'v-system-bar--window': this.window }, this.themeClasses)); }, computedHeight: function computedHeight() { if (this.height) return parseInt(this.height); return this.window ? 32 : 24; } }, methods: { /** * Update the application layout * * @return {number} */ updateApplication: function updateApplication() { return this.computedHeight; } }, render: function render(h) { var data = { staticClass: 'v-system-bar', 'class': this.classes, style: { height: this.computedHeight + "px" } }; return h('div', data, this.$slots.default); } }); /***/ }), /***/ "./src/components/VSystemBar/index.js": /*!********************************************!*\ !*** ./src/components/VSystemBar/index.js ***! \********************************************/ /*! exports provided: VSystemBar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VSystemBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VSystemBar */ "./src/components/VSystemBar/VSystemBar.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSystemBar", function() { return _VSystemBar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VSystemBar__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VSystemBar__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VSystemBar__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VSystemBar__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VTabs/VTab.js": /*!**************************************!*\ !*** ./src/components/VTabs/VTab.js ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_routable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/routable */ "./src/mixins/routable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Mixins // Utilities /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tab', mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_1__["inject"])('tabs', 'v-tab', 'v-tabs'), _mixins_routable__WEBPACK_IMPORTED_MODULE_0__["default"]], inject: ['tabClick'], props: { activeClass: { type: String, default: 'v-tabs__item--active' }, ripple: { type: [Boolean, Object], default: true } }, data: function data() { return { isActive: false }; }, computed: { classes: function classes() { var _a; return _a = { 'v-tabs__item': true, 'v-tabs__item--disabled': this.disabled }, _a[this.activeClass] = !this.to && this.isActive, _a; }, action: function action() { var to = this.to || this.href; if (this.$router && this.to === Object(this.to)) { var resolve = this.$router.resolve(this.to, this.$route, this.append); to = resolve.href; } return typeof to === 'string' ? to.replace('#', '') : this; } }, watch: { $route: 'onRouteChange' }, mounted: function mounted() { this.tabs.register(this); this.onRouteChange(); }, beforeDestroy: function beforeDestroy() { this.tabs.unregister(this); }, methods: { click: function click(e) { // If user provides an // actual link, do not // prevent default if (this.href && this.href.indexOf('#') > -1) e.preventDefault(); this.$emit('click', e); this.to || this.tabClick(this); }, onRouteChange: function onRouteChange() { var _this = this; if (!this.to || !this.$refs.link) return; var path = "_vnode.data.class." + this.activeClass; this.$nextTick(function () { if (Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["getObjectValueByPath"])(_this.$refs.link, path)) { _this.tabClick(_this); } }); }, toggle: function toggle(action) { this.isActive = action === this || action === this.action; } }, render: function render(h) { var link = this.generateRouteLink(); var data = link.data; // If disabled, use div as anchor tags do not support // being disabled var tag = this.disabled ? 'div' : link.tag; data.ref = 'link'; return h('div', { staticClass: 'v-tabs__div' }, [h(tag, data, this.$slots.default)]); } }); /***/ }), /***/ "./src/components/VTabs/VTabItem.js": /*!******************************************!*\ !*** ./src/components/VTabs/VTabItem.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_bootable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/bootable */ "./src/mixins/bootable.ts"); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transitions */ "./src/components/transitions/index.js"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tab-item', components: { VTabTransition: _transitions__WEBPACK_IMPORTED_MODULE_1__["VTabTransition"], VTabReverseTransition: _transitions__WEBPACK_IMPORTED_MODULE_1__["VTabReverseTransition"] }, directives: { Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_3__["default"] }, mixins: [_mixins_bootable__WEBPACK_IMPORTED_MODULE_0__["default"], Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_2__["inject"])('tabs', 'v-tab-item', 'v-tabs-items')], props: { id: String, transition: { type: [Boolean, String], default: 'tab-transition' }, reverseTransition: { type: [Boolean, String], default: 'tab-reverse-transition' } }, data: function data() { return { isActive: false, reverse: false }; }, computed: { computedTransition: function computedTransition() { return this.reverse ? this.reverseTransition : this.transition; } }, mounted: function mounted() { this.tabs.register(this); }, beforeDestroy: function beforeDestroy() { this.tabs.unregister(this); }, methods: { toggle: function toggle(isActive, reverse, showTransition) { this.$el.style.transition = !showTransition ? 'none' : null; this.reverse = reverse; this.isActive = isActive; } }, render: function render(h) { var data = { staticClass: 'v-tabs__content', directives: [{ name: 'show', value: this.isActive }], domProps: { id: this.id }, on: this.$listeners }; var div = h('div', data, this.showLazyContent(this.$slots.default)); if (!this.computedTransition) return div; return h('transition', { props: { name: this.computedTransition } }, [div]); } }); /***/ }), /***/ "./src/components/VTabs/VTabs.js": /*!***************************************!*\ !*** ./src/components/VTabs/VTabs.js ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_tabs_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_tabs.styl */ "./src/stylus/components/_tabs.styl"); /* harmony import */ var _stylus_components_tabs_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_tabs_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_tabs_computed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/tabs-computed */ "./src/components/VTabs/mixins/tabs-computed.js"); /* harmony import */ var _mixins_tabs_generators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/tabs-generators */ "./src/components/VTabs/mixins/tabs-generators.js"); /* harmony import */ var _mixins_tabs_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mixins/tabs-props */ "./src/components/VTabs/mixins/tabs-props.js"); /* harmony import */ var _mixins_tabs_touch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mixins/tabs-touch */ "./src/components/VTabs/mixins/tabs-touch.js"); /* harmony import */ var _mixins_tabs_watchers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mixins/tabs-watchers */ "./src/components/VTabs/mixins/tabs-watchers.js"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../mixins/ssr-bootable */ "./src/mixins/ssr-bootable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _directives_resize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../directives/resize */ "./src/directives/resize.ts"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); // Styles // Component level mixins // Mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tabs', directives: { Resize: _directives_resize__WEBPACK_IMPORTED_MODULE_10__["default"], Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_11__["default"] }, mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_9__["provide"])('tabs'), _mixins_colorable__WEBPACK_IMPORTED_MODULE_6__["default"], _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_7__["default"], _mixins_tabs_computed__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_tabs_props__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_tabs_generators__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_tabs_touch__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_tabs_watchers__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_8__["default"]], provide: function provide() { return { tabClick: this.tabClick, tabProxy: this.tabProxy, registerItems: this.registerItems, unregisterItems: this.unregisterItems }; }, data: function data() { return { bar: [], content: [], isBooted: false, isOverflowing: false, lazyValue: this.value, nextIconVisible: false, prevIconVisible: false, resizeTimeout: null, reverse: false, scrollOffset: 0, sliderWidth: null, sliderLeft: null, startX: 0, tabsContainer: null, tabs: [], tabItems: null, transitionTime: 300, widths: { bar: 0, container: 0, wrapper: 0 } }; }, watch: { tabs: 'onResize' }, mounted: function mounted() { this.checkIcons(); }, methods: { checkIcons: function checkIcons() { this.prevIconVisible = this.checkPrevIcon(); this.nextIconVisible = this.checkNextIcon(); }, checkPrevIcon: function checkPrevIcon() { return this.scrollOffset > 0; }, checkNextIcon: function checkNextIcon() { // Check one scroll ahead to know the width of right-most item return this.widths.container > this.scrollOffset + this.widths.wrapper; }, callSlider: function callSlider() { var _this = this; if (this.hideSlider || !this.activeTab) return false; // Give screen time to paint var action = (this.activeTab || {}).action; var activeTab = action === this.activeTab ? this.activeTab : this.tabs.find(function (tab) { return tab.action === action; }); this.$nextTick(function () { if (!activeTab || !activeTab.$el) return; _this.sliderWidth = activeTab.$el.scrollWidth; _this.sliderLeft = activeTab.$el.offsetLeft; }); }, /** * When v-navigation-drawer changes the * width of the container, call resize * after the transition is complete */ onResize: function onResize() { var _this = this; if (this._isDestroyed) return; this.setWidths(); clearTimeout(this.resizeTimeout); this.resizeTimeout = setTimeout(function () { _this.callSlider(); _this.scrollIntoView(); _this.checkIcons(); }, this.transitionTime); }, overflowCheck: function overflowCheck(e, fn) { this.isOverflowing && fn(e); }, scrollTo: function scrollTo(direction) { this.scrollOffset = this.newOffset(direction); }, setOverflow: function setOverflow() { this.isOverflowing = this.widths.bar < this.widths.container; }, setWidths: function setWidths() { var bar = this.$refs.bar ? this.$refs.bar.clientWidth : 0; var container = this.$refs.container ? this.$refs.container.clientWidth : 0; var wrapper = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0; this.widths = { bar: bar, container: container, wrapper: wrapper }; this.setOverflow(); }, findActiveLink: function findActiveLink() { var _this = this; if (!this.tabs.length) return; var activeIndex = this.tabs.findIndex(function (tabItem, index) { var id = tabItem.action === tabItem ? index : tabItem.action; return id === _this.lazyValue || tabItem.$el.firstChild.className.indexOf(_this.activeClass) > -1; }); var index = activeIndex > -1 ? activeIndex : 0; var tab = this.tabs[index]; /* istanbul ignore next */ // There is not a reliable way to test this.inputValue = tab.action === tab ? index : tab.action; }, parseNodes: function parseNodes() { var item = []; var items = []; var slider = []; var tab = []; var length = (this.$slots.default || []).length; for (var i = 0; i < length; i++) { var vnode = this.$slots.default[i]; if (vnode.componentOptions) { switch (vnode.componentOptions.Ctor.options.name) { case 'v-tabs-slider': slider.push(vnode); break; case 'v-tabs-items': items.push(vnode); break; case 'v-tab-item': item.push(vnode); break; // case 'v-tab' - intentionally omitted default: tab.push(vnode); } } else { tab.push(vnode); } } return { tab: tab, slider: slider, items: items, item: item }; }, register: function register(options) { this.tabs.push(options); }, scrollIntoView: function scrollIntoView() { if (!this.activeTab) return; if (!this.isOverflowing) return this.scrollOffset = 0; var totalWidth = this.widths.wrapper + this.scrollOffset; var _a = this.activeTab.$el, clientWidth = _a.clientWidth, offsetLeft = _a.offsetLeft; var itemOffset = clientWidth + offsetLeft; var additionalOffset = clientWidth * 0.3; if (this.activeIndex === this.tabs.length - 1) { additionalOffset = 0; // don't add an offset if selecting the last tab } /* istanbul ignore else */ if (offsetLeft < this.scrollOffset) { this.scrollOffset = Math.max(offsetLeft - additionalOffset, 0); } else if (totalWidth < itemOffset) { this.scrollOffset -= totalWidth - itemOffset - additionalOffset; } }, tabClick: function tabClick(tab) { this.inputValue = tab.action === tab ? this.tabs.indexOf(tab) : tab.action; this.scrollIntoView(); }, tabProxy: function tabProxy(val) { this.inputValue = val; }, registerItems: function registerItems(fn) { this.tabItems = fn; }, unregisterItems: function unregisterItems() { this.tabItems = null; }, unregister: function unregister(tab) { this.tabs = this.tabs.filter(function (o) { return o !== tab; }); }, updateTabs: function updateTabs() { for (var index = this.tabs.length; --index >= 0;) { this.tabs[index].toggle(this.target); } this.setOverflow(); } }, render: function render(h) { var _a = this.parseNodes(), tab = _a.tab, slider = _a.slider, items = _a.items, item = _a.item; return h('div', { staticClass: 'v-tabs', directives: [{ name: 'resize', arg: 400, modifiers: { quiet: true }, value: this.onResize }] }, [this.genBar([this.hideSlider ? null : this.genSlider(slider), tab]), this.genItems(items, item)]); } }); /***/ }), /***/ "./src/components/VTabs/VTabsItems.js": /*!********************************************!*\ !*** ./src/components/VTabs/VTabsItems.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_registrable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _directives_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../directives/touch */ "./src/directives/touch.ts"); // Mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tabs-items', directives: { Touch: _directives_touch__WEBPACK_IMPORTED_MODULE_1__["default"] }, mixins: [Object(_mixins_registrable__WEBPACK_IMPORTED_MODULE_0__["provide"])('tabs')], inject: { registerItems: { default: null }, tabProxy: { default: null }, unregisterItems: { default: null } }, props: { cycle: Boolean, touchless: Boolean, value: [Number, String] }, data: function data() { return { items: [], lazyValue: this.value, reverse: false }; }, computed: { activeIndex: function activeIndex() { var _this = this; return this.items.findIndex(function (item, index) { return item.id === _this.lazyValue || index === _this.lazyValue; }); }, activeItem: function activeItem() { if (!this.items.length) return undefined; return this.items[this.activeIndex]; }, inputValue: { get: function get() { return this.lazyValue; }, set: function set(val) { this.lazyValue = val; if (this.tabProxy) this.tabProxy(val);else this.$emit('input', val); } } }, watch: { activeIndex: function activeIndex(current, previous) { this.reverse = current < previous; this.updateItems(); }, value: function value(val) { this.lazyValue = val; } }, mounted: function mounted() { this.registerItems && this.registerItems(this.changeModel); }, beforeDestroy: function beforeDestroy() { this.unregisterItems && this.unregisterItems(); }, methods: { changeModel: function changeModel(val) { this.inputValue = val; }, next: function next(cycle) { var nextIndex = this.activeIndex + 1; if (!this.items[nextIndex]) { if (!cycle) return; nextIndex = 0; } this.inputValue = this.items[nextIndex].id || nextIndex; }, prev: function prev(cycle) { var prevIndex = this.activeIndex - 1; if (!this.items[prevIndex]) { if (!cycle) return; prevIndex = this.items.length - 1; } this.inputValue = this.items[prevIndex].id || prevIndex; }, onSwipe: function onSwipe(action) { this[action](this.cycle); }, register: function register(item) { this.items.push(item); }, unregister: function unregister(item) { this.items = this.items.filter(function (i) { return i !== item; }); }, updateItems: function updateItems() { for (var index = this.items.length; --index >= 0;) { this.items[index].toggle(this.activeIndex === index, this.reverse, this.isBooted); } this.isBooted = true; } }, render: function render(h) { var _this = this; var data = { staticClass: 'v-tabs__items', directives: [] }; !this.touchless && data.directives.push({ name: 'touch', value: { left: function left() { return _this.onSwipe('next'); }, right: function right() { return _this.onSwipe('prev'); } } }); return h('div', data, this.$slots.default); } }); /***/ }), /***/ "./src/components/VTabs/VTabsSlider.js": /*!*********************************************!*\ !*** ./src/components/VTabs/VTabsSlider.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tabs-slider', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_0__["default"]], data: function data() { return { defaultColor: 'accent' }; }, render: function render(h) { return h('div', { staticClass: 'v-tabs__slider', class: this.addBackgroundColorClassChecks() }); } }); /***/ }), /***/ "./src/components/VTabs/index.js": /*!***************************************!*\ !*** ./src/components/VTabs/index.js ***! \***************************************/ /*! exports provided: VTabs, VTabItem, VTab, VTabsItems, VTabsSlider, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTabs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTabs */ "./src/components/VTabs/VTabs.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTabs", function() { return _VTabs__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VTab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VTab */ "./src/components/VTabs/VTab.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTab", function() { return _VTab__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VTabsItems__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VTabsItems */ "./src/components/VTabs/VTabsItems.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTabsItems", function() { return _VTabsItems__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VTabItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VTabItem */ "./src/components/VTabs/VTabItem.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTabItem", function() { return _VTabItem__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _VTabsSlider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VTabsSlider */ "./src/components/VTabs/VTabsSlider.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTabsSlider", function() { return _VTabsSlider__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* istanbul ignore next */ _VTabs__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VTabs__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VTabs__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VTab__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VTab__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VTabsItems__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VTabsItems__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.component(_VTabItem__WEBPACK_IMPORTED_MODULE_3__["default"].name, _VTabItem__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.component(_VTabsSlider__WEBPACK_IMPORTED_MODULE_4__["default"].name, _VTabsSlider__WEBPACK_IMPORTED_MODULE_4__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VTabs__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VTabs/mixins/tabs-computed.js": /*!******************************************************!*\ !*** ./src/components/VTabs/mixins/tabs-computed.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tabs computed * * @mixin */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ computed: { activeIndex: function activeIndex() { var _this = this; return this.tabs.findIndex(function (tab, index) { var id = tab.action === tab ? index : tab.action; return id === _this.lazyValue; }); }, activeTab: function activeTab() { if (!this.tabs.length) return undefined; return this.tabs[this.activeIndex]; }, containerStyles: function containerStyles() { return this.height ? { height: parseInt(this.height, 10) + "px" } : null; }, hasArrows: function hasArrows() { return (this.showArrows || !this.isMobile) && this.isOverflowing; }, inputValue: { get: function get() { return this.lazyValue; }, set: function set(val) { if (this.inputValue === val) return; this.lazyValue = val; this.$emit('input', val); } }, isMobile: function isMobile() { return this.$vuetify.breakpoint.width < this.mobileBreakPoint; }, sliderStyles: function sliderStyles() { return { left: this.sliderLeft + "px", transition: this.sliderLeft != null ? null : 'none', width: this.sliderWidth + "px" }; }, target: function target() { return this.activeTab ? this.activeTab.action : null; } } }); /***/ }), /***/ "./src/components/VTabs/mixins/tabs-generators.js": /*!********************************************************!*\ !*** ./src/components/VTabs/mixins/tabs-generators.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTabsItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../VTabsItems */ "./src/components/VTabs/VTabsItems.js"); /* harmony import */ var _VTabsSlider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VTabsSlider */ "./src/components/VTabs/VTabsSlider.js"); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../VIcon */ "./src/components/VIcon/index.ts"); /** * Tabs generators * * @mixin */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genBar: function genBar(items) { return this.$createElement('div', { staticClass: 'v-tabs__bar', 'class': this.addBackgroundColorClassChecks({ 'theme--dark': this.dark, 'theme--light': this.light }), ref: 'bar' }, [this.genTransition('prev'), this.genWrapper(this.genContainer(items)), this.genTransition('next')]); }, genContainer: function genContainer(items) { return this.$createElement('div', { staticClass: 'v-tabs__container', class: { 'v-tabs__container--align-with-title': this.alignWithTitle, 'v-tabs__container--centered': this.centered, 'v-tabs__container--fixed-tabs': this.fixedTabs, 'v-tabs__container--grow': this.grow, 'v-tabs__container--icons-and-text': this.iconsAndText, 'v-tabs__container--overflow': this.isOverflowing, 'v-tabs__container--right': this.right }, style: this.containerStyles, ref: 'container' }, items); }, genIcon: function genIcon(direction) { var _this = this; if (!this.hasArrows || !this[direction + "IconVisible"]) return null; return this.$createElement(_VIcon__WEBPACK_IMPORTED_MODULE_2__["default"], { staticClass: "v-tabs__icon v-tabs__icon--" + direction, props: { disabled: !this[direction + "IconVisible"] }, on: { click: function click() { return _this.scrollTo(direction); } } }, this[direction + "Icon"]); }, genItems: function genItems(items, item) { if (items.length > 0) return items; if (!item.length) return null; return this.$createElement(_VTabsItems__WEBPACK_IMPORTED_MODULE_0__["default"], item); }, genTransition: function genTransition(direction) { return this.$createElement('transition', { props: { name: 'fade-transition' } }, [this.genIcon(direction)]); }, genWrapper: function genWrapper(items) { var _this = this; return this.$createElement('div', { staticClass: 'v-tabs__wrapper', class: { 'v-tabs__wrapper--show-arrows': this.hasArrows }, ref: 'wrapper', directives: [{ name: 'touch', value: { start: function start(e) { return _this.overflowCheck(e, _this.onTouchStart); }, move: function move(e) { return _this.overflowCheck(e, _this.onTouchMove); }, end: function end(e) { return _this.overflowCheck(e, _this.onTouchEnd); } } }] }, [items]); }, genSlider: function genSlider(items) { if (!items.length) { items = [this.$createElement(_VTabsSlider__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { color: this.sliderColor } })]; } return this.$createElement('div', { staticClass: 'v-tabs__slider-wrapper', style: this.sliderStyles }, items); } } }); /***/ }), /***/ "./src/components/VTabs/mixins/tabs-props.js": /*!***************************************************!*\ !*** ./src/components/VTabs/mixins/tabs-props.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tabs props * * @mixin */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ props: { alignWithTitle: Boolean, centered: Boolean, fixedTabs: Boolean, grow: Boolean, height: { type: [Number, String], default: undefined, validator: function validator(v) { return !isNaN(parseInt(v)); } }, hideSlider: Boolean, iconsAndText: Boolean, mobileBreakPoint: { type: [Number, String], default: 1264, validator: function validator(v) { return !isNaN(parseInt(v)); } }, nextIcon: { type: String, default: '$vuetify.icons.next' }, prevIcon: { type: String, default: '$vuetify.icons.prev' }, right: Boolean, showArrows: Boolean, sliderColor: { type: String, default: 'accent' }, value: [Number, String] } }); /***/ }), /***/ "./src/components/VTabs/mixins/tabs-touch.js": /*!***************************************************!*\ !*** ./src/components/VTabs/mixins/tabs-touch.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tabs touch * * @mixin */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { newOffset: function newOffset(direction) { var clientWidth = this.$refs.wrapper.clientWidth; if (direction === 'prev') { return Math.max(this.scrollOffset - clientWidth, 0); } else { return Math.min(this.scrollOffset + clientWidth, this.$refs.container.clientWidth - clientWidth); } }, onTouchStart: function onTouchStart(e) { this.startX = this.scrollOffset + e.touchstartX; this.$refs.container.style.transition = 'none'; this.$refs.container.style.willChange = 'transform'; }, onTouchMove: function onTouchMove(e) { this.scrollOffset = this.startX - e.touchmoveX; }, onTouchEnd: function onTouchEnd() { var container = this.$refs.container; var wrapper = this.$refs.wrapper; var maxScrollOffset = container.clientWidth - wrapper.clientWidth; container.style.transition = null; container.style.willChange = null; /* istanbul ignore else */ if (this.scrollOffset < 0 || !this.isOverflowing) { this.scrollOffset = 0; } else if (this.scrollOffset >= maxScrollOffset) { this.scrollOffset = maxScrollOffset; } } } }); /***/ }), /***/ "./src/components/VTabs/mixins/tabs-watchers.js": /*!******************************************************!*\ !*** ./src/components/VTabs/mixins/tabs-watchers.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tabs watchers * * @mixin */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ watch: { activeTab: function activeTab(tab, prev) { !prev && tab && this.updateTabs(); setTimeout(this.callSlider, 0); if (!tab) return; var action = tab.action; this.tabItems && this.tabItems(action === tab ? this.tabs.indexOf(tab) : action); }, alignWithTitle: 'callSlider', centered: 'callSlider', fixedTabs: 'callSlider', hasArrows: function hasArrows(val) { if (!val) this.scrollOffset = 0; }, isBooted: 'findActiveLink', lazyValue: 'updateTabs', right: 'callSlider', value: function value(val) { this.lazyValue = val; }, '$vuetify.application.left': 'onResize', '$vuetify.application.right': 'onResize', scrollOffset: function scrollOffset(val) { this.$refs.container.style.transform = "translateX(" + -val + "px)"; if (this.hasArrows) { this.prevIconVisible = this.checkPrevIcon(); this.nextIconVisible = this.checkNextIcon(); } } } }); /***/ }), /***/ "./src/components/VTextField/VTextField.js": /*!*************************************************!*\ !*** ./src/components/VTextField/VTextField.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_text-fields.styl */ "./src/stylus/components/_text-fields.styl"); /* harmony import */ var _stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_text_fields_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VInput__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VInput */ "./src/components/VInput/index.js"); /* harmony import */ var _VCounter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VCounter */ "./src/components/VCounter/index.js"); /* harmony import */ var _VLabel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../VLabel */ "./src/components/VLabel/index.js"); /* harmony import */ var _mixins_maskable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/maskable */ "./src/mixins/maskable.js"); /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../directives/ripple */ "./src/directives/ripple.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Extensions // Components // Mixins // Directives // Utilities var dirtyTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-text-field', directives: { Ripple: _directives_ripple__WEBPACK_IMPORTED_MODULE_5__["default"] }, extends: _VInput__WEBPACK_IMPORTED_MODULE_1__["default"], mixins: [_mixins_maskable__WEBPACK_IMPORTED_MODULE_4__["default"]], inheritAttrs: false, props: { appendOuterIcon: String, /** @deprecated */ appendOuterIconCb: Function, autofocus: Boolean, box: Boolean, browserAutocomplete: String, clearable: Boolean, clearIcon: { type: String, default: '$vuetify.icons.clear' }, clearIconCb: Function, color: { type: String, default: 'primary' }, counter: [Boolean, Number, String], flat: Boolean, fullWidth: Boolean, label: String, outline: Boolean, placeholder: String, prefix: String, prependInnerIcon: String, /** @deprecated */ prependInnerIconCb: Function, reverse: Boolean, singleLine: Boolean, solo: Boolean, soloInverted: Boolean, suffix: String, textarea: Boolean, type: { type: String, default: 'text' } }, data: function data() { return { badInput: false, initialValue: null, internalChange: false, isClearing: false }; }, computed: { classes: function classes() { return { 'v-text-field': true, 'v-text-field--full-width': this.fullWidth, 'v-text-field--prefix': this.prefix, 'v-text-field--single-line': this.isSingle, 'v-text-field--solo': this.isSolo, 'v-text-field--solo-inverted': this.soloInverted, 'v-text-field--solo-flat': this.flat, 'v-text-field--box': this.box, 'v-text-field--enclosed': this.isEnclosed, 'v-text-field--reverse': this.reverse, 'v-text-field--outline': this.hasOutline }; }, counterValue: function counterValue() { return (this.internalValue || '').toString().length; }, directivesInput: function directivesInput() { return []; }, // TODO: Deprecate hasOutline: function hasOutline() { return this.outline || this.textarea; }, internalValue: { get: function get() { return this.lazyValue; }, set: function set(val) { if (this.mask) { this.lazyValue = this.unmaskText(this.maskText(this.unmaskText(val))); this.setSelectionRange(); } else { this.lazyValue = val; this.$emit('input', this.lazyValue); } } }, isDirty: function isDirty() { return this.lazyValue != null && this.lazyValue.toString().length > 0 || this.badInput; }, isEnclosed: function isEnclosed() { return this.box || this.isSolo || this.hasOutline || this.fullWidth; }, isLabelActive: function isLabelActive() { return this.isDirty || dirtyTypes.includes(this.type); }, isSingle: function isSingle() { return this.isSolo || this.singleLine; }, isSolo: function isSolo() { return this.solo || this.soloInverted; }, labelPosition: function labelPosition() { var offset = this.prefix && !this.labelValue ? 16 : 0; return !this.$vuetify.rtl !== !this.reverse ? { left: 'auto', right: offset } : { left: offset, right: 'auto' }; }, showLabel: function showLabel() { return this.hasLabel && (!this.isSingle || !this.isLabelActive && !this.placeholder); }, labelValue: function labelValue() { return !this.isSingle && Boolean(this.isFocused || this.isLabelActive || this.placeholder); } }, watch: { isFocused: function isFocused(val) { // Sets validationState from validatable this.hasColor = val; if (val) { this.initialValue = this.lazyValue; } else if (this.initialValue !== this.lazyValue) { this.$emit('change', this.lazyValue); } }, value: function value(val) { var _this = this; if (this.mask && !this.internalChange) { var masked_1 = this.maskText(this.unmaskText(val)); this.lazyValue = this.unmaskText(masked_1); // Emit when the externally set value was modified internally String(val) !== this.lazyValue && this.$nextTick(function () { _this.$refs.input.value = masked_1; _this.$emit('input', _this.lazyValue); }); } else this.lazyValue = val; } }, mounted: function mounted() { this.autofocus && this.onFocus(); }, methods: { /** @public */ focus: function focus() { this.onFocus(); }, /** @public */ blur: function blur() { this.onBlur(); }, clearableCallback: function clearableCallback() { var _this = this; this.internalValue = null; this.$nextTick(function () { return _this.$refs.input.focus(); }); }, genAppendSlot: function genAppendSlot() { var slot = []; if (this.$slots['append-outer']) { slot.push(this.$slots['append-outer']); } else if (this.appendOuterIcon) { slot.push(this.genIcon('appendOuter')); } return this.genSlot('append', 'outer', slot); }, genPrependInnerSlot: function genPrependInnerSlot() { var slot = []; if (this.$slots['prepend-inner']) { slot.push(this.$slots['prepend-inner']); } else if (this.prependInnerIcon) { slot.push(this.genIcon('prependInner')); } return this.genSlot('prepend', 'inner', slot); }, genIconSlot: function genIconSlot() { var slot = []; if (this.$slots['append']) { slot.push(this.$slots['append']); } else if (this.appendIcon) { slot.push(this.genIcon('append')); } return this.genSlot('append', 'inner', slot); }, genInputSlot: function genInputSlot() { var input = _VInput__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genInputSlot.call(this); var prepend = this.genPrependInnerSlot(); prepend && input.children.unshift(prepend); return input; }, genClearIcon: function genClearIcon() { if (!this.clearable) return null; var icon = !this.isDirty ? false : 'clear'; if (this.clearIconCb) Object(_util_console__WEBPACK_IMPORTED_MODULE_7__["deprecate"])(':clear-icon-cb', '@click:clear', this); return this.genSlot('append', 'inner', [this.genIcon(icon, !this.$listeners['click:clear'] && this.clearIconCb || this.clearableCallback, false)]); }, genCounter: function genCounter() { if (this.counter === false || this.counter == null) return null; var max = this.counter === true ? this.$attrs.maxlength : this.counter; return this.$createElement(_VCounter__WEBPACK_IMPORTED_MODULE_2__["default"], { props: { dark: this.dark, light: this.light, max: max, value: this.counterValue } }); }, genDefaultSlot: function genDefaultSlot() { return [this.genTextFieldSlot(), this.genClearIcon(), this.genIconSlot()]; }, genLabel: function genLabel() { if (!this.showLabel) return null; var data = { props: { absolute: true, color: this.validationState, dark: this.dark, disabled: this.disabled, focused: !this.isSingle && (this.isFocused || !!this.validationState), left: this.labelPosition.left, light: this.light, right: this.labelPosition.right, value: this.labelValue } }; if (this.$attrs.id) data.props.for = this.$attrs.id; return this.$createElement(_VLabel__WEBPACK_IMPORTED_MODULE_3__["default"], data, this.$slots.label || this.label); }, genInput: function genInput() { var listeners = Object.assign({}, this.$listeners); delete listeners['change']; // Change should not be bound externally var data = { style: {}, domProps: { value: this.maskText(this.lazyValue) }, attrs: __assign({ 'aria-label': (!this.$attrs || !this.$attrs.id) && this.label }, this.$attrs, { autofocus: this.autofocus, disabled: this.disabled, readonly: this.readonly, type: this.type }), on: Object.assign(listeners, { blur: this.onBlur, input: this.onInput, focus: this.onFocus, keydown: this.onKeyDown }), ref: 'input' }; if (this.placeholder) data.attrs.placeholder = this.placeholder; if (this.mask) data.attrs.maxlength = this.masked.length; if (this.browserAutocomplete) data.attrs.autocomplete = this.browserAutocomplete; return this.$createElement('input', data); }, genMessages: function genMessages() { if (this.hideDetails) return null; return this.$createElement('div', { staticClass: 'v-text-field__details' }, [_VInput__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genMessages.call(this), this.genCounter()]); }, genTextFieldSlot: function genTextFieldSlot() { return this.$createElement('div', { staticClass: 'v-text-field__slot' }, [this.genLabel(), this.prefix ? this.genAffix('prefix') : null, this.genInput(), this.suffix ? this.genAffix('suffix') : null]); }, genAffix: function genAffix(type) { return this.$createElement('div', { 'class': "v-text-field__" + type, ref: type }, this[type]); }, onBlur: function onBlur(e) { this.isFocused = false; // Reset internalChange state // to allow external change // to persist this.internalChange = false; this.$emit('blur', e); }, onClick: function onClick() { if (this.isFocused || this.disabled) return; this.$refs.input.focus(); }, onFocus: function onFocus(e) { if (!this.$refs.input) return; if (document.activeElement !== this.$refs.input) { return this.$refs.input.focus(); } if (!this.isFocused) { this.isFocused = true; this.$emit('focus', e); } }, onInput: function onInput(e) { this.internalChange = true; this.mask && this.resetSelections(e.target); this.internalValue = e.target.value; this.badInput = e.target.validity && e.target.validity.badInput; }, onKeyDown: function onKeyDown(e) { this.internalChange = true; if (e.keyCode === _util_helpers__WEBPACK_IMPORTED_MODULE_6__["keyCodes"].enter) this.$emit('change', this.internalValue); this.$emit('keydown', e); }, onMouseDown: function onMouseDown(e) { // Prevent input from being blurred if (e.target !== this.$refs.input) { e.preventDefault(); e.stopPropagation(); } _VInput__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onMouseDown.call(this, e); }, onMouseUp: function onMouseUp(e) { // Default click handler is on slot, // Mouse events are to enable specific // input types when clicked if ((this.isSolo || this.hasOutline) && document.activeElement !== this.$refs.input) { this.$refs.input.focus(); } _VInput__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onMouseUp.call(this, e); } } }); /***/ }), /***/ "./src/components/VTextField/index.js": /*!********************************************!*\ !*** ./src/components/VTextField/index.js ***! \********************************************/ /*! exports provided: VTextField, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VTextField", function() { return wrapper; }); /* harmony import */ var _VTextField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTextField */ "./src/components/VTextField/VTextField.js"); /* harmony import */ var _VTextarea_VTextarea__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VTextarea/VTextarea */ "./src/components/VTextarea/VTextarea.js"); /* harmony import */ var _util_rebuildFunctionalSlots__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/rebuildFunctionalSlots */ "./src/util/rebuildFunctionalSlots.js"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); // TODO: remove this in v2.0 /* @vue/component */ var wrapper = { functional: true, $_wrapperFor: _VTextField__WEBPACK_IMPORTED_MODULE_0__["default"], props: { textarea: Boolean, multiLine: Boolean }, render: function render(h, _a) { var props = _a.props, data = _a.data, slots = _a.slots, parent = _a.parent; delete data.model; var children = Object(_util_rebuildFunctionalSlots__WEBPACK_IMPORTED_MODULE_2__["default"])(slots(), h); if (props.textarea) { Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["deprecate"])('<v-text-field textarea>', '<v-textarea outline>', wrapper, parent); } if (props.multiLine) { Object(_util_console__WEBPACK_IMPORTED_MODULE_3__["deprecate"])('<v-text-field multi-line>', '<v-textarea>', wrapper, parent); } if (props.textarea || props.multiLine) { data.attrs.outline = props.textarea; return h(_VTextarea_VTextarea__WEBPACK_IMPORTED_MODULE_1__["default"], data, children); } else { return h(_VTextField__WEBPACK_IMPORTED_MODULE_0__["default"], data, children); } } }; /* istanbul ignore next */ wrapper.install = function install(Vue) { Vue.component(_VTextField__WEBPACK_IMPORTED_MODULE_0__["default"].name, wrapper); }; /* harmony default export */ __webpack_exports__["default"] = (wrapper); /***/ }), /***/ "./src/components/VTextarea/VTextarea.js": /*!***********************************************!*\ !*** ./src/components/VTextarea/VTextarea.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_textarea_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_textarea.styl */ "./src/stylus/components/_textarea.styl"); /* harmony import */ var _stylus_components_textarea_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_textarea_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../VTextField/VTextField */ "./src/components/VTextField/VTextField.js"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Styles // Extensions /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-textarea', extends: _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__["default"], props: { autoGrow: Boolean, noResize: Boolean, outline: Boolean, rowHeight: { type: [Number, String], default: 24, validator: function validator(v) { return !isNaN(parseFloat(v)); } }, rows: { type: [Number, String], default: 5, validator: function validator(v) { return !isNaN(parseInt(v, 10)); } } }, computed: { classes: function classes() { return __assign({ 'v-textarea': true, 'v-textarea--auto-grow': this.autoGrow, 'v-textarea--no-resize': this.noResizeHandle }, _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__["default"].computed.classes.call(this, null)); }, dynamicHeight: function dynamicHeight() { return this.autoGrow ? this.inputHeight : 'auto'; }, isEnclosed: function isEnclosed() { return this.textarea || _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__["default"].computed.isEnclosed.call(this); }, noResizeHandle: function noResizeHandle() { return this.noResize || this.autoGrow; } }, watch: { lazyValue: function lazyValue() { !this.internalChange && this.autoGrow && this.$nextTick(this.calculateInputHeight); } }, mounted: function mounted() { var _this = this; setTimeout(function () { _this.autoGrow && _this.calculateInputHeight(); }, 0); // TODO: remove (2.0) if (this.autoGrow && this.noResize) { Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleInfo"])('"no-resize" is now implied when using "auto-grow", and can be removed', this); } }, methods: { calculateInputHeight: function calculateInputHeight() { var input = this.$refs.input; if (input) { input.style.height = 0; var height = input.scrollHeight; var minHeight = parseInt(this.rows, 10) * parseFloat(this.rowHeight); // This has to be done ASAP, waiting for Vue // to update the DOM causes ugly layout jumping input.style.height = Math.max(minHeight, height) + 'px'; } }, genInput: function genInput() { var input = _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__["default"].methods.genInput.call(this); input.tag = 'textarea'; delete input.data.attrs.type; input.data.attrs.rows = this.rows; return input; }, onInput: function onInput(e) { _VTextField_VTextField__WEBPACK_IMPORTED_MODULE_1__["default"].methods.onInput.call(this, e); this.autoGrow && this.calculateInputHeight(); }, onKeyDown: function onKeyDown(e) { // Prevents closing of a // dialog when pressing // enter if (this.isFocused && e.keyCode === 13) { e.stopPropagation(); } this.internalChange = true; this.$emit('keydown', e); } } }); /***/ }), /***/ "./src/components/VTextarea/index.js": /*!*******************************************!*\ !*** ./src/components/VTextarea/index.js ***! \*******************************************/ /*! exports provided: VTextarea, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTextarea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTextarea */ "./src/components/VTextarea/VTextarea.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTextarea", function() { return _VTextarea__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VTextarea__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VTextarea__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VTextarea__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VTextarea__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VTimePicker/VTimePicker.js": /*!***************************************************!*\ !*** ./src/components/VTimePicker/VTimePicker.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTimePickerTitle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTimePickerTitle */ "./src/components/VTimePicker/VTimePickerTitle.js"); /* harmony import */ var _VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VTimePickerClock */ "./src/components/VTimePicker/VTimePickerClock.js"); /* harmony import */ var _mixins_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/picker */ "./src/mixins/picker.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VDatePicker_util_pad__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../VDatePicker/util/pad */ "./src/components/VDatePicker/util/pad.js"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; // Components // Mixins // Utils var rangeHours24 = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["createRange"])(24); var rangeHours12am = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["createRange"])(12); var rangeHours12pm = rangeHours12am.map(function (v) { return v + 12; }); var rangeMinutes = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_3__["createRange"])(60); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-time-picker', mixins: [_mixins_picker__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { allowedHours: Function, allowedMinutes: Function, format: { type: String, default: 'ampm', validator: function validator(val) { return ['ampm', '24hr'].includes(val); } }, min: String, max: String, scrollable: Boolean, value: null }, data: function data() { return { inputHour: null, inputMinute: null, period: 'am', selectingHour: true }; }, computed: { isAllowedHourCb: function isAllowedHourCb() { var _this = this; if (!this.min && !this.max) return this.allowedHours; var minHour = this.min ? this.min.split(':')[0] : 0; var maxHour = this.max ? this.max.split(':')[0] : 23; return function (val) { return val >= minHour * 1 && val <= maxHour * 1 && (!_this.allowedHours || _this.allowedHours(val)); }; }, isAllowedMinuteCb: function isAllowedMinuteCb() { var _this = this; var isHourAllowed = !this.allowedHours || this.allowedHours(this.inputHour); if (!this.min && !this.max) { return isHourAllowed ? this.allowedMinutes : function () { return false; }; } var _a = __read(this.min ? this.min.split(':') : [0, 0], 2), minHour = _a[0], minMinute = _a[1]; var _b = __read(this.max ? this.max.split(':') : [23, 59], 2), maxHour = _b[0], maxMinute = _b[1]; var minTime = minHour * 60 + minMinute * 1; var maxTime = maxHour * 60 + maxMinute * 1; return function (val) { var time = 60 * _this.inputHour + val; return time >= minTime && time <= maxTime && isHourAllowed && (!_this.allowedMinutes || _this.allowedMinutes(val)); }; }, isAmPm: function isAmPm() { return this.format === 'ampm'; } }, watch: { value: 'setInputData' }, mounted: function mounted() { this.setInputData(this.value); }, methods: { emitValue: function emitValue() { if (this.inputHour != null && this.inputMinute != null) { this.$emit('input', Object(_VDatePicker_util_pad__WEBPACK_IMPORTED_MODULE_4__["default"])(this.inputHour) + ":" + Object(_VDatePicker_util_pad__WEBPACK_IMPORTED_MODULE_4__["default"])(this.inputMinute)); } }, setPeriod: function setPeriod(period) { this.period = period; if (this.inputHour != null) { var newHour = this.inputHour + (period === 'am' ? -12 : 12); this.inputHour = this.firstAllowed('hour', newHour); this.emitValue(); } }, setInputData: function setInputData(value) { if (value == null) { this.inputHour = null; this.inputMinute = null; return; } if (value instanceof Date) { this.inputHour = value.getHours(); this.inputMinute = value.getMinutes(); } else { var _a = __read(value.trim().toLowerCase().match(/^(\d+):(\d+)(:\d+)?([ap]m)?$/, '') || [], 5), hour = _a[1], minute = _a[2], period = _a[4]; this.inputHour = period ? this.convert12to24(parseInt(hour, 10), period) : parseInt(hour, 10); this.inputMinute = parseInt(minute, 10); } this.period = this.inputHour < 12 ? 'am' : 'pm'; }, convert24to12: function convert24to12(hour) { return hour ? (hour - 1) % 12 + 1 : 12; }, convert12to24: function convert12to24(hour, period) { return hour % 12 + (period === 'pm' ? 12 : 0); }, onInput: function onInput(value) { if (this.selectingHour) { this.inputHour = this.isAmPm ? this.convert12to24(value, this.period) : value; } else { this.inputMinute = value; } this.emitValue(); }, onChange: function onChange() { if (!this.selectingHour) { this.$emit('change', this.value); } else { this.selectingHour = false; } }, firstAllowed: function firstAllowed(type, value) { var allowedFn = type === 'hour' ? this.isAllowedHourCb : this.isAllowedMinuteCb; if (!allowedFn) return value; // TODO: clean up var range = type === 'minute' ? rangeMinutes : this.isAmPm ? value < 12 ? rangeHours12am : rangeHours12pm : rangeHours24; var first = range.find(function (v) { return allowedFn((v + value) % range.length + range[0]); }); return ((first || 0) + value) % range.length + range[0]; }, genClock: function genClock() { return this.$createElement(_VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { allowedValues: this.selectingHour ? this.isAllowedHourCb : this.isAllowedMinuteCb, color: this.color, dark: this.dark, double: this.selectingHour && !this.isAmPm, format: this.selectingHour ? this.isAmPm ? this.convert24to12 : function (val) { return val; } : function (val) { return Object(_VDatePicker_util_pad__WEBPACK_IMPORTED_MODULE_4__["default"])(val, 2); }, light: this.light, max: this.selectingHour ? this.isAmPm && this.period === 'am' ? 11 : 23 : 59, min: this.selectingHour && this.isAmPm && this.period === 'pm' ? 12 : 0, scrollable: this.scrollable, size: this.width - (!this.fullWidth && this.landscape ? 80 : 20), step: this.selectingHour ? 1 : 5, value: this.selectingHour ? this.inputHour : this.inputMinute }, on: { input: this.onInput, change: this.onChange }, ref: 'clock' }); }, genPickerBody: function genPickerBody() { return this.$createElement('div', { staticClass: 'v-time-picker-clock__container', style: { width: this.width + "px", height: this.width - (!this.fullWidth && this.landscape ? 60 : 0) + "px" }, key: this.selectingHour }, [this.genClock()]); }, genPickerTitle: function genPickerTitle() { var _this = this; return this.$createElement(_VTimePickerTitle__WEBPACK_IMPORTED_MODULE_0__["default"], { props: { ampm: this.isAmPm, hour: this.inputHour, minute: this.inputMinute, period: this.period, selectingHour: this.selectingHour }, on: { 'update:selectingHour': function updateSelectingHour(value) { return _this.selectingHour = value; }, 'update:period': this.setPeriod }, ref: 'title', slot: 'title' }); } }, render: function render() { return this.genPicker('v-picker--time'); } }); /***/ }), /***/ "./src/components/VTimePicker/VTimePickerClock.js": /*!********************************************************!*\ !*** ./src/components/VTimePicker/VTimePickerClock.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_time_picker_clock_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_time-picker-clock.styl */ "./src/stylus/components/_time-picker-clock.styl"); /* harmony import */ var _stylus_components_time_picker_clock_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_time_picker_clock_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-time-picker-clock', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { allowedValues: Function, double: Boolean, format: { type: Function, default: function _default(val) { return val; } }, max: { type: Number, required: true }, min: { type: Number, required: true }, scrollable: Boolean, rotate: { type: Number, default: 0 }, size: { type: [Number, String], default: 270 }, step: { type: Number, default: 1 }, value: Number }, data: function data() { return { defaultColor: 'accent', inputValue: this.value, isDragging: false, valueOnMouseDown: null, valueOnMouseUp: null }; }, computed: { count: function count() { return this.max - this.min + 1; }, innerRadius: function innerRadius() { return this.radius - Math.max(this.radius * 0.4, 48); }, outerRadius: function outerRadius() { return this.radius - 4; }, roundCount: function roundCount() { return this.double ? this.count / 2 : this.count; }, degreesPerUnit: function degreesPerUnit() { return 360 / this.roundCount; }, degrees: function degrees() { return this.degreesPerUnit * Math.PI / 180; }, radius: function radius() { return this.size / 2; }, displayedValue: function displayedValue() { return this.value == null ? this.min : this.value; } }, watch: { value: function value(_value) { this.inputValue = _value; } }, methods: { wheel: function wheel(e) { e.preventDefault(); var delta = Math.sign(e.wheelDelta || 1); var value = this.displayedValue; do { value = value + delta; value = (value - this.min + this.count) % this.count + this.min; } while (!this.isAllowed(value) && value !== this.displayedValue); if (value !== this.displayedValue) { this.update(value); } }, handScale: function handScale(value) { return this.double && value - this.min >= this.roundCount ? this.innerRadius / this.radius : this.outerRadius / this.radius; }, isAllowed: function isAllowed(value) { return !this.allowedValues || this.allowedValues(value); }, genValues: function genValues() { var children = []; for (var value = this.min; value <= this.max; value = value + this.step) { var classes = { active: value === this.displayedValue, disabled: !this.isAllowed(value) }; children.push(this.$createElement('span', { 'class': this.addBackgroundColorClassChecks(classes, value === this.value ? this.computedColor : null), style: this.getTransform(value), domProps: { innerHTML: "<span>" + this.format(value) + "</span>" } })); } return children; }, genHand: function genHand() { var scale = "scaleY(" + this.handScale(this.displayedValue) + ")"; var angle = this.rotate + this.degreesPerUnit * (this.displayedValue - this.min); return this.$createElement('div', { staticClass: 'v-time-picker-clock__hand', 'class': this.value == null ? {} : this.addBackgroundColorClassChecks(), style: { transform: "rotate(" + angle + "deg) " + scale } }); }, getTransform: function getTransform(i) { var _a = this.getPosition(i), x = _a.x, y = _a.y; return { transform: "translate(" + x + "px, " + y + "px)" }; }, getPosition: function getPosition(value) { var radius = (this.radius - 24) * this.handScale(value); var rotateRadians = this.rotate * Math.PI / 180; return { x: Math.round(Math.sin((value - this.min) * this.degrees + rotateRadians) * radius), y: Math.round(-Math.cos((value - this.min) * this.degrees + rotateRadians) * radius) }; }, onMouseDown: function onMouseDown(e) { e.preventDefault(); this.valueOnMouseDown = null; this.valueOnMouseUp = null; this.isDragging = true; this.onDragMove(e); }, onMouseUp: function onMouseUp() { this.isDragging = false; if (this.valueOnMouseUp !== null && this.isAllowed(this.valueOnMouseUp)) { this.$emit('change', this.valueOnMouseUp); } }, onDragMove: function onDragMove(e) { e.preventDefault(); if (!this.isDragging && e.type !== 'click') return; var _a = this.$refs.clock.getBoundingClientRect(), width = _a.width, top = _a.top, left = _a.left; var _b = 'touches' in e ? e.touches[0] : e, clientX = _b.clientX, clientY = _b.clientY; var center = { x: width / 2, y: -width / 2 }; var coords = { x: clientX - left, y: top - clientY }; var handAngle = Math.round(this.angle(center, coords) - this.rotate + 360) % 360; var insideClick = this.double && this.euclidean(center, coords) < (this.outerRadius + this.innerRadius) / 2 - 16; var value = Math.round(handAngle / this.degreesPerUnit) + this.min + (insideClick ? this.roundCount : 0); // Necessary to fix edge case when selecting left part of max value var newValue; if (handAngle >= 360 - this.degreesPerUnit / 2) { newValue = insideClick ? this.max : this.min; } else { newValue = value; } if (this.isAllowed(value)) { if (this.valueOnMouseDown === null) { this.valueOnMouseDown = newValue; } this.valueOnMouseUp = newValue; this.update(newValue); } }, update: function update(value) { if (this.inputValue !== value) { this.inputValue = value; this.$emit('input', value); } }, euclidean: function euclidean(p0, p1) { var dx = p1.x - p0.x; var dy = p1.y - p0.y; return Math.sqrt(dx * dx + dy * dy); }, angle: function angle(center, p1) { var value = 2 * Math.atan2(p1.y - center.y - this.euclidean(center, p1), p1.x - center.x); return Math.abs(value * 180 / Math.PI); } }, render: function render() { var _this = this; var data = { staticClass: 'v-time-picker-clock', class: __assign({ 'v-time-picker-clock--indeterminate': this.value == null }, this.themeClasses), on: { mousedown: this.onMouseDown, mouseup: this.onMouseUp, mouseleave: function mouseleave() { return _this.isDragging && _this.onMouseUp(); }, touchstart: this.onMouseDown, touchend: this.onMouseUp, mousemove: this.onDragMove, touchmove: this.onDragMove }, style: { height: this.size + "px", width: this.size + "px" }, ref: 'clock' }; this.scrollable && (data.on.wheel = this.wheel); return this.$createElement('div', data, [this.genHand(), this.genValues()]); } }); /***/ }), /***/ "./src/components/VTimePicker/VTimePickerTitle.js": /*!********************************************************!*\ !*** ./src/components/VTimePicker/VTimePickerTitle.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_time_picker_title_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_time-picker-title.styl */ "./src/stylus/components/_time-picker-title.styl"); /* harmony import */ var _stylus_components_time_picker_title_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_time_picker_title_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_picker_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/picker-button */ "./src/mixins/picker-button.js"); /* harmony import */ var _VDatePicker_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../VDatePicker/util */ "./src/components/VDatePicker/util/index.js"); // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-time-picker-title', mixins: [_mixins_picker_button__WEBPACK_IMPORTED_MODULE_1__["default"]], props: { ampm: Boolean, hour: Number, minute: Number, period: { type: String, validator: function validator(period) { return period === 'am' || period === 'pm'; } }, selectingHour: Boolean }, methods: { genTime: function genTime() { var hour = this.hour; if (this.ampm) { hour = hour ? (hour - 1) % 12 + 1 : 12; } var displayedHour = this.hour == null ? '--' : this.ampm ? hour : Object(_VDatePicker_util__WEBPACK_IMPORTED_MODULE_2__["pad"])(hour); var displayedMinute = this.minute == null ? '--' : Object(_VDatePicker_util__WEBPACK_IMPORTED_MODULE_2__["pad"])(this.minute); return this.$createElement('div', { 'class': 'v-time-picker-title__time' }, [this.genPickerButton('selectingHour', true, displayedHour), this.$createElement('span', ':'), this.genPickerButton('selectingHour', false, displayedMinute)]); }, genAmPm: function genAmPm() { return this.$createElement('div', { staticClass: 'v-time-picker-title__ampm' }, [this.genPickerButton('period', 'am', 'am'), this.genPickerButton('period', 'pm', 'pm')]); } }, render: function render(h) { return h('div', { staticClass: 'v-time-picker-title' }, [this.genTime(), this.ampm ? this.genAmPm() : null]); } }); /***/ }), /***/ "./src/components/VTimePicker/index.js": /*!*********************************************!*\ !*** ./src/components/VTimePicker/index.js ***! \*********************************************/ /*! exports provided: VTimePicker, VTimePickerClock, VTimePickerTitle, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTimePicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTimePicker */ "./src/components/VTimePicker/VTimePicker.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTimePicker", function() { return _VTimePicker__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VTimePickerClock */ "./src/components/VTimePicker/VTimePickerClock.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTimePickerClock", function() { return _VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VTimePickerTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VTimePickerTitle */ "./src/components/VTimePicker/VTimePickerTitle.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTimePickerTitle", function() { return _VTimePickerTitle__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* istanbul ignore next */ _VTimePicker__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VTimePicker__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VTimePicker__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.component(_VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VTimePickerClock__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(_VTimePickerTitle__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VTimePickerTitle__WEBPACK_IMPORTED_MODULE_2__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VTimePicker__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/VToolbar/VToolbar.js": /*!*********************************************!*\ !*** ./src/components/VToolbar/VToolbar.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_toolbar_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_toolbar.styl */ "./src/stylus/components/_toolbar.styl"); /* harmony import */ var _stylus_components_toolbar_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_toolbar_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/applicationable */ "./src/mixins/applicationable.ts"); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/ssr-bootable */ "./src/mixins/ssr-bootable.ts"); /* harmony import */ var _directives_scroll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../directives/scroll */ "./src/directives/scroll.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); // Styles // Mixins // Directives /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-toolbar', directives: { Scroll: _directives_scroll__WEBPACK_IMPORTED_MODULE_5__["default"] }, mixins: [Object(_mixins_applicationable__WEBPACK_IMPORTED_MODULE_1__["default"])('top', ['clippedLeft', 'clippedRight', 'computedHeight', 'invertedScroll', 'manualScroll']), _mixins_colorable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_ssr_bootable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_themeable__WEBPACK_IMPORTED_MODULE_3__["default"]], props: { card: Boolean, clippedLeft: Boolean, clippedRight: Boolean, dense: Boolean, extended: Boolean, extensionHeight: { type: [Number, String], validator: function validator(v) { return !isNaN(parseInt(v)); } }, flat: Boolean, floating: Boolean, height: { type: [Number, String], validator: function validator(v) { return !isNaN(parseInt(v)); } }, invertedScroll: Boolean, manualScroll: Boolean, prominent: Boolean, scrollOffScreen: Boolean, /* @deprecated */ scrollToolbarOffScreen: Boolean, scrollTarget: String, scrollThreshold: { type: Number, default: 300 }, tabs: Boolean }, data: function data() { return { activeTimeout: null, currentScroll: 0, heights: { mobileLandscape: 48, mobile: 56, desktop: 64, dense: 48 }, isActive: true, isExtended: false, isScrollingUp: false, previousScroll: null, previousScrollDirection: null, savedScroll: 0, target: null }; }, computed: { canScroll: function canScroll() { // TODO: remove if (this.scrollToolbarOffScreen) { Object(_util_console__WEBPACK_IMPORTED_MODULE_6__["deprecate"])('scrollToolbarOffScreen', 'scrollOffScreen', this); return true; } return this.scrollOffScreen || this.invertedScroll; }, computedContentHeight: function computedContentHeight() { if (this.height) return parseInt(this.height); if (this.dense) return this.heights.dense; if (this.prominent || this.$vuetify.breakpoint.mdAndUp) return this.heights.desktop; if (this.$vuetify.breakpoint.width > this.$vuetify.breakpoint.height) return this.heights.mobileLandscape; return this.heights.mobile; }, computedExtensionHeight: function computedExtensionHeight() { if (this.tabs) return 48; if (this.extensionHeight) return parseInt(this.extensionHeight); return this.computedContentHeight; }, computedHeight: function computedHeight() { if (!this.isExtended) return this.computedContentHeight; return this.computedContentHeight + this.computedExtensionHeight; }, computedMarginTop: function computedMarginTop() { if (!this.app) return 0; return this.$vuetify.application.bar; }, classes: function classes() { return this.addBackgroundColorClassChecks({ 'v-toolbar': true, 'elevation-0': this.flat || !this.isActive && !this.tabs && this.canScroll, 'v-toolbar--absolute': this.absolute, 'v-toolbar--card': this.card, 'v-toolbar--clipped': this.clippedLeft || this.clippedRight, 'v-toolbar--dense': this.dense, 'v-toolbar--extended': this.isExtended, 'v-toolbar--fixed': !this.absolute && (this.app || this.fixed), 'v-toolbar--floating': this.floating, 'v-toolbar--prominent': this.prominent, 'theme--dark': this.dark, 'theme--light': this.light }); }, computedPaddingLeft: function computedPaddingLeft() { if (!this.app || this.clippedLeft) return 0; return this.$vuetify.application.left; }, computedPaddingRight: function computedPaddingRight() { if (!this.app || this.clippedRight) return 0; return this.$vuetify.application.right; }, computedTransform: function computedTransform() { return !this.isActive ? this.canScroll ? -this.computedContentHeight : -this.computedHeight : 0; }, currentThreshold: function currentThreshold() { return Math.abs(this.currentScroll - this.savedScroll); }, styles: function styles() { return { marginTop: this.computedMarginTop + "px", paddingRight: this.computedPaddingRight + "px", paddingLeft: this.computedPaddingLeft + "px", transform: "translateY(" + this.computedTransform + "px)" }; } }, watch: { currentThreshold: function currentThreshold(val) { if (this.invertedScroll) { return this.isActive = this.currentScroll > this.scrollThreshold; } if (val < this.scrollThreshold || !this.isBooted) return; this.isActive = this.isScrollingUp; this.savedScroll = this.currentScroll; }, isActive: function isActive() { this.savedScroll = 0; }, invertedScroll: function invertedScroll(val) { this.isActive = !val; }, manualScroll: function manualScroll(val) { this.isActive = !val; }, isScrollingUp: function isScrollingUp() { this.savedScroll = this.savedScroll || this.currentScroll; } }, created: function created() { if (this.invertedScroll || this.manualScroll) this.isActive = false; }, mounted: function mounted() { if (this.scrollTarget) { this.target = document.querySelector(this.scrollTarget); } }, methods: { onScroll: function onScroll() { if (!this.canScroll || this.manualScroll || typeof window === 'undefined') return; var target = this.target || window; this.currentScroll = this.scrollTarget ? target.scrollTop : target.pageYOffset || document.documentElement.scrollTop; this.isScrollingUp = this.currentScroll < this.previousScroll; this.previousScroll = this.currentScroll; }, /** * Update the application layout * * @return {number} */ updateApplication: function updateApplication() { return this.invertedScroll || this.manualScroll ? 0 : this.computedHeight; } }, render: function render(h) { this.isExtended = this.extended || !!this.$slots.extension; var children = []; var data = { 'class': this.classes, style: this.styles, on: this.$listeners }; data.directives = [{ arg: this.scrollTarget, name: 'scroll', value: this.onScroll }]; children.push(h('div', { staticClass: 'v-toolbar__content', style: { height: this.computedContentHeight + "px" }, ref: 'content' }, this.$slots.default)); if (this.isExtended) { children.push(h('div', { staticClass: 'v-toolbar__extension', style: { height: this.computedExtensionHeight + "px" } }, this.$slots.extension)); } return h('nav', data, children); } }); /***/ }), /***/ "./src/components/VToolbar/VToolbarSideIcon.js": /*!*****************************************************!*\ !*** ./src/components/VToolbar/VToolbarSideIcon.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_VBtn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../components/VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _components_VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../components/VIcon */ "./src/components/VIcon/index.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-toolbar-side-icon', functional: true, render: function render(h, _a) { var slots = _a.slots, listeners = _a.listeners, props = _a.props, data = _a.data; var classes = data.staticClass ? data.staticClass + " v-toolbar__side-icon" : 'v-toolbar__side-icon'; var d = Object.assign(data, { staticClass: classes, props: Object.assign(props, { icon: true }), on: listeners }); var defaultSlot = slots().default; return h(_components_VBtn__WEBPACK_IMPORTED_MODULE_0__["default"], d, defaultSlot || [h(_components_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], '$vuetify.icons.menu')]); } }); /***/ }), /***/ "./src/components/VToolbar/index.js": /*!******************************************!*\ !*** ./src/components/VToolbar/index.js ***! \******************************************/ /*! exports provided: VToolbar, VToolbarSideIcon, VToolbarTitle, VToolbarItems, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VToolbarTitle", function() { return VToolbarTitle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VToolbarItems", function() { return VToolbarItems; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _VToolbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VToolbar */ "./src/components/VToolbar/VToolbar.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VToolbar", function() { return _VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VToolbarSideIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VToolbarSideIcon */ "./src/components/VToolbar/VToolbarSideIcon.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VToolbarSideIcon", function() { return _VToolbarSideIcon__WEBPACK_IMPORTED_MODULE_2__["default"]; }); var VToolbarTitle = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-toolbar__title'); var VToolbarItems = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleFunctional"])('v-toolbar__items'); /* istanbul ignore next */ _VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].install = function install(Vue) { Vue.component(_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"].name, _VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.component(VToolbarItems.name, VToolbarItems); Vue.component(VToolbarTitle.name, VToolbarTitle); Vue.component(_VToolbarSideIcon__WEBPACK_IMPORTED_MODULE_2__["default"].name, _VToolbarSideIcon__WEBPACK_IMPORTED_MODULE_2__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VToolbar__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "./src/components/VTooltip/VTooltip.js": /*!*********************************************!*\ !*** ./src/components/VTooltip/VTooltip.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_tooltips_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stylus/components/_tooltips.styl */ "./src/stylus/components/_tooltips.styl"); /* harmony import */ var _stylus_components_tooltips_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_tooltips_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _mixins_colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mixins/colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _mixins_delayable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../mixins/delayable */ "./src/mixins/delayable.ts"); /* harmony import */ var _mixins_dependent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../mixins/dependent */ "./src/mixins/dependent.js"); /* harmony import */ var _mixins_detachable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../mixins/detachable */ "./src/mixins/detachable.js"); /* harmony import */ var _mixins_menuable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../mixins/menuable */ "./src/mixins/menuable.js"); /* harmony import */ var _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../mixins/toggleable */ "./src/mixins/toggleable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); // Mixins // Helpers /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'v-tooltip', mixins: [_mixins_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _mixins_delayable__WEBPACK_IMPORTED_MODULE_2__["default"], _mixins_dependent__WEBPACK_IMPORTED_MODULE_3__["default"], _mixins_detachable__WEBPACK_IMPORTED_MODULE_4__["default"], _mixins_menuable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_toggleable__WEBPACK_IMPORTED_MODULE_6__["default"]], props: { debounce: { type: [Number, String], default: 0 }, disabled: Boolean, fixed: { type: Boolean, default: true }, openDelay: { type: [Number, String], default: 200 }, tag: { type: String, default: 'span' }, transition: String, zIndex: { default: null } }, data: function data() { return { calculatedMinWidth: 0, closeDependents: false }; }, computed: { calculatedLeft: function calculatedLeft() { var _a = this.dimensions, activator = _a.activator, content = _a.content; var unknown = !this.bottom && !this.left && !this.top && !this.right; var left = 0; if (this.top || this.bottom || unknown) { left = activator.left + activator.width / 2 - content.width / 2; } else if (this.left || this.right) { left = activator.left + (this.right ? activator.width : -content.width) + (this.right ? 10 : -10); } return this.calcXOverflow(left) + "px"; }, calculatedTop: function calculatedTop() { var _a = this.dimensions, activator = _a.activator, content = _a.content; var top = 0; if (this.top || this.bottom) { top = activator.top + (this.bottom ? activator.height : -content.height) + (this.bottom ? 10 : -10); } else if (this.left || this.right) { top = activator.top + activator.height / 2 - content.height / 2; } return this.calcYOverflow(top + this.pageYOffset) + "px"; }, classes: function classes() { return { 'v-tooltip--top': this.top, 'v-tooltip--right': this.right, 'v-tooltip--bottom': this.bottom, 'v-tooltip--left': this.left }; }, computedTransition: function computedTransition() { if (this.transition) return this.transition; if (this.top) return 'slide-y-reverse-transition'; if (this.right) return 'slide-x-transition'; if (this.bottom) return 'slide-y-transition'; if (this.left) return 'slide-x-reverse-transition'; }, offsetY: function offsetY() { return this.top || this.bottom; }, offsetX: function offsetX() { return this.left || this.right; }, styles: function styles() { return { left: this.calculatedLeft, maxWidth: Object(_util_helpers__WEBPACK_IMPORTED_MODULE_7__["convertToUnit"])(this.maxWidth), opacity: this.isActive ? 0.9 : 0, top: this.calculatedTop, zIndex: this.zIndex || this.activeZIndex }; } }, mounted: function mounted() { this.value && this.callActivate(); }, methods: { activate: function activate() { // Update coordinates and dimensions of menu // and its activator this.updateDimensions(); // Start the transition requestAnimationFrame(this.startTransition); } }, render: function render(h) { var _this = this; var _a; var tooltip = h('div', { staticClass: 'v-tooltip__content', 'class': this.addBackgroundColorClassChecks((_a = {}, _a[this.contentClass] = true, _a['menuable__content__active'] = this.isActive, _a)), style: this.styles, attrs: this.getScopeIdAttrs(), directives: [{ name: 'show', value: this.isContentActive }], ref: 'content' }, this.showLazyContent(this.$slots.default)); return h(this.tag, { staticClass: 'v-tooltip', 'class': this.classes }, [h('transition', { props: { name: this.computedTransition } }, [tooltip]), h('span', { on: this.disabled ? {} : { mouseenter: function mouseenter() { _this.runDelay('open', function () { return _this.isActive = true; }); }, mouseleave: function mouseleave() { _this.runDelay('close', function () { return _this.isActive = false; }); } }, ref: 'activator' }, this.$slots.activator)]); } }); /***/ }), /***/ "./src/components/VTooltip/index.js": /*!******************************************!*\ !*** ./src/components/VTooltip/index.js ***! \******************************************/ /*! exports provided: VTooltip, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _VTooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./VTooltip */ "./src/components/VTooltip/VTooltip.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTooltip", function() { return _VTooltip__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* istanbul ignore next */ _VTooltip__WEBPACK_IMPORTED_MODULE_0__["default"].install = function install(Vue) { Vue.component(_VTooltip__WEBPACK_IMPORTED_MODULE_0__["default"].name, _VTooltip__WEBPACK_IMPORTED_MODULE_0__["default"]); }; /* harmony default export */ __webpack_exports__["default"] = (_VTooltip__WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./src/components/Vuetify/index.ts": /*!*****************************************!*\ !*** ./src/components/Vuetify/index.ts ***! \*****************************************/ /*! exports provided: checkVueVersion, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkVueVersion", function() { return checkVueVersion; }); /* harmony import */ var _mixins_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mixins/application */ "./src/components/Vuetify/mixins/application.ts"); /* harmony import */ var _mixins_breakpoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mixins/breakpoint */ "./src/components/Vuetify/mixins/breakpoint.ts"); /* harmony import */ var _mixins_theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/theme */ "./src/components/Vuetify/mixins/theme.ts"); /* harmony import */ var _mixins_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mixins/icons */ "./src/components/Vuetify/mixins/icons.js"); /* harmony import */ var _mixins_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mixins/options */ "./src/components/Vuetify/mixins/options.js"); /* harmony import */ var _mixins_lang__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mixins/lang */ "./src/components/Vuetify/mixins/lang.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/console */ "./src/util/console.ts"); /* harmony import */ var _util_goTo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/goTo */ "./src/components/Vuetify/util/goTo.js"); var Vuetify = { install: function install(Vue, opts) { if (opts === void 0) { opts = {}; } if (this.installed) return; this.installed = true; checkVueVersion(Vue); var lang = Object(_mixins_lang__WEBPACK_IMPORTED_MODULE_5__["default"])(opts.lang); Vue.prototype.$vuetify = new Vue({ mixins: [_mixins_breakpoint__WEBPACK_IMPORTED_MODULE_1__["default"]], data: { application: _mixins_application__WEBPACK_IMPORTED_MODULE_0__["default"], dark: false, icons: Object(_mixins_icons__WEBPACK_IMPORTED_MODULE_3__["default"])(opts.iconfont, opts.icons), lang: lang, options: Object(_mixins_options__WEBPACK_IMPORTED_MODULE_4__["default"])(opts.options), rtl: opts.rtl, theme: Object(_mixins_theme__WEBPACK_IMPORTED_MODULE_2__["default"])(opts.theme) }, methods: { goTo: _util_goTo__WEBPACK_IMPORTED_MODULE_7__["default"], t: lang.t.bind(lang) } }); if (opts.transitions) { Object.values(opts.transitions).forEach(function (transition) { if (transition.name !== undefined && transition.name.startsWith('v-')) { Vue.component(transition.name, transition); } }); } if (opts.directives) { Object.values(opts.directives).forEach(function (directive) { Vue.directive(directive.name, directive); }); } if (opts.components) { Object.values(opts.components).forEach(function (component) { Vue.use(component); }); } }, version: '1.1.9' }; function checkVueVersion(Vue, requiredVue) { var vueDep = requiredVue || '^2.5.10'; var required = vueDep.split('.', 3).map(function (v) { return v.replace(/\D/g, ''); }).map(Number); var actual = Vue.version.split('.', 3).map(function (n) { return parseInt(n, 10); }); // Simple semver caret range comparison var passes = actual[0] === required[0] && ( // major matches actual[1] > required[1] || // minor is greater actual[1] === required[1] && actual[2] >= required[2] // or minor is eq and patch is >= ); if (!passes) { Object(_util_console__WEBPACK_IMPORTED_MODULE_6__["consoleWarn"])("Vuetify requires Vue version " + vueDep); } } /* harmony default export */ __webpack_exports__["default"] = (Vuetify); /***/ }), /***/ "./src/components/Vuetify/mixins/application.ts": /*!******************************************************!*\ !*** ./src/components/Vuetify/mixins/application.ts ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ bar: 0, bottom: 0, footer: 0, left: 0, right: 0, top: 0, components: { bar: {}, bottom: {}, footer: {}, left: {}, right: {}, top: {} }, bind: function bind(uid, target, value) { var _a; if (!this.components[target]) return; this.components[target] = (_a = {}, _a[uid] = value, _a); this.update(target); }, unbind: function unbind(uid, target) { if (this.components[target][uid] == null) return; delete this.components[target][uid]; this.update(target); }, update: function update(target) { this[target] = Object.values(this.components[target]).reduce(function (acc, cur) { return acc + cur; }, 0); } }); /***/ }), /***/ "./src/components/Vuetify/mixins/breakpoint.ts": /*!*****************************************************!*\ !*** ./src/components/Vuetify/mixins/breakpoint.ts ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /** * A modified version of https://gist.github.com/cb109/b074a65f7595cffc21cea59ce8d15f9b */ /** * A Vue mixin to get the current width/height and the associated breakpoint. * * <div v-if="$breakpoint.smAndDown">...</div> * */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ data: function data() { return { clientHeight: getClientHeight(), clientWidth: getClientWidth(), resizeTimeout: undefined }; }, computed: { breakpoint: function breakpoint() { var xs = this.clientWidth < 600; var sm = this.clientWidth < 960 && !xs; var md = this.clientWidth < 1280 - 16 && !(sm || xs); var lg = this.clientWidth < 1920 - 16 && !(md || sm || xs); var xl = this.clientWidth >= 1920 - 16; var xsOnly = xs; var smOnly = sm; var smAndDown = (xs || sm) && !(md || lg || xl); var smAndUp = !xs && (sm || md || lg || xl); var mdOnly = md; var mdAndDown = (xs || sm || md) && !(lg || xl); var mdAndUp = !(xs || sm) && (md || lg || xl); var lgOnly = lg; var lgAndDown = (xs || sm || md || lg) && !xl; var lgAndUp = !(xs || sm || md) && (lg || xl); var xlOnly = xl; var name; switch (true) { case xs: name = 'xs'; break; case sm: name = 'sm'; break; case md: name = 'md'; break; case lg: name = 'lg'; break; default: name = 'xl'; break; } return { // Definite breakpoint. xs: xs, sm: sm, md: md, lg: lg, xl: xl, // Useful e.g. to construct CSS class names dynamically. name: name, // Breakpoint ranges. xsOnly: xsOnly, smOnly: smOnly, smAndDown: smAndDown, smAndUp: smAndUp, mdOnly: mdOnly, mdAndDown: mdAndDown, mdAndUp: mdAndUp, lgOnly: lgOnly, lgAndDown: lgAndDown, lgAndUp: lgAndUp, xlOnly: xlOnly, // For custom breakpoint logic. width: this.clientWidth, height: this.clientHeight }; } }, created: function created() { if (typeof window === 'undefined') return; window.addEventListener('resize', this.onResize, { passive: true }); }, beforeDestroy: function beforeDestroy() { if (typeof window === 'undefined') return; window.removeEventListener('resize', this.onResize); }, methods: { onResize: function onResize() { clearTimeout(this.resizeTimeout); // Added debounce to match what // v-resize used to do but was // removed due to a memory leak // https://github.com/vuetifyjs/vuetify/pull/2997 this.resizeTimeout = window.setTimeout(this.setDimensions, 200); }, setDimensions: function setDimensions() { this.clientHeight = getClientHeight(); this.clientWidth = getClientWidth(); } } })); // Cross-browser support as described in: // https://stackoverflow.com/questions/1248081 function getClientWidth() { if (typeof document === 'undefined') return 0; // SSR return Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } function getClientHeight() { if (typeof document === 'undefined') return 0; // SSR return Math.max(document.documentElement.clientHeight, window.innerHeight || 0); } /***/ }), /***/ "./src/components/Vuetify/mixins/icons.js": /*!************************************************!*\ !*** ./src/components/Vuetify/mixins/icons.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return icons; }); // Maps internal Vuetify icon names to actual Material Design icon names. var ICONS_MATERIAL = { 'complete': 'check', 'cancel': 'cancel', 'close': 'close', 'delete': 'cancel', 'clear': 'clear', 'success': 'check_circle', 'info': 'info', 'warning': 'priority_high', 'error': 'warning', 'prev': 'chevron_left', 'next': 'chevron_right', 'checkboxOn': 'check_box', 'checkboxOff': 'check_box_outline_blank', 'checkboxIndeterminate': 'indeterminate_check_box', 'delimiter': 'fiber_manual_record', 'sort': 'arrow_upward', 'expand': 'keyboard_arrow_down', 'menu': 'menu', 'subgroup': 'arrow_drop_down', 'dropdown': 'arrow_drop_down', 'radioOn': 'radio_button_checked', 'radioOff': 'radio_button_unchecked', 'edit': 'edit' }; // Maps internal Vuetify icon names to actual icons from materialdesignicons.com var ICONS_MDI = { 'complete': 'mdi-check', 'cancel': 'mdi-close-circle', 'close': 'mdi-close', 'delete': 'mdi-close-circle', 'clear': 'mdi-close', 'success': 'mdi-check-circle', 'info': 'mdi-information', 'warning': 'mdi-exclamation', 'error': 'mdi-alert', 'prev': 'mdi-chevron-left', 'next': 'mdi-chevron-right', 'checkboxOn': 'mdi-checkbox-marked', 'checkboxOff': 'mdi-checkbox-blank-outline', 'checkboxIndeterminate': 'mdi-minus-box', 'delimiter': 'mdi-circle', 'sort': 'mdi-arrow-up', 'expand': 'mdi-chevron-down', 'menu': 'mdi-menu', 'subgroup': 'mdi-menu-down', 'dropdown': 'mdi-menu-down', 'radioOn': 'mdi-radiobox-marked', 'radioOff': 'mdi-radiobox-blank', 'edit': 'mdi-pencil' }; // Maps internal Vuetify icon names to actual Font-Awesome 4 icon names. var ICONS_FONTAWESOME4 = { 'complete': 'fa fa-check', 'cancel': 'fa fa-times-circle', 'close': 'fa fa-times', 'delete': 'fa fa-times-circle', 'clear': 'fa fa-times-circle', 'success': 'fa fa-check-circle', 'info': 'fa fa-info-circle', 'warning': 'fa fa-exclamation', 'error': 'fa fa-exclamation-triangle', 'prev': 'fa fa-chevron-left', 'next': 'fa fa-chevron-right', 'checkboxOn': 'fa fa-check-square', 'checkboxOff': 'fa fa-square-o', 'checkboxIndeterminate': 'fa fa-minus-square', 'delimiter': 'fa fa-circle', 'sort': 'fa fa-sort-up', 'expand': 'fa fa-chevron-down', 'menu': 'fa fa-bars', 'subgroup': 'fa fa-caret-down', 'dropdown': 'fa fa-caret-down', 'radioOn': 'fa fa-dot-circle', 'radioOff': 'fa fa-circle-o', 'edit': 'fa fa-pencil' }; // Maps internal Vuetify icon names to actual Font-Awesome 5+ icon names. var ICONS_FONTAWESOME = { 'complete': 'fas fa-check', 'cancel': 'fas fa-times-circle', 'close': 'fas fa-times', 'delete': 'fas fa-times-circle', 'clear': 'fas fa-times-circle', 'success': 'fas fa-check-circle', 'info': 'fas fa-info-circle', 'warning': 'fas fa-exclamation', 'error': 'fas fa-exclamation-triangle', 'prev': 'fas fa-chevron-left', 'next': 'fas fa-chevron-right', 'checkboxOn': 'fas fa-check-square', 'checkboxOff': 'far fa-square', 'checkboxIndeterminate': 'fas fa-minus-square', 'delimiter': 'fas fa-circle', 'sort': 'fas fa-sort-up', 'expand': 'fas fa-chevron-down', 'menu': 'fas fa-bars', 'subgroup': 'fas fa-caret-down', 'dropdown': 'fas fa-caret-down', 'radioOn': 'far fa-dot-circle', 'radioOff': 'far fa-circle', 'edit': 'fas fa-edit' }; var iconSets = { md: ICONS_MATERIAL, mdi: ICONS_MDI, fa: ICONS_FONTAWESOME, fa4: ICONS_FONTAWESOME4 }; function icons(iconfont, icons) { if (iconfont === void 0) { iconfont = 'md'; } if (icons === void 0) { icons = {}; } return Object.assign({}, iconSets[iconfont] || iconSets.md, icons); } /***/ }), /***/ "./src/components/Vuetify/mixins/lang.ts": /*!***********************************************!*\ !*** ./src/components/Vuetify/mixins/lang.ts ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lang; }); /* harmony import */ var _locale_en__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../locale/en */ "./src/locale/en.js"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/console */ "./src/util/console.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; var LANG_PREFIX = '$vuetify.'; var fallback = Symbol('Lang fallback'); function getTranslation(locale, key, usingFallback) { if (usingFallback === void 0) { usingFallback = false; } var shortKey = key.replace(LANG_PREFIX, ''); var translation = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["getObjectValueByPath"])(locale, shortKey, fallback); if (translation === fallback) { if (usingFallback) { Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleError"])("Translation key \"" + shortKey + "\" not found in fallback"); translation = key; } else { Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleWarn"])("Translation key \"" + shortKey + "\" not found, falling back to default"); translation = getTranslation(_locale_en__WEBPACK_IMPORTED_MODULE_0__["default"], key, true); } } return translation; } function lang(config) { if (config === void 0) { config = {}; } return { locales: Object.assign({ en: _locale_en__WEBPACK_IMPORTED_MODULE_0__["default"] }, config.locales), current: config.current || 'en', t: function t(key) { var params = []; for (var _i = 1; _i < arguments.length; _i++) { params[_i - 1] = arguments[_i]; } if (!key.startsWith(LANG_PREFIX)) return key; if (config.t) return config.t.apply(config, __spread([key], params)); var translation = getTranslation(this.locales[this.current], key); return translation.replace(/\{(\d+)\}/g, function (match, index) { return String(params[+index]); }); } }; } /***/ }), /***/ "./src/components/Vuetify/mixins/options.js": /*!**************************************************!*\ !*** ./src/components/Vuetify/mixins/options.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return options; }); var OPTIONS_DEFAULTS = { themeVariations: ['primary', 'secondary', 'accent'], minifyTheme: null, themeCache: null, cspNonce: null }; function options(options) { if (options === void 0) { options = {}; } return Object.assign({}, OPTIONS_DEFAULTS, options); } /***/ }), /***/ "./src/components/Vuetify/mixins/theme.ts": /*!************************************************!*\ !*** ./src/components/Vuetify/mixins/theme.ts ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return theme; }); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; /* eslint-disable no-multi-spaces */ var THEME_DEFAULTS = { primary: '#1976D2', secondary: '#424242', accent: '#82B1FF', error: '#FF5252', info: '#2196F3', success: '#4CAF50', warning: '#FFC107' // amber.base }; function theme(theme) { if (theme === void 0) { theme = {}; } if (theme === false) return false; return __assign({}, THEME_DEFAULTS, theme); } /***/ }), /***/ "./src/components/Vuetify/util/goTo.js": /*!*********************************************!*\ !*** ./src/components/Vuetify/util/goTo.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return goTo; }); /* harmony import */ var _util_easing_patterns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/easing-patterns */ "./src/util/easing-patterns.js"); var defaults = { duration: 500, offset: 0, easing: 'easeInOutCubic' }; function getDocumentHeight() { return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight); } function getWindowHeight() { return window.innerHeight || (document.documentElement || document.body).clientHeight; } function isVueComponent(obj) { return obj != null && obj._isVue; } function getTargetLocation(target, settings) { var location; if (isVueComponent(target)) { target = target.$el; } if (target instanceof Element) { location = target.getBoundingClientRect().top + window.pageYOffset; } else if (typeof target === 'string') { var targetEl = document.querySelector(target); if (!targetEl) throw new TypeError("Target element \"" + target + "\" not found."); location = targetEl.getBoundingClientRect().top + window.pageYOffset; } else if (typeof target === 'number') { location = target; } else { var type = target == null ? target : target.constructor.name; throw new TypeError("Target must be a Selector/Number/DOMElement/VueComponent, received " + type + " instead."); } return Math.round(Math.min(Math.max(location + settings.offset, 0), getDocumentHeight() - getWindowHeight())); } function goTo(target, options) { return new Promise(function (resolve, reject) { if (typeof window === 'undefined') return reject('Window is undefined'); var settings = Object.assign({}, defaults, options); var startTime = performance.now(); var startLocation = window.pageYOffset; var targetLocation = getTargetLocation(target, settings); var distanceToScroll = targetLocation - startLocation; var easingFunction = typeof settings.easing === 'function' ? settings.easing : _util_easing_patterns__WEBPACK_IMPORTED_MODULE_0__[settings.easing]; if (!easingFunction) throw new TypeError("Easing function '" + settings.easing + "' not found."); function step(currentTime) { var progressPercentage = Math.min(1, (currentTime - startTime) / settings.duration); var targetPosition = Math.floor(startLocation + distanceToScroll * easingFunction(progressPercentage)); window.scrollTo(0, targetPosition); if (Math.round(window.pageYOffset) === targetLocation || progressPercentage === 1) { return resolve(target); } window.requestAnimationFrame(step); } window.requestAnimationFrame(step); }); } /***/ }), /***/ "./src/components/index.js": /*!*********************************!*\ !*** ./src/components/index.js ***! \*********************************/ /*! exports provided: Vuetify, VApp, VAlert, VAutocomplete, VAvatar, VBadge, VBottomNav, VBottomSheet, VBreadcrumbs, VBtn, VBtnToggle, VCard, VCarousel, VCheckbox, VChip, VCombobox, VCounter, VDataIterator, VDataTable, VDatePicker, VDialog, VDivider, VExpansionPanel, VFooter, VForm, VGrid, VIcon, VInput, VJumbotron, VLabel, VList, VMenu, VMessages, VNavigationDrawer, VOverflowBtn, VPagination, VParallax, VPicker, VProgressCircular, VProgressLinear, VRadioGroup, VRangeSlider, VSelect, VSlider, VSnackbar, VSpeedDial, VStepper, VSubheader, VSwitch, VSystemBar, VTabs, VTextarea, VTextField, VTimePicker, VToolbar, VTooltip, Transitions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Vuetify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Vuetify */ "./src/components/Vuetify/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Vuetify", function() { return _Vuetify__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _VApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./VApp */ "./src/components/VApp/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VApp", function() { return _VApp__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _VAlert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./VAlert */ "./src/components/VAlert/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAlert", function() { return _VAlert__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _VAutocomplete__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VAutocomplete */ "./src/components/VAutocomplete/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAutocomplete", function() { return _VAutocomplete__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _VAvatar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./VAvatar */ "./src/components/VAvatar/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VAvatar", function() { return _VAvatar__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _VBadge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./VBadge */ "./src/components/VBadge/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBadge", function() { return _VBadge__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _VBottomNav__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./VBottomNav */ "./src/components/VBottomNav/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomNav", function() { return _VBottomNav__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _VBottomSheet__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./VBottomSheet */ "./src/components/VBottomSheet/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBottomSheet", function() { return _VBottomSheet__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./VBreadcrumbs */ "./src/components/VBreadcrumbs/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBreadcrumbs", function() { return _VBreadcrumbs__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _VBtn__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./VBtn */ "./src/components/VBtn/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBtn", function() { return _VBtn__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _VBtnToggle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./VBtnToggle */ "./src/components/VBtnToggle/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VBtnToggle", function() { return _VBtnToggle__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _VCard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./VCard */ "./src/components/VCard/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCard", function() { return _VCard__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _VCarousel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./VCarousel */ "./src/components/VCarousel/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCarousel", function() { return _VCarousel__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _VCheckbox__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./VCheckbox */ "./src/components/VCheckbox/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCheckbox", function() { return _VCheckbox__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _VChip__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./VChip */ "./src/components/VChip/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VChip", function() { return _VChip__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _VCombobox__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./VCombobox */ "./src/components/VCombobox/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCombobox", function() { return _VCombobox__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _VCounter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./VCounter */ "./src/components/VCounter/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VCounter", function() { return _VCounter__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _VDataIterator__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./VDataIterator */ "./src/components/VDataIterator/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDataIterator", function() { return _VDataIterator__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _VDataTable__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./VDataTable */ "./src/components/VDataTable/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDataTable", function() { return _VDataTable__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _VDatePicker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./VDatePicker */ "./src/components/VDatePicker/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDatePicker", function() { return _VDatePicker__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _VDialog__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./VDialog */ "./src/components/VDialog/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDialog", function() { return _VDialog__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _VDivider__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./VDivider */ "./src/components/VDivider/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VDivider", function() { return _VDivider__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _VExpansionPanel__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./VExpansionPanel */ "./src/components/VExpansionPanel/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VExpansionPanel", function() { return _VExpansionPanel__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _VFooter__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./VFooter */ "./src/components/VFooter/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VFooter", function() { return _VFooter__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _VForm__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./VForm */ "./src/components/VForm/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VForm", function() { return _VForm__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _VGrid__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./VGrid */ "./src/components/VGrid/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VGrid", function() { return _VGrid__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _VIcon__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./VIcon */ "./src/components/VIcon/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VIcon", function() { return _VIcon__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _VInput__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./VInput */ "./src/components/VInput/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VInput", function() { return _VInput__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _VJumbotron__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./VJumbotron */ "./src/components/VJumbotron/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VJumbotron", function() { return _VJumbotron__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _VLabel__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./VLabel */ "./src/components/VLabel/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VLabel", function() { return _VLabel__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _VList__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./VList */ "./src/components/VList/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VList", function() { return _VList__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _VMenu__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./VMenu */ "./src/components/VMenu/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VMenu", function() { return _VMenu__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _VMessages__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./VMessages */ "./src/components/VMessages/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VMessages", function() { return _VMessages__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./VNavigationDrawer */ "./src/components/VNavigationDrawer/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VNavigationDrawer", function() { return _VNavigationDrawer__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _VOverflowBtn__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./VOverflowBtn */ "./src/components/VOverflowBtn/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VOverflowBtn", function() { return _VOverflowBtn__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _VPagination__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./VPagination */ "./src/components/VPagination/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VPagination", function() { return _VPagination__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _VParallax__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./VParallax */ "./src/components/VParallax/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VParallax", function() { return _VParallax__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _VPicker__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./VPicker */ "./src/components/VPicker/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VPicker", function() { return _VPicker__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _VProgressCircular__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./VProgressCircular */ "./src/components/VProgressCircular/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VProgressCircular", function() { return _VProgressCircular__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _VProgressLinear__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./VProgressLinear */ "./src/components/VProgressLinear/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VProgressLinear", function() { return _VProgressLinear__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _VRadioGroup__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./VRadioGroup */ "./src/components/VRadioGroup/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VRadioGroup", function() { return _VRadioGroup__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _VRangeSlider__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./VRangeSlider */ "./src/components/VRangeSlider/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VRangeSlider", function() { return _VRangeSlider__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _VSelect__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./VSelect */ "./src/components/VSelect/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSelect", function() { return _VSelect__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _VSlider__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./VSlider */ "./src/components/VSlider/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSlider", function() { return _VSlider__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _VSnackbar__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./VSnackbar */ "./src/components/VSnackbar/index.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSnackbar", function() { return _VSnackbar__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _VSpeedDial__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./VSpeedDial */ "./src/components/VSpeedDial/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSpeedDial", function() { return _VSpeedDial__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _VStepper__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./VStepper */ "./src/components/VStepper/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VStepper", function() { return _VStepper__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _VSubheader__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./VSubheader */ "./src/components/VSubheader/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSubheader", function() { return _VSubheader__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _VSwitch__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./VSwitch */ "./src/components/VSwitch/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSwitch", function() { return _VSwitch__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _VSystemBar__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./VSystemBar */ "./src/components/VSystemBar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VSystemBar", function() { return _VSystemBar__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _VTabs__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./VTabs */ "./src/components/VTabs/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTabs", function() { return _VTabs__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _VTextarea__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./VTextarea */ "./src/components/VTextarea/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTextarea", function() { return _VTextarea__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _VTextField__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./VTextField */ "./src/components/VTextField/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTextField", function() { return _VTextField__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var _VTimePicker__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./VTimePicker */ "./src/components/VTimePicker/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTimePicker", function() { return _VTimePicker__WEBPACK_IMPORTED_MODULE_53__["default"]; }); /* harmony import */ var _VToolbar__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./VToolbar */ "./src/components/VToolbar/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VToolbar", function() { return _VToolbar__WEBPACK_IMPORTED_MODULE_54__["default"]; }); /* harmony import */ var _VTooltip__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./VTooltip */ "./src/components/VTooltip/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VTooltip", function() { return _VTooltip__WEBPACK_IMPORTED_MODULE_55__["default"]; }); /* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./transitions */ "./src/components/transitions/index.js"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Transitions", function() { return _transitions__WEBPACK_IMPORTED_MODULE_56__["default"]; }); /***/ }), /***/ "./src/components/transitions/expand-transition.js": /*!*********************************************************!*\ !*** ./src/components/transitions/expand-transition.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony default export */ __webpack_exports__["default"] = (function (expandedParentClass) { if (expandedParentClass === void 0) { expandedParentClass = ''; } return { enter: function enter(el, done) { el._parent = el.parentNode; Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["addOnceEventListener"])(el, 'transitionend', done); // Get height that is to be scrolled el.style.overflow = 'hidden'; el.style.height = 0; el.style.display = 'block'; expandedParentClass && el._parent.classList.add(expandedParentClass); setTimeout(function () { el.style.height = !el.scrollHeight ? 'auto' : el.scrollHeight + "px"; }, 100); }, afterEnter: function afterEnter(el) { el.style.overflow = null; el.style.height = null; }, leave: function leave(el, done) { // Remove initial transition Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["addOnceEventListener"])(el, 'transitionend', done); // Set height before we transition to 0 el.style.overflow = 'hidden'; el.style.height = el.scrollHeight + "px"; setTimeout(function () { return el.style.height = 0; }, 100); }, afterLeave: function afterLeave(el) { expandedParentClass && el._parent && el._parent.classList.remove(expandedParentClass); } }; }); /***/ }), /***/ "./src/components/transitions/index.js": /*!*********************************************!*\ !*** ./src/components/transitions/index.js ***! \*********************************************/ /*! exports provided: VBottomSheetTransition, VCarouselTransition, VCarouselReverseTransition, VTabTransition, VTabReverseTransition, VMenuTransition, VFabTransition, VDialogTransition, VDialogBottomTransition, VFadeTransition, VScaleTransition, VSlideXTransition, VSlideXReverseTransition, VSlideYTransition, VSlideYReverseTransition, VExpandTransition, VRowExpandTransition, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBottomSheetTransition", function() { return VBottomSheetTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCarouselTransition", function() { return VCarouselTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCarouselReverseTransition", function() { return VCarouselReverseTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VTabTransition", function() { return VTabTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VTabReverseTransition", function() { return VTabReverseTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VMenuTransition", function() { return VMenuTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VFabTransition", function() { return VFabTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VDialogTransition", function() { return VDialogTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VDialogBottomTransition", function() { return VDialogBottomTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VFadeTransition", function() { return VFadeTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VScaleTransition", function() { return VScaleTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSlideXTransition", function() { return VSlideXTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSlideXReverseTransition", function() { return VSlideXReverseTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSlideYTransition", function() { return VSlideYTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VSlideYReverseTransition", function() { return VSlideYReverseTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VExpandTransition", function() { return VExpandTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VRowExpandTransition", function() { return VRowExpandTransition; }); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _expand_transition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./expand-transition */ "./src/components/transitions/expand-transition.js"); // Component specific transitions var VBottomSheetTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('bottom-sheet-transition'); var VCarouselTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('carousel-transition'); var VCarouselReverseTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('carousel-reverse-transition'); var VTabTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('tab-transition'); var VTabReverseTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('tab-reverse-transition'); var VMenuTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('menu-transition'); var VFabTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('fab-transition', 'center center', 'out-in'); // Generic transitions var VDialogTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('dialog-transition'); var VDialogBottomTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('dialog-bottom-transition'); var VFadeTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('fade-transition'); var VScaleTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('scale-transition'); var VSlideXTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('slide-x-transition'); var VSlideXReverseTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('slide-x-reverse-transition'); var VSlideYTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('slide-y-transition'); var VSlideYReverseTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createSimpleTransition"])('slide-y-reverse-transition'); // JavaScript transitions var VExpandTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createJavaScriptTransition"])('expand-transition', Object(_expand_transition__WEBPACK_IMPORTED_MODULE_1__["default"])()); var VRowExpandTransition = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["createJavaScriptTransition"])('row-expand-transition', Object(_expand_transition__WEBPACK_IMPORTED_MODULE_1__["default"])('datatable__expand-col--expanded')); /* harmony default export */ __webpack_exports__["default"] = (install); /* istanbul ignore next */ function install(Vue) { Vue.component('v-bottom-sheet-transition', VBottomSheetTransition); Vue.component('v-carousel-transition', VCarouselTransition); Vue.component('v-carousel-reverse-transition', VCarouselReverseTransition); Vue.component('v-dialog-transition', VDialogTransition); Vue.component('v-dialog-bottom-transition', VDialogBottomTransition); Vue.component('v-fab-transition', VFabTransition); Vue.component('v-fade-transition', VFadeTransition); Vue.component('v-menu-transition', VMenuTransition); Vue.component('v-scale-transition', VScaleTransition); Vue.component('v-slide-x-transition', VSlideXTransition); Vue.component('v-slide-x-reverse-transition', VSlideXReverseTransition); Vue.component('v-slide-y-transition', VSlideYTransition); Vue.component('v-slide-y-reverse-transition', VSlideYReverseTransition); Vue.component('v-tab-reverse-transition', VTabReverseTransition); Vue.component('v-tab-transition', VTabTransition); Vue.component('v-expand-transition', VExpandTransition); Vue.component('v-row-expand-transition', VRowExpandTransition); } /***/ }), /***/ "./src/directives/click-outside.ts": /*!*****************************************!*\ !*** ./src/directives/click-outside.ts ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var __values = undefined && undefined.__values || function (o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function next() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; }; function closeConditional() { return false; } function directive(e, el, binding) { // Args may not always be supplied binding.args = binding.args || {}; // If no closeConditional was supplied assign a default var isActive = binding.args.closeConditional || closeConditional; // The include element callbacks below can be expensive // so we should avoid calling them when we're not active. // Explicitly check for false to allow fallback compatibility // with non-toggleable components if (!e || isActive(e) === false) return; // If click was triggered programmaticaly (domEl.click()) then // it shouldn't be treated as click-outside // Chrome/Firefox support isTrusted property // IE/Edge support pointerType property (empty if not triggered // by pointing device) if ('isTrusted' in e && !e.isTrusted || 'pointerType' in e && !e.pointerType) return; // Check if additional elements were passed to be included in check // (click must be outside all included elements, if any) var elements = (binding.args.include || function () { return []; })(); // Add the root element for the component this directive was defined on elements.push(el); // Check if it's a click outside our elements, and then if our callback returns true. // Non-toggleable components should take action in their callback and return falsy. // Toggleable can return true if it wants to deactivate. // Note that, because we're in the capture phase, this callback will occure before // the bubbling click event on any outside elements. !clickedInEls(e, elements) && setTimeout(function () { isActive(e) && binding.value(e); }, 0); } function clickedInEls(e, elements) { var e_1, _a; // Get position of click var x = e.clientX, y = e.clientY; try { // Loop over all included elements to see if click was in any of them for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) { var el = elements_1_1.value; if (clickedInEl(el, x, y)) return true; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (elements_1_1 && !elements_1_1.done && (_a = elements_1.return)) _a.call(elements_1); } finally { if (e_1) throw e_1.error; } } return false; } function clickedInEl(el, x, y) { // Get bounding rect for element // (we're in capturing event and we want to check for multiple elements, // so can't use target.) var b = el.getBoundingClientRect(); // Check if the click was in the element's bounding rect return x >= b.left && x <= b.right && y >= b.top && y <= b.bottom; } /* harmony default export */ __webpack_exports__["default"] = ({ name: 'click-outside', // [data-app] may not be found // if using bind, inserted makes // sure that the root element is // available, iOS does not support // clicks on body inserted: function inserted(el, binding) { var onClick = function onClick(e) { return directive(e, el, binding); }; // iOS does not recognize click events on document // or body, this is the entire purpose of the v-app // component and [data-app], stop removing this var app = document.querySelector('[data-app]') || document.body; // This is only for unit tests app.addEventListener('click', onClick, true); el._clickOutside = onClick; }, unbind: function unbind(el) { var app = document.querySelector('[data-app]') || document.body; // This is only for unit tests app && app.removeEventListener('click', el._clickOutside, true); delete el._clickOutside; } }); /***/ }), /***/ "./src/directives/index.js": /*!*********************************!*\ !*** ./src/directives/index.js ***! \*********************************/ /*! exports provided: ClickOutside, Ripple, Resize, Scroll, Touch, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return install; }); /* harmony import */ var _click_outside__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./click-outside */ "./src/directives/click-outside.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClickOutside", function() { return _click_outside__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _resize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./resize */ "./src/directives/resize.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Resize", function() { return _resize__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _ripple__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ripple */ "./src/directives/ripple.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ripple", function() { return _ripple__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scroll */ "./src/directives/scroll.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return _scroll__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./touch */ "./src/directives/touch.ts"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Touch", function() { return _touch__WEBPACK_IMPORTED_MODULE_4__["default"]; }); function install(Vue) { Vue.directive('click-outside', _click_outside__WEBPACK_IMPORTED_MODULE_0__["default"]); Vue.directive('ripple', _ripple__WEBPACK_IMPORTED_MODULE_2__["default"]); Vue.directive('resize', _resize__WEBPACK_IMPORTED_MODULE_1__["default"]); Vue.directive('scroll', _scroll__WEBPACK_IMPORTED_MODULE_3__["default"]); Vue.directive('touch', _touch__WEBPACK_IMPORTED_MODULE_4__["default"]); } /***/ }), /***/ "./src/directives/resize.ts": /*!**********************************!*\ !*** ./src/directives/resize.ts ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function inserted(el, binding) { var callback = binding.value; var options = binding.options || { passive: true }; window.addEventListener('resize', callback, options); el._onResize = { callback: callback, options: options }; if (!binding.modifiers || !binding.modifiers.quiet) { callback(); } } function unbind(el) { var _a = el._onResize, callback = _a.callback, options = _a.options; window.removeEventListener('resize', callback, options); delete el._onResize; } /* harmony default export */ __webpack_exports__["default"] = ({ name: 'resize', inserted: inserted, unbind: unbind }); /***/ }), /***/ "./src/directives/ripple.ts": /*!**********************************!*\ !*** ./src/directives/ripple.ts ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function style(el, value) { el.style['transform'] = value; el.style['webkitTransform'] = value; } var ripple = { show: function show(e, el, value) { if (value === void 0) { value = {}; } if (!el._ripple || !el._ripple.enabled) { return; } var container = document.createElement('span'); var animation = document.createElement('span'); container.appendChild(animation); container.className = 'v-ripple__container'; if (value.class) { container.className += " " + value.class; } var size = Math.max(el.clientWidth, el.clientHeight) * (value.center ? 1 : 2); var halfSize = size / 2; animation.className = 'v-ripple__animation'; animation.style.width = size + "px"; animation.style.height = size + "px"; el.appendChild(container); var computed = window.getComputedStyle(el); if (computed.position !== 'absolute' && computed.position !== 'fixed') el.style.position = 'relative'; var offset = el.getBoundingClientRect(); var x = value.center ? 0 : e.clientX - offset.left - halfSize; var y = value.center ? 0 : e.clientY - offset.top - halfSize; animation.classList.add('v-ripple__animation--enter'); animation.classList.add('v-ripple__animation--visible'); style(animation, "translate(" + x + "px, " + y + "px) scale3d(0, 0, 0)"); animation.dataset.activated = String(performance.now()); setTimeout(function () { animation.classList.remove('v-ripple__animation--enter'); style(animation, "translate(" + x + "px, " + y + "px) scale3d(1, 1, 1)"); }, 0); }, hide: function hide(el) { if (!el || !el._ripple || !el._ripple.enabled) return; var ripples = el.getElementsByClassName('v-ripple__animation'); if (ripples.length === 0) return; var animation = ripples[ripples.length - 1]; if (animation.dataset.isHiding) return;else animation.dataset.isHiding = 'true'; var diff = performance.now() - Number(animation.dataset.activated); var delay = Math.max(300 - diff, 0); setTimeout(function () { animation.classList.remove('v-ripple__animation--visible'); setTimeout(function () { var ripples = el.getElementsByClassName('v-ripple__animation'); if (ripples.length === 0) el.style.position = null; animation.parentNode && el.removeChild(animation.parentNode); }, 300); }, delay); } }; function isRippleEnabled(value) { return typeof value === 'undefined' || !!value; } function rippleShow(e) { var value = {}; var element = e.currentTarget; if (!element) return; value.center = element._ripple.centered; if (element._ripple.class) { value.class = element._ripple.class; } ripple.show(e, element, value); } function rippleHide(e) { ripple.hide(e.currentTarget); } function updateRipple(el, binding, wasEnabled) { var enabled = isRippleEnabled(binding.value); if (!enabled) { ripple.hide(el); } el._ripple = el._ripple || {}; el._ripple.enabled = enabled; var value = binding.value || {}; if (value.center) { el._ripple.centered = true; } if (value.class) { el._ripple.class = binding.value.class; } if (enabled && !wasEnabled) { if ('ontouchstart' in window) { el.addEventListener('touchend', rippleHide, false); el.addEventListener('touchcancel', rippleHide, false); } el.addEventListener('mousedown', rippleShow, false); el.addEventListener('mouseup', rippleHide, false); el.addEventListener('mouseleave', rippleHide, false); // Anchor tags can be dragged, causes other hides to fail - #1537 el.addEventListener('dragstart', rippleHide, false); } else if (!enabled && wasEnabled) { removeListeners(el); } } function removeListeners(el) { el.removeEventListener('mousedown', rippleShow, false); el.removeEventListener('touchend', rippleHide, false); el.removeEventListener('touchcancel', rippleHide, false); el.removeEventListener('mouseup', rippleHide, false); el.removeEventListener('mouseleave', rippleHide, false); el.removeEventListener('dragstart', rippleHide, false); } function directive(el, binding) { updateRipple(el, binding, false); } function unbind(el) { delete el._ripple; removeListeners(el); } function update(el, binding) { if (binding.value === binding.oldValue) { return; } var wasEnabled = isRippleEnabled(binding.oldValue); updateRipple(el, binding, wasEnabled); } /* harmony default export */ __webpack_exports__["default"] = ({ name: 'ripple', bind: directive, unbind: unbind, update: update }); /***/ }), /***/ "./src/directives/scroll.ts": /*!**********************************!*\ !*** ./src/directives/scroll.ts ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function inserted(el, binding) { var callback = binding.value; var options = binding.options || { passive: true }; var target = binding.arg ? document.querySelector(binding.arg) : window; if (!target) return; target.addEventListener('scroll', callback, options); el._onScroll = { callback: callback, options: options, target: target }; } function unbind(el) { if (!el._onScroll) return; var _a = el._onScroll, callback = _a.callback, options = _a.options, target = _a.target; target.removeEventListener('scroll', callback, options); delete el._onScroll; } /* harmony default export */ __webpack_exports__["default"] = ({ name: 'scroll', inserted: inserted, unbind: unbind }); /***/ }), /***/ "./src/directives/touch.ts": /*!*********************************!*\ !*** ./src/directives/touch.ts ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); var handleGesture = function handleGesture(wrapper) { var touchstartX = wrapper.touchstartX, touchendX = wrapper.touchendX, touchstartY = wrapper.touchstartY, touchendY = wrapper.touchendY; var dirRatio = 0.5; var minDistance = 16; wrapper.offsetX = touchendX - touchstartX; wrapper.offsetY = touchendY - touchstartY; if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) { wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper); wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper); } if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) { wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper); wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper); } }; function _touchstart(event, wrapper) { var touch = event.changedTouches[0]; wrapper.touchstartX = touch.clientX; wrapper.touchstartY = touch.clientY; wrapper.start && wrapper.start(Object.assign(event, wrapper)); } function _touchend(event, wrapper) { var touch = event.changedTouches[0]; wrapper.touchendX = touch.clientX; wrapper.touchendY = touch.clientY; wrapper.end && wrapper.end(Object.assign(event, wrapper)); handleGesture(wrapper); } function _touchmove(event, wrapper) { var touch = event.changedTouches[0]; wrapper.touchmoveX = touch.clientX; wrapper.touchmoveY = touch.clientY; wrapper.move && wrapper.move(Object.assign(event, wrapper)); } function createHandlers(value) { var wrapper = { touchstartX: 0, touchstartY: 0, touchendX: 0, touchendY: 0, touchmoveX: 0, touchmoveY: 0, offsetX: 0, offsetY: 0, left: value.left, right: value.right, up: value.up, down: value.down, start: value.start, move: value.move, end: value.end }; return { touchstart: function touchstart(e) { return _touchstart(e, wrapper); }, touchend: function touchend(e) { return _touchend(e, wrapper); }, touchmove: function touchmove(e) { return _touchmove(e, wrapper); } }; } function inserted(el, binding, vnode) { var value = binding.value; var target = value.parent ? el.parentNode : el; var options = value.options || { passive: true }; // Needed to pass unit tests if (!target) return; var handlers = createHandlers(binding.value); target._touchHandlers = Object(target._touchHandlers); target._touchHandlers[vnode.context._uid] = handlers; Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["keys"])(handlers).forEach(function (eventName) { target.addEventListener(eventName, handlers[eventName], options); }); } function unbind(el, binding, vnode) { var target = binding.value.parent ? el.parentNode : el; if (!target) return; var handlers = target._touchHandlers[vnode.context._uid]; Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["keys"])(handlers).forEach(function (eventName) { target.removeEventListener(eventName, handlers[eventName]); }); delete target._touchHandlers[vnode.context._uid]; } /* harmony default export */ __webpack_exports__["default"] = ({ name: 'touch', inserted: inserted, unbind: unbind }); /***/ }), /***/ "./src/index.ts": /*!**********************!*\ !*** ./src/index.ts ***! \**********************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_app_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stylus/app.styl */ "./src/stylus/app.styl"); /* harmony import */ var _stylus_app_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_app_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components */ "./src/components/index.js"); /* harmony import */ var _directives__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives */ "./src/directives/index.js"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; var Vuetify = { install: function install(Vue, args) { var VuetifyComponent = _components__WEBPACK_IMPORTED_MODULE_1__["Vuetify"]; Vue.use(VuetifyComponent, __assign({ components: _components__WEBPACK_IMPORTED_MODULE_1__, directives: _directives__WEBPACK_IMPORTED_MODULE_2__ }, args)); }, version: '1.1.9' }; if (typeof window !== 'undefined' && window.Vue) { window.Vue.use(Vuetify); } /* harmony default export */ __webpack_exports__["default"] = (Vuetify); /***/ }), /***/ "./src/locale/en.js": /*!**************************!*\ !*** ./src/locale/en.js ***! \**************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ dataIterator: { rowsPerPageText: 'Items per page:', rowsPerPageAll: 'All', pageText: '{0}-{1} of {2}', noResultsText: 'No matching records found', nextPage: 'Next page', prevPage: 'Previous page' }, dataTable: { rowsPerPageText: 'Rows per page:' }, noDataText: 'No data available' }); /***/ }), /***/ "./src/mixins/applicationable.ts": /*!***************************************!*\ !*** ./src/mixins/applicationable.ts ***! \***************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return applicationable; }); /* harmony import */ var _positionable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/mixins */ "./src/util/mixins.ts"); // Util function applicationable(value, events) { if (events === void 0) { events = []; } /* @vue/component */ return Object(_util_mixins__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_positionable__WEBPACK_IMPORTED_MODULE_0__["factory"])(['absolute', 'fixed'])).extend({ name: 'applicationable', props: { app: Boolean }, computed: { applicationProperty: function applicationProperty() { return value; } }, watch: { // If previous value was app // reset the provided prop app: function app(x, prev) { prev ? this.removeApplication(true) : this.callUpdate(); } }, activated: function activated() { this.callUpdate(); }, created: function created() { for (var i = 0, length = events.length; i < length; i++) { this.$watch(events[i], this.callUpdate); } this.callUpdate(); }, mounted: function mounted() { this.callUpdate(); }, deactivated: function deactivated() { this.removeApplication(); }, destroyed: function destroyed() { this.removeApplication(); }, methods: { callUpdate: function callUpdate() { if (!this.app) return; this.$vuetify.application.bind(this._uid, this.applicationProperty, this.updateApplication()); }, removeApplication: function removeApplication(force) { if (force === void 0) { force = false; } if (!force && !this.app) return; this.$vuetify.application.unbind(this._uid, this.applicationProperty); }, updateApplication: function updateApplication() { return 0; } } }); } /***/ }), /***/ "./src/mixins/bootable.ts": /*!********************************!*\ !*** ./src/mixins/bootable.ts ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /** * Bootable * @mixin * * Used to add lazy content functionality to components * Looks for change in "isActive" to automatically boot * Otherwise can be set manually */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend().extend({ name: 'bootable', props: { lazy: Boolean }, data: function data() { return { isBooted: false }; }, computed: { hasContent: function hasContent() { return this.isBooted || !this.lazy || this.isActive; } }, watch: { isActive: function isActive() { this.isBooted = true; } }, methods: { showLazyContent: function showLazyContent(content) { return this.hasContent ? content : undefined; } } })); /***/ }), /***/ "./src/mixins/button-group.ts": /*!************************************!*\ !*** ./src/mixins/button-group.ts ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_mixins__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/mixins */ "./src/util/mixins.ts"); /* harmony import */ var _registrable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/console */ "./src/util/console.ts"); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_registrable__WEBPACK_IMPORTED_MODULE_1__["provide"])('buttonGroup')).extend({ name: 'button-group', props: { mandatory: Boolean }, data: function data() { return { buttons: [], listeners: [], isDestroying: false }; }, watch: { buttons: 'update' }, mounted: function mounted() { this.update(); }, beforeDestroy: function beforeDestroy() { this.isDestroying = true; }, methods: { /** @abstract */ isSelected: function isSelected(i) { throw new Error('Not implemented !'); }, /** @abstract */ updateValue: function updateValue(i) { throw new Error('Not implemented !'); }, /** @abstract */ updateAllValues: function updateAllValues() { throw new Error('Not implemented !'); }, getValue: function getValue(i) { if (this.buttons[i].value != null) { return this.buttons[i].value; } return i; }, update: function update() { var selected = []; for (var i = 0; i < this.buttons.length; i++) { var elm = this.buttons[i].$el; var button = this.buttons[i]; elm.removeAttribute('data-only-child'); if (this.isSelected(i)) { !button.to && (button.isActive = true); selected.push(i); } else { !button.to && (button.isActive = false); } } if (selected.length === 1) { this.buttons[selected[0]].$el.setAttribute('data-only-child', 'true'); } this.ensureMandatoryInvariant(selected.length > 0); }, register: function register(button) { var index = this.buttons.length; this.buttons.push(button); this.listeners.push(this.updateValue.bind(this, index)); button.$on('click', this.listeners[index]); }, unregister: function unregister(buttonToUnregister) { // Basic cleanup if we're destroying if (this.isDestroying) { var index = this.buttons.indexOf(buttonToUnregister); if (index !== -1) { buttonToUnregister.$off('click', this.listeners[index]); } return; } this.redoRegistrations(buttonToUnregister); }, redoRegistrations: function redoRegistrations(buttonToUnregister) { var selectedCount = 0; var buttons = []; for (var index = 0; index < this.buttons.length; ++index) { var button = this.buttons[index]; if (button !== buttonToUnregister) { buttons.push(button); selectedCount += Number(this.isSelected(index)); } button.$off('click', this.listeners[index]); } this.buttons = []; this.listeners = []; for (var index = 0; index < buttons.length; ++index) { this.register(buttons[index]); } this.ensureMandatoryInvariant(selectedCount > 0); this.updateAllValues && this.updateAllValues(); }, ensureMandatoryInvariant: function ensureMandatoryInvariant(hasSelectedAlready) { // Preserve the mandatory invariant by selecting the first tracked button, if needed if (!this.mandatory || hasSelectedAlready) return; if (!this.listeners.length) { Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleWarn"])('There must be at least one v-btn child if the mandatory property is true.', this); return; } this.listeners[0](); } } })); /***/ }), /***/ "./src/mixins/colorable.ts": /*!*********************************!*\ !*** ./src/mixins/colorable.ts ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'colorable', props: { color: String }, data: function data() { return { defaultColor: undefined }; }, computed: { computedColor: function computedColor() { return this.color || this.defaultColor; } }, methods: { addBackgroundColorClassChecks: function addBackgroundColorClassChecks(obj, color) { var classes = Object.assign({}, obj); var selectedColor = color === undefined ? this.computedColor : color; if (selectedColor) { classes[selectedColor] = true; } return classes; }, addTextColorClassChecks: function addTextColorClassChecks(obj, color) { var classes = Object.assign({}, obj); if (color === undefined) color = this.computedColor; if (color) { var _a = __read(color.toString().trim().split(' '), 2), colorName = _a[0], colorModifier = _a[1]; classes[colorName + '--text'] = true; colorModifier && (classes['text--' + colorModifier] = true); } return classes; } } })); /***/ }), /***/ "./src/mixins/comparable.ts": /*!**********************************!*\ !*** ./src/mixins/comparable.ts ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'comparable', props: { valueComparator: { type: Function, default: _util_helpers__WEBPACK_IMPORTED_MODULE_1__["deepEqual"] } } })); /***/ }), /***/ "./src/mixins/data-iterable.js": /*!*************************************!*\ !*** ./src/mixins/data-iterable.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_VBtn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/VBtn */ "./src/components/VBtn/index.ts"); /* harmony import */ var _components_VIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/VIcon */ "./src/components/VIcon/index.ts"); /* harmony import */ var _components_VSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/VSelect */ "./src/components/VSelect/index.js"); /* harmony import */ var _filterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./filterable */ "./src/mixins/filterable.js"); /* harmony import */ var _themeable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./themeable */ "./src/mixins/themeable.ts"); /* harmony import */ var _loadable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./loadable */ "./src/mixins/loadable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/console */ "./src/util/console.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /** * DataIterable * * @mixin * * Base behavior for data table and data iterator * providing selection, pagination, sorting and filtering. * */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'data-iterable', mixins: [_filterable__WEBPACK_IMPORTED_MODULE_3__["default"], _loadable__WEBPACK_IMPORTED_MODULE_5__["default"], _themeable__WEBPACK_IMPORTED_MODULE_4__["default"]], props: { expand: Boolean, hideActions: Boolean, disableInitialSort: Boolean, mustSort: Boolean, noResultsText: { type: String, default: '$vuetify.dataIterator.noResultsText' }, nextIcon: { type: String, default: '$vuetify.icons.next' }, prevIcon: { type: String, default: '$vuetify.icons.prev' }, rowsPerPageItems: { type: Array, default: function _default() { return [5, 10, 25, { text: '$vuetify.dataIterator.rowsPerPageAll', value: -1 }]; } }, rowsPerPageText: { type: String, default: '$vuetify.dataIterator.rowsPerPageText' }, selectAll: [Boolean, String], search: { required: false }, filter: { type: Function, default: function _default(val, search) { return val != null && typeof val !== 'boolean' && val.toString().toLowerCase().indexOf(search) !== -1; } }, customFilter: { type: Function, default: function _default(items, search, filter) { search = search.toString().toLowerCase(); if (search.trim() === '') return items; return items.filter(function (i) { return Object.keys(i).some(function (j) { return filter(i[j], search); }); }); } }, customSort: { type: Function, default: function _default(items, index, isDescending) { if (index === null) return items; return items.sort(function (a, b) { var _a, _b; var sortA = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(a, index); var sortB = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(b, index); if (isDescending) { _a = __read([sortB, sortA], 2), sortA = _a[0], sortB = _a[1]; } // Check if both are numbers if (!isNaN(sortA) && !isNaN(sortB)) { return sortA - sortB; } // Check if both cannot be evaluated if (sortA === null && sortB === null) { return 0; } _b = __read([sortA, sortB].map(function (s) { return (s || '').toString().toLocaleLowerCase(); }), 2), sortA = _b[0], sortB = _b[1]; if (sortA > sortB) return 1; if (sortA < sortB) return -1; return 0; }); } }, value: { type: Array, default: function _default() { return []; } }, items: { type: Array, required: true, default: function _default() { return []; } }, totalItems: { type: Number, default: null }, itemKey: { type: String, default: 'id' }, pagination: { type: Object, default: function _default() {} } }, data: function data() { return { searchLength: 0, defaultPagination: { descending: false, page: 1, rowsPerPage: 5, sortBy: null, totalItems: 0 }, expanded: {}, actionsClasses: 'v-data-iterator__actions', actionsRangeControlsClasses: 'v-data-iterator__actions__range-controls', actionsSelectClasses: 'v-data-iterator__actions__select', actionsPaginationClasses: 'v-data-iterator__actions__pagination' }; }, computed: { computedPagination: function computedPagination() { return this.hasPagination ? this.pagination : this.defaultPagination; }, computedRowsPerPageItems: function computedRowsPerPageItems() { var _this = this; return this.rowsPerPageItems.map(function (item) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["isObject"])(item) ? Object.assign({}, item, { text: _this.$vuetify.t(item.text) }) : item; }); }, hasPagination: function hasPagination() { var pagination = this.pagination || {}; return Object.keys(pagination).length > 0; }, hasSelectAll: function hasSelectAll() { return this.selectAll !== undefined && this.selectAll !== false; }, itemsLength: function itemsLength() { if (this.hasSearch) return this.searchLength; return this.totalItems || this.items.length; }, indeterminate: function indeterminate() { return this.hasSelectAll && this.someItems && !this.everyItem; }, everyItem: function everyItem() { var _this = this; return this.filteredItems.length && this.filteredItems.every(function (i) { return _this.isSelected(i); }); }, someItems: function someItems() { var _this = this; return this.filteredItems.some(function (i) { return _this.isSelected(i); }); }, getPage: function getPage() { var rowsPerPage = this.computedPagination.rowsPerPage; return rowsPerPage === Object(rowsPerPage) ? rowsPerPage.value : rowsPerPage; }, pageStart: function pageStart() { return this.getPage === -1 ? 0 : (this.computedPagination.page - 1) * this.getPage; }, pageStop: function pageStop() { return this.getPage === -1 ? this.itemsLength : this.computedPagination.page * this.getPage; }, filteredItems: function filteredItems() { return this.filteredItemsImpl(); }, selected: function selected() { var selected = {}; for (var index = 0; index < this.value.length; index++) { var key = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(this.value[index], this.itemKey); selected[key] = true; } return selected; }, hasSearch: function hasSearch() { return this.search != null; } }, watch: { search: function search() { var _this = this; this.$nextTick(function () { _this.updatePagination({ page: 1, totalItems: _this.itemsLength }); }); }, 'computedPagination.sortBy': 'resetPagination', 'computedPagination.descending': 'resetPagination' }, methods: { initPagination: function initPagination() { if (!this.rowsPerPageItems.length) { Object(_util_console__WEBPACK_IMPORTED_MODULE_7__["consoleWarn"])("The prop 'rows-per-page-items' can not be empty", this); } else { this.defaultPagination.rowsPerPage = this.rowsPerPageItems[0]; } this.defaultPagination.totalItems = this.items.length; this.updatePagination(Object.assign({}, this.defaultPagination, this.pagination)); }, updatePagination: function updatePagination(val) { var pagination = this.hasPagination ? this.pagination : this.defaultPagination; var updatedPagination = Object.assign({}, pagination, val); this.$emit('update:pagination', updatedPagination); if (!this.hasPagination) { this.defaultPagination = updatedPagination; } }, isSelected: function isSelected(item) { return this.selected[Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(item, this.itemKey)]; }, isExpanded: function isExpanded(item) { return this.expanded[Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(item, this.itemKey)]; }, filteredItemsImpl: function filteredItemsImpl() { var additionalFilterArgs = []; for (var _i = 0; _i < arguments.length; _i++) { additionalFilterArgs[_i] = arguments[_i]; } if (this.totalItems) return this.items; var items = this.items.slice(); if (this.hasSearch) { items = this.customFilter.apply(this, __spread([items, this.search, this.filter], additionalFilterArgs)); this.searchLength = items.length; } items = this.customSort(items, this.computedPagination.sortBy, this.computedPagination.descending); return this.hideActions && !this.hasPagination ? items : items.slice(this.pageStart, this.pageStop); }, resetPagination: function resetPagination() { this.computedPagination.page !== 1 && this.updatePagination({ page: 1 }); }, sort: function sort(index) { var _a = this.computedPagination, sortBy = _a.sortBy, descending = _a.descending; if (sortBy === null) { this.updatePagination({ sortBy: index, descending: false }); } else if (sortBy === index && !descending) { this.updatePagination({ descending: true }); } else if (sortBy !== index) { this.updatePagination({ sortBy: index, descending: false }); } else if (!this.mustSort) { this.updatePagination({ sortBy: null, descending: null }); } else { this.updatePagination({ sortBy: index, descending: false }); } }, toggle: function toggle(value) { var _this = this; var selected = Object.assign({}, this.selected); for (var index = 0; index < this.filteredItems.length; index++) { var key = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(this.filteredItems[index], this.itemKey); selected[key] = value; } this.$emit('input', this.items.filter(function (i) { var key = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(i, _this.itemKey); return selected[key]; })); }, createProps: function createProps(item, index) { var _this = this; var props = { item: item, index: index }; var keyProp = this.itemKey; var itemKey = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(item, keyProp); Object.defineProperty(props, 'selected', { get: function get() { return _this.selected[itemKey]; }, set: function set(value) { if (itemKey == null) { Object(_util_console__WEBPACK_IMPORTED_MODULE_7__["consoleWarn"])("\"" + keyProp + "\" attribute must be defined for item", _this); } var selected = _this.value.slice(); if (value) selected.push(item);else selected = selected.filter(function (i) { return Object(_util_helpers__WEBPACK_IMPORTED_MODULE_6__["getObjectValueByPath"])(i, keyProp) !== itemKey; }); _this.$emit('input', selected); } }); Object.defineProperty(props, 'expanded', { get: function get() { return _this.expanded[itemKey]; }, set: function set(value) { if (itemKey == null) { Object(_util_console__WEBPACK_IMPORTED_MODULE_7__["consoleWarn"])("\"" + keyProp + "\" attribute must be defined for item", _this); } if (!_this.expand) { for (var key in _this.expanded) { _this.expanded.hasOwnProperty(key) && _this.$set(_this.expanded, key, false); } } _this.$set(_this.expanded, itemKey, value); } }); return props; }, genItems: function genItems() { if (!this.itemsLength && !this.items.length) { var noData = this.$slots['no-data'] || this.$vuetify.t(this.noDataText); return [this.genEmptyItems(noData)]; } if (!this.filteredItems.length) { var noResults = this.$slots['no-results'] || this.$vuetify.t(this.noResultsText); return [this.genEmptyItems(noResults)]; } return this.genFilteredItems(); }, genPrevIcon: function genPrevIcon() { var _this = this; return this.$createElement(_components_VBtn__WEBPACK_IMPORTED_MODULE_0__["default"], { props: { disabled: this.computedPagination.page === 1, icon: true, flat: true, dark: this.dark, light: this.light }, on: { click: function click() { var page = _this.computedPagination.page; _this.updatePagination({ page: page - 1 }); } }, attrs: { 'aria-label': this.$vuetify.t('$vuetify.dataIterator.prevPage') } }, [this.$createElement(_components_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], this.$vuetify.rtl ? this.nextIcon : this.prevIcon)]); }, genNextIcon: function genNextIcon() { var _this = this; var pagination = this.computedPagination; var disabled = pagination.rowsPerPage < 0 || pagination.page * pagination.rowsPerPage >= this.itemsLength || this.pageStop < 0; return this.$createElement(_components_VBtn__WEBPACK_IMPORTED_MODULE_0__["default"], { props: { disabled: disabled, icon: true, flat: true, dark: this.dark, light: this.light }, on: { click: function click() { var page = _this.computedPagination.page; _this.updatePagination({ page: page + 1 }); } }, attrs: { 'aria-label': this.$vuetify.t('$vuetify.dataIterator.nextPage') } }, [this.$createElement(_components_VIcon__WEBPACK_IMPORTED_MODULE_1__["default"], this.$vuetify.rtl ? this.prevIcon : this.nextIcon)]); }, genSelect: function genSelect() { var _this = this; return this.$createElement('div', { 'class': this.actionsSelectClasses }, [this.$vuetify.t(this.rowsPerPageText), this.$createElement(_components_VSelect__WEBPACK_IMPORTED_MODULE_2__["default"], { attrs: { 'aria-label': this.$vuetify.t(this.rowsPerPageText) }, props: { items: this.computedRowsPerPageItems, value: this.computedPagination.rowsPerPage, hideDetails: true, auto: true, minWidth: '75px' }, on: { input: function input(val) { _this.updatePagination({ page: 1, rowsPerPage: val }); } } })]); }, genPagination: function genPagination() { var pagination = '–'; if (this.itemsLength) { var stop = this.itemsLength < this.pageStop || this.pageStop < 0 ? this.itemsLength : this.pageStop; pagination = this.$scopedSlots.pageText ? this.$scopedSlots.pageText({ pageStart: this.pageStart + 1, pageStop: stop, itemsLength: this.itemsLength }) : this.$vuetify.t('$vuetify.dataIterator.pageText', this.pageStart + 1, stop, this.itemsLength); } return this.$createElement('div', { 'class': this.actionsPaginationClasses }, [pagination]); }, genActions: function genActions() { var rangeControls = this.$createElement('div', { 'class': this.actionsRangeControlsClasses }, [this.genPagination(), this.genPrevIcon(), this.genNextIcon()]); return [this.$createElement('div', { 'class': this.actionsClasses }, [this.rowsPerPageItems.length > 1 ? this.genSelect() : null, rangeControls])]; } } }); /***/ }), /***/ "./src/mixins/delayable.ts": /*!*********************************!*\ !*** ./src/mixins/delayable.ts ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /** * Delayable * * @mixin * * Changes the open or close delay time for elements */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'delayable', props: { openDelay: { type: [Number, String], default: 0 }, closeDelay: { type: [Number, String], default: 200 } }, data: function data() { return { openTimeout: undefined, closeTimeout: undefined }; }, methods: { /** * Clear any pending delay timers from executing */ clearDelay: function clearDelay() { clearTimeout(this.openTimeout); clearTimeout(this.closeTimeout); }, /** * Runs callback after a specified delay */ runDelay: function runDelay(type, cb) { this.clearDelay(); var delay = parseInt(this[type + "Delay"], 10); this[type + "Timeout"] = setTimeout(cb, delay); } } })); /***/ }), /***/ "./src/mixins/dependent.js": /*!*********************************!*\ !*** ./src/mixins/dependent.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; function searchChildren(children) { var results = []; for (var index = 0; index < children.length; index++) { var child = children[index]; if (child.isActive && child.isDependent) { results.push(child); } else { results.push.apply(results, __spread(searchChildren(child.$children))); } } return results; } /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'dependent', data: function data() { return { closeDependents: true, isDependent: true }; }, watch: { isActive: function isActive(val) { if (val) return; var openDependents = this.getOpenDependents(); for (var index = 0; index < openDependents.length; index++) { openDependents[index].isActive = false; } } }, methods: { getOpenDependents: function getOpenDependents() { if (this.closeDependents) return searchChildren(this.$children); return []; }, getOpenDependentElements: function getOpenDependentElements() { var result = []; var openDependents = this.getOpenDependents(); for (var index = 0; index < openDependents.length; index++) { result.push.apply(result, __spread(openDependents[index].getClickableDependentElements())); } return result; }, getClickableDependentElements: function getClickableDependentElements() { var result = [this.$el]; if (this.$refs.content) result.push(this.$refs.content); result.push.apply(result, __spread(this.getOpenDependentElements())); return result; } } }); /***/ }), /***/ "./src/mixins/detachable.js": /*!**********************************!*\ !*** ./src/mixins/detachable.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _bootable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bootable */ "./src/mixins/bootable.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/console */ "./src/util/console.ts"); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function validateAttachTarget(val) { var type = typeof val === 'undefined' ? 'undefined' : _typeof(val); if (type === 'boolean' || type === 'string') return true; return val.nodeType === Node.ELEMENT_NODE; } /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'detachable', mixins: [_bootable__WEBPACK_IMPORTED_MODULE_0__["default"]], props: { attach: { type: null, default: false, validator: validateAttachTarget }, contentClass: { default: '' } }, data: function data() { return { hasDetached: false }; }, watch: { attach: function attach() { this.hasDetached = false; this.initDetach(); }, hasContent: 'initDetach' }, mounted: function mounted() { !this.lazy && this.initDetach(); }, deactivated: function deactivated() { this.isActive = false; }, beforeDestroy: function beforeDestroy() { if (!this.$refs.content) return; // IE11 Fix try { this.$refs.content.parentNode.removeChild(this.$refs.content); } catch (e) { console.log(e); } }, methods: { getScopeIdAttrs: function getScopeIdAttrs() { var _a; var scopeId = this.$vnode && this.$vnode.context.$options._scopeId; return scopeId && (_a = {}, _a[scopeId] = '', _a); }, initDetach: function initDetach() { if (this._isDestroyed || !this.$refs.content || this.hasDetached || // Leave menu in place if attached // and dev has not changed target this.attach === '' || // If used as a boolean prop (<v-menu attach>) this.attach === true || // If bound to a boolean (<v-menu :attach="true">) this.attach === 'attach' // If bound as boolean prop in pug (v-menu(attach)) ) return; var target; if (this.attach === false) { // Default, detach to app target = document.querySelector('[data-app]'); } else if (typeof this.attach === 'string') { // CSS selector target = document.querySelector(this.attach); } else { // DOM Element target = this.attach; } if (!target) { Object(_util_console__WEBPACK_IMPORTED_MODULE_1__["consoleWarn"])("Unable to locate target " + (this.attach || '[data-app]'), this); return; } target.insertBefore(this.$refs.content, target.firstChild); this.hasDetached = true; } } }); /***/ }), /***/ "./src/mixins/filterable.js": /*!**********************************!*\ !*** ./src/mixins/filterable.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'filterable', props: { noDataText: { type: String, default: '$vuetify.noDataText' } } }); /***/ }), /***/ "./src/mixins/loadable.ts": /*!********************************!*\ !*** ./src/mixins/loadable.ts ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components_VProgressLinear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/VProgressLinear */ "./src/components/VProgressLinear/index.ts"); /** * Loadable * * @mixin * * Used to add linear progress bar to components * Can use a default bar with a specific color * or designate a custom progress linear bar */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend().extend({ name: 'loadable', props: { loading: { type: [Boolean, String], default: false } }, methods: { genProgress: function genProgress() { if (this.loading === false) return null; return this.$slots.progress || this.$createElement(_components_VProgressLinear__WEBPACK_IMPORTED_MODULE_1__["default"], { props: { color: this.loading === true || this.loading === '' ? this.color || 'primary' : this.loading, height: 2, indeterminate: true } }); } } })); /***/ }), /***/ "./src/mixins/maskable.js": /*!********************************!*\ !*** ./src/mixins/maskable.js ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_mask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/mask */ "./src/util/mask.js"); /** * Maskable * * @mixin * * Creates an input mask that is * generated from a masked str * * Example: mask="#### #### #### ####" */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'maskable', props: { dontFillMaskBlanks: Boolean, mask: { type: [Object, String], default: null }, returnMaskedValue: Boolean }, data: function data() { return { selection: 0, lazySelection: 0, preDefined: { 'credit-card': '#### - #### - #### - ####', 'date': '##/##/####', 'date-with-time': '##/##/#### ##:##', 'phone': '(###) ### - ####', 'social': '###-##-####', 'time': '##:##', 'time-with-seconds': '##:##:##' } }; }, computed: { masked: function masked() { var preDefined = this.preDefined[this.mask]; var mask = preDefined || this.mask || ''; return mask.split(''); } }, watch: { /** * Make sure the cursor is in the correct * location when the mask changes */ mask: function mask() { var _this = this; if (!this.$refs.input) return; var oldValue = this.$refs.input.value; var newValue = this.maskText(Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["unmaskText"])(this.lazyValue)); var position = 0; var selection = this.selection; for (var index = 0; index < selection; index++) { Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["isMaskDelimiter"])(oldValue[index]) || position++; } selection = 0; if (newValue) { for (var index = 0; index < newValue.length; index++) { Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["isMaskDelimiter"])(newValue[index]) || position--; selection++; if (position <= 0) break; } } this.$nextTick(function () { _this.$refs.input.value = newValue; _this.setCaretPosition(selection); }); } }, beforeMount: function beforeMount() { if (!this.mask || this.value == null || !this.returnMaskedValue) return; var value = this.maskText(this.value); // See if masked value does not // match the user given value if (value === this.value) return; this.$emit('input', value); }, methods: { setCaretPosition: function setCaretPosition(selection) { var _this = this; this.selection = selection; window.setTimeout(function () { _this.$refs.input && _this.$refs.input.setSelectionRange(_this.selection, _this.selection); }, 0); }, updateRange: function updateRange() { if (!this.$refs.input) return; var newValue = this.maskText(this.lazyValue); var selection = 0; this.$refs.input.value = newValue; if (newValue) { for (var index = 0; index < newValue.length; index++) { if (this.lazySelection <= 0) break; Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["isMaskDelimiter"])(newValue[index]) || this.lazySelection--; selection++; } } this.setCaretPosition(selection); // this.$emit() must occur only when all internal values are correct this.$emit('input', this.returnMaskedValue ? this.$refs.input.value : this.lazyValue); }, maskText: function maskText(text) { return this.mask ? Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["maskText"])(text, this.masked, this.dontFillMaskBlanks) : text; }, unmaskText: function unmaskText(text) { return this.mask && !this.returnMaskedValue ? Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["unmaskText"])(text) : text; }, // When the input changes and is // re-created, ensure that the // caret location is correct setSelectionRange: function setSelectionRange() { this.$nextTick(this.updateRange); }, resetSelections: function resetSelections(input) { if (!input.selectionEnd) return; this.selection = input.selectionEnd; this.lazySelection = 0; for (var index = 0; index < this.selection; index++) { Object(_util_mask__WEBPACK_IMPORTED_MODULE_0__["isMaskDelimiter"])(input.value[index]) || this.lazySelection++; } } } }); /***/ }), /***/ "./src/mixins/menuable.js": /*!********************************!*\ !*** ./src/mixins/menuable.js ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _positionable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./positionable */ "./src/mixins/positionable.ts"); /* harmony import */ var _stackable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stackable */ "./src/mixins/stackable.js"); /* harmony import */ var _themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themeable */ "./src/mixins/themeable.ts"); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* eslint-disable object-property-newline */ var dimensions = { activator: { top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0, offsetTop: 0, scrollHeight: 0 }, content: { top: 0, left: 0, bottom: 0, right: 0, width: 0, height: 0, offsetTop: 0, scrollHeight: 0 }, hasWindow: false }; /* eslint-enable object-property-newline */ /** * Menuable * * @mixin * * Used for fixed or absolutely positioning * elements within the DOM * Can calculate X and Y axis overflows * As well as be manually positioned */ /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'menuable', mixins: [_positionable__WEBPACK_IMPORTED_MODULE_0__["default"], _stackable__WEBPACK_IMPORTED_MODULE_1__["default"], _themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { activator: { default: null, validator: function validator(val) { return ['string', 'object'].includes(typeof val === 'undefined' ? 'undefined' : _typeof(val)); } }, allowOverflow: Boolean, inputActivator: Boolean, maxWidth: { type: [Number, String], default: 'auto' }, minWidth: [Number, String], nudgeBottom: { type: [Number, String], default: 0 }, nudgeLeft: { type: [Number, String], default: 0 }, nudgeRight: { type: [Number, String], default: 0 }, nudgeTop: { type: [Number, String], default: 0 }, nudgeWidth: { type: [Number, String], default: 0 }, offsetOverflow: Boolean, positionX: { type: Number, default: null }, positionY: { type: Number, default: null }, zIndex: { type: [Number, String], default: null } }, data: function data() { return { absoluteX: 0, absoluteY: 0, dimensions: Object.assign({}, dimensions), isContentActive: false, pageYOffset: 0, stackClass: 'v-menu__content--active', stackMinZIndex: 6 }; }, computed: { computedLeft: function computedLeft() { var a = this.dimensions.activator; var c = this.dimensions.content; var minWidth = a.width < c.width ? c.width : a.width; var left = 0; left += this.left ? a.left - (minWidth - a.width) : a.left; if (this.offsetX) left += this.left ? -a.width : a.width; if (this.nudgeLeft) left -= parseInt(this.nudgeLeft); if (this.nudgeRight) left += parseInt(this.nudgeRight); return left; }, computedTop: function computedTop() { var a = this.dimensions.activator; var c = this.dimensions.content; var top = this.top ? a.bottom - c.height : a.top; if (!this.isAttached) top += this.pageYOffset; if (this.offsetY) top += this.top ? -a.height : a.height; if (this.nudgeTop) top -= parseInt(this.nudgeTop); if (this.nudgeBottom) top += parseInt(this.nudgeBottom); return top; }, hasActivator: function hasActivator() { return !!this.$slots.activator || this.activator || this.inputActivator; }, isAttached: function isAttached() { return this.attach !== false; } }, watch: { disabled: function disabled(val) { val && this.callDeactivate(); }, isActive: function isActive(val) { if (this.disabled) return; val ? this.callActivate() : this.callDeactivate(); } }, beforeMount: function beforeMount() { this.checkForWindow(); }, methods: { absolutePosition: function absolutePosition() { return { offsetTop: 0, scrollHeight: 0, top: this.positionY || this.absoluteY, bottom: this.positionY || this.absoluteY, left: this.positionX || this.absoluteX, right: this.positionX || this.absoluteX, height: 0, width: 0 }; }, activate: function activate() {}, calcLeft: function calcLeft() { return (this.isAttached ? this.computedLeft : this.calcXOverflow(this.computedLeft)) + "px"; }, calcTop: function calcTop() { return (this.isAttached ? this.computedTop : this.calcYOverflow(this.computedTop)) + "px"; }, calcXOverflow: function calcXOverflow(left) { var parsedMaxWidth = isNaN(parseInt(this.maxWidth)) ? 0 : parseInt(this.maxWidth); var innerWidth = this.getInnerWidth(); var maxWidth = Math.max(this.dimensions.content.width, parsedMaxWidth); var totalWidth = left + maxWidth; var availableWidth = totalWidth - innerWidth; if ((!this.left || this.right) && availableWidth > 0) { left = innerWidth - maxWidth - (innerWidth > 600 ? 30 : 12) // Account for scrollbar ; } if (left < 0) left = 12; return left; }, calcYOverflow: function calcYOverflow(top) { var documentHeight = this.getInnerHeight(); var toTop = this.pageYOffset + documentHeight; var activator = this.dimensions.activator; var contentHeight = this.dimensions.content.height; var totalHeight = top + contentHeight; var isOverflowing = toTop < totalHeight; // If overflowing bottom and offset // TODO: set 'bottom' position instead of 'top' if (isOverflowing && this.offsetOverflow && // If we don't have enough room to offset // the overflow, don't offset activator.top > contentHeight) { top = this.pageYOffset + (activator.top - contentHeight); // If overflowing bottom } else if (isOverflowing && !this.allowOverflow) { top = toTop - contentHeight - 12; // If overflowing top } else if (top < this.pageYOffset && !this.allowOverflow) { top = this.pageYOffset + 12; } return top < 12 ? 12 : top; }, callActivate: function callActivate() { if (!this.hasWindow) return; this.activate(); }, callDeactivate: function callDeactivate() { this.isContentActive = false; this.deactivate(); }, checkForWindow: function checkForWindow() { if (!this.hasWindow) { this.hasWindow = typeof window !== 'undefined'; } }, checkForPageYOffset: function checkForPageYOffset() { if (this.hasWindow) { this.pageYOffset = this.getOffsetTop(); } }, deactivate: function deactivate() {}, getActivator: function getActivator() { if (this.inputActivator) { return this.$el.querySelector('.v-input__slot'); } if (this.activator) { return typeof this.activator === 'string' ? document.querySelector(this.activator) : this.activator; } return this.$refs.activator.children.length > 0 ? this.$refs.activator.children[0] : this.$refs.activator; }, getInnerHeight: function getInnerHeight() { if (!this.hasWindow) return 0; return window.innerHeight || document.documentElement.clientHeight; }, getInnerWidth: function getInnerWidth() { if (!this.hasWindow) return 0; return window.innerWidth; }, getOffsetTop: function getOffsetTop() { if (!this.hasWindow) return 0; return window.pageYOffset || document.documentElement.scrollTop; }, getRoundedBoundedClientRect: function getRoundedBoundedClientRect(el) { var rect = el.getBoundingClientRect(); return { top: Math.round(rect.top), left: Math.round(rect.left), bottom: Math.round(rect.bottom), right: Math.round(rect.right), width: Math.round(rect.width), height: Math.round(rect.height) }; }, measure: function measure(el, selector) { el = selector ? el.querySelector(selector) : el; if (!el || !this.hasWindow) return null; var rect = this.getRoundedBoundedClientRect(el); // Account for activator margin if (this.isAttached) { var style = window.getComputedStyle(el); rect.left = parseInt(style.marginLeft); rect.top = parseInt(style.marginTop); } return rect; }, sneakPeek: function sneakPeek(cb) { var _this = this; requestAnimationFrame(function () { var el = _this.$refs.content; if (!el || _this.isShown(el)) return cb(); el.style.display = 'inline-block'; cb(); el.style.display = 'none'; }); }, startTransition: function startTransition() { var _this = this; requestAnimationFrame(function () { return _this.isContentActive = true; }); }, isShown: function isShown(el) { return el.style.display !== 'none'; }, updateDimensions: function updateDimensions() { var _this = this; this.checkForWindow(); this.checkForPageYOffset(); var dimensions = {}; // Activator should already be shown dimensions.activator = !this.hasActivator || this.absolute ? this.absolutePosition() : this.measure(this.getActivator()); // Display and hide to get dimensions this.sneakPeek(function () { dimensions.content = _this.measure(_this.$refs.content); _this.dimensions = dimensions; }); } } }); /***/ }), /***/ "./src/mixins/overlayable.js": /*!***********************************!*\ !*** ./src/mixins/overlayable.js ***! \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _stylus_components_overlay_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stylus/components/_overlay.styl */ "./src/stylus/components/_overlay.styl"); /* harmony import */ var _stylus_components_overlay_styl__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_stylus_components_overlay_styl__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'overlayable', props: { hideOverlay: Boolean }, data: function data() { return { overlay: null, overlayOffset: 0, overlayTimeout: null, overlayTransitionDuration: 500 + 150 // transition + delay }; }, beforeDestroy: function beforeDestroy() { this.removeOverlay(); }, methods: { genOverlay: function genOverlay() { var _this = this; // If fn is called and timeout is active // or overlay already exists // cancel removal of overlay and re-add active if (!this.isActive || this.hideOverlay || this.isActive && this.overlayTimeout || this.overlay) { clearTimeout(this.overlayTimeout); return this.overlay && this.overlay.classList.add('v-overlay--active'); } this.overlay = document.createElement('div'); this.overlay.className = 'v-overlay'; if (this.absolute) this.overlay.className += ' v-overlay--absolute'; this.hideScroll(); var parent = this.absolute ? this.$el.parentNode : document.querySelector('[data-app]'); parent && parent.insertBefore(this.overlay, parent.firstChild); // eslint-disable-next-line no-unused-expressions this.overlay.clientHeight; // Force repaint requestAnimationFrame(function () { // https://github.com/vuetifyjs/vuetify/issues/4678 if (!_this.overlay) return; _this.overlay.className += ' v-overlay--active'; if (_this.activeZIndex !== undefined) { _this.overlay.style.zIndex = _this.activeZIndex - 1; } }); return true; }, removeOverlay: function removeOverlay() { var _this = this; if (!this.overlay) { return this.showScroll(); } this.overlay.classList.remove('v-overlay--active'); this.overlayTimeout = setTimeout(function () { // IE11 Fix try { if (_this.overlay && _this.overlay.parentNode) { _this.overlay.parentNode.removeChild(_this.overlay); } _this.overlay = null; _this.showScroll(); } catch (e) { console.log(e); } clearTimeout(_this.overlayTimeout); _this.overlayTimeout = null; }, this.overlayTransitionDuration); }, /** * @param {Event} e * @returns void */ scrollListener: function scrollListener(e) { if (e.type === 'keydown') { if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName) || // https://github.com/vuetifyjs/vuetify/issues/4715 e.target.isContentEditable) return; var up = [_util_helpers__WEBPACK_IMPORTED_MODULE_1__["keyCodes"].up, _util_helpers__WEBPACK_IMPORTED_MODULE_1__["keyCodes"].pageup]; var down = [_util_helpers__WEBPACK_IMPORTED_MODULE_1__["keyCodes"].down, _util_helpers__WEBPACK_IMPORTED_MODULE_1__["keyCodes"].pagedown]; if (up.includes(e.keyCode)) { e.deltaY = -1; } else if (down.includes(e.keyCode)) { e.deltaY = 1; } else { return; } } if (e.target === this.overlay || e.type !== 'keydown' && e.target === document.body || this.checkPath(e)) e.preventDefault(); }, hasScrollbar: function hasScrollbar(el) { if (!el || el.nodeType !== Node.ELEMENT_NODE) return false; var style = window.getComputedStyle(el); return ['auto', 'scroll'].includes(style['overflow-y']) && el.scrollHeight > el.clientHeight; }, shouldScroll: function shouldScroll(el, delta) { if (el.scrollTop === 0 && delta < 0) return true; return el.scrollTop + el.clientHeight === el.scrollHeight && delta > 0; }, isInside: function isInside(el, parent) { if (el === parent) { return true; } else if (el === null || el === document.body) { return false; } else { return this.isInside(el.parentNode, parent); } }, /** * @param {Event} e * @returns boolean */ checkPath: function checkPath(e) { var path = e.path || this.composedPath(e); var delta = e.deltaY || -e.wheelDelta; if (e.type === 'keydown' && path[0] === document.body) { var dialog = this.$refs.dialog; var selected = window.getSelection().anchorNode; if (this.hasScrollbar(dialog) && this.isInside(selected, dialog)) { return this.shouldScroll(dialog, delta); } return true; } for (var index = 0; index < path.length; index++) { var el = path[index]; if (el === document) return true; if (el === document.documentElement) return true; if (el === this.$refs.content) return true; if (this.hasScrollbar(el)) return this.shouldScroll(el, delta); } return true; }, /** * Polyfill for Event.prototype.composedPath * @param {Event} e * @returns Element[] */ composedPath: function composedPath(e) { if (e.composedPath) return e.composedPath(); var path = []; var el = e.target; while (el) { path.push(el); if (el.tagName === 'HTML') { path.push(document); path.push(window); return path; } el = el.parentElement; } }, hideScroll: function hideScroll() { if (this.$vuetify.breakpoint.smAndDown) { document.documentElement.classList.add('overflow-y-hidden'); } else { window.addEventListener('wheel', this.scrollListener); window.addEventListener('keydown', this.scrollListener); } }, showScroll: function showScroll() { document.documentElement.classList.remove('overflow-y-hidden'); window.removeEventListener('wheel', this.scrollListener); window.removeEventListener('keydown', this.scrollListener); } } }); /***/ }), /***/ "./src/mixins/picker-button.js": /*!*************************************!*\ !*** ./src/mixins/picker-button.js ***! \*************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ methods: { genPickerButton: function genPickerButton(prop, value, content, staticClass) { var _this = this; if (staticClass === void 0) { staticClass = ''; } var active = this[prop] === value; var click = function click(event) { event.stopPropagation(); _this.$emit("update:" + prop, value); }; return this.$createElement('div', { staticClass: ("v-picker__title__btn " + staticClass).trim(), 'class': { active: active }, on: active ? undefined : { click: click } }, Array.isArray(content) ? content : [content]); } } }); /***/ }), /***/ "./src/mixins/picker.js": /*!******************************!*\ !*** ./src/mixins/picker.js ***! \******************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_VPicker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/VPicker */ "./src/components/VPicker/index.js"); /* harmony import */ var _colorable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colorable */ "./src/mixins/colorable.ts"); /* harmony import */ var _themeable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themeable */ "./src/mixins/themeable.ts"); // Components // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'picker', mixins: [_colorable__WEBPACK_IMPORTED_MODULE_1__["default"], _themeable__WEBPACK_IMPORTED_MODULE_2__["default"]], props: { fullWidth: Boolean, headerColor: String, landscape: Boolean, noTitle: Boolean, width: { type: [Number, String], default: 290, validator: function validator(value) { return parseInt(value, 10) > 0; } } }, methods: { genPickerTitle: function genPickerTitle() {}, genPickerBody: function genPickerBody() {}, genPickerActionsSlot: function genPickerActionsSlot() { return this.$scopedSlots.default ? this.$scopedSlots.default({ save: this.save, cancel: this.cancel }) : this.$slots.default; }, genPicker: function genPicker(staticClass) { return this.$createElement(_components_VPicker__WEBPACK_IMPORTED_MODULE_0__["default"], { staticClass: staticClass, class: this.fullWidth ? ['v-picker--full-width'] : [], props: { color: this.headerColor || this.color, dark: this.dark, fullWidth: this.fullWidth, landscape: this.landscape, light: this.light, width: this.width } }, [this.noTitle ? null : this.genPickerTitle(), this.genPickerBody(), this.$createElement('template', { slot: 'actions' }, [this.genPickerActionsSlot()])]); } } }); /***/ }), /***/ "./src/mixins/positionable.ts": /*!************************************!*\ !*** ./src/mixins/positionable.ts ***! \************************************/ /*! exports provided: factory, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "factory", function() { return factory; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); var availableProps = { absolute: Boolean, bottom: Boolean, fixed: Boolean, left: Boolean, right: Boolean, top: Boolean }; function factory(selected) { if (selected === void 0) { selected = []; } return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'positionable', props: selected.length ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_1__["filterObjectOnKeys"])(availableProps, selected) : availableProps }); } /* harmony default export */ __webpack_exports__["default"] = (factory()); // Add a `*` before the second `/` /* Tests / let single = factory(['top']).extend({ created () { this.top this.bottom this.absolute } }) let some = factory(['top', 'bottom']).extend({ created () { this.top this.bottom this.absolute } }) let all = factory().extend({ created () { this.top this.bottom this.absolute this.foobar } }) /**/ /***/ }), /***/ "./src/mixins/registrable.ts": /*!***********************************!*\ !*** ./src/mixins/registrable.ts ***! \***********************************/ /*! exports provided: inject, provide */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provide", function() { return provide; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/console */ "./src/util/console.ts"); function generateWarning(child, parent) { return function () { return Object(_util_console__WEBPACK_IMPORTED_MODULE_1__["consoleWarn"])("The " + child + " component must be used inside a " + parent); }; } function inject(namespace, child, parent) { var _a; var defaultImpl = child && parent ? { register: generateWarning(child, parent), unregister: generateWarning(child, parent) } : null; return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'registrable-inject', inject: (_a = {}, _a[namespace] = { default: defaultImpl }, _a) }); } function provide(namespace) { return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'registrable-provide', methods: { register: null, unregister: null }, provide: function provide() { var _a; return _a = {}, _a[namespace] = { register: this.register, unregister: this.unregister }, _a; } }); } /***/ }), /***/ "./src/mixins/returnable.js": /*!**********************************!*\ !*** ./src/mixins/returnable.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'returnable', props: { returnValue: null }, data: function data() { return { originalValue: null }; }, watch: { isActive: function isActive(val) { if (val) { this.originalValue = this.returnValue; } else { this.$emit('update:returnValue', this.originalValue); } } }, methods: { save: function save(value) { this.originalValue = value; this.isActive = false; } } }); /***/ }), /***/ "./src/mixins/rippleable.ts": /*!**********************************!*\ !*** ./src/mixins/rippleable.ts ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../directives/ripple */ "./src/directives/ripple.ts"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); // Types /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_1___default.a.extend({ name: 'rippleable', directives: { Ripple: _directives_ripple__WEBPACK_IMPORTED_MODULE_0__["default"] }, props: { ripple: { type: [Boolean, Object], default: true } }, methods: { genRipple: function genRipple(data) { if (data === void 0) { data = {}; } if (!this.ripple) return null; data.staticClass = 'v-input--selection-controls__ripple'; data.directives = data.directives || []; data.directives.push({ name: 'ripple', value: { center: true } }); data.on = Object.assign({ click: this.onChange }, this.$listeners); return this.$createElement('div', data); }, onChange: function onChange() {} } })); /***/ }), /***/ "./src/mixins/routable.ts": /*!********************************!*\ !*** ./src/mixins/routable.ts ***! \********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _directives_ripple__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../directives/ripple */ "./src/directives/ripple.ts"); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'routable', directives: { Ripple: _directives_ripple__WEBPACK_IMPORTED_MODULE_1__["default"] }, props: { activeClass: String, append: Boolean, disabled: Boolean, exact: { type: Boolean, default: undefined }, exactActiveClass: String, href: [String, Object], to: [String, Object], nuxt: Boolean, replace: Boolean, ripple: [Boolean, Object], tag: String, target: String }, methods: { /* eslint-disable-next-line no-unused-vars */ click: function click(e) {}, generateRouteLink: function generateRouteLink() { var _a; var exact = this.exact; var tag; var data = (_a = { attrs: { disabled: this.disabled }, class: this.classes, props: {}, directives: [{ name: 'ripple', value: this.ripple && !this.disabled ? this.ripple : false }] }, _a[this.to ? 'nativeOn' : 'on'] = __assign({}, this.$listeners, { click: this.click }), _a); if (typeof this.exact === 'undefined') { exact = this.to === '/' || this.to === Object(this.to) && this.to.path === '/'; } if (this.to) { // Add a special activeClass hook // for component level styles var activeClass = this.activeClass; var exactActiveClass = this.exactActiveClass || activeClass; // TODO: apply only in VListTile if (this.proxyClass) { activeClass += ' ' + this.proxyClass; exactActiveClass += ' ' + this.proxyClass; } tag = this.nuxt ? 'nuxt-link' : 'router-link'; Object.assign(data.props, { to: this.to, exact: exact, activeClass: activeClass, exactActiveClass: exactActiveClass, append: this.append, replace: this.replace }); } else { tag = this.href && 'a' || this.tag || 'a'; if (tag === 'a' && this.href) data.attrs.href = this.href; } if (this.target) data.attrs.target = this.target; return { tag: tag, data: data }; } } })); /***/ }), /***/ "./src/mixins/selectable.js": /*!**********************************!*\ !*** ./src/mixins/selectable.js ***! \**********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _components_VInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/VInput */ "./src/components/VInput/index.js"); /* harmony import */ var _rippleable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rippleable */ "./src/mixins/rippleable.ts"); /* harmony import */ var _comparable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./comparable */ "./src/mixins/comparable.ts"); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); // Components // Mixins // Utils /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'selectable', extends: _components_VInput__WEBPACK_IMPORTED_MODULE_0__["default"], mixins: [_rippleable__WEBPACK_IMPORTED_MODULE_1__["default"], _comparable__WEBPACK_IMPORTED_MODULE_2__["default"]], model: { prop: 'inputValue', event: 'change' }, props: { color: { type: String, default: 'accent' }, id: String, inputValue: null, falseValue: null, trueValue: null, multiple: { type: Boolean, default: null }, label: String, toggleKeys: { type: Array, default: function _default() { return [_util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].enter, _util_helpers__WEBPACK_IMPORTED_MODULE_3__["keyCodes"].space]; } } }, data: function data(vm) { return { lazyValue: vm.inputValue }; }, computed: { classesSelectable: function classesSelectable() { return this.addTextColorClassChecks({}, this.isDirty ? this.color : this.validationState); }, isMultiple: function isMultiple() { return this.multiple === true || this.multiple === null && Array.isArray(this.internalValue); }, isActive: function isActive() { var _this = this; var value = this.value; var input = this.internalValue; if (this.isMultiple) { if (!Array.isArray(input)) return false; return input.some(function (item) { return _this.valueComparator(item, value); }); } if (this.trueValue === undefined || this.falseValue === undefined) { return value ? this.valueComparator(value, input) : Boolean(input); } return this.valueComparator(input, this.trueValue); }, isDirty: function isDirty() { return this.isActive; } }, watch: { inputValue: function inputValue(val) { this.internalValue = val; } }, methods: { genLabel: function genLabel() { if (!this.hasLabel) return null; var label = _components_VInput__WEBPACK_IMPORTED_MODULE_0__["default"].methods.genLabel.call(this); label.data.on = { click: this.onChange }; return label; }, genInput: function genInput(type, attrs) { return this.$createElement('input', { attrs: Object.assign({}, { 'aria-label': this.label, 'aria-checked': this.isActive.toString(), id: this.id, role: type, type: type, value: this.inputValue }, attrs), on: { blur: this.onBlur, change: this.onChange, focus: this.onFocus, keydown: this.onKeydown } }); }, onBlur: function onBlur() { this.isFocused = false; }, onChange: function onChange() { var _this = this; if (this.isDisabled) return; var value = this.value; var input = this.internalValue; if (this.isMultiple) { if (!Array.isArray(input)) { input = []; } var length = input.length; input = input.filter(function (item) { return !_this.valueComparator(item, value); }); if (input.length === length) { input.push(value); } } else if (this.trueValue !== undefined && this.falseValue !== undefined) { input = this.valueComparator(input, this.trueValue) ? this.falseValue : this.trueValue; } else if (value) { input = this.valueComparator(input, value) ? null : value; } else { input = !input; } this.validate(true, input); this.lazyValue = input; this.$emit('change', input); }, onFocus: function onFocus() { this.isFocused = true; }, onKeydown: function onKeydown(e) { // Overwrite default behavior to only allow // the specified keyCodes if (this.toggleKeys.indexOf(e.keyCode) > -1) { e.preventDefault(); this.onChange(); } } } }); /***/ }), /***/ "./src/mixins/ssr-bootable.ts": /*!************************************!*\ !*** ./src/mixins/ssr-bootable.ts ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /** * SSRBootable * * @mixin * * Used in layout components (drawer, toolbar, content) * to avoid an entry animation when using SSR */ /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'ssr-bootable', data: function data() { return { isBooted: false }; }, mounted: function mounted() { var _this = this; // Use setAttribute instead of dataset // because dataset does not work well // with unit tests window.requestAnimationFrame(function () { _this.$el.setAttribute('data-booted', 'true'); _this.isBooted = true; }); } })); /***/ }), /***/ "./src/mixins/stackable.js": /*!*********************************!*\ !*** ./src/mixins/stackable.js ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); var __read = undefined && undefined.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { ar.push(r.value); } } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = undefined && undefined.__spread || function () { for (var ar = [], i = 0; i < arguments.length; i++) { ar = ar.concat(__read(arguments[i])); }return ar; }; /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'stackable', data: function data() { return { stackBase: null, stackClass: 'unpecified', stackElement: null, stackExclude: null, stackMinZIndex: 0 }; }, computed: { /** * Currently active z-index * * @return {number} */ activeZIndex: function activeZIndex() { if (typeof window === 'undefined') return 0; var content = this.stackElement || this.$refs.content; // Return current zindex if not active var index = !this.isActive ? Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["getZIndex"])(content) : this.getMaxZIndex(this.stackExclude || [content]) + 2; if (index == null) return index; // Return max current z-index (excluding self) + 2 // (2 to leave room for an overlay below, if needed) return parseInt(index); } }, methods: { getMaxZIndex: function getMaxZIndex(exclude) { if (exclude === void 0) { exclude = []; } var base = this.stackBase || this.$el; // Start with lowest allowed z-index or z-index of // base component's element, whichever is greater var zis = [this.stackMinZIndex, Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["getZIndex"])(base)]; // Convert the NodeList to an array to // prevent an Edge bug with Symbol.iterator // https://github.com/vuetifyjs/vuetify/issues/2146 var activeElements = __spread(document.getElementsByClassName(this.stackClass)); // Get z-index for all active dialogs for (var index = 0; index < activeElements.length; index++) { if (!exclude.includes(activeElements[index])) { zis.push(Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["getZIndex"])(activeElements[index])); } } return Math.max.apply(Math, __spread(zis)); } } }); /***/ }), /***/ "./src/mixins/themeable.ts": /*!*********************************!*\ !*** ./src/mixins/themeable.ts ***! \*********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'themeable', props: { dark: Boolean, light: Boolean }, computed: { themeClasses: function themeClasses() { return { 'theme--light': this.light, 'theme--dark': this.dark }; } } })); /***/ }), /***/ "./src/mixins/toggleable.ts": /*!**********************************!*\ !*** ./src/mixins/toggleable.ts ***! \**********************************/ /*! exports provided: factory, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "factory", function() { return factory; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); function factory(prop, event) { if (prop === void 0) { prop = 'value'; } if (event === void 0) { event = 'input'; } var _a, _b; return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'toggleable', model: { prop: prop, event: event }, props: (_a = {}, _a[prop] = { required: false }, _a), data: function data() { return { isActive: !!this[prop] }; }, watch: (_b = {}, _b[prop] = function (val) { this.isActive = !!val; }, _b.isActive = function (val) { !!val !== this[prop] && this.$emit(event, val); }, _b) }); } /* eslint-disable-next-line no-redeclare */ var Toggleable = factory(); /* harmony default export */ __webpack_exports__["default"] = (Toggleable); /***/ }), /***/ "./src/mixins/transitionable.ts": /*!**************************************!*\ !*** ./src/mixins/transitionable.ts ***! \**************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'transitionable', props: { mode: String, origin: String, transition: String } })); /***/ }), /***/ "./src/mixins/translatable.ts": /*!************************************!*\ !*** ./src/mixins/translatable.ts ***! \************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* harmony default export */ __webpack_exports__["default"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ name: 'translatable', props: { height: Number }, data: function data() { return { parallax: 0, parallaxDist: 0, percentScrolled: 0, windowHeight: 0, windowBottom: 0 }; }, computed: { imgHeight: function imgHeight() { return this.objHeight(); } }, beforeDestroy: function beforeDestroy() { window.removeEventListener('scroll', this.translate, false); window.removeEventListener('resize', this.translate, false); }, methods: { calcDimensions: function calcDimensions() { this.parallaxDist = this.imgHeight - this.height; this.windowHeight = window.innerHeight; this.windowBottom = window.pageYOffset + this.windowHeight; }, listeners: function listeners() { window.addEventListener('scroll', this.translate, false); window.addEventListener('resize', this.translate, false); }, /** @abstract **/ objHeight: function objHeight() { throw new Error('Not implemented !'); }, translate: function translate() { this.calcDimensions(); this.percentScrolled = (this.windowBottom - this.$el.offsetTop) / (parseInt(this.height) + this.windowHeight); this.parallax = Math.round(this.parallaxDist * this.percentScrolled); } } })); /***/ }), /***/ "./src/mixins/validatable.js": /*!***********************************!*\ !*** ./src/mixins/validatable.js ***! \***********************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/helpers */ "./src/util/helpers.ts"); /* harmony import */ var _registrable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./registrable */ "./src/mixins/registrable.ts"); /* harmony import */ var _util_console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/console */ "./src/util/console.ts"); /* harmony import */ var _colorable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./colorable */ "./src/mixins/colorable.ts"); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; // Mixins /* @vue/component */ /* harmony default export */ __webpack_exports__["default"] = ({ name: 'validatable', mixins: [_colorable__WEBPACK_IMPORTED_MODULE_3__["default"], Object(_registrable__WEBPACK_IMPORTED_MODULE_1__["inject"])('form')], props: { error: Boolean, errorCount: { type: [Number, String], default: 1 }, errorMessages: { type: [String, Array], default: function _default() { return []; } }, messages: { type: [String, Array], default: function _default() { return []; } }, rules: { type: Array, default: function _default() { return []; } }, success: Boolean, successMessages: { type: [String, Array], default: function _default() { return []; } }, validateOnBlur: Boolean }, data: function data() { return { errorBucket: [], hasColor: false, hasFocused: false, hasInput: false, isResetting: false, valid: false }; }, computed: { hasError: function hasError() { return this.internalErrorMessages.length > 0 || this.errorBucket.length > 0 || this.error; }, externalError: function externalError() { return this.internalErrorMessages.length > 0 || this.error; }, // TODO: Add logic that allows the user to enable based // upon a good validation hasSuccess: function hasSuccess() { return this.successMessages.length > 0 || this.success; }, hasMessages: function hasMessages() { return this.validations.length > 0; }, hasState: function hasState() { return this.shouldValidate && (this.hasError || this.hasSuccess); }, internalErrorMessages: function internalErrorMessages() { return this.errorMessages || ''; }, shouldValidate: function shouldValidate() { return this.externalError || !this.isResetting && (this.validateOnBlur ? this.hasFocused && !this.isFocused : this.hasInput || this.hasFocused); }, validations: function validations() { return this.validationTarget.slice(0, this.errorCount); }, validationState: function validationState() { if (this.hasError && this.shouldValidate) return 'error'; if (this.hasSuccess && this.shouldValidate) return 'success'; if (this.hasColor) return this.color; return null; }, validationTarget: function validationTarget() { var target = this.internalErrorMessages.length > 0 ? this.errorMessages : this.successMessages.length > 0 ? this.successMessages : this.messages; // String if (!Array.isArray(target)) { return [target]; // Array with items } else if (target.length > 0) { return target; // Currently has validation } else if (this.shouldValidate) { return this.errorBucket; } else { return []; } } }, watch: { rules: { handler: function handler(newVal, oldVal) { if (Object(_util_helpers__WEBPACK_IMPORTED_MODULE_0__["deepEqual"])(newVal, oldVal)) return; this.validate(); }, deep: true }, internalValue: function internalValue() { // If it's the first time we're setting input, // mark it with hasInput this.hasInput = true; this.validateOnBlur || this.$nextTick(this.validate); }, isFocused: function isFocused(val) { if (!val) { this.hasFocused = true; this.validateOnBlur && this.validate(); } }, isResetting: function isResetting() { var _this = this; setTimeout(function () { _this.hasInput = false; _this.hasFocused = false; _this.isResetting = false; }, 0); }, hasError: function hasError(val) { if (this.shouldValidate) { this.$emit('update:error', val); } } }, beforeMount: function beforeMount() { this.validate(); }, created: function created() { this.form && this.form.register(this); }, beforeDestroy: function beforeDestroy() { this.form && this.form.unregister(this); }, methods: { reset: function reset() { this.isResetting = true; this.internalValue = Array.isArray(this.internalValue) ? [] : undefined; }, validate: function validate(force, value) { if (force === void 0) { force = false; } if (value === void 0) { value = this.internalValue; } var errorBucket = []; if (force) this.hasInput = this.hasFocused = true; for (var index = 0; index < this.rules.length; index++) { var rule = this.rules[index]; var valid = typeof rule === 'function' ? rule(value) : rule; if (valid === false || typeof valid === 'string') { errorBucket.push(valid); } else if (valid !== true) { Object(_util_console__WEBPACK_IMPORTED_MODULE_2__["consoleError"])("Rules should return a string or boolean, received '" + (typeof valid === 'undefined' ? 'undefined' : _typeof(valid)) + "' instead", this); } } this.errorBucket = errorBucket; this.valid = errorBucket.length === 0; return this.valid; } } }); /***/ }), /***/ "./src/stylus/app.styl": /*!*****************************!*\ !*** ./src/stylus/app.styl ***! \*****************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_alerts.styl": /*!********************************************!*\ !*** ./src/stylus/components/_alerts.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_app.styl": /*!*****************************************!*\ !*** ./src/stylus/components/_app.styl ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_autocompletes.styl": /*!***************************************************!*\ !*** ./src/stylus/components/_autocompletes.styl ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_avatars.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_avatars.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_badges.styl": /*!********************************************!*\ !*** ./src/stylus/components/_badges.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_bottom-navs.styl": /*!*************************************************!*\ !*** ./src/stylus/components/_bottom-navs.styl ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_bottom-sheets.styl": /*!***************************************************!*\ !*** ./src/stylus/components/_bottom-sheets.styl ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_breadcrumbs.styl": /*!*************************************************!*\ !*** ./src/stylus/components/_breadcrumbs.styl ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_button-toggle.styl": /*!***************************************************!*\ !*** ./src/stylus/components/_button-toggle.styl ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_buttons.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_buttons.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_cards.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_cards.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_carousel.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_carousel.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_chips.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_chips.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_content.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_content.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_counters.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_counters.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_data-iterator.styl": /*!***************************************************!*\ !*** ./src/stylus/components/_data-iterator.styl ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_data-table.styl": /*!************************************************!*\ !*** ./src/stylus/components/_data-table.styl ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_date-picker-header.styl": /*!********************************************************!*\ !*** ./src/stylus/components/_date-picker-header.styl ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_date-picker-table.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_date-picker-table.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_date-picker-title.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_date-picker-title.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_date-picker-years.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_date-picker-years.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_dialogs.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_dialogs.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_dividers.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_dividers.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_expansion-panel.styl": /*!*****************************************************!*\ !*** ./src/stylus/components/_expansion-panel.styl ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_footer.styl": /*!********************************************!*\ !*** ./src/stylus/components/_footer.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_forms.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_forms.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_grid.styl": /*!******************************************!*\ !*** ./src/stylus/components/_grid.styl ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_icons.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_icons.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_inputs.styl": /*!********************************************!*\ !*** ./src/stylus/components/_inputs.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_jumbotrons.styl": /*!************************************************!*\ !*** ./src/stylus/components/_jumbotrons.styl ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_labels.styl": /*!********************************************!*\ !*** ./src/stylus/components/_labels.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_lists.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_lists.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_menus.styl": /*!*******************************************!*\ !*** ./src/stylus/components/_menus.styl ***! \*******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_messages.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_messages.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_navigation-drawer.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_navigation-drawer.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_overflow-buttons.styl": /*!******************************************************!*\ !*** ./src/stylus/components/_overflow-buttons.styl ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_overlay.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_overlay.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_pagination.styl": /*!************************************************!*\ !*** ./src/stylus/components/_pagination.styl ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_parallax.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_parallax.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_pickers.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_pickers.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_progress-circular.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_progress-circular.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_progress-linear.styl": /*!*****************************************************!*\ !*** ./src/stylus/components/_progress-linear.styl ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_radio-group.styl": /*!*************************************************!*\ !*** ./src/stylus/components/_radio-group.styl ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_radios.styl": /*!********************************************!*\ !*** ./src/stylus/components/_radios.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_range-sliders.styl": /*!***************************************************!*\ !*** ./src/stylus/components/_range-sliders.styl ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_select.styl": /*!********************************************!*\ !*** ./src/stylus/components/_select.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_selection-controls.styl": /*!********************************************************!*\ !*** ./src/stylus/components/_selection-controls.styl ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_sliders.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_sliders.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_small-dialog.styl": /*!**************************************************!*\ !*** ./src/stylus/components/_small-dialog.styl ***! \**************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_snackbars.styl": /*!***********************************************!*\ !*** ./src/stylus/components/_snackbars.styl ***! \***********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_speed-dial.styl": /*!************************************************!*\ !*** ./src/stylus/components/_speed-dial.styl ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_steppers.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_steppers.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_subheaders.styl": /*!************************************************!*\ !*** ./src/stylus/components/_subheaders.styl ***! \************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_switch.styl": /*!********************************************!*\ !*** ./src/stylus/components/_switch.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_system-bars.styl": /*!*************************************************!*\ !*** ./src/stylus/components/_system-bars.styl ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_tables.styl": /*!********************************************!*\ !*** ./src/stylus/components/_tables.styl ***! \********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_tabs.styl": /*!******************************************!*\ !*** ./src/stylus/components/_tabs.styl ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_text-fields.styl": /*!*************************************************!*\ !*** ./src/stylus/components/_text-fields.styl ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_textarea.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_textarea.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_time-picker-clock.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_time-picker-clock.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_time-picker-title.styl": /*!*******************************************************!*\ !*** ./src/stylus/components/_time-picker-title.styl ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_toolbar.styl": /*!*********************************************!*\ !*** ./src/stylus/components/_toolbar.styl ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/stylus/components/_tooltips.styl": /*!**********************************************!*\ !*** ./src/stylus/components/_tooltips.styl ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), /***/ "./src/util/color/transformCIELAB.ts": /*!*******************************************!*\ !*** ./src/util/color/transformCIELAB.ts ***! \*******************************************/ /*! exports provided: fromXYZ, toXYZ */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromXYZ", function() { return fromXYZ; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toXYZ", function() { return toXYZ; }); var delta = 0.20689655172413793; // 6÷29 var cielabForwardTransform = function cielabForwardTransform(t) { return t > Math.pow(delta, 3) ? Math.cbrt(t) : t / (3 * Math.pow(delta, 2)) + 4 / 29; }; var cielabReverseTransform = function cielabReverseTransform(t) { return t > delta ? Math.pow(t, 3) : 3 * Math.pow(delta, 2) * (t - 4 / 29); }; function fromXYZ(xyz) { var transform = cielabForwardTransform; var transformedY = transform(xyz[1]); return [116 * transformedY - 16, 500 * (transform(xyz[0] / 0.95047) - transformedY), 200 * (transformedY - transform(xyz[2] / 1.08883))]; } function toXYZ(lab) { var transform = cielabReverseTransform; var Ln = (lab[0] + 16) / 116; return [transform(Ln + lab[1] / 500) * 0.95047, transform(Ln), transform(Ln - lab[2] / 200) * 1.08883]; } /***/ }), /***/ "./src/util/color/transformSRGB.ts": /*!*****************************************!*\ !*** ./src/util/color/transformSRGB.ts ***! \*****************************************/ /*! exports provided: fromXYZ, toXYZ */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromXYZ", function() { return fromXYZ; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toXYZ", function() { return toXYZ; }); // For converting XYZ to sRGB var srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]]; // Forward gamma adjust var srgbForwardTransform = function srgbForwardTransform(C) { return C <= 0.0031308 ? C * 12.92 : 1.055 * Math.pow(C, 1 / 2.4) - 0.055; }; // For converting sRGB to XYZ var srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]]; // Reverse gamma adjust var srgbReverseTransform = function srgbReverseTransform(C) { return C <= 0.04045 ? C / 12.92 : Math.pow((C + 0.055) / 1.055, 2.4); }; function clamp(value) { return Math.max(0, Math.min(1, value)); } function fromXYZ(xyz) { var rgb = Array(3); var transform = srgbForwardTransform; var matrix = srgbForwardMatrix; // Matrix transform, then gamma adjustment for (var i = 0; i < 3; ++i) { rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255); } // Rescale back to [0, 255] return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0); } function toXYZ(rgb) { var xyz = [0, 0, 0]; var transform = srgbReverseTransform; var matrix = srgbReverseMatrix; // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB var r = transform((rgb >> 16 & 0xff) / 255); var g = transform((rgb >> 8 & 0xff) / 255); var b = transform((rgb >> 0 & 0xff) / 255); // Matrix color space transform for (var i = 0; i < 3; ++i) { xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b; } return xyz; } /***/ }), /***/ "./src/util/colorUtils.ts": /*!********************************!*\ !*** ./src/util/colorUtils.ts ***! \********************************/ /*! exports provided: colorToInt, intToHex */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorToInt", function() { return colorToInt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intToHex", function() { return intToHex; }); /* harmony import */ var _console__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./console */ "./src/util/console.ts"); function colorToInt(color) { var rgb; if (typeof color === 'number') { rgb = color; } else if (typeof color === 'string') { var c = color[0] === '#' ? color.substring(1) : color; if (c.length === 3) { c = c.split('').map(function (char) { return char + char; }).join(''); } if (c.length !== 6) { Object(_console__WEBPACK_IMPORTED_MODULE_0__["consoleWarn"])("'" + color + "' is not a valid rgb color"); } rgb = parseInt(c, 16); } else { throw new TypeError("Colors can only be numbers or strings, recieved " + (color == null ? color : color.constructor.name) + " instead"); } if (rgb < 0) { Object(_console__WEBPACK_IMPORTED_MODULE_0__["consoleWarn"])("Colors cannot be negative: '" + color + "'"); rgb = 0; } else if (rgb > 0xffffff || isNaN(rgb)) { Object(_console__WEBPACK_IMPORTED_MODULE_0__["consoleWarn"])("'" + color + "' is not a valid rgb color"); rgb = 0xffffff; } return rgb; } function intToHex(color) { var hexColor = color.toString(16); if (hexColor.length < 6) hexColor = '0'.repeat(6 - hexColor.length) + hexColor; return '#' + hexColor; } /***/ }), /***/ "./src/util/console.ts": /*!*****************************!*\ !*** ./src/util/console.ts ***! \*****************************/ /*! exports provided: consoleInfo, consoleWarn, consoleError, deprecate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consoleInfo", function() { return consoleInfo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consoleWarn", function() { return consoleWarn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consoleError", function() { return consoleError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deprecate", function() { return deprecate; }); function createMessage(message, vm, parent) { if (parent) { vm = { _isVue: true, $parent: parent, $options: vm }; } if (vm) { // Only show each message once per instance vm.$_alreadyWarned = vm.$_alreadyWarned || []; if (vm.$_alreadyWarned.includes(message)) return; vm.$_alreadyWarned.push(message); } return "[Vuetify] " + message + (vm ? generateComponentTrace(vm) : ''); } function consoleInfo(message, vm, parent) { var newMessage = createMessage(message, vm, parent); newMessage != null && console.info(newMessage); } function consoleWarn(message, vm, parent) { var newMessage = createMessage(message, vm, parent); newMessage != null && console.warn(newMessage); } function consoleError(message, vm, parent) { var newMessage = createMessage(message, vm, parent); newMessage != null && console.error(newMessage); } function deprecate(original, replacement, vm, parent) { consoleWarn("'" + original + "' is deprecated, use '" + replacement + "' instead", vm, parent); } /** * Shamelessly stolen from vuejs/vue/blob/dev/src/core/util/debug.js */ var classifyRE = /(?:^|[-_])(\w)/g; var classify = function classify(str) { return str.replace(classifyRE, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, ''); }; function formatComponentName(vm, includeFile) { if (vm.$root === vm) { return '<Root>'; } var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options || vm.constructor.options : vm || {}; var name = options.name || options._componentTag; var file = options.__file; if (!name && file) { var match = file.match(/([^/\\]+)\.vue$/); name = match && match[1]; } return (name ? "<" + classify(name) + ">" : "<Anonymous>") + (file && includeFile !== false ? " at " + file : ''); } function generateComponentTrace(vm) { if (vm._isVue && vm.$parent) { var tree = []; var currentRecursiveSequence = 0; while (vm) { if (tree.length > 0) { var last = tree[tree.length - 1]; if (last.constructor === vm.constructor) { currentRecursiveSequence++; vm = vm.$parent; continue; } else if (currentRecursiveSequence > 0) { tree[tree.length - 1] = [last, currentRecursiveSequence]; currentRecursiveSequence = 0; } } tree.push(vm); vm = vm.$parent; } return '\n\nfound in\n\n' + tree.map(function (vm, i) { return "" + (i === 0 ? '---> ' : ' '.repeat(5 + i * 2)) + (Array.isArray(vm) ? formatComponentName(vm[0]) + "... (" + vm[1] + " recursive calls)" : formatComponentName(vm)); }).join('\n'); } else { return "\n\n(found in " + formatComponentName(vm) + ")"; } } /***/ }), /***/ "./src/util/easing-patterns.js": /*!*************************************!*\ !*** ./src/util/easing-patterns.js ***! \*************************************/ /*! exports provided: linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInQuad", function() { return easeInQuad; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeOutQuad", function() { return easeOutQuad; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInOutQuad", function() { return easeInOutQuad; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInCubic", function() { return easeInCubic; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeOutCubic", function() { return easeOutCubic; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInOutCubic", function() { return easeInOutCubic; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInQuart", function() { return easeInQuart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeOutQuart", function() { return easeOutQuart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInOutQuart", function() { return easeInOutQuart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInQuint", function() { return easeInQuint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeOutQuint", function() { return easeOutQuint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easeInOutQuint", function() { return easeInOutQuint; }); // linear var linear = function linear(t) { return t; }; // accelerating from zero velocity var easeInQuad = function easeInQuad(t) { return t * t; }; // decelerating to zero velocity var easeOutQuad = function easeOutQuad(t) { return t * (2 - t); }; // acceleration until halfway, then deceleration var easeInOutQuad = function easeInOutQuad(t) { return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t; }; // accelerating from zero velocity var easeInCubic = function easeInCubic(t) { return t * t * t; }; // decelerating to zero velocity var easeOutCubic = function easeOutCubic(t) { return --t * t * t + 1; }; // acceleration until halfway, then deceleration var easeInOutCubic = function easeInOutCubic(t) { return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; }; // accelerating from zero velocity var easeInQuart = function easeInQuart(t) { return t * t * t * t; }; // decelerating to zero velocity var easeOutQuart = function easeOutQuart(t) { return 1 - --t * t * t * t; }; // acceleration until halfway, then deceleration var easeInOutQuart = function easeInOutQuart(t) { return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t; }; // accelerating from zero velocity var easeInQuint = function easeInQuint(t) { return t * t * t * t * t; }; // decelerating to zero velocity var easeOutQuint = function easeOutQuint(t) { return 1 + --t * t * t * t * t; }; // acceleration until halfway, then deceleration var easeInOutQuint = function easeInOutQuint(t) { return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t; }; /***/ }), /***/ "./src/util/helpers.ts": /*!*****************************!*\ !*** ./src/util/helpers.ts ***! \*****************************/ /*! exports provided: createSimpleFunctional, createSimpleTransition, createJavaScriptTransition, directiveConfig, addOnceEventListener, getNestedValue, deepEqual, getObjectValueByPath, getPropertyFromItem, createRange, getZIndex, escapeHTML, filterObjectOnKeys, filterChildren, convertToUnit, kebabCase, isObject, keyCodes, keys */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSimpleFunctional", function() { return createSimpleFunctional; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSimpleTransition", function() { return createSimpleTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createJavaScriptTransition", function() { return createJavaScriptTransition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "directiveConfig", function() { return directiveConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addOnceEventListener", function() { return addOnceEventListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNestedValue", function() { return getNestedValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepEqual", function() { return deepEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getObjectValueByPath", function() { return getObjectValueByPath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPropertyFromItem", function() { return getPropertyFromItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRange", function() { return createRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getZIndex", function() { return getZIndex; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeHTML", function() { return escapeHTML; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterObjectOnKeys", function() { return filterObjectOnKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterChildren", function() { return filterChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToUnit", function() { return convertToUnit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "kebabCase", function() { return kebabCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyCodes", function() { return keyCodes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; function createSimpleFunctional(c, el, name) { if (el === void 0) { el = 'div'; } return { name: name || c.replace(/__/g, '-'), functional: true, render: function render(h, _a) { var data = _a.data, children = _a.children; data.staticClass = (c + " " + (data.staticClass || '')).trim(); return h(el, data, children); } }; } function createSimpleTransition(name, origin, mode) { if (origin === void 0) { origin = 'top center 0'; } return { name: name, functional: true, props: { origin: { type: String, default: origin } }, render: function render(h, context) { context.data = context.data || {}; context.data.props = { name: name }; context.data.on = context.data.on || {}; if (!Object.isExtensible(context.data.on)) { context.data.on = __assign({}, context.data.on); } if (mode) context.data.props.mode = mode; context.data.on.beforeEnter = function (el) { el.style.transformOrigin = context.props.origin; el.style.webkitTransformOrigin = context.props.origin; }; return h('transition', context.data, context.children); } }; } function createJavaScriptTransition(name, functions, css, mode) { if (css === void 0) { css = false; } if (mode === void 0) { mode = 'in-out'; } return { name: name, functional: true, props: { css: { type: Boolean, default: css }, mode: { type: String, default: mode } }, render: function render(h, context) { var data = { props: __assign({}, context.props, { name: name }), on: functions }; return h('transition', data, context.children); } }; } function directiveConfig(binding, defaults) { if (defaults === void 0) { defaults = {}; } return __assign({}, defaults, binding.modifiers, { value: binding.arg }, binding.value || {}); } function addOnceEventListener(el, event, cb) { var once = function once() { cb(); el.removeEventListener(event, once, false); }; el.addEventListener(event, once, false); } function getNestedValue(obj, path, fallback) { var last = path.length - 1; if (last < 0) return obj === undefined ? fallback : obj; for (var i = 0; i < last; i++) { if (obj == null) { return fallback; } obj = obj[path[i]]; } if (obj == null) return fallback; return obj[path[last]] === undefined ? fallback : obj[path[last]]; } function deepEqual(a, b) { if (a === b) return true; if (a instanceof Date && b instanceof Date) { // If the values are Date, they were convert to timestamp with getTime and compare it if (a.getTime() !== b.getTime()) return false; } if (a !== Object(a) || b !== Object(b)) { // If the values aren't objects, they were already checked for equality return false; } var props = Object.keys(a); if (props.length !== Object.keys(b).length) { // Different number of props, don't bother to check return false; } return props.every(function (p) { return deepEqual(a[p], b[p]); }); } function getObjectValueByPath(obj, path, fallback) { // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621 if (!path || path.constructor !== String) return fallback; path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties path = path.replace(/^\./, ''); // strip a leading dot return getNestedValue(obj, path.split('.'), fallback); } function getPropertyFromItem(item, property, fallback) { if (property == null) return item === undefined ? fallback : item; if (item !== Object(item)) return fallback === undefined ? item : fallback; if (typeof property === 'string') return getObjectValueByPath(item, property, fallback); if (Array.isArray(property)) return getNestedValue(item, property, fallback); if (typeof property !== 'function') return fallback; var value = property(item, fallback); return typeof value === 'undefined' ? fallback : value; } function createRange(length) { return Array.from({ length: length }, function (v, k) { return k; }); } function getZIndex(el) { if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0; var index = +window.getComputedStyle(el).getPropertyValue('z-index'); if (isNaN(index)) return getZIndex(el.parentNode); return index; } var tagsToReplace = { '&': '&amp;', '<': '&lt;', '>': '&gt;' }; function escapeHTML(str) { return str.replace(/[&<>]/g, function (tag) { return tagsToReplace[tag] || tag; }); } function filterObjectOnKeys(obj, keys) { var filtered = {}; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (typeof obj[key] !== 'undefined') { filtered[key] = obj[key]; } } return filtered; } function filterChildren(array, tag) { if (array === void 0) { array = []; } return array.filter(function (child) { return child.componentOptions && child.componentOptions.Ctor.options.name === tag; }); } function convertToUnit(str, unit) { if (unit === void 0) { unit = 'px'; } if (str == null || str === '') { return undefined; } else if (isNaN(+str)) { return String(str); } else { return "" + Number(str) + unit; } } function kebabCase(str) { return (str || '').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } function isObject(obj) { return obj !== null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; } // KeyboardEvent.keyCode aliases var keyCodes = Object.freeze({ enter: 13, tab: 9, delete: 46, esc: 27, space: 32, up: 38, down: 40, left: 37, right: 39, end: 35, home: 36, del: 46, backspace: 8, insert: 45, pageup: 33, pagedown: 34 }); function keys(o) { return Object.keys(o); } /***/ }), /***/ "./src/util/mask.js": /*!**************************!*\ !*** ./src/util/mask.js ***! \**************************/ /*! exports provided: defaultDelimiters, isMaskDelimiter, maskText, unmaskText */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultDelimiters", function() { return defaultDelimiters; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMaskDelimiter", function() { return isMaskDelimiter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maskText", function() { return maskText; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unmaskText", function() { return unmaskText; }); /** * Default delimiter RegExp * * @type {RegExp} */ var defaultDelimiters = /[-!$%^&*()_+|~=`{}[\]:";'<>?,./\\ ]/; /** * * @param {String} char * * @return {Boolean} */ var isMaskDelimiter = function isMaskDelimiter(char) { return char && defaultDelimiters.test(char); }; /** * Mask keys * * @type {Object} */ var allowedMasks = { '#': { test: function test(char) { return char.match(/[0-9]/); } }, 'A': { test: function test(char) { return char.match(/[A-Z]/i); }, convert: function convert(char) { return char.toUpperCase(); } }, 'a': { test: function test(char) { return char.match(/[a-z]/i); }, convert: function convert(char) { return char.toLowerCase(); } }, 'N': { test: function test(char) { return char.match(/[0-9A-Z]/i); }, convert: function convert(char) { return char.toUpperCase(); } }, 'n': { test: function test(char) { return char.match(/[0-9a-z]/i); }, convert: function convert(char) { return char.toLowerCase(); } }, 'X': { test: isMaskDelimiter } }; /** * Is Character mask * * @param {String} char * * @return {Boolean} */ var isMask = function isMask(char) { return allowedMasks.hasOwnProperty(char); }; /** * Automatically convert char case * * @param {String} mask * @param {String} char * * @return {String} */ var convert = function convert(mask, char) { return allowedMasks[mask].convert ? allowedMasks[mask].convert(char) : char; }; /** * Mask Validation * * @param {String} mask * @param {String} char * * @return {Boolean} */ var maskValidates = function maskValidates(mask, char) { if (char == null || !isMask(mask)) return false; return allowedMasks[mask].test(char); }; /** * Mask Text * * Takes a string or an array of characters * and returns a masked string * * @param {*} text * @param {Array|String} masked * @param {Boolean} [dontFillMaskBlanks] * * @return {String} */ var maskText = function maskText(text, masked, dontFillMaskBlanks) { if (text == null) return ''; text = String(text); if (!masked.length || !text.length) return text; if (!Array.isArray(masked)) masked = masked.split(''); var textIndex = 0; var maskIndex = 0; var newText = ''; while (maskIndex < masked.length) { var mask = masked[maskIndex]; // Assign the next character var char = text[textIndex]; // Check if mask is delimiter // and current char matches if (!isMask(mask) && char === mask) { newText += mask; textIndex++; // Check if not mask } else if (!isMask(mask) && !dontFillMaskBlanks) { newText += mask; // Check if is mask and validates } else if (maskValidates(mask, char)) { newText += convert(mask, char); textIndex++; } else { return newText; } maskIndex++; } return newText; }; /** * Unmask Text * * @param {String} text * * @return {String} */ var unmaskText = function unmaskText(text) { return text ? String(text).replace(new RegExp(defaultDelimiters, 'g'), '') : text; }; /***/ }), /***/ "./src/util/mixins.ts": /*!****************************!*\ !*** ./src/util/mixins.ts ***! \****************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mixins; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); /* eslint-disable max-len, import/export, no-use-before-define */ function mixins() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ mixins: args }); } /***/ }), /***/ "./src/util/rebuildFunctionalSlots.js": /*!********************************************!*\ !*** ./src/util/rebuildFunctionalSlots.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return rebuildFunctionalSlots; }); /** * * @param {object} slots * @param {function} h * @returns {array} */ function rebuildFunctionalSlots(slots, h) { var children = []; for (var slot in slots) { if (slots.hasOwnProperty(slot)) { children.push(h('template', { slot: slot }, slots[slot])); } } return children; } /***/ }), /***/ "./src/util/theme.ts": /*!***************************!*\ !*** ./src/util/theme.ts ***! \***************************/ /*! exports provided: parse, genBaseColor, genVariantColor, genVariations */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genBaseColor", function() { return genBaseColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genVariantColor", function() { return genVariantColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genVariations", function() { return genVariations; }); /* harmony import */ var _colorUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorUtils */ "./src/util/colorUtils.ts"); /* harmony import */ var _color_transformSRGB__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color/transformSRGB */ "./src/util/color/transformSRGB.ts"); /* harmony import */ var _color_transformCIELAB__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color/transformCIELAB */ "./src/util/color/transformCIELAB.ts"); function parse(theme) { var colors = Object.keys(theme); var parsedTheme = {}; for (var i = 0; i < colors.length; ++i) { var name = colors[i]; var value = theme[name]; parsedTheme[name] = Object(_colorUtils__WEBPACK_IMPORTED_MODULE_0__["colorToInt"])(value); } return parsedTheme; } /** * Generate the CSS for a base color (.primary) */ var genBaseColor = function genBaseColor(name, value) { var rgb = Object(_colorUtils__WEBPACK_IMPORTED_MODULE_0__["intToHex"])(value); return "\n." + name + " {\n background-color: " + rgb + " !important;\n border-color: " + rgb + " !important;\n}\n." + name + "--text {\n color: " + rgb + " !important;\n}\n." + name + "--text input,\n." + name + "--text textarea {\n caret-color: " + rgb + " !important;\n}"; }; /** * Generate the CSS for a variant color (.primary.darken-2) */ var genVariantColor = function genVariantColor(name, value, type, n) { var rgb = Object(_colorUtils__WEBPACK_IMPORTED_MODULE_0__["intToHex"])(value); return "\n." + name + "." + type + "-" + n + " {\n background-color: " + rgb + " !important;\n border-color: " + rgb + " !important;\n}\n." + name + "--text.text--" + type + "-" + n + " {\n color: " + rgb + " !important;\n}\n." + name + "--text.text--" + type + "-" + n + " input,\n." + name + "--text.text--" + type + "-" + n + " textarea {\n caret-color: " + rgb + " !important;\n}"; }; function genVariations(name, value) { var values = Array(10); values[0] = genBaseColor(name, value); for (var i = 1, n = 5; i <= 5; ++i, --n) { values[i] = genVariantColor(name, lighten(value, n), 'lighten', n); } for (var i = 1; i <= 4; ++i) { values[i + 5] = genVariantColor(name, darken(value, i), 'darken', i); } return values; } function lighten(value, amount) { var lab = _color_transformCIELAB__WEBPACK_IMPORTED_MODULE_2__["fromXYZ"](_color_transformSRGB__WEBPACK_IMPORTED_MODULE_1__["toXYZ"](value)); lab[0] = lab[0] + amount * 10; return _color_transformSRGB__WEBPACK_IMPORTED_MODULE_1__["fromXYZ"](_color_transformCIELAB__WEBPACK_IMPORTED_MODULE_2__["toXYZ"](lab)); } function darken(value, amount) { var lab = _color_transformCIELAB__WEBPACK_IMPORTED_MODULE_2__["fromXYZ"](_color_transformSRGB__WEBPACK_IMPORTED_MODULE_1__["toXYZ"](value)); lab[0] = lab[0] - amount * 10; return _color_transformSRGB__WEBPACK_IMPORTED_MODULE_1__["fromXYZ"](_color_transformCIELAB__WEBPACK_IMPORTED_MODULE_2__["toXYZ"](lab)); } /***/ }), /***/ "vue": /*!******************************************************************************!*\ !*** external {"commonjs":"vue","commonjs2":"vue","amd":"vue","root":"Vue"} ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_vue__; /***/ }) /******/ })["default"]; }); //# sourceMappingURL=vuetify.js.map
import ApplicationAdapter from './application'; import buildURLWithPrefixMap from '../utils/build-url-with-prefix-map'; export default ApplicationAdapter.extend({ buildURL: buildURLWithPrefixMap({ 'services': {property: 'service.id', only:['create']} }) });
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.tooltipContainerAttr = exports.TooltipContainer = void 0; var _jsxRuntime = require("../../lib/jsxRuntime"); var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var React = _interopRequireWildcard(require("react")); var _excluded = ["fixed"]; var tooltipContainerAttr = "data-tooltip-container"; exports.tooltipContainerAttr = tooltipContainerAttr; var TooltipContainer = /*#__PURE__*/React.forwardRef(function TooltipContainer(_ref, ref) { var _ref$fixed = _ref.fixed, fixed = _ref$fixed === void 0 ? false : _ref$fixed, props = (0, _objectWithoutProperties2.default)(_ref, _excluded); props[tooltipContainerAttr] = fixed ? "fixed" : "true"; return (0, _jsxRuntime.createScopedElement)("div", (0, _extends2.default)({}, props, { ref: ref })); }); exports.TooltipContainer = TooltipContainer; //# sourceMappingURL=TooltipContainer.js.map
/* * Test that we can continue after a valstack limit error. */ /*--- { "custom": true } ---*/ /*=== RangeError: valstack limit still here ===*/ function test() { // Use an Ecmascript-to-Ecmascript call to hit the value stack limit // without hitting the native call limit. Use a function with a lot // of temporaries to ensure value stack limit is reached before call // stack limit (this depends on specific constants of course). Avoid // tail recursion which would cause an infinite loop. var src = []; var i; src.push('(function test() {'); for (i = 0; i < 1e4; i++) { src.push('var x' + i + ' = ' + i + ';'); } src.push('var t = test(); return "dummy"; })'); src = src.join(''); var f = eval(src); try { f(); } catch (e) { print(e.name + ': ' + e.message); } print('still here'); } try { test(); } catch (e) { print(e.stack || e); }
import {Headers} from './headers'; export class HttpResponseMessage { constructor(requestMessage, xhr, responseType, reviver){ this.requestMessage = requestMessage; this.statusCode = xhr.status; this.response = xhr.response; this.isSuccess = xhr.status >= 200 && xhr.status < 400; this.statusText = xhr.statusText; this.responseType = responseType; this.reviver = reviver; if(xhr.getAllResponseHeaders){ this.headers = Headers.parse(xhr.getAllResponseHeaders()); }else { this.headers = new Headers(); } } get content(){ try{ if(this._content !== undefined){ return this._content; } if(this.response === undefined || this.response === null){ return this._content = this.response; } if(this.responseType === 'json'){ return this._content = JSON.parse(this.response, this.reviver); } if(this.reviver){ return this._content = this.reviver(this.response); } return this._content = this.response; }catch(e){ if(this.isSuccess){ throw e; } return this._content = null; } } }
import { TRIPLE } from '../../../config/types'; import readExpression from '../readExpression'; import refineExpression from '../../utils/refineExpression'; export default function readTriple ( parser, tag ) { var expression = readExpression( parser ), triple; if ( !expression ) { return null; } if ( !parser.matchString( tag.close ) ) { parser.error( `Expected closing delimiter '${tag.close}'` ); } triple = { t: TRIPLE }; refineExpression( expression, triple ); // TODO handle this differently - it's mysterious return triple; }
/* This file is part of Ext JS 4.2 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact Commercial Usage Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-09-18 17:18:59 (940c324ac822b840618a3a8b2b4b873f83a1a9b1) */ /** * This layout implements the column arrangement for {@link Ext.form.CheckboxGroup} and {@link Ext.form.RadioGroup}. * It groups the component's sub-items into columns based on the component's * {@link Ext.form.CheckboxGroup#columns columns} and {@link Ext.form.CheckboxGroup#vertical} config properties. */ Ext.define('Ext.layout.container.CheckboxGroup', { extend: 'Ext.layout.container.Container', alias: ['layout.checkboxgroup'], /** * @cfg {Boolean} [autoFlex=true] * By default, CheckboxGroup allocates all available space to the configured columns meaning that * column are evenly spaced across the container. * * To have each column only be wide enough to fit the container Checkboxes (or Radios), set `autoFlex` to `false` */ autoFlex: true, type: 'checkboxgroup', createsInnerCt: true, childEls: [ 'innerCt' ], renderTpl: [ '<table id="{ownerId}-innerCt" class="' + Ext.plainTableCls + '" cellpadding="0"', 'role="presentation" style="{tableStyle}">', '<tbody role="presentation"><tr role="presentation">', '<tpl for="columns">', '<td class="{parent.colCls}" valign="top" style="{style}" role="presentation">', '{% this.renderColumn(out,parent,xindex-1) %}', '</td>', '</tpl>', '</tr></tbody></table>' ], lastOwnerItemsGeneration : null, beginLayout: function(ownerContext) { var me = this, columns, numCols, i, width, cwidth, totalFlex = 0, flexedCols = 0, autoFlex = me.autoFlex, innerCtStyle = me.innerCt.dom.style; me.callParent(arguments); columns = me.columnNodes; ownerContext.innerCtContext = ownerContext.getEl('innerCt', me); // The columns config may be an array of widths. Any value < 1 is taken to be a fraction: if (!ownerContext.widthModel.shrinkWrap) { numCols = columns.length; // If columns is an array of numeric widths if (me.columnsArray) { // first calculate total flex for (i = 0; i < numCols; i++) { width = me.owner.columns[i]; if (width < 1) { totalFlex += width; flexedCols++; } } // now apply widths for (i = 0; i < numCols; i++) { width = me.owner.columns[i]; if (width < 1) { cwidth = ((width / totalFlex) * 100) + '%'; } else { cwidth = width + 'px'; } columns[i].style.width = cwidth; } } // Otherwise it's the *number* of columns, so distributed the widths evenly else { for (i = 0; i < numCols; i++) { // autoFlex: true will automatically calculate % widths // autoFlex: false allows the table to decide (shrinkWrap, in effect) // on a per-column basis cwidth = autoFlex ? (1 / numCols * 100) + '%' : ''; columns[i].style.width = cwidth; flexedCols++; } } // no flexed cols -- all widths are fixed if (!flexedCols) { innerCtStyle.tableLayout = 'fixed'; innerCtStyle.width = ''; // some flexed cols -- need to fix some } else if (flexedCols < numCols) { innerCtStyle.tableLayout = 'fixed'; innerCtStyle.width = '100%'; // let the table decide } else { innerCtStyle.tableLayout = 'auto'; // if autoFlex, fill available space, else compact down if (autoFlex) { innerCtStyle.width = '100%'; } else { innerCtStyle.width = ''; } } } else { innerCtStyle.tableLayout = 'auto'; innerCtStyle.width = ''; } }, cacheElements: function () { var me = this; // Grab defined childEls me.callParent(); me.rowEl = me.innerCt.down('tr'); // Grab columns TDs me.columnNodes = me.rowEl.dom.childNodes; }, /* * Just wait for the child items to all lay themselves out in the width we are configured * to make available to them. Then we can measure our height. */ calculate: function(ownerContext) { var me = this, targetContext, widthShrinkWrap, heightShrinkWrap, shrinkWrap, table, targetPadding; // The columnNodes are widthed using their own width attributes, we just need to wait // for all children to have arranged themselves in that width, and then collect our height. if (!ownerContext.getDomProp('containerChildrenSizeDone')) { me.done = false; } else { targetContext = ownerContext.innerCtContext; widthShrinkWrap = ownerContext.widthModel.shrinkWrap; heightShrinkWrap = ownerContext.heightModel.shrinkWrap; shrinkWrap = heightShrinkWrap || widthShrinkWrap; table = targetContext.el.dom; targetPadding = shrinkWrap && targetContext.getPaddingInfo(); if (widthShrinkWrap) { ownerContext.setContentWidth(table.offsetWidth + targetPadding.width, true); } if (heightShrinkWrap) { ownerContext.setContentHeight(table.offsetHeight + targetPadding.height, true); } } }, doRenderColumn: function (out, renderData, columnIndex) { // Careful! This method is bolted on to the renderTpl so all we get for context is // the renderData! The "this" pointer is the renderTpl instance! var me = renderData.$layout, owner = me.owner, columnCount = renderData.columnCount, items = owner.items.items, itemCount = items.length, item, itemIndex, rowCount, increment, tree; // Example: // columnCount = 3 // items.length = 10 if (owner.vertical) { // 0 1 2 // +---+---+---+ // 0 | 0 | 4 | 8 | // +---+---+---+ // 1 | 1 | 5 | 9 | // +---+---+---+ // 2 | 2 | 6 | | // +---+---+---+ // 3 | 3 | 7 | | // +---+---+---+ rowCount = Math.ceil(itemCount / columnCount); // = 4 itemIndex = columnIndex * rowCount; itemCount = Math.min(itemCount, itemIndex + rowCount); increment = 1; } else { // 0 1 2 // +---+---+---+ // 0 | 0 | 1 | 2 | // +---+---+---+ // 1 | 3 | 4 | 5 | // +---+---+---+ // 2 | 6 | 7 | 8 | // +---+---+---+ // 3 | 9 | | | // +---+---+---+ itemIndex = columnIndex; increment = columnCount; } for ( ; itemIndex < itemCount; itemIndex += increment) { item = items[itemIndex]; me.configureItem(item); tree = item.getRenderTree(); Ext.DomHelper.generateMarkup(tree, out); } }, /** * Returns the number of columns in the checkbox group. * @private */ getColumnCount: function() { var me = this, owner = me.owner, ownerColumns = owner.columns; // Our columns config is an array of numeric widths. // Calculate our total width if (me.columnsArray) { return ownerColumns.length; } if (Ext.isNumber(ownerColumns)) { return ownerColumns; } return owner.items.length; }, getItemSizePolicy: function (item) { return this.autoSizePolicy; }, getRenderData: function () { var me = this, data = me.callParent(), owner = me.owner, i, columns = me.getColumnCount(), width, column, cwidth, autoFlex = me.autoFlex, totalFlex = 0, flexedCols = 0; // calculate total flex if (me.columnsArray) { for (i=0; i < columns; i++) { width = me.owner.columns[i]; if (width < 1) { totalFlex += width; flexedCols++; } } } data.colCls = owner.groupCls; data.columnCount = columns; data.columns = []; for (i = 0; i < columns; i++) { column = (data.columns[i] = {}); if (me.columnsArray) { width = me.owner.columns[i]; if (width < 1) { cwidth = ((width / totalFlex) * 100) + '%'; } else { cwidth = width + 'px'; } column.style = 'width:' + cwidth; } else { column.style = 'width:' + (1 / columns * 100) + '%'; flexedCols++; } } // If the columns config was an array of column widths, allow table to auto width data.tableStyle = !flexedCols ? 'table-layout:fixed;' : (flexedCols < columns) ? 'table-layout:fixed;width:100%' : (autoFlex) ? 'table-layout:auto;width:100%' : 'table-layout:auto;'; return data; }, initLayout: function () { var me = this, owner = me.owner; me.columnsArray = Ext.isArray(owner.columns); me.autoColumns = !owner.columns || owner.columns === 'auto'; me.vertical = owner.vertical; me.callParent(); }, // Always valid. beginLayout ensures the encapsulating elements of all children are in the correct place isValidParent: function() { return true; }, setupRenderTpl: function (renderTpl) { this.callParent(arguments); renderTpl.renderColumn = this.doRenderColumn; }, renderChildren: function () { var me = this, generation = me.owner.items.generation; if (me.lastOwnerItemsGeneration !== generation) { me.lastOwnerItemsGeneration = generation; me.renderItems(me.getLayoutItems()); } }, /** * Iterates over all passed items, ensuring they are rendered. If the items are already rendered, * also determines if the items are in the proper place in the dom. * @protected */ renderItems : function(items) { var me = this, itemCount = items.length, i, item, rowCount, columnCount, rowIndex, columnIndex; if (itemCount) { Ext.suspendLayouts(); if (me.autoColumns) { me.addMissingColumns(itemCount); } columnCount = me.columnNodes.length; rowCount = Math.ceil(itemCount / columnCount); for (i = 0; i < itemCount; i++) { item = items[i]; rowIndex = me.getRenderRowIndex(i, rowCount, columnCount); columnIndex = me.getRenderColumnIndex(i, rowCount, columnCount); if (!item.rendered) { me.renderItem(item, rowIndex, columnIndex); } else if (!me.isItemAtPosition(item, rowIndex, columnIndex)) { me.moveItem(item, rowIndex, columnIndex); } } if (me.autoColumns) { me.removeExceedingColumns(itemCount); } Ext.resumeLayouts(true); } }, isItemAtPosition : function(item, rowIndex, columnIndex) { return item.el.dom === this.getNodeAt(rowIndex, columnIndex); }, getRenderColumnIndex : function(itemIndex, rowCount, columnCount) { if (this.vertical) { return Math.floor(itemIndex / rowCount); } else { return itemIndex % columnCount; } }, getRenderRowIndex : function(itemIndex, rowCount, columnCount) { var me = this; if (me.vertical) { return itemIndex % rowCount; } else { return Math.floor(itemIndex / columnCount); } }, getNodeAt : function(rowIndex, columnIndex) { return this.columnNodes[columnIndex].childNodes[rowIndex]; }, addMissingColumns : function(itemsCount) { var me = this, existingColumnsCount = me.columnNodes.length, missingColumnsCount, row, cls, i; if (existingColumnsCount < itemsCount) { missingColumnsCount = itemsCount - existingColumnsCount; row = me.rowEl; cls = me.owner.groupCls; for (i = 0; i < missingColumnsCount; i++) { row.createChild({ cls: cls, tag: 'td', vAlign: 'top', role: 'presentation' }); } } }, removeExceedingColumns : function(itemsCount) { var me = this, existingColumnsCount = me.columnNodes.length, exceedingColumnsCount, row, i; if (existingColumnsCount > itemsCount) { exceedingColumnsCount = existingColumnsCount - itemsCount; row = me.rowEl; for (i = 0; i < exceedingColumnsCount; i++) { row.last().remove(); } } }, /** * Renders the given Component into the specified row and column * @param {Ext.Component} item The Component to render * @param {number} rowIndex row index * @param {number} columnIndex column index * @private */ renderItem : function(item, rowIndex, columnIndex) { var me = this; me.configureItem(item); item.render(Ext.get(me.columnNodes[columnIndex]), rowIndex); me.afterRenderItem(item); }, /** * Moves the given already rendered Component to the specified row and column * @param {Ext.Component} item The Component to move * @param {number} rowIndex row index * @param {number} columnIndex column index * @private */ moveItem : function(item, rowIndex, columnIndex) { var me = this, column = me.columnNodes[columnIndex], targetNode = column.childNodes[rowIndex]; column.insertBefore(item.el.dom, targetNode || null); } });
/** * Quirks.js * * Copyright, Moxiecode Systems AB * Released under LGPL License. * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /** * This class includes fixes for various browser quirks. * * @class tinymce.tableplugin.Quirks * @private */ define("tinymce/tableplugin/Quirks", [ "tinymce/util/VK", "tinymce/Env", "tinymce/util/Tools" ], function(VK, Env, Tools) { var each = Tools.each; function getSpanVal(td, name) { return parseInt(td.getAttribute(name) || 1, 10); } return function(editor) { /** * Fixed caret movement around tables on WebKit. */ function moveWebKitSelection() { function eventHandler(e) { var key = e.keyCode; function handle(upBool, sourceNode) { var siblingDirection = upBool ? 'previousSibling' : 'nextSibling'; var currentRow = editor.dom.getParent(sourceNode, 'tr'); var siblingRow = currentRow[siblingDirection]; if (siblingRow) { moveCursorToRow(editor, sourceNode, siblingRow, upBool); e.preventDefault(); return true; } else { var tableNode = editor.dom.getParent(currentRow, 'table'); var middleNode = currentRow.parentNode; var parentNodeName = middleNode.nodeName.toLowerCase(); if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) { var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody'); if (targetParent !== null) { return moveToRowInTarget(upBool, targetParent, sourceNode); } } return escapeTable(upBool, currentRow, siblingDirection, tableNode); } } function getTargetParent(upBool, topNode, secondNode, nodeName) { var tbodies = editor.dom.select('>' + nodeName, topNode); var position = tbodies.indexOf(secondNode); if (upBool && position === 0 || !upBool && position === tbodies.length - 1) { return getFirstHeadOrFoot(upBool, topNode); } else if (position === -1) { var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1; return tbodies[topOrBottom]; } else { return tbodies[position + (upBool ? -1 : 1)]; } } function getFirstHeadOrFoot(upBool, parent) { var tagName = upBool ? 'thead' : 'tfoot'; var headOrFoot = editor.dom.select('>' + tagName, parent); return headOrFoot.length !== 0 ? headOrFoot[0] : null; } function moveToRowInTarget(upBool, targetParent, sourceNode) { var targetRow = getChildForDirection(targetParent, upBool); if (targetRow) { moveCursorToRow(editor, sourceNode, targetRow, upBool); } e.preventDefault(); return true; } function escapeTable(upBool, currentRow, siblingDirection, table) { var tableSibling = table[siblingDirection]; if (tableSibling) { moveCursorToStartOfElement(tableSibling); return true; } else { var parentCell = editor.dom.getParent(table, 'td,th'); if (parentCell) { return handle(upBool, parentCell, e); } else { var backUpSibling = getChildForDirection(currentRow, !upBool); moveCursorToStartOfElement(backUpSibling); e.preventDefault(); return false; } } } function getChildForDirection(parent, up) { var child = parent && parent[up ? 'lastChild' : 'firstChild']; // BR is not a valid table child to return in this case we return the table cell return child && child.nodeName === 'BR' ? editor.dom.getParent(child, 'td,th') : child; } function moveCursorToStartOfElement(n) { editor.selection.setCursorLocation(n, 0); } function isVerticalMovement() { return key == VK.UP || key == VK.DOWN; } function isInTable(editor) { var node = editor.selection.getNode(); var currentRow = editor.dom.getParent(node, 'tr'); return currentRow !== null; } function columnIndex(column) { var colIndex = 0; var c = column; while (c.previousSibling) { c = c.previousSibling; colIndex = colIndex + getSpanVal(c, "colspan"); } return colIndex; } function findColumn(rowElement, columnIndex) { var c = 0, r = 0; each(rowElement.children, function(cell, i) { c = c + getSpanVal(cell, "colspan"); r = i; if (c > columnIndex) { return false; } }); return r; } function moveCursorToRow(ed, node, row, upBool) { var srcColumnIndex = columnIndex(editor.dom.getParent(node, 'td,th')); var tgtColumnIndex = findColumn(row, srcColumnIndex); var tgtNode = row.childNodes[tgtColumnIndex]; var rowCellTarget = getChildForDirection(tgtNode, upBool); moveCursorToStartOfElement(rowCellTarget || tgtNode); } function shouldFixCaret(preBrowserNode) { var newNode = editor.selection.getNode(); var newParent = editor.dom.getParent(newNode, 'td,th'); var oldParent = editor.dom.getParent(preBrowserNode, 'td,th'); return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent); } function checkSameParentTable(nodeOne, NodeTwo) { return editor.dom.getParent(nodeOne, 'TABLE') === editor.dom.getParent(NodeTwo, 'TABLE'); } if (isVerticalMovement() && isInTable(editor)) { var preBrowserNode = editor.selection.getNode(); setTimeout(function() { if (shouldFixCaret(preBrowserNode)) { handle(!e.shiftKey && key === VK.UP, preBrowserNode, e); } }, 0); } } editor.on('KeyDown', function(e) { eventHandler(e); }); } function fixBeforeTableCaretBug() { // Checks if the selection/caret is at the start of the specified block element function isAtStart(rng, par) { var doc = par.ownerDocument, rng2 = doc.createRange(), elm; rng2.setStartBefore(par); rng2.setEnd(rng.endContainer, rng.endOffset); elm = doc.createElement('body'); elm.appendChild(rng2.cloneContents()); // Check for text characters of other elements that should be treated as content return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length === 0; } // Fixes an bug where it's impossible to place the caret before a table in Gecko // this fix solves it by detecting when the caret is at the beginning of such a table // and then manually moves the caret infront of the table editor.on('KeyDown', function(e) { var rng, table, dom = editor.dom; // On gecko it's not possible to place the caret before a table if (e.keyCode == 37 || e.keyCode == 38) { rng = editor.selection.getRng(); table = dom.getParent(rng.startContainer, 'table'); if (table && editor.getBody().firstChild == table) { if (isAtStart(rng, table)) { rng = dom.createRng(); rng.setStartBefore(table); rng.setEndBefore(table); editor.selection.setRng(rng); e.preventDefault(); } } } }); } // Fixes an issue on Gecko where it's impossible to place the caret behind a table // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled function fixTableCaretPos() { editor.on('KeyDown SetContent VisualAid', function() { var last; // Skip empty text nodes from the end for (last = editor.getBody().lastChild; last; last = last.previousSibling) { if (last.nodeType == 3) { if (last.nodeValue.length > 0) { break; } } else if (last.nodeType == 1 && !last.getAttribute('data-mce-bogus')) { break; } } if (last && last.nodeName == 'TABLE') { if (editor.settings.forced_root_block) { editor.dom.add( editor.getBody(), editor.settings.forced_root_block, editor.settings.forced_root_block_attrs, Env.ie && Env.ie < 11 ? '&nbsp;' : '<br data-mce-bogus="1" />' ); } else { editor.dom.add(editor.getBody(), 'br', {'data-mce-bogus': '1'}); } } }); editor.on('PreProcess', function(o) { var last = o.node.lastChild; if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") { editor.dom.remove(last); } }); } // this nasty hack is here to work around some WebKit selection bugs. function fixTableCellSelection() { function tableCellSelected(ed, rng, n, currentCell) { // The decision of when a table cell is selected is somewhat involved. The fact that this code is // required is actually a pointer to the root cause of this bug. A cell is selected when the start // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) // or the parent of the table (in the case of the selection containing the last cell of a table). var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'); var tableParent, allOfCellSelected, tableCellSelection; if (table) { tableParent = table.parentNode; } allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && rng.startOffset === 0 && rng.endOffset === 0 && currentCell && (n.nodeName == "TR" || n == tableParent); tableCellSelection = (n.nodeName == "TD" || n.nodeName == "TH") && !currentCell; return allOfCellSelected || tableCellSelection; } function fixSelection() { var rng = editor.selection.getRng(); var n = editor.selection.getNode(); var currentCell = editor.dom.getParent(rng.startContainer, 'TD,TH'); if (!tableCellSelected(editor, rng, n, currentCell)) { return; } if (!currentCell) { currentCell=n; } // Get the very last node inside the table cell var end = currentCell.lastChild; while (end.lastChild) { end = end.lastChild; } // Select the entire table cell. Nothing outside of the table cell should be selected. rng.setEnd(end, end.nodeValue.length); editor.selection.setRng(rng); } editor.on('KeyDown', function() { fixSelection(); }); editor.on('MouseDown', function(e) { if (e.button != 2) { fixSelection(); } }); } if (Env.webkit) { moveWebKitSelection(); fixTableCellSelection(); } if (Env.gecko) { fixBeforeTableCaretBug(); fixTableCaretPos(); } if (Env.ie > 10) { fixBeforeTableCaretBug(); fixTableCaretPos(); } }; });
import yeboOrder from 'yebo-ember-storefront/components/yebo-order'; export default yeboOrder;
Prism.languages.fsharp = Prism.languages.extend('clike', { 'comment': [ { pattern: /(^|[^\\])\(\*[\s\S]*?\*\)/, lookbehind: true }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: true } ], 'string': { pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/, greedy: true }, 'class-name': { pattern: /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/, lookbehind: true, inside: { 'operator': /->|\*/, 'punctuation': /\./ } }, 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, 'number': [ /\b0x[\da-fA-F]+(?:un|lf|LF)?\b/, /\b0b[01]+(?:y|uy)?\b/, /(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i, /\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/ ], 'operator': /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/ }); Prism.languages.insertBefore('fsharp', 'keyword', { 'preprocessor': { pattern: /^[^\r\n\S]*#.*/m, alias: 'property', inside: { 'directive': { pattern: /(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/, lookbehind: true, alias: 'keyword' } } } }); Prism.languages.insertBefore('fsharp', 'punctuation', { 'computation-expression': { pattern: /[_a-z]\w*(?=\s*\{)/i, alias: 'keyword' } }); Prism.languages.insertBefore('fsharp', 'string', { 'annotation': { pattern: /\[<.+?>\]/, inside: { 'punctuation': /^\[<|>\]$/, 'class-name': { pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/, lookbehind: true }, 'annotation-content': { pattern: /[\s\S]+/, inside: Prism.languages.fsharp } } } });
/*jslint node: true */ "use strict"; var options = JSON.parse(new Buffer(process.argv[2], 'hex')), QlobberFSQ = require('../..').QlobberFSQ, fsq = new QlobberFSQ(options), cbs = {}, cb_count = 0, handlers = {}, host = require('os').hostname(); //console.log(options); //console.log('run', host, process.pid); function sum(buf) { var i, r = 0; for (i = 0; i < buf.length; i += 1) { r += buf[i]; } return r; } fsq.on('start', function () { process.send({ type: 'start' }); //console.log('start', host, process.pid); }); fsq.on('stop', function () { //console.log('stop', host, process.pid, handlers, cbs); process.send({ type: 'stop' }); }); process.on('message', function (msg) { //console.log("child got message", msg); if (msg.type === 'subscribe') { handlers[msg.handler] = function (data, info, cb) { //console.log('got', host, process.pid, msg.topic, info.topic, info.single, info.path, msg.handler); cbs[cb_count] = cb; process.send( { type: 'received', handler: msg.handler, sum: sum(data), info: info, cb: cb_count, host: host, pid: process.pid }); cb_count += 1; }; fsq.subscribe(msg.topic, handlers[msg.handler], function () { process.send( { type: 'sub_callback', cb: msg.cb }); }); //console.log(host, process.pid, 'sub', msg.topic); } else if (msg.type === 'recv_callback') { cbs[msg.cb](msg.err); delete cbs[msg.cb]; } else if (msg.type === 'publish') { //console.log('publishing', host, process.pid, msg.topic, msg.options); fsq.publish(msg.topic, new Buffer(msg.payload, 'base64'), msg.options, function (err, fname) { process.send( { type: 'pub_callback', cb: msg.cb, err: err, fname: fname }); }); } else if (msg.type === 'stop_watching') { fsq.stop_watching(); } else if (msg.type === 'exit') { process.exit(); } else if (msg.type === 'unsubscribe') { if (msg.topic) { fsq.unsubscribe(msg.topic, handlers[msg.handler], function () { delete handlers[msg.handler]; process.send( { type: 'unsub_callback', cb: msg.cb }); }); } else { fsq.unsubscribe(function () { handlers = {}; process.send( { type: 'unsub_callback', cb: msg.cb }); }); } } });