From 07ca2d0722bc4d10340a5e9b27e473c19ca0937f Mon Sep 17 00:00:00 2001 From: colee <5969226@qq.com> Date: Sun, 25 Dec 2016 02:33:02 +0800 Subject: [PATCH] =?UTF-8?q?vue=20=E6=9B=B4=E6=96=B0=E8=87=B32.1.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/vue/.babelrc | 8 + assets/vue/.bower.json | 33 - assets/vue/.eslintignore | 3 + assets/vue/.eslintrc | 14 + assets/vue/.flowconfig | 21 + assets/vue/.github/CODE_OF_CONDUCT.md | 13 + assets/vue/.github/CONTRIBUTING.md | 147 + assets/vue/.github/ISSUE_TEMPLATE.md | 48 + assets/vue/.github/PULL_REQUEST_TEMPLATE.md | 4 + assets/vue/.gitignore | 11 + assets/vue/BACKERS.md | 186 + assets/vue/README.md | 101 + assets/vue/benchmarks/big-table/demo.css | 15 + assets/vue/benchmarks/big-table/index.html | 163 + assets/vue/benchmarks/big-table/style.css | 553 + assets/vue/benchmarks/dbmon/ENV.js | 211 + assets/vue/benchmarks/dbmon/app.js | 14 + assets/vue/benchmarks/dbmon/index.html | 39 + .../benchmarks/dbmon/lib/bootstrap.min.css | 7 + .../vue/benchmarks/dbmon/lib/memory-stats.js | 101 + assets/vue/benchmarks/dbmon/lib/monitor.js | 60 + assets/vue/benchmarks/dbmon/lib/styles.css | 10 + assets/vue/benchmarks/reorder-list/index.html | 111 + assets/vue/benchmarks/ssr/README.md | 13 + assets/vue/benchmarks/ssr/common.js | 59 + assets/vue/benchmarks/ssr/renderToStream.js | 29 + assets/vue/benchmarks/ssr/renderToString.js | 15 + assets/vue/benchmarks/svg/index.html | 102 + assets/vue/benchmarks/uptime/index.html | 200 + assets/vue/bower.json | 19 - assets/vue/build/alias.js | 13 + assets/vue/build/build.js | 96 + assets/vue/build/ci.sh | 18 + assets/vue/build/config.js | 131 + assets/vue/build/get-weex-version.js | 24 + assets/vue/build/git-hooks/pre-commit | 7 + assets/vue/build/karma.base.config.js | 43 + assets/vue/build/karma.cover.config.js | 29 + assets/vue/build/karma.dev.config.js | 8 + assets/vue/build/karma.sauce.config.js | 97 + assets/vue/build/karma.unit.config.js | 9 + assets/vue/build/nightwatch.config.js | 57 + assets/vue/build/release-weex.sh | 38 + assets/vue/build/release.sh | 49 + assets/vue/circle.yml | 7 + assets/vue/dist/README.md | 63 + assets/vue/dist/vue.common.js | 15090 +++++++------- assets/vue/dist/vue.js | 16803 +++++++--------- assets/vue/dist/vue.min.js | 10 +- assets/vue/dist/vue.runtime.common.js | 6101 ++++++ assets/vue/dist/vue.runtime.js | 6101 ++++++ assets/vue/dist/vue.runtime.min.js | 7 + assets/vue/examples/commits/app.js | 47 + assets/vue/examples/commits/index.html | 47 + assets/vue/examples/elastic-header/index.html | 105 + assets/vue/examples/elastic-header/style.css | 44 + assets/vue/examples/firebase/app.js | 57 + assets/vue/examples/firebase/index.html | 35 + assets/vue/examples/firebase/style.css | 32 + assets/vue/examples/grid/grid.js | 69 + assets/vue/examples/grid/index.html | 52 + assets/vue/examples/grid/style.css | 59 + assets/vue/examples/markdown/index.html | 39 + assets/vue/examples/markdown/style.css | 32 + assets/vue/examples/modal/index.html | 72 + assets/vue/examples/modal/style.css | 63 + .../vue/examples/move-animations/index.html | 88 + assets/vue/examples/select2/index.html | 84 + assets/vue/examples/svg/index.html | 56 + assets/vue/examples/svg/style.css | 31 + assets/vue/examples/svg/svg.js | 87 + assets/vue/examples/todomvc/app.js | 157 + assets/vue/examples/todomvc/index.html | 69 + assets/vue/examples/todomvc/readme.md | 28 + assets/vue/examples/tree/index.html | 62 + assets/vue/examples/tree/tree.js | 75 + assets/vue/flow/compiler.js | 172 + assets/vue/flow/component.js | 110 + assets/vue/flow/global-api.js | 21 + assets/vue/flow/modules.js | 24 + assets/vue/flow/options.js | 75 + assets/vue/flow/ssr.js | 21 + assets/vue/flow/vnode.js | 68 + assets/vue/package.json | 119 + .../packages/vue-server-renderer/README.md | 273 + .../vue/packages/vue-server-renderer/build.js | 6555 ++++++ .../vue/packages/vue-server-renderer/index.js | 16 + .../packages/vue-server-renderer/package.json | 25 + .../packages/vue-template-compiler/README.md | 87 + .../packages/vue-template-compiler/build.js | 5936 ++++++ .../packages/vue-template-compiler/index.js | 18 + .../vue-template-compiler/package.json | 24 + .../packages/weex-template-compiler/README.md | 3 + .../packages/weex-template-compiler/build.js | 5446 +++++ .../packages/weex-template-compiler/index.js | 17 + .../weex-template-compiler/package.json | 20 + .../vue/packages/weex-vue-framework/README.md | 3 + .../vue/packages/weex-vue-framework/index.js | 5042 +++++ .../packages/weex-vue-framework/package.json | 20 + assets/vue/src/batcher.js | 111 - assets/vue/src/cache.js | 117 - assets/vue/src/compiler/codegen/events.js | 80 + assets/vue/src/compiler/codegen/index.js | 383 + assets/vue/src/compiler/compile-props.js | 203 - assets/vue/src/compiler/compile.js | 810 - assets/vue/src/compiler/directives/bind.js | 9 + assets/vue/src/compiler/directives/index.js | 7 + assets/vue/src/compiler/error-detector.js | 76 + assets/vue/src/compiler/helpers.js | 186 + assets/vue/src/compiler/index.js | 25 +- assets/vue/src/compiler/optimizer.js | 123 + .../vue/src/compiler/parser/entity-decoder.js | 9 + .../vue/src/compiler/parser/filter-parser.js | 95 + assets/vue/src/compiler/parser/html-parser.js | 314 + assets/vue/src/compiler/parser/index.js | 564 + assets/vue/src/compiler/parser/text-parser.js | 41 + assets/vue/src/compiler/resolve-slots.js | 63 - assets/vue/src/compiler/transclude.js | 160 - assets/vue/src/config.js | 111 - assets/vue/src/core/components/index.js | 5 + assets/vue/src/core/components/keep-alive.js | 59 + assets/vue/src/core/config.js | 115 + assets/vue/src/core/global-api/assets.js | 39 + assets/vue/src/core/global-api/extend.js | 69 + assets/vue/src/core/global-api/index.js | 44 + assets/vue/src/core/global-api/mixin.js | 9 + assets/vue/src/core/global-api/use.js | 22 + assets/vue/src/core/index.js | 13 + assets/vue/src/core/instance/events.js | 104 + assets/vue/src/core/instance/index.js | 22 + assets/vue/src/core/instance/init.js | 85 + assets/vue/src/core/instance/lifecycle.js | 217 + assets/vue/src/core/instance/proxy.js | 78 + assets/vue/src/core/instance/render.js | 313 + assets/vue/src/core/instance/state.js | 239 + assets/vue/src/core/observer/array.js | 53 + assets/vue/src/core/observer/dep.js | 58 + assets/vue/src/core/observer/index.js | 252 + assets/vue/src/core/observer/scheduler.js | 105 + assets/vue/src/core/observer/watcher.js | 265 + assets/vue/src/core/util/debug.js | 39 + assets/vue/src/core/util/env.js | 146 + assets/vue/src/{ => core}/util/index.js | 4 +- assets/vue/src/core/util/lang.js | 40 + assets/vue/src/core/util/options.js | 337 + assets/vue/src/core/util/props.js | 182 + assets/vue/src/core/vdom/create-component.js | 322 + assets/vue/src/core/vdom/create-element.js | 110 + assets/vue/src/core/vdom/helpers/index.js | 9 + .../vue/src/core/vdom/helpers/merge-hook.js | 18 + .../core/vdom/helpers/normalize-children.js | 69 + .../src/core/vdom/helpers/update-listeners.js | 73 + .../vue/src/core/vdom/modules/directives.js | 112 + assets/vue/src/core/vdom/modules/index.js | 7 + assets/vue/src/core/vdom/modules/ref.js | 44 + assets/vue/src/core/vdom/patch.js | 621 + assets/vue/src/core/vdom/vnode.js | 91 + assets/vue/src/directive.js | 333 - assets/vue/src/directives/element/index.js | 7 - assets/vue/src/directives/element/partial.js | 49 - assets/vue/src/directives/element/slot.js | 64 - assets/vue/src/directives/internal/class.js | 75 - .../vue/src/directives/internal/component.js | 380 - assets/vue/src/directives/internal/index.js | 13 - assets/vue/src/directives/internal/prop.js | 71 - assets/vue/src/directives/internal/style.js | 114 - .../vue/src/directives/internal/transition.js | 20 - assets/vue/src/directives/priorities.js | 10 - assets/vue/src/directives/public/bind.js | 151 - assets/vue/src/directives/public/cloak.js | 8 - assets/vue/src/directives/public/el.js | 28 - assets/vue/src/directives/public/for.js | 637 - assets/vue/src/directives/public/html.js | 47 - assets/vue/src/directives/public/if.js | 85 - assets/vue/src/directives/public/index.js | 33 - .../src/directives/public/model/checkbox.js | 67 - .../vue/src/directives/public/model/index.js | 87 - .../vue/src/directives/public/model/radio.js | 34 - .../vue/src/directives/public/model/select.js | 118 - .../vue/src/directives/public/model/text.js | 143 - assets/vue/src/directives/public/on.js | 148 - assets/vue/src/directives/public/ref.js | 10 - assets/vue/src/directives/public/show.js | 31 - assets/vue/src/directives/public/text.js | 14 - assets/vue/src/entries/web-compiler.js | 34 + .../src/entries/web-runtime-with-compiler.js | 85 + assets/vue/src/entries/web-runtime.js | 58 + assets/vue/src/entries/web-server-renderer.js | 26 + assets/vue/src/entries/weex-compiler.js | 30 + assets/vue/src/entries/weex-framework.js | 422 + assets/vue/src/filters/array-filters.js | 126 - assets/vue/src/filters/index.js | 121 - assets/vue/src/fragment/factory.js | 55 - assets/vue/src/fragment/fragment.js | 210 - assets/vue/src/global-api.js | 224 - assets/vue/src/index.js | 26 - assets/vue/src/instance/api/data.js | 188 - assets/vue/src/instance/api/dom.js | 218 - assets/vue/src/instance/api/events.js | 202 - assets/vue/src/instance/api/lifecycle.js | 70 - assets/vue/src/instance/internal/events.js | 181 - assets/vue/src/instance/internal/init.js | 119 - assets/vue/src/instance/internal/lifecycle.js | 274 - assets/vue/src/instance/internal/misc.js | 100 - assets/vue/src/instance/internal/state.js | 272 - assets/vue/src/instance/vue.js | 43 - assets/vue/src/observer/array.js | 89 - assets/vue/src/observer/dep.js | 60 - assets/vue/src/observer/index.js | 232 - assets/vue/src/parsers/directive.js | 135 - assets/vue/src/parsers/expression.js | 214 - assets/vue/src/parsers/path.js | 346 - assets/vue/src/parsers/template.js | 301 - assets/vue/src/parsers/text.js | 165 - .../platforms/web/compiler/directives/html.js | 9 + .../web/compiler/directives/index.js | 9 + .../web/compiler/directives/model.js | 197 + .../platforms/web/compiler/directives/text.js | 9 + .../vue/src/platforms/web/compiler/index.js | 92 + .../platforms/web/compiler/modules/class.js | 48 + .../platforms/web/compiler/modules/index.js | 7 + .../platforms/web/compiler/modules/style.js | 51 + assets/vue/src/platforms/web/compiler/util.js | 27 + .../src/platforms/web/runtime/class-util.js | 53 + .../platforms/web/runtime/components/index.js | 7 + .../runtime/components/transition-group.js | 166 + .../web/runtime/components/transition.js | 162 + .../platforms/web/runtime/directives/index.js | 7 + .../platforms/web/runtime/directives/model.js | 137 + .../platforms/web/runtime/directives/show.js | 61 + .../platforms/web/runtime/modules/attrs.js | 79 + .../platforms/web/runtime/modules/class.js | 32 + .../web/runtime/modules/dom-props.js | 91 + .../platforms/web/runtime/modules/events.js | 37 + .../platforms/web/runtime/modules/index.js | 15 + .../platforms/web/runtime/modules/style.js | 77 + .../web/runtime/modules/transition.js | 279 + .../vue/src/platforms/web/runtime/node-ops.js | 58 + assets/vue/src/platforms/web/runtime/patch.js | 12 + .../platforms/web/runtime/transition-util.js | 146 + .../platforms/web/server/directives/index.js | 5 + .../platforms/web/server/directives/show.js | 8 + .../src/platforms/web/server/modules/attrs.js | 46 + .../src/platforms/web/server/modules/class.js | 10 + .../platforms/web/server/modules/dom-props.js | 45 + .../src/platforms/web/server/modules/index.js | 11 + .../src/platforms/web/server/modules/style.js | 19 + assets/vue/src/platforms/web/server/util.js | 36 + assets/vue/src/platforms/web/util/attrs.js | 39 + assets/vue/src/platforms/web/util/class.js | 76 + assets/vue/src/platforms/web/util/compat.js | 14 + assets/vue/src/platforms/web/util/element.js | 75 + assets/vue/src/platforms/web/util/index.js | 24 + assets/vue/src/platforms/web/util/style.js | 69 + .../weex/compiler/directives/index.js | 5 + .../weex/compiler/directives/model.js | 39 + .../vue/src/platforms/weex/compiler/index.js | 93 + .../platforms/weex/compiler/modules/append.js | 21 + .../platforms/weex/compiler/modules/class.js | 73 + .../platforms/weex/compiler/modules/index.js | 9 + .../platforms/weex/compiler/modules/style.js | 82 + .../vue/src/platforms/weex/runtime/config.js | 16 + .../weex/runtime/directives/index.js | 2 + .../vue/src/platforms/weex/runtime/index.js | 27 + .../platforms/weex/runtime/modules/attrs.js | 35 + .../platforms/weex/runtime/modules/class.js | 65 + .../platforms/weex/runtime/modules/events.js | 25 + .../platforms/weex/runtime/modules/index.js | 11 + .../platforms/weex/runtime/modules/style.js | 68 + .../src/platforms/weex/runtime/node-ops.js | 74 + .../vue/src/platforms/weex/runtime/patch.js | 16 + assets/vue/src/platforms/weex/util/index.js | 16 + .../vue/src/server/create-bundle-renderer.js | 34 + assets/vue/src/server/create-renderer.js | 47 + assets/vue/src/server/render-stream.js | 91 + assets/vue/src/server/render.js | 299 + assets/vue/src/server/run-in-vm.js | 36 + assets/vue/src/server/write.js | 32 + assets/vue/src/sfc/parser.js | 117 + assets/vue/src/shared/util.js | 227 + assets/vue/src/transition/index.js | 83 - assets/vue/src/transition/queue.js | 36 - assets/vue/src/transition/transition.js | 394 - assets/vue/src/util/component.js | 233 - assets/vue/src/util/debug.js | 22 - assets/vue/src/util/dom.js | 434 - assets/vue/src/util/env.js | 106 - assets/vue/src/util/lang.js | 403 - assets/vue/src/util/options.js | 395 - assets/vue/src/watcher.js | 345 - assets/vue/test/e2e/.eslintrc | 5 + assets/vue/test/e2e/runner.js | 34 + assets/vue/test/e2e/specs/commits.js | 23 + assets/vue/test/e2e/specs/grid.js | 105 + assets/vue/test/e2e/specs/markdown.js | 19 + assets/vue/test/e2e/specs/modal.js | 27 + assets/vue/test/e2e/specs/select2.js | 46 + assets/vue/test/e2e/specs/svg.js | 48 + assets/vue/test/e2e/specs/todomvc.js | 166 + assets/vue/test/e2e/specs/tree.js | 72 + assets/vue/test/helpers/.eslintrc | 8 + assets/vue/test/helpers/classlist.js | 18 + assets/vue/test/helpers/to-equal.js | 19 + .../vue/test/helpers/to-have-been-warned.js | 61 + assets/vue/test/helpers/trigger-event.js | 6 + assets/vue/test/helpers/vdom.js | 5 + assets/vue/test/helpers/wait-for-update.js | 68 + assets/vue/test/ssr/.eslintrc | 9 + assets/vue/test/ssr/fixtures/app.js | 12 + assets/vue/test/ssr/fixtures/cache.js | 16 + assets/vue/test/ssr/fixtures/error.js | 1 + assets/vue/test/ssr/jasmine.json | 12 + assets/vue/test/ssr/ssr-bundle-render.spec.js | 165 + assets/vue/test/ssr/ssr-stream.spec.js | 105 + assets/vue/test/ssr/ssr-string.spec.js | 684 + assets/vue/test/unit/.eslintrc | 14 + .../component/component-async.spec.js | 162 + .../component/component-keep-alive.spec.js | 560 + .../component/component-scoped-slot.spec.js | 350 + .../features/component/component-slot.spec.js | 630 + .../unit/features/component/component.spec.js | 305 + .../unit/features/directives/bind.spec.js | 284 + .../unit/features/directives/class.spec.js | 175 + .../unit/features/directives/cloak.spec.js | 10 + .../test/unit/features/directives/for.spec.js | 449 + .../unit/features/directives/html.spec.js | 67 + .../test/unit/features/directives/if.spec.js | 276 + .../directives/model-checkbox.spec.js | 230 + .../directives/model-component.spec.js | 105 + .../features/directives/model-dynamic.spec.js | 14 + .../features/directives/model-file.spec.js | 13 + .../features/directives/model-parse.spec.js | 33 + .../features/directives/model-radio.spec.js | 210 + .../features/directives/model-select.spec.js | 403 + .../features/directives/model-text.spec.js | 275 + .../test/unit/features/directives/on.spec.js | 405 + .../unit/features/directives/once.spec.js | 342 + .../test/unit/features/directives/pre.spec.js | 34 + .../unit/features/directives/show.spec.js | 84 + .../directives/static-style-parser.spec.js | 41 + .../unit/features/directives/style.spec.js | 349 + .../unit/features/directives/text.spec.js | 53 + .../test/unit/features/filter/filter.spec.js | 153 + .../unit/features/global-api/assets.spec.js | 68 + .../unit/features/global-api/compile.spec.js | 15 + .../unit/features/global-api/config.spec.js | 79 + .../unit/features/global-api/extend.spec.js | 125 + .../unit/features/global-api/mixin.spec.js | 87 + .../features/global-api/set-delete.spec.js | 76 + .../test/unit/features/global-api/use.spec.js | 24 + .../test/unit/features/instance/init.spec.js | 12 + .../features/instance/methods-data.spec.js | 89 + .../features/instance/methods-events.spec.js | 59 + .../instance/methods-lifecycle.spec.js | 130 + .../unit/features/instance/properties.spec.js | 82 + .../features/instance/render-proxy.spec.js | 32 + .../unit/features/options/_scopeId.spec.js | 43 + .../unit/features/options/components.spec.js | 89 + .../unit/features/options/computed.spec.js | 110 + .../test/unit/features/options/data.spec.js | 109 + .../unit/features/options/delimiters.spec.js | 116 + .../unit/features/options/directives.spec.js | 230 + .../vue/test/unit/features/options/el.spec.js | 90 + .../unit/features/options/extends.spec.js | 49 + .../unit/features/options/functional.spec.js | 116 + .../unit/features/options/lifecycle.spec.js | 221 + .../unit/features/options/methods.spec.js | 27 + .../test/unit/features/options/mixins.spec.js | 112 + .../test/unit/features/options/name.spec.js | 40 + .../test/unit/features/options/parent.spec.js | 28 + .../test/unit/features/options/props.spec.js | 453 + .../unit/features/options/propsData.spec.js | 30 + .../test/unit/features/options/render.spec.js | 39 + .../unit/features/options/template.spec.js | 73 + .../test/unit/features/options/watch.spec.js | 104 + assets/vue/test/unit/features/ref.spec.js | 160 + .../unit/features/transition/inject-styles.js | 64 + .../transition/transition-group.spec.js | 306 + .../transition/transition-mode.spec.js | 388 + .../features/transition/transition.spec.js | 876 + assets/vue/test/unit/index.js | 9 + .../unit/modules/compiler/codegen.spec.js | 451 + .../modules/compiler/compiler-options.spec.js | 128 + .../unit/modules/compiler/optimizer.spec.js | 240 + .../test/unit/modules/compiler/parser.spec.js | 520 + .../unit/modules/observer/observer.spec.js | 347 + .../unit/modules/observer/scheduler.spec.js | 142 + .../unit/modules/observer/watcher.spec.js | 181 + .../test/unit/modules/sfc/sfc-parser.spec.js | 144 + .../test/unit/modules/util/next-tick.spec.js | 34 + .../modules/vdom/create-component.spec.js | 118 + .../unit/modules/vdom/create-element.spec.js | 155 + .../unit/modules/vdom/modules/attrs.spec.js | 102 + .../unit/modules/vdom/modules/class.spec.js | 107 + .../modules/vdom/modules/directive.spec.js | 38 + .../modules/vdom/modules/dom-props.spec.js | 90 + .../unit/modules/vdom/modules/events.spec.js | 45 + .../unit/modules/vdom/modules/style.spec.js | 35 + .../unit/modules/vdom/patch/children.spec.js | 489 + .../modules/vdom/patch/edge-cases.spec.js | 143 + .../unit/modules/vdom/patch/element.spec.js | 60 + .../unit/modules/vdom/patch/hooks.spec.js | 321 + .../unit/modules/vdom/patch/hydration.spec.js | 176 + assets/vue/test/weex/.eslintrc | 9 + assets/vue/test/weex/compiler/append.spec.js | 0 assets/vue/test/weex/compiler/class.spec.js | 56 + assets/vue/test/weex/compiler/compile.spec.js | 45 + assets/vue/test/weex/compiler/style.spec.js | 83 + assets/vue/test/weex/compiler/v-model.spec.js | 53 + assets/vue/test/weex/helpers/index.js | 66 + assets/vue/test/weex/jasmine.json | 9 + assets/vue/test/weex/runtime/attrs.spec.js | 124 + assets/vue/test/weex/runtime/class.spec.js | 238 + assets/vue/test/weex/runtime/events.spec.js | 144 + .../vue/test/weex/runtime/framework.spec.js | 670 + assets/vue/test/weex/runtime/node.spec.js | 518 + assets/vue/test/weex/runtime/style.spec.js | 161 + assets/vue/types/index.d.ts | 37 + assets/vue/types/options.d.ts | 98 + assets/vue/types/plugin.d.ts | 8 + assets/vue/types/test/augmentation-test.ts | 35 + assets/vue/types/test/options-test.ts | 216 + assets/vue/types/test/plugin-test.ts | 19 + assets/vue/types/test/tsconfig.json | 27 + assets/vue/types/test/vue-test.ts | 87 + assets/vue/types/typings.json | 4 + assets/vue/types/vnode.d.ts | 69 + assets/vue/types/vue.d.ts | 92 + assets/vue/yarn.lock | 4876 +++++ composer.json | 4 +- 430 files changed, 90652 insertions(+), 28014 deletions(-) create mode 100644 assets/vue/.babelrc delete mode 100644 assets/vue/.bower.json create mode 100644 assets/vue/.eslintignore create mode 100644 assets/vue/.eslintrc create mode 100644 assets/vue/.flowconfig create mode 100644 assets/vue/.github/CODE_OF_CONDUCT.md create mode 100644 assets/vue/.github/CONTRIBUTING.md create mode 100644 assets/vue/.github/ISSUE_TEMPLATE.md create mode 100644 assets/vue/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 assets/vue/.gitignore create mode 100644 assets/vue/BACKERS.md create mode 100644 assets/vue/README.md create mode 100644 assets/vue/benchmarks/big-table/demo.css create mode 100644 assets/vue/benchmarks/big-table/index.html create mode 100644 assets/vue/benchmarks/big-table/style.css create mode 100644 assets/vue/benchmarks/dbmon/ENV.js create mode 100644 assets/vue/benchmarks/dbmon/app.js create mode 100644 assets/vue/benchmarks/dbmon/index.html create mode 100644 assets/vue/benchmarks/dbmon/lib/bootstrap.min.css create mode 100644 assets/vue/benchmarks/dbmon/lib/memory-stats.js create mode 100644 assets/vue/benchmarks/dbmon/lib/monitor.js create mode 100644 assets/vue/benchmarks/dbmon/lib/styles.css create mode 100644 assets/vue/benchmarks/reorder-list/index.html create mode 100644 assets/vue/benchmarks/ssr/README.md create mode 100644 assets/vue/benchmarks/ssr/common.js create mode 100644 assets/vue/benchmarks/ssr/renderToStream.js create mode 100644 assets/vue/benchmarks/ssr/renderToString.js create mode 100644 assets/vue/benchmarks/svg/index.html create mode 100644 assets/vue/benchmarks/uptime/index.html delete mode 100644 assets/vue/bower.json create mode 100644 assets/vue/build/alias.js create mode 100644 assets/vue/build/build.js create mode 100644 assets/vue/build/ci.sh create mode 100644 assets/vue/build/config.js create mode 100644 assets/vue/build/get-weex-version.js create mode 100644 assets/vue/build/git-hooks/pre-commit create mode 100644 assets/vue/build/karma.base.config.js create mode 100644 assets/vue/build/karma.cover.config.js create mode 100644 assets/vue/build/karma.dev.config.js create mode 100644 assets/vue/build/karma.sauce.config.js create mode 100644 assets/vue/build/karma.unit.config.js create mode 100644 assets/vue/build/nightwatch.config.js create mode 100644 assets/vue/build/release-weex.sh create mode 100644 assets/vue/build/release.sh create mode 100644 assets/vue/circle.yml create mode 100644 assets/vue/dist/README.md create mode 100644 assets/vue/dist/vue.runtime.common.js create mode 100644 assets/vue/dist/vue.runtime.js create mode 100644 assets/vue/dist/vue.runtime.min.js create mode 100644 assets/vue/examples/commits/app.js create mode 100644 assets/vue/examples/commits/index.html create mode 100644 assets/vue/examples/elastic-header/index.html create mode 100644 assets/vue/examples/elastic-header/style.css create mode 100644 assets/vue/examples/firebase/app.js create mode 100644 assets/vue/examples/firebase/index.html create mode 100644 assets/vue/examples/firebase/style.css create mode 100644 assets/vue/examples/grid/grid.js create mode 100644 assets/vue/examples/grid/index.html create mode 100644 assets/vue/examples/grid/style.css create mode 100644 assets/vue/examples/markdown/index.html create mode 100644 assets/vue/examples/markdown/style.css create mode 100644 assets/vue/examples/modal/index.html create mode 100644 assets/vue/examples/modal/style.css create mode 100644 assets/vue/examples/move-animations/index.html create mode 100644 assets/vue/examples/select2/index.html create mode 100644 assets/vue/examples/svg/index.html create mode 100644 assets/vue/examples/svg/style.css create mode 100644 assets/vue/examples/svg/svg.js create mode 100644 assets/vue/examples/todomvc/app.js create mode 100644 assets/vue/examples/todomvc/index.html create mode 100644 assets/vue/examples/todomvc/readme.md create mode 100644 assets/vue/examples/tree/index.html create mode 100644 assets/vue/examples/tree/tree.js create mode 100644 assets/vue/flow/compiler.js create mode 100644 assets/vue/flow/component.js create mode 100644 assets/vue/flow/global-api.js create mode 100644 assets/vue/flow/modules.js create mode 100644 assets/vue/flow/options.js create mode 100644 assets/vue/flow/ssr.js create mode 100644 assets/vue/flow/vnode.js create mode 100644 assets/vue/package.json create mode 100644 assets/vue/packages/vue-server-renderer/README.md create mode 100644 assets/vue/packages/vue-server-renderer/build.js create mode 100644 assets/vue/packages/vue-server-renderer/index.js create mode 100644 assets/vue/packages/vue-server-renderer/package.json create mode 100644 assets/vue/packages/vue-template-compiler/README.md create mode 100644 assets/vue/packages/vue-template-compiler/build.js create mode 100644 assets/vue/packages/vue-template-compiler/index.js create mode 100644 assets/vue/packages/vue-template-compiler/package.json create mode 100644 assets/vue/packages/weex-template-compiler/README.md create mode 100644 assets/vue/packages/weex-template-compiler/build.js create mode 100644 assets/vue/packages/weex-template-compiler/index.js create mode 100644 assets/vue/packages/weex-template-compiler/package.json create mode 100644 assets/vue/packages/weex-vue-framework/README.md create mode 100644 assets/vue/packages/weex-vue-framework/index.js create mode 100644 assets/vue/packages/weex-vue-framework/package.json delete mode 100644 assets/vue/src/batcher.js delete mode 100644 assets/vue/src/cache.js create mode 100644 assets/vue/src/compiler/codegen/events.js create mode 100644 assets/vue/src/compiler/codegen/index.js delete mode 100644 assets/vue/src/compiler/compile-props.js delete mode 100644 assets/vue/src/compiler/compile.js create mode 100644 assets/vue/src/compiler/directives/bind.js create mode 100644 assets/vue/src/compiler/directives/index.js create mode 100644 assets/vue/src/compiler/error-detector.js create mode 100644 assets/vue/src/compiler/helpers.js create mode 100644 assets/vue/src/compiler/optimizer.js create mode 100644 assets/vue/src/compiler/parser/entity-decoder.js create mode 100644 assets/vue/src/compiler/parser/filter-parser.js create mode 100644 assets/vue/src/compiler/parser/html-parser.js create mode 100644 assets/vue/src/compiler/parser/index.js create mode 100644 assets/vue/src/compiler/parser/text-parser.js delete mode 100644 assets/vue/src/compiler/resolve-slots.js delete mode 100644 assets/vue/src/compiler/transclude.js delete mode 100644 assets/vue/src/config.js create mode 100644 assets/vue/src/core/components/index.js create mode 100644 assets/vue/src/core/components/keep-alive.js create mode 100644 assets/vue/src/core/config.js create mode 100644 assets/vue/src/core/global-api/assets.js create mode 100644 assets/vue/src/core/global-api/extend.js create mode 100644 assets/vue/src/core/global-api/index.js create mode 100644 assets/vue/src/core/global-api/mixin.js create mode 100644 assets/vue/src/core/global-api/use.js create mode 100644 assets/vue/src/core/index.js create mode 100644 assets/vue/src/core/instance/events.js create mode 100644 assets/vue/src/core/instance/index.js create mode 100644 assets/vue/src/core/instance/init.js create mode 100644 assets/vue/src/core/instance/lifecycle.js create mode 100644 assets/vue/src/core/instance/proxy.js create mode 100644 assets/vue/src/core/instance/render.js create mode 100644 assets/vue/src/core/instance/state.js create mode 100644 assets/vue/src/core/observer/array.js create mode 100644 assets/vue/src/core/observer/dep.js create mode 100644 assets/vue/src/core/observer/index.js create mode 100644 assets/vue/src/core/observer/scheduler.js create mode 100644 assets/vue/src/core/observer/watcher.js create mode 100644 assets/vue/src/core/util/debug.js create mode 100644 assets/vue/src/core/util/env.js rename assets/vue/src/{ => core}/util/index.js (73%) create mode 100644 assets/vue/src/core/util/lang.js create mode 100644 assets/vue/src/core/util/options.js create mode 100644 assets/vue/src/core/util/props.js create mode 100644 assets/vue/src/core/vdom/create-component.js create mode 100644 assets/vue/src/core/vdom/create-element.js create mode 100644 assets/vue/src/core/vdom/helpers/index.js create mode 100644 assets/vue/src/core/vdom/helpers/merge-hook.js create mode 100644 assets/vue/src/core/vdom/helpers/normalize-children.js create mode 100644 assets/vue/src/core/vdom/helpers/update-listeners.js create mode 100644 assets/vue/src/core/vdom/modules/directives.js create mode 100644 assets/vue/src/core/vdom/modules/index.js create mode 100644 assets/vue/src/core/vdom/modules/ref.js create mode 100644 assets/vue/src/core/vdom/patch.js create mode 100644 assets/vue/src/core/vdom/vnode.js delete mode 100644 assets/vue/src/directive.js delete mode 100644 assets/vue/src/directives/element/index.js delete mode 100644 assets/vue/src/directives/element/partial.js delete mode 100644 assets/vue/src/directives/element/slot.js delete mode 100644 assets/vue/src/directives/internal/class.js delete mode 100644 assets/vue/src/directives/internal/component.js delete mode 100644 assets/vue/src/directives/internal/index.js delete mode 100644 assets/vue/src/directives/internal/prop.js delete mode 100644 assets/vue/src/directives/internal/style.js delete mode 100644 assets/vue/src/directives/internal/transition.js delete mode 100644 assets/vue/src/directives/priorities.js delete mode 100644 assets/vue/src/directives/public/bind.js delete mode 100644 assets/vue/src/directives/public/cloak.js delete mode 100644 assets/vue/src/directives/public/el.js delete mode 100644 assets/vue/src/directives/public/for.js delete mode 100644 assets/vue/src/directives/public/html.js delete mode 100644 assets/vue/src/directives/public/if.js delete mode 100644 assets/vue/src/directives/public/index.js delete mode 100644 assets/vue/src/directives/public/model/checkbox.js delete mode 100644 assets/vue/src/directives/public/model/index.js delete mode 100644 assets/vue/src/directives/public/model/radio.js delete mode 100644 assets/vue/src/directives/public/model/select.js delete mode 100644 assets/vue/src/directives/public/model/text.js delete mode 100644 assets/vue/src/directives/public/on.js delete mode 100644 assets/vue/src/directives/public/ref.js delete mode 100644 assets/vue/src/directives/public/show.js delete mode 100644 assets/vue/src/directives/public/text.js create mode 100644 assets/vue/src/entries/web-compiler.js create mode 100644 assets/vue/src/entries/web-runtime-with-compiler.js create mode 100644 assets/vue/src/entries/web-runtime.js create mode 100644 assets/vue/src/entries/web-server-renderer.js create mode 100644 assets/vue/src/entries/weex-compiler.js create mode 100644 assets/vue/src/entries/weex-framework.js delete mode 100644 assets/vue/src/filters/array-filters.js delete mode 100644 assets/vue/src/filters/index.js delete mode 100644 assets/vue/src/fragment/factory.js delete mode 100644 assets/vue/src/fragment/fragment.js delete mode 100644 assets/vue/src/global-api.js delete mode 100644 assets/vue/src/index.js delete mode 100644 assets/vue/src/instance/api/data.js delete mode 100644 assets/vue/src/instance/api/dom.js delete mode 100644 assets/vue/src/instance/api/events.js delete mode 100644 assets/vue/src/instance/api/lifecycle.js delete mode 100644 assets/vue/src/instance/internal/events.js delete mode 100644 assets/vue/src/instance/internal/init.js delete mode 100644 assets/vue/src/instance/internal/lifecycle.js delete mode 100644 assets/vue/src/instance/internal/misc.js delete mode 100644 assets/vue/src/instance/internal/state.js delete mode 100644 assets/vue/src/instance/vue.js delete mode 100644 assets/vue/src/observer/array.js delete mode 100644 assets/vue/src/observer/dep.js delete mode 100644 assets/vue/src/observer/index.js delete mode 100644 assets/vue/src/parsers/directive.js delete mode 100644 assets/vue/src/parsers/expression.js delete mode 100644 assets/vue/src/parsers/path.js delete mode 100644 assets/vue/src/parsers/template.js delete mode 100644 assets/vue/src/parsers/text.js create mode 100644 assets/vue/src/platforms/web/compiler/directives/html.js create mode 100644 assets/vue/src/platforms/web/compiler/directives/index.js create mode 100644 assets/vue/src/platforms/web/compiler/directives/model.js create mode 100644 assets/vue/src/platforms/web/compiler/directives/text.js create mode 100644 assets/vue/src/platforms/web/compiler/index.js create mode 100644 assets/vue/src/platforms/web/compiler/modules/class.js create mode 100644 assets/vue/src/platforms/web/compiler/modules/index.js create mode 100644 assets/vue/src/platforms/web/compiler/modules/style.js create mode 100644 assets/vue/src/platforms/web/compiler/util.js create mode 100644 assets/vue/src/platforms/web/runtime/class-util.js create mode 100644 assets/vue/src/platforms/web/runtime/components/index.js create mode 100644 assets/vue/src/platforms/web/runtime/components/transition-group.js create mode 100644 assets/vue/src/platforms/web/runtime/components/transition.js create mode 100644 assets/vue/src/platforms/web/runtime/directives/index.js create mode 100644 assets/vue/src/platforms/web/runtime/directives/model.js create mode 100644 assets/vue/src/platforms/web/runtime/directives/show.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/attrs.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/class.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/dom-props.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/events.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/index.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/style.js create mode 100644 assets/vue/src/platforms/web/runtime/modules/transition.js create mode 100644 assets/vue/src/platforms/web/runtime/node-ops.js create mode 100644 assets/vue/src/platforms/web/runtime/patch.js create mode 100644 assets/vue/src/platforms/web/runtime/transition-util.js create mode 100644 assets/vue/src/platforms/web/server/directives/index.js create mode 100644 assets/vue/src/platforms/web/server/directives/show.js create mode 100644 assets/vue/src/platforms/web/server/modules/attrs.js create mode 100644 assets/vue/src/platforms/web/server/modules/class.js create mode 100644 assets/vue/src/platforms/web/server/modules/dom-props.js create mode 100644 assets/vue/src/platforms/web/server/modules/index.js create mode 100644 assets/vue/src/platforms/web/server/modules/style.js create mode 100644 assets/vue/src/platforms/web/server/util.js create mode 100644 assets/vue/src/platforms/web/util/attrs.js create mode 100644 assets/vue/src/platforms/web/util/class.js create mode 100644 assets/vue/src/platforms/web/util/compat.js create mode 100644 assets/vue/src/platforms/web/util/element.js create mode 100644 assets/vue/src/platforms/web/util/index.js create mode 100644 assets/vue/src/platforms/web/util/style.js create mode 100644 assets/vue/src/platforms/weex/compiler/directives/index.js create mode 100644 assets/vue/src/platforms/weex/compiler/directives/model.js create mode 100644 assets/vue/src/platforms/weex/compiler/index.js create mode 100644 assets/vue/src/platforms/weex/compiler/modules/append.js create mode 100644 assets/vue/src/platforms/weex/compiler/modules/class.js create mode 100644 assets/vue/src/platforms/weex/compiler/modules/index.js create mode 100644 assets/vue/src/platforms/weex/compiler/modules/style.js create mode 100644 assets/vue/src/platforms/weex/runtime/config.js create mode 100644 assets/vue/src/platforms/weex/runtime/directives/index.js create mode 100644 assets/vue/src/platforms/weex/runtime/index.js create mode 100644 assets/vue/src/platforms/weex/runtime/modules/attrs.js create mode 100644 assets/vue/src/platforms/weex/runtime/modules/class.js create mode 100644 assets/vue/src/platforms/weex/runtime/modules/events.js create mode 100644 assets/vue/src/platforms/weex/runtime/modules/index.js create mode 100644 assets/vue/src/platforms/weex/runtime/modules/style.js create mode 100644 assets/vue/src/platforms/weex/runtime/node-ops.js create mode 100644 assets/vue/src/platforms/weex/runtime/patch.js create mode 100644 assets/vue/src/platforms/weex/util/index.js create mode 100644 assets/vue/src/server/create-bundle-renderer.js create mode 100644 assets/vue/src/server/create-renderer.js create mode 100644 assets/vue/src/server/render-stream.js create mode 100644 assets/vue/src/server/render.js create mode 100644 assets/vue/src/server/run-in-vm.js create mode 100644 assets/vue/src/server/write.js create mode 100644 assets/vue/src/sfc/parser.js create mode 100644 assets/vue/src/shared/util.js delete mode 100644 assets/vue/src/transition/index.js delete mode 100644 assets/vue/src/transition/queue.js delete mode 100644 assets/vue/src/transition/transition.js delete mode 100644 assets/vue/src/util/component.js delete mode 100644 assets/vue/src/util/debug.js delete mode 100644 assets/vue/src/util/dom.js delete mode 100644 assets/vue/src/util/env.js delete mode 100644 assets/vue/src/util/lang.js delete mode 100644 assets/vue/src/util/options.js delete mode 100644 assets/vue/src/watcher.js create mode 100644 assets/vue/test/e2e/.eslintrc create mode 100644 assets/vue/test/e2e/runner.js create mode 100644 assets/vue/test/e2e/specs/commits.js create mode 100644 assets/vue/test/e2e/specs/grid.js create mode 100644 assets/vue/test/e2e/specs/markdown.js create mode 100644 assets/vue/test/e2e/specs/modal.js create mode 100644 assets/vue/test/e2e/specs/select2.js create mode 100644 assets/vue/test/e2e/specs/svg.js create mode 100644 assets/vue/test/e2e/specs/todomvc.js create mode 100644 assets/vue/test/e2e/specs/tree.js create mode 100644 assets/vue/test/helpers/.eslintrc create mode 100644 assets/vue/test/helpers/classlist.js create mode 100644 assets/vue/test/helpers/to-equal.js create mode 100644 assets/vue/test/helpers/to-have-been-warned.js create mode 100644 assets/vue/test/helpers/trigger-event.js create mode 100644 assets/vue/test/helpers/vdom.js create mode 100644 assets/vue/test/helpers/wait-for-update.js create mode 100644 assets/vue/test/ssr/.eslintrc create mode 100644 assets/vue/test/ssr/fixtures/app.js create mode 100644 assets/vue/test/ssr/fixtures/cache.js create mode 100644 assets/vue/test/ssr/fixtures/error.js create mode 100644 assets/vue/test/ssr/jasmine.json create mode 100644 assets/vue/test/ssr/ssr-bundle-render.spec.js create mode 100644 assets/vue/test/ssr/ssr-stream.spec.js create mode 100644 assets/vue/test/ssr/ssr-string.spec.js create mode 100644 assets/vue/test/unit/.eslintrc create mode 100644 assets/vue/test/unit/features/component/component-async.spec.js create mode 100644 assets/vue/test/unit/features/component/component-keep-alive.spec.js create mode 100644 assets/vue/test/unit/features/component/component-scoped-slot.spec.js create mode 100644 assets/vue/test/unit/features/component/component-slot.spec.js create mode 100644 assets/vue/test/unit/features/component/component.spec.js create mode 100644 assets/vue/test/unit/features/directives/bind.spec.js create mode 100644 assets/vue/test/unit/features/directives/class.spec.js create mode 100644 assets/vue/test/unit/features/directives/cloak.spec.js create mode 100644 assets/vue/test/unit/features/directives/for.spec.js create mode 100644 assets/vue/test/unit/features/directives/html.spec.js create mode 100644 assets/vue/test/unit/features/directives/if.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-checkbox.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-component.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-dynamic.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-file.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-parse.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-radio.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-select.spec.js create mode 100644 assets/vue/test/unit/features/directives/model-text.spec.js create mode 100644 assets/vue/test/unit/features/directives/on.spec.js create mode 100644 assets/vue/test/unit/features/directives/once.spec.js create mode 100644 assets/vue/test/unit/features/directives/pre.spec.js create mode 100644 assets/vue/test/unit/features/directives/show.spec.js create mode 100644 assets/vue/test/unit/features/directives/static-style-parser.spec.js create mode 100644 assets/vue/test/unit/features/directives/style.spec.js create mode 100644 assets/vue/test/unit/features/directives/text.spec.js create mode 100644 assets/vue/test/unit/features/filter/filter.spec.js create mode 100644 assets/vue/test/unit/features/global-api/assets.spec.js create mode 100644 assets/vue/test/unit/features/global-api/compile.spec.js create mode 100644 assets/vue/test/unit/features/global-api/config.spec.js create mode 100644 assets/vue/test/unit/features/global-api/extend.spec.js create mode 100644 assets/vue/test/unit/features/global-api/mixin.spec.js create mode 100644 assets/vue/test/unit/features/global-api/set-delete.spec.js create mode 100644 assets/vue/test/unit/features/global-api/use.spec.js create mode 100644 assets/vue/test/unit/features/instance/init.spec.js create mode 100644 assets/vue/test/unit/features/instance/methods-data.spec.js create mode 100644 assets/vue/test/unit/features/instance/methods-events.spec.js create mode 100644 assets/vue/test/unit/features/instance/methods-lifecycle.spec.js create mode 100644 assets/vue/test/unit/features/instance/properties.spec.js create mode 100644 assets/vue/test/unit/features/instance/render-proxy.spec.js create mode 100644 assets/vue/test/unit/features/options/_scopeId.spec.js create mode 100644 assets/vue/test/unit/features/options/components.spec.js create mode 100644 assets/vue/test/unit/features/options/computed.spec.js create mode 100644 assets/vue/test/unit/features/options/data.spec.js create mode 100644 assets/vue/test/unit/features/options/delimiters.spec.js create mode 100644 assets/vue/test/unit/features/options/directives.spec.js create mode 100644 assets/vue/test/unit/features/options/el.spec.js create mode 100644 assets/vue/test/unit/features/options/extends.spec.js create mode 100644 assets/vue/test/unit/features/options/functional.spec.js create mode 100644 assets/vue/test/unit/features/options/lifecycle.spec.js create mode 100644 assets/vue/test/unit/features/options/methods.spec.js create mode 100644 assets/vue/test/unit/features/options/mixins.spec.js create mode 100644 assets/vue/test/unit/features/options/name.spec.js create mode 100644 assets/vue/test/unit/features/options/parent.spec.js create mode 100644 assets/vue/test/unit/features/options/props.spec.js create mode 100644 assets/vue/test/unit/features/options/propsData.spec.js create mode 100644 assets/vue/test/unit/features/options/render.spec.js create mode 100644 assets/vue/test/unit/features/options/template.spec.js create mode 100644 assets/vue/test/unit/features/options/watch.spec.js create mode 100644 assets/vue/test/unit/features/ref.spec.js create mode 100644 assets/vue/test/unit/features/transition/inject-styles.js create mode 100644 assets/vue/test/unit/features/transition/transition-group.spec.js create mode 100644 assets/vue/test/unit/features/transition/transition-mode.spec.js create mode 100644 assets/vue/test/unit/features/transition/transition.spec.js create mode 100644 assets/vue/test/unit/index.js create mode 100644 assets/vue/test/unit/modules/compiler/codegen.spec.js create mode 100644 assets/vue/test/unit/modules/compiler/compiler-options.spec.js create mode 100644 assets/vue/test/unit/modules/compiler/optimizer.spec.js create mode 100644 assets/vue/test/unit/modules/compiler/parser.spec.js create mode 100644 assets/vue/test/unit/modules/observer/observer.spec.js create mode 100644 assets/vue/test/unit/modules/observer/scheduler.spec.js create mode 100644 assets/vue/test/unit/modules/observer/watcher.spec.js create mode 100644 assets/vue/test/unit/modules/sfc/sfc-parser.spec.js create mode 100644 assets/vue/test/unit/modules/util/next-tick.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/create-component.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/create-element.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/attrs.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/class.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/directive.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/dom-props.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/events.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/modules/style.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/patch/children.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/patch/edge-cases.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/patch/element.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/patch/hooks.spec.js create mode 100644 assets/vue/test/unit/modules/vdom/patch/hydration.spec.js create mode 100644 assets/vue/test/weex/.eslintrc create mode 100644 assets/vue/test/weex/compiler/append.spec.js create mode 100644 assets/vue/test/weex/compiler/class.spec.js create mode 100644 assets/vue/test/weex/compiler/compile.spec.js create mode 100644 assets/vue/test/weex/compiler/style.spec.js create mode 100644 assets/vue/test/weex/compiler/v-model.spec.js create mode 100644 assets/vue/test/weex/helpers/index.js create mode 100644 assets/vue/test/weex/jasmine.json create mode 100644 assets/vue/test/weex/runtime/attrs.spec.js create mode 100644 assets/vue/test/weex/runtime/class.spec.js create mode 100644 assets/vue/test/weex/runtime/events.spec.js create mode 100644 assets/vue/test/weex/runtime/framework.spec.js create mode 100644 assets/vue/test/weex/runtime/node.spec.js create mode 100644 assets/vue/test/weex/runtime/style.spec.js create mode 100644 assets/vue/types/index.d.ts create mode 100644 assets/vue/types/options.d.ts create mode 100644 assets/vue/types/plugin.d.ts create mode 100644 assets/vue/types/test/augmentation-test.ts create mode 100644 assets/vue/types/test/options-test.ts create mode 100644 assets/vue/types/test/plugin-test.ts create mode 100644 assets/vue/types/test/tsconfig.json create mode 100644 assets/vue/types/test/vue-test.ts create mode 100644 assets/vue/types/typings.json create mode 100644 assets/vue/types/vnode.d.ts create mode 100644 assets/vue/types/vue.d.ts create mode 100644 assets/vue/yarn.lock diff --git a/assets/vue/.babelrc b/assets/vue/.babelrc new file mode 100644 index 0000000..311db76 --- /dev/null +++ b/assets/vue/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": ["es2015", "flow-vue"], + "plugins": ["transform-vue-jsx"], + "ignore": [ + "dist/*.js", + "packages/**/*.js" + ] +} diff --git a/assets/vue/.bower.json b/assets/vue/.bower.json deleted file mode 100644 index a9be201..0000000 --- a/assets/vue/.bower.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "vue", - "main": "dist/vue.js", - "description": "Simple, Fast & Composable MVVM for building interative interfaces", - "authors": [ - "Evan You " - ], - "license": "MIT", - "ignore": [ - ".*", - "examples", - "build", - "perf", - "test", - "grunt", - "gruntfile.js", - "*.json", - "*.md", - "*.yml" - ], - "homepage": "https://github.com/vuejs/vue", - "version": "1.0.18", - "_release": "1.0.18", - "_resolution": { - "type": "version", - "tag": "v1.0.18", - "commit": "95509928fbc513eee5ddd876ac14c95149d8f2bb" - }, - "_source": "git://github.com/vuejs/vue.git", - "_target": "~1.0.18", - "_originalSource": "vue", - "_direct": true -} \ No newline at end of file diff --git a/assets/vue/.eslintignore b/assets/vue/.eslintignore new file mode 100644 index 0000000..7bf90e2 --- /dev/null +++ b/assets/vue/.eslintignore @@ -0,0 +1,3 @@ +flow +dist +packages diff --git a/assets/vue/.eslintrc b/assets/vue/.eslintrc new file mode 100644 index 0000000..fc040f8 --- /dev/null +++ b/assets/vue/.eslintrc @@ -0,0 +1,14 @@ +{ + "root": true, + "parser": "babel-eslint", + "extends": "vue", + "plugins": ["flowtype"], + "globals": { + "__WEEX__": true + }, + "rules": { + "no-useless-escape": 0, + "flowtype/define-flow-type": 1, + "flowtype/use-flow-type": 1 + } +} diff --git a/assets/vue/.flowconfig b/assets/vue/.flowconfig new file mode 100644 index 0000000..62ebbff --- /dev/null +++ b/assets/vue/.flowconfig @@ -0,0 +1,21 @@ +[ignore] +.*/node_modules/.* +.*/test/.* +.*/build/.* +.*/examples/.* +.*/benchmarks/.* + +[include] + +[libs] +flow + +[options] +module.name_mapper='^compiler/\(.*\)$' -> '/src/compiler/\1' +module.name_mapper='^core/\(.*\)$' -> '/src/core/\1' +module.name_mapper='^shared/\(.*\)$' -> '/src/shared/\1' +module.name_mapper='^web/\(.*\)$' -> '/src/platforms/web/\1' +module.name_mapper='^weex/\(.*\)$' -> '/src/platforms/weex/\1' +module.name_mapper='^server/\(.*\)$' -> '/src/server/\1' +module.name_mapper='^entries/\(.*\)$' -> '/src/entries/\1' +module.name_mapper='^sfc/\(.*\)$' -> '/src/sfc/\1' diff --git a/assets/vue/.github/CODE_OF_CONDUCT.md b/assets/vue/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4ead0e1 --- /dev/null +++ b/assets/vue/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,13 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion. + +Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) diff --git a/assets/vue/.github/CONTRIBUTING.md b/assets/vue/.github/CONTRIBUTING.md new file mode 100644 index 0000000..25ed802 --- /dev/null +++ b/assets/vue/.github/CONTRIBUTING.md @@ -0,0 +1,147 @@ +# Vue.js Contributing Guide + +Hi! I’m really excited that you are interested in contributing to Vue.js. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines. + +- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md) +- [Issue Reporting Guidelines](#issue-reporting-guidelines) +- [Pull Request Guidelines](#pull-request-guidelines) +- [Development Setup](#development-setup) +- [Project Structure](#project-structure) + +## Issue Reporting Guidelines + +- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately. + + - For simple beginner questions, you can get quick answers from [The Gitter chat room](https://gitter.im/vuejs/vue). + + - For more complicated questions, you can use [the official forum](http://forum.vuejs.org/) or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you! + +- Try to search for your issue, it may have already been answered or even fixed in the development branch. + +- Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using. + +- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable. + +- Use only the minimum amount of code necessary to reproduce the unexpected behavior. A good bug report should isolate specific methods that exhibit unexpected behavior and precisely define how expectations were violated. What did you expect the method or methods to do, and how did the observed behavior differ? The more precisely you isolate the issue, the faster we can investigate. + +- Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed. + +- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](http://jsfiddle.net/df4Lnuw6/) that already includes the latest version of Vue. + +- For bugs that involves build setups, you can create a reproduction repository with steps in the README. + +- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. + +- Most importantly, we beg your patience: the team must balance your request against many other responsibilities — fixing other bugs, answering other questions, new features, new documentation, etc. The issue list is not paid support and we cannot make guarantees about how fast your issue can be resolved. + +## Pull Request Guidelines + +- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.** + +- Checkout a topic branch from the relevant branch, e.g. `dev`, and merge back against that branch. + +- Work in the `src` folder and **DO NOT** checkin `dist` in the commits. + +- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging. + +- Make sure `npm test` passes. (see [development setup](#development-setup)) + +- If adding new feature: + - Add accompanying test case. + - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it. + +- If fixing a bug: + - If you are resolving a special issue, add `(fix #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`. + - Provide detailed description of the bug in the PR. Live demo preferred. + - Add appropriate test coverage if applicable. + +## Development Setup + +You will need [Node.js](http://nodejs.org) **version 6+** and [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (needed for running Selenium server during e2e tests). + +After cloning the repo, run: + +``` bash +$ npm install +``` + +If you are on a Unix-like system, optionally install the Git pre-commit hook with: + +``` bash +$ npm run install:hooks +``` + +This will run ESLint on changed files before each commit. + +### Commonly used NPM scripts + +``` bash +# watch and auto re-build dist/vue.js +$ npm run dev + +# watch and auto re-run unit tests in Chrome +$ npm run dev:test + +# build all dist files, including npm packages +$ npm run build + +# run the full test suite, include linting / type checking +$ npm test +``` + +There are some other scripts available in the `scripts` section of the `package.json` file. + +The default test script will do the following: lint with ESLint -> type check with Flow -> unit tests with coverage -> e2e tests. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand. + +## Project Structure + +- **`build`**: contains build-related configuration files. In most cases you don't need to touch them. + +- **`dist`**: contains built files for distribution. Note this directory is only updated when a release happens; they do not reflect the latest changes in development branches. + +- **`flow`**: contains type declarations for [Flow](https://flowtype.org/). These declarations are loaded **globally** and you will see them used in type annotations in normal source code. + +- **`packages`**: contains `vue-server-renderer` and `vue-template-compiler`, which are distributed as separate NPM packages. They are automatically generated from the source code and always have the same version with the main `vue` package. + +- **`test`**: contains all tests. The unit tests are written with [Jasmine](http://jasmine.github.io/2.3/introduction.html) and run with [Karma](http://karma-runner.github.io/0.13/index.html). The e2e tests are written for and run with [Nightwatch.js](http://nightwatchjs.org/). + +- **`src`**: contains the source code, obviously. The codebase is written in ES2015 with [Flow](https://flowtype.org/) type annotations. + + - **`entries`**: contains entries for different builds and packages. + + - **`web-runtime`**: the entry for `dist/vue.common.js`, a.k.a the runtime-only build. It does not include the template to render function compiler, so it does not support the `template` option. **This is set as the `main` field in `package.json` so it is the default export when you import Vue as an NPM package.** + + - **`web-runtime-with-compiler`**: the entry for `dist/vue.js`, a.k.a the standalone build. It includes the template to render function compiler. To use this build from the NPM packages, do `import Vue from 'vue/dist/vue'`, or alias `vue` to `vue/dist/vue` in your build tool configuration. + + - **`web-compiler.js`**: the entry for the `vue-template-compiler` NPM package. + + - **`web-server-renderer.js`**: the entry for the `vue-server-renderer` NPM package. + + - **`compiler`**: contains code for the template-to-render-function compiler. + + The compiler consists of a parser (converts template strings to element ASTs), an optimizer (detects static trees for vdom render optimization), and a code generator (generate render function code from element ASTs). Note the codegen directly generates code strings from the element AST - it's done this way for smaller code size because the compiler is shipped to the browser in the standalone build. + + - **`core`**: contains universal, platform-agnostic runtime code. + + The Vue 2.0 core is platform-agnostic - which means code inside `core` should be able to run in any JavaScript environment, be it the browser, Node.js, or an embedded JavaScript runtime in native applications. + + - **`observer`**: contains code related to the reactivity system. + + - **`vdom`**: contains code related to vdom element creation and patching. + + - **`instance`**: contains Vue instance constructor and prototype methods. + + - **`global-api`**: as the name suggests. + + - **`components`**: universal abstract components. Currently `keep-alive` is the only one. + + - **`server`**: contains code related to server-side rendering. + + - **`platforms`**: contains platform-specific code. + + Each platform module contains three parts: `compiler`, `runtime` and `server`, corresponding to the three directories above. Each part contains platform-specific modules/utilities which are then imported and injected to the core counterparts in platform-specific entry files. For example, the code implementing the logic behind `v-bind:class` is in `platforms/web/runtime/modules/class.js` - which is imported in `entries/web-runtime.js` and used to create the browser-specific vdom patching function. + + - **`sfc`**: contains single-file component (`*.vue` files) parsing logic. This is used in the `vue-template-compiler` package. + + - **`shared`**: contains utilities shared across the entire codebase. + diff --git a/assets/vue/.github/ISSUE_TEMPLATE.md b/assets/vue/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8026bb6 --- /dev/null +++ b/assets/vue/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,48 @@ + + + +### Vue.js version +2.0.2 + +### Reproduction Link + + + +### Steps to reproduce + +### What is Expected? + +### What is actually happening? diff --git a/assets/vue/.github/PULL_REQUEST_TEMPLATE.md b/assets/vue/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..811a6cd --- /dev/null +++ b/assets/vue/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,4 @@ + diff --git a/assets/vue/.gitignore b/assets/vue/.gitignore new file mode 100644 index 0000000..fdceac7 --- /dev/null +++ b/assets/vue/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +node_modules +*.log +explorations +TODOs.md +dist/*.gz +dist/*.map +dist/vue.common.min.js +test/e2e/reports +test/e2e/screenshots +coverage diff --git a/assets/vue/BACKERS.md b/assets/vue/BACKERS.md new file mode 100644 index 0000000..94b8ec3 --- /dev/null +++ b/assets/vue/BACKERS.md @@ -0,0 +1,186 @@ +# Backers + +You can join them in supporting Vue.js development by [pledging on Patreon](https://www.patreon.com/evanyou)! Backers in the same pledge level appear in the order of pledge date. + +### $2000 + + + + + +--- + +### $500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +--- + +### $250 + +It could be you! + +--- + +### $100 + + + + + + + + + + + + + +--- + +### $50+ + +- No Divide Studio +- James Kyle +- Blake Newman +- Lee Smith +- Adam Dorsey +- Greg McCarvell +- Yoshiya Hinosawa +- Wasim Khamlichi +- Jivan Roquet +- errorrik + +--- + +### $10+ + +- Sylvain Pollet-Villard +- Luca Borghini +- Kazuya Kawaguchi +- Keisuke Kita +- Anirudh Sanjeev +- Guido Bertolino +- Fábio Vedovelli +- Jack Barham +- Stephane Demoote +- Paul R. Dillinger +- Sean Washington +- Alun Davey +- Eduardo Kyvenko +- Thijs de Maa +- Joris Noordermeer +- Niklas Lifors +- An Phan +- Richard Wyke +- Roman Kuba +- Tom Conlon +- Matt Pickle +- Simon East +- Bill Columbia +- Hayden Bickerton +- Henry Zhu +- John Smith +- Benjamin Listwon +- Rainer Morgan +- Brian Jorden +- Christopher Dosin +- Lars Andreas Ness +- Drew Lustro +- Victor Tolbert +- Jon Pokrzyk +- Frank Dungan III +- Lanes.io +- Anders +- Dexter Miguel +- Stephen Michael Hartley +- TJ Fogarty +- Wen-Tien Chang +- Ole Støvern +- Valerian Cure +- Dani Ilops +- louisbl +- Yegor Sytnyk +- Guido H. +- Joan Cejudo +- Ian Walter +- Nikola Trifunovic +- Nicolas Mutis Mesa +- Fahed Toumi +- James Brooks +- Kirk Lewis +- Spenser +- Takuya Nishio +- Daniel Diekmeier +- Peter Thaleikis +- Karol Fabjanczuk +- Eduardo +- Lê Chương +- Webber Wang +- Daniel Schmitz +- Bruce Li +- Mohammed +- Sam Wainwright +- TJ Hillard +- Kyle Arrington +- Jason Land +- Miljan Aleksic +- James Ye +- Laurids Duellmann +- Christo Crampton +- Adon Metcalfe +- Paul Straw +- Jake Ingman +- Eduardo Camillo +- Barbara Liau +- Jens Lind +- Yegor Sytnyk +- Benson Wong +- Anthony Tsui +- Karol Fabjanczuk +- Isaac Sant +- Milos Stojanovic +- Matsumoto Takamasa +- Douglas Lowder +- Bess Brooks +- Christian Griffith +- Matt Rockwell +- Jarek Tkaczyk diff --git a/assets/vue/README.md b/assets/vue/README.md new file mode 100644 index 0000000..76b4325 --- /dev/null +++ b/assets/vue/README.md @@ -0,0 +1,101 @@ +

