From 0fcf2f7b974ac10efbbf9966a26d1dab47c3c417 Mon Sep 17 00:00:00 2001 From: Erik Roemmelt Date: Tue, 14 May 2019 18:20:33 +0200 Subject: [PATCH] add buefy + vuetify libs; added script tags to index.html --- node_modules/mongoose/.travis.yml | 21 - node_modules/mongoose/browser.js | 8 - node_modules/mongoose/index.js | 9 - node_modules/mongoose/lib/aggregate.js | 1099 - node_modules/mongoose/lib/browser.js | 133 - node_modules/mongoose/lib/browserDocument.js | 102 - node_modules/mongoose/lib/cast.js | 340 - node_modules/mongoose/lib/cast/boolean.js | 31 - node_modules/mongoose/lib/cast/date.js | 41 - node_modules/mongoose/lib/cast/decimal128.js | 36 - node_modules/mongoose/lib/cast/number.js | 45 - node_modules/mongoose/lib/cast/objectid.js | 29 - node_modules/mongoose/lib/cast/string.js | 35 - node_modules/mongoose/lib/collection.js | 269 - node_modules/mongoose/lib/connection.js | 954 - node_modules/mongoose/lib/connectionstate.js | 26 - .../mongoose/lib/cursor/AggregationCursor.js | 296 - .../mongoose/lib/cursor/ChangeStream.js | 58 - .../mongoose/lib/cursor/QueryCursor.js | 331 - .../mongoose/lib/document_provider.js | 30 - node_modules/mongoose/lib/driver.js | 15 - node_modules/mongoose/lib/drivers/SPEC.md | 4 - .../lib/drivers/browser/ReadPreference.js | 7 - .../mongoose/lib/drivers/browser/binary.js | 14 - .../lib/drivers/browser/decimal128.js | 7 - .../mongoose/lib/drivers/browser/index.js | 13 - .../mongoose/lib/drivers/browser/objectid.js | 28 - .../node-mongodb-native/ReadPreference.js | 47 - .../lib/drivers/node-mongodb-native/binary.js | 10 - .../drivers/node-mongodb-native/connection.js | 181 - .../drivers/node-mongodb-native/decimal128.js | 7 - .../lib/drivers/node-mongodb-native/index.js | 11 - .../drivers/node-mongodb-native/objectid.js | 16 - .../lib/error/browserMissingSchema.js | 38 - node_modules/mongoose/lib/error/cast.js | 62 - .../mongoose/lib/error/disconnected.js | 42 - .../mongoose/lib/error/divergentArray.js | 48 - node_modules/mongoose/lib/error/index.js | 104 - node_modules/mongoose/lib/error/messages.js | 46 - .../mongoose/lib/error/missingSchema.js | 39 - .../mongoose/lib/error/mongooseError.js | 28 - .../mongoose/lib/error/objectExpected.js | 37 - .../mongoose/lib/error/objectParameter.js | 38 - .../mongoose/lib/error/overwriteModel.js | 37 - .../mongoose/lib/error/parallelSave.js | 33 - node_modules/mongoose/lib/error/strict.js | 38 - node_modules/mongoose/lib/error/validation.js | 112 - node_modules/mongoose/lib/error/validator.js | 89 - node_modules/mongoose/lib/error/version.js | 36 - node_modules/mongoose/lib/helpers/common.js | 87 - .../mongoose/lib/helpers/cursor/eachAsync.js | 71 - .../helpers/document/cleanModifiedSubpaths.js | 25 - .../mongoose/lib/helpers/document/compile.js | 148 - .../document/getEmbeddedDiscriminatorPath.js | 43 - node_modules/mongoose/lib/helpers/get.js | 39 - .../mongoose/lib/helpers/immediate.js | 12 - .../lib/helpers/model/applyMethods.js | 53 - .../lib/helpers/model/applyStatics.js | 12 - .../lib/helpers/model/castBulkWrite.js | 136 - node_modules/mongoose/lib/helpers/once.js | 12 - .../populate/assignRawDocsToIdStructure.js | 85 - .../lib/helpers/populate/getSchemaTypes.js | 181 - .../lib/helpers/populate/getVirtual.js | 61 - .../lib/helpers/populate/leanPopulateMap.js | 7 - .../lib/helpers/populate/normalizeRefPath.js | 45 - .../lib/helpers/populate/validateRef.js | 19 - .../mongoose/lib/helpers/printJestWarning.js | 8 - .../projection/isDefiningProjection.js | 18 - .../lib/helpers/projection/isExclusive.js | 28 - .../lib/helpers/projection/isInclusive.js | 34 - .../lib/helpers/projection/isPathExcluded.js | 35 - .../projection/isPathSelectedInclusive.js | 28 - .../lib/helpers/query/applyQueryMiddleware.js | 66 - .../mongoose/lib/helpers/query/castUpdate.js | 428 - .../lib/helpers/query/completeMany.js | 47 - .../query/getEmbeddedDiscriminatorPath.js | 53 - .../lib/helpers/query/hasDollarKeys.js | 16 - .../helpers/query/selectPopulatedFields.js | 46 - .../mongoose/lib/helpers/query/wrapThunk.js | 18 - .../lib/helpers/schema/applyWriteConcern.js | 16 - .../mongoose/lib/helpers/schema/getIndexes.js | 124 - .../helpers/schema/handleTimestampOption.js | 24 - .../mongoose/lib/helpers/schema/merge.js | 19 - .../lib/helpers/schema/setParentPointers.js | 38 - .../lib/helpers/setDefaultsOnInsert.js | 117 - node_modules/mongoose/lib/helpers/symbols.js | 11 - .../update/applyTimestampsToChildren.js | 173 - .../helpers/update/applyTimestampsToUpdate.js | 65 - .../lib/helpers/update/modifiedPaths.js | 33 - .../mongoose/lib/helpers/updateValidators.js | 227 - node_modules/mongoose/lib/internal.js | 37 - node_modules/mongoose/lib/options.js | 14 - node_modules/mongoose/lib/plugins/idGetter.js | 28 - .../mongoose/lib/plugins/removeSubdocs.js | 38 - .../mongoose/lib/plugins/saveSubdocs.js | 66 - .../lib/plugins/validateBeforeSave.js | 38 - node_modules/mongoose/lib/promise_provider.js | 49 - node_modules/mongoose/lib/schema/boolean.js | 205 - node_modules/mongoose/lib/schema/buffer.js | 250 - node_modules/mongoose/lib/schema/date.js | 346 - .../mongoose/lib/schema/decimal128.js | 201 - node_modules/mongoose/lib/schema/embedded.js | 320 - node_modules/mongoose/lib/schema/index.js | 36 - node_modules/mongoose/lib/schema/map.js | 39 - node_modules/mongoose/lib/schema/mixed.js | 105 - node_modules/mongoose/lib/schema/number.js | 361 - node_modules/mongoose/lib/schema/objectid.js | 282 - .../mongoose/lib/schema/operators/bitwise.js | 38 - .../mongoose/lib/schema/operators/exists.js | 12 - .../lib/schema/operators/geospatial.js | 102 - .../mongoose/lib/schema/operators/helpers.js | 32 - .../mongoose/lib/schema/operators/text.js | 39 - .../mongoose/lib/schema/operators/type.js | 13 - node_modules/mongoose/lib/schema/string.js | 604 - node_modules/mongoose/lib/schema/symbols.js | 5 - node_modules/mongoose/lib/statemachine.js | 180 - node_modules/mongoose/lib/types/array.js | 848 - node_modules/mongoose/lib/types/buffer.js | 305 - node_modules/mongoose/lib/types/decimal128.js | 13 - node_modules/mongoose/lib/types/embedded.js | 446 - node_modules/mongoose/lib/types/index.js | 20 - node_modules/mongoose/lib/types/map.js | 192 - node_modules/mongoose/lib/types/objectid.js | 30 - .../mongoose/lib/types/subdocument.js | 236 - node_modules/mongoose/migrating_to_5.md | 432 - node_modules/mongoose/tools/auth.js | 30 - node_modules/mongoose/tools/repl.js | 36 - node_modules/mongoose/tools/sharded.js | 45 - node_modules/vue-router/CHANGELOG.md | 92 + .../vue-router/dist/vue-router.esm.browser.js | 2631 ++ .../dist/vue-router.esm.browser.min.js | 6 + public/index.html | 18 +- public/lib/buefy-0.7.5.js | 14166 +++++++++ public/lib/buefy-0.7.5.min.css | 4 + public/lib/buefy-0.7.5.min.js | 2 + public/lib/vuetify-1.5.14.js | 25974 ++++++++++++++++ public/lib/vuetify-1.5.14.min.css | 5 + public/lib/vuetify-1.5.14.min.js | 1 + 138 files changed, 42892 insertions(+), 13868 deletions(-) delete mode 100644 node_modules/mongoose/.travis.yml delete mode 100644 node_modules/mongoose/browser.js delete mode 100644 node_modules/mongoose/index.js delete mode 100644 node_modules/mongoose/lib/aggregate.js delete mode 100644 node_modules/mongoose/lib/browser.js delete mode 100644 node_modules/mongoose/lib/browserDocument.js delete mode 100644 node_modules/mongoose/lib/cast.js delete mode 100644 node_modules/mongoose/lib/cast/boolean.js delete mode 100644 node_modules/mongoose/lib/cast/date.js delete mode 100644 node_modules/mongoose/lib/cast/decimal128.js delete mode 100644 node_modules/mongoose/lib/cast/number.js delete mode 100644 node_modules/mongoose/lib/cast/objectid.js delete mode 100644 node_modules/mongoose/lib/cast/string.js delete mode 100644 node_modules/mongoose/lib/collection.js delete mode 100644 node_modules/mongoose/lib/connection.js delete mode 100644 node_modules/mongoose/lib/connectionstate.js delete mode 100644 node_modules/mongoose/lib/cursor/AggregationCursor.js delete mode 100644 node_modules/mongoose/lib/cursor/ChangeStream.js delete mode 100644 node_modules/mongoose/lib/cursor/QueryCursor.js delete mode 100644 node_modules/mongoose/lib/document_provider.js delete mode 100644 node_modules/mongoose/lib/driver.js delete mode 100644 node_modules/mongoose/lib/drivers/SPEC.md delete mode 100644 node_modules/mongoose/lib/drivers/browser/ReadPreference.js delete mode 100644 node_modules/mongoose/lib/drivers/browser/binary.js delete mode 100644 node_modules/mongoose/lib/drivers/browser/decimal128.js delete mode 100644 node_modules/mongoose/lib/drivers/browser/index.js delete mode 100644 node_modules/mongoose/lib/drivers/browser/objectid.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/index.js delete mode 100644 node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js delete mode 100644 node_modules/mongoose/lib/error/browserMissingSchema.js delete mode 100644 node_modules/mongoose/lib/error/cast.js delete mode 100644 node_modules/mongoose/lib/error/disconnected.js delete mode 100644 node_modules/mongoose/lib/error/divergentArray.js delete mode 100644 node_modules/mongoose/lib/error/index.js delete mode 100644 node_modules/mongoose/lib/error/messages.js delete mode 100644 node_modules/mongoose/lib/error/missingSchema.js delete mode 100644 node_modules/mongoose/lib/error/mongooseError.js delete mode 100644 node_modules/mongoose/lib/error/objectExpected.js delete mode 100644 node_modules/mongoose/lib/error/objectParameter.js delete mode 100644 node_modules/mongoose/lib/error/overwriteModel.js delete mode 100644 node_modules/mongoose/lib/error/parallelSave.js delete mode 100644 node_modules/mongoose/lib/error/strict.js delete mode 100644 node_modules/mongoose/lib/error/validation.js delete mode 100644 node_modules/mongoose/lib/error/validator.js delete mode 100644 node_modules/mongoose/lib/error/version.js delete mode 100644 node_modules/mongoose/lib/helpers/common.js delete mode 100644 node_modules/mongoose/lib/helpers/cursor/eachAsync.js delete mode 100644 node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js delete mode 100644 node_modules/mongoose/lib/helpers/document/compile.js delete mode 100644 node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js delete mode 100644 node_modules/mongoose/lib/helpers/get.js delete mode 100644 node_modules/mongoose/lib/helpers/immediate.js delete mode 100644 node_modules/mongoose/lib/helpers/model/applyMethods.js delete mode 100644 node_modules/mongoose/lib/helpers/model/applyStatics.js delete mode 100644 node_modules/mongoose/lib/helpers/model/castBulkWrite.js delete mode 100644 node_modules/mongoose/lib/helpers/once.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/getVirtual.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js delete mode 100644 node_modules/mongoose/lib/helpers/populate/validateRef.js delete mode 100644 node_modules/mongoose/lib/helpers/printJestWarning.js delete mode 100644 node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js delete mode 100644 node_modules/mongoose/lib/helpers/projection/isExclusive.js delete mode 100644 node_modules/mongoose/lib/helpers/projection/isInclusive.js delete mode 100644 node_modules/mongoose/lib/helpers/projection/isPathExcluded.js delete mode 100644 node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js delete mode 100644 node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js delete mode 100644 node_modules/mongoose/lib/helpers/query/castUpdate.js delete mode 100644 node_modules/mongoose/lib/helpers/query/completeMany.js delete mode 100644 node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js delete mode 100644 node_modules/mongoose/lib/helpers/query/hasDollarKeys.js delete mode 100644 node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js delete mode 100644 node_modules/mongoose/lib/helpers/query/wrapThunk.js delete mode 100644 node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js delete mode 100644 node_modules/mongoose/lib/helpers/schema/getIndexes.js delete mode 100644 node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js delete mode 100644 node_modules/mongoose/lib/helpers/schema/merge.js delete mode 100644 node_modules/mongoose/lib/helpers/schema/setParentPointers.js delete mode 100644 node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js delete mode 100644 node_modules/mongoose/lib/helpers/symbols.js delete mode 100644 node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js delete mode 100644 node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js delete mode 100644 node_modules/mongoose/lib/helpers/update/modifiedPaths.js delete mode 100644 node_modules/mongoose/lib/helpers/updateValidators.js delete mode 100644 node_modules/mongoose/lib/internal.js delete mode 100644 node_modules/mongoose/lib/options.js delete mode 100644 node_modules/mongoose/lib/plugins/idGetter.js delete mode 100644 node_modules/mongoose/lib/plugins/removeSubdocs.js delete mode 100644 node_modules/mongoose/lib/plugins/saveSubdocs.js delete mode 100644 node_modules/mongoose/lib/plugins/validateBeforeSave.js delete mode 100644 node_modules/mongoose/lib/promise_provider.js delete mode 100644 node_modules/mongoose/lib/schema/boolean.js delete mode 100644 node_modules/mongoose/lib/schema/buffer.js delete mode 100644 node_modules/mongoose/lib/schema/date.js delete mode 100644 node_modules/mongoose/lib/schema/decimal128.js delete mode 100644 node_modules/mongoose/lib/schema/embedded.js delete mode 100644 node_modules/mongoose/lib/schema/index.js delete mode 100644 node_modules/mongoose/lib/schema/map.js delete mode 100644 node_modules/mongoose/lib/schema/mixed.js delete mode 100644 node_modules/mongoose/lib/schema/number.js delete mode 100644 node_modules/mongoose/lib/schema/objectid.js delete mode 100644 node_modules/mongoose/lib/schema/operators/bitwise.js delete mode 100644 node_modules/mongoose/lib/schema/operators/exists.js delete mode 100644 node_modules/mongoose/lib/schema/operators/geospatial.js delete mode 100644 node_modules/mongoose/lib/schema/operators/helpers.js delete mode 100644 node_modules/mongoose/lib/schema/operators/text.js delete mode 100644 node_modules/mongoose/lib/schema/operators/type.js delete mode 100644 node_modules/mongoose/lib/schema/string.js delete mode 100644 node_modules/mongoose/lib/schema/symbols.js delete mode 100644 node_modules/mongoose/lib/statemachine.js delete mode 100644 node_modules/mongoose/lib/types/array.js delete mode 100644 node_modules/mongoose/lib/types/buffer.js delete mode 100644 node_modules/mongoose/lib/types/decimal128.js delete mode 100644 node_modules/mongoose/lib/types/embedded.js delete mode 100644 node_modules/mongoose/lib/types/index.js delete mode 100644 node_modules/mongoose/lib/types/map.js delete mode 100644 node_modules/mongoose/lib/types/objectid.js delete mode 100644 node_modules/mongoose/lib/types/subdocument.js delete mode 100644 node_modules/mongoose/migrating_to_5.md delete mode 100644 node_modules/mongoose/tools/auth.js delete mode 100644 node_modules/mongoose/tools/repl.js delete mode 100644 node_modules/mongoose/tools/sharded.js create mode 100644 node_modules/vue-router/CHANGELOG.md create mode 100644 node_modules/vue-router/dist/vue-router.esm.browser.js create mode 100644 node_modules/vue-router/dist/vue-router.esm.browser.min.js create mode 100644 public/lib/buefy-0.7.5.js create mode 100644 public/lib/buefy-0.7.5.min.css create mode 100644 public/lib/buefy-0.7.5.min.js create mode 100644 public/lib/vuetify-1.5.14.js create mode 100644 public/lib/vuetify-1.5.14.min.css create mode 100644 public/lib/vuetify-1.5.14.min.js diff --git a/node_modules/mongoose/.travis.yml b/node_modules/mongoose/.travis.yml deleted file mode 100644 index d1529aa..0000000 --- a/node_modules/mongoose/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: node_js -sudo: false -node_js: [10, 9, 8, 7, 6, 5, 4] -install: - - travis_retry npm install -before_script: - - wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.6.tgz - - tar -zxvf mongodb-linux-x86_64-3.6.6.tgz - - mkdir -p ./data/db/27017 - - mkdir -p ./data/db/27000 - - printf "\n--timeout 8000" >> ./test/mocha.opts - - ./mongodb-linux-x86_64-3.6.6/bin/mongod --fork --dbpath ./data/db/27017 --syslog --port 27017 - - sleep 2 -matrix: - include: - - name: "đŸ‘•Linter" - node_js: 10 - before_script: skip - script: npm run lint -notifications: - email: false diff --git a/node_modules/mongoose/browser.js b/node_modules/mongoose/browser.js deleted file mode 100644 index 4cf8228..0000000 --- a/node_modules/mongoose/browser.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Export lib/mongoose - * - */ - -'use strict'; - -module.exports = require('./lib/browser'); diff --git a/node_modules/mongoose/index.js b/node_modules/mongoose/index.js deleted file mode 100644 index a938b44..0000000 --- a/node_modules/mongoose/index.js +++ /dev/null @@ -1,9 +0,0 @@ - -/** - * Export lib/mongoose - * - */ - -'use strict'; - -module.exports = require('./lib/'); diff --git a/node_modules/mongoose/lib/aggregate.js b/node_modules/mongoose/lib/aggregate.js deleted file mode 100644 index 28bea5c..0000000 --- a/node_modules/mongoose/lib/aggregate.js +++ /dev/null @@ -1,1099 +0,0 @@ -'use strict'; - -/*! - * Module dependencies - */ - -const AggregationCursor = require('./cursor/AggregationCursor'); -const Query = require('./query'); -const util = require('util'); -const utils = require('./utils'); -const read = Query.prototype.read; -const readConcern = Query.prototype.readConcern; - -/** - * Aggregate constructor used for building aggregation pipelines. Do not - * instantiate this class directly, use [Model.aggregate()](/docs/api.html#model_Model.aggregate) instead. - * - * ####Example: - * - * const aggregate = Model.aggregate([ - * { $project: { a: 1, b: 1 } }, - * { $skip: 5 } - * ]); - * - * Model. - * aggregate([{ $match: { age: { $gte: 21 }}}]). - * unwind('tags'). - * exec(callback); - * - * ####Note: - * - * - The documents returned are plain javascript objects, not mongoose documents (since any shape of document can be returned). - * - Mongoose does **not** cast pipeline stages. The below will **not** work unless `_id` is a string in the database - * - * ```javascript - * new Aggregate([{ $match: { _id: '00000000000000000000000a' } }]); - * // Do this instead to cast to an ObjectId - * new Aggregate([{ $match: { _id: mongoose.Types.ObjectId('00000000000000000000000a') } }]); - * ``` - * - * @see MongoDB http://docs.mongodb.org/manual/applications/aggregation/ - * @see driver http://mongodb.github.com/node-mongodb-native/api-generated/collection.html#aggregate - * @param {Array} [pipeline] aggregation pipeline as an array of objects - * @api public - */ - -function Aggregate(pipeline) { - this._pipeline = []; - this._model = undefined; - this.options = {}; - - if (arguments.length === 1 && util.isArray(pipeline)) { - this.append.apply(this, pipeline); - } -} - -/** - * Contains options passed down to the [aggregate command](https://docs.mongodb.com/manual/reference/command/aggregate/). - * Supported options are: - * - * - `readPreference` - * - [`cursor`](./api.html#aggregate_Aggregate-cursor) - * - [`explain`](./api.html#aggregate_Aggregate-explain) - * - [`allowDiskUse`](./api.html#aggregate_Aggregate-allowDiskUse) - * - `maxTimeMS` - * - `bypassDocumentValidation` - * - `raw` - * - `promoteLongs` - * - `promoteValues` - * - `promoteBuffers` - * - [`collation`](./api.html#aggregate_Aggregate-collation) - * - `comment` - * - [`session`](./api.html#aggregate_Aggregate-session) - * - * @property options - * @memberOf Aggregate - * @api public - */ - -Aggregate.prototype.options; - -/** - * Binds this aggregate to a model. - * - * @param {Model} model the model to which the aggregate is to be bound - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.model = function(model) { - this._model = model; - if (model.schema != null) { - if (this.options.readPreference == null && - model.schema.options.read != null) { - this.options.readPreference = model.schema.options.read; - } - if (this.options.collation == null && - model.schema.options.collation != null) { - this.options.collation = model.schema.options.collation; - } - } - return this; -}; - -/** - * Appends new operators to this aggregate pipeline - * - * ####Examples: - * - * aggregate.append({ $project: { field: 1 }}, { $limit: 2 }); - * - * // or pass an array - * var pipeline = [{ $match: { daw: 'Logic Audio X' }} ]; - * aggregate.append(pipeline); - * - * @param {Object} ops operator(s) to append - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.append = function() { - const args = (arguments.length === 1 && util.isArray(arguments[0])) - ? arguments[0] - : utils.args(arguments); - - if (!args.every(isOperator)) { - throw new Error('Arguments must be aggregate pipeline operators'); - } - - this._pipeline = this._pipeline.concat(args); - - return this; -}; - -/** - * Appends a new $addFields operator to this aggregate pipeline. - * Requires MongoDB v3.4+ to work - * - * ####Examples: - * - * // adding new fields based on existing fields - * aggregate.addFields({ - * newField: '$b.nested' - * , plusTen: { $add: ['$val', 10]} - * , sub: { - * name: '$a' - * } - * }) - * - * // etc - * aggregate.addFields({ salary_k: { $divide: [ "$salary", 1000 ] } }); - * - * @param {Object} arg field specification - * @see $addFields https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/ - * @return {Aggregate} - * @api public - */ -Aggregate.prototype.addFields = function(arg) { - const fields = {}; - if (typeof arg === 'object' && !util.isArray(arg)) { - Object.keys(arg).forEach(function(field) { - fields[field] = arg[field]; - }); - } else { - throw new Error('Invalid addFields() argument. Must be an object'); - } - return this.append({$addFields: fields}); -}; - -/** - * Appends a new $project operator to this aggregate pipeline. - * - * Mongoose query [selection syntax](#query_Query-select) is also supported. - * - * ####Examples: - * - * // include a, include b, exclude _id - * aggregate.project("a b -_id"); - * - * // or you may use object notation, useful when - * // you have keys already prefixed with a "-" - * aggregate.project({a: 1, b: 1, _id: 0}); - * - * // reshaping documents - * aggregate.project({ - * newField: '$b.nested' - * , plusTen: { $add: ['$val', 10]} - * , sub: { - * name: '$a' - * } - * }) - * - * // etc - * aggregate.project({ salary_k: { $divide: [ "$salary", 1000 ] } }); - * - * @param {Object|String} arg field specification - * @see projection http://docs.mongodb.org/manual/reference/aggregation/project/ - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.project = function(arg) { - const fields = {}; - - if (typeof arg === 'object' && !util.isArray(arg)) { - Object.keys(arg).forEach(function(field) { - fields[field] = arg[field]; - }); - } else if (arguments.length === 1 && typeof arg === 'string') { - arg.split(/\s+/).forEach(function(field) { - if (!field) { - return; - } - const include = field[0] === '-' ? 0 : 1; - if (include === 0) { - field = field.substring(1); - } - fields[field] = include; - }); - } else { - throw new Error('Invalid project() argument. Must be string or object'); - } - - return this.append({$project: fields}); -}; - -/** - * Appends a new custom $group operator to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.group({ _id: "$department" }); - * - * @see $group http://docs.mongodb.org/manual/reference/aggregation/group/ - * @method group - * @memberOf Aggregate - * @instance - * @param {Object} arg $group operator contents - * @return {Aggregate} - * @api public - */ - -/** - * Appends a new custom $match operator to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.match({ department: { $in: [ "sales", "engineering" ] } }); - * - * @see $match http://docs.mongodb.org/manual/reference/aggregation/match/ - * @method match - * @memberOf Aggregate - * @instance - * @param {Object} arg $match operator contents - * @return {Aggregate} - * @api public - */ - -/** - * Appends a new $skip operator to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.skip(10); - * - * @see $skip http://docs.mongodb.org/manual/reference/aggregation/skip/ - * @method skip - * @memberOf Aggregate - * @instance - * @param {Number} num number of records to skip before next stage - * @return {Aggregate} - * @api public - */ - -/** - * Appends a new $limit operator to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.limit(10); - * - * @see $limit http://docs.mongodb.org/manual/reference/aggregation/limit/ - * @method limit - * @memberOf Aggregate - * @instance - * @param {Number} num maximum number of records to pass to the next stage - * @return {Aggregate} - * @api public - */ - -/** - * Appends a new $geoNear operator to this aggregate pipeline. - * - * ####NOTE: - * - * **MUST** be used as the first operator in the pipeline. - * - * ####Examples: - * - * aggregate.near({ - * near: [40.724, -73.997], - * distanceField: "dist.calculated", // required - * maxDistance: 0.008, - * query: { type: "public" }, - * includeLocs: "dist.location", - * uniqueDocs: true, - * num: 5 - * }); - * - * @see $geoNear http://docs.mongodb.org/manual/reference/aggregation/geoNear/ - * @method near - * @memberOf Aggregate - * @instance - * @param {Object} arg - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.near = function(arg) { - const op = {}; - op.$geoNear = arg; - return this.append(op); -}; - -/*! - * define methods - */ - -'group match skip limit out'.split(' ').forEach(function($operator) { - Aggregate.prototype[$operator] = function(arg) { - const op = {}; - op['$' + $operator] = arg; - return this.append(op); - }; -}); - -/** - * Appends new custom $unwind operator(s) to this aggregate pipeline. - * - * Note that the `$unwind` operator requires the path name to start with '$'. - * Mongoose will prepend '$' if the specified field doesn't start '$'. - * - * ####Examples: - * - * aggregate.unwind("tags"); - * aggregate.unwind("a", "b", "c"); - * - * @see $unwind http://docs.mongodb.org/manual/reference/aggregation/unwind/ - * @param {String} fields the field(s) to unwind - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.unwind = function() { - const args = utils.args(arguments); - - const res = []; - for (let i = 0; i < args.length; ++i) { - const arg = args[i]; - if (arg && typeof arg === 'object') { - res.push({ $unwind: arg }); - } else if (typeof arg === 'string') { - res.push({ - $unwind: (arg && arg.charAt(0) === '$') ? arg : '$' + arg - }); - } else { - throw new Error('Invalid arg "' + arg + '" to unwind(), ' + - 'must be string or object'); - } - } - - return this.append.apply(this, res); -}; - -/** - * Appends a new $replaceRoot operator to this aggregate pipeline. - * - * Note that the `$replaceRoot` operator requires field strings to start with '$'. - * If you are passing in a string Mongoose will prepend '$' if the specified field doesn't start '$'. - * If you are passing in an object the strings in your expression will not be altered. - * - * ####Examples: - * - * aggregate.replaceRoot("user"); - * - * aggregate.replaceRoot({ x: { $concat: ['$this', '$that'] } }); - * - * @see $replaceRoot https://docs.mongodb.org/manual/reference/operator/aggregation/replaceRoot - * @param {String|Object} the field or document which will become the new root document - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.replaceRoot = function(newRoot) { - let ret; - - if (typeof newRoot === 'string') { - ret = newRoot.startsWith('$') ? newRoot : '$' + newRoot; - } else { - ret = newRoot; - } - - return this.append({ - $replaceRoot: { - newRoot: ret - } - }); -}; - -/** - * Appends a new $count operator to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.count("userCount"); - * - * @see $count https://docs.mongodb.org/manual/reference/operator/aggregation/count - * @param {String} the name of the count field - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.count = function(countName) { - return this.append({ $count: countName }); -}; - -/** - * Appends a new $sortByCount operator to this aggregate pipeline. Accepts either a string field name - * or a pipeline object. - * - * Note that the `$sortByCount` operator requires the new root to start with '$'. - * Mongoose will prepend '$' if the specified field name doesn't start with '$'. - * - * ####Examples: - * - * aggregate.sortByCount('users'); - * aggregate.sortByCount({ $mergeObjects: [ "$employee", "$business" ] }) - * - * @see $sortByCount https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/ - * @param {Object|String} arg - * @return {Aggregate} this - * @api public - */ - -Aggregate.prototype.sortByCount = function(arg) { - if (arg && typeof arg === 'object') { - return this.append({ $sortByCount: arg }); - } else if (typeof arg === 'string') { - return this.append({ - $sortByCount: (arg && arg.charAt(0) === '$') ? arg : '$' + arg - }); - } else { - throw new TypeError('Invalid arg "' + arg + '" to sortByCount(), ' + - 'must be string or object'); - } -}; - -/** - * Appends new custom $lookup operator(s) to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.lookup({ from: 'users', localField: 'userId', foreignField: '_id', as: 'users' }); - * - * @see $lookup https://docs.mongodb.org/manual/reference/operator/aggregation/lookup/#pipe._S_lookup - * @param {Object} options to $lookup as described in the above link - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.lookup = function(options) { - return this.append({$lookup: options}); -}; - -/** - * Appends new custom $graphLookup operator(s) to this aggregate pipeline, performing a recursive search on a collection. - * - * Note that graphLookup can only consume at most 100MB of memory, and does not allow disk use even if `{ allowDiskUse: true }` is specified. - * - * #### Examples: - * // Suppose we have a collection of courses, where a document might look like `{ _id: 0, name: 'Calculus', prerequisite: 'Trigonometry'}` and `{ _id: 0, name: 'Trigonometry', prerequisite: 'Algebra' }` - * aggregate.graphLookup({ from: 'courses', startWith: '$prerequisite', connectFromField: 'prerequisite', connectToField: 'name', as: 'prerequisites', maxDepth: 3 }) // this will recursively search the 'courses' collection up to 3 prerequisites - * - * @see $graphLookup https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#pipe._S_graphLookup - * @param {Object} options to $graphLookup as described in the above link - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.graphLookup = function(options) { - const cloneOptions = {}; - if (options) { - if (!utils.isObject(options)) { - throw new TypeError('Invalid graphLookup() argument. Must be an object.'); - } - - utils.mergeClone(cloneOptions, options); - const startWith = cloneOptions.startWith; - - if (startWith && typeof startWith === 'string') { - cloneOptions.startWith = cloneOptions.startWith.charAt(0) === '$' ? - cloneOptions.startWith : - '$' + cloneOptions.startWith; - } - - } - return this.append({ $graphLookup: cloneOptions }); -}; - -/** - * Appends new custom $sample operator(s) to this aggregate pipeline. - * - * ####Examples: - * - * aggregate.sample(3); // Add a pipeline that picks 3 random documents - * - * @see $sample https://docs.mongodb.org/manual/reference/operator/aggregation/sample/#pipe._S_sample - * @param {Number} size number of random documents to pick - * @return {Aggregate} - * @api public - */ - -Aggregate.prototype.sample = function(size) { - return this.append({$sample: {size: size}}); -}; - -/** - * Appends a new $sort operator to this aggregate pipeline. - * - * If an object is passed, values allowed are `asc`, `desc`, `ascending`, `descending`, `1`, and `-1`. - * - * If a string is passed, it must be a space delimited list of path names. The sort order of each path is ascending unless the path name is prefixed with `-` which will be treated as descending. - * - * ####Examples: - * - * // these are equivalent - * aggregate.sort({ field: 'asc', test: -1 }); - * aggregate.sort('field -test'); - * - * @see $sort http://docs.mongodb.org/manual/reference/aggregation/sort/ - * @param {Object|String} arg - * @return {Aggregate} this - * @api public - */ - -Aggregate.prototype.sort = function(arg) { - // TODO refactor to reuse the query builder logic - - const sort = {}; - - if (arg.constructor.name === 'Object') { - const desc = ['desc', 'descending', -1]; - Object.keys(arg).forEach(function(field) { - // If sorting by text score, skip coercing into 1/-1 - if (arg[field] instanceof Object && arg[field].$meta) { - sort[field] = arg[field]; - return; - } - sort[field] = desc.indexOf(arg[field]) === -1 ? 1 : -1; - }); - } else if (arguments.length === 1 && typeof arg === 'string') { - arg.split(/\s+/).forEach(function(field) { - if (!field) { - return; - } - const ascend = field[0] === '-' ? -1 : 1; - if (ascend === -1) { - field = field.substring(1); - } - sort[field] = ascend; - }); - } else { - throw new TypeError('Invalid sort() argument. Must be a string or object.'); - } - - return this.append({$sort: sort}); -}; - -/** - * Sets the readPreference option for the aggregation query. - * - * ####Example: - * - * Model.aggregate(..).read('primaryPreferred').exec(callback) - * - * @param {String} pref one of the listed preference options or their aliases - * @param {Array} [tags] optional tags for this query - * @return {Aggregate} this - * @api public - * @see mongodb http://docs.mongodb.org/manual/applications/replication/#read-preference - * @see driver http://mongodb.github.com/node-mongodb-native/driver-articles/anintroductionto1_1and2_2.html#read-preferences - */ - -Aggregate.prototype.read = function(pref, tags) { - if (!this.options) { - this.options = {}; - } - read.call(this, pref, tags); - return this; -}; - -/** - * Sets the readConcern level for the aggregation query. - * - * ####Example: - * - * Model.aggregate(..).readConcern('majority').exec(callback) - * - * @param {String} level one of the listed read concern level or their aliases - * @see mongodb https://docs.mongodb.com/manual/reference/read-concern/ - * @return {Aggregate} this - * @api public - */ - -Aggregate.prototype.readConcern = function(level) { - if (!this.options) { - this.options = {}; - } - readConcern.call(this, level); - return this; -}; - -/** - * Appends a new $redact operator to this aggregate pipeline. - * - * If 3 arguments are supplied, Mongoose will wrap them with if-then-else of $cond operator respectively - * If `thenExpr` or `elseExpr` is string, make sure it starts with $$, like `$$DESCEND`, `$$PRUNE` or `$$KEEP`. - * - * ####Example: - * - * Model.aggregate(...) - * .redact({ - * $cond: { - * if: { $eq: [ '$level', 5 ] }, - * then: '$$PRUNE', - * else: '$$DESCEND' - * } - * }) - * .exec(); - * - * // $redact often comes with $cond operator, you can also use the following syntax provided by mongoose - * Model.aggregate(...) - * .redact({ $eq: [ '$level', 5 ] }, '$$PRUNE', '$$DESCEND') - * .exec(); - * - * @param {Object} expression redact options or conditional expression - * @param {String|Object} [thenExpr] true case for the condition - * @param {String|Object} [elseExpr] false case for the condition - * @return {Aggregate} this - * @see $redact https://docs.mongodb.com/manual/reference/operator/aggregation/redact/ - * @api public - */ - -Aggregate.prototype.redact = function(expression, thenExpr, elseExpr) { - if (arguments.length === 3) { - if ((typeof thenExpr === 'string' && !thenExpr.startsWith('$$')) || - (typeof elseExpr === 'string' && !elseExpr.startsWith('$$'))) { - throw new Error('If thenExpr or elseExpr is string, it must start with $$. e.g. $$DESCEND, $$PRUNE, $$KEEP'); - } - - expression = { - $cond: { - if: expression, - then: thenExpr, - else: elseExpr - } - }; - } else if (arguments.length !== 1) { - throw new TypeError('Invalid arguments'); - } - - return this.append({$redact: expression}); -}; - -/** - * Execute the aggregation with explain - * - * ####Example: - * - * Model.aggregate(..).explain(callback) - * - * @param {Function} callback - * @return {Promise} - */ - -Aggregate.prototype.explain = function(callback) { - return utils.promiseOrCallback(callback, cb => { - if (!this._pipeline.length) { - const err = new Error('Aggregate has empty pipeline'); - return cb(err); - } - - prepareDiscriminatorPipeline(this); - - this._model.collection. - aggregate(this._pipeline, this.options || {}). - explain(function(error, result) { - if (error) { - return cb(error); - } - cb(null, result); - }); - }, this._model.events); -}; - -/** - * Sets the allowDiskUse option for the aggregation query (ignored for < 2.6.0) - * - * ####Example: - * - * await Model.aggregate([{ $match: { foo: 'bar' } }]).allowDiskUse(true); - * - * @param {Boolean} value Should tell server it can use hard drive to store data during aggregation. - * @param {Array} [tags] optional tags for this query - * @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/ - */ - -Aggregate.prototype.allowDiskUse = function(value) { - this.options.allowDiskUse = value; - return this; -}; - -/** - * Sets the hint option for the aggregation query (ignored for < 3.6.0) - * - * ####Example: - * - * Model.aggregate(..).hint({ qty: 1, category: 1 } }).exec(callback) - * - * @param {Object|String} value a hint object or the index name - * @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/ - */ - -Aggregate.prototype.hint = function(value) { - this.options.hint = value; - return this; -}; - -/** - * Sets the session for this aggregation. Useful for [transactions](/docs/transactions.html). - * - * ####Example: - * - * const session = await Model.startSession(); - * await Model.aggregate(..).session(session); - * - * @param {ClientSession} session - * @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/ - */ - -Aggregate.prototype.session = function(session) { - if (session == null) { - delete this.options.session; - } else { - this.options.session = session; - } - return this; -}; - -/** - * Lets you set arbitrary options, for middleware or plugins. - * - * ####Example: - * - * var agg = Model.aggregate(..).option({ allowDiskUse: true }); // Set the `allowDiskUse` option - * agg.options; // `{ allowDiskUse: true }` - * - * @param {Object} options keys to merge into current options - * @param [options.maxTimeMS] number limits the time this aggregation will run, see [MongoDB docs on `maxTimeMS`](https://docs.mongodb.com/manual/reference/operator/meta/maxTimeMS/) - * @param [options.allowDiskUse] boolean if true, the MongoDB server will use the hard drive to store data during this aggregation - * @param [options.collation] object see [`Aggregate.prototype.collation()`](./docs/api.html#aggregate_Aggregate-collation) - * @param [options.session] ClientSession see [`Aggregate.prototype.session()`](./docs/api.html#aggregate_Aggregate-session) - * @see mongodb http://docs.mongodb.org/manual/reference/command/aggregate/ - * @return {Aggregate} this - * @api public - */ - -Aggregate.prototype.option = function(value) { - for (const key in value) { - this.options[key] = value[key]; - } - return this; -}; - -/** - * Sets the cursor option option for the aggregation query (ignored for < 2.6.0). - * Note the different syntax below: .exec() returns a cursor object, and no callback - * is necessary. - * - * ####Example: - * - * var cursor = Model.aggregate(..).cursor({ batchSize: 1000 }).exec(); - * cursor.each(function(error, doc) { - * // use doc - * }); - * - * @param {Object} options - * @param {Number} options.batchSize set the cursor batch size - * @param {Boolean} [options.useMongooseAggCursor] use experimental mongoose-specific aggregation cursor (for `eachAsync()` and other query cursor semantics) - * @return {Aggregate} this - * @api public - * @see mongodb http://mongodb.github.io/node-mongodb-native/2.0/api/AggregationCursor.html - */ - -Aggregate.prototype.cursor = function(options) { - if (!this.options) { - this.options = {}; - } - this.options.cursor = options || {}; - return this; -}; - -/** - * Sets an option on this aggregation. This function will be deprecated in a - * future release. Use the [`cursor()`](./api.html#aggregate_Aggregate-cursor), - * [`collation()`](./api.html#aggregate_Aggregate-collation), etc. helpers to - * set individual options, or access `agg.options` directly. - * - * Note that MongoDB aggregations [do **not** support the `noCursorTimeout` flag](https://jira.mongodb.org/browse/SERVER-6036), - * if you try setting that flag with this function you will get a "unrecognized field 'noCursorTimeout'" error. - * - * @param {String} flag - * @param {Boolean} value - * @return {Aggregate} this - * @api public - * @deprecated Use [`.option()`](api.html#aggregate_Aggregate-option) instead. Note that MongoDB aggregations do **not** support a `noCursorTimeout` option. - */ - -Aggregate.prototype.addCursorFlag = util.deprecate(function(flag, value) { - if (!this.options) { - this.options = {}; - } - this.options[flag] = value; - return this; -}, 'Mongoose: `Aggregate#addCursorFlag()` is deprecated, use `option()` instead'); - -/** - * Adds a collation - * - * ####Example: - * - * Model.aggregate(..).collation({ locale: 'en_US', strength: 1 }).exec(); - * - * @param {Object} collation options - * @return {Aggregate} this - * @api public - * @see mongodb http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#aggregate - */ - -Aggregate.prototype.collation = function(collation) { - if (!this.options) { - this.options = {}; - } - this.options.collation = collation; - return this; -}; - -/** - * Combines multiple aggregation pipelines. - * - * ####Example: - * - * Model.aggregate(...) - * .facet({ - * books: [{ groupBy: '$author' }], - * price: [{ $bucketAuto: { groupBy: '$price', buckets: 2 } }] - * }) - * .exec(); - * - * // Output: { books: [...], price: [{...}, {...}] } - * - * @param {Object} facet options - * @return {Aggregate} this - * @see $facet https://docs.mongodb.com/v3.4/reference/operator/aggregation/facet/ - * @api public - */ - -Aggregate.prototype.facet = function(options) { - return this.append({$facet: options}); -}; - -/** - * Returns the current pipeline - * - * ####Example: - * - * MyModel.aggregate().match({ test: 1 }).pipeline(); // [{ $match: { test: 1 } }] - * - * @return {Array} - * @api public - */ - - -Aggregate.prototype.pipeline = function() { - return this._pipeline; -}; - -/** - * Executes the aggregate pipeline on the currently bound Model. - * - * ####Example: - * - * aggregate.exec(callback); - * - * // Because a promise is returned, the `callback` is optional. - * var promise = aggregate.exec(); - * promise.then(..); - * - * @see Promise #promise_Promise - * @param {Function} [callback] - * @return {Promise} - * @api public - */ - -Aggregate.prototype.exec = function(callback) { - if (!this._model) { - throw new Error('Aggregate not bound to any Model'); - } - const model = this._model; - const options = utils.clone(this.options || {}); - const pipeline = this._pipeline; - const collection = this._model.collection; - - if (options && options.cursor) { - return new AggregationCursor(this); - } - - return utils.promiseOrCallback(callback, cb => { - if (!pipeline.length) { - const err = new Error('Aggregate has empty pipeline'); - return cb(err); - } - - prepareDiscriminatorPipeline(this); - - model.hooks.execPre('aggregate', this, error => { - if (error) { - const _opts = { error: error }; - return model.hooks.execPost('aggregate', this, [null], _opts, error => { - cb(error); - }); - } - - collection.aggregate(pipeline, options, (error, cursor) => { - if (error) { - const _opts = { error: error }; - return model.hooks.execPost('aggregate', this, [null], _opts, error => { - if (error) { - return cb(error); - } - return cb(null); - }); - } - cursor.toArray((error, result) => { - const _opts = { error: error }; - model.hooks.execPost('aggregate', this, [result], _opts, (error, result) => { - if (error) { - return cb(error); - } - - cb(null, result); - }); - }); - }); - }); - }, model.events); -}; - -/** - * Provides promise for aggregate. - * - * ####Example: - * - * Model.aggregate(..).then(successCallback, errorCallback); - * - * @see Promise #promise_Promise - * @param {Function} [resolve] successCallback - * @param {Function} [reject] errorCallback - * @return {Promise} - */ -Aggregate.prototype.then = function(resolve, reject) { - return this.exec().then(resolve, reject); -}; - -/** - * Executes the query returning a `Promise` which will be - * resolved with either the doc(s) or rejected with the error. - * Like [`.then()`](#query_Query-then), but only takes a rejection handler. - * - * @param {Function} [reject] - * @return {Promise} - * @api public - */ - -Aggregate.prototype.catch = function(reject) { - return this.exec().then(null, reject); -}; - -/** - * Returns an asyncIterator for use with [`for/await/of` loops](http://bit.ly/async-iterators) - * This function *only* works for `find()` queries. - * You do not need to call this function explicitly, the JavaScript runtime - * will call it for you. - * - * ####Example - * - * for await (const doc of Model.find().sort({ name: 1 })) { - * console.log(doc.name); - * } - * - * Node.js 10.x supports async iterators natively without any flags. You can - * enable async iterators in Node.js 8.x using the [`--harmony_async_iteration` flag](https://github.com/tc39/proposal-async-iteration/issues/117#issuecomment-346695187). - * - * **Note:** This function is not if `Symbol.asyncIterator` is undefined. If - * `Symbol.asyncIterator` is undefined, that means your Node.js version does not - * support async iterators. - * - * @method Symbol.asyncIterator - * @memberOf Aggregate - * @instance - * @api public - */ - -if (Symbol.asyncIterator != null) { - Aggregate.prototype[Symbol.asyncIterator] = function() { - return this.cursor({ useMongooseAggCursor: true }). - exec(). - transformNull(). - map(doc => { - return doc == null ? { done: true } : { value: doc, done: false }; - }); - }; -} - -/*! - * Helpers - */ - -/** - * Checks whether an object is likely a pipeline operator - * - * @param {Object} obj object to check - * @return {Boolean} - * @api private - */ - -function isOperator(obj) { - if (typeof obj !== 'object') { - return false; - } - - const k = Object.keys(obj); - - return k.length === 1 && k.some(key => { return key[0] === '$'; }); -} - -/*! - * Adds the appropriate `$match` pipeline step to the top of an aggregate's - * pipeline, should it's model is a non-root discriminator type. This is - * analogous to the `prepareDiscriminatorCriteria` function in `lib/query.js`. - * - * @param {Aggregate} aggregate Aggregate to prepare - */ - -Aggregate._prepareDiscriminatorPipeline = prepareDiscriminatorPipeline; - -function prepareDiscriminatorPipeline(aggregate) { - const schema = aggregate._model.schema; - const discriminatorMapping = schema && schema.discriminatorMapping; - - if (discriminatorMapping && !discriminatorMapping.isRoot) { - const originalPipeline = aggregate._pipeline; - const discriminatorKey = discriminatorMapping.key; - const discriminatorValue = discriminatorMapping.value; - - // If the first pipeline stage is a match and it doesn't specify a `__t` - // key, add the discriminator key to it. This allows for potential - // aggregation query optimizations not to be disturbed by this feature. - if (originalPipeline[0] && originalPipeline[0].$match && !originalPipeline[0].$match[discriminatorKey]) { - originalPipeline[0].$match[discriminatorKey] = discriminatorValue; - // `originalPipeline` is a ref, so there's no need for - // aggregate._pipeline = originalPipeline - } else if (originalPipeline[0] && originalPipeline[0].$geoNear) { - originalPipeline[0].$geoNear.query = - originalPipeline[0].$geoNear.query || {}; - originalPipeline[0].$geoNear.query[discriminatorKey] = discriminatorValue; - } else { - const match = {}; - match[discriminatorKey] = discriminatorValue; - aggregate._pipeline.unshift({ $match: match }); - } - } -} - -/*! - * Exports - */ - -module.exports = Aggregate; diff --git a/node_modules/mongoose/lib/browser.js b/node_modules/mongoose/lib/browser.js deleted file mode 100644 index 8b9b4b7..0000000 --- a/node_modules/mongoose/lib/browser.js +++ /dev/null @@ -1,133 +0,0 @@ -/* eslint-env browser */ - -'use strict'; - -require('./driver').set(require('./drivers/browser')); - -const DocumentProvider = require('./document_provider.js'); -const PromiseProvider = require('./promise_provider'); - -DocumentProvider.setBrowser(true); - -/** - * The Mongoose [Promise](#promise_Promise) constructor. - * - * @method Promise - * @api public - */ - -Object.defineProperty(exports, 'Promise', { - get: function() { - return PromiseProvider.get(); - }, - set: function(lib) { - PromiseProvider.set(lib); - } -}); - -/** - * Storage layer for mongoose promises - * - * @method PromiseProvider - * @api public - */ - -exports.PromiseProvider = PromiseProvider; - -/** - * The [MongooseError](#error_MongooseError) constructor. - * - * @method Error - * @api public - */ - -exports.Error = require('./error'); - -/** - * The Mongoose [Schema](#schema_Schema) constructor - * - * ####Example: - * - * var mongoose = require('mongoose'); - * var Schema = mongoose.Schema; - * var CatSchema = new Schema(..); - * - * @method Schema - * @api public - */ - -exports.Schema = require('./schema'); - -/** - * The various Mongoose Types. - * - * ####Example: - * - * var mongoose = require('mongoose'); - * var array = mongoose.Types.Array; - * - * ####Types: - * - * - [ObjectId](#types-objectid-js) - * - [Buffer](#types-buffer-js) - * - [SubDocument](#types-embedded-js) - * - [Array](#types-array-js) - * - [DocumentArray](#types-documentarray-js) - * - * Using this exposed access to the `ObjectId` type, we can construct ids on demand. - * - * var ObjectId = mongoose.Types.ObjectId; - * var id1 = new ObjectId; - * - * @property Types - * @api public - */ -exports.Types = require('./types'); - -/** - * The Mongoose [VirtualType](#virtualtype_VirtualType) constructor - * - * @method VirtualType - * @api public - */ -exports.VirtualType = require('./virtualtype'); - -/** - * The various Mongoose SchemaTypes. - * - * ####Note: - * - * _Alias of mongoose.Schema.Types for backwards compatibility._ - * - * @property SchemaTypes - * @see Schema.SchemaTypes #schema_Schema.Types - * @api public - */ - -exports.SchemaType = require('./schematype.js'); - -/** - * Internal utils - * - * @property utils - * @api private - */ - -exports.utils = require('./utils.js'); - -/** - * The Mongoose browser [Document](#document-js) constructor. - * - * @method Document - * @api public - */ -exports.Document = DocumentProvider(); - -/*! - * Module exports. - */ - -if (typeof window !== 'undefined') { - window.mongoose = module.exports; - window.Buffer = Buffer; -} diff --git a/node_modules/mongoose/lib/browserDocument.js b/node_modules/mongoose/lib/browserDocument.js deleted file mode 100644 index b1c803d..0000000 --- a/node_modules/mongoose/lib/browserDocument.js +++ /dev/null @@ -1,102 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const NodeJSDocument = require('./document'); -const EventEmitter = require('events').EventEmitter; -const MongooseError = require('./error'); -const Schema = require('./schema'); -const ObjectId = require('./types/objectid'); -const ValidationError = MongooseError.ValidationError; -const applyHooks = require('./helpers/model/applyHooks'); -const utils = require('./utils'); - -/** - * Document constructor. - * - * @param {Object} obj the values to set - * @param {Object} [fields] optional object containing the fields which were selected in the query returning this document and any populated paths data - * @param {Boolean} [skipId] bool, should we auto create an ObjectId _id - * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter - * @event `init`: Emitted on a document after it has was retrieved from the db and fully hydrated by Mongoose. - * @event `save`: Emitted when the document is successfully saved - * @api private - */ - -function Document(obj, schema, fields, skipId, skipInit) { - if (!(this instanceof Document)) { - return new Document(obj, schema, fields, skipId, skipInit); - } - - if (utils.isObject(schema) && !schema.instanceOfSchema) { - schema = new Schema(schema); - } - - // When creating EmbeddedDocument, it already has the schema and he doesn't need the _id - schema = this.schema || schema; - - // Generate ObjectId if it is missing, but it requires a scheme - if (!this.schema && schema.options._id) { - obj = obj || {}; - - if (obj._id === undefined) { - obj._id = new ObjectId(); - } - } - - if (!schema) { - throw new MongooseError.MissingSchemaError(); - } - - this.$__setSchema(schema); - - NodeJSDocument.call(this, obj, fields, skipId, skipInit); - - applyHooks(this, schema, { decorateDoc: true }); - - // apply methods - for (const m in schema.methods) { - this[m] = schema.methods[m]; - } - // apply statics - for (const s in schema.statics) { - this[s] = schema.statics[s]; - } -} - -/*! - * Inherit from the NodeJS document - */ - -Document.prototype = Object.create(NodeJSDocument.prototype); -Document.prototype.constructor = Document; - -/*! - * ignore - */ - -Document.events = new EventEmitter(); - -/*! - * Browser doc exposes the event emitter API - */ - -Document.$emitter = new EventEmitter(); - -utils.each( - ['on', 'once', 'emit', 'listeners', 'removeListener', 'setMaxListeners', - 'removeAllListeners', 'addListener'], - function(emitterFn) { - Document[emitterFn] = function() { - return Document.$emitter[emitterFn].apply(Document.$emitter, arguments); - }; - }); - -/*! - * Module exports. - */ - -Document.ValidationError = ValidationError; -module.exports = exports = Document; diff --git a/node_modules/mongoose/lib/cast.js b/node_modules/mongoose/lib/cast.js deleted file mode 100644 index 398734b..0000000 --- a/node_modules/mongoose/lib/cast.js +++ /dev/null @@ -1,340 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const StrictModeError = require('./error/strict'); -const Types = require('./schema/index'); -const castTextSearch = require('./schema/operators/text'); -const get = require('./helpers/get'); -const util = require('util'); -const utils = require('./utils'); - -const ALLOWED_GEOWITHIN_GEOJSON_TYPES = ['Polygon', 'MultiPolygon']; - -/** - * Handles internal casting for query filters. - * - * @param {Schema} schema - * @param {Object} obj Object to cast - * @param {Object} options the query options - * @param {Query} context passed to setters - * @api private - */ -module.exports = function cast(schema, obj, options, context) { - if (Array.isArray(obj)) { - throw new Error('Query filter must be an object, got an array ', util.inspect(obj)); - } - - const paths = Object.keys(obj); - let i = paths.length; - let _keys; - let any$conditionals; - let schematype; - let nested; - let path; - let type; - let val; - - options = options || {}; - - while (i--) { - path = paths[i]; - val = obj[path]; - - if (path === '$or' || path === '$nor' || path === '$and') { - let k = val.length; - - while (k--) { - val[k] = cast(schema, val[k], options, context); - } - } else if (path === '$where') { - type = typeof val; - - if (type !== 'string' && type !== 'function') { - throw new Error('Must have a string or function for $where'); - } - - if (type === 'function') { - obj[path] = val.toString(); - } - - continue; - } else if (path === '$elemMatch') { - val = cast(schema, val, options, context); - } else if (path === '$text') { - val = castTextSearch(val, path); - } else { - if (!schema) { - // no casting for Mixed types - continue; - } - - schematype = schema.path(path); - - // Check for embedded discriminator paths - if (!schematype) { - const split = path.split('.'); - let j = split.length; - while (j--) { - const pathFirstHalf = split.slice(0, j).join('.'); - const pathLastHalf = split.slice(j).join('.'); - const _schematype = schema.path(pathFirstHalf); - const discriminatorKey = get(_schematype, 'schema.options.discriminatorKey'); - - // gh-6027: if we haven't found the schematype but this path is - // underneath an embedded discriminator and the embedded discriminator - // key is in the query, use the embedded discriminator schema - if (_schematype != null && - get(_schematype, 'schema.discriminators') != null && - discriminatorKey != null && - pathLastHalf !== discriminatorKey) { - const discriminatorVal = get(obj, pathFirstHalf + '.' + discriminatorKey); - if (discriminatorVal != null) { - schematype = _schematype.schema.discriminators[discriminatorVal]. - path(pathLastHalf); - } - } - } - } - - if (!schematype) { - // Handle potential embedded array queries - const split = path.split('.'); - let j = split.length; - let pathFirstHalf; - let pathLastHalf; - let remainingConds; - - // Find the part of the var path that is a path of the Schema - while (j--) { - pathFirstHalf = split.slice(0, j).join('.'); - schematype = schema.path(pathFirstHalf); - if (schematype) { - break; - } - } - - // If a substring of the input path resolves to an actual real path... - if (schematype) { - // Apply the casting; similar code for $elemMatch in schema/array.js - if (schematype.caster && schematype.caster.schema) { - remainingConds = {}; - pathLastHalf = split.slice(j).join('.'); - remainingConds[pathLastHalf] = val; - obj[path] = cast(schematype.caster.schema, remainingConds, options, context)[pathLastHalf]; - } else { - obj[path] = val; - } - continue; - } - - if (utils.isObject(val)) { - // handle geo schemas that use object notation - // { loc: { long: Number, lat: Number } - - let geo = ''; - if (val.$near) { - geo = '$near'; - } else if (val.$nearSphere) { - geo = '$nearSphere'; - } else if (val.$within) { - geo = '$within'; - } else if (val.$geoIntersects) { - geo = '$geoIntersects'; - } else if (val.$geoWithin) { - geo = '$geoWithin'; - } - - if (geo) { - const numbertype = new Types.Number('__QueryCasting__'); - let value = val[geo]; - - if (val.$maxDistance != null) { - val.$maxDistance = numbertype.castForQueryWrapper({ - val: val.$maxDistance, - context: context - }); - } - if (val.$minDistance != null) { - val.$minDistance = numbertype.castForQueryWrapper({ - val: val.$minDistance, - context: context - }); - } - - if (geo === '$within') { - const withinType = value.$center - || value.$centerSphere - || value.$box - || value.$polygon; - - if (!withinType) { - throw new Error('Bad $within parameter: ' + JSON.stringify(val)); - } - - value = withinType; - } else if (geo === '$near' && - typeof value.type === 'string' && Array.isArray(value.coordinates)) { - // geojson; cast the coordinates - value = value.coordinates; - } else if ((geo === '$near' || geo === '$nearSphere' || geo === '$geoIntersects') && - value.$geometry && typeof value.$geometry.type === 'string' && - Array.isArray(value.$geometry.coordinates)) { - if (value.$maxDistance != null) { - value.$maxDistance = numbertype.castForQueryWrapper({ - val: value.$maxDistance, - context: context - }); - } - if (value.$minDistance != null) { - value.$minDistance = numbertype.castForQueryWrapper({ - val: value.$minDistance, - context: context - }); - } - if (utils.isMongooseObject(value.$geometry)) { - value.$geometry = value.$geometry.toObject({ - transform: false, - virtuals: false - }); - } - value = value.$geometry.coordinates; - } else if (geo === '$geoWithin') { - if (value.$geometry) { - if (utils.isMongooseObject(value.$geometry)) { - value.$geometry = value.$geometry.toObject({ virtuals: false }); - } - const geoWithinType = value.$geometry.type; - if (ALLOWED_GEOWITHIN_GEOJSON_TYPES.indexOf(geoWithinType) === -1) { - throw new Error('Invalid geoJSON type for $geoWithin "' + - geoWithinType + '", must be "Polygon" or "MultiPolygon"'); - } - value = value.$geometry.coordinates; - } else { - value = value.$box || value.$polygon || value.$center || - value.$centerSphere; - if (utils.isMongooseObject(value)) { - value = value.toObject({ virtuals: false }); - } - } - } - - _cast(value, numbertype, context); - continue; - } - } - - if (schema.nested[path]) { - continue; - } - if (options.upsert && options.strict) { - if (options.strict === 'throw') { - throw new StrictModeError(path); - } - throw new StrictModeError(path, 'Path "' + path + '" is not in ' + - 'schema, strict mode is `true`, and upsert is `true`.'); - } else if (options.strictQuery === 'throw') { - throw new StrictModeError(path, 'Path "' + path + '" is not in ' + - 'schema and strictQuery is true.'); - } else if (options.strictQuery) { - delete obj[path]; - } - } else if (val == null) { - continue; - } else if (val.constructor.name === 'Object') { - any$conditionals = Object.keys(val).some(function(k) { - return k.charAt(0) === '$' && k !== '$id' && k !== '$ref'; - }); - - if (!any$conditionals) { - obj[path] = schematype.castForQueryWrapper({ - val: val, - context: context - }); - } else { - const ks = Object.keys(val); - let $cond; - - let k = ks.length; - - while (k--) { - $cond = ks[k]; - nested = val[$cond]; - - if ($cond === '$not') { - if (nested && schematype && !schematype.caster) { - _keys = Object.keys(nested); - if (_keys.length && _keys[0].charAt(0) === '$') { - for (const key in nested) { - nested[key] = schematype.castForQueryWrapper({ - $conditional: key, - val: nested[key], - context: context - }); - } - } else { - val[$cond] = schematype.castForQueryWrapper({ - $conditional: $cond, - val: nested, - context: context - }); - } - continue; - } - cast(schematype.caster ? schematype.caster.schema : schema, nested, options, context); - } else { - val[$cond] = schematype.castForQueryWrapper({ - $conditional: $cond, - val: nested, - context: context - }); - } - } - } - } else if (Array.isArray(val) && ['Buffer', 'Array'].indexOf(schematype.instance) === -1) { - const casted = []; - for (let valIndex = 0; valIndex < val.length; valIndex++) { - casted.push(schematype.castForQueryWrapper({ - val: val[valIndex], - context: context - })); - } - - obj[path] = { $in: casted }; - } else { - obj[path] = schematype.castForQueryWrapper({ - val: val, - context: context - }); - } - } - } - - return obj; -}; - -function _cast(val, numbertype, context) { - if (Array.isArray(val)) { - val.forEach(function(item, i) { - if (Array.isArray(item) || utils.isObject(item)) { - return _cast(item, numbertype, context); - } - val[i] = numbertype.castForQueryWrapper({ val: item, context: context }); - }); - } else { - const nearKeys = Object.keys(val); - let nearLen = nearKeys.length; - while (nearLen--) { - const nkey = nearKeys[nearLen]; - const item = val[nkey]; - if (Array.isArray(item) || utils.isObject(item)) { - _cast(item, numbertype, context); - val[nkey] = item; - } else { - val[nkey] = numbertype.castForQuery({ val: item, context: context }); - } - } - } -} diff --git a/node_modules/mongoose/lib/cast/boolean.js b/node_modules/mongoose/lib/cast/boolean.js deleted file mode 100644 index 4843e1f..0000000 --- a/node_modules/mongoose/lib/cast/boolean.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const CastError = require('../error/cast'); - -/*! - * Given a value, cast it to a boolean, or throw a `CastError` if the value - * cannot be casted. `null` and `undefined` are considered valid. - * - * @param {Any} value - * @param {String} [path] optional the path to set on the CastError - * @return {Boolean|null|undefined} - * @throws {CastError} if `value` is not one of the allowed values - * @api private - */ - -module.exports = function castBoolean(value, path) { - if (value == null) { - return value; - } - - if (module.exports.convertToTrue.has(value)) { - return true; - } - if (module.exports.convertToFalse.has(value)) { - return false; - } - throw new CastError('boolean', value, path); -}; - -module.exports.convertToTrue = new Set([true, 'true', 1, '1', 'yes']); -module.exports.convertToFalse = new Set([false, 'false', 0, '0', 'no']); diff --git a/node_modules/mongoose/lib/cast/date.js b/node_modules/mongoose/lib/cast/date.js deleted file mode 100644 index c7f9b04..0000000 --- a/node_modules/mongoose/lib/cast/date.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -module.exports = function castDate(value) { - // Support empty string because of empty form values. Originally introduced - // in https://github.com/Automattic/mongoose/commit/efc72a1898fc3c33a319d915b8c5463a22938dfe - if (value == null || value === '') { - return null; - } - - if (value instanceof Date) { - assert.ok(!isNaN(value.valueOf())); - - return value; - } - - let date; - - assert.ok(typeof value !== 'boolean'); - - if (value instanceof Number || typeof value === 'number') { - date = new Date(value); - } else if (typeof value === 'string' && !isNaN(Number(value)) && (Number(value) >= 275761 || Number(value) < -271820)) { - // string representation of milliseconds take this path - date = new Date(Number(value)); - } else if (typeof value.valueOf === 'function') { - // support for moment.js. This is also the path strings will take because - // strings have a `valueOf()` - date = new Date(value.valueOf()); - } else { - // fallback - date = new Date(value); - } - - if (!isNaN(date.valueOf())) { - return date; - } - - assert.ok(false); -}; diff --git a/node_modules/mongoose/lib/cast/decimal128.js b/node_modules/mongoose/lib/cast/decimal128.js deleted file mode 100644 index 2cd9208..0000000 --- a/node_modules/mongoose/lib/cast/decimal128.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const Decimal128Type = require('../types/decimal128'); -const assert = require('assert'); - -module.exports = function castDecimal128(value) { - if (value == null) { - return value; - } - - if (typeof value === 'object' && typeof value.$numberDecimal === 'string') { - return Decimal128Type.fromString(value.$numberDecimal); - } - - if (value instanceof Decimal128Type) { - return value; - } - - if (typeof value === 'string') { - return Decimal128Type.fromString(value); - } - - if (Buffer.isBuffer(value)) { - return new Decimal128Type(value); - } - - if (typeof value === 'number') { - return Decimal128Type.fromString(String(value)); - } - - if (typeof value.valueOf === 'function' && typeof value.valueOf() === 'string') { - return Decimal128Type.fromString(value.valueOf()); - } - - assert.ok(false); -}; diff --git a/node_modules/mongoose/lib/cast/number.js b/node_modules/mongoose/lib/cast/number.js deleted file mode 100644 index abc22f6..0000000 --- a/node_modules/mongoose/lib/cast/number.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const assert = require('assert'); - -/*! - * Given a value, cast it to a number, or throw a `CastError` if the value - * cannot be casted. `null` and `undefined` are considered valid. - * - * @param {Any} value - * @param {String} [path] optional the path to set on the CastError - * @return {Boolean|null|undefined} - * @throws {Error} if `value` is not one of the allowed values - * @api private - */ - -module.exports = function castNumber(val) { - assert.ok(!isNaN(val)); - - if (val == null) { - return val; - } - if (val === '') { - return null; - } - - if (typeof val === 'string' || typeof val === 'boolean') { - val = Number(val); - } - - assert.ok(!isNaN(val)); - if (val instanceof Number) { - return val; - } - if (typeof val === 'number') { - return val; - } - if (!Array.isArray(val) && typeof val.valueOf === 'function') { - return Number(val.valueOf()); - } - if (val.toString && !Array.isArray(val) && val.toString() == Number(val)) { - return new Number(val); - } - - assert.ok(false); -}; diff --git a/node_modules/mongoose/lib/cast/objectid.js b/node_modules/mongoose/lib/cast/objectid.js deleted file mode 100644 index a55762a..0000000 --- a/node_modules/mongoose/lib/cast/objectid.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const ObjectId = require('../driver').get().ObjectId; -const assert = require('assert'); - -module.exports = function castObjectId(value) { - if (value == null) { - return value; - } - - if (value instanceof ObjectId) { - return value; - } - - if (value._id) { - if (value._id instanceof ObjectId) { - return value._id; - } - if (value._id.toString instanceof Function) { - return new ObjectId(value._id.toString()); - } - } - - if (value.toString instanceof Function) { - return new ObjectId(value.toString()); - } - - assert.ok(false); -}; diff --git a/node_modules/mongoose/lib/cast/string.js b/node_modules/mongoose/lib/cast/string.js deleted file mode 100644 index c908013..0000000 --- a/node_modules/mongoose/lib/cast/string.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const CastError = require('../error/cast'); - -/*! - * Given a value, cast it to a string, or throw a `CastError` if the value - * cannot be casted. `null` and `undefined` are considered valid. - * - * @param {Any} value - * @param {String} [path] optional the path to set on the CastError - * @return {string|null|undefined} - * @throws {CastError} - * @api private - */ - -module.exports = function castString(value, path) { - // If null or undefined - if (value == null) { - return value; - } - - // handle documents being passed - if (value._id && typeof value._id === 'string') { - return value._id; - } - - // Re: gh-647 and gh-3030, we're ok with casting using `toString()` - // **unless** its the default Object.toString, because "[object Object]" - // doesn't really qualify as useful data - if (value.toString && value.toString !== Object.prototype.toString) { - return value.toString(); - } - - throw new CastError('string', value, path); -}; diff --git a/node_modules/mongoose/lib/collection.js b/node_modules/mongoose/lib/collection.js deleted file mode 100644 index 1f79705..0000000 --- a/node_modules/mongoose/lib/collection.js +++ /dev/null @@ -1,269 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const EventEmitter = require('events').EventEmitter; -const STATES = require('./connectionstate'); -const immediate = require('./helpers/immediate'); - -/** - * Abstract Collection constructor - * - * This is the base class that drivers inherit from and implement. - * - * @param {String} name name of the collection - * @param {Connection} conn A MongooseConnection instance - * @param {Object} opts optional collection options - * @api public - */ - -function Collection(name, conn, opts) { - if (opts === void 0) { - opts = {}; - } - if (opts.capped === void 0) { - opts.capped = {}; - } - - opts.bufferCommands = undefined === opts.bufferCommands - ? true - : opts.bufferCommands; - - if (typeof opts.capped === 'number') { - opts.capped = {size: opts.capped}; - } - - this.opts = opts; - this.name = name; - this.collectionName = name; - this.conn = conn; - this.queue = []; - this.buffer = this.opts.bufferCommands; - this.emitter = new EventEmitter(); - - if (STATES.connected === this.conn.readyState) { - this.onOpen(); - } -} - -/** - * The collection name - * - * @api public - * @property name - */ - -Collection.prototype.name; - -/** - * The collection name - * - * @api public - * @property collectionName - */ - -Collection.prototype.collectionName; - -/** - * The Connection instance - * - * @api public - * @property conn - */ - -Collection.prototype.conn; - -/** - * Called when the database connects - * - * @api private - */ - -Collection.prototype.onOpen = function() { - this.buffer = false; - immediate(() => this.doQueue()); -}; - -/** - * Called when the database disconnects - * - * @api private - */ - -Collection.prototype.onClose = function(force) { - if (this.opts.bufferCommands && !force) { - this.buffer = true; - } -}; - -/** - * Queues a method for later execution when its - * database connection opens. - * - * @param {String} name name of the method to queue - * @param {Array} args arguments to pass to the method when executed - * @api private - */ - -Collection.prototype.addQueue = function(name, args) { - this.queue.push([name, args]); - return this; -}; - -/** - * Executes all queued methods and clears the queue. - * - * @api private - */ - -Collection.prototype.doQueue = function() { - for (let i = 0, l = this.queue.length; i < l; i++) { - if (typeof this.queue[i][0] === 'function') { - this.queue[i][0].apply(this, this.queue[i][1]); - } else { - this[this.queue[i][0]].apply(this, this.queue[i][1]); - } - } - this.queue = []; - const _this = this; - process.nextTick(function() { - _this.emitter.emit('queue'); - }); - return this; -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.ensureIndex = function() { - throw new Error('Collection#ensureIndex unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.createIndex = function() { - throw new Error('Collection#ensureIndex unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.findAndModify = function() { - throw new Error('Collection#findAndModify unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.findOneAndUpdate = function() { - throw new Error('Collection#findOneAndUpdate unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.findOneAndDelete = function() { - throw new Error('Collection#findOneAndDelete unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.findOneAndReplace = function() { - throw new Error('Collection#findOneAndReplace unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.findOne = function() { - throw new Error('Collection#findOne unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.find = function() { - throw new Error('Collection#find unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.insert = function() { - throw new Error('Collection#insert unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.insertOne = function() { - throw new Error('Collection#insertOne unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.insertMany = function() { - throw new Error('Collection#insertMany unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.save = function() { - throw new Error('Collection#save unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.update = function() { - throw new Error('Collection#update unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.getIndexes = function() { - throw new Error('Collection#getIndexes unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.mapReduce = function() { - throw new Error('Collection#mapReduce unimplemented by driver'); -}; - -/** - * Abstract method that drivers must implement. - */ - -Collection.prototype.watch = function() { - throw new Error('Collection#watch unimplemented by driver'); -}; - -/*! - * Module exports. - */ - -module.exports = Collection; diff --git a/node_modules/mongoose/lib/connection.js b/node_modules/mongoose/lib/connection.js deleted file mode 100644 index 875d359..0000000 --- a/node_modules/mongoose/lib/connection.js +++ /dev/null @@ -1,954 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const EventEmitter = require('events').EventEmitter; -const Schema = require('./schema'); -const Collection = require('./driver').get().Collection; -const STATES = require('./connectionstate'); -const MongooseError = require('./error'); -const PromiseProvider = require('./promise_provider'); -const get = require('./helpers/get'); -const mongodb = require('mongodb'); -const utils = require('./utils'); - -const parseConnectionString = require('mongodb-core').parseConnectionString; - -/*! - * A list of authentication mechanisms that don't require a password for authentication. - * This is used by the authMechanismDoesNotRequirePassword method. - * - * @api private - */ -const noPasswordAuthMechanisms = [ - 'MONGODB-X509' -]; - -/** - * Connection constructor - * - * For practical reasons, a Connection equals a Db. - * - * @param {Mongoose} base a mongoose instance - * @inherits NodeJS EventEmitter http://nodejs.org/api/events.html#events_class_events_eventemitter - * @event `connecting`: Emitted when `connection.openUri()` is executed on this connection. - * @event `connected`: Emitted when this connection successfully connects to the db. May be emitted _multiple_ times in `reconnected` scenarios. - * @event `open`: Emitted after we `connected` and `onOpen` is executed on all of this connections models. - * @event `disconnecting`: Emitted when `connection.close()` was executed. - * @event `disconnected`: Emitted after getting disconnected from the db. - * @event `close`: Emitted after we `disconnected` and `onClose` executed on all of this connections models. - * @event `reconnected`: Emitted after we `connected` and subsequently `disconnected`, followed by successfully another successfull connection. - * @event `error`: Emitted when an error occurs on this connection. - * @event `fullsetup`: Emitted in a replica-set scenario, when primary and at least one seconaries specified in the connection string are connected. - * @event `all`: Emitted in a replica-set scenario, when all nodes specified in the connection string are connected. - * @api public - */ - -function Connection(base) { - this.base = base; - this.collections = {}; - this.models = {}; - this.config = {autoIndex: true}; - this.replica = false; - this.options = null; - this.otherDbs = []; // FIXME: To be replaced with relatedDbs - this.relatedDbs = {}; // Hashmap of other dbs that share underlying connection - this.states = STATES; - this._readyState = STATES.disconnected; - this._closeCalled = false; - this._hasOpened = false; - - this.$internalEmitter = new EventEmitter(); - this.$internalEmitter.setMaxListeners(0); -} - -/*! - * Inherit from EventEmitter - */ - -Connection.prototype.__proto__ = EventEmitter.prototype; - -/** - * Connection ready state - * - * - 0 = disconnected - * - 1 = connected - * - 2 = connecting - * - 3 = disconnecting - * - * Each state change emits its associated event name. - * - * ####Example - * - * conn.on('connected', callback); - * conn.on('disconnected', callback); - * - * @property readyState - * @memberOf Connection - * @instance - * @api public - */ - -Object.defineProperty(Connection.prototype, 'readyState', { - get: function() { - return this._readyState; - }, - set: function(val) { - if (!(val in STATES)) { - throw new Error('Invalid connection state: ' + val); - } - - if (this._readyState !== val) { - this._readyState = val; - // [legacy] loop over the otherDbs on this connection and change their state - for (let i = 0; i < this.otherDbs.length; i++) { - this.otherDbs[i].readyState = val; - } - - // loop over relatedDbs on this connection and change their state - for (const k in this.relatedDbs) { - this.relatedDbs[k].readyState = val; - } - - if (STATES.connected === val) { - this._hasOpened = true; - } - - this.emit(STATES[val]); - } - } -}); - -/** - * A hash of the collections associated with this connection - * - * @property collections - * @memberOf Connection - * @instance - * @api public - */ - -Connection.prototype.collections; - -/** - * The name of the database this connection points to. - * - * ####Example - * - * mongoose.createConnection('mongodb://localhost:27017/mydb').name; // "mydb" - * - * @property name - * @memberOf Connection - * @instance - * @api public - */ - -Connection.prototype.name; - -/** - * The host name portion of the URI. If multiple hosts, such as a replica set, - * this will contain the first host name in the URI - * - * ####Example - * - * mongoose.createConnection('mongodb://localhost:27017/mydb').host; // "localhost" - * - * @property host - * @memberOf Connection - * @instance - * @api public - */ - -Object.defineProperty(Connection.prototype, 'host', { - configurable: true, - enumerable: true, - writable: true -}); - -/** - * The port portion of the URI. If multiple hosts, such as a replica set, - * this will contain the port from the first host name in the URI. - * - * ####Example - * - * mongoose.createConnection('mongodb://localhost:27017/mydb').port; // 27017 - * - * @property port - * @memberOf Connection - * @instance - * @api public - */ - -Object.defineProperty(Connection.prototype, 'port', { - configurable: true, - enumerable: true, - writable: true -}); - -/** - * The username specified in the URI - * - * ####Example - * - * mongoose.createConnection('mongodb://val:psw@localhost:27017/mydb').user; // "val" - * - * @property user - * @memberOf Connection - * @instance - * @api public - */ - -Object.defineProperty(Connection.prototype, 'user', { - configurable: true, - enumerable: true, - writable: true -}); - -/** - * The password specified in the URI - * - * ####Example - * - * mongoose.createConnection('mongodb://val:psw@localhost:27017/mydb').pass; // "psw" - * - * @property pass - * @memberOf Connection - * @instance - * @api public - */ - -Object.defineProperty(Connection.prototype, 'pass', { - configurable: true, - enumerable: true, - writable: true -}); - -/** - * The mongodb.Db instance, set when the connection is opened - * - * @property db - * @memberOf Connection - * @instance - * @api public - */ - -Connection.prototype.db; - -/** - * A hash of the global options that are associated with this connection - * - * @property config - * @memberOf Connection - * @instance - * @api public - */ - -Connection.prototype.config; - -/** - * Helper for `createCollection()`. Will explicitly create the given collection - * with specified options. Used to create [capped collections](https://docs.mongodb.com/manual/core/capped-collections/) - * and [views](https://docs.mongodb.com/manual/core/views/) from mongoose. - * - * Options are passed down without modification to the [MongoDB driver's `createCollection()` function](http://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#createCollection) - * - * @method createCollection - * @param {string} collection The collection to create - * @param {Object} [options] see [MongoDB driver docs](http://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#createCollection) - * @param {Function} [callback] - * @return {Promise} - * @api public - */ - -Connection.prototype.createCollection = _wrapConnHelper(function createCollection(collection, options, cb) { - if (typeof options === 'function') { - cb = options; - options = {}; - } - this.db.createCollection(collection, options, cb); -}); - -/** - * _Requires MongoDB >= 3.6.0._ Starts a [MongoDB session](https://docs.mongodb.com/manual/release-notes/3.6/#client-sessions) - * for benefits like causal consistency, [retryable writes](https://docs.mongodb.com/manual/core/retryable-writes/), - * and [transactions](http://thecodebarbarian.com/a-node-js-perspective-on-mongodb-4-transactions.html). - * - * ####Example: - * - * const session = await conn.startSession(); - * let doc = await Person.findOne({ name: 'Ned Stark' }, null, { session }); - * await doc.remove(); - * // `doc` will always be null, even if reading from a replica set - * // secondary. Without causal consistency, it is possible to - * // get a doc back from the below query if the query reads from a - * // secondary that is experiencing replication lag. - * doc = await Person.findOne({ name: 'Ned Stark' }, null, { session, readPreference: 'secondary' }); - * - * - * @method startSession - * @param {Object} [options] see the [mongodb driver options](http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#startSession) - * @param {Boolean} [options.causalConsistency=true] set to false to disable causal consistency - * @param {Function} [callback] - * @return {Promise} promise that resolves to a MongoDB driver `ClientSession` - * @api public - */ - -Connection.prototype.startSession = _wrapConnHelper(function startSession(options, cb) { - if (typeof options === 'function') { - cb = options; - options = null; - } - const session = this.client.startSession(options); - cb(null, session); -}); - -/** - * Helper for `dropCollection()`. Will delete the given collection, including - * all documents and indexes. - * - * @method dropCollection - * @param {string} collection The collection to delete - * @param {Function} [callback] - * @return {Promise} - * @api public - */ - -Connection.prototype.dropCollection = _wrapConnHelper(function dropCollection(collection, cb) { - this.db.dropCollection(collection, cb); -}); - -/** - * Helper for `dropDatabase()`. Deletes the given database, including all - * collections, documents, and indexes. - * - * @method dropDatabase - * @param {Function} [callback] - * @return {Promise} - * @api public - */ - -Connection.prototype.dropDatabase = _wrapConnHelper(function dropDatabase(cb) { - this.$internalEmitter.emit('dropDatabase'); - this.db.dropDatabase(cb); -}); - -/*! - * ignore - */ - -function _wrapConnHelper(fn) { - return function() { - const cb = arguments.length > 0 ? arguments[arguments.length - 1] : null; - const argsWithoutCb = typeof cb === 'function' ? - Array.prototype.slice.call(arguments, 0, arguments.length - 1) : - Array.prototype.slice.call(arguments); - return utils.promiseOrCallback(cb, cb => { - if (this.readyState !== STATES.connected) { - this.once('open', function() { - fn.apply(this, argsWithoutCb.concat([cb])); - }); - } else { - fn.apply(this, argsWithoutCb.concat([cb])); - } - }); - }; -} - -/** - * error - * - * Graceful error handling, passes error to callback - * if available, else emits error on the connection. - * - * @param {Error} err - * @param {Function} callback optional - * @api private - */ - -Connection.prototype.error = function(err, callback) { - if (callback) { - callback(err); - return null; - } - if (this.listeners('error').length > 0) { - this.emit('error', err); - } - return Promise.reject(err); -}; - -/** - * Called when the connection is opened - * - * @api private - */ - -Connection.prototype.onOpen = function() { - this.readyState = STATES.connected; - - // avoid having the collection subscribe to our event emitter - // to prevent 0.3 warning - for (const i in this.collections) { - if (utils.object.hasOwnProperty(this.collections, i)) { - this.collections[i].onOpen(); - } - } - - this.emit('open'); -}; - -/** - * Opens the connection with a URI using `MongoClient.connect()`. - * - * @param {String} uri The URI to connect with. - * @param {Object} [options] Passed on to http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html#connect - * @param {Function} [callback] - * @returns {Connection} this - * @api private - */ - -Connection.prototype.openUri = function(uri, options, callback) { - this.readyState = STATES.connecting; - this._closeCalled = false; - - if (typeof options === 'function') { - callback = options; - options = null; - } - - if (['string', 'number'].indexOf(typeof options) !== -1) { - throw new MongooseError('Mongoose 5.x no longer supports ' + - '`mongoose.connect(host, dbname, port)` or ' + - '`mongoose.createConnection(host, dbname, port)`. See ' + - 'http://mongoosejs.com/docs/connections.html for supported connection syntax'); - } - - if (typeof uri !== 'string') { - throw new MongooseError('The `uri` parameter to `openUri()` must be a ' + - `string, got "${typeof uri}". Make sure the first parameter to ` + - '`mongoose.connect()` or `mongoose.createConnection()` is a string.'); - } - - const Promise = PromiseProvider.get(); - const _this = this; - - if (options) { - options = utils.clone(options); - const autoIndex = options.config && options.config.autoIndex != null ? - options.config.autoIndex : - options.autoIndex; - if (autoIndex != null) { - this.config.autoIndex = autoIndex !== false; - delete options.config; - delete options.autoIndex; - } - - if ('autoCreate' in options) { - this.config.autoCreate = !!options.autoCreate; - delete options.autoCreate; - } - if ('useCreateIndex' in options) { - this.config.useCreateIndex = !!options.useCreateIndex; - delete options.useCreateIndex; - } - - if ('useFindAndModify' in options) { - this.config.useFindAndModify = !!options.useFindAndModify; - delete options.useFindAndModify; - } - - // Backwards compat - if (options.user || options.pass) { - options.auth = options.auth || {}; - options.auth.user = options.user; - options.auth.password = options.pass; - - this.user = options.user; - this.pass = options.pass; - } - delete options.user; - delete options.pass; - - if (options.bufferCommands != null) { - options.bufferMaxEntries = 0; - this.config.bufferCommands = options.bufferCommands; - delete options.bufferCommands; - } - - if (options.useMongoClient != null) { - handleUseMongoClient(options); - } - } else { - options = {}; - } - - this._connectionOptions = options; - const dbName = options.dbName; - if (dbName != null) { - this.$dbName = dbName; - } - delete options.dbName; - - if (!('promiseLibrary' in options)) { - options.promiseLibrary = PromiseProvider.get(); - } - if (!('useNewUrlParser' in options)) { - if ('useNewUrlParser' in this.base.options) { - options.useNewUrlParser = this.base.options.useNewUrlParser; - } else { - options.useNewUrlParser = false; - } - } - - const parsePromise = new Promise((resolve, reject) => { - parseConnectionString(uri, options, (err, parsed) => { - if (err) { - return reject(err); - } - this.name = dbName != null ? dbName : get(parsed, 'auth.db', null); - this.host = get(parsed, 'hosts.0.host', 'localhost'); - this.port = get(parsed, 'hosts.0.port', 27017); - this.user = this.user || get(parsed, 'auth.username'); - this.pass = this.pass || get(parsed, 'auth.password'); - resolve(); - }); - }); - - const promise = new Promise((resolve, reject) => { - const client = new mongodb.MongoClient(uri, options); - _this.client = client; - client.connect(function(error) { - if (error) { - _this.readyState = STATES.disconnected; - return reject(error); - } - - const db = dbName != null ? client.db(dbName) : client.db(); - _this.db = db; - - // Backwards compat for mongoose 4.x - db.on('reconnect', function() { - _this.readyState = STATES.connected; - _this.emit('reconnect'); - _this.emit('reconnected'); - }); - db.s.topology.on('reconnectFailed', function() { - _this.emit('reconnectFailed'); - }); - db.s.topology.on('left', function(data) { - _this.emit('left', data); - }); - db.s.topology.on('joined', function(data) { - _this.emit('joined', data); - }); - db.s.topology.on('fullsetup', function(data) { - _this.emit('fullsetup', data); - }); - db.on('close', function() { - // Implicitly emits 'disconnected' - _this.readyState = STATES.disconnected; - }); - client.on('left', function() { - if (_this.readyState === STATES.connected && - get(db, 's.topology.s.coreTopology.s.replicaSetState.topologyType') === 'ReplicaSetNoPrimary') { - _this.readyState = STATES.disconnected; - } - }); - db.on('timeout', function() { - _this.emit('timeout'); - }); - - delete _this.then; - delete _this.catch; - _this.readyState = STATES.connected; - - for (const i in _this.collections) { - if (utils.object.hasOwnProperty(_this.collections, i)) { - _this.collections[i].onOpen(); - } - } - - resolve(_this); - _this.emit('open'); - }); - }); - - this.$initialConnection = Promise.all([promise, parsePromise]). - then(res => res[0]). - catch(err => { - if (this.listeners('error').length > 0) { - process.nextTick(() => this.emit('error', err)); - return; - } - throw err; - }); - this.then = function(resolve, reject) { - return this.$initialConnection.then(resolve, reject); - }; - this.catch = function(reject) { - return this.$initialConnection.catch(reject); - }; - - if (callback != null) { - this.$initialConnection = this.$initialConnection.then( - () => callback(null, this), - err => callback(err) - ); - } - - return this; -}; - -/*! - * ignore - */ - -const handleUseMongoClient = function handleUseMongoClient(options) { - console.warn('WARNING: The `useMongoClient` option is no longer ' + - 'necessary in mongoose 5.x, please remove it.'); - const stack = new Error().stack; - console.warn(stack.substr(stack.indexOf('\n') + 1)); - delete options.useMongoClient; -}; - -/** - * Closes the connection - * - * @param {Boolean} [force] optional - * @param {Function} [callback] optional - * @return {Connection} self - * @api public - */ - -Connection.prototype.close = function(force, callback) { - if (typeof force === 'function') { - callback = force; - force = false; - } - - this.$wasForceClosed = !!force; - - return utils.promiseOrCallback(callback, cb => { - this._close(force, cb); - }); -}; - -/** - * Handles closing the connection - * - * @param {Boolean} force - * @param {Function} callback - * @api private - */ -Connection.prototype._close = function(force, callback) { - const _this = this; - this._closeCalled = true; - - switch (this.readyState) { - case 0: // disconnected - callback(); - break; - - case 1: // connected - this.readyState = STATES.disconnecting; - this.doClose(force, function(err) { - if (err) { - return callback(err); - } - _this.onClose(force); - callback(null); - }); - - break; - case 2: // connecting - this.once('open', function() { - _this.close(callback); - }); - break; - - case 3: // disconnecting - this.once('close', function() { - callback(); - }); - break; - } - - return this; -}; - -/** - * Called when the connection closes - * - * @api private - */ - -Connection.prototype.onClose = function(force) { - this.readyState = STATES.disconnected; - - // avoid having the collection subscribe to our event emitter - // to prevent 0.3 warning - for (const i in this.collections) { - if (utils.object.hasOwnProperty(this.collections, i)) { - this.collections[i].onClose(force); - } - } - - this.emit('close', force); -}; - -/** - * Retrieves a collection, creating it if not cached. - * - * Not typically needed by applications. Just talk to your collection through your model. - * - * @param {String} name of the collection - * @param {Object} [options] optional collection options - * @return {Collection} collection instance - * @api public - */ - -Connection.prototype.collection = function(name, options) { - options = options ? utils.clone(options) : {}; - options.$wasForceClosed = this.$wasForceClosed; - if (!(name in this.collections)) { - this.collections[name] = new Collection(name, this, options); - } - return this.collections[name]; -}; - -/** - * Defines or retrieves a model. - * - * var mongoose = require('mongoose'); - * var db = mongoose.createConnection(..); - * db.model('Venue', new Schema(..)); - * var Ticket = db.model('Ticket', new Schema(..)); - * var Venue = db.model('Venue'); - * - * _When no `collection` argument is passed, Mongoose produces a collection name by passing the model `name` to the [utils.toCollectionName](#utils_exports.toCollectionName) method. This method pluralizes the name. If you don't like this behavior, either pass a collection name or set your schemas collection name option._ - * - * ####Example: - * - * var schema = new Schema({ name: String }, { collection: 'actor' }); - * - * // or - * - * schema.set('collection', 'actor'); - * - * // or - * - * var collectionName = 'actor' - * var M = conn.model('Actor', schema, collectionName) - * - * @param {String|Function} name the model name or class extending Model - * @param {Schema} [schema] a schema. necessary when defining a model - * @param {String} [collection] name of mongodb collection (optional) if not given it will be induced from model name - * @see Mongoose#model #index_Mongoose-model - * @return {Model} The compiled model - * @api public - */ - -Connection.prototype.model = function(name, schema, collection) { - if (!(this instanceof Connection)) { - throw new MongooseError('`connection.model()` should not be run with ' + - '`new`. If you are doing `new db.model(foo)(bar)`, use ' + - '`db.model(foo)(bar)` instead'); - } - - let fn; - if (typeof name === 'function') { - fn = name; - name = fn.name; - } - - // collection name discovery - if (typeof schema === 'string') { - collection = schema; - schema = false; - } - - if (utils.isObject(schema) && !schema.instanceOfSchema) { - schema = new Schema(schema); - } - if (schema && !schema.instanceOfSchema) { - throw new Error('The 2nd parameter to `mongoose.model()` should be a ' + - 'schema or a POJO'); - } - - if (this.models[name] && !collection) { - // model exists but we are not subclassing with custom collection - if (schema && schema.instanceOfSchema && schema !== this.models[name].schema) { - throw new MongooseError.OverwriteModelError(name); - } - return this.models[name]; - } - - const opts = {cache: false, connection: this}; - let model; - - if (schema && schema.instanceOfSchema) { - // compile a model - model = this.base.model(fn || name, schema, collection, opts); - - // only the first model with this name is cached to allow - // for one-offs with custom collection names etc. - if (!this.models[name]) { - this.models[name] = model; - } - - // Errors handled internally, so safe to ignore error - model.init(function $modelInitNoop() {}); - - return model; - } - - if (this.models[name] && collection) { - // subclassing current model with alternate collection - model = this.models[name]; - schema = model.prototype.schema; - const sub = model.__subclass(this, schema, collection); - // do not cache the sub model - return sub; - } - - // lookup model in mongoose module - model = this.base.models[name]; - - if (!model) { - throw new MongooseError.MissingSchemaError(name); - } - - if (this === model.prototype.db - && (!collection || collection === model.collection.name)) { - // model already uses this connection. - - // only the first model with this name is cached to allow - // for one-offs with custom collection names etc. - if (!this.models[name]) { - this.models[name] = model; - } - - return model; - } - this.models[name] = model.__subclass(this, schema, collection); - return this.models[name]; -}; - -/** - * Removes the model named `name` from this connection, if it exists. You can - * use this function to clean up any models you created in your tests to - * prevent OverwriteModelErrors. - * - * ####Example: - * - * conn.model('User', new Schema({ name: String })); - * console.log(conn.model('User')); // Model object - * conn.deleteModel('User'); - * console.log(conn.model('User')); // undefined - * - * // Usually useful in a Mocha `afterEach()` hook - * afterEach(function() { - * conn.deleteModel(/.+/); // Delete every model - * }); - * - * @api public - * @param {String|RegExp} name if string, the name of the model to remove. If regexp, removes all models whose name matches the regexp. - * @return {Connection} this - */ - -Connection.prototype.deleteModel = function(name) { - if (typeof name === 'string') { - const model = this.model(name); - if (model == null) { - return this; - } - delete this.models[name]; - delete this.collections[model.collection.name]; - delete this.base.modelSchemas[name]; - } else if (name instanceof RegExp) { - const pattern = name; - const names = this.modelNames(); - for (const name of names) { - if (pattern.test(name)) { - this.deleteModel(name); - } - } - } else { - throw new Error('First parameter to `deleteModel()` must be a string ' + - 'or regexp, got "' + name + '"'); - } - - return this; -}; - -/** - * Returns an array of model names created on this connection. - * @api public - * @return {Array} - */ - -Connection.prototype.modelNames = function() { - return Object.keys(this.models); -}; - -/** - * @brief Returns if the connection requires authentication after it is opened. Generally if a - * username and password are both provided than authentication is needed, but in some cases a - * password is not required. - * @api private - * @return {Boolean} true if the connection should be authenticated after it is opened, otherwise false. - */ -Connection.prototype.shouldAuthenticate = function() { - return this.user != null && - (this.pass != null || this.authMechanismDoesNotRequirePassword()); -}; - -/** - * @brief Returns a boolean value that specifies if the current authentication mechanism needs a - * password to authenticate according to the auth objects passed into the openUri methods. - * @api private - * @return {Boolean} true if the authentication mechanism specified in the options object requires - * a password, otherwise false. - */ -Connection.prototype.authMechanismDoesNotRequirePassword = function() { - if (this.options && this.options.auth) { - return noPasswordAuthMechanisms.indexOf(this.options.auth.authMechanism) >= 0; - } - return true; -}; - -/** - * @brief Returns a boolean value that specifies if the provided objects object provides enough - * data to authenticate with. Generally this is true if the username and password are both specified - * but in some authentication methods, a password is not required for authentication so only a username - * is required. - * @param {Object} [options] the options object passed into the openUri methods. - * @api private - * @return {Boolean} true if the provided options object provides enough data to authenticate with, - * otherwise false. - */ -Connection.prototype.optionsProvideAuthenticationData = function(options) { - return (options) && - (options.user) && - ((options.pass) || this.authMechanismDoesNotRequirePassword()); -}; - -/** - * Switches to a different database using the same connection pool. - * - * Returns a new connection object, with the new db. - * - * @method useDb - * @memberOf Connection - * @param {String} name The database name - * @return {Connection} New Connection Object - * @api public - */ - -/*! - * Module exports. - */ - -Connection.STATES = STATES; -module.exports = Connection; diff --git a/node_modules/mongoose/lib/connectionstate.js b/node_modules/mongoose/lib/connectionstate.js deleted file mode 100644 index 920f45b..0000000 --- a/node_modules/mongoose/lib/connectionstate.js +++ /dev/null @@ -1,26 +0,0 @@ - -/*! - * Connection states - */ - -'use strict'; - -const STATES = module.exports = exports = Object.create(null); - -const disconnected = 'disconnected'; -const connected = 'connected'; -const connecting = 'connecting'; -const disconnecting = 'disconnecting'; -const uninitialized = 'uninitialized'; - -STATES[0] = disconnected; -STATES[1] = connected; -STATES[2] = connecting; -STATES[3] = disconnecting; -STATES[99] = uninitialized; - -STATES[disconnected] = 0; -STATES[connected] = 1; -STATES[connecting] = 2; -STATES[disconnecting] = 3; -STATES[uninitialized] = 99; diff --git a/node_modules/mongoose/lib/cursor/AggregationCursor.js b/node_modules/mongoose/lib/cursor/AggregationCursor.js deleted file mode 100644 index 45acc94..0000000 --- a/node_modules/mongoose/lib/cursor/AggregationCursor.js +++ /dev/null @@ -1,296 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const Readable = require('stream').Readable; -const eachAsync = require('../helpers/cursor/eachAsync'); -const util = require('util'); -const utils = require('../utils'); - -/** - * An AggregationCursor is a concurrency primitive for processing aggregation - * results one document at a time. It is analogous to QueryCursor. - * - * An AggregationCursor fulfills the Node.js streams3 API, - * in addition to several other mechanisms for loading documents from MongoDB - * one at a time. - * - * Creating an AggregationCursor executes the model's pre aggregate hooks, - * but **not** the model's post aggregate hooks. - * - * Unless you're an advanced user, do **not** instantiate this class directly. - * Use [`Aggregate#cursor()`](/docs/api.html#aggregate_Aggregate-cursor) instead. - * - * @param {Aggregate} agg - * @param {Object} options - * @inherits Readable - * @event `cursor`: Emitted when the cursor is created - * @event `error`: Emitted when an error occurred - * @event `data`: Emitted when the stream is flowing and the next doc is ready - * @event `end`: Emitted when the stream is exhausted - * @api public - */ - -function AggregationCursor(agg) { - Readable.call(this, { objectMode: true }); - - this.cursor = null; - this.agg = agg; - this._transforms = []; - const model = agg._model; - delete agg.options.cursor.useMongooseAggCursor; - this._mongooseOptions = {}; - - _init(model, this, agg); -} - -util.inherits(AggregationCursor, Readable); - -/*! - * ignore - */ - -function _init(model, c, agg) { - if (!model.collection.buffer) { - model.hooks.execPre('aggregate', agg, function() { - c.cursor = model.collection.aggregate(agg._pipeline, agg.options || {}); - c.emit('cursor', c.cursor); - }); - } else { - model.collection.emitter.once('queue', function() { - model.hooks.execPre('aggregate', agg, function() { - c.cursor = model.collection.aggregate(agg._pipeline, agg.options || {}); - c.emit('cursor', c.cursor); - }); - }); - } -} - -/*! - * Necessary to satisfy the Readable API - */ - -AggregationCursor.prototype._read = function() { - const _this = this; - _next(this, function(error, doc) { - if (error) { - return _this.emit('error', error); - } - if (!doc) { - _this.push(null); - _this.cursor.close(function(error) { - if (error) { - return _this.emit('error', error); - } - setTimeout(function() { - _this.emit('close'); - }, 0); - }); - return; - } - _this.push(doc); - }); -}; - -/** - * Registers a transform function which subsequently maps documents retrieved - * via the streams interface or `.next()` - * - * ####Example - * - * // Map documents returned by `data` events - * Thing. - * find({ name: /^hello/ }). - * cursor(). - * map(function (doc) { - * doc.foo = "bar"; - * return doc; - * }) - * on('data', function(doc) { console.log(doc.foo); }); - * - * // Or map documents returned by `.next()` - * var cursor = Thing.find({ name: /^hello/ }). - * cursor(). - * map(function (doc) { - * doc.foo = "bar"; - * return doc; - * }); - * cursor.next(function(error, doc) { - * console.log(doc.foo); - * }); - * - * @param {Function} fn - * @return {AggregationCursor} - * @api public - * @method map - */ - -AggregationCursor.prototype.map = function(fn) { - this._transforms.push(fn); - return this; -}; - -/*! - * Marks this cursor as errored - */ - -AggregationCursor.prototype._markError = function(error) { - this._error = error; - return this; -}; - -/** - * Marks this cursor as closed. Will stop streaming and subsequent calls to - * `next()` will error. - * - * @param {Function} callback - * @return {Promise} - * @api public - * @method close - * @emits close - * @see MongoDB driver cursor#close http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#close - */ - -AggregationCursor.prototype.close = function(callback) { - return utils.promiseOrCallback(callback, cb => { - this.cursor.close(error => { - if (error) { - cb(error); - return this.listeners('error').length > 0 && this.emit('error', error); - } - this.emit('close'); - cb(null); - }); - }); -}; - -/** - * Get the next document from this cursor. Will return `null` when there are - * no documents left. - * - * @param {Function} callback - * @return {Promise} - * @api public - * @method next - */ - -AggregationCursor.prototype.next = function(callback) { - return utils.promiseOrCallback(callback, cb => { - _next(this, cb); - }); -}; - -/** - * Execute `fn` for every document in the cursor. If `fn` returns a promise, - * will wait for the promise to resolve before iterating on to the next one. - * Returns a promise that resolves when done. - * - * @param {Function} fn - * @param {Object} [options] - * @param {Number} [options.parallel] the number of promises to execute in parallel. Defaults to 1. - * @param {Function} [callback] executed when all docs have been processed - * @return {Promise} - * @api public - * @method eachAsync - */ - -AggregationCursor.prototype.eachAsync = function(fn, opts, callback) { - const _this = this; - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - opts = opts || {}; - - return eachAsync(function(cb) { return _next(_this, cb); }, fn, opts, callback); -}; - -/*! - * ignore - */ - -AggregationCursor.prototype.transformNull = function(val) { - if (arguments.length === 0) { - val = true; - } - this._mongooseOptions.transformNull = val; - return this; -}; - -/** - * Adds a [cursor flag](http://mongodb.github.io/node-mongodb-native/2.2/api/Cursor.html#addCursorFlag). - * Useful for setting the `noCursorTimeout` and `tailable` flags. - * - * @param {String} flag - * @param {Boolean} value - * @return {AggregationCursor} this - * @api public - * @method addCursorFlag - */ - -AggregationCursor.prototype.addCursorFlag = function(flag, value) { - const _this = this; - _waitForCursor(this, function() { - _this.cursor.addCursorFlag(flag, value); - }); - return this; -}; - -/*! - * ignore - */ - -function _waitForCursor(ctx, cb) { - if (ctx.cursor) { - return cb(); - } - ctx.once('cursor', function() { - cb(); - }); -} - -/*! - * Get the next doc from the underlying cursor and mongooseify it - * (populate, etc.) - */ - -function _next(ctx, cb) { - let callback = cb; - if (ctx._transforms.length) { - callback = function(err, doc) { - if (err || (doc === null && !ctx._mongooseOptions.transformNull)) { - return cb(err, doc); - } - cb(err, ctx._transforms.reduce(function(doc, fn) { - return fn(doc); - }, doc)); - }; - } - - if (ctx._error) { - return process.nextTick(function() { - callback(ctx._error); - }); - } - - if (ctx.cursor) { - return ctx.cursor.next(function(error, doc) { - if (error) { - return callback(error); - } - if (!doc) { - return callback(null, null); - } - - callback(null, doc); - }); - } else { - ctx.once('cursor', function() { - _next(ctx, cb); - }); - } -} - -module.exports = AggregationCursor; diff --git a/node_modules/mongoose/lib/cursor/ChangeStream.js b/node_modules/mongoose/lib/cursor/ChangeStream.js deleted file mode 100644 index e435216..0000000 --- a/node_modules/mongoose/lib/cursor/ChangeStream.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const EventEmitter = require('events').EventEmitter; - -/*! - * ignore - */ - -class ChangeStream extends EventEmitter { - constructor(model, pipeline, options) { - super(); - - this.driverChangeStream = null; - this.closed = false; - // This wrapper is necessary because of buffering. - if (model.collection.buffer) { - model.collection.addQueue(() => { - if (this.closed) { - return; - } - this.driverChangeStream = model.collection.watch(pipeline, options); - this._bindEvents(); - this.emit('ready'); - }); - } else { - this.driverChangeStream = model.collection.watch(pipeline, options); - this._bindEvents(); - this.emit('ready'); - } - } - - _bindEvents() { - ['close', 'change', 'end', 'error'].forEach(ev => { - this.driverChangeStream.on(ev, data => this.emit(ev, data)); - }); - } - - _queue(cb) { - this.once('ready', () => cb()); - } - - close() { - this.closed = true; - if (this.driverChangeStream) { - this.driverChangeStream.close(); - } - } -} - -/*! - * ignore - */ - -module.exports = ChangeStream; diff --git a/node_modules/mongoose/lib/cursor/QueryCursor.js b/node_modules/mongoose/lib/cursor/QueryCursor.js deleted file mode 100644 index d0f2f2c..0000000 --- a/node_modules/mongoose/lib/cursor/QueryCursor.js +++ /dev/null @@ -1,331 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const Readable = require('stream').Readable; -const eachAsync = require('../helpers/cursor/eachAsync'); -const helpers = require('../queryhelpers'); -const util = require('util'); -const utils = require('../utils'); - -/** - * A QueryCursor is a concurrency primitive for processing query results - * one document at a time. A QueryCursor fulfills the Node.js streams3 API, - * in addition to several other mechanisms for loading documents from MongoDB - * one at a time. - * - * QueryCursors execute the model's pre find hooks, but **not** the model's - * post find hooks. - * - * Unless you're an advanced user, do **not** instantiate this class directly. - * Use [`Query#cursor()`](/docs/api.html#query_Query-cursor) instead. - * - * @param {Query} query - * @param {Object} options query options passed to `.find()` - * @inherits Readable - * @event `cursor`: Emitted when the cursor is created - * @event `error`: Emitted when an error occurred - * @event `data`: Emitted when the stream is flowing and the next doc is ready - * @event `end`: Emitted when the stream is exhausted - * @api public - */ - -function QueryCursor(query, options) { - Readable.call(this, { objectMode: true }); - - this.cursor = null; - this.query = query; - const _this = this; - const model = query.model; - this._mongooseOptions = {}; - this._transforms = []; - this.model = model; - model.hooks.execPre('find', query, () => { - this._transforms = this._transforms.concat(query._transforms.slice()); - if (options.transform) { - this._transforms.push(options.transform); - } - model.collection.find(query._conditions, options, function(err, cursor) { - if (_this._error) { - cursor.close(function() {}); - _this.listeners('error').length > 0 && _this.emit('error', _this._error); - } - if (err) { - return _this.emit('error', err); - } - _this.cursor = cursor; - _this.emit('cursor', cursor); - }); - }); -} - -util.inherits(QueryCursor, Readable); - -/*! - * Necessary to satisfy the Readable API - */ - -QueryCursor.prototype._read = function() { - const _this = this; - _next(this, function(error, doc) { - if (error) { - return _this.emit('error', error); - } - if (!doc) { - _this.push(null); - _this.cursor.close(function(error) { - if (error) { - return _this.emit('error', error); - } - setTimeout(function() { - _this.emit('close'); - }, 0); - }); - return; - } - _this.push(doc); - }); -}; - -/** - * Registers a transform function which subsequently maps documents retrieved - * via the streams interface or `.next()` - * - * ####Example - * - * // Map documents returned by `data` events - * Thing. - * find({ name: /^hello/ }). - * cursor(). - * map(function (doc) { - * doc.foo = "bar"; - * return doc; - * }) - * on('data', function(doc) { console.log(doc.foo); }); - * - * // Or map documents returned by `.next()` - * var cursor = Thing.find({ name: /^hello/ }). - * cursor(). - * map(function (doc) { - * doc.foo = "bar"; - * return doc; - * }); - * cursor.next(function(error, doc) { - * console.log(doc.foo); - * }); - * - * @param {Function} fn - * @return {QueryCursor} - * @api public - * @method map - */ - -QueryCursor.prototype.map = function(fn) { - this._transforms.push(fn); - return this; -}; - -/*! - * Marks this cursor as errored - */ - -QueryCursor.prototype._markError = function(error) { - this._error = error; - return this; -}; - -/** - * Marks this cursor as closed. Will stop streaming and subsequent calls to - * `next()` will error. - * - * @param {Function} callback - * @return {Promise} - * @api public - * @method close - * @emits close - * @see MongoDB driver cursor#close http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#close - */ - -QueryCursor.prototype.close = function(callback) { - return utils.promiseOrCallback(callback, cb => { - this.cursor.close(error => { - if (error) { - cb(error); - return this.listeners('error').length > 0 && this.emit('error', error); - } - this.emit('close'); - cb(null); - }); - }, this.model.events); -}; - -/** - * Get the next document from this cursor. Will return `null` when there are - * no documents left. - * - * @param {Function} callback - * @return {Promise} - * @api public - * @method next - */ - -QueryCursor.prototype.next = function(callback) { - return utils.promiseOrCallback(callback, cb => { - _next(this, function(error, doc) { - if (error) { - return cb(error); - } - cb(null, doc); - }); - }, this.model.events); -}; - -/** - * Execute `fn` for every document in the cursor. If `fn` returns a promise, - * will wait for the promise to resolve before iterating on to the next one. - * Returns a promise that resolves when done. - * - * @param {Function} fn - * @param {Object} [options] - * @param {Number} [options.parallel] the number of promises to execute in parallel. Defaults to 1. - * @param {Function} [callback] executed when all docs have been processed - * @return {Promise} - * @api public - * @method eachAsync - */ - -QueryCursor.prototype.eachAsync = function(fn, opts, callback) { - const _this = this; - if (typeof opts === 'function') { - callback = opts; - opts = {}; - } - opts = opts || {}; - - return eachAsync(function(cb) { return _next(_this, cb); }, fn, opts, callback); -}; - -/** - * Adds a [cursor flag](http://mongodb.github.io/node-mongodb-native/2.2/api/Cursor.html#addCursorFlag). - * Useful for setting the `noCursorTimeout` and `tailable` flags. - * - * @param {String} flag - * @param {Boolean} value - * @return {AggregationCursor} this - * @api public - * @method addCursorFlag - */ - -QueryCursor.prototype.addCursorFlag = function(flag, value) { - const _this = this; - _waitForCursor(this, function() { - _this.cursor.addCursorFlag(flag, value); - }); - return this; -}; - -/*! - * ignore - */ - -QueryCursor.prototype.transformNull = function(val) { - if (arguments.length === 0) { - val = true; - } - this._mongooseOptions.transformNull = val; - return this; -}; - -/*! - * Get the next doc from the underlying cursor and mongooseify it - * (populate, etc.) - */ - -function _next(ctx, cb) { - let callback = cb; - if (ctx._transforms.length) { - callback = function(err, doc) { - if (err || (doc === null && !ctx._mongooseOptions.transformNull)) { - return cb(err, doc); - } - cb(err, ctx._transforms.reduce(function(doc, fn) { - return fn.call(ctx, doc); - }, doc)); - }; - } - - if (ctx._error) { - return process.nextTick(function() { - callback(ctx._error); - }); - } - - if (ctx.cursor) { - return ctx.cursor.next(function(error, doc) { - if (error) { - return callback(error); - } - if (!doc) { - return callback(null, null); - } - - const opts = ctx.query._mongooseOptions; - if (!opts.populate) { - return opts.lean ? - callback(null, doc) : - _create(ctx, doc, null, callback); - } - - const pop = helpers.preparePopulationOptionsMQ(ctx.query, - ctx.query._mongooseOptions); - pop.__noPromise = true; - ctx.query.model.populate(doc, pop, function(err, doc) { - if (err) { - return callback(err); - } - return opts.lean ? - callback(null, doc) : - _create(ctx, doc, pop, callback); - }); - }); - } else { - ctx.once('cursor', function() { - _next(ctx, cb); - }); - } -} - -/*! - * ignore - */ - -function _waitForCursor(ctx, cb) { - if (ctx.cursor) { - return cb(); - } - ctx.once('cursor', function() { - cb(); - }); -} - -/*! - * Convert a raw doc into a full mongoose doc. - */ - -function _create(ctx, doc, populatedIds, cb) { - const instance = helpers.createModel(ctx.query.model, doc, ctx.query._fields); - const opts = populatedIds ? - { populated: populatedIds } : - undefined; - - instance.init(doc, opts, function(err) { - if (err) { - return cb(err); - } - cb(null, instance); - }); -} - -module.exports = QueryCursor; diff --git a/node_modules/mongoose/lib/document_provider.js b/node_modules/mongoose/lib/document_provider.js deleted file mode 100644 index 1ace61f..0000000 --- a/node_modules/mongoose/lib/document_provider.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -/* eslint-env browser */ - -/*! - * Module dependencies. - */ -const Document = require('./document.js'); -const BrowserDocument = require('./browserDocument.js'); - -let isBrowser = false; - -/** - * Returns the Document constructor for the current context - * - * @api private - */ -module.exports = function() { - if (isBrowser) { - return BrowserDocument; - } - return Document; -}; - -/*! - * ignore - */ -module.exports.setBrowser = function(flag) { - isBrowser = flag; -}; diff --git a/node_modules/mongoose/lib/driver.js b/node_modules/mongoose/lib/driver.js deleted file mode 100644 index cf7ca3d..0000000 --- a/node_modules/mongoose/lib/driver.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -let driver = null; - -module.exports.get = function() { - return driver; -}; - -module.exports.set = function(v) { - driver = v; -}; diff --git a/node_modules/mongoose/lib/drivers/SPEC.md b/node_modules/mongoose/lib/drivers/SPEC.md deleted file mode 100644 index 6464693..0000000 --- a/node_modules/mongoose/lib/drivers/SPEC.md +++ /dev/null @@ -1,4 +0,0 @@ - -# Driver Spec - -TODO diff --git a/node_modules/mongoose/lib/drivers/browser/ReadPreference.js b/node_modules/mongoose/lib/drivers/browser/ReadPreference.js deleted file mode 100644 index 1363570..0000000 --- a/node_modules/mongoose/lib/drivers/browser/ReadPreference.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * ignore - */ - -'use strict'; - -module.exports = function() {}; diff --git a/node_modules/mongoose/lib/drivers/browser/binary.js b/node_modules/mongoose/lib/drivers/browser/binary.js deleted file mode 100644 index 4658f7b..0000000 --- a/node_modules/mongoose/lib/drivers/browser/binary.js +++ /dev/null @@ -1,14 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const Binary = require('bson').Binary; - -/*! - * Module exports. - */ - -module.exports = exports = Binary; diff --git a/node_modules/mongoose/lib/drivers/browser/decimal128.js b/node_modules/mongoose/lib/drivers/browser/decimal128.js deleted file mode 100644 index 5668182..0000000 --- a/node_modules/mongoose/lib/drivers/browser/decimal128.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * ignore - */ - -'use strict'; - -module.exports = require('bson').Decimal128; diff --git a/node_modules/mongoose/lib/drivers/browser/index.js b/node_modules/mongoose/lib/drivers/browser/index.js deleted file mode 100644 index 56d0b8a..0000000 --- a/node_modules/mongoose/lib/drivers/browser/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - * Module exports. - */ - -'use strict'; - -exports.Binary = require('./binary'); -exports.Collection = function() { - throw new Error('Cannot create a collection from browser library'); -}; -exports.Decimal128 = require('./decimal128'); -exports.ObjectId = require('./objectid'); -exports.ReadPreference = require('./ReadPreference'); diff --git a/node_modules/mongoose/lib/drivers/browser/objectid.js b/node_modules/mongoose/lib/drivers/browser/objectid.js deleted file mode 100644 index b1e603d..0000000 --- a/node_modules/mongoose/lib/drivers/browser/objectid.js +++ /dev/null @@ -1,28 +0,0 @@ - -/*! - * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId - * @constructor NodeMongoDbObjectId - * @see ObjectId - */ - -'use strict'; - -const ObjectId = require('bson').ObjectID; - -/*! - * Getter for convenience with populate, see gh-6115 - */ - -Object.defineProperty(ObjectId.prototype, '_id', { - enumerable: false, - configurable: true, - get: function() { - return this; - } -}); - -/*! - * ignore - */ - -module.exports = exports = ObjectId; diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js deleted file mode 100644 index 024ee18..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/ReadPreference.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const mongodb = require('mongodb'); -const ReadPref = mongodb.ReadPreference; - -/*! - * Converts arguments to ReadPrefs the driver - * can understand. - * - * @param {String|Array} pref - * @param {Array} [tags] - */ - -module.exports = function readPref(pref, tags) { - if (Array.isArray(pref)) { - tags = pref[1]; - pref = pref[0]; - } - - if (pref instanceof ReadPref) { - return pref; - } - - switch (pref) { - case 'p': - pref = 'primary'; - break; - case 'pp': - pref = 'primaryPreferred'; - break; - case 's': - pref = 'secondary'; - break; - case 'sp': - pref = 'secondaryPreferred'; - break; - case 'n': - pref = 'nearest'; - break; - } - - return new ReadPref(pref, tags); -}; diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js deleted file mode 100644 index 4e3c86f..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/binary.js +++ /dev/null @@ -1,10 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const Binary = require('mongodb').Binary; - -module.exports = exports = Binary; diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js deleted file mode 100644 index 9fd4b82..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js +++ /dev/null @@ -1,181 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseConnection = require('../../connection'); -const STATES = require('../../connectionstate'); - -/** - * A [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) connection implementation. - * - * @inherits Connection - * @api private - */ - -function NativeConnection() { - MongooseConnection.apply(this, arguments); - this._listening = false; -} - -/** - * Expose the possible connection states. - * @api public - */ - -NativeConnection.STATES = STATES; - -/*! - * Inherits from Connection. - */ - -NativeConnection.prototype.__proto__ = MongooseConnection.prototype; - -/** - * Switches to a different database using the same connection pool. - * - * Returns a new connection object, with the new db. - * - * @param {String} name The database name - * @return {Connection} New Connection Object - * @api public - */ - -NativeConnection.prototype.useDb = function(name, options) { - // Return immediately if cached - if (options && options.useCache && this.relatedDbs[name]) { - return this.relatedDbs[name]; - } - - // we have to manually copy all of the attributes... - const newConn = new this.constructor(); - newConn.name = name; - newConn.base = this.base; - newConn.collections = {}; - newConn.models = {}; - newConn.replica = this.replica; - newConn.name = this.name; - newConn.options = this.options; - newConn._readyState = this._readyState; - newConn._closeCalled = this._closeCalled; - newConn._hasOpened = this._hasOpened; - newConn._listening = false; - - newConn.host = this.host; - newConn.port = this.port; - newConn.user = this.user; - newConn.pass = this.pass; - - // First, when we create another db object, we are not guaranteed to have a - // db object to work with. So, in the case where we have a db object and it - // is connected, we can just proceed with setting everything up. However, if - // we do not have a db or the state is not connected, then we need to wait on - // the 'open' event of the connection before doing the rest of the setup - // the 'connected' event is the first time we'll have access to the db object - - const _this = this; - - newConn.client = _this.client; - - if (this.db && this._readyState === STATES.connected) { - wireup(); - } else { - this.once('connected', wireup); - } - - function wireup() { - newConn.client = _this.client; - newConn.db = _this.client.db(name); - newConn.onOpen(); - // setup the events appropriately - listen(newConn); - } - - newConn.name = name; - - // push onto the otherDbs stack, this is used when state changes - this.otherDbs.push(newConn); - newConn.otherDbs.push(this); - - // push onto the relatedDbs cache, this is used when state changes - if (options && options.useCache) { - this.relatedDbs[newConn.name] = newConn; - newConn.relatedDbs = this.relatedDbs; - } - - return newConn; -}; - -/*! - * Register listeners for important events and bubble appropriately. - */ - -function listen(conn) { - if (conn.db._listening) { - return; - } - conn.db._listening = true; - - conn.db.on('close', function(force) { - if (conn._closeCalled) return; - - // the driver never emits an `open` event. auto_reconnect still - // emits a `close` event but since we never get another - // `open` we can't emit close - if (conn.db.serverConfig.autoReconnect) { - conn.readyState = STATES.disconnected; - conn.emit('close'); - return; - } - conn.onClose(force); - }); - conn.db.on('error', function(err) { - conn.emit('error', err); - }); - conn.db.on('reconnect', function() { - conn.readyState = STATES.connected; - conn.emit('reconnect'); - conn.emit('reconnected'); - conn.onOpen(); - }); - conn.db.on('timeout', function(err) { - conn.emit('timeout', err); - }); - conn.db.on('open', function(err, db) { - if (STATES.disconnected === conn.readyState && db && db.databaseName) { - conn.readyState = STATES.connected; - conn.emit('reconnect'); - conn.emit('reconnected'); - } - }); - conn.db.on('parseError', function(err) { - conn.emit('parseError', err); - }); -} - -/** - * Closes the connection - * - * @param {Boolean} [force] - * @param {Function} [fn] - * @return {Connection} this - * @api private - */ - -NativeConnection.prototype.doClose = function(force, fn) { - this.client.close(force, (err, res) => { - // Defer because the driver will wait at least 1ms before finishing closing - // the pool, see https://github.com/mongodb-js/mongodb-core/blob/a8f8e4ce41936babc3b9112bf42d609779f03b39/lib/connection/pool.js#L1026-L1030. - // If there's queued operations, you may still get some background work - // after the callback is called. - setTimeout(() => fn(err, res), 1); - }); - return this; -}; - -/*! - * Module exports. - */ - -module.exports = NativeConnection; diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js deleted file mode 100644 index c895f17..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/decimal128.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * ignore - */ - -'use strict'; - -module.exports = require('mongodb').Decimal128; diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js deleted file mode 100644 index 648207d..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * Module exports. - */ - -'use strict'; - -exports.Binary = require('./binary'); -exports.Collection = require('./collection'); -exports.Decimal128 = require('./decimal128'); -exports.ObjectId = require('./objectid'); -exports.ReadPreference = require('./ReadPreference'); diff --git a/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js b/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js deleted file mode 100644 index 6f432b7..0000000 --- a/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js +++ /dev/null @@ -1,16 +0,0 @@ - -/*! - * [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) ObjectId - * @constructor NodeMongoDbObjectId - * @see ObjectId - */ - -'use strict'; - -const ObjectId = require('mongodb').ObjectId; - -/*! - * ignore - */ - -module.exports = exports = ObjectId; diff --git a/node_modules/mongoose/lib/error/browserMissingSchema.js b/node_modules/mongoose/lib/error/browserMissingSchema.js deleted file mode 100644 index 852f873..0000000 --- a/node_modules/mongoose/lib/error/browserMissingSchema.js +++ /dev/null @@ -1,38 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/*! - * MissingSchema Error constructor. - * - * @inherits MongooseError - */ - -function MissingSchemaError() { - const msg = 'Schema hasn\'t been registered for document.\n' - + 'Use mongoose.Document(name, schema)'; - MongooseError.call(this, msg); - this.name = 'MissingSchemaError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -MissingSchemaError.prototype = Object.create(MongooseError.prototype); -MissingSchemaError.prototype.constructor = MongooseError; - -/*! - * exports - */ - -module.exports = MissingSchemaError; diff --git a/node_modules/mongoose/lib/error/cast.js b/node_modules/mongoose/lib/error/cast.js deleted file mode 100644 index 1980d38..0000000 --- a/node_modules/mongoose/lib/error/cast.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const MongooseError = require('./mongooseError'); -const util = require('util'); - -/** - * Casting Error constructor. - * - * @param {String} type - * @param {String} value - * @inherits MongooseError - * @api private - */ - -function CastError(type, value, path, reason) { - let stringValue = util.inspect(value); - stringValue = stringValue.replace(/^'/, '"').replace(/'$/, '"'); - if (stringValue.charAt(0) !== '"') { - stringValue = '"' + stringValue + '"'; - } - MongooseError.call(this, 'Cast to ' + type + ' failed for value ' + - stringValue + ' at path "' + path + '"'); - this.name = 'CastError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - this.stringValue = stringValue; - this.kind = type; - this.value = value; - this.path = path; - this.reason = reason; -} - -/*! - * Inherits from MongooseError. - */ - -CastError.prototype = Object.create(MongooseError.prototype); -CastError.prototype.constructor = MongooseError; - -/*! - * ignore - */ - -CastError.prototype.setModel = function(model) { - this.model = model; - this.message = 'Cast to ' + this.kind + ' failed for value ' + - this.stringValue + ' at path "' + this.path + '"' + ' for model "' + - model.modelName + '"'; -}; - -/*! - * exports - */ - -module.exports = CastError; diff --git a/node_modules/mongoose/lib/error/disconnected.js b/node_modules/mongoose/lib/error/disconnected.js deleted file mode 100644 index f542459..0000000 --- a/node_modules/mongoose/lib/error/disconnected.js +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/** - * Casting Error constructor. - * - * @param {String} type - * @param {String} value - * @inherits MongooseError - * @api private - */ - -function DisconnectedError(connectionString) { - MongooseError.call(this, 'Ran out of retries trying to reconnect to "' + - connectionString + '". Try setting `server.reconnectTries` and ' + - '`server.reconnectInterval` to something higher.'); - this.name = 'DisconnectedError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -DisconnectedError.prototype = Object.create(MongooseError.prototype); -DisconnectedError.prototype.constructor = MongooseError; - - -/*! - * exports - */ - -module.exports = DisconnectedError; diff --git a/node_modules/mongoose/lib/error/divergentArray.js b/node_modules/mongoose/lib/error/divergentArray.js deleted file mode 100644 index 872fd2b..0000000 --- a/node_modules/mongoose/lib/error/divergentArray.js +++ /dev/null @@ -1,48 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/*! - * DivergentArrayError constructor. - * - * @inherits MongooseError - */ - -function DivergentArrayError(paths) { - const msg = 'For your own good, using `document.save()` to update an array ' - + 'which was selected using an $elemMatch projection OR ' - + 'populated using skip, limit, query conditions, or exclusion of ' - + 'the _id field when the operation results in a $pop or $set of ' - + 'the entire array is not supported. The following ' - + 'path(s) would have been modified unsafely:\n' - + ' ' + paths.join('\n ') + '\n' - + 'Use Model.update() to update these arrays instead.'; - // TODO write up a docs page (FAQ) and link to it - - MongooseError.call(this, msg); - this.name = 'DivergentArrayError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -DivergentArrayError.prototype = Object.create(MongooseError.prototype); -DivergentArrayError.prototype.constructor = MongooseError; - - -/*! - * exports - */ - -module.exports = DivergentArrayError; diff --git a/node_modules/mongoose/lib/error/index.js b/node_modules/mongoose/lib/error/index.js deleted file mode 100644 index 3ae007d..0000000 --- a/node_modules/mongoose/lib/error/index.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -const MongooseError = require('./mongooseError'); - -/*! - * Module exports. - */ - -module.exports = exports = MongooseError; - -/** - * The default built-in validator error messages. - * - * @see Error.messages #error_messages_MongooseError-messages - * @api public - */ - -MongooseError.messages = require('./messages'); - -// backward compat -MongooseError.Messages = MongooseError.messages; - -/** - * An instance of this error class will be returned when `save()` fails - * because the underlying - * document was not found. The constructor takes one parameter, the - * conditions that mongoose passed to `update()` when trying to update - * the document. - * - * @api public - */ - -MongooseError.DocumentNotFoundError = require('./notFound'); - -/** - * An instance of this error class will be returned when mongoose failed to - * cast a value. - * - * @api public - */ - -MongooseError.CastError = require('./cast'); - -/** - * An instance of this error class will be returned when [validation](/docs/validation.html) failed. - * - * @api public - */ - -MongooseError.ValidationError = require('./validation'); - -/** - * A `ValidationError` has a hash of `errors` that contain individual `ValidatorError` instances - * - * @api public - */ - -MongooseError.ValidatorError = require('./validator'); - -/** - * An instance of this error class will be returned when you call `save()` after - * the document in the database was changed in a potentially unsafe way. See - * the [`versionKey` option](/docs/guide.html#versionKey) for more information. - * - * @api public - */ - -MongooseError.VersionError = require('./version'); - -/** - * An instance of this error class will be returned when you call `save()` multiple - * times on the same document in parallel. See the [FAQ](/docs/faq.html) for more - * information. - * - * @api public - */ - -MongooseError.ParallelSaveError = require('./parallelSave'); - -/** - * Thrown when a model with the given name was already registered on the connection. - * See [the FAQ about `OverwriteModelError`](/docs/faq.html#overwrite-model-error). - * - * @api public - */ - -MongooseError.OverwriteModelError = require('./overwriteModel'); - -/** - * Thrown when you try to access a model that has not been registered yet - * - * @api public - */ - -MongooseError.MissingSchemaError = require('./missingSchema'); - -/** - * An instance of this error will be returned if you used an array projection - * and then modified the array in an unsafe way. - * - * @api public - */ - -MongooseError.DivergentArrayError = require('./divergentArray'); diff --git a/node_modules/mongoose/lib/error/messages.js b/node_modules/mongoose/lib/error/messages.js deleted file mode 100644 index 4483a86..0000000 --- a/node_modules/mongoose/lib/error/messages.js +++ /dev/null @@ -1,46 +0,0 @@ - -/** - * The default built-in validator error messages. These may be customized. - * - * // customize within each schema or globally like so - * var mongoose = require('mongoose'); - * mongoose.Error.messages.String.enum = "Your custom message for {PATH}."; - * - * As you might have noticed, error messages support basic templating - * - * - `{PATH}` is replaced with the invalid document path - * - `{VALUE}` is replaced with the invalid value - * - `{TYPE}` is replaced with the validator type such as "regexp", "min", or "user defined" - * - `{MIN}` is replaced with the declared min value for the Number.min validator - * - `{MAX}` is replaced with the declared max value for the Number.max validator - * - * Click the "show code" link below to see all defaults. - * - * @static messages - * @receiver MongooseError - * @api public - */ - -'use strict'; - -const msg = module.exports = exports = {}; - -msg.DocumentNotFoundError = null; - -msg.general = {}; -msg.general.default = 'Validator failed for path `{PATH}` with value `{VALUE}`'; -msg.general.required = 'Path `{PATH}` is required.'; - -msg.Number = {}; -msg.Number.min = 'Path `{PATH}` ({VALUE}) is less than minimum allowed value ({MIN}).'; -msg.Number.max = 'Path `{PATH}` ({VALUE}) is more than maximum allowed value ({MAX}).'; - -msg.Date = {}; -msg.Date.min = 'Path `{PATH}` ({VALUE}) is before minimum allowed value ({MIN}).'; -msg.Date.max = 'Path `{PATH}` ({VALUE}) is after maximum allowed value ({MAX}).'; - -msg.String = {}; -msg.String.enum = '`{VALUE}` is not a valid enum value for path `{PATH}`.'; -msg.String.match = 'Path `{PATH}` is invalid ({VALUE}).'; -msg.String.minlength = 'Path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).'; -msg.String.maxlength = 'Path `{PATH}` (`{VALUE}`) is longer than the maximum allowed length ({MAXLENGTH}).'; diff --git a/node_modules/mongoose/lib/error/missingSchema.js b/node_modules/mongoose/lib/error/missingSchema.js deleted file mode 100644 index 3195158..0000000 --- a/node_modules/mongoose/lib/error/missingSchema.js +++ /dev/null @@ -1,39 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/*! - * MissingSchema Error constructor. - * - * @inherits MongooseError - */ - -function MissingSchemaError(name) { - const msg = 'Schema hasn\'t been registered for model "' + name + '".\n' - + 'Use mongoose.model(name, schema)'; - MongooseError.call(this, msg); - this.name = 'MissingSchemaError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -MissingSchemaError.prototype = Object.create(MongooseError.prototype); -MissingSchemaError.prototype.constructor = MongooseError; - -/*! - * exports - */ - -module.exports = MissingSchemaError; diff --git a/node_modules/mongoose/lib/error/mongooseError.js b/node_modules/mongoose/lib/error/mongooseError.js deleted file mode 100644 index 398c31b..0000000 --- a/node_modules/mongoose/lib/error/mongooseError.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * MongooseError constructor - * - * @param {String} msg Error message - * @inherits Error https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error - */ - -'use strict'; - -function MongooseError(msg) { - Error.call(this); - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - this.message = msg; - this.name = 'MongooseError'; -} - -/*! - * Inherits from Error. - */ - -MongooseError.prototype = Object.create(Error.prototype); -MongooseError.prototype.constructor = Error; - -module.exports = MongooseError; diff --git a/node_modules/mongoose/lib/error/objectExpected.js b/node_modules/mongoose/lib/error/objectExpected.js deleted file mode 100644 index de54f4f..0000000 --- a/node_modules/mongoose/lib/error/objectExpected.js +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/** - * Strict mode error constructor - * - * @param {String} type - * @param {String} value - * @inherits MongooseError - * @api private - */ - -function ObjectExpectedError(path, val) { - MongooseError.call(this, 'Tried to set nested object field `' + path + - '` to primitive value `' + val + '` and strict mode is set to throw.'); - this.name = 'ObjectExpectedError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - this.path = path; -} - -/*! - * Inherits from MongooseError. - */ - -ObjectExpectedError.prototype = Object.create(MongooseError.prototype); -ObjectExpectedError.prototype.constructor = MongooseError; - -module.exports = ObjectExpectedError; diff --git a/node_modules/mongoose/lib/error/objectParameter.js b/node_modules/mongoose/lib/error/objectParameter.js deleted file mode 100644 index 3a7f284..0000000 --- a/node_modules/mongoose/lib/error/objectParameter.js +++ /dev/null @@ -1,38 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/** - * Constructor for errors that happen when a parameter that's expected to be - * an object isn't an object - * - * @param {Any} value - * @param {String} paramName - * @param {String} fnName - * @inherits MongooseError - * @api private - */ - -function ObjectParameterError(value, paramName, fnName) { - MongooseError.call(this, 'Parameter "' + paramName + '" to ' + fnName + - '() must be an object, got ' + value.toString()); - this.name = 'ObjectParameterError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -ObjectParameterError.prototype = Object.create(MongooseError.prototype); -ObjectParameterError.prototype.constructor = MongooseError; - -module.exports = ObjectParameterError; diff --git a/node_modules/mongoose/lib/error/overwriteModel.js b/node_modules/mongoose/lib/error/overwriteModel.js deleted file mode 100644 index 21013b6..0000000 --- a/node_modules/mongoose/lib/error/overwriteModel.js +++ /dev/null @@ -1,37 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/*! - * OverwriteModel Error constructor. - * - * @inherits MongooseError - */ - -function OverwriteModelError(name) { - MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.'); - this.name = 'OverwriteModelError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } -} - -/*! - * Inherits from MongooseError. - */ - -OverwriteModelError.prototype = Object.create(MongooseError.prototype); -OverwriteModelError.prototype.constructor = MongooseError; - -/*! - * exports - */ - -module.exports = OverwriteModelError; diff --git a/node_modules/mongoose/lib/error/parallelSave.js b/node_modules/mongoose/lib/error/parallelSave.js deleted file mode 100644 index c9a189c..0000000 --- a/node_modules/mongoose/lib/error/parallelSave.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const MongooseError = require('./'); - -/** - * ParallelSave Error constructor. - * - * @inherits MongooseError - * @api private - */ - -function ParallelSaveError(doc) { - const msg = 'Can\'t save() the same doc multiple times in parallel. Document: '; - MongooseError.call(this, msg + doc.id); - this.name = 'ParallelSaveError'; -} - -/*! - * Inherits from MongooseError. - */ - -ParallelSaveError.prototype = Object.create(MongooseError.prototype); -ParallelSaveError.prototype.constructor = MongooseError; - -/*! - * exports - */ - -module.exports = ParallelSaveError; diff --git a/node_modules/mongoose/lib/error/strict.js b/node_modules/mongoose/lib/error/strict.js deleted file mode 100644 index 2678174..0000000 --- a/node_modules/mongoose/lib/error/strict.js +++ /dev/null @@ -1,38 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/** - * Strict mode error constructor - * - * @param {String} type - * @param {String} value - * @inherits MongooseError - * @api private - */ - -function StrictModeError(path, msg) { - msg = msg || 'Field `' + path + '` is not in schema and strict ' + - 'mode is set to throw.'; - MongooseError.call(this, msg); - this.name = 'StrictModeError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - this.path = path; -} - -/*! - * Inherits from MongooseError. - */ - -StrictModeError.prototype = Object.create(MongooseError.prototype); -StrictModeError.prototype.constructor = MongooseError; - -module.exports = StrictModeError; diff --git a/node_modules/mongoose/lib/error/validation.js b/node_modules/mongoose/lib/error/validation.js deleted file mode 100644 index 85b733c..0000000 --- a/node_modules/mongoose/lib/error/validation.js +++ /dev/null @@ -1,112 +0,0 @@ -/*! - * Module requirements - */ - -'use strict'; - -const MongooseError = require('./'); -const util = require('util'); - -/** - * Document Validation Error - * - * @api private - * @param {Document} instance - * @inherits MongooseError - */ - -function ValidationError(instance) { - this.errors = {}; - this._message = ''; - if (instance && instance.constructor.name === 'model') { - this._message = instance.constructor.modelName + ' validation failed'; - MongooseError.call(this, this._message); - } else { - this._message = 'Validation failed'; - MongooseError.call(this, this._message); - } - this.name = 'ValidationError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - if (instance) { - instance.errors = this.errors; - } -} - -/*! - * Inherits from MongooseError. - */ - -ValidationError.prototype = Object.create(MongooseError.prototype); -ValidationError.prototype.constructor = MongooseError; - -/** - * Console.log helper - */ - -ValidationError.prototype.toString = function() { - return this.name + ': ' + _generateMessage(this); -}; - -/*! - * inspect helper - */ - -ValidationError.prototype.inspect = function() { - return Object.assign(new Error(this.message), this); -}; - -if (util.inspect.custom) { - /*! - * Avoid Node deprecation warning DEP0079 - */ - - ValidationError.prototype[util.inspect.custom] = ValidationError.prototype.inspect; -} - -/*! - * Helper for JSON.stringify - */ - -ValidationError.prototype.toJSON = function() { - return Object.assign({}, this, { message: this.message }); -}; - -/*! - * add message - */ - -ValidationError.prototype.addError = function(path, error) { - this.errors[path] = error; - this.message = this._message + ': ' + _generateMessage(this); -}; - -/*! - * ignore - */ - -function _generateMessage(err) { - const keys = Object.keys(err.errors || {}); - const len = keys.length; - const msgs = []; - let key; - - for (let i = 0; i < len; ++i) { - key = keys[i]; - if (err === err.errors[key]) { - continue; - } - msgs.push(key + ': ' + err.errors[key].message); - } - - return msgs.join(', '); -} - -/*! - * Module exports - */ - -module.exports = exports = ValidationError; diff --git a/node_modules/mongoose/lib/error/validator.js b/node_modules/mongoose/lib/error/validator.js deleted file mode 100644 index d07100c..0000000 --- a/node_modules/mongoose/lib/error/validator.js +++ /dev/null @@ -1,89 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const MongooseError = require('./'); - -/** - * Schema validator error - * - * @param {Object} properties - * @inherits MongooseError - * @api private - */ - -function ValidatorError(properties) { - let msg = properties.message; - if (!msg) { - msg = MongooseError.messages.general.default; - } - - const message = this.formatMessage(msg, properties); - MongooseError.call(this, message); - - properties = Object.assign({}, properties, { message: message }); - this.name = 'ValidatorError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this); - } else { - this.stack = new Error().stack; - } - this.properties = properties; - this.kind = properties.type; - this.path = properties.path; - this.value = properties.value; - this.reason = properties.reason; -} - -/*! - * Inherits from MongooseError - */ - -ValidatorError.prototype = Object.create(MongooseError.prototype); -ValidatorError.prototype.constructor = MongooseError; - -/*! - * The object used to define this validator. Not enumerable to hide - * it from `require('util').inspect()` output re: gh-3925 - */ - -Object.defineProperty(ValidatorError.prototype, 'properties', { - enumerable: false, - writable: true, - value: null -}); - -/*! - * Formats error messages - */ - -ValidatorError.prototype.formatMessage = function(msg, properties) { - if (typeof msg === 'function') { - return msg(properties); - } - const propertyNames = Object.keys(properties); - for (let i = 0; i < propertyNames.length; ++i) { - const propertyName = propertyNames[i]; - if (propertyName === 'message') { - continue; - } - msg = msg.replace('{' + propertyName.toUpperCase() + '}', properties[propertyName]); - } - return msg; -}; - -/*! - * toString helper - */ - -ValidatorError.prototype.toString = function() { - return this.message; -}; - -/*! - * exports - */ - -module.exports = ValidatorError; diff --git a/node_modules/mongoose/lib/error/version.js b/node_modules/mongoose/lib/error/version.js deleted file mode 100644 index 9fe9201..0000000 --- a/node_modules/mongoose/lib/error/version.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const MongooseError = require('./'); - -/** - * Version Error constructor. - * - * @inherits MongooseError - * @api private - */ - -function VersionError(doc, currentVersion, modifiedPaths) { - const modifiedPathsStr = modifiedPaths.join(', '); - MongooseError.call(this, 'No matching document found for id "' + doc._id + - '" version ' + currentVersion + ' modifiedPaths "' + modifiedPathsStr + '"'); - this.name = 'VersionError'; - this.version = currentVersion; - this.modifiedPaths = modifiedPaths; -} - -/*! - * Inherits from MongooseError. - */ - -VersionError.prototype = Object.create(MongooseError.prototype); -VersionError.prototype.constructor = MongooseError; - -/*! - * exports - */ - -module.exports = VersionError; diff --git a/node_modules/mongoose/lib/helpers/common.js b/node_modules/mongoose/lib/helpers/common.js deleted file mode 100644 index ac75317..0000000 --- a/node_modules/mongoose/lib/helpers/common.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const ObjectId = require('../types/objectid'); -const utils = require('../utils'); - -exports.flatten = flatten; -exports.modifiedPaths = modifiedPaths; - -/*! - * ignore - */ - -function flatten(update, path, options) { - let keys; - if (update && utils.isMongooseObject(update) && !Buffer.isBuffer(update)) { - keys = Object.keys(update.toObject({ transform: false, virtuals: false })); - } else { - keys = Object.keys(update || {}); - } - - const numKeys = keys.length; - const result = {}; - path = path ? path + '.' : ''; - - for (let i = 0; i < numKeys; ++i) { - const key = keys[i]; - const val = update[key]; - result[path + key] = val; - if (shouldFlatten(val)) { - if (options && options.skipArrays && Array.isArray(val)) { - continue; - } - const flat = flatten(val, path + key, options); - for (const k in flat) { - result[k] = flat[k]; - } - if (Array.isArray(val)) { - result[path + key] = val; - } - } - } - - return result; -} - -/*! - * ignore - */ - -function modifiedPaths(update, path, result) { - const keys = Object.keys(update || {}); - const numKeys = keys.length; - result = result || {}; - path = path ? path + '.' : ''; - - for (let i = 0; i < numKeys; ++i) { - const key = keys[i]; - let val = update[key]; - - result[path + key] = true; - if (utils.isMongooseObject(val) && !Buffer.isBuffer(val)) { - val = val.toObject({ transform: false, virtuals: false }); - } - if (shouldFlatten(val)) { - modifiedPaths(val, path + key, result); - } - } - - return result; -} - -/*! - * ignore - */ - -function shouldFlatten(val) { - return val && - typeof val === 'object' && - !(val instanceof Date) && - !(val instanceof ObjectId) && - (!Array.isArray(val) || val.length > 0) && - !(val instanceof Buffer); -} diff --git a/node_modules/mongoose/lib/helpers/cursor/eachAsync.js b/node_modules/mongoose/lib/helpers/cursor/eachAsync.js deleted file mode 100644 index 5ab0f57..0000000 --- a/node_modules/mongoose/lib/helpers/cursor/eachAsync.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const async = require('async'); -const utils = require('../../utils'); - -/** - * Execute `fn` for every document in the cursor. If `fn` returns a promise, - * will wait for the promise to resolve before iterating on to the next one. - * Returns a promise that resolves when done. - * - * @param {Function} next the thunk to call to get the next document - * @param {Function} fn - * @param {Object} options - * @param {Function} [callback] executed when all docs have been processed - * @return {Promise} - * @api public - * @method eachAsync - */ - -module.exports = function eachAsync(next, fn, options, callback) { - const parallel = options.parallel || 1; - - const handleNextResult = function(doc, callback) { - const promise = fn(doc); - if (promise && typeof promise.then === 'function') { - promise.then( - function() { callback(null); }, - function(error) { callback(error || new Error('`eachAsync()` promise rejected without error')); }); - } else { - callback(null); - } - }; - - const iterate = function(callback) { - let drained = false; - const nextQueue = async.queue(function(task, cb) { - if (drained) return cb(); - next(function(err, doc) { - if (err) return cb(err); - if (!doc) drained = true; - cb(null, doc); - }); - }, 1); - - const getAndRun = function(cb) { - nextQueue.push({}, function(err, doc) { - if (err) return cb(err); - if (!doc) return cb(); - handleNextResult(doc, function(err) { - if (err) return cb(err); - // Make sure to clear the stack re: gh-4697 - setTimeout(function() { - getAndRun(cb); - }, 0); - }); - }); - }; - - async.times(parallel, function(n, cb) { - getAndRun(cb); - }, callback); - }; - - return utils.promiseOrCallback(callback, cb => { - iterate(cb); - }); -}; diff --git a/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js b/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js deleted file mode 100644 index 0405b5b..0000000 --- a/node_modules/mongoose/lib/helpers/document/cleanModifiedSubpaths.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function cleanModifiedSubpaths(doc, path, options) { - options = options || {}; - const skipDocArrays = options.skipDocArrays; - - let deleted = 0; - for (const modifiedPath of Object.keys(doc.$__.activePaths.states.modify)) { - if (skipDocArrays) { - const schemaType = doc.schema.path(modifiedPath); - if (schemaType && schemaType.$isMongooseDocumentArray) { - continue; - } - } - if (modifiedPath.indexOf(path + '.') === 0) { - delete doc.$__.activePaths.states.modify[modifiedPath]; - ++deleted; - } - } - return deleted; -}; diff --git a/node_modules/mongoose/lib/helpers/document/compile.js b/node_modules/mongoose/lib/helpers/document/compile.js deleted file mode 100644 index 3644aa9..0000000 --- a/node_modules/mongoose/lib/helpers/document/compile.js +++ /dev/null @@ -1,148 +0,0 @@ -'use strict'; - -const get = require('../../helpers/get'); -const getSymbol = require('../../helpers/symbols').getSymbol; -const utils = require('../../utils'); - -let Document; - -/*! - * exports - */ - -exports.compile = compile; -exports.defineKey = defineKey; - -/*! - * Compiles schemas. - */ - -function compile(tree, proto, prefix, options) { - Document = Document || require('../../document'); - const keys = Object.keys(tree); - const len = keys.length; - let limb; - let key; - - for (let i = 0; i < len; ++i) { - key = keys[i]; - limb = tree[key]; - - const hasSubprops = utils.getFunctionName(limb.constructor) === 'Object' && - Object.keys(limb).length && - (!limb[options.typeKey] || (options.typeKey === 'type' && limb.type.type)); - const subprops = hasSubprops ? limb : null; - - defineKey(key, subprops, proto, prefix, keys, options); - } -} - -/*! - * Defines the accessor named prop on the incoming prototype. - */ - -function defineKey(prop, subprops, prototype, prefix, keys, options) { - Document = Document || require('../../document'); - const path = (prefix ? prefix + '.' : '') + prop; - prefix = prefix || ''; - - if (subprops) { - Object.defineProperty(prototype, prop, { - enumerable: true, - configurable: true, - get: function() { - const _this = this; - if (!this.$__.getters) { - this.$__.getters = {}; - } - - if (!this.$__.getters[path]) { - const nested = Object.create(Document.prototype, getOwnPropertyDescriptors(this)); - - // save scope for nested getters/setters - if (!prefix) { - nested.$__.scope = this; - } - nested.$__.nestedPath = path; - - Object.defineProperty(nested, 'schema', { - enumerable: false, - configurable: true, - writable: false, - value: prototype.schema - }); - - Object.defineProperty(nested, 'toObject', { - enumerable: false, - configurable: true, - writable: false, - value: function() { - return utils.clone(_this.get(path, null, { - virtuals: get(this, 'schema.options.toObject.virtuals', null) - })); - } - }); - - Object.defineProperty(nested, 'toJSON', { - enumerable: false, - configurable: true, - writable: false, - value: function() { - return _this.get(path, null, { - virtuals: get(_this, 'schema.options.toJSON.virtuals', null) - }); - } - }); - - Object.defineProperty(nested, '$__isNested', { - enumerable: false, - configurable: true, - writable: false, - value: true - }); - - compile(subprops, nested, path, options); - this.$__.getters[path] = nested; - } - - return this.$__.getters[path]; - }, - set: function(v) { - if (v instanceof Document) { - v = v.toObject({ transform: false }); - } - const doc = this.$__.scope || this; - return doc.$set(path, v); - } - }); - } else { - Object.defineProperty(prototype, prop, { - enumerable: true, - configurable: true, - get: function() { - return this[getSymbol].call(this.$__.scope || this, path); - }, - set: function(v) { - return this.$set.call(this.$__.scope || this, path, v); - } - }); - } -} - -// gets descriptors for all properties of `object` -// makes all properties non-enumerable to match previous behavior to #2211 -function getOwnPropertyDescriptors(object) { - const result = {}; - - Object.getOwnPropertyNames(object).forEach(function(key) { - result[key] = Object.getOwnPropertyDescriptor(object, key); - // Assume these are schema paths, ignore them re: #5470 - if (result[key].get) { - delete result[key]; - return; - } - result[key].enumerable = ['isNew', '$__', 'errors', '_doc'].indexOf(key) === -1; - }); - - return result; -} diff --git a/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js b/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js deleted file mode 100644 index 0e115b0..0000000 --- a/node_modules/mongoose/lib/helpers/document/getEmbeddedDiscriminatorPath.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -const get = require('../get'); - -/*! - * Like `schema.path()`, except with a document, because impossible to - * determine path type without knowing the embedded discriminator key. - */ - -module.exports = function getEmbeddedDiscriminatorPath(doc, path, options) { - options = options || {}; - const typeOnly = options.typeOnly; - const parts = path.split('.'); - let schema = null; - let type = 'adhocOrUndefined'; - - for (let i = 0; i < parts.length; ++i) { - const subpath = parts.slice(0, i + 1).join('.'); - schema = doc.schema.path(subpath); - if (schema == null) { - continue; - } - type = doc.schema.pathType(subpath); - if ((schema.$isSingleNested || schema.$isMongooseDocumentArrayElement) && - schema.schema.discriminators != null) { - const discriminators = schema.schema.discriminators; - const discriminatorKey = doc.get(subpath + '.' + - get(schema, 'schema.options.discriminatorKey')); - if (discriminatorKey == null || discriminators[discriminatorKey] == null) { - continue; - } - const rest = parts.slice(i + 1).join('.'); - schema = discriminators[discriminatorKey].path(rest); - if (schema != null) { - type = discriminators[discriminatorKey].pathType(rest); - break; - } - } - } - - // Are we getting the whole schema or just the type, 'real', 'nested', etc. - return typeOnly ? type : schema; -}; diff --git a/node_modules/mongoose/lib/helpers/get.js b/node_modules/mongoose/lib/helpers/get.js deleted file mode 100644 index 68e71e1..0000000 --- a/node_modules/mongoose/lib/helpers/get.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -/*! - * Simplified lodash.get to work around the annoying null quirk. See: - * https://github.com/lodash/lodash/issues/3659 - */ - -module.exports = function get(obj, path, def) { - const parts = path.split('.'); - let rest = path; - let cur = obj; - for (const part of parts) { - if (cur == null) { - return def; - } - - // `lib/cast.js` depends on being able to get dotted paths in updates, - // like `{ $set: { 'a.b': 42 } }` - if (cur[rest] != null) { - return cur[rest]; - } - - cur = getProperty(cur, part); - - rest = rest.substr(part.length + 1); - } - - return cur == null ? def : cur; -}; - -function getProperty(obj, prop) { - if (obj == null) { - return obj; - } - if (obj instanceof Map) { - return obj.get(prop); - } - return obj[prop]; -} diff --git a/node_modules/mongoose/lib/helpers/immediate.js b/node_modules/mongoose/lib/helpers/immediate.js deleted file mode 100644 index ddb7060..0000000 --- a/node_modules/mongoose/lib/helpers/immediate.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * Centralize this so we can more easily work around issues with people - * stubbing out `process.nextTick()` in tests using sinon: - * https://github.com/sinonjs/lolex#automatically-incrementing-mocked-time - * See gh-6074 - */ - -'use strict'; - -module.exports = function immediate(cb) { - return process.nextTick(cb); -}; diff --git a/node_modules/mongoose/lib/helpers/model/applyMethods.js b/node_modules/mongoose/lib/helpers/model/applyMethods.js deleted file mode 100644 index 5a9cf39..0000000 --- a/node_modules/mongoose/lib/helpers/model/applyMethods.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -const get = require('../get'); - -/*! - * Register methods for this model - * - * @param {Model} model - * @param {Schema} schema - */ - -module.exports = function applyMethods(model, schema) { - function apply(method, schema) { - Object.defineProperty(model.prototype, method, { - get: function() { - const h = {}; - for (const k in schema.methods[method]) { - h[k] = schema.methods[method][k].bind(this); - } - return h; - }, - configurable: true - }); - } - for (const method of Object.keys(schema.methods)) { - const fn = schema.methods[method]; - if (schema.tree.hasOwnProperty(method)) { - throw new Error('You have a method and a property in your schema both ' + - 'named "' + method + '"'); - } - if (schema.reserved[method] && - !get(schema, `methodOptions.${method}.suppressWarning`, false)) { - console.warn(`mongoose: the method name "${method}" is used by mongoose ` + - 'internally, overwriting it may cause bugs. If you\'re sure you know ' + - 'what you\'re doing, you can suppress this error by using ' + - `\`schema.method('${method}', fn, { suppressWarning: true })\`.`); - } - if (typeof fn === 'function') { - model.prototype[method] = fn; - } else { - apply(method, schema); - } - } - - // Recursively call `applyMethods()` on child schemas - model.$appliedMethods = true; - for (let i = 0; i < schema.childSchemas.length; ++i) { - if (schema.childSchemas[i].model.$appliedMethods) { - continue; - } - applyMethods(schema.childSchemas[i].model, schema.childSchemas[i].schema); - } -}; diff --git a/node_modules/mongoose/lib/helpers/model/applyStatics.js b/node_modules/mongoose/lib/helpers/model/applyStatics.js deleted file mode 100644 index 3b9501e..0000000 --- a/node_modules/mongoose/lib/helpers/model/applyStatics.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -/*! - * Register statics for this model - * @param {Model} model - * @param {Schema} schema - */ -module.exports = function applyStatics(model, schema) { - for (const i in schema.statics) { - model[i] = schema.statics[i]; - } -}; diff --git a/node_modules/mongoose/lib/helpers/model/castBulkWrite.js b/node_modules/mongoose/lib/helpers/model/castBulkWrite.js deleted file mode 100644 index 318f6f5..0000000 --- a/node_modules/mongoose/lib/helpers/model/castBulkWrite.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -const applyTimestampsToChildren = require('../update/applyTimestampsToChildren'); -const applyTimestampsToUpdate = require('../update/applyTimestampsToUpdate'); -const cast = require('../../cast'); -const castUpdate = require('../query/castUpdate'); -const setDefaultsOnInsert = require('../setDefaultsOnInsert'); - -/*! - * Given a model and a bulkWrite op, return a thunk that handles casting and - * validating the individual op. - */ - -module.exports = function castBulkWrite(model, op) { - const now = model.base.now(); - - if (op['insertOne']) { - return (callback) => { - const doc = new model(op['insertOne']['document']); - if (model.schema.options.timestamps != null) { - doc.initializeTimestamps(); - } - - op['insertOne']['document'] = doc; - op['insertOne']['document'].validate({ __noPromise: true }, function(error) { - if (error) { - return callback(error, null); - } - callback(null); - }); - }; - } else if (op['updateOne']) { - op = op['updateOne']; - return (callback) => { - try { - op['filter'] = cast(model.schema, op['filter']); - op['update'] = castUpdate(model.schema, op['update'], { - strict: model.schema.options.strict, - overwrite: false - }); - if (op.setDefaultsOnInsert) { - setDefaultsOnInsert(op['filter'], model.schema, op['update'], { - setDefaultsOnInsert: true, - upsert: op.upsert - }); - } - if (model.schema.$timestamps != null) { - const createdAt = model.schema.$timestamps.createdAt; - const updatedAt = model.schema.$timestamps.updatedAt; - applyTimestampsToUpdate(now, createdAt, updatedAt, op['update'], {}); - } - applyTimestampsToChildren(now, op['update'], model.schema); - } catch (error) { - return callback(error, null); - } - - callback(null); - }; - } else if (op['updateMany']) { - op = op['updateMany']; - return (callback) => { - try { - op['filter'] = cast(model.schema, op['filter']); - op['update'] = castUpdate(model.schema, op['update'], { - strict: model.schema.options.strict, - overwrite: false - }); - if (op.setDefaultsOnInsert) { - setDefaultsOnInsert(op['filter'], model.schema, op['update'], { - setDefaultsOnInsert: true, - upsert: op.upsert - }); - } - if (model.schema.$timestamps != null) { - const createdAt = model.schema.$timestamps.createdAt; - const updatedAt = model.schema.$timestamps.updatedAt; - applyTimestampsToUpdate(now, createdAt, updatedAt, op['update'], {}); - } - applyTimestampsToChildren(now, op['update'], model.schema); - } catch (error) { - return callback(error, null); - } - - callback(null); - }; - } else if (op['replaceOne']) { - return (callback) => { - try { - op['replaceOne']['filter'] = cast(model.schema, - op['replaceOne']['filter']); - } catch (error) { - return callback(error, null); - } - - // set `skipId`, otherwise we get "_id field cannot be changed" - const doc = new model(op['replaceOne']['replacement'], null, true); - if (model.schema.options.timestamps != null) { - doc.initializeTimestamps(); - } - op['replaceOne']['replacement'] = doc; - - op['replaceOne']['replacement'].validate({ __noPromise: true }, function(error) { - if (error) { - return callback(error, null); - } - callback(null); - }); - }; - } else if (op['deleteOne']) { - return (callback) => { - try { - op['deleteOne']['filter'] = cast(model.schema, - op['deleteOne']['filter']); - } catch (error) { - return callback(error, null); - } - - callback(null); - }; - } else if (op['deleteMany']) { - return (callback) => { - try { - op['deleteMany']['filter'] = cast(model.schema, - op['deleteMany']['filter']); - } catch (error) { - return callback(error, null); - } - - callback(null); - }; - } else { - return (callback) => { - callback(new Error('Invalid op passed to `bulkWrite()`'), null); - }; - } -}; diff --git a/node_modules/mongoose/lib/helpers/once.js b/node_modules/mongoose/lib/helpers/once.js deleted file mode 100644 index dfa5ee7..0000000 --- a/node_modules/mongoose/lib/helpers/once.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports = function once(fn) { - let called = false; - return function() { - if (called) { - return; - } - called = true; - return fn.apply(null, arguments); - }; -}; diff --git a/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js b/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js deleted file mode 100644 index f6a9fce..0000000 --- a/node_modules/mongoose/lib/helpers/populate/assignRawDocsToIdStructure.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -module.exports = assignRawDocsToIdStructure; - -/*! - * Assign `vals` returned by mongo query to the `rawIds` - * structure returned from utils.getVals() honoring - * query sort order if specified by user. - * - * This can be optimized. - * - * Rules: - * - * if the value of the path is not an array, use findOne rules, else find. - * for findOne the results are assigned directly to doc path (including null results). - * for find, if user specified sort order, results are assigned directly - * else documents are put back in original order of array if found in results - * - * @param {Array} rawIds - * @param {Array} vals - * @param {Boolean} sort - * @api private - */ - -function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, recursed) { - // honor user specified sort order - const newOrder = []; - const sorting = options.sort && rawIds.length > 1; - let doc; - let sid; - let id; - - for (let i = 0; i < rawIds.length; ++i) { - id = rawIds[i]; - - if (Array.isArray(id)) { - // handle [ [id0, id2], [id3] ] - assignRawDocsToIdStructure(id, resultDocs, resultOrder, options, true); - newOrder.push(id); - continue; - } - - if (id === null && !sorting) { - // keep nulls for findOne unless sorting, which always - // removes them (backward compat) - newOrder.push(id); - continue; - } - - sid = String(id); - - doc = resultDocs[sid]; - // If user wants separate copies of same doc, use this option - if (options.clone) { - doc = doc.constructor.hydrate(doc._doc); - } - - if (recursed) { - if (doc) { - if (sorting) { - newOrder[resultOrder[sid]] = doc; - } else { - newOrder.push(doc); - } - } else { - newOrder.push(id); - } - } else { - // apply findOne behavior - if document in results, assign, else assign null - newOrder[i] = doc || null; - } - } - - rawIds.length = 0; - if (newOrder.length) { - // reassign the documents based on corrected order - - // forEach skips over sparse entries in arrays so we - // can safely use this to our advantage dealing with sorted - // result sets too. - newOrder.forEach(function(doc, i) { - rawIds[i] = doc; - }); - } -} diff --git a/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js b/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js deleted file mode 100644 index 5231942..0000000 --- a/node_modules/mongoose/lib/helpers/populate/getSchemaTypes.js +++ /dev/null @@ -1,181 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -const Mixed = require('../../schema/mixed'); -const get = require('../get'); -const leanPopulateMap = require('./leanPopulateMap'); -const mpath = require('mpath'); - -/*! - * @param {Schema} schema - * @param {Object} doc POJO - * @param {string} path - */ - -module.exports = function getSchemaTypes(schema, doc, path) { - const pathschema = schema.path(path); - const topLevelDoc = doc; - - if (pathschema) { - return pathschema; - } - - function search(parts, schema, subdoc, nestedPath) { - let p = parts.length + 1; - let foundschema; - let trypath; - - while (p--) { - trypath = parts.slice(0, p).join('.'); - foundschema = schema.path(trypath); - - if (foundschema == null) { - continue; - } - - if (foundschema.caster) { - // array of Mixed? - if (foundschema.caster instanceof Mixed) { - return foundschema.caster; - } - - let schemas = null; - if (doc != null && foundschema.schema != null && foundschema.schema.discriminators != null) { - const discriminators = foundschema.schema.discriminators; - const discriminatorKeyPath = trypath + '.' + - foundschema.schema.options.discriminatorKey; - const keys = subdoc ? mpath.get(discriminatorKeyPath, subdoc) || [] : []; - schemas = Object.keys(discriminators). - reduce(function(cur, discriminator) { - if (keys.indexOf(discriminator) !== -1) { - cur.push(discriminators[discriminator]); - } - return cur; - }, []); - } - - // Now that we found the array, we need to check if there - // are remaining document paths to look up for casting. - // Also we need to handle array.$.path since schema.path - // doesn't work for that. - // If there is no foundschema.schema we are dealing with - // a path like array.$ - if (p !== parts.length && foundschema.schema) { - let ret; - if (parts[p] === '$') { - if (p + 1 === parts.length) { - // comments.$ - return foundschema; - } - // comments.$.comments.$.title - ret = search( - parts.slice(p + 1), - schema, - subdoc ? mpath.get(trypath, subdoc) : null, - nestedPath.concat(parts.slice(0, p)) - ); - if (ret) { - ret.$isUnderneathDocArray = ret.$isUnderneathDocArray || - !foundschema.schema.$isSingleNested; - } - return ret; - } - - if (schemas != null && schemas.length > 0) { - ret = []; - for (let i = 0; i < schemas.length; ++i) { - const _ret = search( - parts.slice(p), - schemas[i], - subdoc ? mpath.get(trypath, subdoc) : null, - nestedPath.concat(parts.slice(0, p)) - ); - if (_ret != null) { - _ret.$isUnderneathDocArray = _ret.$isUnderneathDocArray || - !foundschema.schema.$isSingleNested; - if (_ret.$isUnderneathDocArray) { - ret.$isUnderneathDocArray = true; - } - ret.push(_ret); - } - } - return ret; - } else { - ret = search( - parts.slice(p), - foundschema.schema, - subdoc ? mpath.get(trypath, subdoc) : null, - nestedPath.concat(parts.slice(0, p)) - ); - - if (ret) { - ret.$isUnderneathDocArray = ret.$isUnderneathDocArray || - !foundschema.schema.$isSingleNested; - } - - return ret; - } - } - } - - const fullPath = nestedPath.concat([trypath]).join('.'); - if (topLevelDoc.$__ && topLevelDoc.populated(fullPath) && p < parts.length) { - const schema = get(doc.$__.populated[fullPath], 'options.model.schema'); - if (schema != null) { - const ret = search( - parts.slice(p), - schema, - subdoc ? mpath.get(trypath, subdoc) : null, - nestedPath.concat(parts.slice(0, p)) - ); - - if (ret) { - ret.$isUnderneathDocArray = ret.$isUnderneathDocArray || - !schema.$isSingleNested; - } - - return ret; - } - } - - const _val = get(topLevelDoc, trypath); - if (_val != null) { - const model = Array.isArray(_val) && _val.length > 0 ? - leanPopulateMap.get(_val[0]) : - leanPopulateMap.get(_val); - // Populated using lean, `leanPopulateMap` value is the foreign model - const schema = model != null ? model.schema : null; - if (schema != null) { - const ret = search( - parts.slice(p), - schema, - subdoc ? mpath.get(trypath, subdoc) : null, - nestedPath.concat(parts.slice(0, p)) - ); - - if (ret) { - ret.$isUnderneathDocArray = ret.$isUnderneathDocArray || - !schema.$isSingleNested; - } - - return ret; - } - } - - return foundschema; - } - } - - // look for arrays - const parts = path.split('.'); - for (let i = 0; i < parts.length; ++i) { - if (parts[i] === '$') { - // Re: gh-5628, because `schema.path()` doesn't take $ into account. - parts[i] = '0'; - } - } - return search(parts, schema, doc, []); -}; diff --git a/node_modules/mongoose/lib/helpers/populate/getVirtual.js b/node_modules/mongoose/lib/helpers/populate/getVirtual.js deleted file mode 100644 index dd2644d..0000000 --- a/node_modules/mongoose/lib/helpers/populate/getVirtual.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -module.exports = getVirtual; - -/*! - * ignore - */ - -function getVirtual(schema, name) { - if (schema.virtuals[name]) { - return schema.virtuals[name]; - } - const parts = name.split('.'); - let cur = ''; - let nestedSchemaPath = ''; - for (let i = 0; i < parts.length; ++i) { - cur += (cur.length > 0 ? '.' : '') + parts[i]; - if (schema.virtuals[cur]) { - if (i === parts.length - 1) { - schema.virtuals[cur].$nestedSchemaPath = nestedSchemaPath; - return schema.virtuals[cur]; - } - continue; - } - - if (schema.nested[cur]) { - continue; - } - - if (schema.paths[cur] && schema.paths[cur].schema) { - schema = schema.paths[cur].schema; - const rest = parts.slice(i + 1).join('.'); - - if (schema.virtuals[rest]) { - if (i === parts.length - 2) { - schema.virtuals[rest].$nestedSchemaPath = - [nestedSchemaPath, cur].filter(v => !!v).join('.'); - return schema.virtuals[rest]; - } - continue; - } - - if (i + 1 < parts.length && schema.discriminators) { - for (const key of Object.keys(schema.discriminators)) { - const _virtual = getVirtual(schema.discriminators[key], rest); - if (_virtual != null) { - _virtual.$nestedSchemaPath = [nestedSchemaPath, cur]. - filter(v => !!v).join('.'); - return _virtual; - } - } - } - - nestedSchemaPath += (nestedSchemaPath.length > 0 ? '.' : '') + cur; - cur = ''; - continue; - } - - return null; - } -} diff --git a/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js b/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js deleted file mode 100644 index 9ff9b13..0000000 --- a/node_modules/mongoose/lib/helpers/populate/leanPopulateMap.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = new WeakMap(); diff --git a/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js b/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js deleted file mode 100644 index 4287e7a..0000000 --- a/node_modules/mongoose/lib/helpers/populate/normalizeRefPath.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -module.exports = function normalizeRefPath(refPath, doc, populatedPath) { - if (refPath == null) { - return refPath; - } - - if (typeof refPath === 'function') { - refPath = refPath.call(doc, doc, populatedPath); - } - - // If populated path has numerics, the end `refPath` should too. For example, - // if populating `a.0.b` instead of `a.b` and `b` has `refPath = a.c`, we - // should return `a.0.c` for the refPath. - const hasNumericProp = /(\.\d+$|\.\d+\.)/g; - - if (hasNumericProp.test(populatedPath)) { - const chunks = populatedPath.split(hasNumericProp); - - if (chunks[chunks.length - 1] === '') { - throw new Error('Can\'t populate individual element in an array'); - } - - let _refPath = ''; - let _remaining = refPath; - // 2nd, 4th, etc. will be numeric props. For example: `[ 'a', '.0.', 'b' ]` - for (let i = 0; i < chunks.length; i += 2) { - const chunk = chunks[i]; - if (_remaining.startsWith(chunk + '.')) { - _refPath += _remaining.substr(0, chunk.length) + chunks[i + 1]; - _remaining = _remaining.substr(chunk.length + 1); - } else if (i === chunks.length - 1) { - _refPath += _remaining; - _remaining = ''; - break; - } else { - throw new Error('Could not normalize ref path, chunk ' + chunk + ' not in populated path'); - } - } - - return _refPath; - } - - return refPath; -}; diff --git a/node_modules/mongoose/lib/helpers/populate/validateRef.js b/node_modules/mongoose/lib/helpers/populate/validateRef.js deleted file mode 100644 index 2b58e16..0000000 --- a/node_modules/mongoose/lib/helpers/populate/validateRef.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const MongooseError = require('../../error/mongooseError'); -const util = require('util'); - -module.exports = validateRef; - -function validateRef(ref, path) { - if (typeof ref === 'string') { - return; - } - - if (typeof ref === 'function') { - return; - } - - throw new MongooseError('Invalid ref at path "' + path + '". Got ' + - util.inspect(ref, { depth: 0 })); -} diff --git a/node_modules/mongoose/lib/helpers/printJestWarning.js b/node_modules/mongoose/lib/helpers/printJestWarning.js deleted file mode 100644 index 25d8831..0000000 --- a/node_modules/mongoose/lib/helpers/printJestWarning.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -if (typeof jest !== 'undefined' && typeof window !== 'undefined') { - console.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' + - 'with Jest\'s default jsdom test environment. Please make sure you read ' + - 'Mongoose\'s docs on configuring Jest to test Node.js apps: ' + - 'http://mongoosejs.com/docs/jest.html'); -} diff --git a/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js b/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js deleted file mode 100644 index 67dfb39..0000000 --- a/node_modules/mongoose/lib/helpers/projection/isDefiningProjection.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function isDefiningProjection(val) { - if (val == null) { - // `undefined` or `null` become exclusive projections - return true; - } - if (typeof val === 'object') { - // Only cases where a value does **not** define whether the whole projection - // is inclusive or exclusive are `$meta` and `$slice`. - return !('$meta' in val) && !('$slice' in val); - } - return true; -}; diff --git a/node_modules/mongoose/lib/helpers/projection/isExclusive.js b/node_modules/mongoose/lib/helpers/projection/isExclusive.js deleted file mode 100644 index 8c64bc5..0000000 --- a/node_modules/mongoose/lib/helpers/projection/isExclusive.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const isDefiningProjection = require('./isDefiningProjection'); - -/*! - * ignore - */ - -module.exports = function isExclusive(projection) { - const keys = Object.keys(projection); - let ki = keys.length; - let exclude = null; - - if (ki === 1 && keys[0] === '_id') { - exclude = !!projection[keys[ki]]; - } else { - while (ki--) { - // Does this projection explicitly define inclusion/exclusion? - // Explicitly avoid `$meta` and `$slice` - if (keys[ki] !== '_id' && isDefiningProjection(projection[keys[ki]])) { - exclude = !projection[keys[ki]]; - break; - } - } - } - - return exclude; -}; diff --git a/node_modules/mongoose/lib/helpers/projection/isInclusive.js b/node_modules/mongoose/lib/helpers/projection/isInclusive.js deleted file mode 100644 index 7781d8c..0000000 --- a/node_modules/mongoose/lib/helpers/projection/isInclusive.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const isDefiningProjection = require('./isDefiningProjection'); - -/*! - * ignore - */ - -module.exports = function isInclusive(projection) { - if (projection == null) { - return false; - } - - const props = Object.keys(projection); - const numProps = props.length; - if (numProps === 0) { - return false; - } - - for (let i = 0; i < numProps; ++i) { - const prop = props[i]; - // Plus paths can't define the projection (see gh-7050) - if (prop.charAt(0) === '+') { - continue; - } - // If field is truthy (1, true, etc.) and not an object, then this - // projection must be inclusive. If object, assume its $meta, $slice, etc. - if (isDefiningProjection(projection[prop]) && !!projection[prop]) { - return true; - } - } - - return false; -}; diff --git a/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js b/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js deleted file mode 100644 index fc2592c..0000000 --- a/node_modules/mongoose/lib/helpers/projection/isPathExcluded.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -const isDefiningProjection = require('./isDefiningProjection'); - -/*! - * Determines if `path` is excluded by `projection` - * - * @param {Object} projection - * @param {string} path - * @return {Boolean} - */ - -module.exports = function isPathExcluded(projection, path) { - if (path === '_id') { - return projection._id === 0; - } - - const paths = Object.keys(projection); - let type = null; - - for (const _path of paths) { - if (isDefiningProjection(projection[_path])) { - type = projection[path] === 1 ? 'inclusive' : 'exclusive'; - break; - } - } - - if (type === 'inclusive') { - return projection[path] !== 1; - } - if (type === 'exclusive') { - return projection[path] === 0; - } - return false; -}; diff --git a/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js b/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js deleted file mode 100644 index 8a05fc9..0000000 --- a/node_modules/mongoose/lib/helpers/projection/isPathSelectedInclusive.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function isPathSelectedInclusive(fields, path) { - const chunks = path.split('.'); - let cur = ''; - let j; - let keys; - let numKeys; - for (let i = 0; i < chunks.length; ++i) { - cur += cur.length ? '.' : '' + chunks[i]; - if (fields[cur]) { - keys = Object.keys(fields); - numKeys = keys.length; - for (j = 0; j < numKeys; ++j) { - if (keys[i].indexOf(cur + '.') === 0 && keys[i].indexOf(path) !== 0) { - continue; - } - } - return true; - } - } - - return false; -}; diff --git a/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js b/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js deleted file mode 100644 index 3a987c4..0000000 --- a/node_modules/mongoose/lib/helpers/query/applyQueryMiddleware.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = applyQueryMiddleware; - -/*! - * ignore - */ - -applyQueryMiddleware.middlewareFunctions = [ - 'count', - 'countDocuments', - 'deleteMany', - 'deleteOne', - 'estimatedDocumentCount', - 'find', - 'findOne', - 'findOneAndDelete', - 'findOneAndRemove', - 'findOneAndReplace', - 'findOneAndUpdate', - 'remove', - 'replaceOne', - 'update', - 'updateMany', - 'updateOne' -]; - -/*! - * Apply query middleware - * - * @param {Query} query constructor - * @param {Model} model - */ - -function applyQueryMiddleware(Query, model) { - const kareemOptions = { - useErrorHandlers: true, - numCallbackParams: 1, - nullResultByDefault: true - }; - - const middleware = model.hooks.filter(hook => { - if (hook.name === 'updateOne') { - return hook.query == null || !!hook.query; - } - if (hook.name === 'remove') { - return !!hook.query; - } - return true; - }); - - // `update()` thunk has a different name because `_update` was already taken - Query.prototype._execUpdate = middleware.createWrapper('update', - Query.prototype._execUpdate, null, kareemOptions); - - applyQueryMiddleware.middlewareFunctions. - filter(v => v !== 'update'). - forEach(fn => { - Query.prototype[`_${fn}`] = middleware.createWrapper(fn, - Query.prototype[`_${fn}`], null, kareemOptions); - }); -} diff --git a/node_modules/mongoose/lib/helpers/query/castUpdate.js b/node_modules/mongoose/lib/helpers/query/castUpdate.js deleted file mode 100644 index 47cf6d4..0000000 --- a/node_modules/mongoose/lib/helpers/query/castUpdate.js +++ /dev/null @@ -1,428 +0,0 @@ -'use strict'; - -const CastError = require('../../error/cast'); -const StrictModeError = require('../../error/strict'); -const ValidationError = require('../../error/validation'); -const castNumber = require('../../cast/number'); -const getEmbeddedDiscriminatorPath = require('./getEmbeddedDiscriminatorPath'); -const utils = require('../../utils'); - -/*! - * Casts an update op based on the given schema - * - * @param {Schema} schema - * @param {Object} obj - * @param {Object} options - * @param {Boolean} [options.overwrite] defaults to false - * @param {Boolean|String} [options.strict] defaults to true - * @param {Query} context passed to setters - * @return {Boolean} true iff the update is non-empty - */ - -module.exports = function castUpdate(schema, obj, options, context, filter) { - if (!obj) { - return undefined; - } - - const ops = Object.keys(obj); - let i = ops.length; - const ret = {}; - let hasKeys; - let val; - let hasDollarKey = false; - const overwrite = options.overwrite; - - filter = filter || {}; - - while (i--) { - const op = ops[i]; - // if overwrite is set, don't do any of the special $set stuff - if (op[0] !== '$' && !overwrite) { - // fix up $set sugar - if (!ret.$set) { - if (obj.$set) { - ret.$set = obj.$set; - } else { - ret.$set = {}; - } - } - ret.$set[op] = obj[op]; - ops.splice(i, 1); - if (!~ops.indexOf('$set')) ops.push('$set'); - } else if (op === '$set') { - if (!ret.$set) { - ret[op] = obj[op]; - } - } else { - ret[op] = obj[op]; - } - } - - // cast each value - i = ops.length; - - // if we get passed {} for the update, we still need to respect that when it - // is an overwrite scenario - if (overwrite) { - hasKeys = true; - } - - while (i--) { - const op = ops[i]; - val = ret[op]; - hasDollarKey = hasDollarKey || op.charAt(0) === '$'; - - if (val && - typeof val === 'object' && - !Buffer.isBuffer(val) && - (!overwrite || hasDollarKey)) { - hasKeys |= walkUpdatePath(schema, val, op, options, context, filter); - } else if (overwrite && ret && typeof ret === 'object') { - // if we are just using overwrite, cast the query and then we will - // *always* return the value, even if it is an empty object. We need to - // set hasKeys above because we need to account for the case where the - // user passes {} and wants to clobber the whole document - // Also, _walkUpdatePath expects an operation, so give it $set since that - // is basically what we're doing - walkUpdatePath(schema, ret, '$set', options, context, filter); - } else { - const msg = 'Invalid atomic update value for ' + op + '. ' - + 'Expected an object, received ' + typeof val; - throw new Error(msg); - } - } - - return hasKeys && ret; -}; - -/*! - * Walk each path of obj and cast its values - * according to its schema. - * - * @param {Schema} schema - * @param {Object} obj - part of a query - * @param {String} op - the atomic operator ($pull, $set, etc) - * @param {Object} options - * @param {Boolean|String} [options.strict] - * @param {Boolean} [options.omitUndefined] - * @param {Query} context - * @param {String} pref - path prefix (internal only) - * @return {Bool} true if this path has keys to update - * @api private - */ - -function walkUpdatePath(schema, obj, op, options, context, filter, pref) { - const strict = options.strict; - const prefix = pref ? pref + '.' : ''; - const keys = Object.keys(obj); - let i = keys.length; - let hasKeys = false; - let schematype; - let key; - let val; - - let aggregatedError = null; - - let useNestedStrict; - if (options.useNestedStrict === undefined) { - useNestedStrict = schema.options.useNestedStrict; - } else { - useNestedStrict = options.useNestedStrict; - } - - while (i--) { - key = keys[i]; - val = obj[key]; - - if (val && val.constructor.name === 'Object') { - // watch for embedded doc schemas - schematype = schema._getSchema(prefix + key); - if (schematype && schematype.caster && op in castOps) { - // embedded doc schema - if ('$each' in val) { - hasKeys = true; - try { - obj[key] = { - $each: castUpdateVal(schematype, val.$each, op, key, context, prefix + key) - }; - } catch (error) { - aggregatedError = _handleCastError(error, context, key, aggregatedError); - } - - if (val.$slice != null) { - obj[key].$slice = val.$slice | 0; - } - - if (val.$sort) { - obj[key].$sort = val.$sort; - } - - if (!!val.$position || val.$position === 0) { - obj[key].$position = val.$position; - } - } else { - try { - obj[key] = castUpdateVal(schematype, val, op, key, context, prefix + key); - } catch (error) { - aggregatedError = _handleCastError(error, context, key, aggregatedError); - } - - if (options.omitUndefined && obj[key] === void 0) { - delete obj[key]; - continue; - } - - hasKeys = true; - } - } else if ((op === '$currentDate') || (op in castOps && schematype)) { - // $currentDate can take an object - try { - obj[key] = castUpdateVal(schematype, val, op, key, context, prefix + key); - } catch (error) { - aggregatedError = _handleCastError(error, context, key, aggregatedError); - } - - if (options.omitUndefined && obj[key] === void 0) { - delete obj[key]; - continue; - } - - hasKeys = true; - } else { - const pathToCheck = (prefix + key); - const v = schema._getPathType(pathToCheck); - let _strict = strict; - if (useNestedStrict && - v && - v.schema && - 'strict' in v.schema.options) { - _strict = v.schema.options.strict; - } - - if (v.pathType === 'undefined') { - if (_strict === 'throw') { - throw new StrictModeError(pathToCheck); - } else if (_strict) { - delete obj[key]; - continue; - } - } - - // gh-2314 - // we should be able to set a schema-less field - // to an empty object literal - hasKeys |= walkUpdatePath(schema, val, op, options, context, filter, prefix + key) || - (utils.isObject(val) && Object.keys(val).length === 0); - } - } else { - const checkPath = (key === '$each' || key === '$or' || key === '$and' || key === '$in') ? - pref : prefix + key; - schematype = schema._getSchema(checkPath); - let pathDetails = schema._getPathType(checkPath); - - // If no schema type, check for embedded discriminators - if (schematype == null) { - const _res = getEmbeddedDiscriminatorPath(schema, obj, filter, checkPath); - if (_res.schematype != null) { - schematype = _res.schematype; - pathDetails = _res.type; - } - } - - let isStrict = strict; - if (useNestedStrict && - pathDetails && - pathDetails.schema && - 'strict' in pathDetails.schema.options) { - isStrict = pathDetails.schema.options.strict; - } - - const skip = isStrict && - !schematype && - !/real|nested/.test(pathDetails.pathType); - - if (skip) { - // Even if strict is `throw`, avoid throwing an error because of - // virtuals because of #6731 - if (isStrict === 'throw' && schema.virtuals[checkPath] == null) { - throw new StrictModeError(prefix + key); - } else { - delete obj[key]; - } - } else { - // gh-1845 temporary fix: ignore $rename. See gh-3027 for tracking - // improving this. - if (op === '$rename') { - hasKeys = true; - continue; - } - - try { - obj[key] = castUpdateVal(schematype, val, op, key, context, prefix + key); - } catch (error) { - aggregatedError = _handleCastError(error, context, key, aggregatedError); - } - - if (Array.isArray(obj[key]) && (op === '$addToSet' || op === '$push') && key !== '$each') { - if (schematype && schematype.caster && !schematype.caster.$isMongooseArray) { - obj[key] = { $each: obj[key] }; - } - } - - if (options.omitUndefined && obj[key] === void 0) { - delete obj[key]; - continue; - } - - hasKeys = true; - } - } - } - - if (aggregatedError != null) { - throw aggregatedError; - } - - return hasKeys; -} - -/*! - * ignore - */ - -function _handleCastError(error, query, key, aggregatedError) { - if (typeof query !== 'object' || !query.options.multipleCastError) { - throw error; - } - aggregatedError = aggregatedError || new ValidationError(); - aggregatedError.addError(key, error); - return aggregatedError; -} - -/*! - * These operators should be cast to numbers instead - * of their path schema type. - */ - -const numberOps = { - $pop: 1, - $inc: 1 -}; - -/*! - * These ops require no casting because the RHS doesn't do anything. - */ - -const noCastOps = { - $unset: 1 -}; - -/*! - * These operators require casting docs - * to real Documents for Update operations. - */ - -const castOps = { - $push: 1, - $addToSet: 1, - $set: 1, - $setOnInsert: 1 -}; - -/*! - * ignore - */ - -const overwriteOps = { - $set: 1, - $setOnInsert: 1 -}; - -/*! - * Casts `val` according to `schema` and atomic `op`. - * - * @param {SchemaType} schema - * @param {Object} val - * @param {String} op - the atomic operator ($pull, $set, etc) - * @param {String} $conditional - * @param {Query} context - * @api private - */ - -function castUpdateVal(schema, val, op, $conditional, context, path) { - if (!schema) { - // non-existing schema path - if (op in numberOps) { - try { - return castNumber(val); - } catch (err) { - throw new CastError('number', val, path); - } - } - return val; - } - - const cond = schema.caster && op in castOps && - (utils.isObject(val) || Array.isArray(val)); - if (cond && op !== '$set') { - // Cast values for ops that add data to MongoDB. - // Ensures embedded documents get ObjectIds etc. - const tmp = schema.cast(val); - if (Array.isArray(val)) { - val = tmp; - } else if (Array.isArray(tmp)) { - val = tmp[0]; - } else { - val = tmp; - } - return val; - } else if (cond && op === '$set') { - return schema.cast(val); - } - - if (op in noCastOps) { - return val; - } - if (op in numberOps) { - // Null and undefined not allowed for $pop, $inc - if (val == null) { - throw new CastError('number', val, schema.path); - } - if (op === '$inc') { - // Support `$inc` with long, int32, etc. (gh-4283) - return schema.castForQueryWrapper({ - val: val, - context: context - }); - } - try { - return castNumber(val); - } catch (error) { - throw new CastError('number', val, schema.path); - } - } - if (op === '$currentDate') { - if (typeof val === 'object') { - return {$type: val.$type}; - } - return Boolean(val); - } - - if (/^\$/.test($conditional)) { - return schema.castForQueryWrapper({ - $conditional: $conditional, - val: val, - context: context - }); - } - - if (overwriteOps[op]) { - return schema.castForQueryWrapper({ - val: val, - context: context, - $skipQueryCastForUpdate: val != null && schema.$isMongooseArray && schema.$parentSchema - }); - } - - return schema.castForQueryWrapper({ val: val, context: context }); -} diff --git a/node_modules/mongoose/lib/helpers/query/completeMany.js b/node_modules/mongoose/lib/helpers/query/completeMany.js deleted file mode 100644 index aabe596..0000000 --- a/node_modules/mongoose/lib/helpers/query/completeMany.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const helpers = require('../../queryhelpers'); - -module.exports = completeMany; - -/*! - * Given a model and an array of docs, hydrates all the docs to be instances - * of the model. Used to initialize docs returned from the db from `find()` - * - * @param {Model} model - * @param {Array} docs - * @param {Object} fields the projection used, including `select` from schemas - * @param {Object} userProvidedFields the user-specified projection - * @param {Object} opts - * @param {Array} [opts.populated] - * @param {ClientSession} [opts.session] - * @param {Function} callback - */ - -function completeMany(model, docs, fields, userProvidedFields, opts, callback) { - const arr = []; - let count = docs.length; - const len = count; - let error = null; - - function init(_error) { - if (_error != null) { - error = error || _error; - } - if (error != null) { - --count || process.nextTick(() => callback(error)); - return; - } - --count || process.nextTick(() => callback(error, arr)); - } - - for (let i = 0; i < len; ++i) { - arr[i] = helpers.createModel(model, docs[i], fields, userProvidedFields); - try { - arr[i].init(docs[i], opts, init); - } catch (error) { - init(error); - } - arr[i].$session(opts.session); - } -} diff --git a/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js b/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js deleted file mode 100644 index 4d74864..0000000 --- a/node_modules/mongoose/lib/helpers/query/getEmbeddedDiscriminatorPath.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -const get = require('../get'); - -/*! - * Like `schema.path()`, except with a document, because impossible to - * determine path type without knowing the embedded discriminator key. - */ - -module.exports = function getEmbeddedDiscriminatorPath(schema, update, filter, path) { - const parts = path.split('.'); - let schematype = null; - let type = 'adhocOrUndefined'; - - filter = filter || {}; - update = update || {}; - - for (let i = 0; i < parts.length; ++i) { - const subpath = parts.slice(0, i + 1).join('.'). - replace(/\.\$\./i, '.0.').replace(/\.\$$/, '.0'); - schematype = schema.path(subpath); - if (schematype == null) { - continue; - } - type = schema.pathType(subpath); - if ((schematype.$isSingleNested || schematype.$isMongooseDocumentArrayElement) && - schematype.schema.discriminators != null) { - const discriminators = schematype.schema.discriminators; - const discriminatorValuePath = subpath + '.' + - get(schematype, 'schema.options.discriminatorKey'); - const discriminatorFilterPath = - discriminatorValuePath.replace(/\.\d+\./, '.'); - let discriminatorKey = null; - if (discriminatorValuePath in filter) { - discriminatorKey = filter[discriminatorValuePath]; - } - if (discriminatorFilterPath in filter) { - discriminatorKey = filter[discriminatorFilterPath]; - } - if (discriminatorKey == null || discriminators[discriminatorKey] == null) { - continue; - } - const rest = parts.slice(i + 1).join('.'); - schematype = discriminators[discriminatorKey].path(rest); - if (schematype != null) { - type = discriminators[discriminatorKey]._getPathType(rest); - break; - } - } - } - - return { type: type, schematype: schematype }; -}; diff --git a/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js b/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js deleted file mode 100644 index fb831da..0000000 --- a/node_modules/mongoose/lib/helpers/query/hasDollarKeys.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function(obj) { - const keys = Object.keys(obj); - const len = keys.length; - for (let i = 0; i < len; ++i) { - if (keys[i].charAt(0) === '$') { - return true; - } - } - return false; -}; diff --git a/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js b/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js deleted file mode 100644 index 15f7e99..0000000 --- a/node_modules/mongoose/lib/helpers/query/selectPopulatedFields.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function selectPopulatedFields(query) { - const opts = query._mongooseOptions; - - if (opts.populate != null) { - const paths = Object.keys(opts.populate); - const userProvidedFields = query._userProvidedFields || {}; - if (query.selectedInclusively()) { - for (let i = 0; i < paths.length; ++i) { - if (!isPathInFields(userProvidedFields, paths[i])) { - query.select(paths[i]); - } else if (userProvidedFields[paths[i]] === 0) { - delete query._fields[paths[i]]; - } - } - } else if (query.selectedExclusively()) { - for (let i = 0; i < paths.length; ++i) { - if (userProvidedFields[paths[i]] == null) { - delete query._fields[paths[i]]; - } - } - } - } -}; - -/*! - * ignore - */ - -function isPathInFields(userProvidedFields, path) { - const pieces = path.split('.'); - const len = pieces.length; - let cur = pieces[0]; - for (let i = 1; i < len; ++i) { - if (userProvidedFields[cur] != null) { - return true; - } - cur += '.' + pieces[i]; - } - return userProvidedFields[cur] != null; -} diff --git a/node_modules/mongoose/lib/helpers/query/wrapThunk.js b/node_modules/mongoose/lib/helpers/query/wrapThunk.js deleted file mode 100644 index f72aee3..0000000 --- a/node_modules/mongoose/lib/helpers/query/wrapThunk.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -/*! - * A query thunk is the function responsible for sending the query to MongoDB, - * like `Query#_findOne()` or `Query#_execUpdate()`. The `Query#exec()` function - * calls a thunk. The term "thunk" here is the traditional Node.js definition: - * a function that takes exactly 1 parameter, a callback. - * - * This function defines common behavior for all query thunks. - */ - -module.exports = function wrapThunk(fn) { - return function _wrappedThunk(cb) { - ++this._executionCount; - - fn.call(this, cb); - }; -}; diff --git a/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js b/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js deleted file mode 100644 index 168156d..0000000 --- a/node_modules/mongoose/lib/helpers/schema/applyWriteConcern.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const get = require('../get'); - -module.exports = function applyWriteConcern(schema, options) { - const writeConcern = get(schema, 'options.writeConcern', {}); - if (!('w' in options) && writeConcern.w != null) { - options.w = writeConcern.w; - } - if (!('j' in options) && writeConcern.j != null) { - options.j = writeConcern.j; - } - if (!('wtimeout' in options) && writeConcern.wtimeout != null) { - options.wtimeout = writeConcern.wtimeout; - } -}; diff --git a/node_modules/mongoose/lib/helpers/schema/getIndexes.js b/node_modules/mongoose/lib/helpers/schema/getIndexes.js deleted file mode 100644 index 43b82e7..0000000 --- a/node_modules/mongoose/lib/helpers/schema/getIndexes.js +++ /dev/null @@ -1,124 +0,0 @@ -'use strict'; - -const get = require('../get'); -const utils = require('../../utils'); - -/*! - * Gather all indexes defined in the schema, including single nested, - * document arrays, and embedded discriminators. - */ - -module.exports = function getIndexes(schema) { - let indexes = []; - const schemaStack = new WeakMap(); - const indexTypes = schema.constructor.indexTypes; - - const collectIndexes = function(schema, prefix) { - // Ignore infinitely nested schemas, if we've already seen this schema - // along this path there must be a cycle - if (schemaStack.has(schema)) { - return; - } - schemaStack.set(schema, true); - - prefix = prefix || ''; - const keys = Object.keys(schema.paths); - const length = keys.length; - - for (let i = 0; i < length; ++i) { - const key = keys[i]; - const path = schema.paths[key]; - - if (path.$isMongooseDocumentArray || path.$isSingleNested) { - if (get(path, 'options.excludeIndexes') !== true && - get(path, 'schemaOptions.excludeIndexes') !== true) { - collectIndexes(path.schema, prefix + key + '.'); - } - - if (path.schema.discriminators != null) { - const discriminators = path.schema.discriminators; - const discriminatorKeys = Object.keys(discriminators); - for (const discriminatorKey of discriminatorKeys) { - collectIndexes(discriminators[discriminatorKey]._originalSchema, - prefix + key + '.'); - } - } - - // Retained to minimize risk of backwards breaking changes due to - // gh-6113 - if (path.$isMongooseDocumentArray) { - continue; - } - } - - const index = path._index || (path.caster && path.caster._index); - - if (index !== false && index !== null && index !== undefined) { - const field = {}; - const isObject = utils.isObject(index); - const options = isObject ? index : {}; - const type = typeof index === 'string' ? index : - isObject ? index.type : - false; - - if (type && indexTypes.indexOf(type) !== -1) { - field[prefix + key] = type; - } else if (options.text) { - field[prefix + key] = 'text'; - delete options.text; - } else { - field[prefix + key] = 1; - } - - delete options.type; - if (!('background' in options)) { - options.background = true; - } - - indexes.push([field, options]); - } - } - - schemaStack.delete(schema); - - if (prefix) { - fixSubIndexPaths(schema, prefix); - } else { - schema._indexes.forEach(function(index) { - if (!('background' in index[1])) { - index[1].background = true; - } - }); - indexes = indexes.concat(schema._indexes); - } - }; - - collectIndexes(schema); - return indexes; - - /*! - * Checks for indexes added to subdocs using Schema.index(). - * These indexes need their paths prefixed properly. - * - * schema._indexes = [ [indexObj, options], [indexObj, options] ..] - */ - - function fixSubIndexPaths(schema, prefix) { - const subindexes = schema._indexes; - const len = subindexes.length; - for (let i = 0; i < len; ++i) { - const indexObj = subindexes[i][0]; - const keys = Object.keys(indexObj); - const klen = keys.length; - const newindex = {}; - - // use forward iteration, order matters - for (let j = 0; j < klen; ++j) { - const key = keys[j]; - newindex[prefix + key] = indexObj[key]; - } - - indexes.push([newindex, subindexes[i][1]]); - } - } -}; diff --git a/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js b/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js deleted file mode 100644 index 0f9c30c..0000000 --- a/node_modules/mongoose/lib/helpers/schema/handleTimestampOption.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -module.exports = handleTimestampOption; - -/*! - * ignore - */ - -function handleTimestampOption(arg, prop) { - if (arg == null) { - return null; - } - - if (typeof arg === 'boolean') { - return prop; - } - if (typeof arg[prop] === 'boolean') { - return arg[prop] ? prop : null; - } - if (!(prop in arg)) { - return prop; - } - return arg[prop]; -} diff --git a/node_modules/mongoose/lib/helpers/schema/merge.js b/node_modules/mongoose/lib/helpers/schema/merge.js deleted file mode 100644 index 321c78f..0000000 --- a/node_modules/mongoose/lib/helpers/schema/merge.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -module.exports = function merge(s1, s2) { - s1.add(s2.obj); - - s1.callQueue = s1.callQueue.concat(s2.callQueue); - s1.method(s2.methods); - s1.static(s2.statics); - - for (const query in s2.query) { - s1.query[query] = s2.query[query]; - } - - for (const virtual in s2.virtuals) { - s1.virtual[virtual] = s2.virtual[virtual].clone(); - } - - s1.s.hooks.merge(s2.s.hooks, false); -}; diff --git a/node_modules/mongoose/lib/helpers/schema/setParentPointers.js b/node_modules/mongoose/lib/helpers/schema/setParentPointers.js deleted file mode 100644 index 094bdf0..0000000 --- a/node_modules/mongoose/lib/helpers/schema/setParentPointers.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -/*! - * Set `$parentSchema` on all schema types, and `$schemaType` on single - * nested docs. - * - * This is a slow path function, should only run when model is compiled - */ - -module.exports = function setParentPointers(schema, skipRecursion) { - for (const path of Object.keys(schema.paths)) { - const schemaType = schema.paths[path]; - if (schemaType.schema != null) { - Object.defineProperty(schemaType.schema, '$schemaType', { - configurable: true, - writable: false, - enumerable: false, - value: schemaType - }); - } - Object.defineProperty(schemaType, '$parentSchema', { - configurable: true, - writable: false, - enumerable: false, - value: schema - }); - } - - // `childSchemas` contains all descendant schemas, so no need to recurse - // further. - if (skipRecursion) { - return; - } - - for (const obj of schema.childSchemas) { - setParentPointers(obj.schema, true); - } -}; diff --git a/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js b/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js deleted file mode 100644 index 43642ad..0000000 --- a/node_modules/mongoose/lib/helpers/setDefaultsOnInsert.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -const modifiedPaths = require('./common').modifiedPaths; - -/** - * Applies defaults to update and findOneAndUpdate operations. - * - * @param {Object} filter - * @param {Schema} schema - * @param {Object} castedDoc - * @param {Object} options - * @method setDefaultsOnInsert - * @api private - */ - -module.exports = function(filter, schema, castedDoc, options) { - const keys = Object.keys(castedDoc || {}); - const updatedKeys = {}; - const updatedValues = {}; - const numKeys = keys.length; - const modified = {}; - - let hasDollarUpdate = false; - - options = options || {}; - - if (!options.upsert || !options.setDefaultsOnInsert) { - return castedDoc; - } - - for (let i = 0; i < numKeys; ++i) { - if (keys[i].charAt(0) === '$') { - modifiedPaths(castedDoc[keys[i]], '', modified); - hasDollarUpdate = true; - } - } - - if (!hasDollarUpdate) { - modifiedPaths(castedDoc, '', modified); - } - - const paths = Object.keys(filter); - const numPaths = paths.length; - for (let i = 0; i < numPaths; ++i) { - const path = paths[i]; - const condition = filter[path]; - if (condition && typeof condition === 'object') { - const conditionKeys = Object.keys(condition); - const numConditionKeys = conditionKeys.length; - let hasDollarKey = false; - for (let j = 0; j < numConditionKeys; ++j) { - if (conditionKeys[j].charAt(0) === '$') { - hasDollarKey = true; - break; - } - } - if (hasDollarKey) { - continue; - } - } - updatedKeys[path] = true; - modified[path] = true; - } - - if (options && options.overwrite && !hasDollarUpdate) { - // Defaults will be set later, since we're overwriting we'll cast - // the whole update to a document - return castedDoc; - } - - schema.eachPath(function(path, schemaType) { - if (schemaType.$isSingleNested) { - // Only handle nested schemas 1-level deep to avoid infinite - // recursion re: https://github.com/mongodb-js/mongoose-autopopulate/issues/11 - schemaType.schema.eachPath(function(_path, _schemaType) { - if (_path === '_id' && _schemaType.auto) { - // Ignore _id if auto id so we don't create subdocs - return; - } - - const def = _schemaType.getDefault(null, true); - if (!isModified(modified, path + '.' + _path) && - typeof def !== 'undefined') { - castedDoc = castedDoc || {}; - castedDoc.$setOnInsert = castedDoc.$setOnInsert || {}; - castedDoc.$setOnInsert[path + '.' + _path] = def; - updatedValues[path + '.' + _path] = def; - } - }); - } else { - const def = schemaType.getDefault(null, true); - if (!isModified(modified, path) && typeof def !== 'undefined') { - castedDoc = castedDoc || {}; - castedDoc.$setOnInsert = castedDoc.$setOnInsert || {}; - castedDoc.$setOnInsert[path] = def; - updatedValues[path] = def; - } - } - }); - - return castedDoc; -}; - -function isModified(modified, path) { - if (modified[path]) { - return true; - } - const sp = path.split('.'); - let cur = sp[0]; - for (let i = 1; i < sp.length; ++i) { - if (modified[cur]) { - return true; - } - cur += '.' + sp[i]; - } - return false; -} diff --git a/node_modules/mongoose/lib/helpers/symbols.js b/node_modules/mongoose/lib/helpers/symbols.js deleted file mode 100644 index 319785e..0000000 --- a/node_modules/mongoose/lib/helpers/symbols.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -exports.validatorErrorSymbol = Symbol.for('mongoose:validatorError'); - -exports.documentArrayParent = Symbol.for('mongoose:documentArrayParent'); - -exports.modelSymbol = Symbol.for('mongoose#Model'); - -exports.getSymbol = Symbol.for('mongoose#Document#get'); - -exports.objectIdSymbol = Symbol.for('mongoose#ObjectId'); diff --git a/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js b/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js deleted file mode 100644 index 5f85313..0000000 --- a/node_modules/mongoose/lib/helpers/update/applyTimestampsToChildren.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -const handleTimestampOption = require('../schema/handleTimestampOption'); - -module.exports = applyTimestampsToChildren; - -/*! - * ignore - */ - -function applyTimestampsToChildren(now, update, schema) { - if (update == null) { - return; - } - - const keys = Object.keys(update); - let key; - let createdAt; - let updatedAt; - let timestamps; - let path; - - const hasDollarKey = keys.length && keys[0].charAt(0) === '$'; - - if (hasDollarKey) { - if (update.$push) { - for (key in update.$push) { - const $path = schema.path(key); - if (update.$push[key] && - $path && - $path.$isMongooseDocumentArray && - $path.schema.options.timestamps) { - timestamps = $path.schema.options.timestamps; - createdAt = handleTimestampOption(timestamps, 'createdAt'); - updatedAt = handleTimestampOption(timestamps, 'updatedAt'); - if (update.$push[key].$each) { - update.$push[key].$each.forEach(function(subdoc) { - if (updatedAt != null) { - subdoc[updatedAt] = now; - } - if (createdAt != null) { - subdoc[createdAt] = now; - } - }); - } else { - if (updatedAt != null) { - update.$push[key][updatedAt] = now; - } - if (createdAt != null) { - update.$push[key][createdAt] = now; - } - } - } - } - } - if (update.$set != null) { - const keys = Object.keys(update.$set); - for (key of keys) { - // Replace positional operator `$` and array filters `$[]` and `$[.*]` - const keyToSearch = key. - replace(/\.\$(\[[^\]]*\])?\./g, '.0.'). - replace(/\.(\[[^\]]*\])?\$$/, '.0'); - path = schema.path(keyToSearch); - if (!path) { - continue; - } - if (Array.isArray(update.$set[key]) && path.$isMongooseDocumentArray) { - applyTimestampsToDocumentArray(update.$set[key], path, now); - } else if (update.$set[key] && path.$isSingleNested) { - applyTimestampsToSingleNested(update.$set[key], path, now); - } else if (path.$parentSchema !== schema && path.$parentSchema != null) { - const parentPath = path.$parentSchema.$schemaType; - - if (parentPath == null) { - continue; - } - - timestamps = parentPath.schema.options.timestamps; - createdAt = handleTimestampOption(timestamps, 'createdAt'); - updatedAt = handleTimestampOption(timestamps, 'updatedAt'); - - if (updatedAt == null) { - continue; - } - - if (parentPath.$isSingleNested) { - // Single nested is easy - update.$set[parentPath.path + '.' + updatedAt] = now; - continue; - } - - let childPath = key.substr(parentPath.path.length + 1); - const firstDot = childPath.indexOf('.'); - - // Shouldn't happen, but if it does ignore this path - if (firstDot === -1) { - continue; - } - - childPath = childPath.substr(0, firstDot); - - update.$set[parentPath.path + '.' + childPath + '.' + updatedAt] = now; - } else if (path.schema != null && path.schema != schema) { - timestamps = path.schema.options.timestamps; - createdAt = handleTimestampOption(timestamps, 'createdAt'); - updatedAt = handleTimestampOption(timestamps, 'updatedAt'); - - if (updatedAt != null) { - update.$set[key][updatedAt] = now; - } - if (createdAt != null) { - update.$set[key][createdAt] = now; - } - } - } - } - } else { - const keys = Object.keys(update).filter(key => !key.startsWith('$')); - for (key of keys) { - // Replace positional operator `$` and array filters `$[]` and `$[.*]` - const keyToSearch = key. - replace(/\.\$(\[[^\]]*\])?\./g, '.0.'). - replace(/\.(\[[^\]]*\])?\$$/, '.0'); - path = schema.path(keyToSearch); - if (!path) { - continue; - } - - if (Array.isArray(update[key]) && path.$isMongooseDocumentArray) { - applyTimestampsToDocumentArray(update[key], path, now); - } else if (update[key] != null && path.$isSingleNested) { - applyTimestampsToSingleNested(update[key], path, now); - } - } - } -} - -function applyTimestampsToDocumentArray(arr, schematype, now) { - const timestamps = schematype.schema.options.timestamps; - - if (!timestamps) { - return; - } - - const len = arr.length; - - const createdAt = handleTimestampOption(timestamps, 'createdAt'); - const updatedAt = handleTimestampOption(timestamps, 'updatedAt'); - for (let i = 0; i < len; ++i) { - if (updatedAt != null) { - arr[i][updatedAt] = now; - } - if (createdAt != null) { - arr[i][createdAt] = now; - } - } -} - -function applyTimestampsToSingleNested(subdoc, schematype, now) { - const timestamps = schematype.schema.options.timestamps; - if (!timestamps) { - return; - } - - const createdAt = handleTimestampOption(timestamps, 'createdAt'); - const updatedAt = handleTimestampOption(timestamps, 'updatedAt'); - if (updatedAt != null) { - subdoc[updatedAt] = now; - } - if (createdAt != null) { - subdoc[createdAt] = now; - } -} diff --git a/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js b/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js deleted file mode 100644 index 85cef1a..0000000 --- a/node_modules/mongoose/lib/helpers/update/applyTimestampsToUpdate.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -const get = require('../get'); - -module.exports = applyTimestampsToUpdate; - -/*! - * ignore - */ - -function applyTimestampsToUpdate(now, createdAt, updatedAt, currentUpdate, options) { - const updates = currentUpdate; - let _updates = updates; - const overwrite = get(options, 'overwrite', false); - const timestamps = get(options, 'timestamps', true); - - // Support skipping timestamps at the query level, see gh-6980 - if (!timestamps || updates == null) { - return currentUpdate; - } - - if (overwrite) { - if (currentUpdate && currentUpdate.$set) { - currentUpdate = currentUpdate.$set; - updates.$set = {}; - _updates = updates.$set; - } - if (updatedAt && !currentUpdate[updatedAt]) { - _updates[updatedAt] = now; - } - if (createdAt && !currentUpdate[createdAt]) { - _updates[createdAt] = now; - } - return updates; - } - updates.$set = updates.$set || {}; - currentUpdate = currentUpdate || {}; - - if (updatedAt && - (!currentUpdate.$currentDate || !currentUpdate.$currentDate[updatedAt])) { - updates.$set[updatedAt] = now; - } - - if (createdAt) { - if (currentUpdate[createdAt]) { - delete currentUpdate[createdAt]; - } - if (currentUpdate.$set && currentUpdate.$set[createdAt]) { - delete currentUpdate.$set[createdAt]; - } - - updates.$setOnInsert = updates.$setOnInsert || {}; - updates.$setOnInsert[createdAt] = now; - } - - if (Object.keys(updates.$set).length === 0) { - delete updates.$set; - } - - return updates; -} diff --git a/node_modules/mongoose/lib/helpers/update/modifiedPaths.js b/node_modules/mongoose/lib/helpers/update/modifiedPaths.js deleted file mode 100644 index 9cb567d..0000000 --- a/node_modules/mongoose/lib/helpers/update/modifiedPaths.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const _modifiedPaths = require('../common').modifiedPaths; - -/** - * Given an update document with potential update operators (`$set`, etc.) - * returns an object whose keys are the directly modified paths. - * - * If there are any top-level keys that don't start with `$`, we assume those - * will get wrapped in a `$set`. The Mongoose Query is responsible for wrapping - * top-level keys in `$set`. - * - * @param {Object} update - * @return {Object} modified - */ - -module.exports = function modifiedPaths(update) { - const keys = Object.keys(update); - const res = {}; - - const withoutDollarKeys = {}; - for (const key of keys) { - if (key.startsWith('$')) { - _modifiedPaths(update[key], '', res); - continue; - } - withoutDollarKeys[key] = update[key]; - } - - _modifiedPaths(withoutDollarKeys, '', res); - - return res; -}; diff --git a/node_modules/mongoose/lib/helpers/updateValidators.js b/node_modules/mongoose/lib/helpers/updateValidators.js deleted file mode 100644 index 5c790fb..0000000 --- a/node_modules/mongoose/lib/helpers/updateValidators.js +++ /dev/null @@ -1,227 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const Mixed = require('../schema/mixed'); -const ValidationError = require('../error/validation'); -const flatten = require('./common').flatten; -const modifiedPaths = require('./common').modifiedPaths; -const parallel = require('async/parallel'); - -/** - * Applies validators and defaults to update and findOneAndUpdate operations, - * specifically passing a null doc as `this` to validators and defaults - * - * @param {Query} query - * @param {Schema} schema - * @param {Object} castedDoc - * @param {Object} options - * @method runValidatorsOnUpdate - * @api private - */ - -module.exports = function(query, schema, castedDoc, options) { - let _keys; - const keys = Object.keys(castedDoc || {}); - let updatedKeys = {}; - let updatedValues = {}; - const isPull = {}; - const arrayAtomicUpdates = {}; - const numKeys = keys.length; - let hasDollarUpdate = false; - const modified = {}; - let currentUpdate; - let key; - let i; - - for (i = 0; i < numKeys; ++i) { - if (keys[i].charAt(0) === '$') { - hasDollarUpdate = true; - if (keys[i] === '$push' || keys[i] === '$addToSet') { - _keys = Object.keys(castedDoc[keys[i]]); - for (let ii = 0; ii < _keys.length; ++ii) { - currentUpdate = castedDoc[keys[i]][_keys[ii]]; - if (currentUpdate && currentUpdate.$each) { - arrayAtomicUpdates[_keys[ii]] = (arrayAtomicUpdates[_keys[ii]] || []). - concat(currentUpdate.$each); - } else { - arrayAtomicUpdates[_keys[ii]] = (arrayAtomicUpdates[_keys[ii]] || []). - concat([currentUpdate]); - } - } - continue; - } - modifiedPaths(castedDoc[keys[i]], '', modified); - const flat = flatten(castedDoc[keys[i]]); - const paths = Object.keys(flat); - const numPaths = paths.length; - for (let j = 0; j < numPaths; ++j) { - let updatedPath = paths[j].replace('.$.', '.0.'); - updatedPath = updatedPath.replace(/\.\$$/, '.0'); - key = keys[i]; - // With `$pull` we might flatten `$in`. Skip stuff nested under `$in` - // for the rest of the logic, it will get handled later. - if (updatedPath.indexOf('$') !== -1) { - continue; - } - if (key === '$set' || key === '$setOnInsert' || - key === '$pull' || key === '$pullAll') { - updatedValues[updatedPath] = flat[paths[j]]; - isPull[updatedPath] = key === '$pull' || key === '$pullAll'; - } else if (key === '$unset') { - updatedValues[updatedPath] = undefined; - } - updatedKeys[updatedPath] = true; - } - } - } - - if (!hasDollarUpdate) { - modifiedPaths(castedDoc, '', modified); - updatedValues = flatten(castedDoc); - updatedKeys = Object.keys(updatedValues); - } - - const updates = Object.keys(updatedValues); - const numUpdates = updates.length; - const validatorsToExecute = []; - const validationErrors = []; - - const alreadyValidated = []; - - const context = options && options.context === 'query' ? query : null; - function iter(i, v) { - const schemaPath = schema._getSchema(updates[i]); - if (schemaPath) { - // gh-4305: `_getSchema()` will report all sub-fields of a 'Mixed' path - // as 'Mixed', so avoid double validating them. - if (schemaPath instanceof Mixed && schemaPath.$fullPath !== updates[i]) { - return; - } - - if (v && Array.isArray(v.$in)) { - v.$in.forEach((v, i) => { - validatorsToExecute.push(function(callback) { - schemaPath.doValidate( - v, - function(err) { - if (err) { - err.path = updates[i] + '.$in.' + i; - validationErrors.push(err); - } - callback(null); - }, - context, - {updateValidator: true}); - }); - }); - } else { - if (isPull[updates[i]] && - !Array.isArray(v) && - schemaPath.$isMongooseArray) { - v = [v]; - } - - if (schemaPath.$isMongooseDocumentArrayElement && v != null && v.$__ != null) { - alreadyValidated.push(updates[i]); - validatorsToExecute.push(function(callback) { - schemaPath.doValidate(v, function(err) { - if (err) { - err.path = updates[i]; - validationErrors.push(err); - return callback(null); - } - - v.validate(function(err) { - if (err) { - if (err.errors) { - for (const key of Object.keys(err.errors)) { - const _err = err.errors[key]; - _err.path = updates[i] + '.' + key; - validationErrors.push(_err); - } - } - } - callback(null); - }); - }, context, { updateValidator: true }); - }); - } else { - validatorsToExecute.push(function(callback) { - for (const path of alreadyValidated) { - if (updates[i].startsWith(path + '.')) { - return callback(null); - } - } - schemaPath.doValidate(v, function(err) { - if (err) { - err.path = updates[i]; - validationErrors.push(err); - } - callback(null); - }, context, { updateValidator: true }); - }); - } - } - } - } - for (i = 0; i < numUpdates; ++i) { - iter(i, updatedValues[updates[i]]); - } - - const arrayUpdates = Object.keys(arrayAtomicUpdates); - const numArrayUpdates = arrayUpdates.length; - for (i = 0; i < numArrayUpdates; ++i) { - (function(i) { - let schemaPath = schema._getSchema(arrayUpdates[i]); - if (schemaPath && schemaPath.$isMongooseDocumentArray) { - validatorsToExecute.push(function(callback) { - schemaPath.doValidate( - arrayAtomicUpdates[arrayUpdates[i]], - function(err) { - if (err) { - err.path = arrayUpdates[i]; - validationErrors.push(err); - } - callback(null); - }, - options && options.context === 'query' ? query : null); - }); - } else { - schemaPath = schema._getSchema(arrayUpdates[i] + '.0'); - for (let j = 0; j < arrayAtomicUpdates[arrayUpdates[i]].length; ++j) { - (function(j) { - validatorsToExecute.push(function(callback) { - schemaPath.doValidate( - arrayAtomicUpdates[arrayUpdates[i]][j], - function(err) { - if (err) { - err.path = arrayUpdates[i]; - validationErrors.push(err); - } - callback(null); - }, - options && options.context === 'query' ? query : null, - { updateValidator: true }); - }); - })(j); - } - } - })(i); - } - - return function(callback) { - parallel(validatorsToExecute, function() { - if (validationErrors.length) { - const err = new ValidationError(null); - for (let i = 0; i < validationErrors.length; ++i) { - err.addError(validationErrors[i].path, validationErrors[i]); - } - return callback(err); - } - callback(null); - }); - }; -}; diff --git a/node_modules/mongoose/lib/internal.js b/node_modules/mongoose/lib/internal.js deleted file mode 100644 index 9364658..0000000 --- a/node_modules/mongoose/lib/internal.js +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * Dependencies - */ - -'use strict'; - -const StateMachine = require('./statemachine'); -const ActiveRoster = StateMachine.ctor('require', 'modify', 'init', 'default', 'ignore'); - -module.exports = exports = InternalCache; - -function InternalCache() { - this.strictMode = undefined; - this.selected = undefined; - this.shardval = undefined; - this.saveError = undefined; - this.validationError = undefined; - this.adhocPaths = undefined; - this.removing = undefined; - this.inserting = undefined; - this.saving = undefined; - this.version = undefined; - this.getters = {}; - this._id = undefined; - this.populate = undefined; // what we want to populate in this doc - this.populated = undefined;// the _ids that have been populated - this.wasPopulated = false; // if this doc was the result of a population - this.scope = undefined; - this.activePaths = new ActiveRoster; - this.pathsToScopes = {}; - this.cachedRequired = {}; - this.session = null; - - // embedded docs - this.ownerDocument = undefined; - this.fullPath = undefined; -} diff --git a/node_modules/mongoose/lib/options.js b/node_modules/mongoose/lib/options.js deleted file mode 100644 index 8e9fc29..0000000 --- a/node_modules/mongoose/lib/options.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -exports.internalToObjectOptions = { - transform: false, - virtuals: false, - getters: false, - _skipDepopulateTopLevel: true, - depopulate: true, - flattenDecimals: false -}; diff --git a/node_modules/mongoose/lib/plugins/idGetter.js b/node_modules/mongoose/lib/plugins/idGetter.js deleted file mode 100644 index f4e6356..0000000 --- a/node_modules/mongoose/lib/plugins/idGetter.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function(schema) { - // ensure the documents receive an id getter unless disabled - const autoIdGetter = !schema.paths['id'] && - (!schema.options.noVirtualId && schema.options.id); - if (!autoIdGetter) { - return; - } - - schema.virtual('id').get(idGetter); -}; - -/*! - * Returns this documents _id cast to a string. - */ - -function idGetter() { - if (this._id != null) { - return String(this._id); - } - - return null; -} diff --git a/node_modules/mongoose/lib/plugins/removeSubdocs.js b/node_modules/mongoose/lib/plugins/removeSubdocs.js deleted file mode 100644 index c7b2d24..0000000 --- a/node_modules/mongoose/lib/plugins/removeSubdocs.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -const each = require('async/each'); - -/*! - * ignore - */ - -module.exports = function(schema) { - const unshift = true; - schema.s.hooks.pre('remove', false, function(next) { - if (this.ownerDocument) { - next(); - return; - } - - const _this = this; - const subdocs = this.$__getAllSubdocs(); - - if (!subdocs.length) { - next(); - return; - } - - each(subdocs, function(subdoc, cb) { - subdoc.$__remove(function(err) { - cb(err); - }); - }, function(error) { - if (error) { - return _this.schema.s.hooks.execPost('remove:error', _this, [_this], { error: error }, function(error) { - next(error); - }); - } - next(); - }); - }, null, unshift); -}; diff --git a/node_modules/mongoose/lib/plugins/saveSubdocs.js b/node_modules/mongoose/lib/plugins/saveSubdocs.js deleted file mode 100644 index dc27213..0000000 --- a/node_modules/mongoose/lib/plugins/saveSubdocs.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const each = require('async/each'); - -/*! - * ignore - */ - -module.exports = function(schema) { - const unshift = true; - schema.s.hooks.pre('save', false, function(next) { - if (this.ownerDocument) { - next(); - return; - } - - const _this = this; - const subdocs = this.$__getAllSubdocs(); - - if (!subdocs.length) { - next(); - return; - } - - each(subdocs, function(subdoc, cb) { - subdoc.schema.s.hooks.execPre('save', subdoc, function(err) { - cb(err); - }); - }, function(error) { - if (error) { - return _this.schema.s.hooks.execPost('save:error', _this, [_this], { error: error }, function(error) { - next(error); - }); - } - next(); - }); - }, null, unshift); - - schema.s.hooks.post('save', function(doc, next) { - if (this.ownerDocument) { - next(); - return; - } - - const _this = this; - const subdocs = this.$__getAllSubdocs(); - - if (!subdocs.length) { - next(); - return; - } - - each(subdocs, function(subdoc, cb) { - subdoc.schema.s.hooks.execPost('save', subdoc, [subdoc], function(err) { - cb(err); - }); - }, function(error) { - if (error) { - return _this.schema.s.hooks.execPost('save:error', _this, [_this], { error: error }, function(error) { - next(error); - }); - } - next(); - }); - }, null, unshift); -}; diff --git a/node_modules/mongoose/lib/plugins/validateBeforeSave.js b/node_modules/mongoose/lib/plugins/validateBeforeSave.js deleted file mode 100644 index 2d8a8ac..0000000 --- a/node_modules/mongoose/lib/plugins/validateBeforeSave.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function(schema) { - const unshift = true; - schema.pre('save', false, function(next, options) { - const _this = this; - // Nested docs have their own presave - if (this.ownerDocument) { - return next(); - } - - const hasValidateBeforeSaveOption = options && - (typeof options === 'object') && - ('validateBeforeSave' in options); - - let shouldValidate; - if (hasValidateBeforeSaveOption) { - shouldValidate = !!options.validateBeforeSave; - } else { - shouldValidate = this.schema.options.validateBeforeSave; - } - - // Validate - if (shouldValidate) { - this.validate(function(error) { - return _this.schema.s.hooks.execPost('save:error', _this, [ _this], { error: error }, function(error) { - next(error); - }); - }); - } else { - next(); - } - }, null, unshift); -}; diff --git a/node_modules/mongoose/lib/promise_provider.js b/node_modules/mongoose/lib/promise_provider.js deleted file mode 100644 index 3febf36..0000000 --- a/node_modules/mongoose/lib/promise_provider.js +++ /dev/null @@ -1,49 +0,0 @@ -/*! - * ignore - */ - -'use strict'; - -const assert = require('assert'); -const mquery = require('mquery'); - -/** - * Helper for multiplexing promise implementations - * - * @api private - */ - -const store = { - _promise: null -}; - -/** - * Get the current promise constructor - * - * @api private - */ - -store.get = function() { - return store._promise; -}; - -/** - * Set the current promise constructor - * - * @api private - */ - -store.set = function(lib) { - assert.ok(typeof lib === 'function', - `mongoose.Promise must be a function, got ${lib}`); - store._promise = lib; - mquery.Promise = lib; -}; - -/*! - * Use native promises by default - */ - -store.set(global.Promise); - -module.exports = store; diff --git a/node_modules/mongoose/lib/schema/boolean.js b/node_modules/mongoose/lib/schema/boolean.js deleted file mode 100644 index 4b2b3fa..0000000 --- a/node_modules/mongoose/lib/schema/boolean.js +++ /dev/null @@ -1,205 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const CastError = require('../error/cast'); -const SchemaType = require('../schematype'); -const castBoolean = require('../cast/boolean'); -const utils = require('../utils'); - -/** - * Boolean SchemaType constructor. - * - * @param {String} path - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function SchemaBoolean(path, options) { - SchemaType.call(this, path, options, 'Boolean'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -SchemaBoolean.schemaName = 'Boolean'; - -/*! - * Inherits from SchemaType. - */ -SchemaBoolean.prototype = Object.create(SchemaType.prototype); -SchemaBoolean.prototype.constructor = SchemaBoolean; - -/*! - * ignore - */ - -SchemaBoolean._cast = castBoolean; - -/** - * Get/set the function used to cast arbitrary values to booleans. - * - * ####Example: - * - * // Make Mongoose cast empty string '' to false. - * const original = mongoose.Schema.Boolean.cast(); - * mongoose.Schema.Boolean.cast(v => { - * if (v === '') { - * return false; - * } - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.Schema.Boolean.cast(false); - * - * @param {Function} caster - * @return {Function} - * @function get - * @static - * @api public - */ - -SchemaBoolean.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (v != null && typeof v !== 'boolean') { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/*! - * ignore - */ - -SchemaBoolean._checkRequired = v => v === true || v === false; - -/** - * Override the function the required validator uses to check whether a boolean - * passes the `required` check. - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -SchemaBoolean.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. For a boolean - * to satisfy a required validator, it must be strictly equal to true or to - * false. - * - * @param {Any} value - * @return {Boolean} - * @api public - */ - -SchemaBoolean.prototype.checkRequired = function(value) { - return this.constructor._checkRequired(value); -}; - -/** - * Configure which values get casted to `true`. - * - * ####Example: - * - * const M = mongoose.model('Test', new Schema({ b: Boolean })); - * new M({ b: 'affirmative' }).b; // undefined - * mongoose.Schema.Boolean.convertToTrue.add('affirmative'); - * new M({ b: 'affirmative' }).b; // true - * - * @property convertToTrue - * @type Set - * @api public - */ - -Object.defineProperty(SchemaBoolean, 'convertToTrue', { - get: () => castBoolean.convertToTrue, - set: v => { castBoolean.convertToTrue = v; } -}); - -/** - * Configure which values get casted to `false`. - * - * ####Example: - * - * const M = mongoose.model('Test', new Schema({ b: Boolean })); - * new M({ b: 'nay' }).b; // undefined - * mongoose.Schema.Types.Boolean.convertToFalse.add('nay'); - * new M({ b: 'nay' }).b; // false - * - * @property convertToFalse - * @type Set - * @api public - */ - -Object.defineProperty(SchemaBoolean, 'convertToFalse', { - get: () => castBoolean.convertToFalse, - set: v => { castBoolean.convertToFalse = v; } -}); - -/** - * Casts to boolean - * - * @param {Object} value - * @param {Object} model - this value is optional - * @api private - */ - -SchemaBoolean.prototype.cast = function(value) { - try { - return this.constructor.cast()(value); - } catch (error) { - throw new CastError('Boolean', value, this.path); - } -}; - -SchemaBoolean.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, {}); - -/** - * Casts contents for queries. - * - * @param {String} $conditional - * @param {any} val - * @api private - */ - -SchemaBoolean.prototype.castForQuery = function($conditional, val) { - let handler; - if (arguments.length === 2) { - handler = SchemaBoolean.$conditionalHandlers[$conditional]; - - if (handler) { - return handler.call(this, val); - } - - return this._castForQuery(val); - } - - return this._castForQuery($conditional); -}; - -/*! - * Module exports. - */ - -module.exports = SchemaBoolean; diff --git a/node_modules/mongoose/lib/schema/buffer.js b/node_modules/mongoose/lib/schema/buffer.js deleted file mode 100644 index 8bf6bc5..0000000 --- a/node_modules/mongoose/lib/schema/buffer.js +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const handleBitwiseOperator = require('./operators/bitwise'); -const utils = require('../utils'); - -const MongooseBuffer = require('../types/buffer'); -const SchemaType = require('../schematype'); - -const Binary = MongooseBuffer.Binary; -const CastError = SchemaType.CastError; -let Document; - -/** - * Buffer SchemaType constructor - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function SchemaBuffer(key, options) { - SchemaType.call(this, key, options, 'Buffer'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -SchemaBuffer.schemaName = 'Buffer'; - -/*! - * Inherits from SchemaType. - */ -SchemaBuffer.prototype = Object.create(SchemaType.prototype); -SchemaBuffer.prototype.constructor = SchemaBuffer; - -/*! - * ignore - */ - -SchemaBuffer._checkRequired = v => !!(v && v.length); - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * ####Example: - * - * // Allow empty strings to pass `required` check - * mongoose.Schema.Types.String.checkRequired(v => v != null); - * - * const M = mongoose.model({ buf: { type: Buffer, required: true } }); - * new M({ buf: Buffer.from('') }).validateSync(); // validation passes! - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -SchemaBuffer.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. To satisfy a - * required validator, a buffer must not be null or undefined and have - * non-zero length. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -SchemaBuffer.prototype.checkRequired = function(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value); -}; - -/** - * Casts contents - * - * @param {Object} value - * @param {Document} doc document that triggers the casting - * @param {Boolean} init - * @api private - */ - -SchemaBuffer.prototype.cast = function(value, doc, init) { - let ret; - if (SchemaType._isRef(this, value, doc, init)) { - // wait! we may need to cast this to a document - - if (value === null || value === undefined) { - return value; - } - - // lazy load - Document || (Document = require('./../document')); - - if (value instanceof Document) { - value.$__.wasPopulated = true; - return value; - } - - // setting a populated path - if (Buffer.isBuffer(value)) { - return value; - } else if (!utils.isObject(value)) { - throw new CastError('buffer', value, this.path); - } - - // Handle the case where user directly sets a populated - // path to a plain object; cast to the Model used in - // the population query. - const path = doc.$__fullPath(this.path); - const owner = doc.ownerDocument ? doc.ownerDocument() : doc; - const pop = owner.populated(path, true); - ret = new pop.options.model(value); - ret.$__.wasPopulated = true; - return ret; - } - - // documents - if (value && value._id) { - value = value._id; - } - - if (value && value.isMongooseBuffer) { - return value; - } - - if (Buffer.isBuffer(value)) { - if (!value || !value.isMongooseBuffer) { - value = new MongooseBuffer(value, [this.path, doc]); - if (this.options.subtype != null) { - value._subtype = this.options.subtype; - } - } - return value; - } - - if (value instanceof Binary) { - ret = new MongooseBuffer(value.value(true), [this.path, doc]); - if (typeof value.sub_type !== 'number') { - throw new CastError('buffer', value, this.path); - } - ret._subtype = value.sub_type; - return ret; - } - - if (value === null) { - return value; - } - - - const type = typeof value; - if ( - type === 'string' || type === 'number' || Array.isArray(value) || - (type === 'object' && value.type === 'Buffer' && Array.isArray(value.data)) // gh-6863 - ) { - if (type === 'number') { - value = [value]; - } - ret = new MongooseBuffer(value, [this.path, doc]); - if (this.options.subtype != null) { - ret._subtype = this.options.subtype; - } - return ret; - } - - throw new CastError('buffer', value, this.path); -}; - -/** - * Sets the default [subtype](https://studio3t.com/whats-new/best-practices-uuid-mongodb/) - * for this buffer. You can find a [list of allowed subtypes here](http://api.mongodb.com/python/current/api/bson/binary.html). - * - * ####Example: - * - * var s = new Schema({ uuid: { type: Buffer, subtype: 4 }); - * var M = db.model('M', s); - * var m = new M({ uuid: 'test string' }); - * m.uuid._subtype; // 4 - * - * @param {Number} subtype the default subtype - * @return {SchemaType} this - * @api public - */ - -SchemaBuffer.prototype.subtype = function(subtype) { - this.options.subtype = subtype; - return this; -}; - -/*! - * ignore - */ -function handleSingle(val) { - return this.castForQuery(val); -} - -SchemaBuffer.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $bitsAllClear: handleBitwiseOperator, - $bitsAnyClear: handleBitwiseOperator, - $bitsAllSet: handleBitwiseOperator, - $bitsAnySet: handleBitwiseOperator, - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle - }); - -/** - * Casts contents for queries. - * - * @param {String} $conditional - * @param {any} [value] - * @api private - */ - -SchemaBuffer.prototype.castForQuery = function($conditional, val) { - let handler; - if (arguments.length === 2) { - handler = this.$conditionalHandlers[$conditional]; - if (!handler) { - throw new Error('Can\'t use ' + $conditional + ' with Buffer.'); - } - return handler.call(this, val); - } - val = $conditional; - const casted = this._castForQuery(val); - return casted ? casted.toObject({ transform: false, virtuals: false }) : casted; -}; - -/*! - * Module exports. - */ - -module.exports = SchemaBuffer; diff --git a/node_modules/mongoose/lib/schema/date.js b/node_modules/mongoose/lib/schema/date.js deleted file mode 100644 index 6e06cb7..0000000 --- a/node_modules/mongoose/lib/schema/date.js +++ /dev/null @@ -1,346 +0,0 @@ -/*! - * Module requirements. - */ - -'use strict'; - -const MongooseError = require('../error'); -const castDate = require('../cast/date'); -const utils = require('../utils'); - -const SchemaType = require('../schematype'); - -const CastError = SchemaType.CastError; - -/** - * Date SchemaType constructor. - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function SchemaDate(key, options) { - SchemaType.call(this, key, options, 'Date'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -SchemaDate.schemaName = 'Date'; - -/*! - * Inherits from SchemaType. - */ -SchemaDate.prototype = Object.create(SchemaType.prototype); -SchemaDate.prototype.constructor = SchemaDate; - -/*! - * ignore - */ - -SchemaDate._cast = castDate; - -/** - * Get/set the function used to cast arbitrary values to dates. - * - * ####Example: - * - * // Mongoose converts empty string '' into `null` for date types. You - * // can create a custom caster to disable it. - * const original = mongoose.Schema.Types.Date.cast(); - * mongoose.Schema.Types.Date.cast(v => { - * assert.ok(v !== ''); - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.Schema.Types.Date.cast(false); - * - * @param {Function} caster - * @return {Function} - * @function get - * @static - * @api public - */ - -SchemaDate.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (v != null && !(v instanceof Date)) { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/** - * Declares a TTL index (rounded to the nearest second) for _Date_ types only. - * - * This sets the `expireAfterSeconds` index option available in MongoDB >= 2.1.2. - * This index type is only compatible with Date types. - * - * ####Example: - * - * // expire in 24 hours - * new Schema({ createdAt: { type: Date, expires: 60*60*24 }}); - * - * `expires` utilizes the `ms` module from [guille](https://github.com/guille/) allowing us to use a friendlier syntax: - * - * ####Example: - * - * // expire in 24 hours - * new Schema({ createdAt: { type: Date, expires: '24h' }}); - * - * // expire in 1.5 hours - * new Schema({ createdAt: { type: Date, expires: '1.5h' }}); - * - * // expire in 7 days - * var schema = new Schema({ createdAt: Date }); - * schema.path('createdAt').expires('7d'); - * - * @param {Number|String} when - * @added 3.0.0 - * @return {SchemaType} this - * @api public - */ - -SchemaDate.prototype.expires = function(when) { - if (!this._index || this._index.constructor.name !== 'Object') { - this._index = {}; - } - - this._index.expires = when; - utils.expires(this._index); - return this; -}; - -/*! - * ignore - */ - -SchemaDate._checkRequired = v => v instanceof Date; - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * ####Example: - * - * // Allow empty strings to pass `required` check - * mongoose.Schema.Types.String.checkRequired(v => v != null); - * - * const M = mongoose.model({ str: { type: String, required: true } }); - * new M({ str: '' }).validateSync(); // `null`, validation passes! - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -SchemaDate.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. To satisfy - * a required validator, the given value must be an instance of `Date`. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -SchemaDate.prototype.checkRequired = function(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value); -}; - -/** - * Sets a minimum date validator. - * - * ####Example: - * - * var s = new Schema({ d: { type: Date, min: Date('1970-01-01') }) - * var M = db.model('M', s) - * var m = new M({ d: Date('1969-12-31') }) - * m.save(function (err) { - * console.error(err) // validator error - * m.d = Date('2014-12-08'); - * m.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MIN} token which will be replaced with the invalid value - * var min = [Date('1970-01-01'), 'The value of path `{PATH}` ({VALUE}) is beneath the limit ({MIN}).']; - * var schema = new Schema({ d: { type: Date, min: min }) - * var M = mongoose.model('M', schema); - * var s= new M({ d: Date('1969-12-31') }); - * s.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `d` (1969-12-31) is before the limit (1970-01-01). - * }) - * - * @param {Date} value minimum date - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaDate.prototype.min = function(value, message) { - if (this.minValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.minValidator; - }, this); - } - - if (value) { - let msg = message || MongooseError.messages.Date.min; - msg = msg.replace(/{MIN}/, (value === Date.now ? 'Date.now()' : this.cast(value).toString())); - const _this = this; - this.validators.push({ - validator: this.minValidator = function(val) { - const min = (value === Date.now ? value() : _this.cast(value)); - return val === null || val.valueOf() >= min.valueOf(); - }, - message: msg, - type: 'min', - min: value - }); - } - - return this; -}; - -/** - * Sets a maximum date validator. - * - * ####Example: - * - * var s = new Schema({ d: { type: Date, max: Date('2014-01-01') }) - * var M = db.model('M', s) - * var m = new M({ d: Date('2014-12-08') }) - * m.save(function (err) { - * console.error(err) // validator error - * m.d = Date('2013-12-31'); - * m.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MAX} token which will be replaced with the invalid value - * var max = [Date('2014-01-01'), 'The value of path `{PATH}` ({VALUE}) exceeds the limit ({MAX}).']; - * var schema = new Schema({ d: { type: Date, max: max }) - * var M = mongoose.model('M', schema); - * var s= new M({ d: Date('2014-12-08') }); - * s.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `d` (2014-12-08) exceeds the limit (2014-01-01). - * }) - * - * @param {Date} maximum date - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaDate.prototype.max = function(value, message) { - if (this.maxValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.maxValidator; - }, this); - } - - if (value) { - let msg = message || MongooseError.messages.Date.max; - msg = msg.replace(/{MAX}/, (value === Date.now ? 'Date.now()' : this.cast(value).toString())); - const _this = this; - this.validators.push({ - validator: this.maxValidator = function(val) { - const max = (value === Date.now ? value() : _this.cast(value)); - return val === null || val.valueOf() <= max.valueOf(); - }, - message: msg, - type: 'max', - max: value - }); - } - - return this; -}; - -/** - * Casts to date - * - * @param {Object} value to cast - * @api private - */ - -SchemaDate.prototype.cast = function(value) { - const _castDate = this.constructor.cast(); - try { - return _castDate(value); - } catch (error) { - throw new CastError('date', value, this.path); - } -}; - -/*! - * Date Query casting. - * - * @api private - */ - -function handleSingle(val) { - return this.cast(val); -} - -SchemaDate.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle - }); - - -/** - * Casts contents for queries. - * - * @param {String} $conditional - * @param {any} [value] - * @api private - */ - -SchemaDate.prototype.castForQuery = function($conditional, val) { - if (arguments.length !== 2) { - return this._castForQuery($conditional); - } - - const handler = this.$conditionalHandlers[$conditional]; - - if (!handler) { - throw new Error('Can\'t use ' + $conditional + ' with Date.'); - } - - return handler.call(this, val); -}; - -/*! - * Module exports. - */ - -module.exports = SchemaDate; diff --git a/node_modules/mongoose/lib/schema/decimal128.js b/node_modules/mongoose/lib/schema/decimal128.js deleted file mode 100644 index 0338905..0000000 --- a/node_modules/mongoose/lib/schema/decimal128.js +++ /dev/null @@ -1,201 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const SchemaType = require('../schematype'); -const CastError = SchemaType.CastError; -const Decimal128Type = require('../types/decimal128'); -const castDecimal128 = require('../cast/decimal128'); -const utils = require('../utils'); - -let Document; - -/** - * Decimal128 SchemaType constructor. - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function Decimal128(key, options) { - SchemaType.call(this, key, options, 'Decimal128'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -Decimal128.schemaName = 'Decimal128'; - -/*! - * Inherits from SchemaType. - */ -Decimal128.prototype = Object.create(SchemaType.prototype); -Decimal128.prototype.constructor = Decimal128; - -/*! - * ignore - */ - -Decimal128._cast = castDecimal128; - -/** - * Get/set the function used to cast arbitrary values to decimals. - * - * ####Example: - * - * // Make Mongoose only refuse to cast numbers as decimal128 - * const original = mongoose.Schema.Types.Decimal128.cast(); - * mongoose.Decimal128.cast(v => { - * assert.ok(typeof v !== 'number'); - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.Decimal128.cast(false); - * - * @param {Function} [caster] - * @return {Function} - * @function get - * @static - * @api public - */ - -Decimal128.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (v != null && !(v instanceof Decimal128Type)) { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/*! - * ignore - */ - -Decimal128._checkRequired = v => v instanceof Decimal128Type; - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -Decimal128.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -Decimal128.prototype.checkRequired = function checkRequired(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value); -}; - -/** - * Casts to Decimal128 - * - * @param {Object} value - * @param {Object} doc - * @param {Boolean} init whether this is an initialization cast - * @api private - */ - -Decimal128.prototype.cast = function(value, doc, init) { - if (SchemaType._isRef(this, value, doc, init)) { - // wait! we may need to cast this to a document - - if (value === null || value === undefined) { - return value; - } - - // lazy load - Document || (Document = require('./../document')); - - if (value instanceof Document) { - value.$__.wasPopulated = true; - return value; - } - - // setting a populated path - if (value instanceof Decimal128Type) { - return value; - } else if (Buffer.isBuffer(value) || !utils.isObject(value)) { - throw new CastError('Decimal128', value, this.path); - } - - // Handle the case where user directly sets a populated - // path to a plain object; cast to the Model used in - // the population query. - const path = doc.$__fullPath(this.path); - const owner = doc.ownerDocument ? doc.ownerDocument() : doc; - const pop = owner.populated(path, true); - let ret = value; - if (!doc.$__.populated || - !doc.$__.populated[path] || - !doc.$__.populated[path].options || - !doc.$__.populated[path].options.options || - !doc.$__.populated[path].options.options.lean) { - ret = new pop.options.model(value); - ret.$__.wasPopulated = true; - } - - return ret; - } - - const _castDecimal128 = this.constructor.cast(); - try { - return _castDecimal128(value); - } catch (error) { - throw new CastError('Decimal128', value, this.path); - } -}; - -/*! - * ignore - */ - -function handleSingle(val) { - return this.cast(val); -} - -Decimal128.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle - }); - -/*! - * Module exports. - */ - -module.exports = Decimal128; diff --git a/node_modules/mongoose/lib/schema/embedded.js b/node_modules/mongoose/lib/schema/embedded.js deleted file mode 100644 index ab08fd8..0000000 --- a/node_modules/mongoose/lib/schema/embedded.js +++ /dev/null @@ -1,320 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const CastError = require('../error/cast'); -const EventEmitter = require('events').EventEmitter; -const ObjectExpectedError = require('../error/objectExpected'); -const SchemaType = require('../schematype'); -const $exists = require('./operators/exists'); -const castToNumber = require('./operators/helpers').castToNumber; -const discriminator = require('../helpers/model/discriminator'); -const geospatial = require('./operators/geospatial'); -const get = require('../helpers/get'); -const getDiscriminatorByValue = require('../queryhelpers').getDiscriminatorByValue; -const internalToObjectOptions = require('../options').internalToObjectOptions; - -let Subdocument; - -module.exports = Embedded; - -/** - * Sub-schema schematype constructor - * - * @param {Schema} schema - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function Embedded(schema, path, options) { - this.caster = _createConstructor(schema); - this.caster.path = path; - this.caster.prototype.$basePath = path; - this.schema = schema; - this.$isSingleNested = true; - SchemaType.call(this, path, options, 'Embedded'); -} - -/*! - * ignore - */ - -Embedded.prototype = Object.create(SchemaType.prototype); - -/*! - * ignore - */ - -function _createConstructor(schema) { - // lazy load - Subdocument || (Subdocument = require('../types/subdocument')); - - const _embedded = function SingleNested(value, path, parent) { - const _this = this; - - this.$parent = parent; - Subdocument.apply(this, arguments); - - this.$session(this.ownerDocument().$session()); - - if (parent) { - parent.on('save', function() { - _this.emit('save', _this); - _this.constructor.emit('save', _this); - }); - - parent.on('isNew', function(val) { - _this.isNew = val; - _this.emit('isNew', val); - _this.constructor.emit('isNew', val); - }); - } - }; - _embedded.prototype = Object.create(Subdocument.prototype); - _embedded.prototype.$__setSchema(schema); - _embedded.prototype.constructor = _embedded; - _embedded.schema = schema; - _embedded.$isSingleNested = true; - _embedded.events = new EventEmitter(); - _embedded.prototype.toBSON = function() { - return this.toObject(internalToObjectOptions); - }; - - // apply methods - for (const i in schema.methods) { - _embedded.prototype[i] = schema.methods[i]; - } - - // apply statics - for (const i in schema.statics) { - _embedded[i] = schema.statics[i]; - } - - for (const i in EventEmitter.prototype) { - _embedded[i] = EventEmitter.prototype[i]; - } - - return _embedded; -} - -/*! - * Special case for when users use a common location schema to represent - * locations for use with $geoWithin. - * https://docs.mongodb.org/manual/reference/operator/query/geoWithin/ - * - * @param {Object} val - * @api private - */ - -Embedded.prototype.$conditionalHandlers.$geoWithin = function handle$geoWithin(val) { - return { $geometry: this.castForQuery(val.$geometry) }; -}; - -/*! - * ignore - */ - -Embedded.prototype.$conditionalHandlers.$near = -Embedded.prototype.$conditionalHandlers.$nearSphere = geospatial.cast$near; - -Embedded.prototype.$conditionalHandlers.$within = -Embedded.prototype.$conditionalHandlers.$geoWithin = geospatial.cast$within; - -Embedded.prototype.$conditionalHandlers.$geoIntersects = - geospatial.cast$geoIntersects; - -Embedded.prototype.$conditionalHandlers.$minDistance = castToNumber; -Embedded.prototype.$conditionalHandlers.$maxDistance = castToNumber; - -Embedded.prototype.$conditionalHandlers.$exists = $exists; - -/** - * Casts contents - * - * @param {Object} value - * @api private - */ - -Embedded.prototype.cast = function(val, doc, init, priorVal) { - if (val && val.$isSingleNested) { - return val; - } - - if (val != null && (typeof val !== 'object' || Array.isArray(val))) { - throw new ObjectExpectedError(this.path, val); - } - - let Constructor = this.caster; - const discriminatorKey = Constructor.schema.options.discriminatorKey; - if (val != null && - Constructor.discriminators && - typeof val[discriminatorKey] === 'string') { - if (Constructor.discriminators[val[discriminatorKey]]) { - Constructor = Constructor.discriminators[val[discriminatorKey]]; - } else { - const constructorByValue = getDiscriminatorByValue(Constructor, val[discriminatorKey]); - if (constructorByValue) { - Constructor = constructorByValue; - } - } - } - - let subdoc; - - // Only pull relevant selected paths and pull out the base path - const parentSelected = get(doc, '$__.selected', {}); - const path = this.path; - const selected = Object.keys(parentSelected).reduce((obj, key) => { - if (key.startsWith(path + '.')) { - obj[key.substr(path.length + 1)] = parentSelected[key]; - } - return obj; - }, {}); - - if (init) { - subdoc = new Constructor(void 0, selected, doc); - subdoc.init(val); - } else { - if (Object.keys(val).length === 0) { - return new Constructor({}, selected, doc); - } - - return new Constructor(val, selected, doc, undefined, { priorDoc: priorVal }); - } - - return subdoc; -}; - -/** - * Casts contents for query - * - * @param {string} [$conditional] optional query operator (like `$eq` or `$in`) - * @param {any} value - * @api private - */ - -Embedded.prototype.castForQuery = function($conditional, val) { - let handler; - if (arguments.length === 2) { - handler = this.$conditionalHandlers[$conditional]; - if (!handler) { - throw new Error('Can\'t use ' + $conditional); - } - return handler.call(this, val); - } - val = $conditional; - if (val == null) { - return val; - } - - if (this.options.runSetters) { - val = this._applySetters(val); - } - - let Constructor = this.caster; - const discriminatorKey = Constructor.schema.options.discriminatorKey; - if (val != null && - Constructor.discriminators && - typeof val[discriminatorKey] === 'string') { - if (Constructor.discriminators[val[discriminatorKey]]) { - Constructor = Constructor.discriminators[val[discriminatorKey]]; - } else { - const constructorByValue = getDiscriminatorByValue(Constructor, val[discriminatorKey]); - if (constructorByValue) { - Constructor = constructorByValue; - } - } - } - - try { - val = new Constructor(val); - } catch (error) { - // Make sure we always wrap in a CastError (gh-6803) - if (!(error instanceof CastError)) { - throw new CastError('Embedded', val, this.path, error); - } - throw error; - } - return val; -}; - -/** - * Async validation on this single nested doc. - * - * @api private - */ - -Embedded.prototype.doValidate = function(value, fn, scope, options) { - let Constructor = this.caster; - const discriminatorKey = Constructor.schema.options.discriminatorKey; - if (value != null && - Constructor.discriminators && - typeof value[discriminatorKey] === 'string') { - if (Constructor.discriminators[value[discriminatorKey]]) { - Constructor = Constructor.discriminators[value[discriminatorKey]]; - } else { - const constructorByValue = getDiscriminatorByValue(Constructor, value[discriminatorKey]); - if (constructorByValue) { - Constructor = constructorByValue; - } - } - } - - if (options && options.skipSchemaValidators) { - if (!(value instanceof Constructor)) { - value = new Constructor(value, null, scope); - } - - return value.validate(fn); - } - - SchemaType.prototype.doValidate.call(this, value, function(error) { - if (error) { - return fn(error); - } - if (!value) { - return fn(null); - } - - value.validate(fn); - }, scope); -}; - -/** - * Synchronously validate this single nested doc - * - * @api private - */ - -Embedded.prototype.doValidateSync = function(value, scope, options) { - if (!options || !options.skipSchemaValidators) { - const schemaTypeError = SchemaType.prototype.doValidateSync.call(this, value, scope); - if (schemaTypeError) { - return schemaTypeError; - } - } - if (!value) { - return; - } - return value.validateSync(); -}; - -/** - * Adds a discriminator to this property - * - * @param {String} name - * @param {Schema} schema fields to add to the schema for instances of this sub-class - * @api public - */ - -Embedded.prototype.discriminator = function(name, schema) { - discriminator(this.caster, name, schema); - - this.caster.discriminators[name] = _createConstructor(schema); - - return this.caster.discriminators[name]; -}; diff --git a/node_modules/mongoose/lib/schema/index.js b/node_modules/mongoose/lib/schema/index.js deleted file mode 100644 index 183a6e9..0000000 --- a/node_modules/mongoose/lib/schema/index.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Module exports. - */ - -'use strict'; - -exports.String = require('./string'); - -exports.Number = require('./number'); - -exports.Boolean = require('./boolean'); - -exports.DocumentArray = require('./documentarray'); - -exports.Embedded = require('./embedded'); - -exports.Array = require('./array'); - -exports.Buffer = require('./buffer'); - -exports.Date = require('./date'); - -exports.ObjectId = require('./objectid'); - -exports.Mixed = require('./mixed'); - -exports.Decimal128 = exports.Decimal = require('./decimal128'); - -exports.Map = require('./map'); - -// alias - -exports.Oid = exports.ObjectId; -exports.Object = exports.Mixed; -exports.Bool = exports.Boolean; diff --git a/node_modules/mongoose/lib/schema/map.js b/node_modules/mongoose/lib/schema/map.js deleted file mode 100644 index f50ac4d..0000000 --- a/node_modules/mongoose/lib/schema/map.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -const MongooseMap = require('../types/map'); -const SchemaType = require('../schematype'); - -/*! - * ignore - */ - -class Map extends SchemaType { - constructor(key, options) { - super(key, options, 'Map'); - this.$isSchemaMap = true; - } - - cast(val, doc, init) { - if (val instanceof MongooseMap) { - return val; - } - - if (init) { - const map = new MongooseMap({}, this.path, doc, this.$__schemaType); - - for (const key of Object.keys(val)) { - map.$init(key, this.$__schemaType.cast(val[key], doc, true)); - } - - return map; - } - - return new MongooseMap(val, this.path, doc, this.$__schemaType); - } -} - -module.exports = Map; diff --git a/node_modules/mongoose/lib/schema/mixed.js b/node_modules/mongoose/lib/schema/mixed.js deleted file mode 100644 index 672cc51..0000000 --- a/node_modules/mongoose/lib/schema/mixed.js +++ /dev/null @@ -1,105 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const SchemaType = require('../schematype'); -const symbols = require('./symbols'); -const utils = require('../utils'); - -/** - * Mixed SchemaType constructor. - * - * @param {String} path - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function Mixed(path, options) { - if (options && options.default) { - const def = options.default; - if (Array.isArray(def) && def.length === 0) { - // make sure empty array defaults are handled - options.default = Array; - } else if (!options.shared && utils.isObject(def) && Object.keys(def).length === 0) { - // prevent odd "shared" objects between documents - options.default = function() { - return {}; - }; - } - } - - SchemaType.call(this, path, options, 'Mixed'); - - this[symbols.schemaMixedSymbol] = true; -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -Mixed.schemaName = 'Mixed'; - -/*! - * Inherits from SchemaType. - */ -Mixed.prototype = Object.create(SchemaType.prototype); -Mixed.prototype.constructor = Mixed; - -/** - * Attaches a getter for all Mixed paths. - * - * ####Example: - * - * // Hide the 'hidden' path - * mongoose.Schema.Mixed.get(v => Object.assign({}, v, { hidden: null })); - * - * const Model = mongoose.model('Test', new Schema({ test: {} })); - * new Model({ test: { hidden: 'Secret!' } }).test.hidden; // null - * - * @param {Function} getter - * @return {this} - * @function get - * @static - * @api public - */ - -Mixed.get = SchemaType.get; - -/** - * Casts `val` for Mixed. - * - * _this is a no-op_ - * - * @param {Object} value to cast - * @api private - */ - -Mixed.prototype.cast = function(val) { - return val; -}; - -/** - * Casts contents for queries. - * - * @param {String} $cond - * @param {any} [val] - * @api private - */ - -Mixed.prototype.castForQuery = function($cond, val) { - if (arguments.length === 2) { - return val; - } - return $cond; -}; - -/*! - * Module exports. - */ - -module.exports = Mixed; diff --git a/node_modules/mongoose/lib/schema/number.js b/node_modules/mongoose/lib/schema/number.js deleted file mode 100644 index 49dc631..0000000 --- a/node_modules/mongoose/lib/schema/number.js +++ /dev/null @@ -1,361 +0,0 @@ -'use strict'; - -/*! - * Module requirements. - */ - -const MongooseError = require('../error'); -const SchemaType = require('../schematype'); -const castNumber = require('../cast/number'); -const handleBitwiseOperator = require('./operators/bitwise'); -const utils = require('../utils'); - -const CastError = SchemaType.CastError; -let Document; - -/** - * Number SchemaType constructor. - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function SchemaNumber(key, options) { - SchemaType.call(this, key, options, 'Number'); -} - -/** - * Attaches a getter for all Number instances. - * - * ####Example: - * - * // Make all numbers round down - * mongoose.Number.get(function(v) { return Math.floor(v); }); - * - * const Model = mongoose.model('Test', new Schema({ test: Number })); - * new Model({ test: 3.14 }).test; // 3 - * - * @param {Function} getter - * @return {this} - * @function get - * @static - * @api public - */ - -SchemaNumber.get = SchemaType.get; - -/*! - * ignore - */ - -SchemaNumber._cast = castNumber; - -/** - * Get/set the function used to cast arbitrary values to numbers. - * - * ####Example: - * - * // Make Mongoose cast empty strings '' to 0 for paths declared as numbers - * const original = mongoose.Number.cast(); - * mongoose.Number.cast(v => { - * if (v === '') { return 0; } - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.Number.cast(false); - * - * @param {Function} caster - * @return {Function} - * @function get - * @static - * @api public - */ - -SchemaNumber.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (typeof v !== 'number') { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -SchemaNumber.schemaName = 'Number'; - -/*! - * Inherits from SchemaType. - */ -SchemaNumber.prototype = Object.create(SchemaType.prototype); -SchemaNumber.prototype.constructor = SchemaNumber; - -/*! - * ignore - */ - -SchemaNumber._checkRequired = v => typeof v === 'number' || v instanceof Number; - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -SchemaNumber.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -SchemaNumber.prototype.checkRequired = function checkRequired(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value); -}; - -/** - * Sets a minimum number validator. - * - * ####Example: - * - * var s = new Schema({ n: { type: Number, min: 10 }) - * var M = db.model('M', s) - * var m = new M({ n: 9 }) - * m.save(function (err) { - * console.error(err) // validator error - * m.n = 10; - * m.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MIN} token which will be replaced with the invalid value - * var min = [10, 'The value of path `{PATH}` ({VALUE}) is beneath the limit ({MIN}).']; - * var schema = new Schema({ n: { type: Number, min: min }) - * var M = mongoose.model('Measurement', schema); - * var s= new M({ n: 4 }); - * s.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `n` (4) is beneath the limit (10). - * }) - * - * @param {Number} value minimum number - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaNumber.prototype.min = function(value, message) { - if (this.minValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.minValidator; - }, this); - } - - if (value !== null && value !== undefined) { - let msg = message || MongooseError.messages.Number.min; - msg = msg.replace(/{MIN}/, value); - this.validators.push({ - validator: this.minValidator = function(v) { - return v == null || v >= value; - }, - message: msg, - type: 'min', - min: value - }); - } - - return this; -}; - -/** - * Sets a maximum number validator. - * - * ####Example: - * - * var s = new Schema({ n: { type: Number, max: 10 }) - * var M = db.model('M', s) - * var m = new M({ n: 11 }) - * m.save(function (err) { - * console.error(err) // validator error - * m.n = 10; - * m.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MAX} token which will be replaced with the invalid value - * var max = [10, 'The value of path `{PATH}` ({VALUE}) exceeds the limit ({MAX}).']; - * var schema = new Schema({ n: { type: Number, max: max }) - * var M = mongoose.model('Measurement', schema); - * var s= new M({ n: 4 }); - * s.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `n` (4) exceeds the limit (10). - * }) - * - * @param {Number} maximum number - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaNumber.prototype.max = function(value, message) { - if (this.maxValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.maxValidator; - }, this); - } - - if (value !== null && value !== undefined) { - let msg = message || MongooseError.messages.Number.max; - msg = msg.replace(/{MAX}/, value); - this.validators.push({ - validator: this.maxValidator = function(v) { - return v == null || v <= value; - }, - message: msg, - type: 'max', - max: value - }); - } - - return this; -}; - -/** - * Casts to number - * - * @param {Object} value value to cast - * @param {Document} doc document that triggers the casting - * @param {Boolean} init - * @api private - */ - -SchemaNumber.prototype.cast = function(value, doc, init) { - if (SchemaType._isRef(this, value, doc, init)) { - // wait! we may need to cast this to a document - - if (value === null || value === undefined) { - return value; - } - - // lazy load - Document || (Document = require('./../document')); - - if (value instanceof Document) { - value.$__.wasPopulated = true; - return value; - } - - // setting a populated path - if (typeof value === 'number') { - return value; - } else if (Buffer.isBuffer(value) || !utils.isObject(value)) { - throw new CastError('number', value, this.path); - } - - // Handle the case where user directly sets a populated - // path to a plain object; cast to the Model used in - // the population query. - const path = doc.$__fullPath(this.path); - const owner = doc.ownerDocument ? doc.ownerDocument() : doc; - const pop = owner.populated(path, true); - const ret = new pop.options.model(value); - ret.$__.wasPopulated = true; - return ret; - } - - const val = value && typeof value._id !== 'undefined' ? - value._id : // documents - value; - - try { - return this.constructor.cast()(val); - } catch (err) { - throw new CastError('number', val, this.path); - } -}; - -/*! - * ignore - */ - -function handleSingle(val) { - return this.cast(val); -} - -function handleArray(val) { - const _this = this; - if (!Array.isArray(val)) { - return [this.cast(val)]; - } - return val.map(function(m) { - return _this.cast(m); - }); -} - -SchemaNumber.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $bitsAllClear: handleBitwiseOperator, - $bitsAnyClear: handleBitwiseOperator, - $bitsAllSet: handleBitwiseOperator, - $bitsAnySet: handleBitwiseOperator, - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle, - $mod: handleArray - }); - -/** - * Casts contents for queries. - * - * @param {String} $conditional - * @param {any} [value] - * @api private - */ - -SchemaNumber.prototype.castForQuery = function($conditional, val) { - let handler; - if (arguments.length === 2) { - handler = this.$conditionalHandlers[$conditional]; - if (!handler) { - throw new CastError('Can\'t use ' + $conditional + ' with Number.'); - } - return handler.call(this, val); - } - val = this._castForQuery($conditional); - return val; -}; - -/*! - * Module exports. - */ - -module.exports = SchemaNumber; diff --git a/node_modules/mongoose/lib/schema/objectid.js b/node_modules/mongoose/lib/schema/objectid.js deleted file mode 100644 index efe1eee..0000000 --- a/node_modules/mongoose/lib/schema/objectid.js +++ /dev/null @@ -1,282 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const castObjectId = require('../cast/objectid'); -const SchemaType = require('../schematype'); -const oid = require('../types/objectid'); -const utils = require('../utils'); - -const CastError = SchemaType.CastError; -let Document; - -/** - * ObjectId SchemaType constructor. - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function ObjectId(key, options) { - const isKeyHexStr = typeof key === 'string' && key.length === 24 && /^[a-f0-9]+$/i.test(key); - const suppressWarning = options && options.suppressWarning; - if ((isKeyHexStr || typeof key === 'undefined') && !suppressWarning) { - console.warn('mongoose: To create a new ObjectId please try ' + - '`Mongoose.Types.ObjectId` instead of using ' + - '`Mongoose.Schema.ObjectId`. Set the `suppressWarning` option if ' + - 'you\'re trying to create a hex char path in your schema.'); - console.trace(); - } - SchemaType.call(this, key, options, 'ObjectID'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -ObjectId.schemaName = 'ObjectId'; - -/*! - * Inherits from SchemaType. - */ -ObjectId.prototype = Object.create(SchemaType.prototype); -ObjectId.prototype.constructor = ObjectId; - -/** - * Attaches a getter for all ObjectId instances - * - * ####Example: - * - * // Always convert to string when getting an ObjectId - * mongoose.ObjectId.get(v => v.toString()); - * - * const Model = mongoose.model('Test', new Schema({})); - * typeof (new Model({})._id); // 'string' - * - * @param {Function} getter - * @return {this} - * @function get - * @static - * @api public - */ - -ObjectId.get = SchemaType.get; - -/** - * Adds an auto-generated ObjectId default if turnOn is true. - * @param {Boolean} turnOn auto generated ObjectId defaults - * @api public - * @return {SchemaType} this - */ - -ObjectId.prototype.auto = function(turnOn) { - if (turnOn) { - this.default(defaultId); - this.set(resetId); - } - - return this; -}; - -/*! - * ignore - */ - -ObjectId._checkRequired = v => v instanceof oid; - -/*! - * ignore - */ - -ObjectId._cast = castObjectId; - -/** - * Get/set the function used to cast arbitrary values to objectids. - * - * ####Example: - * - * // Make Mongoose only try to cast length 24 strings. By default, any 12 - * // char string is a valid ObjectId. - * const original = mongoose.ObjectId.cast(); - * mongoose.ObjectId.cast(v => { - * assert.ok(typeof v !== 'string' || v.length === 24); - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.ObjectId.cast(false); - * - * @param {Function} caster - * @return {Function} - * @function get - * @static - * @api public - */ - -ObjectId.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (!(v instanceof oid)) { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * ####Example: - * - * // Allow empty strings to pass `required` check - * mongoose.Schema.Types.String.checkRequired(v => v != null); - * - * const M = mongoose.model({ str: { type: String, required: true } }); - * new M({ str: '' }).validateSync(); // `null`, validation passes! - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -ObjectId.checkRequired = SchemaType.checkRequired; - -/** - * Check if the given value satisfies a required validator. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -ObjectId.prototype.checkRequired = function checkRequired(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value); -}; - -/** - * Casts to ObjectId - * - * @param {Object} value - * @param {Object} doc - * @param {Boolean} init whether this is an initialization cast - * @api private - */ - -ObjectId.prototype.cast = function(value, doc, init) { - if (SchemaType._isRef(this, value, doc, init)) { - // wait! we may need to cast this to a document - - if (value === null || value === undefined) { - return value; - } - - // lazy load - Document || (Document = require('./../document')); - - if (value instanceof Document) { - value.$__.wasPopulated = true; - return value; - } - - // setting a populated path - if (value instanceof oid) { - return value; - } else if ((value.constructor.name || '').toLowerCase() === 'objectid') { - return new oid(value.toHexString()); - } else if (Buffer.isBuffer(value) || !utils.isObject(value)) { - throw new CastError('ObjectId', value, this.path); - } - - // Handle the case where user directly sets a populated - // path to a plain object; cast to the Model used in - // the population query. - const path = doc.$__fullPath(this.path); - const owner = doc.ownerDocument ? doc.ownerDocument() : doc; - const pop = owner.populated(path, true); - let ret = value; - if (!doc.$__.populated || - !doc.$__.populated[path] || - !doc.$__.populated[path].options || - !doc.$__.populated[path].options.options || - !doc.$__.populated[path].options.options.lean) { - ret = new pop.options.model(value); - ret.$__.wasPopulated = true; - } - - return ret; - } - - try { - return this.constructor.cast()(value); - } catch (error) { - throw new CastError('ObjectId', value, this.path); - } -}; - -/*! - * ignore - */ - -function handleSingle(val) { - return this.cast(val); -} - -ObjectId.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle - }); - -/*! - * ignore - */ - -function defaultId() { - return new oid(); -} - -defaultId.$runBeforeSetters = true; - -function resetId(v) { - Document || (Document = require('./../document')); - - if (this instanceof Document) { - if (v === void 0) { - const _v = new oid; - this.$__._id = _v; - return _v; - } - - this.$__._id = v; - } - - return v; -} - -/*! - * Module exports. - */ - -module.exports = ObjectId; diff --git a/node_modules/mongoose/lib/schema/operators/bitwise.js b/node_modules/mongoose/lib/schema/operators/bitwise.js deleted file mode 100644 index 07e18cd..0000000 --- a/node_modules/mongoose/lib/schema/operators/bitwise.js +++ /dev/null @@ -1,38 +0,0 @@ -/*! - * Module requirements. - */ - -'use strict'; - -const CastError = require('../../error/cast'); - -/*! - * ignore - */ - -function handleBitwiseOperator(val) { - const _this = this; - if (Array.isArray(val)) { - return val.map(function(v) { - return _castNumber(_this.path, v); - }); - } else if (Buffer.isBuffer(val)) { - return val; - } - // Assume trying to cast to number - return _castNumber(_this.path, val); -} - -/*! - * ignore - */ - -function _castNumber(path, num) { - const v = Number(num); - if (isNaN(v)) { - throw new CastError('number', num, path); - } - return v; -} - -module.exports = handleBitwiseOperator; diff --git a/node_modules/mongoose/lib/schema/operators/exists.js b/node_modules/mongoose/lib/schema/operators/exists.js deleted file mode 100644 index 916b4cb..0000000 --- a/node_modules/mongoose/lib/schema/operators/exists.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -const castBoolean = require('../../cast/boolean'); - -/*! - * ignore - */ - -module.exports = function(val) { - const path = this != null ? this.path : null; - return castBoolean(val, path); -}; diff --git a/node_modules/mongoose/lib/schema/operators/geospatial.js b/node_modules/mongoose/lib/schema/operators/geospatial.js deleted file mode 100644 index 73e38f8..0000000 --- a/node_modules/mongoose/lib/schema/operators/geospatial.js +++ /dev/null @@ -1,102 +0,0 @@ -/*! - * Module requirements. - */ - -'use strict'; - -const castArraysOfNumbers = require('./helpers').castArraysOfNumbers; -const castToNumber = require('./helpers').castToNumber; - -/*! - * ignore - */ - -exports.cast$geoIntersects = cast$geoIntersects; -exports.cast$near = cast$near; -exports.cast$within = cast$within; - -function cast$near(val) { - const SchemaArray = require('../array'); - - if (Array.isArray(val)) { - castArraysOfNumbers(val, this); - return val; - } - - _castMinMaxDistance(this, val); - - if (val && val.$geometry) { - return cast$geometry(val, this); - } - - return SchemaArray.prototype.castForQuery.call(this, val); -} - -function cast$geometry(val, self) { - switch (val.$geometry.type) { - case 'Polygon': - case 'LineString': - case 'Point': - castArraysOfNumbers(val.$geometry.coordinates, self); - break; - default: - // ignore unknowns - break; - } - - _castMinMaxDistance(self, val); - - return val; -} - -function cast$within(val) { - _castMinMaxDistance(this, val); - - if (val.$box || val.$polygon) { - const type = val.$box ? '$box' : '$polygon'; - val[type].forEach(arr => { - if (!Array.isArray(arr)) { - const msg = 'Invalid $within $box argument. ' - + 'Expected an array, received ' + arr; - throw new TypeError(msg); - } - arr.forEach((v, i) => { - arr[i] = castToNumber.call(this, v); - }); - }); - } else if (val.$center || val.$centerSphere) { - const type = val.$center ? '$center' : '$centerSphere'; - val[type].forEach((item, i) => { - if (Array.isArray(item)) { - item.forEach((v, j) => { - item[j] = castToNumber.call(this, v); - }); - } else { - val[type][i] = castToNumber.call(this, item); - } - }); - } else if (val.$geometry) { - cast$geometry(val, this); - } - - return val; -} - -function cast$geoIntersects(val) { - const geo = val.$geometry; - if (!geo) { - return; - } - - cast$geometry(val, this); - return val; -} - -function _castMinMaxDistance(self, val) { - if (val.$maxDistance) { - val.$maxDistance = castToNumber.call(self, val.$maxDistance); - } - if (val.$minDistance) { - val.$minDistance = castToNumber.call(self, val.$minDistance); - } -} diff --git a/node_modules/mongoose/lib/schema/operators/helpers.js b/node_modules/mongoose/lib/schema/operators/helpers.js deleted file mode 100644 index a17951c..0000000 --- a/node_modules/mongoose/lib/schema/operators/helpers.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -/*! - * Module requirements. - */ - -const SchemaNumber = require('../number'); - -/*! - * @ignore - */ - -exports.castToNumber = castToNumber; -exports.castArraysOfNumbers = castArraysOfNumbers; - -/*! - * @ignore - */ - -function castToNumber(val) { - return SchemaNumber.cast()(val); -} - -function castArraysOfNumbers(arr, self) { - arr.forEach(function(v, i) { - if (Array.isArray(v)) { - castArraysOfNumbers(v, self); - } else { - arr[i] = castToNumber.call(self, v); - } - }); -} diff --git a/node_modules/mongoose/lib/schema/operators/text.js b/node_modules/mongoose/lib/schema/operators/text.js deleted file mode 100644 index 4b95916..0000000 --- a/node_modules/mongoose/lib/schema/operators/text.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const CastError = require('../../error/cast'); -const castBoolean = require('../../cast/boolean'); -const castString = require('../../cast/string'); - -/*! - * Casts val to an object suitable for `$text`. Throws an error if the object - * can't be casted. - * - * @param {Any} val value to cast - * @param {String} [path] path to associate with any errors that occured - * @return {Object} casted object - * @see https://docs.mongodb.com/manual/reference/operator/query/text/ - * @api private - */ - -module.exports = function(val, path) { - if (val == null || typeof val !== 'object') { - throw new CastError('$text', val, path); - } - - if (val.$search != null) { - val.$search = castString(val.$search, path + '.$search'); - } - if (val.$language != null) { - val.$language = castString(val.$language, path + '.$language'); - } - if (val.$caseSensitive != null) { - val.$caseSensitive = castBoolean(val.$caseSensitive, - path + '.$castSensitive'); - } - if (val.$diacriticSensitive != null) { - val.$diacriticSensitive = castBoolean(val.$diacriticSensitive, - path + '.$diacriticSensitive'); - } - - return val; -}; diff --git a/node_modules/mongoose/lib/schema/operators/type.js b/node_modules/mongoose/lib/schema/operators/type.js deleted file mode 100644 index c8e391a..0000000 --- a/node_modules/mongoose/lib/schema/operators/type.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -/*! - * ignore - */ - -module.exports = function(val) { - if (typeof val !== 'number' && typeof val !== 'string') { - throw new Error('$type parameter must be number or string'); - } - - return val; -}; diff --git a/node_modules/mongoose/lib/schema/string.js b/node_modules/mongoose/lib/schema/string.js deleted file mode 100644 index b93e824..0000000 --- a/node_modules/mongoose/lib/schema/string.js +++ /dev/null @@ -1,604 +0,0 @@ -'use strict'; - -/*! - * Module dependencies. - */ - -const SchemaType = require('../schematype'); -const CastError = SchemaType.CastError; -const MongooseError = require('../error'); -const castString = require('../cast/string'); -const utils = require('../utils'); - -let Document; - -/** - * String SchemaType constructor. - * - * @param {String} key - * @param {Object} options - * @inherits SchemaType - * @api public - */ - -function SchemaString(key, options) { - this.enumValues = []; - this.regExp = null; - SchemaType.call(this, key, options, 'String'); -} - -/** - * This schema type's name, to defend against minifiers that mangle - * function names. - * - * @api public - */ -SchemaString.schemaName = 'String'; - -/*! - * Inherits from SchemaType. - */ -SchemaString.prototype = Object.create(SchemaType.prototype); -SchemaString.prototype.constructor = SchemaString; - -/*! - * ignore - */ - -SchemaString._cast = castString; - -/** - * Get/set the function used to cast arbitrary values to strings. - * - * ####Example: - * - * // Throw an error if you pass in an object. Normally, Mongoose allows - * // objects with custom `toString()` functions. - * const original = mongoose.Schema.Types.String.cast(); - * mongoose.Schema.Types.String.cast(v => { - * assert.ok(v == null || typeof v !== 'object'); - * return original(v); - * }); - * - * // Or disable casting entirely - * mongoose.Schema.Types.String.cast(false); - * - * @param {Function} caster - * @return {Function} - * @function get - * @static - * @api public - */ - -SchemaString.cast = function cast(caster) { - if (arguments.length === 0) { - return this._cast; - } - if (caster === false) { - caster = v => { - if (v != null && typeof v !== 'string') { - throw new Error(); - } - return v; - }; - } - this._cast = caster; - - return this._cast; -}; - -/** - * Attaches a getter for all String instances. - * - * ####Example: - * - * // Make all numbers round down - * mongoose.Schema.String.get(v => v.toLowerCase()); - * - * const Model = mongoose.model('Test', new Schema({ test: String })); - * new Model({ test: 'FOO' }).test; // 'foo' - * - * @param {Function} getter - * @return {this} - * @function get - * @static - * @api public - */ - -SchemaString.get = SchemaType.get; - -/*! - * ignore - */ - -SchemaString._checkRequired = v => (v instanceof String || typeof v === 'string') && v.length; - -/** - * Override the function the required validator uses to check whether a string - * passes the `required` check. - * - * ####Example: - * - * // Allow empty strings to pass `required` check - * mongoose.Schema.Types.String.checkRequired(v => v != null); - * - * const M = mongoose.model({ str: { type: String, required: true } }); - * new M({ str: '' }).validateSync(); // `null`, validation passes! - * - * @param {Function} fn - * @return {Function} - * @function checkRequired - * @static - * @api public - */ - -SchemaString.checkRequired = SchemaType.checkRequired; - -/** - * Adds an enum validator - * - * ####Example: - * - * var states = ['opening', 'open', 'closing', 'closed'] - * var s = new Schema({ state: { type: String, enum: states }}) - * var M = db.model('M', s) - * var m = new M({ state: 'invalid' }) - * m.save(function (err) { - * console.error(String(err)) // ValidationError: `invalid` is not a valid enum value for path `state`. - * m.state = 'open' - * m.save(callback) // success - * }) - * - * // or with custom error messages - * var enum = { - * values: ['opening', 'open', 'closing', 'closed'], - * message: 'enum validator failed for path `{PATH}` with value `{VALUE}`' - * } - * var s = new Schema({ state: { type: String, enum: enum }) - * var M = db.model('M', s) - * var m = new M({ state: 'invalid' }) - * m.save(function (err) { - * console.error(String(err)) // ValidationError: enum validator failed for path `state` with value `invalid` - * m.state = 'open' - * m.save(callback) // success - * }) - * - * @param {String|Object} [args...] enumeration values - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaString.prototype.enum = function() { - if (this.enumValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.enumValidator; - }, this); - this.enumValidator = false; - } - - if (arguments[0] === void 0 || arguments[0] === false) { - return this; - } - - let values; - let errorMessage; - - if (utils.isObject(arguments[0])) { - values = arguments[0].values; - errorMessage = arguments[0].message; - } else { - values = arguments; - errorMessage = MongooseError.messages.String.enum; - } - - for (let i = 0; i < values.length; i++) { - if (undefined !== values[i]) { - this.enumValues.push(this.cast(values[i])); - } - } - - const vals = this.enumValues; - this.enumValidator = function(v) { - return undefined === v || ~vals.indexOf(v); - }; - this.validators.push({ - validator: this.enumValidator, - message: errorMessage, - type: 'enum', - enumValues: vals - }); - - return this; -}; - -/** - * Adds a lowercase [setter](http://mongoosejs.com/docs/api.html#schematype_SchemaType-set). - * - * ####Example: - * - * var s = new Schema({ email: { type: String, lowercase: true }}) - * var M = db.model('M', s); - * var m = new M({ email: 'SomeEmail@example.COM' }); - * console.log(m.email) // someemail@example.com - * M.find({ email: 'SomeEmail@example.com' }); // Queries by 'someemail@example.com' - * - * @api public - * @return {SchemaType} this - */ - -SchemaString.prototype.lowercase = function(shouldApply) { - if (arguments.length > 0 && !shouldApply) { - return this; - } - return this.set(function(v, self) { - if (typeof v !== 'string') { - v = self.cast(v); - } - if (v) { - return v.toLowerCase(); - } - return v; - }); -}; - -/** - * Adds an uppercase [setter](http://mongoosejs.com/docs/api.html#schematype_SchemaType-set). - * - * ####Example: - * - * var s = new Schema({ caps: { type: String, uppercase: true }}) - * var M = db.model('M', s); - * var m = new M({ caps: 'an example' }); - * console.log(m.caps) // AN EXAMPLE - * M.find({ caps: 'an example' }) // Matches documents where caps = 'AN EXAMPLE' - * - * @api public - * @return {SchemaType} this - */ - -SchemaString.prototype.uppercase = function(shouldApply) { - if (arguments.length > 0 && !shouldApply) { - return this; - } - return this.set(function(v, self) { - if (typeof v !== 'string') { - v = self.cast(v); - } - if (v) { - return v.toUpperCase(); - } - return v; - }); -}; - -/** - * Adds a trim [setter](http://mongoosejs.com/docs/api.html#schematype_SchemaType-set). - * - * The string value will be trimmed when set. - * - * ####Example: - * - * var s = new Schema({ name: { type: String, trim: true }}) - * var M = db.model('M', s) - * var string = ' some name ' - * console.log(string.length) // 11 - * var m = new M({ name: string }) - * console.log(m.name.length) // 9 - * - * @api public - * @return {SchemaType} this - */ - -SchemaString.prototype.trim = function(shouldTrim) { - if (arguments.length > 0 && !shouldTrim) { - return this; - } - return this.set(function(v, self) { - if (typeof v !== 'string') { - v = self.cast(v); - } - if (v) { - return v.trim(); - } - return v; - }); -}; - -/** - * Sets a minimum length validator. - * - * ####Example: - * - * var schema = new Schema({ postalCode: { type: String, minlength: 5 }) - * var Address = db.model('Address', schema) - * var address = new Address({ postalCode: '9512' }) - * address.save(function (err) { - * console.error(err) // validator error - * address.postalCode = '95125'; - * address.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MINLENGTH} token which will be replaced with the minimum allowed length - * var minlength = [5, 'The value of path `{PATH}` (`{VALUE}`) is shorter than the minimum allowed length ({MINLENGTH}).']; - * var schema = new Schema({ postalCode: { type: String, minlength: minlength }) - * var Address = mongoose.model('Address', schema); - * var address = new Address({ postalCode: '9512' }); - * address.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `postalCode` (`9512`) is shorter than the minimum length (5). - * }) - * - * @param {Number} value minimum string length - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaString.prototype.minlength = function(value, message) { - if (this.minlengthValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.minlengthValidator; - }, this); - } - - if (value !== null && value !== undefined) { - let msg = message || MongooseError.messages.String.minlength; - msg = msg.replace(/{MINLENGTH}/, value); - this.validators.push({ - validator: this.minlengthValidator = function(v) { - return v === null || v.length >= value; - }, - message: msg, - type: 'minlength', - minlength: value - }); - } - - return this; -}; - -/** - * Sets a maximum length validator. - * - * ####Example: - * - * var schema = new Schema({ postalCode: { type: String, maxlength: 9 }) - * var Address = db.model('Address', schema) - * var address = new Address({ postalCode: '9512512345' }) - * address.save(function (err) { - * console.error(err) // validator error - * address.postalCode = '95125'; - * address.save() // success - * }) - * - * // custom error messages - * // We can also use the special {MAXLENGTH} token which will be replaced with the maximum allowed length - * var maxlength = [9, 'The value of path `{PATH}` (`{VALUE}`) exceeds the maximum allowed length ({MAXLENGTH}).']; - * var schema = new Schema({ postalCode: { type: String, maxlength: maxlength }) - * var Address = mongoose.model('Address', schema); - * var address = new Address({ postalCode: '9512512345' }); - * address.validate(function (err) { - * console.log(String(err)) // ValidationError: The value of path `postalCode` (`9512512345`) exceeds the maximum allowed length (9). - * }) - * - * @param {Number} value maximum string length - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaString.prototype.maxlength = function(value, message) { - if (this.maxlengthValidator) { - this.validators = this.validators.filter(function(v) { - return v.validator !== this.maxlengthValidator; - }, this); - } - - if (value !== null && value !== undefined) { - let msg = message || MongooseError.messages.String.maxlength; - msg = msg.replace(/{MAXLENGTH}/, value); - this.validators.push({ - validator: this.maxlengthValidator = function(v) { - return v === null || v.length <= value; - }, - message: msg, - type: 'maxlength', - maxlength: value - }); - } - - return this; -}; - -/** - * Sets a regexp validator. - * - * Any value that does not pass `regExp`.test(val) will fail validation. - * - * ####Example: - * - * var s = new Schema({ name: { type: String, match: /^a/ }}) - * var M = db.model('M', s) - * var m = new M({ name: 'I am invalid' }) - * m.validate(function (err) { - * console.error(String(err)) // "ValidationError: Path `name` is invalid (I am invalid)." - * m.name = 'apples' - * m.validate(function (err) { - * assert.ok(err) // success - * }) - * }) - * - * // using a custom error message - * var match = [ /\.html$/, "That file doesn't end in .html ({VALUE})" ]; - * var s = new Schema({ file: { type: String, match: match }}) - * var M = db.model('M', s); - * var m = new M({ file: 'invalid' }); - * m.validate(function (err) { - * console.log(String(err)) // "ValidationError: That file doesn't end in .html (invalid)" - * }) - * - * Empty strings, `undefined`, and `null` values always pass the match validator. If you require these values, enable the `required` validator also. - * - * var s = new Schema({ name: { type: String, match: /^a/, required: true }}) - * - * @param {RegExp} regExp regular expression to test against - * @param {String} [message] optional custom error message - * @return {SchemaType} this - * @see Customized Error Messages #error_messages_MongooseError-messages - * @api public - */ - -SchemaString.prototype.match = function match(regExp, message) { - // yes, we allow multiple match validators - - const msg = message || MongooseError.messages.String.match; - - const matchValidator = function(v) { - if (!regExp) { - return false; - } - - const ret = ((v != null && v !== '') - ? regExp.test(v) - : true); - return ret; - }; - - this.validators.push({ - validator: matchValidator, - message: msg, - type: 'regexp', - regexp: regExp - }); - return this; -}; - -/** - * Check if the given value satisfies the `required` validator. The value is - * considered valid if it is a string (that is, not `null` or `undefined`) and - * has positive length. The `required` validator **will** fail for empty - * strings. - * - * @param {Any} value - * @param {Document} doc - * @return {Boolean} - * @api public - */ - -SchemaString.prototype.checkRequired = function checkRequired(value, doc) { - if (SchemaType._isRef(this, value, doc, true)) { - return !!value; - } - return this.constructor._checkRequired(value, doc); -}; - -/** - * Casts to String - * - * @api private - */ - -SchemaString.prototype.cast = function(value, doc, init) { - if (SchemaType._isRef(this, value, doc, init)) { - // wait! we may need to cast this to a document - - if (value === null || value === undefined) { - return value; - } - - // lazy load - Document || (Document = require('./../document')); - - if (value instanceof Document) { - value.$__.wasPopulated = true; - return value; - } - - // setting a populated path - if (typeof value === 'string') { - return value; - } else if (Buffer.isBuffer(value) || !utils.isObject(value)) { - throw new CastError('string', value, this.path); - } - - // Handle the case where user directly sets a populated - // path to a plain object; cast to the Model used in - // the population query. - const path = doc.$__fullPath(this.path); - const owner = doc.ownerDocument ? doc.ownerDocument() : doc; - const pop = owner.populated(path, true); - const ret = new pop.options.model(value); - ret.$__.wasPopulated = true; - return ret; - } - - try { - return this.constructor.cast()(value); - } catch (error) { - throw new CastError('string', value, this.path); - } -}; - -/*! - * ignore - */ - -function handleSingle(val) { - return this.castForQuery(val); -} - -function handleArray(val) { - const _this = this; - if (!Array.isArray(val)) { - return [this.castForQuery(val)]; - } - return val.map(function(m) { - return _this.castForQuery(m); - }); -} - -SchemaString.prototype.$conditionalHandlers = - utils.options(SchemaType.prototype.$conditionalHandlers, { - $all: handleArray, - $gt: handleSingle, - $gte: handleSingle, - $lt: handleSingle, - $lte: handleSingle, - $options: handleSingle, - $regex: handleSingle, - $not: handleSingle - }); - -/** - * Casts contents for queries. - * - * @param {String} $conditional - * @param {any} [val] - * @api private - */ - -SchemaString.prototype.castForQuery = function($conditional, val) { - let handler; - if (arguments.length === 2) { - handler = this.$conditionalHandlers[$conditional]; - if (!handler) { - throw new Error('Can\'t use ' + $conditional + ' with String.'); - } - return handler.call(this, val); - } - val = $conditional; - if (Object.prototype.toString.call(val) === '[object RegExp]') { - return val; - } - - return this._castForQuery(val); -}; - -/*! - * Module exports. - */ - -module.exports = SchemaString; diff --git a/node_modules/mongoose/lib/schema/symbols.js b/node_modules/mongoose/lib/schema/symbols.js deleted file mode 100644 index 7ae0e9e..0000000 --- a/node_modules/mongoose/lib/schema/symbols.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -exports.schemaMixedSymbol = Symbol.for('mongoose:schema_mixed'); - -exports.builtInMiddleware = Symbol.for('mongoose:built-in-middleware'); diff --git a/node_modules/mongoose/lib/statemachine.js b/node_modules/mongoose/lib/statemachine.js deleted file mode 100644 index 7e36dc1..0000000 --- a/node_modules/mongoose/lib/statemachine.js +++ /dev/null @@ -1,180 +0,0 @@ - -/*! - * Module dependencies. - */ - -'use strict'; - -const utils = require('./utils'); - -/*! - * StateMachine represents a minimal `interface` for the - * constructors it builds via StateMachine.ctor(...). - * - * @api private - */ - -const StateMachine = module.exports = exports = function StateMachine() { -}; - -/*! - * StateMachine.ctor('state1', 'state2', ...) - * A factory method for subclassing StateMachine. - * The arguments are a list of states. For each state, - * the constructor's prototype gets state transition - * methods named after each state. These transition methods - * place their path argument into the given state. - * - * @param {String} state - * @param {String} [state] - * @return {Function} subclass constructor - * @private - */ - -StateMachine.ctor = function() { - const states = utils.args(arguments); - - const ctor = function() { - StateMachine.apply(this, arguments); - this.paths = {}; - this.states = {}; - this.stateNames = states; - - let i = states.length, - state; - - while (i--) { - state = states[i]; - this.states[state] = {}; - } - }; - - ctor.prototype = new StateMachine(); - - states.forEach(function(state) { - // Changes the `path`'s state to `state`. - ctor.prototype[state] = function(path) { - this._changeState(path, state); - }; - }); - - return ctor; -}; - -/*! - * This function is wrapped by the state change functions: - * - * - `require(path)` - * - `modify(path)` - * - `init(path)` - * - * @api private - */ - -StateMachine.prototype._changeState = function _changeState(path, nextState) { - const prevBucket = this.states[this.paths[path]]; - if (prevBucket) delete prevBucket[path]; - - this.paths[path] = nextState; - this.states[nextState][path] = true; -}; - -/*! - * ignore - */ - -StateMachine.prototype.clear = function clear(state) { - const keys = Object.keys(this.states[state]); - let i = keys.length; - let path; - - while (i--) { - path = keys[i]; - delete this.states[state][path]; - delete this.paths[path]; - } -}; - -/*! - * Checks to see if at least one path is in the states passed in via `arguments` - * e.g., this.some('required', 'inited') - * - * @param {String} state that we want to check for. - * @private - */ - -StateMachine.prototype.some = function some() { - const _this = this; - const what = arguments.length ? arguments : this.stateNames; - return Array.prototype.some.call(what, function(state) { - return Object.keys(_this.states[state]).length; - }); -}; - -/*! - * This function builds the functions that get assigned to `forEach` and `map`, - * since both of those methods share a lot of the same logic. - * - * @param {String} iterMethod is either 'forEach' or 'map' - * @return {Function} - * @api private - */ - -StateMachine.prototype._iter = function _iter(iterMethod) { - return function() { - const numArgs = arguments.length; - let states = utils.args(arguments, 0, numArgs - 1); - const callback = arguments[numArgs - 1]; - - if (!states.length) states = this.stateNames; - - const _this = this; - - const paths = states.reduce(function(paths, state) { - return paths.concat(Object.keys(_this.states[state])); - }, []); - - return paths[iterMethod](function(path, i, paths) { - return callback(path, i, paths); - }); - }; -}; - -/*! - * Iterates over the paths that belong to one of the parameter states. - * - * The function profile can look like: - * this.forEach(state1, fn); // iterates over all paths in state1 - * this.forEach(state1, state2, fn); // iterates over all paths in state1 or state2 - * this.forEach(fn); // iterates over all paths in all states - * - * @param {String} [state] - * @param {String} [state] - * @param {Function} callback - * @private - */ - -StateMachine.prototype.forEach = function forEach() { - this.forEach = this._iter('forEach'); - return this.forEach.apply(this, arguments); -}; - -/*! - * Maps over the paths that belong to one of the parameter states. - * - * The function profile can look like: - * this.forEach(state1, fn); // iterates over all paths in state1 - * this.forEach(state1, state2, fn); // iterates over all paths in state1 or state2 - * this.forEach(fn); // iterates over all paths in all states - * - * @param {String} [state] - * @param {String} [state] - * @param {Function} callback - * @return {Array} - * @private - */ - -StateMachine.prototype.map = function map() { - this.map = this._iter('map'); - return this.map.apply(this, arguments); -}; diff --git a/node_modules/mongoose/lib/types/array.js b/node_modules/mongoose/lib/types/array.js deleted file mode 100644 index 26f03a5..0000000 --- a/node_modules/mongoose/lib/types/array.js +++ /dev/null @@ -1,848 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const EmbeddedDocument = require('./embedded'); -const Document = require('../document'); -const ObjectId = require('./objectid'); -const cleanModifiedSubpaths = require('../helpers/document/cleanModifiedSubpaths'); -const get = require('../helpers/get'); -const internalToObjectOptions = require('../options').internalToObjectOptions; -const utils = require('../utils'); -const util = require('util'); - -const isMongooseObject = utils.isMongooseObject; - -/** - * Mongoose Array constructor. - * - * ####NOTE: - * - * _Values always have to be passed to the constructor to initialize, otherwise `MongooseArray#push` will mark the array as modified._ - * - * @param {Array} values - * @param {String} path - * @param {Document} doc parent document - * @api private - * @inherits Array - * @see http://bit.ly/f6CnZU - */ - -function MongooseArray(values, path, doc) { - const arr = [].concat(values); - - const keysMA = Object.keys(MongooseArray.mixin); - const numKeys = keysMA.length; - for (let i = 0; i < numKeys; ++i) { - arr[keysMA[i]] = MongooseArray.mixin[keysMA[i]]; - } - - arr._path = path; - arr.isMongooseArray = true; - arr.validators = []; - arr._atomics = {}; - arr._schema = void 0; - if (util.inspect.custom) { - arr[util.inspect.custom] = arr.inspect; - } - - // Because doc comes from the context of another function, doc === global - // can happen if there was a null somewhere up the chain (see #3020) - // RB Jun 17, 2015 updated to check for presence of expected paths instead - // to make more proof against unusual node environments - if (doc && doc instanceof Document) { - arr._parent = doc; - arr._schema = doc.schema.path(path); - } - - return arr; -} - -MongooseArray.mixin = { - /*! - * ignore - */ - toBSON: function() { - return this.toObject(internalToObjectOptions); - }, - - /** - * Stores a queue of atomic operations to perform - * - * @property _atomics - * @api private - */ - - _atomics: undefined, - - /** - * Parent owner document - * - * @property _parent - * @api private - * @memberOf MongooseArray - */ - - _parent: undefined, - - /** - * Casts a member based on this arrays schema. - * - * @param {any} value - * @return value the casted value - * @method _cast - * @api private - * @memberOf MongooseArray - */ - - _cast: function(value) { - let populated = false; - let Model; - - if (this._parent) { - populated = this._parent.populated(this._path, true); - } - - if (populated && value !== null && value !== undefined) { - // cast to the populated Models schema - Model = populated.options.model || populated.options.Model; - - // only objects are permitted so we can safely assume that - // non-objects are to be interpreted as _id - if (Buffer.isBuffer(value) || - value instanceof ObjectId || !utils.isObject(value)) { - value = {_id: value}; - } - - // gh-2399 - // we should cast model only when it's not a discriminator - const isDisc = value.schema && value.schema.discriminatorMapping && - value.schema.discriminatorMapping.key !== undefined; - if (!isDisc) { - value = new Model(value); - } - return this._schema.caster.applySetters(value, this._parent, true); - } - - return this._schema.caster.applySetters(value, this._parent, false); - }, - - /** - * Marks this array as modified. - * - * If it bubbles up from an embedded document change, then it takes the following arguments (otherwise, takes 0 arguments) - * - * @param {EmbeddedDocument} embeddedDoc the embedded doc that invoked this method on the Array - * @param {String} embeddedPath the path which changed in the embeddedDoc - * @method _markModified - * @api private - * @memberOf MongooseArray - */ - - _markModified: function(elem, embeddedPath) { - const parent = this._parent; - let dirtyPath; - - if (parent) { - dirtyPath = this._path; - - if (arguments.length) { - if (embeddedPath != null) { - // an embedded doc bubbled up the change - dirtyPath = dirtyPath + '.' + this.indexOf(elem) + '.' + embeddedPath; - } else { - // directly set an index - dirtyPath = dirtyPath + '.' + elem; - } - } - - parent.markModified(dirtyPath, arguments.length > 0 ? elem : parent); - } - - return this; - }, - - /** - * Register an atomic operation with the parent. - * - * @param {Array} op operation - * @param {any} val - * @method _registerAtomic - * @api private - * @memberOf MongooseArray - */ - - _registerAtomic: function(op, val) { - if (op === '$set') { - // $set takes precedence over all other ops. - // mark entire array modified. - this._atomics = {$set: val}; - return this; - } - - const atomics = this._atomics; - - // reset pop/shift after save - if (op === '$pop' && !('$pop' in atomics)) { - const _this = this; - this._parent.once('save', function() { - _this._popped = _this._shifted = null; - }); - } - - // check for impossible $atomic combos (Mongo denies more than one - // $atomic op on a single path - if (this._atomics.$set || - Object.keys(atomics).length && !(op in atomics)) { - // a different op was previously registered. - // save the entire thing. - this._atomics = {$set: this}; - return this; - } - - let selector; - - if (op === '$pullAll' || op === '$addToSet') { - atomics[op] || (atomics[op] = []); - atomics[op] = atomics[op].concat(val); - } else if (op === '$pullDocs') { - const pullOp = atomics['$pull'] || (atomics['$pull'] = {}); - if (val[0] instanceof EmbeddedDocument) { - selector = pullOp['$or'] || (pullOp['$or'] = []); - Array.prototype.push.apply(selector, val.map(function(v) { - return v.toObject({transform: false, virtuals: false}); - })); - } else { - selector = pullOp['_id'] || (pullOp['_id'] = {$in: []}); - selector['$in'] = selector['$in'].concat(val); - } - } else if (op === '$push') { - atomics.$push = atomics.$push || { $each: [] }; - atomics.$push.$each = atomics.$push.$each.concat(val); - } else { - atomics[op] = val; - } - - return this; - }, - - /** - * Depopulates stored atomic operation values as necessary for direct insertion to MongoDB. - * - * If no atomics exist, we return all array values after conversion. - * - * @return {Array} - * @method $__getAtomics - * @memberOf MongooseArray - * @instance - * @api private - */ - - $__getAtomics: function() { - const ret = []; - const keys = Object.keys(this._atomics); - let i = keys.length; - - const opts = Object.assign({}, internalToObjectOptions, { _isNested: true }); - - if (i === 0) { - ret[0] = ['$set', this.toObject(opts)]; - return ret; - } - - while (i--) { - const op = keys[i]; - let val = this._atomics[op]; - - // the atomic values which are arrays are not MongooseArrays. we - // need to convert their elements as if they were MongooseArrays - // to handle populated arrays versus DocumentArrays properly. - if (isMongooseObject(val)) { - val = val.toObject(opts); - } else if (Array.isArray(val)) { - val = this.toObject.call(val, opts); - } else if (val != null && Array.isArray(val.$each)) { - val.$each = this.toObject.call(val.$each, opts); - } else if (val.valueOf) { - val = val.valueOf(); - } - - if (op === '$addToSet') { - val = {$each: val}; - } - - ret.push([op, val]); - } - - return ret; - }, - - /** - * Returns the number of pending atomic operations to send to the db for this array. - * - * @api private - * @return {Number} - * @method hasAtomics - * @memberOf MongooseArray - */ - - hasAtomics: function hasAtomics() { - if (!(this._atomics && this._atomics.constructor.name === 'Object')) { - return 0; - } - - return Object.keys(this._atomics).length; - }, - - /** - * Internal helper for .map() - * - * @api private - * @return {Number} - * @method _mapCast - * @memberOf MongooseArray - */ - _mapCast: function(val, index) { - return this._cast(val, this.length + index); - }, - - /** - * Wraps [`Array#push`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push) with proper change tracking. - * - * @param {Object} [args...] - * @api public - * @method push - * @memberOf MongooseArray - */ - - push: function() { - _checkManualPopulation(this, arguments); - let values = [].map.call(arguments, this._mapCast, this); - values = this._schema.applySetters(values, this._parent, undefined, - undefined, { skipDocumentArrayCast: true }); - const ret = [].push.apply(this, values); - - this._registerAtomic('$push', values); - this._markModified(); - return ret; - }, - - /** - * Pushes items to the array non-atomically. - * - * ####NOTE: - * - * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @param {any} [args...] - * @api public - * @method nonAtomicPush - * @memberOf MongooseArray - */ - - nonAtomicPush: function() { - const values = [].map.call(arguments, this._mapCast, this); - const ret = [].push.apply(this, values); - this._registerAtomic('$set', this); - this._markModified(); - return ret; - }, - - /** - * Pops the array atomically at most one time per document `save()`. - * - * #### NOTE: - * - * _Calling this mulitple times on an array before saving sends the same command as calling it once._ - * _This update is implemented using the MongoDB [$pop](http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop) method which enforces this restriction._ - * - * doc.array = [1,2,3]; - * - * var popped = doc.array.$pop(); - * console.log(popped); // 3 - * console.log(doc.array); // [1,2] - * - * // no affect - * popped = doc.array.$pop(); - * console.log(doc.array); // [1,2] - * - * doc.save(function (err) { - * if (err) return handleError(err); - * - * // we saved, now $pop works again - * popped = doc.array.$pop(); - * console.log(popped); // 2 - * console.log(doc.array); // [1] - * }) - * - * @api public - * @method $pop - * @memberOf MongooseArray - * @instance - * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop - * @method $pop - * @memberOf MongooseArray - */ - - $pop: function() { - this._registerAtomic('$pop', 1); - this._markModified(); - - // only allow popping once - if (this._popped) { - return; - } - this._popped = true; - - return [].pop.call(this); - }, - - /** - * Wraps [`Array#pop`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/pop) with proper change tracking. - * - * ####Note: - * - * _marks the entire array as modified which will pass the entire thing to $set potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @see MongooseArray#$pop #types_array_MongooseArray-%24pop - * @api public - * @method pop - * @memberOf MongooseArray - */ - - pop: function() { - const ret = [].pop.call(this); - this._registerAtomic('$set', this); - this._markModified(); - return ret; - }, - - /** - * Atomically shifts the array at most one time per document `save()`. - * - * ####NOTE: - * - * _Calling this mulitple times on an array before saving sends the same command as calling it once._ - * _This update is implemented using the MongoDB [$pop](http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop) method which enforces this restriction._ - * - * doc.array = [1,2,3]; - * - * var shifted = doc.array.$shift(); - * console.log(shifted); // 1 - * console.log(doc.array); // [2,3] - * - * // no affect - * shifted = doc.array.$shift(); - * console.log(doc.array); // [2,3] - * - * doc.save(function (err) { - * if (err) return handleError(err); - * - * // we saved, now $shift works again - * shifted = doc.array.$shift(); - * console.log(shifted ); // 2 - * console.log(doc.array); // [3] - * }) - * - * @api public - * @memberOf MongooseArray - * @instance - * @method $shift - * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pop - */ - - $shift: function $shift() { - this._registerAtomic('$pop', -1); - this._markModified(); - - // only allow shifting once - if (this._shifted) { - return; - } - this._shifted = true; - - return [].shift.call(this); - }, - - /** - * Wraps [`Array#shift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking. - * - * ####Example: - * - * doc.array = [2,3]; - * var res = doc.array.shift(); - * console.log(res) // 2 - * console.log(doc.array) // [3] - * - * ####Note: - * - * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @api public - * @method shift - * @memberOf MongooseArray - */ - - shift: function() { - const ret = [].shift.call(this); - this._registerAtomic('$set', this); - this._markModified(); - return ret; - }, - - /** - * Pulls items from the array atomically. Equality is determined by casting - * the provided value to an embedded document and comparing using - * [the `Document.equals()` function.](./api.html#document_Document-equals) - * - * ####Examples: - * - * doc.array.pull(ObjectId) - * doc.array.pull({ _id: 'someId' }) - * doc.array.pull(36) - * doc.array.pull('tag 1', 'tag 2') - * - * To remove a document from a subdocument array we may pass an object with a matching `_id`. - * - * doc.subdocs.push({ _id: 4815162342 }) - * doc.subdocs.pull({ _id: 4815162342 }) // removed - * - * Or we may passing the _id directly and let mongoose take care of it. - * - * doc.subdocs.push({ _id: 4815162342 }) - * doc.subdocs.pull(4815162342); // works - * - * The first pull call will result in a atomic operation on the database, if pull is called repeatedly without saving the document, a $set operation is used on the complete array instead, overwriting possible changes that happened on the database in the meantime. - * - * @param {any} [args...] - * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pull - * @api public - * @method pull - * @memberOf MongooseArray - */ - - pull: function() { - const values = [].map.call(arguments, this._cast, this); - const cur = this._parent.get(this._path); - let i = cur.length; - let mem; - - while (i--) { - mem = cur[i]; - if (mem instanceof Document) { - const some = values.some(function(v) { - return mem.equals(v); - }); - if (some) { - [].splice.call(cur, i, 1); - } - } else if (~cur.indexOf.call(values, mem)) { - [].splice.call(cur, i, 1); - } - } - - if (values[0] instanceof EmbeddedDocument) { - this._registerAtomic('$pullDocs', values.map(function(v) { - return v._id || v; - })); - } else { - this._registerAtomic('$pullAll', values); - } - - this._markModified(); - - // Might have modified child paths and then pulled, like - // `doc.children[1].name = 'test';` followed by - // `doc.children.remove(doc.children[0]);`. In this case we fall back - // to a `$set` on the whole array. See #3511 - if (cleanModifiedSubpaths(this._parent, this._path) > 0) { - this._registerAtomic('$set', this); - } - - return this; - }, - - /** - * Wraps [`Array#splice`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice) with proper change tracking and casting. - * - * ####Note: - * - * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @api public - * @method splice - * @memberOf MongooseArray - */ - - splice: function splice() { - let ret; - - _checkManualPopulation(this, Array.prototype.slice.call(arguments, 2)); - - if (arguments.length) { - const vals = []; - for (let i = 0; i < arguments.length; ++i) { - vals[i] = i < 2 ? - arguments[i] : - this._cast(arguments[i], arguments[0] + (i - 2)); - } - ret = [].splice.apply(this, vals); - this._registerAtomic('$set', this); - this._markModified(); - cleanModifiedSubpaths(this._parent, this._path); - } - - return ret; - }, - - /** - * Wraps [`Array#unshift`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/unshift) with proper change tracking. - * - * ####Note: - * - * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @api public - * @method unshift - * @memberOf MongooseArray - */ - - unshift: function() { - _checkManualPopulation(this, arguments); - - let values = [].map.call(arguments, this._cast, this); - values = this._schema.applySetters(values, this._parent); - [].unshift.apply(this, values); - this._registerAtomic('$set', this); - this._markModified(); - return this.length; - }, - - /** - * Wraps [`Array#sort`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort) with proper change tracking. - * - * ####NOTE: - * - * _marks the entire array as modified, which if saved, will store it as a `$set` operation, potentially overwritting any changes that happen between when you retrieved the object and when you save it._ - * - * @api public - * @method sort - * @memberOf MongooseArray - */ - - sort: function() { - const ret = [].sort.apply(this, arguments); - this._registerAtomic('$set', this); - this._markModified(); - return ret; - }, - - /** - * Adds values to the array if not already present. - * - * ####Example: - * - * console.log(doc.array) // [2,3,4] - * var added = doc.array.addToSet(4,5); - * console.log(doc.array) // [2,3,4,5] - * console.log(added) // [5] - * - * @param {any} [args...] - * @return {Array} the values that were added - * @memberOf MongooseArray - * @api public - * @method addToSet - */ - - addToSet: function addToSet() { - _checkManualPopulation(this, arguments); - - let values = [].map.call(arguments, this._mapCast, this); - values = this._schema.applySetters(values, this._parent); - const added = []; - let type = ''; - if (values[0] instanceof EmbeddedDocument) { - type = 'doc'; - } else if (values[0] instanceof Date) { - type = 'date'; - } - - values.forEach(function(v) { - let found; - const val = +v; - switch (type) { - case 'doc': - found = this.some(function(doc) { - return doc.equals(v); - }); - break; - case 'date': - found = this.some(function(d) { - return +d === val; - }); - break; - default: - found = ~this.indexOf(v); - } - - if (!found) { - [].push.call(this, v); - this._registerAtomic('$addToSet', v); - this._markModified(); - [].push.call(added, v); - } - }, this); - - return added; - }, - - /** - * Sets the casted `val` at index `i` and marks the array modified. - * - * ####Example: - * - * // given documents based on the following - * var Doc = mongoose.model('Doc', new Schema({ array: [Number] })); - * - * var doc = new Doc({ array: [2,3,4] }) - * - * console.log(doc.array) // [2,3,4] - * - * doc.array.set(1,"5"); - * console.log(doc.array); // [2,5,4] // properly cast to number - * doc.save() // the change is saved - * - * // VS not using array#set - * doc.array[1] = "5"; - * console.log(doc.array); // [2,"5",4] // no casting - * doc.save() // change is not saved - * - * @return {Array} this - * @api public - * @method set - * @memberOf MongooseArray - */ - - set: function set(i, val) { - const value = this._cast(val, i); - this[i] = value; - this._markModified(i); - return this; - }, - - /** - * Returns a native js Array. - * - * @param {Object} options - * @return {Array} - * @api public - * @method toObject - * @memberOf MongooseArray - */ - - toObject: function(options) { - if (options && options.depopulate) { - options = utils.clone(options); - options._isNested = true; - return this.map(function(doc) { - return doc instanceof Document - ? doc.toObject(options) - : doc; - }); - } - - return this.slice(); - }, - - /** - * Helper for console.log - * - * @api public - * @method inspect - * @memberOf MongooseArray - */ - - inspect: function() { - return JSON.stringify(this); - }, - - /** - * Return the index of `obj` or `-1` if not found. - * - * @param {Object} obj the item to look for - * @return {Number} - * @api public - * @method indexOf - * @memberOf MongooseArray - */ - - indexOf: function indexOf(obj) { - if (obj instanceof ObjectId) { - obj = obj.toString(); - } - for (let i = 0, len = this.length; i < len; ++i) { - if (obj == this[i]) { - return i; - } - } - return -1; - } -}; - -/** - * Alias of [pull](#types_array_MongooseArray-pull) - * - * @see MongooseArray#pull #types_array_MongooseArray-pull - * @see mongodb http://www.mongodb.org/display/DOCS/Updating/#Updating-%24pull - * @api public - * @memberOf MongooseArray - * @instance - * @method remove - */ - -MongooseArray.mixin.remove = MongooseArray.mixin.pull; - -/*! - * ignore - */ - -function _isAllSubdocs(docs, ref) { - if (!ref) { - return false; - } - for (let i = 0; i < docs.length; ++i) { - const arg = docs[i]; - if (arg == null) { - return false; - } - const model = arg.constructor; - if (!(arg instanceof Document) || - (model.modelName !== ref && model.baseModelName !== ref)) { - return false; - } - } - - return true; -} - -/*! - * ignore - */ - -function _checkManualPopulation(arr, docs) { - const ref = get(arr, '_schema.caster.options.ref', null); - if (arr.length === 0 && - docs.length > 0) { - if (_isAllSubdocs(docs, ref)) { - arr._parent.populated(arr._path, [], { model: docs[0].constructor }); - } - } -} - -/*! - * Module exports. - */ - -module.exports = exports = MongooseArray; diff --git a/node_modules/mongoose/lib/types/buffer.js b/node_modules/mongoose/lib/types/buffer.js deleted file mode 100644 index 98fcce0..0000000 --- a/node_modules/mongoose/lib/types/buffer.js +++ /dev/null @@ -1,305 +0,0 @@ -/*! - * Module dependencies. - */ - -'use strict'; - -const Binary = require('../driver').get().Binary; -const utils = require('../utils'); -const Buffer = require('safe-buffer').Buffer; - -// Yes this is weird. See https://github.com/feross/safe-buffer/pull/23 -const proto = Buffer.from('').constructor.prototype; - -/** - * Mongoose Buffer constructor. - * - * Values always have to be passed to the constructor to initialize. - * - * @param {Buffer} value - * @param {String} encode - * @param {Number} offset - * @api private - * @inherits Buffer - * @see http://bit.ly/f6CnZU - */ - -function MongooseBuffer(value, encode, offset) { - const length = arguments.length; - let val; - - if (length === 0 || arguments[0] === null || arguments[0] === undefined) { - val = 0; - } else { - val = value; - } - - let encoding; - let path; - let doc; - - if (Array.isArray(encode)) { - // internal casting - path = encode[0]; - doc = encode[1]; - } else { - encoding = encode; - } - - let buf; - if (typeof val === 'number' || val instanceof Number) { - buf = Buffer.alloc(val); - } else { // string, array or object { type: 'Buffer', data: [...] } - buf = Buffer.from(val, encoding, offset); - } - utils.decorate(buf, MongooseBuffer.mixin); - buf.isMongooseBuffer = true; - - // make sure these internal props don't show up in Object.keys() - Object.defineProperties(buf, { - validators: { - value: [], - enumerable: false - }, - _path: { - value: path, - enumerable: false - }, - _parent: { - value: doc, - enumerable: false - } - }); - - if (doc && typeof path === 'string') { - Object.defineProperty(buf, '_schema', { - value: doc.schema.path(path) - }); - } - - buf._subtype = 0; - return buf; -} - -/*! - * Inherit from Buffer. - */ - -// MongooseBuffer.prototype = Buffer.alloc(0); - -MongooseBuffer.mixin = { - - /** - * Parent owner document - * - * @api private - * @property _parent - * @receiver MongooseBuffer - */ - - _parent: undefined, - - /** - * Default subtype for the Binary representing this Buffer - * - * @api private - * @property _subtype - * @receiver MongooseBuffer - */ - - _subtype: undefined, - - /** - * Marks this buffer as modified. - * - * @api private - * @method _markModified - * @receiver MongooseBuffer - */ - - _markModified: function() { - const parent = this._parent; - - if (parent) { - parent.markModified(this._path); - } - return this; - }, - - /** - * Writes the buffer. - * - * @api public - * @method write - * @receiver MongooseBuffer - */ - - write: function() { - const written = proto.write.apply(this, arguments); - - if (written > 0) { - this._markModified(); - } - - return written; - }, - - /** - * Copies the buffer. - * - * ####Note: - * - * `Buffer#copy` does not mark `target` as modified so you must copy from a `MongooseBuffer` for it to work as expected. This is a work around since `copy` modifies the target, not this. - * - * @return {Number} The number of bytes copied. - * @param {Buffer} target - * @method copy - * @receiver MongooseBuffer - */ - - copy: function(target) { - const ret = proto.copy.apply(this, arguments); - - if (target && target.isMongooseBuffer) { - target._markModified(); - } - - return ret; - } -}; - -/*! - * Compile other Buffer methods marking this buffer as modified. - */ - -( -// node < 0.5 - ('writeUInt8 writeUInt16 writeUInt32 writeInt8 writeInt16 writeInt32 ' + - 'writeFloat writeDouble fill ' + - 'utf8Write binaryWrite asciiWrite set ' + - - // node >= 0.5 - 'writeUInt16LE writeUInt16BE writeUInt32LE writeUInt32BE ' + - 'writeInt16LE writeInt16BE writeInt32LE writeInt32BE ' + 'writeFloatLE writeFloatBE writeDoubleLE writeDoubleBE') -).split(' ').forEach(function(method) { - if (!proto[method]) { - return; - } - MongooseBuffer.mixin[method] = function() { - const ret = proto[method].apply(this, arguments); - this._markModified(); - return ret; - }; -}); - -/** - * Converts this buffer to its Binary type representation. - * - * ####SubTypes: - * - * var bson = require('bson') - * bson.BSON_BINARY_SUBTYPE_DEFAULT - * bson.BSON_BINARY_SUBTYPE_FUNCTION - * bson.BSON_BINARY_SUBTYPE_BYTE_ARRAY - * bson.BSON_BINARY_SUBTYPE_UUID - * bson.BSON_BINARY_SUBTYPE_MD5 - * bson.BSON_BINARY_SUBTYPE_USER_DEFINED - * - * doc.buffer.toObject(bson.BSON_BINARY_SUBTYPE_USER_DEFINED); - * - * @see http://bsonspec.org/#/specification - * @param {Hex} [subtype] - * @return {Binary} - * @api public - * @method toObject - * @receiver MongooseBuffer - */ - -MongooseBuffer.mixin.toObject = function(options) { - const subtype = typeof options === 'number' - ? options - : (this._subtype || 0); - return new Binary(this, subtype); -}; - -/** - * Converts this buffer for storage in MongoDB, including subtype - * - * @return {Binary} - * @api public - * @method toBSON - * @receiver MongooseBuffer - */ - -MongooseBuffer.mixin.toBSON = function() { - return new Binary(this, this._subtype || 0); -}; - -/** - * Determines if this buffer is equals to `other` buffer - * - * @param {Buffer} other - * @return {Boolean} - * @method equals - * @receiver MongooseBuffer - */ - -MongooseBuffer.mixin.equals = function(other) { - if (!Buffer.isBuffer(other)) { - return false; - } - - if (this.length !== other.length) { - return false; - } - - for (let i = 0; i < this.length; ++i) { - if (this[i] !== other[i]) { - return false; - } - } - - return true; -}; - -/** - * Sets the subtype option and marks the buffer modified. - * - * ####SubTypes: - * - * var bson = require('bson') - * bson.BSON_BINARY_SUBTYPE_DEFAULT - * bson.BSON_BINARY_SUBTYPE_FUNCTION - * bson.BSON_BINARY_SUBTYPE_BYTE_ARRAY - * bson.BSON_BINARY_SUBTYPE_UUID - * bson.BSON_BINARY_SUBTYPE_MD5 - * bson.BSON_BINARY_SUBTYPE_USER_DEFINED - * - * doc.buffer.subtype(bson.BSON_BINARY_SUBTYPE_UUID); - * - * @see http://bsonspec.org/#/specification - * @param {Hex} subtype - * @api public - * @method subtype - * @receiver MongooseBuffer - */ - -MongooseBuffer.mixin.subtype = function(subtype) { - if (typeof subtype !== 'number') { - throw new TypeError('Invalid subtype. Expected a number'); - } - - if (this._subtype !== subtype) { - this._markModified(); - } - - this._subtype = subtype; -}; - -/*! - * Module exports. - */ - -MongooseBuffer.Binary = Binary; - -module.exports = MongooseBuffer; diff --git a/node_modules/mongoose/lib/types/decimal128.js b/node_modules/mongoose/lib/types/decimal128.js deleted file mode 100644 index f0bae2a..0000000 --- a/node_modules/mongoose/lib/types/decimal128.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * ObjectId type constructor - * - * ####Example - * - * var id = new mongoose.Types.ObjectId; - * - * @constructor ObjectId - */ - -'use strict'; - -module.exports = require('../driver').get().Decimal128; diff --git a/node_modules/mongoose/lib/types/embedded.js b/node_modules/mongoose/lib/types/embedded.js deleted file mode 100644 index 1558c81..0000000 --- a/node_modules/mongoose/lib/types/embedded.js +++ /dev/null @@ -1,446 +0,0 @@ -/* eslint no-func-assign: 1 */ - -/*! - * Module dependencies. - */ - -'use strict'; - -const Document = require('../document_provider')(); -const EventEmitter = require('events').EventEmitter; -const immediate = require('../helpers/immediate'); -const internalToObjectOptions = require('../options').internalToObjectOptions; -const get = require('../helpers/get'); -const utils = require('../utils'); -const util = require('util'); - -const documentArrayParent = require('../helpers/symbols').documentArrayParent; -const validatorErrorSymbol = require('../helpers/symbols').validatorErrorSymbol; - -/** - * EmbeddedDocument constructor. - * - * @param {Object} obj js object returned from the db - * @param {MongooseDocumentArray} parentArr the parent array of this document - * @param {Boolean} skipId - * @inherits Document - * @api private - */ - -function EmbeddedDocument(obj, parentArr, skipId, fields, index) { - if (parentArr) { - this.__parentArray = parentArr; - this[documentArrayParent] = parentArr._parent; - } else { - this.__parentArray = undefined; - this[documentArrayParent] = undefined; - } - this.$setIndex(index); - this.$isDocumentArrayElement = true; - - Document.call(this, obj, fields, skipId); - - const _this = this; - this.on('isNew', function(val) { - _this.isNew = val; - }); - - _this.on('save', function() { - _this.constructor.emit('save', _this); - }); -} - -/*! - * Inherit from Document - */ -EmbeddedDocument.prototype = Object.create(Document.prototype); -EmbeddedDocument.prototype.constructor = EmbeddedDocument; - -for (const i in EventEmitter.prototype) { - EmbeddedDocument[i] = EventEmitter.prototype[i]; -} - -EmbeddedDocument.prototype.toBSON = function() { - return this.toObject(internalToObjectOptions); -}; - -/*! - * ignore - */ - -EmbeddedDocument.prototype.$setIndex = function(index) { - this.__index = index; - - if (get(this, '$__.validationError', null) != null) { - const keys = Object.keys(this.$__.validationError.errors); - for (const key of keys) { - this.invalidate(key, this.$__.validationError.errors[key]); - } - } -}; - -/** - * Marks the embedded doc modified. - * - * ####Example: - * - * var doc = blogpost.comments.id(hexstring); - * doc.mixed.type = 'changed'; - * doc.markModified('mixed.type'); - * - * @param {String} path the path which changed - * @api public - * @receiver EmbeddedDocument - */ - -EmbeddedDocument.prototype.markModified = function(path) { - this.$__.activePaths.modify(path); - if (!this.__parentArray) { - return; - } - - if (this.isNew) { - // Mark the WHOLE parent array as modified - // if this is a new document (i.e., we are initializing - // a document), - this.__parentArray._markModified(); - } else { - this.__parentArray._markModified(this, path); - } -}; - -/*! - * ignore - */ - -EmbeddedDocument.prototype.populate = function() { - throw new Error('Mongoose does not support calling populate() on nested ' + - 'docs. Instead of `doc.arr[0].populate("path")`, use ' + - '`doc.populate("arr.0.path")`'); -}; - -/** - * Used as a stub for [hooks.js](https://github.com/bnoguchi/hooks-js/tree/31ec571cef0332e21121ee7157e0cf9728572cc3) - * - * ####NOTE: - * - * _This is a no-op. Does not actually save the doc to the db._ - * - * @param {Function} [fn] - * @return {Promise} resolved Promise - * @api private - */ - -EmbeddedDocument.prototype.save = function(options, fn) { - if (typeof options === 'function') { - fn = options; - options = {}; - } - options = options || {}; - - if (!options.suppressWarning) { - console.warn('mongoose: calling `save()` on a subdoc does **not** save ' + - 'the document to MongoDB, it only runs save middleware. ' + - 'Use `subdoc.save({ suppressWarning: true })` to hide this warning ' + - 'if you\'re sure this behavior is right for your app.'); - } - - return utils.promiseOrCallback(fn, cb => { - this.$__save(cb); - }); -}; - -/** - * Used as a stub for middleware - * - * ####NOTE: - * - * _This is a no-op. Does not actually save the doc to the db._ - * - * @param {Function} [fn] - * @method $__save - * @api private - */ - -EmbeddedDocument.prototype.$__save = function(fn) { - return immediate(() => fn(null, this)); -}; - -/*! - * Registers remove event listeners for triggering - * on subdocuments. - * - * @param {EmbeddedDocument} sub - * @api private - */ - -function registerRemoveListener(sub) { - let owner = sub.ownerDocument(); - - function emitRemove() { - owner.removeListener('save', emitRemove); - owner.removeListener('remove', emitRemove); - sub.emit('remove', sub); - sub.constructor.emit('remove', sub); - owner = sub = null; - } - - owner.on('save', emitRemove); - owner.on('remove', emitRemove); -} - -/*! - * no-op for hooks - */ - -EmbeddedDocument.prototype.$__remove = function(cb) { - return cb(null, this); -}; - -/** - * Removes the subdocument from its parent array. - * - * @param {Object} [options] - * @param {Function} [fn] - * @api public - */ - -EmbeddedDocument.prototype.remove = function(options, fn) { - if ( typeof options === 'function' && !fn ) { - fn = options; - options = undefined; - } - if (!this.__parentArray || (options && options.noop)) { - fn && fn(null); - return this; - } - - let _id; - if (!this.willRemove) { - _id = this._doc._id; - if (!_id) { - throw new Error('For your own good, Mongoose does not know ' + - 'how to remove an EmbeddedDocument that has no _id'); - } - this.__parentArray.pull({_id: _id}); - this.willRemove = true; - registerRemoveListener(this); - } - - if (fn) { - fn(null); - } - - return this; -}; - -/** - * Override #update method of parent documents. - * @api private - */ - -EmbeddedDocument.prototype.update = function() { - throw new Error('The #update method is not available on EmbeddedDocuments'); -}; - -/** - * Helper for console.log - * - * @api public - */ - -EmbeddedDocument.prototype.inspect = function() { - return this.toObject({ - transform: false, - virtuals: false, - flattenDecimals: false - }); -}; - -if (util.inspect.custom) { - /*! - * Avoid Node deprecation warning DEP0079 - */ - - EmbeddedDocument.prototype[util.inspect.custom] = EmbeddedDocument.prototype.inspect; -} - -/** - * Marks a path as invalid, causing validation to fail. - * - * @param {String} path the field to invalidate - * @param {String|Error} err error which states the reason `path` was invalid - * @return {Boolean} - * @api public - */ - -EmbeddedDocument.prototype.invalidate = function(path, err, val) { - Document.prototype.invalidate.call(this, path, err, val); - - if (!this[documentArrayParent]) { - if (err[validatorErrorSymbol] || err.name === 'ValidationError') { - return true; - } - throw err; - } - - const index = this.__index; - if (typeof index !== 'undefined') { - const parentPath = this.__parentArray._path; - const fullPath = [parentPath, index, path].join('.'); - this[documentArrayParent].invalidate(fullPath, err, val); - } - - return true; -}; - -/** - * Marks a path as valid, removing existing validation errors. - * - * @param {String} path the field to mark as valid - * @api private - * @method $markValid - * @receiver EmbeddedDocument - */ - -EmbeddedDocument.prototype.$markValid = function(path) { - if (!this[documentArrayParent]) { - return; - } - - const index = this.__index; - if (typeof index !== 'undefined') { - const parentPath = this.__parentArray._path; - const fullPath = [parentPath, index, path].join('.'); - this[documentArrayParent].$markValid(fullPath); - } -}; - -/*! - * ignore - */ - -EmbeddedDocument.prototype.$ignore = function(path) { - Document.prototype.$ignore.call(this, path); - - if (!this[documentArrayParent]) { - return; - } - - const index = this.__index; - if (typeof index !== 'undefined') { - const parentPath = this.__parentArray._path; - const fullPath = [parentPath, index, path].join('.'); - this[documentArrayParent].$ignore(fullPath); - } -}; - -/** - * Checks if a path is invalid - * - * @param {String} path the field to check - * @api private - * @method $isValid - * @receiver EmbeddedDocument - */ - -EmbeddedDocument.prototype.$isValid = function(path) { - const index = this.__index; - if (typeof index !== 'undefined' && this[documentArrayParent]) { - return !this[documentArrayParent].$__.validationError || - !this[documentArrayParent].$__.validationError.errors[this.$__fullPath(path)]; - } - - return true; -}; - -/** - * Returns the top level document of this sub-document. - * - * @return {Document} - */ - -EmbeddedDocument.prototype.ownerDocument = function() { - if (this.$__.ownerDocument) { - return this.$__.ownerDocument; - } - - let parent = this[documentArrayParent]; - if (!parent) { - return this; - } - - while (parent[documentArrayParent] || parent.$parent) { - parent = parent[documentArrayParent] || parent.$parent; - } - - this.$__.ownerDocument = parent; - return this.$__.ownerDocument; -}; - -/** - * Returns the full path to this document. If optional `path` is passed, it is appended to the full path. - * - * @param {String} [path] - * @return {String} - * @api private - * @method $__fullPath - * @memberOf EmbeddedDocument - * @instance - */ - -EmbeddedDocument.prototype.$__fullPath = function(path) { - if (!this.$__.fullPath) { - let parent = this; // eslint-disable-line consistent-this - if (!parent[documentArrayParent]) { - return path; - } - - const paths = []; - while (parent[documentArrayParent] || parent.$parent) { - if (parent[documentArrayParent]) { - paths.unshift(parent.__parentArray._path); - } else { - paths.unshift(parent.$basePath); - } - parent = parent[documentArrayParent] || parent.$parent; - } - - this.$__.fullPath = paths.join('.'); - - if (!this.$__.ownerDocument) { - // optimization - this.$__.ownerDocument = parent; - } - } - - return path - ? this.$__.fullPath + '.' + path - : this.$__.fullPath; -}; - -/** - * Returns this sub-documents parent document. - * - * @api public - */ - -EmbeddedDocument.prototype.parent = function() { - return this[documentArrayParent]; -}; - -/** - * Returns this sub-documents parent array. - * - * @api public - */ - -EmbeddedDocument.prototype.parentArray = function() { - return this.__parentArray; -}; - -/*! - * Module exports. - */ - -module.exports = EmbeddedDocument; diff --git a/node_modules/mongoose/lib/types/index.js b/node_modules/mongoose/lib/types/index.js deleted file mode 100644 index a1945a0..0000000 --- a/node_modules/mongoose/lib/types/index.js +++ /dev/null @@ -1,20 +0,0 @@ - -/*! - * Module exports. - */ - -'use strict'; - -exports.Array = require('./array'); -exports.Buffer = require('./buffer'); - -exports.Document = // @deprecate -exports.Embedded = require('./embedded'); - -exports.DocumentArray = require('./documentarray'); -exports.Decimal128 = require('./decimal128'); -exports.ObjectId = require('./objectid'); - -exports.Map = require('./map'); - -exports.Subdocument = require('./subdocument'); diff --git a/node_modules/mongoose/lib/types/map.js b/node_modules/mongoose/lib/types/map.js deleted file mode 100644 index bea39bf..0000000 --- a/node_modules/mongoose/lib/types/map.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -const Mixed = require('../schema/mixed'); -const get = require('../helpers/get'); -const util = require('util'); - -/*! - * ignore - */ - -class MongooseMap extends Map { - constructor(v, path, doc, schemaType) { - if (v != null && v.constructor.name === 'Object') { - v = Object.keys(v).reduce((arr, key) => arr.concat([[key, v[key]]]), []); - } - super(v); - - this.$__parent = doc != null && doc.$__ != null ? doc : null; - this.$__path = path; - this.$__schemaType = schemaType == null ? new Mixed(path) : schemaType; - - this.$__runDeferred(); - } - - $init(key, value) { - checkValidKey(key); - - super.set(key, value); - - if (value != null && value.$isSingleNested) { - value.$basePath = this.$__path + '.' + key; - } - } - - $__set(key, value) { - super.set(key, value); - } - - set(key, value) { - checkValidKey(key); - - // Weird, but because you can't assign to `this` before calling `super()` - // you can't get access to `$__schemaType` to cast in the initial call to - // `set()` from the `super()` constructor. - - if (this.$__schemaType == null) { - this.$__deferred = this.$__deferred || []; - this.$__deferred.push({ key: key, value: value }); - return; - } - - const fullPath = this.$__path + '.' + key; - const populated = this.$__parent != null && this.$__parent.$__ ? - this.$__parent.populated(fullPath) || this.$__parent.populated(this.$__path) : - null; - - if (populated != null) { - if (value.$__ == null) { - value = new populated.options.model(value); - } - value.$__.wasPopulated = true; - } else { - try { - value = this.$__schemaType. - applySetters(value, this.$__parent, false, this.get(key)); - } catch (error) { - if (this.$__parent != null && this.$__parent.$__ != null) { - this.$__parent.invalidate(fullPath, error); - return; - } - throw error; - } - } - - super.set(key, value); - - if (value != null && value.$isSingleNested) { - value.$basePath = this.$__path + '.' + key; - } - - if (this.$__parent != null && this.$__parent.$__) { - this.$__parent.markModified(this.$__path + '.' + key); - } - } - - toBSON() { - return new Map(this); - } - - toObject(options) { - if (get(options, 'flattenMaps')) { - const ret = {}; - const keys = this.keys(); - for (const key of keys) { - ret[key] = this.get(key); - } - return ret; - } - - return new Map(this); - } - - toJSON() { - const ret = {}; - const keys = this.keys(); - for (const key of keys) { - ret[key] = this.get(key); - } - return ret; - } - - inspect() { - return new Map(this); - } - - $__runDeferred() { - if (!this.$__deferred) { - return; - } - for (let i = 0; i < this.$__deferred.length; ++i) { - this.set(this.$__deferred[i].key, this.$__deferred[i].value); - } - this.$__deferred = null; - } -} - -if (util.inspect.custom) { - Object.defineProperty(MongooseMap.prototype, util.inspect.custom, { - enumerable: false, - writable: false, - configurable: false, - value: MongooseMap.prototype.inspect - }); -} - -Object.defineProperty(MongooseMap.prototype, '$__set', { - enumerable: false, - writable: true, - configurable: false -}); - -Object.defineProperty(MongooseMap.prototype, '$__parent', { - enumerable: false, - writable: true, - configurable: false -}); - -Object.defineProperty(MongooseMap.prototype, '$__path', { - enumerable: false, - writable: true, - configurable: false -}); - -Object.defineProperty(MongooseMap.prototype, '$__schemaType', { - enumerable: false, - writable: true, - configurable: false -}); - -Object.defineProperty(MongooseMap.prototype, '$isMongooseMap', { - enumerable: false, - writable: false, - configurable: false, - value: true -}); - -Object.defineProperty(MongooseMap.prototype, '$__deferredCalls', { - enumerable: false, - writable: false, - configurable: false, - value: true -}); - -/*! - * Since maps are stored as objects under the hood, keys must be strings - * and can't contain any invalid characters - */ - -function checkValidKey(key) { - const keyType = typeof key; - if (keyType !== 'string') { - throw new TypeError(`Mongoose maps only support string keys, got ${keyType}`); - } - if (key.startsWith('$')) { - throw new Error(`Mongoose maps do not support keys that start with "$", got "${key}"`); - } - if (key.includes('.')) { - throw new Error(`Mongoose maps do not support keys that contain ".", got "${key}"`); - } -} - -module.exports = MongooseMap; diff --git a/node_modules/mongoose/lib/types/objectid.js b/node_modules/mongoose/lib/types/objectid.js deleted file mode 100644 index 4c3f8b4..0000000 --- a/node_modules/mongoose/lib/types/objectid.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * ObjectId type constructor - * - * ####Example - * - * var id = new mongoose.Types.ObjectId; - * - * @constructor ObjectId - */ - -'use strict'; - -const ObjectId = require('../driver').get().ObjectId; -const objectIdSymbol = require('../helpers/symbols').objectIdSymbol; - -/*! - * Getter for convenience with populate, see gh-6115 - */ - -Object.defineProperty(ObjectId.prototype, '_id', { - enumerable: false, - configurable: true, - get: function() { - return this; - } -}); - -ObjectId.prototype[objectIdSymbol] = true; - -module.exports = ObjectId; diff --git a/node_modules/mongoose/lib/types/subdocument.js b/node_modules/mongoose/lib/types/subdocument.js deleted file mode 100644 index 182d84e..0000000 --- a/node_modules/mongoose/lib/types/subdocument.js +++ /dev/null @@ -1,236 +0,0 @@ -'use strict'; - -const Document = require('../document'); -const immediate = require('../helpers/immediate'); -const internalToObjectOptions = require('../options').internalToObjectOptions; -const utils = require('../utils'); - -const documentArrayParent = require('../helpers/symbols').documentArrayParent; - -module.exports = Subdocument; - -/** - * Subdocument constructor. - * - * @inherits Document - * @api private - */ - -function Subdocument(value, fields, parent, skipId, options) { - this.$isSingleNested = true; - if (parent != null) { - // If setting a nested path, should copy isNew from parent re: gh-7048 - options = Object.assign({}, options, { isNew: parent.isNew }); - } - Document.call(this, value, fields, skipId, options); - - delete this.$__.$options.priorDoc; -} - -Subdocument.prototype = Object.create(Document.prototype); - -Subdocument.prototype.toBSON = function() { - return this.toObject(internalToObjectOptions); -}; - -/** - * Used as a stub for middleware - * - * ####NOTE: - * - * _This is a no-op. Does not actually save the doc to the db._ - * - * @param {Function} [fn] - * @return {Promise} resolved Promise - * @api private - */ - -Subdocument.prototype.save = function(options, fn) { - if (typeof options === 'function') { - fn = options; - options = {}; - } - options = options || {}; - - if (!options.suppressWarning) { - console.warn('mongoose: calling `save()` on a subdoc does **not** save ' + - 'the document to MongoDB, it only runs save middleware. ' + - 'Use `subdoc.save({ suppressWarning: true })` to hide this warning ' + - 'if you\'re sure this behavior is right for your app.'); - } - - return utils.promiseOrCallback(fn, cb => { - this.$__save(cb); - }); -}; - -/** - * Used as a stub for middleware - * - * ####NOTE: - * - * _This is a no-op. Does not actually save the doc to the db._ - * - * @param {Function} [fn] - * @method $__save - * @api private - */ - -Subdocument.prototype.$__save = function(fn) { - return immediate(() => fn(null, this)); -}; - -Subdocument.prototype.$isValid = function(path) { - if (this.$parent && this.$basePath) { - return this.$parent.$isValid([this.$basePath, path].join('.')); - } - return Document.prototype.$isValid.call(this, path); -}; - -Subdocument.prototype.markModified = function(path) { - Document.prototype.markModified.call(this, path); - - if (this.$parent && this.$basePath) { - if (this.$parent.isDirectModified(this.$basePath)) { - return; - } - this.$parent.markModified([this.$basePath, path].join('.'), this); - } -}; - -Subdocument.prototype.$markValid = function(path) { - Document.prototype.$markValid.call(this, path); - if (this.$parent && this.$basePath) { - this.$parent.$markValid([this.$basePath, path].join('.')); - } -}; - -/*! - * ignore - */ - -Subdocument.prototype.invalidate = function(path, err, val) { - // Hack: array subdocuments' validationError is equal to the owner doc's, - // so validating an array subdoc gives the top-level doc back. Temporary - // workaround for #5208 so we don't have circular errors. - if (err !== this.ownerDocument().$__.validationError) { - Document.prototype.invalidate.call(this, path, err, val); - } - - if (this.$parent && this.$basePath) { - this.$parent.invalidate([this.$basePath, path].join('.'), err, val); - } else if (err.kind === 'cast' || err.name === 'CastError') { - throw err; - } -}; - -/*! - * ignore - */ - -Subdocument.prototype.$ignore = function(path) { - Document.prototype.$ignore.call(this, path); - if (this.$parent && this.$basePath) { - this.$parent.$ignore([this.$basePath, path].join('.')); - } -}; - -/** - * Returns the top level document of this sub-document. - * - * @return {Document} - */ - -Subdocument.prototype.ownerDocument = function() { - if (this.$__.ownerDocument) { - return this.$__.ownerDocument; - } - - let parent = this.$parent; - if (!parent) { - return this; - } - - while (parent.$parent || parent[documentArrayParent]) { - parent = parent.$parent || parent[documentArrayParent]; - } - - this.$__.ownerDocument = parent; - return this.$__.ownerDocument; -}; - -/** - * Returns this sub-documents parent document. - * - * @api public - */ - -Subdocument.prototype.parent = function() { - return this.$parent; -}; - -/*! - * no-op for hooks - */ - -Subdocument.prototype.$__remove = function(cb) { - return cb(null, this); -}; - -/** - * Null-out this subdoc - * - * @param {Object} [options] - * @param {Function} [callback] optional callback for compatibility with Document.prototype.remove - */ - -Subdocument.prototype.remove = function(options, callback) { - if (typeof options === 'function') { - callback = options; - options = null; - } - - registerRemoveListener(this); - - // If removing entire doc, no need to remove subdoc - if (!options || !options.noop) { - this.$parent.set(this.$basePath, null); - } - - if (typeof callback === 'function') { - callback(null); - } -}; - -/*! - * ignore - */ - -Subdocument.prototype.populate = function() { - throw new Error('Mongoose does not support calling populate() on nested ' + - 'docs. Instead of `doc.nested.populate("path")`, use ' + - '`doc.populate("nested.path")`'); -}; - -/*! - * Registers remove event listeners for triggering - * on subdocuments. - * - * @param {EmbeddedDocument} sub - * @api private - */ - -function registerRemoveListener(sub) { - let owner = sub.ownerDocument(); - - function emitRemove() { - owner.removeListener('save', emitRemove); - owner.removeListener('remove', emitRemove); - sub.emit('remove', sub); - sub.constructor.emit('remove', sub); - owner = sub = null; - } - - owner.on('save', emitRemove); - owner.on('remove', emitRemove); -} diff --git a/node_modules/mongoose/migrating_to_5.md b/node_modules/mongoose/migrating_to_5.md deleted file mode 100644 index 7b6377c..0000000 --- a/node_modules/mongoose/migrating_to_5.md +++ /dev/null @@ -1,432 +0,0 @@ -### Version Requirements - -Mongoose now requires node.js >= 4.0.0 and MongoDB >= 3.0.0. [MongoDB 2.6](https://www.mongodb.com/blog/post/mongodb-2-6-end-of-life) and [Node.js < 4](https://github.com/nodejs/Release) where both EOL-ed in 2016. - -### Query Middleware - -Query middleware is now compiled when you call `mongoose.model()` or `db.model()`. If you add query middleware after calling `mongoose.model()`, that middleware will **not** get called. - -```javascript -const schema = new Schema({ name: String }); -const MyModel = mongoose.model('Test', schema); -schema.pre('find', () => { console.log('find!'); }); - -MyModel.find().exec(function() { - // In mongoose 4.x, the above `.find()` will print "find!" - // In mongoose 5.x, "find!" will **not** be printed. - // Call `pre('find')` **before** calling `mongoose.model()` to make the middleware apply. -}); -``` - -### Promises and Callbacks for `mongoose.connect()` - -`mongoose.connect()` and `mongoose.disconnect()` now return a promise if no callback specified, or `null` otherwise. It does **not** return the mongoose singleton. - -```javascript -// Worked in mongoose 4. Does **not** work in mongoose 5, `mongoose.connect()` -// now returns a promise consistently. This is to avoid the horrible things -// we've done to allow mongoose to be a thenable that resolves to itself. -mongoose.connect('mongodb://localhost:27017/test').model('Test', new Schema({})); - -// Do this instead -mongoose.connect('mongodb://localhost:27017/test'); -mongoose.model('Test', new Schema({})); -``` - -### Connection Logic and `useMongoClient` - -The [`useMongoClient` option](http://mongoosejs.com/docs/4.x/docs/connections.html#use-mongo-client) was -removed in Mongoose 5, it is now always `true`. As a consequence, Mongoose 5 -no longer supports several function signatures for `mongoose.connect()` that -worked in Mongoose 4.x if the `useMongoClient` option was off. Below are some -examples of `mongoose.connect()` calls that do **not** work in Mongoose 5.x. - -* `mongoose.connect('localhost', 27017);` -* `mongoose.connect('localhost', 'mydb', 27017);` -* `mongoose.connect('mongodb://host1:27017,mongodb://host2:27017');` - -In Mongoose 5.x, the first parameter to `mongoose.connect()` and `mongoose.createConnection()`, if specified, **must** be a [MongoDB connection string](https://docs.mongodb.com/manual/reference/connection-string/). The -connection string and options are then passed down to [the MongoDB Node.js driver's `MongoClient.connect()` function](http://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#.connect). Mongoose does not modify the connection string, although `mongoose.connect()` and `mongoose.createConnection()` support a [few additional options in addition to the ones the MongoDB driver supports](http://mongoosejs.com/docs/connections.html#options). - -### Setter Order - -Setters run in reverse order in 4.x: - -```javascript -const schema = new Schema({ name: String }); -schema.path('name'). - get(() => console.log('This will print 2nd')). - get(() => console.log('This will print first')); -``` - -In 5.x, setters run in the order they're declared. - -```javascript -const schema = new Schema({ name: String }); -schema.path('name'). - get(() => console.log('This will print first')). - get(() => console.log('This will print 2nd')); -``` - -### Checking if a path is populated - -Mongoose 5.1.0 introduced an `_id` getter to ObjectIds that lets you get an ObjectId regardless of whether a path -is populated. - -```javascript -const blogPostSchema = new Schema({ - title: String, - author: { - type: mongoose.Schema.Types.ObjectId, - ref: 'Author' - } -}); -const BlogPost = mongoose.model('BlogPost', blogPostSchema); - -await BlogPost.create({ title: 'test', author: author._id }); -const blogPost = await BlogPost.findOne(); - -console.log(blogPost.author); // '5b207f84e8061d1d2711b421' -// New in Mongoose 5.1.0: this will print '5b207f84e8061d1d2711b421' as well -console.log(blogPost.author._id); - -await blogPost.populate('author'); -console.log(blogPost.author._id); '5b207f84e8061d1d2711b421' -``` - -As a consequence, checking whether `blogPost.author._id` is [no longer viable as a way to check whether `author` is populated](https://github.com/Automattic/mongoose/issues/6415#issuecomment-388579185). Use `blogPost.populated('author') != null` or `blogPost.author instanceof mongoose.Types.ObjectId` to check whether `author` is populated instead. - -Note that you can call `mongoose.set('objectIdGetter', false)` to change this behavior. - -### Return Values for `remove()` and `deleteX()` - -`deleteOne()`, `deleteMany()`, and `remove()` now resolve to the result object -rather than the full [driver `WriteOpResult` object](http://mongodb.github.io/node-mongodb-native/2.2/api/Collection.html#~writeOpCallback). - -```javascript -// In 4.x, this is how you got the number of documents deleted -MyModel.deleteMany().then(res => console.log(res.result.n)); -// In 5.x this is how you get the number of documents deleted -MyModel.deleteMany().then(res => res.n); -``` - -### Aggregation Cursors - -The `useMongooseAggCursor` option from 4.x is now always on. This is the new syntax for aggregation cursors in mongoose 5: - -```javascript -// When you call `.cursor()`, `.exec()` will now return a mongoose aggregation -// cursor. -const cursor = MyModel.aggregate([{ $match: { name: 'Val' } }]).cursor().exec(); -// No need to `await` on the cursor or wait for a promise to resolve -cursor.eachAsync(doc => console.log(doc)); - -// Can also pass options to `cursor()` -const cursorWithOptions = MyModel. - aggregate([{ $match: { name: 'Val' } }]). - cursor({ batchSize: 10 }). - exec(); -``` - -### geoNear - -`Model.geoNear()` has been removed because the [MongoDB driver no longer supports it](https://github.com/mongodb/node-mongodb-native/blob/master/CHANGES_3.0.0.md#geonear-command-helper) - -### Required URI encoding of connection strings - -Due to changes in the MongoDB driver, connection strings must be URI encoded. - -If they are not, connections may fail with an illegal character message. - -#### Passwords which contain certain characters - -See a [full list of affected characters](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). - -If your app is used by a lot of different connection strings, it's possible -that your test cases will pass, but production passwords will fail. Encode all your connection -strings to be safe. - -If you want to continue to use unencoded connection strings, the easiest fix is to use -the `mongodb-uri` module to parse the connection strings, and then produce the properly encoded -versions. You can use a function like this: - -```javascript -const uriFormat = require('mongodb-uri') -function encodeMongoURI (urlString) { - if (urlString) { - let parsed = uriFormat.parse(urlString) - urlString = uriFormat.format(parsed); - } - return urlString; - } -} - -// Your un-encoded string. -const mongodbConnectString = "mongodb://..."; -mongoose.connect(encodeMongoURI(mongodbConnectString)) -``` - -The function above is safe to use whether the existing string is already encoded or not. - -#### Domain sockets - -Domain sockets must be URI encoded. For example: - -```javascript -// Works in mongoose 4. Does **not** work in mongoose 5 because of more -// stringent URI parsing. -const host = '/tmp/mongodb-27017.sock'; -mongoose.createConnection(`mongodb://aaron:psw@${host}/fake`); - -// Do this instead -const host = encodeURIComponent('/tmp/mongodb-27017.sock'); -mongoose.createConnection(`mongodb://aaron:psw@${host}/fake`); -``` - -### `toObject()` Options - -The `options` parameter to `toObject()` and `toJSON()` merge defaults rather than overwriting them. - -```javascript -// Note the `toObject` option below -const schema = new Schema({ name: String }, { toObject: { virtuals: true } }); -schema.virtual('answer').get(() => 42); -const MyModel = db.model('MyModel', schema); - -const doc = new MyModel({ name: 'test' }); -// In mongoose 4.x this prints "undefined", because `{ minimize: false }` -// overwrites the entire schema-defined options object. -// In mongoose 5.x this prints "42", because `{ minimize: false }` gets -// merged with the schema-defined options. -console.log(doc.toJSON({ minimize: false }).answer); -``` - -### Aggregate Parameters - -`aggregate()` no longer accepts a spread, you **must** pass your aggregation pipeline as an array. The below code worked in 4.x: - -```javascript -MyModel.aggregate({ $match: { isDeleted: false } }, { $skip: 10 }).exec(cb); -``` - -The above code does **not** work in 5.x, you **must** wrap the `$match` and `$skip` stages in an array. - -```javascript -MyModel.aggregate([{ $match: { isDeleted: false } }, { $skip: 10 }]).exec(cb); -``` - -### Boolean Casting - -By default, mongoose 4 would coerce any value to a boolean without error. - -```javascript -// Fine in mongoose 4, would save a doc with `boolField = true` -const MyModel = mongoose.model('Test', new Schema({ - boolField: Boolean -})); - -MyModel.create({ boolField: 'not a boolean' }); -``` - -Mongoose 5 only casts the following values to `true`: - -* `true` -* `'true'` -* `1` -* `'1'` -* `'yes'` - -And the following values to `false`: - -* `false` -* `'false'` -* `0` -* `'0'` -* `'no'` - -All other values will cause a `CastError` -### Query Casting - -Casting for `update()`, `updateOne()`, `updateMany()`, `replaceOne()`, -`remove()`, `deleteOne()`, and `deleteMany()` doesn't happen until `exec()`. -This makes it easier for hooks and custom query helpers to modify data, because -mongoose won't restructure the data you passed in until after your hooks and -query helpers have ran. It also makes it possible to set the `overwrite` option -_after_ passing in an update. - -```javascript -// In mongoose 4.x, this becomes `{ $set: { name: 'Baz' } }` despite the `overwrite` -// In mongoose 5.x, this overwrite is respected and the first document with -// `name = 'Bar'` will be replaced with `{ name: 'Baz' }` -User.where({ name: 'Bar' }).update({ name: 'Baz' }).setOptions({ overwrite: true }); -``` - -### Post Save Hooks Get Flow Control - -Post hooks now get flow control, which means async post save hooks and child document post save hooks execute **before** your `save()` callback. - -```javsscript -const ChildModelSchema = new mongoose.Schema({ - text: { - type: String - } -}); -ChildModelSchema.post('save', function(doc) { - // In mongoose 5.x this will print **before** the `console.log()` - // in the `save()` callback. In mongoose 4.x this was reversed. - console.log('Child post save'); -}); -const ParentModelSchema = new mongoose.Schema({ - children: [ChildModelSchema] -}); - -const Model = mongoose.model('Parent', ParentModelSchema); -const m = new Model({ children: [{ text: 'test' }] }); -m.save(function() { - // In mongoose 5.xm this prints **after** the "Child post save" message. - console.log('Save callback'); -}); -``` - -### The `$pushAll` Operator - -`$pushAll` is no longer supported and no longer used internally for `save()`, since it has been [deprecated since MongoDB 2.4](https://docs.mongodb.com/manual/reference/operator/update/pushAll/). Use `$push` with `$each` instead. - -### Always Use Forward Key Order - -The `retainKeyOrder` option was removed, mongoose will now always retain the same key position when cloning objects. If you have queries or indexes that rely on reverse key order, you will have to change them. - -### Run setters on queries - -Setters now run on queries by default, and the old `runSettersOnQuery` option -has been removed. - -```javascript -const schema = new Schema({ - email: { type: String, lowercase: true } -}); -const Model = mongoose.model('Test', schema); -Model.find({ email: 'FOO@BAR.BAZ' }); // Converted to `find({ email: 'foo@bar.baz' })` -``` - -### Pre-compiled Browser Bundle - -We no longer have a pre-compiled version of mongoose for the browser. If you want to use mongoose schemas in the browser, you need to build your own bundle with browserify/webpack. - -### Save Errors - -The `saveErrorIfNotFound` option was removed, mongoose will now always error out from `save()` if the underlying document was not found - -### Init hook signatures - -`init` hooks are now fully synchronous and do not receive `next()` as a parameter. - -`Document.prototype.init()` no longer takes a callback as a parameter. It -was always synchronous, just had a callback for legacy reasons. - -### `numAffected` and `save()` - -`doc.save()` no longer passes `numAffected` as a 3rd param to its callback. - -### `remove()` and debouncing - -`doc.remove()` no longer debounces - -### `getPromiseConstructor()` - -`getPromiseConstructor()` is gone, just use `mongoose.Promise`. - -### Passing Parameters from Pre Hooks - -You cannot pass parameters to the next pre middleware in the chain using `next()` in mongoose 5.x. In mongoose 4, `next('Test')` in pre middleware would call the -next middleware with 'Test' as a parameter. Mongoose 5.x has removed support for this. - -### `required` validator for arrays - -In mongoose 5 the `required` validator only verifies if the value is an array. That is, it will **not** fail for _empty_ arrays as it would in mongoose 4. - -### debug output defaults to stdout instead of stderr - -In mongoose 5 the default debug function uses `console.info()` to display messages instead of `console.error()`. - -### Overwriting filter properties - -In Mongoose 4.x, overwriting a filter property that's a primitive with one that is an object would silently fail. For example, the below code would ignore the `where()` and be equivalent to `Sport.find({ name: 'baseball' })` - -```javascript -Sport.find({ name: 'baseball' }).where({name: {$ne: 'softball'}}); -``` - -In Mongoose 5.x, the above code will correctly overwrite `'baseball'` with `{ $ne: 'softball' }` - -### `bulkWrite()` results - -Mongoose 5.x uses version 3.x of the [MongoDB Node.js driver](http://npmjs.com/package/mongodb). MongoDB driver 3.x changed the format of -the result of [`bulkWrite()` calls](http://localhost:8088/docs/api.html#model_Model.bulkWrite) so there is no longer a top-level `nInserted`, `nModified`, etc. property. The new result object structure is [described here](http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#~BulkWriteOpResult). - -```javascript -const Model = mongoose.model('Test', new Schema({ name: String })); - -const res = await Model.bulkWrite([{ insertOne: { document: { name: 'test' } } }]); - -console.log(res); -``` - -In Mongoose 4.x, the above will print: - -``` -BulkWriteResult { - ok: [Getter], - nInserted: [Getter], - nUpserted: [Getter], - nMatched: [Getter], - nModified: [Getter], - nRemoved: [Getter], - getInsertedIds: [Function], - getUpsertedIds: [Function], - getUpsertedIdAt: [Function], - getRawResponse: [Function], - hasWriteErrors: [Function], - getWriteErrorCount: [Function], - getWriteErrorAt: [Function], - getWriteErrors: [Function], - getLastOp: [Function], - getWriteConcernError: [Function], - toJSON: [Function], - toString: [Function], - isOk: [Function], - insertedCount: 1, - matchedCount: 0, - modifiedCount: 0, - deletedCount: 0, - upsertedCount: 0, - upsertedIds: {}, - insertedIds: { '0': 5be9a3101638a066702a0d38 }, - n: 1 } -``` - -In Mongoose 5.x, the script will print: - -``` -BulkWriteResult { - result: - { ok: 1, - writeErrors: [], - writeConcernErrors: [], - insertedIds: [ [Object] ], - nInserted: 1, - nUpserted: 0, - nMatched: 0, - nModified: 0, - nRemoved: 0, - upserted: [], - lastOp: { ts: [Object], t: 1 } }, - insertedCount: 1, - matchedCount: 0, - modifiedCount: 0, - deletedCount: 0, - upsertedCount: 0, - upsertedIds: {}, - insertedIds: { '0': 5be9a1c87decfc6443dd9f18 }, - n: 1 } -``` \ No newline at end of file diff --git a/node_modules/mongoose/tools/auth.js b/node_modules/mongoose/tools/auth.js deleted file mode 100644 index 967f5e1..0000000 --- a/node_modules/mongoose/tools/auth.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const Server = require('mongodb-topology-manager').Server; -const co = require('co'); -const mongodb = require('mongodb'); - -co(function*() { - // Create new instance - var server = new Server('mongod', { - auth: null, - dbpath: '/data/db/27017' - }); - - // Purge the directory - yield server.purge(); - - // Start process - yield server.start(); - - const db = yield mongodb.MongoClient.connect('mongodb://localhost:27017/admin'); - - yield db.addUser('passwordIsTaco', 'taco', { - roles: ['dbOwner'] - }); - - console.log('done'); -}).catch(error => { - console.error(error); - process.exit(-1); -}); diff --git a/node_modules/mongoose/tools/repl.js b/node_modules/mongoose/tools/repl.js deleted file mode 100644 index ca3b6de..0000000 --- a/node_modules/mongoose/tools/repl.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const co = require('co'); - -co(function*() { - var ReplSet = require('mongodb-topology-manager').ReplSet; - - // Create new instance - var topology = new ReplSet('mongod', [{ - // mongod process options - options: { - bind_ip: 'localhost', port: 31000, dbpath: `/data/db/31000` - } - }, { - // mongod process options - options: { - bind_ip: 'localhost', port: 31001, dbpath: `/data/db/31001` - } - }, { - // Type of node - arbiterOnly: true, - // mongod process options - options: { - bind_ip: 'localhost', port: 31002, dbpath: `/data/db/31002` - } - }], { - replSet: 'rs' - }); - - yield topology.start(); - - console.log('done'); -}).catch(error => { - console.error(error); - process.exit(-1); -}); diff --git a/node_modules/mongoose/tools/sharded.js b/node_modules/mongoose/tools/sharded.js deleted file mode 100644 index 82cad14..0000000 --- a/node_modules/mongoose/tools/sharded.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const co = require('co'); - -co(function*() { - var Sharded = require('mongodb-topology-manager').Sharded; - - // Create new instance - var topology = new Sharded({ - mongod: 'mongod', - mongos: 'mongos' - }); - - yield topology.addShard([{ - options: { - bind_ip: 'localhost', port: 31000, dbpath: `/data/db/31000`, shardsvr: null - } - }], { replSet: 'rs1' }); - - yield topology.addConfigurationServers([{ - options: { - bind_ip: 'localhost', port: 35000, dbpath: `/data/db/35000` - } - }], { replSet: 'rs0' }); - - yield topology.addProxies([{ - bind_ip: 'localhost', port: 51000, configdb: 'localhost:35000' - }], { - binary: 'mongos' - }); - - console.log('Start...'); - // Start up topology - yield topology.start(); - - console.log('Started'); - - // Shard db - yield topology.enableSharding('test'); - - console.log('done'); -}).catch(error => { - console.error(error); - process.exit(-1); -}); diff --git a/node_modules/vue-router/CHANGELOG.md b/node_modules/vue-router/CHANGELOG.md new file mode 100644 index 0000000..c8c04e4 --- /dev/null +++ b/node_modules/vue-router/CHANGELOG.md @@ -0,0 +1,92 @@ +## [3.0.5](https://github.com/vuejs/vue-router/compare/v3.0.3...v3.0.5) (2019-04-15) + + +### Bug Fixes + +* prevent memory leaks by removing app references ([#2706](https://github.com/vuejs/vue-router/issues/2706)) ([8056105](https://github.com/vuejs/vue-router/commit/8056105)), closes [#2639](https://github.com/vuejs/vue-router/issues/2639) +* push before creating Vue instance ([#2713](https://github.com/vuejs/vue-router/issues/2713)) ([6974a6f](https://github.com/vuejs/vue-router/commit/6974a6f)), closes [#2712](https://github.com/vuejs/vue-router/issues/2712) +* **router-view:** add condition to see whether the tree is inactive (fix [#2552](https://github.com/vuejs/vue-router/issues/2552)) ([#2592](https://github.com/vuejs/vue-router/issues/2592)) ([e6d8fd2](https://github.com/vuejs/vue-router/commit/e6d8fd2)) +* **router-view:** register instance in init hook ([c3abdf6](https://github.com/vuejs/vue-router/commit/c3abdf6)), closes [#2561](https://github.com/vuejs/vue-router/issues/2561) [#2689](https://github.com/vuejs/vue-router/issues/2689) [#2561](https://github.com/vuejs/vue-router/issues/2561) [#2561](https://github.com/vuejs/vue-router/issues/2561) + + +## [3.0.4](https://github.com/vuejs/vue-router/compare/v3.0.3...v3.0.4) (2019-04-12) + + +### Bug Fixes + +* prevent memory leaks by removing app references ([#2706](https://github.com/vuejs/vue-router/issues/2706)) ([8056105](https://github.com/vuejs/vue-router/commit/8056105)), closes [#2639](https://github.com/vuejs/vue-router/issues/2639) +* **hash:** prevent double decoding ([#2711](https://github.com/vuejs/vue-router/issues/2711)) ([a775fb1](https://github.com/vuejs/vue-router/commit/a775fb1)), closes [#2708](https://github.com/vuejs/vue-router/issues/2708) + + +### Features + +* **esm build:** build ES modules for browser ([#2705](https://github.com/vuejs/vue-router/issues/2705)) ([627027f](https://github.com/vuejs/vue-router/commit/627027f)) + + +## [3.0.3](https://github.com/vuejs/vue-router/compare/v3.0.2...v3.0.3) (2019-04-08) + + +### Bug Fixes + +* removes warning resolving asterisk routes ([e224637](https://github.com/vuejs/vue-router/commit/e224637)), closes [#2505](https://github.com/vuejs/vue-router/issues/2505) [#2505](https://github.com/vuejs/vue-router/issues/2505) +* **normalizeLocation:** create a copy with named locations ([#2286](https://github.com/vuejs/vue-router/issues/2286)) ([53cce99](https://github.com/vuejs/vue-router/commit/53cce99)), closes [#2121](https://github.com/vuejs/vue-router/issues/2121) +* **resolve:** use current location if not provided ([#2390](https://github.com/vuejs/vue-router/issues/2390)) ([7ff4de4](https://github.com/vuejs/vue-router/commit/7ff4de4)), closes [#2385](https://github.com/vuejs/vue-router/issues/2385) +* **types:** allow null/undefined in query params ([ca30a75](https://github.com/vuejs/vue-router/commit/ca30a75)), closes [#2605](https://github.com/vuejs/vue-router/issues/2605) + + + +## [3.0.2](https://github.com/vuejs/vue-router/compare/v3.0.1...v3.0.2) (2018-11-23) + +### Bug Fixes + +- **errors:** throws with invalid route objects ([#1893](https://github.com/vuejs/vue-router/issues/1893)) ([c837666](https://github.com/vuejs/vue-router/commit/c837666)) +- fix the test in async.spec.js ([#1953](https://github.com/vuejs/vue-router/issues/1953)) ([4e9e66b](https://github.com/vuejs/vue-router/commit/4e9e66b)) +- initial url path for non ascii urls ([#2375](https://github.com/vuejs/vue-router/issues/2375)) ([c3b0a33](https://github.com/vuejs/vue-router/commit/c3b0a33)) +- only setupScroll when support pushState due to possible fallback: false ([#1835](https://github.com/vuejs/vue-router/issues/1835)) ([fac60f6](https://github.com/vuejs/vue-router/commit/fac60f6)), closes [#1834](https://github.com/vuejs/vue-router/issues/1834) +- workaround replaceState bug in Safari ([#2295](https://github.com/vuejs/vue-router/issues/2295)) ([3c7d8ab](https://github.com/vuejs/vue-router/commit/3c7d8ab)), closes [#2195](https://github.com/vuejs/vue-router/issues/2195) +- **hash:** support unicode in initial route ([8369c6b](https://github.com/vuejs/vue-router/commit/8369c6b)) +- **history-mode:** correcting indentation in web.config example ([#1948](https://github.com/vuejs/vue-router/issues/1948)) ([4b071f9](https://github.com/vuejs/vue-router/commit/4b071f9)) +- **match:** use pathMatch for the param of \* routes ([#1995](https://github.com/vuejs/vue-router/issues/1995)) ([ca1fccd](https://github.com/vuejs/vue-router/commit/ca1fccd)), closes [#1994](https://github.com/vuejs/vue-router/issues/1994) + +### Features + +- call scrollBehavior with app context ([#1804](https://github.com/vuejs/vue-router/issues/1804)) ([c93a734](https://github.com/vuejs/vue-router/commit/c93a734)) + +## [3.0.1](https://github.com/vuejs/vue-router/compare/v3.0.0...v3.0.1) (2017-10-13) + +### Bug Fixes + +- fix props-passing regression ([02ff792](https://github.com/vuejs/vue-router/commit/02ff792)), closes [#1800](https://github.com/vuejs/vue-router/issues/1800) + +## [3.0.0](https://github.com/vuejs/vue-router/compare/v2.8.0...v3.0.0) (2017-10-11) + +### Features + +- **typings:** adapt to the new Vue typings ([#1685](https://github.com/vuejs/vue-router/issues/1685)) ([8855e36](https://github.com/vuejs/vue-router/commit/8855e36)) + +### BREAKING CHANGES + +- **typings:** It is no longer compatible with the old Vue typings + +## [2.8.0](https://github.com/vuejs/vue-router/compare/v2.7.0...v2.8.0) (2017-10-11) + +### Bug Fixes + +- allow insllation on extended Vue copies ([f62c5d6](https://github.com/vuejs/vue-router/commit/f62c5d6)) +- avoid first popstate event with async guard together (fix [#1508](https://github.com/vuejs/vue-router/issues/1508)) ([#1661](https://github.com/vuejs/vue-router/issues/1661)) ([3cbc0f3](https://github.com/vuejs/vue-router/commit/3cbc0f3)) +- deep clone query when creating routes ([effb114](https://github.com/vuejs/vue-router/commit/effb114)), closes [#1690](https://github.com/vuejs/vue-router/issues/1690) +- fix scroll when going back to initial route ([#1586](https://github.com/vuejs/vue-router/issues/1586)) ([c166822](https://github.com/vuejs/vue-router/commit/c166822)) +- handle null values when comparing objects ([#1568](https://github.com/vuejs/vue-router/issues/1568)) ([4e95bd8](https://github.com/vuejs/vue-router/commit/4e95bd8)), closes [#1566](https://github.com/vuejs/vue-router/issues/1566) +- resolve native ES modules ([8a28426](https://github.com/vuejs/vue-router/commit/8a28426)) +- send props not defined on the route component in \$attrs. Fixes [#1695](https://github.com/vuejs/vue-router/issues/1695). ([#1702](https://github.com/vuejs/vue-router/issues/1702)) ([a722b6a](https://github.com/vuejs/vue-router/commit/a722b6a)) + +### Features + +- enhance hashHistory to support scrollBehavior ([#1662](https://github.com/vuejs/vue-router/issues/1662)) ([1422eb5](https://github.com/vuejs/vue-router/commit/1422eb5)) +- scrollBehavior accept returning a promise ([#1758](https://github.com/vuejs/vue-router/issues/1758)) ([ce13b55](https://github.com/vuejs/vue-router/commit/ce13b55)) + +# [2.7.0](https://github.com/vuejs/vue-router/compare/v2.6.0...v2.7.0) (2017-06-29) + +### Features + +- auto resolve ES module default when resolving async components ([d539788](https://github.com/vuejs/vue-router/commit/d539788)) diff --git a/node_modules/vue-router/dist/vue-router.esm.browser.js b/node_modules/vue-router/dist/vue-router.esm.browser.js new file mode 100644 index 0000000..b072b29 --- /dev/null +++ b/node_modules/vue-router/dist/vue-router.esm.browser.js @@ -0,0 +1,2631 @@ +/*! + * vue-router v3.0.6 + * (c) 2019 Evan You + * @license MIT + */ +/* */ + +function assert (condition, message) { + if (!condition) { + throw new Error(`[vue-router] ${message}`) + } +} + +function warn (condition, message) { + if ("development" !== 'production' && !condition) { + typeof console !== 'undefined' && console.warn(`[vue-router] ${message}`); + } +} + +function isError (err) { + return Object.prototype.toString.call(err).indexOf('Error') > -1 +} + +function extend (a, b) { + for (const key in b) { + a[key] = b[key]; + } + return a +} + +var View = { + name: 'RouterView', + functional: true, + props: { + name: { + type: String, + default: 'default' + } + }, + render (_, { props, children, parent, data }) { + // used by devtools to display a router-view badge + data.routerView = true; + + // directly use parent context's createElement() function + // so that components rendered by router-view can resolve named slots + const h = parent.$createElement; + const name = props.name; + const route = parent.$route; + const cache = parent._routerViewCache || (parent._routerViewCache = {}); + + // determine current view depth, also check to see if the tree + // has been toggled inactive but kept-alive. + let depth = 0; + let inactive = false; + while (parent && parent._routerRoot !== parent) { + const vnodeData = parent.$vnode && parent.$vnode.data; + if (vnodeData) { + if (vnodeData.routerView) { + depth++; + } + if (vnodeData.keepAlive && parent._inactive) { + inactive = true; + } + } + parent = parent.$parent; + } + data.routerViewDepth = depth; + + // render previous view if the tree is inactive and kept-alive + if (inactive) { + return h(cache[name], data, children) + } + + const matched = route.matched[depth]; + // render empty node if no matched route + if (!matched) { + cache[name] = null; + return h() + } + + const component = cache[name] = matched.components[name]; + + // attach instance registration hook + // this will be called in the instance's injected lifecycle hooks + data.registerRouteInstance = (vm, val) => { + // val could be undefined for unregistration + const current = matched.instances[name]; + if ( + (val && current !== vm) || + (!val && current === vm) + ) { + matched.instances[name] = val; + } + } + + // also register instance in prepatch hook + // in case the same component instance is reused across different routes + ;(data.hook || (data.hook = {})).prepatch = (_, vnode) => { + matched.instances[name] = vnode.componentInstance; + }; + + // register instance in init hook + // in case kept-alive component be actived when routes changed + data.hook.init = (vnode) => { + if (vnode.data.keepAlive && + vnode.componentInstance && + vnode.componentInstance !== matched.instances[name] + ) { + matched.instances[name] = vnode.componentInstance; + } + }; + + // resolve props + let propsToPass = data.props = resolveProps(route, matched.props && matched.props[name]); + if (propsToPass) { + // clone to prevent mutation + propsToPass = data.props = extend({}, propsToPass); + // pass non-declared props as attrs + const attrs = data.attrs = data.attrs || {}; + for (const key in propsToPass) { + if (!component.props || !(key in component.props)) { + attrs[key] = propsToPass[key]; + delete propsToPass[key]; + } + } + } + + return h(component, data, children) + } +} + +function resolveProps (route, config) { + switch (typeof config) { + case 'undefined': + return + case 'object': + return config + case 'function': + return config(route) + case 'boolean': + return config ? route.params : undefined + default: + { + warn( + false, + `props in "${route.path}" is a ${typeof config}, ` + + `expecting an object, function or boolean.` + ); + } + } +} + +/* */ + +const encodeReserveRE = /[!'()*]/g; +const encodeReserveReplacer = c => '%' + c.charCodeAt(0).toString(16); +const commaRE = /%2C/g; + +// fixed encodeURIComponent which is more conformant to RFC3986: +// - escapes [!'()*] +// - preserve commas +const encode = str => encodeURIComponent(str) + .replace(encodeReserveRE, encodeReserveReplacer) + .replace(commaRE, ','); + +const decode = decodeURIComponent; + +function resolveQuery ( + query, + extraQuery = {}, + _parseQuery +) { + const parse = _parseQuery || parseQuery; + let parsedQuery; + try { + parsedQuery = parse(query || ''); + } catch (e) { + "development" !== 'production' && warn(false, e.message); + parsedQuery = {}; + } + for (const key in extraQuery) { + parsedQuery[key] = extraQuery[key]; + } + return parsedQuery +} + +function parseQuery (query) { + const res = {}; + + query = query.trim().replace(/^(\?|#|&)/, ''); + + if (!query) { + return res + } + + query.split('&').forEach(param => { + const parts = param.replace(/\+/g, ' ').split('='); + const key = decode(parts.shift()); + const val = parts.length > 0 + ? decode(parts.join('=')) + : null; + + if (res[key] === undefined) { + res[key] = val; + } else if (Array.isArray(res[key])) { + res[key].push(val); + } else { + res[key] = [res[key], val]; + } + }); + + return res +} + +function stringifyQuery (obj) { + const res = obj ? Object.keys(obj).map(key => { + const val = obj[key]; + + if (val === undefined) { + return '' + } + + if (val === null) { + return encode(key) + } + + if (Array.isArray(val)) { + const result = []; + val.forEach(val2 => { + if (val2 === undefined) { + return + } + if (val2 === null) { + result.push(encode(key)); + } else { + result.push(encode(key) + '=' + encode(val2)); + } + }); + return result.join('&') + } + + return encode(key) + '=' + encode(val) + }).filter(x => x.length > 0).join('&') : null; + return res ? `?${res}` : '' +} + +/* */ + +const trailingSlashRE = /\/?$/; + +function createRoute ( + record, + location, + redirectedFrom, + router +) { + const stringifyQuery$$1 = router && router.options.stringifyQuery; + + let query = location.query || {}; + try { + query = clone(query); + } catch (e) {} + + const route = { + name: location.name || (record && record.name), + meta: (record && record.meta) || {}, + path: location.path || '/', + hash: location.hash || '', + query, + params: location.params || {}, + fullPath: getFullPath(location, stringifyQuery$$1), + matched: record ? formatMatch(record) : [] + }; + if (redirectedFrom) { + route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery$$1); + } + return Object.freeze(route) +} + +function clone (value) { + if (Array.isArray(value)) { + return value.map(clone) + } else if (value && typeof value === 'object') { + const res = {}; + for (const key in value) { + res[key] = clone(value[key]); + } + return res + } else { + return value + } +} + +// the starting route that represents the initial state +const START = createRoute(null, { + path: '/' +}); + +function formatMatch (record) { + const res = []; + while (record) { + res.unshift(record); + record = record.parent; + } + return res +} + +function getFullPath ( + { path, query = {}, hash = '' }, + _stringifyQuery +) { + const stringify = _stringifyQuery || stringifyQuery; + return (path || '/') + stringify(query) + hash +} + +function isSameRoute (a, b) { + if (b === START) { + return a === b + } else if (!b) { + return false + } else if (a.path && b.path) { + return ( + a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && + a.hash === b.hash && + isObjectEqual(a.query, b.query) + ) + } else if (a.name && b.name) { + return ( + a.name === b.name && + a.hash === b.hash && + isObjectEqual(a.query, b.query) && + isObjectEqual(a.params, b.params) + ) + } else { + return false + } +} + +function isObjectEqual (a = {}, b = {}) { + // handle null value #1566 + if (!a || !b) return a === b + const aKeys = Object.keys(a); + const bKeys = Object.keys(b); + if (aKeys.length !== bKeys.length) { + return false + } + return aKeys.every(key => { + const aVal = a[key]; + const bVal = b[key]; + // check nested equality + if (typeof aVal === 'object' && typeof bVal === 'object') { + return isObjectEqual(aVal, bVal) + } + return String(aVal) === String(bVal) + }) +} + +function isIncludedRoute (current, target) { + return ( + current.path.replace(trailingSlashRE, '/').indexOf( + target.path.replace(trailingSlashRE, '/') + ) === 0 && + (!target.hash || current.hash === target.hash) && + queryIncludes(current.query, target.query) + ) +} + +function queryIncludes (current, target) { + for (const key in target) { + if (!(key in current)) { + return false + } + } + return true +} + +/* */ + +// work around weird flow bug +const toTypes = [String, Object]; +const eventTypes = [String, Array]; + +var Link = { + name: 'RouterLink', + props: { + to: { + type: toTypes, + required: true + }, + tag: { + type: String, + default: 'a' + }, + exact: Boolean, + append: Boolean, + replace: Boolean, + activeClass: String, + exactActiveClass: String, + event: { + type: eventTypes, + default: 'click' + } + }, + render (h) { + const router = this.$router; + const current = this.$route; + const { location, route, href } = router.resolve(this.to, current, this.append); + + const classes = {}; + const globalActiveClass = router.options.linkActiveClass; + const globalExactActiveClass = router.options.linkExactActiveClass; + // Support global empty active class + const activeClassFallback = globalActiveClass == null + ? 'router-link-active' + : globalActiveClass; + const exactActiveClassFallback = globalExactActiveClass == null + ? 'router-link-exact-active' + : globalExactActiveClass; + const activeClass = this.activeClass == null + ? activeClassFallback + : this.activeClass; + const exactActiveClass = this.exactActiveClass == null + ? exactActiveClassFallback + : this.exactActiveClass; + const compareTarget = location.path + ? createRoute(null, location, null, router) + : route; + + classes[exactActiveClass] = isSameRoute(current, compareTarget); + classes[activeClass] = this.exact + ? classes[exactActiveClass] + : isIncludedRoute(current, compareTarget); + + const handler = e => { + if (guardEvent(e)) { + if (this.replace) { + router.replace(location); + } else { + router.push(location); + } + } + }; + + const on = { click: guardEvent }; + if (Array.isArray(this.event)) { + this.event.forEach(e => { on[e] = handler; }); + } else { + on[this.event] = handler; + } + + const data = { + class: classes + }; + + if (this.tag === 'a') { + data.on = on; + data.attrs = { href }; + } else { + // find the first child and apply listener and href + const a = findAnchor(this.$slots.default); + if (a) { + // in case the is a static node + a.isStatic = false; + const aData = a.data = extend({}, a.data); + aData.on = on; + const aAttrs = a.data.attrs = extend({}, a.data.attrs); + aAttrs.href = href; + } else { + // doesn't have child, apply listener to self + data.on = on; + } + } + + return h(this.tag, data, this.$slots.default) + } +} + +function guardEvent (e) { + // don't redirect with control keys + if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return + // don't redirect when preventDefault called + if (e.defaultPrevented) return + // don't redirect on right click + if (e.button !== undefined && e.button !== 0) return + // don't redirect if `target="_blank"` + if (e.currentTarget && e.currentTarget.getAttribute) { + const target = e.currentTarget.getAttribute('target'); + if (/\b_blank\b/i.test(target)) return + } + // this may be a Weex event which doesn't have this method + if (e.preventDefault) { + e.preventDefault(); + } + return true +} + +function findAnchor (children) { + if (children) { + let child; + for (let i = 0; i < children.length; i++) { + child = children[i]; + if (child.tag === 'a') { + return child + } + if (child.children && (child = findAnchor(child.children))) { + return child + } + } + } +} + +let _Vue; + +function install (Vue) { + if (install.installed && _Vue === Vue) return + install.installed = true; + + _Vue = Vue; + + const isDef = v => v !== undefined; + + const registerInstance = (vm, callVal) => { + let i = vm.$options._parentVnode; + if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) { + i(vm, callVal); + } + }; + + Vue.mixin({ + beforeCreate () { + if (isDef(this.$options.router)) { + this._routerRoot = this; + this._router = this.$options.router; + this._router.init(this); + Vue.util.defineReactive(this, '_route', this._router.history.current); + } else { + this._routerRoot = (this.$parent && this.$parent._routerRoot) || this; + } + registerInstance(this, this); + }, + destroyed () { + registerInstance(this); + } + }); + + Object.defineProperty(Vue.prototype, '$router', { + get () { return this._routerRoot._router } + }); + + Object.defineProperty(Vue.prototype, '$route', { + get () { return this._routerRoot._route } + }); + + Vue.component('RouterView', View); + Vue.component('RouterLink', Link); + + const strats = Vue.config.optionMergeStrategies; + // use the same hook merging strategy for route hooks + strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created; +} + +/* */ + +const inBrowser = typeof window !== 'undefined'; + +/* */ + +function resolvePath ( + relative, + base, + append +) { + const firstChar = relative.charAt(0); + if (firstChar === '/') { + return relative + } + + if (firstChar === '?' || firstChar === '#') { + return base + relative + } + + const stack = base.split('/'); + + // remove trailing segment if: + // - not appending + // - appending to trailing slash (last segment is empty) + if (!append || !stack[stack.length - 1]) { + stack.pop(); + } + + // resolve relative path + const segments = relative.replace(/^\//, '').split('/'); + for (let i = 0; i < segments.length; i++) { + const segment = segments[i]; + if (segment === '..') { + stack.pop(); + } else if (segment !== '.') { + stack.push(segment); + } + } + + // ensure leading slash + if (stack[0] !== '') { + stack.unshift(''); + } + + return stack.join('/') +} + +function parsePath (path) { + let hash = ''; + let query = ''; + + const hashIndex = path.indexOf('#'); + if (hashIndex >= 0) { + hash = path.slice(hashIndex); + path = path.slice(0, hashIndex); + } + + const queryIndex = path.indexOf('?'); + if (queryIndex >= 0) { + query = path.slice(queryIndex + 1); + path = path.slice(0, queryIndex); + } + + return { + path, + query, + hash + } +} + +function cleanPath (path) { + return path.replace(/\/\//g, '/') +} + +var isarray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +/** + * Expose `pathToRegexp`. + */ +var pathToRegexp_1 = pathToRegexp; +var parse_1 = parse; +var compile_1 = compile; +var tokensToFunction_1 = tokensToFunction; +var tokensToRegExp_1 = tokensToRegExp; + +/** + * The main path matching regexp utility. + * + * @type {RegExp} + */ +var PATH_REGEXP = new RegExp([ + // Match escaped characters that would otherwise appear in future matches. + // This allows the user to escape special characters that won't transform. + '(\\\\.)', + // Match Express-style parameters and un-named parameters with a prefix + // and optional suffixes. Matches appear as: + // + // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined] + // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined] + // "/*" => ["/", undefined, undefined, undefined, undefined, "*"] + '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))' +].join('|'), 'g'); + +/** + * Parse a string for the raw tokens. + * + * @param {string} str + * @param {Object=} options + * @return {!Array} + */ +function parse (str, options) { + var tokens = []; + var key = 0; + var index = 0; + var path = ''; + var defaultDelimiter = options && options.delimiter || '/'; + var res; + + while ((res = PATH_REGEXP.exec(str)) != null) { + var m = res[0]; + var escaped = res[1]; + var offset = res.index; + path += str.slice(index, offset); + index = offset + m.length; + + // Ignore already escaped sequences. + if (escaped) { + path += escaped[1]; + continue + } + + var next = str[index]; + var prefix = res[2]; + var name = res[3]; + var capture = res[4]; + var group = res[5]; + var modifier = res[6]; + var asterisk = res[7]; + + // Push the current path onto the tokens. + if (path) { + tokens.push(path); + path = ''; + } + + var partial = prefix != null && next != null && next !== prefix; + var repeat = modifier === '+' || modifier === '*'; + var optional = modifier === '?' || modifier === '*'; + var delimiter = res[2] || defaultDelimiter; + var pattern = capture || group; + + tokens.push({ + name: name || key++, + prefix: prefix || '', + delimiter: delimiter, + optional: optional, + repeat: repeat, + partial: partial, + asterisk: !!asterisk, + pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?') + }); + } + + // Match any characters still remaining. + if (index < str.length) { + path += str.substr(index); + } + + // If the path exists, push it onto the end. + if (path) { + tokens.push(path); + } + + return tokens +} + +/** + * Compile a string to a template function for the path. + * + * @param {string} str + * @param {Object=} options + * @return {!function(Object=, Object=)} + */ +function compile (str, options) { + return tokensToFunction(parse(str, options)) +} + +/** + * Prettier encoding of URI path segments. + * + * @param {string} + * @return {string} + */ +function encodeURIComponentPretty (str) { + return encodeURI(str).replace(/[\/?#]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +/** + * Encode the asterisk parameter. Similar to `pretty`, but allows slashes. + * + * @param {string} + * @return {string} + */ +function encodeAsterisk (str) { + return encodeURI(str).replace(/[?#]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +/** + * Expose a method for transforming tokens into the path function. + */ +function tokensToFunction (tokens) { + // Compile all the tokens into regexps. + var matches = new Array(tokens.length); + + // Compile all the patterns before compilation. + for (var i = 0; i < tokens.length; i++) { + if (typeof tokens[i] === 'object') { + matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$'); + } + } + + return function (obj, opts) { + var path = ''; + var data = obj || {}; + var options = opts || {}; + var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent; + + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + + if (typeof token === 'string') { + path += token; + + continue + } + + var value = data[token.name]; + var segment; + + if (value == null) { + if (token.optional) { + // Prepend partial segment prefixes. + if (token.partial) { + path += token.prefix; + } + + continue + } else { + throw new TypeError('Expected "' + token.name + '" to be defined') + } + } + + if (isarray(value)) { + if (!token.repeat) { + throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`') + } + + if (value.length === 0) { + if (token.optional) { + continue + } else { + throw new TypeError('Expected "' + token.name + '" to not be empty') + } + } + + for (var j = 0; j < value.length; j++) { + segment = encode(value[j]); + + if (!matches[i].test(segment)) { + throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`') + } + + path += (j === 0 ? token.prefix : token.delimiter) + segment; + } + + continue + } + + segment = token.asterisk ? encodeAsterisk(value) : encode(value); + + if (!matches[i].test(segment)) { + throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"') + } + + path += token.prefix + segment; + } + + return path + } +} + +/** + * Escape a regular expression string. + * + * @param {string} str + * @return {string} + */ +function escapeString (str) { + return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1') +} + +/** + * Escape the capturing group by escaping special characters and meaning. + * + * @param {string} group + * @return {string} + */ +function escapeGroup (group) { + return group.replace(/([=!:$\/()])/g, '\\$1') +} + +/** + * Attach the keys as a property of the regexp. + * + * @param {!RegExp} re + * @param {Array} keys + * @return {!RegExp} + */ +function attachKeys (re, keys) { + re.keys = keys; + return re +} + +/** + * Get the flags for a regexp from the options. + * + * @param {Object} options + * @return {string} + */ +function flags (options) { + return options.sensitive ? '' : 'i' +} + +/** + * Pull out keys from a regexp. + * + * @param {!RegExp} path + * @param {!Array} keys + * @return {!RegExp} + */ +function regexpToRegexp (path, keys) { + // Use a negative lookahead to match only capturing groups. + var groups = path.source.match(/\((?!\?)/g); + + if (groups) { + for (var i = 0; i < groups.length; i++) { + keys.push({ + name: i, + prefix: null, + delimiter: null, + optional: false, + repeat: false, + partial: false, + asterisk: false, + pattern: null + }); + } + } + + return attachKeys(path, keys) +} + +/** + * Transform an array into a regexp. + * + * @param {!Array} path + * @param {Array} keys + * @param {!Object} options + * @return {!RegExp} + */ +function arrayToRegexp (path, keys, options) { + var parts = []; + + for (var i = 0; i < path.length; i++) { + parts.push(pathToRegexp(path[i], keys, options).source); + } + + var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options)); + + return attachKeys(regexp, keys) +} + +/** + * Create a path regexp from string input. + * + * @param {string} path + * @param {!Array} keys + * @param {!Object} options + * @return {!RegExp} + */ +function stringToRegexp (path, keys, options) { + return tokensToRegExp(parse(path, options), keys, options) +} + +/** + * Expose a function for taking tokens and returning a RegExp. + * + * @param {!Array} tokens + * @param {(Array|Object)=} keys + * @param {Object=} options + * @return {!RegExp} + */ +function tokensToRegExp (tokens, keys, options) { + if (!isarray(keys)) { + options = /** @type {!Object} */ (keys || options); + keys = []; + } + + options = options || {}; + + var strict = options.strict; + var end = options.end !== false; + var route = ''; + + // Iterate over the tokens and create our regexp string. + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + + if (typeof token === 'string') { + route += escapeString(token); + } else { + var prefix = escapeString(token.prefix); + var capture = '(?:' + token.pattern + ')'; + + keys.push(token); + + if (token.repeat) { + capture += '(?:' + prefix + capture + ')*'; + } + + if (token.optional) { + if (!token.partial) { + capture = '(?:' + prefix + '(' + capture + '))?'; + } else { + capture = prefix + '(' + capture + ')?'; + } + } else { + capture = prefix + '(' + capture + ')'; + } + + route += capture; + } + } + + var delimiter = escapeString(options.delimiter || '/'); + var endsWithDelimiter = route.slice(-delimiter.length) === delimiter; + + // In non-strict mode we allow a slash at the end of match. If the path to + // match already ends with a slash, we remove it for consistency. The slash + // is valid at the end of a path match, not in the middle. This is important + // in non-ending mode, where "/test/" shouldn't match "/test//route". + if (!strict) { + route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'; + } + + if (end) { + route += '$'; + } else { + // In non-ending mode, we need the capturing groups to match as much as + // possible by using a positive lookahead to the end or next path segment. + route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'; + } + + return attachKeys(new RegExp('^' + route, flags(options)), keys) +} + +/** + * Normalize the given path string, returning a regular expression. + * + * An empty array can be passed in for the keys, which will hold the + * placeholder key descriptions. For example, using `/user/:id`, `keys` will + * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`. + * + * @param {(string|RegExp|Array)} path + * @param {(Array|Object)=} keys + * @param {Object=} options + * @return {!RegExp} + */ +function pathToRegexp (path, keys, options) { + if (!isarray(keys)) { + options = /** @type {!Object} */ (keys || options); + keys = []; + } + + options = options || {}; + + if (path instanceof RegExp) { + return regexpToRegexp(path, /** @type {!Array} */ (keys)) + } + + if (isarray(path)) { + return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options) + } + + return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options) +} +pathToRegexp_1.parse = parse_1; +pathToRegexp_1.compile = compile_1; +pathToRegexp_1.tokensToFunction = tokensToFunction_1; +pathToRegexp_1.tokensToRegExp = tokensToRegExp_1; + +/* */ + +// $flow-disable-line +const regexpCompileCache = Object.create(null); + +function fillParams ( + path, + params, + routeMsg +) { + params = params || {}; + try { + const filler = + regexpCompileCache[path] || + (regexpCompileCache[path] = pathToRegexp_1.compile(path)); + + // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }} + if (params.pathMatch) params[0] = params.pathMatch; + + return filler(params, { pretty: true }) + } catch (e) { + { + warn(false, `missing param for ${routeMsg}: ${e.message}`); + } + return '' + } finally { + // delete the 0 if it was added + delete params[0]; + } +} + +/* */ + +function createRouteMap ( + routes, + oldPathList, + oldPathMap, + oldNameMap +) { + // the path list is used to control path matching priority + const pathList = oldPathList || []; + // $flow-disable-line + const pathMap = oldPathMap || Object.create(null); + // $flow-disable-line + const nameMap = oldNameMap || Object.create(null); + + routes.forEach(route => { + addRouteRecord(pathList, pathMap, nameMap, route); + }); + + // ensure wildcard routes are always at the end + for (let i = 0, l = pathList.length; i < l; i++) { + if (pathList[i] === '*') { + pathList.push(pathList.splice(i, 1)[0]); + l--; + i--; + } + } + + return { + pathList, + pathMap, + nameMap + } +} + +function addRouteRecord ( + pathList, + pathMap, + nameMap, + route, + parent, + matchAs +) { + const { path, name } = route; + { + assert(path != null, `"path" is required in a route configuration.`); + assert( + typeof route.component !== 'string', + `route config "component" for path: ${String(path || name)} cannot be a ` + + `string id. Use an actual component instead.` + ); + } + + const pathToRegexpOptions = route.pathToRegexpOptions || {}; + const normalizedPath = normalizePath( + path, + parent, + pathToRegexpOptions.strict + ); + + if (typeof route.caseSensitive === 'boolean') { + pathToRegexpOptions.sensitive = route.caseSensitive; + } + + const record = { + path: normalizedPath, + regex: compileRouteRegex(normalizedPath, pathToRegexpOptions), + components: route.components || { default: route.component }, + instances: {}, + name, + parent, + matchAs, + redirect: route.redirect, + beforeEnter: route.beforeEnter, + meta: route.meta || {}, + props: route.props == null + ? {} + : route.components + ? route.props + : { default: route.props } + }; + + if (route.children) { + // Warn if route is named, does not redirect and has a default child route. + // If users navigate to this route by name, the default child will + // not be rendered (GH Issue #629) + { + if (route.name && !route.redirect && route.children.some(child => /^\/?$/.test(child.path))) { + warn( + false, + `Named Route '${route.name}' has a default child route. ` + + `When navigating to this named route (:to="{name: '${route.name}'"), ` + + `the default child route will not be rendered. Remove the name from ` + + `this route and use the name of the default child route for named ` + + `links instead.` + ); + } + } + route.children.forEach(child => { + const childMatchAs = matchAs + ? cleanPath(`${matchAs}/${child.path}`) + : undefined; + addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs); + }); + } + + if (route.alias !== undefined) { + const aliases = Array.isArray(route.alias) + ? route.alias + : [route.alias]; + + aliases.forEach(alias => { + const aliasRoute = { + path: alias, + children: route.children + }; + addRouteRecord( + pathList, + pathMap, + nameMap, + aliasRoute, + parent, + record.path || '/' // matchAs + ); + }); + } + + if (!pathMap[record.path]) { + pathList.push(record.path); + pathMap[record.path] = record; + } + + if (name) { + if (!nameMap[name]) { + nameMap[name] = record; + } else if ("development" !== 'production' && !matchAs) { + warn( + false, + `Duplicate named routes definition: ` + + `{ name: "${name}", path: "${record.path}" }` + ); + } + } +} + +function compileRouteRegex (path, pathToRegexpOptions) { + const regex = pathToRegexp_1(path, [], pathToRegexpOptions); + { + const keys = Object.create(null); + regex.keys.forEach(key => { + warn(!keys[key.name], `Duplicate param keys in route with path: "${path}"`); + keys[key.name] = true; + }); + } + return regex +} + +function normalizePath (path, parent, strict) { + if (!strict) path = path.replace(/\/$/, ''); + if (path[0] === '/') return path + if (parent == null) return path + return cleanPath(`${parent.path}/${path}`) +} + +/* */ + +function normalizeLocation ( + raw, + current, + append, + router +) { + let next = typeof raw === 'string' ? { path: raw } : raw; + // named target + if (next._normalized) { + return next + } else if (next.name) { + return extend({}, raw) + } + + // relative params + if (!next.path && next.params && current) { + next = extend({}, next); + next._normalized = true; + const params = extend(extend({}, current.params), next.params); + if (current.name) { + next.name = current.name; + next.params = params; + } else if (current.matched.length) { + const rawPath = current.matched[current.matched.length - 1].path; + next.path = fillParams(rawPath, params, `path ${current.path}`); + } else { + warn(false, `relative params navigation requires a current route.`); + } + return next + } + + const parsedPath = parsePath(next.path || ''); + const basePath = (current && current.path) || '/'; + const path = parsedPath.path + ? resolvePath(parsedPath.path, basePath, append || next.append) + : basePath; + + const query = resolveQuery( + parsedPath.query, + next.query, + router && router.options.parseQuery + ); + + let hash = next.hash || parsedPath.hash; + if (hash && hash.charAt(0) !== '#') { + hash = `#${hash}`; + } + + return { + _normalized: true, + path, + query, + hash + } +} + +/* */ + + + +function createMatcher ( + routes, + router +) { + const { pathList, pathMap, nameMap } = createRouteMap(routes); + + function addRoutes (routes) { + createRouteMap(routes, pathList, pathMap, nameMap); + } + + function match ( + raw, + currentRoute, + redirectedFrom + ) { + const location = normalizeLocation(raw, currentRoute, false, router); + const { name } = location; + + if (name) { + const record = nameMap[name]; + { + warn(record, `Route with name '${name}' does not exist`); + } + if (!record) return _createRoute(null, location) + const paramNames = record.regex.keys + .filter(key => !key.optional) + .map(key => key.name); + + if (typeof location.params !== 'object') { + location.params = {}; + } + + if (currentRoute && typeof currentRoute.params === 'object') { + for (const key in currentRoute.params) { + if (!(key in location.params) && paramNames.indexOf(key) > -1) { + location.params[key] = currentRoute.params[key]; + } + } + } + + if (record) { + location.path = fillParams(record.path, location.params, `named route "${name}"`); + return _createRoute(record, location, redirectedFrom) + } + } else if (location.path) { + location.params = {}; + for (let i = 0; i < pathList.length; i++) { + const path = pathList[i]; + const record = pathMap[path]; + if (matchRoute(record.regex, location.path, location.params)) { + return _createRoute(record, location, redirectedFrom) + } + } + } + // no match + return _createRoute(null, location) + } + + function redirect ( + record, + location + ) { + const originalRedirect = record.redirect; + let redirect = typeof originalRedirect === 'function' + ? originalRedirect(createRoute(record, location, null, router)) + : originalRedirect; + + if (typeof redirect === 'string') { + redirect = { path: redirect }; + } + + if (!redirect || typeof redirect !== 'object') { + { + warn( + false, `invalid redirect option: ${JSON.stringify(redirect)}` + ); + } + return _createRoute(null, location) + } + + const re = redirect; + const { name, path } = re; + let { query, hash, params } = location; + query = re.hasOwnProperty('query') ? re.query : query; + hash = re.hasOwnProperty('hash') ? re.hash : hash; + params = re.hasOwnProperty('params') ? re.params : params; + + if (name) { + // resolved named direct + const targetRecord = nameMap[name]; + { + assert(targetRecord, `redirect failed: named route "${name}" not found.`); + } + return match({ + _normalized: true, + name, + query, + hash, + params + }, undefined, location) + } else if (path) { + // 1. resolve relative redirect + const rawPath = resolveRecordPath(path, record); + // 2. resolve params + const resolvedPath = fillParams(rawPath, params, `redirect route with path "${rawPath}"`); + // 3. rematch with existing query and hash + return match({ + _normalized: true, + path: resolvedPath, + query, + hash + }, undefined, location) + } else { + { + warn(false, `invalid redirect option: ${JSON.stringify(redirect)}`); + } + return _createRoute(null, location) + } + } + + function alias ( + record, + location, + matchAs + ) { + const aliasedPath = fillParams(matchAs, location.params, `aliased route with path "${matchAs}"`); + const aliasedMatch = match({ + _normalized: true, + path: aliasedPath + }); + if (aliasedMatch) { + const matched = aliasedMatch.matched; + const aliasedRecord = matched[matched.length - 1]; + location.params = aliasedMatch.params; + return _createRoute(aliasedRecord, location) + } + return _createRoute(null, location) + } + + function _createRoute ( + record, + location, + redirectedFrom + ) { + if (record && record.redirect) { + return redirect(record, redirectedFrom || location) + } + if (record && record.matchAs) { + return alias(record, location, record.matchAs) + } + return createRoute(record, location, redirectedFrom, router) + } + + return { + match, + addRoutes + } +} + +function matchRoute ( + regex, + path, + params +) { + const m = path.match(regex); + + if (!m) { + return false + } else if (!params) { + return true + } + + for (let i = 1, len = m.length; i < len; ++i) { + const key = regex.keys[i - 1]; + const val = typeof m[i] === 'string' ? decodeURIComponent(m[i]) : m[i]; + if (key) { + // Fix #1994: using * with props: true generates a param named 0 + params[key.name || 'pathMatch'] = val; + } + } + + return true +} + +function resolveRecordPath (path, record) { + return resolvePath(path, record.parent ? record.parent.path : '/', true) +} + +/* */ + +const positionStore = Object.create(null); + +function setupScroll () { + // Fix for #1585 for Firefox + // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678 + window.history.replaceState({ key: getStateKey() }, '', window.location.href.replace(window.location.origin, '')); + window.addEventListener('popstate', e => { + saveScrollPosition(); + if (e.state && e.state.key) { + setStateKey(e.state.key); + } + }); +} + +function handleScroll ( + router, + to, + from, + isPop +) { + if (!router.app) { + return + } + + const behavior = router.options.scrollBehavior; + if (!behavior) { + return + } + + { + assert(typeof behavior === 'function', `scrollBehavior must be a function`); + } + + // wait until re-render finishes before scrolling + router.app.$nextTick(() => { + const position = getScrollPosition(); + const shouldScroll = behavior.call(router, to, from, isPop ? position : null); + + if (!shouldScroll) { + return + } + + if (typeof shouldScroll.then === 'function') { + shouldScroll.then(shouldScroll => { + scrollToPosition((shouldScroll), position); + }).catch(err => { + { + assert(false, err.toString()); + } + }); + } else { + scrollToPosition(shouldScroll, position); + } + }); +} + +function saveScrollPosition () { + const key = getStateKey(); + if (key) { + positionStore[key] = { + x: window.pageXOffset, + y: window.pageYOffset + }; + } +} + +function getScrollPosition () { + const key = getStateKey(); + if (key) { + return positionStore[key] + } +} + +function getElementPosition (el, offset) { + const docEl = document.documentElement; + const docRect = docEl.getBoundingClientRect(); + const elRect = el.getBoundingClientRect(); + return { + x: elRect.left - docRect.left - offset.x, + y: elRect.top - docRect.top - offset.y + } +} + +function isValidPosition (obj) { + return isNumber(obj.x) || isNumber(obj.y) +} + +function normalizePosition (obj) { + return { + x: isNumber(obj.x) ? obj.x : window.pageXOffset, + y: isNumber(obj.y) ? obj.y : window.pageYOffset + } +} + +function normalizeOffset (obj) { + return { + x: isNumber(obj.x) ? obj.x : 0, + y: isNumber(obj.y) ? obj.y : 0 + } +} + +function isNumber (v) { + return typeof v === 'number' +} + +function scrollToPosition (shouldScroll, position) { + const isObject = typeof shouldScroll === 'object'; + if (isObject && typeof shouldScroll.selector === 'string') { + const el = document.querySelector(shouldScroll.selector); + if (el) { + let offset = shouldScroll.offset && typeof shouldScroll.offset === 'object' ? shouldScroll.offset : {}; + offset = normalizeOffset(offset); + position = getElementPosition(el, offset); + } else if (isValidPosition(shouldScroll)) { + position = normalizePosition(shouldScroll); + } + } else if (isObject && isValidPosition(shouldScroll)) { + position = normalizePosition(shouldScroll); + } + + if (position) { + window.scrollTo(position.x, position.y); + } +} + +/* */ + +const supportsPushState = inBrowser && (function () { + const ua = window.navigator.userAgent; + + if ( + (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && + ua.indexOf('Mobile Safari') !== -1 && + ua.indexOf('Chrome') === -1 && + ua.indexOf('Windows Phone') === -1 + ) { + return false + } + + return window.history && 'pushState' in window.history +})(); + +// use User Timing api (if present) for more accurate key precision +const Time = inBrowser && window.performance && window.performance.now + ? window.performance + : Date; + +let _key = genKey(); + +function genKey () { + return Time.now().toFixed(3) +} + +function getStateKey () { + return _key +} + +function setStateKey (key) { + _key = key; +} + +function pushState (url, replace) { + saveScrollPosition(); + // try...catch the pushState call to get around Safari + // DOM Exception 18 where it limits to 100 pushState calls + const history = window.history; + try { + if (replace) { + history.replaceState({ key: _key }, '', url); + } else { + _key = genKey(); + history.pushState({ key: _key }, '', url); + } + } catch (e) { + window.location[replace ? 'replace' : 'assign'](url); + } +} + +function replaceState (url) { + pushState(url, true); +} + +/* */ + +function runQueue (queue, fn, cb) { + const step = index => { + if (index >= queue.length) { + cb(); + } else { + if (queue[index]) { + fn(queue[index], () => { + step(index + 1); + }); + } else { + step(index + 1); + } + } + }; + step(0); +} + +/* */ + +function resolveAsyncComponents (matched) { + return (to, from, next) => { + let hasAsync = false; + let pending = 0; + let error = null; + + flatMapComponents(matched, (def, _, match, key) => { + // if it's a function and doesn't have cid attached, + // assume it's an async component resolve function. + // we are not using Vue's default async resolving mechanism because + // we want to halt the navigation until the incoming component has been + // resolved. + if (typeof def === 'function' && def.cid === undefined) { + hasAsync = true; + pending++; + + const resolve = once(resolvedDef => { + if (isESModule(resolvedDef)) { + resolvedDef = resolvedDef.default; + } + // save resolved on async factory in case it's used elsewhere + def.resolved = typeof resolvedDef === 'function' + ? resolvedDef + : _Vue.extend(resolvedDef); + match.components[key] = resolvedDef; + pending--; + if (pending <= 0) { + next(); + } + }); + + const reject = once(reason => { + const msg = `Failed to resolve async component ${key}: ${reason}`; + "development" !== 'production' && warn(false, msg); + if (!error) { + error = isError(reason) + ? reason + : new Error(msg); + next(error); + } + }); + + let res; + try { + res = def(resolve, reject); + } catch (e) { + reject(e); + } + if (res) { + if (typeof res.then === 'function') { + res.then(resolve, reject); + } else { + // new syntax in Vue 2.3 + const comp = res.component; + if (comp && typeof comp.then === 'function') { + comp.then(resolve, reject); + } + } + } + } + }); + + if (!hasAsync) next(); + } +} + +function flatMapComponents ( + matched, + fn +) { + return flatten(matched.map(m => { + return Object.keys(m.components).map(key => fn( + m.components[key], + m.instances[key], + m, key + )) + })) +} + +function flatten (arr) { + return Array.prototype.concat.apply([], arr) +} + +const hasSymbol = + typeof Symbol === 'function' && + typeof Symbol.toStringTag === 'symbol'; + +function isESModule (obj) { + return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module') +} + +// in Webpack 2, require.ensure now also returns a Promise +// so the resolve/reject functions may get called an extra time +// if the user uses an arrow function shorthand that happens to +// return that Promise. +function once (fn) { + let called = false; + return function (...args) { + if (called) return + called = true; + return fn.apply(this, args) + } +} + +/* */ + +class History { + + + + + + + + + + + // implemented by sub-classes + + + + + + + constructor (router, base) { + this.router = router; + this.base = normalizeBase(base); + // start with a route object that stands for "nowhere" + this.current = START; + this.pending = null; + this.ready = false; + this.readyCbs = []; + this.readyErrorCbs = []; + this.errorCbs = []; + } + + listen (cb) { + this.cb = cb; + } + + onReady (cb, errorCb) { + if (this.ready) { + cb(); + } else { + this.readyCbs.push(cb); + if (errorCb) { + this.readyErrorCbs.push(errorCb); + } + } + } + + onError (errorCb) { + this.errorCbs.push(errorCb); + } + + transitionTo (location, onComplete, onAbort) { + const route = this.router.match(location, this.current); + this.confirmTransition(route, () => { + this.updateRoute(route); + onComplete && onComplete(route); + this.ensureURL(); + + // fire ready cbs once + if (!this.ready) { + this.ready = true; + this.readyCbs.forEach(cb => { cb(route); }); + } + }, err => { + if (onAbort) { + onAbort(err); + } + if (err && !this.ready) { + this.ready = true; + this.readyErrorCbs.forEach(cb => { cb(err); }); + } + }); + } + + confirmTransition (route, onComplete, onAbort) { + const current = this.current; + const abort = err => { + if (isError(err)) { + if (this.errorCbs.length) { + this.errorCbs.forEach(cb => { cb(err); }); + } else { + warn(false, 'uncaught error during route navigation:'); + console.error(err); + } + } + onAbort && onAbort(err); + }; + if ( + isSameRoute(route, current) && + // in the case the route map has been dynamically appended to + route.matched.length === current.matched.length + ) { + this.ensureURL(); + return abort() + } + + const { + updated, + deactivated, + activated + } = resolveQueue(this.current.matched, route.matched); + + const queue = [].concat( + // in-component leave guards + extractLeaveGuards(deactivated), + // global before hooks + this.router.beforeHooks, + // in-component update hooks + extractUpdateHooks(updated), + // in-config enter guards + activated.map(m => m.beforeEnter), + // async components + resolveAsyncComponents(activated) + ); + + this.pending = route; + const iterator = (hook, next) => { + if (this.pending !== route) { + return abort() + } + try { + hook(route, current, (to) => { + if (to === false || isError(to)) { + // next(false) -> abort navigation, ensure current URL + this.ensureURL(true); + abort(to); + } else if ( + typeof to === 'string' || + (typeof to === 'object' && ( + typeof to.path === 'string' || + typeof to.name === 'string' + )) + ) { + // next('/') or next({ path: '/' }) -> redirect + abort(); + if (typeof to === 'object' && to.replace) { + this.replace(to); + } else { + this.push(to); + } + } else { + // confirm transition and pass on the value + next(to); + } + }); + } catch (e) { + abort(e); + } + }; + + runQueue(queue, iterator, () => { + const postEnterCbs = []; + const isValid = () => this.current === route; + // wait until async components are resolved before + // extracting in-component enter guards + const enterGuards = extractEnterGuards(activated, postEnterCbs, isValid); + const queue = enterGuards.concat(this.router.resolveHooks); + runQueue(queue, iterator, () => { + if (this.pending !== route) { + return abort() + } + this.pending = null; + onComplete(route); + if (this.router.app) { + this.router.app.$nextTick(() => { + postEnterCbs.forEach(cb => { cb(); }); + }); + } + }); + }); + } + + updateRoute (route) { + const prev = this.current; + this.current = route; + this.cb && this.cb(route); + this.router.afterHooks.forEach(hook => { + hook && hook(route, prev); + }); + } +} + +function normalizeBase (base) { + if (!base) { + if (inBrowser) { + // respect tag + const baseEl = document.querySelector('base'); + base = (baseEl && baseEl.getAttribute('href')) || '/'; + // strip full URL origin + base = base.replace(/^https?:\/\/[^\/]+/, ''); + } else { + base = '/'; + } + } + // make sure there's the starting slash + if (base.charAt(0) !== '/') { + base = '/' + base; + } + // remove trailing slash + return base.replace(/\/$/, '') +} + +function resolveQueue ( + current, + next +) { + let i; + const max = Math.max(current.length, next.length); + for (i = 0; i < max; i++) { + if (current[i] !== next[i]) { + break + } + } + return { + updated: next.slice(0, i), + activated: next.slice(i), + deactivated: current.slice(i) + } +} + +function extractGuards ( + records, + name, + bind, + reverse +) { + const guards = flatMapComponents(records, (def, instance, match, key) => { + const guard = extractGuard(def, name); + if (guard) { + return Array.isArray(guard) + ? guard.map(guard => bind(guard, instance, match, key)) + : bind(guard, instance, match, key) + } + }); + return flatten(reverse ? guards.reverse() : guards) +} + +function extractGuard ( + def, + key +) { + if (typeof def !== 'function') { + // extend now so that global mixins are applied. + def = _Vue.extend(def); + } + return def.options[key] +} + +function extractLeaveGuards (deactivated) { + return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true) +} + +function extractUpdateHooks (updated) { + return extractGuards(updated, 'beforeRouteUpdate', bindGuard) +} + +function bindGuard (guard, instance) { + if (instance) { + return function boundRouteGuard () { + return guard.apply(instance, arguments) + } + } +} + +function extractEnterGuards ( + activated, + cbs, + isValid +) { + return extractGuards(activated, 'beforeRouteEnter', (guard, _, match, key) => { + return bindEnterGuard(guard, match, key, cbs, isValid) + }) +} + +function bindEnterGuard ( + guard, + match, + key, + cbs, + isValid +) { + return function routeEnterGuard (to, from, next) { + return guard(to, from, cb => { + next(cb); + if (typeof cb === 'function') { + cbs.push(() => { + // #750 + // if a router-view is wrapped with an out-in transition, + // the instance may not have been registered at this time. + // we will need to poll for registration until current route + // is no longer valid. + poll(cb, match.instances, key, isValid); + }); + } + }) + } +} + +function poll ( + cb, // somehow flow cannot infer this is a function + instances, + key, + isValid +) { + if ( + instances[key] && + !instances[key]._isBeingDestroyed // do not reuse being destroyed instance + ) { + cb(instances[key]); + } else if (isValid()) { + setTimeout(() => { + poll(cb, instances, key, isValid); + }, 16); + } +} + +/* */ + +class HTML5History extends History { + constructor (router, base) { + super(router, base); + + const expectScroll = router.options.scrollBehavior; + const supportsScroll = supportsPushState && expectScroll; + + if (supportsScroll) { + setupScroll(); + } + + const initLocation = getLocation(this.base); + window.addEventListener('popstate', e => { + const current = this.current; + + // Avoiding first `popstate` event dispatched in some browsers but first + // history route not updated since async guard at the same time. + const location = getLocation(this.base); + if (this.current === START && location === initLocation) { + return + } + + this.transitionTo(location, route => { + if (supportsScroll) { + handleScroll(router, route, current, true); + } + }); + }); + } + + go (n) { + window.history.go(n); + } + + push (location, onComplete, onAbort) { + const { current: fromRoute } = this; + this.transitionTo(location, route => { + pushState(cleanPath(this.base + route.fullPath)); + handleScroll(this.router, route, fromRoute, false); + onComplete && onComplete(route); + }, onAbort); + } + + replace (location, onComplete, onAbort) { + const { current: fromRoute } = this; + this.transitionTo(location, route => { + replaceState(cleanPath(this.base + route.fullPath)); + handleScroll(this.router, route, fromRoute, false); + onComplete && onComplete(route); + }, onAbort); + } + + ensureURL (push) { + if (getLocation(this.base) !== this.current.fullPath) { + const current = cleanPath(this.base + this.current.fullPath); + push ? pushState(current) : replaceState(current); + } + } + + getCurrentLocation () { + return getLocation(this.base) + } +} + +function getLocation (base) { + let path = decodeURI(window.location.pathname); + if (base && path.indexOf(base) === 0) { + path = path.slice(base.length); + } + return (path || '/') + window.location.search + window.location.hash +} + +/* */ + +class HashHistory extends History { + constructor (router, base, fallback) { + super(router, base); + // check history fallback deeplinking + if (fallback && checkFallback(this.base)) { + return + } + ensureSlash(); + } + + // this is delayed until the app mounts + // to avoid the hashchange listener being fired too early + setupListeners () { + const router = this.router; + const expectScroll = router.options.scrollBehavior; + const supportsScroll = supportsPushState && expectScroll; + + if (supportsScroll) { + setupScroll(); + } + + window.addEventListener(supportsPushState ? 'popstate' : 'hashchange', () => { + const current = this.current; + if (!ensureSlash()) { + return + } + this.transitionTo(getHash(), route => { + if (supportsScroll) { + handleScroll(this.router, route, current, true); + } + if (!supportsPushState) { + replaceHash(route.fullPath); + } + }); + }); + } + + push (location, onComplete, onAbort) { + const { current: fromRoute } = this; + this.transitionTo(location, route => { + pushHash(route.fullPath); + handleScroll(this.router, route, fromRoute, false); + onComplete && onComplete(route); + }, onAbort); + } + + replace (location, onComplete, onAbort) { + const { current: fromRoute } = this; + this.transitionTo(location, route => { + replaceHash(route.fullPath); + handleScroll(this.router, route, fromRoute, false); + onComplete && onComplete(route); + }, onAbort); + } + + go (n) { + window.history.go(n); + } + + ensureURL (push) { + const current = this.current.fullPath; + if (getHash() !== current) { + push ? pushHash(current) : replaceHash(current); + } + } + + getCurrentLocation () { + return getHash() + } +} + +function checkFallback (base) { + const location = getLocation(base); + if (!/^\/#/.test(location)) { + window.location.replace( + cleanPath(base + '/#' + location) + ); + return true + } +} + +function ensureSlash () { + const path = getHash(); + if (path.charAt(0) === '/') { + return true + } + replaceHash('/' + path); + return false +} + +function getHash () { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + let href = window.location.href; + const index = href.indexOf('#'); + // empty path + if (index < 0) return '' + + href = href.slice(index + 1); + // decode the hash but not the search or hash + // as search(query) is already decoded + // https://github.com/vuejs/vue-router/issues/2708 + const searchIndex = href.indexOf('?'); + if (searchIndex < 0) { + const hashIndex = href.indexOf('#'); + if (hashIndex > -1) href = decodeURI(href.slice(0, hashIndex)) + href.slice(hashIndex); + else href = decodeURI(href); + } else { + if (searchIndex > -1) href = decodeURI(href.slice(0, searchIndex)) + href.slice(searchIndex); + } + + return href +} + +function getUrl (path) { + const href = window.location.href; + const i = href.indexOf('#'); + const base = i >= 0 ? href.slice(0, i) : href; + return `${base}#${path}` +} + +function pushHash (path) { + if (supportsPushState) { + pushState(getUrl(path)); + } else { + window.location.hash = path; + } +} + +function replaceHash (path) { + if (supportsPushState) { + replaceState(getUrl(path)); + } else { + window.location.replace(getUrl(path)); + } +} + +/* */ + +class AbstractHistory extends History { + + + + constructor (router, base) { + super(router, base); + this.stack = []; + this.index = -1; + } + + push (location, onComplete, onAbort) { + this.transitionTo(location, route => { + this.stack = this.stack.slice(0, this.index + 1).concat(route); + this.index++; + onComplete && onComplete(route); + }, onAbort); + } + + replace (location, onComplete, onAbort) { + this.transitionTo(location, route => { + this.stack = this.stack.slice(0, this.index).concat(route); + onComplete && onComplete(route); + }, onAbort); + } + + go (n) { + const targetIndex = this.index + n; + if (targetIndex < 0 || targetIndex >= this.stack.length) { + return + } + const route = this.stack[targetIndex]; + this.confirmTransition(route, () => { + this.index = targetIndex; + this.updateRoute(route); + }); + } + + getCurrentLocation () { + const current = this.stack[this.stack.length - 1]; + return current ? current.fullPath : '/' + } + + ensureURL () { + // noop + } +} + +/* */ + + + +class VueRouter { + + + + + + + + + + + + + + + + + constructor (options = {}) { + this.app = null; + this.apps = []; + this.options = options; + this.beforeHooks = []; + this.resolveHooks = []; + this.afterHooks = []; + this.matcher = createMatcher(options.routes || [], this); + + let mode = options.mode || 'hash'; + this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false; + if (this.fallback) { + mode = 'hash'; + } + if (!inBrowser) { + mode = 'abstract'; + } + this.mode = mode; + + switch (mode) { + case 'history': + this.history = new HTML5History(this, options.base); + break + case 'hash': + this.history = new HashHistory(this, options.base, this.fallback); + break + case 'abstract': + this.history = new AbstractHistory(this, options.base); + break + default: + { + assert(false, `invalid mode: ${mode}`); + } + } + } + + match ( + raw, + current, + redirectedFrom + ) { + return this.matcher.match(raw, current, redirectedFrom) + } + + get currentRoute () { + return this.history && this.history.current + } + + init (app /* Vue component instance */) { + "development" !== 'production' && assert( + install.installed, + `not installed. Make sure to call \`Vue.use(VueRouter)\` ` + + `before creating root instance.` + ); + + this.apps.push(app); + + // set up app destroyed handler + // https://github.com/vuejs/vue-router/issues/2639 + app.$once('hook:destroyed', () => { + // clean out app from this.apps array once destroyed + const index = this.apps.indexOf(app); + if (index > -1) this.apps.splice(index, 1); + // ensure we still have a main app or null if no apps + // we do not release the router so it can be reused + if (this.app === app) this.app = this.apps[0] || null; + }); + + // main app previously initialized + // return as we don't need to set up new history listener + if (this.app) { + return + } + + this.app = app; + + const history = this.history; + + if (history instanceof HTML5History) { + history.transitionTo(history.getCurrentLocation()); + } else if (history instanceof HashHistory) { + const setupHashListener = () => { + history.setupListeners(); + }; + history.transitionTo( + history.getCurrentLocation(), + setupHashListener, + setupHashListener + ); + } + + history.listen(route => { + this.apps.forEach((app) => { + app._route = route; + }); + }); + } + + beforeEach (fn) { + return registerHook(this.beforeHooks, fn) + } + + beforeResolve (fn) { + return registerHook(this.resolveHooks, fn) + } + + afterEach (fn) { + return registerHook(this.afterHooks, fn) + } + + onReady (cb, errorCb) { + this.history.onReady(cb, errorCb); + } + + onError (errorCb) { + this.history.onError(errorCb); + } + + push (location, onComplete, onAbort) { + this.history.push(location, onComplete, onAbort); + } + + replace (location, onComplete, onAbort) { + this.history.replace(location, onComplete, onAbort); + } + + go (n) { + this.history.go(n); + } + + back () { + this.go(-1); + } + + forward () { + this.go(1); + } + + getMatchedComponents (to) { + const route = to + ? to.matched + ? to + : this.resolve(to).route + : this.currentRoute; + if (!route) { + return [] + } + return [].concat.apply([], route.matched.map(m => { + return Object.keys(m.components).map(key => { + return m.components[key] + }) + })) + } + + resolve ( + to, + current, + append + ) { + current = current || this.history.current; + const location = normalizeLocation( + to, + current, + append, + this + ); + const route = this.match(location, current); + const fullPath = route.redirectedFrom || route.fullPath; + const base = this.history.base; + const href = createHref(base, fullPath, this.mode); + return { + location, + route, + href, + // for backwards compat + normalizedTo: location, + resolved: route + } + } + + addRoutes (routes) { + this.matcher.addRoutes(routes); + if (this.history.current !== START) { + this.history.transitionTo(this.history.getCurrentLocation()); + } + } +} + +function registerHook (list, fn) { + list.push(fn); + return () => { + const i = list.indexOf(fn); + if (i > -1) list.splice(i, 1); + } +} + +function createHref (base, fullPath, mode) { + var path = mode === 'hash' ? '#' + fullPath : fullPath; + return base ? cleanPath(base + '/' + path) : path +} + +VueRouter.install = install; +VueRouter.version = '3.0.6'; + +if (inBrowser && window.Vue) { + window.Vue.use(VueRouter); +} + +export default VueRouter; diff --git a/node_modules/vue-router/dist/vue-router.esm.browser.min.js b/node_modules/vue-router/dist/vue-router.esm.browser.min.js new file mode 100644 index 0000000..1a99ea7 --- /dev/null +++ b/node_modules/vue-router/dist/vue-router.esm.browser.min.js @@ -0,0 +1,6 @@ +/*! + * vue-router v3.0.6 + * (c) 2019 Evan You + * @license MIT + */ +function t(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function e(t,e){for(const n in e)t[n]=e[n];return t}var n={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render(t,{props:n,children:r,parent:o,data:i}){i.routerView=!0;const s=o.$createElement,a=n.name,c=o.$route,u=o._routerViewCache||(o._routerViewCache={});let h=0,p=!1;for(;o&&o._routerRoot!==o;){const t=o.$vnode&&o.$vnode.data;t&&(t.routerView&&h++,t.keepAlive&&o._inactive&&(p=!0)),o=o.$parent}if(i.routerViewDepth=h,p)return s(u[a],i,r);const l=c.matched[h];if(!l)return u[a]=null,s();const f=u[a]=l.components[a];i.registerRouteInstance=((t,e)=>{const n=l.instances[a];(e&&n!==t||!e&&n===t)&&(l.instances[a]=e)}),(i.hook||(i.hook={})).prepatch=((t,e)=>{l.instances[a]=e.componentInstance}),i.hook.init=(t=>{t.data.keepAlive&&t.componentInstance&&t.componentInstance!==l.instances[a]&&(l.instances[a]=t.componentInstance)});let d=i.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0}}(c,l.props&&l.props[a]);if(d){d=i.props=e({},d);const t=i.attrs=i.attrs||{};for(const e in d)f.props&&e in f.props||(t[e]=d[e],delete d[e])}return s(f,i,r)}};const r=/[!'()*]/g,o=t=>"%"+t.charCodeAt(0).toString(16),i=/%2C/g,s=t=>encodeURIComponent(t).replace(r,o).replace(i,","),a=decodeURIComponent;function c(t){const e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(t=>{const n=t.replace(/\+/g," ").split("="),r=a(n.shift()),o=n.length>0?a(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function u(t){const e=t?Object.keys(t).map(e=>{const n=t[e];if(void 0===n)return"";if(null===n)return s(e);if(Array.isArray(n)){const t=[];return n.forEach(n=>{void 0!==n&&(null===n?t.push(s(e)):t.push(s(e)+"="+s(n)))}),t.join("&")}return s(e)+"="+s(n)}).filter(t=>t.length>0).join("&"):null;return e?`?${e}`:""}const h=/\/?$/;function p(t,e,n,r){const o=r&&r.options.stringifyQuery;let i=e.query||{};try{i=l(i)}catch(t){}const s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:y(e,o),matched:t?d(t):[]};return n&&(s.redirectedFrom=y(n,o)),Object.freeze(s)}function l(t){if(Array.isArray(t))return t.map(l);if(t&&"object"==typeof t){const e={};for(const n in t)e[n]=l(t[n]);return e}return t}const f=p(null,{path:"/"});function d(t){const e=[];for(;t;)e.unshift(t),t=t.parent;return e}function y({path:t,query:e={},hash:n=""},r){return(t||"/")+(r||u)(e)+n}function m(t,e){return e===f?t===e:!!e&&(t.path&&e.path?t.path.replace(h,"")===e.path.replace(h,"")&&t.hash===e.hash&&g(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&g(t.query,e.query)&&g(t.params,e.params)))}function g(t={},e={}){if(!t||!e)return t===e;const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(n=>{const r=t[n],o=e[n];return"object"==typeof r&&"object"==typeof o?g(r,o):String(r)===String(o)})}const b=[String,Object],w=[String,Array];var v={name:"RouterLink",props:{to:{type:b,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:w,default:"click"}},render(t){const n=this.$router,r=this.$route,{location:o,route:i,href:s}=n.resolve(this.to,r,this.append),a={},c=n.options.linkActiveClass,u=n.options.linkExactActiveClass,l=null==c?"router-link-active":c,f=null==u?"router-link-exact-active":u,d=null==this.activeClass?l:this.activeClass,y=null==this.exactActiveClass?f:this.exactActiveClass,g=o.path?p(null,o,null,n):i;a[y]=m(r,g),a[d]=this.exact?a[y]:function(t,e){return 0===t.path.replace(h,"/").indexOf(e.path.replace(h,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(const n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,g);const b=t=>{x(t)&&(this.replace?n.replace(o):n.push(o))},w={click:x};Array.isArray(this.event)?this.event.forEach(t=>{w[t]=b}):w[this.event]=b;const v={class:a};if("a"===this.tag)v.on=w,v.attrs={href:s};else{const t=function t(e){if(e){let n;for(let r=0;r{!function t(e,n,r,o,i,s){const{path:a,name:c}=o;const u=o.pathToRegexpOptions||{};const h=function(t,e,n){n||(t=t.replace(/\/$/,""));return"/"===t[0]?t:null==e?t:O(`${e.path}/${t}`)}(a,i,u.strict);"boolean"==typeof o.caseSensitive&&(u.sensitive=o.caseSensitive);const p={path:h,regex:K(h,u),components:o.components||{default:o.component},instances:{},name:c,parent:i,matchAs:s,redirect:o.redirect,beforeEnter:o.beforeEnter,meta:o.meta||{},props:null==o.props?{}:o.components?o.props:{default:o.props}};o.children&&o.children.forEach(o=>{const i=s?O(`${s}/${o.path}`):void 0;t(e,n,r,o,p,i)});if(void 0!==o.alias){const s=Array.isArray(o.alias)?o.alias:[o.alias];s.forEach(s=>{const a={path:s,children:o.children};t(e,n,r,a,i,p.path||"/")})}n[p.path]||(e.push(p.path),n[p.path]=p);c&&(r[c]||(r[c]=p))}(o,i,s,t)});for(let t=0,e=o.length;t=0&&(e=t.slice(r),t=t.slice(0,r));const o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}(i.path||""),a=n&&n.path||"/",u=s.path?E(s.path,a,r||i.append):a,h=function(t,e={},n){const r=n||c;let o;try{o=r(t||"")}catch(t){o={}}for(const t in e)o[t]=e[t];return o}(s.query,i.query,o&&o.options.parseQuery);let p=i.hash||s.hash;return p&&"#"!==p.charAt(0)&&(p=`#${p}`),{_normalized:!0,path:u,query:h,hash:p}}function N(t,e){const{pathList:n,pathMap:r,nameMap:o}=F(t);function i(t,i,s){const c=J(t,i,!1,e),{name:u}=c;if(u){const t=o[u];if(!t)return a(null,c);const e=t.regex.keys.filter(t=>!t.optional).map(t=>t.name);if("object"!=typeof c.params&&(c.params={}),i&&"object"==typeof i.params)for(const t in i.params)!(t in c.params)&&e.indexOf(t)>-1&&(c.params[t]=i.params[t]);if(t)return c.path=D(t.path,c.params),a(t,c,s)}else if(c.path){c.params={};for(let t=0;t{G(),t.state&&t.state.key&&function(t){it=t}(t.state.key)})}function W(t,e,n,r){if(!t.app)return;const o=t.options.scrollBehavior;o&&t.app.$nextTick(()=>{const i=function(){const t=at();if(t)return X[t]}(),s=o.call(t,e,n,r?i:null);s&&("function"==typeof s.then?s.then(t=>{nt(t,i)}).catch(t=>{}):nt(s,i))})}function G(){const t=at();t&&(X[t]={x:window.pageXOffset,y:window.pageYOffset})}function Z(t){return et(t.x)||et(t.y)}function tt(t){return{x:et(t.x)?t.x:window.pageXOffset,y:et(t.y)?t.y:window.pageYOffset}}function et(t){return"number"==typeof t}function nt(t,e){const n="object"==typeof t;if(n&&"string"==typeof t.selector){const n=document.querySelector(t.selector);if(n){let o=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){const n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left-e.x,y:r.top-n.top-e.y}}(n,o={x:et((r=o).x)?r.x:0,y:et(r.y)?r.y:0})}else Z(t)&&(e=tt(t))}else n&&Z(t)&&(e=tt(t));var r;e&&window.scrollTo(e.x,e.y)}const rt=R&&function(){const t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),ot=R&&window.performance&&window.performance.now?window.performance:Date;let it=st();function st(){return ot.now().toFixed(3)}function at(){return it}function ct(t,e){G();const n=window.history;try{e?n.replaceState({key:it},"",t):(it=st(),n.pushState({key:it},"",t))}catch(n){window.location[e?"replace":"assign"](t)}}function ut(t){ct(t,!0)}function ht(t,e,n){const r=o=>{o>=t.length?n():t[o]?e(t[o],()=>{r(o+1)}):r(o+1)};r(0)}function pt(e){return(n,r,o)=>{let i=!1,s=0,a=null;lt(e,(e,n,r,c)=>{if("function"==typeof e&&void 0===e.cid){i=!0,s++;const n=yt(t=>{(function(t){return t.__esModule||dt&&"Module"===t[Symbol.toStringTag]})(t)&&(t=t.default),e.resolved="function"==typeof t?t:k.extend(t),r.components[c]=t,--s<=0&&o()}),u=yt(e=>{const n=`Failed to resolve async component ${c}: ${e}`;a||(a=t(e)?e:new Error(n),o(a))});let h;try{h=e(n,u)}catch(t){u(t)}if(h)if("function"==typeof h.then)h.then(n,u);else{const t=h.component;t&&"function"==typeof t.then&&t.then(n,u)}}}),i||o()}}function lt(t,e){return ft(t.map(t=>Object.keys(t.components).map(n=>e(t.components[n],t.instances[n],t,n))))}function ft(t){return Array.prototype.concat.apply([],t)}const dt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function yt(t){let e=!1;return function(...n){if(!e)return e=!0,t.apply(this,n)}}class mt{constructor(t,e){this.router=t,this.base=function(t){if(!t)if(R){const e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=f,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]}listen(t){this.cb=t}onReady(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))}onError(t){this.errorCbs.push(t)}transitionTo(t,e,n){const r=this.router.match(t,this.current);this.confirmTransition(r,()=>{this.updateRoute(r),e&&e(r),this.ensureURL(),this.ready||(this.ready=!0,this.readyCbs.forEach(t=>{t(r)}))},t=>{n&&n(t),t&&!this.ready&&(this.ready=!0,this.readyErrorCbs.forEach(e=>{e(t)}))})}confirmTransition(e,n,r){const o=this.current,i=e=>{t(e)&&(this.errorCbs.length?this.errorCbs.forEach(t=>{t(e)}):console.error(e)),r&&r(e)};if(m(e,o)&&e.matched.length===o.matched.length)return this.ensureURL(),i();const{updated:s,deactivated:a,activated:c}=function(t,e){let n;const r=Math.max(t.length,e.length);for(n=0;nt.beforeEnter),pt(c));this.pending=e;const h=(n,r)=>{if(this.pending!==e)return i();try{n(e,o,e=>{!1===e||t(e)?(this.ensureURL(!0),i(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(i(),"object"==typeof e&&e.replace?this.replace(e):this.push(e)):r(e)})}catch(t){i(t)}};ht(u,h,()=>{const t=[];ht(function(t,e,n){return gt(t,"beforeRouteEnter",(t,r,o,i)=>(function(t,e,n,r,o){return function(i,s,a){return t(i,s,t=>{a(t),"function"==typeof t&&r.push(()=>{!function t(e,n,r,o){n[r]&&!n[r]._isBeingDestroyed?e(n[r]):o()&&setTimeout(()=>{t(e,n,r,o)},16)}(t,e.instances,n,o)})})}})(t,o,i,e,n))}(c,t,()=>this.current===e).concat(this.router.resolveHooks),h,()=>{if(this.pending!==e)return i();this.pending=null,n(e),this.router.app&&this.router.app.$nextTick(()=>{t.forEach(t=>{t()})})})})}updateRoute(t){const e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(n=>{n&&n(t,e)})}}function gt(t,e,n,r){const o=lt(t,(t,r,o,i)=>{const s=function(t,e){"function"!=typeof t&&(t=k.extend(t));return t.options[e]}(t,e);if(s)return Array.isArray(s)?s.map(t=>n(t,r,o,i)):n(s,r,o,i)});return ft(r?o.reverse():o)}function bt(t,e){if(e)return function(){return t.apply(e,arguments)}}class wt extends mt{constructor(t,e){super(t,e);const n=t.options.scrollBehavior,r=rt&&n;r&&Y();const o=vt(this.base);window.addEventListener("popstate",e=>{const n=this.current,i=vt(this.base);this.current===f&&i===o||this.transitionTo(i,e=>{r&&W(t,e,n,!0)})})}go(t){window.history.go(t)}push(t,e,n){const{current:r}=this;this.transitionTo(t,t=>{ct(O(this.base+t.fullPath)),W(this.router,t,r,!1),e&&e(t)},n)}replace(t,e,n){const{current:r}=this;this.transitionTo(t,t=>{ut(O(this.base+t.fullPath)),W(this.router,t,r,!1),e&&e(t)},n)}ensureURL(t){if(vt(this.base)!==this.current.fullPath){const e=O(this.base+this.current.fullPath);t?ct(e):ut(e)}}getCurrentLocation(){return vt(this.base)}}function vt(t){let e=decodeURI(window.location.pathname);return t&&0===e.indexOf(t)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}class xt extends mt{constructor(t,e,n){super(t,e),n&&function(t){const e=vt(t);if(!/^\/#/.test(e))return window.location.replace(O(t+"/#"+e)),!0}(this.base)||kt()}setupListeners(){const t=this.router.options.scrollBehavior,e=rt&&t;e&&Y(),window.addEventListener(rt?"popstate":"hashchange",()=>{const t=this.current;kt()&&this.transitionTo(Rt(),n=>{e&&W(this.router,n,t,!0),rt||At(n.fullPath)})})}push(t,e,n){const{current:r}=this;this.transitionTo(t,t=>{Ot(t.fullPath),W(this.router,t,r,!1),e&&e(t)},n)}replace(t,e,n){const{current:r}=this;this.transitionTo(t,t=>{At(t.fullPath),W(this.router,t,r,!1),e&&e(t)},n)}go(t){window.history.go(t)}ensureURL(t){const e=this.current.fullPath;Rt()!==e&&(t?Ot(e):At(e))}getCurrentLocation(){return Rt()}}function kt(){const t=Rt();return"/"===t.charAt(0)||(At("/"+t),!1)}function Rt(){let t=window.location.href;const e=t.indexOf("#");if(e<0)return"";const n=(t=t.slice(e+1)).indexOf("?");if(n<0){const e=t.indexOf("#");t=e>-1?decodeURI(t.slice(0,e))+t.slice(e):decodeURI(t)}else n>-1&&(t=decodeURI(t.slice(0,n))+t.slice(n));return t}function Et(t){const e=window.location.href,n=e.indexOf("#");return`${n>=0?e.slice(0,n):e}#${t}`}function Ot(t){rt?ct(Et(t)):window.location.hash=t}function At(t){rt?ut(Et(t)):window.location.replace(Et(t))}class Ct extends mt{constructor(t,e){super(t,e),this.stack=[],this.index=-1}push(t,e,n){this.transitionTo(t,t=>{this.stack=this.stack.slice(0,this.index+1).concat(t),this.index++,e&&e(t)},n)}replace(t,e,n){this.transitionTo(t,t=>{this.stack=this.stack.slice(0,this.index).concat(t),e&&e(t)},n)}go(t){const e=this.index+t;if(e<0||e>=this.stack.length)return;const n=this.stack[e];this.confirmTransition(n,()=>{this.index=e,this.updateRoute(n)})}getCurrentLocation(){const t=this.stack[this.stack.length-1];return t?t.fullPath:"/"}ensureURL(){}}class $t{constructor(t={}){this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=N(t.routes||[],this);let e=t.mode||"hash";switch(this.fallback="history"===e&&!rt&&!1!==t.fallback,this.fallback&&(e="hash"),R||(e="abstract"),this.mode=e,e){case"history":this.history=new wt(this,t.base);break;case"hash":this.history=new xt(this,t.base,this.fallback);break;case"abstract":this.history=new Ct(this,t.base)}}match(t,e,n){return this.matcher.match(t,e,n)}get currentRoute(){return this.history&&this.history.current}init(t){if(this.apps.push(t),t.$once("hook:destroyed",()=>{const e=this.apps.indexOf(t);e>-1&&this.apps.splice(e,1),this.app===t&&(this.app=this.apps[0]||null)}),this.app)return;this.app=t;const e=this.history;if(e instanceof wt)e.transitionTo(e.getCurrentLocation());else if(e instanceof xt){const t=()=>{e.setupListeners()};e.transitionTo(e.getCurrentLocation(),t,t)}e.listen(t=>{this.apps.forEach(e=>{e._route=t})})}beforeEach(t){return jt(this.beforeHooks,t)}beforeResolve(t){return jt(this.resolveHooks,t)}afterEach(t){return jt(this.afterHooks,t)}onReady(t,e){this.history.onReady(t,e)}onError(t){this.history.onError(t)}push(t,e,n){this.history.push(t,e,n)}replace(t,e,n){this.history.replace(t,e,n)}go(t){this.history.go(t)}back(){this.go(-1)}forward(){this.go(1)}getMatchedComponents(t){const e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(t=>Object.keys(t.components).map(e=>t.components[e]))):[]}resolve(t,e,n){const r=J(t,e=e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?O(t+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}}addRoutes(t){this.matcher.addRoutes(t),this.history.current!==f&&this.history.transitionTo(this.history.getCurrentLocation())}}function jt(t,e){return t.push(e),()=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)}}$t.install=function t(e){if(t.installed&&k===e)return;t.installed=!0,k=e;const r=t=>void 0!==t,o=(t,e)=>{let n=t.$options._parentVnode;r(n)&&r(n=n.data)&&r(n=n.registerRouteInstance)&&n(t,e)};e.mixin({beforeCreate(){r(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,o(this,this)},destroyed(){o(this)}}),Object.defineProperty(e.prototype,"$router",{get(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get(){return this._routerRoot._route}}),e.component("RouterView",n),e.component("RouterLink",v);const i=e.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created},$t.version="3.0.6",R&&window.Vue&&window.Vue.use($t);export default $t; diff --git a/public/index.html b/public/index.html index f6f49fa..8aaddae 100644 --- a/public/index.html +++ b/public/index.html @@ -62,13 +62,18 @@ - - - - + + - - + + + + + + + + @@ -131,7 +136,6 @@ methods: { } }); - diff --git a/public/lib/buefy-0.7.5.js b/public/lib/buefy-0.7.5.js new file mode 100644 index 0000000..ce5d79c --- /dev/null +++ b/public/lib/buefy-0.7.5.js @@ -0,0 +1,14166 @@ +/*! Buefy v0.7.4 | MIT License | github.com/buefy/buefy */ +(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["Buefy"] = factory(require("vue")); + else + root["Buefy"] = factory(root["Vue"]); +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_18__) { +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, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // 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 = "/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 69); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +/* globals __VUE_SSR_CONTEXT__ */ + +// this module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle + +module.exports = function normalizeComponent ( + rawScriptExports, + compiledTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */ +) { + var esModule + var scriptExports = rawScriptExports = rawScriptExports || {} + + // ES6 modules interop + var type = typeof rawScriptExports.default + if (type === 'object' || type === 'function') { + esModule = rawScriptExports + scriptExports = rawScriptExports.default + } + + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (compiledTemplate) { + options.render = compiledTemplate.render + options.staticRenderFns = compiledTemplate.staticRenderFns + } + + // scopedId + if (scopeId) { + options._scopeId = scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = injectStyles + } + + if (hook) { + var functional = options.functional + var existing = functional + ? options.render + : options.beforeCreate + if (!functional) { + // inject component registration as beforeCreate hook + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } else { + // register for functioal component in vue file + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return existing(h, context) + } + } + } + + return { + esModule: esModule, + exports: scriptExports, + options: options + } +} + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(101); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +}; + +/***/ }), +/* 2 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return setOptions; }); +var config = { + defaultContainerElement: null, + defaultIconPack: 'mdi', + defaultIconComponent: null, + defaultDialogConfirmText: null, + defaultDialogCancelText: null, + defaultSnackbarDuration: 3500, + defaultSnackbarPosition: null, + defaultToastDuration: 2000, + defaultToastPosition: null, + detaultNotificationDuration: 2000, + defaultNotificationPosition: null, + defaultTooltipType: 'is-primary', + defaultTooltipAnimated: false, + defaultInputAutocomplete: 'on', + defaultDateFormatter: null, + defaultDateParser: null, + defaultDateCreator: null, + defaultDayNames: null, + defaultMonthNames: null, + defaultFirstDayOfWeek: null, + defaultUnselectableDaysOfWeek: null, + defaultTimeFormatter: null, + defaultTimeParser: null, + defaultModalCanCancel: null, + defaultModalScroll: null, + defaultDatepickerMobileNative: true, + defaultTimepickerMobileNative: true, + defaultNoticeQueue: true, + defaultInputHasCounter: true, + defaultUseHtml5Validation: true +}; + +/* harmony default export */ __webpack_exports__["a"] = (config); + +var setOptions = function setOptions(options) { + config = options; +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(105), + /* template */ + __webpack_require__(106), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(37)('wks'); +var uid = __webpack_require__(26); +var Symbol = __webpack_require__(8).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(88), __esModule: true }; + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 7 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = getValueByPath; +/* harmony export (immutable) */ __webpack_exports__["b"] = indexOf; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isMobile; }); +/* harmony export (immutable) */ __webpack_exports__["d"] = removeElement; +/* unused harmony export escapeRegExpChars */ +/** + * Get value of an object property/path even if it's nested + */ +function getValueByPath(obj, path) { + var value = path.split('.').reduce(function (o, i) { + return o[i]; + }, obj); + return value; +} + +/** + * Extension of indexOf method by equality function if specified + */ +function indexOf(array, obj, fn) { + if (!array) return -1; + + if (!fn || typeof fn !== 'function') return array.indexOf(obj); + + for (var i = 0; i < array.length; i++) { + if (fn(array[i], obj)) { + return i; + } + } + + return -1; +} + +/** + * Mobile detection + * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript + */ +var isMobile = { + Android: function Android() { + return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i); + }, + BlackBerry: function BlackBerry() { + return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i); + }, + iOS: function iOS() { + return typeof window !== 'undefined' && window.navigator.userAgent.match(/iPhone|iPad|iPod/i); + }, + Opera: function Opera() { + return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i); + }, + Windows: function Windows() { + return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i); + }, + any: function any() { + return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows(); + } +}; + +function removeElement(el) { + if (typeof el.remove !== 'undefined') { + el.remove(); + } else if (typeof el.parentNode !== 'undefined') { + el.parentNode.removeChild(el); + } +} + +/** + * Escape regex characters + * http://stackoverflow.com/a/6969486 + */ +function escapeRegExpChars(value) { + if (!value) return value; + + // eslint-disable-next-line + return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); +} + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(15); +var IE8_DOM_DEFINE = __webpack_require__(47); +var toPrimitive = __webpack_require__(32); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(12) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); + + +/* harmony default export */ __webpack_exports__["a"] = ({ + props: { + size: String, + expanded: Boolean, + loading: Boolean, + rounded: Boolean, + icon: String, + iconPack: String, + // Native options to use in HTML5 validation + autocomplete: String, + maxlength: [Number, String], + useHtml5Validation: { + type: Boolean, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultUseHtml5Validation; + } + } + }, + data: function data() { + return { + isValid: true, + isFocused: false, + newIconPack: this.iconPack || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultIconPack + }; + }, + + computed: { + /** + * Find parent Field, max 3 levels deep. + */ + parentField: function parentField() { + var parent = this.$parent; + for (var i = 0; i < 3; i++) { + if (parent && !parent.$data._isField) { + parent = parent.$parent; + } + } + return parent; + }, + + + /** + * Get the type prop from parent if it's a Field. + */ + statusType: function statusType() { + if (!this.parentField) return; + if (!this.parentField.newType) return; + if (typeof this.parentField.newType === 'string') { + return this.parentField.newType; + } else { + for (var key in this.parentField.newType) { + if (this.parentField.newType[key]) { + return key; + } + } + } + }, + + + /** + * Get the message prop from parent if it's a Field. + */ + statusMessage: function statusMessage() { + if (!this.parentField) return; + + return this.parentField.newMessage; + }, + + + /** + * Fix icon size for inputs, large was too big + */ + iconSize: function iconSize() { + switch (this.size) { + case 'is-small': + return this.size; + case 'is-medium': + return; + case 'is-large': + return this.newIconPack === 'mdi' ? 'is-medium' : ''; + } + } + }, + methods: { + /** + * Focus method that work dynamically depending on the component. + */ + focus: function focus() { + var _this = this; + + if (this.$data._elementRef === undefined) return; + + this.$nextTick(function () { + var el = _this.$el.querySelector(_this.$data._elementRef); + if (el) el.focus(); + }); + }, + onBlur: function onBlur($event) { + this.isFocused = false; + this.$emit('blur', $event); + this.checkHtml5Validity(); + }, + onFocus: function onFocus($event) { + this.isFocused = true; + this.$emit('focus', $event); + }, + + + /** + * Check HTML5 validation, set isValid property. + * If validation fail, send 'is-danger' type, + * and error message to parent if it's a Field. + */ + checkHtml5Validity: function checkHtml5Validity() { + var _this2 = this; + + if (!this.useHtml5Validation) return; + + if (this.$refs[this.$data._elementRef] === undefined) return; + + var el = this.$el.querySelector(this.$data._elementRef); + + var type = null; + var message = null; + var isValid = true; + if (!el.checkValidity()) { + type = 'is-danger'; + message = el.validationMessage; + isValid = false; + } + this.isValid = isValid; + + this.$nextTick(function () { + if (_this2.parentField) { + // Set type only if not defined + if (!_this2.parentField.type) { + _this2.parentField.newType = type; + } + // Set message only if not defined + if (!_this2.parentField.message) { + _this2.parentField.newMessage = message; + } + } + }); + + return this.isValid; + } + } +}); + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(70), __esModule: true }; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(21)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(9); +var createDesc = __webpack_require__(22); +module.exports = __webpack_require__(12) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(20); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(50); +var defined = __webpack_require__(34); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(104), + /* template */ + __webpack_require__(107), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_18__; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(8); +var core = __webpack_require__(6); +var ctx = __webpack_require__(46); +var hide = __webpack_require__(14); +var has = __webpack_require__(13); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(49); +var enumBugKeys = __webpack_require__(38); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(122), + /* template */ + __webpack_require__(123), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(124), + /* template */ + __webpack_require__(125), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(126), + /* template */ + __webpack_require__(129), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(136), + /* template */ + __webpack_require__(137), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(20); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(37)('keys'); +var uid = __webpack_require__(26); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(6); +var global = __webpack_require__(8); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(25) ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(34); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(80)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(54)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(9).f; +var has = __webpack_require__(13); +var TAG = __webpack_require__(4)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(4); + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(8); +var core = __webpack_require__(6); +var LIBRARY = __webpack_require__(25); +var wksExt = __webpack_require__(43); +var defineProperty = __webpack_require__(9).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(7); + + + +/* harmony default export */ __webpack_exports__["a"] = ({ + props: { + type: { + type: String, + default: 'is-dark' + }, + message: String, + duration: Number, + queue: { + type: Boolean, + default: undefined + }, + position: { + type: String, + default: 'is-top', + validator: function validator(value) { + return ['is-top-right', 'is-top', 'is-top-left', 'is-bottom-right', 'is-bottom', 'is-bottom-left'].indexOf(value) > -1; + } + }, + container: String + }, + data: function data() { + return { + isActive: false, + parentTop: null, + parentBottom: null, + newContainer: this.container || __WEBPACK_IMPORTED_MODULE_0__config__["a" /* default */].defaultContainerElement + }; + }, + + computed: { + correctParent: function correctParent() { + switch (this.position) { + case 'is-top-right': + case 'is-top': + case 'is-top-left': + return this.parentTop; + + case 'is-bottom-right': + case 'is-bottom': + case 'is-bottom-left': + return this.parentBottom; + } + }, + transition: function transition() { + switch (this.position) { + case 'is-top-right': + case 'is-top': + case 'is-top-left': + return { + enter: 'fadeInDown', + leave: 'fadeOut' + }; + case 'is-bottom-right': + case 'is-bottom': + case 'is-bottom-left': + return { + enter: 'fadeInUp', + leave: 'fadeOut' + }; + } + } + }, + methods: { + shouldQueue: function shouldQueue() { + var queue = this.queue !== undefined ? this.queue : __WEBPACK_IMPORTED_MODULE_0__config__["a" /* default */].defaultNoticeQueue; + + if (!queue) return false; + + return this.parentTop.childElementCount > 0 || this.parentBottom.childElementCount > 0; + }, + close: function close() { + var _this = this; + + clearTimeout(this.timer); + this.isActive = false; + + // Timeout for the animation complete before destroying + setTimeout(function () { + _this.$destroy(); + Object(__WEBPACK_IMPORTED_MODULE_1__helpers__["d" /* removeElement */])(_this.$el); + }, 150); + }, + showNotice: function showNotice() { + var _this2 = this; + + if (this.shouldQueue()) { + // Call recursively if should queue + setTimeout(function () { + return _this2.showNotice(); + }, 250); + return; + } + this.correctParent.insertAdjacentElement('afterbegin', this.$el); + this.isActive = true; + + if (!this.indefinite) { + this.timer = setTimeout(function () { + return _this2.close(); + }, this.newDuration); + } + }, + setupContainer: function setupContainer() { + this.parentTop = document.querySelector('.notices.is-top'); + this.parentBottom = document.querySelector('.notices.is-bottom'); + + if (this.parentTop && this.parentBottom) return; + + if (!this.parentTop) { + this.parentTop = document.createElement('div'); + this.parentTop.className = 'notices is-top'; + } + + if (!this.parentBottom) { + this.parentBottom = document.createElement('div'); + this.parentBottom.className = 'notices is-bottom'; + } + + var container = document.querySelector(this.newContainer) || document.body; + + container.appendChild(this.parentTop); + container.appendChild(this.parentBottom); + + if (this.newContainer) { + this.parentTop.classList.add('has-custom-container'); + this.parentBottom.classList.add('has-custom-container'); + } + } + }, + beforeMount: function beforeMount() { + this.setupContainer(); + }, + mounted: function mounted() { + this.showNotice(); + } +}); + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(72); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(12) && !__webpack_require__(21)(function () { + return Object.defineProperty(__webpack_require__(48)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(20); +var document = __webpack_require__(8).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(13); +var toIObject = __webpack_require__(16); +var arrayIndexOf = __webpack_require__(74)(false); +var IE_PROTO = __webpack_require__(36)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(33); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(35); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(77), + /* template */ + __webpack_require__(108), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(78); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(5); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(25); +var $export = __webpack_require__(19); +var redefine = __webpack_require__(55); +var hide = __webpack_require__(14); +var Iterators = __webpack_require__(23); +var $iterCreate = __webpack_require__(81); +var setToStringTag = __webpack_require__(42); +var getPrototypeOf = __webpack_require__(84); +var ITERATOR = __webpack_require__(4)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(14); + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(15); +var dPs = __webpack_require__(82); +var enumBugKeys = __webpack_require__(38); +var IE_PROTO = __webpack_require__(36)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(48)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(83).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(85); +var global = __webpack_require__(8); +var hide = __webpack_require__(14); +var Iterators = __webpack_require__(23); +var TO_STRING_TAG = __webpack_require__(4)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(49); +var hiddenKeys = __webpack_require__(38).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(98), __esModule: true }; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(100); +var ITERATOR = __webpack_require__(4)('iterator'); +var Iterators = __webpack_require__(23); +module.exports = __webpack_require__(6).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(112), + /* template */ + __webpack_require__(113), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 62 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__FormElementMixin__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__config__ = __webpack_require__(2); +var _this = this; + + + + + +var AM = 'AM'; +var PM = 'PM'; +var HOUR_FORMAT_24 = '24'; +var HOUR_FORMAT_12 = '12'; + +/* harmony default export */ __webpack_exports__["a"] = ({ + mixins: [__WEBPACK_IMPORTED_MODULE_0__FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: Date, + inline: Boolean, + minTime: Date, + maxTime: Date, + placeholder: String, + editable: Boolean, + disabled: Boolean, + hourFormat: { + type: String, + default: HOUR_FORMAT_24, + validator: function validator(value) { + return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12; + } + }, + incrementMinutes: { + type: Number, + default: 1 + }, + timeFormatter: { + type: Function, + default: function _default(date) { + _this.formatTime(date); + } + }, + timeParser: { + type: Function, + default: function _default(date) { + _this.parseTime(date); + } + }, + mobileNative: { + type: Boolean, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_2__config__["a" /* default */].defaultTimepickerMobileNative; + } + }, + position: String, + unselectableTimes: Array + }, + data: function data() { + return { + dateSelected: this.value, + hoursSelected: null, + minutesSelected: null, + meridienSelected: null, + _elementRef: 'input', + AM: AM, + PM: PM, + HOUR_FORMAT_24: HOUR_FORMAT_24, + HOUR_FORMAT_12: HOUR_FORMAT_12 + }; + }, + + computed: { + hours: function hours() { + var hours = []; + var numberOfHours = this.isHourFormat24 ? 24 : 12; + for (var i = 0; i < numberOfHours; i++) { + var value = i; + var label = value; + if (!this.isHourFormat24) { + value = i + 1; + label = value; + if (this.meridienSelected === this.AM) { + if (value === 12) { + value = 0; + } + } else if (this.meridienSelected === this.PM) { + if (value !== 12) { + value += 12; + } + } + } + hours.push({ + label: this.formatNumber(label), + value: value + }); + } + return hours; + }, + minutes: function minutes() { + var minutes = []; + for (var i = 0; i < 60; i += this.incrementMinutes) { + minutes.push({ + label: this.formatNumber(i), + value: i + }); + } + return minutes; + }, + meridiens: function meridiens() { + return [AM, PM]; + }, + isMobile: function isMobile() { + return this.mobileNative && __WEBPACK_IMPORTED_MODULE_1__helpers__["c" /* isMobile */].any(); + }, + isHourFormat24: function isHourFormat24() { + return this.hourFormat === HOUR_FORMAT_24; + } + }, + watch: { + hourFormat: function hourFormat(value) { + if (this.hoursSelected !== null) { + this.meridienSelected = this.hoursSelected >= 12 ? PM : AM; + } + }, + + + /** + * Emit input event with selected date as payload. + */ + dateSelected: function dateSelected(value) { + this.$emit('input', value); + }, + + + /** + * When v-model is changed: + * 1. Update internal value. + * 2. If it's invalid, validate again. + */ + value: function value(_value) { + this.updateInternalState(_value); + this.dateSelected = _value; + + !this.isValid && this.$refs.input.checkHtml5Validity(); + } + }, + methods: { + onMeridienChange: function onMeridienChange(value) { + if (this.hoursSelected !== null) { + if (value === PM) { + this.hoursSelected += 12; + } else if (value === AM) { + this.hoursSelected -= 12; + } + } + this.updateDateSelected(this.hoursSelected, this.minutesSelected, value); + }, + onHoursChange: function onHoursChange(value) { + this.updateDateSelected(parseInt(value, 10), this.minutesSelected, this.meridienSelected); + }, + onMinutesChange: function onMinutesChange(value) { + this.updateDateSelected(this.hoursSelected, parseInt(value, 10), this.meridienSelected); + }, + updateDateSelected: function updateDateSelected(hours, minutes, meridiens) { + if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) { + if (this.dateSelected && !isNaN(this.dateSelected)) { + this.dateSelected = new Date(this.dateSelected); + } else { + this.dateSelected = new Date(); + this.dateSelected.setMilliseconds(0); + this.dateSelected.setSeconds(0); + } + this.dateSelected.setHours(hours); + this.dateSelected.setMinutes(minutes); + } + }, + updateInternalState: function updateInternalState(value) { + if (value) { + this.hoursSelected = value.getHours(); + this.minutesSelected = value.getMinutes(); + this.meridienSelected = value.getHours() >= 12 ? PM : AM; + } else { + this.hoursSelected = null; + this.minutesSelected = null; + this.meridienSelected = AM; + } + }, + isHourDisabled: function isHourDisabled(hour) { + var _this2 = this; + + var disabled = false; + if (this.minTime) { + var minHours = this.minTime.getHours(); + disabled = hour < minHours; + } + if (this.maxTime) { + if (!disabled) { + var maxHours = this.maxTime.getHours(); + disabled = hour > maxHours; + } + } + if (this.unselectableTimes) { + if (!disabled) { + if (this.minutesSelected !== null) { + var unselectable = this.unselectableTimes.filter(function (time) { + return time.getHours() === hour && time.getMinutes() === _this2.minutesSelected; + }); + disabled = unselectable.length > 0; + } else { + var _unselectable = this.unselectableTimes.filter(function (time) { + return time.getHours() === hour; + }); + disabled = _unselectable.length === this.minutes.length; + } + } + } + return disabled; + }, + isMinuteDisabled: function isMinuteDisabled(minute) { + var _this3 = this; + + var disabled = false; + if (this.hoursSelected !== null) { + if (this.isHourDisabled(this.hoursSelected)) { + disabled = true; + } else { + if (this.minTime) { + var minHours = this.minTime.getHours(); + var minMinutes = this.minTime.getMinutes(); + disabled = this.hoursSelected === minHours && minute < minMinutes; + } + if (this.maxTime) { + if (!disabled) { + var maxHours = this.maxTime.getHours(); + var _minMinutes = this.maxTime.getMinutes(); + disabled = this.hoursSelected === maxHours && minute > _minMinutes; + } + } + } + if (this.unselectableTimes) { + if (!disabled) { + var unselectable = this.unselectableTimes.filter(function (time) { + return time.getHours() === _this3.hoursSelected && time.getMinutes() === minute; + }); + disabled = unselectable.length > 0; + } + } + } + return disabled; + }, + + + /* + * Parse string into date + */ + onChange: function onChange(value) { + var date = this.parseTime(value); + this.updateInternalState(date); + if (date && !isNaN(date)) { + this.dateSelected = date; + } else { + // Force refresh input value when not valid date + this.dateSelected = null; + this.$refs.input.newValue = this.dateSelected; + } + }, + + + /* + * Close dropdown time picker + */ + close: function close() { + if (this.$refs.dropdown) { + this.$refs.dropdown.isActive = false; + } + }, + + + /* + * Format date into string 'HH-MM-SS' + */ + formatHHMMSS: function formatHHMMSS(value) { + var date = new Date(value); + if (value && !isNaN(date)) { + var hours = date.getHours(); + var minutes = date.getMinutes(); + return this.formatNumber(hours) + ':' + this.formatNumber(minutes, true) + ':00'; + } + return ''; + }, + + + /* + * Parse time from string + */ + onChangeNativePicker: function onChangeNativePicker(event) { + var date = event.target.value; + if (date) { + if (this.dateSelected && !isNaN(this.dateSelected)) { + this.dateSelected = new Date(this.dateSelected); + } else { + this.dateSelected = new Date(); + this.dateSelected.setMilliseconds(0); + this.dateSelected.setSeconds(0); + } + var time = date.split(':'); + this.dateSelected.setHours(parseInt(time[0], 10)); + this.dateSelected.setMinutes(parseInt(time[1], 10)); + } else { + this.dateSelected = null; + } + }, + formatNumber: function formatNumber(value, isMinute) { + return this.isHourFormat24 || isMinute ? this.pad(value) : value; + }, + pad: function pad(value) { + return (value < 10 ? '0' : '') + value; + }, + + + /* + * Format date into string + */ + formatValue: function formatValue(date) { + if (date && !isNaN(date)) { + return this.formatTime(date); + } else { + return null; + } + }, + formatTime: function formatTime(date) { + if (typeof __WEBPACK_IMPORTED_MODULE_2__config__["a" /* default */].defaultTimeFormatter === 'function') { + return __WEBPACK_IMPORTED_MODULE_2__config__["a" /* default */].defaultTimeFormatter(date); + } else { + return this.defaultTimeFormatter(date); + } + }, + parseTime: function parseTime(date) { + if (typeof __WEBPACK_IMPORTED_MODULE_2__config__["a" /* default */].defaultTimeParser === 'function') { + return __WEBPACK_IMPORTED_MODULE_2__config__["a" /* default */].defaultTimeParser(date); + } else { + return this.defaultTimeParser(date); + } + }, + defaultTimeFormatter: function defaultTimeFormatter(date) { + var hours = date.getHours(); + var minutes = date.getMinutes(); + var period = ''; + if (this.hourFormat === HOUR_FORMAT_12) { + period = ' ' + (hours < 12 ? AM : PM); + if (hours > 12) { + hours -= 12; + } else if (hours === 0) { + hours = 12; + } + } + return this.pad(hours) + ':' + this.pad(minutes) + period; + }, + defaultTimeParser: function defaultTimeParser(timeString) { + if (timeString) { + var am = false; + if (this.hourFormat === HOUR_FORMAT_12) { + var dateString12 = timeString.split(' '); + timeString = dateString12[0]; + am = dateString12[1] === AM; + } + var time = timeString.split(':'); + var hours = parseInt(time[0], 10); + var minutes = parseInt(time[1], 10); + if (isNaN(hours) || hours < 0 || hours > 23 || this.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) { + return null; + } + var d = null; + if (this.dateSelected && !isNaN(this.dateSelected)) { + d = new Date(this.dateSelected); + } else { + d = new Date(); + d.setMilliseconds(0); + d.setSeconds(0); + } + d.setMinutes(minutes); + if (this.hourFormat === HOUR_FORMAT_12) { + if (am && hours === 12) { + hours = 0; + } else if (!am && hours !== 12) { + hours += 12; + } + } + d.setHours(hours); + return d; + } + return null; + } + }, + mounted: function mounted() { + this.updateInternalState(this.value); + } +}); + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(147), + /* template */ + __webpack_require__(148), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 64 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export isSSR */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return HTMLElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return File; }); +// Polyfills for SSR + +var isSSR = typeof window === 'undefined'; + +var HTMLElement = isSSR ? Object : window.HTMLElement; +var File = isSSR ? Object : window.File; + +/***/ }), +/* 65 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__components_icon_Icon__); + + + +/* harmony default export */ __webpack_exports__["a"] = ({ + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__components_icon_Icon___default.a), + props: { + active: { + type: Boolean, + default: true + }, + title: String, + closable: { + type: Boolean, + default: true + }, + message: String, + type: String, + hasIcon: Boolean, + size: String, + iconPack: String, + iconSize: String, + autoClose: { + type: Boolean, + default: false + }, + duration: { + type: Number, + default: 2000 + } + }, + data: function data() { + return { + isActive: this.active + }; + }, + + watch: { + active: function active(value) { + this.isActive = value; + }, + isActive: function isActive(value) { + if (value) { + this.setAutoClose(); + } else { + if (this.timer) { + clearTimeout(this.timer); + } + } + } + }, + computed: { + /** + * Icon name (MDI) based on type. + */ + icon: function icon() { + switch (this.type) { + case 'is-info': + return 'information'; + case 'is-success': + return 'check-circle'; + case 'is-warning': + return 'alert'; + case 'is-danger': + return 'alert-circle'; + default: + return null; + } + } + }, + methods: { + /** + * Close the Message and emit events. + */ + close: function close() { + this.isActive = false; + this.$emit('close'); + this.$emit('update:active', false); + }, + + /** + * Set timer to auto close message + */ + setAutoClose: function setAutoClose() { + var _this = this; + + if (this.autoClose) { + this.timer = setTimeout(function () { + if (_this.isActive) { + _this.close(); + } + }, this.duration); + } + } + }, + mounted: function mounted() { + this.setAutoClose(); + } +}); + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(165), + /* template */ + __webpack_require__(166), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(192), + /* template */ + __webpack_require__(193), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(200), + /* template */ + __webpack_require__(201), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 69 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +var components_namespaceObject = {}; +__webpack_require__.d(components_namespaceObject, "Autocomplete", function() { return autocomplete; }); +__webpack_require__.d(components_namespaceObject, "Button", function() { return components_button; }); +__webpack_require__.d(components_namespaceObject, "Checkbox", function() { return components_checkbox; }); +__webpack_require__.d(components_namespaceObject, "Clockpicker", function() { return clockpicker; }); +__webpack_require__.d(components_namespaceObject, "Collapse", function() { return collapse; }); +__webpack_require__.d(components_namespaceObject, "Datepicker", function() { return datepicker; }); +__webpack_require__.d(components_namespaceObject, "Dialog", function() { return dialog; }); +__webpack_require__.d(components_namespaceObject, "Dropdown", function() { return dropdown; }); +__webpack_require__.d(components_namespaceObject, "Field", function() { return field; }); +__webpack_require__.d(components_namespaceObject, "Icon", function() { return icon; }); +__webpack_require__.d(components_namespaceObject, "Input", function() { return input; }); +__webpack_require__.d(components_namespaceObject, "Loading", function() { return loading; }); +__webpack_require__.d(components_namespaceObject, "Message", function() { return components_message; }); +__webpack_require__.d(components_namespaceObject, "Modal", function() { return modal; }); +__webpack_require__.d(components_namespaceObject, "Notification", function() { return notification; }); +__webpack_require__.d(components_namespaceObject, "Numberinput", function() { return numberinput; }); +__webpack_require__.d(components_namespaceObject, "Pagination", function() { return pagination; }); +__webpack_require__.d(components_namespaceObject, "Radio", function() { return components_radio; }); +__webpack_require__.d(components_namespaceObject, "Select", function() { return components_select; }); +__webpack_require__.d(components_namespaceObject, "Snackbar", function() { return snackbar; }); +__webpack_require__.d(components_namespaceObject, "Switch", function() { return components_switch; }); +__webpack_require__.d(components_namespaceObject, "Table", function() { return table; }); +__webpack_require__.d(components_namespaceObject, "Tabs", function() { return tabs; }); +__webpack_require__.d(components_namespaceObject, "Tag", function() { return tag; }); +__webpack_require__.d(components_namespaceObject, "Taginput", function() { return taginput; }); +__webpack_require__.d(components_namespaceObject, "Timepicker", function() { return timepicker; }); +__webpack_require__.d(components_namespaceObject, "Toast", function() { return toast; }); +__webpack_require__.d(components_namespaceObject, "Tooltip", function() { return tooltip; }); +__webpack_require__.d(components_namespaceObject, "Upload", function() { return upload; }); + +// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js +var object_assign = __webpack_require__(11); +var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign); + +// EXTERNAL MODULE: ./src/scss/buefy-build.scss +var buefy_build = __webpack_require__(76); +var buefy_build_default = /*#__PURE__*/__webpack_require__.n(buefy_build); + +// EXTERNAL MODULE: ./src/components/autocomplete/Autocomplete.vue +var Autocomplete = __webpack_require__(52); +var Autocomplete_default = /*#__PURE__*/__webpack_require__.n(Autocomplete); + +// CONCATENATED MODULE: ./src/utils/plugins.js + +var use = function use(plugin) { + if (typeof window !== 'undefined' && window.Vue) { + window.Vue.use(plugin); + } +}; + +var registerComponent = function registerComponent(Vue, component) { + Vue.component(component.name, component); +}; + +var registerComponentProgrammatic = function registerComponentProgrammatic(Vue, property, component) { + Vue.prototype[property] = component; +}; +// CONCATENATED MODULE: ./src/components/autocomplete/index.js + + + + +var Plugin = { + install: function install(Vue) { + registerComponent(Vue, Autocomplete_default.a); + } +}; + +use(Plugin); + +/* harmony default export */ var autocomplete = (Plugin); + + +// EXTERNAL MODULE: ./src/components/button/Button.vue +var Button = __webpack_require__(109); +var Button_default = /*#__PURE__*/__webpack_require__.n(Button); + +// CONCATENATED MODULE: ./src/components/button/index.js + + + + +var button_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Button_default.a); + } +}; + +use(button_Plugin); + +/* harmony default export */ var components_button = (button_Plugin); + + +// EXTERNAL MODULE: ./src/components/checkbox/Checkbox.vue +var Checkbox = __webpack_require__(61); +var Checkbox_default = /*#__PURE__*/__webpack_require__.n(Checkbox); + +// EXTERNAL MODULE: ./src/components/checkbox/CheckboxButton.vue +var CheckboxButton = __webpack_require__(114); +var CheckboxButton_default = /*#__PURE__*/__webpack_require__.n(CheckboxButton); + +// CONCATENATED MODULE: ./src/components/checkbox/index.js + + + + + +var checkbox_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Checkbox_default.a); + registerComponent(Vue, CheckboxButton_default.a); + } +}; + +use(checkbox_Plugin); + +/* harmony default export */ var components_checkbox = (checkbox_Plugin); + + +// EXTERNAL MODULE: ./src/components/collapse/Collapse.vue +var Collapse = __webpack_require__(117); +var Collapse_default = /*#__PURE__*/__webpack_require__.n(Collapse); + +// CONCATENATED MODULE: ./src/components/collapse/index.js + + + + +var collapse_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Collapse_default.a); + } +}; + +use(collapse_Plugin); + +/* harmony default export */ var collapse = (collapse_Plugin); + + +// EXTERNAL MODULE: ./src/components/clockpicker/Clockpicker.vue +var Clockpicker = __webpack_require__(120); +var Clockpicker_default = /*#__PURE__*/__webpack_require__.n(Clockpicker); + +// CONCATENATED MODULE: ./src/components/clockpicker/index.js + + + + +var clockpicker_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Clockpicker_default.a); + } +}; + +use(clockpicker_Plugin); + +/* harmony default export */ var clockpicker = (clockpicker_Plugin); + + +// EXTERNAL MODULE: ./src/components/datepicker/Datepicker.vue +var Datepicker = __webpack_require__(134); +var Datepicker_default = /*#__PURE__*/__webpack_require__.n(Datepicker); + +// CONCATENATED MODULE: ./src/components/datepicker/index.js + + + + +var datepicker_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Datepicker_default.a); + } +}; + +use(datepicker_Plugin); + +/* harmony default export */ var datepicker = (datepicker_Plugin); + + +// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","amd":"vue","root":"Vue"} +var external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__ = __webpack_require__(18); +var external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default = /*#__PURE__*/__webpack_require__.n(external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue__); + +// EXTERNAL MODULE: ./src/components/dialog/Dialog.vue +var Dialog = __webpack_require__(145); +var Dialog_default = /*#__PURE__*/__webpack_require__.n(Dialog); + +// CONCATENATED MODULE: ./src/components/dialog/index.js + + + + + + +function dialog_open(propsData) { + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var DialogComponent = vm.extend(Dialog_default.a); + return new DialogComponent({ + el: document.createElement('div'), + propsData: propsData + }); +} + +var DialogProgrammatic = { + alert: function alert(params) { + var message = void 0; + if (typeof params === 'string') message = params; + var defaultParam = { + canCancel: false, + message: message + }; + var propsData = assign_default()(defaultParam, params); + return dialog_open(propsData); + }, + confirm: function confirm(params) { + var defaultParam = {}; + var propsData = assign_default()(defaultParam, params); + return dialog_open(propsData); + }, + prompt: function prompt(params) { + var defaultParam = { + hasInput: true, + confirmText: 'Done' + }; + var propsData = assign_default()(defaultParam, params); + return dialog_open(propsData); + } +}; + +var dialog_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Dialog_default.a); + registerComponentProgrammatic(Vue, '$dialog', DialogProgrammatic); + } +}; + +use(dialog_Plugin); + +/* harmony default export */ var dialog = (dialog_Plugin); + + +// EXTERNAL MODULE: ./src/components/dropdown/Dropdown.vue +var Dropdown = __webpack_require__(28); +var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown); + +// EXTERNAL MODULE: ./src/components/dropdown/DropdownItem.vue +var DropdownItem = __webpack_require__(29); +var DropdownItem_default = /*#__PURE__*/__webpack_require__.n(DropdownItem); + +// CONCATENATED MODULE: ./src/components/dropdown/index.js + + + + + +var dropdown_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Dropdown_default.a); + registerComponent(Vue, DropdownItem_default.a); + } +}; + +use(dropdown_Plugin); + +/* harmony default export */ var dropdown = (dropdown_Plugin); + + +// EXTERNAL MODULE: ./src/components/field/Field.vue +var Field = __webpack_require__(30); +var Field_default = /*#__PURE__*/__webpack_require__.n(Field); + +// CONCATENATED MODULE: ./src/components/field/index.js + + + + +var field_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Field_default.a); + } +}; + +use(field_Plugin); + +/* harmony default export */ var field = (field_Plugin); + + +// EXTERNAL MODULE: ./src/components/icon/Icon.vue +var Icon = __webpack_require__(3); +var Icon_default = /*#__PURE__*/__webpack_require__.n(Icon); + +// CONCATENATED MODULE: ./src/components/icon/index.js + + + + +var icon_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Icon_default.a); + } +}; + +use(icon_Plugin); + +/* harmony default export */ var icon = (icon_Plugin); + + +// EXTERNAL MODULE: ./src/components/input/Input.vue +var Input = __webpack_require__(17); +var Input_default = /*#__PURE__*/__webpack_require__.n(Input); + +// CONCATENATED MODULE: ./src/components/input/index.js + + + + +var input_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Input_default.a); + } +}; + +use(input_Plugin); + +/* harmony default export */ var input = (input_Plugin); + + +// EXTERNAL MODULE: ./src/components/loading/Loading.vue +var Loading = __webpack_require__(150); +var Loading_default = /*#__PURE__*/__webpack_require__.n(Loading); + +// CONCATENATED MODULE: ./src/components/loading/index.js + + + + + + +var LoadingProgrammatic = { + open: function open(params) { + var defaultParam = { + programmatic: true + }; + var propsData = assign_default()(defaultParam, params); + + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var LoadingComponent = vm.extend(Loading_default.a); + return new LoadingComponent({ + el: document.createElement('div'), + propsData: propsData + }); + } +}; + +var loading_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Loading_default.a); + registerComponentProgrammatic(Vue, '$loading', LoadingProgrammatic); + } +}; + +use(loading_Plugin); + +/* harmony default export */ var loading = (loading_Plugin); + + +// EXTERNAL MODULE: ./src/components/message/Message.vue +var Message = __webpack_require__(153); +var Message_default = /*#__PURE__*/__webpack_require__.n(Message); + +// CONCATENATED MODULE: ./src/components/message/index.js + + + + +var message_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Message_default.a); + } +}; + +use(message_Plugin); + +/* harmony default export */ var components_message = (message_Plugin); + + +// EXTERNAL MODULE: ./src/components/modal/Modal.vue +var Modal = __webpack_require__(63); +var Modal_default = /*#__PURE__*/__webpack_require__.n(Modal); + +// CONCATENATED MODULE: ./src/components/modal/index.js + + + + + + +var ModalProgrammatic = { + open: function open(params) { + var content = void 0; + var parent = void 0; + if (typeof params === 'string') content = params; + + var defaultParam = { + programmatic: true, + content: content + }; + if (params.parent) { + parent = params.parent; + delete params.parent; + } + var propsData = assign_default()(defaultParam, params); + + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var ModalComponent = vm.extend(Modal_default.a); + return new ModalComponent({ + parent: parent, + el: document.createElement('div'), + propsData: propsData + }); + } +}; + +var modal_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Modal_default.a); + registerComponentProgrammatic(Vue, '$modal', ModalProgrammatic); + } +}; + +use(modal_Plugin); + +/* harmony default export */ var modal = (modal_Plugin); + + +// EXTERNAL MODULE: ./src/components/notification/Notification.vue +var Notification = __webpack_require__(156); +var Notification_default = /*#__PURE__*/__webpack_require__.n(Notification); + +// EXTERNAL MODULE: ./src/components/notification/NotificationNotice.vue +var NotificationNotice = __webpack_require__(159); +var NotificationNotice_default = /*#__PURE__*/__webpack_require__.n(NotificationNotice); + +// EXTERNAL MODULE: ./src/utils/config.js +var config = __webpack_require__(2); + +// CONCATENATED MODULE: ./src/components/notification/index.js + + + + + + + + +var NotificationProgrammatic = { + open: function open(params) { + var message = void 0; + var parent = void 0; + if (typeof params === 'string') message = params; + + var defaultParam = { + message: message, + position: config["a" /* default */].defaultNotificationPosition || 'is-top-right' + }; + if (params.parent) { + parent = params.parent; + delete params.parent; + } + var propsData = assign_default()(defaultParam, typeof params === 'string' ? {} : params); + + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var NotificationNoticeComponent = vm.extend(NotificationNotice_default.a); + return new NotificationNoticeComponent({ + parent: parent, + el: document.createElement('div'), + propsData: propsData + }); + } +}; + +var notification_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Notification_default.a); + registerComponentProgrammatic(Vue, '$notification', NotificationProgrammatic); + } +}; + +use(notification_Plugin); + +/* harmony default export */ var notification = (notification_Plugin); + + +// EXTERNAL MODULE: ./src/components/numberinput/Numberinput.vue +var Numberinput = __webpack_require__(162); +var Numberinput_default = /*#__PURE__*/__webpack_require__.n(Numberinput); + +// CONCATENATED MODULE: ./src/components/numberinput/index.js + + + + +var numberinput_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Numberinput_default.a); + } +}; + +use(numberinput_Plugin); + +/* harmony default export */ var numberinput = (numberinput_Plugin); + + +// EXTERNAL MODULE: ./src/components/pagination/Pagination.vue +var Pagination = __webpack_require__(66); +var Pagination_default = /*#__PURE__*/__webpack_require__.n(Pagination); + +// CONCATENATED MODULE: ./src/components/pagination/index.js + + + + +var pagination_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Pagination_default.a); + } +}; + +use(pagination_Plugin); + +/* harmony default export */ var pagination = (pagination_Plugin); + + +// EXTERNAL MODULE: ./src/components/radio/Radio.vue +var Radio = __webpack_require__(167); +var Radio_default = /*#__PURE__*/__webpack_require__.n(Radio); + +// EXTERNAL MODULE: ./src/components/radio/RadioButton.vue +var RadioButton = __webpack_require__(170); +var RadioButton_default = /*#__PURE__*/__webpack_require__.n(RadioButton); + +// CONCATENATED MODULE: ./src/components/radio/index.js + + + + + +var radio_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Radio_default.a); + registerComponent(Vue, RadioButton_default.a); + } +}; + +use(radio_Plugin); + +/* harmony default export */ var components_radio = (radio_Plugin); + + +// EXTERNAL MODULE: ./src/components/select/Select.vue +var Select = __webpack_require__(31); +var Select_default = /*#__PURE__*/__webpack_require__.n(Select); + +// CONCATENATED MODULE: ./src/components/select/index.js + + + + +var select_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Select_default.a); + } +}; + +use(select_Plugin); + +/* harmony default export */ var components_select = (select_Plugin); + + +// EXTERNAL MODULE: ./src/components/snackbar/Snackbar.vue +var Snackbar = __webpack_require__(173); +var Snackbar_default = /*#__PURE__*/__webpack_require__.n(Snackbar); + +// CONCATENATED MODULE: ./src/components/snackbar/index.js + + + + + + + +var SnackbarProgrammatic = { + open: function open(params) { + var message = void 0; + var parent = void 0; + if (typeof params === 'string') message = params; + + var defaultParam = { + type: 'is-success', + position: config["a" /* default */].defaultSnackbarPosition || 'is-bottom-right', + message: message + }; + if (params.parent) { + parent = params.parent; + delete params.parent; + } + var propsData = assign_default()(defaultParam, params); + + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var SnackbarComponent = vm.extend(Snackbar_default.a); + return new SnackbarComponent({ + parent: parent, + el: document.createElement('div'), + propsData: propsData + }); + } +}; + +var snackbar_Plugin = { + install: function install(Vue) { + registerComponentProgrammatic(Vue, '$snackbar', SnackbarProgrammatic); + } +}; + +use(snackbar_Plugin); + +/* harmony default export */ var snackbar = (snackbar_Plugin); + + +// EXTERNAL MODULE: ./src/components/switch/Switch.vue +var Switch = __webpack_require__(176); +var Switch_default = /*#__PURE__*/__webpack_require__.n(Switch); + +// CONCATENATED MODULE: ./src/components/switch/index.js + + + + +var switch_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Switch_default.a); + } +}; + +use(switch_Plugin); + +/* harmony default export */ var components_switch = (switch_Plugin); + + +// EXTERNAL MODULE: ./src/components/table/Table.vue +var Table = __webpack_require__(179); +var Table_default = /*#__PURE__*/__webpack_require__.n(Table); + +// EXTERNAL MODULE: ./src/components/table/TableColumn.vue +var TableColumn = __webpack_require__(67); +var TableColumn_default = /*#__PURE__*/__webpack_require__.n(TableColumn); + +// CONCATENATED MODULE: ./src/components/table/index.js + + + + + +var table_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Table_default.a); + registerComponent(Vue, TableColumn_default.a); + } +}; + +use(table_Plugin); + +/* harmony default export */ var table = (table_Plugin); + + +// EXTERNAL MODULE: ./src/components/tabs/Tabs.vue +var Tabs = __webpack_require__(195); +var Tabs_default = /*#__PURE__*/__webpack_require__.n(Tabs); + +// EXTERNAL MODULE: ./src/components/tabs/TabItem.vue +var TabItem = __webpack_require__(198); +var TabItem_default = /*#__PURE__*/__webpack_require__.n(TabItem); + +// CONCATENATED MODULE: ./src/components/tabs/index.js + + + + + +var tabs_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Tabs_default.a); + registerComponent(Vue, TabItem_default.a); + } +}; + +use(tabs_Plugin); + +/* harmony default export */ var tabs = (tabs_Plugin); + + +// EXTERNAL MODULE: ./src/components/tag/Tag.vue +var Tag = __webpack_require__(68); +var Tag_default = /*#__PURE__*/__webpack_require__.n(Tag); + +// EXTERNAL MODULE: ./src/components/tag/Taglist.vue +var Taglist = __webpack_require__(202); +var Taglist_default = /*#__PURE__*/__webpack_require__.n(Taglist); + +// CONCATENATED MODULE: ./src/components/tag/index.js + + + + + +var tag_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Tag_default.a); + registerComponent(Vue, Taglist_default.a); + } +}; + +use(tag_Plugin); + +/* harmony default export */ var tag = (tag_Plugin); + + +// EXTERNAL MODULE: ./src/components/taginput/Taginput.vue +var Taginput = __webpack_require__(205); +var Taginput_default = /*#__PURE__*/__webpack_require__.n(Taginput); + +// CONCATENATED MODULE: ./src/components/taginput/index.js + + + + +var taginput_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Taginput_default.a); + } +}; + +use(taginput_Plugin); + +/* harmony default export */ var taginput = (taginput_Plugin); + + +// EXTERNAL MODULE: ./src/components/timepicker/Timepicker.vue +var Timepicker = __webpack_require__(208); +var Timepicker_default = /*#__PURE__*/__webpack_require__.n(Timepicker); + +// CONCATENATED MODULE: ./src/components/timepicker/index.js + + + + +var timepicker_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Timepicker_default.a); + } +}; + +use(timepicker_Plugin); + +/* harmony default export */ var timepicker = (timepicker_Plugin); + + +// EXTERNAL MODULE: ./src/components/toast/Toast.vue +var Toast = __webpack_require__(211); +var Toast_default = /*#__PURE__*/__webpack_require__.n(Toast); + +// CONCATENATED MODULE: ./src/components/toast/index.js + + + + + + + +var ToastProgrammatic = { + open: function open(params) { + var message = void 0; + var parent = void 0; + if (typeof params === 'string') message = params; + + var defaultParam = { + message: message, + position: config["a" /* default */].defaultToastPosition || 'is-top' + }; + if (params.parent) { + parent = params.parent; + delete params.parent; + } + var propsData = assign_default()(defaultParam, params); + + var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : external___commonjs___vue___commonjs2___vue___amd___vue___root___Vue___default.a; + var ToastComponent = vm.extend(Toast_default.a); + return new ToastComponent({ + parent: parent, + el: document.createElement('div'), + propsData: propsData + }); + } +}; + +var toast_Plugin = { + install: function install(Vue) { + registerComponentProgrammatic(Vue, '$toast', ToastProgrammatic); + } +}; + +use(toast_Plugin); + +/* harmony default export */ var toast = (toast_Plugin); + + +// EXTERNAL MODULE: ./src/components/tooltip/Tooltip.vue +var Tooltip = __webpack_require__(214); +var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip); + +// CONCATENATED MODULE: ./src/components/tooltip/index.js + + + + +var tooltip_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Tooltip_default.a); + } +}; + +use(tooltip_Plugin); + +/* harmony default export */ var tooltip = (tooltip_Plugin); + + +// EXTERNAL MODULE: ./src/components/upload/Upload.vue +var Upload = __webpack_require__(217); +var Upload_default = /*#__PURE__*/__webpack_require__.n(Upload); + +// CONCATENATED MODULE: ./src/components/upload/index.js + + + + +var upload_Plugin = { + install: function install(Vue) { + registerComponent(Vue, Upload_default.a); + } +}; + +use(upload_Plugin); + +/* harmony default export */ var upload = (upload_Plugin); + + +// CONCATENATED MODULE: ./src/components/index.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// CONCATENATED MODULE: ./src/index.js + + + + + + + + + +var Buefy = { + install: function install(Vue) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + // Options + Object(config["b" /* setOptions */])(assign_default()(config["a" /* default */], options)); + // Components + for (var componentKey in components_namespaceObject) { + Vue.use(components_namespaceObject[componentKey]); + } + // Config component + var BuefyProgrammatic = { + setOptions: function setOptions(options) { + Object(config["b" /* setOptions */])(assign_default()(config["a" /* default */], options)); + } + }; + registerComponentProgrammatic(Vue, '$buefy', BuefyProgrammatic); + } +}; + +use(Buefy); + +/* harmony default export */ var src = __webpack_exports__["default"] = (Buefy); + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(71); +module.exports = __webpack_require__(6).Object.assign; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(19); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(73) }); + + +/***/ }), +/* 72 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(24); +var gOPS = __webpack_require__(39); +var pIE = __webpack_require__(27); +var toObject = __webpack_require__(40); +var IObject = __webpack_require__(50); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(21)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(16); +var toLength = __webpack_require__(51); +var toAbsoluteIndex = __webpack_require__(75); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(35); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 77 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__input_Input__); + + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BAutocomplete', + components: __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_5__input_Input___default.a), + mixins: [__WEBPACK_IMPORTED_MODULE_4__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: [Number, String], + data: { + type: Array, + default: function _default() { + return []; + } + }, + field: { + type: String, + default: 'value' + }, + keepFirst: Boolean, + clearOnSelect: Boolean, + openOnFocus: Boolean, + customFormatter: Function + }, + data: function data() { + return { + selected: null, + hovered: null, + isActive: false, + newValue: this.value, + newAutocomplete: this.autocomplete || 'off', + isListInViewportVertically: true, + hasFocus: false, + _isAutocomplete: true, + _elementRef: 'input' + }; + }, + + computed: { + /** + * White-listed items to not close when clicked. + * Add input, dropdown and all children. + */ + whiteList: function whiteList() { + var whiteList = []; + whiteList.push(this.$refs.input.$el.querySelector('input')); + whiteList.push(this.$refs.dropdown); + // Add all chidren from dropdown + if (this.$refs.dropdown !== undefined) { + var children = this.$refs.dropdown.querySelectorAll('*'); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var child = _step.value; + + whiteList.push(child); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + + return whiteList; + }, + + + /** + * Check if exists default slot + */ + hasDefaultSlot: function hasDefaultSlot() { + return !!this.$scopedSlots.default; + }, + + + /** + * Check if exists "empty" slot + */ + hasEmptySlot: function hasEmptySlot() { + return !!this.$slots.empty; + }, + + + /** + * Check if exists "header" slot + */ + hasHeaderSlot: function hasHeaderSlot() { + return !!this.$slots.header; + } + }, + watch: { + /** + * When dropdown is toggled, check the visibility to know when + * to open upwards. + */ + isActive: function isActive(active) { + var _this = this; + + if (active) { + this.calcDropdownInViewportVertical(); + } else { + this.$nextTick(function () { + return _this.setHovered(null); + }); + // Timeout to wait for the animation to finish before recalculating + setTimeout(function () { + _this.calcDropdownInViewportVertical(); + }, 100); + } + }, + + + /** + * When updating input's value + * 1. Emit changes + * 2. If value isn't the same as selected, set null + * 3. Close dropdown if value is clear or else open it + */ + newValue: function newValue(value) { + this.$emit('input', value); + // Check if selected is invalid + var currentValue = this.getValue(this.selected); + if (currentValue && currentValue !== value) { + this.setSelected(null, false); + } + // Close dropdown if input is clear or else open it + if (this.hasFocus && (!this.openOnFocus || value)) { + this.isActive = !!value; + } + }, + + + /** + * When v-model is changed: + * 1. Update internal value. + * 2. If it's invalid, validate again. + */ + value: function value(_value) { + this.newValue = _value; + !this.isValid && this.$refs.input.checkHtml5Validity(); + }, + + + /** + * Select first option if "keep-first + */ + data: function data(value) { + // Keep first option always pre-selected + if (this.keepFirst) { + this.selectFirstOption(value); + } + } + }, + methods: { + /** + * Set which option is currently hovered. + */ + setHovered: function setHovered(option) { + if (option === undefined) return; + + this.hovered = option; + }, + + + /** + * Set which option is currently selected, update v-model, + * update input value and close dropdown. + */ + setSelected: function setSelected(option) { + var _this2 = this; + + var closeDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (option === undefined) return; + + this.selected = option; + this.$emit('select', this.selected); + if (this.selected !== null) { + this.newValue = this.clearOnSelect ? '' : this.getValue(this.selected); + } + closeDropdown && this.$nextTick(function () { + _this2.isActive = false; + }); + }, + + + /** + * Select first option + */ + selectFirstOption: function selectFirstOption(options) { + var _this3 = this; + + this.$nextTick(function () { + if (options.length) { + // If has visible data or open on focus, keep updating the hovered + if (_this3.openOnFocus || _this3.newValue !== '' && _this3.hovered !== options[0]) { + _this3.setHovered(options[0]); + } + } else { + _this3.setHovered(null); + } + }); + }, + + + /** + * Enter key listener. + * Select the hovered option. + */ + enterPressed: function enterPressed() { + if (this.hovered === null) return; + this.setSelected(this.hovered); + }, + + + /** + * Tab key listener. + * Select hovered option if it exists, close dropdown, then allow + * native handling to move to next tabbable element. + */ + tabPressed: function tabPressed() { + if (this.hovered === null) { + this.isActive = false; + return; + } + this.setSelected(this.hovered); + }, + + + /** + * Close dropdown if clicked outside. + */ + clickedOutside: function clickedOutside(event) { + if (this.whiteList.indexOf(event.target) < 0) this.isActive = false; + }, + + + /** + * Return display text for the input. + * If object, get value from path, or else just the value. + */ + getValue: function getValue(option) { + if (!option) return; + + if (typeof this.customFormatter !== 'undefined') { + return this.customFormatter(option); + } + return (typeof option === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(option)) === 'object' ? Object(__WEBPACK_IMPORTED_MODULE_3__utils_helpers__["a" /* getValueByPath */])(option, this.field) : option; + }, + + + /** + * Calculate if the dropdown is vertically visible when activated, + * otherwise it is openened upwards. + */ + calcDropdownInViewportVertical: function calcDropdownInViewportVertical() { + var _this4 = this; + + this.$nextTick(function () { + /** + * this.$refs.dropdown may be undefined + * when Autocomplete is conditional rendered + */ + if (_this4.$refs.dropdown === undefined) return; + + var rect = _this4.$refs.dropdown.getBoundingClientRect(); + + _this4.isListInViewportVertically = rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight); + }); + }, + + + /** + * Arrows keys listener. + * If dropdown is active, set hovered option, or else just open. + */ + keyArrows: function keyArrows(direction) { + var sum = direction === 'down' ? 1 : -1; + if (this.isActive) { + var index = this.data.indexOf(this.hovered) + sum; + index = index > this.data.length - 1 ? this.data.length : index; + index = index < 0 ? 0 : index; + + this.setHovered(this.data[index]); + + var list = this.$refs.dropdown.querySelector('.dropdown-content'); + var element = list.querySelectorAll('a.dropdown-item:not(.is-disabled)')[index]; + + if (!element) return; + + var visMin = list.scrollTop; + var visMax = list.scrollTop + list.clientHeight - element.clientHeight; + + if (element.offsetTop < visMin) { + list.scrollTop = element.offsetTop; + } else if (element.offsetTop >= visMax) { + list.scrollTop = element.offsetTop - list.clientHeight + element.clientHeight; + } + } else { + this.isActive = true; + } + }, + + + /** + * Focus listener. + * If value is the same as selected, select all text. + */ + focused: function focused(event) { + if (this.getValue(this.selected) === this.newValue) { + this.$el.querySelector('input').select(); + } + if (this.openOnFocus) { + this.isActive = true; + if (this.keepFirst) { + this.selectFirstOption(this.data); + } + } + this.hasFocus = true; + this.$emit('focus', event); + }, + + + /** + * Blur listener. + */ + onBlur: function onBlur(event) { + this.hasFocus = false; + this.$emit('blur', event); + }, + onInput: function onInput(event) { + var currentValue = this.getValue(this.selected); + if (currentValue && currentValue === this.newValue) return; + this.$emit('typing', this.newValue); + } + }, + created: function created() { + if (typeof window !== 'undefined') { + document.addEventListener('click', this.clickedOutside); + window.addEventListener('resize', this.calcDropdownInViewportVertical); + } + }, + beforeDestroy: function beforeDestroy() { + if (typeof window !== 'undefined') { + document.removeEventListener('click', this.clickedOutside); + window.removeEventListener('resize', this.calcDropdownInViewportVertical); + } + } +}); + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(79), __esModule: true }; + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41); +__webpack_require__(57); +module.exports = __webpack_require__(43).f('iterator'); + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(35); +var defined = __webpack_require__(34); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(56); +var descriptor = __webpack_require__(22); +var setToStringTag = __webpack_require__(42); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(14)(IteratorPrototype, __webpack_require__(4)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(9); +var anObject = __webpack_require__(15); +var getKeys = __webpack_require__(24); + +module.exports = __webpack_require__(12) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(8).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(13); +var toObject = __webpack_require__(40); +var IE_PROTO = __webpack_require__(36)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(86); +var step = __webpack_require__(87); +var Iterators = __webpack_require__(23); +var toIObject = __webpack_require__(16); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(54)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(89); +__webpack_require__(95); +__webpack_require__(96); +__webpack_require__(97); +module.exports = __webpack_require__(6).Symbol; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(8); +var has = __webpack_require__(13); +var DESCRIPTORS = __webpack_require__(12); +var $export = __webpack_require__(19); +var redefine = __webpack_require__(55); +var META = __webpack_require__(90).KEY; +var $fails = __webpack_require__(21); +var shared = __webpack_require__(37); +var setToStringTag = __webpack_require__(42); +var uid = __webpack_require__(26); +var wks = __webpack_require__(4); +var wksExt = __webpack_require__(43); +var wksDefine = __webpack_require__(44); +var enumKeys = __webpack_require__(91); +var isArray = __webpack_require__(92); +var anObject = __webpack_require__(15); +var isObject = __webpack_require__(20); +var toIObject = __webpack_require__(16); +var toPrimitive = __webpack_require__(32); +var createDesc = __webpack_require__(22); +var _create = __webpack_require__(56); +var gOPNExt = __webpack_require__(93); +var $GOPD = __webpack_require__(94); +var $DP = __webpack_require__(9); +var $keys = __webpack_require__(24); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(58).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(27).f = $propertyIsEnumerable; + __webpack_require__(39).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(25)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(14)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(26)('meta'); +var isObject = __webpack_require__(20); +var has = __webpack_require__(13); +var setDesc = __webpack_require__(9).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(21)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(24); +var gOPS = __webpack_require__(39); +var pIE = __webpack_require__(27); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(33); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(16); +var gOPN = __webpack_require__(58).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(27); +var createDesc = __webpack_require__(22); +var toIObject = __webpack_require__(16); +var toPrimitive = __webpack_require__(32); +var has = __webpack_require__(13); +var IE8_DOM_DEFINE = __webpack_require__(47); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(12) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(44)('asyncIterator'); + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(44)('observable'); + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(57); +__webpack_require__(41); +module.exports = __webpack_require__(99); + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(15); +var get = __webpack_require__(60); +module.exports = __webpack_require__(6).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(33); +var TAG = __webpack_require__(4)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(102), __esModule: true }; + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(103); +var $Object = __webpack_require__(6).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(19); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(12), 'Object', { defineProperty: __webpack_require__(9).f }); + + +/***/ }), +/* 104 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(10); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BInput', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a), + mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: [Number, String], + type: { + type: String, + default: 'text' + }, + passwordReveal: Boolean, + hasCounter: { + type: Boolean, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_2__utils_config__["a" /* default */].defaultInputHasCounter; + } + }, + customClass: { + type: String, + default: '' + } + }, + data: function data() { + return { + newValue: this.value, + newType: this.type, + newAutocomplete: this.autocomplete || __WEBPACK_IMPORTED_MODULE_2__utils_config__["a" /* default */].defaultInputAutocomplete, + isPasswordVisible: false, + _elementRef: this.type === 'textarea' ? 'textarea' : 'input' + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + !this.isValid && this.checkHtml5Validity(); + } + }, + rootClasses: function rootClasses() { + return [this.iconPosition, this.size, { + 'is-expanded': this.expanded, + 'is-loading': this.loading, + 'is-clearfix': !this.hasMessage + }]; + }, + inputClasses: function inputClasses() { + return [this.statusType, this.size, { 'is-rounded': this.rounded }]; + }, + hasIconRight: function hasIconRight() { + return this.passwordReveal || this.loading || this.statusType; + }, + + + /** + * Position of the icon or if it's both sides. + */ + iconPosition: function iconPosition() { + if (this.icon && this.hasIconRight) { + return 'has-icons-left has-icons-right'; + } else if (!this.icon && this.hasIconRight) { + return 'has-icons-right'; + } else if (this.icon) { + return 'has-icons-left'; + } + }, + + + /** + * Icon name (MDI) based on the type. + */ + statusTypeIcon: function statusTypeIcon() { + switch (this.statusType) { + case 'is-success': + return 'check'; + case 'is-danger': + return 'alert-circle'; + case 'is-info': + return 'information'; + case 'is-warning': + return 'alert'; + } + }, + + + /** + * Check if have any message prop from parent if it's a Field. + */ + hasMessage: function hasMessage() { + return !!this.statusMessage; + }, + + + /** + * Current password-reveal icon name. + */ + passwordVisibleIcon: function passwordVisibleIcon() { + return !this.isPasswordVisible ? 'eye' : 'eye-off'; + }, + + /** + * Get value length + */ + valueLength: function valueLength() { + if (typeof this.computedValue === 'string') { + return this.computedValue.length; + } else if (typeof this.computedValue === 'number') { + return this.computedValue.toString().length; + } + return 0; + } + }, + watch: { + /** + * When v-model is changed: + * 1. Set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + }, + methods: { + /** + * Toggle the visibility of a password-reveal input + * by changing the type and focus the input right away. + */ + togglePasswordVisibility: function togglePasswordVisibility() { + var _this = this; + + this.isPasswordVisible = !this.isPasswordVisible; + this.newType = this.isPasswordVisible ? 'text' : 'password'; + + this.$nextTick(function () { + _this.$refs.input.focus(); + }); + }, + + + /** + * Input's 'input' event listener, 'nextTick' is used to prevent event firing + * before ui update, helps when using masks (Cleavejs and potentially others). + */ + onInput: function onInput(event) { + var _this2 = this; + + this.$nextTick(function () { + if (event.target) { + _this2.computedValue = event.target.value; + } + }); + } + } +}); + +/***/ }), +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BIcon', + props: { + type: [String, Object], + pack: String, + icon: String, + size: String, + customSize: String, + customClass: String, + both: Boolean // This is used internally to show both MDI and FA icon + }, + computed: { + /** + * Internal icon name based on the pack. + * If pack is 'fa', gets the equivalent FA icon name of the MDI, + * internal icons are always MDI. + */ + newIcon: function newIcon() { + return this.newPack === 'mdi' ? this.newPack + '-' + this.icon : this.addFAPrefix(this.getEquivalentIconOf(this.icon)); + }, + newPack: function newPack() { + return this.pack || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultIconPack; + }, + newType: function newType() { + if (!this.type) return; + + var splitType = []; + if (typeof this.type === 'string') { + splitType = this.type.split('-'); + } else { + for (var key in this.type) { + if (this.type[key]) { + splitType = key.split('-'); + break; + } + } + } + if (splitType.length <= 1) return; + + return 'has-text-' + splitType[1]; + }, + newCustomSize: function newCustomSize() { + return this.customSize || this.customSizeByPack; + }, + customSizeByPack: function customSizeByPack() { + var defaultSize = this.newPack === 'mdi' ? 'mdi-24px' : this.addFAPrefix('lg'); + var mediumSize = this.newPack === 'mdi' ? 'mdi-36px' : this.addFAPrefix('2x'); + var largeSize = this.newPack === 'mdi' ? 'mdi-48px' : this.addFAPrefix('3x'); + switch (this.size) { + case 'is-small': + return; + case 'is-medium': + return mediumSize; + case 'is-large': + return largeSize; + default: + return defaultSize; + } + }, + useIconComponent: function useIconComponent() { + return __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultIconComponent; + } + }, + methods: { + addFAPrefix: function addFAPrefix(value) { + if (this.useIconComponent) { + return value; + } + return 'fa-' + value; + }, + + + /** + * Equivalent FA icon name of the MDI. + */ + getEquivalentIconOf: function getEquivalentIconOf(value) { + // Only transform the class if the both prop is set to true + if (!this.both) { + return value; + } + + switch (value) { + case 'check': + return 'check'; + case 'information': + return 'info-circle'; + case 'check-circle': + return 'check-circle'; + case 'alert': + return 'exclamation-triangle'; + case 'alert-circle': + return 'exclamation-circle'; + case 'arrow-up': + return 'arrow-up'; + case 'chevron-right': + return 'angle-right'; + case 'chevron-left': + return 'angle-left'; + case 'chevron-down': + return 'angle-down'; + case 'eye': + return 'eye'; + case 'eye-off': + return 'eye-slash'; + case 'menu-down': + return 'caret-down'; + case 'menu-up': + return 'caret-up'; + default: + return value; + } + } + } +}); + +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('span', { + staticClass: "icon", + class: [_vm.newType, _vm.size] + }, [(!_vm.useIconComponent) ? _c('i', { + class: [_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass] + }) : _c(_vm.useIconComponent, { + tag: "component", + class: [_vm.customClass], + attrs: { + "icon": [_vm.newPack, _vm.newIcon], + "size": _vm.newCustomSize + } + })], 1) +},staticRenderFns: []} + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "control", + class: _vm.rootClasses + }, [(_vm.type !== 'textarea') ? _c('input', _vm._b({ + ref: "input", + staticClass: "input", + class: [_vm.inputClasses, _vm.customClass], + attrs: { + "type": _vm.newType, + "autocomplete": _vm.newAutocomplete, + "maxlength": _vm.maxlength + }, + domProps: { + "value": _vm.computedValue + }, + on: { + "input": _vm.onInput, + "blur": _vm.onBlur, + "focus": _vm.onFocus + } + }, 'input', _vm.$attrs, false)) : _c('textarea', _vm._b({ + ref: "textarea", + staticClass: "textarea", + class: [_vm.inputClasses, _vm.customClass], + attrs: { + "maxlength": _vm.maxlength + }, + domProps: { + "value": _vm.computedValue + }, + on: { + "input": _vm.onInput, + "blur": _vm.onBlur, + "focus": _vm.onFocus + } + }, 'textarea', _vm.$attrs, false)), _vm._v(" "), (_vm.icon) ? _c('b-icon', { + staticClass: "is-left", + attrs: { + "icon": _vm.icon, + "pack": _vm.iconPack, + "size": _vm.iconSize + } + }) : _vm._e(), _vm._v(" "), (!_vm.loading && (_vm.passwordReveal || _vm.statusType)) ? _c('b-icon', { + staticClass: "is-right", + class: { + 'is-clickable': _vm.passwordReveal + }, + attrs: { + "icon": _vm.passwordReveal ? _vm.passwordVisibleIcon : _vm.statusTypeIcon, + "pack": _vm.iconPack, + "size": _vm.iconSize, + "type": !_vm.passwordReveal ? _vm.statusType : 'is-primary', + "both": "" + }, + nativeOn: { + "click": function($event) { + _vm.togglePasswordVisibility($event) + } + } + }) : _vm._e(), _vm._v(" "), (_vm.maxlength && _vm.hasCounter && _vm.type !== 'number') ? _c('small', { + staticClass: "help counter", + class: { + 'is-invisible': !_vm.isFocused + } + }, [_vm._v("\n " + _vm._s(_vm.valueLength) + " / " + _vm._s(_vm.maxlength) + "\n ")]) : _vm._e()], 1) +},staticRenderFns: []} + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "autocomplete control", + class: { + 'is-expanded': _vm.expanded + } + }, [_c('b-input', _vm._b({ + ref: "input", + attrs: { + "type": "text", + "size": _vm.size, + "loading": _vm.loading, + "rounded": _vm.rounded, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "maxlength": _vm.maxlength, + "autocomplete": _vm.newAutocomplete + }, + on: { + "input": _vm.onInput, + "focus": _vm.focused, + "blur": _vm.onBlur + }, + nativeOn: { + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "esc", 27, $event.key)) { return null; } + $event.preventDefault(); + _vm.isActive = false + }, + "keydown": [function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "tab", 9, $event.key)) { return null; } + _vm.tabPressed($event) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.enterPressed($event) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "up", 38, $event.key)) { return null; } + $event.preventDefault(); + _vm.keyArrows('up') + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "down", 40, $event.key)) { return null; } + $event.preventDefault(); + _vm.keyArrows('down') + }] + }, + model: { + value: (_vm.newValue), + callback: function($$v) { + _vm.newValue = $$v + }, + expression: "newValue" + } + }, 'b-input', _vm.$attrs, false)), _vm._v(" "), _c('transition', { + attrs: { + "name": "fade" + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive && (_vm.data.length > 0 || _vm.hasEmptySlot || _vm.hasHeaderSlot)), + expression: "isActive && (data.length > 0 || hasEmptySlot || hasHeaderSlot)" + }], + ref: "dropdown", + staticClass: "dropdown-menu", + class: { + 'is-opened-top': !_vm.isListInViewportVertically + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive), + expression: "isActive" + }], + staticClass: "dropdown-content" + }, [(_vm.hasHeaderSlot) ? _c('div', { + staticClass: "dropdown-item" + }, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _vm._l((_vm.data), function(option, index) { + return _c('a', { + key: index, + staticClass: "dropdown-item", + class: { + 'is-hovered': option === _vm.hovered + }, + on: { + "click": function($event) { + _vm.setSelected(option) + } + } + }, [(_vm.hasDefaultSlot) ? _vm._t("default", null, { + option: option, + index: index + }) : _c('span', [_vm._v("\n " + _vm._s(_vm.getValue(option, true)) + "\n ")])], 2) + }), _vm._v(" "), (_vm.data.length === 0 && _vm.hasEmptySlot) ? _c('div', { + staticClass: "dropdown-item is-disabled" + }, [_vm._t("empty")], 2) : _vm._e()], 2)])])], 1) +},staticRenderFns: []} + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(110), + /* template */ + __webpack_require__(111), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 110 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BButton', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a), + props: { + type: [String, Object], + size: String, + label: String, + iconPack: String, + iconLeft: String, + iconRight: String, + rounded: Boolean, + loading: Boolean, + outlined: Boolean, + inverted: Boolean, + focused: Boolean, + active: Boolean, + hovered: Boolean, + selected: Boolean, + nativeType: { + type: String, + default: 'button', + validator: function validator(value) { + return ['button', 'submit', 'reset'].indexOf(value) >= 0; + } + }, + tag: { + type: String, + default: 'button', + validator: function validator(value) { + return ['button', 'a', 'input'].indexOf(value) >= 0; + } + } + }, + computed: { + iconSize: function iconSize() { + if (!this.size || this.size === 'is-medium') { + return 'is-small'; + } else if (this.size === 'is-large') { + return 'is-medium'; + } + return this.size; + } + } +}); + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c(_vm.tag, { + tag: "component", + staticClass: "button", + class: [_vm.size, _vm.type, { + 'is-rounded': _vm.rounded, + 'is-loading': _vm.loading, + 'is-outlined': _vm.outlined, + 'is-inverted': _vm.inverted, + 'is-focused': _vm.focused, + 'is-active': _vm.active, + 'is-hovered': _vm.hovered, + 'is-selected': _vm.selected + }], + attrs: { + "type": _vm.nativeType + }, + on: { + "click": function($event) { + _vm.$emit('click', $event) + } + } + }, [(_vm.iconLeft) ? _c('b-icon', { + attrs: { + "pack": _vm.iconPack, + "icon": _vm.iconLeft, + "size": _vm.iconSize + } + }) : _vm._e(), _vm._v(" "), (_vm.label) ? _c('span', [_vm._v(_vm._s(_vm.label))]) : (_vm.$slots.default) ? _c('span', [_vm._t("default")], 2) : _vm._e(), _vm._v(" "), (_vm.iconRight) ? _c('b-icon', { + attrs: { + "pack": _vm.iconPack, + "icon": _vm.iconRight, + "size": _vm.iconSize + } + }) : _vm._e()], 1) +},staticRenderFns: []} + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BCheckbox', + props: { + value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + indeterminate: Boolean, + type: String, + disabled: Boolean, + required: Boolean, + name: String, + size: String, + trueValue: { + type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + default: true + }, + falseValue: { + type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + default: false + } + }, + data: function data() { + return { + newValue: this.value + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + } + } + }, + watch: { + /** + * When v-model change, set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + } +}); + +/***/ }), +/* 113 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('label', { + ref: "label", + staticClass: "b-checkbox checkbox", + class: [_vm.size, { + 'is-disabled': _vm.disabled + }], + attrs: { + "disabled": _vm.disabled + }, + on: { + "keydown": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.$refs.label.click() + } + } + }, [_c('input', { + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + attrs: { + "type": "checkbox", + "disabled": _vm.disabled, + "required": _vm.required, + "name": _vm.name, + "true-value": _vm.trueValue, + "false-value": _vm.falseValue + }, + domProps: { + "indeterminate": _vm.indeterminate, + "value": _vm.nativeValue, + "checked": Array.isArray(_vm.computedValue) ? _vm._i(_vm.computedValue, _vm.nativeValue) > -1 : _vm._q(_vm.computedValue, _vm.trueValue) + }, + on: { + "click": function($event) { + $event.stopPropagation(); + }, + "change": function($event) { + var $$a = _vm.computedValue, + $$el = $event.target, + $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue); + if (Array.isArray($$a)) { + var $$v = _vm.nativeValue, + $$i = _vm._i($$a, $$v); + if ($$el.checked) { + $$i < 0 && (_vm.computedValue = $$a.concat([$$v])) + } else { + $$i > -1 && (_vm.computedValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1))) + } + } else { + _vm.computedValue = $$c + } + } + } + }), _vm._v(" "), _c('span', { + staticClass: "check", + class: _vm.type + }), _vm._v(" "), _c('span', { + staticClass: "control-label" + }, [_vm._t("default")], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(115), + /* template */ + __webpack_require__(116), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BCheckboxButton', + props: { + value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + disabled: Boolean, + required: Boolean, + name: String, + size: String, + type: { + type: String, + default: 'is-primary' + } + }, + data: function data() { + return { + newValue: this.value, + isFocused: false + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + } + }, + checked: function checked() { + if (Array.isArray(this.newValue)) { + return this.newValue.indexOf(this.nativeValue) >= 0; + } + return this.newValue === this.nativeValue; + } + }, + watch: { + /** + * When v-model change, set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + } +}); + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "control" + }, [_c('label', { + ref: "label", + staticClass: "b-checkbox checkbox button", + class: [_vm.checked ? _vm.type : null, _vm.size, { + 'is-disabled': _vm.disabled, + 'is-focused': _vm.isFocused + }], + attrs: { + "disabled": _vm.disabled + }, + on: { + "keydown": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.$refs.label.click() + } + } + }, [_vm._t("default"), _vm._v(" "), _c('input', { + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + attrs: { + "type": "checkbox", + "disabled": _vm.disabled, + "required": _vm.required, + "name": _vm.name + }, + domProps: { + "value": _vm.nativeValue, + "checked": Array.isArray(_vm.computedValue) ? _vm._i(_vm.computedValue, _vm.nativeValue) > -1 : (_vm.computedValue) + }, + on: { + "click": function($event) { + $event.stopPropagation(); + }, + "focus": function($event) { + _vm.isFocused = true + }, + "blur": function($event) { + _vm.isFocused = false + }, + "change": function($event) { + var $$a = _vm.computedValue, + $$el = $event.target, + $$c = $$el.checked ? (true) : (false); + if (Array.isArray($$a)) { + var $$v = _vm.nativeValue, + $$i = _vm._i($$a, $$v); + if ($$el.checked) { + $$i < 0 && (_vm.computedValue = $$a.concat([$$v])) + } else { + $$i > -1 && (_vm.computedValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1))) + } + } else { + _vm.computedValue = $$c + } + } + } + })], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(118), + /* template */ + __webpack_require__(119), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BCollapse', + props: { + open: { + type: Boolean, + default: true + }, + animation: { + type: String, + default: 'fade' + }, + ariaId: { + type: String, + default: '' + } + }, + data: function data() { + return { + isOpen: this.open + }; + }, + + watch: { + open: function open(value) { + this.isOpen = value; + } + }, + methods: { + /** + * Toggle and emit events + */ + toggle: function toggle() { + this.isOpen = !this.isOpen; + this.$emit('update:open', this.isOpen); + this.$emit(this.isOpen ? 'open' : 'close'); + } + } +}); + +/***/ }), +/* 119 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "collapse" + }, [_c('div', { + staticClass: "collapse-trigger", + on: { + "click": _vm.toggle + } + }, [_vm._t("trigger", null, { + open: _vm.isOpen + })], 2), _vm._v(" "), _c('transition', { + attrs: { + "name": _vm.animation + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isOpen), + expression: "isOpen" + }], + staticClass: "collapse-content", + attrs: { + "id": _vm.ariaId, + "aria-expanded": _vm.isOpen + } + }, [_vm._t("default")], 2)])], 1) +},staticRenderFns: []} + +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(121), + /* template */ + __webpack_require__(133), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 121 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_TimepickerMixin__ = __webpack_require__(62); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__input_Input__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__input_Input__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_Field__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__field_Field__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ClockpickerFace__ = __webpack_require__(130); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ClockpickerFace___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__ClockpickerFace__); + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + + + + + +var outerPadding = 12; + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BClockpicker', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__ClockpickerFace___default.a.name, __WEBPACK_IMPORTED_MODULE_7__ClockpickerFace___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_4__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_5__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_6__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default.a), _components), + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_TimepickerMixin__["a" /* default */]], + props: { + pickerSize: { + type: Number, + default: 290 + }, + hourFormat: { + type: String, + default: '12', + validator: function validator(value) { + return value === '24' || value === '12'; + } + }, + incrementMinutes: { + type: Number, + default: 5 + }, + autoSwitch: { + type: Boolean, + default: true + }, + type: { + type: String, + default: 'is-primary' + } + }, + data: function data() { + return { + isSelectingHour: true, + isDragging: false, + _isClockpicker: true + }; + }, + + computed: { + hoursDisplay: function hoursDisplay() { + if (this.hoursSelected == null) return '--'; + if (this.isHourFormat24) return this.pad(this.hoursSelected); + + var display = this.hoursSelected; + if (this.meridienSelected === this.PM) display -= 12; + if (display === 0) display = 12; + return display; + }, + minutesDisplay: function minutesDisplay() { + return this.minutesSelected == null ? '--' : this.pad(this.minutesSelected); + }, + minFaceValue: function minFaceValue() { + return this.isSelectingHour && !this.isHourFormat24 && this.meridienSelected === this.PM ? 12 : 0; + }, + maxFaceValue: function maxFaceValue() { + return this.isSelectingHour ? !this.isHourFormat24 && this.meridienSelected === this.AM ? 11 : 23 : 59; + }, + faceFormatter: function faceFormatter() { + return this.isSelectingHour && !this.isHourFormat24 ? function (val) { + return val; + } : this.formatNumber; + }, + faceSize: function faceSize() { + return this.pickerSize - outerPadding * 2; + } + }, + methods: { + onClockInput: function onClockInput(value) { + if (this.isSelectingHour) { + this.hoursSelected = value; + this.onHoursChange(value); + } else { + this.minutesSelected = value; + this.onMinutesChange(value); + } + }, + onClockChange: function onClockChange(value) { + if (this.autoSwitch && this.isSelectingHour) { + this.isSelectingHour = !this.isSelectingHour; + } + }, + onMeridienClick: function onMeridienClick(value) { + if (this.meridienSelected !== value) { + this.meridienSelected = value; + this.onMeridienChange(value); + } + }, + faceDisabledValues: function faceDisabledValues() { + return this.isSelectingHour ? this.isHourDisabled : this.isMinuteDisabled; + } + }, + created: function created() { + this.incrementMinutes = 5; + } +}); + +/***/ }), +/* 122 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__ = __webpack_require__(59); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol__); + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDropdown', + props: { + value: { + type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_symbol___default.a, Function], + default: null + }, + disabled: Boolean, + hoverable: Boolean, + inline: Boolean, + position: { + type: String, + validator: function validator(value) { + return ['is-top-right', 'is-top-left', 'is-bottom-left'].indexOf(value) > -1; + } + }, + mobileModal: { + type: Boolean, + default: true + }, + ariaRole: { + type: String, + default: '' + }, + animation: { + type: String, + default: 'fade' + } + }, + data: function data() { + return { + selected: this.value, + isActive: false, + _isDropdown: true // Used internally by DropdownItem + }; + }, + + computed: { + rootClasses: function rootClasses() { + return [this.position, { + 'is-disabled': this.disabled, + 'is-hoverable': this.hoverable, + 'is-inline': this.inline, + 'is-active': this.isActive || this.inline, + 'is-mobile-modal': this.isMobileModal + }]; + }, + isMobileModal: function isMobileModal() { + return this.mobileModal && !this.inline && !this.hoverable; + }, + ariaRoleMenu: function ariaRoleMenu() { + return this.ariaRole === 'menu' || this.ariaRole === 'list' ? this.ariaRole : null; + } + }, + watch: { + /** + * When v-model is changed set the new selected item. + */ + value: function value(_value) { + this.selected = _value; + }, + + + /** + * Emit event when isActive value is changed. + */ + isActive: function isActive(value) { + this.$emit('active-change', value); + } + }, + methods: { + /** + * Click listener from DropdownItem. + * 1. Set new selected item. + * 2. Emit input event to update the user v-model. + * 3. Close the dropdown. + */ + selectItem: function selectItem(value) { + if (this.selected !== value) { + this.$emit('change', value); + this.selected = value; + } + this.$emit('input', value); + this.isActive = false; + }, + + + /** + * White-listed items to not close when clicked. + */ + isInWhiteList: function isInWhiteList(el) { + if (el === this.$refs.dropdownMenu) return true; + if (el === this.$refs.trigger) return true; + // All chidren from dropdown + if (this.$refs.dropdownMenu !== undefined) { + var children = this.$refs.dropdownMenu.querySelectorAll('*'); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(children), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var child = _step.value; + + if (el === child) { + return true; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + // All children from trigger + if (this.$refs.trigger !== undefined) { + var _children = this.$refs.trigger.querySelectorAll('*'); + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_get_iterator___default()(_children), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var _child = _step2.value; + + if (el === _child) { + return true; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + + return false; + }, + + + /** + * Close dropdown if clicked outside. + */ + clickedOutside: function clickedOutside(event) { + if (this.inline) return; + + if (!this.isInWhiteList(event.target)) this.isActive = false; + }, + + + /** + * Toggle dropdown if it's not disabled. + */ + toggle: function toggle() { + var _this = this; + + if (this.disabled || this.hoverable) return; + + if (!this.isActive) { + // if not active, toggle after clickOutside event + // this fixes toggling programmatic + this.$nextTick(function () { + _this.isActive = !_this.isActive; + }); + } else { + this.isActive = !this.isActive; + } + } + }, + created: function created() { + if (typeof window !== 'undefined') { + document.addEventListener('click', this.clickedOutside); + } + }, + beforeDestroy: function beforeDestroy() { + if (typeof window !== 'undefined') { + document.removeEventListener('click', this.clickedOutside); + } + } +}); + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "dropdown", + class: _vm.rootClasses + }, [(!_vm.inline) ? _c('div', { + ref: "trigger", + staticClass: "dropdown-trigger", + attrs: { + "role": "button", + "aria-haspopup": "true" + }, + on: { + "click": _vm.toggle + } + }, [_vm._t("trigger")], 2) : _vm._e(), _vm._v(" "), _c('transition', { + attrs: { + "name": _vm.animation + } + }, [(_vm.isMobileModal) ? _c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive), + expression: "isActive" + }], + staticClass: "background", + attrs: { + "aria-hidden": !_vm.isActive + } + }) : _vm._e()]), _vm._v(" "), _c('transition', { + attrs: { + "name": _vm.animation + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: ((!_vm.disabled && (_vm.isActive || _vm.hoverable)) || _vm.inline), + expression: "(!disabled && (isActive || hoverable)) || inline" + }], + ref: "dropdownMenu", + staticClass: "dropdown-menu", + attrs: { + "aria-hidden": !_vm.isActive + } + }, [_c('div', { + staticClass: "dropdown-content", + attrs: { + "role": _vm.ariaRoleMenu + } + }, [_vm._t("default")], 2)])])], 1) +},staticRenderFns: []} + +/***/ }), +/* 124 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDropdownItem', + props: { + value: { + type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function], + default: null + }, + separator: Boolean, + disabled: Boolean, + custom: Boolean, + paddingless: Boolean, + hasLink: Boolean, + ariaRole: { + type: String, + default: '' + } + }, + computed: { + anchorClasses: function anchorClasses() { + return { + 'is-disabled': this.$parent.disabled || this.disabled, + 'is-paddingless': this.paddingless, + 'is-active': this.value !== null && this.value === this.$parent.selected + }; + }, + itemClasses: function itemClasses() { + return { + 'dropdown-item': !this.hasLink, + 'is-disabled': this.disabled, + 'is-paddingless': this.paddingless, + 'is-active': this.value !== null && this.value === this.$parent.selected, + 'has-link': this.hasLink + }; + }, + ariaRoleItem: function ariaRoleItem() { + return this.ariaRole === 'menuitem' || this.ariaRole === 'listitem' ? this.ariaRole : null; + }, + + /** + * Check if item can be clickable. + */ + isClickable: function isClickable() { + return !this.$parent.disabled && !this.separator && !this.disabled && !this.custom; + } + }, + methods: { + /** + * Click listener, select the item. + */ + selectItem: function selectItem() { + if (!this.isClickable) return; + + this.$parent.selectItem(this.value); + this.$emit('click'); + } + }, + created: function created() { + if (!this.$parent.$data._isDropdown) { + this.$destroy(); + throw new Error('You should wrap bDropdownItem on a bDropdown'); + } + } +}); + +/***/ }), +/* 125 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return (_vm.separator) ? _c('hr', { + staticClass: "dropdown-divider" + }) : (!_vm.custom && !_vm.hasLink) ? _c('a', { + staticClass: "dropdown-item", + class: _vm.anchorClasses, + attrs: { + "role": _vm.ariaRoleItem, + "tabindex": "0" + }, + on: { + "click": _vm.selectItem + } + }, [_vm._t("default")], 2) : _c('div', { + class: _vm.itemClasses, + attrs: { + "role": _vm.ariaRoleItem, + "tabindex": "0" + }, + on: { + "click": _vm.selectItem + } + }, [_vm._t("default")], 2) +},staticRenderFns: []} + +/***/ }), +/* 126 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody__ = __webpack_require__(127); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__FieldBody___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__FieldBody__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BField', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a.name, __WEBPACK_IMPORTED_MODULE_1__FieldBody___default.a), + props: { + type: [String, Object], + label: String, + labelFor: String, + message: [String, Array, Object], + grouped: Boolean, + groupMultiline: Boolean, + position: String, + expanded: Boolean, + horizontal: Boolean, + addons: { + type: Boolean, + default: true + }, + customClass: String + }, + data: function data() { + return { + newType: this.type, + newMessage: this.message, + fieldLabelSize: null, + _isField: true // Used internally by Input and Select + }; + }, + + computed: { + rootClasses: function rootClasses() { + return [this.newPosition, { + 'is-expanded': this.expanded, + 'is-grouped-multiline': this.groupMultiline, + 'is-horizontal': this.horizontal + }]; + }, + + /** + * Correct Bulma class for the side of the addon or group. + * + * This is not kept like the others (is-small, etc.), + * because since 'has-addons' is set automatically it + * doesn't make sense to teach users what addons are exactly. + */ + newPosition: function newPosition() { + if (this.position === undefined) return; + + var position = this.position.split('-'); + if (position.length < 1) return; + + var prefix = this.grouped ? 'is-grouped-' : 'has-addons-'; + + if (this.position) return prefix + position[1]; + }, + + /** + * Formatted message in case it's an array + * (each element is separated by
tag) + */ + formattedMessage: function formattedMessage() { + if (typeof this.newMessage === 'string') { + return this.newMessage; + } else { + var messages = []; + if (Array.isArray(this.newMessage)) { + this.newMessage.forEach(function (message) { + if (typeof message === 'string') { + messages.push(message); + } else { + for (var key in message) { + if (message[key]) { + messages.push(key); + } + } + } + }); + } else { + for (var key in this.newMessage) { + if (this.newMessage[key]) { + messages.push(key); + } + } + } + return messages.filter(function (m) { + if (m) return m; + }).join('
'); + } + } + }, + watch: { + /** + * Set internal type when prop change. + */ + type: function type(value) { + this.newType = value; + }, + + + /** + * Set internal message when prop change. + */ + message: function message(value) { + this.newMessage = value; + } + }, + methods: { + /** + * Field has addons if there are more than one slot + * (element / component) in the Field. + * Or is grouped when prop is set. + * Is a method to be called when component re-render. + */ + fieldType: function fieldType() { + if (this.grouped) return 'is-grouped'; + + var renderedNode = 0; + if (this.$slots.default) { + renderedNode = this.$slots.default.reduce(function (i, node) { + return node.tag ? i + 1 : i; + }, 0); + } + if (renderedNode > 1 && this.addons && !this.horizontal) { + return 'has-addons'; + } + } + }, + mounted: function mounted() { + if (this.horizontal) { + // Bulma docs: .is-normal for any .input or .button + var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea'); + if (elements.length > 0) { + this.fieldLabelSize = 'is-normal'; + } + } + } +}); + +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(128), + /* template */ + null, + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 128 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BFieldBody', + props: { + message: { + type: String + }, + type: { + type: [String, Object] + } + }, + render: function render(createElement) { + var _this = this; + + return createElement('div', { attrs: { 'class': 'field-body' } }, this.$slots.default.map(function (element) { + // skip returns and comments + if (!element.tag) { + return element; + } + if (_this.message) { + return createElement('b-field', { attrs: { message: _this.message, 'type': _this.type } }, [element]); + } + return createElement('b-field', { attrs: { 'type': _this.type } }, [element]); + })); + } +}); + +/***/ }), +/* 129 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "field", + class: [_vm.rootClasses, _vm.fieldType()] + }, [(_vm.horizontal) ? _c('div', { + staticClass: "field-label", + class: [_vm.customClass, _vm.fieldLabelSize] + }, [(_vm.label) ? _c('label', { + staticClass: "label", + class: _vm.customClass, + attrs: { + "for": _vm.labelFor + } + }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]) : _vm._e()]) : [(_vm.label) ? _c('label', { + staticClass: "label", + class: _vm.customClass, + attrs: { + "for": _vm.labelFor + } + }, [_vm._v("\n " + _vm._s(_vm.label) + "\n ")]) : _vm._e()], _vm._v(" "), (_vm.horizontal) ? _c('b-field-body', { + attrs: { + "message": _vm.newMessage ? _vm.formattedMessage : '', + "type": _vm.newType + } + }, [_vm._t("default")], 2) : [_vm._t("default")], _vm._v(" "), (_vm.newMessage && !_vm.horizontal) ? _c('p', { + staticClass: "help", + class: _vm.newType, + domProps: { + "innerHTML": _vm._s(_vm.formattedMessage) + } + }) : _vm._e()], 2) +},staticRenderFns: []} + +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(131), + /* template */ + __webpack_require__(132), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 131 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// These should match the variables in clockpicker.scss +var indicatorSize = 40; +var paddingInner = 5; + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BClockpickerFace', + props: { + pickerSize: Number, + min: Number, + max: Number, + double: Boolean, + value: Number, + faceNumbers: Array, + disabledValues: Function + }, + data: function data() { + return { + isDragging: false, + inputValue: this.value, + prevAngle: 720 + }; + }, + + computed: { + /** + * How many number indicators are shown on the face + */ + count: function count() { + return this.max - this.min + 1; + }, + + /** + * How many number indicators are shown per ring on the face + */ + countPerRing: function countPerRing() { + return this.double ? this.count / 2 : this.count; + }, + + /** + * Radius of the clock face + */ + radius: function radius() { + return this.pickerSize / 2; + }, + + /** + * Radius of the outer ring of number indicators + */ + outerRadius: function outerRadius() { + return this.radius - paddingInner - indicatorSize / 2; + }, + + /** + * Radius of the inner ring of number indicators + */ + innerRadius: function innerRadius() { + return Math.max(this.outerRadius * 0.6, this.outerRadius - paddingInner - indicatorSize); + // 48px gives enough room for the outer ring of numbers + }, + + /** + * The angle for each selectable value + * For hours this ends up being 30 degrees, for minutes 6 degrees + */ + degreesPerUnit: function degreesPerUnit() { + return 360 / this.countPerRing; + }, + + /** + * Used for calculating x/y grid location based on degrees + */ + degrees: function degrees() { + return this.degreesPerUnit * Math.PI / 180; + }, + + /** + * Calculates the angle the clock hand should be rotated for the + * selected value + */ + handRotateAngle: function handRotateAngle() { + var currentAngle = this.prevAngle; + while (currentAngle < 0) { + currentAngle += 360; + }var targetAngle = this.calcHandAngle(this.displayedValue); + var degreesDiff = this.shortestDistanceDegrees(currentAngle, targetAngle); + var angle = this.prevAngle + degreesDiff; + return angle; + }, + + /** + * Determines how long the selector hand is based on if the + * selected value is located along the outer or inner ring + */ + handScale: function handScale() { + return this.calcHandScale(this.displayedValue); + }, + handStyle: function handStyle() { + return { + transform: 'rotate(' + this.handRotateAngle + 'deg) scaleY(' + this.handScale + ')', + transition: '.3s cubic-bezier(.25,.8,.50,1)' + }; + }, + + /** + * The value the hand should be pointing at + */ + displayedValue: function displayedValue() { + return this.inputValue == null ? this.min : this.inputValue; + } + }, + watch: { + value: function value(_value) { + if (_value !== this.inputValue) { + this.prevAngle = this.handRotateAngle; + } + this.inputValue = _value; + } + }, + methods: { + isDisabled: function isDisabled(value) { + return this.disabledValues && this.disabledValues(value); + }, + + /** + * Calculates the distance between two points + */ + euclidean: function euclidean(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + + return Math.sqrt(dx * dx + dy * dy); + }, + shortestDistanceDegrees: function shortestDistanceDegrees(start, stop) { + var modDiff = (stop - start) % 360; + var shortestDistance = 180 - Math.abs(Math.abs(modDiff) - 180); + return (modDiff + 360) % 360 < 180 ? shortestDistance * 1 : shortestDistance * -1; + }, + + /** + * Calculates the angle of the line from the center point + * to the given point. + */ + coordToAngle: function coordToAngle(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); + }, + + /** + * Generates the inline style translate() property for a + * number indicator, which determines it's location on the + * clock face + */ + getNumberTranslate: function getNumberTranslate(value) { + var _getNumberCoords = this.getNumberCoords(value), + x = _getNumberCoords.x, + y = _getNumberCoords.y; + + return 'translate(' + x + 'px, ' + y + 'px)'; + }, + + /*** + * Calculates the coordinates on the clock face for a number + * indicator value + */ + getNumberCoords: function getNumberCoords(value) { + var radius = this.isInnerRing(value) ? this.innerRadius : this.outerRadius; + return { + x: Math.round(radius * Math.sin((value - this.min) * this.degrees)), + y: Math.round(-radius * Math.cos((value - this.min) * this.degrees)) + }; + }, + getFaceNumberClasses: function getFaceNumberClasses(num) { + return { + 'active': num.value === this.displayedValue, + 'disabled': this.isDisabled(num.value) + }; + }, + + /** + * Determines if a value resides on the inner ring + */ + isInnerRing: function isInnerRing(value) { + return this.double && value - this.min >= this.countPerRing; + }, + calcHandAngle: function calcHandAngle(value) { + var angle = this.degreesPerUnit * (value - this.min); + if (this.isInnerRing(value)) angle -= 360; + return angle; + }, + calcHandScale: function calcHandScale(value) { + return this.isInnerRing(value) ? this.innerRadius / this.outerRadius : 1; + }, + onMouseDown: function onMouseDown(e) { + e.preventDefault(); + this.isDragging = true; + this.onDragMove(e); + }, + onMouseUp: function onMouseUp() { + this.isDragging = false; + if (!this.isDisabled(this.inputValue)) { + this.$emit('change', this.inputValue); + } + }, + onDragMove: function onDragMove(e) { + e.preventDefault(); + if (!this.isDragging && e.type !== 'click') return; + + var _$refs$clock$getBound = this.$refs.clock.getBoundingClientRect(), + width = _$refs$clock$getBound.width, + top = _$refs$clock$getBound.top, + left = _$refs$clock$getBound.left; + + var _ref = 'touches' in e ? e.touches[0] : e, + clientX = _ref.clientX, + clientY = _ref.clientY; + + var center = { x: width / 2, y: -width / 2 }; + var coords = { x: clientX - left, y: top - clientY }; + var handAngle = Math.round(this.coordToAngle(center, coords) + 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.countPerRing : 0); + + // Necessary to fix edge case when selecting left part of max value + if (handAngle >= 360 - this.degreesPerUnit / 2) { + value = insideClick ? this.max : this.min; + } + this.update(value); + }, + update: function update(value) { + if (this.inputValue !== value && !this.isDisabled(value)) { + this.prevAngle = this.handRotateAngle; + this.inputValue = value; + this.$emit('input', value); + } + } + } +}); + +/***/ }), +/* 132 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "b-clockpicker-face", + on: { + "mousedown": _vm.onMouseDown, + "mouseup": _vm.onMouseUp, + "mousemove": _vm.onDragMove, + "touchstart": _vm.onMouseDown, + "touchend": _vm.onMouseUp, + "touchmove": _vm.onDragMove + } + }, [_c('div', { + ref: "clock", + staticClass: "b-clockpicker-face-outer-ring" + }, [_c('div', { + staticClass: "b-clockpicker-face-hand", + style: (_vm.handStyle) + }), _vm._v(" "), _vm._l((_vm.faceNumbers), function(num, index) { + return _c('span', { + key: index, + staticClass: "b-clockpicker-face-number", + class: _vm.getFaceNumberClasses(num), + style: ({ + transform: _vm.getNumberTranslate(num.value) + }) + }, [_c('span', [_vm._v(_vm._s(num.label))])]) + })], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 133 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "b-clockpicker control", + class: [_vm.size, _vm.type, { + 'is-expanded': _vm.expanded + }] + }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', { + ref: "dropdown", + attrs: { + "position": _vm.position, + "disabled": _vm.disabled, + "inline": _vm.inline + } + }, [(!_vm.inline) ? _c('b-input', _vm._b({ + ref: "input", + attrs: { + "slot": "trigger", + "autocomplete": "off", + "value": _vm.formatValue(_vm.dateSelected), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "loading": _vm.loading, + "disabled": _vm.disabled, + "readonly": !_vm.editable, + "rounded": _vm.rounded + }, + on: { + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "blur": function($event) { + _vm.$emit('blur', $event) && _vm.checkHtml5Validity() + } + }, + nativeOn: { + "change": function($event) { + _vm.onChange($event.target.value) + } + }, + slot: "trigger" + }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "card", + attrs: { + "disabled": _vm.disabled, + "custom": "" + } + }, [(_vm.inline) ? _c('header', { + staticClass: "card-header" + }, [_c('div', { + staticClass: "b-clockpicker-header card-header-title" + }, [_c('div', { + staticClass: "b-clockpicker-time" + }, [_c('span', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.isSelectingHour + }, + on: { + "click": function($event) { + _vm.isSelectingHour = true + } + } + }, [_vm._v(_vm._s(_vm.hoursDisplay))]), _vm._v(" "), _c('span', [_vm._v(":")]), _vm._v(" "), _c('span', { + staticClass: "b-clockpicker-btn", + class: { + active: !_vm.isSelectingHour + }, + on: { + "click": function($event) { + _vm.isSelectingHour = false + } + } + }, [_vm._v(_vm._s(_vm.minutesDisplay))])]), _vm._v(" "), (!_vm.isHourFormat24) ? _c('div', { + staticClass: "b-clockpicker-period" + }, [_c('div', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.meridienSelected == _vm.AM + }, + on: { + "click": function($event) { + _vm.onMeridienClick(_vm.AM) + } + } + }, [_vm._v("am")]), _vm._v(" "), _c('div', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.meridienSelected == _vm.PM + }, + on: { + "click": function($event) { + _vm.onMeridienClick(_vm.PM) + } + } + }, [_vm._v("pm")])]) : _vm._e()])]) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "card-content" + }, [_c('div', { + staticClass: "b-clockpicker-body", + style: ({ + width: _vm.faceSize + 'px', + height: _vm.faceSize + 'px' + }) + }, [(!_vm.inline) ? _c('div', { + staticClass: "b-clockpicker-time" + }, [_c('div', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.isSelectingHour + }, + on: { + "click": function($event) { + _vm.isSelectingHour = true + } + } + }, [_vm._v("Hours")]), _vm._v(" "), _c('span', { + staticClass: "b-clockpicker-btn", + class: { + active: !_vm.isSelectingHour + }, + on: { + "click": function($event) { + _vm.isSelectingHour = false + } + } + }, [_vm._v("Min")])]) : _vm._e(), _vm._v(" "), (!_vm.isHourFormat24 && !_vm.inline) ? _c('div', { + staticClass: "b-clockpicker-period" + }, [_c('div', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.meridienSelected == _vm.AM + }, + on: { + "click": function($event) { + _vm.onMeridienClick(_vm.AM) + } + } + }, [_vm._v(_vm._s(_vm.AM))]), _vm._v(" "), _c('div', { + staticClass: "b-clockpicker-btn", + class: { + active: _vm.meridienSelected == _vm.PM + }, + on: { + "click": function($event) { + _vm.onMeridienClick(_vm.PM) + } + } + }, [_vm._v(_vm._s(_vm.PM))])]) : _vm._e(), _vm._v(" "), _c('b-clockpicker-face', { + attrs: { + "picker-size": _vm.faceSize, + "min": _vm.minFaceValue, + "max": _vm.maxFaceValue, + "face-numbers": _vm.isSelectingHour ? _vm.hours : _vm.minutes, + "disabled-values": _vm.faceDisabledValues(), + "double": _vm.isSelectingHour && _vm.isHourFormat24, + "value": _vm.isSelectingHour ? _vm.hoursSelected : _vm.minutesSelected + }, + on: { + "input": _vm.onClockInput, + "change": _vm.onClockChange + } + })], 1)]), _vm._v(" "), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', { + staticClass: "b-clockpicker-footer card-footer" + }, [_vm._t("default")], 2) : _vm._e()])], 1) : _c('b-input', _vm._b({ + ref: "input", + attrs: { + "type": "time", + "autocomplete": "off", + "value": _vm.formatHHMMSS(_vm.value), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "loading": _vm.loading, + "max": _vm.formatHHMMSS(_vm.maxTime), + "min": _vm.formatHHMMSS(_vm.minTime), + "disabled": _vm.disabled, + "readonly": false + }, + on: { + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "blur": function($event) { + _vm.$emit('blur', $event) && _vm.checkHtml5Validity() + } + }, + nativeOn: { + "change": function($event) { + _vm.onChangeNativePicker($event) + } + } + }, 'b-input', _vm.$attrs, false))], 1) +},staticRenderFns: []} + +/***/ }), +/* 134 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(135), + /* template */ + __webpack_require__(144), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 135 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__input_Input__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__field_Field__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__select_Select__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable__ = __webpack_require__(138); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__DatepickerTable__); + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDatepicker', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a.name, __WEBPACK_IMPORTED_MODULE_10__DatepickerTable___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_6__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_7__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_8__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_9__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_4__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_5__dropdown_DropdownItem___default.a), _components), + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: Date, + dayNames: { + type: Array, + default: function _default() { + if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDayNames)) { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDayNames; + } else { + return ['Su', 'M', 'Tu', 'W', 'Th', 'F', 'S']; + } + } + }, + monthNames: { + type: Array, + default: function _default() { + if (Array.isArray(__WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultMonthNames)) { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultMonthNames; + } else { + return ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + } + } + }, + firstDayOfWeek: { + type: Number, + default: function _default() { + if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultFirstDayOfWeek === 'number') { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultFirstDayOfWeek; + } else { + return 0; + } + } + }, + inline: Boolean, + minDate: Date, + maxDate: Date, + focusedDate: Date, + placeholder: String, + editable: Boolean, + disabled: Boolean, + unselectableDates: Array, + unselectableDaysOfWeek: { + type: Array, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultUnselectableDaysOfWeek; + } + }, + selectableDates: Array, + dateFormatter: { + type: Function, + default: function _default(date) { + if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateFormatter === 'function') { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateFormatter(date); + } else { + var yyyyMMdd = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate(); + var d = new Date(yyyyMMdd); + return d.toLocaleDateString(); + } + } + }, + dateParser: { + type: Function, + default: function _default(date) { + if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateParser === 'function') { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateParser(date); + } else { + return new Date(Date.parse(date)); + } + } + }, + dateCreator: { + type: Function, + default: function _default() { + if (typeof __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateCreator === 'function') { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDateCreator(); + } else { + return new Date(); + } + } + }, + mobileNative: { + type: Boolean, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDatepickerMobileNative; + } + }, + position: String, + events: Array, + indicators: { + type: String, + default: 'dots' + }, + openOnFocus: Boolean + }, + data: function data() { + var focusedDate = this.value || this.focusedDate || this.dateCreator(); + + return { + dateSelected: this.value, + focusedDateData: { + month: focusedDate.getMonth(), + year: focusedDate.getFullYear() + }, + _elementRef: 'input', + _isDatepicker: true + }; + }, + + computed: { + /* + * Returns an array of years for the year dropdown. If earliest/latest + * dates are set by props, range of years will fall within those dates. + */ + listOfYears: function listOfYears() { + var latestYear = this.focusedDateData.year + 3; + if (this.maxDate && this.maxDate.getFullYear() < latestYear) { + latestYear = this.maxDate.getFullYear(); + } + + var earliestYear = latestYear - 100 + 3; + if (this.minDate && this.minDate.getFullYear() > earliestYear) { + earliestYear = this.minDate.getFullYear(); + } + + var arrayOfYears = []; + for (var i = earliestYear; i <= latestYear; i++) { + arrayOfYears.push(i); + } + + return arrayOfYears.reverse(); + }, + isFirstMonth: function isFirstMonth() { + if (!this.minDate) return false; + var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month); + var date = new Date(this.minDate.getFullYear(), this.minDate.getMonth()); + return dateToCheck <= date; + }, + isLastMonth: function isLastMonth() { + if (!this.maxDate) return false; + var dateToCheck = new Date(this.focusedDateData.year, this.focusedDateData.month); + var date = new Date(this.maxDate.getFullYear(), this.maxDate.getMonth()); + return dateToCheck >= date; + }, + isMobile: function isMobile() { + return this.mobileNative && __WEBPACK_IMPORTED_MODULE_2__utils_helpers__["c" /* isMobile */].any(); + } + }, + watch: { + /* + * Emit input event with selected date as payload, set isActive to false. + * Update internal focusedDateData + */ + dateSelected: function dateSelected(value) { + var currentDate = !value ? this.dateCreator() : value; + this.focusedDateData = { + month: currentDate.getMonth(), + year: currentDate.getFullYear() + }; + this.$emit('input', value); + this.toggle(); + }, + + + /** + * When v-model is changed: + * 1. Update internal value. + * 2. If it's invalid, validate again. + */ + value: function value(_value) { + this.dateSelected = _value; + + !this.isValid && this.$refs.input.checkHtml5Validity(); + }, + focusedDate: function focusedDate(value) { + if (value) { + this.focusedDateData = { + month: value.getMonth(), + year: value.getFullYear() + }; + } + }, + + + /* + * Emit input event on month and/or year change + */ + 'focusedDateData.month': function focusedDateDataMonth(value) { + this.$emit('change-month', value); + }, + 'focusedDateData.year': function focusedDateDataYear(value) { + this.$emit('change-year', value); + } + }, + methods: { + /* + * Emit input event with selected date as payload for v-model in parent + */ + updateSelectedDate: function updateSelectedDate(date) { + this.dateSelected = date; + }, + + + /* + * Parse string into date + */ + onChange: function onChange(value) { + var date = this.dateParser(value); + if (date && !isNaN(date)) { + this.dateSelected = date; + } else { + // Force refresh input value when not valid date + this.dateSelected = null; + this.$refs.input.newValue = this.dateSelected; + } + }, + + + /* + * Format date into string + */ + formatValue: function formatValue(value) { + if (value && !isNaN(value)) { + return this.dateFormatter(value); + } else { + return null; + } + }, + + + /* + * Either decrement month by 1 if not January or decrement year by 1 + * and set month to 11 (December) + */ + decrementMonth: function decrementMonth() { + if (this.disabled) return; + + if (this.focusedDateData.month > 0) { + this.focusedDateData.month -= 1; + } else { + this.focusedDateData.month = 11; + this.focusedDateData.year -= 1; + } + }, + + + /* + * Either increment month by 1 if not December or increment year by 1 + * and set month to 0 (January) + */ + incrementMonth: function incrementMonth() { + if (this.disabled) return; + + if (this.focusedDateData.month < 11) { + this.focusedDateData.month += 1; + } else { + this.focusedDateData.month = 0; + this.focusedDateData.year += 1; + } + }, + + + /* + * Format date into string 'YYYY-MM-DD' + */ + formatYYYYMMDD: function formatYYYYMMDD(value) { + var date = new Date(value); + if (value && !isNaN(date)) { + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + return year + '-' + ((month < 10 ? '0' : '') + month) + '-' + ((day < 10 ? '0' : '') + day); + } + return ''; + }, + + + /* + * Parse date from string + */ + onChangeNativePicker: function onChangeNativePicker(event) { + var date = event.target.value; + this.dateSelected = date ? new Date(date.replace(/-/g, '/')) : null; + }, + + + /* + * Toggle datepicker + */ + toggle: function toggle(active) { + if (this.$refs.dropdown) { + this.$refs.dropdown.isActive = typeof active === 'boolean' ? active : !this.$refs.dropdown.isActive; + } + }, + + + /* + * Call default onFocus method and show datepicker + */ + handleOnFocus: function handleOnFocus() { + this.onFocus(); + if (this.openOnFocus) { + this.toggle(true); + } + }, + + + /** + * Keypress event that is bound to the document. + */ + keyPress: function keyPress(event) { + // Esc key + if (this.$refs.dropdown.isActive && event.keyCode === 27) { + this.toggle(false); + } + } + }, + created: function created() { + if (typeof window !== 'undefined') { + document.addEventListener('keyup', this.keyPress); + } + }, + beforeDestroy: function beforeDestroy() { + if (typeof window !== 'undefined') { + document.removeEventListener('keyup', this.keyPress); + } + } +}); + +/***/ }), +/* 136 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(10); + + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BSelect', + components: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a), + mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: { + type: [String, Number, Boolean, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a, Function], + default: null + }, + placeholder: String, + multiple: Boolean, + nativeSize: [String, Number] + }, + data: function data() { + return { + selected: this.value, + _elementRef: 'select' + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.selected; + }, + set: function set(value) { + this.selected = value; + this.$emit('input', value); + !this.isValid && this.checkHtml5Validity(); + } + }, + spanClasses: function spanClasses() { + return [this.size, this.statusType, { + 'is-fullwidth': this.expanded, + 'is-loading': this.loading, + 'is-multiple': this.multiple, + 'is-rounded': this.rounded, + 'is-empty': this.selected === null + }]; + } + }, + watch: { + /** + * When v-model is changed: + * 1. Set the selected option. + * 2. If it's invalid, validate again. + */ + value: function value(_value) { + this.selected = _value; + !this.isValid && this.checkHtml5Validity(); + } + } +}); + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "control", + class: { + 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon + } + }, [_c('span', { + staticClass: "select", + class: _vm.spanClasses + }, [_c('select', _vm._b({ + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + ref: "select", + attrs: { + "multiple": _vm.multiple, + "size": _vm.nativeSize + }, + on: { + "blur": function($event) { + _vm.$emit('blur', $event) && _vm.checkHtml5Validity() + }, + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "change": function($event) { + var $$selectedVal = Array.prototype.filter.call($event.target.options, function(o) { + return o.selected + }).map(function(o) { + var val = "_value" in o ? o._value : o.value; + return val + }); + _vm.computedValue = $event.target.multiple ? $$selectedVal : $$selectedVal[0] + } + } + }, 'select', _vm.$attrs, false), [(_vm.placeholder) ? [(_vm.computedValue == null) ? _c('option', { + attrs: { + "disabled": "", + "hidden": "" + }, + domProps: { + "value": null + } + }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")]) : _vm._e()] : _vm._e(), _vm._v(" "), _vm._t("default")], 2)]), _vm._v(" "), (_vm.icon) ? _c('b-icon', { + staticClass: "is-left", + attrs: { + "icon": _vm.icon, + "pack": _vm.iconPack, + "size": _vm.iconSize + } + }) : _vm._e()], 1) +},staticRenderFns: []} + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(139), + /* template */ + __webpack_require__(143), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 139 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__ = __webpack_require__(140); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDatepickerTable', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a.name, __WEBPACK_IMPORTED_MODULE_1__DatepickerTableRow___default.a), + props: { + value: Date, + dayNames: Array, + monthNames: Array, + firstDayOfWeek: Number, + events: Array, + indicators: String, + minDate: Date, + maxDate: Date, + focused: Object, + disabled: Boolean, + dateCreator: Function, + unselectableDates: Array, + unselectableDaysOfWeek: Array, + selectableDates: Array + }, + computed: { + visibleDayNames: function visibleDayNames() { + var visibleDayNames = []; + var index = this.firstDayOfWeek; + while (visibleDayNames.length < this.dayNames.length) { + var currentDayName = this.dayNames[index % this.dayNames.length]; + visibleDayNames.push(currentDayName); + index++; + } + return visibleDayNames; + }, + hasEvents: function hasEvents() { + return this.events && this.events.length; + }, + + + /* + * Return array of all events in the specified month + */ + eventsInThisMonth: function eventsInThisMonth() { + if (!this.events) return []; + + var monthEvents = []; + + for (var i = 0; i < this.events.length; i++) { + var event = this.events[i]; + + if (!event.hasOwnProperty('date')) { + event = { date: event }; + } + if (!event.hasOwnProperty('type')) { + event.type = 'is-primary'; + } + if (event.date.getMonth() === this.focused.month && event.date.getFullYear() === this.focused.year) { + monthEvents.push(event); + } + } + + return monthEvents; + }, + + /* + * Return array of all weeks in the specified month + */ + weeksInThisMonth: function weeksInThisMonth() { + var month = this.focused.month; + var year = this.focused.year; + var weeksInThisMonth = []; + var daysInThisMonth = new Date(year, month + 1, 0).getDate(); + + var startingDay = 1; + + while (startingDay <= daysInThisMonth + 6) { + var newWeek = this.weekBuilder(startingDay, month, year); + var weekValid = false; + + newWeek.forEach(function (day) { + if (day.getMonth() === month) { + weekValid = true; + } + }); + + if (weekValid) { + weeksInThisMonth.push(newWeek); + } + + startingDay += 7; + } + + return weeksInThisMonth; + } + }, + methods: { + /* + * Emit input event with selected date as payload for v-model in parent + */ + updateSelectedDate: function updateSelectedDate(date) { + this.$emit('input', date); + }, + + + /* + * Return array of all days in the week that the startingDate is within + */ + weekBuilder: function weekBuilder(startingDate, month, year) { + var thisMonth = new Date(year, month); + + var thisWeek = []; + + var dayOfWeek = new Date(year, month, startingDate).getDay(); + + var end = dayOfWeek >= this.firstDayOfWeek ? dayOfWeek - this.firstDayOfWeek : 7 - this.firstDayOfWeek + dayOfWeek; + + var daysAgo = 1; + for (var i = 0; i < end; i++) { + thisWeek.unshift(new Date(thisMonth.getFullYear(), thisMonth.getMonth(), startingDate - daysAgo)); + daysAgo++; + } + + thisWeek.push(new Date(year, month, startingDate)); + + var daysForward = 1; + while (thisWeek.length < 7) { + thisWeek.push(new Date(year, month, startingDate + daysForward)); + daysForward++; + } + + return thisWeek; + }, + eventsInThisWeek: function eventsInThisWeek(week) { + return this.eventsInThisMonth.filter(function (event) { + var stripped = new Date(Date.parse(event.date)); + stripped.setHours(0); + stripped.setMinutes(0); + stripped.setSeconds(0); + stripped.setMilliseconds(0); + var timed = stripped.getTime(); + + return week.some(function (weekDate) { + return weekDate.getTime() === timed; + }); + }); + } + } +}); + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(141), + /* template */ + __webpack_require__(142), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 141 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDatepickerTableRow', + props: { + selectedDate: Date, + week: { + type: Array, + required: true + }, + month: { + type: Number, + required: true + }, + minDate: Date, + maxDate: Date, + disabled: Boolean, + unselectableDates: Array, + unselectableDaysOfWeek: Array, + selectableDates: Array, + events: Array, + indicators: String, + dateCreator: Function + }, + methods: { + /* + * Check that selected day is within earliest/latest params and + * is within this month + */ + selectableDate: function selectableDate(day) { + var validity = []; + + if (this.minDate) { + validity.push(day >= this.minDate); + } + + if (this.maxDate) { + validity.push(day <= this.maxDate); + } + + validity.push(day.getMonth() === this.month); + + if (this.selectableDates) { + for (var i = 0; i < this.selectableDates.length; i++) { + var enabledDate = this.selectableDates[i]; + if (day.getDate() === enabledDate.getDate() && day.getFullYear() === enabledDate.getFullYear() && day.getMonth() === enabledDate.getMonth()) { + return true; + } else { + validity.push(false); + } + } + } + + if (this.unselectableDates) { + for (var _i = 0; _i < this.unselectableDates.length; _i++) { + var disabledDate = this.unselectableDates[_i]; + validity.push(day.getDate() !== disabledDate.getDate() || day.getFullYear() !== disabledDate.getFullYear() || day.getMonth() !== disabledDate.getMonth()); + } + } + + if (this.unselectableDaysOfWeek) { + for (var _i2 = 0; _i2 < this.unselectableDaysOfWeek.length; _i2++) { + var dayOfWeek = this.unselectableDaysOfWeek[_i2]; + validity.push(day.getDay() !== dayOfWeek); + } + } + + return validity.indexOf(false) < 0; + }, + + + /* + * Emit select event with chosen date as payload + */ + emitChosenDate: function emitChosenDate(day) { + if (this.disabled) return; + + if (this.selectableDate(day)) { + this.$emit('select', day); + } + }, + eventsDateMatch: function eventsDateMatch(day) { + if (!this.events.length) return false; + + var dayEvents = []; + + for (var i = 0; i < this.events.length; i++) { + if (this.events[i].date.getDay() === day.getDay()) { + dayEvents.push(this.events[i]); + } + } + + if (!dayEvents.length) { + return false; + } + + return dayEvents; + }, + + + /* + * Build classObject for cell using validations + */ + classObject: function classObject(day) { + function dateMatch(dateOne, dateTwo) { + // if either date is null or undefined, return false + if (!dateOne || !dateTwo) { + return false; + } + + return dateOne.getDate() === dateTwo.getDate() && dateOne.getFullYear() === dateTwo.getFullYear() && dateOne.getMonth() === dateTwo.getMonth(); + } + + return { + 'is-selected': dateMatch(day, this.selectedDate), + 'is-today': dateMatch(day, this.dateCreator()), + 'is-selectable': this.selectableDate(day) && !this.disabled, + 'is-unselectable': !this.selectableDate(day) || this.disabled + }; + } + } +}); + +/***/ }), +/* 142 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "datepicker-row" + }, [_vm._l((_vm.week), function(day, index) { + return [(_vm.selectableDate(day) && !_vm.disabled) ? _c('a', { + key: index, + staticClass: "datepicker-cell", + class: [_vm.classObject(day), { + 'has-event': _vm.eventsDateMatch(day) + }, _vm.indicators], + attrs: { + "role": "button", + "href": "#", + "disabled": _vm.disabled + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.emitChosenDate(day) + }, + "keydown": [function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.emitChosenDate(day) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "space", 32, $event.key)) { return null; } + $event.preventDefault(); + _vm.emitChosenDate(day) + }] + } + }, [_vm._v("\n " + _vm._s(day.getDate()) + "\n\n "), (_vm.eventsDateMatch(day)) ? _c('div', { + staticClass: "events" + }, _vm._l((_vm.eventsDateMatch(day)), function(event, index) { + return _c('div', { + key: index, + staticClass: "event", + class: event.type + }) + })) : _vm._e()]) : _c('div', { + key: index, + staticClass: "datepicker-cell", + class: _vm.classObject(day) + }, [_vm._v("\n " + _vm._s(day.getDate()) + "\n ")])] + })], 2) +},staticRenderFns: []} + +/***/ }), +/* 143 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('section', { + staticClass: "datepicker-table" + }, [_c('header', { + staticClass: "datepicker-header" + }, _vm._l((_vm.visibleDayNames), function(day, index) { + return _c('div', { + key: index, + staticClass: "datepicker-cell" + }, [_vm._v("\n " + _vm._s(day) + "\n ")]) + })), _vm._v(" "), _c('div', { + staticClass: "datepicker-body", + class: { + 'has-events': _vm.hasEvents + } + }, _vm._l((_vm.weeksInThisMonth), function(week, index) { + return _c('b-datepicker-table-row', { + key: index, + attrs: { + "selected-date": _vm.value, + "week": week, + "month": _vm.focused.month, + "min-date": _vm.minDate, + "max-date": _vm.maxDate, + "disabled": _vm.disabled, + "unselectable-dates": _vm.unselectableDates, + "unselectable-days-of-week": _vm.unselectableDaysOfWeek, + "selectable-dates": _vm.selectableDates, + "events": _vm.eventsInThisWeek(week), + "indicators": _vm.indicators, + "date-creator": _vm.dateCreator + }, + on: { + "select": _vm.updateSelectedDate + } + }) + }))]) +},staticRenderFns: []} + +/***/ }), +/* 144 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "datepicker control", + class: [_vm.size, { + 'is-expanded': _vm.expanded + }] + }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', { + ref: "dropdown", + attrs: { + "position": _vm.position, + "disabled": _vm.disabled, + "inline": _vm.inline + } + }, [(!_vm.inline) ? _c('b-input', _vm._b({ + ref: "input", + attrs: { + "slot": "trigger", + "autocomplete": "off", + "value": _vm.formatValue(_vm.dateSelected), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "rounded": _vm.rounded, + "loading": _vm.loading, + "disabled": _vm.disabled, + "readonly": !_vm.editable + }, + on: { + "focus": _vm.handleOnFocus, + "blur": _vm.onBlur + }, + nativeOn: { + "click": function($event) { + $event.stopPropagation(); + _vm.toggle(true) + }, + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + _vm.toggle(true) + }, + "change": function($event) { + _vm.onChange($event.target.value) + } + }, + slot: "trigger" + }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(" "), _c('b-dropdown-item', { + attrs: { + "disabled": _vm.disabled, + "custom": "" + } + }, [_c('header', { + staticClass: "datepicker-header" + }, [(_vm.$slots.header !== undefined && _vm.$slots.header.length) ? [_vm._t("header")] : _c('div', { + staticClass: "pagination field is-centered", + class: _vm.size + }, [_c('a', { + directives: [{ + name: "show", + rawName: "v-show", + value: (!_vm.isFirstMonth && !_vm.disabled), + expression: "!isFirstMonth && !disabled" + }], + staticClass: "pagination-previous", + attrs: { + "role": "button", + "href": "#", + "disabled": _vm.disabled + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.decrementMonth($event) + }, + "keydown": [function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.decrementMonth($event) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "space", 32, $event.key)) { return null; } + $event.preventDefault(); + _vm.decrementMonth($event) + }] + } + }, [_c('b-icon', { + attrs: { + "icon": "chevron-left", + "pack": _vm.iconPack, + "both": "", + "type": "is-primary is-clickable" + } + })], 1), _vm._v(" "), _c('a', { + directives: [{ + name: "show", + rawName: "v-show", + value: (!_vm.isLastMonth && !_vm.disabled), + expression: "!isLastMonth && !disabled" + }], + staticClass: "pagination-next", + attrs: { + "role": "button", + "href": "#", + "disabled": _vm.disabled + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.incrementMonth($event) + }, + "keydown": [function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.incrementMonth($event) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "space", 32, $event.key)) { return null; } + $event.preventDefault(); + _vm.incrementMonth($event) + }] + } + }, [_c('b-icon', { + attrs: { + "icon": "chevron-right", + "pack": _vm.iconPack, + "both": "", + "type": "is-primary is-clickable" + } + })], 1), _vm._v(" "), _c('div', { + staticClass: "pagination-list" + }, [_c('b-field', [_c('b-select', { + attrs: { + "disabled": _vm.disabled, + "size": _vm.size + }, + model: { + value: (_vm.focusedDateData.month), + callback: function($$v) { + _vm.$set(_vm.focusedDateData, "month", $$v) + }, + expression: "focusedDateData.month" + } + }, _vm._l((_vm.monthNames), function(month, index) { + return _c('option', { + key: month, + domProps: { + "value": index + } + }, [_vm._v("\n " + _vm._s(month) + "\n ")]) + })), _vm._v(" "), _c('b-select', { + attrs: { + "disabled": _vm.disabled, + "size": _vm.size + }, + model: { + value: (_vm.focusedDateData.year), + callback: function($$v) { + _vm.$set(_vm.focusedDateData, "year", $$v) + }, + expression: "focusedDateData.year" + } + }, _vm._l((_vm.listOfYears), function(year) { + return _c('option', { + key: year, + domProps: { + "value": year + } + }, [_vm._v("\n " + _vm._s(year) + "\n ")]) + }))], 1)], 1)])], 2), _vm._v(" "), _c('div', { + staticClass: "datepicker-content" + }, [_c('b-datepicker-table', { + attrs: { + "day-names": _vm.dayNames, + "month-names": _vm.monthNames, + "first-day-of-week": _vm.firstDayOfWeek, + "min-date": _vm.minDate, + "max-date": _vm.maxDate, + "focused": _vm.focusedDateData, + "disabled": _vm.disabled, + "unselectable-dates": _vm.unselectableDates, + "unselectable-days-of-week": _vm.unselectableDaysOfWeek, + "selectable-dates": _vm.selectableDates, + "events": _vm.events, + "indicators": _vm.indicators, + "date-creator": _vm.dateCreator + }, + on: { + "close": function($event) { + _vm.toggle(false) + } + }, + model: { + value: (_vm.dateSelected), + callback: function($$v) { + _vm.dateSelected = $$v + }, + expression: "dateSelected" + } + })], 1), _vm._v(" "), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', { + staticClass: "datepicker-footer" + }, [_vm._t("default")], 2) : _vm._e()])], 1) : _c('b-input', _vm._b({ + ref: "input", + attrs: { + "type": "date", + "autocomplete": "off", + "value": _vm.formatYYYYMMDD(_vm.value), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "loading": _vm.loading, + "max": _vm.formatYYYYMMDD(_vm.maxDate), + "min": _vm.formatYYYYMMDD(_vm.minDate), + "disabled": _vm.disabled, + "readonly": false + }, + on: { + "focus": _vm.handleOnFocus, + "blur": _vm.onBlur + }, + nativeOn: { + "change": function($event) { + _vm.onChangeNativePicker($event) + }, + "click": function($event) { + $event.stopPropagation(); + _vm.toggle(true) + }, + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + _vm.toggle(true) + } + } + }, 'b-input', _vm.$attrs, false))], 1) +},staticRenderFns: []} + +/***/ }), +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(146), + /* template */ + __webpack_require__(149), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 146 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal__ = __webpack_require__(63); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__modal_Modal__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_helpers__ = __webpack_require__(7); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BDialog', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a), + extends: __WEBPACK_IMPORTED_MODULE_2__modal_Modal___default.a, + props: { + title: String, + message: String, + icon: String, + iconPack: String, + hasIcon: Boolean, + type: { + type: String, + default: 'is-primary' + }, + size: String, + confirmText: { + type: String, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDialogConfirmText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDialogConfirmText : 'OK'; + } + }, + cancelText: { + type: String, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDialogCancelText ? __WEBPACK_IMPORTED_MODULE_3__utils_config__["a" /* default */].defaultDialogCancelText : 'Cancel'; + } + }, + hasInput: Boolean, // Used internally to know if it's prompt + inputAttrs: { + type: Object, + default: function _default() { + return {}; + } + }, + onConfirm: { + type: Function, + default: function _default() {} + }, + focusOn: { + type: String, + default: 'confirm' + } + }, + data: function data() { + var prompt = this.hasInput ? this.inputAttrs.value || '' : ''; + + return { + prompt: prompt, + isActive: false, + validationMessage: '' + }; + }, + + computed: { + /** + * Icon name (MDI) based on the type. + */ + iconByType: function iconByType() { + switch (this.type) { + case 'is-info': + return 'information'; + case 'is-success': + return 'check-circle'; + case 'is-warning': + return 'alert'; + case 'is-danger': + return 'alert-circle'; + default: + return null; + } + }, + showCancel: function showCancel() { + return this.cancelOptions.indexOf('button') >= 0; + } + }, + methods: { + /** + * If it's a prompt Dialog, validate the input. + * Call the onConfirm prop (function) and close the Dialog. + */ + confirm: function confirm() { + var _this = this; + + if (this.$refs.input !== undefined) { + if (!this.$refs.input.checkValidity()) { + this.validationMessage = this.$refs.input.validationMessage; + this.$nextTick(function () { + return _this.$refs.input.select(); + }); + return; + } + } + + this.onConfirm(this.prompt); + this.close(); + }, + + + /** + * Close the Dialog. + */ + close: function close() { + var _this2 = this; + + this.isActive = false; + // Timeout for the animation complete before destroying + setTimeout(function () { + _this2.$destroy(); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_helpers__["d" /* removeElement */])(_this2.$el); + }, 150); + } + }, + beforeMount: function beforeMount() { + var _this3 = this; + + // Insert the Dialog component in body tag + this.$nextTick(function () { + document.body.appendChild(_this3.$el); + }); + }, + mounted: function mounted() { + var _this4 = this; + + this.isActive = true; + + if (typeof this.inputAttrs.required === 'undefined') { + this.$set(this.inputAttrs, 'required', true); + } + + this.$nextTick(function () { + // Handle which element receives focus + if (_this4.hasInput) { + _this4.$refs.input.focus(); + } else if (_this4.focusOn === 'cancel' && _this4.showCancel) { + _this4.$refs.cancelButton.focus(); + } else { + _this4.$refs.confirmButton.focus(); + } + }); + } +}); + +/***/ }), +/* 147 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_config__ = __webpack_require__(2); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BModal', + props: { + active: Boolean, + component: [Object, Function], + content: String, + programmatic: Boolean, + props: Object, + events: Object, + width: { + type: [String, Number], + default: 960 + }, + hasModalCard: Boolean, + animation: { + type: String, + default: 'zoom-out' + }, + canCancel: { + type: [Array, Boolean], + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_1__utils_config__["a" /* default */].defaultModalCanCancel ? __WEBPACK_IMPORTED_MODULE_1__utils_config__["a" /* default */].defaultModalCanCancel : ['escape', 'x', 'outside', 'button']; + } + }, + onCancel: { + type: Function, + default: function _default() {} + }, + scroll: { + type: String, + default: function _default() { + return __WEBPACK_IMPORTED_MODULE_1__utils_config__["a" /* default */].defaultModalScroll ? __WEBPACK_IMPORTED_MODULE_1__utils_config__["a" /* default */].defaultModalScroll : 'clip'; + }, + validator: function validator(value) { + return ['clip', 'keep'].indexOf(value) >= 0; + } + } + }, + data: function data() { + return { + isActive: this.active || false, + savedScrollTop: null, + newWidth: typeof this.width === 'number' ? this.width + 'px' : this.width + }; + }, + + computed: { + cancelOptions: function cancelOptions() { + return typeof this.canCancel === 'boolean' ? this.canCancel ? ['escape', 'x', 'outside', 'button'] : [] : this.canCancel; + }, + showX: function showX() { + return this.cancelOptions.indexOf('x') >= 0; + } + }, + watch: { + active: function active(value) { + this.isActive = value; + }, + isActive: function isActive() { + this.handleScroll(); + } + }, + methods: { + handleScroll: function handleScroll() { + if (typeof window === 'undefined') return; + + if (this.scroll === 'clip') { + if (this.isActive) { + document.documentElement.classList.add('is-clipped'); + } else { + document.documentElement.classList.remove('is-clipped'); + } + return; + } + + this.savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop; + + if (this.isActive) { + document.body.classList.add('is-noscroll'); + } else { + document.body.classList.remove('is-noscroll'); + } + + if (this.isActive) { + document.body.style.top = '-' + this.savedScrollTop + 'px'; + return; + } + + document.documentElement.scrollTop = this.savedScrollTop; + document.body.style.top = null; + this.savedScrollTop = null; + }, + + + /** + * Close the Modal if canCancel and call the onCancel prop (function). + */ + cancel: function cancel(method) { + if (this.cancelOptions.indexOf(method) < 0) return; + + this.onCancel.apply(null, arguments); + this.close(); + }, + + + /** + * Call the onCancel prop (function). + * Emit events, and destroy modal if it's programmatic. + */ + close: function close() { + var _this = this; + + this.$emit('close'); + this.$emit('update:active', false); + + // Timeout for the animation complete before destroying + if (this.programmatic) { + this.isActive = false; + setTimeout(function () { + _this.$destroy(); + Object(__WEBPACK_IMPORTED_MODULE_0__utils_helpers__["d" /* removeElement */])(_this.$el); + }, 150); + } + }, + + + /** + * Keypress event that is bound to the document. + */ + keyPress: function keyPress(event) { + // Esc key + if (this.isActive && event.keyCode === 27) this.cancel('escape'); + } + }, + created: function created() { + if (typeof window !== 'undefined') { + document.addEventListener('keyup', this.keyPress); + } + }, + beforeMount: function beforeMount() { + // Insert the Modal component in body tag + // only if it's programmatic + this.programmatic && document.body.appendChild(this.$el); + }, + mounted: function mounted() { + if (this.programmatic) this.isActive = true;else if (this.isActive) this.handleScroll(); + }, + beforeDestroy: function beforeDestroy() { + if (typeof window !== 'undefined') { + document.removeEventListener('keyup', this.keyPress); + // reset scroll + document.documentElement.classList.remove('is-clipped'); + var savedScrollTop = !this.savedScrollTop ? document.documentElement.scrollTop : this.savedScrollTop; + document.body.classList.remove('is-noscroll'); + document.documentElement.scrollTop = savedScrollTop; + document.body.style.top = null; + } + } +}); + +/***/ }), +/* 148 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "name": _vm.animation + } + }, [(_vm.isActive) ? _c('div', { + staticClass: "modal is-active" + }, [_c('div', { + staticClass: "modal-background", + on: { + "click": function($event) { + _vm.cancel('outside') + } + } + }), _vm._v(" "), _c('div', { + staticClass: "animation-content", + class: { + 'modal-content': !_vm.hasModalCard + }, + style: ({ + maxWidth: _vm.newWidth + }) + }, [(_vm.component) ? _c(_vm.component, _vm._g(_vm._b({ + tag: "component", + on: { + "close": _vm.close + } + }, 'component', _vm.props, false), _vm.events)) : (_vm.content) ? _c('div', { + domProps: { + "innerHTML": _vm._s(_vm.content) + } + }) : _vm._t("default")], 2), _vm._v(" "), (_vm.showX) ? _c('button', { + staticClass: "modal-close is-large", + attrs: { + "type": "button" + }, + on: { + "click": function($event) { + _vm.cancel('x') + } + } + }) : _vm._e()]) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 149 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "name": _vm.animation + } + }, [(_vm.isActive) ? _c('div', { + staticClass: "dialog modal is-active", + class: _vm.size + }, [_c('div', { + staticClass: "modal-background", + on: { + "click": function($event) { + _vm.cancel('outside') + } + } + }), _vm._v(" "), _c('div', { + staticClass: "modal-card animation-content" + }, [(_vm.title) ? _c('header', { + staticClass: "modal-card-head" + }, [_c('p', { + staticClass: "modal-card-title" + }, [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm._v(" "), _c('section', { + staticClass: "modal-card-body", + class: { + 'is-titleless': !_vm.title, 'is-flex': _vm.hasIcon + } + }, [_c('div', { + staticClass: "media" + }, [(_vm.hasIcon) ? _c('div', { + staticClass: "media-left" + }, [_c('b-icon', { + attrs: { + "icon": _vm.icon ? _vm.icon : _vm.iconByType, + "pack": _vm.iconPack, + "type": _vm.type, + "both": !_vm.icon, + "size": "is-large" + } + })], 1) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "media-content" + }, [_c('p', { + domProps: { + "innerHTML": _vm._s(_vm.message) + } + }), _vm._v(" "), (_vm.hasInput) ? _c('div', { + staticClass: "field" + }, [_c('div', { + staticClass: "control" + }, [_c('input', _vm._b({ + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.prompt), + expression: "prompt" + }], + ref: "input", + staticClass: "input", + class: { + 'is-danger': _vm.validationMessage + }, + domProps: { + "value": (_vm.prompt) + }, + on: { + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + _vm.confirm($event) + }, + "input": function($event) { + if ($event.target.composing) { return; } + _vm.prompt = $event.target.value + } + } + }, 'input', _vm.inputAttrs, false))]), _vm._v(" "), _c('p', { + staticClass: "help is-danger" + }, [_vm._v(_vm._s(_vm.validationMessage))])]) : _vm._e()])])]), _vm._v(" "), _c('footer', { + staticClass: "modal-card-foot" + }, [(_vm.showCancel) ? _c('button', { + ref: "cancelButton", + staticClass: "button", + on: { + "click": function($event) { + _vm.cancel('button') + } + } + }, [_vm._v("\n " + _vm._s(_vm.cancelText) + "\n ")]) : _vm._e(), _vm._v(" "), _c('button', { + ref: "confirmButton", + staticClass: "button", + class: _vm.type, + on: { + "click": _vm.confirm + } + }, [_vm._v("\n " + _vm._s(_vm.confirmText) + "\n ")])])])]) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(151), + /* template */ + __webpack_require__(152), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 151 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ssr__ = __webpack_require__(64); +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BLoading', + props: { + active: Boolean, + programmatic: Boolean, + container: [Object, Function, __WEBPACK_IMPORTED_MODULE_1__utils_ssr__["b" /* HTMLElement */]], + isFullPage: { + type: Boolean, + default: true + }, + animation: { + type: String, + default: 'fade' + }, + canCancel: { + type: Boolean, + default: false + }, + onCancel: { + type: Function, + default: function _default() {} + } + }, + data: function data() { + return { + isActive: this.active || false + }; + }, + + watch: { + active: function active(value) { + this.isActive = value; + } + }, + methods: { + /** + * Close the Modal if canCancel. + */ + cancel: function cancel() { + if (!this.canCancel || !this.isActive) return; + + this.close(); + }, + + /** + * Emit events, and destroy modal if it's programmatic. + */ + close: function close() { + var _this = this; + + this.onCancel.apply(null, arguments); + this.$emit('close'); + this.$emit('update:active', false); + + // Timeout for the animation complete before destroying + if (this.programmatic) { + this.isActive = false; + setTimeout(function () { + _this.$destroy(); + Object(__WEBPACK_IMPORTED_MODULE_0__utils_helpers__["d" /* removeElement */])(_this.$el); + }, 150); + } + }, + + /** + * Keypress event that is bound to the document. + */ + keyPress: function keyPress(event) { + // Esc key + if (event.keyCode === 27) this.cancel(); + } + }, + created: function created() { + if (typeof window !== 'undefined') { + document.addEventListener('keyup', this.keyPress); + } + }, + beforeMount: function beforeMount() { + // Insert the Loading component in body tag + // only if it's programmatic + if (this.programmatic) { + if (!this.container) { + document.body.appendChild(this.$el); + } else { + this.isFullPage = false; + this.container.appendChild(this.$el); + } + } + }, + mounted: function mounted() { + if (this.programmatic) this.isActive = true; + }, + beforeDestroy: function beforeDestroy() { + if (typeof window !== 'undefined') { + document.removeEventListener('keyup', this.keyPress); + } + } +}); + +/***/ }), +/* 152 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "name": _vm.animation + } + }, [(_vm.isActive) ? _c('div', { + staticClass: "loading-overlay is-active", + class: { + 'is-full-page': _vm.isFullPage + } + }, [_c('div', { + staticClass: "loading-background", + on: { + "click": _vm.cancel + } + }), _vm._v(" "), _vm._t("default", [_c('div', { + staticClass: "loading-icon" + })])], 2) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(154), + /* template */ + __webpack_require__(155), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 154 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(65); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BMessage', + mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__["a" /* default */]], + props: { + ariaCloseLabel: String + }, + data: function data() { + return { + newIconSize: this.iconSize || this.size || 'is-large' + }; + } +}); + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "name": "fade" + } + }, [(_vm.isActive) ? _c('article', { + staticClass: "message", + class: [_vm.type, _vm.size] + }, [(_vm.title) ? _c('header', { + staticClass: "message-header" + }, [_c('p', [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), (_vm.closable) ? _c('button', { + staticClass: "delete", + attrs: { + "type": "button", + "aria-label": _vm.ariaCloseLabel + }, + on: { + "click": _vm.close + } + }) : _vm._e()]) : _vm._e(), _vm._v(" "), _c('section', { + staticClass: "message-body" + }, [_c('div', { + staticClass: "media" + }, [(_vm.icon && _vm.hasIcon) ? _c('div', { + staticClass: "media-left" + }, [_c('b-icon', { + class: _vm.type, + attrs: { + "icon": _vm.icon, + "pack": _vm.iconPack, + "both": "", + "size": _vm.newIconSize + } + })], 1) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "media-content" + }, [_vm._t("default")], 2)])])]) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(157), + /* template */ + __webpack_require__(158), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 157 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__ = __webpack_require__(65); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BNotification', + mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_MessageMixin_js__["a" /* default */]], + props: { + position: String, + ariaCloseLabel: String + } +}); + +/***/ }), +/* 158 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "name": "fade" + } + }, [_c('article', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive), + expression: "isActive" + }], + staticClass: "notification", + class: [_vm.type, _vm.position] + }, [(_vm.closable) ? _c('button', { + staticClass: "delete", + attrs: { + "type": "button", + "aria-label": _vm.ariaCloseLabel + }, + on: { + "click": _vm.close + } + }) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "media" + }, [(_vm.icon && _vm.hasIcon) ? _c('div', { + staticClass: "media-left" + }, [_c('b-icon', { + attrs: { + "icon": _vm.icon, + "pack": _vm.iconPack, + "both": "", + "size": "is-large", + "aria-hidden": "" + } + })], 1) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "media-content" + }, [(_vm.message) ? _c('p', { + staticClass: "text" + }, [_vm._v(_vm._s(_vm.message))]) : _vm._t("default")], 2)])])]) +},staticRenderFns: []} + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(160), + /* template */ + __webpack_require__(161), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 160 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(45); +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BNotificationNotice', + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__["a" /* default */]], + props: { + indefinite: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].detaultNotificationDuration + }; + } +}); + +/***/ }), +/* 161 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('b-notification', _vm._b({ + on: { + "close": _vm.close + } + }, 'b-notification', _vm.$options.propsData, false)) +},staticRenderFns: []} + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(163), + /* template */ + __webpack_require__(164), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 163 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_Input__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__input_Input__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__ = __webpack_require__(10); + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BNumberinput', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_2__input_Input___default.a), _components), + mixins: [__WEBPACK_IMPORTED_MODULE_3__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: Number, + min: [Number, String], + max: [Number, String], + step: [Number, String], + disabled: Boolean, + type: { + type: String, + default: 'is-primary' + }, + editable: { + type: Boolean, + default: true + }, + controlsRounded: { + type: Boolean, + default: false + }, + controlsPosition: String + }, + data: function data() { + return { + newValue: this.value || parseFloat(this.min) || 0, + newStep: this.step || 1, + _elementRef: 'input' + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + !this.isValid && this.checkHtml5Validity(); + } + }, + fieldClasses: function fieldClasses() { + return [{ 'has-addons': this.controlsPosition === 'compact' }, { 'is-grouped': this.controlsPosition !== 'compact' }]; + }, + buttonClasses: function buttonClasses() { + return [this.type, this.size, { 'is-rounded': this.controlsRounded }]; + }, + minNumber: function minNumber() { + return typeof this.min === 'string' ? parseFloat(this.min) : this.min; + }, + maxNumber: function maxNumber() { + return typeof this.max === 'string' ? parseFloat(this.max) : this.max; + }, + stepNumber: function stepNumber() { + return typeof this.newStep === 'string' ? parseFloat(this.newStep) : this.newStep; + }, + disabledMin: function disabledMin() { + return this.computedValue - this.stepNumber < this.minNumber; + }, + disabledMax: function disabledMax() { + return this.computedValue + this.stepNumber > this.maxNumber; + }, + stepDecimals: function stepDecimals() { + var step = this.stepNumber.toString(); + var index = step.indexOf('.'); + if (index >= 0) { + return step.substring(index + 1).length; + } + return 0; + } + }, + watch: { + /** + * When v-model is changed: + * 1. Set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + }, + methods: { + decrement: function decrement() { + if (typeof this.minNumber === 'undefined' || this.computedValue - this.stepNumber >= this.minNumber) { + var value = this.computedValue - this.stepNumber; + this.computedValue = parseFloat(value.toFixed(this.stepDecimals)); + } + }, + increment: function increment() { + if (typeof this.maxNumber === 'undefined' || this.computedValue + this.stepNumber <= this.maxNumber) { + var value = this.computedValue + this.stepNumber; + this.computedValue = parseFloat(value.toFixed(this.stepDecimals)); + } + }, + onControlClick: function onControlClick(event, inc) { + if (event.detail !== 0) return; + if (inc) this.increment();else this.decrement(); + }, + onStartLongPress: function onStartLongPress(event, inc) { + var _this = this; + + if (event.button !== 0 && event.type !== 'touchstart') return; + this._$intervalTime = new Date(); + clearInterval(this._$intervalRef); + this._$intervalRef = this._$intervalRef = setInterval(function () { + if (inc) _this.increment();else _this.decrement(); + }, 100); + }, + onStopLongPress: function onStopLongPress(inc) { + var d = new Date(); + if (d - this._$intervalTime < 100) { + if (inc) this.increment();else this.decrement(); + } + clearInterval(this._$intervalRef); + this._$intervalRef = null; + }, + onChange: function onChange(event) { + var value = event.target.value; + if (value) { + var number = parseFloat(value); + if (number < this.minNumber) { + this.computedValue = this.minNumber; + } else if (number > this.maxNumber) { + this.computedValue = this.maxNumber; + } + } + } + } +}); + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "b-numberinput field", + class: _vm.fieldClasses + }, [_c('p', { + staticClass: "control" + }, [_c('button', { + staticClass: "button", + class: _vm.buttonClasses, + attrs: { + "type": "button", + "disabled": _vm.disabled || _vm.disabledMin + }, + on: { + "mousedown": function($event) { + _vm.onStartLongPress($event, false) + }, + "mouseup": function($event) { + _vm.onStopLongPress(false) + }, + "mouseleave": function($event) { + _vm.onStopLongPress(false) + }, + "touchstart": function($event) { + $event.preventDefault(); + _vm.onStartLongPress($event, false) + }, + "touchend": function($event) { + _vm.onStopLongPress(false) + }, + "touchcancel": function($event) { + _vm.onStopLongPress(false) + }, + "click": function($event) { + _vm.onControlClick($event, false) + } + } + }, [_c('b-icon', { + attrs: { + "icon": "minus", + "pack": _vm.iconPack, + "size": _vm.iconSize + } + })], 1)]), _vm._v(" "), _c('b-input', _vm._b({ + attrs: { + "type": "number", + "step": _vm.newStep, + "max": _vm.max, + "min": _vm.min, + "size": _vm.size, + "disabled": _vm.disabled, + "readonly": !_vm.editable, + "loading": _vm.loading, + "rounded": _vm.rounded, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "autocomplete": _vm.autocomplete, + "expanded": _vm.expanded + }, + on: { + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "blur": function($event) { + _vm.$emit('blur', $event) + } + }, + model: { + value: (_vm.computedValue), + callback: function($$v) { + _vm.computedValue = _vm._n($$v) + }, + expression: "computedValue" + } + }, 'b-input', _vm.$attrs, false)), _vm._v(" "), _c('p', { + staticClass: "control" + }, [_c('button', { + staticClass: "button", + class: _vm.buttonClasses, + attrs: { + "type": "button", + "disabled": _vm.disabled || _vm.disabledMax + }, + on: { + "mousedown": function($event) { + _vm.onStartLongPress($event, true) + }, + "mouseup": function($event) { + _vm.onStopLongPress(true) + }, + "mouseleave": function($event) { + _vm.onStopLongPress(true) + }, + "touchstart": function($event) { + $event.preventDefault(); + _vm.onStartLongPress($event, true) + }, + "touchend": function($event) { + _vm.onStopLongPress(true) + }, + "touchcancel": function($event) { + _vm.onStopLongPress(true) + }, + "click": function($event) { + _vm.onControlClick($event, true) + } + } + }, [_c('b-icon', { + attrs: { + "icon": "plus", + "pack": _vm.iconPack, + "size": _vm.iconSize + } + })], 1)])], 1) +},staticRenderFns: []} + +/***/ }), +/* 165 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__icon_Icon__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BPagination', + components: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()({}, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_1__icon_Icon___default.a), + props: { + total: [Number, String], + perPage: { + type: [Number, String], + default: 20 + }, + current: { + type: [Number, String], + default: 1 + }, + size: String, + simple: Boolean, + rounded: Boolean, + order: String, + iconPack: String, + ariaNextLabel: String, + ariaPreviousLabel: String, + ariaPageLabel: String, + ariaCurrentLabel: String + }, + computed: { + rootClasses: function rootClasses() { + return [this.order, this.size, { + 'is-simple': this.simple, + 'is-rounded': this.rounded + }]; + }, + + + /** + * Total page size (count). + */ + pageCount: function pageCount() { + return Math.ceil(this.total / this.perPage); + }, + + + /** + * First item of the page (count). + */ + firstItem: function firstItem() { + var firstItem = this.current * this.perPage - this.perPage + 1; + return firstItem >= 0 ? firstItem : 0; + }, + + + /** + * Check if previous button is available. + */ + hasPrev: function hasPrev() { + return this.current > 1; + }, + + + /** + * Check if first page button should be visible. + */ + hasFirst: function hasFirst() { + return this.current >= 3; + }, + + + /** + * Check if first ellipsis should be visible. + */ + hasFirstEllipsis: function hasFirstEllipsis() { + return this.current >= 4; + }, + + + /** + * Check if last page button should be visible. + */ + hasLast: function hasLast() { + return this.current <= this.pageCount - 2; + }, + + + /** + * Check if last ellipsis should be visible. + */ + hasLastEllipsis: function hasLastEllipsis() { + return this.current < this.pageCount - 2 && this.current <= this.pageCount - 3; + }, + + + /** + * Check if next button is available. + */ + hasNext: function hasNext() { + return this.current < this.pageCount; + }, + + + /** + * Get near pages, 1 before and 1 after the current. + * Also add the click event to the array. + */ + pagesInRange: function pagesInRange() { + var _this = this; + + if (this.simple) return; + + var left = Math.max(1, this.current - 1); + var right = Math.min(this.current + 1, this.pageCount); + + var pages = []; + + var _loop = function _loop(i) { + pages.push({ + number: i, + isCurrent: _this.current === i, + click: function click(event) { + if (_this.current === i) return; + _this.$emit('change', i); + _this.$emit('update:current', i); + + // Set focus on element to keep tab order + _this.$nextTick(function () { + return event.target.focus(); + }); + } + }); + }; + + for (var i = left; i <= right; i++) { + _loop(i); + } + return pages; + } + }, + watch: { + /** + * If current page is trying to be greater than page count, set to last. + */ + pageCount: function pageCount(value) { + if (this.current > value) this.last(); + } + }, + methods: { + /** + * Previous button click listener. + */ + prev: function prev() { + if (!this.hasPrev) return; + this.$emit('change', this.current - 1); + this.$emit('update:current', this.current - 1); + }, + + + /** + * First button click listener. + */ + first: function first() { + this.$emit('change', 1); + this.$emit('update:current', 1); + }, + + + /** + * Last button click listener. + */ + last: function last() { + this.$emit('change', this.pageCount); + this.$emit('update:current', this.pageCount); + }, + + + /** + * Next button click listener. + */ + next: function next() { + if (!this.hasNext) return; + this.$emit('change', this.current + 1); + this.$emit('update:current', this.current + 1); + }, + + + /** + * Get text for aria-label according to page number. + */ + getAriaPageLabel: function getAriaPageLabel(pageNumber, isCurrent) { + if (this.ariaPageLabel && (!isCurrent || !this.ariaCurrentLabel)) { + return this.ariaPageLabel + ' ' + pageNumber + '.'; + } else if (this.ariaPageLabel && isCurrent && this.ariaCurrentLabel) { + return this.ariaCurrentLabel + ', ' + this.ariaPageLabel + ' ' + pageNumber + '.'; + } + return null; + } + } +}); + +/***/ }), +/* 166 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('nav', { + staticClass: "pagination", + class: _vm.rootClasses + }, [_c('a', { + staticClass: "pagination-previous", + attrs: { + "role": "button", + "href": "#", + "disabled": !_vm.hasPrev, + "aria-label": _vm.ariaPreviousLabel + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.prev($event) + } + } + }, [_c('b-icon', { + attrs: { + "icon": "chevron-left", + "pack": _vm.iconPack, + "both": "", + "aria-hidden": "" + } + })], 1), _vm._v(" "), _c('a', { + staticClass: "pagination-next", + attrs: { + "role": "button", + "href": "#", + "disabled": !_vm.hasNext, + "aria-label": _vm.ariaNextLabel + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.next($event) + } + } + }, [_c('b-icon', { + attrs: { + "icon": "chevron-right", + "pack": _vm.iconPack, + "both": "", + "aria-hidden": "" + } + })], 1), _vm._v(" "), (!_vm.simple) ? _c('ul', { + staticClass: "pagination-list" + }, [(_vm.hasFirst) ? _c('li', [_c('a', { + staticClass: "pagination-link", + attrs: { + "role": "button", + "href": "#", + "aria-label": _vm.getAriaPageLabel(1, false) + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.first($event) + } + } + }, [_vm._v("\n 1\n ")])]) : _vm._e(), _vm._v(" "), (_vm.hasFirstEllipsis) ? _c('li', [_c('span', { + staticClass: "pagination-ellipsis" + }, [_vm._v("…")])]) : _vm._e(), _vm._v(" "), _vm._l((_vm.pagesInRange), function(page) { + return _c('li', { + key: page.number + }, [_c('a', { + staticClass: "pagination-link", + class: { + 'is-current': page.isCurrent + }, + attrs: { + "role": "button", + "href": "#", + "aria-label": _vm.getAriaPageLabel(page.number, page.isCurrent), + "aria-current": page.isCurrent + }, + on: { + "click": function($event) { + $event.preventDefault(); + page.click($event) + } + } + }, [_vm._v("\n " + _vm._s(page.number) + "\n ")])]) + }), _vm._v(" "), (_vm.hasLastEllipsis) ? _c('li', [_c('span', { + staticClass: "pagination-ellipsis" + }, [_vm._v("…")])]) : _vm._e(), _vm._v(" "), (_vm.hasLast) ? _c('li', [_c('a', { + staticClass: "pagination-link", + attrs: { + "role": "button", + "href": "#", + "aria-label": _vm.getAriaPageLabel(_vm.pageCount, false) + }, + on: { + "click": function($event) { + $event.preventDefault(); + _vm.last($event) + } + } + }, [_vm._v("\n " + _vm._s(_vm.pageCount) + "\n ")])]) : _vm._e()], 2) : _vm._e(), _vm._v(" "), (_vm.simple) ? _c('small', { + staticClass: "info" + }, [(_vm.perPage == 1) ? [_vm._v("\n " + _vm._s(_vm.firstItem) + " / " + _vm._s(_vm.total) + "\n ")] : [_vm._v("\n " + _vm._s(_vm.firstItem) + "-" + _vm._s(Math.min(_vm.current * _vm.perPage, _vm.total)) + " / " + _vm._s(_vm.total) + "\n ")]], 2) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 167 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(168), + /* template */ + __webpack_require__(169), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 168 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BRadio', + props: { + value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + type: String, + disabled: Boolean, + required: Boolean, + name: String, + size: String + }, + data: function data() { + return { + newValue: this.value + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + } + } + }, + watch: { + /** + * When v-model change, set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + } +}); + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('label', { + ref: "label", + staticClass: "b-radio radio", + class: [_vm.size, { + 'is-disabled': _vm.disabled + }], + attrs: { + "disabled": _vm.disabled, + "tabindex": _vm.disabled ? false : 0 + }, + on: { + "keydown": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key) && _vm._k($event.keyCode, "space", 32, $event.key)) { return null; } + $event.preventDefault(); + _vm.$refs.label.click() + } + } + }, [_c('input', { + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + attrs: { + "tabindex": "-1", + "type": "radio", + "disabled": _vm.disabled, + "required": _vm.required, + "name": _vm.name + }, + domProps: { + "value": _vm.nativeValue, + "checked": _vm._q(_vm.computedValue, _vm.nativeValue) + }, + on: { + "click": function($event) { + $event.stopPropagation(); + }, + "change": function($event) { + _vm.computedValue = _vm.nativeValue + } + } + }), _vm._v(" "), _c('span', { + staticClass: "check", + class: _vm.type + }), _vm._v(" "), _c('span', { + staticClass: "control-label" + }, [_vm._t("default")], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(171), + /* template */ + __webpack_require__(172), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 171 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BRadioButton', + props: { + value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + type: { + type: String, + default: 'is-primary' + }, + disabled: Boolean, + required: Boolean, + name: String, + size: String + }, + data: function data() { + return { + newValue: this.value + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + } + } + }, + watch: { + /** + * When v-model change, set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + } +}); + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "control" + }, [_c('label', { + ref: "label", + staticClass: "b-radio radio button", + class: [_vm.newValue === _vm.nativeValue ? _vm.type : null, _vm.size], + attrs: { + "disabled": _vm.disabled, + "tabindex": _vm.disabled ? false : 0 + }, + on: { + "keydown": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key) && _vm._k($event.keyCode, "space", 32, $event.key)) { return null; } + $event.preventDefault(); + _vm.$refs.label.click() + } + } + }, [_vm._t("default"), _vm._v(" "), _c('input', { + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + attrs: { + "tabindex": "-1", + "type": "radio", + "disabled": _vm.disabled, + "required": _vm.required, + "name": _vm.name + }, + domProps: { + "value": _vm.nativeValue, + "checked": _vm._q(_vm.computedValue, _vm.nativeValue) + }, + on: { + "click": function($event) { + $event.stopPropagation(); + }, + "change": function($event) { + _vm.computedValue = _vm.nativeValue + } + } + })], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(174), + /* template */ + __webpack_require__(175), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 174 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(45); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BSnackbar', + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__["a" /* default */]], + props: { + actionText: { + type: String, + default: 'OK' + }, + onAction: { + type: Function, + default: function _default() {} + }, + indefinite: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultSnackbarDuration + }; + }, + + methods: { + /** + * Click listener. + * Call action prop before closing (from Mixin). + */ + action: function action() { + this.onAction(); + this.close(); + } + } +}); + +/***/ }), +/* 175 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "enter-active-class": _vm.transition.enter, + "leave-active-class": _vm.transition.leave + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive), + expression: "isActive" + }], + staticClass: "snackbar", + class: [_vm.type, _vm.position] + }, [_c('p', { + staticClass: "text" + }, [_vm._v(_vm._s(_vm.message))]), _vm._v(" "), (_vm.actionText) ? _c('div', { + staticClass: "action", + class: _vm.type, + on: { + "click": _vm.action + } + }, [_c('button', { + staticClass: "button" + }, [_vm._v(_vm._s(_vm.actionText))])]) : _vm._e()])]) +},staticRenderFns: []} + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(177), + /* template */ + __webpack_require__(178), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 177 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BSwitch', + props: { + value: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + nativeValue: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + disabled: Boolean, + type: String, + name: String, + required: Boolean, + size: String, + trueValue: { + type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + default: true + }, + falseValue: { + type: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + default: false + } + }, + data: function data() { + return { + newValue: this.value, + isMouseDown: false + }; + }, + + computed: { + computedValue: { + get: function get() { + return this.newValue; + }, + set: function set(value) { + this.newValue = value; + this.$emit('input', value); + } + } + }, + watch: { + /** + * When v-model change, set internal value. + */ + value: function value(_value) { + this.newValue = _value; + } + } +}); + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('label', { + ref: "label", + staticClass: "switch", + class: [_vm.size, { + 'is-disabled': _vm.disabled + }], + attrs: { + "disabled": _vm.disabled + }, + on: { + "keydown": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "enter", 13, $event.key)) { return null; } + $event.preventDefault(); + _vm.$refs.label.click() + }, + "mousedown": function($event) { + _vm.isMouseDown = true + }, + "mouseup": function($event) { + _vm.isMouseDown = false + }, + "mouseout": function($event) { + _vm.isMouseDown = false + }, + "blur": function($event) { + _vm.isMouseDown = false + } + } + }, [_c('input', { + directives: [{ + name: "model", + rawName: "v-model", + value: (_vm.computedValue), + expression: "computedValue" + }], + attrs: { + "type": "checkbox", + "disabled": _vm.disabled, + "name": _vm.name, + "required": _vm.required, + "true-value": _vm.trueValue, + "false-value": _vm.falseValue + }, + domProps: { + "value": _vm.nativeValue, + "checked": Array.isArray(_vm.computedValue) ? _vm._i(_vm.computedValue, _vm.nativeValue) > -1 : _vm._q(_vm.computedValue, _vm.trueValue) + }, + on: { + "click": function($event) { + $event.stopPropagation(); + }, + "change": function($event) { + var $$a = _vm.computedValue, + $$el = $event.target, + $$c = $$el.checked ? (_vm.trueValue) : (_vm.falseValue); + if (Array.isArray($$a)) { + var $$v = _vm.nativeValue, + $$i = _vm._i($$a, $$v); + if ($$el.checked) { + $$i < 0 && (_vm.computedValue = $$a.concat([$$v])) + } else { + $$i > -1 && (_vm.computedValue = $$a.slice(0, $$i).concat($$a.slice($$i + 1))) + } + } else { + _vm.computedValue = $$c + } + } + } + }), _vm._v(" "), _c('span', { + staticClass: "check", + class: [{ + 'is-elastic': _vm.isMouseDown && !_vm.disabled + }, _vm.type] + }), _vm._v(" "), _c('span', { + staticClass: "control-label" + }, [_vm._t("default")], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(180), + /* template */ + __webpack_require__(194), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 180 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__ = __webpack_require__(181); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__ = __webpack_require__(61); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__icon_Icon__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__ = __webpack_require__(66); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__pagination_Pagination__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__TableMobileSort__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn__ = __webpack_require__(67); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TableColumn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__TableColumn__); + + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTable', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a.name, __WEBPACK_IMPORTED_MODULE_3__checkbox_Checkbox___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_4__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a.name, __WEBPACK_IMPORTED_MODULE_5__pagination_Pagination___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a.name, __WEBPACK_IMPORTED_MODULE_6__TableMobileSort___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a.name, __WEBPACK_IMPORTED_MODULE_7__TableColumn___default.a), _components), + props: { + data: { + type: Array, + default: function _default() { + return []; + } + }, + columns: { + type: Array, + default: function _default() { + return []; + } + }, + bordered: Boolean, + striped: Boolean, + narrowed: Boolean, + hoverable: Boolean, + loading: Boolean, + detailed: Boolean, + checkable: Boolean, + selected: Object, + focusable: Boolean, + customIsChecked: Function, + isRowCheckable: { + type: Function, + default: function _default() { + return true; + } + }, + checkedRows: { + type: Array, + default: function _default() { + return []; + } + }, + mobileCards: { + type: Boolean, + default: true + }, + defaultSort: [String, Array], + defaultSortDirection: { + type: String, + default: 'asc' + }, + paginated: Boolean, + currentPage: { + type: Number, + default: 1 + }, + perPage: { + type: [Number, String], + default: 20 + }, + showDetailIcon: { + type: Boolean, + default: true + }, + paginationSimple: Boolean, + paginationSize: String, + backendSorting: Boolean, + rowClass: { + type: Function, + default: function _default() { + return ''; + } + }, + openedDetailed: { + type: Array, + default: function _default() { + return []; + } + }, + hasDetailedVisible: { + type: Function, + default: function _default() { + return true; + } + }, + detailKey: { + type: String, + default: '' + }, + customDetailRow: { + type: Boolean, + default: false + }, + backendPagination: Boolean, + total: { + type: [Number, String], + default: 0 + }, + iconPack: String, + mobileSortPlaceholder: String, + customRowKey: String, + draggable: { + type: Boolean, + defualt: false + }, + ariaNextLabel: String, + ariaPreviousLabel: String, + ariaPageLabel: String, + ariaCurrentLabel: String + }, + data: function data() { + return { + getValueByPath: __WEBPACK_IMPORTED_MODULE_2__utils_helpers__["a" /* getValueByPath */], + newColumns: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.columns)), + visibleDetailRows: this.openedDetailed, + newData: this.data, + newDataTotal: this.backendPagination ? this.total : this.data.length, + newCheckedRows: [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(this.checkedRows)), + newCurrentPage: this.currentPage, + currentSortColumn: {}, + isAsc: true, + firstTimeSort: true, // Used by first time initSort + _isTable: true // Used by TableColumn + }; + }, + + computed: { + /** + * return if detailed row tabled + * will be with chevron column & icon or not + */ + showDetailRowIcon: function showDetailRowIcon() { + return this.detailed && this.showDetailIcon; + }, + tableClasses: function tableClasses() { + return { + 'is-bordered': this.bordered, + 'is-striped': this.striped, + 'is-narrow': this.narrowed, + 'has-mobile-cards': this.mobileCards, + 'is-hoverable': (this.hoverable || this.focusable) && this.visibleData.length + }; + }, + + + /** + * Splitted data based on the pagination. + */ + visibleData: function visibleData() { + if (!this.paginated) return this.newData; + + var currentPage = this.newCurrentPage; + var perPage = this.perPage; + + if (this.newData.length <= perPage) { + return this.newData; + } else { + var start = (currentPage - 1) * perPage; + var end = parseInt(start, 10) + parseInt(perPage, 10); + return this.newData.slice(start, end); + } + }, + visibleColumns: function visibleColumns() { + if (!this.newColumns) return this.newColumns; + return this.newColumns.filter(function (column) { + return column.visible || column.visible === undefined; + }); + }, + + + /** + * Check if all rows in the page are checked. + */ + isAllChecked: function isAllChecked() { + var _this = this; + + var validVisibleData = this.visibleData.filter(function (row) { + return _this.isRowCheckable(row); + }); + if (validVisibleData.length === 0) return false; + var isAllChecked = validVisibleData.some(function (currentVisibleRow) { + return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["b" /* indexOf */])(_this.newCheckedRows, currentVisibleRow, _this.customIsChecked) < 0; + }); + return !isAllChecked; + }, + + + /** + * Check if all rows in the page are checkable. + */ + isAllUncheckable: function isAllUncheckable() { + var _this2 = this; + + var validVisibleData = this.visibleData.filter(function (row) { + return _this2.isRowCheckable(row); + }); + return validVisibleData.length === 0; + }, + + + /** + * Check if has any sortable column. + */ + hasSortablenewColumns: function hasSortablenewColumns() { + return this.newColumns.some(function (column) { + return column.sortable; + }); + }, + + + /** + * Return total column count based if it's checkable or expanded + */ + columnCount: function columnCount() { + var count = this.newColumns.length; + count += this.checkable ? 1 : 0; + count += this.detailed ? 1 : 0; + + return count; + } + }, + watch: { + /** + * When data prop change: + * 1. Update internal value. + * 2. Reset newColumns (thead), in case it's on a v-for loop. + * 3. Sort again if it's not backend-sort. + * 4. Set new total if it's not backend-paginated. + */ + data: function data(value) { + var _this3 = this; + + // Save newColumns before resetting + var newColumns = this.newColumns; + + this.newColumns = []; + this.newData = value; + + // Prevent table from being headless, data could change and created hook + // on column might not trigger + this.$nextTick(function () { + if (!_this3.newColumns.length) _this3.newColumns = newColumns; + }); + + if (!this.backendSorting) { + this.sort(this.currentSortColumn, true); + } + if (!this.backendPagination) { + this.newDataTotal = value.length; + } + }, + + + /** + * When Pagination total change, update internal total + * only if it's backend-paginated. + */ + total: function total(newTotal) { + if (!this.backendPagination) return; + + this.newDataTotal = newTotal; + }, + + + /** + * When checkedRows prop change, update internal value without + * mutating original data. + */ + checkedRows: function checkedRows(rows) { + this.newCheckedRows = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(rows)); + }, + columns: function columns(value) { + this.newColumns = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(value)); + }, + newColumns: function newColumns(value) { + this.checkSort(); + }, + + + /** + * When the user wants to control the detailed rows via props. + * Or wants to open the details of certain row with the router for example. + */ + openedDetailed: function openedDetailed(expandedRows) { + this.visibleDetailRows = expandedRows; + }, + currentPage: function currentPage(newVal) { + this.newCurrentPage = newVal; + } + }, + methods: { + /** + * Sort an array by key without mutating original data. + * Call the user sort function if it was passed. + */ + sortBy: function sortBy(array, key, fn, isAsc) { + var sorted = []; + // Sorting without mutating original data + if (fn && typeof fn === 'function') { + sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) { + return fn(a, b, isAsc); + }); + } else { + sorted = [].concat(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toConsumableArray___default()(array)).sort(function (a, b) { + // Get nested values from objects + var newA = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["a" /* getValueByPath */])(a, key); + var newB = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["a" /* getValueByPath */])(b, key); + + // sort boolean type + if (typeof newA === 'boolean' && typeof newB === 'boolean') { + return isAsc ? newA - newB : newB - newA; + } + + if (!newA && newA !== 0) return 1; + if (!newB && newB !== 0) return -1; + if (newA === newB) return 0; + + newA = typeof newA === 'string' ? newA.toUpperCase() : newA; + newB = typeof newB === 'string' ? newB.toUpperCase() : newB; + + return isAsc ? newA > newB ? 1 : -1 : newA > newB ? -1 : 1; + }); + } + + return sorted; + }, + + + /** + * Sort the column. + * Toggle current direction on column if it's sortable + * and not just updating the prop. + */ + sort: function sort(column) { + var updatingData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!column || !column.sortable) return; + + if (!updatingData) { + this.isAsc = column === this.currentSortColumn ? !this.isAsc : this.defaultSortDirection.toLowerCase() !== 'desc'; + } + if (!this.firstTimeSort) { + this.$emit('sort', column.field, this.isAsc ? 'asc' : 'desc'); + } + if (!this.backendSorting) { + this.newData = this.sortBy(this.newData, column.field, column.customSort, this.isAsc); + } + this.currentSortColumn = column; + }, + + + /** + * Check if the row is checked (is added to the array). + */ + isRowChecked: function isRowChecked(row) { + return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["b" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked) >= 0; + }, + + + /** + * Remove a checked row from the array. + */ + removeCheckedRow: function removeCheckedRow(row) { + var index = Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["b" /* indexOf */])(this.newCheckedRows, row, this.customIsChecked); + if (index >= 0) { + this.newCheckedRows.splice(index, 1); + } + }, + + + /** + * Header checkbox click listener. + * Add or remove all rows in current page. + */ + checkAll: function checkAll() { + var _this4 = this; + + var isAllChecked = this.isAllChecked; + this.visibleData.forEach(function (currentRow) { + _this4.removeCheckedRow(currentRow); + if (!isAllChecked) { + if (_this4.isRowCheckable(currentRow)) { + _this4.newCheckedRows.push(currentRow); + } + } + }); + + this.$emit('check', this.newCheckedRows); + this.$emit('check-all', this.newCheckedRows); + + // Emit checked rows to update user variable + this.$emit('update:checkedRows', this.newCheckedRows); + }, + + + /** + * Row checkbox click listener. + * Add or remove a single row. + */ + checkRow: function checkRow(row) { + if (!this.isRowChecked(row)) { + this.newCheckedRows.push(row); + } else { + this.removeCheckedRow(row); + } + + this.$emit('check', this.newCheckedRows, row); + + // Emit checked rows to update user variable + this.$emit('update:checkedRows', this.newCheckedRows); + }, + + + /** + * Row click listener. + * Emit all necessary events. + */ + selectRow: function selectRow(row, index) { + this.$emit('click', row); + + if (this.selected === row) return; + + // Emit new and old row + this.$emit('select', row, this.selected); + + // Emit new row to update user variable + this.$emit('update:selected', row); + }, + + + /** + * Paginator change listener. + */ + pageChanged: function pageChanged(page) { + this.newCurrentPage = page > 0 ? page : 1; + this.$emit('page-change', this.newCurrentPage); + this.$emit('update:currentPage', this.newCurrentPage); + }, + + + /** + * Toggle to show/hide details slot + */ + toggleDetails: function toggleDetails(obj) { + var found = this.isVisibleDetailRow(obj); + + if (found) { + this.closeDetailRow(obj); + this.$emit('details-close', obj); + } else { + this.openDetailRow(obj); + this.$emit('details-open', obj); + } + + // Syncs the detailed rows with the parent component + this.$emit('update:openedDetailed', this.visibleDetailRows); + }, + openDetailRow: function openDetailRow(obj) { + var index = this.handleDetailKey(obj); + this.visibleDetailRows.push(index); + }, + closeDetailRow: function closeDetailRow(obj) { + var index = this.handleDetailKey(obj); + var i = this.visibleDetailRows.indexOf(index); + this.visibleDetailRows.splice(i, 1); + }, + isVisibleDetailRow: function isVisibleDetailRow(obj) { + var index = this.handleDetailKey(obj); + var result = this.visibleDetailRows.indexOf(index) >= 0; + return result; + }, + isActiveDetailRow: function isActiveDetailRow(row) { + return this.detailed && !this.customDetailRow && this.isVisibleDetailRow(row); + }, + isActiveCustomDetailRow: function isActiveCustomDetailRow(row) { + return this.detailed && this.customDetailRow && this.isVisibleDetailRow(row); + }, + + + /** + * When the detailKey is defined we use the object[detailKey] as index. + * If not, use the object reference by default. + */ + handleDetailKey: function handleDetailKey(index) { + var key = this.detailKey; + return !key.length ? index : index[key]; + }, + checkPredefinedDetailedRows: function checkPredefinedDetailedRows() { + var defaultExpandedRowsDefined = this.openedDetailed.length > 0; + if (defaultExpandedRowsDefined && !this.detailKey.length) { + throw new Error('If you set a predefined opened-detailed, you must provide a unique key using the prop "detail-key"'); + } + }, + + + /** + * Call initSort only first time (For example async data). + */ + checkSort: function checkSort() { + if (this.newColumns.length && this.firstTimeSort) { + this.initSort(); + this.firstTimeSort = false; + } else if (this.newColumns.length) { + if (this.currentSortColumn.field) { + for (var i = 0; i < this.newColumns.length; i++) { + if (this.newColumns[i].field === this.currentSortColumn.field) { + this.currentSortColumn = this.newColumns[i]; + break; + } + } + } + } + }, + + + /** + * Check if footer slot has custom content. + */ + hasCustomFooterSlot: function hasCustomFooterSlot() { + if (this.$slots.footer.length > 1) return true; + + var tag = this.$slots.footer[0].tag; + if (tag !== 'th' && tag !== 'td') return false; + + return true; + }, + + + /** + * Check if bottom-left slot exists. + */ + hasBottomLeftSlot: function hasBottomLeftSlot() { + return typeof this.$slots['bottom-left'] !== 'undefined'; + }, + + + /** + * Table arrow keys listener, change selection. + */ + pressedArrow: function pressedArrow(pos) { + if (!this.visibleData.length) return; + + var index = this.visibleData.indexOf(this.selected) + pos; + + // Prevent from going up from first and down from last + index = index < 0 ? 0 : index > this.visibleData.length - 1 ? this.visibleData.length - 1 : index; + + this.selectRow(this.visibleData[index]); + }, + + + /** + * Focus table element if has selected prop. + */ + focus: function focus() { + if (!this.focusable) return; + + this.$el.querySelector('table').focus(); + }, + + + /** + * Initial sorted column based on the default-sort prop. + */ + initSort: function initSort() { + var _this5 = this; + + if (!this.defaultSort) return; + + var sortField = ''; + var sortDirection = this.defaultSortDirection; + + if (Array.isArray(this.defaultSort)) { + sortField = this.defaultSort[0]; + if (this.defaultSort[1]) { + sortDirection = this.defaultSort[1]; + } + } else { + sortField = this.defaultSort; + } + + this.newColumns.forEach(function (column) { + if (column.field === sortField) { + _this5.isAsc = sortDirection.toLowerCase() !== 'desc'; + _this5.sort(column, true); + } + }); + }, + + /** + * Emits drag start event + */ + handleDragStart: function handleDragStart(event, row, index) { + this.$emit('dragstart', { event: event, row: row, index: index }); + }, + + /** + * Emits drop event + */ + handleDrop: function handleDrop(event, row, index) { + this.$emit('drop', { event: event, row: row, index: index }); + }, + + /** + * Emits drag over event + */ + handleDragOver: function handleDragOver(event, row, index) { + this.$emit('dragover', { event: event, row: row, index: index }); + }, + + /** + * Emits drag leave event + */ + handleDragLeave: function handleDragLeave(event, row, index) { + this.$emit('dragleave', { event: event, row: row, index: index }); + } + }, + + mounted: function mounted() { + this.checkPredefinedDetailedRows(); + this.checkSort(); + } +}); + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _from = __webpack_require__(182); + +var _from2 = _interopRequireDefault(_from); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } else { + return (0, _from2.default)(arr); + } +}; + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(183), __esModule: true }; + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(41); +__webpack_require__(184); +module.exports = __webpack_require__(6).Array.from; + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__(46); +var $export = __webpack_require__(19); +var toObject = __webpack_require__(40); +var call = __webpack_require__(185); +var isArrayIter = __webpack_require__(186); +var toLength = __webpack_require__(51); +var createProperty = __webpack_require__(187); +var getIterFn = __webpack_require__(60); + +$export($export.S + $export.F * !__webpack_require__(188)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(15); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(23); +var ITERATOR = __webpack_require__(4)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__(9); +var createDesc = __webpack_require__(22); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(4)('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(190), + /* template */ + __webpack_require__(191), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 190 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__select_Select__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__icon_Icon__); + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTableMobileSort', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_1__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_2__icon_Icon___default.a), _components), + props: { + currentSortColumn: Object, + isAsc: Boolean, + columns: Array, + placeholder: String + }, + data: function data() { + return { + mobileSort: this.currentSortColumn + }; + }, + + computed: { + showPlaceholder: function showPlaceholder() { + var _this = this; + + return !this.columns || !this.columns.some(function (column) { + return column === _this.mobileSort; + }); + } + }, + watch: { + mobileSort: function mobileSort(column) { + if (this.currentSortColumn === column) return; + + this.$emit('sort', column); + }, + currentSortColumn: function currentSortColumn(column) { + this.mobileSort = column; + } + }, + methods: { + sort: function sort() { + this.$emit('sort', this.mobileSort); + } + } +}); + +/***/ }), +/* 191 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "field table-mobile-sort" + }, [_c('div', { + staticClass: "field has-addons" + }, [_c('b-select', { + attrs: { + "expanded": "" + }, + model: { + value: (_vm.mobileSort), + callback: function($$v) { + _vm.mobileSort = $$v + }, + expression: "mobileSort" + } + }, [(_vm.placeholder) ? [_c('option', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.showPlaceholder), + expression: "showPlaceholder" + }], + attrs: { + "selected": "", + "disabled": "", + "hidden": "" + }, + domProps: { + "value": {} + } + }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : _vm._e(), _vm._v(" "), _vm._l((_vm.columns), function(column, index) { + return (column.sortable) ? _c('option', { + key: index, + domProps: { + "value": column + } + }, [_vm._v("\n " + _vm._s(column.label) + "\n ")]) : _vm._e() + })], 2), _vm._v(" "), _c('div', { + staticClass: "control" + }, [_c('button', { + staticClass: "button is-primary", + on: { + "click": _vm.sort + } + }, [_c('b-icon', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.currentSortColumn === _vm.mobileSort), + expression: "currentSortColumn === mobileSort" + }], + class: { + 'is-desc': !_vm.isAsc + }, + attrs: { + "icon": "arrow-up", + "size": "is-small", + "both": "" + } + })], 1)])], 1)]) +},staticRenderFns: []} + +/***/ }), +/* 192 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol__); + +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTableColumn', + props: { + label: String, + customKey: [String, Number], + field: String, + meta: [String, Number, Boolean, Function, Object, Array, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_symbol___default.a], + width: [Number, String], + numeric: Boolean, + centered: Boolean, + sortable: Boolean, + visible: { + type: Boolean, + default: true + }, + customSort: Function, + internal: Boolean // Used internally by Table + }, + data: function data() { + return { + newKey: this.customKey || this.label + }; + }, + + computed: { + rootClasses: function rootClasses() { + return { + 'has-text-right': this.numeric && !this.centered, + 'has-text-centered': this.centered + }; + } + }, + methods: { + addRefToTable: function addRefToTable() { + var _this = this; + + if (!this.$parent.$data._isTable) { + this.$destroy(); + throw new Error('You should wrap bTableColumn on a bTable'); + } + + if (this.internal) return; + + // Since we're using scoped prop the columns gonna be multiplied, + // this finds when to stop based on the newKey property. + var repeated = this.$parent.newColumns.some(function (column) { + return column.newKey === _this.newKey; + }); + !repeated && this.$parent.newColumns.push(this); + } + }, + beforeMount: function beforeMount() { + this.addRefToTable(); + }, + beforeUpdate: function beforeUpdate() { + this.addRefToTable(); + }, + beforeDestroy: function beforeDestroy() { + var index = this.$parent.newColumns.map(function (column) { + return column.newKey; + }).indexOf(this.newKey); + if (index >= 0) { + this.$parent.newColumns.splice(index, 1); + } + } +}); + +/***/ }), +/* 193 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return (_vm.visible) ? _c('td', { + class: _vm.rootClasses, + attrs: { + "data-label": _vm.label + } + }, [_c('span', [_vm._t("default")], 2)]) : _vm._e() +},staticRenderFns: []} + +/***/ }), +/* 194 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "b-table", + class: { + 'is-loading': _vm.loading + } + }, [(_vm.mobileCards && _vm.hasSortablenewColumns) ? _c('b-table-mobile-sort', { + attrs: { + "current-sort-column": _vm.currentSortColumn, + "is-asc": _vm.isAsc, + "columns": _vm.newColumns, + "placeholder": _vm.mobileSortPlaceholder + }, + on: { + "sort": function (column) { return _vm.sort(column); } + } + }) : _vm._e(), _vm._v(" "), _c('div', { + staticClass: "table-wrapper" + }, [_c('table', { + staticClass: "table", + class: _vm.tableClasses, + attrs: { + "tabindex": !_vm.focusable ? false : 0 + }, + on: { + "keydown": [function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "up", 38, $event.key)) { return null; } + if ($event.target !== $event.currentTarget) { return null; } + $event.preventDefault(); + _vm.pressedArrow(-1) + }, function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "down", 40, $event.key)) { return null; } + if ($event.target !== $event.currentTarget) { return null; } + $event.preventDefault(); + _vm.pressedArrow(1) + }] + } + }, [(_vm.newColumns.length) ? _c('thead', [_c('tr', [(_vm.showDetailRowIcon) ? _c('th', { + attrs: { + "width": "40px" + } + }) : _vm._e(), _vm._v(" "), (_vm.checkable) ? _c('th', { + staticClass: "checkbox-cell" + }, [_c('b-checkbox', { + attrs: { + "value": _vm.isAllChecked, + "disabled": _vm.isAllUncheckable + }, + nativeOn: { + "change": function($event) { + _vm.checkAll($event) + } + } + })], 1) : _vm._e(), _vm._v(" "), _vm._l((_vm.visibleColumns), function(column, index) { + return _c('th', { + key: index, + class: { + 'is-current-sort': _vm.currentSortColumn === column, + 'is-sortable': column.sortable + }, + style: ({ + width: column.width + 'px' + }), + on: { + "click": function($event) { + $event.stopPropagation(); + _vm.sort(column) + } + } + }, [_c('div', { + staticClass: "th-wrap", + class: { + 'is-numeric': column.numeric, + 'is-centered': column.centered + } + }, [(_vm.$scopedSlots.header) ? _vm._t("header", null, { + column: column, + index: index + }) : [_vm._v(_vm._s(column.label))], _vm._v(" "), _c('b-icon', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.currentSortColumn === column), + expression: "currentSortColumn === column" + }], + class: { + 'is-desc': !_vm.isAsc + }, + attrs: { + "icon": "arrow-up", + "pack": _vm.iconPack, + "both": "", + "size": "is-small" + } + })], 2)]) + })], 2)]) : _vm._e(), _vm._v(" "), (_vm.visibleData.length) ? _c('tbody', [_vm._l((_vm.visibleData), function(row, index) { + return [_c('tr', { + key: _vm.customRowKey ? row[_vm.customRowKey] : index, + class: [_vm.rowClass(row, index), { + 'is-selected': row === _vm.selected, + 'is-checked': _vm.isRowChecked(row), + }], + attrs: { + "draggable": _vm.draggable + }, + on: { + "click": function($event) { + _vm.selectRow(row) + }, + "dblclick": function($event) { + _vm.$emit('dblclick', row) + }, + "contextmenu": function($event) { + _vm.$emit('contextmenu', row, $event) + }, + "dragstart": function($event) { + _vm.handleDragStart($event, row, index) + }, + "drop": function($event) { + _vm.handleDrop($event, row, index) + }, + "dragover": function($event) { + _vm.handleDragOver($event, row, index) + }, + "dragleave": function($event) { + _vm.handleDragLeave($event, row, index) + } + } + }, [(_vm.showDetailRowIcon) ? _c('td', { + staticClass: "chevron-cell" + }, [(_vm.hasDetailedVisible(row)) ? _c('a', { + attrs: { + "role": "button" + }, + on: { + "click": function($event) { + $event.stopPropagation(); + _vm.toggleDetails(row) + } + } + }, [_c('b-icon', { + class: { + 'is-expanded': _vm.isVisibleDetailRow(row) + }, + attrs: { + "icon": "chevron-right", + "pack": _vm.iconPack, + "both": "" + } + })], 1) : _vm._e()]) : _vm._e(), _vm._v(" "), (_vm.checkable) ? _c('td', { + staticClass: "checkbox-cell" + }, [_c('b-checkbox', { + attrs: { + "disabled": !_vm.isRowCheckable(row), + "value": _vm.isRowChecked(row) + }, + nativeOn: { + "change": function($event) { + _vm.checkRow(row) + }, + "click": function($event) { + $event.stopPropagation(); + } + } + })], 1) : _vm._e(), _vm._v(" "), (_vm.$scopedSlots.default) ? _vm._t("default", null, { + row: row, + index: index + }) : _vm._l((_vm.newColumns), function(column) { + return _c('BTableColumn', _vm._b({ + key: column.field, + attrs: { + "internal": "" + } + }, 'BTableColumn', column, false), [(column.renderHtml) ? _c('span', { + domProps: { + "innerHTML": _vm._s(_vm.getValueByPath(row, column.field)) + } + }) : [_vm._v("\n " + _vm._s(_vm.getValueByPath(row, column.field)) + "\n ")]], 2) + })], 2), _vm._v(" "), (_vm.isActiveDetailRow(row)) ? _c('tr', { + staticClass: "detail" + }, [_c('td', { + attrs: { + "colspan": _vm.columnCount + } + }, [_c('div', { + staticClass: "detail-container" + }, [_vm._t("detail", null, { + row: row, + index: index + })], 2)])]) : _vm._e(), _vm._v(" "), (_vm.isActiveCustomDetailRow(row)) ? _vm._t("detail", null, { + row: row, + index: index + }) : _vm._e()] + })], 2) : _c('tbody', [_c('tr', { + staticClass: "is-empty" + }, [_c('td', { + attrs: { + "colspan": _vm.columnCount + } + }, [_vm._t("empty")], 2)])]), _vm._v(" "), (_vm.$slots.footer !== undefined) ? _c('tfoot', [_c('tr', { + staticClass: "table-footer" + }, [(_vm.hasCustomFooterSlot()) ? _vm._t("footer") : _c('th', { + attrs: { + "colspan": _vm.columnCount + } + }, [_vm._t("footer")], 2)], 2)]) : _vm._e()])]), _vm._v(" "), ((_vm.checkable && _vm.hasBottomLeftSlot()) || _vm.paginated) ? _c('div', { + staticClass: "level" + }, [_c('div', { + staticClass: "level-left" + }, [_vm._t("bottom-left")], 2), _vm._v(" "), _c('div', { + staticClass: "level-right" + }, [(_vm.paginated) ? _c('div', { + staticClass: "level-item" + }, [_c('b-pagination', { + attrs: { + "icon-pack": _vm.iconPack, + "total": _vm.newDataTotal, + "per-page": _vm.perPage, + "simple": _vm.paginationSimple, + "size": _vm.paginationSize, + "current": _vm.newCurrentPage, + "aria-next-label": _vm.ariaNextLabel, + "aria-previous-label": _vm.ariaPreviousLabel, + "aria-page-label": _vm.ariaPageLabel, + "aria-current-label": _vm.ariaCurrentLabel + }, + on: { + "change": _vm.pageChanged + } + })], 1) : _vm._e()])]) : _vm._e()], 1) +},staticRenderFns: []} + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(196), + /* template */ + __webpack_require__(197), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 196 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); + +// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__(1); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); + +// EXTERNAL MODULE: ./src/components/icon/Icon.vue +var Icon = __webpack_require__(3); +var Icon_default = /*#__PURE__*/__webpack_require__.n(Icon); + +// CONCATENATED MODULE: ./src/utils/SlotComponent.js +/* harmony default export */ var SlotComponent = ({ + name: 'BSlotComponent', + props: { + component: { + type: Object, + required: true + }, + name: { + type: String, + default: 'default' + }, + tag: { + type: String, + default: 'div' + }, + event: { + type: String, + default: 'hook:updated' + } + }, + methods: { + refresh: function refresh() { + this.$forceUpdate(); + }, + isVueComponent: function isVueComponent() { + return this.component && this.component._isVue; + } + }, + created: function created() { + if (this.isVueComponent()) { + this.component.$on(this.event, this.refresh); + } + }, + beforeDestroy: function beforeDestroy() { + if (this.isVueComponent()) { + this.component.$off(this.event, this.refresh); + } + }, + render: function render(h) { + if (this.isVueComponent()) { + var slots = this.component.$slots[this.name]; + return h(this.tag, {}, slots); + } + } +}); +// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/tabs/Tabs.vue + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ var Tabs = __webpack_exports__["default"] = ({ + name: 'BTabs', + components: (_components = {}, defineProperty_default()(_components, Icon_default.a.name, Icon_default.a), defineProperty_default()(_components, SlotComponent.name, SlotComponent), _components), + props: { + value: Number, + expanded: Boolean, + type: String, + size: String, + position: String, + animated: { + type: Boolean, + default: true + }, + destroyOnHide: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + activeTab: this.value || 0, + tabItems: [], + contentHeight: 0, + isTransitioning: false, + _isTabs: true // Used internally by TabItem + }; + }, + + computed: { + navClasses: function navClasses() { + return [this.type, this.size, this.position, { + 'is-fullwidth': this.expanded, + 'is-toggle-rounded is-toggle': this.type === 'is-toggle-rounded' + }]; + } + }, + watch: { + /** + * When v-model is changed set the new active tab. + */ + value: function value(_value) { + this.changeTab(_value); + }, + + + /** + * When tab-items are updated, set active one. + */ + tabItems: function tabItems() { + if (this.activeTab < this.tabItems.length) { + this.tabItems[this.activeTab].isActive = true; + } + } + }, + methods: { + /** + * Change the active tab and emit change event. + */ + changeTab: function changeTab(newIndex) { + if (this.activeTab === newIndex) return; + + if (this.activeTab < this.tabItems.length) { + this.tabItems[this.activeTab].deactivate(this.activeTab, newIndex); + } + this.tabItems[newIndex].activate(this.activeTab, newIndex); + this.activeTab = newIndex; + this.$emit('change', newIndex); + }, + + + /** + * Tab click listener, emit input event and change active tab. + */ + tabClick: function tabClick(value) { + this.$emit('input', value); + this.changeTab(value); + } + }, + mounted: function mounted() { + if (this.activeTab < this.tabItems.length) { + this.tabItems[this.activeTab].isActive = true; + } + } +}); + +/***/ }), +/* 197 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "b-tabs", + class: { + 'is-fullwidth': _vm.expanded + } + }, [_c('nav', { + staticClass: "tabs", + class: _vm.navClasses + }, [_c('ul', _vm._l((_vm.tabItems), function(tabItem, index) { + return _c('li', { + directives: [{ + name: "show", + rawName: "v-show", + value: (tabItem.visible), + expression: "tabItem.visible" + }], + key: index, + class: { + 'is-active': _vm.activeTab === index, 'is-disabled': tabItem.disabled + } + }, [_c('a', { + on: { + "click": function($event) { + _vm.tabClick(index) + } + } + }, [(tabItem.$slots.header) ? [_c('b-slot-component', { + attrs: { + "component": tabItem, + "name": "header", + "tag": "span" + } + })] : [(tabItem.icon) ? _c('b-icon', { + attrs: { + "icon": tabItem.icon, + "pack": tabItem.iconPack, + "size": _vm.size + } + }) : _vm._e(), _vm._v(" "), _c('span', [_vm._v(_vm._s(tabItem.label))])]], 2)]) + }))]), _vm._v(" "), _c('section', { + staticClass: "tab-content", + class: { + 'is-transitioning': _vm.isTransitioning + } + }, [_vm._t("default")], 2)]) +},staticRenderFns: []} + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(199), + /* template */ + null, + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 199 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTabItem', + props: { + label: String, + icon: String, + iconPack: String, + disabled: Boolean, + visible: { + type: Boolean, + default: true + } + }, + data: function data() { + return { + isActive: false, + transitionName: null + }; + }, + + methods: { + /** + * Activate tab, alter animation name based on the index. + */ + activate: function activate(oldIndex, index) { + this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev'; + this.isActive = true; + }, + + + /** + * Deactivate tab, alter animation name based on the index. + */ + deactivate: function deactivate(oldIndex, index) { + this.transitionName = index < oldIndex ? 'slide-next' : 'slide-prev'; + this.isActive = false; + } + }, + created: function created() { + if (!this.$parent.$data._isTabs) { + this.$destroy(); + throw new Error('You should wrap bTabItem on a bTabs'); + } + this.$parent.tabItems.push(this); + }, + beforeDestroy: function beforeDestroy() { + var index = this.$parent.tabItems.indexOf(this); + if (index >= 0) { + this.$parent.tabItems.splice(index, 1); + } + }, + render: function render(createElement) { + var _this = this; + + // if destroy apply v-if + if (this.$parent.destroyOnHide) { + if (!this.isActive || !this.visible) { + return; + } + } + var vnode = createElement('div', { + directives: [{ + name: 'show', + value: this.isActive && this.visible + }], + attrs: { 'class': 'tab-item' } + }, this.$slots.default); + // check animated prop + if (this.$parent.animated) { + return createElement('transition', { + props: { + 'name': this.transitionName + }, + on: { + 'before-enter': function beforeEnter() { + _this.$parent.isTransitioning = true; + }, + 'after-enter': function afterEnter() { + _this.$parent.isTransitioning = false; + } + } + }, [vnode]); + } + return vnode; + } +}); + +/***/ }), +/* 200 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTag', + props: { + attached: Boolean, + closable: Boolean, + type: String, + size: String, + rounded: Boolean, + disabled: Boolean, + ellipsis: Boolean, + tabstop: { + type: Boolean, + default: true + } + }, + methods: { + /** + * Emit close event when delete button is clicked + * or delete key is pressed. + */ + close: function close() { + if (this.disabled) return; + + this.$emit('close'); + } + } +}); + +/***/ }), +/* 201 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return (_vm.attached && _vm.closable) ? _c('div', { + staticClass: "tags has-addons" + }, [_c('span', { + staticClass: "tag", + class: [_vm.type, _vm.size, { + 'is-rounded': _vm.rounded + }] + }, [_c('span', { + class: { + 'has-ellipsis': _vm.ellipsis + } + }, [_vm._t("default")], 2)]), _vm._v(" "), _c('a', { + staticClass: "tag is-delete", + class: [_vm.size, { + 'is-rounded': _vm.rounded + }], + attrs: { + "role": "button", + "tabindex": _vm.tabstop ? 0 : false, + "disabled": _vm.disabled + }, + on: { + "click": function($event) { + _vm.close() + }, + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "delete", [8, 46], $event.key)) { return null; } + $event.preventDefault(); + _vm.close() + } + } + })]) : _c('span', { + staticClass: "tag", + class: [_vm.type, _vm.size, { + 'is-rounded': _vm.rounded + }] + }, [_c('span', { + class: { + 'has-ellipsis': _vm.ellipsis + } + }, [_vm._t("default")], 2), _vm._v(" "), (_vm.closable) ? _c('a', { + staticClass: "delete is-small", + attrs: { + "role": "button", + "disabled": _vm.disabled, + "tabindex": _vm.tabstop ? 0 : false + }, + on: { + "click": function($event) { + _vm.close() + }, + "keyup": function($event) { + if (!('button' in $event) && _vm._k($event.keyCode, "delete", [8, 46], $event.key)) { return null; } + $event.preventDefault(); + _vm.close() + } + } + }) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(203), + /* template */ + __webpack_require__(204), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 203 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +// +// +// +// +// +// + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTaglist', + props: { + attached: Boolean + } +}); + +/***/ }), +/* 204 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "tags", + class: { + 'has-addons': _vm.attached + } + }, [_vm._t("default")], 2) +},staticRenderFns: []} + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(206), + /* template */ + __webpack_require__(207), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 206 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_helpers__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag__ = __webpack_require__(68); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__tag_Tag__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__ = __webpack_require__(52); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__ = __webpack_require__(10); + + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTaginput', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a.name, __WEBPACK_IMPORTED_MODULE_4__autocomplete_Autocomplete___default.a), __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a.name, __WEBPACK_IMPORTED_MODULE_3__tag_Tag___default.a), _components), + mixins: [__WEBPACK_IMPORTED_MODULE_5__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: { + type: Array, + default: function _default() { + return []; + } + }, + data: { + type: Array, + default: function _default() { + return []; + } + }, + type: String, + rounded: { + type: Boolean, + default: false + }, + attached: { + type: Boolean, + default: false + }, + maxtags: { + type: [Number, String], + required: false + }, + field: { + type: String, + default: 'value' + }, + autocomplete: Boolean, + nativeAutocomplete: String, + disabled: Boolean, + ellipsis: Boolean, + closable: { + type: Boolean, + default: true + }, + confirmKeyCodes: { + type: Array, + default: function _default() { + return [13, 188]; + } + }, + removeOnKeys: { + type: Array, + default: function _default() { + return [8]; + } + }, + allowNew: Boolean, + onPasteSeparators: { + type: Array, + default: function _default() { + return [',']; + } + }, + beforeAdding: { + type: Function, + default: function _default() { + return true; + } + }, + allowDuplicates: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + tags: this.value || [], + newTag: '', + _elementRef: 'input', + _isTaginput: true + }; + }, + + computed: { + rootClasses: function rootClasses() { + return { + 'is-expanded': this.expanded + }; + }, + containerClasses: function containerClasses() { + return { + 'is-focused': this.isFocused, + 'is-focusable': this.hasInput + }; + }, + valueLength: function valueLength() { + return this.newTag.trim().length; + }, + defaultSlotName: function defaultSlotName() { + return this.hasDefaultSlot ? 'default' : 'dontrender'; + }, + emptySlotName: function emptySlotName() { + return this.hasEmptySlot ? 'empty' : 'dontrender'; + }, + headerSlotName: function headerSlotName() { + return this.hasHeaderSlot ? 'header' : 'dontrender'; + }, + hasDefaultSlot: function hasDefaultSlot() { + return !!this.$scopedSlots.default; + }, + hasEmptySlot: function hasEmptySlot() { + return !!this.$slots.empty; + }, + hasHeaderSlot: function hasHeaderSlot() { + return !!this.$slots.header; + }, + + + /** + * Show the input field if a maxtags hasn't been set or reached. + */ + hasInput: function hasInput() { + return this.maxtags == null || this.tagsLength < this.maxtags; + }, + tagsLength: function tagsLength() { + return this.tags.length; + }, + + + /** + * If Taginput has onPasteSeparators prop, + * returning new RegExp used to split pasted string. + */ + separatorsAsRegExp: function separatorsAsRegExp() { + var sep = this.onPasteSeparators; + + return sep.length ? new RegExp(sep.map(function (s) { + return s ? s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') : null; + }).join('|'), 'g') : null; + } + }, + watch: { + /** + * When v-model is changed set internal value. + */ + value: function value(_value) { + this.tags = _value; + }, + hasInput: function hasInput() { + if (!this.hasInput) this.onBlur(); + } + }, + methods: { + addTag: function addTag(tag) { + var tagToAdd = tag || this.newTag.trim(); + + if (tagToAdd) { + if (!this.autocomplete) { + var reg = this.separatorsAsRegExp; + if (reg && tagToAdd.match(reg)) { + tagToAdd.split(reg).map(function (t) { + return t.trim(); + }).filter(function (t) { + return t.length !== 0; + }).map(this.addTag); + return; + } + } + + // Add the tag input if it is not blank + // or previously added (if not allowDuplicates). + var add = !this.allowDuplicates ? this.tags.indexOf(tagToAdd) === -1 : true; + if (add && this.beforeAdding(tagToAdd)) { + this.tags.push(tagToAdd); + this.$emit('input', this.tags); + this.$emit('add', tagToAdd); + } + } + + this.newTag = ''; + }, + getNormalizedTagText: function getNormalizedTagText(tag) { + if ((typeof tag === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(tag)) === 'object') { + return Object(__WEBPACK_IMPORTED_MODULE_2__utils_helpers__["a" /* getValueByPath */])(tag, this.field); + } + + return tag; + }, + customOnBlur: function customOnBlur($event) { + // Add tag on-blur if not select only + if (!this.autocomplete) this.addTag(); + + this.onBlur($event); + }, + onSelect: function onSelect(option) { + var _this = this; + + if (!option) return; + + this.addTag(option); + this.$nextTick(function () { + _this.newTag = ''; + }); + }, + removeTag: function removeTag(index) { + var tag = this.tags.splice(index, 1)[0]; + this.$emit('input', this.tags); + this.$emit('remove', tag); + return tag; + }, + removeLastTag: function removeLastTag() { + if (this.tagsLength > 0) { + this.removeTag(this.tagsLength - 1); + } + }, + keydown: function keydown(event) { + if (this.removeOnKeys.indexOf(event.keyCode) !== -1 && !this.newTag.length) { + this.removeLastTag(); + } + // Stop if is to accept select only + if (this.autocomplete && !this.allowNew) return; + + if (this.confirmKeyCodes.indexOf(event.keyCode) >= 0) { + event.preventDefault(); + this.addTag(); + } + }, + onTyping: function onTyping($event) { + this.$emit('typing', $event.trim()); + } + } +}); + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "taginput control", + class: _vm.rootClasses + }, [_c('div', { + staticClass: "taginput-container", + class: [_vm.statusType, _vm.size, _vm.containerClasses], + attrs: { + "disabled": _vm.disabled + }, + on: { + "click": function($event) { + _vm.hasInput && _vm.focus($event) + } + } + }, [_vm._l((_vm.tags), function(tag, index) { + return _c('b-tag', { + key: index, + attrs: { + "type": _vm.type, + "size": _vm.size, + "rounded": _vm.rounded, + "attached": _vm.attached, + "tabstop": false, + "disabled": _vm.disabled, + "ellipsis": _vm.ellipsis, + "closable": _vm.closable + }, + on: { + "close": function($event) { + _vm.removeTag(index) + } + } + }, [_vm._v("\n " + _vm._s(_vm.getNormalizedTagText(tag)) + "\n ")]) + }), _vm._v(" "), (_vm.hasInput) ? _c('b-autocomplete', _vm._b({ + ref: "autocomplete", + attrs: { + "data": _vm.data, + "field": _vm.field, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "maxlength": _vm.maxlength, + "has-counter": false, + "size": _vm.size, + "disabled": _vm.disabled, + "loading": _vm.loading, + "autocomplete": _vm.nativeAutocomplete, + "keep-first": !_vm.allowNew + }, + on: { + "typing": _vm.onTyping, + "focus": _vm.onFocus, + "blur": _vm.customOnBlur, + "select": _vm.onSelect + }, + nativeOn: { + "keydown": function($event) { + _vm.keydown($event) + } + }, + scopedSlots: _vm._u([{ + key: _vm.defaultSlotName, + fn: function(props) { + return [_vm._t("default", null, { + option: props.option, + index: props.index + })] + } + }]), + model: { + value: (_vm.newTag), + callback: function($$v) { + _vm.newTag = $$v + }, + expression: "newTag" + } + }, 'b-autocomplete', _vm.$attrs, false), [_c('template', { + slot: _vm.headerSlotName + }, [_vm._t("header")], 2), _vm._v(" "), _c('template', { + slot: _vm.emptySlotName + }, [_vm._t("empty")], 2)], 2) : _vm._e()], 2), _vm._v(" "), (_vm.maxtags || _vm.maxlength) ? _c('p', { + staticClass: "help counter" + }, [(_vm.maxlength && _vm.valueLength > 0) ? [_vm._v("\n " + _vm._s(_vm.valueLength) + " / " + _vm._s(_vm.maxlength) + "\n ")] : (_vm.maxtags) ? [_vm._v("\n " + _vm._s(_vm.tagsLength) + " / " + _vm._s(_vm.maxtags) + "\n ")] : _vm._e()], 2) : _vm._e()]) +},staticRenderFns: []} + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(209), + /* template */ + __webpack_require__(210), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 209 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_TimepickerMixin__ = __webpack_require__(62); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem__ = __webpack_require__(29); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__input_Input__ = __webpack_require__(17); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__input_Input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__input_Input__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_Field__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__field_Field___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__field_Field__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__select_Select__ = __webpack_require__(31); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__select_Select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__select_Select__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__icon_Icon__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__icon_Icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__icon_Icon__); + + +var _components; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTimepicker', + components: (_components = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_4__input_Input___default.a.name, __WEBPACK_IMPORTED_MODULE_4__input_Input___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_5__field_Field___default.a.name, __WEBPACK_IMPORTED_MODULE_5__field_Field___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_6__select_Select___default.a.name, __WEBPACK_IMPORTED_MODULE_6__select_Select___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_7__icon_Icon___default.a.name, __WEBPACK_IMPORTED_MODULE_7__icon_Icon___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default.a.name, __WEBPACK_IMPORTED_MODULE_2__dropdown_Dropdown___default.a), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_components, __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default.a.name, __WEBPACK_IMPORTED_MODULE_3__dropdown_DropdownItem___default.a), _components), + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_TimepickerMixin__["a" /* default */]], + inheritAttrs: false, + data: function data() { + return { + _isTimepicker: true + }; + } +}); + +/***/ }), +/* 210 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + staticClass: "timepicker control", + class: [_vm.size, { + 'is-expanded': _vm.expanded + }] + }, [(!_vm.isMobile || _vm.inline) ? _c('b-dropdown', { + ref: "dropdown", + attrs: { + "position": _vm.position, + "disabled": _vm.disabled, + "inline": _vm.inline + } + }, [(!_vm.inline) ? _c('b-input', _vm._b({ + ref: "input", + attrs: { + "slot": "trigger", + "autocomplete": "off", + "value": _vm.formatValue(_vm.dateSelected), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "loading": _vm.loading, + "disabled": _vm.disabled, + "readonly": !_vm.editable, + "rounded": _vm.rounded + }, + on: { + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "blur": function($event) { + _vm.$emit('blur', $event) && _vm.checkHtml5Validity() + } + }, + nativeOn: { + "change": function($event) { + _vm.onChange($event.target.value) + } + }, + slot: "trigger" + }, 'b-input', _vm.$attrs, false)) : _vm._e(), _vm._v(" "), _c('b-dropdown-item', { + attrs: { + "disabled": _vm.disabled, + "custom": "" + } + }, [_c('b-field', { + attrs: { + "grouped": "", + "position": "is-centered" + } + }, [_c('b-select', { + attrs: { + "disabled": _vm.disabled, + "placeholder": "00" + }, + nativeOn: { + "change": function($event) { + _vm.onHoursChange($event.target.value) + } + }, + model: { + value: (_vm.hoursSelected), + callback: function($$v) { + _vm.hoursSelected = $$v + }, + expression: "hoursSelected" + } + }, _vm._l((_vm.hours), function(hour) { + return _c('option', { + key: hour.value, + attrs: { + "disabled": _vm.isHourDisabled(hour.value) + }, + domProps: { + "value": hour.value + } + }, [_vm._v("\n " + _vm._s(hour.label) + "\n ")]) + })), _vm._v(" "), _c('span', { + staticClass: "control is-colon" + }, [_vm._v(":")]), _vm._v(" "), _c('b-select', { + attrs: { + "disabled": _vm.disabled, + "placeholder": "00" + }, + nativeOn: { + "change": function($event) { + _vm.onMinutesChange($event.target.value) + } + }, + model: { + value: (_vm.minutesSelected), + callback: function($$v) { + _vm.minutesSelected = $$v + }, + expression: "minutesSelected" + } + }, _vm._l((_vm.minutes), function(minute) { + return _c('option', { + key: minute.value, + attrs: { + "disabled": _vm.isMinuteDisabled(minute.value) + }, + domProps: { + "value": minute.value + } + }, [_vm._v("\n " + _vm._s(minute.label) + "\n ")]) + })), _vm._v(" "), (!_vm.isHourFormat24) ? _c('b-select', { + attrs: { + "disabled": _vm.disabled + }, + nativeOn: { + "change": function($event) { + _vm.onMeridienChange($event.target.value) + } + }, + model: { + value: (_vm.meridienSelected), + callback: function($$v) { + _vm.meridienSelected = $$v + }, + expression: "meridienSelected" + } + }, _vm._l((_vm.meridiens), function(meridien) { + return _c('option', { + key: meridien, + domProps: { + "value": meridien + } + }, [_vm._v("\n " + _vm._s(meridien) + "\n ")]) + })) : _vm._e()], 1), _vm._v(" "), (_vm.$slots.default !== undefined && _vm.$slots.default.length) ? _c('footer', { + staticClass: "timepicker-footer" + }, [_vm._t("default")], 2) : _vm._e()], 1)], 1) : _c('b-input', _vm._b({ + ref: "input", + attrs: { + "type": "time", + "autocomplete": "off", + "value": _vm.formatHHMMSS(_vm.value), + "placeholder": _vm.placeholder, + "size": _vm.size, + "icon": _vm.icon, + "icon-pack": _vm.iconPack, + "loading": _vm.loading, + "max": _vm.formatHHMMSS(_vm.maxTime), + "min": _vm.formatHHMMSS(_vm.minTime), + "disabled": _vm.disabled, + "readonly": false + }, + on: { + "focus": function($event) { + _vm.$emit('focus', $event) + }, + "blur": function($event) { + _vm.$emit('blur', $event) && _vm.checkHtml5Validity() + } + }, + nativeOn: { + "change": function($event) { + _vm.onChangeNativePicker($event) + } + } + }, 'b-input', _vm.$attrs, false))], 1) +},staticRenderFns: []} + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(212), + /* template */ + __webpack_require__(213), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 212 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__ = __webpack_require__(45); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BToast', + mixins: [__WEBPACK_IMPORTED_MODULE_1__utils_NoticeMixin_js__["a" /* default */]], + data: function data() { + return { + newDuration: this.duration || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultToastDuration + }; + } +}); + +/***/ }), +/* 213 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('transition', { + attrs: { + "enter-active-class": _vm.transition.enter, + "leave-active-class": _vm.transition.leave + } + }, [_c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isActive), + expression: "isActive" + }], + staticClass: "toast", + class: [_vm.type, _vm.position], + attrs: { + "aria-hidden": !_vm.isActive, + "role": "alert" + } + }, [_c('div', { + domProps: { + "innerHTML": _vm._s(_vm.message) + } + })])]) +},staticRenderFns: []} + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(215), + /* template */ + __webpack_require__(216), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 215 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_config__ = __webpack_require__(2); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BTooltip', + props: { + active: { + type: Boolean, + default: true + }, + type: String, + label: String, + position: { + type: String, + default: 'is-top', + validator: function validator(value) { + return ['is-top', 'is-bottom', 'is-left', 'is-right'].indexOf(value) > -1; + } + }, + always: Boolean, + animated: Boolean, + square: Boolean, + dashed: Boolean, + multilined: Boolean, + size: { + type: String, + default: 'is-medium' + } + }, + computed: { + newType: function newType() { + return this.type || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultTooltipType; + }, + newAnimated: function newAnimated() { + return this.animated || __WEBPACK_IMPORTED_MODULE_0__utils_config__["a" /* default */].defaultTooltipAnimated; + } + } +}); + +/***/ }), +/* 216 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('span', { + class: [_vm.newType, _vm.position, _vm.size, { + 'b-tooltip': _vm.active, + 'is-square': _vm.square, + 'is-animated': _vm.newAnimated, + 'is-always': _vm.always, + 'is-multiline': _vm.multilined, + 'is-dashed': _vm.dashed + }], + attrs: { + "data-label": _vm.label + } + }, [_vm._t("default")], 2) +},staticRenderFns: []} + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +var Component = __webpack_require__(0)( + /* script */ + __webpack_require__(218), + /* template */ + __webpack_require__(219), + /* styles */ + null, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 218 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ssr__ = __webpack_require__(64); +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'BUpload', + mixins: [__WEBPACK_IMPORTED_MODULE_0__utils_FormElementMixin__["a" /* default */]], + inheritAttrs: false, + props: { + value: { + type: [Object, Function, __WEBPACK_IMPORTED_MODULE_1__utils_ssr__["a" /* File */], Array] + }, + multiple: Boolean, + disabled: Boolean, + accept: String, + dragDrop: Boolean, + type: { + type: String, + default: 'is-primary' + }, + native: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + newValue: this.value, + dragDropFocus: false, + _elementRef: 'input' + }; + }, + + watch: { + /** + * When v-model is changed: + * 1. Set internal value. + * 2. Reset input value if array is empty + * 3. If it's invalid, validate again. + */ + value: function value(_value) { + this.newValue = _value; + if (!this.newValue || Array.isArray(this.newValue) && this.newValue.length === 0) { + this.$refs.input.value = null; + } + !this.isValid && !this.dragDrop && this.checkHtml5Validity(); + } + }, + methods: { + + /** + * Listen change event on input type 'file', + * emit 'input' event and validate + */ + onFileChange: function onFileChange(event) { + if (this.disabled || this.loading) return; + if (this.dragDrop) { + this.updateDragDropFocus(false); + } + var value = event.target.files || event.dataTransfer.files; + if (value.length === 0) { + if (!this.newValue) { + return; + } + this.newValue = null; + } else if (!this.multiple) { + // only one element in case drag drop mode and isn't multiple + if (this.dragDrop && value.length !== 1) return;else { + var file = value[0]; + if (this.checkType(file)) { + this.newValue = file; + } else if (this.newValue) { + this.newValue = null; + } else { + return; + } + } + } else { + // always new values if native or undefined local + var newValues = false; + if (this.native || !this.newValue) { + this.newValue = []; + newValues = true; + } + for (var i = 0; i < value.length; i++) { + var _file = value[i]; + if (this.checkType(_file)) { + this.newValue.push(_file); + newValues = true; + } + } + if (!newValues) { + return; + } + } + this.$emit('input', this.newValue); + !this.dragDrop && this.checkHtml5Validity(); + }, + + + /** + * Listen drag-drop to update internal variable + */ + updateDragDropFocus: function updateDragDropFocus(focus) { + if (!this.disabled && !this.loading) { + this.dragDropFocus = focus; + } + }, + + + /** + * Check mime type of file + */ + checkType: function checkType(file) { + if (!this.accept) return true; + var types = this.accept.split(','); + if (types.length === 0) return true; + var valid = false; + for (var i = 0; i < types.length && !valid; i++) { + var type = types[i].trim(); + if (type) { + if (type.substring(0, 1) === '.') { + // check extension + var extIndex = file.name.lastIndexOf('.'); + var extension = extIndex >= 0 ? file.name.substring(extIndex) : ''; + if (extension.toLowerCase() === type.toLowerCase()) { + valid = true; + } + } else { + // check mime type + if (file.type.match(type)) { + valid = true; + } + } + } + } + return valid; + } + } +}); + +/***/ }), +/* 219 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('label', { + staticClass: "upload control" + }, [(!_vm.dragDrop) ? [_vm._t("default")] : _c('div', { + staticClass: "upload-draggable", + class: [_vm.type, { + 'is-loading': _vm.loading, + 'is-disabled': _vm.disabled, + 'is-hovered': _vm.dragDropFocus + }], + on: { + "dragover": function($event) { + $event.preventDefault(); + _vm.updateDragDropFocus(true) + }, + "dragleave": function($event) { + $event.preventDefault(); + _vm.updateDragDropFocus(false) + }, + "dragenter": function($event) { + $event.preventDefault(); + _vm.updateDragDropFocus(true) + }, + "drop": function($event) { + $event.preventDefault(); + _vm.onFileChange($event) + } + } + }, [_vm._t("default")], 2), _vm._v(" "), _c('input', _vm._b({ + ref: "input", + class: { + 'file-draggable': _vm.dragDrop + }, + attrs: { + "type": "file", + "multiple": _vm.multiple, + "accept": _vm.accept, + "disabled": _vm.disabled + }, + on: { + "change": _vm.onFileChange + } + }, 'input', _vm.$attrs, false))], 2) +},staticRenderFns: []} + +/***/ }) +/******/ ]); +}); diff --git a/public/lib/buefy-0.7.5.min.css b/public/lib/buefy-0.7.5.min.css new file mode 100644 index 0000000..850d5a0 --- /dev/null +++ b/public/lib/buefy-0.7.5.min.css @@ -0,0 +1,4 @@ +/*! Buefy v0.7.4 | MIT License | github.com/buefy/buefy */ +/*! bulma.io v0.7.4 | MIT License | github.com/jgthms/bulma */@keyframes spinAround{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.breadcrumb,.button,.delete,.file,.is-unselectable,.modal-close,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.tabs{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-link:not(.is-arrowless):after,.select:not(.is-multiple):not(.is-loading):after{border:3px solid transparent;border-radius:2px;border-right:0;border-top:0;content:" ";display:block;height:.625em;margin-top:-.4375em;pointer-events:none;position:absolute;top:50%;transform:rotate(-45deg);transform-origin:center;width:.625em}.block:not(:last-child),.box:not(:last-child),.breadcrumb:not(:last-child),.content:not(:last-child),.highlight:not(:last-child),.level:not(:last-child),.list:not(:last-child),.message:not(:last-child),.notification:not(:last-child),.progress:not(:last-child),.subtitle:not(:last-child),.table-container:not(:last-child),.table:not(:last-child),.tabs:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.delete,.modal-close{-moz-appearance:none;-webkit-appearance:none;background-color:hsla(0,0%,4%,.2);border:none;border-radius:290486px;cursor:pointer;pointer-events:auto;display:inline-block;flex-grow:0;flex-shrink:0;font-size:0;height:20px;max-height:20px;max-width:20px;min-height:20px;min-width:20px;outline:none;position:relative;vertical-align:top;width:20px}.delete:after,.delete:before,.modal-close:after,.modal-close:before{background-color:#fff;content:"";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.delete:before,.modal-close:before{height:2px;width:50%}.delete:after,.modal-close:after{height:50%;width:2px}.delete:focus,.delete:hover,.modal-close:focus,.modal-close:hover{background-color:hsla(0,0%,4%,.3)}.delete:active,.modal-close:active{background-color:hsla(0,0%,4%,.4)}.is-small.delete,.is-small.modal-close{height:16px;max-height:16px;max-width:16px;min-height:16px;min-width:16px;width:16px}.is-medium.delete,.is-medium.modal-close{height:24px;max-height:24px;max-width:24px;min-height:24px;min-width:24px;width:24px}.is-large.delete,.is-large.modal-close{height:32px;max-height:32px;max-width:32px;min-height:32px;min-width:32px;width:32px}.button.is-loading:after,.control.is-loading:after,.loader,.select.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em}.hero-video,.image.is-1by1 .has-ratio,.image.is-1by1 img,.image.is-1by2 .has-ratio,.image.is-1by2 img,.image.is-1by3 .has-ratio,.image.is-1by3 img,.image.is-2by1 .has-ratio,.image.is-2by1 img,.image.is-2by3 .has-ratio,.image.is-2by3 img,.image.is-3by1 .has-ratio,.image.is-3by1 img,.image.is-3by2 .has-ratio,.image.is-3by2 img,.image.is-3by4 .has-ratio,.image.is-3by4 img,.image.is-3by5 .has-ratio,.image.is-3by5 img,.image.is-4by3 .has-ratio,.image.is-4by3 img,.image.is-4by5 .has-ratio,.image.is-4by5 img,.image.is-5by3 .has-ratio,.image.is-5by3 img,.image.is-5by4 .has-ratio,.image.is-5by4 img,.image.is-9by16 .has-ratio,.image.is-9by16 img,.image.is-16by9 .has-ratio,.image.is-16by9 img,.image.is-square .has-ratio,.image.is-square img,.is-overlay,.modal,.modal-background{bottom:0;left:0;position:absolute;right:0;top:0}.button,.file-cta,.file-name,.input,.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous,.select select,.taginput .taginput-container.is-focusable,.textarea{-moz-appearance:none;-webkit-appearance:none;align-items:center;border:1px solid transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.25em;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top}.button:active,.button:focus,.file-cta:active,.file-cta:focus,.file-name:active,.file-name:focus,.input:active,.input:focus,.is-active.button,.is-active.file-cta,.is-active.file-name,.is-active.input,.is-active.pagination-ellipsis,.is-active.pagination-link,.is-active.pagination-next,.is-active.pagination-previous,.is-active.textarea,.is-focused.button,.is-focused.file-cta,.is-focused.file-name,.is-focused.input,.is-focused.pagination-ellipsis,.is-focused.pagination-link,.is-focused.pagination-next,.is-focused.pagination-previous,.is-focused.textarea,.pagination-ellipsis:active,.pagination-ellipsis:focus,.pagination-link:active,.pagination-link:focus,.pagination-next:active,.pagination-next:focus,.pagination-previous:active,.pagination-previous:focus,.select select.is-active,.select select.is-focused,.select select:active,.select select:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea:active,.textarea:focus{outline:none}.button[disabled],.file-cta[disabled],.file-name[disabled],.input[disabled],.pagination-ellipsis[disabled],.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled],.select fieldset[disabled] select,.select select[disabled],.taginput .taginput-container.is-focusable[disabled],.taginput fieldset[disabled] .taginput-container.is-focusable,.textarea[disabled],fieldset[disabled] .button,fieldset[disabled] .file-cta,fieldset[disabled] .file-name,fieldset[disabled] .input,fieldset[disabled] .pagination-ellipsis,fieldset[disabled] .pagination-link,fieldset[disabled] .pagination-next,fieldset[disabled] .pagination-previous,fieldset[disabled] .select select,fieldset[disabled] .taginput .taginput-container.is-focusable,fieldset[disabled] .textarea{cursor:not-allowed} + +/*! minireset.css v0.0.4 | MIT License | github.com/jgthms/minireset.css */blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}embed,iframe,img,object,video{height:auto;max-width:100%}audio{max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}html{background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;text-size-adjust:100%}article,aside,figure,footer,header,hgroup,section{display:block}body,button,input,select,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a{color:#7957d5;cursor:pointer;text-decoration:none}a strong{color:currentColor}a:hover{color:#363636}code{color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}code,hr{background-color:#f5f5f5}hr{border:none;display:block;height:2px;margin:1.5rem 0}img{height:auto;max-width:100%}input[type=checkbox],input[type=radio]{vertical-align:baseline}small{font-size:.875em}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}fieldset{border:none}pre{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre code{background-color:transparent;color:currentColor;font-size:1em;padding:0}table td,table th{text-align:left;vertical-align:top}table th{color:#363636}.is-clearfix:after{clear:both;content:" ";display:table}.is-pulled-left{float:left!important}.is-pulled-right{float:right!important}.is-clipped{overflow:hidden!important}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}.is-size-6{font-size:1rem!important}.is-size-7{font-size:.75rem!important}@media screen and (max-width:768px){.is-size-1-mobile{font-size:3rem!important}.is-size-2-mobile{font-size:2.5rem!important}.is-size-3-mobile{font-size:2rem!important}.is-size-4-mobile{font-size:1.5rem!important}.is-size-5-mobile{font-size:1.25rem!important}.is-size-6-mobile{font-size:1rem!important}.is-size-7-mobile{font-size:.75rem!important}}@media print,screen and (min-width:769px){.is-size-1-tablet{font-size:3rem!important}.is-size-2-tablet{font-size:2.5rem!important}.is-size-3-tablet{font-size:2rem!important}.is-size-4-tablet{font-size:1.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}.is-size-6-tablet{font-size:1rem!important}.is-size-7-tablet{font-size:.75rem!important}}@media screen and (max-width:1087px){.is-size-1-touch{font-size:3rem!important}.is-size-2-touch{font-size:2.5rem!important}.is-size-3-touch{font-size:2rem!important}.is-size-4-touch{font-size:1.5rem!important}.is-size-5-touch{font-size:1.25rem!important}.is-size-6-touch{font-size:1rem!important}.is-size-7-touch{font-size:.75rem!important}}@media screen and (min-width:1088px){.is-size-1-desktop{font-size:3rem!important}.is-size-2-desktop{font-size:2.5rem!important}.is-size-3-desktop{font-size:2rem!important}.is-size-4-desktop{font-size:1.5rem!important}.is-size-5-desktop{font-size:1.25rem!important}.is-size-6-desktop{font-size:1rem!important}.is-size-7-desktop{font-size:.75rem!important}}@media screen and (min-width:1280px){.is-size-1-widescreen{font-size:3rem!important}.is-size-2-widescreen{font-size:2.5rem!important}.is-size-3-widescreen{font-size:2rem!important}.is-size-4-widescreen{font-size:1.5rem!important}.is-size-5-widescreen{font-size:1.25rem!important}.is-size-6-widescreen{font-size:1rem!important}.is-size-7-widescreen{font-size:.75rem!important}}@media screen and (min-width:1472px){.is-size-1-fullhd{font-size:3rem!important}.is-size-2-fullhd{font-size:2.5rem!important}.is-size-3-fullhd{font-size:2rem!important}.is-size-4-fullhd{font-size:1.5rem!important}.is-size-5-fullhd{font-size:1.25rem!important}.is-size-6-fullhd{font-size:1rem!important}.is-size-7-fullhd{font-size:.75rem!important}}.has-text-centered{text-align:center!important}.has-text-justified{text-align:justify!important}.has-text-left{text-align:left!important}.has-text-right{text-align:right!important}@media screen and (max-width:768px){.has-text-centered-mobile{text-align:center!important}}@media print,screen and (min-width:769px){.has-text-centered-tablet{text-align:center!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-centered-tablet-only{text-align:center!important}}@media screen and (max-width:1087px){.has-text-centered-touch{text-align:center!important}}@media screen and (min-width:1088px){.has-text-centered-desktop{text-align:center!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-centered-desktop-only{text-align:center!important}}@media screen and (min-width:1280px){.has-text-centered-widescreen{text-align:center!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-centered-widescreen-only{text-align:center!important}}@media screen and (min-width:1472px){.has-text-centered-fullhd{text-align:center!important}}@media screen and (max-width:768px){.has-text-justified-mobile{text-align:justify!important}}@media print,screen and (min-width:769px){.has-text-justified-tablet{text-align:justify!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-justified-tablet-only{text-align:justify!important}}@media screen and (max-width:1087px){.has-text-justified-touch{text-align:justify!important}}@media screen and (min-width:1088px){.has-text-justified-desktop{text-align:justify!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-justified-desktop-only{text-align:justify!important}}@media screen and (min-width:1280px){.has-text-justified-widescreen{text-align:justify!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-justified-widescreen-only{text-align:justify!important}}@media screen and (min-width:1472px){.has-text-justified-fullhd{text-align:justify!important}}@media screen and (max-width:768px){.has-text-left-mobile{text-align:left!important}}@media print,screen and (min-width:769px){.has-text-left-tablet{text-align:left!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-left-tablet-only{text-align:left!important}}@media screen and (max-width:1087px){.has-text-left-touch{text-align:left!important}}@media screen and (min-width:1088px){.has-text-left-desktop{text-align:left!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-left-desktop-only{text-align:left!important}}@media screen and (min-width:1280px){.has-text-left-widescreen{text-align:left!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-left-widescreen-only{text-align:left!important}}@media screen and (min-width:1472px){.has-text-left-fullhd{text-align:left!important}}@media screen and (max-width:768px){.has-text-right-mobile{text-align:right!important}}@media print,screen and (min-width:769px){.has-text-right-tablet{text-align:right!important}}@media screen and (min-width:769px) and (max-width:1087px){.has-text-right-tablet-only{text-align:right!important}}@media screen and (max-width:1087px){.has-text-right-touch{text-align:right!important}}@media screen and (min-width:1088px){.has-text-right-desktop{text-align:right!important}}@media screen and (min-width:1088px) and (max-width:1279px){.has-text-right-desktop-only{text-align:right!important}}@media screen and (min-width:1280px){.has-text-right-widescreen{text-align:right!important}}@media screen and (min-width:1280px) and (max-width:1471px){.has-text-right-widescreen-only{text-align:right!important}}@media screen and (min-width:1472px){.has-text-right-fullhd{text-align:right!important}}.is-capitalized{text-transform:capitalize!important}.is-lowercase{text-transform:lowercase!important}.is-uppercase{text-transform:uppercase!important}.is-italic{font-style:italic!important}.has-text-white{color:#fff!important}a.has-text-white:focus,a.has-text-white:hover{color:#e6e6e6!important}.has-background-white{background-color:#fff!important}.has-text-black{color:#0a0a0a!important}a.has-text-black:focus,a.has-text-black:hover{color:#000!important}.has-background-black{background-color:#0a0a0a!important}.has-text-light{color:#f5f5f5!important}a.has-text-light:focus,a.has-text-light:hover{color:#dbdbdb!important}.has-background-light{background-color:#f5f5f5!important}.has-text-dark{color:#363636!important}a.has-text-dark:focus,a.has-text-dark:hover{color:#1c1c1c!important}.has-background-dark{background-color:#363636!important}.has-text-primary{color:#7957d5!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#5a32c7!important}.has-background-primary{background-color:#7957d5!important}.has-text-link{color:#7957d5!important}a.has-text-link:focus,a.has-text-link:hover{color:#5a32c7!important}.has-background-link{background-color:#7957d5!important}.has-text-info{color:#167df0!important}a.has-text-info:focus,a.has-text-info:hover{color:#0d64c6!important}.has-background-info{background-color:#167df0!important}.has-text-success{color:#23d160!important}a.has-text-success:focus,a.has-text-success:hover{color:#1ca64c!important}.has-background-success{background-color:#23d160!important}.has-text-warning{color:#ffdd57!important}a.has-text-warning:focus,a.has-text-warning:hover{color:#ffd324!important}.has-background-warning{background-color:#ffdd57!important}.has-text-danger{color:#ff3860!important}a.has-text-danger:focus,a.has-text-danger:hover{color:#ff0537!important}.has-background-danger{background-color:#ff3860!important}.has-text-black-bis{color:#121212!important}.has-background-black-bis{background-color:#121212!important}.has-text-black-ter{color:#242424!important}.has-background-black-ter{background-color:#242424!important}.has-text-grey-darker{color:#363636!important}.has-background-grey-darker{background-color:#363636!important}.has-text-grey-dark{color:#4a4a4a!important}.has-background-grey-dark{background-color:#4a4a4a!important}.has-text-grey{color:#7a7a7a!important}.has-background-grey{background-color:#7a7a7a!important}.has-text-grey-light{color:#b5b5b5!important}.has-background-grey-light{background-color:#b5b5b5!important}.has-text-grey-lighter{color:#dbdbdb!important}.has-background-grey-lighter{background-color:#dbdbdb!important}.has-text-white-ter{color:#f5f5f5!important}.has-background-white-ter{background-color:#f5f5f5!important}.has-text-white-bis{color:#fafafa!important}.has-background-white-bis{background-color:#fafafa!important}.has-text-weight-light{font-weight:300!important}.has-text-weight-normal{font-weight:400!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-family-primary,.is-family-sans-serif,.is-family-secondary{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif!important}.is-family-code,.is-family-monospace{font-family:monospace!important}.is-block{display:block!important}@media screen and (max-width:768px){.is-block-mobile{display:block!important}}@media print,screen and (min-width:769px){.is-block-tablet{display:block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-block-tablet-only{display:block!important}}@media screen and (max-width:1087px){.is-block-touch{display:block!important}}@media screen and (min-width:1088px){.is-block-desktop{display:block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-block-desktop-only{display:block!important}}@media screen and (min-width:1280px){.is-block-widescreen{display:block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-block-widescreen-only{display:block!important}}@media screen and (min-width:1472px){.is-block-fullhd{display:block!important}}.is-flex{display:flex!important}@media screen and (max-width:768px){.is-flex-mobile{display:flex!important}}@media print,screen and (min-width:769px){.is-flex-tablet{display:flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-flex-tablet-only{display:flex!important}}@media screen and (max-width:1087px){.is-flex-touch{display:flex!important}}@media screen and (min-width:1088px){.is-flex-desktop{display:flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-flex-desktop-only{display:flex!important}}@media screen and (min-width:1280px){.is-flex-widescreen{display:flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-flex-widescreen-only{display:flex!important}}@media screen and (min-width:1472px){.is-flex-fullhd{display:flex!important}}.is-inline{display:inline!important}@media screen and (max-width:768px){.is-inline-mobile{display:inline!important}}@media print,screen and (min-width:769px){.is-inline-tablet{display:inline!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-tablet-only{display:inline!important}}@media screen and (max-width:1087px){.is-inline-touch{display:inline!important}}@media screen and (min-width:1088px){.is-inline-desktop{display:inline!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-desktop-only{display:inline!important}}@media screen and (min-width:1280px){.is-inline-widescreen{display:inline!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-widescreen-only{display:inline!important}}@media screen and (min-width:1472px){.is-inline-fullhd{display:inline!important}}.is-inline-block{display:inline-block!important}@media screen and (max-width:768px){.is-inline-block-mobile{display:inline-block!important}}@media print,screen and (min-width:769px){.is-inline-block-tablet{display:inline-block!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-block-tablet-only{display:inline-block!important}}@media screen and (max-width:1087px){.is-inline-block-touch{display:inline-block!important}}@media screen and (min-width:1088px){.is-inline-block-desktop{display:inline-block!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-block-desktop-only{display:inline-block!important}}@media screen and (min-width:1280px){.is-inline-block-widescreen{display:inline-block!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-block-widescreen-only{display:inline-block!important}}@media screen and (min-width:1472px){.is-inline-block-fullhd{display:inline-block!important}}.is-inline-flex{display:inline-flex!important}@media screen and (max-width:768px){.is-inline-flex-mobile{display:inline-flex!important}}@media print,screen and (min-width:769px){.is-inline-flex-tablet{display:inline-flex!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-inline-flex-tablet-only{display:inline-flex!important}}@media screen and (max-width:1087px){.is-inline-flex-touch{display:inline-flex!important}}@media screen and (min-width:1088px){.is-inline-flex-desktop{display:inline-flex!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-inline-flex-desktop-only{display:inline-flex!important}}@media screen and (min-width:1280px){.is-inline-flex-widescreen{display:inline-flex!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-inline-flex-widescreen-only{display:inline-flex!important}}@media screen and (min-width:1472px){.is-inline-flex-fullhd{display:inline-flex!important}}.is-hidden{display:none!important}.is-sr-only{border:none!important;clip:rect(0,0,0,0)!important;height:.01em!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:.01em!important}@media screen and (max-width:768px){.is-hidden-mobile{display:none!important}}@media print,screen and (min-width:769px){.is-hidden-tablet{display:none!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-hidden-tablet-only{display:none!important}}@media screen and (max-width:1087px){.is-hidden-touch{display:none!important}}@media screen and (min-width:1088px){.is-hidden-desktop{display:none!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-hidden-desktop-only{display:none!important}}@media screen and (min-width:1280px){.is-hidden-widescreen{display:none!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-hidden-widescreen-only{display:none!important}}@media screen and (min-width:1472px){.is-hidden-fullhd{display:none!important}}.is-invisible{visibility:hidden!important}@media screen and (max-width:768px){.is-invisible-mobile{visibility:hidden!important}}@media print,screen and (min-width:769px){.is-invisible-tablet{visibility:hidden!important}}@media screen and (min-width:769px) and (max-width:1087px){.is-invisible-tablet-only{visibility:hidden!important}}@media screen and (max-width:1087px){.is-invisible-touch{visibility:hidden!important}}@media screen and (min-width:1088px){.is-invisible-desktop{visibility:hidden!important}}@media screen and (min-width:1088px) and (max-width:1279px){.is-invisible-desktop-only{visibility:hidden!important}}@media screen and (min-width:1280px){.is-invisible-widescreen{visibility:hidden!important}}@media screen and (min-width:1280px) and (max-width:1471px){.is-invisible-widescreen-only{visibility:hidden!important}}@media screen and (min-width:1472px){.is-invisible-fullhd{visibility:hidden!important}}.is-marginless{margin:0!important}.is-paddingless{padding:0!important}.is-radiusless{border-radius:0!important}.is-shadowless{box-shadow:none!important}.box{background-color:#fff;border-radius:6px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;display:block;padding:1.25rem}a.box:focus,a.box:hover{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px #7957d5}a.box:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2),0 0 0 1px #7957d5}.button{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;justify-content:center;padding:calc(.375em - 1px) .75em;text-align:center;white-space:nowrap}.button strong{color:inherit}.button .icon,.button .icon.is-large,.button .icon.is-medium,.button .icon.is-small{height:1.5em;width:1.5em}.button .icon:first-child:not(:last-child){margin-left:calc(-.375em - 1px);margin-right:.1875em}.button .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:calc(-.375em - 1px)}.button .icon:first-child:last-child{margin-left:calc(-.375em - 1px);margin-right:calc(-.375em - 1px)}.button.is-hovered,.button:hover{border-color:#b5b5b5;color:#363636}.button.is-focused,.button:focus{border-color:#7957d5;color:#363636}.button.is-focused:not(:active),.button:focus:not(:active){box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.button.is-active,.button:active{border-color:#4a4a4a;color:#363636}.button.is-text{background-color:transparent;border-color:transparent;color:#4a4a4a;text-decoration:underline}.button.is-text.is-focused,.button.is-text.is-hovered,.button.is-text:focus,.button.is-text:hover{background-color:#f5f5f5;color:#363636}.button.is-text.is-active,.button.is-text:active{background-color:#e8e8e8;color:#363636}.button.is-text[disabled],fieldset[disabled] .button.is-text{background-color:transparent;border-color:transparent;box-shadow:none}.button.is-white{background-color:#fff;border-color:transparent;color:#0a0a0a}.button.is-white.is-hovered,.button.is-white:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.button.is-white.is-focused,.button.is-white:focus{border-color:transparent;color:#0a0a0a}.button.is-white.is-focused:not(:active),.button.is-white:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.button.is-white.is-active,.button.is-white:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.button.is-white[disabled],fieldset[disabled] .button.is-white{background-color:#fff;border-color:transparent;box-shadow:none}.button.is-white.is-inverted{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted:hover{background-color:#000}.button.is-white.is-inverted[disabled],fieldset[disabled] .button.is-white.is-inverted{background-color:#0a0a0a;border-color:transparent;box-shadow:none;color:#fff}.button.is-white.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-white.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-white.is-outlined:focus,.button.is-white.is-outlined:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.button.is-white.is-outlined.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-white.is-outlined[disabled],fieldset[disabled] .button.is-white.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-white.is-inverted.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-white.is-inverted.is-outlined:focus,.button.is-white.is-inverted.is-outlined:hover{background-color:#0a0a0a;color:#fff}.button.is-white.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-white.is-inverted.is-outlined{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black{background-color:#0a0a0a;border-color:transparent;color:#fff}.button.is-black.is-hovered,.button.is-black:hover{background-color:#040404;border-color:transparent;color:#fff}.button.is-black.is-focused,.button.is-black:focus{border-color:transparent;color:#fff}.button.is-black.is-focused:not(:active),.button.is-black:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.button.is-black.is-active,.button.is-black:active{background-color:#000;border-color:transparent;color:#fff}.button.is-black[disabled],fieldset[disabled] .button.is-black{background-color:#0a0a0a;border-color:transparent;box-shadow:none}.button.is-black.is-inverted{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted:hover{background-color:#f2f2f2}.button.is-black.is-inverted[disabled],fieldset[disabled] .button.is-black.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#0a0a0a}.button.is-black.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-black.is-outlined{background-color:transparent;border-color:#0a0a0a;color:#0a0a0a}.button.is-black.is-outlined:focus,.button.is-black.is-outlined:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.button.is-black.is-outlined.is-loading:after{border-color:transparent transparent #0a0a0a #0a0a0a!important}.button.is-black.is-outlined[disabled],fieldset[disabled] .button.is-black.is-outlined{background-color:transparent;border-color:#0a0a0a;box-shadow:none;color:#0a0a0a}.button.is-black.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-black.is-inverted.is-outlined:focus,.button.is-black.is-inverted.is-outlined:hover{background-color:#fff;color:#0a0a0a}.button.is-black.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-black.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-light{background-color:#f5f5f5;border-color:transparent;color:#363636}.button.is-light.is-hovered,.button.is-light:hover{background-color:#eee;border-color:transparent;color:#363636}.button.is-light.is-focused,.button.is-light:focus{border-color:transparent;color:#363636}.button.is-light.is-focused:not(:active),.button.is-light:focus:not(:active){box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.button.is-light.is-active,.button.is-light:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.button.is-light[disabled],fieldset[disabled] .button.is-light{background-color:#f5f5f5;border-color:transparent;box-shadow:none}.button.is-light.is-inverted{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted:hover{background-color:#292929}.button.is-light.is-inverted[disabled],fieldset[disabled] .button.is-light.is-inverted{background-color:#363636;border-color:transparent;box-shadow:none;color:#f5f5f5}.button.is-light.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-light.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-light.is-outlined:focus,.button.is-light.is-outlined:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.button.is-light.is-outlined.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-light.is-outlined[disabled],fieldset[disabled] .button.is-light.is-outlined{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-light.is-inverted.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-light.is-inverted.is-outlined:focus,.button.is-light.is-inverted.is-outlined:hover{background-color:#363636;color:#f5f5f5}.button.is-light.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-light.is-inverted.is-outlined{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark{background-color:#363636;border-color:transparent;color:#f5f5f5}.button.is-dark.is-hovered,.button.is-dark:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused,.button.is-dark:focus{border-color:transparent;color:#f5f5f5}.button.is-dark.is-focused:not(:active),.button.is-dark:focus:not(:active){box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.button.is-dark.is-active,.button.is-dark:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.button.is-dark[disabled],fieldset[disabled] .button.is-dark{background-color:#363636;border-color:transparent;box-shadow:none}.button.is-dark.is-inverted{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted:hover{background-color:#e8e8e8}.button.is-dark.is-inverted[disabled],fieldset[disabled] .button.is-dark.is-inverted{background-color:#f5f5f5;border-color:transparent;box-shadow:none;color:#363636}.button.is-dark.is-loading:after{border-color:transparent transparent #f5f5f5 #f5f5f5!important}.button.is-dark.is-outlined{background-color:transparent;border-color:#363636;color:#363636}.button.is-dark.is-outlined:focus,.button.is-dark.is-outlined:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.button.is-dark.is-outlined.is-loading:after{border-color:transparent transparent #363636 #363636!important}.button.is-dark.is-outlined[disabled],fieldset[disabled] .button.is-dark.is-outlined{background-color:transparent;border-color:#363636;box-shadow:none;color:#363636}.button.is-dark.is-inverted.is-outlined{background-color:transparent;border-color:#f5f5f5;color:#f5f5f5}.button.is-dark.is-inverted.is-outlined:focus,.button.is-dark.is-inverted.is-outlined:hover{background-color:#f5f5f5;color:#363636}.button.is-dark.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-dark.is-inverted.is-outlined{background-color:transparent;border-color:#f5f5f5;box-shadow:none;color:#f5f5f5}.button.is-primary{background-color:#7957d5;border-color:transparent;color:#fff}.button.is-primary.is-hovered,.button.is-primary:hover{background-color:#714dd2;border-color:transparent;color:#fff}.button.is-primary.is-focused,.button.is-primary:focus{border-color:transparent;color:#fff}.button.is-primary.is-focused:not(:active),.button.is-primary:focus:not(:active){box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.button.is-primary.is-active,.button.is-primary:active{background-color:#6943d0;border-color:transparent;color:#fff}.button.is-primary[disabled],fieldset[disabled] .button.is-primary{background-color:#7957d5;border-color:transparent;box-shadow:none}.button.is-primary.is-inverted{background-color:#fff;color:#7957d5}.button.is-primary.is-inverted:hover{background-color:#f2f2f2}.button.is-primary.is-inverted[disabled],fieldset[disabled] .button.is-primary.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#7957d5}.button.is-primary.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-primary.is-outlined{background-color:transparent;border-color:#7957d5;color:#7957d5}.button.is-primary.is-outlined:focus,.button.is-primary.is-outlined:hover{background-color:#7957d5;border-color:#7957d5;color:#fff}.button.is-primary.is-outlined.is-loading:after{border-color:transparent transparent #7957d5 #7957d5!important}.button.is-primary.is-outlined[disabled],fieldset[disabled] .button.is-primary.is-outlined{background-color:transparent;border-color:#7957d5;box-shadow:none;color:#7957d5}.button.is-primary.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-primary.is-inverted.is-outlined:focus,.button.is-primary.is-inverted.is-outlined:hover{background-color:#fff;color:#7957d5}.button.is-primary.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-primary.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-link{background-color:#7957d5;border-color:transparent;color:#fff}.button.is-link.is-hovered,.button.is-link:hover{background-color:#714dd2;border-color:transparent;color:#fff}.button.is-link.is-focused,.button.is-link:focus{border-color:transparent;color:#fff}.button.is-link.is-focused:not(:active),.button.is-link:focus:not(:active){box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.button.is-link.is-active,.button.is-link:active{background-color:#6943d0;border-color:transparent;color:#fff}.button.is-link[disabled],fieldset[disabled] .button.is-link{background-color:#7957d5;border-color:transparent;box-shadow:none}.button.is-link.is-inverted{background-color:#fff;color:#7957d5}.button.is-link.is-inverted:hover{background-color:#f2f2f2}.button.is-link.is-inverted[disabled],fieldset[disabled] .button.is-link.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#7957d5}.button.is-link.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-link.is-outlined{background-color:transparent;border-color:#7957d5;color:#7957d5}.button.is-link.is-outlined:focus,.button.is-link.is-outlined:hover{background-color:#7957d5;border-color:#7957d5;color:#fff}.button.is-link.is-outlined.is-loading:after{border-color:transparent transparent #7957d5 #7957d5!important}.button.is-link.is-outlined[disabled],fieldset[disabled] .button.is-link.is-outlined{background-color:transparent;border-color:#7957d5;box-shadow:none;color:#7957d5}.button.is-link.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-link.is-inverted.is-outlined:focus,.button.is-link.is-inverted.is-outlined:hover{background-color:#fff;color:#7957d5}.button.is-link.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-link.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-info{background-color:#167df0;border-color:transparent;color:#fff}.button.is-info.is-hovered,.button.is-info:hover{background-color:#0f77ea;border-color:transparent;color:#fff}.button.is-info.is-focused,.button.is-info:focus{border-color:transparent;color:#fff}.button.is-info.is-focused:not(:active),.button.is-info:focus:not(:active){box-shadow:0 0 0 .125em rgba(22,125,240,.25)}.button.is-info.is-active,.button.is-info:active{background-color:#0e71de;border-color:transparent;color:#fff}.button.is-info[disabled],fieldset[disabled] .button.is-info{background-color:#167df0;border-color:transparent;box-shadow:none}.button.is-info.is-inverted{background-color:#fff;color:#167df0}.button.is-info.is-inverted:hover{background-color:#f2f2f2}.button.is-info.is-inverted[disabled],fieldset[disabled] .button.is-info.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#167df0}.button.is-info.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-info.is-outlined{background-color:transparent;border-color:#167df0;color:#167df0}.button.is-info.is-outlined:focus,.button.is-info.is-outlined:hover{background-color:#167df0;border-color:#167df0;color:#fff}.button.is-info.is-outlined.is-loading:after{border-color:transparent transparent #167df0 #167df0!important}.button.is-info.is-outlined[disabled],fieldset[disabled] .button.is-info.is-outlined{background-color:transparent;border-color:#167df0;box-shadow:none;color:#167df0}.button.is-info.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-info.is-inverted.is-outlined:focus,.button.is-info.is-inverted.is-outlined:hover{background-color:#fff;color:#167df0}.button.is-info.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-info.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-success{background-color:#23d160;border-color:transparent;color:#fff}.button.is-success.is-hovered,.button.is-success:hover{background-color:#22c65b;border-color:transparent;color:#fff}.button.is-success.is-focused,.button.is-success:focus{border-color:transparent;color:#fff}.button.is-success.is-focused:not(:active),.button.is-success:focus:not(:active){box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.button.is-success.is-active,.button.is-success:active{background-color:#20bc56;border-color:transparent;color:#fff}.button.is-success[disabled],fieldset[disabled] .button.is-success{background-color:#23d160;border-color:transparent;box-shadow:none}.button.is-success.is-inverted{background-color:#fff;color:#23d160}.button.is-success.is-inverted:hover{background-color:#f2f2f2}.button.is-success.is-inverted[disabled],fieldset[disabled] .button.is-success.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#23d160}.button.is-success.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-success.is-outlined{background-color:transparent;border-color:#23d160;color:#23d160}.button.is-success.is-outlined:focus,.button.is-success.is-outlined:hover{background-color:#23d160;border-color:#23d160;color:#fff}.button.is-success.is-outlined.is-loading:after{border-color:transparent transparent #23d160 #23d160!important}.button.is-success.is-outlined[disabled],fieldset[disabled] .button.is-success.is-outlined{background-color:transparent;border-color:#23d160;box-shadow:none;color:#23d160}.button.is-success.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-success.is-inverted.is-outlined:focus,.button.is-success.is-inverted.is-outlined:hover{background-color:#fff;color:#23d160}.button.is-success.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-success.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-warning{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-hovered,.button.is-warning:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused,.button.is-warning:focus{border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning.is-focused:not(:active),.button.is-warning:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.button.is-warning.is-active,.button.is-warning:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.button.is-warning[disabled],fieldset[disabled] .button.is-warning{background-color:#ffdd57;border-color:transparent;box-shadow:none}.button.is-warning.is-inverted{color:#ffdd57}.button.is-warning.is-inverted,.button.is-warning.is-inverted:hover{background-color:rgba(0,0,0,.7)}.button.is-warning.is-inverted[disabled],fieldset[disabled] .button.is-warning.is-inverted{background-color:rgba(0,0,0,.7);border-color:transparent;box-shadow:none;color:#ffdd57}.button.is-warning.is-loading:after{border-color:transparent transparent rgba(0,0,0,.7) rgba(0,0,0,.7)!important}.button.is-warning.is-outlined{background-color:transparent;border-color:#ffdd57;color:#ffdd57}.button.is-warning.is-outlined:focus,.button.is-warning.is-outlined:hover{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.button.is-warning.is-outlined.is-loading:after{border-color:transparent transparent #ffdd57 #ffdd57!important}.button.is-warning.is-outlined[disabled],fieldset[disabled] .button.is-warning.is-outlined{background-color:transparent;border-color:#ffdd57;box-shadow:none;color:#ffdd57}.button.is-warning.is-inverted.is-outlined{background-color:transparent;border-color:rgba(0,0,0,.7);color:rgba(0,0,0,.7)}.button.is-warning.is-inverted.is-outlined:focus,.button.is-warning.is-inverted.is-outlined:hover{background-color:rgba(0,0,0,.7);color:#ffdd57}.button.is-warning.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-warning.is-inverted.is-outlined{background-color:transparent;border-color:rgba(0,0,0,.7);box-shadow:none;color:rgba(0,0,0,.7)}.button.is-danger{background-color:#ff3860;border-color:transparent;color:#fff}.button.is-danger.is-hovered,.button.is-danger:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.button.is-danger.is-focused,.button.is-danger:focus{border-color:transparent;color:#fff}.button.is-danger.is-focused:not(:active),.button.is-danger:focus:not(:active){box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.button.is-danger.is-active,.button.is-danger:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.button.is-danger[disabled],fieldset[disabled] .button.is-danger{background-color:#ff3860;border-color:transparent;box-shadow:none}.button.is-danger.is-inverted{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted:hover{background-color:#f2f2f2}.button.is-danger.is-inverted[disabled],fieldset[disabled] .button.is-danger.is-inverted{background-color:#fff;border-color:transparent;box-shadow:none;color:#ff3860}.button.is-danger.is-loading:after{border-color:transparent transparent #fff #fff!important}.button.is-danger.is-outlined{background-color:transparent;border-color:#ff3860;color:#ff3860}.button.is-danger.is-outlined:focus,.button.is-danger.is-outlined:hover{background-color:#ff3860;border-color:#ff3860;color:#fff}.button.is-danger.is-outlined.is-loading:after{border-color:transparent transparent #ff3860 #ff3860!important}.button.is-danger.is-outlined[disabled],fieldset[disabled] .button.is-danger.is-outlined{background-color:transparent;border-color:#ff3860;box-shadow:none;color:#ff3860}.button.is-danger.is-inverted.is-outlined{background-color:transparent;border-color:#fff;color:#fff}.button.is-danger.is-inverted.is-outlined:focus,.button.is-danger.is-inverted.is-outlined:hover{background-color:#fff;color:#ff3860}.button.is-danger.is-inverted.is-outlined[disabled],fieldset[disabled] .button.is-danger.is-inverted.is-outlined{background-color:transparent;border-color:#fff;box-shadow:none;color:#fff}.button.is-small{border-radius:2px;font-size:.75rem}.button.is-normal{font-size:1rem}.button.is-medium{font-size:1.25rem}.button.is-large{font-size:1.5rem}.button[disabled],fieldset[disabled] .button{background-color:#fff;border-color:#dbdbdb;box-shadow:none;opacity:.5}.button.is-fullwidth{display:flex;width:100%}.button.is-loading{color:transparent!important;pointer-events:none}.button.is-loading:after{position:absolute;left:calc(50% - .5em);top:calc(50% - .5em);position:absolute!important}.button.is-static{background-color:#f5f5f5;border-color:#dbdbdb;color:#7a7a7a;box-shadow:none;pointer-events:none}.button.is-rounded{border-radius:290486px;padding-left:1em;padding-right:1em}.buttons{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.buttons .button{margin-bottom:.5rem}.buttons .button:not(:last-child):not(.is-fullwidth){margin-right:.5rem}.buttons:last-child{margin-bottom:-.5rem}.buttons:not(:last-child){margin-bottom:1rem}.buttons.are-small .button:not(.is-normal):not(.is-medium):not(.is-large){border-radius:2px;font-size:.75rem}.buttons.are-medium .button:not(.is-small):not(.is-normal):not(.is-large){font-size:1.25rem}.buttons.are-large .button:not(.is-small):not(.is-normal):not(.is-medium){font-size:1.5rem}.buttons.has-addons .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.buttons.has-addons .button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.buttons.has-addons .button:last-child{margin-right:0}.buttons.has-addons .button.is-hovered,.buttons.has-addons .button:hover{z-index:2}.buttons.has-addons .button.is-active,.buttons.has-addons .button.is-focused,.buttons.has-addons .button.is-selected,.buttons.has-addons .button:active,.buttons.has-addons .button:focus{z-index:3}.buttons.has-addons .button.is-active:hover,.buttons.has-addons .button.is-focused:hover,.buttons.has-addons .button.is-selected:hover,.buttons.has-addons .button:active:hover,.buttons.has-addons .button:focus:hover{z-index:4}.buttons.has-addons .button.is-expanded{flex-grow:1}.buttons.is-centered{justify-content:center}.buttons.is-right{justify-content:flex-end}.container{margin:0 auto;position:relative}@media screen and (min-width:1088px){.container{max-width:960px;width:960px}.container.is-fluid{margin-left:64px;margin-right:64px;max-width:none;width:auto}}@media screen and (max-width:1279px){.container.is-widescreen{max-width:1152px;width:auto}}@media screen and (max-width:1471px){.container.is-fullhd{max-width:1344px;width:auto}}@media screen and (min-width:1280px){.container{max-width:1152px;width:1152px}}@media screen and (min-width:1472px){.container{max-width:1344px;width:1344px}}.content li+li{margin-top:.25em}.content blockquote:not(:last-child),.content dl:not(:last-child),.content ol:not(:last-child),.content p:not(:last-child),.content pre:not(:last-child),.content table:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{color:#363636;font-weight:600;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content h5{font-size:1.125em;margin-bottom:.8888em}.content h6{font-size:1em;margin-bottom:1em}.content blockquote{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content ol{list-style-position:outside;margin-left:2em;margin-top:1em}.content ol:not([type]){list-style-type:decimal}.content ol:not([type]).is-lower-alpha{list-style-type:lower-alpha}.content ol:not([type]).is-lower-roman{list-style-type:lower-roman}.content ol:not([type]).is-upper-alpha{list-style-type:upper-alpha}.content ol:not([type]).is-upper-roman{list-style-type:upper-roman}.content ul{list-style:disc outside;margin-left:2em;margin-top:1em}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.content dd{margin-left:2em}.content figure{margin-left:2em;margin-right:2em;text-align:center}.content figure:not(:first-child){margin-top:2em}.content figure:not(:last-child){margin-bottom:2em}.content figure img{display:inline-block}.content figure figcaption{font-style:italic}.content pre{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content sub,.content sup{font-size:75%}.content table{width:100%}.content table td,.content table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content table th{color:#363636;text-align:left}.content table thead td,.content table thead th{border-width:0 0 2px;color:#363636}.content table tfoot td,.content table tfoot th{border-width:2px 0 0;color:#363636}.content table tbody tr:last-child td,.content table tbody tr:last-child th{border-bottom-width:0}.content.is-small{font-size:.75rem}.content.is-medium{font-size:1.25rem}.content.is-large{font-size:1.5rem}.input,.taginput .taginput-container.is-focusable,.textarea{background-color:#fff;border-color:#dbdbdb;color:#363636;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.input::-moz-placeholder,.taginput .taginput-container.is-focusable::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.taginput .taginput-container.is-focusable::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.taginput .taginput-container.is-focusable:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.taginput .taginput-container.is-focusable:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered,.input:hover,.taginput .is-hovered.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:hover,.textarea.is-hovered,.textarea:hover{border-color:#b5b5b5}.input.is-active,.input.is-focused,.input:active,.input:focus,.taginput .is-active.taginput-container.is-focusable,.taginput .is-focused.taginput-container.is-focusable,.taginput .taginput-container.is-focusable:active,.taginput .taginput-container.is-focusable:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{border-color:#7957d5;box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.input[disabled],.taginput .taginput-container.is-focusable[disabled],.taginput fieldset[disabled] .taginput-container.is-focusable,.textarea[disabled],fieldset[disabled] .input,fieldset[disabled] .taginput .taginput-container.is-focusable,fieldset[disabled] .textarea{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.input[disabled]::-moz-placeholder,.taginput .taginput-container.is-focusable[disabled]::-moz-placeholder,.taginput fieldset[disabled] .taginput-container.is-focusable::-moz-placeholder,.textarea[disabled]::-moz-placeholder,fieldset[disabled] .input::-moz-placeholder,fieldset[disabled] .taginput .taginput-container.is-focusable::-moz-placeholder,fieldset[disabled] .textarea::-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]::-webkit-input-placeholder,.taginput .taginput-container.is-focusable[disabled]::-webkit-input-placeholder,.taginput fieldset[disabled] .taginput-container.is-focusable::-webkit-input-placeholder,.textarea[disabled]::-webkit-input-placeholder,fieldset[disabled] .input::-webkit-input-placeholder,fieldset[disabled] .taginput .taginput-container.is-focusable::-webkit-input-placeholder,fieldset[disabled] .textarea::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-moz-placeholder,.taginput .taginput-container.is-focusable[disabled]:-moz-placeholder,.taginput fieldset[disabled] .taginput-container.is-focusable:-moz-placeholder,.textarea[disabled]:-moz-placeholder,fieldset[disabled] .input:-moz-placeholder,fieldset[disabled] .taginput .taginput-container.is-focusable:-moz-placeholder,fieldset[disabled] .textarea:-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-ms-input-placeholder,.taginput .taginput-container.is-focusable[disabled]:-ms-input-placeholder,.taginput fieldset[disabled] .taginput-container.is-focusable:-ms-input-placeholder,.textarea[disabled]:-ms-input-placeholder,fieldset[disabled] .input:-ms-input-placeholder,fieldset[disabled] .taginput .taginput-container.is-focusable:-ms-input-placeholder,fieldset[disabled] .textarea:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.input[readonly],.taginput .taginput-container.is-focusable[readonly],.textarea[readonly]{box-shadow:none}.input.is-white,.taginput .is-white.taginput-container.is-focusable,.textarea.is-white{border-color:#fff}.input.is-white.is-active,.input.is-white.is-focused,.input.is-white:active,.input.is-white:focus,.taginput .is-white.is-active.taginput-container.is-focusable,.taginput .is-white.is-focused.taginput-container.is-focusable,.taginput .is-white.taginput-container.is-focusable:active,.taginput .is-white.taginput-container.is-focusable:focus,.textarea.is-white.is-active,.textarea.is-white.is-focused,.textarea.is-white:active,.textarea.is-white:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.input.is-black,.taginput .is-black.taginput-container.is-focusable,.textarea.is-black{border-color:#0a0a0a}.input.is-black.is-active,.input.is-black.is-focused,.input.is-black:active,.input.is-black:focus,.taginput .is-black.is-active.taginput-container.is-focusable,.taginput .is-black.is-focused.taginput-container.is-focusable,.taginput .is-black.taginput-container.is-focusable:active,.taginput .is-black.taginput-container.is-focusable:focus,.textarea.is-black.is-active,.textarea.is-black.is-focused,.textarea.is-black:active,.textarea.is-black:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.input.is-light,.taginput .is-light.taginput-container.is-focusable,.textarea.is-light{border-color:#f5f5f5}.input.is-light.is-active,.input.is-light.is-focused,.input.is-light:active,.input.is-light:focus,.taginput .is-light.is-active.taginput-container.is-focusable,.taginput .is-light.is-focused.taginput-container.is-focusable,.taginput .is-light.taginput-container.is-focusable:active,.taginput .is-light.taginput-container.is-focusable:focus,.textarea.is-light.is-active,.textarea.is-light.is-focused,.textarea.is-light:active,.textarea.is-light:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.input.is-dark,.taginput .is-dark.taginput-container.is-focusable,.textarea.is-dark{border-color:#363636}.input.is-dark.is-active,.input.is-dark.is-focused,.input.is-dark:active,.input.is-dark:focus,.taginput .is-dark.is-active.taginput-container.is-focusable,.taginput .is-dark.is-focused.taginput-container.is-focusable,.taginput .is-dark.taginput-container.is-focusable:active,.taginput .is-dark.taginput-container.is-focusable:focus,.textarea.is-dark.is-active,.textarea.is-dark.is-focused,.textarea.is-dark:active,.textarea.is-dark:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary,.taginput .is-primary.taginput-container.is-focusable,.textarea.is-primary{border-color:#7957d5}.input.is-primary.is-active,.input.is-primary.is-focused,.input.is-primary:active,.input.is-primary:focus,.taginput .is-primary.is-active.taginput-container.is-focusable,.taginput .is-primary.is-focused.taginput-container.is-focusable,.taginput .is-primary.taginput-container.is-focusable:active,.taginput .is-primary.taginput-container.is-focusable:focus,.textarea.is-primary.is-active,.textarea.is-primary.is-focused,.textarea.is-primary:active,.textarea.is-primary:focus{box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.input.is-link,.taginput .is-link.taginput-container.is-focusable,.textarea.is-link{border-color:#7957d5}.input.is-link.is-active,.input.is-link.is-focused,.input.is-link:active,.input.is-link:focus,.taginput .is-link.is-active.taginput-container.is-focusable,.taginput .is-link.is-focused.taginput-container.is-focusable,.taginput .is-link.taginput-container.is-focusable:active,.taginput .is-link.taginput-container.is-focusable:focus,.textarea.is-link.is-active,.textarea.is-link.is-focused,.textarea.is-link:active,.textarea.is-link:focus{box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.input.is-info,.taginput .is-info.taginput-container.is-focusable,.textarea.is-info{border-color:#167df0}.input.is-info.is-active,.input.is-info.is-focused,.input.is-info:active,.input.is-info:focus,.taginput .is-info.is-active.taginput-container.is-focusable,.taginput .is-info.is-focused.taginput-container.is-focusable,.taginput .is-info.taginput-container.is-focusable:active,.taginput .is-info.taginput-container.is-focusable:focus,.textarea.is-info.is-active,.textarea.is-info.is-focused,.textarea.is-info:active,.textarea.is-info:focus{box-shadow:0 0 0 .125em rgba(22,125,240,.25)}.input.is-success,.taginput .is-success.taginput-container.is-focusable,.textarea.is-success{border-color:#23d160}.input.is-success.is-active,.input.is-success.is-focused,.input.is-success:active,.input.is-success:focus,.taginput .is-success.is-active.taginput-container.is-focusable,.taginput .is-success.is-focused.taginput-container.is-focusable,.taginput .is-success.taginput-container.is-focusable:active,.taginput .is-success.taginput-container.is-focusable:focus,.textarea.is-success.is-active,.textarea.is-success.is-focused,.textarea.is-success:active,.textarea.is-success:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning,.taginput .is-warning.taginput-container.is-focusable,.textarea.is-warning{border-color:#ffdd57}.input.is-warning.is-active,.input.is-warning.is-focused,.input.is-warning:active,.input.is-warning:focus,.taginput .is-warning.is-active.taginput-container.is-focusable,.taginput .is-warning.is-focused.taginput-container.is-focusable,.taginput .is-warning.taginput-container.is-focusable:active,.taginput .is-warning.taginput-container.is-focusable:focus,.textarea.is-warning.is-active,.textarea.is-warning.is-focused,.textarea.is-warning:active,.textarea.is-warning:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger,.taginput .is-danger.taginput-container.is-focusable,.textarea.is-danger{border-color:#ff3860}.input.is-danger.is-active,.input.is-danger.is-focused,.input.is-danger:active,.input.is-danger:focus,.taginput .is-danger.is-active.taginput-container.is-focusable,.taginput .is-danger.is-focused.taginput-container.is-focusable,.taginput .is-danger.taginput-container.is-focusable:active,.taginput .is-danger.taginput-container.is-focusable:focus,.textarea.is-danger.is-active,.textarea.is-danger.is-focused,.textarea.is-danger:active,.textarea.is-danger:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small,.taginput .is-small.taginput-container.is-focusable,.textarea.is-small{border-radius:2px;font-size:.75rem}.input.is-medium,.taginput .is-medium.taginput-container.is-focusable,.textarea.is-medium{font-size:1.25rem}.input.is-large,.taginput .is-large.taginput-container.is-focusable,.textarea.is-large{font-size:1.5rem}.input.is-fullwidth,.taginput .is-fullwidth.taginput-container.is-focusable,.textarea.is-fullwidth{display:block;width:100%}.input.is-inline,.taginput .is-inline.taginput-container.is-focusable,.textarea.is-inline{display:inline;width:auto}.input.is-rounded,.taginput .is-rounded.taginput-container.is-focusable{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static,.taginput .is-static.taginput-container.is-focusable{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.textarea{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea:not([rows]){max-height:600px;min-height:120px}.textarea[rows]{height:auto}.textarea.has-fixed-size{resize:none}.checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}.checkbox[disabled],.radio[disabled],fieldset[disabled] .checkbox,fieldset[disabled] .radio{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}.select{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select:not(.is-multiple){height:2.25em}.select:not(.is-multiple):not(.is-loading):after{border-color:#7957d5;right:1.125em;z-index:4}.select.is-rounded select{border-radius:290486px;padding-left:1em}.select select{background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:none}.select select::-moz-placeholder{color:rgba(54,54,54,.3)}.select select::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select select:-moz-placeholder{color:rgba(54,54,54,.3)}.select select:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select select.is-hovered,.select select:hover{border-color:#b5b5b5}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{border-color:#7957d5;box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.select select[disabled],fieldset[disabled] .select select{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.select select[disabled]::-moz-placeholder,fieldset[disabled] .select select::-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]::-webkit-input-placeholder,fieldset[disabled] .select select::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-moz-placeholder,fieldset[disabled] .select select:-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-ms-input-placeholder,fieldset[disabled] .select select:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.select select::-ms-expand{display:none}.select select[disabled]:hover,fieldset[disabled] .select select:hover{border-color:#f5f5f5}.select select:not([multiple]){padding-right:2.5em}.select select[multiple]{height:auto;padding:0}.select select[multiple] option{padding:.5em 1em}.select:not(.is-multiple):not(.is-loading):hover:after{border-color:#363636}.select.is-white:not(:hover):after,.select.is-white select{border-color:#fff}.select.is-white select.is-hovered,.select.is-white select:hover{border-color:#f2f2f2}.select.is-white select.is-active,.select.is-white select.is-focused,.select.is-white select:active,.select.is-white select:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.select.is-black:not(:hover):after,.select.is-black select{border-color:#0a0a0a}.select.is-black select.is-hovered,.select.is-black select:hover{border-color:#000}.select.is-black select.is-active,.select.is-black select.is-focused,.select.is-black select:active,.select.is-black select:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.select.is-light:not(:hover):after,.select.is-light select{border-color:#f5f5f5}.select.is-light select.is-hovered,.select.is-light select:hover{border-color:#e8e8e8}.select.is-light select.is-active,.select.is-light select.is-focused,.select.is-light select:active,.select.is-light select:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.select.is-dark:not(:hover):after,.select.is-dark select{border-color:#363636}.select.is-dark select.is-hovered,.select.is-dark select:hover{border-color:#292929}.select.is-dark select.is-active,.select.is-dark select.is-focused,.select.is-dark select:active,.select.is-dark select:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary:not(:hover):after,.select.is-primary select{border-color:#7957d5}.select.is-primary select.is-hovered,.select.is-primary select:hover{border-color:#6943d0}.select.is-primary select.is-active,.select.is-primary select.is-focused,.select.is-primary select:active,.select.is-primary select:focus{box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.select.is-link:not(:hover):after,.select.is-link select{border-color:#7957d5}.select.is-link select.is-hovered,.select.is-link select:hover{border-color:#6943d0}.select.is-link select.is-active,.select.is-link select.is-focused,.select.is-link select:active,.select.is-link select:focus{box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.select.is-info:not(:hover):after,.select.is-info select{border-color:#167df0}.select.is-info select.is-hovered,.select.is-info select:hover{border-color:#0e71de}.select.is-info select.is-active,.select.is-info select.is-focused,.select.is-info select:active,.select.is-info select:focus{box-shadow:0 0 0 .125em rgba(22,125,240,.25)}.select.is-success:not(:hover):after,.select.is-success select{border-color:#23d160}.select.is-success select.is-hovered,.select.is-success select:hover{border-color:#20bc56}.select.is-success select.is-active,.select.is-success select.is-focused,.select.is-success select:active,.select.is-success select:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning:not(:hover):after,.select.is-warning select{border-color:#ffdd57}.select.is-warning select.is-hovered,.select.is-warning select:hover{border-color:#ffd83d}.select.is-warning select.is-active,.select.is-warning select.is-focused,.select.is-warning select:active,.select.is-warning select:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger:not(:hover):after,.select.is-danger select{border-color:#ff3860}.select.is-danger select.is-hovered,.select.is-danger select:hover{border-color:#ff1f4b}.select.is-danger select.is-active,.select.is-danger select.is-focused,.select.is-danger select:active,.select.is-danger select:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small{border-radius:2px;font-size:.75rem}.select.is-medium{font-size:1.25rem}.select.is-large{font-size:1.5rem}.select.is-disabled:after{border-color:#7a7a7a}.select.is-fullwidth,.select.is-fullwidth select{width:100%}.select.is-loading:after{margin-top:0;position:absolute;right:.625em;top:.625em;transform:none}.select.is-loading.is-small:after{font-size:.75rem}.select.is-loading.is-medium:after{font-size:1.25rem}.select.is-loading.is-large:after{font-size:1.5rem}.file{align-items:stretch;display:flex;justify-content:flex-start;position:relative}.file.is-white .file-cta{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered .file-cta,.file.is-white:hover .file-cta{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused .file-cta,.file.is-white:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,100%,.25);color:#0a0a0a}.file.is-white.is-active .file-cta,.file.is-white:active .file-cta{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black .file-cta{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered .file-cta,.file.is-black:hover .file-cta{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused .file-cta,.file.is-black:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,4%,.25);color:#fff}.file.is-black.is-active .file-cta,.file.is-black:active .file-cta{background-color:#000;border-color:transparent;color:#fff}.file.is-light .file-cta{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered .file-cta,.file.is-light:hover .file-cta{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused .file-cta,.file.is-light:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,96%,.25);color:#363636}.file.is-light.is-active .file-cta,.file.is-light:active .file-cta{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark .file-cta{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered .file-cta,.file.is-dark:hover .file-cta{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused .file-cta,.file.is-dark:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active .file-cta,.file.is-dark:active .file-cta{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary .file-cta{background-color:#7957d5;border-color:transparent;color:#fff}.file.is-primary.is-hovered .file-cta,.file.is-primary:hover .file-cta{background-color:#714dd2;border-color:transparent;color:#fff}.file.is-primary.is-focused .file-cta,.file.is-primary:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(121,87,213,.25);color:#fff}.file.is-primary.is-active .file-cta,.file.is-primary:active .file-cta{background-color:#6943d0;border-color:transparent;color:#fff}.file.is-link .file-cta{background-color:#7957d5;border-color:transparent;color:#fff}.file.is-link.is-hovered .file-cta,.file.is-link:hover .file-cta{background-color:#714dd2;border-color:transparent;color:#fff}.file.is-link.is-focused .file-cta,.file.is-link:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(121,87,213,.25);color:#fff}.file.is-link.is-active .file-cta,.file.is-link:active .file-cta{background-color:#6943d0;border-color:transparent;color:#fff}.file.is-info .file-cta{background-color:#167df0;border-color:transparent;color:#fff}.file.is-info.is-hovered .file-cta,.file.is-info:hover .file-cta{background-color:#0f77ea;border-color:transparent;color:#fff}.file.is-info.is-focused .file-cta,.file.is-info:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(22,125,240,.25);color:#fff}.file.is-info.is-active .file-cta,.file.is-info:active .file-cta{background-color:#0e71de;border-color:transparent;color:#fff}.file.is-success .file-cta{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered .file-cta,.file.is-success:hover .file-cta{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused .file-cta,.file.is-success:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active .file-cta,.file.is-success:active .file-cta{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning .file-cta{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered .file-cta,.file.is-warning:hover .file-cta{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused .file-cta,.file.is-warning:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active .file-cta,.file.is-warning:active .file-cta{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger .file-cta{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered .file-cta,.file.is-danger:hover .file-cta{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused .file-cta,.file.is-danger:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active .file-cta,.file.is-danger:active .file-cta{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small{font-size:.75rem}.file.is-medium{font-size:1.25rem}.file.is-medium .file-icon .fa{font-size:21px}.file.is-large{font-size:1.5rem}.file.is-large .file-icon .fa{font-size:28px}.file.has-name .file-cta{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name .file-name{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty .file-cta{border-radius:4px}.file.has-name.is-empty .file-name{display:none}.file.is-boxed .file-label{flex-direction:column}.file.is-boxed .file-cta{flex-direction:column;height:auto;padding:1em 3em}.file.is-boxed .file-name{border-width:0 1px 1px}.file.is-boxed .file-icon{height:1.5em;width:1.5em}.file.is-boxed .file-icon .fa{font-size:21px}.file.is-boxed.is-small .file-icon .fa{font-size:14px}.file.is-boxed.is-medium .file-icon .fa{font-size:28px}.file.is-boxed.is-large .file-icon .fa{font-size:35px}.file.is-boxed.has-name .file-cta{border-radius:4px 4px 0 0}.file.is-boxed.has-name .file-name{border-radius:0 0 4px 4px;border-width:0 1px 1px}.file.is-centered{justify-content:center}.file.is-fullwidth .file-label{width:100%}.file.is-fullwidth .file-name{flex-grow:1;max-width:none}.file.is-right{justify-content:flex-end}.file.is-right .file-cta{border-radius:0 4px 4px 0}.file.is-right .file-name{border-radius:4px 0 0 4px;border-width:1px 0 1px 1px;order:-1}.file-label{align-items:stretch;display:flex;cursor:pointer;justify-content:flex-start;overflow:hidden;position:relative}.file-label:hover .file-cta{background-color:#eee;color:#363636}.file-label:hover .file-name{border-color:#d5d5d5}.file-label:active .file-cta{background-color:#e8e8e8;color:#363636}.file-label:active .file-name{border-color:#cfcfcf}.file-input{height:100%;left:0;opacity:0;outline:none;position:absolute;top:0;width:100%}.file-cta,.file-name{border-color:#dbdbdb;border-radius:4px;font-size:1em;padding-left:1em;padding-right:1em;white-space:nowrap}.file-cta{background-color:#f5f5f5;color:#4a4a4a}.file-name{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon{align-items:center;display:flex;height:1em;justify-content:center;margin-right:.5em;width:1em}.file-icon .fa{font-size:14px}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.label.is-small{font-size:.75rem}.label.is-medium{font-size:1.25rem}.label.is-large{font-size:1.5rem}.help{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white{color:#fff}.help.is-black{color:#0a0a0a}.help.is-light{color:#f5f5f5}.help.is-dark{color:#363636}.help.is-link,.help.is-primary{color:#7957d5}.help.is-info{color:#167df0}.help.is-success{color:#23d160}.help.is-warning{color:#ffdd57}.help.is-danger{color:#ff3860}.field:not(:last-child){margin-bottom:.75rem}.field.has-addons{display:flex;justify-content:flex-start}.field.has-addons .control:not(:last-child){margin-right:-1px}.field.has-addons .control:not(:first-child):not(:last-child) .button,.field.has-addons .control:not(:first-child):not(:last-child) .input,.field.has-addons .control:not(:first-child):not(:last-child) .select select,.field.has-addons .control:not(:first-child):not(:last-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:not(:first-child):not(:last-child) .taginput-container.is-focusable{border-radius:0}.field.has-addons .control:first-child:not(:only-child) .button,.field.has-addons .control:first-child:not(:only-child) .input,.field.has-addons .control:first-child:not(:only-child) .select select,.field.has-addons .control:first-child:not(:only-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child:not(:only-child) .taginput-container.is-focusable{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons .control:last-child:not(:only-child) .button,.field.has-addons .control:last-child:not(:only-child) .input,.field.has-addons .control:last-child:not(:only-child) .select select,.field.has-addons .control:last-child:not(:only-child) .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child:not(:only-child) .taginput-container.is-focusable{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons .control .button:not([disabled]).is-hovered,.field.has-addons .control .button:not([disabled]):hover,.field.has-addons .control .input:not([disabled]).is-hovered,.field.has-addons .control .input:not([disabled]):hover,.field.has-addons .control .select select:not([disabled]).is-hovered,.field.has-addons .control .select select:not([disabled]):hover,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]).is-hovered,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]):hover,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]).is-hovered,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]):hover{z-index:2}.field.has-addons .control .button:not([disabled]).is-active,.field.has-addons .control .button:not([disabled]).is-focused,.field.has-addons .control .button:not([disabled]):active,.field.has-addons .control .button:not([disabled]):focus,.field.has-addons .control .input:not([disabled]).is-active,.field.has-addons .control .input:not([disabled]).is-focused,.field.has-addons .control .input:not([disabled]):active,.field.has-addons .control .input:not([disabled]):focus,.field.has-addons .control .select select:not([disabled]).is-active,.field.has-addons .control .select select:not([disabled]).is-focused,.field.has-addons .control .select select:not([disabled]):active,.field.has-addons .control .select select:not([disabled]):focus,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]).is-active,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]).is-focused,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]):active,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]):focus,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]).is-active,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]).is-focused,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]):active,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]):focus{z-index:3}.field.has-addons .control .button:not([disabled]).is-active:hover,.field.has-addons .control .button:not([disabled]).is-focused:hover,.field.has-addons .control .button:not([disabled]):active:hover,.field.has-addons .control .button:not([disabled]):focus:hover,.field.has-addons .control .input:not([disabled]).is-active:hover,.field.has-addons .control .input:not([disabled]).is-focused:hover,.field.has-addons .control .input:not([disabled]):active:hover,.field.has-addons .control .input:not([disabled]):focus:hover,.field.has-addons .control .select select:not([disabled]).is-active:hover,.field.has-addons .control .select select:not([disabled]).is-focused:hover,.field.has-addons .control .select select:not([disabled]):active:hover,.field.has-addons .control .select select:not([disabled]):focus:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]).is-active:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]).is-focused:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]):active:hover,.field.has-addons .control .taginput .taginput-container.is-focusable:not([disabled]):focus:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]).is-active:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]).is-focused:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]):active:hover,.taginput .field.has-addons .control .taginput-container.is-focusable:not([disabled]):focus:hover{z-index:4}.field.has-addons .control.is-expanded{flex-grow:1}.field.has-addons.has-addons-centered{justify-content:center}.field.has-addons.has-addons-right{justify-content:flex-end}.field.has-addons.has-addons-fullwidth .control{flex-grow:1;flex-shrink:0}.field.is-grouped{display:flex;justify-content:flex-start}.field.is-grouped>.control{flex-shrink:0}.field.is-grouped>.control:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped>.control.is-expanded{flex-grow:1;flex-shrink:1}.field.is-grouped.is-grouped-centered{justify-content:center}.field.is-grouped.is-grouped-right{justify-content:flex-end}.field.is-grouped.is-grouped-multiline{flex-wrap:wrap}.field.is-grouped.is-grouped-multiline>.control:last-child,.field.is-grouped.is-grouped-multiline>.control:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline:not(:last-child){margin-bottom:0}@media print,screen and (min-width:769px){.field.is-horizontal{display:flex}}.field-label .label{font-size:inherit}@media screen and (max-width:768px){.field-label{margin-bottom:.5rem}}@media print,screen and (min-width:769px){.field-label{flex-basis:0;flex-grow:1;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small{font-size:.75rem;padding-top:.375em}.field-label.is-normal{padding-top:.375em}.field-label.is-medium{font-size:1.25rem;padding-top:.375em}.field-label.is-large{font-size:1.5rem;padding-top:.375em}}.field-body .field .field{margin-bottom:0}@media print,screen and (min-width:769px){.field-body{display:flex;flex-basis:0;flex-grow:5;flex-shrink:1}.field-body .field{margin-bottom:0}.field-body>.field{flex-shrink:1}.field-body>.field:not(.is-narrow){flex-grow:1}.field-body>.field:not(:last-child){margin-right:.75rem}}.control{box-sizing:border-box;clear:both;font-size:1rem;position:relative;text-align:left}.control.has-icons-left .input:focus~.icon,.control.has-icons-left .select:focus~.icon,.control.has-icons-left .taginput .taginput-container.is-focusable:focus~.icon,.control.has-icons-right .input:focus~.icon,.control.has-icons-right .select:focus~.icon,.control.has-icons-right .taginput .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-left .taginput-container.is-focusable:focus~.icon,.taginput .control.has-icons-right .taginput-container.is-focusable:focus~.icon{color:#7a7a7a}.control.has-icons-left .input.is-small~.icon,.control.has-icons-left .select.is-small~.icon,.control.has-icons-left .taginput .is-small.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-small~.icon,.control.has-icons-right .select.is-small~.icon,.control.has-icons-right .taginput .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-small.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-small.taginput-container.is-focusable~.icon{font-size:.75rem}.control.has-icons-left .input.is-medium~.icon,.control.has-icons-left .select.is-medium~.icon,.control.has-icons-left .taginput .is-medium.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-medium~.icon,.control.has-icons-right .select.is-medium~.icon,.control.has-icons-right .taginput .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-medium.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-medium.taginput-container.is-focusable~.icon{font-size:1.25rem}.control.has-icons-left .input.is-large~.icon,.control.has-icons-left .select.is-large~.icon,.control.has-icons-left .taginput .is-large.taginput-container.is-focusable~.icon,.control.has-icons-right .input.is-large~.icon,.control.has-icons-right .select.is-large~.icon,.control.has-icons-right .taginput .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-left .is-large.taginput-container.is-focusable~.icon,.taginput .control.has-icons-right .is-large.taginput-container.is-focusable~.icon{font-size:1.5rem}.control.has-icons-left .icon,.control.has-icons-right .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:4}.control.has-icons-left .input,.control.has-icons-left .select select,.control.has-icons-left .taginput .taginput-container.is-focusable,.taginput .control.has-icons-left .taginput-container.is-focusable{padding-left:2.25em}.control.has-icons-left .icon.is-left{left:0}.control.has-icons-right .input,.control.has-icons-right .select select,.control.has-icons-right .taginput .taginput-container.is-focusable,.taginput .control.has-icons-right .taginput-container.is-focusable{padding-right:2.25em}.control.has-icons-right .icon.is-right{right:0}.control.is-loading:after{position:absolute!important;right:.625em;top:.625em;z-index:4}.control.is-loading.is-small:after{font-size:.75rem}.control.is-loading.is-medium:after{font-size:1.25rem}.control.is-loading.is-large:after{font-size:1.5rem}.icon{align-items:center;display:inline-flex;justify-content:center;height:1.5rem;width:1.5rem}.icon.is-small{height:1rem;width:1rem}.icon.is-medium{height:2rem;width:2rem}.icon.is-large{height:3rem;width:3rem}.image{display:block;position:relative}.image img{display:block;height:auto;width:100%}.image img.is-rounded{border-radius:290486px}.image.is-1by1 .has-ratio,.image.is-1by1 img,.image.is-1by2 .has-ratio,.image.is-1by2 img,.image.is-1by3 .has-ratio,.image.is-1by3 img,.image.is-2by1 .has-ratio,.image.is-2by1 img,.image.is-2by3 .has-ratio,.image.is-2by3 img,.image.is-3by1 .has-ratio,.image.is-3by1 img,.image.is-3by2 .has-ratio,.image.is-3by2 img,.image.is-3by4 .has-ratio,.image.is-3by4 img,.image.is-3by5 .has-ratio,.image.is-3by5 img,.image.is-4by3 .has-ratio,.image.is-4by3 img,.image.is-4by5 .has-ratio,.image.is-4by5 img,.image.is-5by3 .has-ratio,.image.is-5by3 img,.image.is-5by4 .has-ratio,.image.is-5by4 img,.image.is-9by16 .has-ratio,.image.is-9by16 img,.image.is-16by9 .has-ratio,.image.is-16by9 img,.image.is-square .has-ratio,.image.is-square img{height:100%;width:100%}.image.is-1by1,.image.is-square{padding-top:100%}.image.is-5by4{padding-top:80%}.image.is-4by3{padding-top:75%}.image.is-3by2{padding-top:66.6666%}.image.is-5by3{padding-top:60%}.image.is-16by9{padding-top:56.25%}.image.is-2by1{padding-top:50%}.image.is-3by1{padding-top:33.3333%}.image.is-4by5{padding-top:125%}.image.is-3by4{padding-top:133.3333%}.image.is-2by3{padding-top:150%}.image.is-3by5{padding-top:166.6666%}.image.is-9by16{padding-top:177.7777%}.image.is-1by2{padding-top:200%}.image.is-1by3{padding-top:300%}.image.is-16x16{height:16px;width:16px}.image.is-24x24{height:24px;width:24px}.image.is-32x32{height:32px;width:32px}.image.is-48x48{height:48px;width:48px}.image.is-64x64{height:64px;width:64px}.image.is-96x96{height:96px;width:96px}.image.is-128x128{height:128px;width:128px}.notification{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification a:not(.button):not(.dropdown-item){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:#fff}.notification pre code{background:transparent}.notification>.delete{position:absolute;right:.5rem;top:.5rem}.notification .content,.notification .subtitle,.notification .title{color:currentColor}.notification.is-white{background-color:#fff;color:#0a0a0a}.notification.is-black{background-color:#0a0a0a;color:#fff}.notification.is-light{background-color:#f5f5f5;color:#363636}.notification.is-dark{background-color:#363636;color:#f5f5f5}.notification.is-link,.notification.is-primary{background-color:#7957d5;color:#fff}.notification.is-info{background-color:#167df0;color:#fff}.notification.is-success{background-color:#23d160;color:#fff}.notification.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.notification.is-danger{background-color:#ff3860;color:#fff}.progress{-moz-appearance:none;-webkit-appearance:none;border:none;border-radius:290486px;display:block;height:1rem;overflow:hidden;padding:0;width:100%}.progress::-webkit-progress-bar{background-color:#dbdbdb}.progress::-webkit-progress-value{background-color:#4a4a4a}.progress::-moz-progress-bar{background-color:#4a4a4a}.progress::-ms-fill{background-color:#4a4a4a;border:none}.progress:indeterminate{animation-duration:1.5s;animation-iteration-count:infinite;animation-name:moveIndeterminate;animation-timing-function:linear;background-color:#dbdbdb;background-image:linear-gradient(90deg,#4a4a4a 30%,#dbdbdb 0);background-position:0 0;background-repeat:no-repeat;background-size:150% 150%}.progress:indeterminate::-webkit-progress-bar{background-color:transparent}.progress:indeterminate::-moz-progress-bar{background-color:transparent}.progress.is-white::-webkit-progress-value{background-color:#fff}.progress.is-white::-moz-progress-bar{background-color:#fff}.progress.is-white::-ms-fill{background-color:#fff}.progress.is-white:indeterminate{background-image:linear-gradient(90deg,#fff 30%,#dbdbdb 0)}.progress.is-black::-webkit-progress-value{background-color:#0a0a0a}.progress.is-black::-moz-progress-bar{background-color:#0a0a0a}.progress.is-black::-ms-fill{background-color:#0a0a0a}.progress.is-black:indeterminate{background-image:linear-gradient(90deg,#0a0a0a 30%,#dbdbdb 0)}.progress.is-light::-webkit-progress-value{background-color:#f5f5f5}.progress.is-light::-moz-progress-bar{background-color:#f5f5f5}.progress.is-light::-ms-fill{background-color:#f5f5f5}.progress.is-light:indeterminate{background-image:linear-gradient(90deg,#f5f5f5 30%,#dbdbdb 0)}.progress.is-dark::-webkit-progress-value{background-color:#363636}.progress.is-dark::-moz-progress-bar{background-color:#363636}.progress.is-dark::-ms-fill{background-color:#363636}.progress.is-dark:indeterminate{background-image:linear-gradient(90deg,#363636 30%,#dbdbdb 0)}.progress.is-primary::-webkit-progress-value{background-color:#7957d5}.progress.is-primary::-moz-progress-bar{background-color:#7957d5}.progress.is-primary::-ms-fill{background-color:#7957d5}.progress.is-primary:indeterminate{background-image:linear-gradient(90deg,#7957d5 30%,#dbdbdb 0)}.progress.is-link::-webkit-progress-value{background-color:#7957d5}.progress.is-link::-moz-progress-bar{background-color:#7957d5}.progress.is-link::-ms-fill{background-color:#7957d5}.progress.is-link:indeterminate{background-image:linear-gradient(90deg,#7957d5 30%,#dbdbdb 0)}.progress.is-info::-webkit-progress-value{background-color:#167df0}.progress.is-info::-moz-progress-bar{background-color:#167df0}.progress.is-info::-ms-fill{background-color:#167df0}.progress.is-info:indeterminate{background-image:linear-gradient(90deg,#167df0 30%,#dbdbdb 0)}.progress.is-success::-webkit-progress-value{background-color:#23d160}.progress.is-success::-moz-progress-bar{background-color:#23d160}.progress.is-success::-ms-fill{background-color:#23d160}.progress.is-success:indeterminate{background-image:linear-gradient(90deg,#23d160 30%,#dbdbdb 0)}.progress.is-warning::-webkit-progress-value{background-color:#ffdd57}.progress.is-warning::-moz-progress-bar{background-color:#ffdd57}.progress.is-warning::-ms-fill{background-color:#ffdd57}.progress.is-warning:indeterminate{background-image:linear-gradient(90deg,#ffdd57 30%,#dbdbdb 0)}.progress.is-danger::-webkit-progress-value{background-color:#ff3860}.progress.is-danger::-moz-progress-bar{background-color:#ff3860}.progress.is-danger::-ms-fill{background-color:#ff3860}.progress.is-danger:indeterminate{background-image:linear-gradient(90deg,#ff3860 30%,#dbdbdb 0)}.progress.is-small{height:.75rem}.progress.is-medium{height:1.25rem}.progress.is-large{height:1.5rem}@keyframes moveIndeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}.table{background-color:#fff;color:#363636}.table td,.table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.table td.is-white,.table th.is-white{background-color:#fff;border-color:#fff;color:#0a0a0a}.table td.is-black,.table th.is-black{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.table td.is-light,.table th.is-light{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.table td.is-dark,.table th.is-dark{background-color:#363636;border-color:#363636;color:#f5f5f5}.table td.is-link,.table td.is-primary,.table th.is-link,.table th.is-primary{background-color:#7957d5;border-color:#7957d5;color:#fff}.table td.is-info,.table th.is-info{background-color:#167df0;border-color:#167df0;color:#fff}.table td.is-success,.table th.is-success{background-color:#23d160;border-color:#23d160;color:#fff}.table td.is-warning,.table th.is-warning{background-color:#ffdd57;border-color:#ffdd57;color:rgba(0,0,0,.7)}.table td.is-danger,.table th.is-danger{background-color:#ff3860;border-color:#ff3860;color:#fff}.table td.is-narrow,.table th.is-narrow{white-space:nowrap;width:1%}.table td.is-selected,.table th.is-selected{background-color:#7957d5;color:#fff}.table td.is-selected a,.table td.is-selected strong,.table th.is-selected a,.table th.is-selected strong{color:currentColor}.table th{color:#363636;text-align:left}.table tr.is-selected{background-color:#7957d5;color:#fff}.table tr.is-selected a,.table tr.is-selected strong{color:currentColor}.table tr.is-selected td,.table tr.is-selected th{border-color:#fff;color:currentColor}.table thead{background-color:transparent}.table thead td,.table thead th{border-width:0 0 2px;color:#363636}.table tfoot{background-color:transparent}.table tfoot td,.table tfoot th{border-width:2px 0 0;color:#363636}.table tbody{background-color:transparent}.table tbody tr:last-child td,.table tbody tr:last-child th{border-bottom-width:0}.table.is-bordered td,.table.is-bordered th{border-width:1px}.table.is-bordered tr:last-child td,.table.is-bordered tr:last-child th{border-bottom-width:1px}.table.is-fullwidth{width:100%}.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover,.table.is-hoverable tbody tr:not(.is-selected):hover{background-color:#fafafa}.table.is-hoverable.is-striped tbody tr:not(.is-selected):hover:nth-child(2n){background-color:#f5f5f5}.table.is-narrow td,.table.is-narrow th{padding:.25em .5em}.table.is-striped tbody tr:not(.is-selected):nth-child(2n){background-color:#fafafa}.table-container{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tags.are-medium .tag:not(.is-normal):not(.is-large){font-size:1rem}.tags.are-large .tag:not(.is-normal):not(.is-medium){font-size:1.25rem}.tags.is-centered{justify-content:center}.tags.is-centered .tag{margin-right:.25rem;margin-left:.25rem}.tags.is-right{justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:.5rem}.tags.has-addons .tag,.tags.is-right .tag:not(:last-child){margin-right:0}.tags.has-addons .tag:not(:first-child){margin-left:0;border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons .tag:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tag:not(body){align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:inline-flex;font-size:.75rem;height:2em;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:.25rem;margin-right:-.375rem}.tag:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag:not(body).is-light{background-color:#f5f5f5;color:#363636}.tag:not(body).is-dark{background-color:#363636;color:#f5f5f5}.tag:not(body).is-link,.tag:not(body).is-primary{background-color:#7957d5;color:#fff}.tag:not(body).is-info{background-color:#167df0;color:#fff}.tag:not(body).is-success{background-color:#23d160;color:#fff}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag:not(body).is-danger{background-color:#ff3860;color:#fff}.tag:not(body).is-normal{font-size:.75rem}.tag:not(body).is-medium{font-size:1rem}.tag:not(body).is-large{font-size:1.25rem}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete:after,.tag:not(body).is-delete:before{background-color:currentColor;content:"";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.tag:not(body).is-delete:before{height:1px;width:50%}.tag:not(body).is-delete:after{height:50%;width:1px}.tag:not(body).is-delete:focus,.tag:not(body).is-delete:hover{background-color:#e8e8e8}.tag:not(body).is-delete:active{background-color:#dbdbdb}.tag:not(body).is-rounded{border-radius:290486px}a.tag:hover{text-decoration:underline}.subtitle,.title{word-break:break-word}.subtitle em,.subtitle span,.title em,.title span{font-weight:inherit}.subtitle sub,.subtitle sup,.title sub,.title sup{font-size:.75em}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title+.highlight{margin-top:-.75rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.title.is-1{font-size:3rem}.title.is-2{font-size:2.5rem}.title.is-3{font-size:2rem}.title.is-4{font-size:1.5rem}.title.is-5{font-size:1.25rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.25rem}.subtitle.is-1{font-size:3rem}.subtitle.is-2{font-size:2.5rem}.subtitle.is-3{font-size:2rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-5{font-size:1.25rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.heading{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.highlight{font-weight:400;max-width:100%;overflow:hidden;padding:0}.highlight pre{overflow:auto;max-width:100%}.number{align-items:center;background-color:#f5f5f5;border-radius:290486px;display:inline-flex;font-size:1.25rem;height:2em;justify-content:center;margin-right:1.5rem;min-width:2.5em;padding:.25rem .5rem;text-align:center;vertical-align:top}.breadcrumb{font-size:1rem;white-space:nowrap}.breadcrumb a{align-items:center;color:#7957d5;display:flex;justify-content:center;padding:0 .75em}.breadcrumb a:hover{color:#363636}.breadcrumb li{align-items:center;display:flex}.breadcrumb li:first-child a{padding-left:0}.breadcrumb li.is-active a{color:#363636;cursor:default;pointer-events:none}.breadcrumb li+li:before{color:#b5b5b5;content:"/"}.breadcrumb ol,.breadcrumb ul{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:flex-start}.breadcrumb .icon:first-child{margin-right:.5em}.breadcrumb .icon:last-child{margin-left:.5em}.breadcrumb.is-centered ol,.breadcrumb.is-centered ul{justify-content:center}.breadcrumb.is-right ol,.breadcrumb.is-right ul{justify-content:flex-end}.breadcrumb.is-small{font-size:.75rem}.breadcrumb.is-medium{font-size:1.25rem}.breadcrumb.is-large{font-size:1.5rem}.breadcrumb.has-arrow-separator li+li:before{content:"\2192"}.breadcrumb.has-bullet-separator li+li:before{content:"\2022"}.breadcrumb.has-dot-separator li+li:before{content:"\B7"}.breadcrumb.has-succeeds-separator li+li:before{content:"\227B"}.card{background-color:#fff;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);color:#4a4a4a;max-width:100%;position:relative}.card-header{background-color:transparent;align-items:stretch;box-shadow:0 1px 2px hsla(0,0%,4%,.1);display:flex}.card-header-title{align-items:center;color:#363636;display:flex;flex-grow:1;font-weight:700;padding:.75rem}.card-header-icon,.card-header-title.is-centered{justify-content:center}.card-header-icon{align-items:center;cursor:pointer;display:flex;padding:.75rem}.card-image{display:block;position:relative}.card-content{padding:1.5rem}.card-content,.card-footer{background-color:transparent}.card-footer{border-top:1px solid #dbdbdb;align-items:stretch;display:flex}.card-footer-item{align-items:center;display:flex;flex-basis:0;flex-grow:1;flex-shrink:0;justify-content:center;padding:.75rem}.card-footer-item:not(:last-child){border-right:1px solid #dbdbdb}.card .media:not(:last-child){margin-bottom:.75rem}.dropdown{display:inline-flex;position:relative;vertical-align:top}.dropdown.is-active .dropdown-menu,.dropdown.is-hoverable:hover .dropdown-menu{display:block}.dropdown.is-right .dropdown-menu{left:auto;right:0}.dropdown.is-up .dropdown-menu{bottom:100%;padding-bottom:4px;padding-top:0;top:auto}.dropdown-menu{display:none;left:0;min-width:12rem;padding-top:4px;position:absolute;top:100%;z-index:20}.dropdown-content{background-color:#fff;border-radius:4px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);padding-bottom:.5rem;padding-top:.5rem}.dropdown-item,.dropdown .dropdown-menu .has-link a{color:#4a4a4a;display:block;font-size:.875rem;line-height:1.5;padding:.375rem 1rem;position:relative}.dropdown .dropdown-menu .has-link a,a.dropdown-item,button.dropdown-item{padding-right:3rem;text-align:left;white-space:nowrap;width:100%}.dropdown .dropdown-menu .has-link a:hover,a.dropdown-item:hover,button.dropdown-item:hover{background-color:#f5f5f5;color:#0a0a0a}.dropdown .dropdown-menu .has-link a.is-active,a.dropdown-item.is-active,button.dropdown-item.is-active{background-color:#7957d5;color:#fff}.dropdown-divider{background-color:#dbdbdb;border:none;display:block;height:1px;margin:.5rem 0}.level{align-items:center;justify-content:space-between}.level code{border-radius:4px}.level img{display:inline-block;vertical-align:top}.level.is-mobile,.level.is-mobile .level-left,.level.is-mobile .level-right{display:flex}.level.is-mobile .level-left+.level-right{margin-top:0}.level.is-mobile .level-item:not(:last-child){margin-bottom:0;margin-right:.75rem}.level.is-mobile .level-item:not(.is-narrow){flex-grow:1}@media print,screen and (min-width:769px){.level{display:flex}.level>.level-item:not(.is-narrow){flex-grow:1}}.level-item{align-items:center;display:flex;flex-basis:auto;flex-grow:0;flex-shrink:0;justify-content:center}.level-item .subtitle,.level-item .title{margin-bottom:0}@media screen and (max-width:768px){.level-item:not(:last-child){margin-bottom:.75rem}}.level-left,.level-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.level-left .level-item.is-flexible,.level-right .level-item.is-flexible{flex-grow:1}@media print,screen and (min-width:769px){.level-left .level-item:not(:last-child),.level-right .level-item:not(:last-child){margin-right:.75rem}}.level-left{align-items:center;justify-content:flex-start}@media screen and (max-width:768px){.level-left+.level-right{margin-top:1.5rem}}@media print,screen and (min-width:769px){.level-left{display:flex}}.level-right{align-items:center;justify-content:flex-end}@media print,screen and (min-width:769px){.level-right{display:flex}}.list{background-color:#fff;border-radius:4px;box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1)}.list-item{display:block;padding:.5em 1em}.list-item:not(a){color:#4a4a4a}.list-item:first-child,.list-item:last-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-item:not(:last-child){border-bottom:1px solid #dbdbdb}.list-item.is-active{background-color:#7957d5;color:#fff}a.list-item{background-color:#f5f5f5;cursor:pointer}.media{align-items:flex-start;display:flex;text-align:left}.media .content:not(:last-child){margin-bottom:.75rem}.media .media{border-top:1px solid hsla(0,0%,86%,.5);display:flex;padding-top:.75rem}.media .media .content:not(:last-child),.media .media .control:not(:last-child){margin-bottom:.5rem}.media .media .media{padding-top:.5rem}.media .media .media+.media{margin-top:.5rem}.media+.media{border-top:1px solid hsla(0,0%,86%,.5);margin-top:1rem;padding-top:1rem}.media.is-large+.media{margin-top:1.5rem;padding-top:1.5rem}.media-left,.media-right{flex-basis:auto;flex-grow:0;flex-shrink:0}.media-left{margin-right:1rem}.media-right{margin-left:1rem}.media-content{flex-basis:auto;flex-grow:1;flex-shrink:1;text-align:left}@media screen and (max-width:768px){.media-content{overflow-x:auto}}.menu{font-size:1rem}.menu.is-small{font-size:.75rem}.menu.is-medium{font-size:1.25rem}.menu.is-large{font-size:1.5rem}.menu-list{line-height:1.25}.menu-list a{border-radius:2px;color:#4a4a4a;display:block;padding:.5em .75em}.menu-list a:hover{background-color:#f5f5f5;color:#363636}.menu-list a.is-active{background-color:#7957d5;color:#fff}.menu-list li ul{border-left:1px solid #dbdbdb;margin:.75em;padding-left:.75em}.menu-label{color:#7a7a7a;font-size:.75em;letter-spacing:.1em;text-transform:uppercase}.menu-label:not(:first-child){margin-top:1em}.menu-label:not(:last-child){margin-bottom:1em}.message{background-color:#f5f5f5;border-radius:4px;font-size:1rem}.message strong{color:currentColor}.message a:not(.button):not(.tag):not(.dropdown-item){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-white{background-color:#fff}.message.is-white .message-header{background-color:#fff;color:#0a0a0a}.message.is-white .message-body{border-color:#fff;color:#4d4d4d}.message.is-black{background-color:#fafafa}.message.is-black .message-header{background-color:#0a0a0a;color:#fff}.message.is-black .message-body{border-color:#0a0a0a;color:#090909}.message.is-light{background-color:#fafafa}.message.is-light .message-header{background-color:#f5f5f5;color:#363636}.message.is-light .message-body{border-color:#f5f5f5;color:#505050}.message.is-dark{background-color:#fafafa}.message.is-dark .message-header{background-color:#363636;color:#f5f5f5}.message.is-dark .message-body{border-color:#363636;color:#2a2a2a}.message.is-primary{background-color:#f8f7fd}.message.is-primary .message-header{background-color:#7957d5;color:#fff}.message.is-primary .message-body{border-color:#7957d5;color:#5534ae}.message.is-link{background-color:#f8f7fd}.message.is-link .message-header{background-color:#7957d5;color:#fff}.message.is-link .message-body{border-color:#7957d5;color:#5534ae}.message.is-info{background-color:#f5fafe}.message.is-info .message-header{background-color:#167df0;color:#fff}.message.is-info .message-body{border-color:#167df0;color:#115199}.message.is-success{background-color:#f6fef9}.message.is-success .message-header{background-color:#23d160;color:#fff}.message.is-success .message-body{border-color:#23d160;color:#0e301a}.message.is-warning{background-color:#fffdf5}.message.is-warning .message-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning .message-body{border-color:#ffdd57;color:#3b3108}.message.is-danger{background-color:#fff5f7}.message.is-danger .message-header{background-color:#ff3860;color:#fff}.message.is-danger .message-body{border-color:#ff3860;color:#cd0930}.message-header{align-items:center;background-color:#4a4a4a;border-radius:4px 4px 0 0;color:#fff;display:flex;font-weight:700;justify-content:space-between;line-height:1.25;padding:.75em 1em;position:relative}.message-header .delete{flex-grow:0;flex-shrink:0;margin-left:.75em}.message-header+.message-body{border-width:0;border-top-left-radius:0;border-top-right-radius:0}.message-body{border-color:#dbdbdb;border-radius:4px;border-style:solid;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body code,.message-body pre{background-color:#fff}.message-body pre code{background-color:transparent}.modal{align-items:center;display:none;flex-direction:column;justify-content:center;overflow:hidden;position:fixed;z-index:40}.modal.is-active{display:flex}.modal-background{background-color:hsla(0,0%,4%,.86)}.modal-card,.modal-content{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}@media print,screen and (min-width:769px){.modal-card,.modal-content{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close{background:none;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-card{display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden;-ms-overflow-y:visible}.modal-card-foot,.modal-card-head{align-items:center;background-color:#f5f5f5;display:flex;flex-shrink:0;justify-content:flex-start;padding:20px;position:relative}.modal-card-head{border-bottom:1px solid #dbdbdb;border-top-left-radius:6px;border-top-right-radius:6px}.modal-card-title{color:#363636;flex-grow:1;flex-shrink:0;font-size:1.5rem;line-height:1}.modal-card-foot{border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:1px solid #dbdbdb}.modal-card-foot .button:not(:last-child){margin-right:10px}.modal-card-body{-webkit-overflow-scrolling:touch;background-color:#fff;flex-grow:1;flex-shrink:1;overflow:auto;padding:20px}.navbar{background-color:#fff;min-height:3.25rem;position:relative;z-index:30}.navbar.is-white{background-color:#fff;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link,.navbar.is-white .navbar-brand>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link.is-active,.navbar.is-white .navbar-brand .navbar-link:hover,.navbar.is-white .navbar-brand>a.navbar-item.is-active,.navbar.is-white .navbar-brand>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-brand .navbar-link:after{border-color:#0a0a0a}.navbar.is-white .navbar-burger{color:#0a0a0a}@media screen and (min-width:1088px){.navbar.is-white .navbar-end .navbar-link,.navbar.is-white .navbar-end>.navbar-item,.navbar.is-white .navbar-start .navbar-link,.navbar.is-white .navbar-start>.navbar-item{color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link.is-active,.navbar.is-white .navbar-end .navbar-link:hover,.navbar.is-white .navbar-end>a.navbar-item.is-active,.navbar.is-white .navbar-end>a.navbar-item:hover,.navbar.is-white .navbar-start .navbar-link.is-active,.navbar.is-white .navbar-start .navbar-link:hover,.navbar.is-white .navbar-start>a.navbar-item.is-active,.navbar.is-white .navbar-start>a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-end .navbar-link:after,.navbar.is-white .navbar-start .navbar-link:after{border-color:#0a0a0a}.navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-white .navbar-item.has-dropdown:hover .navbar-link{background-color:#f2f2f2;color:#0a0a0a}.navbar.is-white .navbar-dropdown a.navbar-item.is-active{background-color:#fff;color:#0a0a0a}}.navbar.is-black{background-color:#0a0a0a;color:#fff}.navbar.is-black .navbar-brand .navbar-link,.navbar.is-black .navbar-brand>.navbar-item{color:#fff}.navbar.is-black .navbar-brand .navbar-link.is-active,.navbar.is-black .navbar-brand .navbar-link:hover,.navbar.is-black .navbar-brand>a.navbar-item.is-active,.navbar.is-black .navbar-brand>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-black .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-black .navbar-end .navbar-link,.navbar.is-black .navbar-end>.navbar-item,.navbar.is-black .navbar-start .navbar-link,.navbar.is-black .navbar-start>.navbar-item{color:#fff}.navbar.is-black .navbar-end .navbar-link.is-active,.navbar.is-black .navbar-end .navbar-link:hover,.navbar.is-black .navbar-end>a.navbar-item.is-active,.navbar.is-black .navbar-end>a.navbar-item:hover,.navbar.is-black .navbar-start .navbar-link.is-active,.navbar.is-black .navbar-start .navbar-link:hover,.navbar.is-black .navbar-start>a.navbar-item.is-active,.navbar.is-black .navbar-start>a.navbar-item:hover{background-color:#000;color:#fff}.navbar.is-black .navbar-end .navbar-link:after,.navbar.is-black .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-black .navbar-item.has-dropdown:hover .navbar-link{background-color:#000;color:#fff}.navbar.is-black .navbar-dropdown a.navbar-item.is-active{background-color:#0a0a0a;color:#fff}}.navbar.is-light{background-color:#f5f5f5;color:#363636}.navbar.is-light .navbar-brand .navbar-link,.navbar.is-light .navbar-brand>.navbar-item{color:#363636}.navbar.is-light .navbar-brand .navbar-link.is-active,.navbar.is-light .navbar-brand .navbar-link:hover,.navbar.is-light .navbar-brand>a.navbar-item.is-active,.navbar.is-light .navbar-brand>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-brand .navbar-link:after{border-color:#363636}.navbar.is-light .navbar-burger{color:#363636}@media screen and (min-width:1088px){.navbar.is-light .navbar-end .navbar-link,.navbar.is-light .navbar-end>.navbar-item,.navbar.is-light .navbar-start .navbar-link,.navbar.is-light .navbar-start>.navbar-item{color:#363636}.navbar.is-light .navbar-end .navbar-link.is-active,.navbar.is-light .navbar-end .navbar-link:hover,.navbar.is-light .navbar-end>a.navbar-item.is-active,.navbar.is-light .navbar-end>a.navbar-item:hover,.navbar.is-light .navbar-start .navbar-link.is-active,.navbar.is-light .navbar-start .navbar-link:hover,.navbar.is-light .navbar-start>a.navbar-item.is-active,.navbar.is-light .navbar-start>a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-end .navbar-link:after,.navbar.is-light .navbar-start .navbar-link:after{border-color:#363636}.navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link{background-color:#e8e8e8;color:#363636}.navbar.is-light .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#363636}}.navbar.is-dark{background-color:#363636;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link,.navbar.is-dark .navbar-brand>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link.is-active,.navbar.is-dark .navbar-brand .navbar-link:hover,.navbar.is-dark .navbar-brand>a.navbar-item.is-active,.navbar.is-dark .navbar-brand>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-brand .navbar-link:after{border-color:#f5f5f5}.navbar.is-dark .navbar-burger{color:#f5f5f5}@media screen and (min-width:1088px){.navbar.is-dark .navbar-end .navbar-link,.navbar.is-dark .navbar-end>.navbar-item,.navbar.is-dark .navbar-start .navbar-link,.navbar.is-dark .navbar-start>.navbar-item{color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link.is-active,.navbar.is-dark .navbar-end .navbar-link:hover,.navbar.is-dark .navbar-end>a.navbar-item.is-active,.navbar.is-dark .navbar-end>a.navbar-item:hover,.navbar.is-dark .navbar-start .navbar-link.is-active,.navbar.is-dark .navbar-start .navbar-link:hover,.navbar.is-dark .navbar-start>a.navbar-item.is-active,.navbar.is-dark .navbar-start>a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-end .navbar-link:after,.navbar.is-dark .navbar-start .navbar-link:after{border-color:#f5f5f5}.navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link{background-color:#292929;color:#f5f5f5}.navbar.is-dark .navbar-dropdown a.navbar-item.is-active{background-color:#363636;color:#f5f5f5}}.navbar.is-primary{background-color:#7957d5;color:#fff}.navbar.is-primary .navbar-brand .navbar-link,.navbar.is-primary .navbar-brand>.navbar-item{color:#fff}.navbar.is-primary .navbar-brand .navbar-link.is-active,.navbar.is-primary .navbar-brand .navbar-link:hover,.navbar.is-primary .navbar-brand>a.navbar-item.is-active,.navbar.is-primary .navbar-brand>a.navbar-item:hover{background-color:#6943d0;color:#fff}.navbar.is-primary .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-primary .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-primary .navbar-end .navbar-link,.navbar.is-primary .navbar-end>.navbar-item,.navbar.is-primary .navbar-start .navbar-link,.navbar.is-primary .navbar-start>.navbar-item{color:#fff}.navbar.is-primary .navbar-end .navbar-link.is-active,.navbar.is-primary .navbar-end .navbar-link:hover,.navbar.is-primary .navbar-end>a.navbar-item.is-active,.navbar.is-primary .navbar-end>a.navbar-item:hover,.navbar.is-primary .navbar-start .navbar-link.is-active,.navbar.is-primary .navbar-start .navbar-link:hover,.navbar.is-primary .navbar-start>a.navbar-item.is-active,.navbar.is-primary .navbar-start>a.navbar-item:hover{background-color:#6943d0;color:#fff}.navbar.is-primary .navbar-end .navbar-link:after,.navbar.is-primary .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link{background-color:#6943d0;color:#fff}.navbar.is-primary .navbar-dropdown a.navbar-item.is-active{background-color:#7957d5;color:#fff}}.navbar.is-link{background-color:#7957d5;color:#fff}.navbar.is-link .navbar-brand .navbar-link,.navbar.is-link .navbar-brand>.navbar-item{color:#fff}.navbar.is-link .navbar-brand .navbar-link.is-active,.navbar.is-link .navbar-brand .navbar-link:hover,.navbar.is-link .navbar-brand>a.navbar-item.is-active,.navbar.is-link .navbar-brand>a.navbar-item:hover{background-color:#6943d0;color:#fff}.navbar.is-link .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-link .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-link .navbar-end .navbar-link,.navbar.is-link .navbar-end>.navbar-item,.navbar.is-link .navbar-start .navbar-link,.navbar.is-link .navbar-start>.navbar-item{color:#fff}.navbar.is-link .navbar-end .navbar-link.is-active,.navbar.is-link .navbar-end .navbar-link:hover,.navbar.is-link .navbar-end>a.navbar-item.is-active,.navbar.is-link .navbar-end>a.navbar-item:hover,.navbar.is-link .navbar-start .navbar-link.is-active,.navbar.is-link .navbar-start .navbar-link:hover,.navbar.is-link .navbar-start>a.navbar-item.is-active,.navbar.is-link .navbar-start>a.navbar-item:hover{background-color:#6943d0;color:#fff}.navbar.is-link .navbar-end .navbar-link:after,.navbar.is-link .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-link .navbar-item.has-dropdown:hover .navbar-link{background-color:#6943d0;color:#fff}.navbar.is-link .navbar-dropdown a.navbar-item.is-active{background-color:#7957d5;color:#fff}}.navbar.is-info{background-color:#167df0;color:#fff}.navbar.is-info .navbar-brand .navbar-link,.navbar.is-info .navbar-brand>.navbar-item{color:#fff}.navbar.is-info .navbar-brand .navbar-link.is-active,.navbar.is-info .navbar-brand .navbar-link:hover,.navbar.is-info .navbar-brand>a.navbar-item.is-active,.navbar.is-info .navbar-brand>a.navbar-item:hover{background-color:#0e71de;color:#fff}.navbar.is-info .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-info .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-info .navbar-end .navbar-link,.navbar.is-info .navbar-end>.navbar-item,.navbar.is-info .navbar-start .navbar-link,.navbar.is-info .navbar-start>.navbar-item{color:#fff}.navbar.is-info .navbar-end .navbar-link.is-active,.navbar.is-info .navbar-end .navbar-link:hover,.navbar.is-info .navbar-end>a.navbar-item.is-active,.navbar.is-info .navbar-end>a.navbar-item:hover,.navbar.is-info .navbar-start .navbar-link.is-active,.navbar.is-info .navbar-start .navbar-link:hover,.navbar.is-info .navbar-start>a.navbar-item.is-active,.navbar.is-info .navbar-start>a.navbar-item:hover{background-color:#0e71de;color:#fff}.navbar.is-info .navbar-end .navbar-link:after,.navbar.is-info .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-info .navbar-item.has-dropdown:hover .navbar-link{background-color:#0e71de;color:#fff}.navbar.is-info .navbar-dropdown a.navbar-item.is-active{background-color:#167df0;color:#fff}}.navbar.is-success{background-color:#23d160;color:#fff}.navbar.is-success .navbar-brand .navbar-link,.navbar.is-success .navbar-brand>.navbar-item{color:#fff}.navbar.is-success .navbar-brand .navbar-link.is-active,.navbar.is-success .navbar-brand .navbar-link:hover,.navbar.is-success .navbar-brand>a.navbar-item.is-active,.navbar.is-success .navbar-brand>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-success .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-success .navbar-end .navbar-link,.navbar.is-success .navbar-end>.navbar-item,.navbar.is-success .navbar-start .navbar-link,.navbar.is-success .navbar-start>.navbar-item{color:#fff}.navbar.is-success .navbar-end .navbar-link.is-active,.navbar.is-success .navbar-end .navbar-link:hover,.navbar.is-success .navbar-end>a.navbar-item.is-active,.navbar.is-success .navbar-end>a.navbar-item:hover,.navbar.is-success .navbar-start .navbar-link.is-active,.navbar.is-success .navbar-start .navbar-link:hover,.navbar.is-success .navbar-start>a.navbar-item.is-active,.navbar.is-success .navbar-start>a.navbar-item:hover{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-end .navbar-link:after,.navbar.is-success .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-success .navbar-item.has-dropdown:hover .navbar-link{background-color:#20bc56;color:#fff}.navbar.is-success .navbar-dropdown a.navbar-item.is-active{background-color:#23d160;color:#fff}}.navbar.is-warning{background-color:#ffdd57}.navbar.is-warning,.navbar.is-warning .navbar-brand .navbar-link,.navbar.is-warning .navbar-brand>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link.is-active,.navbar.is-warning .navbar-brand .navbar-link:hover,.navbar.is-warning .navbar-brand>a.navbar-item.is-active,.navbar.is-warning .navbar-brand>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-brand .navbar-link:after{border-color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-burger{color:rgba(0,0,0,.7)}@media screen and (min-width:1088px){.navbar.is-warning .navbar-end .navbar-link,.navbar.is-warning .navbar-end>.navbar-item,.navbar.is-warning .navbar-start .navbar-link,.navbar.is-warning .navbar-start>.navbar-item{color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link.is-active,.navbar.is-warning .navbar-end .navbar-link:hover,.navbar.is-warning .navbar-end>a.navbar-item.is-active,.navbar.is-warning .navbar-end>a.navbar-item:hover,.navbar.is-warning .navbar-start .navbar-link.is-active,.navbar.is-warning .navbar-start .navbar-link:hover,.navbar.is-warning .navbar-start>a.navbar-item.is-active,.navbar.is-warning .navbar-start>a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-end .navbar-link:after,.navbar.is-warning .navbar-start .navbar-link:after{border-color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link{background-color:#ffd83d;color:rgba(0,0,0,.7)}.navbar.is-warning .navbar-dropdown a.navbar-item.is-active{background-color:#ffdd57;color:rgba(0,0,0,.7)}}.navbar.is-danger{background-color:#ff3860;color:#fff}.navbar.is-danger .navbar-brand .navbar-link,.navbar.is-danger .navbar-brand>.navbar-item{color:#fff}.navbar.is-danger .navbar-brand .navbar-link.is-active,.navbar.is-danger .navbar-brand .navbar-link:hover,.navbar.is-danger .navbar-brand>a.navbar-item.is-active,.navbar.is-danger .navbar-brand>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-brand .navbar-link:after{border-color:#fff}.navbar.is-danger .navbar-burger{color:#fff}@media screen and (min-width:1088px){.navbar.is-danger .navbar-end .navbar-link,.navbar.is-danger .navbar-end>.navbar-item,.navbar.is-danger .navbar-start .navbar-link,.navbar.is-danger .navbar-start>.navbar-item{color:#fff}.navbar.is-danger .navbar-end .navbar-link.is-active,.navbar.is-danger .navbar-end .navbar-link:hover,.navbar.is-danger .navbar-end>a.navbar-item.is-active,.navbar.is-danger .navbar-end>a.navbar-item:hover,.navbar.is-danger .navbar-start .navbar-link.is-active,.navbar.is-danger .navbar-start .navbar-link:hover,.navbar.is-danger .navbar-start>a.navbar-item.is-active,.navbar.is-danger .navbar-start>a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-end .navbar-link:after,.navbar.is-danger .navbar-start .navbar-link:after{border-color:#fff}.navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link{background-color:#ff1f4b;color:#fff}.navbar.is-danger .navbar-dropdown a.navbar-item.is-active{background-color:#ff3860;color:#fff}}.navbar>.container{align-items:stretch;display:flex;min-height:3.25rem;width:100%}.navbar.has-shadow{box-shadow:0 2px 0 0 #f5f5f5}.navbar.is-fixed-bottom,.navbar.is-fixed-top{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom{bottom:0}.navbar.is-fixed-bottom.has-shadow{box-shadow:0 -2px 0 0 #f5f5f5}.navbar.is-fixed-top{top:0}body.has-navbar-fixed-top,html.has-navbar-fixed-top{padding-top:3.25rem}body.has-navbar-fixed-bottom,html.has-navbar-fixed-bottom{padding-bottom:3.25rem}.navbar-brand,.navbar-tabs{align-items:stretch;display:flex;flex-shrink:0;min-height:3.25rem}.navbar-brand a.navbar-item:hover{background-color:transparent}.navbar-tabs{-webkit-overflow-scrolling:touch;max-width:100vw;overflow-x:auto;overflow-y:hidden}.navbar-burger{color:#4a4a4a;cursor:pointer;display:block;height:3.25rem;position:relative;width:3.25rem;margin-left:auto}.navbar-burger span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;transform-origin:center;transition-duration:86ms;transition-property:background-color,opacity,transform;transition-timing-function:ease-out;width:16px}.navbar-burger span:first-child{top:calc(50% - 6px)}.navbar-burger span:nth-child(2){top:calc(50% - 1px)}.navbar-burger span:nth-child(3){top:calc(50% + 4px)}.navbar-burger:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active span:first-child{transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active span:nth-child(2){opacity:0}.navbar-burger.is-active span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}.navbar-menu{display:none}.navbar-item,.navbar-link{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item .icon:only-child,.navbar-link .icon:only-child{margin-left:-.25rem;margin-right:-.25rem}.navbar-link,a.navbar-item{cursor:pointer}.navbar-link.is-active,.navbar-link:hover,a.navbar-item.is-active,a.navbar-item:hover{background-color:#fafafa;color:#7957d5}.navbar-item{display:block;flex-grow:0;flex-shrink:0}.navbar-item img{max-height:1.75rem}.navbar-item.has-dropdown{padding:0}.navbar-item.is-expanded{flex-grow:1;flex-shrink:1}.navbar-item.is-tab{border-bottom:1px solid transparent;min-height:3.25rem;padding-bottom:calc(.5rem - 1px)}.navbar-item.is-tab.is-active,.navbar-item.is-tab:hover{background-color:transparent;border-bottom-color:#7957d5}.navbar-item.is-tab.is-active{border-bottom-style:solid;border-bottom-width:3px;color:#7957d5;padding-bottom:calc(.5rem - 3px)}.navbar-content{flex-grow:1;flex-shrink:1}.navbar-link:not(.is-arrowless){padding-right:2.5em}.navbar-link:not(.is-arrowless):after{border-color:#7957d5;margin-top:-.375em;right:1.125em}.navbar-dropdown{font-size:.875rem;padding-bottom:.5rem;padding-top:.5rem}.navbar-dropdown .navbar-item{padding-left:1.5rem;padding-right:1.5rem}.navbar-divider{background-color:#f5f5f5;border:none;display:none;height:2px;margin:.5rem 0}@media screen and (max-width:1087px){.navbar>.container{display:block}.navbar-brand .navbar-item,.navbar-tabs .navbar-item{align-items:center;display:flex}.navbar-link:after{display:none}.navbar-menu{background-color:#fff;box-shadow:0 8px 16px hsla(0,0%,4%,.1);padding:.5rem 0}.navbar-menu.is-active{display:block}.navbar.is-fixed-bottom-touch,.navbar.is-fixed-top-touch{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-touch{bottom:0}.navbar.is-fixed-bottom-touch.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-touch{top:0}.navbar.is-fixed-top-touch .navbar-menu,.navbar.is-fixed-top .navbar-menu{-webkit-overflow-scrolling:touch;max-height:calc(100vh - 3.25rem);overflow:auto}body.has-navbar-fixed-top-touch,html.has-navbar-fixed-top-touch{padding-top:3.25rem}body.has-navbar-fixed-bottom-touch,html.has-navbar-fixed-bottom-touch{padding-bottom:3.25rem}}@media screen and (min-width:1088px){.navbar,.navbar-end,.navbar-menu,.navbar-start{align-items:stretch;display:flex}.navbar{min-height:3.25rem}.navbar.is-spaced{padding:1rem 2rem}.navbar.is-spaced .navbar-end,.navbar.is-spaced .navbar-start{align-items:center}.navbar.is-spaced .navbar-link,.navbar.is-spaced a.navbar-item{border-radius:4px}.navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link,.navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link,.navbar.is-transparent .navbar-link.is-active,.navbar.is-transparent .navbar-link:hover,.navbar.is-transparent a.navbar-item.is-active,.navbar.is-transparent a.navbar-item:hover{background-color:transparent!important}.navbar.is-transparent .navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar.is-transparent .navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#7957d5}.navbar-burger{display:none}.navbar-item,.navbar-link{align-items:center;display:flex}.navbar-item{display:flex}.navbar-item.has-dropdown{align-items:stretch}.navbar-item.has-dropdown-up .navbar-link:after{transform:rotate(135deg) translate(.25em,-.25em)}.navbar-item.has-dropdown-up .navbar-dropdown{border-bottom:2px solid #dbdbdb;border-radius:6px 6px 0 0;border-top:none;bottom:100%;box-shadow:0 -8px 8px hsla(0,0%,4%,.1);top:auto}.navbar-item.is-active .navbar-dropdown,.navbar-item.is-hoverable:hover .navbar-dropdown{display:block}.navbar-item.is-active .navbar-dropdown.is-boxed,.navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-item.is-active .navbar-dropdown,.navbar.is-spaced .navbar-item.is-hoverable:hover .navbar-dropdown{opacity:1;pointer-events:auto;transform:translateY(0)}.navbar-menu{flex-grow:1;flex-shrink:0}.navbar-start{justify-content:flex-start;margin-right:auto}.navbar-end{justify-content:flex-end;margin-left:auto}.navbar-dropdown{background-color:#fff;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top:2px solid #dbdbdb;box-shadow:0 8px 8px hsla(0,0%,4%,.1);display:none;font-size:.875rem;left:0;min-width:100%;position:absolute;top:100%;z-index:20}.navbar-dropdown .navbar-item{padding:.375rem 1rem;white-space:nowrap}.navbar-dropdown a.navbar-item{padding-right:3rem}.navbar-dropdown a.navbar-item:hover{background-color:#f5f5f5;color:#0a0a0a}.navbar-dropdown a.navbar-item.is-active{background-color:#f5f5f5;color:#7957d5}.navbar-dropdown.is-boxed,.navbar.is-spaced .navbar-dropdown{border-radius:6px;border-top:none;box-shadow:0 8px 8px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);display:block;opacity:0;pointer-events:none;top:calc(100% + -4px);transform:translateY(-5px);transition-duration:86ms;transition-property:opacity,transform}.navbar-dropdown.is-right{left:auto;right:0}.navbar-divider{display:block}.container>.navbar .navbar-brand,.navbar>.container .navbar-brand{margin-left:-.75rem}.container>.navbar .navbar-menu,.navbar>.container .navbar-menu{margin-right:-.75rem}.navbar.is-fixed-bottom-desktop,.navbar.is-fixed-top-desktop{left:0;position:fixed;right:0;z-index:30}.navbar.is-fixed-bottom-desktop{bottom:0}.navbar.is-fixed-bottom-desktop.has-shadow{box-shadow:0 -2px 3px hsla(0,0%,4%,.1)}.navbar.is-fixed-top-desktop{top:0}body.has-navbar-fixed-top-desktop,html.has-navbar-fixed-top-desktop{padding-top:3.25rem}body.has-navbar-fixed-bottom-desktop,html.has-navbar-fixed-bottom-desktop{padding-bottom:3.25rem}body.has-spaced-navbar-fixed-top,html.has-spaced-navbar-fixed-top{padding-top:5.25rem}body.has-spaced-navbar-fixed-bottom,html.has-spaced-navbar-fixed-bottom{padding-bottom:5.25rem}.navbar-link.is-active,a.navbar-item.is-active{color:#0a0a0a}.navbar-link.is-active:not(:hover),a.navbar-item.is-active:not(:hover){background-color:transparent}.navbar-item.has-dropdown.is-active .navbar-link,.navbar-item.has-dropdown:hover .navbar-link{background-color:#fafafa}}.hero.is-fullheight-with-navbar{min-height:calc(100vh - 3.25rem)}.pagination{font-size:1rem;margin:-.25rem}.pagination.is-small{font-size:.75rem}.pagination.is-medium{font-size:1.25rem}.pagination.is-large{font-size:1.5rem}.pagination.is-rounded .pagination-next,.pagination.is-rounded .pagination-previous{padding-left:1em;padding-right:1em;border-radius:290486px}.pagination.is-rounded .pagination-link{border-radius:290486px}.pagination,.pagination-list{align-items:center;display:flex;justify-content:center;text-align:center}.pagination-ellipsis,.pagination-link,.pagination-next,.pagination-previous{font-size:1em;padding-left:.5em;padding-right:.5em;justify-content:center;margin:.25rem;text-align:center}.pagination-link,.pagination-next,.pagination-previous{border-color:#dbdbdb;color:#363636;min-width:2.25em}.pagination-link:hover,.pagination-next:hover,.pagination-previous:hover{border-color:#b5b5b5;color:#363636}.pagination-link:focus,.pagination-next:focus,.pagination-previous:focus{border-color:#7957d5}.pagination-link:active,.pagination-next:active,.pagination-previous:active{box-shadow:inset 0 1px 2px hsla(0,0%,4%,.2)}.pagination-link[disabled],.pagination-next[disabled],.pagination-previous[disabled]{background-color:#dbdbdb;border-color:#dbdbdb;box-shadow:none;color:#7a7a7a;opacity:.5}.pagination-next,.pagination-previous{padding-left:.75em;padding-right:.75em;white-space:nowrap}.pagination-link.is-current{background-color:#7957d5;border-color:#7957d5;color:#fff}.pagination-ellipsis{color:#b5b5b5;pointer-events:none}.pagination-list{flex-wrap:wrap}@media screen and (max-width:768px){.pagination{flex-wrap:wrap}.pagination-list li,.pagination-next,.pagination-previous{flex-grow:1;flex-shrink:1}}@media print,screen and (min-width:769px){.pagination-list{flex-grow:1;flex-shrink:1;justify-content:flex-start;order:1}.pagination-previous{order:2}.pagination-next{order:3}.pagination{justify-content:space-between}.pagination.is-centered .pagination-previous{order:1}.pagination.is-centered .pagination-list{justify-content:center;order:2}.pagination.is-centered .pagination-next{order:3}.pagination.is-right .pagination-previous{order:1}.pagination.is-right .pagination-next{order:2}.pagination.is-right .pagination-list{justify-content:flex-end;order:3}}.panel{font-size:1rem}.panel:not(:last-child){margin-bottom:1.5rem}.panel-block,.panel-heading,.panel-tabs{border-bottom:1px solid #dbdbdb;border-left:1px solid #dbdbdb;border-right:1px solid #dbdbdb}.panel-block:first-child,.panel-heading:first-child,.panel-tabs:first-child{border-top:1px solid #dbdbdb}.panel-heading{background-color:#f5f5f5;border-radius:4px 4px 0 0;color:#363636;font-size:1.25em;font-weight:300;line-height:1.25;padding:.5em .75em}.panel-tabs{align-items:flex-end;display:flex;font-size:.875em;justify-content:center}.panel-tabs a{border-bottom:1px solid #dbdbdb;margin-bottom:-1px;padding:.5em}.panel-tabs a.is-active{border-bottom-color:#4a4a4a;color:#363636}.panel-list a{color:#4a4a4a}.panel-list a:hover{color:#7957d5}.panel-block{align-items:center;color:#363636;display:flex;justify-content:flex-start;padding:.5em .75em}.panel-block input[type=checkbox]{margin-right:.75em}.panel-block>.control{flex-grow:1;flex-shrink:1;width:100%}.panel-block.is-wrapped{flex-wrap:wrap}.panel-block.is-active{border-left-color:#7957d5;color:#363636}.panel-block.is-active .panel-icon{color:#7957d5}a.panel-block,label.panel-block{cursor:pointer}a.panel-block:hover,label.panel-block:hover{background-color:#f5f5f5}.panel-icon{display:inline-block;font-size:14px;height:1em;line-height:1em;text-align:center;vertical-align:top;width:1em;color:#7a7a7a;margin-right:.75em}.panel-icon .fa{font-size:inherit;line-height:inherit}.tabs{-webkit-overflow-scrolling:touch;align-items:stretch;display:flex;font-size:1rem;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs a{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;color:#4a4a4a;display:flex;justify-content:center;margin-bottom:-1px;padding:.5em 1em;vertical-align:top}.tabs a:hover{border-bottom-color:#363636;color:#363636}.tabs li{display:block}.tabs li.is-active a{border-bottom-color:#7957d5;color:#7957d5}.tabs ul{align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;display:flex;flex-grow:1;flex-shrink:0;justify-content:flex-start}.tabs ul.is-center,.tabs ul.is-left{padding-right:.75em}.tabs ul.is-center{flex:none;justify-content:center;padding-left:.75em}.tabs ul.is-right{justify-content:flex-end;padding-left:.75em}.tabs .icon:first-child{margin-right:.5em}.tabs .icon:last-child{margin-left:.5em}.tabs.is-centered ul{justify-content:center}.tabs.is-right ul{justify-content:flex-end}.tabs.is-boxed a{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed a:hover{background-color:#f5f5f5;border-bottom-color:#dbdbdb}.tabs.is-boxed li.is-active a{background-color:#fff;border-color:#dbdbdb;border-bottom-color:transparent!important}.tabs.is-fullwidth li{flex-grow:1;flex-shrink:0}.tabs.is-toggle a{border:1px solid #dbdbdb;margin-bottom:0;position:relative}.tabs.is-toggle a:hover{background-color:#f5f5f5;border-color:#b5b5b5;z-index:2}.tabs.is-toggle li+li{margin-left:-1px}.tabs.is-toggle li:first-child a{border-radius:4px 0 0 4px}.tabs.is-toggle li:last-child a{border-radius:0 4px 4px 0}.tabs.is-toggle li.is-active a{background-color:#7957d5;border-color:#7957d5;color:#fff;z-index:1}.tabs.is-toggle ul{border-bottom:none}.tabs.is-toggle.is-toggle-rounded li:first-child a{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded li:last-child a{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small{font-size:.75rem}.tabs.is-medium{font-size:1.25rem}.tabs.is-large{font-size:1.5rem}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding:.75rem}.columns.is-mobile>.column.is-narrow{flex:none}.columns.is-mobile>.column.is-full{flex:none;width:100%}.columns.is-mobile>.column.is-three-quarters{flex:none;width:75%}.columns.is-mobile>.column.is-two-thirds{flex:none;width:66.6666%}.columns.is-mobile>.column.is-half{flex:none;width:50%}.columns.is-mobile>.column.is-one-third{flex:none;width:33.3333%}.columns.is-mobile>.column.is-one-quarter{flex:none;width:25%}.columns.is-mobile>.column.is-one-fifth{flex:none;width:20%}.columns.is-mobile>.column.is-two-fifths{flex:none;width:40%}.columns.is-mobile>.column.is-three-fifths{flex:none;width:60%}.columns.is-mobile>.column.is-four-fifths{flex:none;width:80%}.columns.is-mobile>.column.is-offset-three-quarters{margin-left:75%}.columns.is-mobile>.column.is-offset-two-thirds{margin-left:66.6666%}.columns.is-mobile>.column.is-offset-half{margin-left:50%}.columns.is-mobile>.column.is-offset-one-third{margin-left:33.3333%}.columns.is-mobile>.column.is-offset-one-quarter{margin-left:25%}.columns.is-mobile>.column.is-offset-one-fifth{margin-left:20%}.columns.is-mobile>.column.is-offset-two-fifths{margin-left:40%}.columns.is-mobile>.column.is-offset-three-fifths{margin-left:60%}.columns.is-mobile>.column.is-offset-four-fifths{margin-left:80%}.columns.is-mobile>.column.is-1{flex:none;width:8.33333%}.columns.is-mobile>.column.is-offset-1{margin-left:8.33333%}.columns.is-mobile>.column.is-2{flex:none;width:16.66667%}.columns.is-mobile>.column.is-offset-2{margin-left:16.66667%}.columns.is-mobile>.column.is-3{flex:none;width:25%}.columns.is-mobile>.column.is-offset-3{margin-left:25%}.columns.is-mobile>.column.is-4{flex:none;width:33.33333%}.columns.is-mobile>.column.is-offset-4{margin-left:33.33333%}.columns.is-mobile>.column.is-5{flex:none;width:41.66667%}.columns.is-mobile>.column.is-offset-5{margin-left:41.66667%}.columns.is-mobile>.column.is-6{flex:none;width:50%}.columns.is-mobile>.column.is-offset-6{margin-left:50%}.columns.is-mobile>.column.is-7{flex:none;width:58.33333%}.columns.is-mobile>.column.is-offset-7{margin-left:58.33333%}.columns.is-mobile>.column.is-8{flex:none;width:66.66667%}.columns.is-mobile>.column.is-offset-8{margin-left:66.66667%}.columns.is-mobile>.column.is-9{flex:none;width:75%}.columns.is-mobile>.column.is-offset-9{margin-left:75%}.columns.is-mobile>.column.is-10{flex:none;width:83.33333%}.columns.is-mobile>.column.is-offset-10{margin-left:83.33333%}.columns.is-mobile>.column.is-11{flex:none;width:91.66667%}.columns.is-mobile>.column.is-offset-11{margin-left:91.66667%}.columns.is-mobile>.column.is-12{flex:none;width:100%}.columns.is-mobile>.column.is-offset-12{margin-left:100%}@media screen and (max-width:768px){.column.is-narrow-mobile{flex:none}.column.is-full-mobile{flex:none;width:100%}.column.is-three-quarters-mobile{flex:none;width:75%}.column.is-two-thirds-mobile{flex:none;width:66.6666%}.column.is-half-mobile{flex:none;width:50%}.column.is-one-third-mobile{flex:none;width:33.3333%}.column.is-one-quarter-mobile{flex:none;width:25%}.column.is-one-fifth-mobile{flex:none;width:20%}.column.is-two-fifths-mobile{flex:none;width:40%}.column.is-three-fifths-mobile{flex:none;width:60%}.column.is-four-fifths-mobile{flex:none;width:80%}.column.is-offset-three-quarters-mobile{margin-left:75%}.column.is-offset-two-thirds-mobile{margin-left:66.6666%}.column.is-offset-half-mobile{margin-left:50%}.column.is-offset-one-third-mobile{margin-left:33.3333%}.column.is-offset-one-quarter-mobile{margin-left:25%}.column.is-offset-one-fifth-mobile{margin-left:20%}.column.is-offset-two-fifths-mobile{margin-left:40%}.column.is-offset-three-fifths-mobile{margin-left:60%}.column.is-offset-four-fifths-mobile{margin-left:80%}.column.is-1-mobile{flex:none;width:8.33333%}.column.is-offset-1-mobile{margin-left:8.33333%}.column.is-2-mobile{flex:none;width:16.66667%}.column.is-offset-2-mobile{margin-left:16.66667%}.column.is-3-mobile{flex:none;width:25%}.column.is-offset-3-mobile{margin-left:25%}.column.is-4-mobile{flex:none;width:33.33333%}.column.is-offset-4-mobile{margin-left:33.33333%}.column.is-5-mobile{flex:none;width:41.66667%}.column.is-offset-5-mobile{margin-left:41.66667%}.column.is-6-mobile{flex:none;width:50%}.column.is-offset-6-mobile{margin-left:50%}.column.is-7-mobile{flex:none;width:58.33333%}.column.is-offset-7-mobile{margin-left:58.33333%}.column.is-8-mobile{flex:none;width:66.66667%}.column.is-offset-8-mobile{margin-left:66.66667%}.column.is-9-mobile{flex:none;width:75%}.column.is-offset-9-mobile{margin-left:75%}.column.is-10-mobile{flex:none;width:83.33333%}.column.is-offset-10-mobile{margin-left:83.33333%}.column.is-11-mobile{flex:none;width:91.66667%}.column.is-offset-11-mobile{margin-left:91.66667%}.column.is-12-mobile{flex:none;width:100%}.column.is-offset-12-mobile{margin-left:100%}}@media print,screen and (min-width:769px){.column.is-narrow,.column.is-narrow-tablet{flex:none}.column.is-full,.column.is-full-tablet{flex:none;width:100%}.column.is-three-quarters,.column.is-three-quarters-tablet{flex:none;width:75%}.column.is-two-thirds,.column.is-two-thirds-tablet{flex:none;width:66.6666%}.column.is-half,.column.is-half-tablet{flex:none;width:50%}.column.is-one-third,.column.is-one-third-tablet{flex:none;width:33.3333%}.column.is-one-quarter,.column.is-one-quarter-tablet{flex:none;width:25%}.column.is-one-fifth,.column.is-one-fifth-tablet{flex:none;width:20%}.column.is-two-fifths,.column.is-two-fifths-tablet{flex:none;width:40%}.column.is-three-fifths,.column.is-three-fifths-tablet{flex:none;width:60%}.column.is-four-fifths,.column.is-four-fifths-tablet{flex:none;width:80%}.column.is-offset-three-quarters,.column.is-offset-three-quarters-tablet{margin-left:75%}.column.is-offset-two-thirds,.column.is-offset-two-thirds-tablet{margin-left:66.6666%}.column.is-offset-half,.column.is-offset-half-tablet{margin-left:50%}.column.is-offset-one-third,.column.is-offset-one-third-tablet{margin-left:33.3333%}.column.is-offset-one-quarter,.column.is-offset-one-quarter-tablet{margin-left:25%}.column.is-offset-one-fifth,.column.is-offset-one-fifth-tablet{margin-left:20%}.column.is-offset-two-fifths,.column.is-offset-two-fifths-tablet{margin-left:40%}.column.is-offset-three-fifths,.column.is-offset-three-fifths-tablet{margin-left:60%}.column.is-offset-four-fifths,.column.is-offset-four-fifths-tablet{margin-left:80%}.column.is-1,.column.is-1-tablet{flex:none;width:8.33333%}.column.is-offset-1,.column.is-offset-1-tablet{margin-left:8.33333%}.column.is-2,.column.is-2-tablet{flex:none;width:16.66667%}.column.is-offset-2,.column.is-offset-2-tablet{margin-left:16.66667%}.column.is-3,.column.is-3-tablet{flex:none;width:25%}.column.is-offset-3,.column.is-offset-3-tablet{margin-left:25%}.column.is-4,.column.is-4-tablet{flex:none;width:33.33333%}.column.is-offset-4,.column.is-offset-4-tablet{margin-left:33.33333%}.column.is-5,.column.is-5-tablet{flex:none;width:41.66667%}.column.is-offset-5,.column.is-offset-5-tablet{margin-left:41.66667%}.column.is-6,.column.is-6-tablet{flex:none;width:50%}.column.is-offset-6,.column.is-offset-6-tablet{margin-left:50%}.column.is-7,.column.is-7-tablet{flex:none;width:58.33333%}.column.is-offset-7,.column.is-offset-7-tablet{margin-left:58.33333%}.column.is-8,.column.is-8-tablet{flex:none;width:66.66667%}.column.is-offset-8,.column.is-offset-8-tablet{margin-left:66.66667%}.column.is-9,.column.is-9-tablet{flex:none;width:75%}.column.is-offset-9,.column.is-offset-9-tablet{margin-left:75%}.column.is-10,.column.is-10-tablet{flex:none;width:83.33333%}.column.is-offset-10,.column.is-offset-10-tablet{margin-left:83.33333%}.column.is-11,.column.is-11-tablet{flex:none;width:91.66667%}.column.is-offset-11,.column.is-offset-11-tablet{margin-left:91.66667%}.column.is-12,.column.is-12-tablet{flex:none;width:100%}.column.is-offset-12,.column.is-offset-12-tablet{margin-left:100%}}@media screen and (max-width:1087px){.column.is-narrow-touch{flex:none}.column.is-full-touch{flex:none;width:100%}.column.is-three-quarters-touch{flex:none;width:75%}.column.is-two-thirds-touch{flex:none;width:66.6666%}.column.is-half-touch{flex:none;width:50%}.column.is-one-third-touch{flex:none;width:33.3333%}.column.is-one-quarter-touch{flex:none;width:25%}.column.is-one-fifth-touch{flex:none;width:20%}.column.is-two-fifths-touch{flex:none;width:40%}.column.is-three-fifths-touch{flex:none;width:60%}.column.is-four-fifths-touch{flex:none;width:80%}.column.is-offset-three-quarters-touch{margin-left:75%}.column.is-offset-two-thirds-touch{margin-left:66.6666%}.column.is-offset-half-touch{margin-left:50%}.column.is-offset-one-third-touch{margin-left:33.3333%}.column.is-offset-one-quarter-touch{margin-left:25%}.column.is-offset-one-fifth-touch{margin-left:20%}.column.is-offset-two-fifths-touch{margin-left:40%}.column.is-offset-three-fifths-touch{margin-left:60%}.column.is-offset-four-fifths-touch{margin-left:80%}.column.is-1-touch{flex:none;width:8.33333%}.column.is-offset-1-touch{margin-left:8.33333%}.column.is-2-touch{flex:none;width:16.66667%}.column.is-offset-2-touch{margin-left:16.66667%}.column.is-3-touch{flex:none;width:25%}.column.is-offset-3-touch{margin-left:25%}.column.is-4-touch{flex:none;width:33.33333%}.column.is-offset-4-touch{margin-left:33.33333%}.column.is-5-touch{flex:none;width:41.66667%}.column.is-offset-5-touch{margin-left:41.66667%}.column.is-6-touch{flex:none;width:50%}.column.is-offset-6-touch{margin-left:50%}.column.is-7-touch{flex:none;width:58.33333%}.column.is-offset-7-touch{margin-left:58.33333%}.column.is-8-touch{flex:none;width:66.66667%}.column.is-offset-8-touch{margin-left:66.66667%}.column.is-9-touch{flex:none;width:75%}.column.is-offset-9-touch{margin-left:75%}.column.is-10-touch{flex:none;width:83.33333%}.column.is-offset-10-touch{margin-left:83.33333%}.column.is-11-touch{flex:none;width:91.66667%}.column.is-offset-11-touch{margin-left:91.66667%}.column.is-12-touch{flex:none;width:100%}.column.is-offset-12-touch{margin-left:100%}}@media screen and (min-width:1088px){.column.is-narrow-desktop{flex:none}.column.is-full-desktop{flex:none;width:100%}.column.is-three-quarters-desktop{flex:none;width:75%}.column.is-two-thirds-desktop{flex:none;width:66.6666%}.column.is-half-desktop{flex:none;width:50%}.column.is-one-third-desktop{flex:none;width:33.3333%}.column.is-one-quarter-desktop{flex:none;width:25%}.column.is-one-fifth-desktop{flex:none;width:20%}.column.is-two-fifths-desktop{flex:none;width:40%}.column.is-three-fifths-desktop{flex:none;width:60%}.column.is-four-fifths-desktop{flex:none;width:80%}.column.is-offset-three-quarters-desktop{margin-left:75%}.column.is-offset-two-thirds-desktop{margin-left:66.6666%}.column.is-offset-half-desktop{margin-left:50%}.column.is-offset-one-third-desktop{margin-left:33.3333%}.column.is-offset-one-quarter-desktop{margin-left:25%}.column.is-offset-one-fifth-desktop{margin-left:20%}.column.is-offset-two-fifths-desktop{margin-left:40%}.column.is-offset-three-fifths-desktop{margin-left:60%}.column.is-offset-four-fifths-desktop{margin-left:80%}.column.is-1-desktop{flex:none;width:8.33333%}.column.is-offset-1-desktop{margin-left:8.33333%}.column.is-2-desktop{flex:none;width:16.66667%}.column.is-offset-2-desktop{margin-left:16.66667%}.column.is-3-desktop{flex:none;width:25%}.column.is-offset-3-desktop{margin-left:25%}.column.is-4-desktop{flex:none;width:33.33333%}.column.is-offset-4-desktop{margin-left:33.33333%}.column.is-5-desktop{flex:none;width:41.66667%}.column.is-offset-5-desktop{margin-left:41.66667%}.column.is-6-desktop{flex:none;width:50%}.column.is-offset-6-desktop{margin-left:50%}.column.is-7-desktop{flex:none;width:58.33333%}.column.is-offset-7-desktop{margin-left:58.33333%}.column.is-8-desktop{flex:none;width:66.66667%}.column.is-offset-8-desktop{margin-left:66.66667%}.column.is-9-desktop{flex:none;width:75%}.column.is-offset-9-desktop{margin-left:75%}.column.is-10-desktop{flex:none;width:83.33333%}.column.is-offset-10-desktop{margin-left:83.33333%}.column.is-11-desktop{flex:none;width:91.66667%}.column.is-offset-11-desktop{margin-left:91.66667%}.column.is-12-desktop{flex:none;width:100%}.column.is-offset-12-desktop{margin-left:100%}}@media screen and (min-width:1280px){.column.is-narrow-widescreen{flex:none}.column.is-full-widescreen{flex:none;width:100%}.column.is-three-quarters-widescreen{flex:none;width:75%}.column.is-two-thirds-widescreen{flex:none;width:66.6666%}.column.is-half-widescreen{flex:none;width:50%}.column.is-one-third-widescreen{flex:none;width:33.3333%}.column.is-one-quarter-widescreen{flex:none;width:25%}.column.is-one-fifth-widescreen{flex:none;width:20%}.column.is-two-fifths-widescreen{flex:none;width:40%}.column.is-three-fifths-widescreen{flex:none;width:60%}.column.is-four-fifths-widescreen{flex:none;width:80%}.column.is-offset-three-quarters-widescreen{margin-left:75%}.column.is-offset-two-thirds-widescreen{margin-left:66.6666%}.column.is-offset-half-widescreen{margin-left:50%}.column.is-offset-one-third-widescreen{margin-left:33.3333%}.column.is-offset-one-quarter-widescreen{margin-left:25%}.column.is-offset-one-fifth-widescreen{margin-left:20%}.column.is-offset-two-fifths-widescreen{margin-left:40%}.column.is-offset-three-fifths-widescreen{margin-left:60%}.column.is-offset-four-fifths-widescreen{margin-left:80%}.column.is-1-widescreen{flex:none;width:8.33333%}.column.is-offset-1-widescreen{margin-left:8.33333%}.column.is-2-widescreen{flex:none;width:16.66667%}.column.is-offset-2-widescreen{margin-left:16.66667%}.column.is-3-widescreen{flex:none;width:25%}.column.is-offset-3-widescreen{margin-left:25%}.column.is-4-widescreen{flex:none;width:33.33333%}.column.is-offset-4-widescreen{margin-left:33.33333%}.column.is-5-widescreen{flex:none;width:41.66667%}.column.is-offset-5-widescreen{margin-left:41.66667%}.column.is-6-widescreen{flex:none;width:50%}.column.is-offset-6-widescreen{margin-left:50%}.column.is-7-widescreen{flex:none;width:58.33333%}.column.is-offset-7-widescreen{margin-left:58.33333%}.column.is-8-widescreen{flex:none;width:66.66667%}.column.is-offset-8-widescreen{margin-left:66.66667%}.column.is-9-widescreen{flex:none;width:75%}.column.is-offset-9-widescreen{margin-left:75%}.column.is-10-widescreen{flex:none;width:83.33333%}.column.is-offset-10-widescreen{margin-left:83.33333%}.column.is-11-widescreen{flex:none;width:91.66667%}.column.is-offset-11-widescreen{margin-left:91.66667%}.column.is-12-widescreen{flex:none;width:100%}.column.is-offset-12-widescreen{margin-left:100%}}@media screen and (min-width:1472px){.column.is-narrow-fullhd{flex:none}.column.is-full-fullhd{flex:none;width:100%}.column.is-three-quarters-fullhd{flex:none;width:75%}.column.is-two-thirds-fullhd{flex:none;width:66.6666%}.column.is-half-fullhd{flex:none;width:50%}.column.is-one-third-fullhd{flex:none;width:33.3333%}.column.is-one-quarter-fullhd{flex:none;width:25%}.column.is-one-fifth-fullhd{flex:none;width:20%}.column.is-two-fifths-fullhd{flex:none;width:40%}.column.is-three-fifths-fullhd{flex:none;width:60%}.column.is-four-fifths-fullhd{flex:none;width:80%}.column.is-offset-three-quarters-fullhd{margin-left:75%}.column.is-offset-two-thirds-fullhd{margin-left:66.6666%}.column.is-offset-half-fullhd{margin-left:50%}.column.is-offset-one-third-fullhd{margin-left:33.3333%}.column.is-offset-one-quarter-fullhd{margin-left:25%}.column.is-offset-one-fifth-fullhd{margin-left:20%}.column.is-offset-two-fifths-fullhd{margin-left:40%}.column.is-offset-three-fifths-fullhd{margin-left:60%}.column.is-offset-four-fifths-fullhd{margin-left:80%}.column.is-1-fullhd{flex:none;width:8.33333%}.column.is-offset-1-fullhd{margin-left:8.33333%}.column.is-2-fullhd{flex:none;width:16.66667%}.column.is-offset-2-fullhd{margin-left:16.66667%}.column.is-3-fullhd{flex:none;width:25%}.column.is-offset-3-fullhd{margin-left:25%}.column.is-4-fullhd{flex:none;width:33.33333%}.column.is-offset-4-fullhd{margin-left:33.33333%}.column.is-5-fullhd{flex:none;width:41.66667%}.column.is-offset-5-fullhd{margin-left:41.66667%}.column.is-6-fullhd{flex:none;width:50%}.column.is-offset-6-fullhd{margin-left:50%}.column.is-7-fullhd{flex:none;width:58.33333%}.column.is-offset-7-fullhd{margin-left:58.33333%}.column.is-8-fullhd{flex:none;width:66.66667%}.column.is-offset-8-fullhd{margin-left:66.66667%}.column.is-9-fullhd{flex:none;width:75%}.column.is-offset-9-fullhd{margin-left:75%}.column.is-10-fullhd{flex:none;width:83.33333%}.column.is-offset-10-fullhd{margin-left:83.33333%}.column.is-11-fullhd{flex:none;width:91.66667%}.column.is-offset-11-fullhd{margin-left:91.66667%}.column.is-12-fullhd{flex:none;width:100%}.column.is-offset-12-fullhd{margin-left:100%}}.columns{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns:last-child{margin-bottom:-.75rem}.columns:not(:last-child){margin-bottom:.75rem}.columns.is-centered{justify-content:center}.columns.is-gapless{margin-left:0;margin-right:0;margin-top:0}.columns.is-gapless>.column{margin:0;padding:0!important}.columns.is-gapless:not(:last-child){margin-bottom:1.5rem}.columns.is-gapless:last-child{margin-bottom:0}.columns.is-mobile{display:flex}.columns.is-multiline{flex-wrap:wrap}.columns.is-vcentered{align-items:center}@media print,screen and (min-width:769px){.columns:not(.is-desktop){display:flex}}@media screen and (min-width:1088px){.columns.is-desktop{display:flex}}.columns.is-variable{--columnGap:0.75rem;margin-left:calc(-1 * var(--columnGap));margin-right:calc(-1 * var(--columnGap))}.columns.is-variable .column{padding-left:var(--columnGap);padding-right:var(--columnGap)}.columns.is-variable.is-0{--columnGap:0rem}@media screen and (max-width:768px){.columns.is-variable.is-0-mobile{--columnGap:0rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-0-tablet{--columnGap:0rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-0-tablet-only{--columnGap:0rem}}@media screen and (max-width:1087px){.columns.is-variable.is-0-touch{--columnGap:0rem}}@media screen and (min-width:1088px){.columns.is-variable.is-0-desktop{--columnGap:0rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-0-desktop-only{--columnGap:0rem}}@media screen and (min-width:1280px){.columns.is-variable.is-0-widescreen{--columnGap:0rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-0-widescreen-only{--columnGap:0rem}}@media screen and (min-width:1472px){.columns.is-variable.is-0-fullhd{--columnGap:0rem}}.columns.is-variable.is-1{--columnGap:0.25rem}@media screen and (max-width:768px){.columns.is-variable.is-1-mobile{--columnGap:0.25rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-1-tablet{--columnGap:0.25rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-1-tablet-only{--columnGap:0.25rem}}@media screen and (max-width:1087px){.columns.is-variable.is-1-touch{--columnGap:0.25rem}}@media screen and (min-width:1088px){.columns.is-variable.is-1-desktop{--columnGap:0.25rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-1-desktop-only{--columnGap:0.25rem}}@media screen and (min-width:1280px){.columns.is-variable.is-1-widescreen{--columnGap:0.25rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-1-widescreen-only{--columnGap:0.25rem}}@media screen and (min-width:1472px){.columns.is-variable.is-1-fullhd{--columnGap:0.25rem}}.columns.is-variable.is-2{--columnGap:0.5rem}@media screen and (max-width:768px){.columns.is-variable.is-2-mobile{--columnGap:0.5rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-2-tablet{--columnGap:0.5rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-2-tablet-only{--columnGap:0.5rem}}@media screen and (max-width:1087px){.columns.is-variable.is-2-touch{--columnGap:0.5rem}}@media screen and (min-width:1088px){.columns.is-variable.is-2-desktop{--columnGap:0.5rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-2-desktop-only{--columnGap:0.5rem}}@media screen and (min-width:1280px){.columns.is-variable.is-2-widescreen{--columnGap:0.5rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-2-widescreen-only{--columnGap:0.5rem}}@media screen and (min-width:1472px){.columns.is-variable.is-2-fullhd{--columnGap:0.5rem}}.columns.is-variable.is-3{--columnGap:0.75rem}@media screen and (max-width:768px){.columns.is-variable.is-3-mobile{--columnGap:0.75rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-3-tablet{--columnGap:0.75rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-3-tablet-only{--columnGap:0.75rem}}@media screen and (max-width:1087px){.columns.is-variable.is-3-touch{--columnGap:0.75rem}}@media screen and (min-width:1088px){.columns.is-variable.is-3-desktop{--columnGap:0.75rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-3-desktop-only{--columnGap:0.75rem}}@media screen and (min-width:1280px){.columns.is-variable.is-3-widescreen{--columnGap:0.75rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-3-widescreen-only{--columnGap:0.75rem}}@media screen and (min-width:1472px){.columns.is-variable.is-3-fullhd{--columnGap:0.75rem}}.columns.is-variable.is-4{--columnGap:1rem}@media screen and (max-width:768px){.columns.is-variable.is-4-mobile{--columnGap:1rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-4-tablet{--columnGap:1rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-4-tablet-only{--columnGap:1rem}}@media screen and (max-width:1087px){.columns.is-variable.is-4-touch{--columnGap:1rem}}@media screen and (min-width:1088px){.columns.is-variable.is-4-desktop{--columnGap:1rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-4-desktop-only{--columnGap:1rem}}@media screen and (min-width:1280px){.columns.is-variable.is-4-widescreen{--columnGap:1rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-4-widescreen-only{--columnGap:1rem}}@media screen and (min-width:1472px){.columns.is-variable.is-4-fullhd{--columnGap:1rem}}.columns.is-variable.is-5{--columnGap:1.25rem}@media screen and (max-width:768px){.columns.is-variable.is-5-mobile{--columnGap:1.25rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-5-tablet{--columnGap:1.25rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-5-tablet-only{--columnGap:1.25rem}}@media screen and (max-width:1087px){.columns.is-variable.is-5-touch{--columnGap:1.25rem}}@media screen and (min-width:1088px){.columns.is-variable.is-5-desktop{--columnGap:1.25rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-5-desktop-only{--columnGap:1.25rem}}@media screen and (min-width:1280px){.columns.is-variable.is-5-widescreen{--columnGap:1.25rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-5-widescreen-only{--columnGap:1.25rem}}@media screen and (min-width:1472px){.columns.is-variable.is-5-fullhd{--columnGap:1.25rem}}.columns.is-variable.is-6{--columnGap:1.5rem}@media screen and (max-width:768px){.columns.is-variable.is-6-mobile{--columnGap:1.5rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-6-tablet{--columnGap:1.5rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-6-tablet-only{--columnGap:1.5rem}}@media screen and (max-width:1087px){.columns.is-variable.is-6-touch{--columnGap:1.5rem}}@media screen and (min-width:1088px){.columns.is-variable.is-6-desktop{--columnGap:1.5rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-6-desktop-only{--columnGap:1.5rem}}@media screen and (min-width:1280px){.columns.is-variable.is-6-widescreen{--columnGap:1.5rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-6-widescreen-only{--columnGap:1.5rem}}@media screen and (min-width:1472px){.columns.is-variable.is-6-fullhd{--columnGap:1.5rem}}.columns.is-variable.is-7{--columnGap:1.75rem}@media screen and (max-width:768px){.columns.is-variable.is-7-mobile{--columnGap:1.75rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-7-tablet{--columnGap:1.75rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-7-tablet-only{--columnGap:1.75rem}}@media screen and (max-width:1087px){.columns.is-variable.is-7-touch{--columnGap:1.75rem}}@media screen and (min-width:1088px){.columns.is-variable.is-7-desktop{--columnGap:1.75rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-7-desktop-only{--columnGap:1.75rem}}@media screen and (min-width:1280px){.columns.is-variable.is-7-widescreen{--columnGap:1.75rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-7-widescreen-only{--columnGap:1.75rem}}@media screen and (min-width:1472px){.columns.is-variable.is-7-fullhd{--columnGap:1.75rem}}.columns.is-variable.is-8{--columnGap:2rem}@media screen and (max-width:768px){.columns.is-variable.is-8-mobile{--columnGap:2rem}}@media print,screen and (min-width:769px){.columns.is-variable.is-8-tablet{--columnGap:2rem}}@media screen and (min-width:769px) and (max-width:1087px){.columns.is-variable.is-8-tablet-only{--columnGap:2rem}}@media screen and (max-width:1087px){.columns.is-variable.is-8-touch{--columnGap:2rem}}@media screen and (min-width:1088px){.columns.is-variable.is-8-desktop{--columnGap:2rem}}@media screen and (min-width:1088px) and (max-width:1279px){.columns.is-variable.is-8-desktop-only{--columnGap:2rem}}@media screen and (min-width:1280px){.columns.is-variable.is-8-widescreen{--columnGap:2rem}}@media screen and (min-width:1280px) and (max-width:1471px){.columns.is-variable.is-8-widescreen-only{--columnGap:2rem}}@media screen and (min-width:1472px){.columns.is-variable.is-8-fullhd{--columnGap:2rem}}.tile{align-items:stretch;display:block;flex-basis:0;flex-grow:1;flex-shrink:1;min-height:min-content}.tile.is-ancestor{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor:last-child{margin-bottom:-.75rem}.tile.is-ancestor:not(:last-child){margin-bottom:.75rem}.tile.is-child{margin:0!important}.tile.is-parent{padding:.75rem}.tile.is-vertical{flex-direction:column}.tile.is-vertical>.tile.is-child:not(:last-child){margin-bottom:1.5rem!important}@media print,screen and (min-width:769px){.tile:not(.is-child){display:flex}.tile.is-1{flex:none;width:8.33333%}.tile.is-2{flex:none;width:16.66667%}.tile.is-3{flex:none;width:25%}.tile.is-4{flex:none;width:33.33333%}.tile.is-5{flex:none;width:41.66667%}.tile.is-6{flex:none;width:50%}.tile.is-7{flex:none;width:58.33333%}.tile.is-8{flex:none;width:66.66667%}.tile.is-9{flex:none;width:75%}.tile.is-10{flex:none;width:83.33333%}.tile.is-11{flex:none;width:91.66667%}.tile.is-12{flex:none;width:100%}}.hero{align-items:stretch;display:flex;flex-direction:column;justify-content:space-between}.hero .navbar{background:none}.hero .tabs ul{border-bottom:none}.hero.is-white{background-color:#fff;color:#0a0a0a}.hero.is-white a:not(.button):not(.dropdown-item):not(.tag),.hero.is-white strong{color:inherit}.hero.is-white .title{color:#0a0a0a}.hero.is-white .subtitle{color:hsla(0,0%,4%,.9)}.hero.is-white .subtitle a:not(.button),.hero.is-white .subtitle strong{color:#0a0a0a}@media screen and (max-width:1087px){.hero.is-white .navbar-menu{background-color:#fff}}.hero.is-white .navbar-item,.hero.is-white .navbar-link{color:hsla(0,0%,4%,.7)}.hero.is-white .navbar-link.is-active,.hero.is-white .navbar-link:hover,.hero.is-white a.navbar-item.is-active,.hero.is-white a.navbar-item:hover{background-color:#f2f2f2;color:#0a0a0a}.hero.is-white .tabs a{color:#0a0a0a;opacity:.9}.hero.is-white .tabs a:hover,.hero.is-white .tabs li.is-active a{opacity:1}.hero.is-white .tabs.is-boxed a,.hero.is-white .tabs.is-toggle a{color:#0a0a0a}.hero.is-white .tabs.is-boxed a:hover,.hero.is-white .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-white .tabs.is-boxed li.is-active a,.hero.is-white .tabs.is-boxed li.is-active a:hover,.hero.is-white .tabs.is-toggle li.is-active a,.hero.is-white .tabs.is-toggle li.is-active a:hover{background-color:#0a0a0a;border-color:#0a0a0a;color:#fff}.hero.is-white.is-bold{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}@media screen and (max-width:768px){.hero.is-white.is-bold .navbar-menu{background-image:linear-gradient(141deg,#e6e6e6,#fff 71%,#fff)}}.hero.is-black{background-color:#0a0a0a;color:#fff}.hero.is-black a:not(.button):not(.dropdown-item):not(.tag),.hero.is-black strong{color:inherit}.hero.is-black .title{color:#fff}.hero.is-black .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-black .subtitle a:not(.button),.hero.is-black .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-black .navbar-menu{background-color:#0a0a0a}}.hero.is-black .navbar-item,.hero.is-black .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-black .navbar-link.is-active,.hero.is-black .navbar-link:hover,.hero.is-black a.navbar-item.is-active,.hero.is-black a.navbar-item:hover{background-color:#000;color:#fff}.hero.is-black .tabs a{color:#fff;opacity:.9}.hero.is-black .tabs a:hover,.hero.is-black .tabs li.is-active a{opacity:1}.hero.is-black .tabs.is-boxed a,.hero.is-black .tabs.is-toggle a{color:#fff}.hero.is-black .tabs.is-boxed a:hover,.hero.is-black .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-black .tabs.is-boxed li.is-active a,.hero.is-black .tabs.is-boxed li.is-active a:hover,.hero.is-black .tabs.is-toggle li.is-active a,.hero.is-black .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#0a0a0a}.hero.is-black.is-bold{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}@media screen and (max-width:768px){.hero.is-black.is-bold .navbar-menu{background-image:linear-gradient(141deg,#000,#0a0a0a 71%,#181616)}}.hero.is-light{background-color:#f5f5f5;color:#363636}.hero.is-light a:not(.button):not(.dropdown-item):not(.tag),.hero.is-light strong{color:inherit}.hero.is-light .title{color:#363636}.hero.is-light .subtitle{color:rgba(54,54,54,.9)}.hero.is-light .subtitle a:not(.button),.hero.is-light .subtitle strong{color:#363636}@media screen and (max-width:1087px){.hero.is-light .navbar-menu{background-color:#f5f5f5}}.hero.is-light .navbar-item,.hero.is-light .navbar-link{color:rgba(54,54,54,.7)}.hero.is-light .navbar-link.is-active,.hero.is-light .navbar-link:hover,.hero.is-light a.navbar-item.is-active,.hero.is-light a.navbar-item:hover{background-color:#e8e8e8;color:#363636}.hero.is-light .tabs a{color:#363636;opacity:.9}.hero.is-light .tabs a:hover,.hero.is-light .tabs li.is-active a{opacity:1}.hero.is-light .tabs.is-boxed a,.hero.is-light .tabs.is-toggle a{color:#363636}.hero.is-light .tabs.is-boxed a:hover,.hero.is-light .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-light .tabs.is-boxed li.is-active a,.hero.is-light .tabs.is-boxed li.is-active a:hover,.hero.is-light .tabs.is-toggle li.is-active a,.hero.is-light .tabs.is-toggle li.is-active a:hover{background-color:#363636;border-color:#363636;color:#f5f5f5}.hero.is-light.is-bold{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}@media screen and (max-width:768px){.hero.is-light.is-bold .navbar-menu{background-image:linear-gradient(141deg,#dfd8d9,#f5f5f5 71%,#fff)}}.hero.is-dark{background-color:#363636;color:#f5f5f5}.hero.is-dark a:not(.button):not(.dropdown-item):not(.tag),.hero.is-dark strong{color:inherit}.hero.is-dark .title{color:#f5f5f5}.hero.is-dark .subtitle{color:hsla(0,0%,96%,.9)}.hero.is-dark .subtitle a:not(.button),.hero.is-dark .subtitle strong{color:#f5f5f5}@media screen and (max-width:1087px){.hero.is-dark .navbar-menu{background-color:#363636}}.hero.is-dark .navbar-item,.hero.is-dark .navbar-link{color:hsla(0,0%,96%,.7)}.hero.is-dark .navbar-link.is-active,.hero.is-dark .navbar-link:hover,.hero.is-dark a.navbar-item.is-active,.hero.is-dark a.navbar-item:hover{background-color:#292929;color:#f5f5f5}.hero.is-dark .tabs a{color:#f5f5f5;opacity:.9}.hero.is-dark .tabs a:hover,.hero.is-dark .tabs li.is-active a{opacity:1}.hero.is-dark .tabs.is-boxed a,.hero.is-dark .tabs.is-toggle a{color:#f5f5f5}.hero.is-dark .tabs.is-boxed a:hover,.hero.is-dark .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-dark .tabs.is-boxed li.is-active a,.hero.is-dark .tabs.is-boxed li.is-active a:hover,.hero.is-dark .tabs.is-toggle li.is-active a,.hero.is-dark .tabs.is-toggle li.is-active a:hover{background-color:#f5f5f5;border-color:#f5f5f5;color:#363636}.hero.is-dark.is-bold{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}@media screen and (max-width:768px){.hero.is-dark.is-bold .navbar-menu{background-image:linear-gradient(141deg,#1f191a,#363636 71%,#46403f)}}.hero.is-primary{background-color:#7957d5;color:#fff}.hero.is-primary a:not(.button):not(.dropdown-item):not(.tag),.hero.is-primary strong{color:inherit}.hero.is-primary .title{color:#fff}.hero.is-primary .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-primary .subtitle a:not(.button),.hero.is-primary .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-primary .navbar-menu{background-color:#7957d5}}.hero.is-primary .navbar-item,.hero.is-primary .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-primary .navbar-link.is-active,.hero.is-primary .navbar-link:hover,.hero.is-primary a.navbar-item.is-active,.hero.is-primary a.navbar-item:hover{background-color:#6943d0;color:#fff}.hero.is-primary .tabs a{color:#fff;opacity:.9}.hero.is-primary .tabs a:hover,.hero.is-primary .tabs li.is-active a{opacity:1}.hero.is-primary .tabs.is-boxed a,.hero.is-primary .tabs.is-toggle a{color:#fff}.hero.is-primary .tabs.is-boxed a:hover,.hero.is-primary .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-primary .tabs.is-boxed li.is-active a,.hero.is-primary .tabs.is-boxed li.is-active a:hover,.hero.is-primary .tabs.is-toggle li.is-active a,.hero.is-primary .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#7957d5}.hero.is-primary.is-bold{background-image:linear-gradient(141deg,#3725d4,#7957d5 71%,#9b67df)}@media screen and (max-width:768px){.hero.is-primary.is-bold .navbar-menu{background-image:linear-gradient(141deg,#3725d4,#7957d5 71%,#9b67df)}}.hero.is-link{background-color:#7957d5;color:#fff}.hero.is-link a:not(.button):not(.dropdown-item):not(.tag),.hero.is-link strong{color:inherit}.hero.is-link .title{color:#fff}.hero.is-link .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-link .subtitle a:not(.button),.hero.is-link .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-link .navbar-menu{background-color:#7957d5}}.hero.is-link .navbar-item,.hero.is-link .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-link .navbar-link.is-active,.hero.is-link .navbar-link:hover,.hero.is-link a.navbar-item.is-active,.hero.is-link a.navbar-item:hover{background-color:#6943d0;color:#fff}.hero.is-link .tabs a{color:#fff;opacity:.9}.hero.is-link .tabs a:hover,.hero.is-link .tabs li.is-active a{opacity:1}.hero.is-link .tabs.is-boxed a,.hero.is-link .tabs.is-toggle a{color:#fff}.hero.is-link .tabs.is-boxed a:hover,.hero.is-link .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-link .tabs.is-boxed li.is-active a,.hero.is-link .tabs.is-boxed li.is-active a:hover,.hero.is-link .tabs.is-toggle li.is-active a,.hero.is-link .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#7957d5}.hero.is-link.is-bold{background-image:linear-gradient(141deg,#3725d4,#7957d5 71%,#9b67df)}@media screen and (max-width:768px){.hero.is-link.is-bold .navbar-menu{background-image:linear-gradient(141deg,#3725d4,#7957d5 71%,#9b67df)}}.hero.is-info{background-color:#167df0;color:#fff}.hero.is-info a:not(.button):not(.dropdown-item):not(.tag),.hero.is-info strong{color:inherit}.hero.is-info .title{color:#fff}.hero.is-info .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-info .subtitle a:not(.button),.hero.is-info .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-info .navbar-menu{background-color:#167df0}}.hero.is-info .navbar-item,.hero.is-info .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-info .navbar-link.is-active,.hero.is-info .navbar-link:hover,.hero.is-info a.navbar-item.is-active,.hero.is-info a.navbar-item:hover{background-color:#0e71de;color:#fff}.hero.is-info .tabs a{color:#fff;opacity:.9}.hero.is-info .tabs a:hover,.hero.is-info .tabs li.is-active a{opacity:1}.hero.is-info .tabs.is-boxed a,.hero.is-info .tabs.is-toggle a{color:#fff}.hero.is-info .tabs.is-boxed a:hover,.hero.is-info .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-info .tabs.is-boxed li.is-active a,.hero.is-info .tabs.is-boxed li.is-active a:hover,.hero.is-info .tabs.is-toggle li.is-active a,.hero.is-info .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#167df0}.hero.is-info.is-bold{background-image:linear-gradient(141deg,#0286d1,#167df0 71%,#2868f7)}@media screen and (max-width:768px){.hero.is-info.is-bold .navbar-menu{background-image:linear-gradient(141deg,#0286d1,#167df0 71%,#2868f7)}}.hero.is-success{background-color:#23d160;color:#fff}.hero.is-success a:not(.button):not(.dropdown-item):not(.tag),.hero.is-success strong{color:inherit}.hero.is-success .title{color:#fff}.hero.is-success .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-success .subtitle a:not(.button),.hero.is-success .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-success .navbar-menu{background-color:#23d160}}.hero.is-success .navbar-item,.hero.is-success .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-success .navbar-link.is-active,.hero.is-success .navbar-link:hover,.hero.is-success a.navbar-item.is-active,.hero.is-success a.navbar-item:hover{background-color:#20bc56;color:#fff}.hero.is-success .tabs a{color:#fff;opacity:.9}.hero.is-success .tabs a:hover,.hero.is-success .tabs li.is-active a{opacity:1}.hero.is-success .tabs.is-boxed a,.hero.is-success .tabs.is-toggle a{color:#fff}.hero.is-success .tabs.is-boxed a:hover,.hero.is-success .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-success .tabs.is-boxed li.is-active a,.hero.is-success .tabs.is-boxed li.is-active a:hover,.hero.is-success .tabs.is-toggle li.is-active a,.hero.is-success .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#23d160}.hero.is-success.is-bold{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}@media screen and (max-width:768px){.hero.is-success.is-bold .navbar-menu{background-image:linear-gradient(141deg,#12af2f,#23d160 71%,#2ce28a)}}.hero.is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.hero.is-warning a:not(.button):not(.dropdown-item):not(.tag),.hero.is-warning strong{color:inherit}.hero.is-warning .title{color:rgba(0,0,0,.7)}.hero.is-warning .subtitle{color:rgba(0,0,0,.9)}.hero.is-warning .subtitle a:not(.button),.hero.is-warning .subtitle strong{color:rgba(0,0,0,.7)}@media screen and (max-width:1087px){.hero.is-warning .navbar-menu{background-color:#ffdd57}}.hero.is-warning .navbar-item,.hero.is-warning .navbar-link{color:rgba(0,0,0,.7)}.hero.is-warning .navbar-link.is-active,.hero.is-warning .navbar-link:hover,.hero.is-warning a.navbar-item.is-active,.hero.is-warning a.navbar-item:hover{background-color:#ffd83d;color:rgba(0,0,0,.7)}.hero.is-warning .tabs a{color:rgba(0,0,0,.7);opacity:.9}.hero.is-warning .tabs a:hover,.hero.is-warning .tabs li.is-active a{opacity:1}.hero.is-warning .tabs.is-boxed a,.hero.is-warning .tabs.is-toggle a{color:rgba(0,0,0,.7)}.hero.is-warning .tabs.is-boxed a:hover,.hero.is-warning .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-warning .tabs.is-boxed li.is-active a,.hero.is-warning .tabs.is-boxed li.is-active a:hover,.hero.is-warning .tabs.is-toggle li.is-active a,.hero.is-warning .tabs.is-toggle li.is-active a:hover{background-color:rgba(0,0,0,.7);border-color:rgba(0,0,0,.7);color:#ffdd57}.hero.is-warning.is-bold{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}@media screen and (max-width:768px){.hero.is-warning.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ffaf24,#ffdd57 71%,#fffa70)}}.hero.is-danger{background-color:#ff3860;color:#fff}.hero.is-danger a:not(.button):not(.dropdown-item):not(.tag),.hero.is-danger strong{color:inherit}.hero.is-danger .title{color:#fff}.hero.is-danger .subtitle{color:hsla(0,0%,100%,.9)}.hero.is-danger .subtitle a:not(.button),.hero.is-danger .subtitle strong{color:#fff}@media screen and (max-width:1087px){.hero.is-danger .navbar-menu{background-color:#ff3860}}.hero.is-danger .navbar-item,.hero.is-danger .navbar-link{color:hsla(0,0%,100%,.7)}.hero.is-danger .navbar-link.is-active,.hero.is-danger .navbar-link:hover,.hero.is-danger a.navbar-item.is-active,.hero.is-danger a.navbar-item:hover{background-color:#ff1f4b;color:#fff}.hero.is-danger .tabs a{color:#fff;opacity:.9}.hero.is-danger .tabs a:hover,.hero.is-danger .tabs li.is-active a{opacity:1}.hero.is-danger .tabs.is-boxed a,.hero.is-danger .tabs.is-toggle a{color:#fff}.hero.is-danger .tabs.is-boxed a:hover,.hero.is-danger .tabs.is-toggle a:hover{background-color:hsla(0,0%,4%,.1)}.hero.is-danger .tabs.is-boxed li.is-active a,.hero.is-danger .tabs.is-boxed li.is-active a:hover,.hero.is-danger .tabs.is-toggle li.is-active a,.hero.is-danger .tabs.is-toggle li.is-active a:hover{background-color:#fff;border-color:#fff;color:#ff3860}.hero.is-danger.is-bold{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}@media screen and (max-width:768px){.hero.is-danger.is-bold .navbar-menu{background-image:linear-gradient(141deg,#ff0561,#ff3860 71%,#ff5257)}}.hero.is-small .hero-body{padding-bottom:1.5rem;padding-top:1.5rem}@media print,screen and (min-width:769px){.hero.is-medium .hero-body{padding-bottom:9rem;padding-top:9rem}}@media print,screen and (min-width:769px){.hero.is-large .hero-body{padding-bottom:18rem;padding-top:18rem}}.hero.is-fullheight-with-navbar .hero-body,.hero.is-fullheight .hero-body,.hero.is-halfheight .hero-body{align-items:center;display:flex}.hero.is-fullheight-with-navbar .hero-body>.container,.hero.is-fullheight .hero-body>.container,.hero.is-halfheight .hero-body>.container{flex-grow:1;flex-shrink:1}.hero.is-halfheight{min-height:50vh}.hero.is-fullheight{min-height:100vh}.hero-video{overflow:hidden}.hero-video video{left:50%;min-height:100%;min-width:100%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.hero-video.is-transparent{opacity:.3}@media screen and (max-width:768px){.hero-video{display:none}}.hero-buttons{margin-top:1.5rem}@media screen and (max-width:768px){.hero-buttons .button{display:flex}.hero-buttons .button:not(:last-child){margin-bottom:.75rem}}@media print,screen and (min-width:769px){.hero-buttons{display:flex;justify-content:center}.hero-buttons .button:not(:last-child){margin-right:1.5rem}}.hero-foot,.hero-head{flex-grow:0;flex-shrink:0}.hero-body{flex-grow:1;flex-shrink:0}.hero-body,.section{padding:3rem 1.5rem}@media screen and (min-width:1088px){.section.is-medium{padding:9rem 1.5rem}.section.is-large{padding:18rem 1.5rem}}.footer{background-color:#fafafa;padding:3rem 1.5rem 6rem}.is-noscroll{position:fixed;overflow-y:hidden;width:100%;bottom:0}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation-name:fadeOut}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}}.fadeOutDown{animation-name:fadeOutDown}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}}.fadeOutUp{animation-name:fadeOutUp}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation-name:fadeIn}@keyframes fadeInDown{0%{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:none}}.fadeInDown{animation-name:fadeInDown}@keyframes fadeInUp{0%{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:none}}.fadeInUp{animation-name:fadeInUp}.fade-enter-active,.fade-leave-active{transition:opacity .15s ease-out}.fade-enter,.fade-leave-to{opacity:0}.zoom-in-enter-active,.zoom-in-leave-active{transition:opacity .15s ease-out}.zoom-in-enter-active .animation-content,.zoom-in-leave-active .animation-content{transition:transform .15s ease-out}.zoom-in-enter,.zoom-in-leave-active{opacity:0}.zoom-in-enter .animation-content,.zoom-in-leave-active .animation-content{transform:scale(.95)}.zoom-out-enter-active,.zoom-out-leave-active{transition:opacity .15s ease-out}.zoom-out-enter-active .animation-content,.zoom-out-leave-active .animation-content{transition:transform .15s ease-out}.zoom-out-enter,.zoom-out-leave-active{opacity:0}.zoom-out-enter .animation-content,.zoom-out-leave-active .animation-content{transform:scale(1.05)}.slide-next-enter-active,.slide-next-leave-active,.slide-prev-enter-active,.slide-prev-leave-active{transition:transform .25s cubic-bezier(.785,.135,.15,.86)}.slide-next-enter,.slide-prev-leave-to{transform:translate3d(-100%,0,0);position:absolute;width:100%}.slide-next-leave-to,.slide-prev-enter{transform:translate3d(100%,0,0);position:absolute;width:100%}.autocomplete{position:relative}.autocomplete .dropdown-menu{display:block;min-width:100%;max-width:100%}.autocomplete .dropdown-menu.is-opened-top{top:auto;bottom:100%}.autocomplete .dropdown-content{overflow:auto;max-height:200px}.autocomplete .dropdown-item,.autocomplete .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .autocomplete a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.autocomplete .dropdown-item.is-hovered,.autocomplete .dropdown .dropdown-menu .has-link a.is-hovered,.dropdown .dropdown-menu .has-link .autocomplete a.is-hovered{background:#f5f5f5;color:#0a0a0a}.autocomplete .dropdown-item.is-disabled,.autocomplete .dropdown .dropdown-menu .has-link a.is-disabled,.dropdown .dropdown-menu .has-link .autocomplete a.is-disabled{opacity:.5;cursor:not-allowed}.autocomplete.is-small{border-radius:2px;font-size:.75rem}.autocomplete.is-medium{font-size:1.25rem}.autocomplete.is-large{font-size:1.5rem}.b-checkbox.checkbox{outline:none;display:inline-flex;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.b-checkbox.checkbox+.checkbox{margin-left:.5em}.b-checkbox.checkbox input[type=checkbox]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-checkbox.checkbox input[type=checkbox]+.check{width:1.25em;height:1.25em;flex-shrink:0;border-radius:4px;border:2px solid #7a7a7a;transition:background .15s ease-out}.b-checkbox.checkbox input[type=checkbox]:checked+.check{background:#7957d5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#7957d5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-white{background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%230a0a0a'/%3E%3C/svg%3E") no-repeat 50%;border-color:#fff}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-black{background:#0a0a0a url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#0a0a0a}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-light{background:#f5f5f5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23363636'/%3E%3C/svg%3E") no-repeat 50%;border-color:#f5f5f5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-dark{background:#363636 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23f5f5f5'/%3E%3C/svg%3E") no-repeat 50%;border-color:#363636}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-link,.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-primary{background:#7957d5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#7957d5}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-info{background:#167df0 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#167df0}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-success{background:#23d160 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#23d160}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-warning{background:#ffdd57 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='rgba(0,0,0,.7)'/%3E%3C/svg%3E") no-repeat 50%;border-color:#ffdd57}.b-checkbox.checkbox input[type=checkbox]:checked+.check.is-danger{background:#ff3860 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%23fff'/%3E%3C/svg%3E") no-repeat 50%;border-color:#ff3860}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check{background:#7957d5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#7957d5}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-white{background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%230a0a0a' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#fff}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-black{background:#0a0a0a url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#0a0a0a}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-light{background:#f5f5f5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23363636' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#f5f5f5}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-dark{background:#363636 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23f5f5f5' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#363636}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-primary{background:#7957d5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#7957d5}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-link{background:#7957d5 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#7957d5}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-info{background:#167df0 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#167df0}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-success{background:#23d160 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#23d160}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-warning{background:#ffdd57 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='rgba(0,0,0,.7)' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#ffdd57}.b-checkbox.checkbox input[type=checkbox]:indeterminate+.check.is-danger{background:#ff3860 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath fill='%23fff' d='M.15.4h.7v.2h-.7z'/%3E%3C/svg%3E") no-repeat 50%;border-color:#ff3860}.b-checkbox.checkbox input[type=checkbox]:focus+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check{box-shadow:0 0 .5em rgba(121,87,213,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-link,.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-primary{box-shadow:0 0 .5em rgba(121,87,213,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-info{box-shadow:0 0 .5em rgba(22,125,240,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-checkbox.checkbox input[type=checkbox]:focus:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-checkbox.checkbox .control-label{padding-left:.5em}.b-checkbox.checkbox[disabled]{opacity:.5}.b-checkbox.checkbox:hover input[type=checkbox]+.check{border-color:#7957d5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-white{border-color:#fff}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-black{border-color:#0a0a0a}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-light{border-color:#f5f5f5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-dark{border-color:#363636}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-link,.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-primary{border-color:#7957d5}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-info{border-color:#167df0}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-success{border-color:#23d160}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-warning{border-color:#ffdd57}.b-checkbox.checkbox:hover input[type=checkbox]+.check.is-danger{border-color:#ff3860}.b-checkbox.checkbox.is-small{border-radius:2px;font-size:.75rem}.b-checkbox.checkbox.is-medium{font-size:1.25rem}.b-checkbox.checkbox.is-large{font-size:1.5rem}.b-clockpicker .card-header{background-color:#7957d5;color:#fff}.b-clockpicker .b-clockpicker-face:after{background-color:#7957d5}.b-clockpicker .b-clockpicker-face-hand{background-color:#7957d5;border-color:#7957d5}.b-clockpicker .b-clockpicker-face-number.active{background-color:#7957d5;color:#fff}.b-clockpicker.is-white .card-header{background-color:#fff;color:#0a0a0a}.b-clockpicker.is-white .b-clockpicker-face:after{background-color:#fff}.b-clockpicker.is-white .b-clockpicker-face-hand{background-color:#fff;border-color:#fff}.b-clockpicker.is-white .b-clockpicker-face-number.active{background-color:#fff;color:#0a0a0a}.b-clockpicker.is-black .card-header{background-color:#0a0a0a;color:#fff}.b-clockpicker.is-black .b-clockpicker-face:after{background-color:#0a0a0a}.b-clockpicker.is-black .b-clockpicker-face-hand{background-color:#0a0a0a;border-color:#0a0a0a}.b-clockpicker.is-black .b-clockpicker-face-number.active{background-color:#0a0a0a;color:#fff}.b-clockpicker.is-light .card-header{background-color:#f5f5f5;color:#363636}.b-clockpicker.is-light .b-clockpicker-face:after{background-color:#f5f5f5}.b-clockpicker.is-light .b-clockpicker-face-hand{background-color:#f5f5f5;border-color:#f5f5f5}.b-clockpicker.is-light .b-clockpicker-face-number.active{background-color:#f5f5f5;color:#363636}.b-clockpicker.is-dark .card-header{background-color:#363636;color:#f5f5f5}.b-clockpicker.is-dark .b-clockpicker-face:after{background-color:#363636}.b-clockpicker.is-dark .b-clockpicker-face-hand{background-color:#363636;border-color:#363636}.b-clockpicker.is-dark .b-clockpicker-face-number.active{background-color:#363636;color:#f5f5f5}.b-clockpicker.is-primary .card-header{background-color:#7957d5;color:#fff}.b-clockpicker.is-primary .b-clockpicker-face:after{background-color:#7957d5}.b-clockpicker.is-primary .b-clockpicker-face-hand{background-color:#7957d5;border-color:#7957d5}.b-clockpicker.is-link .card-header,.b-clockpicker.is-primary .b-clockpicker-face-number.active{background-color:#7957d5;color:#fff}.b-clockpicker.is-link .b-clockpicker-face:after{background-color:#7957d5}.b-clockpicker.is-link .b-clockpicker-face-hand{background-color:#7957d5;border-color:#7957d5}.b-clockpicker.is-link .b-clockpicker-face-number.active{background-color:#7957d5;color:#fff}.b-clockpicker.is-info .card-header{background-color:#167df0;color:#fff}.b-clockpicker.is-info .b-clockpicker-face:after{background-color:#167df0}.b-clockpicker.is-info .b-clockpicker-face-hand{background-color:#167df0;border-color:#167df0}.b-clockpicker.is-info .b-clockpicker-face-number.active{background-color:#167df0;color:#fff}.b-clockpicker.is-success .card-header{background-color:#23d160;color:#fff}.b-clockpicker.is-success .b-clockpicker-face:after{background-color:#23d160}.b-clockpicker.is-success .b-clockpicker-face-hand{background-color:#23d160;border-color:#23d160}.b-clockpicker.is-success .b-clockpicker-face-number.active{background-color:#23d160;color:#fff}.b-clockpicker.is-warning .card-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.b-clockpicker.is-warning .b-clockpicker-face:after{background-color:#ffdd57}.b-clockpicker.is-warning .b-clockpicker-face-hand{background-color:#ffdd57;border-color:#ffdd57}.b-clockpicker.is-warning .b-clockpicker-face-number.active{background-color:#ffdd57;color:rgba(0,0,0,.7)}.b-clockpicker.is-danger .card-header{background-color:#ff3860;color:#fff}.b-clockpicker.is-danger .b-clockpicker-face:after{background-color:#ff3860}.b-clockpicker.is-danger .b-clockpicker-face-hand{background-color:#ff3860;border-color:#ff3860}.b-clockpicker.is-danger .b-clockpicker-face-number.active{background-color:#ff3860;color:#fff}.b-clockpicker .dropdown-menu{min-width:0}.b-clockpicker .dropdown,.b-clockpicker .dropdown-trigger{width:100%}.b-clockpicker .dropdown-item,.b-clockpicker .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .b-clockpicker a{font-size:inherit;padding:0}.b-clockpicker .dropdown-content{padding-top:0;padding-bottom:0}.b-clockpicker .card-content{padding:12px}.b-clockpicker-btn{cursor:pointer;opacity:.6}.b-clockpicker-btn.active,.b-clockpicker-btn:hover{opacity:1}.b-clockpicker-period .b-clockpicker-btn{font-size:16px;text-transform:uppercase}.b-clockpicker-time span{align-items:center;display:inline-flex;justify-content:center}.b-clockpicker-header{display:flex;line-height:1;justify-content:flex-end;color:inherit}.b-clockpicker-header .b-clockpicker-time{white-space:nowrap}.b-clockpicker-header .b-clockpicker-time span{height:60px;font-size:60px}.b-clockpicker-header .b-clockpicker-period{align-self:flex-end;display:flex;flex-direction:column;margin:8px 0 6px 8px}.b-clockpicker-body{transition:.9s cubic-bezier(.25,.8,.5,1)}.b-clockpicker-body .b-clockpicker-btn{padding:0 8px;border-radius:290486px;margin-bottom:2px}.b-clockpicker-body .b-clockpicker-btn.active,.b-clockpicker-body .b-clockpicker-btn:hover{background-color:#7957d5;color:#fff}.b-clockpicker-body .b-clockpicker-period{position:absolute;top:5px;right:5px}.b-clockpicker-body .b-clockpicker-time{position:absolute;top:5px;left:5px;font-size:16px}.b-clockpicker-body .b-clockpicker-face{border-radius:50%;position:relative;background-color:#dbdbdb;width:100%;height:100%;align-items:center;display:flex;justify-content:center}.b-clockpicker-body .b-clockpicker-face:after{border-radius:50%;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:12px;height:12px;z-index:10}.b-clockpicker-body .b-clockpicker-face-outer-ring{user-select:none;height:calc(100% - 50px);width:calc(100% - 50px);position:relative;border-radius:50%}.b-clockpicker-body .b-clockpicker-face-number{align-items:center;border-radius:100%;cursor:default;display:flex;font-size:18px;text-align:center;justify-content:center;position:absolute;width:40px;height:40px;left:calc(50% - 40px / 2);top:calc(50% - 40px / 2);user-select:none}.b-clockpicker-body .b-clockpicker-face-number>span{z-index:1}.b-clockpicker-body .b-clockpicker-face-number:after,.b-clockpicker-body .b-clockpicker-face-number:before{content:"";height:40px;width:40px;border-radius:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.b-clockpicker-body .b-clockpicker-face-number.active{cursor:default;z-index:2}.b-clockpicker-body .b-clockpicker-face-number.disabled{pointer-events:none;opacity:.25}.b-clockpicker-body .b-clockpicker-face-hand{height:calc(50% - 6px);width:2px;bottom:50%;left:calc(50% - 1px);transform-origin:center bottom;position:absolute;will-change:transform;z-index:1}.b-clockpicker-body .b-clockpicker-face-hand:before{background:transparent;border-width:2px;border-style:solid;border-color:inherit;border-radius:100%;width:12px;height:12px;content:"";position:absolute;top:-6px;left:50%;transform:translate(-50%,-50%)}.b-clockpicker-footer{display:block;padding:12px}.b-clockpicker.is-small{border-radius:2px;font-size:.75rem}.b-clockpicker.is-medium{font-size:1.25rem}.b-clockpicker.is-large{font-size:1.5rem}.collapse .collapse-trigger{display:inline;cursor:pointer}.collapse .collapse-content{display:inherit}.datepicker{font-size:.875rem}.datepicker .dropdown,.datepicker .dropdown-trigger{width:100%}.datepicker .dropdown-item,.datepicker .dropdown .dropdown-menu .has-link a,.dropdown .dropdown-menu .has-link .datepicker a{font-size:inherit}.datepicker .datepicker-header{padding-bottom:.875rem;margin-bottom:.875rem;border-bottom:1px solid #dbdbdb}.datepicker .datepicker-content{height:16.25rem}.datepicker .datepicker-footer{margin-top:.875rem;padding-top:.875rem;border-top:1px solid #dbdbdb}.datepicker .datepicker-table{display:table;margin:0 auto}.datepicker .datepicker-table .datepicker-cell{text-align:center;vertical-align:middle;display:table-cell;border-radius:4px;padding:.5rem .75rem}.datepicker .datepicker-table .datepicker-header{display:table-header-group}.datepicker .datepicker-table .datepicker-header .datepicker-cell{color:#7a7a7a;font-weight:600}.datepicker .datepicker-table .datepicker-body{display:table-row-group}.datepicker .datepicker-table .datepicker-body .datepicker-row{display:table-row}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-unselectable{color:#b5b5b5}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-today{border:1px solid rgba(121,87,213,.5)}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable{color:#4a4a4a}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:focus:not(.is-selected),.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selectable:hover:not(.is-selected){background-color:#f5f5f5;color:#0a0a0a;cursor:pointer}.datepicker .datepicker-table .datepicker-body .datepicker-row .datepicker-cell.is-selected{background-color:#7957d5;color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell{padding:.3rem .75rem .75rem}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event{position:relative}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events{bottom:.425rem;display:flex;justify-content:center;left:0;padding:0 .35rem;position:absolute;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-white{background-color:#fff}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-black{background-color:#0a0a0a}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-light{background-color:#f5f5f5}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-dark{background-color:#363636}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-link,.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-primary{background-color:#7957d5}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-info{background-color:#167df0}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-success{background-color:#23d160}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-warning{background-color:#ffdd57}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event .events .event.is-danger{background-color:#ff3860}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.dots .event{border-radius:50%;height:.35em;margin:0 .1em;width:.35em}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.has-event.bars .event{height:.25em;width:100%}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected{overflow:hidden}.datepicker .datepicker-table .datepicker-body.has-events .datepicker-cell.is-selected .events .event.is-primary{background-color:#aa94e4}.datepicker.is-small{border-radius:2px;font-size:.75rem}.datepicker.is-medium{font-size:1.25rem}.datepicker.is-large{font-size:1.5rem}@media screen and (min-width:769px) and (max-width:1087px){.datepicker .datepicker-content{height:19.75rem}.datepicker .datepicker-table .datepicker-cell{padding:.75rem 1rem}}@media screen and (max-width:768px){.datepicker .datepicker-content{height:12.75rem}.datepicker .datepicker-table .datepicker-cell{padding:.25rem .5rem}}.dialog .modal-card{max-width:460px;width:auto}.dialog .modal-card .modal-card-head{font-size:1.25rem;font-weight:600}.dialog .modal-card .modal-card-body .field{margin-top:16px}.dialog .modal-card .modal-card-body.is-titleless{border-top-left-radius:6px;border-top-right-radius:6px}.dialog .modal-card .modal-card-foot{justify-content:flex-end}.dialog .modal-card .modal-card-foot .button{display:inline;min-width:5em;font-weight:600}@media print,screen and (min-width:769px){.dialog .modal-card{min-width:320px}}.dialog.is-small .button,.dialog.is-small .input,.dialog.is-small .modal-card,.dialog.is-small .taginput .taginput-container.is-focusable,.taginput .dialog.is-small .taginput-container.is-focusable{border-radius:2px;font-size:.75rem}.dialog.is-medium .button,.dialog.is-medium .input,.dialog.is-medium .modal-card,.dialog.is-medium .taginput .taginput-container.is-focusable,.taginput .dialog.is-medium .taginput-container.is-focusable{font-size:1.25rem}.dialog.is-large .button,.dialog.is-large .input,.dialog.is-large .modal-card,.dialog.is-large .taginput .taginput-container.is-focusable,.taginput .dialog.is-large .taginput-container.is-focusable{font-size:1.5rem}.dropdown+.dropdown{margin-left:.5em}.dropdown .background{bottom:0;left:0;position:absolute;right:0;top:0;position:fixed;background-color:hsla(0,0%,4%,.86);z-index:10;cursor:pointer}@media screen and (min-width:1088px){.dropdown .background{display:none}}.dropdown .dropdown-menu .dropdown-item.is-disabled,.dropdown .dropdown-menu .has-link a.is-disabled{cursor:not-allowed}.dropdown .dropdown-menu .dropdown-item.is-disabled:hover,.dropdown .dropdown-menu .has-link a.is-disabled:hover{background:inherit;color:inherit}.dropdown .dropdown-menu .has-link a{padding-right:3rem;white-space:nowrap}.dropdown:not(.is-disabled) .dropdown-menu .dropdown-item.is-disabled,.dropdown:not(.is-disabled) .dropdown-menu .has-link a.is-disabled{opacity:.5}.dropdown .navbar-item{height:100%}.dropdown.is-disabled{opacity:.5;cursor:not-allowed}.dropdown.is-disabled .dropdown-trigger{pointer-events:none}.dropdown.is-inline .dropdown-menu{position:static;display:inline-block;padding:0}.dropdown.is-top-right .dropdown-menu{top:auto;bottom:100%}.dropdown.is-top-left .dropdown-menu{top:auto;bottom:100%;right:0;left:auto}.dropdown.is-bottom-left .dropdown-menu{right:0;left:auto}@media screen and (max-width:1087px){.dropdown.is-mobile-modal .dropdown-menu{position:fixed;width:calc(100vw - 40px);max-width:460px;max-height:calc(100vh - 120px);top:25%!important;left:50%!important;bottom:auto!important;right:auto!important;transform:translate3d(-50%,-25%,0);white-space:normal;overflow-y:auto}.dropdown.is-mobile-modal .dropdown-menu .dropdown-item,.dropdown.is-mobile-modal .dropdown-menu .has-link a{padding:1rem 1.5rem}}.label{font-weight:600}.field.is-grouped .field{flex-shrink:0}.field.is-grouped .field:not(:last-child){margin-right:.75rem}.field.is-grouped .field.is-expanded{flex-grow:1;flex-shrink:1}.field.has-addons .control:first-child .control .button,.field.has-addons .control:first-child .control .input,.field.has-addons .control:first-child .control .select select,.field.has-addons .control:first-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:first-child .control .taginput-container.is-focusable{border-bottom-left-radius:4px;border-top-left-radius:4px}.field.has-addons .control:last-child .control .button,.field.has-addons .control:last-child .control .input,.field.has-addons .control:last-child .control .select select,.field.has-addons .control:last-child .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control:last-child .control .taginput-container.is-focusable{border-bottom-right-radius:4px;border-top-right-radius:4px}.field.has-addons .control .control .button,.field.has-addons .control .control .input,.field.has-addons .control .control .select select,.field.has-addons .control .control .taginput .taginput-container.is-focusable,.taginput .field.has-addons .control .control .taginput-container.is-focusable{border-radius:0}.control .help.counter{float:right;margin-left:.5em}.control .icon.is-clickable{pointer-events:auto;cursor:pointer}.icon{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit}.icon svg{background-color:transparent;fill:currentColor;stroke-width:0;stroke:currentColor;pointer-events:none;width:1.5rem;height:1.5rem}.loading-overlay{bottom:0;left:0;position:absolute;right:0;top:0;align-items:center;display:none;justify-content:center;overflow:hidden}.loading-overlay.is-active{display:flex}.loading-overlay.is-full-page{z-index:999;position:fixed}.loading-overlay.is-full-page .loading-icon:after{top:calc(50% - 2.5em);left:calc(50% - 2.5em);width:5em;height:5em}.loading-overlay .loading-background{bottom:0;left:0;position:absolute;right:0;top:0;background:#7f7f7f;background:hsla(0,0%,100%,.5)}.loading-overlay .loading-icon{position:relative}.loading-overlay .loading-icon:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em;position:absolute;top:calc(50% - 1.5em);left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.message .media,.notification .media{padding-top:0;border:0}.notification>.delete{right:.5rem!important;top:.5rem!important}.modal .animation-content{margin:0 20px}.modal .animation-content .modal-card{margin:0}@media screen and (max-width:768px){.modal .animation-content{width:100%}}.modal .modal-content{width:100%}.notices{position:fixed;display:flex;top:0;bottom:0;left:0;right:0;padding:2em;overflow:hidden;z-index:1000;pointer-events:none}.notices .toast{display:inline-flex;animation-duration:.15s;margin:.5em 0;text-align:center;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:2em;padding:.75em 1.5em;pointer-events:auto;opacity:.92}.notices .toast.is-white{color:#0a0a0a;background:#fff}.notices .toast.is-black{color:#fff;background:#0a0a0a}.notices .toast.is-light{color:#363636;background:#f5f5f5}.notices .toast.is-dark{color:#f5f5f5;background:#363636}.notices .toast.is-link,.notices .toast.is-primary{color:#fff;background:#7957d5}.notices .toast.is-info{color:#fff;background:#167df0}.notices .toast.is-success{color:#fff;background:#23d160}.notices .toast.is-warning{color:rgba(0,0,0,.7);background:#ffdd57}.notices .toast.is-danger{color:#fff;background:#ff3860}.notices .snackbar{display:inline-flex;align-items:center;justify-content:space-around;animation-duration:.15s;margin:.5em 0;box-shadow:0 1px 4px rgba(0,0,0,.12),0 0 6px rgba(0,0,0,.04);border-radius:4px;pointer-events:auto;background:#363636;color:#f5f5f5;min-height:3em}.notices .snackbar .text{padding:.5em 1em}.notices .snackbar .action{margin-left:auto;padding:.5em;padding-left:0}.notices .snackbar .action .button{font-weight:600;text-transform:uppercase;background:#363636;border:transparent}.notices .snackbar .action .button:active,.notices .snackbar .action .button:hover{background:#292929}.notices .snackbar .action.is-white .button{color:#fff}.notices .snackbar .action.is-black .button{color:#0a0a0a}.notices .snackbar .action.is-light .button{color:#f5f5f5}.notices .snackbar .action.is-dark .button{color:#363636}.notices .snackbar .action.is-link .button,.notices .snackbar .action.is-primary .button{color:#7957d5}.notices .snackbar .action.is-info .button{color:#167df0}.notices .snackbar .action.is-success .button{color:#23d160}.notices .snackbar .action.is-warning .button{color:#ffdd57}.notices .snackbar .action.is-danger .button{color:#ff3860}@media screen and (max-width:768px){.notices .snackbar{width:100%;margin:0;border-radius:0}}@media print,screen and (min-width:769px){.notices .snackbar{min-width:350px;max-width:600px;overflow:hidden}}.notices .notification{max-width:600px}.notices .notification.is-bottom,.notices .notification.is-top,.notices .snackbar.is-bottom,.notices .snackbar.is-top,.notices .toast.is-bottom,.notices .toast.is-top{align-self:center}.notices .notification.is-bottom-right,.notices .notification.is-top-right,.notices .snackbar.is-bottom-right,.notices .snackbar.is-top-right,.notices .toast.is-bottom-right,.notices .toast.is-top-right{align-self:flex-end}.notices .notification.is-bottom-left,.notices .notification.is-top-left,.notices .snackbar.is-bottom-left,.notices .snackbar.is-top-left,.notices .toast.is-bottom-left,.notices .toast.is-top-left{align-self:flex-start}.notices .notification.is-toast,.notices .snackbar.is-toast,.notices .toast.is-toast{opacity:.92}.notices.is-top{flex-direction:column}.notices.is-bottom{flex-direction:column-reverse}.notices.has-custom-container{position:absolute}@media screen and (max-width:768px){.notices{padding:0;position:fixed!important}}.b-numberinput.field{margin-bottom:0}@media screen and (max-width:768px){.b-numberinput.field.is-grouped div.control{flex-grow:1;flex-shrink:1}}.b-numberinput input[type=number]::-webkit-inner-spin-button,.b-numberinput input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.b-numberinput input[type=number]{-moz-appearance:textfield;text-align:center}.b-numberinput .button.is-rounded{padding-left:.75em;padding-right:.75em}.pagination .pagination-next,.pagination .pagination-previous{padding-left:.25em;padding-right:.25em}.pagination .pagination-next.is-disabled,.pagination .pagination-previous.is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.pagination.is-simple{justify-content:normal}.pagination.is-simple.is-centered{justify-content:center}.pagination.is-simple.is-right{justify-content:flex-end}.pagination .is-current{pointer-events:none;cursor:not-allowed}.b-radio.radio{outline:none;display:inline-flex;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.b-radio.radio+.radio{margin-left:.5em}.b-radio.radio input[type=radio]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.b-radio.radio input[type=radio]+.check{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25em;height:1.25em;border:2px solid #7a7a7a;border-radius:50%;transition:background .15s ease-out}.b-radio.radio input[type=radio]+.check:before{content:"";border-radius:50%;width:.625em;height:.625em;background:#7957d5;transform:scale(0);transition:transform .15s ease-out}.b-radio.radio input[type=radio]+.check.is-white:before{background:#fff}.b-radio.radio input[type=radio]+.check.is-black:before{background:#0a0a0a}.b-radio.radio input[type=radio]+.check.is-light:before{background:#f5f5f5}.b-radio.radio input[type=radio]+.check.is-dark:before{background:#363636}.b-radio.radio input[type=radio]+.check.is-link:before,.b-radio.radio input[type=radio]+.check.is-primary:before{background:#7957d5}.b-radio.radio input[type=radio]+.check.is-info:before{background:#167df0}.b-radio.radio input[type=radio]+.check.is-success:before{background:#23d160}.b-radio.radio input[type=radio]+.check.is-warning:before{background:#ffdd57}.b-radio.radio input[type=radio]+.check.is-danger:before{background:#ff3860}.b-radio.radio input[type=radio]:checked+.check{border-color:#7957d5}.b-radio.radio input[type=radio]:checked+.check.is-white{border-color:#fff}.b-radio.radio input[type=radio]:checked+.check.is-black{border-color:#0a0a0a}.b-radio.radio input[type=radio]:checked+.check.is-light{border-color:#f5f5f5}.b-radio.radio input[type=radio]:checked+.check.is-dark{border-color:#363636}.b-radio.radio input[type=radio]:checked+.check.is-link,.b-radio.radio input[type=radio]:checked+.check.is-primary{border-color:#7957d5}.b-radio.radio input[type=radio]:checked+.check.is-info{border-color:#167df0}.b-radio.radio input[type=radio]:checked+.check.is-success{border-color:#23d160}.b-radio.radio input[type=radio]:checked+.check.is-warning{border-color:#ffdd57}.b-radio.radio input[type=radio]:checked+.check.is-danger{border-color:#ff3860}.b-radio.radio input[type=radio]:checked+.check:before{transform:scale(1)}.b-radio.radio .control-label{padding-left:.5em}.b-radio.radio[disabled]{opacity:.5}.b-radio.radio:hover input[type=radio]+.check{border-color:#7957d5}.b-radio.radio:hover input[type=radio]+.check.is-white{border-color:#fff}.b-radio.radio:hover input[type=radio]+.check.is-black{border-color:#0a0a0a}.b-radio.radio:hover input[type=radio]+.check.is-light{border-color:#f5f5f5}.b-radio.radio:hover input[type=radio]+.check.is-dark{border-color:#363636}.b-radio.radio:hover input[type=radio]+.check.is-link,.b-radio.radio:hover input[type=radio]+.check.is-primary{border-color:#7957d5}.b-radio.radio:hover input[type=radio]+.check.is-info{border-color:#167df0}.b-radio.radio:hover input[type=radio]+.check.is-success{border-color:#23d160}.b-radio.radio:hover input[type=radio]+.check.is-warning{border-color:#ffdd57}.b-radio.radio:hover input[type=radio]+.check.is-danger{border-color:#ff3860}.b-radio.radio:focus input[type=radio]+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check{box-shadow:0 0 .5em rgba(121,87,213,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-link,.b-radio.radio:focus input[type=radio]:checked+.check.is-primary{box-shadow:0 0 .5em rgba(121,87,213,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-info{box-shadow:0 0 .5em rgba(22,125,240,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.b-radio.radio:focus input[type=radio]:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.b-radio.radio.is-small{border-radius:2px;font-size:.75rem}.b-radio.radio.is-medium{font-size:1.25rem}.b-radio.radio.is-large{font-size:1.5rem}.select select{padding-right:2.5em}.select select option{color:#4a4a4a;padding:.25em .5em}.select select option:disabled{cursor:not-allowed;opacity:.5}.select select optgroup{color:#b5b5b5;font-weight:400;font-style:normal;padding:.25em 0}.select.is-empty select{color:hsla(0,0%,48%,.7)}.switch{cursor:pointer;display:inline-flex;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switch+.switch{margin-left:.5em}.switch input[type=checkbox]{position:absolute;left:0;opacity:0;outline:none;z-index:-1}.switch input[type=checkbox]+.check{display:flex;align-items:center;flex-shrink:0;width:2.75em;height:1.575em;padding:.2em;background:#b5b5b5;border-radius:1em;transition:background .15s ease-out}.switch input[type=checkbox]+.check:before{content:"";display:block;border-radius:1em;width:1.175em;height:1.175em;background:#f5f5f5;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);transition:transform .15s ease-out,width .15s ease-out;will-change:transform}.switch input[type=checkbox]+.check.is-elastic:before{width:1.75em}.switch input[type=checkbox]:checked+.check{background:#7957d5}.switch input[type=checkbox]:checked+.check.is-white{background:#fff}.switch input[type=checkbox]:checked+.check.is-black{background:#0a0a0a}.switch input[type=checkbox]:checked+.check.is-light{background:#f5f5f5}.switch input[type=checkbox]:checked+.check.is-dark{background:#363636}.switch input[type=checkbox]:checked+.check.is-link,.switch input[type=checkbox]:checked+.check.is-primary{background:#7957d5}.switch input[type=checkbox]:checked+.check.is-info{background:#167df0}.switch input[type=checkbox]:checked+.check.is-success{background:#23d160}.switch input[type=checkbox]:checked+.check.is-warning{background:#ffdd57}.switch input[type=checkbox]:checked+.check.is-danger{background:#ff3860}.switch input[type=checkbox]:checked+.check:before{transform:translate3d(100%,0,0)}.switch input[type=checkbox]:checked+.check.is-elastic:before{transform:translate3d(36.36364%,0,0)}.switch input[type=checkbox]:focus{outline:none}.switch input[type=checkbox]:focus+.check{box-shadow:0 0 .5em hsla(0,0%,48%,.6)}.switch input[type=checkbox]:focus:checked+.check{box-shadow:0 0 .5em rgba(121,87,213,.8)}.switch input[type=checkbox]:focus:checked+.check.is-white{box-shadow:0 0 .5em hsla(0,0%,100%,.8)}.switch input[type=checkbox]:focus:checked+.check.is-black{box-shadow:0 0 .5em hsla(0,0%,4%,.8)}.switch input[type=checkbox]:focus:checked+.check.is-light{box-shadow:0 0 .5em hsla(0,0%,96%,.8)}.switch input[type=checkbox]:focus:checked+.check.is-dark{box-shadow:0 0 .5em rgba(54,54,54,.8)}.switch input[type=checkbox]:focus:checked+.check.is-link,.switch input[type=checkbox]:focus:checked+.check.is-primary{box-shadow:0 0 .5em rgba(121,87,213,.8)}.switch input[type=checkbox]:focus:checked+.check.is-info{box-shadow:0 0 .5em rgba(22,125,240,.8)}.switch input[type=checkbox]:focus:checked+.check.is-success{box-shadow:0 0 .5em rgba(35,209,96,.8)}.switch input[type=checkbox]:focus:checked+.check.is-warning{box-shadow:0 0 .5em rgba(255,221,87,.8)}.switch input[type=checkbox]:focus:checked+.check.is-danger{box-shadow:0 0 .5em rgba(255,56,96,.8)}.switch .control-label{padding-left:.5em}.switch:hover input[type=checkbox]+.check{background:hsla(0,0%,71%,.9)}.switch:hover input[type=checkbox]:checked+.check{background:rgba(121,87,213,.9)}.switch:hover input[type=checkbox]:checked+.check.is-white{background:hsla(0,0%,100%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-black{background:hsla(0,0%,4%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-light{background:hsla(0,0%,96%,.9)}.switch:hover input[type=checkbox]:checked+.check.is-dark{background:rgba(54,54,54,.9)}.switch:hover input[type=checkbox]:checked+.check.is-link,.switch:hover input[type=checkbox]:checked+.check.is-primary{background:rgba(121,87,213,.9)}.switch:hover input[type=checkbox]:checked+.check.is-info{background:rgba(22,125,240,.9)}.switch:hover input[type=checkbox]:checked+.check.is-success{background:rgba(35,209,96,.9)}.switch:hover input[type=checkbox]:checked+.check.is-warning{background:rgba(255,221,87,.9)}.switch:hover input[type=checkbox]:checked+.check.is-danger{background:rgba(255,56,96,.9)}.switch.is-small{border-radius:2px;font-size:.75rem}.switch.is-medium{font-size:1.25rem}.switch.is-large{font-size:1.5rem}.switch[disabled]{opacity:.5;cursor:not-allowed;color:#7a7a7a}.table-wrapper .table{margin-bottom:0}.table-wrapper:not(:last-child){margin-bottom:1.5rem}@media screen and (max-width:1087px){.table-wrapper{overflow-x:auto}}.b-table{transition:opacity 86ms ease-out}@media print,screen and (min-width:769px){.b-table .table-mobile-sort{display:none}}.b-table .icon{transition:transform .15s ease-out,opacity 86ms ease-out}.b-table .icon.is-desc{transform:rotate(180deg)}.b-table .icon.is-expanded{transform:rotate(90deg)}.b-table .table{width:100%;border:1px solid transparent;border-radius:4px;border-collapse:separate}.b-table .table th{font-weight:600}.b-table .table th .th-wrap{display:flex;align-items:center}.b-table .table th .th-wrap .icon{margin-left:.5rem;margin-right:0;font-size:1rem}.b-table .table th .th-wrap.is-numeric{flex-direction:row-reverse;text-align:right}.b-table .table th .th-wrap.is-numeric .icon{margin-left:0;margin-right:.5rem}.b-table .table th .th-wrap.is-centered{justify-content:center;text-align:center}.b-table .table th.is-current-sort{border-color:#7a7a7a;font-weight:700}.b-table .table th.is-sortable:hover{border-color:#7a7a7a}.b-table .table th.is-sortable,.b-table .table th.is-sortable .th-wrap{cursor:pointer}.b-table .table tr.is-selected .checkbox input:checked+.check{background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3Cpath d='M.04.627L.146.52.43.804.323.91zm.177.177L.854.167.96.273.323.91z' fill='%237957d5'/%3E%3C/svg%3E") no-repeat 50%}.b-table .table tr.is-selected .checkbox input+.check{border-color:#fff}.b-table .table tr.is-empty:hover{background-color:transparent}.b-table .table .chevron-cell{vertical-align:middle}.b-table .table .checkbox-cell{width:40px}.b-table .table .checkbox-cell .checkbox{vertical-align:middle}.b-table .table .checkbox-cell .checkbox .check{transition:none}.b-table .table tr.detail{box-shadow:inset 0 1px 3px #dbdbdb;background:#fafafa}.b-table .table tr.detail .detail-container{padding:1rem}.b-table .table:focus{border-color:#7957d5;box-shadow:0 0 0 .125em rgba(121,87,213,.25)}.b-table .table.is-bordered th.is-current-sort,.b-table .table.is-bordered th.is-sortable:hover{border-color:#dbdbdb;background:#f5f5f5}@media screen and (max-width:768px){.b-table .table.has-mobile-cards thead{display:none}.b-table .table.has-mobile-cards tfoot th{border:0;display:inherit}.b-table .table.has-mobile-cards tr{box-shadow:0 2px 3px hsla(0,0%,4%,.1),0 0 0 1px hsla(0,0%,4%,.1);max-width:100%;position:relative;display:block}.b-table .table.has-mobile-cards tr td{border:0;display:inherit}.b-table .table.has-mobile-cards tr td:last-child{border-bottom:0}.b-table .table.has-mobile-cards tr:not(:last-child){margin-bottom:1rem}.b-table .table.has-mobile-cards tr:not([class*=is-]){background:inherit}.b-table .table.has-mobile-cards tr:not([class*=is-]):hover{background-color:inherit}.b-table .table.has-mobile-cards tr.detail{margin-top:-1rem}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td{display:flex;width:auto;justify-content:space-between;text-align:right;border-bottom:1px solid #f5f5f5}.b-table .table.has-mobile-cards tr:not(.detail):not(.is-empty):not(.table-footer) td:before{content:attr(data-label);font-weight:600;padding-right:.5em;text-align:left}}.b-table .level{padding-bottom:1.5rem}.b-table.is-loading{position:relative;pointer-events:none;opacity:.5}.b-table.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em;position:absolute;top:4em;left:calc(50% - 2.5em);width:5em;height:5em;border-width:.25em}.b-tabs .tabs{margin-bottom:0;flex-shrink:0}.b-tabs .is-disabled{pointer-events:none;cursor:not-allowed;opacity:.5}.b-tabs .tab-content{position:relative;overflow:visible;display:flex;flex-direction:column;padding:1rem}.b-tabs .tab-content .tab-item{flex-shrink:0;flex-basis:auto}.b-tabs .tab-content.is-transitioning{overflow:hidden}.b-tabs:not(:last-child){margin-bottom:1.5rem}.b-tabs.is-fullwidth{width:100%}.tag .has-ellipsis{max-width:10em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.taginput .taginput-container.is-focusable{padding-bottom:0;padding-top:calc(.275em - 1px);align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start;height:auto;cursor:text}.taginput .taginput-container>.tag,.taginput .taginput-container>.tags{margin-bottom:calc(.275em - 1px);font-size:.9em;height:1.7em}.taginput .taginput-container>.tag .tag,.taginput .taginput-container>.tags .tag{margin-bottom:0;font-size:.9em;height:1.7em}.taginput .taginput-container>.tag:not(:last-child),.taginput .taginput-container>.tags:not(:last-child){margin-right:.275rem}.taginput .taginput-container .autocomplete{flex:1}.taginput .taginput-container .autocomplete input{height:1.7em;margin-bottom:calc(.275em - 1px);padding-top:0;padding-bottom:0;border:none;box-shadow:none;min-width:8em}.taginput .taginput-container .autocomplete input:focus{box-shadow:none!important}.taginput .taginput-container .autocomplete .icon{height:1.7em}.taginput .taginput-container .autocomplete>.control.is-loading:after{top:.375em}.timepicker .dropdown-menu{min-width:0}.timepicker .dropdown,.timepicker .dropdown-trigger{width:100%}.dropdown .dropdown-menu .has-link .timepicker a,.timepicker .dropdown-item,.timepicker .dropdown .dropdown-menu .has-link a{font-size:inherit;padding:0}.timepicker .timepicker-footer{padding:0 .5rem}.timepicker .dropdown-content .control{font-size:1.25em;margin-right:0!important}.timepicker .dropdown-content .control .select select{font-weight:600;padding-right:calc(.625em - 1px);border:0}.timepicker .dropdown-content .control .select select option:disabled{color:hsla(0,0%,48%,.7)}.timepicker .dropdown-content .control .select:after{display:none}.timepicker .dropdown-content .control.is-colon{font-size:1.7em}.timepicker.is-small{border-radius:2px;font-size:.75rem}.timepicker.is-medium{font-size:1.25rem}.timepicker.is-large{font-size:1.5rem}.b-tooltip{position:relative;display:inline-flex}.b-tooltip.is-top:after,.b-tooltip.is-top:before{top:auto;right:auto;bottom:calc(100% + 5px + 2px);left:50%;transform:translateX(-50%)}.b-tooltip.is-top.is-white:before{border-top:5px solid #fff}.b-tooltip.is-top.is-black:before,.b-tooltip.is-top.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.b-tooltip.is-top.is-black:before{border-top:5px solid #0a0a0a}.b-tooltip.is-top.is-light:before{border-top:5px solid #f5f5f5}.b-tooltip.is-top.is-dark:before,.b-tooltip.is-top.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.b-tooltip.is-top.is-dark:before{border-top:5px solid #363636}.b-tooltip.is-top.is-link:before,.b-tooltip.is-top.is-primary:before{border-top:5px solid #7957d5;border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.b-tooltip.is-top.is-info:before{border-top:5px solid #167df0}.b-tooltip.is-top.is-info:before,.b-tooltip.is-top.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.b-tooltip.is-top.is-success:before{border-top:5px solid #23d160}.b-tooltip.is-top.is-warning:before{border-top:5px solid #ffdd57}.b-tooltip.is-top.is-danger:before,.b-tooltip.is-top.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;bottom:calc(100% + 2px)}.b-tooltip.is-top.is-danger:before{border-top:5px solid #ff3860}.b-tooltip.is-top.is-multiline.is-small:after{width:180px}.b-tooltip.is-top.is-multiline.is-medium:after{width:240px}.b-tooltip.is-top.is-multiline.is-large:after{width:300px}.b-tooltip.is-right:after,.b-tooltip.is-right:before{top:50%;right:auto;bottom:auto;left:calc(100% + 5px + 2px);transform:translateY(-50%)}.b-tooltip.is-right.is-white:before{border-right:5px solid #fff}.b-tooltip.is-right.is-black:before,.b-tooltip.is-right.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.b-tooltip.is-right.is-black:before{border-right:5px solid #0a0a0a}.b-tooltip.is-right.is-light:before{border-right:5px solid #f5f5f5}.b-tooltip.is-right.is-dark:before,.b-tooltip.is-right.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.b-tooltip.is-right.is-dark:before{border-right:5px solid #363636}.b-tooltip.is-right.is-link:before,.b-tooltip.is-right.is-primary:before{border-top:5px solid transparent;border-right:5px solid #7957d5;border-bottom:5px solid transparent;left:calc(100% + 2px)}.b-tooltip.is-right.is-info:before{border-right:5px solid #167df0}.b-tooltip.is-right.is-info:before,.b-tooltip.is-right.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.b-tooltip.is-right.is-success:before{border-right:5px solid #23d160}.b-tooltip.is-right.is-warning:before{border-right:5px solid #ffdd57}.b-tooltip.is-right.is-danger:before,.b-tooltip.is-right.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;left:calc(100% + 2px)}.b-tooltip.is-right.is-danger:before{border-right:5px solid #ff3860}.b-tooltip.is-right.is-multiline.is-small:after{width:180px}.b-tooltip.is-right.is-multiline.is-medium:after{width:240px}.b-tooltip.is-right.is-multiline.is-large:after{width:300px}.b-tooltip.is-bottom:after,.b-tooltip.is-bottom:before{top:calc(100% + 5px + 2px);right:auto;bottom:auto;left:50%;transform:translateX(-50%)}.b-tooltip.is-bottom.is-white:before{border-bottom:5px solid #fff}.b-tooltip.is-bottom.is-black:before,.b-tooltip.is-bottom.is-white:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.b-tooltip.is-bottom.is-black:before{border-bottom:5px solid #0a0a0a}.b-tooltip.is-bottom.is-light:before{border-bottom:5px solid #f5f5f5}.b-tooltip.is-bottom.is-dark:before,.b-tooltip.is-bottom.is-light:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.b-tooltip.is-bottom.is-dark:before{border-bottom:5px solid #363636}.b-tooltip.is-bottom.is-link:before,.b-tooltip.is-bottom.is-primary:before{border-right:5px solid transparent;border-bottom:5px solid #7957d5;border-left:5px solid transparent;top:calc(100% + 2px)}.b-tooltip.is-bottom.is-info:before{border-bottom:5px solid #167df0}.b-tooltip.is-bottom.is-info:before,.b-tooltip.is-bottom.is-success:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.b-tooltip.is-bottom.is-success:before{border-bottom:5px solid #23d160}.b-tooltip.is-bottom.is-warning:before{border-bottom:5px solid #ffdd57}.b-tooltip.is-bottom.is-danger:before,.b-tooltip.is-bottom.is-warning:before{border-right:5px solid transparent;border-left:5px solid transparent;top:calc(100% + 2px)}.b-tooltip.is-bottom.is-danger:before{border-bottom:5px solid #ff3860}.b-tooltip.is-bottom.is-multiline.is-small:after{width:180px}.b-tooltip.is-bottom.is-multiline.is-medium:after{width:240px}.b-tooltip.is-bottom.is-multiline.is-large:after{width:300px}.b-tooltip.is-left:after,.b-tooltip.is-left:before{top:50%;right:calc(100% + 5px + 2px);bottom:auto;left:auto;transform:translateY(-50%)}.b-tooltip.is-left.is-white:before{border-left:5px solid #fff}.b-tooltip.is-left.is-black:before,.b-tooltip.is-left.is-white:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.b-tooltip.is-left.is-black:before{border-left:5px solid #0a0a0a}.b-tooltip.is-left.is-light:before{border-left:5px solid #f5f5f5}.b-tooltip.is-left.is-dark:before,.b-tooltip.is-left.is-light:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.b-tooltip.is-left.is-dark:before{border-left:5px solid #363636}.b-tooltip.is-left.is-link:before,.b-tooltip.is-left.is-primary:before{border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #7957d5;right:calc(100% + 2px)}.b-tooltip.is-left.is-info:before{border-left:5px solid #167df0}.b-tooltip.is-left.is-info:before,.b-tooltip.is-left.is-success:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.b-tooltip.is-left.is-success:before{border-left:5px solid #23d160}.b-tooltip.is-left.is-warning:before{border-left:5px solid #ffdd57}.b-tooltip.is-left.is-danger:before,.b-tooltip.is-left.is-warning:before{border-top:5px solid transparent;border-bottom:5px solid transparent;right:calc(100% + 2px)}.b-tooltip.is-left.is-danger:before{border-left:5px solid #ff3860}.b-tooltip.is-left.is-multiline.is-small:after{width:180px}.b-tooltip.is-left.is-multiline.is-medium:after{width:240px}.b-tooltip.is-left.is-multiline.is-large:after{width:300px}.b-tooltip:after,.b-tooltip:before{position:absolute;content:"";opacity:0;visibility:hidden;pointer-events:none}.b-tooltip:before{z-index:889}.b-tooltip:after{content:attr(data-label);width:auto;padding:.35rem .75rem;border-radius:6px;font-size:.85rem;font-weight:400;box-shadow:0 1px 2px 1px rgba(0,1,0,.2);z-index:888;white-space:nowrap}.b-tooltip:not([data-label=""]):hover:after,.b-tooltip:not([data-label=""]):hover:before{opacity:1;visibility:visible}.b-tooltip.is-white:after{background:#fff;color:#0a0a0a}.b-tooltip.is-black:after{background:#0a0a0a;color:#fff}.b-tooltip.is-light:after{background:#f5f5f5;color:#363636}.b-tooltip.is-dark:after{background:#363636;color:#f5f5f5}.b-tooltip.is-link:after,.b-tooltip.is-primary:after{background:#7957d5;color:#fff}.b-tooltip.is-info:after{background:#167df0;color:#fff}.b-tooltip.is-success:after{background:#23d160;color:#fff}.b-tooltip.is-warning:after{background:#ffdd57;color:rgba(0,0,0,.7)}.b-tooltip.is-danger:after{background:#ff3860;color:#fff}.b-tooltip:not([data-label=""]).is-always:after,.b-tooltip:not([data-label=""]).is-always:before{opacity:1;visibility:visible}.b-tooltip.is-multiline:after{display:flex-block;text-align:center;white-space:normal}.b-tooltip.is-dashed{border-bottom:1px dashed #b5b5b5;cursor:default}.b-tooltip.is-square:after{border-radius:0}.b-tooltip.is-animated:after,.b-tooltip.is-animated:before{transition:opacity 86ms ease-out,visibility 86ms ease-out}.upload{position:relative}.upload input[type=file]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;outline:none}.upload input[type=file].file-draggable{z-index:-1}.upload .upload-draggable{display:inline-block;cursor:pointer;padding:.25em;border:1px dashed #b5b5b5;border-radius:6px}.upload .upload-draggable.is-disabled{opacity:.5;cursor:not-allowed}.upload .upload-draggable.is-loading{position:relative;pointer-events:none;opacity:.5}.upload .upload-draggable.is-loading:after{animation:spinAround .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em;top:0;left:calc(50% - 1.5em);width:3em;height:3em;border-width:.25em}.upload .upload-draggable.is-hovered.is-white,.upload .upload-draggable:hover.is-white{border-color:#fff;background:hsla(0,0%,100%,.05)}.upload .upload-draggable.is-hovered.is-black,.upload .upload-draggable:hover.is-black{border-color:#0a0a0a;background:hsla(0,0%,4%,.05)}.upload .upload-draggable.is-hovered.is-light,.upload .upload-draggable:hover.is-light{border-color:#f5f5f5;background:hsla(0,0%,96%,.05)}.upload .upload-draggable.is-hovered.is-dark,.upload .upload-draggable:hover.is-dark{border-color:#363636;background:rgba(54,54,54,.05)}.upload .upload-draggable.is-hovered.is-link,.upload .upload-draggable.is-hovered.is-primary,.upload .upload-draggable:hover.is-link,.upload .upload-draggable:hover.is-primary{border-color:#7957d5;background:rgba(121,87,213,.05)}.upload .upload-draggable.is-hovered.is-info,.upload .upload-draggable:hover.is-info{border-color:#167df0;background:rgba(22,125,240,.05)}.upload .upload-draggable.is-hovered.is-success,.upload .upload-draggable:hover.is-success{border-color:#23d160;background:rgba(35,209,96,.05)}.upload .upload-draggable.is-hovered.is-warning,.upload .upload-draggable:hover.is-warning{border-color:#ffdd57;background:rgba(255,221,87,.05)}.upload .upload-draggable.is-hovered.is-danger,.upload .upload-draggable:hover.is-danger{border-color:#ff3860;background:rgba(255,56,96,.05)} diff --git a/public/lib/buefy-0.7.5.min.js b/public/lib/buefy-0.7.5.min.js new file mode 100644 index 0000000..6f49e6d --- /dev/null +++ b/public/lib/buefy-0.7.5.min.js @@ -0,0 +1,2 @@ +/*! Buefy v0.7.4 | MIT License | github.com/buefy/buefy */ +!(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports.Buefy=t(require("vue")):e.Buefy=t(e.Vue)})("undefined"!=typeof self?self:this,(function(e){return (function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=69)})([(function(e,t){e.exports=function(e,t,n,i,a){var s,o=e=e||{},r=typeof e.default;"object"!==r&&"function"!==r||(s=e,o=e.default);var l="function"==typeof o?o.options:o;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns),i&&(l._scopeId=i);var u;if(a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):n&&(u=n),u){var c=l.functional,d=c?l.render:l.beforeCreate;c?l.render=function(e,t){return u.call(t),d(e,t)}:l.beforeCreate=d?[].concat(d,u):[u]}return{esModule:s,exports:o,options:l}}}),(function(e,t,n){"use strict";t.__esModule=!0;var i=n(101),a=(function(e){return e&&e.__esModule?e:{default:e}})(i);t.default=function(e,t,n){return t in e?(0,a.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}),(function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var i={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,detaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:null,defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultUseHtml5Validation:!0};t.a=i;var a=function(e){i=e}}),(function(e,t,n){var i=n(0)(n(105),n(106),null,null,null);e.exports=i.exports}),(function(e,t,n){var i=n(37)("wks"),a=n(26),s=n(8).Symbol,o="function"==typeof s;(e.exports=function(e){return i[e]||(i[e]=o&&s[e]||(o?s:a)("Symbol."+e))}).store=i}),(function(e,t,n){e.exports={default:n(88),__esModule:!0}}),(function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)}),(function(e,t,n){"use strict";function i(e,t){return t.split(".").reduce((function(e,t){return e[t]}),e)}function a(e,t,n){if(!e)return-1;if(!n||"function"!=typeof n)return e.indexOf(t);for(var i=0;i0?i:n)(e)}}),(function(e,t,n){var i=n(37)("keys"),a=n(26);e.exports=function(e){return i[e]||(i[e]=a(e))}}),(function(e,t,n){var i=n(6),a=n(8),s=a["__core-js_shared__"]||(a["__core-js_shared__"]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n(25)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),(function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(e,t){t.f=Object.getOwnPropertySymbols}),(function(e,t,n){var i=n(34);e.exports=function(e){return Object(i(e))}}),(function(e,t,n){"use strict";var i=n(80)(!0);n(54)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))}),(function(e,t,n){var i=n(9).f,a=n(13),s=n(4)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}}),(function(e,t,n){t.f=n(4)}),(function(e,t,n){var i=n(8),a=n(6),s=n(25),o=n(43),r=n(9).f;e.exports=function(e){var t=a.Symbol||(a.Symbol=s?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||r(t,e,{value:o.f(e)})}}),(function(e,t,n){"use strict";var i=n(2),a=n(7);t.a={props:{type:{type:String,default:"is-dark"},message:String,duration:Number,queue:{type:Boolean,default:void 0},position:{type:String,default:"is-top",validator:function(e){return["is-top-right","is-top","is-top-left","is-bottom-right","is-bottom","is-bottom-left"].indexOf(e)>-1}},container:String},data:function(){return{isActive:!1,parentTop:null,parentBottom:null,newContainer:this.container||i.a.defaultContainerElement}},computed:{correctParent:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return this.parentTop;case"is-bottom-right":case"is-bottom":case"is-bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"is-bottom-right":case"is-bottom":case"is-bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}},methods:{shouldQueue:function(){return!!(void 0!==this.queue?this.queue:i.a.defaultNoticeQueue)&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},close:function(){var e=this;clearTimeout(this.timer),this.isActive=!1,setTimeout((function(){e.$destroy(),Object(a.d)(e.$el)}),150)},showNotice:function(){var e=this;if(this.shouldQueue())return void setTimeout((function(){return e.showNotice()}),250);this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.indefinite||(this.timer=setTimeout((function(){return e.close()}),this.newDuration))},setupContainer:function(){if(this.parentTop=document.querySelector(".notices.is-top"),this.parentBottom=document.querySelector(".notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var e=document.querySelector(this.newContainer)||document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom),this.newContainer&&(this.parentTop.classList.add("has-custom-container"),this.parentBottom.classList.add("has-custom-container"))}}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice()}}}),(function(e,t,n){var i=n(72);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,a){return e.call(t,n,i,a)}}return function(){return e.apply(t,arguments)}}}),(function(e,t,n){e.exports=!n(12)&&!n(21)((function(){return 7!=Object.defineProperty(n(48)("div"),"a",{get:function(){return 7}}).a}))}),(function(e,t,n){var i=n(20),a=n(8).document,s=i(a)&&i(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}}),(function(e,t,n){var i=n(13),a=n(16),s=n(74)(!1),o=n(36)("IE_PROTO");e.exports=function(e,t){var n,r=a(e),l=0,u=[];for(n in r)n!=o&&i(r,n)&&u.push(n);for(;t.length>l;)i(r,n=t[l++])&&(~s(u,n)||u.push(n));return u}}),(function(e,t,n){var i=n(33);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}}),(function(e,t,n){var i=n(35),a=Math.min;e.exports=function(e){return e>0?a(i(e),9007199254740991):0}}),(function(e,t,n){var i=n(0)(n(77),n(108),null,null,null);e.exports=i.exports}),(function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=n(78),s=i(a),o=n(5),r=i(o),l="function"==typeof r.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":typeof e};t.default="function"==typeof r.default&&"symbol"===l(s.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":l(e)}}),(function(e,t,n){"use strict";var i=n(25),a=n(19),s=n(55),o=n(14),r=n(23),l=n(81),u=n(42),c=n(84),d=n(4)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,v,b){l(n,t,p);var g,y,w,_=function(e){if(!f&&e in x)return x[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S="values"==m,C=!1,x=e.prototype,D=x[d]||x["@@iterator"]||m&&x[m],P=D||_(m),M=m?S?_("entries"):P:void 0,T="Array"==t?x.entries||D:D;if(T&&(w=c(T.call(new e)))!==Object.prototype&&w.next&&(u(w,k,!0),i||"function"==typeof w[d]||o(w,d,h)),S&&D&&"values"!==D.name&&(C=!0,P=function(){return D.call(this)}),i&&!b||!f&&!C&&x[d]||o(x,d,P),r[t]=P,r[k]=h,m)if(g={values:S?P:_("values"),keys:v?P:_("keys"),entries:M},b)for(y in g)y in x||s(x,y,g[y]);else a(a.P+a.F*(f||C),t,g);return g}}),(function(e,t,n){e.exports=n(14)}),(function(e,t,n){var i=n(15),a=n(82),s=n(38),o=n(36)("IE_PROTO"),r=function(){},l=function(){var e,t=n(48)("iframe"),i=s.length;for(t.style.display="none",n(83).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("