+ +

+ Build Status + Coverage Status + Downloads + Version + License +
+ Sauce Test Status +

+ +## Supporting Vue.js + +Vue.js is an MIT-licensed open source project. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/vuejs/vue/blob/dev/BACKERS.md). If you'd like to join them, check out [Vue.js' Patreon campaign](https://www.patreon.com/evanyou). + +

+ Special thanks to the generous sponsorship by: +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ + + +

+ +## Intro + +Vue.js is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API. Core features include: + +- [Declarative rendering with a plain JavaScript object based reactivity system.](https://vuejs.org/guide/index.html#Declarative-Rendering) +- [Component-oriented development style with tooling support](https://vuejs.org/guide/index.html#Composing-with-Components) +- Lean and extensible core +- [Flexible transition effect system](https://vuejs.org/guide/transitions.html) +- Fast without the need for complex optimization + +Note that Vue.js only supports [ES5-compliant browsers](http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported). To check out live examples and docs, visit [vuejs.org](https://vuejs.org). + +## Questions + +For questions and support please use the [Gitter chat room](https://gitter.im/vuejs/vue) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests. + +## Issues + +Please make sure to read the [Issue Reporting Checklist](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately. + +## Contribution + +Please make sure to read the [Contributing Guide](https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md) before making a pull request. If you have a Vue-related project/component/tool, add it with a pull-request to [this curated list](https://github.com/vuejs/awesome-vue)! + +## Changelog + +Details changes for each release are documented in the [release notes](https://github.com/vuejs/vue/releases). + +## Stay In Touch + +- For latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs) + +## License + +[MIT](http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2016 Evan You diff --git a/assets/vue/benchmarks/big-table/demo.css b/assets/vue/benchmarks/big-table/demo.css new file mode 100644 index 0000000..1094956 --- /dev/null +++ b/assets/vue/benchmarks/big-table/demo.css @@ -0,0 +1,15 @@ +form { + margin-bottom: 15px ; +} + +td.hidden { + color: #ccc; +} + +table.filtered td.item { + background-color: #FFFFBF; +} + +table.filtered td.item.hidden { + background-color: transparent; +} diff --git a/assets/vue/benchmarks/big-table/index.html b/assets/vue/benchmarks/big-table/index.html new file mode 100644 index 0000000..ea75516 --- /dev/null +++ b/assets/vue/benchmarks/big-table/index.html @@ -0,0 +1,163 @@ + + + + + + + + + + +
+

Rendering Dynamic Big Table

+

Reference: insin/ui-lib-samples/large-datasets

+ +

+ {{ rows }} x {{ cols }}, {{ optimized ? 'with' : 'without' }} optimization. {{ msg }} +

+ +

+ + + + +

+ +
+ Filter Data: + + + + + — + Filtering {{ filter }} + over {{ dataPoints }} data points, + {{ visibleCount() }} found. + + +
+ + + + + + +
{{ row.id }} + {{ item.value }} +
+
+ + + + diff --git a/assets/vue/benchmarks/big-table/style.css b/assets/vue/benchmarks/big-table/style.css new file mode 100644 index 0000000..d58a918 --- /dev/null +++ b/assets/vue/benchmarks/big-table/style.css @@ -0,0 +1,553 @@ +@font-face { + font-family: octicons-anchor; + src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff'); +} + +body { + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + text-size-adjust: 100%; + color: #333; + font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif; + font-size: 16px; + line-height: 1.6; + word-wrap: break-word; + padding: 1em; +} + +a { + background-color: transparent; +} + +a:active, +a:hover { + outline: 0; +} + +strong { + font-weight: bold; +} + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +img { + border: 0; +} + +hr { + box-sizing: content-box; + height: 0; +} + +pre { + overflow: auto; +} + +code, +kbd, +pre { + font-family: monospace, monospace; + font-size: 1em; +} + +input { + color: inherit; + font: inherit; + margin: 0; +} + +html input[disabled] { + cursor: default; +} + +input { + line-height: normal; +} + +input[type="checkbox"] { + box-sizing: border-box; + padding: 0; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +* { + box-sizing: border-box; +} + +input { + font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; +} + +a { + color: #4078c0; + text-decoration: none; +} + +a:hover, +a:active { + text-decoration: underline; +} + +hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #ddd; +} + +hr:before { + display: table; + content: ""; +} + +hr:after { + display: table; + clear: both; + content: ""; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: 15px; + margin-bottom: 15px; + line-height: 1.1; +} + +h1 { + font-size: 30px; +} +h1:first-child { + margin-top: 0; +} + +h2 { + font-size: 21px; +} + +h3 { + font-size: 16px; +} + +h4 { + font-size: 14px; +} + +h5 { + font-size: 12px; +} + +h6 { + font-size: 11px; +} + +blockquote { + margin: 0; +} + +ul, +ol { + padding: 0; + margin-top: 0; + margin-bottom: 0; +} + +ol ol, +ul ol { + list-style-type: lower-roman; +} + +ul ul ol, +ul ol ol, +ol ul ol, +ol ol ol { + list-style-type: lower-alpha; +} + +dd { + margin-left: 0; +} + +code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; +} + +pre { + margin-top: 0; + margin-bottom: 0; + font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; +} + +.octicon { + font: normal normal normal 16px/1 octicons-anchor; + display: inline-block; + text-decoration: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.octicon-link:before { + content: '\f05c'; +} + +.markdown-body>*:first-child { + margin-top: 0 !important; +} + +.markdown-body>*:last-child { + margin-bottom: 0 !important; +} + +a:not([href]) { + cursor: pointer; + text-decoration: none; +} + +.anchor { + position: absolute; + top: 0; + left: 0; + display: block; + padding-right: 6px; + padding-left: 30px; + margin-left: -30px; +} + +.anchor:focus { + outline: none; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + position: relative; + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; +} + +h1 .octicon-link, +h2 .octicon-link, +h3 .octicon-link, +h4 .octicon-link, +h5 .octicon-link, +h6 .octicon-link { + display: none; + color: #000; + vertical-align: middle; +} + +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + padding-left: 8px; + margin-left: -30px; + text-decoration: none; +} + +h1:hover .anchor .octicon-link, +h2:hover .anchor .octicon-link, +h3:hover .anchor .octicon-link, +h4:hover .anchor .octicon-link, +h5:hover .anchor .octicon-link, +h6:hover .anchor .octicon-link { + display: inline-block; +} + +h1 { + padding-bottom: 0.3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid #eee; +} + +h1 .anchor { + line-height: 1; +} + +h2 { + padding-bottom: 0.3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid #eee; +} + +h2 .anchor { + line-height: 1; +} + +h3 { + font-size: 1.5em; + line-height: 1.43; +} + +h3 .anchor { + line-height: 1.2; +} + +h4 { + font-size: 1.25em; +} + +h4 .anchor { + line-height: 1.2; +} + +h5 { + font-size: 1em; +} + +h5 .anchor { + line-height: 1.1; +} + +h6 { + font-size: 1em; + color: #777; +} + +h6 .anchor { + line-height: 1.1; +} + +p, +blockquote, +ul, +ol, +dl, +table, +pre { + margin-top: 0; + margin-bottom: 16px; +} + +hr { + height: 4px; + padding: 0; + margin: 16px 0; + background-color: #e7e7e7; + border: 0 none; +} + +ul, +ol { + padding-left: 2em; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-top: 0; + margin-bottom: 0; +} + +li>p { + margin-top: 16px; +} + +dl { + padding: 0; +} + +dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; +} + +dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +blockquote { + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; +} + +blockquote>:first-child { + margin-top: 0; +} + +blockquote>:last-child { + margin-bottom: 0; +} + +table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; +} + +table th { + font-weight: bold; +} + +table th, +table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +img { + max-width: 100%; + box-sizing: border-box; +} + +code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,0.04); + border-radius: 3px; +} + +code:before, +code:after { + letter-spacing: -0.2em; + content: "\00a0"; +} + +pre>code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.highlight { + margin-bottom: 16px; +} + +.highlight pre, +pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; +} + +.highlight pre { + margin-bottom: 0; + word-break: normal; +} + +pre { + word-wrap: normal; +} + +pre code { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +pre code:before, +pre code:after { + content: normal; +} + +kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +kbd { + display: inline-block; + padding: 3px 5px; + font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +.task-list-item { + list-style-type: none; +} + +.task-list-item+.task-list-item { + margin-top: 3px; +} + +.task-list-item input { + margin: 0 0.35em 0.25em -1.6em; + vertical-align: middle; +} + +:checked+.radio-label { + z-index: 1; + position: relative; + border-color: #4078c0; +} diff --git a/assets/vue/benchmarks/dbmon/ENV.js b/assets/vue/benchmarks/dbmon/ENV.js new file mode 100644 index 0000000..2559b7a --- /dev/null +++ b/assets/vue/benchmarks/dbmon/ENV.js @@ -0,0 +1,211 @@ +var ENV = ENV || (function() { + + var first = true; + var counter = 0; + var data; + var _base; + (_base = String.prototype).lpad || (_base.lpad = function(padding, toLength) { + return padding.repeat((toLength - this.length) / padding.length).concat(this); + }); + + function formatElapsed(value) { + var str = parseFloat(value).toFixed(2); + if (value > 60) { + minutes = Math.floor(value / 60); + comps = (value % 60).toFixed(2).split('.'); + seconds = comps[0].lpad('0', 2); + ms = comps[1]; + str = minutes + ":" + seconds + "." + ms; + } + return str; + } + + function getElapsedClassName(elapsed) { + var className = 'Query elapsed'; + if (elapsed >= 10.0) { + className += ' warn_long'; + } + else if (elapsed >= 1.0) { + className += ' warn'; + } + else { + className += ' short'; + } + return className; + } + + function countClassName(queries) { + var countClassName = "label"; + if (queries >= 20) { + countClassName += " label-important"; + } + else if (queries >= 10) { + countClassName += " label-warning"; + } + else { + countClassName += " label-success"; + } + return countClassName; + } + + function updateQuery(object) { + if (!object) { + object = {}; + } + var elapsed = Math.random() * 15; + object.elapsed = elapsed; + object.formatElapsed = formatElapsed(elapsed); + object.elapsedClassName = getElapsedClassName(elapsed); + object.query = "SELECT blah FROM something"; + object.waiting = Math.random() < 0.5; + if (Math.random() < 0.2) { + object.query = " in transaction"; + } + if (Math.random() < 0.1) { + object.query = "vacuum"; + } + return object; + } + + function cleanQuery(value) { + if (value) { + value.formatElapsed = ""; + value.elapsedClassName = ""; + value.query = ""; + value.elapsed = null; + value.waiting = null; + } else { + return { + query: "***", + formatElapsed: "", + elapsedClassName: "" + }; + } + } + + function generateRow(object, keepIdentity, counter) { + var nbQueries = Math.floor((Math.random() * 10) + 1); + if (!object) { + object = {}; + } + object.lastMutationId = counter; + object.nbQueries = nbQueries; + if (!object.lastSample) { + object.lastSample = {}; + } + if (!object.lastSample.topFiveQueries) { + object.lastSample.topFiveQueries = []; + } + if (keepIdentity) { + // for Angular optimization + if (!object.lastSample.queries) { + object.lastSample.queries = []; + for (var l = 0; l < 12; l++) { + object.lastSample.queries[l] = cleanQuery(); + } + } + for (var j in object.lastSample.queries) { + var value = object.lastSample.queries[j]; + if (j <= nbQueries) { + updateQuery(value); + } else { + cleanQuery(value); + } + } + } else { + object.lastSample.queries = []; + for (var j = 0; j < 12; j++) { + if (j < nbQueries) { + var value = updateQuery(cleanQuery()); + object.lastSample.queries.push(value); + } else { + object.lastSample.queries.push(cleanQuery()); + } + } + } + for (var i = 0; i < 5; i++) { + var source = object.lastSample.queries[i]; + object.lastSample.topFiveQueries[i] = source; + } + object.lastSample.nbQueries = nbQueries; + object.lastSample.countClassName = countClassName(nbQueries); + return object; + } + + function getData(keepIdentity) { + var oldData = data; + if (!keepIdentity) { // reset for each tick when !keepIdentity + data = []; + for (var i = 1; i <= ENV.rows; i++) { + data.push({ dbname: 'cluster' + i, query: "", formatElapsed: "", elapsedClassName: "" }); + data.push({ dbname: 'cluster' + i + ' slave', query: "", formatElapsed: "", elapsedClassName: "" }); + } + } + if (!data) { // first init when keepIdentity + data = []; + for (var i = 1; i <= ENV.rows; i++) { + data.push({ dbname: 'cluster' + i }); + data.push({ dbname: 'cluster' + i + ' slave' }); + } + oldData = data; + } + for (var i in data) { + var row = data[i]; + if (!keepIdentity && oldData && oldData[i]) { + row.lastSample = oldData[i].lastSample; + } + if (!row.lastSample || Math.random() < ENV.mutations()) { + counter = counter + 1; + if (!keepIdentity) { + row.lastSample = null; + } + generateRow(row, keepIdentity, counter); + } else { + data[i] = oldData[i]; + } + } + first = false; + return { + toArray: function() { + return data; + } + }; + } + + var mutationsValue = 0.5; + + function mutations(value) { + if (value) { + mutationsValue = value; + return mutationsValue; + } else { + return mutationsValue; + } + } + + var body = document.querySelector('body'); + var theFirstChild = body.firstChild; + + var sliderContainer = document.createElement( 'div' ); + sliderContainer.style.cssText = "display: flex"; + var slider = document.createElement('input'); + var text = document.createElement('label'); + text.innerHTML = 'mutations : ' + (mutationsValue * 100).toFixed(0) + '%'; + text.id = "ratioval"; + slider.setAttribute("type", "range"); + slider.style.cssText = 'margin-bottom: 10px; margin-top: 5px'; + slider.addEventListener('change', function(e) { + ENV.mutations(e.target.value / 100); + document.querySelector('#ratioval').innerHTML = 'mutations : ' + (ENV.mutations() * 100).toFixed(0) + '%'; + }); + sliderContainer.appendChild( text ); + sliderContainer.appendChild( slider ); + body.insertBefore( sliderContainer, theFirstChild ); + + return { + generateData: getData, + rows: 50, + timeout: 0, + mutations: mutations + }; +})(); diff --git a/assets/vue/benchmarks/dbmon/app.js b/assets/vue/benchmarks/dbmon/app.js new file mode 100644 index 0000000..61950d3 --- /dev/null +++ b/assets/vue/benchmarks/dbmon/app.js @@ -0,0 +1,14 @@ +var app = new Vue({ + el: '#app', + data: { + databases: [] + } +}) + +function loadSamples() { + app.databases = Object.freeze(ENV.generateData().toArray()); + Monitoring.renderRate.ping(); + setTimeout(loadSamples, ENV.timeout); +} + +loadSamples() diff --git a/assets/vue/benchmarks/dbmon/index.html b/assets/vue/benchmarks/dbmon/index.html new file mode 100644 index 0000000..7d00e0a --- /dev/null +++ b/assets/vue/benchmarks/dbmon/index.html @@ -0,0 +1,39 @@ + + + + + + +dbmon (Vue) + + +

+ Reference: js-repaint-perfs +

+
+ + + + + + + + +
{{db.dbname}} + {{db.lastSample.nbQueries}} + + {{q.formatElapsed}} +
+
{{q.query}}
+
+
+
+
+ + + + + + + + diff --git a/assets/vue/benchmarks/dbmon/lib/bootstrap.min.css b/assets/vue/benchmarks/dbmon/lib/bootstrap.min.css new file mode 100644 index 0000000..679272d --- /dev/null +++ b/assets/vue/benchmarks/dbmon/lib/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none!important;color:#000!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:gray}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.5) 0),color-stop(rgba(0,0,0,.0001) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,.0001) 0),color-stop(rgba(0,0,0,.5) 100%));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/assets/vue/benchmarks/dbmon/lib/memory-stats.js b/assets/vue/benchmarks/dbmon/lib/memory-stats.js new file mode 100644 index 0000000..df75fb3 --- /dev/null +++ b/assets/vue/benchmarks/dbmon/lib/memory-stats.js @@ -0,0 +1,101 @@ +/** + * @author mrdoob / http://mrdoob.com/ + * @author jetienne / http://jetienne.com/ + * @author paulirish / http://paulirish.com/ + */ +var MemoryStats = function (){ + + var msMin = 100; + var msMax = 0; + + var container = document.createElement( 'div' ); + container.id = 'stats'; + container.style.cssText = 'width:80px;opacity:0.9;cursor:pointer'; + + var msDiv = document.createElement( 'div' ); + msDiv.id = 'ms'; + msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;'; + container.appendChild( msDiv ); + + var msText = document.createElement( 'div' ); + msText.id = 'msText'; + msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; + msText.innerHTML= 'Memory'; + msDiv.appendChild( msText ); + + var msGraph = document.createElement( 'div' ); + msGraph.id = 'msGraph'; + msGraph.style.cssText = 'position:relative;width:74px;height:30px;background-color:#0f0'; + msDiv.appendChild( msGraph ); + + while ( msGraph.children.length < 74 ) { + + var bar = document.createElement( 'span' ); + bar.style.cssText = 'width:1px;height:30px;float:left;background-color:#131'; + msGraph.appendChild( bar ); + + } + + var updateGraph = function ( dom, height, color ) { + + var child = dom.appendChild( dom.firstChild ); + child.style.height = height + 'px'; + if( color ) child.style.backgroundColor = color; + + } + + var perf = window.performance || {}; + // polyfill usedJSHeapSize + if (!perf && !perf.memory){ + perf.memory = { usedJSHeapSize : 0 }; + } + if (perf && !perf.memory){ + perf.memory = { usedJSHeapSize : 0 }; + } + + // support of the API? + if( perf.memory.totalJSHeapSize === 0 ){ + console.warn('totalJSHeapSize === 0... performance.memory is only available in Chrome .') + } + + // TODO, add a sanity check to see if values are bucketed. + // If so, reminde user to adopt the --enable-precise-memory-info flag. + // open -a "/Applications/Google Chrome.app" --args --enable-precise-memory-info + + var lastTime = Date.now(); + var lastUsedHeap= perf.memory.usedJSHeapSize; + return { + domElement: container, + + update: function () { + + // refresh only 30time per second + if( Date.now() - lastTime < 1000/30 ) return; + lastTime = Date.now() + + var delta = perf.memory.usedJSHeapSize - lastUsedHeap; + lastUsedHeap = perf.memory.usedJSHeapSize; + var color = delta < 0 ? '#830' : '#131'; + + var ms = perf.memory.usedJSHeapSize; + msMin = Math.min( msMin, ms ); + msMax = Math.max( msMax, ms ); + msText.textContent = "Mem: " + bytesToSize(ms, 2); + + var normValue = ms / (30*1024*1024); + var height = Math.min( 30, 30 - normValue * 30 ); + updateGraph( msGraph, height, color); + + function bytesToSize( bytes, nFractDigit ){ + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes == 0) return 'n/a'; + nFractDigit = nFractDigit !== undefined ? nFractDigit : 0; + var precision = Math.pow(10, nFractDigit); + var i = Math.floor(Math.log(bytes) / Math.log(1024)); + return Math.round(bytes*precision / Math.pow(1024, i))/precision + ' ' + sizes[i]; + }; + } + + } + +}; \ No newline at end of file diff --git a/assets/vue/benchmarks/dbmon/lib/monitor.js b/assets/vue/benchmarks/dbmon/lib/monitor.js new file mode 100644 index 0000000..dccad19 --- /dev/null +++ b/assets/vue/benchmarks/dbmon/lib/monitor.js @@ -0,0 +1,60 @@ +var Monitoring = Monitoring || (function() { + + var stats = new MemoryStats(); + stats.domElement.style.position = 'fixed'; + stats.domElement.style.right = '0px'; + stats.domElement.style.bottom = '0px'; + document.body.appendChild( stats.domElement ); + requestAnimationFrame(function rAFloop(){ + stats.update(); + requestAnimationFrame(rAFloop); + }); + + var RenderRate = function () { + var container = document.createElement( 'div' ); + container.id = 'stats'; + container.style.cssText = 'width:150px;opacity:0.9;cursor:pointer;position:fixed;right:80px;bottom:0px;'; + + var msDiv = document.createElement( 'div' ); + msDiv.id = 'ms'; + msDiv.style.cssText = 'padding:0 0 3px 3px;text-align:left;background-color:#020;'; + container.appendChild( msDiv ); + + var msText = document.createElement( 'div' ); + msText.id = 'msText'; + msText.style.cssText = 'color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px'; + msText.innerHTML= 'Repaint rate: 0/sec'; + msDiv.appendChild( msText ); + + var bucketSize = 20; + var bucket = []; + var lastTime = Date.now(); + return { + domElement: container, + ping: function () { + var start = lastTime; + var stop = Date.now(); + var rate = 1000 / (stop - start); + bucket.push(rate); + if (bucket.length > bucketSize) { + bucket.shift(); + } + var sum = 0; + for (var i = 0; i < bucket.length; i++) { + sum = sum + bucket[i]; + } + msText.textContent = "Repaint rate: " + (sum / bucket.length).toFixed(2) + "/sec"; + lastTime = stop; + } + } + }; + + var renderRate = new RenderRate(); + document.body.appendChild( renderRate.domElement ); + + return { + memoryStats: stats, + renderRate: renderRate + }; + +})(); diff --git a/assets/vue/benchmarks/dbmon/lib/styles.css b/assets/vue/benchmarks/dbmon/lib/styles.css new file mode 100644 index 0000000..c2db475 --- /dev/null +++ b/assets/vue/benchmarks/dbmon/lib/styles.css @@ -0,0 +1,10 @@ +.Query { + position: relative; +} + +.Query:hover .popover { + left: -100%; + width: 100%; + display: block; +} + diff --git a/assets/vue/benchmarks/reorder-list/index.html b/assets/vue/benchmarks/reorder-list/index.html new file mode 100644 index 0000000..81b5a26 --- /dev/null +++ b/assets/vue/benchmarks/reorder-list/index.html @@ -0,0 +1,111 @@ + + + + + Vue benchmark + + + + + + + + + + +
+
+ + + + diff --git a/assets/vue/benchmarks/ssr/README.md b/assets/vue/benchmarks/ssr/README.md new file mode 100644 index 0000000..1058bcb --- /dev/null +++ b/assets/vue/benchmarks/ssr/README.md @@ -0,0 +1,13 @@ +# Vue.js SSR benchmark + +This benchmark renders a table of 1000 rows with 10 columns (10k components), with around 30k normal elements on the page. Note this is not something likely to be seen in a typical app. This benchmark is mostly for stress/regression testing and comparing between `renderToString` and `renderToStream`. + +To view the results follow the run section. Note that the overall completion time for the results are variable, this is due to other system related variants at run time (available memory, processing ect). In ideal circumstances both should finish within similar results. + +`renderToStream` pipes the content through a stream which provides considerable performance benefits (faster time-to-first-byte and non-event-loop-blocking) over renderToString. This can be observed through the benchmark. + +### run + +``` bash +npm run bench:ssr +``` diff --git a/assets/vue/benchmarks/ssr/common.js b/assets/vue/benchmarks/ssr/common.js new file mode 100644 index 0000000..4ce56fb --- /dev/null +++ b/assets/vue/benchmarks/ssr/common.js @@ -0,0 +1,59 @@ +'use strict' + +const self = (global || root) + +self.performance = { + now: function () { + var hrtime = process.hrtime() + return ((hrtime[0] * 1000000 + hrtime[1] / 1000) / 1000) + } +} + +function generateGrid (rowCount, columnCount) { + var grid = [] + + for (var r = 0; r < rowCount; r++) { + var row = { id: r, items: [] } + for (var c = 0; c < columnCount; c++) { + row.items.push({ id: (r + '-' + c) }) + } + grid.push(row) + } + + return grid +} + +const gridData = generateGrid(1000, 10) + +module.exports = { + template: '

{{ Math.random() }}

', + components: { + myTable: { + data: function () { + return { + grid: gridData + } + }, + // template: '
123{{ item.id }}
', + template: '
', + components: { + row: { + props: ['row'], + template: '{{ Math.random() }}', + components: { + column: { + template: '' + + // 25 plain elements for each cell + '
    ' + + '
  • ' + + 'fsefs' + + '
  • ' + + '
' + + '' + } + } + } + } + } + } +} diff --git a/assets/vue/benchmarks/ssr/renderToStream.js b/assets/vue/benchmarks/ssr/renderToStream.js new file mode 100644 index 0000000..6fbcfd2 --- /dev/null +++ b/assets/vue/benchmarks/ssr/renderToStream.js @@ -0,0 +1,29 @@ +/* eslint-disable no-unused-vars */ + +'use strict' + +const Vue = require('../../dist/vue.runtime.common.js') +const createRenderer = require('../../packages/vue-server-renderer').createRenderer +const renderToStream = createRenderer().renderToStream +const gridComponent = require('./common.js') + +console.log('--- renderToStream --- ') +const self = (global || root) +const s = self.performance.now() + +const stream = renderToStream(new Vue(gridComponent)) +let str = '' +let first +let complete +stream.once('data', () => { + first = self.performance.now() - s +}) +stream.on('data', chunk => { + str += chunk +}) +stream.on('end', () => { + complete = self.performance.now() - s + console.log(`first chunk: ${first.toFixed(2)}ms`) + console.log(`complete: ${complete.toFixed(2)}ms`) + console.log() +}) diff --git a/assets/vue/benchmarks/ssr/renderToString.js b/assets/vue/benchmarks/ssr/renderToString.js new file mode 100644 index 0000000..4f16e93 --- /dev/null +++ b/assets/vue/benchmarks/ssr/renderToString.js @@ -0,0 +1,15 @@ +'use strict' + +const Vue = require('../../dist/vue.runtime.common.js') +const createRenderer = require('../../packages/vue-server-renderer').createRenderer +const renderToString = createRenderer().renderToString +const gridComponent = require('./common.js') + +console.log('--- renderToString --- ') +const self = (global || root) +self.s = self.performance.now() + +renderToString(new Vue(gridComponent), () => { + console.log('Complete time: ' + (self.performance.now() - self.s).toFixed(2) + 'ms') + console.log() +}) diff --git a/assets/vue/benchmarks/svg/index.html b/assets/vue/benchmarks/svg/index.html new file mode 100644 index 0000000..cd274cb --- /dev/null +++ b/assets/vue/benchmarks/svg/index.html @@ -0,0 +1,102 @@ + + + + vue.js version + + + + + +

Animating 1000 SVG dots

+
+

+ +

+ + + +
+ + + diff --git a/assets/vue/benchmarks/uptime/index.html b/assets/vue/benchmarks/uptime/index.html new file mode 100644 index 0000000..4a37515 --- /dev/null +++ b/assets/vue/benchmarks/uptime/index.html @@ -0,0 +1,200 @@ + + + + + Vue benchmark + + + +

Reference: Ember Glimmer 2 demo

+
+

FPS: {{ fps }}

+ + + +
+ + + + diff --git a/assets/vue/bower.json b/assets/vue/bower.json deleted file mode 100644 index 1d9a4ba..0000000 --- a/assets/vue/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "vue", - "main": "dist/vue.js", - "description": "Simple, Fast & Composable MVVM for building interative interfaces", - "authors": ["Evan You "], - "license": "MIT", - "ignore": [ - ".*", - "examples", - "build", - "perf", - "test", - "grunt", - "gruntfile.js", - "*.json", - "*.md", - "*.yml" - ] -} diff --git a/assets/vue/build/alias.js b/assets/vue/build/alias.js new file mode 100644 index 0000000..257ea65 --- /dev/null +++ b/assets/vue/build/alias.js @@ -0,0 +1,13 @@ +const path = require('path') + +module.exports = { + vue: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler'), + compiler: path.resolve(__dirname, '../src/compiler'), + core: path.resolve(__dirname, '../src/core'), + shared: path.resolve(__dirname, '../src/shared'), + web: path.resolve(__dirname, '../src/platforms/web'), + weex: path.resolve(__dirname, '../src/platforms/weex'), + server: path.resolve(__dirname, '../src/server'), + entries: path.resolve(__dirname, '../src/entries'), + sfc: path.resolve(__dirname, '../src/sfc') +} diff --git a/assets/vue/build/build.js b/assets/vue/build/build.js new file mode 100644 index 0000000..b9cb997 --- /dev/null +++ b/assets/vue/build/build.js @@ -0,0 +1,96 @@ +const fs = require('fs') +const path = require('path') +const zlib = require('zlib') +const rollup = require('rollup') +const uglify = require('uglify-js') + +if (!fs.existsSync('dist')) { + fs.mkdirSync('dist') +} + +let builds = require('./config').getAllBuilds() + +// filter builds via command line arg +if (process.argv[2]) { + const filters = process.argv[2].split(',') + builds = builds.filter(b => { + return filters.some(f => b.dest.indexOf(f) > -1) + }) +} else { + // filter out weex builds by default + builds = builds.filter(b => { + return b.dest.indexOf('weex') === -1 + }) +} + +build(builds) + +function build (builds) { + let built = 0 + const total = builds.length + const next = () => { + buildEntry(builds[built]).then(() => { + built++ + if (built < total) { + next() + } + }).catch(logError) + } + + next() +} + +function buildEntry (config) { + const isProd = /min\.js$/.test(config.dest) + return rollup.rollup(config).then(bundle => { + const code = bundle.generate(config).code + if (isProd) { + var minified = (config.banner ? config.banner + '\n' : '') + uglify.minify(code, { + fromString: true, + output: { + screw_ie8: true, + ascii_only: true + }, + compress: { + pure_funcs: ['makeMap'] + } + }).code + return write(config.dest, minified, true) + } else { + return write(config.dest, code) + } + }) +} + +function write (dest, code, zip) { + return new Promise((resolve, reject) => { + function report (extra) { + console.log(blue(path.relative(process.cwd(), dest)) + ' ' + getSize(code) + (extra || '')) + resolve() + } + + fs.writeFile(dest, code, err => { + if (err) return reject(err) + if (zip) { + zlib.gzip(code, (err, zipped) => { + if (err) return reject(err) + report(' (gzipped: ' + getSize(zipped) + ')') + }) + } else { + report() + } + }) + }) +} + +function getSize (code) { + return (code.length / 1024).toFixed(2) + 'kb' +} + +function logError (e) { + console.log(e) +} + +function blue (str) { + return '\x1b[1m\x1b[34m' + str + '\x1b[39m\x1b[22m' +} diff --git a/assets/vue/build/ci.sh b/assets/vue/build/ci.sh new file mode 100644 index 0000000..01b78d6 --- /dev/null +++ b/assets/vue/build/ci.sh @@ -0,0 +1,18 @@ +set -e +npm run lint +npm run flow +npm run test:types +npm run test:cover +npm run test:e2e -- --env phantomjs +npm run test:ssr +npm run test:weex + +# report coverage stats for non-PRs +if [[ -z $CI_PULL_REQUEST ]]; then + cat ./coverage/lcov.info | ./node_modules/.bin/codecov +fi + +# run full browser suites on saucelabs for master branch +if [[ $CIRCLE_BRANCH = master ]]; then + npm run test:sauce +fi diff --git a/assets/vue/build/config.js b/assets/vue/build/config.js new file mode 100644 index 0000000..026a962 --- /dev/null +++ b/assets/vue/build/config.js @@ -0,0 +1,131 @@ +const path = require('path') +const flow = require('rollup-plugin-flow-no-whitespace') +const buble = require('rollup-plugin-buble') +const replace = require('rollup-plugin-replace') +const alias = require('rollup-plugin-alias') +const version = process.env.VERSION || require('../package.json').version +const weexVersion = process.env.WEEX_VERSION || require('../packages/weex-vue-framework/package.json').version + +const banner = + '/*!\n' + + ' * Vue.js v' + version + '\n' + + ' * (c) 2014-' + new Date().getFullYear() + ' Evan You\n' + + ' * Released under the MIT License.\n' + + ' */' + +const builds = { + // Runtime only (CommonJS). Used by bundlers e.g. Webpack & Browserify + 'web-runtime-cjs': { + entry: path.resolve(__dirname, '../src/entries/web-runtime.js'), + dest: path.resolve(__dirname, '../dist/vue.runtime.common.js'), + format: 'cjs', + banner + }, + // Runtime+compiler CommonJS build (CommonJS) + 'web-full-cjs': { + entry: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler.js'), + dest: path.resolve(__dirname, '../dist/vue.common.js'), + format: 'cjs', + alias: { he: './entity-decoder' }, + banner + }, + // runtime-only build (Browser) + 'web-runtime-dev': { + entry: path.resolve(__dirname, '../src/entries/web-runtime.js'), + dest: path.resolve(__dirname, '../dist/vue.runtime.js'), + format: 'umd', + env: 'development', + banner + }, + // runtime-only production build (Browser) + 'web-runtime-prod': { + entry: path.resolve(__dirname, '../src/entries/web-runtime.js'), + dest: path.resolve(__dirname, '../dist/vue.runtime.min.js'), + format: 'umd', + env: 'production', + banner + }, + // Runtime+compiler development build (Browser) + 'web-full-dev': { + entry: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler.js'), + dest: path.resolve(__dirname, '../dist/vue.js'), + format: 'umd', + env: 'development', + alias: { he: './entity-decoder' }, + banner + }, + // Runtime+compiler production build (Browser) + 'web-full-prod': { + entry: path.resolve(__dirname, '../src/entries/web-runtime-with-compiler.js'), + dest: path.resolve(__dirname, '../dist/vue.min.js'), + format: 'umd', + env: 'production', + alias: { he: './entity-decoder' }, + banner + }, + // Web compiler (CommonJS). + 'web-compiler': { + entry: path.resolve(__dirname, '../src/entries/web-compiler.js'), + dest: path.resolve(__dirname, '../packages/vue-template-compiler/build.js'), + format: 'cjs', + external: ['he', 'de-indent'] + }, + // Web server renderer (CommonJS). + 'web-server-renderer': { + entry: path.resolve(__dirname, '../src/entries/web-server-renderer.js'), + dest: path.resolve(__dirname, '../packages/vue-server-renderer/build.js'), + format: 'cjs', + external: ['stream', 'module', 'vm', 'he', 'de-indent'] + }, + // Weex runtime framework (CommonJS). + 'weex-framework': { + weex: true, + entry: path.resolve(__dirname, '../src/entries/weex-framework.js'), + dest: path.resolve(__dirname, '../packages/weex-vue-framework/index.js'), + format: 'cjs' + }, + // Weex compiler (CommonJS). Used by Weex's Webpack loader. + 'weex-compiler': { + weex: true, + entry: path.resolve(__dirname, '../src/entries/weex-compiler.js'), + dest: path.resolve(__dirname, '../packages/weex-template-compiler/build.js'), + format: 'cjs', + external: ['he', 'de-indent'] + } +} + +function genConfig (opts) { + const config = { + entry: opts.entry, + dest: opts.dest, + external: opts.external, + format: opts.format, + banner: opts.banner, + moduleName: 'Vue', + plugins: [ + replace({ + __WEEX__: !!opts.weex, + __WEEX_VERSION__: weexVersion, + __VERSION__: version + }), + flow(), + buble(), + alias(Object.assign({}, require('./alias'), opts.alias)) + ] + } + + if (opts.env) { + config.plugins.push(replace({ + 'process.env.NODE_ENV': JSON.stringify(opts.env) + })) + } + + return config +} + +if (process.env.TARGET) { + module.exports = genConfig(builds[process.env.TARGET]) +} else { + exports.getBuild = name => genConfig(builds[name]) + exports.getAllBuilds = () => Object.keys(builds).map(name => genConfig(builds[name])) +} diff --git a/assets/vue/build/get-weex-version.js b/assets/vue/build/get-weex-version.js new file mode 100644 index 0000000..d701c43 --- /dev/null +++ b/assets/vue/build/get-weex-version.js @@ -0,0 +1,24 @@ +var coreVersion = require('../package.json').version +var weexVersion = require('../packages/weex-vue-framework/package.json').version +var weexBaseVersion = weexVersion.match(/^[\d.]+/)[0] +var weexSubVersion = Number(weexVersion.match(/-weex\.(\d+)$/)[1]) + +if (weexBaseVersion === coreVersion) { + // same core version, increment sub version + weexSubVersion++ +} else { + // new core version, reset sub version + weexBaseVersion = coreVersion + weexSubVersion = 1 +} + +if (process.argv[2] === '-c') { + console.log(weexVersion) +} else { + console.log(weexBaseVersion + '-weex.' + weexSubVersion) +} + +module.exports = { + base: weexBaseVersion, + sub: weexSubVersion +} diff --git a/assets/vue/build/git-hooks/pre-commit b/assets/vue/build/git-hooks/pre-commit new file mode 100644 index 0000000..126d2ca --- /dev/null +++ b/assets/vue/build/git-hooks/pre-commit @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$') + +if [ -n "$files_to_lint" ]; then + NODE_ENV=production eslint --quiet $files_to_lint +fi diff --git a/assets/vue/build/karma.base.config.js b/assets/vue/build/karma.base.config.js new file mode 100644 index 0000000..36b2943 --- /dev/null +++ b/assets/vue/build/karma.base.config.js @@ -0,0 +1,43 @@ +var alias = require('./alias') +var webpack = require('webpack') + +var webpackConfig = { + resolve: { + alias: alias + }, + module: { + loaders: [ + { + test: /\.js$/, + loader: 'babel', + exclude: /node_modules/ + } + ] + }, + plugins: [ + new webpack.DefinePlugin({ + __WEEX__: false, + 'process.env': { + NODE_ENV: '"development"', + TRANSITION_DURATION: process.env.SAUCE ? 500 : 50, + TRANSITION_BUFFER: process.env.SAUCE ? 50 : 10 + } + }) + ], + devtool: '#inline-source-map' +} + +// shared config for all unit tests +module.exports = { + frameworks: ['jasmine'], + files: [ + '../test/unit/index.js' + ], + preprocessors: { + '../test/unit/index.js': ['webpack', 'sourcemap'] + }, + webpack: webpackConfig, + webpackMiddleware: { + noInfo: true + } +} diff --git a/assets/vue/build/karma.cover.config.js b/assets/vue/build/karma.cover.config.js new file mode 100644 index 0000000..c70a8ec --- /dev/null +++ b/assets/vue/build/karma.cover.config.js @@ -0,0 +1,29 @@ +var base = require('./karma.base.config.js') + +module.exports = function (config) { + var options = Object.assign(base, { + browsers: ['PhantomJS'], + reporters: ['mocha', 'coverage'], + coverageReporter: { + reporters: [ + { type: 'lcov', dir: '../coverage', subdir: '.' }, + { type: 'text-summary', dir: '../coverage', subdir: '.' } + ] + }, + singleRun: true + }) + + // add babel-plugin-coverage for code intrumentation + options.webpack.babel = { + plugins: [['istanbul', { + exclude: [ + 'test/', + 'src/compiler/parser/html-parser.js', + 'src/core/instance/proxy.js', + 'src/sfc/deindent.js' + ] + }]] + } + + config.set(options) +} diff --git a/assets/vue/build/karma.dev.config.js b/assets/vue/build/karma.dev.config.js new file mode 100644 index 0000000..756ca1d --- /dev/null +++ b/assets/vue/build/karma.dev.config.js @@ -0,0 +1,8 @@ +var base = require('./karma.base.config.js') + +module.exports = function (config) { + config.set(Object.assign(base, { + browsers: ['Chrome'], + reporters: ['progress'] + })) +} diff --git a/assets/vue/build/karma.sauce.config.js b/assets/vue/build/karma.sauce.config.js new file mode 100644 index 0000000..33055d7 --- /dev/null +++ b/assets/vue/build/karma.sauce.config.js @@ -0,0 +1,97 @@ +var base = require('./karma.base.config.js') + +/** + * Having too many tests running concurrently on saucelabs + * causes timeouts and errors, so we have to run them in + * smaller batches. + */ + +var batches = [ + // the cool kids + { + sl_chrome: { + base: 'SauceLabs', + browserName: 'chrome', + platform: 'Windows 7' + }, + sl_firefox: { + base: 'SauceLabs', + browserName: 'firefox' + }, + sl_mac_safari: { + base: 'SauceLabs', + browserName: 'safari', + platform: 'OS X 10.10' + } + }, + // ie family + { + sl_ie_9: { + base: 'SauceLabs', + browserName: 'internet explorer', + platform: 'Windows 7', + version: '9' + }, + sl_ie_10: { + base: 'SauceLabs', + browserName: 'internet explorer', + platform: 'Windows 8', + version: '10' + }, + sl_ie_11: { + base: 'SauceLabs', + browserName: 'internet explorer', + platform: 'Windows 8.1', + version: '11' + }, + sl_edge: { + base: 'SauceLabs', + browserName: 'MicrosoftEdge', + platform: 'Windows 10' + } + }, + // mobile + { + sl_ios_safari_8: { + base: 'SauceLabs', + browserName: 'iphone', + version: '8.4' + }, + sl_ios_safari_9: { + base: 'SauceLabs', + browserName: 'iphone', + version: '9.3' + }, + sl_android_4_2: { + base: 'SauceLabs', + browserName: 'android', + version: '4.2' + }, + sl_android_5_1: { + base: 'SauceLabs', + browserName: 'android', + version: '5.1' + } + } +] + +module.exports = function (config) { + var batch = batches[process.argv[4] || 0] + + config.set(Object.assign(base, { + singleRun: true, + browsers: Object.keys(batch), + customLaunchers: batch, + reporters: process.env.CI + ? ['dots', 'saucelabs'] // avoid spamming CI output + : ['progress', 'saucelabs'], + sauceLabs: { + testName: 'Vue.js unit tests', + recordScreenshots: false, + build: process.env.CIRCLE_BUILD_NUM || process.env.SAUCE_BUILD_ID || Date.now() + }, + // mobile emulators are really slow + captureTimeout: 300000, + browserNoActivityTimeout: 300000 + })) +} diff --git a/assets/vue/build/karma.unit.config.js b/assets/vue/build/karma.unit.config.js new file mode 100644 index 0000000..1cf6859 --- /dev/null +++ b/assets/vue/build/karma.unit.config.js @@ -0,0 +1,9 @@ +var base = require('./karma.base.config.js') + +module.exports = function (config) { + config.set(Object.assign(base, { + browsers: ['Chrome', 'Firefox', 'Safari'], + reporters: ['progress'], + singleRun: true + })) +} diff --git a/assets/vue/build/nightwatch.config.js b/assets/vue/build/nightwatch.config.js new file mode 100644 index 0000000..bacaa08 --- /dev/null +++ b/assets/vue/build/nightwatch.config.js @@ -0,0 +1,57 @@ +// http://nightwatchjs.org/guide#settings-file +module.exports = { + 'src_folders': ['test/e2e/specs'], + 'output_folder': 'test/e2e/reports', + 'custom_commands_path': ['node_modules/nightwatch-helpers/commands'], + 'custom_assertions_path': ['node_modules/nightwatch-helpers/assertions'], + + 'selenium': { + 'start_process': true, + 'server_path': 'node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.1.jar', + 'host': '127.0.0.1', + 'port': 4444, + 'cli_args': { + 'webdriver.chrome.driver': require('chromedriver').path + // , 'webdriver.gecko.driver': require('geckodriver').path + } + }, + + 'test_settings': { + 'default': { + 'selenium_port': 4444, + 'selenium_host': 'localhost', + 'silent': true, + 'screenshots': { + 'enabled': true, + 'on_failure': true, + 'on_error': false, + 'path': 'test/e2e/screenshots' + } + }, + + 'chrome': { + 'desiredCapabilities': { + 'browserName': 'chrome', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + }, + + 'firefox': { + 'desiredCapabilities': { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'marionette': true + } + }, + + 'phantomjs': { + 'desiredCapabilities': { + 'browserName': 'phantomjs', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + } + } +} diff --git a/assets/vue/build/release-weex.sh b/assets/vue/build/release-weex.sh new file mode 100644 index 0000000..86559cd --- /dev/null +++ b/assets/vue/build/release-weex.sh @@ -0,0 +1,38 @@ +set -e +CUR_VERSION=`node build/get-weex-version.js -c` +NEXT_VERSION=`node build/get-weex-version.js` + +echo "Current: $CUR_VERSION" +read -p "Enter new version ($NEXT_VERSION): " -n 1 -r +if ! [[ -z $REPLY ]]; then + NEXT_VERSION=$REPLY +fi + +read -p "Releasing weex-vue-framework@$NEXT_VERSION - are you sure? (y/n) " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Releasing weex-vue-framework@$NEXT_VERSION ..." + npm run lint + npm run flow + npm run test:weex + + # build + WEEX_VERSION=$NEXT_VERSION npm run build:weex + + # update package + cd packages/weex-vue-framework + npm version $NEXT_VERSION + npm publish + cd - + + cd packages/weex-template-compiler + npm version $NEXT_VERSION + npm publish + cd - + + # commit + git add src/entries/weex-framework.js + git add packages/weex-template-compiler + git add packages/weex-vue-framework + git commit -m "[release] weex-vue-framework@$NEXT_VERSION" +fi diff --git a/assets/vue/build/release.sh b/assets/vue/build/release.sh new file mode 100644 index 0000000..8224751 --- /dev/null +++ b/assets/vue/build/release.sh @@ -0,0 +1,49 @@ +set -e + +if [[ -z $1 ]]; then + echo "Enter new version: " + read VERSION +else + VERSION=$1 +fi + +read -p "Releasing $VERSION - are you sure? (y/n) " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Releasing $VERSION ..." + + npm run lint + npm run flow + npm run test:cover + npm run test:e2e + npm run test:ssr + + if [[ -z $SKIP_SAUCE ]]; then + export SAUCE_BUILD_ID=$VERSION:`date +"%s"` + npm run test:sauce + fi + + # build + VERSION=$VERSION npm run build + + # update packages + cd packages/vue-template-compiler + npm version $VERSION + npm publish + cd - + + cd packages/vue-server-renderer + npm version $VERSION + npm publish + cd - + + # commit + git add -A + git commit -m "[build] $VERSION" + npm version $VERSION --message "[release] $VERSION" + + # publish + git push origin refs/tags/v$VERSION + git push + npm publish +fi diff --git a/assets/vue/circle.yml b/assets/vue/circle.yml new file mode 100644 index 0000000..77f2419 --- /dev/null +++ b/assets/vue/circle.yml @@ -0,0 +1,7 @@ +machine: + node: + version: 6 + +test: + override: + - bash build/ci.sh diff --git a/assets/vue/dist/README.md b/assets/vue/dist/README.md new file mode 100644 index 0000000..0b31372 --- /dev/null +++ b/assets/vue/dist/README.md @@ -0,0 +1,63 @@ +## Explanation of Build Files + +> A rule of thumb: files that end in `common.js` are meant for built tools, files that do not end in `common.js` are meant for direct browser usage. + +- ### vue.js + + The full (compiler-included) browser build. This is the build you can just include with a script tag: + + ``` + + ``` + + Note that this build is hard-coded to development mode. + +- ### vue.min.js + + Same as `vue.js`, but minified AND is hard-coded to production mode (with runtime checks and warnings stripped). + +- ### vue.common.js + + The full (compiler-included) CommonJS build. This is the build intended to be used with a Node-compatible bundler, e.g. Webpack or Browserify. + + The difference between the browser build and the CommonJS build is that the latter preserves the `process.env.NODE_ENV` check for development/production modes (defaults to development mode). This gives you more control over what mode the code should run in: + + - When bundling for the browser, you can turn on production mode by using Webpack's [DefinePlugin](https://webpack.github.io/docs/list-of-plugins.html#defineplugin) to replace `process.env.NODE_ENV` with the `"production"` string literal: + + ``` js + plugins: [ + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': '"production"' + }) + ] + ``` + + This also allows minifiers to completely drop the warnings inside the conditional blocks. For Browserify, you can use [envify](https://github.com/hughsk/envify) to achieve the same. + + - When running Vue in Node.js (during server side rendering), Vue will pick up the actual `process.env.NODE_ENV` if set. + +- ### vue.runtime.common.js + + The runtime-only (compiler-excluded) CommonJS build. + + This build does not support the `template` option, because it doesn't include the compiler. It is thus 30% lighter than the full build. However, you can still use templates in Single-File `*.vue` components via `vue-loader` or `vueify`, as these tools will pre-compile the templates into render functions for you. + + **This is the default build you get from `import Vue from 'vue'` or `var Vue = require('vue')`**. To use the full CommonJS build instead, configure Webpack via the `resolve.alias` option: + + ``` js + resolve: { + alias: { + vue$: 'vue/dist/vue.common.js' + } + } + ``` + + For Browserify, use the [aliasify](https://github.com/benbria/aliasify) transform. + +- ### vue.runtime.js + + The runtime-only (compiler-excluded) browser build. You can also include this build with a script tag, but with this build, you will **not** be able to use the `template` option. Hard-coded to development mode. + +- ### vue.runtime.min.js + + Same as `vue.runtime.js`, but minified AND hard-coded to production mode (with runtime checks and warnings stripped). diff --git a/assets/vue/dist/vue.common.js b/assets/vue/dist/vue.common.js index 6918e29..261485b 100644 --- a/assets/vue/dist/vue.common.js +++ b/assets/vue/dist/vue.common.js @@ -1,1576 +1,628 @@ /*! - * Vue.js v1.0.18 - * (c) 2016 Evan You + * Vue.js v2.1.7 + * (c) 2014-2016 Evan You * Released under the MIT License. */ 'use strict'; -function set(obj, key, val) { - if (hasOwn(obj, key)) { - obj[key] = val; - return; - } - if (obj._isVue) { - set(obj._data, key, val); - return; - } - var ob = obj.__ob__; - if (!ob) { - obj[key] = val; - return; - } - ob.convert(key, val); - ob.dep.notify(); - if (ob.vms) { - var i = ob.vms.length; - while (i--) { - var vm = ob.vms[i]; - vm._proxy(key); - vm._digest(); - } - } - return val; -} +/* */ /** - * Delete a property and trigger change if necessary. - * - * @param {Object} obj - * @param {String} key + * Convert a value to a string that is actually rendered. */ - -function del(obj, key) { - if (!hasOwn(obj, key)) { - return; - } - delete obj[key]; - var ob = obj.__ob__; - if (!ob) { - return; - } - ob.dep.notify(); - if (ob.vms) { - var i = ob.vms.length; - while (i--) { - var vm = ob.vms[i]; - vm._unproxy(key); - vm._digest(); - } - } +function _toString (val) { + return val == null + ? '' + : typeof val === 'object' + ? JSON.stringify(val, null, 2) + : String(val) } -var hasOwnProperty = Object.prototype.hasOwnProperty; /** - * Check whether the object has the property. - * - * @param {Object} obj - * @param {String} key - * @return {Boolean} + * Convert a input value to a number for persistence. + * If the conversion fails, return original string. */ - -function hasOwn(obj, key) { - return hasOwnProperty.call(obj, key); +function toNumber (val) { + var n = parseFloat(val, 10); + return (n || n === 0) ? n : val } /** - * Check if an expression is a literal value. - * - * @param {String} exp - * @return {Boolean} + * Make a map and return a function for checking if a key + * is in that map. */ - -var literalValueRE = /^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/; - -function isLiteral(exp) { - return literalValueRE.test(exp); +function makeMap ( + str, + expectsLowerCase +) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase + ? function (val) { return map[val.toLowerCase()]; } + : function (val) { return map[val]; } } /** - * Check if a string starts with $ or _ - * - * @param {String} str - * @return {Boolean} + * Check if a tag is a built-in tag. */ - -function isReserved(str) { - var c = (str + '').charCodeAt(0); - return c === 0x24 || c === 0x5F; -} +var isBuiltInTag = makeMap('slot,component', true); /** - * Guard text output, make sure undefined outputs - * empty string - * - * @param {*} value - * @return {String} + * Remove an item from an array */ - -function _toString(value) { - return value == null ? '' : value.toString(); +function remove$1 (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) + } + } } /** - * Check and convert possible numeric strings to numbers - * before setting back to data - * - * @param {*} value - * @return {*|Number} + * Check whether the object has the property. */ - -function toNumber(value) { - if (typeof value !== 'string') { - return value; - } else { - var parsed = Number(value); - return isNaN(parsed) ? value : parsed; - } +var hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) } /** - * Convert string boolean literals into real booleans. - * - * @param {*} value - * @return {*|Boolean} + * Check if value is primitive */ - -function toBoolean(value) { - return value === 'true' ? true : value === 'false' ? false : value; +function isPrimitive (value) { + return typeof value === 'string' || typeof value === 'number' } /** - * Strip quotes from a string - * - * @param {String} str - * @return {String | false} + * Create a cached version of a pure function. */ - -function stripQuotes(str) { - var a = str.charCodeAt(0); - var b = str.charCodeAt(str.length - 1); - return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str; +function cached (fn) { + var cache = Object.create(null); + return function cachedFn (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)) + } } /** * Camelize a hyphen-delmited string. - * - * @param {String} str - * @return {String} */ - var camelizeRE = /-(\w)/g; - -function camelize(str) { - return str.replace(camelizeRE, toUpper); -} - -function toUpper(_, c) { - return c ? c.toUpperCase() : ''; -} +var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) +}); /** - * Hyphenate a camelCase string. - * - * @param {String} str - * @return {String} + * Capitalize a string. */ - -var hyphenateRE = /([a-z\d])([A-Z])/g; - -function hyphenate(str) { - return str.replace(hyphenateRE, '$1-$2').toLowerCase(); -} +var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1) +}); /** - * Converts hyphen/underscore/slash delimitered names into - * camelized classNames. - * - * e.g. my-component => MyComponent - * some_else => SomeElse - * some/comp => SomeComp - * - * @param {String} str - * @return {String} + * Hyphenate a camelCase string. */ - -var classifyRE = /(?:^|[-_\/])(\w)/g; - -function classify(str) { - return str.replace(classifyRE, toUpper); -} +var hyphenateRE = /([^-])([A-Z])/g; +var hyphenate = cached(function (str) { + return str + .replace(hyphenateRE, '$1-$2') + .replace(hyphenateRE, '$1-$2') + .toLowerCase() +}); /** * Simple bind, faster than native - * - * @param {Function} fn - * @param {Object} ctx - * @return {Function} */ - -function bind(fn, ctx) { - return function (a) { +function bind$1 (fn, ctx) { + function boundFn (a) { var l = arguments.length; - return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx); - }; + return l + ? l > 1 + ? fn.apply(ctx, arguments) + : fn.call(ctx, a) + : fn.call(ctx) + } + // record original fn length + boundFn._length = fn.length; + return boundFn } /** * Convert an Array-like object to a real Array. - * - * @param {Array-like} list - * @param {Number} [start] - start index - * @return {Array} */ - -function toArray(list, start) { +function toArray (list, start) { start = start || 0; var i = list.length - start; var ret = new Array(i); while (i--) { ret[i] = list[i + start]; } - return ret; + return ret } /** * Mix properties into target object. - * - * @param {Object} to - * @param {Object} from */ - -function extend(to, from) { - var keys = Object.keys(from); - var i = keys.length; - while (i--) { - to[keys[i]] = from[keys[i]]; +function extend (to, _from) { + for (var key in _from) { + to[key] = _from[key]; } - return to; + return to } /** * Quick object check - this is primarily used to tell * Objects from primitive values when we know the value * is a JSON-compliant type. - * - * @param {*} obj - * @return {Boolean} */ - -function isObject(obj) { - return obj !== null && typeof obj === 'object'; +function isObject (obj) { + return obj !== null && typeof obj === 'object' } /** * Strict object type check. Only returns true * for plain JavaScript objects. - * - * @param {*} obj - * @return {Boolean} */ - var toString = Object.prototype.toString; var OBJECT_STRING = '[object Object]'; - -function isPlainObject(obj) { - return toString.call(obj) === OBJECT_STRING; +function isPlainObject (obj) { + return toString.call(obj) === OBJECT_STRING } /** - * Array type check. - * - * @param {*} obj - * @return {Boolean} + * Merge an Array of Objects into a single Object. */ - -var isArray = Array.isArray; +function toObject (arr) { + var res = {}; + for (var i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res +} /** - * Define a property. - * - * @param {Object} obj - * @param {String} key - * @param {*} val - * @param {Boolean} [enumerable] + * Perform no operation. */ +function noop () {} -function def(obj, key, val, enumerable) { - Object.defineProperty(obj, key, { - value: val, - enumerable: !!enumerable, - writable: true, - configurable: true - }); -} +/** + * Always return false. + */ +var no = function () { return false; }; /** - * Debounce a function so it only gets called after the - * input stops arriving after the given wait period. - * - * @param {Function} func - * @param {Number} wait - * @return {Function} - the debounced function + * Return same value */ +var identity = function (_) { return _; }; -function _debounce(func, wait) { - var timeout, args, context, timestamp, result; - var later = function later() { - var last = Date.now() - timestamp; - if (last < wait && last >= 0) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - } - }; - return function () { - context = this; - args = arguments; - timestamp = Date.now(); - if (!timeout) { - timeout = setTimeout(later, wait); - } - return result; - }; +/** + * Generate a static keys string from compiler modules. + */ +function genStaticKeys (modules) { + return modules.reduce(function (keys, m) { + return keys.concat(m.staticKeys || []) + }, []).join(',') } /** - * Manual indexOf because it's slightly faster than - * native. - * - * @param {Array} arr - * @param {*} obj + * Check if two values are loosely equal - that is, + * if they are plain objects, do they have the same shape? */ +function looseEqual (a, b) { + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + return JSON.stringify(a) === JSON.stringify(b) + } else if (!isObjectA && !isObjectB) { + return String(a) === String(b) + } else { + return false + } +} -function indexOf(arr, obj) { - var i = arr.length; - while (i--) { - if (arr[i] === obj) return i; +function looseIndexOf (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (looseEqual(arr[i], val)) { return i } } - return -1; + return -1 } +/* */ + +var config = { + /** + * Option merge strategies (used in core/util/options) + */ + optionMergeStrategies: Object.create(null), + + /** + * Whether to suppress warnings. + */ + silent: false, + + /** + * Whether to enable devtools + */ + devtools: process.env.NODE_ENV !== 'production', + + /** + * Error handler for watcher errors + */ + errorHandler: null, + + /** + * Ignore certain custom elements + */ + ignoredElements: [], + + /** + * Custom user key aliases for v-on + */ + keyCodes: Object.create(null), + + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, + + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, + + /** + * Get the namespace of an element + */ + getTagNamespace: noop, + + /** + * Parse the real tag name for the specific platform. + */ + parsePlatformTagName: identity, + + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, + + /** + * List of asset types that a component can own. + */ + _assetTypes: [ + 'component', + 'directive', + 'filter' + ], + + /** + * List of lifecycle hooks. + */ + _lifecycleHooks: [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated' + ], + + /** + * Max circular updates allowed in a scheduler flush cycle. + */ + _maxUpdateCount: 100 +}; + +/* */ + /** - * Make a cancellable version of an async callback. - * - * @param {Function} fn - * @return {Function} + * Check if a string starts with $ or _ */ - -function cancellable(fn) { - var cb = function cb() { - if (!cb.cancelled) { - return fn.apply(this, arguments); - } - }; - cb.cancel = function () { - cb.cancelled = true; - }; - return cb; +function isReserved (str) { + var c = (str + '').charCodeAt(0); + return c === 0x24 || c === 0x5F } /** - * Check if two values are loosely equal - that is, - * if they are plain objects, do they have the same shape? - * - * @param {*} a - * @param {*} b - * @return {Boolean} + * Define a property. */ - -function looseEqual(a, b) { - /* eslint-disable eqeqeq */ - return a == b || (isObject(a) && isObject(b) ? JSON.stringify(a) === JSON.stringify(b) : false); - /* eslint-enable eqeqeq */ +function def (obj, key, val, enumerable) { + Object.defineProperty(obj, key, { + value: val, + enumerable: !!enumerable, + writable: true, + configurable: true + }); } -var hasProto = ('__proto__' in {}); +/** + * Parse simple path. + */ +var bailRE = /[^\w.$]/; +function parsePath (path) { + if (bailRE.test(path)) { + return + } else { + var segments = path.split('.'); + return function (obj) { + for (var i = 0; i < segments.length; i++) { + if (!obj) { return } + obj = obj[segments[i]]; + } + return obj + } + } +} -// Browser environment sniffing -var inBrowser = typeof window !== 'undefined' && Object.prototype.toString.call(window) !== '[object Object]'; +/* */ +/* globals MutationObserver */ -// detect devtools -var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; +// can we use __proto__? +var hasProto = '__proto__' in {}; -// UA sniffing for working around browser-specific quirks +// Browser environment sniffing +var inBrowser = typeof window !== 'undefined'; var UA = inBrowser && window.navigator.userAgent.toLowerCase(); +var isIE = UA && /msie|trident/.test(UA); var isIE9 = UA && UA.indexOf('msie 9.0') > 0; +var isEdge = UA && UA.indexOf('edge/') > 0; var isAndroid = UA && UA.indexOf('android') > 0; +var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA); -var transitionProp = undefined; -var transitionEndEvent = undefined; -var animationProp = undefined; -var animationEndEvent = undefined; +// this needs to be lazy-evaled because vue may be required before +// vue-server-renderer can set VUE_ENV +var _isServer; +var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = global['process'].env.VUE_ENV === 'server'; + } else { + _isServer = false; + } + } + return _isServer +}; -// Transition property/event sniffing -if (inBrowser && !isIE9) { - var isWebkitTrans = window.ontransitionend === undefined && window.onwebkittransitionend !== undefined; - var isWebkitAnim = window.onanimationend === undefined && window.onwebkitanimationend !== undefined; - transitionProp = isWebkitTrans ? 'WebkitTransition' : 'transition'; - transitionEndEvent = isWebkitTrans ? 'webkitTransitionEnd' : 'transitionend'; - animationProp = isWebkitAnim ? 'WebkitAnimation' : 'animation'; - animationEndEvent = isWebkitAnim ? 'webkitAnimationEnd' : 'animationend'; +// detect devtools +var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +/* istanbul ignore next */ +function isNative (Ctor) { + return /native code/.test(Ctor.toString()) } /** - * Defer a task to execute it asynchronously. Ideally this - * should be executed as a microtask, so we leverage - * MutationObserver if it's available, and fallback to - * setTimeout(0). - * - * @param {Function} cb - * @param {Object} ctx + * Defer a task to execute it asynchronously. */ - var nextTick = (function () { var callbacks = []; var pending = false; var timerFunc; - function nextTickHandler() { + + function nextTickHandler () { pending = false; var copies = callbacks.slice(0); - callbacks = []; + callbacks.length = 0; for (var i = 0; i < copies.length; i++) { copies[i](); } } + // the nextTick behavior leverages the microtask queue, which can be accessed + // via either native Promise.then or MutationObserver. + // MutationObserver has wider support, however it is seriously bugged in + // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It + // completely stops working after triggering a few times... so, if native + // Promise is available, we will use it: /* istanbul ignore if */ - if (typeof MutationObserver !== 'undefined') { + if (typeof Promise !== 'undefined' && isNative(Promise)) { + var p = Promise.resolve(); + var logError = function (err) { console.error(err); }; + timerFunc = function () { + p.then(nextTickHandler).catch(logError); + // in problematic UIWebViews, Promise.then doesn't completely break, but + // it can get stuck in a weird state where callbacks are pushed into the + // microtask queue but the queue isn't being flushed, until the browser + // needs to do some other work, e.g. handle a timer. Therefore we can + // "force" the microtask queue to be flushed by adding an empty timer. + if (isIOS) { setTimeout(noop); } + }; + } else if (typeof MutationObserver !== 'undefined' && ( + isNative(MutationObserver) || + // PhantomJS and iOS 7.x + MutationObserver.toString() === '[object MutationObserverConstructor]' + )) { + // use MutationObserver where native Promise is not available, + // e.g. PhantomJS IE11, iOS7, Android 4.4 var counter = 1; var observer = new MutationObserver(nextTickHandler); - var textNode = document.createTextNode(counter); + var textNode = document.createTextNode(String(counter)); observer.observe(textNode, { characterData: true }); timerFunc = function () { counter = (counter + 1) % 2; - textNode.data = counter; + textNode.data = String(counter); }; } else { - // webpack attempts to inject a shim for setImmediate - // if it is used as a global, so we have to work around that to - // avoid bundling unnecessary code. - var context = inBrowser ? window : typeof global !== 'undefined' ? global : {}; - timerFunc = context.setImmediate || setTimeout; - } - return function (cb, ctx) { - var func = ctx ? function () { - cb.call(ctx); - } : cb; - callbacks.push(func); - if (pending) return; - pending = true; - timerFunc(nextTickHandler, 0); - }; + // fallback to setTimeout + /* istanbul ignore next */ + timerFunc = function () { + setTimeout(nextTickHandler, 0); + }; + } + + return function queueNextTick (cb, ctx) { + var _resolve; + callbacks.push(function () { + if (cb) { cb.call(ctx); } + if (_resolve) { _resolve(ctx); } + }); + if (!pending) { + pending = true; + timerFunc(); + } + if (!cb && typeof Promise !== 'undefined') { + return new Promise(function (resolve) { + _resolve = resolve; + }) + } + } })(); -function Cache(limit) { - this.size = 0; - this.limit = limit; - this.head = this.tail = undefined; - this._keymap = Object.create(null); +var _Set; +/* istanbul ignore if */ +if (typeof Set !== 'undefined' && isNative(Set)) { + // use native Set when available. + _Set = Set; +} else { + // a non-standard Set polyfill that only works with primitive keys. + _Set = (function () { + function Set () { + this.set = Object.create(null); + } + Set.prototype.has = function has (key) { + return this.set[key] === true + }; + Set.prototype.add = function add (key) { + this.set[key] = true; + }; + Set.prototype.clear = function clear () { + this.set = Object.create(null); + }; + + return Set; + }()); } -var p = Cache.prototype; +var warn = noop; +var formatComponentName; -/** - * Put into the cache associated with . - * Returns the entry which was removed to make room for - * the new entry. Otherwise undefined is returned. - * (i.e. if there was enough room already). - * - * @param {String} key - * @param {*} value - * @return {Entry|undefined} - */ +if (process.env.NODE_ENV !== 'production') { + var hasConsole = typeof console !== 'undefined'; -p.put = function (key, value) { - var removed; - if (this.size === this.limit) { - removed = this.shift(); - } + warn = function (msg, vm) { + if (hasConsole && (!config.silent)) { + console.error("[Vue warn]: " + msg + " " + ( + vm ? formatLocation(formatComponentName(vm)) : '' + )); + } + }; - var entry = this.get(key, true); - if (!entry) { - entry = { - key: key - }; - this._keymap[key] = entry; - if (this.tail) { - this.tail.newer = entry; - entry.older = this.tail; - } else { - this.head = entry; + formatComponentName = function (vm) { + if (vm.$root === vm) { + return 'root instance' + } + var name = vm._isVue + ? vm.$options.name || vm.$options._componentTag + : vm.name; + return ( + (name ? ("component <" + name + ">") : "anonymous component") + + (vm._isVue && vm.$options.__file ? (" at " + (vm.$options.__file)) : '') + ) + }; + + var formatLocation = function (str) { + if (str === 'anonymous component') { + str += " - use the \"name\" option for better debugging messages."; } - this.tail = entry; - this.size++; - } - entry.value = value; + return ("\n(found in " + str + ")") + }; +} - return removed; -}; +/* */ + + +var uid$1 = 0; /** - * Purge the least recently used (oldest) entry from the - * cache. Returns the removed entry or undefined if the - * cache was empty. + * A dep is an observable that can have multiple + * directives subscribing to it. */ +var Dep = function Dep () { + this.id = uid$1++; + this.subs = []; +}; -p.shift = function () { - var entry = this.head; - if (entry) { - this.head = this.head.newer; - this.head.older = undefined; - entry.newer = entry.older = undefined; - this._keymap[entry.key] = undefined; - this.size--; - } - return entry; +Dep.prototype.addSub = function addSub (sub) { + this.subs.push(sub); }; -/** - * Get and register recent use of . Returns the value - * associated with or undefined if not in cache. - * - * @param {String} key - * @param {Boolean} returnEntry - * @return {Entry|*} - */ - -p.get = function (key, returnEntry) { - var entry = this._keymap[key]; - if (entry === undefined) return; - if (entry === this.tail) { - return returnEntry ? entry : entry.value; - } - // HEAD--------------TAIL - // <.older .newer> - // <--- add direction -- - // A B C E - if (entry.newer) { - if (entry === this.head) { - this.head = entry.newer; - } - entry.newer.older = entry.older; // C <-- E. - } - if (entry.older) { - entry.older.newer = entry.newer; // C. --> E - } - entry.newer = undefined; // D --x - entry.older = this.tail; // D. --> E - if (this.tail) { - this.tail.newer = entry; // E. <-- D - } - this.tail = entry; - return returnEntry ? entry : entry.value; -}; - -var cache$1 = new Cache(1000); -var filterTokenRE = /[^\s'"]+|'[^']*'|"[^"]*"/g; -var reservedArgRE = /^in$|^-?\d+/; - -/** - * Parser state - */ - -var str; -var dir; -var c; -var prev; -var i; -var l; -var lastFilterIndex; -var inSingle; -var inDouble; -var curly; -var square; -var paren; -/** - * Push a filter to the current directive object - */ - -function pushFilter() { - var exp = str.slice(lastFilterIndex, i).trim(); - var filter; - if (exp) { - filter = {}; - var tokens = exp.match(filterTokenRE); - filter.name = tokens[0]; - if (tokens.length > 1) { - filter.args = tokens.slice(1).map(processFilterArg); - } - } - if (filter) { - (dir.filters = dir.filters || []).push(filter); - } - lastFilterIndex = i + 1; -} - -/** - * Check if an argument is dynamic and strip quotes. - * - * @param {String} arg - * @return {Object} - */ - -function processFilterArg(arg) { - if (reservedArgRE.test(arg)) { - return { - value: toNumber(arg), - dynamic: false - }; - } else { - var stripped = stripQuotes(arg); - var dynamic = stripped === arg; - return { - value: dynamic ? arg : stripped, - dynamic: dynamic - }; - } -} - -/** - * Parse a directive value and extract the expression - * and its filters into a descriptor. - * - * Example: - * - * "a + 1 | uppercase" will yield: - * { - * expression: 'a + 1', - * filters: [ - * { name: 'uppercase', args: null } - * ] - * } - * - * @param {String} str - * @return {Object} - */ - -function parseDirective(s) { - var hit = cache$1.get(s); - if (hit) { - return hit; - } - - // reset parser state - str = s; - inSingle = inDouble = false; - curly = square = paren = 0; - lastFilterIndex = 0; - dir = {}; - - for (i = 0, l = str.length; i < l; i++) { - prev = c; - c = str.charCodeAt(i); - if (inSingle) { - // check single quote - if (c === 0x27 && prev !== 0x5C) inSingle = !inSingle; - } else if (inDouble) { - // check double quote - if (c === 0x22 && prev !== 0x5C) inDouble = !inDouble; - } else if (c === 0x7C && // pipe - str.charCodeAt(i + 1) !== 0x7C && str.charCodeAt(i - 1) !== 0x7C) { - if (dir.expression == null) { - // first filter, end of expression - lastFilterIndex = i + 1; - dir.expression = str.slice(0, i).trim(); - } else { - // already has filter - pushFilter(); - } - } else { - switch (c) { - case 0x22: - inDouble = true;break; // " - case 0x27: - inSingle = true;break; // ' - case 0x28: - paren++;break; // ( - case 0x29: - paren--;break; // ) - case 0x5B: - square++;break; // [ - case 0x5D: - square--;break; // ] - case 0x7B: - curly++;break; // { - case 0x7D: - curly--;break; // } - } - } - } - - if (dir.expression == null) { - dir.expression = str.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - - cache$1.put(s, dir); - return dir; -} - -var directive = Object.freeze({ - parseDirective: parseDirective -}); - -var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; -var cache = undefined; -var tagRE = undefined; -var htmlRE = undefined; -/** - * Escape a string so it can be used in a RegExp - * constructor. - * - * @param {String} str - */ - -function escapeRegex(str) { - return str.replace(regexEscapeRE, '\\$&'); -} - -function compileRegex() { - var open = escapeRegex(config.delimiters[0]); - var close = escapeRegex(config.delimiters[1]); - var unsafeOpen = escapeRegex(config.unsafeDelimiters[0]); - var unsafeClose = escapeRegex(config.unsafeDelimiters[1]); - tagRE = new RegExp(unsafeOpen + '(.+?)' + unsafeClose + '|' + open + '(.+?)' + close, 'g'); - htmlRE = new RegExp('^' + unsafeOpen + '.*' + unsafeClose + '$'); - // reset cache - cache = new Cache(1000); -} - -/** - * Parse a template text string into an array of tokens. - * - * @param {String} text - * @return {Array | null} - * - {String} type - * - {String} value - * - {Boolean} [html] - * - {Boolean} [oneTime] - */ - -function parseText(text) { - if (!cache) { - compileRegex(); - } - var hit = cache.get(text); - if (hit) { - return hit; - } - text = text.replace(/\n/g, ''); - if (!tagRE.test(text)) { - return null; - } - var tokens = []; - var lastIndex = tagRE.lastIndex = 0; - var match, index, html, value, first, oneTime; - /* eslint-disable no-cond-assign */ - while (match = tagRE.exec(text)) { - /* eslint-enable no-cond-assign */ - index = match.index; - // push text token - if (index > lastIndex) { - tokens.push({ - value: text.slice(lastIndex, index) - }); - } - // tag token - html = htmlRE.test(match[0]); - value = html ? match[1] : match[2]; - first = value.charCodeAt(0); - oneTime = first === 42; // * - value = oneTime ? value.slice(1) : value; - tokens.push({ - tag: true, - value: value.trim(), - html: html, - oneTime: oneTime - }); - lastIndex = index + match[0].length; - } - if (lastIndex < text.length) { - tokens.push({ - value: text.slice(lastIndex) - }); - } - cache.put(text, tokens); - return tokens; -} - -/** - * Format a list of tokens into an expression. - * e.g. tokens parsed from 'a {{b}} c' can be serialized - * into one single expression as '"a " + b + " c"'. - * - * @param {Array} tokens - * @param {Vue} [vm] - * @return {String} - */ - -function tokensToExp(tokens, vm) { - if (tokens.length > 1) { - return tokens.map(function (token) { - return formatToken(token, vm); - }).join('+'); - } else { - return formatToken(tokens[0], vm, true); - } -} - -/** - * Format a single token. - * - * @param {Object} token - * @param {Vue} [vm] - * @param {Boolean} [single] - * @return {String} - */ - -function formatToken(token, vm, single) { - return token.tag ? token.oneTime && vm ? '"' + vm.$eval(token.value) + '"' : inlineFilters(token.value, single) : '"' + token.value + '"'; -} - -/** - * For an attribute with multiple interpolation tags, - * e.g. attr="some-{{thing | filter}}", in order to combine - * the whole thing into a single watchable expression, we - * have to inline those filters. This function does exactly - * that. This is a bit hacky but it avoids heavy changes - * to directive parser and watcher mechanism. - * - * @param {String} exp - * @param {Boolean} single - * @return {String} - */ - -var filterRE = /[^|]\|[^|]/; -function inlineFilters(exp, single) { - if (!filterRE.test(exp)) { - return single ? exp : '(' + exp + ')'; - } else { - var dir = parseDirective(exp); - if (!dir.filters) { - return '(' + exp + ')'; - } else { - return 'this._applyFilters(' + dir.expression + // value - ',null,' + // oldValue (null for read) - JSON.stringify(dir.filters) + // filter descriptors - ',false)'; // write? - } - } -} - -var text = Object.freeze({ - compileRegex: compileRegex, - parseText: parseText, - tokensToExp: tokensToExp -}); - -var delimiters = ['{{', '}}']; -var unsafeDelimiters = ['{{{', '}}}']; - -var config = Object.defineProperties({ - - /** - * Whether to print debug messages. - * Also enables stack trace for warnings. - * - * @type {Boolean} - */ - - debug: false, - - /** - * Whether to suppress warnings. - * - * @type {Boolean} - */ - - silent: false, - - /** - * Whether to use async rendering. - */ - - async: true, - - /** - * Whether to warn against errors caught when evaluating - * expressions. - */ - - warnExpressionErrors: true, - - /** - * Whether to allow devtools inspection. - * Disabled by default in production builds. - */ - - devtools: process.env.NODE_ENV !== 'production', - - /** - * Internal flag to indicate the delimiters have been - * changed. - * - * @type {Boolean} - */ - - _delimitersChanged: true, - - /** - * List of asset types that a component can own. - * - * @type {Array} - */ - - _assetTypes: ['component', 'directive', 'elementDirective', 'filter', 'transition', 'partial'], - - /** - * prop binding modes - */ - - _propBindingModes: { - ONE_WAY: 0, - TWO_WAY: 1, - ONE_TIME: 2 - }, - - /** - * Max circular updates allowed in a batcher flush cycle. - */ - - _maxUpdateCount: 100 - -}, { - delimiters: { /** - * Interpolation delimiters. Changing these would trigger - * the text parser to re-compile the regular expressions. - * - * @type {Array} - */ - - get: function get() { - return delimiters; - }, - set: function set(val) { - delimiters = val; - compileRegex(); - }, - configurable: true, - enumerable: true - }, - unsafeDelimiters: { - get: function get() { - return unsafeDelimiters; - }, - set: function set(val) { - unsafeDelimiters = val; - compileRegex(); - }, - configurable: true, - enumerable: true - } -}); - -var warn = undefined; - -if (process.env.NODE_ENV !== 'production') { - (function () { - var hasConsole = typeof console !== 'undefined'; - warn = function (msg, e) { - if (hasConsole && (!config.silent || config.debug)) { - console.warn('[Vue warn]: ' + msg); - /* istanbul ignore if */ - if (config.debug) { - if (e) { - throw e; - } else { - console.warn(new Error('Warning Stack Trace').stack); - } - } - } - }; - })(); -} - -/** - * Append with transition. - * - * @param {Element} el - * @param {Element} target - * @param {Vue} vm - * @param {Function} [cb] - */ - -function appendWithTransition(el, target, vm, cb) { - applyTransition(el, 1, function () { - target.appendChild(el); - }, vm, cb); -} - -/** - * InsertBefore with transition. - * - * @param {Element} el - * @param {Element} target - * @param {Vue} vm - * @param {Function} [cb] - */ - -function beforeWithTransition(el, target, vm, cb) { - applyTransition(el, 1, function () { - before(el, target); - }, vm, cb); -} - -/** - * Remove with transition. - * - * @param {Element} el - * @param {Vue} vm - * @param {Function} [cb] - */ - -function removeWithTransition(el, vm, cb) { - applyTransition(el, -1, function () { - remove(el); - }, vm, cb); -} - -/** - * Apply transitions with an operation callback. - * - * @param {Element} el - * @param {Number} direction - * 1: enter - * -1: leave - * @param {Function} op - the actual DOM operation - * @param {Vue} vm - * @param {Function} [cb] - */ - -function applyTransition(el, direction, op, vm, cb) { - var transition = el.__v_trans; - if (!transition || - // skip if there are no js hooks and CSS transition is - // not supported - !transition.hooks && !transitionEndEvent || - // skip transitions for initial compile - !vm._isCompiled || - // if the vm is being manipulated by a parent directive - // during the parent's compilation phase, skip the - // animation. - vm.$parent && !vm.$parent._isCompiled) { - op(); - if (cb) cb(); - return; - } - var action = direction > 0 ? 'enter' : 'leave'; - transition[action](op, cb); -} - -var transition = Object.freeze({ - appendWithTransition: appendWithTransition, - beforeWithTransition: beforeWithTransition, - removeWithTransition: removeWithTransition, - applyTransition: applyTransition -}); - -/** - * Query an element selector if it's not an element already. - * - * @param {String|Element} el - * @return {Element} - */ - -function query(el) { - if (typeof el === 'string') { - var selector = el; - el = document.querySelector(el); - if (!el) { - process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + selector); - } - } - return el; -} - -/** - * Check if a node is in the document. - * Note: document.documentElement.contains should work here - * but always returns false for comment nodes in phantomjs, - * making unit tests difficult. This is fixed by doing the - * contains() check on the node's parentNode instead of - * the node itself. - * - * @param {Node} node - * @return {Boolean} - */ - -function inDoc(node) { - var doc = document.documentElement; - var parent = node && node.parentNode; - return doc === node || doc === parent || !!(parent && parent.nodeType === 1 && doc.contains(parent)); -} - -/** - * Get and remove an attribute from a node. - * - * @param {Node} node - * @param {String} _attr - */ - -function getAttr(node, _attr) { - var val = node.getAttribute(_attr); - if (val !== null) { - node.removeAttribute(_attr); - } - return val; -} - -/** - * Get an attribute with colon or v-bind: prefix. - * - * @param {Node} node - * @param {String} name - * @return {String|null} - */ - -function getBindAttr(node, name) { - var val = getAttr(node, ':' + name); - if (val === null) { - val = getAttr(node, 'v-bind:' + name); - } - return val; -} - -/** - * Check the presence of a bind attribute. - * - * @param {Node} node - * @param {String} name - * @return {Boolean} - */ - -function hasBindAttr(node, name) { - return node.hasAttribute(name) || node.hasAttribute(':' + name) || node.hasAttribute('v-bind:' + name); -} - -/** - * Insert el before target - * - * @param {Element} el - * @param {Element} target - */ - -function before(el, target) { - target.parentNode.insertBefore(el, target); -} - -/** - * Insert el after target - * - * @param {Element} el - * @param {Element} target - */ - -function after(el, target) { - if (target.nextSibling) { - before(el, target.nextSibling); - } else { - target.parentNode.appendChild(el); - } -} - -/** - * Remove el from DOM - * - * @param {Element} el - */ - -function remove(el) { - el.parentNode.removeChild(el); -} - -/** - * Prepend el to target - * - * @param {Element} el - * @param {Element} target - */ - -function prepend(el, target) { - if (target.firstChild) { - before(el, target.firstChild); - } else { - target.appendChild(el); - } -} - -/** - * Replace target with el - * - * @param {Element} target - * @param {Element} el - */ - -function replace(target, el) { - var parent = target.parentNode; - if (parent) { - parent.replaceChild(el, target); - } -} - -/** - * Add event listener shorthand. - * - * @param {Element} el - * @param {String} event - * @param {Function} cb - * @param {Boolean} [useCapture] - */ - -function on(el, event, cb, useCapture) { - el.addEventListener(event, cb, useCapture); -} - -/** - * Remove event listener shorthand. - * - * @param {Element} el - * @param {String} event - * @param {Function} cb - */ - -function off(el, event, cb) { - el.removeEventListener(event, cb); -} - -/** - * In IE9, setAttribute('class') will result in empty class - * if the element also has the :class attribute; However in - * PhantomJS, setting `className` does not work on SVG elements... - * So we have to do a conditional check here. - * - * @param {Element} el - * @param {String} cls - */ - -function setClass(el, cls) { - /* istanbul ignore if */ - if (isIE9 && !/svg$/.test(el.namespaceURI)) { - el.className = cls; - } else { - el.setAttribute('class', cls); - } -} - -/** - * Add class with compatibility for IE & SVG - * - * @param {Element} el - * @param {String} cls - */ - -function addClass(el, cls) { - if (el.classList) { - el.classList.add(cls); - } else { - var cur = ' ' + (el.getAttribute('class') || '') + ' '; - if (cur.indexOf(' ' + cls + ' ') < 0) { - setClass(el, (cur + cls).trim()); - } - } -} - -/** - * Remove class with compatibility for IE & SVG - * - * @param {Element} el - * @param {String} cls - */ - -function removeClass(el, cls) { - if (el.classList) { - el.classList.remove(cls); - } else { - var cur = ' ' + (el.getAttribute('class') || '') + ' '; - var tar = ' ' + cls + ' '; - while (cur.indexOf(tar) >= 0) { - cur = cur.replace(tar, ' '); - } - setClass(el, cur.trim()); - } - if (!el.className) { - el.removeAttribute('class'); - } -} - -/** - * Extract raw content inside an element into a temporary - * container div - * - * @param {Element} el - * @param {Boolean} asFragment - * @return {Element|DocumentFragment} - */ - -function extractContent(el, asFragment) { - var child; - var rawContent; - /* istanbul ignore if */ - if (isTemplate(el) && isFragment(el.content)) { - el = el.content; - } - if (el.hasChildNodes()) { - trimNode(el); - rawContent = asFragment ? document.createDocumentFragment() : document.createElement('div'); - /* eslint-disable no-cond-assign */ - while (child = el.firstChild) { - /* eslint-enable no-cond-assign */ - rawContent.appendChild(child); - } - } - return rawContent; -} - -/** - * Trim possible empty head/tail text and comment - * nodes inside a parent. - * - * @param {Node} node - */ - -function trimNode(node) { - var child; - /* eslint-disable no-sequences */ - while ((child = node.firstChild, isTrimmable(child))) { - node.removeChild(child); - } - while ((child = node.lastChild, isTrimmable(child))) { - node.removeChild(child); - } - /* eslint-enable no-sequences */ -} - -function isTrimmable(node) { - return node && (node.nodeType === 3 && !node.data.trim() || node.nodeType === 8); -} - -/** - * Check if an element is a template tag. - * Note if the template appears inside an SVG its tagName - * will be in lowercase. - * - * @param {Element} el - */ - -function isTemplate(el) { - return el.tagName && el.tagName.toLowerCase() === 'template'; -} - -/** - * Create an "anchor" for performing dom insertion/removals. - * This is used in a number of scenarios: - * - fragment instance - * - v-html - * - v-if - * - v-for - * - component - * - * @param {String} content - * @param {Boolean} persist - IE trashes empty textNodes on - * cloneNode(true), so in certain - * cases the anchor needs to be - * non-empty to be persisted in - * templates. - * @return {Comment|Text} - */ - -function createAnchor(content, persist) { - var anchor = config.debug ? document.createComment(content) : document.createTextNode(persist ? ' ' : ''); - anchor.__v_anchor = true; - return anchor; -} - -/** - * Find a component ref attribute that starts with $. - * - * @param {Element} node - * @return {String|undefined} - */ - -var refRE = /^v-ref:/; - -function findRef(node) { - if (node.hasAttributes()) { - var attrs = node.attributes; - for (var i = 0, l = attrs.length; i < l; i++) { - var name = attrs[i].name; - if (refRE.test(name)) { - return camelize(name.replace(refRE, '')); - } - } - } -} - -/** - * Map a function to a range of nodes . - * - * @param {Node} node - * @param {Node} end - * @param {Function} op - */ - -function mapNodeRange(node, end, op) { - var next; - while (node !== end) { - next = node.nextSibling; - op(node); - node = next; - } - op(end); -} - -/** - * Remove a range of nodes with transition, store - * the nodes in a fragment with correct ordering, - * and call callback when done. - * - * @param {Node} start - * @param {Node} end - * @param {Vue} vm - * @param {DocumentFragment} frag - * @param {Function} cb - */ +Dep.prototype.removeSub = function removeSub (sub) { + remove$1(this.subs, sub); +}; -function removeNodeRange(start, end, vm, frag, cb) { - var done = false; - var removed = 0; - var nodes = []; - mapNodeRange(start, end, function (node) { - if (node === end) done = true; - nodes.push(node); - removeWithTransition(node, vm, onRemoved); - }); - function onRemoved() { - removed++; - if (done && removed >= nodes.length) { - for (var i = 0; i < nodes.length; i++) { - frag.appendChild(nodes[i]); - } - cb && cb(); - } +Dep.prototype.depend = function depend () { + if (Dep.target) { + Dep.target.addDep(this); } -} - -/** - * Check if a node is a DocumentFragment. - * - * @param {Node} node - * @return {Boolean} - */ - -function isFragment(node) { - return node && node.nodeType === 11; -} - -/** - * Get outerHTML of elements, taking care - * of SVG elements in IE as well. - * - * @param {Element} el - * @return {String} - */ +}; -function getOuterHTML(el) { - if (el.outerHTML) { - return el.outerHTML; - } else { - var container = document.createElement('div'); - container.appendChild(el.cloneNode(true)); - return container.innerHTML; +Dep.prototype.notify = function notify () { + // stablize the subscriber list first + var subs = this.subs.slice(); + for (var i = 0, l = subs.length; i < l; i++) { + subs[i].update(); } -} - -var uid$1 = 0; - -/** - * A dep is an observable that can have multiple - * directives subscribing to it. - * - * @constructor - */ -function Dep() { - this.id = uid$1++; - this.subs = []; -} +}; // the current target watcher being evaluated. // this is globally unique because there could be only one // watcher being evaluated at any time. Dep.target = null; +var targetStack = []; -/** - * Add a directive subscriber. - * - * @param {Directive} sub - */ - -Dep.prototype.addSub = function (sub) { - this.subs.push(sub); -}; - -/** - * Remove a directive subscriber. - * - * @param {Directive} sub - */ - -Dep.prototype.removeSub = function (sub) { - this.subs.$remove(sub); -}; - -/** - * Add self as a dependency to the target watcher. - */ +function pushTarget (_target) { + if (Dep.target) { targetStack.push(Dep.target); } + Dep.target = _target; +} -Dep.prototype.depend = function () { - Dep.target.addDep(this); -}; +function popTarget () { + Dep.target = targetStack.pop(); +} -/** - * Notify all subscribers of a new value. +/* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype */ -Dep.prototype.notify = function () { - // stablize the subscriber list first - var subs = toArray(this.subs); - for (var i = 0, l = subs.length; i < l; i++) { - subs[i].update(); - } -}; - var arrayProto = Array.prototype; -var arrayMethods = Object.create(arrayProto) - -/** - * Intercept mutating methods and emit events - */ - -;['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'].forEach(function (method) { +var arrayMethods = Object.create(arrayProto);[ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' +] +.forEach(function (method) { // cache original method var original = arrayProto[method]; - def(arrayMethods, method, function mutator() { + def(arrayMethods, method, function mutator () { + var arguments$1 = arguments; + // avoid leaking arguments: // http://jsperf.com/closure-with-arguments var i = arguments.length; var args = new Array(i); while (i--) { - args[i] = arguments[i]; + args[i] = arguments$1[i]; } var result = original.apply(this, args); var ob = this.__ob__; @@ -1578,154 +630,86 @@ var arrayMethods = Object.create(arrayProto) switch (method) { case 'push': inserted = args; - break; + break case 'unshift': inserted = args; - break; + break case 'splice': inserted = args.slice(2); - break; + break } - if (inserted) ob.observeArray(inserted); + if (inserted) { ob.observeArray(inserted); } // notify change ob.dep.notify(); - return result; + return result }); }); -/** - * Swap the element at the given index with a new value - * and emits corresponding event. - * - * @param {Number} index - * @param {*} val - * @return {*} - replaced element - */ +/* */ -def(arrayProto, '$set', function $set(index, val) { - if (index >= this.length) { - this.length = Number(index) + 1; - } - return this.splice(index, 1, val)[0]; -}); +var arrayKeys = Object.getOwnPropertyNames(arrayMethods); /** - * Convenience method to remove the element at given index. - * - * @param {Number} index - * @param {*} val + * By default, when a reactive property is set, the new value is + * also converted to become reactive. However when passing down props, + * we don't want to force conversion because the value may be a nested value + * under a frozen data structure. Converting it would defeat the optimization. */ - -def(arrayProto, '$remove', function $remove(item) { - /* istanbul ignore if */ - if (!this.length) return; - var index = indexOf(this, item); - if (index > -1) { - return this.splice(index, 1); - } -}); - -var arrayKeys = Object.getOwnPropertyNames(arrayMethods); +var observerState = { + shouldConvert: true, + isSettingProps: false +}; /** * Observer class that are attached to each observed * object. Once attached, the observer converts target * object's property keys into getter/setters that * collect dependencies and dispatches updates. - * - * @param {Array|Object} value - * @constructor */ - -function Observer(value) { +var Observer = function Observer (value) { this.value = value; this.dep = new Dep(); + this.vmCount = 0; def(value, '__ob__', this); - if (isArray(value)) { - var augment = hasProto ? protoAugment : copyAugment; + if (Array.isArray(value)) { + var augment = hasProto + ? protoAugment + : copyAugment; augment(value, arrayMethods, arrayKeys); this.observeArray(value); } else { this.walk(value); } -} - -// Instance methods +}; /** * Walk through each property and convert them into * getter/setters. This method should only be called when * value type is Object. - * - * @param {Object} obj */ - -Observer.prototype.walk = function (obj) { +Observer.prototype.walk = function walk (obj) { var keys = Object.keys(obj); - for (var i = 0, l = keys.length; i < l; i++) { - this.convert(keys[i], obj[keys[i]]); + for (var i = 0; i < keys.length; i++) { + defineReactive$$1(obj, keys[i], obj[keys[i]]); } }; /** * Observe a list of Array items. - * - * @param {Array} items */ - -Observer.prototype.observeArray = function (items) { +Observer.prototype.observeArray = function observeArray (items) { for (var i = 0, l = items.length; i < l; i++) { observe(items[i]); } }; -/** - * Convert a property into getter/setter so we can emit - * the events when the property is accessed/changed. - * - * @param {String} key - * @param {*} val - */ - -Observer.prototype.convert = function (key, val) { - defineReactive(this.value, key, val); -}; - -/** - * Add an owner vm, so that when $set/$delete mutations - * happen we can notify owner vms to proxy the keys and - * digest the watchers. This is only called when the object - * is observed as an instance's root $data. - * - * @param {Vue} vm - */ - -Observer.prototype.addVm = function (vm) { - (this.vms || (this.vms = [])).push(vm); -}; - -/** - * Remove an owner vm. This is called when the object is - * swapped out as an instance's $data object. - * - * @param {Vue} vm - */ - -Observer.prototype.removeVm = function (vm) { - this.vms.$remove(vm); -}; - // helpers /** * Augment an target Object or Array by intercepting * the prototype chain using __proto__ - * - * @param {Object|Array} target - * @param {Object} proto */ - -function protoAugment(target, src) { +function protoAugment (target, src) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ @@ -1734,12 +718,9 @@ function protoAugment(target, src) { /** * Augment an target Object or Array by defining * hidden properties. - * - * @param {Object|Array} target - * @param {Object} proto */ - -function copyAugment(target, src, keys) { +/* istanbul ignore next */ +function copyAugment (target, src, keys) { for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; def(target, key, src[key]); @@ -1750,385 +731,272 @@ function copyAugment(target, src, keys) { * Attempt to create an observer instance for a value, * returns the new observer if successfully observed, * or the existing observer if the value already has one. - * - * @param {*} value - * @param {Vue} [vm] - * @return {Observer|undefined} - * @static */ - -function observe(value, vm) { - if (!value || typeof value !== 'object') { - return; +function observe (value, asRootData) { + if (!isObject(value)) { + return } var ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; - } else if ((isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue) { + } else if ( + observerState.shouldConvert && + !isServerRendering() && + (Array.isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value._isVue + ) { ob = new Observer(value); } - if (ob && vm) { - ob.addVm(vm); + if (asRootData && ob) { + ob.vmCount++; } - return ob; + return ob } /** * Define a reactive property on an Object. - * - * @param {Object} obj - * @param {String} key - * @param {*} val - * @param {Boolean} doNotObserve */ - -function defineReactive(obj, key, val, doNotObserve) { +function defineReactive$$1 ( + obj, + key, + val, + customSetter +) { var dep = new Dep(); var property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { - return; + return } // cater for pre-defined getter/setters var getter = property && property.get; var setter = property && property.set; - // if doNotObserve is true, only use the child value observer - // if it already exists, and do not attempt to create it. - // this allows freezing a large object from the root and - // avoid unnecessary observation inside v-for fragments. - var childOb = doNotObserve ? isObject(val) && val.__ob__ : observe(val); + var childOb = observe(val); Object.defineProperty(obj, key, { enumerable: true, configurable: true, - get: function reactiveGetter() { + get: function reactiveGetter () { var value = getter ? getter.call(obj) : val; if (Dep.target) { dep.depend(); if (childOb) { childOb.dep.depend(); } - if (isArray(value)) { - for (var e, i = 0, l = value.length; i < l; i++) { - e = value[i]; - e && e.__ob__ && e.__ob__.dep.depend(); - } + if (Array.isArray(value)) { + dependArray(value); } } - return value; + return value }, - set: function reactiveSetter(newVal) { + set: function reactiveSetter (newVal) { var value = getter ? getter.call(obj) : val; - if (newVal === value) { - return; + /* eslint-disable no-self-compare */ + if (newVal === value || (newVal !== newVal && value !== value)) { + return + } + /* eslint-enable no-self-compare */ + if (process.env.NODE_ENV !== 'production' && customSetter) { + customSetter(); } if (setter) { setter.call(obj, newVal); } else { val = newVal; } - childOb = doNotObserve ? isObject(newVal) && newVal.__ob__ : observe(newVal); + childOb = observe(newVal); dep.notify(); } }); } -var commonTagRE = /^(div|p|span|img|a|b|i|br|ul|ol|li|h1|h2|h3|h4|h5|h6|code|pre|table|th|td|tr|form|label|input|select|option|nav|article|section|header|footer)$/i; -var reservedTagRE = /^(slot|partial|component)$/i; - -var isUnknownElement = undefined; -if (process.env.NODE_ENV !== 'production') { - isUnknownElement = function (el, tag) { - if (tag.indexOf('-') > -1) { - // http://stackoverflow.com/a/28210364/1070244 - return el.constructor === window.HTMLUnknownElement || el.constructor === window.HTMLElement; - } else { - return (/HTMLUnknownElement/.test(el.toString()) && - // Chrome returns unknown for several HTML5 elements. - // https://code.google.com/p/chromium/issues/detail?id=540526 - !/^(data|time|rtc|rb)$/.test(tag) - ); - } - }; -} - -/** - * Check if an element is a component, if yes return its - * component id. - * - * @param {Element} el - * @param {Object} options - * @return {Object|undefined} - */ - -function checkComponentAttr(el, options) { - var tag = el.tagName.toLowerCase(); - var hasAttrs = el.hasAttributes(); - if (!commonTagRE.test(tag) && !reservedTagRE.test(tag)) { - if (resolveAsset(options, 'components', tag)) { - return { id: tag }; - } else { - var is = hasAttrs && getIsBinding(el); - if (is) { - return is; - } else if (process.env.NODE_ENV !== 'production') { - var expectedTag = options._componentNameMap && options._componentNameMap[tag]; - if (expectedTag) { - warn('Unknown custom element: <' + tag + '> - ' + 'did you mean <' + expectedTag + '>? ' + 'HTML is case-insensitive, remember to use kebab-case in templates.'); - } else if (isUnknownElement(el, tag)) { - warn('Unknown custom element: <' + tag + '> - did you ' + 'register the component correctly? For recursive components, ' + 'make sure to provide the "name" option.'); - } - } - } - } else if (hasAttrs) { - return getIsBinding(el); - } -} - -/** - * Get "is" binding from an element. - * - * @param {Element} el - * @return {Object|undefined} - */ - -function getIsBinding(el) { - // dynamic syntax - var exp = getAttr(el, 'is'); - if (exp != null) { - return { id: exp }; - } else { - exp = getBindAttr(el, 'is'); - if (exp != null) { - return { id: exp, dynamic: true }; - } - } -} - /** - * Set a prop's initial value on a vm and its data object. - * - * @param {Vue} vm - * @param {Object} prop - * @param {*} value + * Set a property on an object. Adds the new property and + * triggers change notification if the property doesn't + * already exist. */ - -function initProp(vm, prop, value) { - var key = prop.path; - value = coerceProp(prop, value); - if (value === undefined) { - value = getPropDefaultValue(vm, prop.options); +function set$1 (obj, key, val) { + if (Array.isArray(obj)) { + obj.length = Math.max(obj.length, key); + obj.splice(key, 1, val); + return val } - if (assertProp(prop, value)) { - defineReactive(vm, key, value, true /* doNotObserve */); + if (hasOwn(obj, key)) { + obj[key] = val; + return } -} - -/** - * Get the default value of a prop. - * - * @param {Vue} vm - * @param {Object} options - * @return {*} - */ - -function getPropDefaultValue(vm, options) { - // no default, return undefined - if (!hasOwn(options, 'default')) { - // absent boolean value defaults to false - return options.type === Boolean ? false : undefined; + var ob = obj.__ob__; + if (obj._isVue || (ob && ob.vmCount)) { + process.env.NODE_ENV !== 'production' && warn( + 'Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.' + ); + return } - var def = options['default']; - // warn against non-factory defaults for Object & Array - if (isObject(def)) { - process.env.NODE_ENV !== 'production' && warn('Object/Array as default prop values will be shared ' + 'across multiple instances. Use a factory function ' + 'to return the default value instead.'); + if (!ob) { + obj[key] = val; + return } - // call factory function for non-Function types - return typeof def === 'function' && options.type !== Function ? def.call(vm) : def; + defineReactive$$1(ob.value, key, val); + ob.dep.notify(); + return val } /** - * Assert whether a prop is valid. - * - * @param {Object} prop - * @param {*} value + * Delete a property and trigger change if necessary. */ - -function assertProp(prop, value) { - if (!prop.options.required && ( // non-required - prop.raw === null || // abscent - value == null) // null or undefined - ) { - return true; - } - var options = prop.options; - var type = options.type; - var valid = true; - var expectedType; - if (type) { - if (type === String) { - expectedType = 'string'; - valid = typeof value === expectedType; - } else if (type === Number) { - expectedType = 'number'; - valid = typeof value === 'number'; - } else if (type === Boolean) { - expectedType = 'boolean'; - valid = typeof value === 'boolean'; - } else if (type === Function) { - expectedType = 'function'; - valid = typeof value === 'function'; - } else if (type === Object) { - expectedType = 'object'; - valid = isPlainObject(value); - } else if (type === Array) { - expectedType = 'array'; - valid = isArray(value); - } else { - valid = value instanceof type; - } +function del (obj, key) { + var ob = obj.__ob__; + if (obj._isVue || (ob && ob.vmCount)) { + process.env.NODE_ENV !== 'production' && warn( + 'Avoid deleting properties on a Vue instance or its root $data ' + + '- just set it to null.' + ); + return } - if (!valid) { - process.env.NODE_ENV !== 'production' && warn('Invalid prop: type check failed for ' + prop.path + '="' + prop.raw + '".' + ' Expected ' + formatType(expectedType) + ', got ' + formatValue(value) + '.'); - return false; + if (!hasOwn(obj, key)) { + return } - var validator = options.validator; - if (validator) { - if (!validator(value)) { - process.env.NODE_ENV !== 'production' && warn('Invalid prop: custom validator check failed for ' + prop.path + '="' + prop.raw + '"'); - return false; - } + delete obj[key]; + if (!ob) { + return } - return true; + ob.dep.notify(); } /** - * Force parsing value with coerce option. - * - * @param {*} value - * @param {Object} options - * @return {*} + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. */ - -function coerceProp(prop, value) { - var coerce = prop.options.coerce; - if (!coerce) { - return value; +function dependArray (value) { + for (var e = (void 0), i = 0, l = value.length; i < l; i++) { + e = value[i]; + e && e.__ob__ && e.__ob__.dep.depend(); + if (Array.isArray(e)) { + dependArray(e); + } } - // coerce is a function - return coerce(value); -} - -function formatType(val) { - return val ? val.charAt(0).toUpperCase() + val.slice(1) : 'custom type'; } -function formatValue(val) { - return Object.prototype.toString.call(val).slice(8, -1); -} +/* */ /** * Option overwriting strategies are functions that handle * how to merge a parent option value and a child option * value into the final value. - * - * All strategy functions follow the same signature: - * - * @param {*} parentVal - * @param {*} childVal - * @param {Vue} [vm] */ +var strats = config.optionMergeStrategies; -var strats = config.optionMergeStrategies = Object.create(null); +/** + * Options with restrictions + */ +if (process.env.NODE_ENV !== 'production') { + strats.el = strats.propsData = function (parent, child, vm, key) { + if (!vm) { + warn( + "option \"" + key + "\" can only be used during instance " + + 'creation with the `new` keyword.' + ); + } + return defaultStrat(parent, child) + }; +} /** * Helper that recursively merges two data objects together. */ - -function mergeData(to, from) { +function mergeData (to, from) { + if (!from) { return to } var key, toVal, fromVal; - for (key in from) { + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + key = keys[i]; toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { - set(to, key, fromVal); - } else if (isObject(toVal) && isObject(fromVal)) { + set$1(to, key, fromVal); + } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { mergeData(toVal, fromVal); } } - return to; + return to } /** * Data */ - -strats.data = function (parentVal, childVal, vm) { +strats.data = function ( + parentVal, + childVal, + vm +) { if (!vm) { // in a Vue.extend merge, both should be functions if (!childVal) { - return parentVal; + return parentVal } if (typeof childVal !== 'function') { - process.env.NODE_ENV !== 'production' && warn('The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.'); - return parentVal; + process.env.NODE_ENV !== 'production' && warn( + 'The "data" option should be a function ' + + 'that returns a per-instance value in component ' + + 'definitions.', + vm + ); + return parentVal } if (!parentVal) { - return childVal; + return childVal } // when parentVal & childVal are both present, // we need to return a function that returns the // merged result of both functions... no need to // check if parentVal is a function here because // it has to be a function to pass previous merges. - return function mergedDataFn() { - return mergeData(childVal.call(this), parentVal.call(this)); - }; + return function mergedDataFn () { + return mergeData( + childVal.call(this), + parentVal.call(this) + ) + } } else if (parentVal || childVal) { - return function mergedInstanceDataFn() { + return function mergedInstanceDataFn () { // instance merge - var instanceData = typeof childVal === 'function' ? childVal.call(vm) : childVal; - var defaultData = typeof parentVal === 'function' ? parentVal.call(vm) : undefined; + var instanceData = typeof childVal === 'function' + ? childVal.call(vm) + : childVal; + var defaultData = typeof parentVal === 'function' + ? parentVal.call(vm) + : undefined; if (instanceData) { - return mergeData(instanceData, defaultData); + return mergeData(instanceData, defaultData) } else { - return defaultData; + return defaultData } - }; - } -}; - -/** - * El - */ - -strats.el = function (parentVal, childVal, vm) { - if (!vm && childVal && typeof childVal !== 'function') { - process.env.NODE_ENV !== 'production' && warn('The "el" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.'); - return; + } } - var ret = childVal || parentVal; - // invoke the element factory if this is instance merge - return vm && typeof ret === 'function' ? ret.call(vm) : ret; }; /** * Hooks and param attributes are merged as arrays. */ - -strats.init = strats.created = strats.ready = strats.attached = strats.detached = strats.beforeCompile = strats.compiled = strats.beforeDestroy = strats.destroyed = strats.activate = function (parentVal, childVal) { - return childVal ? parentVal ? parentVal.concat(childVal) : isArray(childVal) ? childVal : [childVal] : parentVal; -}; - -/** - * 0.11 deprecation warning - */ - -strats.paramAttributes = function () { - /* istanbul ignore next */ - process.env.NODE_ENV !== 'production' && warn('"paramAttributes" option has been deprecated in 0.12. ' + 'Use "props" instead.'); -}; +function mergeHook ( + parentVal, + childVal +) { + return childVal + ? parentVal + ? parentVal.concat(childVal) + : Array.isArray(childVal) + ? childVal + : [childVal] + : parentVal +} + +config._lifecycleHooks.forEach(function (hook) { + strats[hook] = mergeHook; +}); /** * Assets @@ -2137,10 +1005,11 @@ strats.paramAttributes = function () { * a three-way merge between constructor options, instance * options and parent options. */ - -function mergeAssets(parentVal, childVal) { - var res = Object.create(parentVal); - return childVal ? extend(res, guardArrayAssets(childVal)) : res; +function mergeAssets (parentVal, childVal) { + var res = Object.create(parentVal || null); + return childVal + ? extend(res, childVal) + : res } config._assetTypes.forEach(function (type) { @@ -2148,79 +1017,64 @@ config._assetTypes.forEach(function (type) { }); /** - * Events & Watchers. + * Watchers. * - * Events & watchers hashes should not overwrite one + * Watchers hashes should not overwrite one * another, so we merge them as arrays. */ - -strats.watch = strats.events = function (parentVal, childVal) { - if (!childVal) return parentVal; - if (!parentVal) return childVal; +strats.watch = function (parentVal, childVal) { + /* istanbul ignore if */ + if (!childVal) { return parentVal } + if (!parentVal) { return childVal } var ret = {}; extend(ret, parentVal); for (var key in childVal) { var parent = ret[key]; var child = childVal[key]; - if (parent && !isArray(parent)) { + if (parent && !Array.isArray(parent)) { parent = [parent]; } - ret[key] = parent ? parent.concat(child) : [child]; + ret[key] = parent + ? parent.concat(child) + : [child]; } - return ret; + return ret }; /** * Other object hashes. */ - -strats.props = strats.methods = strats.computed = function (parentVal, childVal) { - if (!childVal) return parentVal; - if (!parentVal) return childVal; +strats.props = +strats.methods = +strats.computed = function (parentVal, childVal) { + if (!childVal) { return parentVal } + if (!parentVal) { return childVal } var ret = Object.create(null); extend(ret, parentVal); extend(ret, childVal); - return ret; + return ret }; /** * Default strategy. */ - -var defaultStrat = function defaultStrat(parentVal, childVal) { - return childVal === undefined ? parentVal : childVal; +var defaultStrat = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal }; /** - * Make sure component options get converted to actual - * constructors. - * - * @param {Object} options + * Validate component names */ - -function guardComponents(options) { - if (options.components) { - var components = options.components = guardArrayAssets(options.components); - var ids = Object.keys(components); - var def; - if (process.env.NODE_ENV !== 'production') { - var map = options._componentNameMap = {}; - } - for (var i = 0, l = ids.length; i < l; i++) { - var key = ids[i]; - if (commonTagRE.test(key) || reservedTagRE.test(key)) { - process.env.NODE_ENV !== 'production' && warn('Do not use built-in or reserved HTML elements as component ' + 'id: ' + key); - continue; - } - // record a all lowercase <-> kebab-case mapping for - // possible custom element case error warning - if (process.env.NODE_ENV !== 'production') { - map[key.replace(/-/g, '').toLowerCase()] = hyphenate(key); - } - def = components[key]; - if (isPlainObject(def)) { - components[key] = Vue.extend(def); - } +function checkComponents (options) { + for (var key in options.components) { + var lower = key.toLowerCase(); + if (isBuiltInTag(lower) || config.isReservedTag(lower)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + key + ); } } } @@ -2228,83 +1082,81 @@ function guardComponents(options) { /** * Ensure all props option syntax are normalized into the * Object-based format. - * - * @param {Object} options */ - -function guardProps(options) { +function normalizeProps (options) { var props = options.props; - var i, val; - if (isArray(props)) { - options.props = {}; + if (!props) { return } + var res = {}; + var i, val, name; + if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { - options.props[val] = null; - } else if (val.name) { - options.props[val.name] = val; + name = camelize(val); + res[name] = { type: null }; + } else if (process.env.NODE_ENV !== 'production') { + warn('props must be strings when using array syntax.'); } } } else if (isPlainObject(props)) { - var keys = Object.keys(props); - i = keys.length; - while (i--) { - val = props[keys[i]]; - if (typeof val === 'function') { - props[keys[i]] = { type: val }; - } + for (var key in props) { + val = props[key]; + name = camelize(key); + res[name] = isPlainObject(val) + ? val + : { type: val }; } } + options.props = res; } /** - * Guard an Array-format assets option and converted it - * into the key-value Object format. - * - * @param {Object|Array} assets - * @return {Object} + * Normalize raw function directives into object format. */ - -function guardArrayAssets(assets) { - if (isArray(assets)) { - var res = {}; - var i = assets.length; - var asset; - while (i--) { - asset = assets[i]; - var id = typeof asset === 'function' ? asset.options && asset.options.name || asset.id : asset.name || asset.id; - if (!id) { - process.env.NODE_ENV !== 'production' && warn('Array-syntax assets must provide a "name" or "id" field.'); - } else { - res[id] = asset; +function normalizeDirectives (options) { + var dirs = options.directives; + if (dirs) { + for (var key in dirs) { + var def = dirs[key]; + if (typeof def === 'function') { + dirs[key] = { bind: def, update: def }; } } - return res; } - return assets; } /** * Merge two option objects into a new one. * Core utility used in both instantiation and inheritance. - * - * @param {Object} parent - * @param {Object} child - * @param {Vue} [vm] - if vm is present, indicates this is - * an instantiation merge. */ - -function mergeOptions(parent, child, vm) { - guardComponents(child); - guardProps(child); - var options = {}; - var key; +function mergeOptions ( + parent, + child, + vm +) { + if (process.env.NODE_ENV !== 'production') { + checkComponents(child); + } + normalizeProps(child); + normalizeDirectives(child); + var extendsFrom = child.extends; + if (extendsFrom) { + parent = typeof extendsFrom === 'function' + ? mergeOptions(parent, extendsFrom.options, vm) + : mergeOptions(parent, extendsFrom, vm); + } if (child.mixins) { for (var i = 0, l = child.mixins.length; i < l; i++) { - parent = mergeOptions(parent, child.mixins[i], vm); + var mixin = child.mixins[i]; + if (mixin.prototype instanceof Vue$3) { + mixin = mixin.options; + } + parent = mergeOptions(parent, mixin, vm); } } + var options = {}; + var key; for (key in parent) { mergeField(key); } @@ -2313,996 +1165,519 @@ function mergeOptions(parent, child, vm) { mergeField(key); } } - function mergeField(key) { + function mergeField (key) { var strat = strats[key] || defaultStrat; options[key] = strat(parent[key], child[key], vm, key); } - return options; + return options } /** * Resolve an asset. * This function is used because child instances need access * to assets defined in its ancestor chain. - * - * @param {Object} options - * @param {String} type - * @param {String} id - * @return {Object|Function} */ - -function resolveAsset(options, type, id) { +function resolveAsset ( + options, + type, + id, + warnMissing +) { /* istanbul ignore if */ if (typeof id !== 'string') { - return; + return } var assets = options[type]; - var camelizedId; - return assets[id] || - // camelCase ID - assets[camelizedId = camelize(id)] || - // Pascal Case ID - assets[camelizedId.charAt(0).toUpperCase() + camelizedId.slice(1)]; -} - -/** - * Assert asset exists - */ - -function assertAsset(val, type, id) { - if (!val) { - process.env.NODE_ENV !== 'production' && warn('Failed to resolve ' + type + ': ' + id); - } -} - - - -var util = Object.freeze({ - defineReactive: defineReactive, - set: set, - del: del, - hasOwn: hasOwn, - isLiteral: isLiteral, - isReserved: isReserved, - _toString: _toString, - toNumber: toNumber, - toBoolean: toBoolean, - stripQuotes: stripQuotes, - camelize: camelize, - hyphenate: hyphenate, - classify: classify, - bind: bind, - toArray: toArray, - extend: extend, - isObject: isObject, - isPlainObject: isPlainObject, - def: def, - debounce: _debounce, - indexOf: indexOf, - cancellable: cancellable, - looseEqual: looseEqual, - isArray: isArray, - hasProto: hasProto, - inBrowser: inBrowser, - devtools: devtools, - isIE9: isIE9, - isAndroid: isAndroid, - get transitionProp () { return transitionProp; }, - get transitionEndEvent () { return transitionEndEvent; }, - get animationProp () { return animationProp; }, - get animationEndEvent () { return animationEndEvent; }, - nextTick: nextTick, - query: query, - inDoc: inDoc, - getAttr: getAttr, - getBindAttr: getBindAttr, - hasBindAttr: hasBindAttr, - before: before, - after: after, - remove: remove, - prepend: prepend, - replace: replace, - on: on, - off: off, - setClass: setClass, - addClass: addClass, - removeClass: removeClass, - extractContent: extractContent, - trimNode: trimNode, - isTemplate: isTemplate, - createAnchor: createAnchor, - findRef: findRef, - mapNodeRange: mapNodeRange, - removeNodeRange: removeNodeRange, - isFragment: isFragment, - getOuterHTML: getOuterHTML, - mergeOptions: mergeOptions, - resolveAsset: resolveAsset, - assertAsset: assertAsset, - checkComponentAttr: checkComponentAttr, - initProp: initProp, - assertProp: assertProp, - coerceProp: coerceProp, - commonTagRE: commonTagRE, - reservedTagRE: reservedTagRE, - get warn () { return warn; } -}); - -var uid = 0; - -function initMixin (Vue) { - /** - * The main init sequence. This is called for every - * instance, including ones that are created from extended - * constructors. - * - * @param {Object} options - this options object should be - * the result of merging class - * options and the options passed - * in to the constructor. - */ - - Vue.prototype._init = function (options) { - options = options || {}; - - this.$el = null; - this.$parent = options.parent; - this.$root = this.$parent ? this.$parent.$root : this; - this.$children = []; - this.$refs = {}; // child vm references - this.$els = {}; // element references - this._watchers = []; // all watchers as an array - this._directives = []; // all directives - - // a uid - this._uid = uid++; - - // a flag to avoid this being observed - this._isVue = true; - - // events bookkeeping - this._events = {}; // registered callbacks - this._eventsCount = {}; // for $broadcast optimization - - // fragment instance properties - this._isFragment = false; - this._fragment = // @type {DocumentFragment} - this._fragmentStart = // @type {Text|Comment} - this._fragmentEnd = null; // @type {Text|Comment} - - // lifecycle state - this._isCompiled = this._isDestroyed = this._isReady = this._isAttached = this._isBeingDestroyed = this._vForRemoving = false; - this._unlinkFn = null; - - // context: - // if this is a transcluded component, context - // will be the common parent vm of this instance - // and its host. - this._context = options._context || this.$parent; - - // scope: - // if this is inside an inline v-for, the scope - // will be the intermediate scope created for this - // repeat fragment. this is used for linking props - // and container directives. - this._scope = options._scope; - - // fragment: - // if this instance is compiled inside a Fragment, it - // needs to reigster itself as a child of that fragment - // for attach/detach to work properly. - this._frag = options._frag; - if (this._frag) { - this._frag.children.push(this); - } - - // push self into parent / transclusion host - if (this.$parent) { - this.$parent.$children.push(this); - } - - // merge options. - options = this.$options = mergeOptions(this.constructor.options, options, this); - - // set ref - this._updateRef(); - - // initialize data as empty object. - // it will be filled up in _initScope(). - this._data = {}; - - // save raw constructor data before merge - // so that we know which properties are provided at - // instantiation. - this._runtimeData = options.data; - - // call init hook - this._callHook('init'); - - // initialize data observation and scope inheritance. - this._initState(); - - // setup event system and option events. - this._initEvents(); - - // call created hook - this._callHook('created'); - - // if `el` option is passed, start compilation. - if (options.el) { - this.$mount(options.el); - } - }; -} - -var pathCache = new Cache(1000); - -// actions -var APPEND = 0; -var PUSH = 1; -var INC_SUB_PATH_DEPTH = 2; -var PUSH_SUB_PATH = 3; - -// states -var BEFORE_PATH = 0; -var IN_PATH = 1; -var BEFORE_IDENT = 2; -var IN_IDENT = 3; -var IN_SUB_PATH = 4; -var IN_SINGLE_QUOTE = 5; -var IN_DOUBLE_QUOTE = 6; -var AFTER_PATH = 7; -var ERROR = 8; - -var pathStateMachine = []; - -pathStateMachine[BEFORE_PATH] = { - 'ws': [BEFORE_PATH], - 'ident': [IN_IDENT, APPEND], - '[': [IN_SUB_PATH], - 'eof': [AFTER_PATH] -}; - -pathStateMachine[IN_PATH] = { - 'ws': [IN_PATH], - '.': [BEFORE_IDENT], - '[': [IN_SUB_PATH], - 'eof': [AFTER_PATH] -}; - -pathStateMachine[BEFORE_IDENT] = { - 'ws': [BEFORE_IDENT], - 'ident': [IN_IDENT, APPEND] -}; - -pathStateMachine[IN_IDENT] = { - 'ident': [IN_IDENT, APPEND], - '0': [IN_IDENT, APPEND], - 'number': [IN_IDENT, APPEND], - 'ws': [IN_PATH, PUSH], - '.': [BEFORE_IDENT, PUSH], - '[': [IN_SUB_PATH, PUSH], - 'eof': [AFTER_PATH, PUSH] -}; - -pathStateMachine[IN_SUB_PATH] = { - "'": [IN_SINGLE_QUOTE, APPEND], - '"': [IN_DOUBLE_QUOTE, APPEND], - '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH], - ']': [IN_PATH, PUSH_SUB_PATH], - 'eof': ERROR, - 'else': [IN_SUB_PATH, APPEND] -}; - -pathStateMachine[IN_SINGLE_QUOTE] = { - "'": [IN_SUB_PATH, APPEND], - 'eof': ERROR, - 'else': [IN_SINGLE_QUOTE, APPEND] -}; - -pathStateMachine[IN_DOUBLE_QUOTE] = { - '"': [IN_SUB_PATH, APPEND], - 'eof': ERROR, - 'else': [IN_DOUBLE_QUOTE, APPEND] -}; - -/** - * Determine the type of a character in a keypath. - * - * @param {Char} ch - * @return {String} type - */ - -function getPathCharType(ch) { - if (ch === undefined) { - return 'eof'; - } - - var code = ch.charCodeAt(0); - - switch (code) { - case 0x5B: // [ - case 0x5D: // ] - case 0x2E: // . - case 0x22: // " - case 0x27: // ' - case 0x30: - // 0 - return ch; - - case 0x5F: // _ - case 0x24: - // $ - return 'ident'; - - case 0x20: // Space - case 0x09: // Tab - case 0x0A: // Newline - case 0x0D: // Return - case 0xA0: // No-break space - case 0xFEFF: // Byte Order Mark - case 0x2028: // Line Separator - case 0x2029: - // Paragraph Separator - return 'ws'; - } - - // a-z, A-Z - if (code >= 0x61 && code <= 0x7A || code >= 0x41 && code <= 0x5A) { - return 'ident'; + // check local registration variations first + if (hasOwn(assets, id)) { return assets[id] } + var camelizedId = camelize(id); + if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } + var PascalCaseId = capitalize(camelizedId); + if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } + // fallback to prototype chain + var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; + if (process.env.NODE_ENV !== 'production' && warnMissing && !res) { + warn( + 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, + options + ); + } + return res +} + +/* */ + +function validateProp ( + key, + propOptions, + propsData, + vm +) { + var prop = propOptions[key]; + var absent = !hasOwn(propsData, key); + var value = propsData[key]; + // handle boolean props + if (isType(Boolean, prop.type)) { + if (absent && !hasOwn(prop, 'default')) { + value = false; + } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) { + value = true; + } + } + // check default value + if (value === undefined) { + value = getPropDefaultValue(vm, prop, key); + // since the default value is a fresh copy, + // make sure to observe it. + var prevShouldConvert = observerState.shouldConvert; + observerState.shouldConvert = true; + observe(value); + observerState.shouldConvert = prevShouldConvert; } - - // 1-9 - if (code >= 0x31 && code <= 0x39) { - return 'number'; + if (process.env.NODE_ENV !== 'production') { + assertProp(prop, key, value, vm, absent); } - - return 'else'; + return value } /** - * Format a subPath, return its plain form if it is - * a literal string or number. Otherwise prepend the - * dynamic indicator (*). - * - * @param {String} path - * @return {String} + * Get the default value of a prop. */ - -function formatSubPath(path) { - var trimmed = path.trim(); - // invalid leading 0 - if (path.charAt(0) === '0' && isNaN(path)) { - return false; +function getPropDefaultValue (vm, prop, key) { + // no default, return undefined + if (!hasOwn(prop, 'default')) { + return undefined } - return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed; + var def = prop.default; + // warn against non-factory defaults for Object & Array + if (isObject(def)) { + process.env.NODE_ENV !== 'production' && warn( + 'Invalid default value for prop "' + key + '": ' + + 'Props with type Object/Array must use a factory function ' + + 'to return the default value.', + vm + ); + } + // the raw prop value was also undefined from previous render, + // return previous default value to avoid unnecessary watcher trigger + if (vm && vm.$options.propsData && + vm.$options.propsData[key] === undefined && + vm[key] !== undefined) { + return vm[key] + } + // call factory function for non-Function types + return typeof def === 'function' && prop.type !== Function + ? def.call(vm) + : def } /** - * Parse a string path into an array of segments - * - * @param {String} path - * @return {Array|undefined} + * Assert whether a prop is valid. */ - -function parse(path) { - var keys = []; - var index = -1; - var mode = BEFORE_PATH; - var subPathDepth = 0; - var c, newChar, key, type, transition, action, typeMap; - - var actions = []; - - actions[PUSH] = function () { - if (key !== undefined) { - keys.push(key); - key = undefined; - } - }; - - actions[APPEND] = function () { - if (key === undefined) { - key = newChar; - } else { - key += newChar; - } - }; - - actions[INC_SUB_PATH_DEPTH] = function () { - actions[APPEND](); - subPathDepth++; - }; - - actions[PUSH_SUB_PATH] = function () { - if (subPathDepth > 0) { - subPathDepth--; - mode = IN_SUB_PATH; - actions[APPEND](); - } else { - subPathDepth = 0; - key = formatSubPath(key); - if (key === false) { - return false; - } else { - actions[PUSH](); - } +function assertProp ( + prop, + name, + value, + vm, + absent +) { + if (prop.required && absent) { + warn( + 'Missing required prop: "' + name + '"', + vm + ); + return + } + if (value == null && !prop.required) { + return + } + var type = prop.type; + var valid = !type || type === true; + var expectedTypes = []; + if (type) { + if (!Array.isArray(type)) { + type = [type]; } - }; - - function maybeUnescapeQuote() { - var nextChar = path[index + 1]; - if (mode === IN_SINGLE_QUOTE && nextChar === "'" || mode === IN_DOUBLE_QUOTE && nextChar === '"') { - index++; - newChar = '\\' + nextChar; - actions[APPEND](); - return true; + for (var i = 0; i < type.length && !valid; i++) { + var assertedType = assertType(value, type[i]); + expectedTypes.push(assertedType.expectedType); + valid = assertedType.valid; } } - - while (mode != null) { - index++; - c = path[index]; - - if (c === '\\' && maybeUnescapeQuote()) { - continue; - } - - type = getPathCharType(c); - typeMap = pathStateMachine[mode]; - transition = typeMap[type] || typeMap['else'] || ERROR; - - if (transition === ERROR) { - return; // parse error - } - - mode = transition[0]; - action = actions[transition[1]]; - if (action) { - newChar = transition[2]; - newChar = newChar === undefined ? c : newChar; - if (action() === false) { - return; - } - } - - if (mode === AFTER_PATH) { - keys.raw = path; - return keys; + if (!valid) { + warn( + 'Invalid prop: type check failed for prop "' + name + '".' + + ' Expected ' + expectedTypes.map(capitalize).join(', ') + + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', + vm + ); + return + } + var validator = prop.validator; + if (validator) { + if (!validator(value)) { + warn( + 'Invalid prop: custom validator check failed for prop "' + name + '".', + vm + ); } } } /** - * External parse that check for a cache hit first - * - * @param {String} path - * @return {Array|undefined} + * Assert the type of a value */ - -function parsePath(path) { - var hit = pathCache.get(path); - if (!hit) { - hit = parse(path); - if (hit) { - pathCache.put(path, hit); - } +function assertType (value, type) { + var valid; + var expectedType = getType(type); + if (expectedType === 'String') { + valid = typeof value === (expectedType = 'string'); + } else if (expectedType === 'Number') { + valid = typeof value === (expectedType = 'number'); + } else if (expectedType === 'Boolean') { + valid = typeof value === (expectedType = 'boolean'); + } else if (expectedType === 'Function') { + valid = typeof value === (expectedType = 'function'); + } else if (expectedType === 'Object') { + valid = isPlainObject(value); + } else if (expectedType === 'Array') { + valid = Array.isArray(value); + } else { + valid = value instanceof type; } - return hit; -} - -/** - * Get from an object from a path string - * - * @param {Object} obj - * @param {String} path - */ - -function getPath(obj, path) { - return parseExpression(path).get(obj); -} - -/** - * Warn against setting non-existent root path on a vm. - */ - -var warnNonExistent; -if (process.env.NODE_ENV !== 'production') { - warnNonExistent = function (path) { - warn('You are setting a non-existent path "' + path.raw + '" ' + 'on a vm instance. Consider pre-initializing the property ' + 'with the "data" option for more reliable reactivity ' + 'and better performance.'); - }; -} - -/** - * Set on an object from a path - * - * @param {Object} obj - * @param {String | Array} path - * @param {*} val - */ - -function setPath(obj, path, val) { - var original = obj; - if (typeof path === 'string') { - path = parse(path); - } - if (!path || !isObject(obj)) { - return false; - } - var last, key; - for (var i = 0, l = path.length; i < l; i++) { - last = obj; - key = path[i]; - if (key.charAt(0) === '*') { - key = parseExpression(key.slice(1)).get.call(original, original); - } - if (i < l - 1) { - obj = obj[key]; - if (!isObject(obj)) { - obj = {}; - if (process.env.NODE_ENV !== 'production' && last._isVue) { - warnNonExistent(path); - } - set(last, key, obj); - } - } else { - if (isArray(obj)) { - obj.$set(key, val); - } else if (key in obj) { - obj[key] = val; - } else { - if (process.env.NODE_ENV !== 'production' && obj._isVue) { - warnNonExistent(path); - } - set(obj, key, val); - } - } + return { + valid: valid, + expectedType: expectedType } - return true; } -var path = Object.freeze({ - parsePath: parsePath, - getPath: getPath, - setPath: setPath -}); - -var expressionCache = new Cache(1000); - -var allowedKeywords = 'Math,Date,this,true,false,null,undefined,Infinity,NaN,' + 'isNaN,isFinite,decodeURI,decodeURIComponent,encodeURI,' + 'encodeURIComponent,parseInt,parseFloat'; -var allowedKeywordsRE = new RegExp('^(' + allowedKeywords.replace(/,/g, '\\b|') + '\\b)'); - -// keywords that don't make sense inside expressions -var improperKeywords = 'break,case,class,catch,const,continue,debugger,default,' + 'delete,do,else,export,extends,finally,for,function,if,' + 'import,in,instanceof,let,return,super,switch,throw,try,' + 'var,while,with,yield,enum,await,implements,package,' + 'protected,static,interface,private,public'; -var improperKeywordsRE = new RegExp('^(' + improperKeywords.replace(/,/g, '\\b|') + '\\b)'); - -var wsRE = /\s/g; -var newlineRE = /\n/g; -var saveRE = /[\{,]\s*[\w\$_]+\s*:|('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`)|new |typeof |void /g; -var restoreRE = /"(\d+)"/g; -var pathTestRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*$/; -var identRE = /[^\w$\.](?:[A-Za-z_$][\w$]*)/g; -var booleanLiteralRE = /^(?:true|false)$/; - -/** - * Save / Rewrite / Restore - * - * When rewriting paths found in an expression, it is - * possible for the same letter sequences to be found in - * strings and Object literal property keys. Therefore we - * remove and store these parts in a temporary array, and - * restore them after the path rewrite. - */ - -var saved = []; - /** - * Save replacer - * - * The save regex can match two possible cases: - * 1. An opening object literal - * 2. A string - * If matched as a plain string, we need to escape its - * newlines, since the string needs to be preserved when - * generating the function body. - * - * @param {String} str - * @param {String} isString - str if matched as a string - * @return {String} - placeholder with index + * Use function string name to check built-in types, + * because a simple equality check will fail when running + * across different vms / iframes. */ - -function save(str, isString) { - var i = saved.length; - saved[i] = isString ? str.replace(newlineRE, '\\n') : str; - return '"' + i + '"'; +function getType (fn) { + var match = fn && fn.toString().match(/^\s*function (\w+)/); + return match && match[1] } -/** - * Path rewrite replacer - * - * @param {String} raw - * @return {String} - */ - -function rewrite(raw) { - var c = raw.charAt(0); - var path = raw.slice(1); - if (allowedKeywordsRE.test(path)) { - return raw; - } else { - path = path.indexOf('"') > -1 ? path.replace(restoreRE, restore) : path; - return c + 'scope.' + path; +function isType (type, fn) { + if (!Array.isArray(fn)) { + return getType(fn) === getType(type) } -} - -/** - * Restore replacer - * - * @param {String} str - * @param {String} i - matched save index - * @return {String} - */ - -function restore(str, i) { - return saved[i]; -} - -/** - * Rewrite an expression, prefixing all path accessors with - * `scope.` and generate getter/setter functions. - * - * @param {String} exp - * @return {Function} - */ - -function compileGetter(exp) { - if (improperKeywordsRE.test(exp)) { - process.env.NODE_ENV !== 'production' && warn('Avoid using reserved keywords in expression: ' + exp); + for (var i = 0, len = fn.length; i < len; i++) { + if (getType(fn[i]) === getType(type)) { + return true + } } - // reset state - saved.length = 0; - // save strings and object literal keys - var body = exp.replace(saveRE, save).replace(wsRE, ''); - // rewrite all paths - // pad 1 space here becaue the regex matches 1 extra char - body = (' ' + body).replace(identRE, rewrite).replace(restoreRE, restore); - return makeGetterFn(body); + /* istanbul ignore next */ + return false } -/** - * Build a getter function. Requires eval. - * - * We isolate the try/catch so it doesn't affect the - * optimization of the parse function when it is not called. - * - * @param {String} body - * @return {Function|undefined} - */ -function makeGetterFn(body) { - try { - /* eslint-disable no-new-func */ - return new Function('scope', 'return ' + body + ';'); - /* eslint-enable no-new-func */ - } catch (e) { - process.env.NODE_ENV !== 'production' && warn('Invalid expression. ' + 'Generated function body: ' + body); - } -} -/** - * Compile a setter function for the expression. - * - * @param {String} exp - * @return {Function|undefined} - */ +var util = Object.freeze({ + defineReactive: defineReactive$$1, + _toString: _toString, + toNumber: toNumber, + makeMap: makeMap, + isBuiltInTag: isBuiltInTag, + remove: remove$1, + hasOwn: hasOwn, + isPrimitive: isPrimitive, + cached: cached, + camelize: camelize, + capitalize: capitalize, + hyphenate: hyphenate, + bind: bind$1, + toArray: toArray, + extend: extend, + isObject: isObject, + isPlainObject: isPlainObject, + toObject: toObject, + noop: noop, + no: no, + identity: identity, + genStaticKeys: genStaticKeys, + looseEqual: looseEqual, + looseIndexOf: looseIndexOf, + isReserved: isReserved, + def: def, + parsePath: parsePath, + hasProto: hasProto, + inBrowser: inBrowser, + UA: UA, + isIE: isIE, + isIE9: isIE9, + isEdge: isEdge, + isAndroid: isAndroid, + isIOS: isIOS, + isServerRendering: isServerRendering, + devtools: devtools, + nextTick: nextTick, + get _Set () { return _Set; }, + mergeOptions: mergeOptions, + resolveAsset: resolveAsset, + get warn () { return warn; }, + get formatComponentName () { return formatComponentName; }, + validateProp: validateProp +}); + +/* not type checking this file because flow doesn't play well with Proxy */ -function compileSetter(exp) { - var path = parsePath(exp); - if (path) { - return function (scope, val) { - setPath(scope, path, val); - }; - } else { - process.env.NODE_ENV !== 'production' && warn('Invalid setter expression: ' + exp); - } -} +var initProxy; -/** - * Parse an expression into re-written getter/setters. - * - * @param {String} exp - * @param {Boolean} needSet - * @return {Function} - */ +if (process.env.NODE_ENV !== 'production') { + var allowedGlobals = makeMap( + 'Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + + 'require' // for Webpack/Browserify + ); + + var warnNonPresent = function (target, key) { + warn( + "Property or method \"" + key + "\" is not defined on the instance but " + + "referenced during render. Make sure to declare reactive data " + + "properties in the data option.", + target + ); + }; -function parseExpression(exp, needSet) { - exp = exp.trim(); - // try cache - var hit = expressionCache.get(exp); - if (hit) { - if (needSet && !hit.set) { - hit.set = compileSetter(hit.exp); - } - return hit; - } - var res = { exp: exp }; - res.get = isSimplePath(exp) && exp.indexOf('[') < 0 - // optimized super simple getter - ? makeGetterFn('scope.' + exp) - // dynamic getter - : compileGetter(exp); - if (needSet) { - res.set = compileSetter(exp); + var hasProxy = + typeof Proxy !== 'undefined' && + Proxy.toString().match(/native code/); + + if (hasProxy) { + var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta'); + config.keyCodes = new Proxy(config.keyCodes, { + set: function set (target, key, value) { + if (isBuiltInModifier(key)) { + warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); + return false + } else { + target[key] = value; + return true + } + } + }); } - expressionCache.put(exp, res); - return res; -} -/** - * Check if an expression is a simple path. - * - * @param {String} exp - * @return {Boolean} - */ + var hasHandler = { + has: function has (target, key) { + var has = key in target; + var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; + if (!has && !isAllowed) { + warnNonPresent(target, key); + } + return has || !isAllowed + } + }; + + var getHandler = { + get: function get (target, key) { + if (typeof key === 'string' && !(key in target)) { + warnNonPresent(target, key); + } + return target[key] + } + }; -function isSimplePath(exp) { - return pathTestRE.test(exp) && - // don't treat true/false as paths - !booleanLiteralRE.test(exp) && - // Math constants e.g. Math.PI, Math.E etc. - exp.slice(0, 5) !== 'Math.'; + initProxy = function initProxy (vm) { + if (hasProxy) { + // determine which proxy handler to use + var options = vm.$options; + var handlers = options.render && options.render._withStripped + ? getHandler + : hasHandler; + vm._renderProxy = new Proxy(vm, handlers); + } else { + vm._renderProxy = vm; + } + }; } -var expression = Object.freeze({ - parseExpression: parseExpression, - isSimplePath: isSimplePath -}); +/* */ -// we have two separate queues: one for directive updates -// and one for user watcher registered via $watch(). -// we want to guarantee directive updates to be called -// before user watchers so that when user watchers are -// triggered, the DOM would have already been in updated -// state. -var queueIndex; var queue = []; -var userQueue = []; -var has = {}; +var has$1 = {}; var circular = {}; var waiting = false; -var internalQueueDepleted = false; +var flushing = false; +var index = 0; /** - * Reset the batcher's state. + * Reset the scheduler's state. */ - -function resetBatcherState() { - queue = []; - userQueue = []; - has = {}; - circular = {}; - waiting = internalQueueDepleted = false; +function resetSchedulerState () { + queue.length = 0; + has$1 = {}; + if (process.env.NODE_ENV !== 'production') { + circular = {}; + } + waiting = flushing = false; } /** * Flush both queues and run the watchers. */ +function flushSchedulerQueue () { + flushing = true; -function flushBatcherQueue() { - runBatcherQueue(queue); - internalQueueDepleted = true; - runBatcherQueue(userQueue); - // dev tool hook - /* istanbul ignore if */ - if (devtools && config.devtools) { - devtools.emit('flush'); - } - resetBatcherState(); -} - -/** - * Run the watchers in a single queue. - * - * @param {Array} queue - */ + // Sort queue before flush. + // This ensures that: + // 1. Components are updated from parent to child. (because parent is always + // created before the child) + // 2. A component's user watchers are run before its render watcher (because + // user watchers are created before the render watcher) + // 3. If a component is destroyed during a parent component's watcher run, + // its watchers can be skipped. + queue.sort(function (a, b) { return a.id - b.id; }); -function runBatcherQueue(queue) { // do not cache length because more watchers might be pushed // as we run existing watchers - for (queueIndex = 0; queueIndex < queue.length; queueIndex++) { - var watcher = queue[queueIndex]; + for (index = 0; index < queue.length; index++) { + var watcher = queue[index]; var id = watcher.id; - has[id] = null; + has$1[id] = null; watcher.run(); // in dev build, check and stop circular updates. - if (process.env.NODE_ENV !== 'production' && has[id] != null) { + if (process.env.NODE_ENV !== 'production' && has$1[id] != null) { circular[id] = (circular[id] || 0) + 1; if (circular[id] > config._maxUpdateCount) { - queue.splice(has[id], 1); - warn('You may have an infinite update loop for watcher ' + 'with expression: ' + watcher.expression); + warn( + 'You may have an infinite update loop ' + ( + watcher.user + ? ("in watcher with expression \"" + (watcher.expression) + "\"") + : "in a component render function." + ), + watcher.vm + ); + break } } } + + // devtool hook + /* istanbul ignore if */ + if (devtools && config.devtools) { + devtools.emit('flush'); + } + + resetSchedulerState(); } /** * Push a watcher into the watcher queue. * Jobs with duplicate IDs will be skipped unless it's * pushed when the queue is being flushed. - * - * @param {Watcher} watcher - * properties: - * - {Number} id - * - {Function} run */ - -function pushWatcher(watcher) { +function queueWatcher (watcher) { var id = watcher.id; - if (has[id] == null) { - if (internalQueueDepleted && !watcher.user) { - // an internal watcher triggered by a user watcher... - // let's run it immediately after current user watcher is done. - userQueue.splice(queueIndex + 1, 0, watcher); + if (has$1[id] == null) { + has$1[id] = true; + if (!flushing) { + queue.push(watcher); } else { - // push watcher into appropriate queue - var q = watcher.user ? userQueue : queue; - has[id] = q.length; - q.push(watcher); - // queue the flush - if (!waiting) { - waiting = true; - nextTick(flushBatcherQueue); + // if already flushing, splice the watcher based on its id + // if already past its id, it will be run next immediately. + var i = queue.length - 1; + while (i >= 0 && queue[i].id > watcher.id) { + i--; } + queue.splice(Math.max(i, index) + 1, 0, watcher); + } + // queue the flush + if (!waiting) { + waiting = true; + nextTick(flushSchedulerQueue); } } } +/* */ + var uid$2 = 0; /** * A watcher parses an expression, collects dependencies, * and fires callback when the expression value changes. * This is used for both the $watch() api and directives. - * - * @param {Vue} vm - * @param {String} expression - * @param {Function} cb - * @param {Object} options - * - {Array} filters - * - {Boolean} twoWay - * - {Boolean} deep - * - {Boolean} user - * - {Boolean} sync - * - {Boolean} lazy - * - {Function} [preProcess] - * - {Function} [postProcess] - * @constructor */ -function Watcher(vm, expOrFn, cb, options) { - // mix in options - if (options) { - extend(this, options); - } - var isFn = typeof expOrFn === 'function'; +var Watcher = function Watcher ( + vm, + expOrFn, + cb, + options +) { this.vm = vm; vm._watchers.push(this); - this.expression = expOrFn; + // options + if (options) { + this.deep = !!options.deep; + this.user = !!options.user; + this.lazy = !!options.lazy; + this.sync = !!options.sync; + } else { + this.deep = this.user = this.lazy = this.sync = false; + } this.cb = cb; this.id = ++uid$2; // uid for batching this.active = true; this.dirty = this.lazy; // for lazy watchers this.deps = []; this.newDeps = []; - this.depIds = Object.create(null); - this.newDepIds = null; - this.prevError = null; // for async error stacks - // parse expression for getter/setter - if (isFn) { + this.depIds = new _Set(); + this.newDepIds = new _Set(); + this.expression = process.env.NODE_ENV !== 'production' + ? expOrFn.toString() + : ''; + // parse expression for getter + if (typeof expOrFn === 'function') { this.getter = expOrFn; - this.setter = undefined; } else { - var res = parseExpression(expOrFn, this.twoWay); - this.getter = res.get; - this.setter = res.set; + this.getter = parsePath(expOrFn); + if (!this.getter) { + this.getter = function () {}; + process.env.NODE_ENV !== 'production' && warn( + "Failed watching path: \"" + expOrFn + "\" " + + 'Watcher only accepts simple dot-delimited paths. ' + + 'For full control, use a function instead.', + vm + ); + } } - this.value = this.lazy ? undefined : this.get(); - // state for avoiding false triggers for deep and Array - // watchers during vm._digest() - this.queued = this.shallow = false; -} + this.value = this.lazy + ? undefined + : this.get(); +}; /** * Evaluate the getter, and re-collect dependencies. */ - -Watcher.prototype.get = function () { - this.beforeGet(); - var scope = this.scope || this.vm; - var value; - try { - value = this.getter.call(scope, scope); - } catch (e) { - if (process.env.NODE_ENV !== 'production' && config.warnExpressionErrors) { - warn('Error when evaluating expression "' + this.expression + '". ' + (config.debug ? '' : 'Turn on debug mode to see stack trace.'), e); - } - } +Watcher.prototype.get = function get () { + pushTarget(this); + var value = this.getter.call(this.vm, this.vm); // "touch" every property so they are all tracked as // dependencies for deep watching if (this.deep) { traverse(value); } - if (this.preProcess) { - value = this.preProcess(value); - } - if (this.filters) { - value = scope._applyFilters(value, null, this.filters, false); - } - if (this.postProcess) { - value = this.postProcess(value); - } - this.afterGet(); - return value; -}; - -/** - * Set the corresponding value with the setter. - * - * @param {*} value - */ - -Watcher.prototype.set = function (value) { - var scope = this.scope || this.vm; - if (this.filters) { - value = scope._applyFilters(value, this.value, this.filters, true); - } - try { - this.setter.call(scope, scope, value); - } catch (e) { - if (process.env.NODE_ENV !== 'production' && config.warnExpressionErrors) { - warn('Error when evaluating setter "' + this.expression + '"', e); - } - } - // two-way sync for v-for alias - var forContext = scope.$forContext; - if (forContext && forContext.alias === this.expression) { - if (forContext.filters) { - process.env.NODE_ENV !== 'production' && warn('It seems you are using two-way binding on ' + 'a v-for alias (' + this.expression + '), and the ' + 'v-for has filters. This will not work properly. ' + 'Either remove the filters or use an array of ' + 'objects and bind to object properties instead.'); - return; - } - forContext._withLock(function () { - if (scope.$key) { - // original is an object - forContext.rawValue[scope.$key] = value; - } else { - forContext.rawValue.$set(scope.$index, value); - } - }); - } -}; - -/** - * Prepare for dependency collection. - */ - -Watcher.prototype.beforeGet = function () { - Dep.target = this; - this.newDepIds = Object.create(null); - this.newDeps.length = 0; + popTarget(); + this.cleanupDeps(); + return value }; /** * Add a dependency to this directive. - * - * @param {Dep} dep */ - -Watcher.prototype.addDep = function (dep) { +Watcher.prototype.addDep = function addDep (dep) { var id = dep.id; - if (!this.newDepIds[id]) { - this.newDepIds[id] = true; + if (!this.newDepIds.has(id)) { + this.newDepIds.add(id); this.newDeps.push(dep); - if (!this.depIds[id]) { + if (!this.depIds.has(id)) { dep.addSub(this); } } @@ -3311,85 +1686,78 @@ Watcher.prototype.addDep = function (dep) { /** * Clean up for dependency collection. */ +Watcher.prototype.cleanupDeps = function cleanupDeps () { + var this$1 = this; -Watcher.prototype.afterGet = function () { - Dep.target = null; var i = this.deps.length; while (i--) { - var dep = this.deps[i]; - if (!this.newDepIds[dep.id]) { - dep.removeSub(this); + var dep = this$1.deps[i]; + if (!this$1.newDepIds.has(dep.id)) { + dep.removeSub(this$1); } } + var tmp = this.depIds; this.depIds = this.newDepIds; - var tmp = this.deps; + this.newDepIds = tmp; + this.newDepIds.clear(); + tmp = this.deps; this.deps = this.newDeps; this.newDeps = tmp; + this.newDeps.length = 0; }; /** * Subscriber interface. * Will be called when a dependency changes. - * - * @param {Boolean} shallow */ - -Watcher.prototype.update = function (shallow) { +Watcher.prototype.update = function update () { + /* istanbul ignore else */ if (this.lazy) { this.dirty = true; - } else if (this.sync || !config.async) { + } else if (this.sync) { this.run(); } else { - // if queued, only overwrite shallow with non-shallow, - // but not the other way around. - this.shallow = this.queued ? shallow ? this.shallow : false : !!shallow; - this.queued = true; - // record before-push error stack in debug mode - /* istanbul ignore if */ - if (process.env.NODE_ENV !== 'production' && config.debug) { - this.prevError = new Error('[vue] async stack trace'); - } - pushWatcher(this); + queueWatcher(this); } }; /** - * Batcher job interface. - * Will be called by the batcher. + * Scheduler job interface. + * Will be called by the scheduler. */ - -Watcher.prototype.run = function () { +Watcher.prototype.run = function run () { if (this.active) { var value = this.get(); - if (value !== this.value || - // Deep watchers and watchers on Object/Arrays should fire even - // when the value is the same, because the value may - // have mutated; but only do so if this is a - // non-shallow update (caused by a vm digest). - (isObject(value) || this.deep) && !this.shallow) { + if ( + value !== this.value || + // Deep watchers and watchers on Object/Arrays should fire even + // when the value is the same, because the value may + // have mutated. + isObject(value) || + this.deep + ) { // set new value var oldValue = this.value; this.value = value; - // in debug + async mode, when a watcher callbacks - // throws, we also throw the saved before-push error - // so the full cross-tick stack trace is available. - var prevError = this.prevError; - /* istanbul ignore if */ - if (process.env.NODE_ENV !== 'production' && config.debug && prevError) { - this.prevError = null; + if (this.user) { try { this.cb.call(this.vm, value, oldValue); } catch (e) { - nextTick(function () { - throw prevError; - }, 0); - throw e; + /* istanbul ignore else */ + if (config.errorHandler) { + config.errorHandler.call(null, e, this.vm); + } else { + process.env.NODE_ENV !== 'production' && warn( + ("Error in watcher \"" + (this.expression) + "\""), + this.vm + ); + throw e + } } } else { this.cb.call(this.vm, value, oldValue); } } - this.queued = this.shallow = false; } }; @@ -3397,6307 +1765,6709 @@ Watcher.prototype.run = function () { * Evaluate the value of the watcher. * This only gets called for lazy watchers. */ - -Watcher.prototype.evaluate = function () { - // avoid overwriting another watcher that is being - // collected. - var current = Dep.target; +Watcher.prototype.evaluate = function evaluate () { this.value = this.get(); this.dirty = false; - Dep.target = current; }; /** * Depend on all deps collected by this watcher. */ +Watcher.prototype.depend = function depend () { + var this$1 = this; -Watcher.prototype.depend = function () { var i = this.deps.length; while (i--) { - this.deps[i].depend(); + this$1.deps[i].depend(); } }; /** - * Remove self from all dependencies' subcriber list. + * Remove self from all dependencies' subscriber list. */ +Watcher.prototype.teardown = function teardown () { + var this$1 = this; -Watcher.prototype.teardown = function () { if (this.active) { // remove self from vm's watcher list // this is a somewhat expensive operation so we skip it // if the vm is being destroyed or is performing a v-for // re-render (the watcher list is then filtered by v-for). if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) { - this.vm._watchers.$remove(this); + remove$1(this.vm._watchers, this); } var i = this.deps.length; while (i--) { - this.deps[i].removeSub(this); + this$1.deps[i].removeSub(this$1); } this.active = false; - this.vm = this.cb = this.value = null; } }; /** - * Recrusively traverse an object to evoke all converted + * Recursively traverse an object to evoke all converted * getters, so that every nested property inside the object * is collected as a "deep" dependency. - * - * @param {*} val */ +var seenObjects = new _Set(); +function traverse (val) { + seenObjects.clear(); + _traverse(val, seenObjects); +} -function traverse(val) { +function _traverse (val, seen) { var i, keys; - if (isArray(val)) { + var isA = Array.isArray(val); + if ((!isA && !isObject(val)) || !Object.isExtensible(val)) { + return + } + if (val.__ob__) { + var depId = val.__ob__.dep.id; + if (seen.has(depId)) { + return + } + seen.add(depId); + } + if (isA) { i = val.length; - while (i--) traverse(val[i]); - } else if (isObject(val)) { + while (i--) { _traverse(val[i], seen); } + } else { keys = Object.keys(val); i = keys.length; - while (i--) traverse(val[keys[i]]); + while (i--) { _traverse(val[keys[i]], seen); } } } -var text$1 = { - - bind: function bind() { - this.attr = this.el.nodeType === 3 ? 'data' : 'textContent'; - }, +/* */ - update: function update(value) { - this.el[this.attr] = _toString(value); +function initState (vm) { + vm._watchers = []; + var opts = vm.$options; + if (opts.props) { initProps(vm, opts.props); } + if (opts.methods) { initMethods(vm, opts.methods); } + if (opts.data) { + initData(vm); + } else { + observe(vm._data = {}, true /* asRootData */); } -}; - -var templateCache = new Cache(1000); -var idSelectorCache = new Cache(1000); - -var map = { - efault: [0, '', ''], - legend: [1, '
', '
'], - tr: [2, '', '
'], - col: [2, '', '
'] -}; - -map.td = map.th = [3, '', '
']; - -map.option = map.optgroup = [1, '']; - -map.thead = map.tbody = map.colgroup = map.caption = map.tfoot = [1, '', '
']; - -map.g = map.defs = map.symbol = map.use = map.image = map.text = map.circle = map.ellipse = map.line = map.path = map.polygon = map.polyline = map.rect = [1, '', '']; - -/** - * Check if a node is a supported template node with a - * DocumentFragment content. - * - * @param {Node} node - * @return {Boolean} - */ - -function isRealTemplate(node) { - return isTemplate(node) && isFragment(node.content); + if (opts.computed) { initComputed(vm, opts.computed); } + if (opts.watch) { initWatch(vm, opts.watch); } } -var tagRE$1 = /<([\w:-]+)/; -var entityRE = /&#?\w+?;/; - -/** - * Convert a string template to a DocumentFragment. - * Determines correct wrapping by tag types. Wrapping - * strategy found in jQuery & component/domify. - * - * @param {String} templateString - * @param {Boolean} raw - * @return {DocumentFragment} - */ - -function stringToFragment(templateString, raw) { - // try a cache hit first - var cacheKey = raw ? templateString : templateString.trim(); - var hit = templateCache.get(cacheKey); - if (hit) { - return hit; - } - - var frag = document.createDocumentFragment(); - var tagMatch = templateString.match(tagRE$1); - var entityMatch = entityRE.test(templateString); - - if (!tagMatch && !entityMatch) { - // text only, return a single text node. - frag.appendChild(document.createTextNode(templateString)); - } else { - var tag = tagMatch && tagMatch[1]; - var wrap = map[tag] || map.efault; - var depth = wrap[0]; - var prefix = wrap[1]; - var suffix = wrap[2]; - var node = document.createElement('div'); +var isReservedProp = { key: 1, ref: 1, slot: 1 }; - node.innerHTML = prefix + templateString + suffix; - while (depth--) { - node = node.lastChild; +function initProps (vm, props) { + var propsData = vm.$options.propsData || {}; + var keys = vm.$options._propKeys = Object.keys(props); + var isRoot = !vm.$parent; + // root instance props should be converted + observerState.shouldConvert = isRoot; + var loop = function ( i ) { + var key = keys[i]; + /* istanbul ignore else */ + if (process.env.NODE_ENV !== 'production') { + if (isReservedProp[key]) { + warn( + ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."), + vm + ); + } + defineReactive$$1(vm, key, validateProp(key, props, propsData, vm), function () { + if (vm.$parent && !observerState.isSettingProps) { + warn( + "Avoid mutating a prop directly since the value will be " + + "overwritten whenever the parent component re-renders. " + + "Instead, use a data or computed property based on the prop's " + + "value. Prop being mutated: \"" + key + "\"", + vm + ); + } + }); + } else { + defineReactive$$1(vm, key, validateProp(key, props, propsData, vm)); } + }; - var child; - /* eslint-disable no-cond-assign */ - while (child = node.firstChild) { - /* eslint-enable no-cond-assign */ - frag.appendChild(child); + for (var i = 0; i < keys.length; i++) loop( i ); + observerState.shouldConvert = true; +} + +function initData (vm) { + var data = vm.$options.data; + data = vm._data = typeof data === 'function' + ? data.call(vm) + : data || {}; + if (!isPlainObject(data)) { + data = {}; + process.env.NODE_ENV !== 'production' && warn( + 'data functions should return an object:\n' + + 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', + vm + ); + } + // proxy data on instance + var keys = Object.keys(data); + var props = vm.$options.props; + var i = keys.length; + while (i--) { + if (props && hasOwn(props, keys[i])) { + process.env.NODE_ENV !== 'production' && warn( + "The data property \"" + (keys[i]) + "\" is already declared as a prop. " + + "Use prop default value instead.", + vm + ); + } else { + proxy(vm, keys[i]); } } - if (!raw) { - trimNode(frag); - } - templateCache.put(cacheKey, frag); - return frag; + // observe data + observe(data, true /* asRootData */); } -/** - * Convert a template node to a DocumentFragment. - * - * @param {Node} node - * @return {DocumentFragment} - */ - -function nodeToFragment(node) { - // if its a template tag and the browser supports it, - // its content is already a document fragment. - if (isRealTemplate(node)) { - trimNode(node.content); - return node.content; - } - // script template - if (node.tagName === 'SCRIPT') { - return stringToFragment(node.textContent); - } - // normal node, clone it to avoid mutating the original - var clonedNode = cloneNode(node); - var frag = document.createDocumentFragment(); - var child; - /* eslint-disable no-cond-assign */ - while (child = clonedNode.firstChild) { - /* eslint-enable no-cond-assign */ - frag.appendChild(child); - } - trimNode(frag); - return frag; -} - -// Test for the presence of the Safari template cloning bug -// https://bugs.webkit.org/showug.cgi?id=137755 -var hasBrokenTemplate = (function () { - /* istanbul ignore else */ - if (inBrowser) { - var a = document.createElement('div'); - a.innerHTML = ''; - return !a.cloneNode(true).firstChild.innerHTML; - } else { - return false; - } -})(); +var computedSharedDefinition = { + enumerable: true, + configurable: true, + get: noop, + set: noop +}; -// Test for IE10/11 textarea placeholder clone bug -var hasTextareaCloneBug = (function () { - /* istanbul ignore else */ - if (inBrowser) { - var t = document.createElement('textarea'); - t.placeholder = 't'; - return t.cloneNode(true).value === 't'; - } else { - return false; +function initComputed (vm, computed) { + for (var key in computed) { + var userDef = computed[key]; + if (typeof userDef === 'function') { + computedSharedDefinition.get = makeComputedGetter(userDef, vm); + computedSharedDefinition.set = noop; + } else { + computedSharedDefinition.get = userDef.get + ? userDef.cache !== false + ? makeComputedGetter(userDef.get, vm) + : bind$1(userDef.get, vm) + : noop; + computedSharedDefinition.set = userDef.set + ? bind$1(userDef.set, vm) + : noop; + } + Object.defineProperty(vm, key, computedSharedDefinition); } -})(); - -/** - * 1. Deal with Safari cloning nested