From 58822a86e65711aed2c87985f8c9bd14b211e60c Mon Sep 17 00:00:00 2001 From: Justin Schroeder Date: Thu, 31 Oct 2019 10:24:18 -0400 Subject: [PATCH] Adds a workaround test for bug vuejs/vue-test-utils#1130 --- .eslintignore | 1 + coverage/.DS_Store | Bin 0 -> 6148 bytes coverage/clover.xml | 86 + coverage/coverage-final.json | 6 + coverage/lcov-report/Formulate.js.html | 342 ++ coverage/lcov-report/FormulateForm.vue.html | 321 ++ coverage/lcov-report/FormulateInput.vue.html | 402 ++ .../lcov-report/FormulateInputGroup.vue.html | 147 + .../lcov-report/FormulateInputMixin.js.html | 144 + coverage/lcov-report/base.css | 224 + coverage/lcov-report/block-navigation.js | 79 + coverage/lcov-report/example/src/App.vue.html | 141 + .../example/src/CustomInput.vue.html | 108 + coverage/lcov-report/example/src/index.html | 123 + coverage/lcov-report/example/src/main.js.html | 105 + coverage/lcov-report/index.html | 149 + coverage/lcov-report/prettify.css | 1 + coverage/lcov-report/prettify.js | 2 + coverage/lcov-report/sort-arrow-sprite.png | Bin 0 -> 209 bytes coverage/lcov-report/sorter.js | 170 + coverage/lcov-report/src/Formulate.js.html | 342 ++ .../lcov-report/src/FormulateForm.vue.html | 321 ++ .../lcov-report/src/FormulateInput.vue.html | 402 ++ .../src/FormulateInputGroup.vue.html | 147 + .../src/FormulateInputMixin.js.html | 144 + coverage/lcov-report/src/index.html | 149 + .../src/inputs/FormulateInputBox.vue.html | 90 + .../src/inputs/FormulateInputSelect.vue.html | 123 + .../src/inputs/FormulateInputText.vue.html | 90 + .../inputs/FormulateInputTextArea.vue.html | 90 + coverage/lcov-report/src/inputs/index.html | 136 + coverage/lcov-report/src/libs/context.js.html | 567 ++ coverage/lcov-report/src/libs/index.html | 123 + coverage/lcov-report/src/libs/library.js.html | 354 ++ coverage/lcov-report/src/libs/utils.js.html | 282 + coverage/lcov-report/test/index.html | 97 + coverage/lcov-report/test/jest.conf.js.html | 153 + .../vue-formulate/babel.config.js.html | 108 + .../vue-formulate/build/index.html | 97 + .../vue-formulate/build/rollup.config.js.html | 147 + .../vue-formulate/dist/formulate.esm.js.html | 4629 ++++++++++++++++ .../vue-formulate/dist/formulate.min.js.html | 4650 ++++++++++++++++ .../vue-formulate/dist/formulate.umd.js.html | 4659 +++++++++++++++++ .../lcov-report/vue-formulate/dist/index.html | 123 + .../vue-formulate/example/dist/build.js.html | 225 + .../vue-formulate/example/dist/index.html | 97 + .../vue-formulate/example/index.html | 97 + .../vue-formulate/example/src/App.vue.html | 141 + .../example/src/CustomInput.vue.html | 108 + .../vue-formulate/example/src/index.html | 123 + .../vue-formulate/example/src/main.js.html | 105 + .../vue-formulate/example/store/index.html | 97 + .../vue-formulate/example/store/index.js.html | 147 + .../example/webpack.config.js.html | 270 + coverage/lcov-report/vue-formulate/index.html | 97 + .../vue-formulate/src/Formulate.js.html | 342 ++ .../vue-formulate/src/FormulateForm.vue.html | 321 ++ .../vue-formulate/src/FormulateInput.vue.html | 402 ++ .../src/FormulateInputGroup.vue.html | 147 + .../src/FormulateInputMixin.js.html | 144 + .../lcov-report/vue-formulate/src/index.html | 149 + .../src/inputs/FormulateInputBox.vue.html | 90 + .../src/inputs/FormulateInputSelect.vue.html | 123 + .../src/inputs/FormulateInputText.vue.html | 90 + .../inputs/FormulateInputTextArea.vue.html | 90 + .../vue-formulate/src/inputs/index.html | 136 + .../vue-formulate/src/libs/context.js.html | 567 ++ .../vue-formulate/src/libs/index.html | 123 + .../vue-formulate/src/libs/library.js.html | 354 ++ .../vue-formulate/src/libs/utils.js.html | 282 + .../src~v1/components/Formulate.vue.html | 582 ++ .../components/FormulateElement.vue.html | 912 ++++ .../src~v1/components/index.html | 110 + .../vue-formulate/src~v1/errors.js.html | 90 + .../vue-formulate/src~v1/formulate.js.html | 414 ++ .../vue-formulate/src~v1/index.html | 149 + .../vue-formulate/src~v1/rules.js.html | 192 + .../vue-formulate/src~v1/store.js.html | 405 ++ .../vue-formulate/src~v1/utils.js.html | 354 ++ .../lcov-report/vue-formulate/test/index.html | 97 + .../vue-formulate/test/jest.conf.js.html | 150 + coverage/lcov.info | 230 + dist/formulate.esm.js | 6 + dist/formulate.min.js | 6 + dist/formulate.umd.js | 6 + package-lock.json | 335 +- package.json | 25 +- src/FormulateForm.vue | 6 + test/Formulate.test.js | 2 +- test/FormulateForm.test.js | 128 + test/FormulateInputBox.test.js | 2 +- test/FormulateInputText.test.js | 9 +- test/jest.conf.js | 5 +- 93 files changed, 29548 insertions(+), 108 deletions(-) create mode 100644 coverage/.DS_Store create mode 100644 coverage/clover.xml create mode 100644 coverage/coverage-final.json create mode 100644 coverage/lcov-report/Formulate.js.html create mode 100644 coverage/lcov-report/FormulateForm.vue.html create mode 100644 coverage/lcov-report/FormulateInput.vue.html create mode 100644 coverage/lcov-report/FormulateInputGroup.vue.html create mode 100644 coverage/lcov-report/FormulateInputMixin.js.html create mode 100644 coverage/lcov-report/base.css create mode 100644 coverage/lcov-report/block-navigation.js create mode 100644 coverage/lcov-report/example/src/App.vue.html create mode 100644 coverage/lcov-report/example/src/CustomInput.vue.html create mode 100644 coverage/lcov-report/example/src/index.html create mode 100644 coverage/lcov-report/example/src/main.js.html create mode 100644 coverage/lcov-report/index.html create mode 100644 coverage/lcov-report/prettify.css create mode 100644 coverage/lcov-report/prettify.js create mode 100644 coverage/lcov-report/sort-arrow-sprite.png create mode 100644 coverage/lcov-report/sorter.js create mode 100644 coverage/lcov-report/src/Formulate.js.html create mode 100644 coverage/lcov-report/src/FormulateForm.vue.html create mode 100644 coverage/lcov-report/src/FormulateInput.vue.html create mode 100644 coverage/lcov-report/src/FormulateInputGroup.vue.html create mode 100644 coverage/lcov-report/src/FormulateInputMixin.js.html create mode 100644 coverage/lcov-report/src/index.html create mode 100644 coverage/lcov-report/src/inputs/FormulateInputBox.vue.html create mode 100644 coverage/lcov-report/src/inputs/FormulateInputSelect.vue.html create mode 100644 coverage/lcov-report/src/inputs/FormulateInputText.vue.html create mode 100644 coverage/lcov-report/src/inputs/FormulateInputTextArea.vue.html create mode 100644 coverage/lcov-report/src/inputs/index.html create mode 100644 coverage/lcov-report/src/libs/context.js.html create mode 100644 coverage/lcov-report/src/libs/index.html create mode 100644 coverage/lcov-report/src/libs/library.js.html create mode 100644 coverage/lcov-report/src/libs/utils.js.html create mode 100644 coverage/lcov-report/test/index.html create mode 100644 coverage/lcov-report/test/jest.conf.js.html create mode 100644 coverage/lcov-report/vue-formulate/babel.config.js.html create mode 100644 coverage/lcov-report/vue-formulate/build/index.html create mode 100644 coverage/lcov-report/vue-formulate/build/rollup.config.js.html create mode 100644 coverage/lcov-report/vue-formulate/dist/formulate.esm.js.html create mode 100644 coverage/lcov-report/vue-formulate/dist/formulate.min.js.html create mode 100644 coverage/lcov-report/vue-formulate/dist/formulate.umd.js.html create mode 100644 coverage/lcov-report/vue-formulate/dist/index.html create mode 100644 coverage/lcov-report/vue-formulate/example/dist/build.js.html create mode 100644 coverage/lcov-report/vue-formulate/example/dist/index.html create mode 100644 coverage/lcov-report/vue-formulate/example/index.html create mode 100644 coverage/lcov-report/vue-formulate/example/src/App.vue.html create mode 100644 coverage/lcov-report/vue-formulate/example/src/CustomInput.vue.html create mode 100644 coverage/lcov-report/vue-formulate/example/src/index.html create mode 100644 coverage/lcov-report/vue-formulate/example/src/main.js.html create mode 100644 coverage/lcov-report/vue-formulate/example/store/index.html create mode 100644 coverage/lcov-report/vue-formulate/example/store/index.js.html create mode 100644 coverage/lcov-report/vue-formulate/example/webpack.config.js.html create mode 100644 coverage/lcov-report/vue-formulate/index.html create mode 100644 coverage/lcov-report/vue-formulate/src/Formulate.js.html create mode 100644 coverage/lcov-report/vue-formulate/src/FormulateForm.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/FormulateInput.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/FormulateInputGroup.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/FormulateInputMixin.js.html create mode 100644 coverage/lcov-report/vue-formulate/src/index.html create mode 100644 coverage/lcov-report/vue-formulate/src/inputs/FormulateInputBox.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/inputs/FormulateInputSelect.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/inputs/FormulateInputText.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/inputs/FormulateInputTextArea.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src/inputs/index.html create mode 100644 coverage/lcov-report/vue-formulate/src/libs/context.js.html create mode 100644 coverage/lcov-report/vue-formulate/src/libs/index.html create mode 100644 coverage/lcov-report/vue-formulate/src/libs/library.js.html create mode 100644 coverage/lcov-report/vue-formulate/src/libs/utils.js.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/components/Formulate.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/components/FormulateElement.vue.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/components/index.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/errors.js.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/formulate.js.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/index.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/rules.js.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/store.js.html create mode 100644 coverage/lcov-report/vue-formulate/src~v1/utils.js.html create mode 100644 coverage/lcov-report/vue-formulate/test/index.html create mode 100644 coverage/lcov-report/vue-formulate/test/jest.conf.js.html create mode 100644 coverage/lcov.info create mode 100644 test/FormulateForm.test.js diff --git a/.eslintignore b/.eslintignore index c36bcaf..4757386 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ dist/* test/* +coverage/* diff --git a/coverage/.DS_Store b/coverage/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..12b57c5a48373538f2473acd023e0413d27e7681 GIT binary patch literal 6148 zcmeHK!D`z;5S?}0MyjBw&_e<}EcDQe3l47Tt8kN?0u5DY4sGg6m8b=(*2uDbFb0ti z$Ok0Xr2UXI|Bx@qIWxQK(vajD(lP_HZ?rozE4>vvy8s}1<75rM2LK0^u;F5Ji_kdf z4QbdOLZNfKh7wX3f z4#tk+k6AkH`_JF0qKdL2Ep4I<02Vpf16y}J5e>jJkHDDhauW^-M+s% zo2_*^>n+(`Z_itD*6p@i@=fRMeC|5V>Z`2}U&aTAN5?0pKYyM5HgN*~T`kWnF5n!E zJGhyIWs$4mJ9;dl7g3DN05iZ0JbVW1&gFOy|5f=7nE__to*AJ1L81}{7Hflg>%fMN zk2KySBte_*5`@xXV6ircBPhazBAQTPuNcCFW52Y1fyLUO2?wEP#yoarVQ(lx&yM|4 zyMqV}a?1=b1J@Z?GLJsh|INGa|JQ@~i5Xx9{woGVb0gg7;V0SJdgJ4$)=Jc`s3hc9 n8~hW3hAzeEOQm=PRSWh@G7tlcwL$Db;e&vtfg5JvUKzLojkIK2 literal 0 HcmV?d00001 diff --git a/coverage/clover.xml b/coverage/clover.xml new file mode 100644 index 0000000..fee8124 --- /dev/null +++ b/coverage/clover.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json new file mode 100644 index 0000000..f15411f --- /dev/null +++ b/coverage/coverage-final.json @@ -0,0 +1,6 @@ +{"/Users/justinschroeder/Projects/vue-formulate/src/Formulate.js": {"path":"/Users/justinschroeder/Projects/vue-formulate/src/Formulate.js","statementMap":{"0":{"start":{"line":18,"column":4},"end":{"line":29,"column":5}},"1":{"start":{"line":36,"column":4},"end":{"line":36,"column":35}},"2":{"start":{"line":37,"column":4},"end":{"line":37,"column":60}},"3":{"start":{"line":38,"column":4},"end":{"line":40,"column":5}},"4":{"start":{"line":39,"column":6},"end":{"line":39,"column":74}},"5":{"start":{"line":41,"column":4},"end":{"line":41,"column":23}},"6":{"start":{"line":50,"column":17},"end":{"line":50,"column":19}},"7":{"start":{"line":51,"column":4},"end":{"line":59,"column":5}},"8":{"start":{"line":52,"column":6},"end":{"line":58,"column":7}},"9":{"start":{"line":53,"column":8},"end":{"line":55,"column":27}},"10":{"start":{"line":57,"column":8},"end":{"line":57,"column":31}},"11":{"start":{"line":60,"column":4},"end":{"line":64,"column":5}},"12":{"start":{"line":61,"column":6},"end":{"line":63,"column":7}},"13":{"start":{"line":62,"column":8},"end":{"line":62,"column":39}},"14":{"start":{"line":65,"column":4},"end":{"line":65,"column":17}},"15":{"start":{"line":73,"column":4},"end":{"line":75,"column":5}},"16":{"start":{"line":74,"column":6},"end":{"line":74,"column":54}},"17":{"start":{"line":76,"column":4},"end":{"line":76,"column":20}},"18":{"start":{"line":84,"column":4},"end":{"line":86,"column":5}},"19":{"start":{"line":85,"column":6},"end":{"line":85,"column":49}},"20":{"start":{"line":87,"column":4},"end":{"line":87,"column":16}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":17,"column":2},"end":{"line":17,"column":3}},"loc":{"start":{"line":17,"column":17},"end":{"line":30,"column":3}},"line":17},"1":{"name":"(anonymous_1)","decl":{"start":{"line":35,"column":2},"end":{"line":35,"column":3}},"loc":{"start":{"line":35,"column":25},"end":{"line":42,"column":3}},"line":35},"2":{"name":"(anonymous_2)","decl":{"start":{"line":49,"column":2},"end":{"line":49,"column":3}},"loc":{"start":{"line":49,"column":28},"end":{"line":66,"column":3}},"line":49},"3":{"name":"(anonymous_3)","decl":{"start":{"line":72,"column":2},"end":{"line":72,"column":3}},"loc":{"start":{"line":72,"column":18},"end":{"line":77,"column":3}},"line":72},"4":{"name":"(anonymous_4)","decl":{"start":{"line":83,"column":2},"end":{"line":83,"column":3}},"loc":{"start":{"line":83,"column":19},"end":{"line":88,"column":3}},"line":83}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":46},"end":{"line":37,"column":59}},"type":"binary-expr","locations":[{"start":{"line":37,"column":46},"end":{"line":37,"column":53}},{"start":{"line":37,"column":57},"end":{"line":37,"column":59}}],"line":37},"1":{"loc":{"start":{"line":52,"column":6},"end":{"line":58,"column":7}},"type":"if","locations":[{"start":{"line":52,"column":6},"end":{"line":58,"column":7}},{"start":{"line":52,"column":6},"end":{"line":58,"column":7}}],"line":52},"2":{"loc":{"start":{"line":53,"column":22},"end":{"line":55,"column":27}},"type":"cond-expr","locations":[{"start":{"line":54,"column":12},"end":{"line":54,"column":51}},{"start":{"line":55,"column":12},"end":{"line":55,"column":27}}],"line":53},"3":{"loc":{"start":{"line":53,"column":22},"end":{"line":53,"column":80}},"type":"binary-expr","locations":[{"start":{"line":53,"column":22},"end":{"line":53,"column":52}},{"start":{"line":53,"column":56},"end":{"line":53,"column":80}}],"line":53},"4":{"loc":{"start":{"line":61,"column":6},"end":{"line":63,"column":7}},"type":"if","locations":[{"start":{"line":61,"column":6},"end":{"line":63,"column":7}},{"start":{"line":61,"column":6},"end":{"line":63,"column":7}}],"line":61},"5":{"loc":{"start":{"line":73,"column":4},"end":{"line":75,"column":5}},"type":"if","locations":[{"start":{"line":73,"column":4},"end":{"line":75,"column":5}},{"start":{"line":73,"column":4},"end":{"line":75,"column":5}}],"line":73},"6":{"loc":{"start":{"line":84,"column":4},"end":{"line":86,"column":5}},"type":"if","locations":[{"start":{"line":84,"column":4},"end":{"line":86,"column":5}},{"start":{"line":84,"column":4},"end":{"line":86,"column":5}}],"line":84}},"s":{"0":3,"1":3,"2":3,"3":3,"4":21,"5":3,"6":6,"7":6,"8":13,"9":4,"10":9,"11":6,"12":6,"13":2,"14":6,"15":49,"16":49,"17":0,"18":40,"19":40,"20":0},"f":{"0":3,"1":3,"2":6,"3":49,"4":40},"b":{"0":[3,2],"1":[4,9],"2":[1,3],"3":[4,1],"4":[2,4],"5":[49,0],"6":[40,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"67783660f97ce5ef952ab86232c4819d56db958a"} +,"/Users/justinschroeder/Projects/vue-formulate/src/FormulateForm.vue": {"path":"/Users/justinschroeder/Projects/vue-formulate/src/FormulateForm.vue","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":4,"column":15},"end":{"line":4,"column":null}},"2":{"start":{"line":6,"column":4},"end":{"line":6,"column":11}},"3":{"start":{"line":23,"column":22},"end":{"line":23,"column":null}},"4":{"start":{"line":27,"column":4},"end":{"line":27,"column":11}},"5":{"start":{"line":34,"column":8},"end":{"line":34,"column":15}},"6":{"start":{"line":37,"column":8},"end":{"line":37,"column":13}},"7":{"start":{"line":41,"column":6},"end":{"line":41,"column":13}},"8":{"start":{"line":44,"column":6},"end":{"line":44,"column":13}},"9":{"start":{"line":53,"column":8},"end":{"line":66,"column":null}},"10":{"start":{"line":57,"column":10},"end":{"line":65,"column":null}},"11":{"start":{"line":58,"column":12},"end":{"line":64,"column":null}},"12":{"start":{"line":63,"column":14},"end":{"line":63,"column":19}},"13":{"start":{"line":73,"column":6},"end":{"line":73,"column":11}},"14":{"start":{"line":76,"column":6},"end":{"line":76,"column":11}},"15":{"start":{"line":77,"column":6},"end":{"line":81,"column":null}},"16":{"start":{"line":80,"column":8},"end":{"line":80,"column":17}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":2},"end":{"line":5,"column":9}},"loc":{"start":{"line":5,"column":13},"end":{"line":10,"column":null}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":15},"end":{"line":23,"column":22}},"loc":{"start":{"line":23,"column":22},"end":{"line":23,"column":null}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":26,"column":2},"end":{"line":26,"column":6}},"loc":{"start":{"line":26,"column":10},"end":{"line":30,"column":null}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":33,"column":6},"end":{"line":33,"column":9}},"loc":{"start":{"line":33,"column":13},"end":{"line":35,"column":null}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":36,"column":6},"end":{"line":36,"column":9}},"loc":{"start":{"line":36,"column":18},"end":{"line":38,"column":null}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":40,"column":4},"end":{"line":40,"column":21}},"loc":{"start":{"line":40,"column":25},"end":{"line":42,"column":null}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":43,"column":4},"end":{"line":43,"column":14}},"loc":{"start":{"line":43,"column":18},"end":{"line":48,"column":null}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":52,"column":6},"end":{"line":52,"column":13}},"loc":{"start":{"line":52,"column":35},"end":{"line":67,"column":null}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":72,"column":4},"end":{"line":72,"column":17}},"loc":{"start":{"line":72,"column":33},"end":{"line":74,"column":null}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":75,"column":4},"end":{"line":75,"column":12}},"loc":{"start":{"line":75,"column":32},"end":{"line":82,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":41,"column":13},"end":{"line":41,"column":36}},"type":"binary-expr","locations":[{"start":{"line":41,"column":13},"end":{"line":41,"column":36}},{"start":{"line":41,"column":36},"end":{"line":41,"column":null}}]},"1":{"loc":{"start":{"line":44,"column":16},"end":{"line":44,"column":21}},"type":"binary-expr","locations":[{"start":{"line":44,"column":16},"end":{"line":44,"column":21}},{"start":{"line":45,"column":8},"end":{"line":45,"column":null}},{"start":{"line":46,"column":8},"end":{"line":46,"column":13}},{"start":{"line":47,"column":8},"end":{"line":47,"column":null}}]},"2":{"loc":{"start":{"line":53,"column":8},"end":{"line":66,"column":null}},"type":"if","locations":[{"start":{"line":53,"column":8},"end":{"line":66,"column":null}},{"start":{"line":53,"column":8},"end":{"line":66,"column":null}}]},"3":{"loc":{"start":{"line":53,"column":12},"end":{"line":53,"column":null}},"type":"binary-expr","locations":[{"start":{"line":53,"column":12},"end":{"line":53,"column":null}},{"start":{"line":54,"column":10},"end":{"line":54,"column":null}},{"start":{"line":55,"column":10},"end":{"line":55,"column":null}}]},"4":{"loc":{"start":{"line":58,"column":12},"end":{"line":64,"column":null}},"type":"if","locations":[{"start":{"line":58,"column":12},"end":{"line":64,"column":null}},{"start":{"line":58,"column":12},"end":{"line":64,"column":null}}]},"5":{"loc":{"start":{"line":58,"column":16},"end":{"line":58,"column":21}},"type":"binary-expr","locations":[{"start":{"line":58,"column":16},"end":{"line":58,"column":21}},{"start":{"line":58,"column":55},"end":{"line":58,"column":76}}]},"6":{"loc":{"start":{"line":77,"column":6},"end":{"line":81,"column":null}},"type":"if","locations":[{"start":{"line":77,"column":6},"end":{"line":81,"column":null}},{"start":{"line":77,"column":6},"end":{"line":81,"column":null}}]},"7":{"loc":{"start":{"line":77,"column":10},"end":{"line":77,"column":20}},"type":"binary-expr","locations":[{"start":{"line":77,"column":10},"end":{"line":77,"column":20}},{"start":{"line":77,"column":76},"end":{"line":77,"column":102}},{"start":{"line":77,"column":102},"end":{"line":77,"column":107}}]}},"s":{"0":3,"1":3,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"b":{"0":[0,0],"1":[0,0,0,0],"2":[0,0],"3":[0,0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0]}} +,"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInput.vue": {"path":"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInput.vue","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"3":{"start":{"line":6,"column":15},"end":{"line":6,"column":null}},"4":{"start":{"line":64,"column":4},"end":{"line":64,"column":11}},"5":{"start":{"line":73,"column":29},"end":{"line":73,"column":34}},"6":{"start":{"line":74,"column":6},"end":{"line":74,"column":13}},"7":{"start":{"line":77,"column":6},"end":{"line":77,"column":13}},"8":{"start":{"line":83,"column":8},"end":{"line":83,"column":13}},"9":{"start":{"line":88,"column":6},"end":{"line":90,"column":null}},"10":{"start":{"line":89,"column":8},"end":{"line":89,"column":13}},"11":{"start":{"line":93,"column":6},"end":{"line":95,"column":null}},"12":{"start":{"line":94,"column":8},"end":{"line":94,"column":13}},"13":{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},"14":{"start":{"line":100,"column":6},"end":{"line":100,"column":11}},"15":{"start":{"line":102,"column":4},"end":{"line":102,"column":9}},"16":{"start":{"line":106,"column":6},"end":{"line":108,"column":null}},"17":{"start":{"line":107,"column":8},"end":{"line":107,"column":13}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":63,"column":2},"end":{"line":63,"column":6}},"loc":{"start":{"line":63,"column":10},"end":{"line":69,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":72,"column":4},"end":{"line":72,"column":18}},"loc":{"start":{"line":72,"column":22},"end":{"line":75,"column":null}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":76,"column":4},"end":{"line":76,"column":13}},"loc":{"start":{"line":76,"column":17},"end":{"line":78,"column":null}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":82,"column":6},"end":{"line":82,"column":13}},"loc":{"start":{"line":82,"column":22},"end":{"line":84,"column":null}}},"4":{"name":"(anonymous_5)","decl":{"start":{"line":87,"column":4},"end":{"line":87,"column":22}},"loc":{"start":{"line":87,"column":44},"end":{"line":91,"column":null}}},"5":{"name":"(anonymous_6)","decl":{"start":{"line":92,"column":4},"end":{"line":92,"column":18}},"loc":{"start":{"line":92,"column":40},"end":{"line":96,"column":null}}},"6":{"name":"(anonymous_7)","decl":{"start":{"line":98,"column":2},"end":{"line":98,"column":9}},"loc":{"start":{"line":98,"column":13},"end":{"line":103,"column":null}}},"7":{"name":"(anonymous_8)","decl":{"start":{"line":105,"column":4},"end":{"line":105,"column":25}},"loc":{"start":{"line":105,"column":34},"end":{"line":109,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":74,"column":58},"end":{"line":74,"column":68}},"type":"cond-expr","locations":[{"start":{"line":74,"column":58},"end":{"line":74,"column":68}},{"start":{"line":74,"column":68},"end":{"line":74,"column":null}}]},"1":{"loc":{"start":{"line":74,"column":14},"end":{"line":74,"column":42}},"type":"binary-expr","locations":[{"start":{"line":74,"column":14},"end":{"line":74,"column":42}},{"start":{"line":74,"column":42},"end":{"line":74,"column":58}}]},"2":{"loc":{"start":{"line":77,"column":49},"end":{"line":77,"column":73}},"type":"cond-expr","locations":[{"start":{"line":77,"column":49},"end":{"line":77,"column":73}},{"start":{"line":77,"column":73},"end":{"line":77,"column":78}}]},"3":{"loc":{"start":{"line":88,"column":6},"end":{"line":90,"column":null}},"type":"if","locations":[{"start":{"line":88,"column":6},"end":{"line":90,"column":null}},{"start":{"line":88,"column":6},"end":{"line":90,"column":null}}]},"4":{"loc":{"start":{"line":88,"column":10},"end":{"line":88,"column":30}},"type":"binary-expr","locations":[{"start":{"line":88,"column":10},"end":{"line":88,"column":30}},{"start":{"line":88,"column":30},"end":{"line":88,"column":51}}]},"5":{"loc":{"start":{"line":93,"column":6},"end":{"line":95,"column":null}},"type":"if","locations":[{"start":{"line":93,"column":6},"end":{"line":95,"column":null}},{"start":{"line":93,"column":6},"end":{"line":95,"column":null}}]},"6":{"loc":{"start":{"line":93,"column":10},"end":{"line":93,"column":29}},"type":"binary-expr","locations":[{"start":{"line":93,"column":10},"end":{"line":93,"column":29}},{"start":{"line":93,"column":29},"end":{"line":93,"column":50}}]},"7":{"loc":{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},"type":"if","locations":[{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},{"start":{"line":99,"column":4},"end":{"line":101,"column":null}}]},"8":{"loc":{"start":{"line":99,"column":8},"end":{"line":99,"column":38}},"type":"binary-expr","locations":[{"start":{"line":99,"column":8},"end":{"line":99,"column":38}},{"start":{"line":99,"column":38},"end":{"line":99,"column":88}}]},"9":{"loc":{"start":{"line":106,"column":6},"end":{"line":108,"column":null}},"type":"if","locations":[{"start":{"line":106,"column":6},"end":{"line":108,"column":null}},{"start":{"line":106,"column":6},"end":{"line":108,"column":null}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":47,"5":49,"6":49,"7":49,"8":10,"9":10,"10":1,"11":9,"12":9,"13":47,"14":0,"15":47,"16":57,"17":18},"f":{"0":47,"1":49,"2":49,"3":10,"4":10,"5":9,"6":47,"7":57},"b":{"0":[9,40],"1":[49,27],"2":[9,40],"3":[1,9],"4":[10,1],"5":[9,0],"6":[9,9],"7":[0,47],"8":[47,0],"9":[18,39]}} +,"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputGroup.vue": {"path":"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputGroup.vue","statementMap":{"0":{"start":{"line":2,"column":15},"end":{"line":2,"column":null}},"1":{"start":{"line":12,"column":6},"end":{"line":12,"column":13}},"2":{"start":{"line":15,"column":81},"end":{"line":15,"column":null}},"3":{"start":{"line":16,"column":6},"end":{"line":16,"column":13}},"4":{"start":{"line":16,"column":40},"end":{"line":16,"column":45}},"5":{"start":{"line":21,"column":6},"end":{"line":21,"column":13}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":11,"column":4},"end":{"line":11,"column":11}},"loc":{"start":{"line":11,"column":15},"end":{"line":13,"column":null}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":22}},"loc":{"start":{"line":14,"column":26},"end":{"line":17,"column":null}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":16,"column":30},"end":{"line":16,"column":36}},"loc":{"start":{"line":16,"column":40},"end":{"line":16,"column":45}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":20,"column":4},"end":{"line":20,"column":20}},"loc":{"start":{"line":20,"column":31},"end":{"line":24,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":13},"end":{"line":12,"column":37}},"type":"binary-expr","locations":[{"start":{"line":12,"column":13},"end":{"line":12,"column":37}},{"start":{"line":12,"column":37},"end":{"line":12,"column":null}}]}},"s":{"0":3,"1":9,"2":9,"3":9,"4":21,"5":21},"f":{"0":9,"1":9,"2":21,"3":21},"b":{"0":[9,0]}} +,"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputMixin.js": {"path":"/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputMixin.js","statementMap":{"0":{"start":{"line":13,"column":6},"end":{"line":13,"column":30}},"1":{"start":{"line":16,"column":6},"end":{"line":16,"column":28}},"2":{"start":{"line":19,"column":6},"end":{"line":19,"column":42}},"3":{"start":{"line":22,"column":6},"end":{"line":22,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":12,"column":4},"end":{"line":12,"column":5}},"loc":{"start":{"line":12,"column":12},"end":{"line":14,"column":5}},"line":12},"1":{"name":"(anonymous_1)","decl":{"start":{"line":15,"column":4},"end":{"line":15,"column":5}},"loc":{"start":{"line":15,"column":10},"end":{"line":17,"column":5}},"line":15},"2":{"name":"(anonymous_2)","decl":{"start":{"line":18,"column":4},"end":{"line":18,"column":5}},"loc":{"start":{"line":18,"column":18},"end":{"line":20,"column":5}},"line":18},"3":{"name":"(anonymous_3)","decl":{"start":{"line":21,"column":4},"end":{"line":21,"column":5}},"loc":{"start":{"line":21,"column":16},"end":{"line":23,"column":5}},"line":21}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":13},"end":{"line":19,"column":42}},"type":"binary-expr","locations":[{"start":{"line":19,"column":13},"end":{"line":19,"column":36}},{"start":{"line":19,"column":40},"end":{"line":19,"column":42}}],"line":19}},"s":{"0":41,"1":18,"2":41,"3":0},"f":{"0":41,"1":18,"2":41,"3":0},"b":{"0":[41,0]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"4efdf72909548f506c39198c3cee17ae3d4703f5"} +} diff --git a/coverage/lcov-report/Formulate.js.html b/coverage/lcov-report/Formulate.js.html new file mode 100644 index 0000000..5571867 --- /dev/null +++ b/coverage/lcov-report/Formulate.js.html @@ -0,0 +1,342 @@ + + + + Code coverage report for Formulate.js + + + + + + + +
+
+

+ All files Formulate.js +

+
+
+ 90.48% + Statements + 19/21 +
+
+ 85.71% + Branches + 12/14 +
+
+ 100% + Functions + 5/5 +
+
+ 90.48% + Lines + 19/21 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +3x +3x +21x +  +3x +  +  +  +  +  +  +  +  +6x +6x +13x +4x +  +  +  +9x +  +  +6x +6x +2x +  +  +6x +  +  +  +  +  +  +  +49x +49x +  +  +  +  +  +  +  +  +  +40x +40x +  +  +  +  +  +  + 
import library from './libs/library'
+import isPlainObject from 'is-plain-object'
+import FormulateInput from './FormulateInput.vue'
+import FormulateForm from './FormulateForm.vue'
+import FormulateInputGroup from './FormulateInputGroup.vue'
+import FormulateInputBox from './inputs/FormulateInputBox.vue'
+import FormulateInputText from './inputs/FormulateInputText.vue'
+import FormulateInputSelect from './inputs/FormulateInputSelect.vue'
+import FormulateInputTextArea from './inputs/FormulateInputTextArea.vue'
+/**
+ * The base formulate library.
+ */
+class Formulate {
+  /**
+   * Instantiate our base options.
+   */
+  constructor () {
+    this.defaults = {
+      components: {
+        FormulateForm,
+        FormulateInput,
+        FormulateInputBox,
+        FormulateInputText,
+        FormulateInputGroup,
+        FormulateInputSelect,
+        FormulateInputTextArea
+      },
+      library
+    }
+  }
+ 
+  /**
+   * Install vue formulate, and register it’s components.
+   */
+  install (Vue, options) {
+    Vue.prototype.$formulate = this
+    this.options = this.extend(this.defaults, options || {})
+    for (var componentName in this.options.components) {
+      Vue.component(componentName, this.options.components[componentName])
+    }
+    Object.freeze(this)
+  }
+ 
+  /**
+   * Create a new object by copying properties of base and extendWith.
+   * @param {Object} base
+   * @param {Object} extendWith
+   */
+  extend (base, extendWith) {
+    var merged = {}
+    for (var key in base) {
+      if (extendWith.hasOwnProperty(key)) {
+        merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+          ? this.extend(base[key], extendWith[key])
+          : extendWith[key]
+      } else {
+        merged[key] = base[key]
+      }
+    }
+    for (var prop in extendWith) {
+      if (!merged.hasOwnProperty(prop)) {
+        merged[prop] = extendWith[prop]
+      }
+    }
+    return merged
+  }
+ 
+  /**
+   * Determine what "class" of input this element is given the "type".
+   * @param {string} type
+   */
+  classify (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].classification
+    }
+    return 'unknown'
+  }
+ 
+  /**
+   * Determine what type of component to render given the "type".
+   * @param {string} type
+   */
+  component (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].component
+    }
+    return false
+  }
+}
+ 
+export default new Formulate()
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/FormulateForm.vue.html b/coverage/lcov-report/FormulateForm.vue.html new file mode 100644 index 0000000..81bbb87 --- /dev/null +++ b/coverage/lcov-report/FormulateForm.vue.html @@ -0,0 +1,321 @@ + + + + Code coverage report for FormulateForm.vue + + + + + + + +
+
+

+ All files FormulateForm.vue +

+
+
+ 11.76% + Statements + 2/17 +
+
+ 0% + Branches + 0/20 +
+
+ 0% + Functions + 0/10 +
+
+ 11.76% + Lines + 2/17 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85  +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import { shallowEqualObjects } from './libs/utils'
+ 
+export default {
+  provide () {
+    return {
+      formulateFormSetter: this.setFieldValue,
+      formulateFormRegister: this.register
+    }
+  },
+  name: 'FormulateForm',
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    name: {
+      type: [String, Boolean],
+      default: false
+    },
+    formulateValue: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data () {
+    return {
+      registry: {}
+    }
+  },
+  computed: {
+    formModel: {
+      get () {
+        return this.formulateValue
+      },
+      set (value) {
+        this.$emit('input', value)
+      }
+    },
+    hasFormulateValue () {
+      return this.formulateValue && typeof this.formulateValue === 'object'
+    },
+    isVmodeled () {
+      return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+        this._events &&
+        Array.isArray(this._events.input) &&
+        this._events.input.length)
+    }
+  },
+  watch: {
+    formulateValue: {
+      handler (newValue, oldValue) {
+        if (this.isVmodeled &&
+          newValue &&
+          typeof newValue === 'object'
+        ) {
+          for (const field in newValue) {
+            if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+              // If the value of the formulateValue changed (probably as a prop)
+              // and it doesn't match the internal proxied value of the registered
+              // component, we set it explicitly. Its important we check the
+              // model proxy here since the model itself is not fully synchronous.
+              this.registry[field].context.model = newValue[field]
+            }
+          }
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    setFieldValue (field, value) {
+      this.formModel = Object.assign({}, this.formulateValue, { [field]: value })
+    },
+    register (field, component) {
+      this.registry[field] = component
+      if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+        // In the case that the form is carrying an initial value and the
+        // element is not, set it directly.
+        component.context.model = this.formulateValue[field]
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/FormulateInput.vue.html b/coverage/lcov-report/FormulateInput.vue.html new file mode 100644 index 0000000..2b0cbe0 --- /dev/null +++ b/coverage/lcov-report/FormulateInput.vue.html @@ -0,0 +1,402 @@ + + + + Code coverage report for FormulateInput.vue + + + + + + + +
+
+

+ All files FormulateInput.vue +

+
+
+ 94.44% + Statements + 17/18 +
+
+ 85% + Branches + 17/20 +
+
+ 100% + Functions + 8/8 +
+
+ 94.44% + Lines + 17/18 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112  +3x +3x +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +47x +  +  +  +  +  +  +  +  +49x +49x +  +  +49x +  +  +  +  +  +10x +  +  +  +  +10x +1x +  +  +  +9x +9x +  +  +  +  +47x +  +  +47x +  +  +  +57x +18x +  +  +  +  + 
 
+import context from './libs/context'
+import { shallowEqualObjects } from './libs/utils'
+import nanoid from 'nanoid'
+ 
+export default {
+  name: 'FormulateInput',
+  inheritAttrs: false,
+  inject: {
+    formulateFormSetter: { default: undefined },
+    formulateFormRegister: { default: undefined }
+  },
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    type: {
+      type: String,
+      default: 'text'
+    },
+    name: {
+      type: [Boolean, String],
+      default: true
+    },
+    /* eslint-disable */
+    formulateValue: {
+      default: ''
+    },
+    value: {
+      default: false
+    },
+    /* eslint-enable */
+    options: {
+      type: [Object, Array, Boolean],
+      default: false
+    },
+    optionGroups: {
+      type: [Object, Boolean],
+      default: false
+    },
+    id: {
+      type: [String, Boolean, Number],
+      default: false
+    },
+    label: {
+      type: [String, Boolean],
+      default: false
+    },
+    labelPosition: {
+      type: [String, Boolean],
+      default: false
+    },
+    help: {
+      type: [String, Boolean],
+      default: false
+    },
+    debug: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultId: nanoid(9),
+      localAttributes: {},
+      internalModelProxy: this.formulateValue
+    }
+  },
+  computed: {
+    ...context,
+    classification () {
+      const classification = this.$formulate.classify(this.type)
+      return (classification === 'box' && this.options) ? 'group' : classification
+    },
+    component () {
+      return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+    }
+  },
+  watch: {
+    '$attrs': {
+      handler (value) {
+        this.updateLocalAttributes(value)
+      },
+      deep: true
+    },
+    internalModelProxy (newValue, oldValue) {
+      if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    },
+    formulateValue (newValue, oldValue) {
+      Eif (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    }
+  },
+  created () {
+    Iif (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+      this.formulateFormRegister(this.nameOrFallback, this)
+    }
+    this.updateLocalAttributes(this.$attrs)
+  },
+  methods: {
+    updateLocalAttributes (value) {
+      if (!shallowEqualObjects(value, this.localAttributes)) {
+        this.localAttributes = value
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/FormulateInputGroup.vue.html b/coverage/lcov-report/FormulateInputGroup.vue.html new file mode 100644 index 0000000..da00acb --- /dev/null +++ b/coverage/lcov-report/FormulateInputGroup.vue.html @@ -0,0 +1,147 @@ + + + + Code coverage report for FormulateInputGroup.vue + + + + + + + +
+
+

+ All files FormulateInputGroup.vue +

+
+
+ 100% + Statements + 6/6 +
+
+ 50% + Branches + 1/2 +
+
+ 100% + Functions + 4/4 +
+
+ 100% + Lines + 5/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27  +3x +  +  +  +  +  +  +  +  +  +9x +  +  +9x +21x +  +  +  +  +21x +  +  +  +  +  + 
 
+export default {
+  name: 'FormulateInputGroup',
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    options () {
+      return this.context.options || []
+    },
+    optionsWithContext () {
+      const { options, labelPosition, attributes, classification, ...context } = this.context
+      return this.options.map(option => this.groupItemContext(context, option))
+    }
+  },
+  methods: {
+    groupItemContext (...args) {
+      return Object.assign({}, ...args, {
+        component: 'FormulateInput'
+      })
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/FormulateInputMixin.js.html b/coverage/lcov-report/FormulateInputMixin.js.html new file mode 100644 index 0000000..6aeb9a8 --- /dev/null +++ b/coverage/lcov-report/FormulateInputMixin.js.html @@ -0,0 +1,144 @@ + + + + Code coverage report for FormulateInputMixin.js + + + + + + + +
+
+

+ All files FormulateInputMixin.js +

+
+
+ 75% + Statements + 3/4 +
+
+ 50% + Branches + 1/2 +
+
+ 75% + Functions + 3/4 +
+
+ 75% + Lines + 3/4 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26  +  +  +  +  +  +  +  +  +  +  +  +41x +  +  +18x +  +  +41x +  +  +  +  +  +  + 
/**
+ * Default base for input components.
+ */
+export default {
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    type () {
+      return this.context.type
+    },
+    id () {
+      return this.context.id
+    },
+    attributes () {
+      return this.context.attributes || {}
+    },
+    hasValue () {
+      return !!this.context.model
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css new file mode 100644 index 0000000..f418035 --- /dev/null +++ b/coverage/lcov-report/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js new file mode 100644 index 0000000..c7ff5a5 --- /dev/null +++ b/coverage/lcov-report/block-navigation.js @@ -0,0 +1,79 @@ +/* eslint-disable */ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/example/src/App.vue.html b/coverage/lcov-report/example/src/App.vue.html new file mode 100644 index 0000000..cc79a7f --- /dev/null +++ b/coverage/lcov-report/example/src/App.vue.html @@ -0,0 +1,141 @@ + + + + Code coverage report for example/src/App.vue + + + + + + + +
+
+

+ All files / example/src App.vue +

+
+
+ 0% + Statements + 0/5 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/2 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import CustomInput from './CustomInput.vue'
+import {mapModels} from 'vue-formulate'
+ 
+export default {
+  components: {
+    'custom-input': CustomInput
+  },
+  data () {
+    return {
+      values: false
+    }
+  },
+  computed: {
+    ...mapModels({
+      animal: 'registration/animal'
+    })
+  },
+  methods: {
+    useFormData (vals) {
+      this.values = JSON.stringify(vals, null, 2)
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/example/src/CustomInput.vue.html b/coverage/lcov-report/example/src/CustomInput.vue.html new file mode 100644 index 0000000..1c701db --- /dev/null +++ b/coverage/lcov-report/example/src/CustomInput.vue.html @@ -0,0 +1,108 @@ + + + + Code coverage report for example/src/CustomInput.vue + + + + + + + +
+
+

+ All files / example/src CustomInput.vue +

+
+
+ 0% + Statements + 0/1 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/1 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+export default {
+  props: {
+    options: {
+      type: Object,
+      required: true
+    },
+    value: {
+      type: [String, Number, Boolean],
+      default: false
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/example/src/index.html b/coverage/lcov-report/example/src/index.html new file mode 100644 index 0000000..8f20630 --- /dev/null +++ b/coverage/lcov-report/example/src/index.html @@ -0,0 +1,123 @@ + + + + Code coverage report for example/src + + + + + + + +
+
+

+ All files example/src +

+
+
+ 0% + Statements + 0/9 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/3 +
+
+ 0% + Lines + 0/9 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
App.vue
0%0/5100%0/00%0/20%0/5
CustomInput.vue
0%0/1100%0/0100%0/00%0/1
main.js
0%0/3100%0/00%0/10%0/3
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/example/src/main.js.html b/coverage/lcov-report/example/src/main.js.html new file mode 100644 index 0000000..ed981ca --- /dev/null +++ b/coverage/lcov-report/example/src/main.js.html @@ -0,0 +1,105 @@ + + + + Code coverage report for example/src/main.js + + + + + + + +
+
+

+ All files / example/src main.js +

+
+
+ 0% + Statements + 0/3 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/1 +
+
+ 0% + Lines + 0/3 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13  +  +  +  +  +  +  +  +  +  +  +  + 
import Vue from 'vue'
+import App from './App.vue'
+import store from '../store'
+import formulate from 'vue-formulate'
+ 
+Vue.use(formulate)
+ 
+window.example = new Vue({
+  el: '#app',
+  store,
+  render: h => h(App)
+})
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html new file mode 100644 index 0000000..7003cdf --- /dev/null +++ b/coverage/lcov-report/index.html @@ -0,0 +1,149 @@ + + + + Code coverage report for All files + + + + + + + +
+
+

+ All files +

+
+
+ 71.21% + Statements + 47/66 +
+
+ 53.45% + Branches + 31/58 +
+
+ 64.52% + Functions + 20/31 +
+
+ 70.77% + Lines + 46/65 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Formulate.js
90.48%19/2185.71%12/14100%5/590.48%19/21
FormulateForm.vue
11.76%2/170%0/200%0/1011.76%2/17
FormulateInput.vue
94.44%17/1885%17/20100%8/894.44%17/18
FormulateInputGroup.vue
100%6/650%1/2100%4/4100%5/5
FormulateInputMixin.js
75%3/450%1/275%3/475%3/4
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..b322523 --- /dev/null +++ b/coverage/lcov-report/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/coverage/lcov-report/src/Formulate.js.html b/coverage/lcov-report/src/Formulate.js.html new file mode 100644 index 0000000..cf7ece4 --- /dev/null +++ b/coverage/lcov-report/src/Formulate.js.html @@ -0,0 +1,342 @@ + + + + Code coverage report for src/Formulate.js + + + + + + + +
+
+

+ All files / src Formulate.js +

+
+
+ 90.48% + Statements + 19/21 +
+
+ 85.71% + Branches + 12/14 +
+
+ 100% + Functions + 5/5 +
+
+ 90.48% + Lines + 19/21 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +3x +3x +21x +  +3x +  +  +  +  +  +  +  +  +6x +6x +13x +4x +  +  +  +9x +  +  +6x +6x +2x +  +  +6x +  +  +  +  +  +  +  +49x +49x +  +  +  +  +  +  +  +  +  +40x +40x +  +  +  +  +  +  + 
import library from './libs/library'
+import isPlainObject from 'is-plain-object'
+import FormulateInput from './FormulateInput.vue'
+import FormulateForm from './FormulateForm.vue'
+import FormulateInputGroup from './FormulateInputGroup.vue'
+import FormulateInputBox from './inputs/FormulateInputBox.vue'
+import FormulateInputText from './inputs/FormulateInputText.vue'
+import FormulateInputSelect from './inputs/FormulateInputSelect.vue'
+import FormulateInputTextArea from './inputs/FormulateInputTextArea.vue'
+/**
+ * The base formulate library.
+ */
+class Formulate {
+  /**
+   * Instantiate our base options.
+   */
+  constructor () {
+    this.defaults = {
+      components: {
+        FormulateForm,
+        FormulateInput,
+        FormulateInputBox,
+        FormulateInputText,
+        FormulateInputGroup,
+        FormulateInputSelect,
+        FormulateInputTextArea
+      },
+      library
+    }
+  }
+ 
+  /**
+   * Install vue formulate, and register it’s components.
+   */
+  install (Vue, options) {
+    Vue.prototype.$formulate = this
+    this.options = this.extend(this.defaults, options || {})
+    for (var componentName in this.options.components) {
+      Vue.component(componentName, this.options.components[componentName])
+    }
+    Object.freeze(this)
+  }
+ 
+  /**
+   * Create a new object by copying properties of base and extendWith.
+   * @param {Object} base
+   * @param {Object} extendWith
+   */
+  extend (base, extendWith) {
+    var merged = {}
+    for (var key in base) {
+      if (extendWith.hasOwnProperty(key)) {
+        merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+          ? this.extend(base[key], extendWith[key])
+          : extendWith[key]
+      } else {
+        merged[key] = base[key]
+      }
+    }
+    for (var prop in extendWith) {
+      if (!merged.hasOwnProperty(prop)) {
+        merged[prop] = extendWith[prop]
+      }
+    }
+    return merged
+  }
+ 
+  /**
+   * Determine what "class" of input this element is given the "type".
+   * @param {string} type
+   */
+  classify (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].classification
+    }
+    return 'unknown'
+  }
+ 
+  /**
+   * Determine what type of component to render given the "type".
+   * @param {string} type
+   */
+  component (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].component
+    }
+    return false
+  }
+}
+ 
+export default new Formulate()
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/FormulateForm.vue.html b/coverage/lcov-report/src/FormulateForm.vue.html new file mode 100644 index 0000000..dc9468c --- /dev/null +++ b/coverage/lcov-report/src/FormulateForm.vue.html @@ -0,0 +1,321 @@ + + + + Code coverage report for src/FormulateForm.vue + + + + + + + +
+
+

+ All files / src FormulateForm.vue +

+
+
+ 11.76% + Statements + 2/17 +
+
+ 0% + Branches + 0/20 +
+
+ 0% + Functions + 0/10 +
+
+ 11.76% + Lines + 2/17 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85  +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import { shallowEqualObjects } from './libs/utils'
+ 
+export default {
+  provide () {
+    return {
+      formulateFormSetter: this.setFieldValue,
+      formulateFormRegister: this.register
+    }
+  },
+  name: 'FormulateForm',
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    name: {
+      type: [String, Boolean],
+      default: false
+    },
+    formulateValue: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data () {
+    return {
+      registry: {}
+    }
+  },
+  computed: {
+    formModel: {
+      get () {
+        return this.formulateValue
+      },
+      set (value) {
+        this.$emit('input', value)
+      }
+    },
+    hasFormulateValue () {
+      return this.formulateValue && typeof this.formulateValue === 'object'
+    },
+    isVmodeled () {
+      return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+        this._events &&
+        Array.isArray(this._events.input) &&
+        this._events.input.length)
+    }
+  },
+  watch: {
+    formulateValue: {
+      handler (newValue, oldValue) {
+        if (this.isVmodeled &&
+          newValue &&
+          typeof newValue === 'object'
+        ) {
+          for (const field in newValue) {
+            if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+              // If the value of the formulateValue changed (probably as a prop)
+              // and it doesn't match the internal proxied value of the registered
+              // component, we set it explicitly. Its important we check the
+              // model proxy here since the model itself is not fully synchronous.
+              this.registry[field].context.model = newValue[field]
+            }
+          }
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    setFieldValue (field, value) {
+      this.formModel = Object.assign({}, this.formulateValue, { [field]: value })
+    },
+    register (field, component) {
+      this.registry[field] = component
+      if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+        // In the case that the form is carrying an initial value and the
+        // element is not, set it directly.
+        component.context.model = this.formulateValue[field]
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/FormulateInput.vue.html b/coverage/lcov-report/src/FormulateInput.vue.html new file mode 100644 index 0000000..63c63bc --- /dev/null +++ b/coverage/lcov-report/src/FormulateInput.vue.html @@ -0,0 +1,402 @@ + + + + Code coverage report for src/FormulateInput.vue + + + + + + + +
+
+

+ All files / src FormulateInput.vue +

+
+
+ 94.44% + Statements + 17/18 +
+
+ 85% + Branches + 17/20 +
+
+ 100% + Functions + 8/8 +
+
+ 94.44% + Lines + 17/18 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112  +3x +3x +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +47x +  +  +  +  +  +  +  +  +49x +49x +  +  +49x +  +  +  +  +  +10x +  +  +  +  +10x +1x +  +  +  +9x +9x +  +  +  +  +47x +  +  +47x +  +  +  +57x +18x +  +  +  +  + 
 
+import context from './libs/context'
+import { shallowEqualObjects } from './libs/utils'
+import nanoid from 'nanoid'
+ 
+export default {
+  name: 'FormulateInput',
+  inheritAttrs: false,
+  inject: {
+    formulateFormSetter: { default: undefined },
+    formulateFormRegister: { default: undefined }
+  },
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    type: {
+      type: String,
+      default: 'text'
+    },
+    name: {
+      type: [Boolean, String],
+      default: true
+    },
+    /* eslint-disable */
+    formulateValue: {
+      default: ''
+    },
+    value: {
+      default: false
+    },
+    /* eslint-enable */
+    options: {
+      type: [Object, Array, Boolean],
+      default: false
+    },
+    optionGroups: {
+      type: [Object, Boolean],
+      default: false
+    },
+    id: {
+      type: [String, Boolean, Number],
+      default: false
+    },
+    label: {
+      type: [String, Boolean],
+      default: false
+    },
+    labelPosition: {
+      type: [String, Boolean],
+      default: false
+    },
+    help: {
+      type: [String, Boolean],
+      default: false
+    },
+    debug: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultId: nanoid(9),
+      localAttributes: {},
+      internalModelProxy: this.formulateValue
+    }
+  },
+  computed: {
+    ...context,
+    classification () {
+      const classification = this.$formulate.classify(this.type)
+      return (classification === 'box' && this.options) ? 'group' : classification
+    },
+    component () {
+      return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+    }
+  },
+  watch: {
+    '$attrs': {
+      handler (value) {
+        this.updateLocalAttributes(value)
+      },
+      deep: true
+    },
+    internalModelProxy (newValue, oldValue) {
+      if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    },
+    formulateValue (newValue, oldValue) {
+      Eif (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    }
+  },
+  created () {
+    Iif (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+      this.formulateFormRegister(this.nameOrFallback, this)
+    }
+    this.updateLocalAttributes(this.$attrs)
+  },
+  methods: {
+    updateLocalAttributes (value) {
+      if (!shallowEqualObjects(value, this.localAttributes)) {
+        this.localAttributes = value
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/FormulateInputGroup.vue.html b/coverage/lcov-report/src/FormulateInputGroup.vue.html new file mode 100644 index 0000000..49a54d9 --- /dev/null +++ b/coverage/lcov-report/src/FormulateInputGroup.vue.html @@ -0,0 +1,147 @@ + + + + Code coverage report for src/FormulateInputGroup.vue + + + + + + + +
+
+

+ All files / src FormulateInputGroup.vue +

+
+
+ 100% + Statements + 6/6 +
+
+ 50% + Branches + 1/2 +
+
+ 100% + Functions + 4/4 +
+
+ 100% + Lines + 5/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27  +3x +  +  +  +  +  +  +  +  +  +9x +  +  +9x +21x +  +  +  +  +21x +  +  +  +  +  + 
 
+export default {
+  name: 'FormulateInputGroup',
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    options () {
+      return this.context.options || []
+    },
+    optionsWithContext () {
+      const { options, labelPosition, attributes, classification, ...context } = this.context
+      return this.options.map(option => this.groupItemContext(context, option))
+    }
+  },
+  methods: {
+    groupItemContext (...args) {
+      return Object.assign({}, ...args, {
+        component: 'FormulateInput'
+      })
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/FormulateInputMixin.js.html b/coverage/lcov-report/src/FormulateInputMixin.js.html new file mode 100644 index 0000000..82263d8 --- /dev/null +++ b/coverage/lcov-report/src/FormulateInputMixin.js.html @@ -0,0 +1,144 @@ + + + + Code coverage report for src/FormulateInputMixin.js + + + + + + + +
+
+

+ All files / src FormulateInputMixin.js +

+
+
+ 75% + Statements + 3/4 +
+
+ 50% + Branches + 1/2 +
+
+ 75% + Functions + 3/4 +
+
+ 75% + Lines + 3/4 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26  +  +  +  +  +  +  +  +  +  +  +  +41x +  +  +18x +  +  +41x +  +  +  +  +  +  + 
/**
+ * Default base for input components.
+ */
+export default {
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    type () {
+      return this.context.type
+    },
+    id () {
+      return this.context.id
+    },
+    attributes () {
+      return this.context.attributes || {}
+    },
+    hasValue () {
+      return !!this.context.model
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/index.html b/coverage/lcov-report/src/index.html new file mode 100644 index 0000000..5d30153 --- /dev/null +++ b/coverage/lcov-report/src/index.html @@ -0,0 +1,149 @@ + + + + Code coverage report for src + + + + + + + +
+
+

+ All files src +

+
+
+ 71.21% + Statements + 47/66 +
+
+ 53.45% + Branches + 31/58 +
+
+ 64.52% + Functions + 20/31 +
+
+ 70.77% + Lines + 46/65 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Formulate.js
90.48%19/2185.71%12/14100%5/590.48%19/21
FormulateForm.vue
11.76%2/170%0/200%0/1011.76%2/17
FormulateInput.vue
94.44%17/1885%17/20100%8/894.44%17/18
FormulateInputGroup.vue
100%6/650%1/2100%4/4100%5/5
FormulateInputMixin.js
75%3/450%1/275%3/475%3/4
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/inputs/FormulateInputBox.vue.html b/coverage/lcov-report/src/inputs/FormulateInputBox.vue.html new file mode 100644 index 0000000..db76b2f --- /dev/null +++ b/coverage/lcov-report/src/inputs/FormulateInputBox.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for src/inputs/FormulateInputBox.vue + + + + + + + +
+
+

+ All files / src/inputs FormulateInputBox.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputBox',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/inputs/FormulateInputSelect.vue.html b/coverage/lcov-report/src/inputs/FormulateInputSelect.vue.html new file mode 100644 index 0000000..2d76217 --- /dev/null +++ b/coverage/lcov-report/src/inputs/FormulateInputSelect.vue.html @@ -0,0 +1,123 @@ + + + + Code coverage report for src/inputs/FormulateInputSelect.vue + + + + + + + +
+
+

+ All files / src/inputs FormulateInputSelect.vue +

+
+
+ 40% + Statements + 2/5 +
+
+ 0% + Branches + 0/7 +
+
+ 0% + Functions + 0/3 +
+
+ 40% + Lines + 2/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19  +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputSelect',
+  mixins: [FormulateInputMixin],
+  computed: {
+    options () {
+      return this.context.options || {}
+    },
+    optionGroups () {
+      return this.context.optionGroups || false
+    },
+    placeholderSelected () {
+      return !!(!this.hasValue && this.context.attributes && this.context.attributes.placeholder)
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/inputs/FormulateInputText.vue.html b/coverage/lcov-report/src/inputs/FormulateInputText.vue.html new file mode 100644 index 0000000..5f54765 --- /dev/null +++ b/coverage/lcov-report/src/inputs/FormulateInputText.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for src/inputs/FormulateInputText.vue + + + + + + + +
+
+

+ All files / src/inputs FormulateInputText.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputText',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/inputs/FormulateInputTextArea.vue.html b/coverage/lcov-report/src/inputs/FormulateInputTextArea.vue.html new file mode 100644 index 0000000..d6eefcc --- /dev/null +++ b/coverage/lcov-report/src/inputs/FormulateInputTextArea.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for src/inputs/FormulateInputTextArea.vue + + + + + + + +
+
+

+ All files / src/inputs FormulateInputTextArea.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputTextArea',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/inputs/index.html b/coverage/lcov-report/src/inputs/index.html new file mode 100644 index 0000000..237f144 --- /dev/null +++ b/coverage/lcov-report/src/inputs/index.html @@ -0,0 +1,136 @@ + + + + Code coverage report for src/inputs + + + + + + + +
+
+

+ All files src/inputs +

+
+
+ 72.73% + Statements + 8/11 +
+
+ 0% + Branches + 0/7 +
+
+ 0% + Functions + 0/3 +
+
+ 72.73% + Lines + 8/11 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
FormulateInputBox.vue
100%2/2100%0/0100%0/0100%2/2
FormulateInputSelect.vue
40%2/50%0/70%0/340%2/5
FormulateInputText.vue
100%2/2100%0/0100%0/0100%2/2
FormulateInputTextArea.vue
100%2/2100%0/0100%0/0100%2/2
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/libs/context.js.html b/coverage/lcov-report/src/libs/context.js.html new file mode 100644 index 0000000..a4c41db --- /dev/null +++ b/coverage/lcov-report/src/libs/context.js.html @@ -0,0 +1,567 @@ + + + + Code coverage report for src/libs/context.js + + + + + + + +
+
+

+ All files / src/libs context.js +

+
+
+ 78.26% + Statements + 36/46 +
+
+ 64.15% + Branches + 34/53 +
+
+ 90.91% + Functions + 10/11 +
+
+ 78.26% + Lines + 36/46 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167  +  +  +  +  +  +  +  +  +  +50x +  +  +50x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +49x +  +  +  +  +  +  +  +9x +9x +  +  +  +  +  +40x +  +  +  +  +  +  +  +  +48x +48x +15x +  +33x +  +48x +  +  +  +  +  +  +  +49x +  +  +49x +  +18x +  +31x +  +  +  +  +  +  +  +48x +33x +  +15x +  +  +15x +  +  +  +  +  +  +47x +  +  +  +  +  +  +  +  +  +  +  +  +9x +9x +9x +9x +21x +  +9x +  +  +  +  +  +  +  +  +  +  +  +50x +  +  +  +  +  +  +  +  +  +136x +136x +6x +  +130x +64x +  +66x +  +  +  +  +  +  +22x +22x +22x +  +  +  + 
import nanoid from 'nanoid'
+import { map } from './utils'
+ 
+/**
+ * For a single instance of an input, export all of the context needed to fully
+ * render that element.
+ * @return {object}
+ */
+export default {
+  context () {
+    Iif (this.debug) {
+      console.log(`${this.type} re-context`)
+    }
+    return defineModel.call(this, {
+      type: this.type,
+      value: this.value,
+      name: this.nameOrFallback,
+      classification: this.classification,
+      component: this.component,
+      id: this.id || this.defaultId,
+      label: this.label,
+      labelPosition: this.logicalLabelPosition,
+      attributes: this.elementAttributes,
+      ...this.typeContext
+    })
+  },
+  nameOrFallback,
+  typeContext,
+  elementAttributes,
+  logicalLabelPosition,
+  isVmodeled
+}
+ 
+/**
+ * Given (this.type), return an object to merge with the context
+ * @return {object}
+ * @return {object}
+ */
+function typeContext () {
+  switch (this.classification) {
+    case 'select':
+      return {
+        options: createOptionList.call(this, this.options),
+        optionGroups: this.optionGroups ? map(this.optionGroups, (k, v) => createOptionList.call(this, v)) : false,
+        placeholder: this.$attrs.placeholder || false
+      }
+    case 'group':
+      Eif (this.options) {
+        return {
+          options: createOptionList.call(this, this.options)
+        }
+      }
+      break
+    default:
+      return {}
+  }
+}
+ 
+/**
+ * Reducer for attributes that will be applied to each core input element.
+ * @return {object}
+ */
+function elementAttributes () {
+  const attrs = Object.assign({}, this.localAttributes)
+  if (this.id) {
+    attrs.id = this.id
+  } else {
+    attrs.id = this.defaultId
+  }
+  return attrs
+}
+ 
+/**
+ * Determine the a best-guess location for the label (before or after).
+ * @return {string} before|after
+ */
+function logicalLabelPosition () {
+  Iif (this.labelPosition) {
+    return this.labelPosition
+  }
+  switch (this.classification) {
+    case 'box':
+      return 'after'
+    default:
+      return 'before'
+  }
+}
+ 
+/**
+ * Return the element’s name, or select a fallback.
+ */
+function nameOrFallback () {
+  if (this.name === true) {
+    return `${this.type}_${this.elementAttributes.id}`
+  }
+  Iif (this.name === false) {
+    return false
+  }
+  return this.name
+}
+ 
+/**
+ * Determines if this formulate element is v-modeled or not.
+ */
+function isVmodeled () {
+  return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+    this._events &&
+    Array.isArray(this._events.input) &&
+    this._events.input.length)
+}
+ 
+/**
+ * Given an object or array of options, create an array of objects with label,
+ * value, and id.
+ * @param {array|object}
+ * @return {array}
+ */
+function createOptionList (options) {
+  Eif (!Array.isArray(options) && options && typeof options === 'object') {
+    const optionList = []
+    const that = this
+    for (const value in options) {
+      optionList.push({ value, label: options[value], id: `${that.elementAttributes.id}_${value}` })
+    }
+    return optionList
+  } else if (Array.isArray(options) && !options.length) {
+    return [{ value: this.value, label: (this.label || this.name), id: this.context.id || nanoid(9) }]
+  }
+  return options
+}
+ 
+/**
+ * Defines the model used throughout the existing context.
+ * @param {object} context
+ */
+function defineModel (context) {
+  return Object.defineProperty(context, 'model', {
+    get: modelGetter.bind(this),
+    set: modelSetter.bind(this)
+  })
+}
+ 
+/**
+ * Get the value from a model.
+ **/
+function modelGetter () {
+  const model = this.isVmodeled ? 'formulateValue' : 'internalModelProxy'
+  if (this.type === 'checkbox' && !Array.isArray(this[model]) && this.options) {
+    return []
+  }
+  if (!this[model]) {
+    return ''
+  }
+  return this[model]
+}
+ 
+/**
+ * Set the value from a model.
+ **/
+function modelSetter (value) {
+  this.internalModelProxy = value
+  this.$emit('input', value)
+  Iif (this.context.name && typeof this.formulateFormSetter === 'function') {
+    this.formulateFormSetter(this.context.name, value)
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/libs/index.html b/coverage/lcov-report/src/libs/index.html new file mode 100644 index 0000000..2a4e82a --- /dev/null +++ b/coverage/lcov-report/src/libs/index.html @@ -0,0 +1,123 @@ + + + + Code coverage report for src/libs + + + + + + + +
+
+

+ All files src/libs +

+
+
+ 68.49% + Statements + 50/73 +
+
+ 66.15% + Branches + 43/65 +
+
+ 73.33% + Functions + 11/15 +
+
+ 68.06% + Lines + 49/72 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
context.js
78.26%36/4664.15%34/5390.91%10/1178.26%36/46
library.js
0%0/00%0/00%0/00%0/0
utils.js
51.85%14/2775%9/1225%1/450%13/26
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/libs/library.js.html b/coverage/lcov-report/src/libs/library.js.html new file mode 100644 index 0000000..4b37f58 --- /dev/null +++ b/coverage/lcov-report/src/libs/library.js.html @@ -0,0 +1,354 @@ + + + + Code coverage report for src/libs/library.js + + + + + + + +
+
+

+ All files / src/libs library.js +

+
+
+ 0% + Statements + 0/0 +
+
+ 0% + Branches + 0/0 +
+
+ 0% + Functions + 0/0 +
+
+ 0% + Lines + 0/0 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
export default {
+  // === SINGLE LINE TEXT STYLE INPUTS
+  text: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  email: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  number: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  color: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  date: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  hidden: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  month: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  password: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  range: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  search: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  tel: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  time: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  url: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  week: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  'datetime-local': {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+ 
+  // === MULTI LINE TEXT INPUTS
+  textarea: {
+    classification: 'textarea',
+    component: 'FormulateInputTextArea'
+  },
+ 
+  // === BOX STYLE INPUTS
+  checkbox: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+  radio: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+ 
+  // === BUTTON STYLE INPUTS
+  submit: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+  button: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+ 
+  // === SELECT STYLE INPUTS
+  select: {
+    classification: 'select',
+    component: 'FormulateInputSelect'
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/src/libs/utils.js.html b/coverage/lcov-report/src/libs/utils.js.html new file mode 100644 index 0000000..13d7b4c --- /dev/null +++ b/coverage/lcov-report/src/libs/utils.js.html @@ -0,0 +1,282 @@ + + + + Code coverage report for src/libs/utils.js + + + + + + + +
+
+

+ All files / src/libs utils.js +

+
+
+ 51.85% + Statements + 14/27 +
+
+ 75% + Branches + 9/12 +
+
+ 25% + Functions + 1/4 +
+
+ 50% + Lines + 13/26 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +67x +  +  +67x +1x +  +66x +66x +66x +  +66x +26x +  +  +40x +8x +  +8x +1x +  +  +39x +  + 
 
+/**
+ * Function to map over an object.
+ * @param {Object} obj An object to map over
+ * @param {Function} callback
+ */
+export function map (original, callback) {
+  const obj = {}
+  for (let key in original) {
+    obj[key] = callback(key, original[key])
+  }
+  return obj
+}
+ 
+/**
+ * Function to filter an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ */
+export function filter (original, callback) {
+  let obj = {}
+  for (let key in original) {
+    if (callback(key, original[key])) {
+      obj[key] = original[key]
+    }
+  }
+  return obj
+}
+ 
+/**
+ * Function to reduce an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ * @param {*} accumulator
+ */
+export function reduce (original, callback, accumulator) {
+  for (let key in original) {
+    accumulator = callback(accumulator, key, original[key])
+  }
+  return accumulator
+}
+ 
+/**
+ * Shallow equal.
+ * @param {} objA
+ * @param {*} objB
+ */
+export function shallowEqualObjects (objA, objB) {
+  Iif (objA === objB) {
+    return true
+  }
+  if (!objA || !objB) {
+    return false
+  }
+  var aKeys = Object.keys(objA)
+  var bKeys = Object.keys(objB)
+  var len = aKeys.length
+ 
+  if (bKeys.length !== len) {
+    return false
+  }
+ 
+  for (var i = 0; i < len; i++) {
+    var key = aKeys[i]
+ 
+    if (objA[key] !== objB[key]) {
+      return false
+    }
+  }
+  return true
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/test/index.html b/coverage/lcov-report/test/index.html new file mode 100644 index 0000000..6fee10c --- /dev/null +++ b/coverage/lcov-report/test/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for test + + + + + + + +
+
+

+ All files test +

+
+
+ 0% + Statements + 0/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
jest.conf.js
0%0/2100%0/0100%0/00%0/2
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/test/jest.conf.js.html b/coverage/lcov-report/test/jest.conf.js.html new file mode 100644 index 0000000..4e65bb3 --- /dev/null +++ b/coverage/lcov-report/test/jest.conf.js.html @@ -0,0 +1,153 @@ + + + + Code coverage report for test/jest.conf.js + + + + + + + +
+
+

+ All files / test jest.conf.js +

+
+
+ 0% + Statements + 0/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
const path = require('path')
+ 
+module.exports = {
+  rootDir: path.resolve(__dirname, '../'),
+  moduleFileExtensions: [
+    'js',
+    'json',
+    'vue'
+  ],
+  moduleNameMapper: {
+    '^@/(.*)$': '<rootDir>/src/$1'
+  },
+  transform: {
+    '^.+\\.js$': '<rootDir>/node_modules/babel-jest',
+    '.*\\.(vue)$': '<rootDir>/node_modules/jest-vue-preprocessor'
+  },
+  collectCoverageFrom: [
+    "**/*.{js,vue}",
+    "!**/node_modules/**",
+    "!**/coverage/**",
+    "!**/example/**",
+    "!**/src~v1/**",
+    "!**/build/**",
+    "!**/.cache/**",
+    "!**/dist/**",
+    "!babel.config.js"
+  ]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/babel.config.js.html b/coverage/lcov-report/vue-formulate/babel.config.js.html new file mode 100644 index 0000000..783779c --- /dev/null +++ b/coverage/lcov-report/vue-formulate/babel.config.js.html @@ -0,0 +1,108 @@ + + + + Code coverage report for vue-formulate/babel.config.js + + + + + + + +
+
+

+ All files / vue-formulate babel.config.js +

+
+
+ 0% + Statements + 0/1 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/1 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14  +  +  +  +  +  +  +  +  +  +  +  +  + 
module.exports = {
+  env: {
+    test: {
+      presets: [
+        [ '@babel/preset-env', {
+          targets: {
+            node: 'current'
+          }
+        } ]
+      ]
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/build/index.html b/coverage/lcov-report/vue-formulate/build/index.html new file mode 100644 index 0000000..f8e5ea2 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/build/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate/build + + + + + + + +
+
+

+ All files vue-formulate/build +

+
+
+ 0% + Statements + 0/0 +
+
+ 0% + Branches + 0/0 +
+
+ 0% + Functions + 0/0 +
+
+ 0% + Lines + 0/0 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
rollup.config.js
0%0/00%0/00%0/00%0/0
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/build/rollup.config.js.html b/coverage/lcov-report/vue-formulate/build/rollup.config.js.html new file mode 100644 index 0000000..8ba5037 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/build/rollup.config.js.html @@ -0,0 +1,147 @@ + + + + Code coverage report for vue-formulate/build/rollup.config.js + + + + + + + +
+
+

+ All files / vue-formulate/build rollup.config.js +

+
+
+ 0% + Statements + 0/0 +
+
+ 0% + Branches + 0/0 +
+
+ 0% + Functions + 0/0 +
+
+ 0% + Lines + 0/0 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import commonjs from 'rollup-plugin-commonjs' // Convert CommonJS modules to ES6
+import vue from 'rollup-plugin-vue' // Handle .vue SFC files
+import buble from 'rollup-plugin-buble' // Transpile/polyfill with reasonable browser support
+ 
+export default {
+  input: 'src/Formulate.js', // Path relative to package.json
+  output: {
+    name: 'Formulate',
+    exports: 'named',
+    globals: {
+      'is-plain-object': 'isPlainObject',
+      'nanoid': 'nanoid'
+    }
+  },
+  external: ['is-plain-object', 'nanoid'],
+  plugins: [
+    commonjs(),
+    vue({
+      css: true, // Dynamically inject css as a <style> tag
+      compileTemplate: true // Explicitly convert template to render function
+    }),
+    buble({
+      objectAssign: 'Object.assign'
+    }) // Transpile to ES5
+  ]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/dist/formulate.esm.js.html b/coverage/lcov-report/vue-formulate/dist/formulate.esm.js.html new file mode 100644 index 0000000..96d1402 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/dist/formulate.esm.js.html @@ -0,0 +1,4629 @@ + + + + Code coverage report for vue-formulate/dist/formulate.esm.js + + + + + + + +
+
+

+ All files / vue-formulate/dist formulate.esm.js +

+
+
+ 0% + Statements + 0/331 +
+
+ 0% + Branches + 0/246 +
+
+ 0% + Functions + 0/76 +
+
+ 0% + Lines + 0/323 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import isPlainObject from 'is-plain-object';
+import nanoid from 'nanoid';
+ 
+var library = {
+  // === SINGLE LINE TEXT STYLE INPUTS
+  text: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  email: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  number: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  color: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  date: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  hidden: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  month: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  password: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  range: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  search: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  tel: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  time: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  url: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  week: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  'datetime-local': {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+ 
+  // === MULTI LINE TEXT INPUTS
+  textarea: {
+    classification: 'textarea',
+    component: 'FormulateInputTextArea'
+  },
+ 
+  // === BOX STYLE INPUTS
+  checkbox: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+  radio: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+ 
+  // === BUTTON STYLE INPUTS
+  submit: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+  button: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+ 
+  // === SELECT STYLE INPUTS
+  select: {
+    classification: 'select',
+    component: 'FormulateInputSelect'
+  }
+};
+ 
+/**
+ * Function to map over an object.
+ * @param {Object} obj An object to map over
+ * @param {Function} callback
+ */
+function map (original, callback) {
+  var obj = {};
+  for (var key in original) {
+    obj[key] = callback(key, original[key]);
+  }
+  return obj
+}
+ 
+/**
+ * Shallow equal.
+ * @param {} objA
+ * @param {*} objB
+ */
+function shallowEqualObjects (objA, objB) {
+  if (objA === objB) {
+    return true
+  }
+  if (!objA || !objB) {
+    return false
+  }
+  var aKeys = Object.keys(objA);
+  var bKeys = Object.keys(objB);
+  var len = aKeys.length;
+ 
+  if (bKeys.length !== len) {
+    return false
+  }
+ 
+  for (var i = 0; i < len; i++) {
+    var key = aKeys[i];
+ 
+    if (objA[key] !== objB[key]) {
+      return false
+    }
+  }
+  return true
+}
+ 
+/**
+ * For a single instance of an input, export all of the context needed to fully
+ * render that element.
+ * @return {object}
+ */
+var context = {
+  context: function context () {
+    if (this.debug) {
+      console.log(((this.type) + " re-context"));
+    }
+    return defineModel.call(this, Object.assign({}, {type: this.type,
+      value: this.value,
+      name: this.nameOrFallback,
+      classification: this.classification,
+      component: this.component,
+      id: this.id || this.defaultId,
+      label: this.label,
+      labelPosition: this.logicalLabelPosition,
+      attributes: this.elementAttributes},
+      this.typeContext))
+  },
+  nameOrFallback: nameOrFallback,
+  typeContext: typeContext,
+  elementAttributes: elementAttributes,
+  logicalLabelPosition: logicalLabelPosition,
+  isVmodeled: isVmodeled
+};
+ 
+/**
+ * Given (this.type), return an object to merge with the context
+ * @return {object}
+ * @return {object}
+ */
+function typeContext () {
+  var this$1 = this;
+ 
+  switch (this.classification) {
+    case 'select':
+      return {
+        options: createOptionList.call(this, this.options),
+        optionGroups: this.optionGroups ? map(this.optionGroups, function (k, v) { return createOptionList.call(this$1, v); }) : false,
+        placeholder: this.$attrs.placeholder || false
+      }
+    case 'group':
+      if (this.options) {
+        return {
+          options: createOptionList.call(this, this.options)
+        }
+      }
+      break
+    default:
+      return {}
+  }
+}
+ 
+/**
+ * Reducer for attributes that will be applied to each core input element.
+ * @return {object}
+ */
+function elementAttributes () {
+  var attrs = Object.assign({}, this.localAttributes);
+  if (this.id) {
+    attrs.id = this.id;
+  } else {
+    attrs.id = this.defaultId;
+  }
+  return attrs
+}
+ 
+/**
+ * Determine the a best-guess location for the label (before or after).
+ * @return {string} before|after
+ */
+function logicalLabelPosition () {
+  if (this.labelPosition) {
+    return this.labelPosition
+  }
+  switch (this.classification) {
+    case 'box':
+      return 'after'
+    default:
+      return 'before'
+  }
+}
+ 
+/**
+ * Return the element’s name, or select a fallback.
+ */
+function nameOrFallback () {
+  if (this.name === true) {
+    return ((this.type) + "_" + (this.elementAttributes.id))
+  }
+  if (this.name === false) {
+    return false
+  }
+  return this.name
+}
+ 
+/**
+ * Determines if this formulate element is v-modeled or not.
+ */
+function isVmodeled () {
+  return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+    this._events &&
+    Array.isArray(this._events.input) &&
+    this._events.input.length)
+}
+ 
+/**
+ * Given an object or array of options, create an array of objects with label,
+ * value, and id.
+ * @param {array|object}
+ * @return {array}
+ */
+function createOptionList (options) {
+  if (!Array.isArray(options) && options && typeof options === 'object') {
+    var optionList = [];
+    var that = this;
+    for (var value in options) {
+      optionList.push({ value: value, label: options[value], id: ((that.elementAttributes.id) + "_" + value) });
+    }
+    return optionList
+  } else if (Array.isArray(options) && !options.length) {
+    return [{ value: this.value, label: (this.label || this.name), id: this.context.id || nanoid(9) }]
+  }
+  return options
+}
+ 
+/**
+ * Defines the model used throughout the existing context.
+ * @param {object} context
+ */
+function defineModel (context) {
+  return Object.defineProperty(context, 'model', {
+    get: modelGetter.bind(this),
+    set: modelSetter.bind(this)
+  })
+}
+ 
+/**
+ * Get the value from a model.
+ **/
+function modelGetter () {
+  var model = this.isVmodeled ? 'formulateValue' : 'internalModelProxy';
+  if (this.type === 'checkbox' && !Array.isArray(this[model]) && this.options) {
+    return []
+  }
+  if (!this[model]) {
+    return ''
+  }
+  return this[model]
+}
+ 
+/**
+ * Set the value from a model.
+ **/
+function modelSetter (value) {
+  this.internalModelProxy = value;
+  this.$emit('input', value);
+  if (this.context.name && typeof this.formulateFormSetter === 'function') {
+    this.formulateFormSetter(this.context.name, value);
+  }
+}
+ 
+//
+ 
+var script = {
+  name: 'FormulateInput',
+  inheritAttrs: false,
+  inject: {
+    formulateFormSetter: { default: undefined },
+    formulateFormRegister: { default: undefined }
+  },
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    type: {
+      type: String,
+      default: 'text'
+    },
+    name: {
+      type: [Boolean, String],
+      default: true
+    },
+    /* eslint-disable */
+    formulateValue: {
+      default: ''
+    },
+    value: {
+      default: false
+    },
+    /* eslint-enable */
+    options: {
+      type: [Object, Array, Boolean],
+      default: false
+    },
+    optionGroups: {
+      type: [Object, Boolean],
+      default: false
+    },
+    id: {
+      type: [String, Boolean, Number],
+      default: false
+    },
+    label: {
+      type: [String, Boolean],
+      default: false
+    },
+    labelPosition: {
+      type: [String, Boolean],
+      default: false
+    },
+    help: {
+      type: [String, Boolean],
+      default: false
+    },
+    debug: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data: function data () {
+    return {
+      defaultId: nanoid(9),
+      localAttributes: {},
+      internalModelProxy: this.formulateValue
+    }
+  },
+  computed: Object.assign({}, context,
+    {classification: function classification () {
+      var classification = this.$formulate.classify(this.type);
+      return (classification === 'box' && this.options) ? 'group' : classification
+    },
+    component: function component () {
+      return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+    }}),
+  watch: {
+    '$attrs': {
+      handler: function handler (value) {
+        this.updateLocalAttributes(value);
+      },
+      deep: true
+    },
+    internalModelProxy: function internalModelProxy (newValue, oldValue) {
+      if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue;
+      }
+    },
+    formulateValue: function formulateValue (newValue, oldValue) {
+      if (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue;
+      }
+    }
+  },
+  created: function created () {
+    if (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+      this.formulateFormRegister(this.nameOrFallback, this);
+    }
+    this.updateLocalAttributes(this.$attrs);
+  },
+  methods: {
+    updateLocalAttributes: function updateLocalAttributes (value) {
+      if (!shallowEqualObjects(value, this.localAttributes)) {
+        this.localAttributes = value;
+      }
+    }
+  }
+};
+ 
+function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
+/* server only */
+, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
+  if (typeof shadowMode !== 'boolean') {
+    createInjectorSSR = createInjector;
+    createInjector = shadowMode;
+    shadowMode = false;
+  } // Vue.extend constructor export interop.
+ 
+ 
+  var options = typeof script === 'function' ? script.options : script; // render functions
+ 
+  if (template && template.render) {
+    options.render = template.render;
+    options.staticRenderFns = template.staticRenderFns;
+    options._compiled = true; // functional template
+ 
+    if (isFunctionalTemplate) {
+      options.functional = true;
+    }
+  } // scopedId
+ 
+ 
+  if (scopeId) {
+    options._scopeId = scopeId;
+  }
+ 
+  var hook;
+ 
+  if (moduleIdentifier) {
+    // server build
+    hook = function hook(context) {
+      // 2.3 injection
+      context = context || // cached call
+      this.$vnode && this.$vnode.ssrContext || // stateful
+      this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
+      // 2.2 with runInNewContext: true
+ 
+      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
+        context = __VUE_SSR_CONTEXT__;
+      } // inject component styles
+ 
+ 
+      if (style) {
+        style.call(this, createInjectorSSR(context));
+      } // register component module identifier for async chunk inference
+ 
+ 
+      if (context && context._registeredComponents) {
+        context._registeredComponents.add(moduleIdentifier);
+      }
+    }; // used by ssr in case component is cached and beforeCreate
+    // never gets called
+ 
+ 
+    options._ssrRegister = hook;
+  } else if (style) {
+    hook = shadowMode ? function () {
+      style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
+    } : function (context) {
+      style.call(this, createInjector(context));
+    };
+  }
+ 
+  if (hook) {
+    if (options.functional) {
+      // register for functional component in vue file
+      var originalRender = options.render;
+ 
+      options.render = function renderWithStyleInjection(h, context) {
+        hook.call(context);
+        return originalRender(h, context);
+      };
+    } else {
+      // inject component registration as beforeCreate hook
+      var existing = options.beforeCreate;
+      options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
+    }
+  }
+ 
+  return script;
+}
+ 
+var normalizeComponent_1 = normalizeComponent;
+ 
+/* script */
+var __vue_script__ = script;
+ 
+/* template */
+var __vue_render__ = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    {
+      staticClass: "formulate-input",
+      attrs: {
+        "data-classification": _vm.classification,
+        "data-type": _vm.type
+      }
+    },
+    [
+      _c(
+        "div",
+        { staticClass: "formulate-input-wrapper" },
+        [
+          _vm.context.label && _vm.context.labelPosition === "before"
+            ? _vm._t(
+                "label",
+                [
+                  _c("label", {
+                    staticClass:
+                      "formulate-input-label formulate-input-label--before",
+                    attrs: { for: _vm.context.attributes.id },
+                    domProps: { textContent: _vm._s(_vm.context.label) }
+                  })
+                ],
+                null,
+                _vm.context
+              )
+            : _vm._e(),
+          _vm._v(" "),
+          _vm._t(
+            "default",
+            [
+              _c(_vm.context.component, {
+                tag: "component",
+                attrs: { context: _vm.context }
+              })
+            ],
+            null,
+            _vm.context
+          ),
+          _vm._v(" "),
+          _vm.context.label && _vm.context.labelPosition === "after"
+            ? _vm._t(
+                "label",
+                [
+                  _c("label", {
+                    staticClass:
+                      "formulate-input-label formulate-input-label--after",
+                    attrs: { for: _vm.context.attributes.id },
+                    domProps: { textContent: _vm._s(_vm.context.label) }
+                  })
+                ],
+                null,
+                _vm.context.label
+              )
+            : _vm._e()
+        ],
+        2
+      ),
+      _vm._v(" "),
+      _vm.help
+        ? _c("div", {
+            staticClass: "formulate-input-help",
+            domProps: { textContent: _vm._s(_vm.help) }
+          })
+        : _vm._e()
+    ]
+  )
+};
+var __vue_staticRenderFns__ = [];
+__vue_render__._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__ = undefined;
+  /* scoped */
+  var __vue_scope_id__ = undefined;
+  /* module identifier */
+  var __vue_module_identifier__ = undefined;
+  /* functional template */
+  var __vue_is_functional_template__ = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInput = normalizeComponent_1(
+    { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
+    __vue_inject_styles__,
+    __vue_script__,
+    __vue_scope_id__,
+    __vue_is_functional_template__,
+    __vue_module_identifier__,
+    undefined,
+    undefined
+  );
+ 
+//
+ 
+var script$1 = {
+  provide: function provide () {
+    return {
+      formulateFormSetter: this.setFieldValue,
+      formulateFormRegister: this.register
+    }
+  },
+  name: 'FormulateForm',
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    name: {
+      type: [String, Boolean],
+      default: false
+    },
+    formulateValue: {
+      type: Object,
+      default: function () { return ({}); }
+    }
+  },
+  data: function data () {
+    return {
+      registry: {}
+    }
+  },
+  computed: {
+    formModel: {
+      get: function get () {
+        return this.formulateValue
+      },
+      set: function set (value) {
+        this.$emit('input', value);
+      }
+    },
+    hasFormulateValue: function hasFormulateValue () {
+      return this.formulateValue && typeof this.formulateValue === 'object'
+    },
+    isVmodeled: function isVmodeled () {
+      return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+        this._events &&
+        Array.isArray(this._events.input) &&
+        this._events.input.length)
+    }
+  },
+  watch: {
+    formulateValue: {
+      handler: function handler (newValue, oldValue) {
+        if (this.isVmodeled &&
+          newValue &&
+          typeof newValue === 'object'
+        ) {
+          for (var field in newValue) {
+            if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+              // If the value of the formulateValue changed (probably as a prop)
+              // and it doesn't match the internal proxied value of the registered
+              // component, we set it explicitly. Its important we check the
+              // model proxy here since the model itself is not fully synchronous.
+              this.registry[field].context.model = newValue[field];
+            }
+          }
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    setFieldValue: function setFieldValue (field, value) {
+      var obj;
+ 
+      this.formModel = Object.assign({}, this.formulateValue, ( obj = {}, obj[field] = value, obj ));
+    },
+    register: function register (field, component) {
+      this.registry[field] = component;
+      if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+        // In the case that the form is carrying an initial value and the
+        // element is not, set it directly.
+        component.context.model = this.formulateValue[field];
+      }
+    }
+  }
+};
+ 
+/* script */
+var __vue_script__$1 = script$1;
+ 
+/* template */
+var __vue_render__$1 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "form",
+    {
+      on: {
+        submit: function($event) {
+          $event.preventDefault();
+          return _vm.formSubmitted($event)
+        }
+      }
+    },
+    [_vm._t("default")],
+    2
+  )
+};
+var __vue_staticRenderFns__$1 = [];
+__vue_render__$1._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$1 = undefined;
+  /* scoped */
+  var __vue_scope_id__$1 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$1 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$1 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateForm = normalizeComponent_1(
+    { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
+    __vue_inject_styles__$1,
+    __vue_script__$1,
+    __vue_scope_id__$1,
+    __vue_is_functional_template__$1,
+    __vue_module_identifier__$1,
+    undefined,
+    undefined
+  );
+ 
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+ 
+function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
+var script$2 = {
+  name: 'FormulateInputGroup',
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    options: function options () {
+      return this.context.options || []
+    },
+    optionsWithContext: function optionsWithContext () {
+      var this$1 = this;
+ 
+      var ref = this.context;
+      var options = ref.options;
+      var labelPosition = ref.labelPosition;
+      var attributes = ref.attributes;
+      var classification = ref.classification;
+      var rest = objectWithoutProperties( ref, ["options", "labelPosition", "attributes", "classification"] );
+      var context = rest;
+      return this.options.map(function (option) { return this$1.groupItemContext(context, option); })
+    }
+  },
+  methods: {
+    groupItemContext: function groupItemContext () {
+      var args = [], len = arguments.length;
+      while ( len-- ) args[ len ] = arguments[ len ];
+ 
+      return Object.assign.apply(Object, [ {} ].concat( args, [{
+        component: 'FormulateInput'
+      }] ))
+    }
+  }
+};
+ 
+/* script */
+var __vue_script__$2 = script$2;
+ 
+/* template */
+var __vue_render__$2 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    { staticClass: "formulate-input-group" },
+    _vm._l(_vm.optionsWithContext, function(optionContext) {
+      return _c(
+        optionContext.component,
+        _vm._b(
+          {
+            key: optionContext.id,
+            tag: "component",
+            staticClass: "formulate-input-group-item",
+            model: {
+              value: _vm.context.model,
+              callback: function($$v) {
+                _vm.$set(_vm.context, "model", $$v);
+              },
+              expression: "context.model"
+            }
+          },
+          "component",
+          optionContext,
+          false
+        )
+      )
+    }),
+    1
+  )
+};
+var __vue_staticRenderFns__$2 = [];
+__vue_render__$2._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$2 = undefined;
+  /* scoped */
+  var __vue_scope_id__$2 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$2 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$2 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInputGroup = normalizeComponent_1(
+    { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
+    __vue_inject_styles__$2,
+    __vue_script__$2,
+    __vue_scope_id__$2,
+    __vue_is_functional_template__$2,
+    __vue_module_identifier__$2,
+    undefined,
+    undefined
+  );
+ 
+/**
+ * Default base for input components.
+ */
+var FormulateInputMixin = {
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    type: function type () {
+      return this.context.type
+    },
+    id: function id () {
+      return this.context.id
+    },
+    attributes: function attributes () {
+      return this.context.attributes || {}
+    },
+    hasValue: function hasValue () {
+      return !!this.context.model
+    }
+  }
+};
+ 
+//
+ 
+var script$3 = {
+  name: 'FormulateInputBox',
+  mixins: [FormulateInputMixin]
+};
+ 
+/* script */
+var __vue_script__$3 = script$3;
+ 
+/* template */
+var __vue_render__$3 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    {
+      staticClass: "formulate-input-element formulate-input-element--box",
+      attrs: { "data-type": _vm.context.type }
+    },
+    [
+      _vm.type === "checkbox"
+        ? _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: "checkbox" },
+                domProps: {
+                  value: _vm.context.value,
+                  checked: Array.isArray(_vm.context.model)
+                    ? _vm._i(_vm.context.model, _vm.context.value) > -1
+                    : _vm.context.model
+                },
+                on: {
+                  change: function($event) {
+                    var $$a = _vm.context.model,
+                      $$el = $event.target,
+                      $$c = $$el.checked ? true : false;
+                    if (Array.isArray($$a)) {
+                      var $$v = _vm.context.value,
+                        $$i = _vm._i($$a, $$v);
+                      if ($$el.checked) {
+                        $$i < 0 &&
+                          _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                      } else {
+                        $$i > -1 &&
+                          _vm.$set(
+                            _vm.context,
+                            "model",
+                            $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                          );
+                      }
+                    } else {
+                      _vm.$set(_vm.context, "model", $$c);
+                    }
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          )
+        : _vm.type === "radio"
+        ? _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: "radio" },
+                domProps: {
+                  value: _vm.context.value,
+                  checked: _vm._q(_vm.context.model, _vm.context.value)
+                },
+                on: {
+                  change: function($event) {
+                    return _vm.$set(_vm.context, "model", _vm.context.value)
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          )
+        : _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: _vm.type },
+                domProps: {
+                  value: _vm.context.value,
+                  value: _vm.context.model
+                },
+                on: {
+                  input: function($event) {
+                    if ($event.target.composing) {
+                      return
+                    }
+                    _vm.$set(_vm.context, "model", $event.target.value);
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          ),
+      _vm._v(" "),
+      _c("label", {
+        staticClass: "formulate-input-element-decorator",
+        attrs: { for: _vm.id }
+      })
+    ]
+  )
+};
+var __vue_staticRenderFns__$3 = [];
+__vue_render__$3._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$3 = undefined;
+  /* scoped */
+  var __vue_scope_id__$3 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$3 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$3 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInputBox = normalizeComponent_1(
+    { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
+    __vue_inject_styles__$3,
+    __vue_script__$3,
+    __vue_scope_id__$3,
+    __vue_is_functional_template__$3,
+    __vue_module_identifier__$3,
+    undefined,
+    undefined
+  );
+ 
+//
+ 
+var script$4 = {
+  name: 'FormulateInputText',
+  mixins: [FormulateInputMixin]
+};
+ 
+/* script */
+var __vue_script__$4 = script$4;
+ 
+/* template */
+var __vue_render__$4 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    {
+      staticClass: "formulate-input-element formulate-input-element--textarea"
+    },
+    [
+      _vm.type === "checkbox"
+        ? _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: "checkbox" },
+                domProps: {
+                  checked: Array.isArray(_vm.context.model)
+                    ? _vm._i(_vm.context.model, null) > -1
+                    : _vm.context.model
+                },
+                on: {
+                  change: function($event) {
+                    var $$a = _vm.context.model,
+                      $$el = $event.target,
+                      $$c = $$el.checked ? true : false;
+                    if (Array.isArray($$a)) {
+                      var $$v = null,
+                        $$i = _vm._i($$a, $$v);
+                      if ($$el.checked) {
+                        $$i < 0 &&
+                          _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                      } else {
+                        $$i > -1 &&
+                          _vm.$set(
+                            _vm.context,
+                            "model",
+                            $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                          );
+                      }
+                    } else {
+                      _vm.$set(_vm.context, "model", $$c);
+                    }
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          )
+        : _vm.type === "radio"
+        ? _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: "radio" },
+                domProps: { checked: _vm._q(_vm.context.model, null) },
+                on: {
+                  change: function($event) {
+                    return _vm.$set(_vm.context, "model", null)
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          )
+        : _c(
+            "input",
+            _vm._b(
+              {
+                directives: [
+                  {
+                    name: "model",
+                    rawName: "v-model",
+                    value: _vm.context.model,
+                    expression: "context.model"
+                  }
+                ],
+                attrs: { type: _vm.type },
+                domProps: { value: _vm.context.model },
+                on: {
+                  input: function($event) {
+                    if ($event.target.composing) {
+                      return
+                    }
+                    _vm.$set(_vm.context, "model", $event.target.value);
+                  }
+                }
+              },
+              "input",
+              _vm.attributes,
+              false
+            )
+          )
+    ]
+  )
+};
+var __vue_staticRenderFns__$4 = [];
+__vue_render__$4._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$4 = undefined;
+  /* scoped */
+  var __vue_scope_id__$4 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$4 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$4 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInputText = normalizeComponent_1(
+    { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
+    __vue_inject_styles__$4,
+    __vue_script__$4,
+    __vue_scope_id__$4,
+    __vue_is_functional_template__$4,
+    __vue_module_identifier__$4,
+    undefined,
+    undefined
+  );
+ 
+//
+ 
+var script$5 = {
+  name: 'FormulateInputSelect',
+  mixins: [FormulateInputMixin],
+  computed: {
+    options: function options () {
+      return this.context.options || {}
+    },
+    optionGroups: function optionGroups () {
+      return this.context.optionGroups || false
+    },
+    placeholderSelected: function placeholderSelected () {
+      return !!(!this.hasValue && this.context.attributes && this.context.attributes.placeholder)
+    }
+  }
+};
+ 
+/* script */
+var __vue_script__$5 = script$5;
+ 
+/* template */
+var __vue_render__$5 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    { staticClass: "formulate-input-element formulate-input-element--select" },
+    [
+      _c(
+        "select",
+        _vm._b(
+          {
+            directives: [
+              {
+                name: "model",
+                rawName: "v-model",
+                value: _vm.context.model,
+                expression: "context.model"
+              }
+            ],
+            attrs: { "data-placeholder-selected": _vm.placeholderSelected },
+            on: {
+              change: function($event) {
+                var $$selectedVal = Array.prototype.filter
+                  .call($event.target.options, function(o) {
+                    return o.selected
+                  })
+                  .map(function(o) {
+                    var val = "_value" in o ? o._value : o.value;
+                    return val
+                  });
+                _vm.$set(
+                  _vm.context,
+                  "model",
+                  $event.target.multiple ? $$selectedVal : $$selectedVal[0]
+                );
+              }
+            }
+          },
+          "select",
+          _vm.attributes,
+          false
+        ),
+        [
+          _vm.context.placeholder
+            ? _c(
+                "option",
+                {
+                  attrs: { value: "", disabled: "" },
+                  domProps: { selected: !_vm.hasValue }
+                },
+                [
+                  _vm._v(
+                    "\n      " + _vm._s(_vm.context.placeholder) + "\n    "
+                  )
+                ]
+              )
+            : _vm._e(),
+          _vm._v(" "),
+          !_vm.optionGroups
+            ? _vm._l(_vm.options, function(option) {
+                return _c(
+                  "option",
+                  _vm._b(
+                    {
+                      key: option.id,
+                      domProps: {
+                        value: option.value,
+                        textContent: _vm._s(option.label)
+                      }
+                    },
+                    "option",
+                    option.attributes || {},
+                    false
+                  )
+                )
+              })
+            : _vm._l(_vm.optionGroups, function(subOptions, label) {
+                return _c(
+                  "optgroup",
+                  { key: label, attrs: { label: label } },
+                  _vm._l(subOptions, function(option) {
+                    return _c(
+                      "option",
+                      _vm._b(
+                        {
+                          key: option.id,
+                          domProps: {
+                            value: option.value,
+                            textContent: _vm._s(option.label)
+                          }
+                        },
+                        "option",
+                        option.attributes || {},
+                        false
+                      )
+                    )
+                  }),
+                  0
+                )
+              })
+        ],
+        2
+      )
+    ]
+  )
+};
+var __vue_staticRenderFns__$5 = [];
+__vue_render__$5._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$5 = undefined;
+  /* scoped */
+  var __vue_scope_id__$5 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$5 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$5 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInputSelect = normalizeComponent_1(
+    { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
+    __vue_inject_styles__$5,
+    __vue_script__$5,
+    __vue_scope_id__$5,
+    __vue_is_functional_template__$5,
+    __vue_module_identifier__$5,
+    undefined,
+    undefined
+  );
+ 
+//
+ 
+var script$6 = {
+  name: 'FormulateInputTextArea',
+  mixins: [FormulateInputMixin]
+};
+ 
+/* script */
+var __vue_script__$6 = script$6;
+ 
+/* template */
+var __vue_render__$6 = function() {
+  var _vm = this;
+  var _h = _vm.$createElement;
+  var _c = _vm._self._c || _h;
+  return _c(
+    "div",
+    {
+      staticClass: "formulate-input-element formulate-input-element--textarea"
+    },
+    [
+      _c(
+        "textarea",
+        _vm._b(
+          {
+            directives: [
+              {
+                name: "model",
+                rawName: "v-model",
+                value: _vm.context.model,
+                expression: "context.model"
+              }
+            ],
+            domProps: { value: _vm.context.model },
+            on: {
+              input: function($event) {
+                if ($event.target.composing) {
+                  return
+                }
+                _vm.$set(_vm.context, "model", $event.target.value);
+              }
+            }
+          },
+          "textarea",
+          _vm.attributes,
+          false
+        )
+      )
+    ]
+  )
+};
+var __vue_staticRenderFns__$6 = [];
+__vue_render__$6._withStripped = true;
+ 
+  /* style */
+  var __vue_inject_styles__$6 = undefined;
+  /* scoped */
+  var __vue_scope_id__$6 = undefined;
+  /* module identifier */
+  var __vue_module_identifier__$6 = undefined;
+  /* functional template */
+  var __vue_is_functional_template__$6 = false;
+  /* style inject */
+  
+  /* style inject SSR */
+  
+ 
+  
+  var FormulateInputTextArea = normalizeComponent_1(
+    { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
+    __vue_inject_styles__$6,
+    __vue_script__$6,
+    __vue_scope_id__$6,
+    __vue_is_functional_template__$6,
+    __vue_module_identifier__$6,
+    undefined,
+    undefined
+  );
+ 
+/**
+ * The base formulate library.
+ */
+var Formulate = function Formulate () {
+  this.defaults = {
+    components: {
+      FormulateForm: FormulateForm,
+      FormulateInput: FormulateInput,
+      FormulateInputBox: FormulateInputBox,
+      FormulateInputText: FormulateInputText,
+      FormulateInputGroup: FormulateInputGroup,
+      FormulateInputSelect: FormulateInputSelect,
+      FormulateInputTextArea: FormulateInputTextArea
+    },
+    library: library
+  };
+};
+ 
+/**
+ * Install vue formulate, and register it’s components.
+ */
+Formulate.prototype.install = function install (Vue, options) {
+  Vue.prototype.$formulate = this;
+  this.options = this.extend(this.defaults, options || {});
+  for (var componentName in this.options.components) {
+    Vue.component(componentName, this.options.components[componentName]);
+  }
+  Object.freeze(this);
+};
+ 
+/**
+ * Create a new object by copying properties of base and extendWith.
+ * @param {Object} base
+ * @param {Object} extendWith
+ */
+Formulate.prototype.extend = function extend (base, extendWith) {
+  var merged = {};
+  for (var key in base) {
+    if (extendWith.hasOwnProperty(key)) {
+      merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+        ? this.extend(base[key], extendWith[key])
+        : extendWith[key];
+    } else {
+      merged[key] = base[key];
+    }
+  }
+  for (var prop in extendWith) {
+    if (!merged.hasOwnProperty(prop)) {
+      merged[prop] = extendWith[prop];
+    }
+  }
+  return merged
+};
+ 
+/**
+ * Determine what "class" of input this element is given the "type".
+ * @param {string} type
+ */
+Formulate.prototype.classify = function classify (type) {
+  if (this.options.library.hasOwnProperty(type)) {
+    return this.options.library[type].classification
+  }
+  return 'unknown'
+};
+ 
+/**
+ * Determine what type of component to render given the "type".
+ * @param {string} type
+ */
+Formulate.prototype.component = function component (type) {
+  if (this.options.library.hasOwnProperty(type)) {
+    return this.options.library[type].component
+  }
+  return false
+};
+ 
+var Formulate$1 = new Formulate();
+ 
+export default Formulate$1;
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/dist/formulate.min.js.html b/coverage/lcov-report/vue-formulate/dist/formulate.min.js.html new file mode 100644 index 0000000..8cdc103 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/dist/formulate.min.js.html @@ -0,0 +1,4650 @@ + + + + Code coverage report for vue-formulate/dist/formulate.min.js + + + + + + + +
+
+

+ All files / vue-formulate/dist formulate.min.js +

+
+
+ 0% + Statements + 0/336 +
+
+ 0% + Branches + 0/254 +
+
+ 0% + Functions + 0/77 +
+
+ 0% + Lines + 0/328 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var Formulate = (function (exports, isPlainObject, nanoid) {
+  'use strict';
+ 
+  isPlainObject = isPlainObject && isPlainObject.hasOwnProperty('default') ? isPlainObject['default'] : isPlainObject;
+  nanoid = nanoid && nanoid.hasOwnProperty('default') ? nanoid['default'] : nanoid;
+ 
+  var library = {
+    // === SINGLE LINE TEXT STYLE INPUTS
+    text: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    email: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    number: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    color: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    date: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    hidden: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    month: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    password: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    range: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    search: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    tel: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    time: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    url: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    week: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    'datetime-local': {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+ 
+    // === MULTI LINE TEXT INPUTS
+    textarea: {
+      classification: 'textarea',
+      component: 'FormulateInputTextArea'
+    },
+ 
+    // === BOX STYLE INPUTS
+    checkbox: {
+      classification: 'box',
+      component: 'FormulateInputBox'
+    },
+    radio: {
+      classification: 'box',
+      component: 'FormulateInputBox'
+    },
+ 
+    // === BUTTON STYLE INPUTS
+    submit: {
+      classification: 'button',
+      component: 'FormulateInputButton'
+    },
+    button: {
+      classification: 'button',
+      component: 'FormulateInputButton'
+    },
+ 
+    // === SELECT STYLE INPUTS
+    select: {
+      classification: 'select',
+      component: 'FormulateInputSelect'
+    }
+  };
+ 
+  /**
+   * Function to map over an object.
+   * @param {Object} obj An object to map over
+   * @param {Function} callback
+   */
+  function map (original, callback) {
+    var obj = {};
+    for (var key in original) {
+      obj[key] = callback(key, original[key]);
+    }
+    return obj
+  }
+ 
+  /**
+   * Shallow equal.
+   * @param {} objA
+   * @param {*} objB
+   */
+  function shallowEqualObjects (objA, objB) {
+    if (objA === objB) {
+      return true
+    }
+    if (!objA || !objB) {
+      return false
+    }
+    var aKeys = Object.keys(objA);
+    var bKeys = Object.keys(objB);
+    var len = aKeys.length;
+ 
+    if (bKeys.length !== len) {
+      return false
+    }
+ 
+    for (var i = 0; i < len; i++) {
+      var key = aKeys[i];
+ 
+      if (objA[key] !== objB[key]) {
+        return false
+      }
+    }
+    return true
+  }
+ 
+  /**
+   * For a single instance of an input, export all of the context needed to fully
+   * render that element.
+   * @return {object}
+   */
+  var context = {
+    context: function context () {
+      if (this.debug) {
+        console.log(((this.type) + " re-context"));
+      }
+      return defineModel.call(this, Object.assign({}, {type: this.type,
+        value: this.value,
+        name: this.nameOrFallback,
+        classification: this.classification,
+        component: this.component,
+        id: this.id || this.defaultId,
+        label: this.label,
+        labelPosition: this.logicalLabelPosition,
+        attributes: this.elementAttributes},
+        this.typeContext))
+    },
+    nameOrFallback: nameOrFallback,
+    typeContext: typeContext,
+    elementAttributes: elementAttributes,
+    logicalLabelPosition: logicalLabelPosition,
+    isVmodeled: isVmodeled
+  };
+ 
+  /**
+   * Given (this.type), return an object to merge with the context
+   * @return {object}
+   * @return {object}
+   */
+  function typeContext () {
+    var this$1 = this;
+ 
+    switch (this.classification) {
+      case 'select':
+        return {
+          options: createOptionList.call(this, this.options),
+          optionGroups: this.optionGroups ? map(this.optionGroups, function (k, v) { return createOptionList.call(this$1, v); }) : false,
+          placeholder: this.$attrs.placeholder || false
+        }
+      case 'group':
+        if (this.options) {
+          return {
+            options: createOptionList.call(this, this.options)
+          }
+        }
+        break
+      default:
+        return {}
+    }
+  }
+ 
+  /**
+   * Reducer for attributes that will be applied to each core input element.
+   * @return {object}
+   */
+  function elementAttributes () {
+    var attrs = Object.assign({}, this.localAttributes);
+    if (this.id) {
+      attrs.id = this.id;
+    } else {
+      attrs.id = this.defaultId;
+    }
+    return attrs
+  }
+ 
+  /**
+   * Determine the a best-guess location for the label (before or after).
+   * @return {string} before|after
+   */
+  function logicalLabelPosition () {
+    if (this.labelPosition) {
+      return this.labelPosition
+    }
+    switch (this.classification) {
+      case 'box':
+        return 'after'
+      default:
+        return 'before'
+    }
+  }
+ 
+  /**
+   * Return the element’s name, or select a fallback.
+   */
+  function nameOrFallback () {
+    if (this.name === true) {
+      return ((this.type) + "_" + (this.elementAttributes.id))
+    }
+    if (this.name === false) {
+      return false
+    }
+    return this.name
+  }
+ 
+  /**
+   * Determines if this formulate element is v-modeled or not.
+   */
+  function isVmodeled () {
+    return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+      this._events &&
+      Array.isArray(this._events.input) &&
+      this._events.input.length)
+  }
+ 
+  /**
+   * Given an object or array of options, create an array of objects with label,
+   * value, and id.
+   * @param {array|object}
+   * @return {array}
+   */
+  function createOptionList (options) {
+    if (!Array.isArray(options) && options && typeof options === 'object') {
+      var optionList = [];
+      var that = this;
+      for (var value in options) {
+        optionList.push({ value: value, label: options[value], id: ((that.elementAttributes.id) + "_" + value) });
+      }
+      return optionList
+    } else if (Array.isArray(options) && !options.length) {
+      return [{ value: this.value, label: (this.label || this.name), id: this.context.id || nanoid(9) }]
+    }
+    return options
+  }
+ 
+  /**
+   * Defines the model used throughout the existing context.
+   * @param {object} context
+   */
+  function defineModel (context) {
+    return Object.defineProperty(context, 'model', {
+      get: modelGetter.bind(this),
+      set: modelSetter.bind(this)
+    })
+  }
+ 
+  /**
+   * Get the value from a model.
+   **/
+  function modelGetter () {
+    var model = this.isVmodeled ? 'formulateValue' : 'internalModelProxy';
+    if (this.type === 'checkbox' && !Array.isArray(this[model]) && this.options) {
+      return []
+    }
+    if (!this[model]) {
+      return ''
+    }
+    return this[model]
+  }
+ 
+  /**
+   * Set the value from a model.
+   **/
+  function modelSetter (value) {
+    this.internalModelProxy = value;
+    this.$emit('input', value);
+    if (this.context.name && typeof this.formulateFormSetter === 'function') {
+      this.formulateFormSetter(this.context.name, value);
+    }
+  }
+ 
+  //
+ 
+  var script = {
+    name: 'FormulateInput',
+    inheritAttrs: false,
+    inject: {
+      formulateFormSetter: { default: undefined },
+      formulateFormRegister: { default: undefined }
+    },
+    model: {
+      prop: 'formulateValue',
+      event: 'input'
+    },
+    props: {
+      type: {
+        type: String,
+        default: 'text'
+      },
+      name: {
+        type: [Boolean, String],
+        default: true
+      },
+      /* eslint-disable */
+      formulateValue: {
+        default: ''
+      },
+      value: {
+        default: false
+      },
+      /* eslint-enable */
+      options: {
+        type: [Object, Array, Boolean],
+        default: false
+      },
+      optionGroups: {
+        type: [Object, Boolean],
+        default: false
+      },
+      id: {
+        type: [String, Boolean, Number],
+        default: false
+      },
+      label: {
+        type: [String, Boolean],
+        default: false
+      },
+      labelPosition: {
+        type: [String, Boolean],
+        default: false
+      },
+      help: {
+        type: [String, Boolean],
+        default: false
+      },
+      debug: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data: function data () {
+      return {
+        defaultId: nanoid(9),
+        localAttributes: {},
+        internalModelProxy: this.formulateValue
+      }
+    },
+    computed: Object.assign({}, context,
+      {classification: function classification () {
+        var classification = this.$formulate.classify(this.type);
+        return (classification === 'box' && this.options) ? 'group' : classification
+      },
+      component: function component () {
+        return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+      }}),
+    watch: {
+      '$attrs': {
+        handler: function handler (value) {
+          this.updateLocalAttributes(value);
+        },
+        deep: true
+      },
+      internalModelProxy: function internalModelProxy (newValue, oldValue) {
+        if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+          this.context.model = newValue;
+        }
+      },
+      formulateValue: function formulateValue (newValue, oldValue) {
+        if (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+          this.context.model = newValue;
+        }
+      }
+    },
+    created: function created () {
+      if (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+        this.formulateFormRegister(this.nameOrFallback, this);
+      }
+      this.updateLocalAttributes(this.$attrs);
+    },
+    methods: {
+      updateLocalAttributes: function updateLocalAttributes (value) {
+        if (!shallowEqualObjects(value, this.localAttributes)) {
+          this.localAttributes = value;
+        }
+      }
+    }
+  };
+ 
+  function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
+  /* server only */
+  , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
+    if (typeof shadowMode !== 'boolean') {
+      createInjectorSSR = createInjector;
+      createInjector = shadowMode;
+      shadowMode = false;
+    } // Vue.extend constructor export interop.
+ 
+ 
+    var options = typeof script === 'function' ? script.options : script; // render functions
+ 
+    if (template && template.render) {
+      options.render = template.render;
+      options.staticRenderFns = template.staticRenderFns;
+      options._compiled = true; // functional template
+ 
+      if (isFunctionalTemplate) {
+        options.functional = true;
+      }
+    } // scopedId
+ 
+ 
+    if (scopeId) {
+      options._scopeId = scopeId;
+    }
+ 
+    var hook;
+ 
+    if (moduleIdentifier) {
+      // server build
+      hook = function hook(context) {
+        // 2.3 injection
+        context = context || // cached call
+        this.$vnode && this.$vnode.ssrContext || // stateful
+        this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
+        // 2.2 with runInNewContext: true
+ 
+        if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
+          context = __VUE_SSR_CONTEXT__;
+        } // inject component styles
+ 
+ 
+        if (style) {
+          style.call(this, createInjectorSSR(context));
+        } // register component module identifier for async chunk inference
+ 
+ 
+        if (context && context._registeredComponents) {
+          context._registeredComponents.add(moduleIdentifier);
+        }
+      }; // used by ssr in case component is cached and beforeCreate
+      // never gets called
+ 
+ 
+      options._ssrRegister = hook;
+    } else if (style) {
+      hook = shadowMode ? function () {
+        style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
+      } : function (context) {
+        style.call(this, createInjector(context));
+      };
+    }
+ 
+    if (hook) {
+      if (options.functional) {
+        // register for functional component in vue file
+        var originalRender = options.render;
+ 
+        options.render = function renderWithStyleInjection(h, context) {
+          hook.call(context);
+          return originalRender(h, context);
+        };
+      } else {
+        // inject component registration as beforeCreate hook
+        var existing = options.beforeCreate;
+        options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
+      }
+    }
+ 
+    return script;
+  }
+ 
+  var normalizeComponent_1 = normalizeComponent;
+ 
+  /* script */
+  var __vue_script__ = script;
+ 
+  /* template */
+  var __vue_render__ = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input",
+        attrs: {
+          "data-classification": _vm.classification,
+          "data-type": _vm.type
+        }
+      },
+      [
+        _c(
+          "div",
+          { staticClass: "formulate-input-wrapper" },
+          [
+            _vm.context.label && _vm.context.labelPosition === "before"
+              ? _vm._t(
+                  "label",
+                  [
+                    _c("label", {
+                      staticClass:
+                        "formulate-input-label formulate-input-label--before",
+                      attrs: { for: _vm.context.attributes.id },
+                      domProps: { textContent: _vm._s(_vm.context.label) }
+                    })
+                  ],
+                  null,
+                  _vm.context
+                )
+              : _vm._e(),
+            _vm._v(" "),
+            _vm._t(
+              "default",
+              [
+                _c(_vm.context.component, {
+                  tag: "component",
+                  attrs: { context: _vm.context }
+                })
+              ],
+              null,
+              _vm.context
+            ),
+            _vm._v(" "),
+            _vm.context.label && _vm.context.labelPosition === "after"
+              ? _vm._t(
+                  "label",
+                  [
+                    _c("label", {
+                      staticClass:
+                        "formulate-input-label formulate-input-label--after",
+                      attrs: { for: _vm.context.attributes.id },
+                      domProps: { textContent: _vm._s(_vm.context.label) }
+                    })
+                  ],
+                  null,
+                  _vm.context.label
+                )
+              : _vm._e()
+          ],
+          2
+        ),
+        _vm._v(" "),
+        _vm.help
+          ? _c("div", {
+              staticClass: "formulate-input-help",
+              domProps: { textContent: _vm._s(_vm.help) }
+            })
+          : _vm._e()
+      ]
+    )
+  };
+  var __vue_staticRenderFns__ = [];
+  __vue_render__._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__ = undefined;
+    /* scoped */
+    var __vue_scope_id__ = undefined;
+    /* module identifier */
+    var __vue_module_identifier__ = undefined;
+    /* functional template */
+    var __vue_is_functional_template__ = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInput = normalizeComponent_1(
+      { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
+      __vue_inject_styles__,
+      __vue_script__,
+      __vue_scope_id__,
+      __vue_is_functional_template__,
+      __vue_module_identifier__,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$1 = {
+    provide: function provide () {
+      return {
+        formulateFormSetter: this.setFieldValue,
+        formulateFormRegister: this.register
+      }
+    },
+    name: 'FormulateForm',
+    model: {
+      prop: 'formulateValue',
+      event: 'input'
+    },
+    props: {
+      name: {
+        type: [String, Boolean],
+        default: false
+      },
+      formulateValue: {
+        type: Object,
+        default: function () { return ({}); }
+      }
+    },
+    data: function data () {
+      return {
+        registry: {}
+      }
+    },
+    computed: {
+      formModel: {
+        get: function get () {
+          return this.formulateValue
+        },
+        set: function set (value) {
+          this.$emit('input', value);
+        }
+      },
+      hasFormulateValue: function hasFormulateValue () {
+        return this.formulateValue && typeof this.formulateValue === 'object'
+      },
+      isVmodeled: function isVmodeled () {
+        return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+          this._events &&
+          Array.isArray(this._events.input) &&
+          this._events.input.length)
+      }
+    },
+    watch: {
+      formulateValue: {
+        handler: function handler (newValue, oldValue) {
+          if (this.isVmodeled &&
+            newValue &&
+            typeof newValue === 'object'
+          ) {
+            for (var field in newValue) {
+              if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+                // If the value of the formulateValue changed (probably as a prop)
+                // and it doesn't match the internal proxied value of the registered
+                // component, we set it explicitly. Its important we check the
+                // model proxy here since the model itself is not fully synchronous.
+                this.registry[field].context.model = newValue[field];
+              }
+            }
+          }
+        },
+        deep: true
+      }
+    },
+    methods: {
+      setFieldValue: function setFieldValue (field, value) {
+        var obj;
+ 
+        this.formModel = Object.assign({}, this.formulateValue, ( obj = {}, obj[field] = value, obj ));
+      },
+      register: function register (field, component) {
+        this.registry[field] = component;
+        if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+          // In the case that the form is carrying an initial value and the
+          // element is not, set it directly.
+          component.context.model = this.formulateValue[field];
+        }
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$1 = script$1;
+ 
+  /* template */
+  var __vue_render__$1 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "form",
+      {
+        on: {
+          submit: function($event) {
+            $event.preventDefault();
+            return _vm.formSubmitted($event)
+          }
+        }
+      },
+      [_vm._t("default")],
+      2
+    )
+  };
+  var __vue_staticRenderFns__$1 = [];
+  __vue_render__$1._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$1 = undefined;
+    /* scoped */
+    var __vue_scope_id__$1 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$1 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$1 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateForm = normalizeComponent_1(
+      { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
+      __vue_inject_styles__$1,
+      __vue_script__$1,
+      __vue_scope_id__$1,
+      __vue_is_functional_template__$1,
+      __vue_module_identifier__$1,
+      undefined,
+      undefined
+    );
+ 
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+ 
+  function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
+  var script$2 = {
+    name: 'FormulateInputGroup',
+    props: {
+      context: {
+        type: Object,
+        required: true
+      }
+    },
+    computed: {
+      options: function options () {
+        return this.context.options || []
+      },
+      optionsWithContext: function optionsWithContext () {
+        var this$1 = this;
+ 
+        var ref = this.context;
+        var options = ref.options;
+        var labelPosition = ref.labelPosition;
+        var attributes = ref.attributes;
+        var classification = ref.classification;
+        var rest = objectWithoutProperties( ref, ["options", "labelPosition", "attributes", "classification"] );
+        var context = rest;
+        return this.options.map(function (option) { return this$1.groupItemContext(context, option); })
+      }
+    },
+    methods: {
+      groupItemContext: function groupItemContext () {
+        var args = [], len = arguments.length;
+        while ( len-- ) args[ len ] = arguments[ len ];
+ 
+        return Object.assign.apply(Object, [ {} ].concat( args, [{
+          component: 'FormulateInput'
+        }] ))
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$2 = script$2;
+ 
+  /* template */
+  var __vue_render__$2 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      { staticClass: "formulate-input-group" },
+      _vm._l(_vm.optionsWithContext, function(optionContext) {
+        return _c(
+          optionContext.component,
+          _vm._b(
+            {
+              key: optionContext.id,
+              tag: "component",
+              staticClass: "formulate-input-group-item",
+              model: {
+                value: _vm.context.model,
+                callback: function($$v) {
+                  _vm.$set(_vm.context, "model", $$v);
+                },
+                expression: "context.model"
+              }
+            },
+            "component",
+            optionContext,
+            false
+          )
+        )
+      }),
+      1
+    )
+  };
+  var __vue_staticRenderFns__$2 = [];
+  __vue_render__$2._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$2 = undefined;
+    /* scoped */
+    var __vue_scope_id__$2 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$2 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$2 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputGroup = normalizeComponent_1(
+      { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
+      __vue_inject_styles__$2,
+      __vue_script__$2,
+      __vue_scope_id__$2,
+      __vue_is_functional_template__$2,
+      __vue_module_identifier__$2,
+      undefined,
+      undefined
+    );
+ 
+  /**
+   * Default base for input components.
+   */
+  var FormulateInputMixin = {
+    props: {
+      context: {
+        type: Object,
+        required: true
+      }
+    },
+    computed: {
+      type: function type () {
+        return this.context.type
+      },
+      id: function id () {
+        return this.context.id
+      },
+      attributes: function attributes () {
+        return this.context.attributes || {}
+      },
+      hasValue: function hasValue () {
+        return !!this.context.model
+      }
+    }
+  };
+ 
+  //
+ 
+  var script$3 = {
+    name: 'FormulateInputBox',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$3 = script$3;
+ 
+  /* template */
+  var __vue_render__$3 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--box",
+        attrs: { "data-type": _vm.context.type }
+      },
+      [
+        _vm.type === "checkbox"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "checkbox" },
+                  domProps: {
+                    value: _vm.context.value,
+                    checked: Array.isArray(_vm.context.model)
+                      ? _vm._i(_vm.context.model, _vm.context.value) > -1
+                      : _vm.context.model
+                  },
+                  on: {
+                    change: function($event) {
+                      var $$a = _vm.context.model,
+                        $$el = $event.target,
+                        $$c = $$el.checked ? true : false;
+                      if (Array.isArray($$a)) {
+                        var $$v = _vm.context.value,
+                          $$i = _vm._i($$a, $$v);
+                        if ($$el.checked) {
+                          $$i < 0 &&
+                            _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                        } else {
+                          $$i > -1 &&
+                            _vm.$set(
+                              _vm.context,
+                              "model",
+                              $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                            );
+                        }
+                      } else {
+                        _vm.$set(_vm.context, "model", $$c);
+                      }
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _vm.type === "radio"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "radio" },
+                  domProps: {
+                    value: _vm.context.value,
+                    checked: _vm._q(_vm.context.model, _vm.context.value)
+                  },
+                  on: {
+                    change: function($event) {
+                      return _vm.$set(_vm.context, "model", _vm.context.value)
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: _vm.type },
+                  domProps: {
+                    value: _vm.context.value,
+                    value: _vm.context.model
+                  },
+                  on: {
+                    input: function($event) {
+                      if ($event.target.composing) {
+                        return
+                      }
+                      _vm.$set(_vm.context, "model", $event.target.value);
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            ),
+        _vm._v(" "),
+        _c("label", {
+          staticClass: "formulate-input-element-decorator",
+          attrs: { for: _vm.id }
+        })
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$3 = [];
+  __vue_render__$3._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$3 = undefined;
+    /* scoped */
+    var __vue_scope_id__$3 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$3 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$3 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputBox = normalizeComponent_1(
+      { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
+      __vue_inject_styles__$3,
+      __vue_script__$3,
+      __vue_scope_id__$3,
+      __vue_is_functional_template__$3,
+      __vue_module_identifier__$3,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$4 = {
+    name: 'FormulateInputText',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$4 = script$4;
+ 
+  /* template */
+  var __vue_render__$4 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--textarea"
+      },
+      [
+        _vm.type === "checkbox"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "checkbox" },
+                  domProps: {
+                    checked: Array.isArray(_vm.context.model)
+                      ? _vm._i(_vm.context.model, null) > -1
+                      : _vm.context.model
+                  },
+                  on: {
+                    change: function($event) {
+                      var $$a = _vm.context.model,
+                        $$el = $event.target,
+                        $$c = $$el.checked ? true : false;
+                      if (Array.isArray($$a)) {
+                        var $$v = null,
+                          $$i = _vm._i($$a, $$v);
+                        if ($$el.checked) {
+                          $$i < 0 &&
+                            _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                        } else {
+                          $$i > -1 &&
+                            _vm.$set(
+                              _vm.context,
+                              "model",
+                              $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                            );
+                        }
+                      } else {
+                        _vm.$set(_vm.context, "model", $$c);
+                      }
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _vm.type === "radio"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "radio" },
+                  domProps: { checked: _vm._q(_vm.context.model, null) },
+                  on: {
+                    change: function($event) {
+                      return _vm.$set(_vm.context, "model", null)
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: _vm.type },
+                  domProps: { value: _vm.context.model },
+                  on: {
+                    input: function($event) {
+                      if ($event.target.composing) {
+                        return
+                      }
+                      _vm.$set(_vm.context, "model", $event.target.value);
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$4 = [];
+  __vue_render__$4._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$4 = undefined;
+    /* scoped */
+    var __vue_scope_id__$4 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$4 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$4 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputText = normalizeComponent_1(
+      { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
+      __vue_inject_styles__$4,
+      __vue_script__$4,
+      __vue_scope_id__$4,
+      __vue_is_functional_template__$4,
+      __vue_module_identifier__$4,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$5 = {
+    name: 'FormulateInputSelect',
+    mixins: [FormulateInputMixin],
+    computed: {
+      options: function options () {
+        return this.context.options || {}
+      },
+      optionGroups: function optionGroups () {
+        return this.context.optionGroups || false
+      },
+      placeholderSelected: function placeholderSelected () {
+        return !!(!this.hasValue && this.context.attributes && this.context.attributes.placeholder)
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$5 = script$5;
+ 
+  /* template */
+  var __vue_render__$5 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      { staticClass: "formulate-input-element formulate-input-element--select" },
+      [
+        _c(
+          "select",
+          _vm._b(
+            {
+              directives: [
+                {
+                  name: "model",
+                  rawName: "v-model",
+                  value: _vm.context.model,
+                  expression: "context.model"
+                }
+              ],
+              attrs: { "data-placeholder-selected": _vm.placeholderSelected },
+              on: {
+                change: function($event) {
+                  var $$selectedVal = Array.prototype.filter
+                    .call($event.target.options, function(o) {
+                      return o.selected
+                    })
+                    .map(function(o) {
+                      var val = "_value" in o ? o._value : o.value;
+                      return val
+                    });
+                  _vm.$set(
+                    _vm.context,
+                    "model",
+                    $event.target.multiple ? $$selectedVal : $$selectedVal[0]
+                  );
+                }
+              }
+            },
+            "select",
+            _vm.attributes,
+            false
+          ),
+          [
+            _vm.context.placeholder
+              ? _c(
+                  "option",
+                  {
+                    attrs: { value: "", disabled: "" },
+                    domProps: { selected: !_vm.hasValue }
+                  },
+                  [
+                    _vm._v(
+                      "\n      " + _vm._s(_vm.context.placeholder) + "\n    "
+                    )
+                  ]
+                )
+              : _vm._e(),
+            _vm._v(" "),
+            !_vm.optionGroups
+              ? _vm._l(_vm.options, function(option) {
+                  return _c(
+                    "option",
+                    _vm._b(
+                      {
+                        key: option.id,
+                        domProps: {
+                          value: option.value,
+                          textContent: _vm._s(option.label)
+                        }
+                      },
+                      "option",
+                      option.attributes || {},
+                      false
+                    )
+                  )
+                })
+              : _vm._l(_vm.optionGroups, function(subOptions, label) {
+                  return _c(
+                    "optgroup",
+                    { key: label, attrs: { label: label } },
+                    _vm._l(subOptions, function(option) {
+                      return _c(
+                        "option",
+                        _vm._b(
+                          {
+                            key: option.id,
+                            domProps: {
+                              value: option.value,
+                              textContent: _vm._s(option.label)
+                            }
+                          },
+                          "option",
+                          option.attributes || {},
+                          false
+                        )
+                      )
+                    }),
+                    0
+                  )
+                })
+          ],
+          2
+        )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$5 = [];
+  __vue_render__$5._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$5 = undefined;
+    /* scoped */
+    var __vue_scope_id__$5 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$5 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$5 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputSelect = normalizeComponent_1(
+      { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
+      __vue_inject_styles__$5,
+      __vue_script__$5,
+      __vue_scope_id__$5,
+      __vue_is_functional_template__$5,
+      __vue_module_identifier__$5,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$6 = {
+    name: 'FormulateInputTextArea',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$6 = script$6;
+ 
+  /* template */
+  var __vue_render__$6 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--textarea"
+      },
+      [
+        _c(
+          "textarea",
+          _vm._b(
+            {
+              directives: [
+                {
+                  name: "model",
+                  rawName: "v-model",
+                  value: _vm.context.model,
+                  expression: "context.model"
+                }
+              ],
+              domProps: { value: _vm.context.model },
+              on: {
+                input: function($event) {
+                  if ($event.target.composing) {
+                    return
+                  }
+                  _vm.$set(_vm.context, "model", $event.target.value);
+                }
+              }
+            },
+            "textarea",
+            _vm.attributes,
+            false
+          )
+        )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$6 = [];
+  __vue_render__$6._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$6 = undefined;
+    /* scoped */
+    var __vue_scope_id__$6 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$6 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$6 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputTextArea = normalizeComponent_1(
+      { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
+      __vue_inject_styles__$6,
+      __vue_script__$6,
+      __vue_scope_id__$6,
+      __vue_is_functional_template__$6,
+      __vue_module_identifier__$6,
+      undefined,
+      undefined
+    );
+ 
+  /**
+   * The base formulate library.
+   */
+  var Formulate = function Formulate () {
+    this.defaults = {
+      components: {
+        FormulateForm: FormulateForm,
+        FormulateInput: FormulateInput,
+        FormulateInputBox: FormulateInputBox,
+        FormulateInputText: FormulateInputText,
+        FormulateInputGroup: FormulateInputGroup,
+        FormulateInputSelect: FormulateInputSelect,
+        FormulateInputTextArea: FormulateInputTextArea
+      },
+      library: library
+    };
+  };
+ 
+  /**
+   * Install vue formulate, and register it’s components.
+   */
+  Formulate.prototype.install = function install (Vue, options) {
+    Vue.prototype.$formulate = this;
+    this.options = this.extend(this.defaults, options || {});
+    for (var componentName in this.options.components) {
+      Vue.component(componentName, this.options.components[componentName]);
+    }
+    Object.freeze(this);
+  };
+ 
+  /**
+   * Create a new object by copying properties of base and extendWith.
+   * @param {Object} base
+   * @param {Object} extendWith
+   */
+  Formulate.prototype.extend = function extend (base, extendWith) {
+    var merged = {};
+    for (var key in base) {
+      if (extendWith.hasOwnProperty(key)) {
+        merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+          ? this.extend(base[key], extendWith[key])
+          : extendWith[key];
+      } else {
+        merged[key] = base[key];
+      }
+    }
+    for (var prop in extendWith) {
+      if (!merged.hasOwnProperty(prop)) {
+        merged[prop] = extendWith[prop];
+      }
+    }
+    return merged
+  };
+ 
+  /**
+   * Determine what "class" of input this element is given the "type".
+   * @param {string} type
+   */
+  Formulate.prototype.classify = function classify (type) {
+    if (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].classification
+    }
+    return 'unknown'
+  };
+ 
+  /**
+   * Determine what type of component to render given the "type".
+   * @param {string} type
+   */
+  Formulate.prototype.component = function component (type) {
+    if (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].component
+    }
+    return false
+  };
+ 
+  var Formulate$1 = new Formulate();
+ 
+  exports.default = Formulate$1;
+ 
+  return exports;
+ 
+}({}, isPlainObject, nanoid));
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/dist/formulate.umd.js.html b/coverage/lcov-report/vue-formulate/dist/formulate.umd.js.html new file mode 100644 index 0000000..6003d0b --- /dev/null +++ b/coverage/lcov-report/vue-formulate/dist/formulate.umd.js.html @@ -0,0 +1,4659 @@ + + + + Code coverage report for vue-formulate/dist/formulate.umd.js + + + + + + + +
+
+

+ All files / vue-formulate/dist formulate.umd.js +

+
+
+ 0% + Statements + 0/337 +
+
+ 0% + Branches + 0/264 +
+
+ 0% + Functions + 0/78 +
+
+ 0% + Lines + 0/329 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('is-plain-object'), require('nanoid')) :
+  typeof define === 'function' && define.amd ? define(['exports', 'is-plain-object', 'nanoid'], factory) :
+  (global = global || self, factory(global.Formulate = {}, global.isPlainObject, global.nanoid));
+}(this, function (exports, isPlainObject, nanoid) { 'use strict';
+ 
+  isPlainObject = isPlainObject && isPlainObject.hasOwnProperty('default') ? isPlainObject['default'] : isPlainObject;
+  nanoid = nanoid && nanoid.hasOwnProperty('default') ? nanoid['default'] : nanoid;
+ 
+  var library = {
+    // === SINGLE LINE TEXT STYLE INPUTS
+    text: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    email: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    number: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    color: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    date: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    hidden: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    month: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    password: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    range: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    search: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    tel: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    time: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    url: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    week: {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+    'datetime-local': {
+      classification: 'text',
+      component: 'FormulateInputText'
+    },
+ 
+    // === MULTI LINE TEXT INPUTS
+    textarea: {
+      classification: 'textarea',
+      component: 'FormulateInputTextArea'
+    },
+ 
+    // === BOX STYLE INPUTS
+    checkbox: {
+      classification: 'box',
+      component: 'FormulateInputBox'
+    },
+    radio: {
+      classification: 'box',
+      component: 'FormulateInputBox'
+    },
+ 
+    // === BUTTON STYLE INPUTS
+    submit: {
+      classification: 'button',
+      component: 'FormulateInputButton'
+    },
+    button: {
+      classification: 'button',
+      component: 'FormulateInputButton'
+    },
+ 
+    // === SELECT STYLE INPUTS
+    select: {
+      classification: 'select',
+      component: 'FormulateInputSelect'
+    }
+  };
+ 
+  /**
+   * Function to map over an object.
+   * @param {Object} obj An object to map over
+   * @param {Function} callback
+   */
+  function map (original, callback) {
+    var obj = {};
+    for (var key in original) {
+      obj[key] = callback(key, original[key]);
+    }
+    return obj
+  }
+ 
+  /**
+   * Shallow equal.
+   * @param {} objA
+   * @param {*} objB
+   */
+  function shallowEqualObjects (objA, objB) {
+    if (objA === objB) {
+      return true
+    }
+    if (!objA || !objB) {
+      return false
+    }
+    var aKeys = Object.keys(objA);
+    var bKeys = Object.keys(objB);
+    var len = aKeys.length;
+ 
+    if (bKeys.length !== len) {
+      return false
+    }
+ 
+    for (var i = 0; i < len; i++) {
+      var key = aKeys[i];
+ 
+      if (objA[key] !== objB[key]) {
+        return false
+      }
+    }
+    return true
+  }
+ 
+  /**
+   * For a single instance of an input, export all of the context needed to fully
+   * render that element.
+   * @return {object}
+   */
+  var context = {
+    context: function context () {
+      if (this.debug) {
+        console.log(((this.type) + " re-context"));
+      }
+      return defineModel.call(this, Object.assign({}, {type: this.type,
+        value: this.value,
+        name: this.nameOrFallback,
+        classification: this.classification,
+        component: this.component,
+        id: this.id || this.defaultId,
+        label: this.label,
+        labelPosition: this.logicalLabelPosition,
+        attributes: this.elementAttributes},
+        this.typeContext))
+    },
+    nameOrFallback: nameOrFallback,
+    typeContext: typeContext,
+    elementAttributes: elementAttributes,
+    logicalLabelPosition: logicalLabelPosition,
+    isVmodeled: isVmodeled
+  };
+ 
+  /**
+   * Given (this.type), return an object to merge with the context
+   * @return {object}
+   * @return {object}
+   */
+  function typeContext () {
+    var this$1 = this;
+ 
+    switch (this.classification) {
+      case 'select':
+        return {
+          options: createOptionList.call(this, this.options),
+          optionGroups: this.optionGroups ? map(this.optionGroups, function (k, v) { return createOptionList.call(this$1, v); }) : false,
+          placeholder: this.$attrs.placeholder || false
+        }
+      case 'group':
+        if (this.options) {
+          return {
+            options: createOptionList.call(this, this.options)
+          }
+        }
+        break
+      default:
+        return {}
+    }
+  }
+ 
+  /**
+   * Reducer for attributes that will be applied to each core input element.
+   * @return {object}
+   */
+  function elementAttributes () {
+    var attrs = Object.assign({}, this.localAttributes);
+    if (this.id) {
+      attrs.id = this.id;
+    } else {
+      attrs.id = this.defaultId;
+    }
+    return attrs
+  }
+ 
+  /**
+   * Determine the a best-guess location for the label (before or after).
+   * @return {string} before|after
+   */
+  function logicalLabelPosition () {
+    if (this.labelPosition) {
+      return this.labelPosition
+    }
+    switch (this.classification) {
+      case 'box':
+        return 'after'
+      default:
+        return 'before'
+    }
+  }
+ 
+  /**
+   * Return the element’s name, or select a fallback.
+   */
+  function nameOrFallback () {
+    if (this.name === true) {
+      return ((this.type) + "_" + (this.elementAttributes.id))
+    }
+    if (this.name === false) {
+      return false
+    }
+    return this.name
+  }
+ 
+  /**
+   * Determines if this formulate element is v-modeled or not.
+   */
+  function isVmodeled () {
+    return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+      this._events &&
+      Array.isArray(this._events.input) &&
+      this._events.input.length)
+  }
+ 
+  /**
+   * Given an object or array of options, create an array of objects with label,
+   * value, and id.
+   * @param {array|object}
+   * @return {array}
+   */
+  function createOptionList (options) {
+    if (!Array.isArray(options) && options && typeof options === 'object') {
+      var optionList = [];
+      var that = this;
+      for (var value in options) {
+        optionList.push({ value: value, label: options[value], id: ((that.elementAttributes.id) + "_" + value) });
+      }
+      return optionList
+    } else if (Array.isArray(options) && !options.length) {
+      return [{ value: this.value, label: (this.label || this.name), id: this.context.id || nanoid(9) }]
+    }
+    return options
+  }
+ 
+  /**
+   * Defines the model used throughout the existing context.
+   * @param {object} context
+   */
+  function defineModel (context) {
+    return Object.defineProperty(context, 'model', {
+      get: modelGetter.bind(this),
+      set: modelSetter.bind(this)
+    })
+  }
+ 
+  /**
+   * Get the value from a model.
+   **/
+  function modelGetter () {
+    var model = this.isVmodeled ? 'formulateValue' : 'internalModelProxy';
+    if (this.type === 'checkbox' && !Array.isArray(this[model]) && this.options) {
+      return []
+    }
+    if (!this[model]) {
+      return ''
+    }
+    return this[model]
+  }
+ 
+  /**
+   * Set the value from a model.
+   **/
+  function modelSetter (value) {
+    this.internalModelProxy = value;
+    this.$emit('input', value);
+    if (this.context.name && typeof this.formulateFormSetter === 'function') {
+      this.formulateFormSetter(this.context.name, value);
+    }
+  }
+ 
+  //
+ 
+  var script = {
+    name: 'FormulateInput',
+    inheritAttrs: false,
+    inject: {
+      formulateFormSetter: { default: undefined },
+      formulateFormRegister: { default: undefined }
+    },
+    model: {
+      prop: 'formulateValue',
+      event: 'input'
+    },
+    props: {
+      type: {
+        type: String,
+        default: 'text'
+      },
+      name: {
+        type: [Boolean, String],
+        default: true
+      },
+      /* eslint-disable */
+      formulateValue: {
+        default: ''
+      },
+      value: {
+        default: false
+      },
+      /* eslint-enable */
+      options: {
+        type: [Object, Array, Boolean],
+        default: false
+      },
+      optionGroups: {
+        type: [Object, Boolean],
+        default: false
+      },
+      id: {
+        type: [String, Boolean, Number],
+        default: false
+      },
+      label: {
+        type: [String, Boolean],
+        default: false
+      },
+      labelPosition: {
+        type: [String, Boolean],
+        default: false
+      },
+      help: {
+        type: [String, Boolean],
+        default: false
+      },
+      debug: {
+        type: Boolean,
+        default: false
+      }
+    },
+    data: function data () {
+      return {
+        defaultId: nanoid(9),
+        localAttributes: {},
+        internalModelProxy: this.formulateValue
+      }
+    },
+    computed: Object.assign({}, context,
+      {classification: function classification () {
+        var classification = this.$formulate.classify(this.type);
+        return (classification === 'box' && this.options) ? 'group' : classification
+      },
+      component: function component () {
+        return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+      }}),
+    watch: {
+      '$attrs': {
+        handler: function handler (value) {
+          this.updateLocalAttributes(value);
+        },
+        deep: true
+      },
+      internalModelProxy: function internalModelProxy (newValue, oldValue) {
+        if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+          this.context.model = newValue;
+        }
+      },
+      formulateValue: function formulateValue (newValue, oldValue) {
+        if (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+          this.context.model = newValue;
+        }
+      }
+    },
+    created: function created () {
+      if (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+        this.formulateFormRegister(this.nameOrFallback, this);
+      }
+      this.updateLocalAttributes(this.$attrs);
+    },
+    methods: {
+      updateLocalAttributes: function updateLocalAttributes (value) {
+        if (!shallowEqualObjects(value, this.localAttributes)) {
+          this.localAttributes = value;
+        }
+      }
+    }
+  };
+ 
+  function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier
+  /* server only */
+  , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
+    if (typeof shadowMode !== 'boolean') {
+      createInjectorSSR = createInjector;
+      createInjector = shadowMode;
+      shadowMode = false;
+    } // Vue.extend constructor export interop.
+ 
+ 
+    var options = typeof script === 'function' ? script.options : script; // render functions
+ 
+    if (template && template.render) {
+      options.render = template.render;
+      options.staticRenderFns = template.staticRenderFns;
+      options._compiled = true; // functional template
+ 
+      if (isFunctionalTemplate) {
+        options.functional = true;
+      }
+    } // scopedId
+ 
+ 
+    if (scopeId) {
+      options._scopeId = scopeId;
+    }
+ 
+    var hook;
+ 
+    if (moduleIdentifier) {
+      // server build
+      hook = function hook(context) {
+        // 2.3 injection
+        context = context || // cached call
+        this.$vnode && this.$vnode.ssrContext || // stateful
+        this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional
+        // 2.2 with runInNewContext: true
+ 
+        if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
+          context = __VUE_SSR_CONTEXT__;
+        } // inject component styles
+ 
+ 
+        if (style) {
+          style.call(this, createInjectorSSR(context));
+        } // register component module identifier for async chunk inference
+ 
+ 
+        if (context && context._registeredComponents) {
+          context._registeredComponents.add(moduleIdentifier);
+        }
+      }; // used by ssr in case component is cached and beforeCreate
+      // never gets called
+ 
+ 
+      options._ssrRegister = hook;
+    } else if (style) {
+      hook = shadowMode ? function () {
+        style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
+      } : function (context) {
+        style.call(this, createInjector(context));
+      };
+    }
+ 
+    if (hook) {
+      if (options.functional) {
+        // register for functional component in vue file
+        var originalRender = options.render;
+ 
+        options.render = function renderWithStyleInjection(h, context) {
+          hook.call(context);
+          return originalRender(h, context);
+        };
+      } else {
+        // inject component registration as beforeCreate hook
+        var existing = options.beforeCreate;
+        options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
+      }
+    }
+ 
+    return script;
+  }
+ 
+  var normalizeComponent_1 = normalizeComponent;
+ 
+  /* script */
+  var __vue_script__ = script;
+ 
+  /* template */
+  var __vue_render__ = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input",
+        attrs: {
+          "data-classification": _vm.classification,
+          "data-type": _vm.type
+        }
+      },
+      [
+        _c(
+          "div",
+          { staticClass: "formulate-input-wrapper" },
+          [
+            _vm.context.label && _vm.context.labelPosition === "before"
+              ? _vm._t(
+                  "label",
+                  [
+                    _c("label", {
+                      staticClass:
+                        "formulate-input-label formulate-input-label--before",
+                      attrs: { for: _vm.context.attributes.id },
+                      domProps: { textContent: _vm._s(_vm.context.label) }
+                    })
+                  ],
+                  null,
+                  _vm.context
+                )
+              : _vm._e(),
+            _vm._v(" "),
+            _vm._t(
+              "default",
+              [
+                _c(_vm.context.component, {
+                  tag: "component",
+                  attrs: { context: _vm.context }
+                })
+              ],
+              null,
+              _vm.context
+            ),
+            _vm._v(" "),
+            _vm.context.label && _vm.context.labelPosition === "after"
+              ? _vm._t(
+                  "label",
+                  [
+                    _c("label", {
+                      staticClass:
+                        "formulate-input-label formulate-input-label--after",
+                      attrs: { for: _vm.context.attributes.id },
+                      domProps: { textContent: _vm._s(_vm.context.label) }
+                    })
+                  ],
+                  null,
+                  _vm.context.label
+                )
+              : _vm._e()
+          ],
+          2
+        ),
+        _vm._v(" "),
+        _vm.help
+          ? _c("div", {
+              staticClass: "formulate-input-help",
+              domProps: { textContent: _vm._s(_vm.help) }
+            })
+          : _vm._e()
+      ]
+    )
+  };
+  var __vue_staticRenderFns__ = [];
+  __vue_render__._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__ = undefined;
+    /* scoped */
+    var __vue_scope_id__ = undefined;
+    /* module identifier */
+    var __vue_module_identifier__ = undefined;
+    /* functional template */
+    var __vue_is_functional_template__ = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInput = normalizeComponent_1(
+      { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
+      __vue_inject_styles__,
+      __vue_script__,
+      __vue_scope_id__,
+      __vue_is_functional_template__,
+      __vue_module_identifier__,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$1 = {
+    provide: function provide () {
+      return {
+        formulateFormSetter: this.setFieldValue,
+        formulateFormRegister: this.register
+      }
+    },
+    name: 'FormulateForm',
+    model: {
+      prop: 'formulateValue',
+      event: 'input'
+    },
+    props: {
+      name: {
+        type: [String, Boolean],
+        default: false
+      },
+      formulateValue: {
+        type: Object,
+        default: function () { return ({}); }
+      }
+    },
+    data: function data () {
+      return {
+        registry: {}
+      }
+    },
+    computed: {
+      formModel: {
+        get: function get () {
+          return this.formulateValue
+        },
+        set: function set (value) {
+          this.$emit('input', value);
+        }
+      },
+      hasFormulateValue: function hasFormulateValue () {
+        return this.formulateValue && typeof this.formulateValue === 'object'
+      },
+      isVmodeled: function isVmodeled () {
+        return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+          this._events &&
+          Array.isArray(this._events.input) &&
+          this._events.input.length)
+      }
+    },
+    watch: {
+      formulateValue: {
+        handler: function handler (newValue, oldValue) {
+          if (this.isVmodeled &&
+            newValue &&
+            typeof newValue === 'object'
+          ) {
+            for (var field in newValue) {
+              if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+                // If the value of the formulateValue changed (probably as a prop)
+                // and it doesn't match the internal proxied value of the registered
+                // component, we set it explicitly. Its important we check the
+                // model proxy here since the model itself is not fully synchronous.
+                this.registry[field].context.model = newValue[field];
+              }
+            }
+          }
+        },
+        deep: true
+      }
+    },
+    methods: {
+      setFieldValue: function setFieldValue (field, value) {
+        var obj;
+ 
+        this.formModel = Object.assign({}, this.formulateValue, ( obj = {}, obj[field] = value, obj ));
+      },
+      register: function register (field, component) {
+        this.registry[field] = component;
+        if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+          // In the case that the form is carrying an initial value and the
+          // element is not, set it directly.
+          component.context.model = this.formulateValue[field];
+        }
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$1 = script$1;
+ 
+  /* template */
+  var __vue_render__$1 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "form",
+      {
+        on: {
+          submit: function($event) {
+            $event.preventDefault();
+            return _vm.formSubmitted($event)
+          }
+        }
+      },
+      [_vm._t("default")],
+      2
+    )
+  };
+  var __vue_staticRenderFns__$1 = [];
+  __vue_render__$1._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$1 = undefined;
+    /* scoped */
+    var __vue_scope_id__$1 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$1 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$1 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateForm = normalizeComponent_1(
+      { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
+      __vue_inject_styles__$1,
+      __vue_script__$1,
+      __vue_scope_id__$1,
+      __vue_is_functional_template__$1,
+      __vue_module_identifier__$1,
+      undefined,
+      undefined
+    );
+ 
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+  //
+ 
+  function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
+  var script$2 = {
+    name: 'FormulateInputGroup',
+    props: {
+      context: {
+        type: Object,
+        required: true
+      }
+    },
+    computed: {
+      options: function options () {
+        return this.context.options || []
+      },
+      optionsWithContext: function optionsWithContext () {
+        var this$1 = this;
+ 
+        var ref = this.context;
+        var options = ref.options;
+        var labelPosition = ref.labelPosition;
+        var attributes = ref.attributes;
+        var classification = ref.classification;
+        var rest = objectWithoutProperties( ref, ["options", "labelPosition", "attributes", "classification"] );
+        var context = rest;
+        return this.options.map(function (option) { return this$1.groupItemContext(context, option); })
+      }
+    },
+    methods: {
+      groupItemContext: function groupItemContext () {
+        var args = [], len = arguments.length;
+        while ( len-- ) args[ len ] = arguments[ len ];
+ 
+        return Object.assign.apply(Object, [ {} ].concat( args, [{
+          component: 'FormulateInput'
+        }] ))
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$2 = script$2;
+ 
+  /* template */
+  var __vue_render__$2 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      { staticClass: "formulate-input-group" },
+      _vm._l(_vm.optionsWithContext, function(optionContext) {
+        return _c(
+          optionContext.component,
+          _vm._b(
+            {
+              key: optionContext.id,
+              tag: "component",
+              staticClass: "formulate-input-group-item",
+              model: {
+                value: _vm.context.model,
+                callback: function($$v) {
+                  _vm.$set(_vm.context, "model", $$v);
+                },
+                expression: "context.model"
+              }
+            },
+            "component",
+            optionContext,
+            false
+          )
+        )
+      }),
+      1
+    )
+  };
+  var __vue_staticRenderFns__$2 = [];
+  __vue_render__$2._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$2 = undefined;
+    /* scoped */
+    var __vue_scope_id__$2 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$2 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$2 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputGroup = normalizeComponent_1(
+      { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
+      __vue_inject_styles__$2,
+      __vue_script__$2,
+      __vue_scope_id__$2,
+      __vue_is_functional_template__$2,
+      __vue_module_identifier__$2,
+      undefined,
+      undefined
+    );
+ 
+  /**
+   * Default base for input components.
+   */
+  var FormulateInputMixin = {
+    props: {
+      context: {
+        type: Object,
+        required: true
+      }
+    },
+    computed: {
+      type: function type () {
+        return this.context.type
+      },
+      id: function id () {
+        return this.context.id
+      },
+      attributes: function attributes () {
+        return this.context.attributes || {}
+      },
+      hasValue: function hasValue () {
+        return !!this.context.model
+      }
+    }
+  };
+ 
+  //
+ 
+  var script$3 = {
+    name: 'FormulateInputBox',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$3 = script$3;
+ 
+  /* template */
+  var __vue_render__$3 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--box",
+        attrs: { "data-type": _vm.context.type }
+      },
+      [
+        _vm.type === "checkbox"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "checkbox" },
+                  domProps: {
+                    value: _vm.context.value,
+                    checked: Array.isArray(_vm.context.model)
+                      ? _vm._i(_vm.context.model, _vm.context.value) > -1
+                      : _vm.context.model
+                  },
+                  on: {
+                    change: function($event) {
+                      var $$a = _vm.context.model,
+                        $$el = $event.target,
+                        $$c = $$el.checked ? true : false;
+                      if (Array.isArray($$a)) {
+                        var $$v = _vm.context.value,
+                          $$i = _vm._i($$a, $$v);
+                        if ($$el.checked) {
+                          $$i < 0 &&
+                            _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                        } else {
+                          $$i > -1 &&
+                            _vm.$set(
+                              _vm.context,
+                              "model",
+                              $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                            );
+                        }
+                      } else {
+                        _vm.$set(_vm.context, "model", $$c);
+                      }
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _vm.type === "radio"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "radio" },
+                  domProps: {
+                    value: _vm.context.value,
+                    checked: _vm._q(_vm.context.model, _vm.context.value)
+                  },
+                  on: {
+                    change: function($event) {
+                      return _vm.$set(_vm.context, "model", _vm.context.value)
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: _vm.type },
+                  domProps: {
+                    value: _vm.context.value,
+                    value: _vm.context.model
+                  },
+                  on: {
+                    input: function($event) {
+                      if ($event.target.composing) {
+                        return
+                      }
+                      _vm.$set(_vm.context, "model", $event.target.value);
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            ),
+        _vm._v(" "),
+        _c("label", {
+          staticClass: "formulate-input-element-decorator",
+          attrs: { for: _vm.id }
+        })
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$3 = [];
+  __vue_render__$3._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$3 = undefined;
+    /* scoped */
+    var __vue_scope_id__$3 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$3 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$3 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputBox = normalizeComponent_1(
+      { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
+      __vue_inject_styles__$3,
+      __vue_script__$3,
+      __vue_scope_id__$3,
+      __vue_is_functional_template__$3,
+      __vue_module_identifier__$3,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$4 = {
+    name: 'FormulateInputText',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$4 = script$4;
+ 
+  /* template */
+  var __vue_render__$4 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--textarea"
+      },
+      [
+        _vm.type === "checkbox"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "checkbox" },
+                  domProps: {
+                    checked: Array.isArray(_vm.context.model)
+                      ? _vm._i(_vm.context.model, null) > -1
+                      : _vm.context.model
+                  },
+                  on: {
+                    change: function($event) {
+                      var $$a = _vm.context.model,
+                        $$el = $event.target,
+                        $$c = $$el.checked ? true : false;
+                      if (Array.isArray($$a)) {
+                        var $$v = null,
+                          $$i = _vm._i($$a, $$v);
+                        if ($$el.checked) {
+                          $$i < 0 &&
+                            _vm.$set(_vm.context, "model", $$a.concat([$$v]));
+                        } else {
+                          $$i > -1 &&
+                            _vm.$set(
+                              _vm.context,
+                              "model",
+                              $$a.slice(0, $$i).concat($$a.slice($$i + 1))
+                            );
+                        }
+                      } else {
+                        _vm.$set(_vm.context, "model", $$c);
+                      }
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _vm.type === "radio"
+          ? _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: "radio" },
+                  domProps: { checked: _vm._q(_vm.context.model, null) },
+                  on: {
+                    change: function($event) {
+                      return _vm.$set(_vm.context, "model", null)
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+          : _c(
+              "input",
+              _vm._b(
+                {
+                  directives: [
+                    {
+                      name: "model",
+                      rawName: "v-model",
+                      value: _vm.context.model,
+                      expression: "context.model"
+                    }
+                  ],
+                  attrs: { type: _vm.type },
+                  domProps: { value: _vm.context.model },
+                  on: {
+                    input: function($event) {
+                      if ($event.target.composing) {
+                        return
+                      }
+                      _vm.$set(_vm.context, "model", $event.target.value);
+                    }
+                  }
+                },
+                "input",
+                _vm.attributes,
+                false
+              )
+            )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$4 = [];
+  __vue_render__$4._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$4 = undefined;
+    /* scoped */
+    var __vue_scope_id__$4 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$4 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$4 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputText = normalizeComponent_1(
+      { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
+      __vue_inject_styles__$4,
+      __vue_script__$4,
+      __vue_scope_id__$4,
+      __vue_is_functional_template__$4,
+      __vue_module_identifier__$4,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$5 = {
+    name: 'FormulateInputSelect',
+    mixins: [FormulateInputMixin],
+    computed: {
+      options: function options () {
+        return this.context.options || {}
+      },
+      optionGroups: function optionGroups () {
+        return this.context.optionGroups || false
+      },
+      placeholderSelected: function placeholderSelected () {
+        return !!(!this.hasValue && this.context.attributes && this.context.attributes.placeholder)
+      }
+    }
+  };
+ 
+  /* script */
+  var __vue_script__$5 = script$5;
+ 
+  /* template */
+  var __vue_render__$5 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      { staticClass: "formulate-input-element formulate-input-element--select" },
+      [
+        _c(
+          "select",
+          _vm._b(
+            {
+              directives: [
+                {
+                  name: "model",
+                  rawName: "v-model",
+                  value: _vm.context.model,
+                  expression: "context.model"
+                }
+              ],
+              attrs: { "data-placeholder-selected": _vm.placeholderSelected },
+              on: {
+                change: function($event) {
+                  var $$selectedVal = Array.prototype.filter
+                    .call($event.target.options, function(o) {
+                      return o.selected
+                    })
+                    .map(function(o) {
+                      var val = "_value" in o ? o._value : o.value;
+                      return val
+                    });
+                  _vm.$set(
+                    _vm.context,
+                    "model",
+                    $event.target.multiple ? $$selectedVal : $$selectedVal[0]
+                  );
+                }
+              }
+            },
+            "select",
+            _vm.attributes,
+            false
+          ),
+          [
+            _vm.context.placeholder
+              ? _c(
+                  "option",
+                  {
+                    attrs: { value: "", disabled: "" },
+                    domProps: { selected: !_vm.hasValue }
+                  },
+                  [
+                    _vm._v(
+                      "\n      " + _vm._s(_vm.context.placeholder) + "\n    "
+                    )
+                  ]
+                )
+              : _vm._e(),
+            _vm._v(" "),
+            !_vm.optionGroups
+              ? _vm._l(_vm.options, function(option) {
+                  return _c(
+                    "option",
+                    _vm._b(
+                      {
+                        key: option.id,
+                        domProps: {
+                          value: option.value,
+                          textContent: _vm._s(option.label)
+                        }
+                      },
+                      "option",
+                      option.attributes || {},
+                      false
+                    )
+                  )
+                })
+              : _vm._l(_vm.optionGroups, function(subOptions, label) {
+                  return _c(
+                    "optgroup",
+                    { key: label, attrs: { label: label } },
+                    _vm._l(subOptions, function(option) {
+                      return _c(
+                        "option",
+                        _vm._b(
+                          {
+                            key: option.id,
+                            domProps: {
+                              value: option.value,
+                              textContent: _vm._s(option.label)
+                            }
+                          },
+                          "option",
+                          option.attributes || {},
+                          false
+                        )
+                      )
+                    }),
+                    0
+                  )
+                })
+          ],
+          2
+        )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$5 = [];
+  __vue_render__$5._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$5 = undefined;
+    /* scoped */
+    var __vue_scope_id__$5 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$5 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$5 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputSelect = normalizeComponent_1(
+      { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
+      __vue_inject_styles__$5,
+      __vue_script__$5,
+      __vue_scope_id__$5,
+      __vue_is_functional_template__$5,
+      __vue_module_identifier__$5,
+      undefined,
+      undefined
+    );
+ 
+  //
+ 
+  var script$6 = {
+    name: 'FormulateInputTextArea',
+    mixins: [FormulateInputMixin]
+  };
+ 
+  /* script */
+  var __vue_script__$6 = script$6;
+ 
+  /* template */
+  var __vue_render__$6 = function() {
+    var _vm = this;
+    var _h = _vm.$createElement;
+    var _c = _vm._self._c || _h;
+    return _c(
+      "div",
+      {
+        staticClass: "formulate-input-element formulate-input-element--textarea"
+      },
+      [
+        _c(
+          "textarea",
+          _vm._b(
+            {
+              directives: [
+                {
+                  name: "model",
+                  rawName: "v-model",
+                  value: _vm.context.model,
+                  expression: "context.model"
+                }
+              ],
+              domProps: { value: _vm.context.model },
+              on: {
+                input: function($event) {
+                  if ($event.target.composing) {
+                    return
+                  }
+                  _vm.$set(_vm.context, "model", $event.target.value);
+                }
+              }
+            },
+            "textarea",
+            _vm.attributes,
+            false
+          )
+        )
+      ]
+    )
+  };
+  var __vue_staticRenderFns__$6 = [];
+  __vue_render__$6._withStripped = true;
+ 
+    /* style */
+    var __vue_inject_styles__$6 = undefined;
+    /* scoped */
+    var __vue_scope_id__$6 = undefined;
+    /* module identifier */
+    var __vue_module_identifier__$6 = undefined;
+    /* functional template */
+    var __vue_is_functional_template__$6 = false;
+    /* style inject */
+    
+    /* style inject SSR */
+    
+ 
+    
+    var FormulateInputTextArea = normalizeComponent_1(
+      { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
+      __vue_inject_styles__$6,
+      __vue_script__$6,
+      __vue_scope_id__$6,
+      __vue_is_functional_template__$6,
+      __vue_module_identifier__$6,
+      undefined,
+      undefined
+    );
+ 
+  /**
+   * The base formulate library.
+   */
+  var Formulate = function Formulate () {
+    this.defaults = {
+      components: {
+        FormulateForm: FormulateForm,
+        FormulateInput: FormulateInput,
+        FormulateInputBox: FormulateInputBox,
+        FormulateInputText: FormulateInputText,
+        FormulateInputGroup: FormulateInputGroup,
+        FormulateInputSelect: FormulateInputSelect,
+        FormulateInputTextArea: FormulateInputTextArea
+      },
+      library: library
+    };
+  };
+ 
+  /**
+   * Install vue formulate, and register it’s components.
+   */
+  Formulate.prototype.install = function install (Vue, options) {
+    Vue.prototype.$formulate = this;
+    this.options = this.extend(this.defaults, options || {});
+    for (var componentName in this.options.components) {
+      Vue.component(componentName, this.options.components[componentName]);
+    }
+    Object.freeze(this);
+  };
+ 
+  /**
+   * Create a new object by copying properties of base and extendWith.
+   * @param {Object} base
+   * @param {Object} extendWith
+   */
+  Formulate.prototype.extend = function extend (base, extendWith) {
+    var merged = {};
+    for (var key in base) {
+      if (extendWith.hasOwnProperty(key)) {
+        merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+          ? this.extend(base[key], extendWith[key])
+          : extendWith[key];
+      } else {
+        merged[key] = base[key];
+      }
+    }
+    for (var prop in extendWith) {
+      if (!merged.hasOwnProperty(prop)) {
+        merged[prop] = extendWith[prop];
+      }
+    }
+    return merged
+  };
+ 
+  /**
+   * Determine what "class" of input this element is given the "type".
+   * @param {string} type
+   */
+  Formulate.prototype.classify = function classify (type) {
+    if (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].classification
+    }
+    return 'unknown'
+  };
+ 
+  /**
+   * Determine what type of component to render given the "type".
+   * @param {string} type
+   */
+  Formulate.prototype.component = function component (type) {
+    if (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].component
+    }
+    return false
+  };
+ 
+  var Formulate$1 = new Formulate();
+ 
+  exports.default = Formulate$1;
+ 
+  Object.defineProperty(exports, '__esModule', { value: true });
+ 
+}));
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/dist/index.html b/coverage/lcov-report/vue-formulate/dist/index.html new file mode 100644 index 0000000..673af0a --- /dev/null +++ b/coverage/lcov-report/vue-formulate/dist/index.html @@ -0,0 +1,123 @@ + + + + Code coverage report for vue-formulate/dist + + + + + + + +
+
+

+ All files vue-formulate/dist +

+
+
+ 0% + Statements + 0/1004 +
+
+ 0% + Branches + 0/764 +
+
+ 0% + Functions + 0/231 +
+
+ 0% + Lines + 0/980 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
formulate.esm.js
0%0/3310%0/2460%0/760%0/323
formulate.min.js
0%0/3360%0/2540%0/770%0/328
formulate.umd.js
0%0/3370%0/2640%0/780%0/329
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/dist/build.js.html b/coverage/lcov-report/vue-formulate/example/dist/build.js.html new file mode 100644 index 0000000..b2ece23 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/dist/build.js.html @@ -0,0 +1,225 @@ + + + + Code coverage report for vue-formulate/example/dist/build.js + + + + + + + +
+
+

+ All files / vue-formulate/example/dist build.js +

+
+
+ 0% + Statements + 0/4118 +
+
+ 0% + Branches + 0/4310 +
+
+ 0% + Functions + 0/1167 +
+
+ 0% + Lines + 0/10 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=8)}([function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){!function(e,n){t.exports=function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e,n){"use strict";function r(){p=!1}function i(t){if(!t)return void(l!==v&&(l=v,r()));if(t!==l){if(t.length!==v.length)throw new Error("Custom alphabet for shortid must be "+v.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(t,e,n){return e!==n.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+v.length+" unique characters. These characters were not unique: "+e.join(", "));l=t,r()}}function o(t){return i(t),l}function a(t){d.seed(t),f!==t&&(r(),f=t)}function s(){l||i(v);for(var t,e=l.split(""),n=[],r=d.nextValue();e.length>0;)r=d.nextValue(),t=Math.floor(r*e.length),n.push(e.splice(t,1)[0]);return n.join("")}function u(){return p||(p=s())}function c(t){return u()[t]}var l,f,p,d=n(27),v="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";t.exports={characters:o,seed:a,lookup:c,shuffled:u}},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";function r(t,e){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function i(t,e){var n=(0,u.default)(t);for(var r in n)n[r]=e(r,n[r]);return n}function o(t,e){var n={};for(var r in t)e(r,t[r])&&(n[r]=t[r]);return n}function a(t,e,n){for(var r in t)n=e(n,r,t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0}),e.inputTypes=void 0,e.equals=r,e.map=i,e.filter=o,e.reduce=a;var s=n(4),u=function(t){return t&&t.__esModule?t:{default:t}}(s);e.inputTypes={text:["text","email","number","color","date","datetime-local","hidden","month","password","range","search","tel","time","url","week"],button:["submit","button"],select:["select"],box:["radio","checkbox"]}},function(t,e,n){"use strict";function r(t){return!0===i(t)&&"[object Object]"===Object.prototype.toString.call(t)}/*!
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+var i=n(14);t.exports=function(t){var e,n;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&(n=e.prototype,!1!==r(n)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},function(t,e,n){"use strict";function r(t,e){switch(u(t)){case"object":return i(t,e);case"array":return o(t,e);default:return s(t)}}function i(t,e){if(a(t)||!0===e&&"object"===u(t)){var n={};return c(t,function(t,n){this[n]=r(t,e)},n),n}return"function"==typeof e?e(t):t}function o(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=r(t[i],e);return n}var a=n(3),s=n(15),u=n(20),c=n(21);t.exports=r},function(t,e,n){"use strict";/*!
+ * for-in <https://github.com/jonschlinkert/for-in>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+t.exports=function(t,e,n){for(var r in t)if(!1===e.call(n,t[r],r,t))break}},function(t,e){t.exports=function(t,e,n,r,i,o){var a,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(a=t,s=t.default);var c="function"==typeof s?s.options:s;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId=i);var l;if(o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=r),l){var f=c.functional,p=f?c.render:c.beforeCreate;f?(c._injectStyles=l,c.render=function(t,e){return l.call(e),p(t,e)}):c.beforeCreate=p?[].concat(p,l):[l]}return{esModule:a,exports:s,options:c}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}return r("next")})}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),s=r(a),u=n(2),c=n(4),l=r(c);e.default={props:{name:{type:String,required:!0},module:{type:[String,Boolean],default:function(){return this.$formulate.options.vuexModule}},initial:{type:Object,default:function(){return{}}},behavior:{type:String,default:"blur"},showErrors:{type:[Boolean,Object],default:function(){return{}}},errors:{type:Object,default:function(){return{}}},prevent:{type:String,default:"validation"}},data:function(){return{parentIdentifier:"vue-formulate-wrapper-element",forceErrors:null,fieldInitials:{}}},computed:{m:function(){return this.module?this.module+"/":""},hasErrors:function(){return this.$store.getters[this.m+"hasErrors"][this.name]||!1},hasValidationErrors:function(){return this.$store.getters[this.m+"hasValidationErrors"][this.name]||!1},values:function(){return(0,l.default)(this.$store.getters[this.m+"formValues"][this.name]||{})},storeErrors:function(){return this.$store.getters[this.m+"formErrors"][this.name]||{}},validationErrors:function(){return this.$store.getters[this.m+"formValidationErrors"][this.name]||{}},fields:function(){return this.$store.getters[this.m+"formMeta"][this.name]||[]},shouldShowErrors:function(){return!1===this.forceErrors||!0===this.forceErrors?this.forceErrors:!1===this.showErrors||!0===this.showErrors?this.showErrors:"live"===this.behavior},mergedInitial:function(){return Object.assign({},this.initial,this.fieldInitials)}},watch:{mergedInitial:function(){this.hydrate(this.mergedInitial)}},created:function(){this.hydrate(this.mergedInitial)},mounted:function(){this.hydrate(this.mergedInitial)},methods:{registerField:function(t,e){this.$store.commit(this.m+"setFieldMeta",{form:this.name,field:t,data:e}),this.updateFormValidation()},deregisterField:function(t){this.$store.commit(this.m+"removeField",{form:this.name,field:t})},hydrate:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.fields[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;"submit"!==a.type&&void 0===this.values[a.name]&&this.$store.commit(this.m+"setFieldValue",{field:a.name,value:t[a.name],form:this.name})}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}this.updateFormValidation()},setInitial:function(t,e){this.fieldInitials=Object.assign({},this.fieldInitials,o({},t,e))},update:function(t){this.$store.commit(this.m+"setFieldValue",Object.assign(t,{form:this.name})),this.updateFormValidation()},updateFieldErrors:function(t){this.$store.commit(this.m+"setFieldErrors",Object.assign(t,{form:this.name}))},updateFieldValidationErrors:function(t){this.$store.commit(this.m+"setFieldValidationErrors",Object.assign(t,{form:this.name}))},validateField:function(){function t(t){return e.apply(this,arguments)}var e=i(s.default.mark(function t(e){var n,r=e.field,i=e.validation,o=e.label;return s.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$formulate.validationErrors({field:r,value:this.values[r],label:o},i,this.values);case 2:return n=t.sent,(0,u.equals)(n||[],this.validationErrors[r]||[])||this.updateFieldValidationErrors({field:r,errors:n||[]}),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return t}(),updateFormValidation:function(){var t=this;this.fields.map(function(){var e=i(s.default.mark(function e(n){return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.validateField({field:n.name,validation:n.validation,label:n.validationLabel||n.label||n.name}));case 1:case"end":return e.stop()}},e,t)}));return function(t){return e.apply(this,arguments)}}())},submit:function(){"validation"===this.prevent&&this.hasValidationErrors||"any"===this.prevent&&this.hasErrors?this.forceErrors=!0:this.$emit("submit",Object.assign({},this.values))}}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=n(25),a=function(t){return t&&t.__esModule?t:{default:t}}(o);e.default={props:{type:{type:[String,Boolean],default:"text"},name:{type:String,required:!0},initial:{type:[String,Number,Boolean],default:!1},validation:{type:[String,Boolean],default:!1},errors:{type:Array,default:function(){return[]}},label:{type:[String,Boolean],default:!1},id:{type:[String],default:function(){return a.default.generate()}},min:{type:[String,Number,Boolean],default:function(){return!1}},max:{type:[String,Number,Boolean],default:function(){return!1}},placeholder:{type:[String,Number,Boolean],default:function(){return!1}},options:{type:[Object,Array],default:function(){return[]}},multiple:{type:Boolean,default:!1},showErrors:{type:[Object,Boolean],default:function(){return{}}},validationLabel:{type:[String,Boolean],default:!1}},data:function(){return{errorBlurState:!1}},computed:{classification:function(){return this.isTextInput?"text":this.isBoxInput?"box":this.isButtonInput?"button":this.isSelectInput?"select":this.hasCustomInput?"custom":"unsupported"},hasCustomInput:function(){return this.$slots.default&&this.$slots.default.length},isTextInput:function(){return!this.hasCustomInput&&i.inputTypes.text.includes(this.type)},isButtonInput:function(){return!this.hasCustomInput&&i.inputTypes.button.includes(this.type)},isSelectInput:function(){return!this.hasCustomInput&&i.inputTypes.select.includes(this.type)},isBoxInput:function(){return!this.hasCustomInput&&i.inputTypes.box.includes(this.type)},isUnsupportedInput:function(){return!(this.hasCustomInput||this.isTextInput||this.isButtonInput||this.isSelectInput||this.isBoxInput)},form:function(){for(var t=this.$parent;t&&t.$data&&"vue-formulate-wrapper-element"!==t.$data.parentIdentifier;)t=t.$parent;if(!t.$data||"vue-formulate-wrapper-element"!==t.$data.parentIdentifier)throw new Error("FormulateElement has no FormulateWrapper element");return t},values:function(){return this.form.values},value:function(){var t=this.values[this.name];if(void 0===t)switch(this.type){case"color":return"#000000";case"checkbox":if(this.optionList.length>1)return[]}return t},module:function(){return this.form.$props.module},formName:function(){return this.form.$props.name},classes:function(){var t;return t={"formulate-element":!0},r(t,"formulate-element--type--"+this.type,!0),r(t,"formulate-element--has-value",!!this.value),r(t,"formulate-element--has-errors",this.localAndValidationErrors.length&&this.shouldShowErrors),t},validationErrors:function(){return this.form.validationErrors[this.name]||[]},storeErrors:function(){return this.form.storeErrors[this.name]||[]},formErrors:function(){return this.form.errors[this.name]||[]},localAndValidationErrors:function(){return this.errors.concat(this.validationErrors).concat(this.formErrors)},shouldShowErrors:function(){var t=this.form.shouldShowErrors;return"blur"===this.form.behavior&&(t=t||this.errorBlurState),!1!==this.showErrors&&!0!==this.showErrors||(t=this.showErrors),t},attributes:function(){var t=this;return["min","max","placeholder","id","multiple"].filter(function(e){return!1!==t[e]}).reduce(function(e,n){return e[n]=t[n],e},{})},optionList:function(){return Array.isArray(this.options)?Array.isArray(this.options)&&!this.options.length?[{value:this.name,label:this.label||this.name,id:a.default.generate()}]:this.options:(0,i.reduce)(this.options,function(t,e,n){return t.concat({value:e,label:n,id:a.default.generate()})},[])},val:{set:function(t){this.form.update({field:this.name,value:t}),this.isTextInput&&(this.$refs.input.value=t)},get:function(){return this.value}}},watch:{localAndValidationErrors:function(){(0,i.equals)(this.localAndValidationErrors,this.storeErrors)||this.form.updateFieldErrors({field:this.name,errors:this.localAndValidationErrors})},initial:function(){this.form.update({field:this.name,value:this.initial})}},created:function(){"undefined"==typeof window&&this.register()},mounted:function(){this.register()},beforeDestroy:function(){this.form.deregisterField(this.name)},methods:{register:function(){this.form.registerField(this.name,(0,i.filter)(this.$props,function(t,e){return["name","type","id","label","validation","validationLabel"].includes(t)})),!1!==this.initial&&this.form.setInitial(this.name,this.initial)}}}},function(t,e,n){"use strict";function r(t,e){for(var n,r=0,o="";!n;)o+=t(e>>4*r&15|i()),n=e<Math.pow(16,r+1),r++;return o}var i=n(28);t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}return r("next")})}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.mapModels=void 0;var s=n(1),u=r(s),c=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(13);Object.keys(f).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})});var p=n(22),d=r(p),v=n(24),h=r(v),m=n(34),y=r(m),g=n(35),b=r(g),_=function(){function t(){a(this,t),this.defaultOptions={registerComponents:!0,tags:{Formulate:"formulate",FormulateElement:"formulate-element"},errors:{},rules:{},vuexModule:!1},this.errors=b.default,this.rules=y.default}return l(t,[{key:"install",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.prototype.$formulate=this,e=Object.assign(this.defaultOptions,e),e.registerComponents&&(t.component(e.tags.Formulate,d.default),t.component(e.tags.FormulateElement,h.default)),e.errors&&(this.errors=Object.assign(this.errors,e.errors)),e.rules&&(this.rules=Object.assign(this.rules,e.rules)),this.options=e}},{key:"parseRules",value:function(t){return t.split("|").map(function(t){return t.trim()}).map(function(t){return t.match(/([a-zA-Z0-9]+)\((.*)?\)/)||[null,t,""]}).map(function(t){var e=c(t,3),n=(e[0],e[1]),r=e[2];return Object.assign({},{rule:n},r?{args:r.split(",").map(function(t){return t.trim()})}:{args:[]})})}},{key:"errorFactory",value:function(t){return this.errors[t]?this.errors[t]:this.errors.default}},{key:"validationErrors",value:function(){function t(t,n,r){return e.apply(this,arguments)}var e=o(u.default.mark(function t(e,n,r){var o=e.field,a=e.value,s=e.label,c=this;return u.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!!n&&Promise.all(this.parseRules(n).map(function(t){var e,n=t.rule,u=t.args;if("function"!=typeof c.rules[n])throw new Error("Validation rule is invalid: "+n);return(e=c.rules)[n].apply(e,[{field:o,value:a,label:s,error:c.errorFactory(n),values:r}].concat(i(u)))})).then(function(t){return t.reduce(function(t,e){return e?Array.isArray(t)?t.concat(e):[e]:t},!1)}));case 1:case"end":return t.stop()}},t,this)}));return t}()}]),t}(),w=new _;e.default=w,e.mapModels=function(t){var e={};for(var n in t)!function(n){var r=t[n].split("/"),i=c(r,2),o=i[0],a=i[1];e[n]={set:function(t){var e=w.options.vuexModule?w.options.vuexModule+"/":"";this.$store.commit(e+"setFieldValue",{form:o,field:a,value:t})},get:function(){var t=w.options.vuexModule?w.options.vuexModule+"/":"";return this.$store.getters[t+"formValues"][o]?this.$store.getters[t+"formValues"][o][a]:""}}}(n);return e}},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(12),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function n(t,e,n,r){var o=e&&e.prototype instanceof i?e:i,a=Object.create(o.prototype),s=new d(r||[]);return a._invoke=c(t,n,s),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function o(){}function a(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){function e(n,i,o,a){var s=r(t[n],t,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&g.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},a)}a(s.arg)}function n(t,n){function r(){return new Promise(function(r,i){e(t,n,r,i)})}return i=i?i.then(r,r):r()}var i;this._invoke=n}function c(t,e,n){var i=O;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===E){if("throw"===o)throw a;return h()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===S)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===O)throw i=E,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=A;var c=r(t,e,n);if("normal"===c.type){if(i=n.done?E:k,c.arg===S)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=E,n.method="throw",n.arg=c.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,l(t,e),"throw"===e.method))return S;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var i=r(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,S;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=m),e.delegate=null,S):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,S)}function f(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function v(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=m,e.done=!0,e};return r.next=r}}return{next:h}}function h(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",w=b.asyncIterator||"@@asyncIterator",x=b.toStringTag||"@@toStringTag",$="object"==typeof t,C=e.regeneratorRuntime;if(C)return void($&&(t.exports=C));C=e.regeneratorRuntime=$?t.exports:{},C.wrap=n;var O="suspendedStart",k="suspendedYield",A="executing",E="completed",S={},j={};j[_]=function(){return this};var T=Object.getPrototypeOf,I=T&&T(T(v([])));I&&I!==y&&g.call(I,_)&&(j=I);var M=a.prototype=i.prototype=Object.create(j);o.prototype=M.constructor=a,a.constructor=o,a[x]=o.displayName="GeneratorFunction",C.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},C.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,x in t||(t[x]="GeneratorFunction")),t.prototype=Object.create(M),t},C.awrap=function(t){return{__await:t}},s(u.prototype),u.prototype[w]=function(){return this},C.AsyncIterator=u,C.async=function(t,e,r,i){var o=new u(n(t,e,r,i));return C.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},s(M),M[x]="Generator",M[_]=function(){return this},M.toString=function(){return"[object Generator]"},C.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=v,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&g.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return o.type="throw",o.arg=t,n.next=e,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,S):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),S},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),S}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;p(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:v(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),S}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0}),e.formulateModule=e.formulateMutations=e.formulateActions=e.formulateGetters=e.formulateState=void 0;var i=n(2),o=e.formulateState=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){return Object.assign({values:{},errors:{},validationErrors:{},meta:{}},t)}},a=e.formulateGetters=function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return Object.assign({formValues:function(t){return t.values},formErrors:function(t){return t.errors},formValidationErrors:function(t){return t.validationErrors},formMeta:function(t){return(0,i.reduce)(t.meta,function(t,e,n){return t[e]=(0,i.reduce)(n,function(t,e,n){return t.concat(n)},[]),t},{})},hasErrors:function(t){return(0,i.map)(t.errors,function(t,e){return(0,i.reduce)(e,function(t,e,n){return t||!!n.length},!1)})},hasValidationErrors:function(t){return(0,i.map)(t.validationErrors,function(t,e){return(0,i.reduce)(e,function(t,e,n){return t||!!n.length},!1)})}},t)},s=e.formulateActions=function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return Object.assign({},t)},u=e.formulateMutations=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign({setFieldValue:function(t,e){var n=e.form,i=e.field,o=e.value;t.values=Object.assign({},t.values,r({},n,Object.assign({},t.values[n]||{},r({},i,o))))},setFieldErrors:function(t,e){var n=e.form,i=e.field,o=e.errors;t.errors=Object.assign({},t.errors,r({},n,Object.assign({},t.errors[n]||{},r({},i,o))))},setFieldValidationErrors:function(t,e){var n=e.form,i=e.field,o=e.errors;t.validationErrors=Object.assign({},t.validationErrors,r({},n,Object.assign({},t.validationErrors[n]||{},r({},i,o))))},setFieldMeta:function(t,e){var n=e.form,i=e.field,o=e.data;t.meta=Object.assign({},t.meta,r({},n,Object.assign({},t.meta[n]||{},r({},i,o))))},resetForm:function(t,e){t.values[e]&&(t.values=Object.assign({},t.values,r({},e,(0,i.map)(t.values[e],function(t,e){}))))},removeField:function(t,e){var n=e.form,r=e.field;for(var o in t)t[o][n]&&t[o][n].hasOwnProperty(r)&&(t[o][n]=(0,i.filter)(t[o][n],function(t,e){return t!==r}))}},t)};e.formulateModule=function(t){return{state:o(),getters:a(t),actions:s(t),mutations:u(),namespaced:!0}}},function(t,e,n){"use strict";/*!
+ * isobject <https://github.com/jonschlinkert/isobject>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e,n){"use strict";function r(t){var e=a(t);return r.hasOwnProperty(e)?r[e](t):t}/*!
+ * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
+ *
+ * Copyright (c) 2015-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+var i=n(16),o=n(17),a=n(19);r.array=function(t){return t.slice()},r.date=function(t){return new Date(+t)},r.object=function(t){return i(t)?o({},t):t},r.map=function(t){return new Map(t)},r.regexp=function(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e)},r.set=function(t){return new Set(t)},t.exports=r},function(t,e,n){"use strict";/*!
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
+ *
+ * Copyright (c) 2015-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+var r=n(3);t.exports=function(t){return r(t)||"function"==typeof t||Array.isArray(t)}},function(t,e,n){"use strict";function r(t,e){i(e)&&o(e,function(e,n){t[n]=e})}var i=n(18),o=n(5);t.exports=function(t,e){if(!i(t))throw new TypeError("expected the first argument to be an object");for(var n=arguments.length,o=0;++o<n;)r(t,arguments[o]);return t}},function(t,e,n){"use strict";/*!
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
+ *
+ * Copyright (c) 2015-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+var r=n(3);t.exports=function(t){return r(t)||"function"==typeof t||Array.isArray(t)}},function(t,e){function n(t){return t.constructor?t.constructor.name:null}function r(t){return Array.isArray?Array.isArray(t):t instanceof Array}function i(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}function o(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}function a(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}function s(t,e){return"GeneratorFunction"===n(t)}function u(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}function c(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}function l(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var f=Object.prototype.toString;t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return s(t)?"generatorfunction":"function";if(r(t))return"array";if(l(t))return"buffer";if(c(t))return"arguments";if(o(t))return"date";if(i(t))return"error";if(a(t))return"regexp";switch(n(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(u(t))return"generator";switch(e=f.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}},function(t,e){function n(t){return t.constructor?t.constructor.name:null}function r(t){return Array.isArray?Array.isArray(t):t instanceof Array}function i(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}function o(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}function a(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}function s(t,e){return"GeneratorFunction"===n(t)}function u(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}function c(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}function l(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var f=Object.prototype.toString;t.exports=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=typeof t;if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return s(t)?"generatorfunction":"function";if(r(t))return"array";if(l(t))return"buffer";if(c(t))return"arguments";if(o(t))return"date";if(i(t))return"error";if(a(t))return"regexp";switch(n(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(u(t))return"generator";switch(e=f.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}},function(t,e,n){"use strict";/*!
+ * for-own <https://github.com/jonschlinkert/for-own>
+ *
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
+ */
+var r=n(5),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){r(t,function(r,o){if(i.call(t,o))return e.call(n,t[o],o,t)})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,function(){return r[t]})}(o);var a=n(23),s=n(6),u=s(i.a,a.a,!1,null,null,null);e.default=u.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement;return(t._self._c||e)("form",{staticClass:"formulate-form",on:{submit:function(e){e.preventDefault(),t.submit(e)}}},[t._t("default")],2)},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,function(){return r[t]})}(o);var a=n(33),s=n(6),u=s(i.a,a.a,!1,null,null,null);e.default=u.exports},function(t,e,n){"use strict";t.exports=n(26)},function(t,e,n){"use strict";function r(e){return s.seed(e),t.exports}function i(e){return f=e,t.exports}function o(t){return void 0!==t&&s.characters(t),s.shuffled()}function a(){return c(f)}var s=n(0),u=(n(9),n(29)),c=n(30),l=n(31),f=n(32)||0;t.exports=a,t.exports.generate=a,t.exports.seed=r,t.exports.worker=i,t.exports.characters=o,t.exports.decode=u,t.exports.isValid=l},function(t,e,n){"use strict";function r(){return(o=(9301*o+49297)%233280)/233280}function i(t){o=t}var o=1;t.exports={nextValue:r,seed:i}},function(t,e,n){"use strict";function r(){if(!i||!i.getRandomValues)return 48&Math.floor(256*Math.random());var t=new Uint8Array(1);return i.getRandomValues(t),48&t[0]}var i="object"==typeof window&&(window.crypto||window.msCrypto);t.exports=r},function(t,e,n){"use strict";function r(t){var e=i.shuffled();return{version:15&e.indexOf(t.substr(0,1)),worker:15&e.indexOf(t.substr(1,1))}}var i=n(0);t.exports=r},function(t,e,n){"use strict";function r(t){var e="",n=Math.floor(.001*(Date.now()-u));return n===o?i++:(i=0,o=n),e+=a(s.lookup,c),e+=a(s.lookup,t),i>0&&(e+=a(s.lookup,i)),e+=a(s.lookup,n)}var i,o,a=n(9),s=n(0),u=1459707606518,c=6;t.exports=r},function(t,e,n){"use strict";function r(t){if(!t||"string"!=typeof t||t.length<6)return!1;for(var e=i.characters(),n=t.length,r=0;r<n;r++)if(-1===e.indexOf(t[r]))return!1;return!0}var i=n(0);t.exports=r},function(t,e,n){"use strict";t.exports=0},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.classes},[n("div",{staticClass:"formulate-element-input-wrapper",attrs:{"data-type":t.type,"data-classification":t.classification}},[t.label&&(!t.isBoxInput||t.optionList.length>1)?n("label",{attrs:{for:t.id},domProps:{textContent:t._s(t.label)}}):t._e(),t._v(" "),"checkbox"===t.type&&t.isTextInput?n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],ref:"input",attrs:{name:t.name,type:"checkbox"},domProps:{checked:Array.isArray(t.val)?t._i(t.val,null)>-1:t.val},on:{blur:function(e){t.errorBlurState=!0},change:function(e){var n=t.val,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&(t.val=n.concat([null])):o>-1&&(t.val=n.slice(0,o).concat(n.slice(o+1)))}else t.val=i}}},"input",t.attributes,!1)):"radio"===t.type&&t.isTextInput?n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],ref:"input",attrs:{name:t.name,type:"radio"},domProps:{checked:t._q(t.val,null)},on:{blur:function(e){t.errorBlurState=!0},change:function(e){t.val=null}}},"input",t.attributes,!1)):t.isTextInput?n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],ref:"input",attrs:{name:t.name,type:t.type},domProps:{value:t.val},on:{blur:function(e){t.errorBlurState=!0},input:function(e){e.target.composing||(t.val=e.target.value)}}},"input",t.attributes,!1)):t._e(),t._v(" "),t.isButtonInput?n("button",{attrs:{type:t.type,disabled:"submit"===t.type&&t.form.hasErrors&&"live"===t.form.behavior},domProps:{textContent:t._s(t.label||t.name)}}):t._e(),t._v(" "),t.isSelectInput?n("select",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],attrs:{name:t.name},on:{blur:function(e){t.errorBlurState=!0},change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.val=e.target.multiple?n:n[0]}}},"select",t.attributes,!1),t._l(t.optionList,function(e){return n("option",t._b({key:e.id,domProps:{value:e.value,textContent:t._s(e.label)}},"option",e.attributes||{},!1))})):t._e(),t._v(" "),t.isBoxInput?n("div",{staticClass:"formulate-element-box-input-group"},[t._l(t.optionList,function(e){return["radio"===t.type?n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],key:e.id+"-input",attrs:{type:"radio",name:t.name,id:e.id},domProps:{value:e.value,checked:t._q(t.val,e.value)},on:{blur:function(e){t.errorBlurState=!0},change:function(n){t.val=e.value}}},"input",t.attributes,!1)):t._e(),t._v(" "),"checkbox"===t.type?n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],key:e.id+"-input",attrs:{type:"checkbox",name:t.name,id:e.id},domProps:{value:e.value,checked:Array.isArray(t.val)?t._i(t.val,e.value)>-1:t.val},on:{blur:function(e){t.errorBlurState=!0},change:function(n){var r=t.val,i=n.target,o=!!i.checked;if(Array.isArray(r)){var a=e.value,s=t._i(r,a);i.checked?s<0&&(t.val=r.concat([a])):s>-1&&(t.val=r.slice(0,s).concat(r.slice(s+1)))}else t.val=o}}},"input",t.attributes,!1)):t._e(),t._v(" "),n("label",{key:e.id+"-label",attrs:{for:e.id},domProps:{textContent:t._s(e.label)}})]})],2):t._e(),t._v(" "),t.hasCustomInput?t._t("default"):t._e(),t._v(" "),t.isUnsupportedInput?n("div",{staticStyle:{"background-color":"red",color:"white"},domProps:{textContent:t._s("Unsupported field type: “"+t.type+"”.")}}):t._e()],2),t._v(" "),n("transition",{attrs:{name:"formulate-errors"}},[t.shouldShowErrors&&t.localAndValidationErrors.length?n("transition-group",{staticClass:"formulate-errors",attrs:{tag:"ul",name:"formulate-error-list"}},t._l(t.localAndValidationErrors,function(e){return n("li",{key:e,domProps:{textContent:t._s(e)}})})):t._e()],1)],1)},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";function r(t){return function(){var e=t.apply(this,arguments);return new Promise(function(t,n){function r(i,o){try{var a=e[i](o),s=a.value}catch(t){return void n(t)}if(!a.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}return r("next")})}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default={required:function(){function t(t){return e.apply(this,arguments)}var e=r(o.default.mark(function t(e){var n=e.value,r=e.error,i=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!(n&&(!Array.isArray(n)||n.length))&&r.apply(void 0,i));case 1:case"end":return t.stop()}},t,this)}));return t}(),email:function(){function t(t){return e.apply(this,arguments)}var e=r(o.default.mark(function t(e){var n,r=e.value,i=e.error,a=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=/^(?:[a-z0-9!#$%&amp;'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/,t.abrupt("return",!(!r||n.test(r.toLowerCase()))&&i.apply(void 0,a));case 2:case"end":return t.stop()}},t,this)}));return t}(),confirmed:function(){function t(t,n){return e.apply(this,arguments)}var e=r(o.default.mark(function t(e,n){var r=e.field,i=e.value,a=e.error,s=e.values,u=arguments;return o.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=n||r+"_confirmation",t.abrupt("return",!(!i||i===s[n])&&a.apply(void 0,u));case 2:case"end":return t.stop()}},t,this)}));return t}()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={required:function(t){var e=t.label;return t.value,e+" is required"},email:function(t){var e=t.label;return t.value,e+" is invalid."},confirmed:function(t){var e=t.label;return t.value,e+" does not match the confirmation field."},default:function(t){return t.label,t.value,"This field is invalid."}}}])}()}("undefined"!=typeof self&&self)},function(t,e,n){"use strict";(function(t,n){function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function u(t){return null!==t&&"object"==typeof t}function c(t){return"[object Object]"===uo.call(t)}function l(t){return"[object RegExp]"===uo.call(t)}function f(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}function h(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function m(t,e){return fo.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function g(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){return t.bind(e)}function _(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function w(t,e){for(var n in e)t[n]=e[n];return t}function x(t){for(var e={},n=0;n<t.length;n++)t[n]&&w(e,t[n]);return e}function $(t,e,n){}function C(t,e){if(t===e)return!0;var n=u(t),r=u(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return C(t,e[n])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(n){return C(t[n],e[n])})}catch(t){return!1}}function O(t,e){for(var n=0;n<t.length;n++)if(C(t[n],e))return n;return-1}function k(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function A(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function E(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function S(t){if(!Oo.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}function j(t){return"function"==typeof t&&/native code/.test(t.toString())}function T(t){Go.target&&qo.push(Go.target),Go.target=t}function I(){Go.target=qo.pop()}function M(t){return new Ko(void 0,void 0,void 0,String(t))}function L(t){var e=new Ko(t.tag,t.data,t.children,t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.isCloned=!0,e}function P(t){Qo=t}function N(t,e,n){t.__proto__=e}function F(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];E(t,o,e[o])}}function D(t,e){if(u(t)&&!(t instanceof Ko)){var n;return m(t,"__ob__")&&t.__ob__ instanceof ta?n=t.__ob__:Qo&&!Bo()&&(Array.isArray(t)||c(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new ta(t)),e&&n&&n.vmCount++,n}}function R(t,e,n,r,i){var o=new Go,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get;s||2!==arguments.length||(n=t[e]);var u=a&&a.set,c=!i&&D(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return Go.target&&(o.depend(),c&&(c.dep.depend(),Array.isArray(e)&&U(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!==e&&r!==r||(u?u.call(t,e):n=e,c=!i&&D(e),o.notify())}})}}function B(t,e,n){if(Array.isArray(t)&&f(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(R(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function V(t,e){if(Array.isArray(t)&&f(e))return void t.splice(e,1);var n=t.__ob__;t._isVue||n&&n.vmCount||m(t,e)&&(delete t[e],n&&n.dep.notify())}function U(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&U(e)}function z(t,e){if(!e)return t;for(var n,r,i,o=Object.keys(e),a=0;a<o.length;a++)n=o[a],r=t[n],i=e[n],m(t,n)?c(r)&&c(i)&&z(r,i):B(t,n,i);return t}function H(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,i="function"==typeof t?t.call(n,n):t;return r?z(r,i):i}:e?t?function(){return z("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function G(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function q(t,e,n,r){var i=Object.create(t||null);return e?w(i,e):i}function K(t,e){var n=t.props;if(n){var r,i,o,a={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o=vo(i),a[o]={type:null});else if(c(n))for(var s in n)i=n[s],o=vo(s),a[o]=c(i)?i:{type:i};t.props=a}}function W(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(c(n))for(var o in n){var a=n[o];r[o]=c(a)?w({from:o},a):{from:a}}}}function J(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}function X(t,e,n){function r(r){var i=ea[r]||ia;u[r]=i(t[r],e[r],n,r)}"function"==typeof e&&(e=e.options),K(e,n),W(e,n),J(e);var i=e.extends;if(i&&(t=X(t,i,n)),e.mixins)for(var o=0,a=e.mixins.length;o<a;o++)t=X(t,e.mixins[o],n);var s,u={};for(s in t)r(s);for(s in e)m(t,s)||r(s);return u}function Z(t,e,n,r){if("string"==typeof n){var i=t[e];if(m(i,n))return i[n];var o=vo(n);if(m(i,o))return i[o];var a=ho(o);return m(i,a)?i[a]:i[n]||i[o]||i[a]}}function Y(t,e,n,r){var i=e[t],o=!m(n,t),a=n[t],s=nt(Boolean,i.type);if(s>-1)if(o&&!m(i,"default"))a=!1;else if(""===a||a===yo(t)){var u=nt(String,i.type);(u<0||s<u)&&(a=!0)}if(void 0===a){a=Q(r,i,t);var c=Qo;P(!0),D(a),P(c)}return a}function Q(t,e,n){if(m(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof r&&"Function"!==tt(e.type)?r.call(t):r}}function tt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function et(t,e){return tt(t)===tt(e)}function nt(t,e){if(!Array.isArray(e))return et(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(et(e[n],t))return n;return-1}function rt(t,e,n){if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(r,t,e,n);if(a)return}catch(t){it(t,r,"errorCaptured hook")}}it(t,e,n)}function it(t,e,n){if(Co.errorHandler)try{return Co.errorHandler.call(null,t,e,n)}catch(t){ot(t,null,"config.errorHandler")}ot(t,e,n)}function ot(t,e,n){if(!Ao&&!Eo||"undefined"==typeof console)throw t;console.error(t)}function at(){aa=!1;var t=oa.slice(0);oa.length=0;for(var e=0;e<t.length;e++)t[e]()}function st(t){return t._withTask||(t._withTask=function(){sa=!0;var e=t.apply(null,arguments);return sa=!1,e})}function ut(t,e){var n;if(oa.push(function(){if(t)try{t.call(e)}catch(t){rt(t,e,"nextTick")}else n&&n(e)}),aa||(aa=!0,sa?ra():na()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){n=t})}function ct(t){lt(t,pa),pa.clear()}function lt(t,e){var n,r,i=Array.isArray(t);if((i||u(t))&&!Object.isFrozen(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(n=t.length;n--;)lt(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)lt(t[r[n]],e)}}function ft(t){function e(){var t=arguments,n=e.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),i=0;i<r.length;i++)r[i].apply(null,t)}return e.fns=t,e}function pt(t,e,n,i,o){var a,s,u,c;for(a in t)s=t[a],u=e[a],c=da(a),r(s)||(r(u)?(r(s.fns)&&(s=t[a]=ft(s)),n(c.name,s,c.once,c.capture,c.passive,c.params)):s!==u&&(u.fns=s,t[a]=u));for(a in e)r(t[a])&&(c=da(a),i(c.name,e[a],c.capture))}function dt(t,e,n){function a(){n.apply(this,arguments),h(s.fns,a)}t instanceof Ko&&(t=t.data.hook||(t.data.hook={}));var s,u=t[e];r(u)?s=ft([a]):i(u.fns)&&o(u.merged)?(s=u,s.fns.push(a)):s=ft([u,a]),s.merged=!0,t[e]=s}function vt(t,e,n){var o=e.options.props;if(!r(o)){var a={},s=t.attrs,u=t.props;if(i(s)||i(u))for(var c in o){var l=yo(c);ht(a,u,c,l,!0)||ht(a,s,c,l,!1)}return a}}function ht(t,e,n,r,o){if(i(e)){if(m(e,n))return t[n]=e[n],o||delete e[n],!0;if(m(e,r))return t[n]=e[r],o||delete e[r],!0}return!1}function mt(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function yt(t){return s(t)?[M(t)]:Array.isArray(t)?bt(t):void 0}function gt(t){return i(t)&&i(t.text)&&a(t.isComment)}function bt(t,e){var n,a,u,c,l=[];for(n=0;n<t.length;n++)a=t[n],r(a)||"boolean"==typeof a||(u=l.length-1,c=l[u],Array.isArray(a)?a.length>0&&(a=bt(a,(e||"")+"_"+n),gt(a[0])&&gt(c)&&(l[u]=M(c.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?gt(c)?l[u]=M(c.text+a):""!==a&&l.push(M(a)):gt(a)&&gt(c)?l[u]=M(c.text+a.text):(o(t._isVList)&&i(a.tag)&&r(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function _t(t,e){return(t.__esModule||Uo&&"Module"===t[Symbol.toStringTag])&&(t=t.default),u(t)?e.extend(t):t}function wt(t,e,n,r,i){var o=Jo();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}function xt(t,e,n){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[n],s=!0,c=function(){for(var t=0,e=a.length;t<e;t++)a[t].$forceUpdate()},l=k(function(n){t.resolved=_t(n,e),s||c()}),f=k(function(e){i(t.errorComp)&&(t.error=!0,c())}),p=t(l,f);return u(p)&&("function"==typeof p.then?r(t.resolved)&&p.then(l,f):i(p.component)&&"function"==typeof p.component.then&&(p.component.then(l,f),i(p.error)&&(t.errorComp=_t(p.error,e)),i(p.loading)&&(t.loadingComp=_t(p.loading,e),0===p.delay?t.loading=!0:setTimeout(function(){r(t.resolved)&&r(t.error)&&(t.loading=!0,c())},p.delay||200)),i(p.timeout)&&setTimeout(function(){r(t.resolved)&&f(null)},p.timeout))),s=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(n)}function $t(t){return t.isComment&&t.asyncFactory}function Ct(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(i(n)&&(i(n.componentOptions)||$t(n)))return n}}function Ot(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Et(t,e)}function kt(t,e,n){n?fa.$once(t,e):fa.$on(t,e)}function At(t,e){fa.$off(t,e)}function Et(t,e,n){fa=t,pt(e,n||{},kt,At,t),fa=void 0}function St(t,e){var n={};if(!t)return n;for(var r=0,i=t.length;r<i;r++){var o=t[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,u=n[s]||(n[s]=[]);"template"===o.tag?u.push.apply(u,o.children||[]):u.push(o)}}for(var c in n)n[c].every(jt)&&delete n[c];return n}function jt(t){return t.isComment&&!t.asyncFactory||" "===t.text}function Tt(t,e){e=e||{};for(var n=0;n<t.length;n++)Array.isArray(t[n])?Tt(t[n],e):e[t[n].key]=t[n].fn;return e}function It(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function Mt(t,e,n){t.$el=e,t.$options.render||(t.$options.render=Jo),Dt(t,"beforeMount");var r;return r=function(){t._update(t._render(),n)},new xa(t,r,$,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Dt(t,"mounted")),t}function Lt(t,e,n,r,i){var o=!!(i||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==so);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=i,t.$attrs=r.data.attrs||so,t.$listeners=n||so,e&&t.$options.props){P(!1);for(var a=t._props,s=t.$options._propKeys||[],u=0;u<s.length;u++){var c=s[u],l=t.$options.props;a[c]=Y(c,l,e,t)}P(!0),t.$options.propsData=e}n=n||so;var f=t.$options._parentListeners;t.$options._parentListeners=n,Et(t,n,f),o&&(t.$slots=St(i,r.context),t.$forceUpdate())}function Pt(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Nt(t,e){if(e){if(t._directInactive=!1,Pt(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Nt(t.$children[n]);Dt(t,"activated")}}function Ft(t,e){if(!(e&&(t._directInactive=!0,Pt(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)Ft(t.$children[n]);Dt(t,"deactivated")}}function Dt(t,e){T();var n=t.$options[e];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(t)}catch(n){rt(n,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e),I()}function Rt(){_a=ha.length=ma.length=0,ya={},ga=ba=!1}function Bt(){ba=!0;var t,e;for(ha.sort(function(t,e){return t.id-e.id}),_a=0;_a<ha.length;_a++)t=ha[_a],e=t.id,ya[e]=null,t.run();var n=ma.slice(),r=ha.slice();Rt(),zt(n),Vt(r),Vo&&Co.devtools&&Vo.emit("flush")}function Vt(t){for(var e=t.length;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&Dt(r,"updated")}}function Ut(t){t._inactive=!1,ma.push(t)}function zt(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Nt(t[e],!0)}function Ht(t){var e=t.id;if(null==ya[e]){if(ya[e]=!0,ba){for(var n=ha.length-1;n>_a&&ha[n].id>t.id;)n--;ha.splice(n+1,0,t)}else ha.push(t);ga||(ga=!0,ut(Bt))}}function Gt(t,e,n){$a.get=function(){return this[e][n]},$a.set=function(t){this[e][n]=t},Object.defineProperty(t,n,$a)}function qt(t){t._watchers=[];var e=t.$options;e.props&&Kt(t,e.props),e.methods&&Qt(t,e.methods),e.data?Wt(t):D(t._data={},!0),e.computed&&Xt(t,e.computed),e.watch&&e.watch!==Po&&te(t,e.watch)}function Kt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];!t.$parent||P(!1);for(var o in e)!function(o){i.push(o);var a=Y(o,e,n,t);R(r,o,a),o in t||Gt(t,"_props",o)}(o);P(!0)}function Wt(t){var e=t.$options.data;e=t._data="function"==typeof e?Jt(e,t):e||{},c(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);i--;){var o=n[i];r&&m(r,o)||A(o)||Gt(t,"_data",o)}D(e,!0)}function Jt(t,e){T();try{return t.call(e,e)}catch(t){return rt(t,e,"data()"),{}}finally{I()}}function Xt(t,e){var n=t._computedWatchers=Object.create(null),r=Bo();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;r||(n[i]=new xa(t,a||$,$,Ca)),i in t||Zt(t,i,o)}}function Zt(t,e,n){var r=!Bo();"function"==typeof n?($a.get=r?Yt(e):n,$a.set=$):($a.get=n.get?r&&!1!==n.cache?Yt(e):n.get:$,$a.set=n.set?n.set:$),Object.defineProperty(t,e,$a)}function Yt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Go.target&&e.depend(),e.value}}function Qt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?$:go(e[n],t)}function te(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)ee(t,n,r[i]);else ee(t,n,r)}}function ee(t,e,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function ne(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}function re(t){var e=ie(t.$options.inject,t);e&&(P(!1),Object.keys(e).forEach(function(n){R(t,n,e[n])}),P(!0))}function ie(t,e){if(t){for(var n=Object.create(null),r=Uo?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<r.length;i++){for(var o=r[i],a=t[o].from,s=e;s;){if(s._provided&&m(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var u=t[o].default;n[o]="function"==typeof u?u.call(e):u}}return n}}function oe(t,e){var n,r,o,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;r<o;r++)n[r]=e(t[r],r);else if("number"==typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(u(t))for(a=Object.keys(t),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=e(t[s],s,r);return i(n)&&(n._isVList=!0),n}function ae(t,e,n,r){var i,o=this.$scopedSlots[t];if(o)n=n||{},r&&(n=w(w({},r),n)),i=o(n)||e;else{var a=this.$slots[t];a&&(a._rendered=!0),i=a||e}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function se(t){return Z(this.$options,"filters",t,!0)||_o}function ue(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function ce(t,e,n,r,i){var o=Co.keyCodes[e]||n;return i&&r&&!Co.keyCodes[e]?ue(i,r):o?ue(o,t):r?yo(r)!==e:void 0}function le(t,e,n,r,i){if(n&&u(n)){Array.isArray(n)&&(n=x(n));var o;for(var a in n)!function(a){if("class"===a||"style"===a||lo(a))o=t;else{var s=t.attrs&&t.attrs.type;o=r||Co.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}a in o||(o[a]=n[a],!i)||((t.on||(t.on={}))["update:"+a]=function(t){n[a]=t})}(a)}return t}function fe(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?r:(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),de(r,"__static__"+t,!1),r)}function pe(t,e,n){return de(t,"__once__"+e+(n?"_"+n:""),!0),t}function de(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&ve(t[r],e+"_"+r,n);else ve(t,e,n)}function ve(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function he(t,e){if(e&&c(e)){var n=t.on=t.on?w({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}return t}function me(t){t._o=pe,t._n=d,t._s=p,t._l=oe,t._t=ae,t._q=C,t._i=O,t._m=fe,t._f=se,t._k=ce,t._b=le,t._v=M,t._e=Jo,t._u=Tt,t._g=he}function ye(t,e,n,r,i){var a=i.options;this.data=t,this.props=e,this.children=n,this.parent=r,this.listeners=t.on||so,this.injections=ie(a.inject,r),this.slots=function(){return St(n,r)};var s=Object.create(r),u=o(a._compiled),c=!u;u&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||so),a._scopeId?this._c=function(t,e,n,i){var o=ke(s,t,e,n,i,c);return o&&!Array.isArray(o)&&(o.fnScopeId=a._scopeId,o.fnContext=r),o}:this._c=function(t,e,n,r){return ke(s,t,e,n,r,c)}}function ge(t,e,n,r,o){var a=t.options,s={},u=a.props;if(i(u))for(var c in u)s[c]=Y(c,u,e||so);else i(n.attrs)&&_e(s,n.attrs),i(n.props)&&_e(s,n.props);var l=new ye(n,s,o,r,t),f=a.render.call(null,l._c,l);if(f instanceof Ko)return be(f,n,r,a),f;if(Array.isArray(f)){for(var p=yt(f)||[],d=0;d<p.length;d++)be(p[d],n,r,a);return p}}function be(t,e,n,r){t.fnContext=n,t.fnOptions=r,e.slot&&((t.data||(t.data={})).slot=e.slot)}function _e(t,e){for(var n in e)t[vo(n)]=e[n]}function we(t,e,n,a,s){if(!r(t)){var c=n.$options._base;if(u(t)&&(t=c.extend(t)),"function"==typeof t){var l;if(r(t.cid)&&(l=t,void 0===(t=xt(l,c,n))))return wt(l,e,n,a,s);e=e||{},Ie(t),i(e.model)&&Oe(t.options,e);var f=vt(e,t,s);if(o(t.options.functional))return ge(t,f,e,n,a);var p=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var d=e.slot;e={},d&&(e.slot=d)}$e(e);var v=t.options.name||s;return new Ko("vue-component-"+t.cid+(v?"-"+v:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:f,listeners:p,tag:s,children:a},l)}}}function xe(t,e,n,r){var o={_isComponent:!0,parent:e,_parentVnode:t,_parentElm:n||null,_refElm:r||null},a=t.data.inlineTemplate;return i(a)&&(o.render=a.render,o.staticRenderFns=a.staticRenderFns),new t.componentOptions.Ctor(o)}function $e(t){t.hook||(t.hook={});for(var e=0;e<ka.length;e++){var n=ka[e],r=t.hook[n],i=Oa[n];t.hook[n]=r?Ce(i,r):i}}function Ce(t,e){return function(n,r,i,o){t(n,r,i,o),e(n,r,i,o)}}function Oe(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.props||(e.props={}))[n]=e.model.value;var o=e.on||(e.on={});i(o[r])?o[r]=[e.model.callback].concat(o[r]):o[r]=e.model.callback}function ke(t,e,n,r,i,a){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),o(a)&&(i=Ea),Ae(t,e,n,r,i)}function Ae(t,e,n,r,o){if(i(n)&&i(n.__ob__))return Jo();if(i(n)&&i(n.is)&&(e=n.is),!e)return Jo();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),o===Ea?r=yt(r):o===Aa&&(r=mt(r));var a,s;if("string"==typeof e){var u;s=t.$vnode&&t.$vnode.ns||Co.getTagNamespace(e),a=Co.isReservedTag(e)?new Ko(Co.parsePlatformTagName(e),n,r,void 0,void 0,t):i(u=Z(t.$options,"components",e))?we(u,n,t,r,e):new Ko(e,n,r,void 0,void 0,t)}else a=we(e,n,t,r);return Array.isArray(a)?a:i(a)?(i(s)&&Ee(a,s),i(n)&&Se(n),a):Jo()}function Ee(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),i(t.children))for(var a=0,s=t.children.length;a<s;a++){var u=t.children[a];i(u.tag)&&(r(u.ns)||o(n)&&"svg"!==u.tag)&&Ee(u,e,n)}}function Se(t){u(t.style)&&ct(t.style),u(t.class)&&ct(t.class)}function je(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=St(e._renderChildren,r),t.$scopedSlots=so,t._c=function(e,n,r,i){return ke(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return ke(t,e,n,r,i,!0)};var i=n&&n.data;R(t,"$attrs",i&&i.attrs||so,null,!0),R(t,"$listeners",e._parentListeners||so,null,!0)}function Te(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r,n._parentElm=e._parentElm,n._refElm=e._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}function Ie(t){var e=t.options;if(t.super){var n=Ie(t.super);if(n!==t.superOptions){t.superOptions=n;var r=Me(t);r&&w(t.extendOptions,r),e=t.options=X(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function Me(t){var e,n=t.options,r=t.extendOptions,i=t.sealedOptions;for(var o in n)n[o]!==i[o]&&(e||(e={}),e[o]=Le(n[o],r[o],i[o]));return e}function Le(t,e,n){if(Array.isArray(t)){var r=[];n=Array.isArray(n)?n:[n],e=Array.isArray(e)?e:[e];for(var i=0;i<t.length;i++)(e.indexOf(t[i])>=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function Pe(t){this._init(t)}function Ne(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function Fe(t){t.mixin=function(t){return this.options=X(this.options,t),this}}function De(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=X(n.options,t),a.super=n,a.options.props&&Re(a),a.options.computed&&Be(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,xo.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=w({},a.options),i[r]=a,a}}function Re(t){var e=t.options.props;for(var n in e)Gt(t.prototype,"_props",n)}function Be(t){var e=t.options.computed;for(var n in e)Zt(t.prototype,n,e[n])}function Ve(t){xo.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Ue(t){return t&&(t.Ctor.options.name||t.tag)}function ze(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function He(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Ue(a.componentOptions);s&&!e(s)&&Ge(n,o,r,i)}}}function Ge(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,h(n,e)}function qe(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Ke(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=Ke(e,n.data));return We(e.staticClass,e.class)}function Ke(t,e){return{staticClass:Je(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function We(t,e){return i(t)||i(e)?Je(t,Xe(e)):""}function Je(t,e){return t?e?t+" "+e:t:e||""}function Xe(t){return Array.isArray(t)?Ze(t):u(t)?Ye(t):"string"==typeof t?t:""}function Ze(t){for(var e,n="",r=0,o=t.length;r<o;r++)i(e=Xe(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}function Ye(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function Qe(t){return Qa(t)?"svg":"math"===t?"math":void 0}function tn(t){if(!Ao)return!0;if(es(t))return!1;if(t=t.toLowerCase(),null!=ns[t])return ns[t];var e=document.createElement(t);return t.indexOf("-")>-1?ns[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ns[t]=/HTMLUnknownElement/.test(e.toString())}function en(t){if("string"==typeof t){return document.querySelector(t)||document.createElement("div")}return t}function nn(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function rn(t,e){return document.createElementNS(Za[t],e)}function on(t){return document.createTextNode(t)}function an(t){return document.createComment(t)}function sn(t,e,n){t.insertBefore(e,n)}function un(t,e){t.removeChild(e)}function cn(t,e){t.appendChild(e)}function ln(t){return t.parentNode}function fn(t){return t.nextSibling}function pn(t){return t.tagName}function dn(t,e){t.textContent=e}function vn(t,e){t.setAttribute(e,"")}function hn(t,e){var n=t.data.ref;if(i(n)){var r=t.context,o=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?h(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}function mn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&yn(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function yn(t,e){if("input"!==t.tag)return!0;var n,r=i(n=t.data)&&i(n=n.attrs)&&n.type,o=i(n=e.data)&&i(n=n.attrs)&&n.type;return r===o||rs(r)&&rs(o)}function gn(t,e,n){var r,o,a={};for(r=e;r<=n;++r)o=t[r].key,i(o)&&(a[o]=r);return a}function bn(t,e){(t.data.directives||e.data.directives)&&_n(t,e)}function _n(t,e){var n,r,i,o=t===as,a=e===as,s=wn(t.data.directives,t.context),u=wn(e.data.directives,e.context),c=[],l=[];for(n in u)r=s[n],i=u[n],r?(i.oldValue=r.value,$n(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):($n(i,"bind",e,t),i.def&&i.def.inserted&&c.push(i));if(c.length){var f=function(){for(var n=0;n<c.length;n++)$n(c[n],"inserted",e,t)};o?dt(e,"insert",f):f()}if(l.length&&dt(e,"postpatch",function(){for(var n=0;n<l.length;n++)$n(l[n],"componentUpdated",e,t)}),!o)for(n in s)u[n]||$n(s[n],"unbind",t,t,a)}function wn(t,e){var n=Object.create(null);if(!t)return n;var r,i;for(r=0;r<t.length;r++)i=t[r],i.modifiers||(i.modifiers=cs),n[xn(i)]=i,i.def=Z(e.$options,"directives",i.name,!0);return n}function xn(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function $n(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(r){rt(r,n.context,"directive "+t.name+" "+e+" hook")}}function Cn(t,e){var n=e.componentOptions;if(!(i(n)&&!1===n.Ctor.options.inheritAttrs||r(t.data.attrs)&&r(e.data.attrs))){var o,a,s=e.elm,u=t.data.attrs||{},c=e.data.attrs||{};i(c.__ob__)&&(c=e.data.attrs=w({},c));for(o in c)a=c[o],u[o]!==a&&On(s,o,a);(To||Mo)&&c.value!==u.value&&On(s,"value",c.value);for(o in u)r(c[o])&&(Wa(o)?s.removeAttributeNS(Ka,Ja(o)):Ga(o)||s.removeAttribute(o))}}function On(t,e,n){t.tagName.indexOf("-")>-1?kn(t,e,n):qa(e)?Xa(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Ga(e)?t.setAttribute(e,Xa(n)||"false"===n?"false":"true"):Wa(e)?Xa(n)?t.removeAttributeNS(Ka,Ja(e)):t.setAttributeNS(Ka,e,n):kn(t,e,n)}function kn(t,e,n){if(Xa(n))t.removeAttribute(e);else{if(To&&!Io&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}function An(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=qe(e),u=n._transitionClasses;i(u)&&(s=Je(s,Xe(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function En(t){function e(){(a||(a=[])).push(t.slice(v,i).trim()),v=i+1}var n,r,i,o,a,s=!1,u=!1,c=!1,l=!1,f=0,p=0,d=0,v=0;for(i=0;i<t.length;i++)if(r=n,n=t.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(u)34===n&&92!==r&&(u=!1);else if(c)96===n&&92!==r&&(c=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===t.charCodeAt(i+1)||124===t.charCodeAt(i-1)||f||p||d){switch(n){case 34:u=!0;break;case 39:s=!0;break;case 96:c=!0;break;case 40:d++;break;case 41:d--;break;case 91:p++;break;case 93:p--;break;case 123:f++;break;case 125:f--}if(47===n){for(var h=i-1,m=void 0;h>=0&&" "===(m=t.charAt(h));h--);m&&ds.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==v&&e(),a)for(i=0;i<a.length;i++)o=Sn(o,a[i]);return o}function Sn(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var r=e.slice(0,n),i=e.slice(n+1);return'_f("'+r+'")('+t+(")"!==i?","+i:i)}function jn(t){console.error("[Vue compiler]: "+t)}function Tn(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function In(t,e,n){(t.props||(t.props=[])).push({name:e,value:n}),t.plain=!1}function Mn(t,e,n){(t.attrs||(t.attrs=[])).push({name:e,value:n}),t.plain=!1}function Ln(t,e,n){t.attrsMap[e]=n,t.attrsList.push({name:e,value:n})}function Pn(t,e,n,r,i,o){(t.directives||(t.directives=[])).push({name:e,rawName:n,value:r,arg:i,modifiers:o}),t.plain=!1}function Nn(t,e,n,r,i,o){r=r||so,r.capture&&(delete r.capture,e="!"+e),r.once&&(delete r.once,e="~"+e),r.passive&&(delete r.passive,e="&"+e),"click"===e&&(r.right?(e="contextmenu",delete r.right):r.middle&&(e="mouseup"));var a;r.native?(delete r.native,a=t.nativeEvents||(t.nativeEvents={})):a=t.events||(t.events={});var s={value:n.trim()};r!==so&&(s.modifiers=r);var u=a[e];Array.isArray(u)?i?u.unshift(s):u.push(s):a[e]=u?i?[s,u]:[u,s]:s,t.plain=!1}function Fn(t,e,n){var r=Dn(t,":"+e)||Dn(t,"v-bind:"+e);if(null!=r)return En(r);if(!1!==n){var i=Dn(t,e);if(null!=i)return JSON.stringify(i)}}function Dn(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===e){i.splice(o,1);break}return n&&delete t.attrsMap[e],r}function Rn(t,e,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Bn(e,a);t.model={value:"("+e+")",expression:'"'+e+'"',callback:"function ($$v) {"+s+"}"}}function Bn(t,e){var n=Vn(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Vn(t){if(t=t.trim(),Ma=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Ma-1)return Na=t.lastIndexOf("."),Na>-1?{exp:t.slice(0,Na),key:'"'+t.slice(Na+1)+'"'}:{exp:t,key:null};for(La=t,Na=Fa=Da=0;!zn();)Pa=Un(),Hn(Pa)?qn(Pa):91===Pa&&Gn(Pa);return{exp:t.slice(0,Fa),key:t.slice(Fa+1,Da)}}function Un(){return La.charCodeAt(++Na)}function zn(){return Na>=Ma}function Hn(t){return 34===t||39===t}function Gn(t){var e=1;for(Fa=Na;!zn();)if(t=Un(),Hn(t))qn(t);else if(91===t&&e++,93===t&&e--,0===e){Da=Na;break}}function qn(t){for(var e=t;!zn()&&(t=Un())!==e;);}function Kn(t,e,n){Ra=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Rn(t,r,i),!1;if("select"===o)Xn(t,r,i);else if("input"===o&&"checkbox"===a)Wn(t,r,i);else if("input"===o&&"radio"===a)Jn(t,r,i);else if("input"===o||"textarea"===o)Zn(t,r,i);else if(!Co.isReservedTag(o))return Rn(t,r,i),!1;return!0}function Wn(t,e,n){var r=n&&n.number,i=Fn(t,"value")||"null",o=Fn(t,"true-value")||"true",a=Fn(t,"false-value")||"false";In(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Nn(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Bn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Bn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Bn(e,"$$c")+"}",null,!0)}function Jn(t,e,n){var r=n&&n.number,i=Fn(t,"value")||"null";i=r?"_n("+i+")":i,In(t,"checked","_q("+e+","+i+")"),Nn(t,"change",Bn(e,i),null,!0)}function Xn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+Bn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Nn(t,"change",o,null,!0)}function Zn(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,u=!o&&"range"!==r,c=o?"change":"range"===r?vs:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Bn(e,l);u&&(f="if($event.target.composing)return;"+f),In(t,"value","("+e+")"),Nn(t,c,f,null,!0),(s||a)&&Nn(t,"blur","$forceUpdate()")}function Yn(t){if(i(t[vs])){var e=To?"change":"input";t[e]=[].concat(t[vs],t[e]||[]),delete t[vs]}i(t[hs])&&(t.change=[].concat(t[hs],t.change||[]),delete t[hs])}function Qn(t,e,n){var r=Ba;return function i(){null!==t.apply(null,arguments)&&er(e,i,n,r)}}function tr(t,e,n,r,i){e=st(e),n&&(e=Qn(e,t,r)),Ba.addEventListener(t,e,No?{capture:r,passive:i}:r)}function er(t,e,n,r){(r||Ba).removeEventListener(t,e._withTask||e,n)}function nr(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};Ba=e.elm,Yn(n),pt(n,i,tr,er,e.context),Ba=void 0}}function rr(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},u=e.data.domProps||{};i(u.__ob__)&&(u=e.data.domProps=w({},u));for(n in s)r(u[n])&&(a[n]="");for(n in u){if(o=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var c=r(o)?"":String(o);ir(a,c)&&(a.value=c)}else a[n]=o}}}function ir(t,e){return!t.composing&&("OPTION"===t.tagName||or(t,e)||ar(t,e))}function or(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function ar(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}function sr(t){var e=ur(t.style);return t.staticStyle?w(t.staticStyle,e):e}function ur(t){return Array.isArray(t)?x(t):"string"==typeof t?gs(t):t}function cr(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=sr(i.data))&&w(r,n);(n=sr(t.data))&&w(r,n);for(var o=t;o=o.parent;)o.data&&(n=sr(o.data))&&w(r,n);return r}function lr(t,e){var n=e.data,o=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,u=e.elm,c=o.staticStyle,l=o.normalizedStyle||o.style||{},f=c||l,p=ur(e.data.style)||{};e.data.normalizedStyle=i(p.__ob__)?w({},p):p;var d=cr(e,!0);for(s in f)r(d[s])&&ws(u,s,"");for(s in d)(a=d[s])!==f[s]&&ws(u,s,null==a?"":a)}}function fr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function pr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function dr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&w(e,Os(t.name||"v")),w(e,t),e}return"string"==typeof t?Os(t):void 0}}function vr(t){Ms(function(){Ms(t)})}function hr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),fr(t,e))}function mr(t,e){t._transitionClasses&&h(t._transitionClasses,e),pr(t,e)}function yr(t,e,n){var r=gr(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===As?js:Is,u=0,c=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++u>=a&&c()};setTimeout(function(){u<a&&c()},o+1),t.addEventListener(s,l)}function gr(t,e){var n,r=window.getComputedStyle(t),i=r[Ss+"Delay"].split(", "),o=r[Ss+"Duration"].split(", "),a=br(i,o),s=r[Ts+"Delay"].split(", "),u=r[Ts+"Duration"].split(", "),c=br(s,u),l=0,f=0;return e===As?a>0&&(n=As,l=a,f=o.length):e===Es?c>0&&(n=Es,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?As:Es:null,f=n?n===As?o.length:u.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===As&&Ls.test(r[Ss+"Property"])}}function br(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return _r(e)+_r(t[n])}))}function _r(t){return 1e3*Number(t.slice(0,-1))}function wr(t,e){var n=t.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=dr(t.data.transition);if(!r(o)&&!i(n._enterCb)&&1===n.nodeType){for(var a=o.css,s=o.type,c=o.enterClass,l=o.enterToClass,f=o.enterActiveClass,p=o.appearClass,v=o.appearToClass,h=o.appearActiveClass,m=o.beforeEnter,y=o.enter,g=o.afterEnter,b=o.enterCancelled,_=o.beforeAppear,w=o.appear,x=o.afterAppear,$=o.appearCancelled,C=o.duration,O=va,A=va.$vnode;A&&A.parent;)A=A.parent,O=A.context;var E=!O._isMounted||!t.isRootInsert;if(!E||w||""===w){var S=E&&p?p:c,j=E&&h?h:f,T=E&&v?v:l,I=E?_||m:m,M=E&&"function"==typeof w?w:y,L=E?x||g:g,P=E?$||b:b,N=d(u(C)?C.enter:C),F=!1!==a&&!Io,D=Cr(M),R=n._enterCb=k(function(){F&&(mr(n,T),mr(n,j)),R.cancelled?(F&&mr(n,S),P&&P(n)):L&&L(n),n._enterCb=null});t.data.show||dt(t,"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),M&&M(n,R)}),I&&I(n),F&&(hr(n,S),hr(n,j),vr(function(){mr(n,S),R.cancelled||(hr(n,T),D||($r(N)?setTimeout(R,N):yr(n,s,R)))})),t.data.show&&(e&&e(),M&&M(n,R)),F||D||R()}}}function xr(t,e){function n(){$.cancelled||(t.data.show||((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),v&&v(o),_&&(hr(o,l),hr(o,p),vr(function(){mr(o,l),$.cancelled||(hr(o,f),w||($r(x)?setTimeout($,x):yr(o,c,$)))})),h&&h(o,$),_||w||$())}var o=t.elm;i(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=dr(t.data.transition);if(r(a)||1!==o.nodeType)return e();if(!i(o._leaveCb)){var s=a.css,c=a.type,l=a.leaveClass,f=a.leaveToClass,p=a.leaveActiveClass,v=a.beforeLeave,h=a.leave,m=a.afterLeave,y=a.leaveCancelled,g=a.delayLeave,b=a.duration,_=!1!==s&&!Io,w=Cr(h),x=d(u(b)?b.leave:b),$=o._leaveCb=k(function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(mr(o,f),mr(o,p)),$.cancelled?(_&&mr(o,l),y&&y(o)):(e(),m&&m(o)),o._leaveCb=null});g?g(n):n()}}function $r(t){return"number"==typeof t&&!isNaN(t)}function Cr(t){if(r(t))return!1;var e=t.fns;return i(e)?Cr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Or(t,e){!0!==e.data.show&&wr(e)}function kr(t,e,n){Ar(t,e,n),(To||Mo)&&setTimeout(function(){Ar(t,e,n)},0)}function Ar(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=t.options.length;s<u;s++)if(a=t.options[s],i)o=O(r,Sr(a))>-1,a.selected!==o&&(a.selected=o);else if(C(Sr(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Er(t,e){return e.every(function(e){return!C(e,t)})}function Sr(t){return"_value"in t?t._value:t.value}function jr(t){t.target.composing=!0}function Tr(t){t.target.composing&&(t.target.composing=!1,Ir(t.target,"input"))}function Ir(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Mr(t){return!t.componentInstance||t.data&&t.data.transition?t:Mr(t.componentInstance._vnode)}function Lr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Lr(Ct(e.children)):t}function Pr(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[vo(o)]=i[o];return e}function Nr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Fr(t){for(;t=t.parent;)if(t.data.transition)return!0}function Dr(t,e){return e.key===t.key&&e.tag===t.tag}function Rr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Br(t){t.data.newPos=t.elm.getBoundingClientRect()}function Vr(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Ur(t,e){var n=e?Xs(e):Ws;if(n.test(t)){for(var r,i,o,a=[],s=[],u=n.lastIndex=0;r=n.exec(t);){(i=r.index)>u&&(s.push(o=t.slice(u,i)),a.push(JSON.stringify(o)));var c=En(r[1].trim());a.push("_s("+c+")"),s.push({"@binding":c}),u=i+r[0].length}return u<t.length&&(s.push(o=t.slice(u)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}function zr(t,e){var n=(e.warn,Dn(t,"class"));n&&(t.staticClass=JSON.stringify(n));var r=Fn(t,"class",!1);r&&(t.classBinding=r)}function Hr(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}function Gr(t,e){var n=(e.warn,Dn(t,"style"));n&&(t.staticStyle=JSON.stringify(gs(n)));var r=Fn(t,"style",!1);r&&(t.styleBinding=r)}function qr(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}function Kr(t,e){var n=e?Eu:Au;return t.replace(n,function(t){return ku[t]})}function Wr(t,e){function n(e){l+=e,t=t.substring(e)}function r(t,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),t&&(s=t.toLowerCase()),t)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var u=a.length-1;u>=i;u--)e.end&&e.end(a[u].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,u=e.isUnaryTag||bo,c=e.canBeLeftOpenTag||bo,l=0;t;){if(i=t,o&&Cu(o)){var f=0,p=o.toLowerCase(),d=Ou[p]||(Ou[p]=new RegExp("([\\s\\S]*?)(</"+p+"[^>]*>)","i")),v=t.replace(d,function(t,n,r){return f=r.length,Cu(p)||"noscript"===p||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),ju(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-v.length,t=v,r(p,l-f,l)}else{var h=t.indexOf("<");if(0===h){if(lu.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(fu.test(t)){var y=t.indexOf("]>");if(y>=0){n(y+2);continue}}var g=t.match(cu);if(g){n(g[0].length);continue}var b=t.match(uu);if(b){var _=l;n(b[0].length),r(b[1],_,l);continue}var w=function(){var e=t.match(au);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(su))&&(o=t.match(ru));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if(w){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&nu(n)&&r(o),c(n)&&o===n&&r(n));for(var l=u(n)||!!i,f=t.attrs.length,p=new Array(f),d=0;d<f;d++){var v=t.attrs[d];pu&&-1===v[0].indexOf('""')&&(""===v[3]&&delete v[3],""===v[4]&&delete v[4],""===v[5]&&delete v[5]);var h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;p[d]={name:v[1],value:Kr(h,m)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:p}),o=n),e.start&&e.start(n,p,l,t.start,t.end)}(w),ju(o,t)&&n(1);continue}}var x=void 0,$=void 0,C=void 0;if(h>=0){for($=t.slice(h);!(uu.test($)||au.test($)||lu.test($)||fu.test($)||(C=$.indexOf("<",1))<0);)h+=C,$=t.slice(h);x=t.substring(0,h),n(h)}h<0&&(x=t,t=""),e.chars&&x&&e.chars(x)}if(t===i){e.chars&&e.chars(t);break}}r()}function Jr(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:vi(e),parent:n,children:[]}}function Xr(t,e){function n(t){t.pre&&(s=!1),gu(t.tag)&&(u=!1);for(var n=0;n<yu.length;n++)yu[n](t,e)}du=e.warn||jn,gu=e.isPreTag||bo,bu=e.mustUseProp||bo,_u=e.getTagNamespace||bo,hu=Tn(e.modules,"transformNode"),mu=Tn(e.modules,"preTransformNode"),yu=Tn(e.modules,"postTransformNode"),vu=e.delimiters;var r,i,o=[],a=!1!==e.preserveWhitespace,s=!1,u=!1;return Wr(t,{warn:du,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,c){var l=i&&i.ns||_u(t);To&&"svg"===l&&(a=yi(a));var f=Jr(t,a,i);l&&(f.ns=l),mi(f)&&!Bo()&&(f.forbidden=!0);for(var p=0;p<mu.length;p++)f=mu[p](f,e)||f;if(s||(Zr(f),f.pre&&(s=!0)),gu(f.tag)&&(u=!0),s?Yr(f):f.processed||(ni(f),ii(f),ui(f),Qr(f,e)),r?o.length||r.if&&(f.elseif||f.else)&&si(r,{exp:f.elseif,block:f}):r=f,i&&!f.forbidden)if(f.elseif||f.else)oi(f,i);else if(f.slotScope){i.plain=!1;var d=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[d]=f}else i.children.push(f),f.parent=i;c?n(f):(i=f,o.push(f))},end:function(){var t=o[o.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!u&&t.children.pop(),o.length-=1,i=o[o.length-1],n(t)},chars:function(t){if(i&&(!To||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var e=i.children;if(t=u||t.trim()?hi(i)?t:Ru(t):a&&e.length?" ":""){var n;!s&&" "!==t&&(n=Ur(t,vu))?e.push({type:2,expression:n.expression,tokens:n.tokens,text:t}):" "===t&&e.length&&" "===e[e.length-1].text||e.push({type:3,text:t})}}},comment:function(t){i.children.push({type:3,text:t,isComment:!0})}}),r}function Zr(t){null!=Dn(t,"v-pre")&&(t.pre=!0)}function Yr(t){var e=t.attrsList.length;if(e)for(var n=t.attrs=new Array(e),r=0;r<e;r++)n[r]={name:t.attrsList[r].name,value:JSON.stringify(t.attrsList[r].value)};else t.pre||(t.plain=!0)}function Qr(t,e){ti(t),t.plain=!t.key&&!t.attrsList.length,ei(t),ci(t),li(t);for(var n=0;n<hu.length;n++)t=hu[n](t,e)||t;fi(t)}function ti(t){var e=Fn(t,"key");e&&(t.key=e)}function ei(t){var e=Fn(t,"ref");e&&(t.ref=e,t.refInFor=pi(t))}function ni(t){var e;if(e=Dn(t,"v-for")){var n=ri(e);n&&w(t,n)}}function ri(t){var e=t.match(Mu);if(e){var n={};n.for=e[2].trim();var r=e[1].trim().replace(Pu,""),i=r.match(Lu);return i?(n.alias=r.replace(Lu,""),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r,n}}function ii(t){var e=Dn(t,"v-if");if(e)t.if=e,si(t,{exp:e,block:t});else{null!=Dn(t,"v-else")&&(t.else=!0);var n=Dn(t,"v-else-if");n&&(t.elseif=n)}}function oi(t,e){var n=ai(e.children);n&&n.if&&si(n,{exp:t.elseif,block:t})}function ai(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}function si(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function ui(t){null!=Dn(t,"v-once")&&(t.once=!0)}function ci(t){if("slot"===t.tag)t.slotName=Fn(t,"name");else{var e;"template"===t.tag?(e=Dn(t,"scope"),t.slotScope=e||Dn(t,"slot-scope")):(e=Dn(t,"slot-scope"))&&(t.slotScope=e);var n=Fn(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,"template"===t.tag||t.slotScope||Mn(t,"slot",n))}}function li(t){var e;(e=Fn(t,"is"))&&(t.component=e),null!=Dn(t,"inline-template")&&(t.inlineTemplate=!0)}function fi(t){var e,n,r,i,o,a,s,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=i=u[e].name,o=u[e].value,Iu.test(r))if(t.hasBindings=!0,a=di(r),a&&(r=r.replace(Du,"")),Fu.test(r))r=r.replace(Fu,""),o=En(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=vo(r))&&(r="innerHTML")),a.camel&&(r=vo(r)),a.sync&&Nn(t,"update:"+vo(r),Bn(o,"$event"))),s||!t.component&&bu(t.tag,t.attrsMap.type,r)?In(t,r,o):Mn(t,r,o);else if(Tu.test(r))r=r.replace(Tu,""),Nn(t,r,o,a,!1,du);else{r=r.replace(Iu,"");var c=r.match(Nu),l=c&&c[1];l&&(r=r.slice(0,-(l.length+1))),Pn(t,r,i,o,l,a)}else Mn(t,r,JSON.stringify(o)),!t.component&&"muted"===r&&bu(t.tag,t.attrsMap.type,r)&&In(t,r,"true")}function pi(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}function di(t){var e=t.match(Du);if(e){var n={};return e.forEach(function(t){n[t.slice(1)]=!0}),n}}function vi(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}function hi(t){return"script"===t.tag||"style"===t.tag}function mi(t){return"style"===t.tag||"script"===t.tag&&(!t.attrsMap.type||"text/javascript"===t.attrsMap.type)}function yi(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Bu.test(r.name)||(r.name=r.name.replace(Vu,""),e.push(r))}return e}function gi(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r;if((n[":type"]||n["v-bind:type"])&&(r=Fn(t,"type")),!r&&n["v-bind"]&&(r="("+n["v-bind"]+").type"),r){var i=Dn(t,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Dn(t,"v-else",!0),s=Dn(t,"v-else-if",!0),u=bi(t);ni(u),Ln(u,"type","checkbox"),Qr(u,e),u.processed=!0,u.if="("+r+")==='checkbox'"+o,si(u,{exp:u.if,block:u});var c=bi(t);Dn(c,"v-for",!0),Ln(c,"type","radio"),Qr(c,e),si(u,{exp:"("+r+")==='radio'"+o,block:c});var l=bi(t);return Dn(l,"v-for",!0),Ln(l,":type",r),Qr(l,e),si(u,{exp:i,block:l}),a?u.else=!0:s&&(u.elseif=s),u}}}function bi(t){return Jr(t.tag,t.attrsList.slice(),t.parent)}function _i(t,e){e.value&&In(t,"textContent","_s("+e.value+")")}function wi(t,e){e.value&&In(t,"innerHTML","_s("+e.value+")")}function xi(t,e){t&&(wu=qu(e.staticKeys||""),xu=e.isReservedTag||bo,Ci(t),Oi(t,!1))}function $i(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))}function Ci(t){if(t.static=ki(t),1===t.type){if(!xu(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Ci(r),r.static||(t.static=!1)}if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++){var a=t.ifConditions[i].block;Ci(a),a.static||(t.static=!1)}}}function Oi(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Oi(t.children[n],e||!!t.for);if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++)Oi(t.ifConditions[i].block,e)}}function ki(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||co(t.tag)||!xu(t.tag)||Ai(t)||!Object.keys(t).every(wu))))}function Ai(t){for(;t.parent;){if(t=t.parent,"template"!==t.tag)return!1;if(t.for)return!0}return!1}function Ei(t,e,n){var r=e?"nativeOn:{":"on:{";for(var i in t)r+='"'+i+'":'+Si(i,t[i])+",";return r.slice(0,-1)+"}"}function Si(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return Si(t,e)}).join(",")+"]";var n=Wu.test(e.value),r=Ku.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Yu[s])o+=Yu[s],Ju[s]&&a.push(s);else if("exact"===s){var u=e.modifiers;o+=Zu(["ctrl","shift","alt","meta"].filter(function(t){return!u[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=ji(a)),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function ji(t){return"if(!('button' in $event)&&"+t.map(Ti).join("&&")+")return null;"}function Ti(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Ju[t],r=Xu[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function Ii(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function Mi(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}function Li(t,e){var n=new tc(e);return{render:"with(this){return "+(t?Pi(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Pi(t,e){if(t.staticRoot&&!t.staticProcessed)return Ni(t,e);if(t.once&&!t.onceProcessed)return Fi(t,e);if(t.for&&!t.forProcessed)return Bi(t,e);if(t.if&&!t.ifProcessed)return Di(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return Qi(t,e);var n;if(t.component)n=to(t.component,t,e);else{var r=t.plain?void 0:Vi(t,e),i=t.inlineTemplate?null:Ki(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<e.transforms.length;o++)n=e.transforms[o](t,n);return n}return Ki(t,e)||"void 0"}function Ni(t,e){return t.staticProcessed=!0,e.staticRenderFns.push("with(this){return "+Pi(t,e)+"}"),"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Fi(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Di(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Pi(t,e)+","+e.onceId+++","+n+")":Pi(t,e)}return Ni(t,e)}function Di(t,e,n,r){return t.ifProcessed=!0,Ri(t.ifConditions.slice(),e,n,r)}function Ri(t,e,n,r){function i(t){return n?n(t,e):t.once?Fi(t,e):Pi(t,e)}if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+Ri(t,e,n,r):""+i(o.block)}function Bi(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Pi)(t,e)+"})"}function Vi(t,e){var n="{",r=Ui(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:{"+eo(t.attrs)+"},"),t.props&&(n+="domProps:{"+eo(t.props)+"},"),t.events&&(n+=Ei(t.events,!1,e.warn)+","),t.nativeEvents&&(n+=Ei(t.nativeEvents,!0,e.warn)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=Hi(t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=zi(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Ui(t,e){var n=t.directives;if(n){var r,i,o,a,s="directives:[",u=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var c=e.directives[o.name];c&&(a=!!c(t,o,e.warn)),a&&(u=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return u?s.slice(0,-1)+"]":void 0}}function zi(t,e){var n=t.children[0];if(1===n.type){var r=Li(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}function Hi(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(n){return Gi(n,t[n],e)}).join(",")+"])"}function Gi(t,e,n){return e.for&&!e.forProcessed?qi(t,e,n):"{key:"+t+",fn:function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?e.if+"?"+(Ki(e,n)||"undefined")+":undefined":Ki(e,n)||"undefined":Pi(e,n))+"}}"}function qi(t,e,n){var r=e.for,i=e.alias,o=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+r+"),function("+i+o+a+"){return "+Gi(t,e,n)+"})"}function Ki(t,e,n,r,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||Pi)(a,e);var s=n?Wi(o,e.maybeComponent):0,u=i||Xi;return"["+o.map(function(t){return u(t,e)}).join(",")+"]"+(s?","+s:"")}}function Wi(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(Ji(i)||i.ifConditions&&i.ifConditions.some(function(t){return Ji(t.block)})){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some(function(t){return e(t.block)}))&&(n=1)}}return n}function Ji(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function Xi(t,e){return 1===t.type?Pi(t,e):3===t.type&&t.isComment?Yi(t):Zi(t)}function Zi(t){return"_v("+(2===t.type?t.expression:no(JSON.stringify(t.text)))+")"}function Yi(t){return"_e("+JSON.stringify(t.text)+")"}function Qi(t,e){var n=t.slotName||'"default"',r=Ki(t,e),i="_t("+n+(r?","+r:""),o=t.attrs&&"{"+t.attrs.map(function(t){return vo(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}function to(t,e,n){var r=e.inlineTemplate?null:Ki(e,n,!0);return"_c("+t+","+Vi(e,n)+(r?","+r:"")+")"}function eo(t){for(var e="",n=0;n<t.length;n++){var r=t[n];e+='"'+r.name+'":'+no(r.value)+","}return e.slice(0,-1)}function no(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ro(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),$}}function io(t){var e=Object.create(null);return function(n,r,i){r=w({},r),r.warn,delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(e[o])return e[o];var a=t(n,r),s={},u=[];return s.render=ro(a.render,u),s.staticRenderFns=a.staticRenderFns.map(function(t){return ro(t,u)}),e[o]=s}}function oo(t){return $u=$u||document.createElement("div"),$u.innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',$u.innerHTML.indexOf("&#10;")>0}function ao(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}/*!
+ * Vue.js v2.5.14
+ * (c) 2014-2018 Evan You
+ * Released under the MIT License.
+ */
+var so=Object.freeze({}),uo=Object.prototype.toString,co=v("slot,component",!0),lo=v("key,ref,slot,slot-scope,is"),fo=Object.prototype.hasOwnProperty,po=/-(\w)/g,vo=y(function(t){return t.replace(po,function(t,e){return e?e.toUpperCase():""})}),ho=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),mo=/\B([A-Z])/g,yo=y(function(t){return t.replace(mo,"-$1").toLowerCase()}),go=Function.prototype.bind?b:g,bo=function(t,e,n){return!1},_o=function(t){return t},wo="data-server-rendered",xo=["component","directive","filter"],$o=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Co={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:bo,isReservedAttr:bo,isUnknownElement:bo,getTagNamespace:$,parsePlatformTagName:_o,mustUseProp:bo,_lifecycleHooks:$o},Oo=/[^\w.$]/,ko="__proto__"in{},Ao="undefined"!=typeof window,Eo="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,So=Eo&&WXEnvironment.platform.toLowerCase(),jo=Ao&&window.navigator.userAgent.toLowerCase(),To=jo&&/msie|trident/.test(jo),Io=jo&&jo.indexOf("msie 9.0")>0,Mo=jo&&jo.indexOf("edge/")>0,Lo=(jo&&jo.indexOf("android"),jo&&/iphone|ipad|ipod|ios/.test(jo)||"ios"===So),Po=(jo&&/chrome\/\d+/.test(jo),{}.watch),No=!1;if(Ao)try{var Fo={};Object.defineProperty(Fo,"passive",{get:function(){No=!0}}),window.addEventListener("test-passive",null,Fo)}catch(t){}var Do,Ro,Bo=function(){return void 0===Do&&(Do=!Ao&&!Eo&&void 0!==t&&"server"===t.process.env.VUE_ENV),Do},Vo=Ao&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Uo="undefined"!=typeof Symbol&&j(Symbol)&&"undefined"!=typeof Reflect&&j(Reflect.ownKeys);Ro="undefined"!=typeof Set&&j(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var zo=$,Ho=0,Go=function(){this.id=Ho++,this.subs=[]};Go.prototype.addSub=function(t){this.subs.push(t)},Go.prototype.removeSub=function(t){h(this.subs,t)},Go.prototype.depend=function(){Go.target&&Go.target.addDep(this)},Go.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},Go.target=null;var qo=[],Ko=function(t,e,n,r,i,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},Wo={child:{configurable:!0}};Wo.child.get=function(){return this.componentInstance},Object.defineProperties(Ko.prototype,Wo);var Jo=function(t){void 0===t&&(t="");var e=new Ko;return e.text=t,e.isComment=!0,e},Xo=Array.prototype,Zo=Object.create(Xo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Xo[t];E(Zo,t,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var Yo=Object.getOwnPropertyNames(Zo),Qo=!0,ta=function(t){this.value=t,this.dep=new Go,this.vmCount=0,E(t,"__ob__",this),Array.isArray(t)?((ko?N:F)(t,Zo,Yo),this.observeArray(t)):this.walk(t)};ta.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)R(t,e[n])},ta.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)D(t[e])};var ea=Co.optionMergeStrategies;ea.data=function(t,e,n){return n?H(t,e,n):e&&"function"!=typeof e?t:H(t,e)},$o.forEach(function(t){ea[t]=G}),xo.forEach(function(t){ea[t+"s"]=q}),ea.watch=function(t,e,n,r){if(t===Po&&(t=void 0),e===Po&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};w(i,t);for(var o in e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},ea.props=ea.methods=ea.inject=ea.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return w(i,t),e&&w(i,e),i},ea.provide=H;var na,ra,ia=function(t,e){return void 0===e?t:e},oa=[],aa=!1,sa=!1;if(void 0!==n&&j(n))ra=function(){n(at)};else if("undefined"==typeof MessageChannel||!j(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())ra=function(){setTimeout(at,0)};else{var ua=new MessageChannel,ca=ua.port2;ua.port1.onmessage=at,ra=function(){ca.postMessage(1)}}if("undefined"!=typeof Promise&&j(Promise)){var la=Promise.resolve();na=function(){la.then(at),Lo&&setTimeout($)}}else na=ra;var fa,pa=new Ro,da=y(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}}),va=null,ha=[],ma=[],ya={},ga=!1,ba=!1,_a=0,wa=0,xa=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++wa,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Ro,this.newDepIds=new Ro,this.expression="","function"==typeof e?this.getter=e:(this.getter=S(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};xa.prototype.get=function(){T(this);var t,e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;rt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ct(t),I(),this.cleanupDeps()}return t},xa.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},xa.prototype.cleanupDeps=function(){for(var t=this,e=this.deps.length;e--;){var n=t.deps[e];t.newDepIds.has(n.id)||n.removeSub(t)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},xa.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Ht(this)},xa.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||u(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){rt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},xa.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},xa.prototype.depend=function(){for(var t=this,e=this.deps.length;e--;)t.deps[e].depend()},xa.prototype.teardown=function(){var t=this;if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)t.deps[e].removeSub(t);this.active=!1}};var $a={enumerable:!0,configurable:!0,get:$,set:$},Ca={lazy:!0};me(ye.prototype);var Oa={init:function(t,e,n,r){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var i=t;Oa.prepatch(i,i)}else(t.componentInstance=xe(t,va,n,r)).$mount(e?t.elm:void 0,e)},prepatch:function(t,e){var n=e.componentOptions;Lt(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,Dt(n,"mounted")),t.data.keepAlive&&(e._isMounted?Ut(n):Nt(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Ft(e,!0):e.$destroy())}},ka=Object.keys(Oa),Aa=1,Ea=2,Sa=0;!function(t){t.prototype._init=function(t){var e=this;e._uid=Sa++,e._isVue=!0,t&&t._isComponent?Te(e,t):e.$options=X(Ie(e.constructor),t||{},e),e._renderProxy=e,e._self=e,It(e),Ot(e),je(e),Dt(e,"beforeCreate"),re(e),qt(e),ne(e),Dt(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Pe),function(t){var e={};e.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=B,t.prototype.$delete=V,t.prototype.$watch=function(t,e,n){var r=this;if(c(e))return ee(r,t,e,n);n=n||{},n.user=!0;var i=new xa(r,t,e,n);return n.immediate&&e.call(r,i.value),function(){i.teardown()}}}(Pe),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this,i=this;if(Array.isArray(t))for(var o=0,a=t.length;o<a;o++)r.$on(t[o],n);else(i._events[t]||(i._events[t]=[])).push(n),e.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){function n(){r.$off(t,n),e.apply(r,arguments)}var r=this;return n.fn=e,r.$on(t,n),r},t.prototype.$off=function(t,e){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(t)){for(var i=0,o=t.length;i<o;i++)n.$off(t[i],e);return r}var a=r._events[t];if(!a)return r;if(!e)return r._events[t]=null,r;if(e)for(var s,u=a.length;u--;)if((s=a[u])===e||s.fn===e){a.splice(u,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?_(n):n;for(var r=_(arguments,1),i=0,o=n.length;i<o;i++)try{n[i].apply(e,r)}catch(n){rt(n,e,'event handler for "'+t+'"')}}return e}}(Pe),function(t){t.prototype._update=function(t,e){var n=this;n._isMounted&&Dt(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=va;va=n,n._vnode=t,i?n.$el=n.__patch__(i,t):(n.$el=n.__patch__(n.$el,t,e,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),va=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Dt(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||h(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Dt(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Pe),function(t){me(t.prototype),t.prototype.$nextTick=function(t){return ut(t,this)},t.prototype._render=function(){var t=this,e=t.$options,n=e.render,r=e._parentVnode;r&&(t.$scopedSlots=r.data.scopedSlots||so),t.$vnode=r;var i;try{i=n.call(t._renderProxy,t.$createElement)}catch(e){rt(e,t,"render"),i=t._vnode}return i instanceof Ko||(i=Jo()),i.parent=r,i}}(Pe);var ja=[String,RegExp,Array],Ta={name:"keep-alive",abstract:!0,props:{include:ja,exclude:ja,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var t=this;for(var e in t.cache)Ge(t.cache,e,t.keys)},watch:{include:function(t){He(this,function(e){return ze(t,e)})},exclude:function(t){He(this,function(e){return!ze(t,e)})}},render:function(){var t=this.$slots.default,e=Ct(t),n=e&&e.componentOptions;if(n){var r=Ue(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!ze(o,r))||a&&r&&ze(a,r))return e;var s=this,u=s.cache,c=s.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;u[l]?(e.componentInstance=u[l].componentInstance,h(c,l),c.push(l)):(u[l]=e,c.push(l),this.max&&c.length>parseInt(this.max)&&Ge(u,c[0],c,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Ia={KeepAlive:Ta};!function(t){var e={};e.get=function(){return Co},Object.defineProperty(t,"config",e),t.util={warn:zo,extend:w,mergeOptions:X,defineReactive:R},t.set=B,t.delete=V,t.nextTick=ut,t.options=Object.create(null),xo.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,w(t.options.components,Ia),Ne(t),Fe(t),De(t),Ve(t)}(Pe),Object.defineProperty(Pe.prototype,"$isServer",{get:Bo}),Object.defineProperty(Pe.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Pe,"FunctionalRenderContext",{value:ye}),Pe.version="2.5.14";var Ma,La,Pa,Na,Fa,Da,Ra,Ba,Va,Ua=v("style,class"),za=v("input,textarea,option,select,progress"),Ha=function(t,e,n){return"value"===n&&za(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ga=v("contenteditable,draggable,spellcheck"),qa=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ka="http://www.w3.org/1999/xlink",Wa=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Ja=function(t){return Wa(t)?t.slice(6,t.length):""},Xa=function(t){return null==t||!1===t},Za={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Ya=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Qa=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),ts=function(t){return"pre"===t},es=function(t){return Ya(t)||Qa(t)},ns=Object.create(null),rs=v("text,number,password,search,email,tel,url"),is=Object.freeze({createElement:nn,createElementNS:rn,createTextNode:on,createComment:an,insertBefore:sn,removeChild:un,appendChild:cn,parentNode:ln,nextSibling:fn,tagName:pn,setTextContent:dn,setStyleScope:vn}),os={create:function(t,e){hn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(hn(t,!0),hn(e))},destroy:function(t){hn(t,!0)}},as=new Ko("",{},[]),ss=["create","activate","update","remove","destroy"],us={create:bn,update:bn,destroy:function(t){bn(t,as)}},cs=Object.create(null),ls=[os,us],fs={create:Cn,update:Cn},ps={create:An,update:An},ds=/[\w).+\-_$\]]/,vs="__r",hs="__c",ms={create:nr,update:nr},ys={create:rr,update:rr},gs=y(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),bs=/^--/,_s=/\s*!important$/,ws=function(t,e,n){if(bs.test(e))t.style.setProperty(e,n);else if(_s.test(n))t.style.setProperty(e,n.replace(_s,""),"important");else{var r=$s(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},xs=["Webkit","Moz","ms"],$s=y(function(t){if(Va=Va||document.createElement("div").style,"filter"!==(t=vo(t))&&t in Va)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<xs.length;n++){var r=xs[n]+e;if(r in Va)return r}}),Cs={create:lr,update:lr},Os=y(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),ks=Ao&&!Io,As="transition",Es="animation",Ss="transition",js="transitionend",Ts="animation",Is="animationend";ks&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ss="WebkitTransition",js="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ts="WebkitAnimation",Is="webkitAnimationEnd"));var Ms=Ao?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()},Ls=/\b(transform|all)(,|$)/,Ps=Ao?{create:Or,activate:Or,remove:function(t,e){!0!==t.data.show?xr(t,e):e()}}:{},Ns=[fs,ps,ms,ys,Cs,Ps],Fs=Ns.concat(ls),Ds=function(t){function e(t){return new Ko(T.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0==--n.listeners&&a(t)}return n.listeners=e,n}function a(t){var e=T.parentNode(t);i(e)&&T.removeChild(e,t)}function u(t,e,n,r,a,s,u){if(i(t.elm)&&i(s)&&(t=s[u]=L(t)),t.isRootInsert=!a,!c(t,e,n,r)){var l=t.data,f=t.children,v=t.tag;i(v)?(t.elm=t.ns?T.createElementNS(t.ns,v):T.createElement(v,t),y(t),d(t,f,e),i(l)&&m(t,e),p(n,t.elm,r)):o(t.isComment)?(t.elm=T.createComment(t.text),p(n,t.elm,r)):(t.elm=T.createTextNode(t.text),p(n,t.elm,r))}}function c(t,e,n,r){var a=t.data;if(i(a)){var s=i(t.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(t,!1,n,r),i(t.componentInstance))return l(t,e),o(s)&&f(t,e,n,r),!0}}function l(t,e){i(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,h(t)?(m(t,e),y(t)):(hn(t),e.push(t))}function f(t,e,n,r){for(var o,a=t;a.componentInstance;)if(a=a.componentInstance._vnode,i(o=a.data)&&i(o=o.transition)){for(o=0;o<S.activate.length;++o)S.activate[o](as,a);e.push(a);break}p(n,t.elm,r)}function p(t,e,n){i(t)&&(i(n)?n.parentNode===t&&T.insertBefore(t,e,n):T.appendChild(t,e))}function d(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)u(e[r],n,t.elm,null,!0,e,r);else s(t.text)&&T.appendChild(t.elm,T.createTextNode(String(t.text)))}function h(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return i(t.tag)}function m(t,e){for(var n=0;n<S.create.length;++n)S.create[n](as,t);A=t.data.hook,i(A)&&(i(A.create)&&A.create(as,t),i(A.insert)&&e.push(t))}function y(t){var e;if(i(e=t.fnScopeId))T.setStyleScope(t.elm,e);else for(var n=t;n;)i(e=n.context)&&i(e=e.$options._scopeId)&&T.setStyleScope(t.elm,e),n=n.parent;i(e=va)&&e!==t.context&&e!==t.fnContext&&i(e=e.$options._scopeId)&&T.setStyleScope(t.elm,e)}function g(t,e,n,r,i,o){for(;r<=i;++r)u(n[r],o,t,e,!1,n,r)}function b(t){var e,n,r=t.data;if(i(r))for(i(e=r.hook)&&i(e=e.destroy)&&e(t),e=0;e<S.destroy.length;++e)S.destroy[e](t);if(i(e=t.children))for(n=0;n<t.children.length;++n)b(t.children[n])}function _(t,e,n,r){for(;n<=r;++n){var o=e[n];i(o)&&(i(o.tag)?(w(o),b(o)):a(o.elm))}}function w(t,e){if(i(e)||i(t.data)){var r,o=S.remove.length+1;for(i(e)?e.listeners+=o:e=n(t.elm,o),i(r=t.componentInstance)&&i(r=r._vnode)&&i(r.data)&&w(r,e),r=0;r<S.remove.length;++r)S.remove[r](t,e);i(r=t.data.hook)&&i(r=r.remove)?r(t,e):e()}else a(t.elm)}function x(t,e,n,o,a){for(var s,c,l,f,p=0,d=0,v=e.length-1,h=e[0],m=e[v],y=n.length-1,b=n[0],w=n[y],x=!a;p<=v&&d<=y;)r(h)?h=e[++p]:r(m)?m=e[--v]:mn(h,b)?(C(h,b,o),h=e[++p],b=n[++d]):mn(m,w)?(C(m,w,o),m=e[--v],w=n[--y]):mn(h,w)?(C(h,w,o),x&&T.insertBefore(t,h.elm,T.nextSibling(m.elm)),h=e[++p],w=n[--y]):mn(m,b)?(C(m,b,o),x&&T.insertBefore(t,m.elm,h.elm),m=e[--v],b=n[++d]):(r(s)&&(s=gn(e,p,v)),c=i(b.key)?s[b.key]:$(b,e,p,v),r(c)?u(b,o,t,h.elm,!1,n,d):(l=e[c],mn(l,b)?(C(l,b,o),e[c]=void 0,x&&T.insertBefore(t,l.elm,h.elm)):u(b,o,t,h.elm,!1,n,d)),b=n[++d]);p>v?(f=r(n[y+1])?null:n[y+1].elm,g(t,f,n,d,y,o)):d>y&&_(t,e,p,v)}function $(t,e,n,r){for(var o=n;o<r;o++){var a=e[o];if(i(a)&&mn(t,a))return o}}function C(t,e,n,a){if(t!==e){var s=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(i(e.asyncFactory.resolved)?k(t.elm,e,n):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var u,c=e.data;i(c)&&i(u=c.hook)&&i(u=u.prepatch)&&u(t,e);var l=t.children,f=e.children;if(i(c)&&h(e)){for(u=0;u<S.update.length;++u)S.update[u](t,e);i(u=c.hook)&&i(u=u.update)&&u(t,e)}r(e.text)?i(l)&&i(f)?l!==f&&x(s,l,f,n,a):i(f)?(i(t.text)&&T.setTextContent(s,""),g(s,null,f,0,f.length-1,n)):i(l)?_(s,l,0,l.length-1):i(t.text)&&T.setTextContent(s,""):t.text!==e.text&&T.setTextContent(s,e.text),i(c)&&i(u=c.hook)&&i(u=u.postpatch)&&u(t,e)}}function O(t,e,n){if(o(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}function k(t,e,n,r){var a,s=e.tag,u=e.data,c=e.children;if(r=r||u&&u.pre,e.elm=t,o(e.isComment)&&i(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(i(u)&&(i(a=u.hook)&&i(a=a.init)&&a(e,!0),i(a=e.componentInstance)))return l(e,n),!0;if(i(s)){if(i(c))if(t.hasChildNodes())if(i(a=u)&&i(a=a.domProps)&&i(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var f=!0,p=t.firstChild,v=0;v<c.length;v++){if(!p||!k(p,c[v],n,r)){f=!1;break}p=p.nextSibling}if(!f||p)return!1}else d(e,c,n);if(i(u)){var h=!1;for(var y in u)if(!I(y)){h=!0,m(e,n);break}!h&&u.class&&ct(u.class)}}else t.data!==e.text&&(t.data=e.text);return!0}var A,E,S={},j=t.modules,T=t.nodeOps;for(A=0;A<ss.length;++A)for(S[ss[A]]=[],E=0;E<j.length;++E)i(j[E][ss[A]])&&S[ss[A]].push(j[E][ss[A]]);var I=v("attrs,class,staticClass,staticStyle,key");return function(t,n,a,s,c,l){if(r(n))return void(i(t)&&b(t));var f=!1,p=[];if(r(t))f=!0,u(n,p,c,l);else{var d=i(t.nodeType);if(!d&&mn(t,n))C(t,n,p,s);else{if(d){if(1===t.nodeType&&t.hasAttribute(wo)&&(t.removeAttribute(wo),a=!0),o(a)&&k(t,n,p))return O(n,p,!0),t;t=e(t)}var v=t.elm,m=T.parentNode(v);if(u(n,p,v._leaveCb?null:m,T.nextSibling(v)),i(n.parent))for(var y=n.parent,g=h(n);y;){for(var w=0;w<S.destroy.length;++w)S.destroy[w](y);if(y.elm=n.elm,g){for(var x=0;x<S.create.length;++x)S.create[x](as,y);var $=y.data.hook.insert;if($.merged)for(var A=1;A<$.fns.length;A++)$.fns[A]()}else hn(y);y=y.parent}i(m)?_(m,[t],0,0):i(t.tag)&&b(t)}}return O(n,p,f),n.elm}}({nodeOps:is,modules:Fs});Io&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Ir(t,"input")});var Rs={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?dt(n,"postpatch",function(){Rs.componentUpdated(t,e,n)}):kr(t,e,n.context),t._vOptions=[].map.call(t.options,Sr)):("textarea"===n.tag||rs(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",jr),t.addEventListener("compositionend",Tr),t.addEventListener("change",Tr),Io&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){kr(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,Sr);i.some(function(t,e){return!C(t,r[e])})&&(t.multiple?e.value.some(function(t){return Er(t,i)}):e.value!==e.oldValue&&Er(e.value,i))&&Ir(t,"change")}}},Bs={bind:function(t,e,n){var r=e.value;n=Mr(n);var i=n.data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,wr(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&(n=Mr(n),n.data&&n.data.transition?(n.data.show=!0,r?wr(n,function(){t.style.display=t.__vOriginalDisplay}):xr(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}},Vs={model:Rs,show:Bs},Us={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},zs={name:"transition",props:Us,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||$t(t)}),n.length)){var r=this.mode,i=n[0];if(Fr(this.$vnode))return i;var o=Lr(i);if(!o)return i;if(this._leaving)return Nr(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=Pr(this),c=this._vnode,l=Lr(c);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),l&&l.data&&!Dr(o,l)&&!$t(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=w({},u);if("out-in"===r)return this._leaving=!0,dt(f,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Nr(t,i);if("in-out"===r){if($t(o))return c;var p,d=function(){p()};dt(u,"afterEnter",d),dt(u,"enterCancelled",d),dt(f,"delayLeave",function(t){p=t})}}return i}}},Hs=w({tag:String,moveClass:String},Us);delete Hs.mode;var Gs={props:Hs,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Pr(this),s=0;s<i.length;s++){var u=i[s];u.tag&&null!=u.key&&0!==String(u.key).indexOf("__vlist")&&(o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=a)}if(r){for(var c=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?c.push(p):l.push(p)}this.kept=t(e,null,c),this.removed=l}return t(e,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Rr),t.forEach(Br),t.forEach(Vr),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,r=n.style;hr(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(js,n._moveCb=function t(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(js,t),n._moveCb=null,mr(n,e))})}}))},methods:{hasMove:function(t,e){if(!ks)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){pr(n,t)}),fr(n,e),n.style.display="none",this.$el.appendChild(n);var r=gr(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},qs={Transition:zs,TransitionGroup:Gs};Pe.config.mustUseProp=Ha,Pe.config.isReservedTag=es,Pe.config.isReservedAttr=Ua,Pe.config.getTagNamespace=Qe,Pe.config.isUnknownElement=tn,w(Pe.options.directives,Vs),w(Pe.options.components,qs),Pe.prototype.__patch__=Ao?Ds:$,Pe.prototype.$mount=function(t,e){return t=t&&Ao?en(t):void 0,Mt(this,t,e)},Ao&&setTimeout(function(){Co.devtools&&Vo&&Vo.emit("init",Pe)},0);var Ks,Ws=/\{\{((?:.|\n)+?)\}\}/g,Js=/[-.*+?^${}()|[\]\/\\]/g,Xs=y(function(t){var e=t[0].replace(Js,"\\$&"),n=t[1].replace(Js,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),Zs={staticKeys:["staticClass"],transformNode:zr,genData:Hr},Ys={staticKeys:["staticStyle"],transformNode:Gr,genData:qr},Qs={decode:function(t){return Ks=Ks||document.createElement("div"),Ks.innerHTML=t,Ks.textContent}},tu=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),eu=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),nu=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ru=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,iu="[a-zA-Z_][\\w\\-\\.]*",ou="((?:"+iu+"\\:)?"+iu+")",au=new RegExp("^<"+ou),su=/^\s*(\/?)>/,uu=new RegExp("^<\\/"+ou+"[^>]*>"),cu=/^<!DOCTYPE [^>]+>/i,lu=/^<!\--/,fu=/^<!\[/,pu=!1;"x".replace(/x(.)?/g,function(t,e){pu=""===e});var du,vu,hu,mu,yu,gu,bu,_u,wu,xu,$u,Cu=v("script,style,textarea",!0),Ou={},ku={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},Au=/&(?:lt|gt|quot|amp);/g,Eu=/&(?:lt|gt|quot|amp|#10|#9);/g,Su=v("pre,textarea",!0),ju=function(t,e){return t&&Su(t)&&"\n"===e[0]},Tu=/^@|^v-on:/,Iu=/^v-|^@|^:/,Mu=/(.*?)\s+(?:in|of)\s+(.*)/,Lu=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Pu=/^\(|\)$/g,Nu=/:(.*)$/,Fu=/^:|^v-bind:/,Du=/\.[^.]+/g,Ru=y(Qs.decode),Bu=/^xmlns:NS\d+/,Vu=/^NS\d+:/,Uu={preTransformNode:gi},zu=[Zs,Ys,Uu],Hu={model:Kn,text:_i,html:wi},Gu={expectHTML:!0,modules:zu,directives:Hu,isPreTag:ts,isUnaryTag:tu,mustUseProp:Ha,canBeLeftOpenTag:eu,isReservedTag:es,getTagNamespace:Qe,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(zu)},qu=y($i),Ku=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Wu=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ju={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Xu={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:"ArrowUp",left:"ArrowLeft",right:"ArrowRight",down:"ArrowDown",delete:["Backspace","Delete"]},Zu=function(t){return"if("+t+")return null;"},Yu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Zu("$event.target !== $event.currentTarget"),ctrl:Zu("!$event.ctrlKey"),shift:Zu("!$event.shiftKey"),alt:Zu("!$event.altKey"),meta:Zu("!$event.metaKey"),left:Zu("'button' in $event && $event.button !== 0"),middle:Zu("'button' in $event && $event.button !== 1"),right:Zu("'button' in $event && $event.button !== 2")},Qu={on:Ii,bind:Mi,cloak:$},tc=function(t){this.options=t,this.warn=t.warn||jn,this.transforms=Tn(t.modules,"transformCode"),this.dataGenFns=Tn(t.modules,"genData"),this.directives=w(w({},Qu),t.directives);var e=t.isReservedTag||bo;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},ec=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function n(n,r){var i=Object.create(e),o=[],a=[];if(i.warn=function(t,e){(e?a:o).push(t)},r){r.modules&&(i.modules=(e.modules||[]).concat(r.modules)),r.directives&&(i.directives=w(Object.create(e.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(i[s]=r[s])}var u=t(n,i);return u.errors=o,u.tips=a,u}return{compile:n,compileToFunctions:io(n)}}}(function(t,e){var n=Xr(t.trim(),e);!1!==e.optimize&&xi(n,e);var r=Li(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),nc=ec(Gu),rc=nc.compileToFunctions,ic=!!Ao&&oo(!1),oc=!!Ao&&oo(!0),ac=y(function(t){var e=en(t);return e&&e.innerHTML}),sc=Pe.prototype.$mount;Pe.prototype.$mount=function(t,e){if((t=t&&en(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ac(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=ao(t));if(r){var i=rc(r,{shouldDecodeNewlines:ic,shouldDecodeNewlinesForHref:oc,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return sc.call(this,t,e)},Pe.compile=rc,e.a=Pe}).call(e,n(0),n(9).setImmediate)},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=l[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(o(n.parts[i]));l[n.id]={id:n.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",f.appendChild(t),t}function o(t){var e,n,r=document.querySelector("style["+y+'~="'+t.id+'"]');if(r){if(v)return h;r.parentNode.removeChild(r)}if(g){var o=d++;r=p||(p=i()),e=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=i(),e=s.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),m.ssrId&&t.setAttribute(y,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c=n(15),l={},f=u&&(document.head||document.getElementsByTagName("head")[0]),p=null,d=0,v=!1,h=function(){},m=null,y="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,i){v=n,m=i||{};var o=c(t,e);return r(o),function(e){for(var n=[],i=0;i<o.length;i++){var a=o[i],s=l[a.id];s.refs--,n.push(s)}e?(o=c(t,e),r(o)):o=[];for(var i=0;i<n.length;i++){var s=n[i];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete l[s.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e,n,r,i,o){var a,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(a=t,s=t.default);var c="function"==typeof s?s.options:s;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0),n&&(c.functional=!0),i&&(c._scopeId=i);var l;if(o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=r),l){var f=c.functional,p=f?c.render:c.beforeCreate;f?(c._injectStyles=l,c.render=function(t,e){return l.call(e),p(t,e)}):c.beforeCreate=p?[].concat(p,l):[l]}return{esModule:a,exports:s,options:c}}},function(t,e,n){"use strict";var r=n(16),i=n(1),o=(n.n(i),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t});e.a={components:{"custom-input":r.a},data:function(){return{values:!1}},computed:o({},Object(i.mapModels)({animal:"registration/animal"})),methods:{useFormData:function(t){this.values=JSON.stringify(t,null,2)}}}},function(t,e,n){"use strict";e.a={props:{options:{type:Object,required:!0},value:{type:[String,Number,Boolean],default:!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(12),o=n(21),a=n(1),s=n.n(a);r.a.use(s.a),window.example=new r.a({el:"#app",store:o.a,render:function(t){return t(i.a)}})},function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(10),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(0))},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return c[u]=r,s(u),u++}function i(t){delete c[t]}function o(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(l)setTimeout(a,0,t);else{var e=c[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var s,u=1,c={},l=!1,f=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():f&&"onreadystatechange"in f.createElement("script")?function(){var t=f.documentElement;s=function(e){var n=f.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),p.setImmediate=r,p.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(0),n(11))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){h&&d&&(h=!1,d.length?v=d.concat(v):m=-1,v.length&&s())}function s(){if(!h){var t=i(a);h=!0;for(var e=v.length;e;){for(d=v,v=[];++m<e;)d&&d[m].run();m=-1,e=v.length}d=null,h=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var d,v=[],h=!1,m=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];v.push(new u(t,e)),1!==v.length||h||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){n(13)}var i=n(6),o=n(20),a=n(5),s=r,u=a(i.a,o.a,!1,s,null,null);e.a=u.exports},function(t,e,n){var r=n(14);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),n(4)("2ac11e2d",r,!0,{})},function(t,e,n){e=t.exports=n(3)(),e.push([t.i,"body,html{min-height:100%}body{background:linear-gradient(to top left,#35495e,#41b883);background-repeat:no-repeat;padding:0;border:0;font-family:-apple-system,BlinkMacSystemFont,sans-serif;-webkit-font-smoothing:antialiased}code{white-space:pre}::-webkit-input-placeholder{color:#d3d3d3}::-moz-placeholder{color:#d3d3d3}:-ms-input-placeholder{color:#d3d3d3}:-moz-placeholder{color:#d3d3d3}.my-form{box-sizing:border-box;box-shadow:0 0 5px 0 rgba(0,0,0,.2);max-width:500px;background-color:#fff;border-radius:.25em;padding:2em;position:absolute;min-width:500px;left:50%;top:50%;transform:translate(-50%,-50%)}.formulate-element{font-size:1em;margin-bottom:1em}.formulate-element:last-child{margin-bottom:0}.formulate-errors{list-style-type:none;padding:0;margin:0}.formulate-errors li{margin:.25em 0;font-size:14px;color:red;font-style:italic}label{display:block;font-weight:400;font-weight:700;margin-bottom:.5em}input[type=email],input[type=password],input[type=text]{border:1px solid #dcdcdc;box-sizing:border-box;font-size:1em;font-family:-apple-system,BlinkMacSystemFont,sans-serif;background-color:transparent;padding:.5em;width:100%}input[type=email]:focus,input[type=password]:focus,input[type=text]:focus{outline:0;border-color:#41b883}button{box-sizing:border-box;border:1px solid #41b883;border-radius:2em;background-color:#41b883;color:#fff;font-size:1em;width:100%;padding:.75em;text-transform:uppercase;text-align:center;min-width:100%}button:focus{outline:0;border-color:#35495e}small{color:grey;display:block;font-size:.8em;margin:.5em 0}",""])},function(t,e){t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],u=o[2],c=o[3],l={id:t+":"+i,css:s,media:u,sourceMap:c};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}},function(t,e,n){"use strict";function r(t){n(17)}var i=n(7),o=n(19),a=n(5),s=r,u=a(i.a,o.a,!1,s,null,null);e.a=u.exports},function(t,e,n){var r=n(18);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),n(4)("6453605c",r,!0,{})},function(t,e,n){e=t.exports=n(3)(),e.push([t.i,".pill{display:flex;list-style-type:none;padding:0;margin:0;justify-content:space-between}.pill li{flex-grow:1;padding:.75em 1em;text-align:center;border:1px solid #41b883;cursor:pointer}.pill li:hover{background-color:rgba(65,184,131,.15)}.pill li[data-selected]{color:#fff;background-color:#41b883}.pill li:first-child{border-radius:.5em 0 0 .5em;border-right:0}.pill li:last-child{border-radius:0 .5em .5em 0;border-left:0}",""])},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"custom-input pill"},t._l(t.options,function(e,r){return n("li",{key:r,attrs:{"data-selected":r===t.value},domProps:{textContent:t._s(e)},on:{click:function(e){t.$emit("input",r)}}})}))},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[t.values?n("code",{staticClass:"my-form my-form--code",domProps:{textContent:t._s(t.values)}}):n("formulate",{staticClass:"my-form",attrs:{name:"registration"},on:{submit:t.useFormData}},[n("formulate-element",{attrs:{name:"email",type:"email",label:"Email address",placeholder:"you@example.com",validation:"required|email"}}),t._v(" "),n("formulate-element",{attrs:{name:"password_confirmation",type:"password",label:"Password",placeholder:"Choose a password",validation:"required"}}),t._v(" "),n("formulate-element",{attrs:{name:"password",type:"password",label:"Confirm Password",placeholder:"Confirm your password","validation-label":"Password",validation:"required|confirmed"}}),t._v(" "),n("formulate-element",{attrs:{name:"animal",label:"Spirit Animal"}},[n("custom-input",{attrs:{options:{eagle:"Eagle",lion:"Lion",sloth:"Sloth"}},model:{value:t.animal,callback:function(e){t.animal=e},expression:"animal"}}),t._v(" "),n("small",[t._v("Example of a custom field using vue-formulate.")])],1),t._v(" "),n("formulate-element",{attrs:{type:"submit",name:"Save"}})],1)],1)},i=[],o={render:r,staticRenderFns:i};e.a=o},function(t,e,n){"use strict";var r=n(2),i=n(22),o=n(1),a=(n.n(o),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t});r.a.use(i.a);var s=a({},Object(o.formulateState)()()),u=a({},Object(o.formulateGetters)()),c=a({},Object(o.formulateMutations)()),l={};e.a=new i.a.Store({state:s,getters:u,mutations:c,actions:l})},function(t,e,n){"use strict";function r(t){O&&(t._devtoolHook=O,O.emit("vuex:init",t),O.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){O.emit("vuex:mutation",t,e)}))}function i(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function o(t){return null!==t&&"object"==typeof t}function a(t){return t&&"function"==typeof t.then}function s(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;s(t.concat(r),e.getChild(r),n.modules[r])}}function u(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function c(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;f(t,n,[],t._modules.root,!0),l(t,n,e)}function l(t,e,n){var r=t._vm;t.getters={};var o=t._wrappedGetters,a={};i(o,function(e,n){a[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=S.config.silent;S.config.silent=!0,t._vm=new S({data:{$$state:e},computed:a}),S.config.silent=s,t.strict&&y(t),r&&(n&&t._withCommit(function(){r._data.$$state=null}),S.nextTick(function(){return r.$destroy()}))}function f(t,e,n,r,i){var o=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a]=r),!o&&!i){var s=g(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){S.set(s,u,r.state)})}var c=r.context=p(t,a,n);r.forEachMutation(function(e,n){v(t,a+n,e,c)}),r.forEachAction(function(e,n){var r=e.root?n:a+n,i=e.handler||e;h(t,r,i,c)}),r.forEachGetter(function(e,n){m(t,a+n,e,c)}),r.forEachChild(function(r,o){f(t,e,n.concat(o),r,i)})}function p(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=b(n,r,i),a=o.payload,s=o.options,u=o.type;return s&&s.root||(u=e+u),t.dispatch(u,a)},commit:r?t.commit:function(n,r,i){var o=b(n,r,i),a=o.payload,s=o.options,u=o.type;s&&s.root||(u=e+u),t.commit(u,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return d(t,e)}},state:{get:function(){return g(t.state,n)}}}),i}function d(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}}),n}function v(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,r.state,e)})}function h(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,i);return a(o)||(o=Promise.resolve(o)),t._devtoolHook?o.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):o})}function m(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function y(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function g(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function b(t,e,n){return o(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){S&&t===S||(S=t,C(S))}function w(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function x(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}/**
+ * vuex v2.5.0
+ * (c) 2017 Evan You
+ * @license MIT
+ */
+var C=function(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}},O="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,k=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},A={namespaced:{configurable:!0}};A.namespaced.get=function(){return!!this._rawModule.namespaced},k.prototype.addChild=function(t,e){this._children[t]=e},k.prototype.removeChild=function(t){delete this._children[t]},k.prototype.getChild=function(t){return this._children[t]},k.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},k.prototype.forEachChild=function(t){i(this._children,t)},k.prototype.forEachGetter=function(t){this._rawModule.getters&&i(this._rawModule.getters,t)},k.prototype.forEachAction=function(t){this._rawModule.actions&&i(this._rawModule.actions,t)},k.prototype.forEachMutation=function(t){this._rawModule.mutations&&i(this._rawModule.mutations,t)},Object.defineProperties(k.prototype,A);var E=function(t){this.register([],t,!1)};E.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},E.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},E.prototype.update=function(t){s([],this.root,t)},E.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new k(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o),e.modules&&i(e.modules,function(e,i){r.register(t.concat(i),e,n)})},E.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var S,j=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1);var o=t.state;void 0===o&&(o={}),"function"==typeof o&&(o=o()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new E(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new S;var a=this,s=this,u=s.dispatch,c=s.commit;this.dispatch=function(t,e){return u.call(a,t,e)},this.commit=function(t,e,n){return c.call(a,t,e,n)},this.strict=i,f(this,o,[],this._modules.root),l(this,o),n.forEach(function(t){return t(e)}),S.config.devtools&&r(this)},T={state:{configurable:!0}};T.state.get=function(){return this._vm._data.$$state},T.state.set=function(t){},j.prototype.commit=function(t,e,n){var r=this,i=b(t,e,n),o=i.type,a=i.payload,s=(i.options,{type:o,payload:a}),u=this._mutations[o];u&&(this._withCommit(function(){u.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,r.state)}))},j.prototype.dispatch=function(t,e){var n=this,r=b(t,e),i=r.type,o=r.payload,a={type:i,payload:o},s=this._actions[i];if(s)return this._actionSubscribers.forEach(function(t){return t(a,n.state)}),s.length>1?Promise.all(s.map(function(t){return t(o)})):s[0](o)},j.prototype.subscribe=function(t){return u(t,this._subscribers)},j.prototype.subscribeAction=function(t){return u(t,this._actionSubscribers)},j.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},j.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},j.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),f(this,this.state,t,this._modules.get(t),n.preserveState),l(this,this.state)},j.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=g(e.state,t.slice(0,-1));S.delete(n,t[t.length-1])}),c(this)},j.prototype.hotUpdate=function(t){this._modules.update(t),c(this,!0)},j.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(j.prototype,T);var I=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=$(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0}),n}),M=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=$(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n}),L=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0}),n}),P=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=$(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n}),N=function(t){return{mapState:I.bind(null,t),mapGetters:L.bind(null,t),mapMutations:M.bind(null,t),mapActions:P.bind(null,t)}},F={Store:j,install:_,version:"2.5.0",mapState:I,mapMutations:M,mapGetters:L,mapActions:P,createNamespacedHelpers:N};e.a=F}]);
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/dist/index.html b/coverage/lcov-report/vue-formulate/example/dist/index.html new file mode 100644 index 0000000..6c51dff --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/dist/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate/example/dist + + + + + + + +
+
+

+ All files vue-formulate/example/dist +

+
+
+ 0% + Statements + 0/4118 +
+
+ 0% + Branches + 0/4310 +
+
+ 0% + Functions + 0/1167 +
+
+ 0% + Lines + 0/10 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
build.js
0%0/41180%0/43100%0/11670%0/10
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/index.html b/coverage/lcov-report/vue-formulate/example/index.html new file mode 100644 index 0000000..02d7d7e --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate/example + + + + + + + +
+
+

+ All files vue-formulate/example +

+
+
+ 0% + Statements + 0/5 +
+
+ 0% + Branches + 0/4 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
webpack.config.js
0%0/50%0/4100%0/00%0/5
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/src/App.vue.html b/coverage/lcov-report/vue-formulate/example/src/App.vue.html new file mode 100644 index 0000000..f2f7dbd --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/src/App.vue.html @@ -0,0 +1,141 @@ + + + + Code coverage report for vue-formulate/example/src/App.vue + + + + + + + +
+
+

+ All files / vue-formulate/example/src App.vue +

+
+
+ 0% + Statements + 0/5 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/2 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import CustomInput from './CustomInput.vue'
+import {mapModels} from 'vue-formulate'
+ 
+export default {
+  components: {
+    'custom-input': CustomInput
+  },
+  data () {
+    return {
+      values: false
+    }
+  },
+  computed: {
+    ...mapModels({
+      animal: 'registration/animal'
+    })
+  },
+  methods: {
+    useFormData (vals) {
+      this.values = JSON.stringify(vals, null, 2)
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/src/CustomInput.vue.html b/coverage/lcov-report/vue-formulate/example/src/CustomInput.vue.html new file mode 100644 index 0000000..cd5e076 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/src/CustomInput.vue.html @@ -0,0 +1,108 @@ + + + + Code coverage report for vue-formulate/example/src/CustomInput.vue + + + + + + + +
+
+

+ All files / vue-formulate/example/src CustomInput.vue +

+
+
+ 0% + Statements + 0/1 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/1 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+export default {
+  props: {
+    options: {
+      type: Object,
+      required: true
+    },
+    value: {
+      type: [String, Number, Boolean],
+      default: false
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/src/index.html b/coverage/lcov-report/vue-formulate/example/src/index.html new file mode 100644 index 0000000..1a24f84 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/src/index.html @@ -0,0 +1,123 @@ + + + + Code coverage report for vue-formulate/example/src + + + + + + + +
+
+

+ All files vue-formulate/example/src +

+
+
+ 0% + Statements + 0/9 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/3 +
+
+ 0% + Lines + 0/9 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
App.vue
0%0/5100%0/00%0/20%0/5
CustomInput.vue
0%0/1100%0/0100%0/00%0/1
main.js
0%0/3100%0/00%0/10%0/3
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/src/main.js.html b/coverage/lcov-report/vue-formulate/example/src/main.js.html new file mode 100644 index 0000000..a83bc22 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/src/main.js.html @@ -0,0 +1,105 @@ + + + + Code coverage report for vue-formulate/example/src/main.js + + + + + + + +
+
+

+ All files / vue-formulate/example/src main.js +

+
+
+ 0% + Statements + 0/3 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/1 +
+
+ 0% + Lines + 0/3 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13  +  +  +  +  +  +  +  +  +  +  +  + 
import Vue from 'vue'
+import App from './App.vue'
+import store from '../store'
+import formulate from 'vue-formulate'
+ 
+Vue.use(formulate)
+ 
+window.example = new Vue({
+  el: '#app',
+  store,
+  render: h => h(App)
+})
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/store/index.html b/coverage/lcov-report/vue-formulate/example/store/index.html new file mode 100644 index 0000000..2a8c604 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/store/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate/example/store + + + + + + + +
+
+

+ All files vue-formulate/example/store +

+
+
+ 0% + Statements + 0/5 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js
0%0/5100%0/0100%0/00%0/5
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/store/index.js.html b/coverage/lcov-report/vue-formulate/example/store/index.js.html new file mode 100644 index 0000000..71f31fc --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/store/index.js.html @@ -0,0 +1,147 @@ + + + + Code coverage report for vue-formulate/example/store/index.js + + + + + + + +
+
+

+ All files / vue-formulate/example/store index.js +

+
+
+ 0% + Statements + 0/5 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import Vue from 'vue'
+import Vuex from 'vuex'
+import {formulateState, formulateGetters, formulateMutations} from 'vue-formulate'
+ 
+Vue.use(Vuex)
+ 
+const state = {
+  ...formulateState()()
+}
+ 
+const getters = {
+  ...formulateGetters()
+}
+ 
+const mutations = {
+  ...formulateMutations()
+}
+ 
+const actions = {}
+ 
+export default new Vuex.Store({
+  state,
+  getters,
+  mutations,
+  actions
+})
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/example/webpack.config.js.html b/coverage/lcov-report/vue-formulate/example/webpack.config.js.html new file mode 100644 index 0000000..78347c5 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/example/webpack.config.js.html @@ -0,0 +1,270 @@ + + + + Code coverage report for vue-formulate/example/webpack.config.js + + + + + + + +
+
+

+ All files / vue-formulate/example webpack.config.js +

+
+
+ 0% + Statements + 0/5 +
+
+ 0% + Branches + 0/4 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
var path = require('path')
+var webpack = require('webpack')
+ 
+module.exports = {
+  entry: './src/main.js',
+  output: {
+    path: path.resolve(__dirname, './dist'),
+    publicPath: '/dist/',
+    filename: 'build.js'
+  },
+  module: {
+    rules: [
+      {
+        test: /\.vue$/,
+        loader: 'vue-loader',
+        options: {
+          loaders: {
+          }
+        }
+      },
+      {
+        test: /\.js$/,
+        loader: 'babel-loader',
+        exclude: /node_modules/
+      },
+      {
+        test: /\.(png|jpg|gif|svg)$/,
+        loader: 'file-loader',
+        options: {
+          name: '[name].[ext]?[hash]'
+        }
+      }
+    ]
+  },
+  resolve: {
+    alias: {
+      'vue$': 'vue/dist/vue.esm.js'
+    },
+    symlinks: false
+  },
+  devServer: {
+    historyApiFallback: true,
+    noInfo: true
+  },
+  performance: {
+    hints: false
+  }
+}
+ 
+if (process.env.NODE_ENV === 'production') {
+  module.exports.plugins = (module.exports.plugins || []).concat([
+    new webpack.DefinePlugin({
+      'process.env': {
+        NODE_ENV: '"production"'
+      }
+    }),
+    new webpack.optimize.UglifyJsPlugin({
+      sourceMap: true,
+      compress: {
+        warnings: false
+      }
+    }),
+    new webpack.LoaderOptionsPlugin({
+      minimize: true
+    })
+  ])
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/index.html b/coverage/lcov-report/vue-formulate/index.html new file mode 100644 index 0000000..563c4fa --- /dev/null +++ b/coverage/lcov-report/vue-formulate/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate + + + + + + + +
+
+

+ All files vue-formulate +

+
+
+ 0% + Statements + 0/1 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/1 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
babel.config.js
0%0/1100%0/0100%0/00%0/1
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/Formulate.js.html b/coverage/lcov-report/vue-formulate/src/Formulate.js.html new file mode 100644 index 0000000..a19b807 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/Formulate.js.html @@ -0,0 +1,342 @@ + + + + Code coverage report for vue-formulate/src/Formulate.js + + + + + + + +
+
+

+ All files / vue-formulate/src Formulate.js +

+
+
+ 90.48% + Statements + 19/21 +
+
+ 85.71% + Branches + 12/14 +
+
+ 100% + Functions + 5/5 +
+
+ 90.48% + Lines + 19/21 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +3x +3x +3x +21x +  +3x +  +  +  +  +  +  +  +  +6x +6x +13x +4x +  +  +  +9x +  +  +6x +6x +2x +  +  +6x +  +  +  +  +  +  +  +49x +49x +  +  +  +  +  +  +  +  +  +40x +40x +  +  +  +  +  +  + 
import library from './libs/library'
+import isPlainObject from 'is-plain-object'
+import FormulateInput from './FormulateInput.vue'
+import FormulateForm from './FormulateForm.vue'
+import FormulateInputGroup from './FormulateInputGroup.vue'
+import FormulateInputBox from './inputs/FormulateInputBox.vue'
+import FormulateInputText from './inputs/FormulateInputText.vue'
+import FormulateInputSelect from './inputs/FormulateInputSelect.vue'
+import FormulateInputTextArea from './inputs/FormulateInputTextArea.vue'
+/**
+ * The base formulate library.
+ */
+class Formulate {
+  /**
+   * Instantiate our base options.
+   */
+  constructor () {
+    this.defaults = {
+      components: {
+        FormulateForm,
+        FormulateInput,
+        FormulateInputBox,
+        FormulateInputText,
+        FormulateInputGroup,
+        FormulateInputSelect,
+        FormulateInputTextArea
+      },
+      library
+    }
+  }
+ 
+  /**
+   * Install vue formulate, and register it’s components.
+   */
+  install (Vue, options) {
+    Vue.prototype.$formulate = this
+    this.options = this.extend(this.defaults, options || {})
+    for (var componentName in this.options.components) {
+      Vue.component(componentName, this.options.components[componentName])
+    }
+    Object.freeze(this)
+  }
+ 
+  /**
+   * Create a new object by copying properties of base and extendWith.
+   * @param {Object} base
+   * @param {Object} extendWith
+   */
+  extend (base, extendWith) {
+    var merged = {}
+    for (var key in base) {
+      if (extendWith.hasOwnProperty(key)) {
+        merged[key] = isPlainObject(extendWith[key]) && isPlainObject(base[key])
+          ? this.extend(base[key], extendWith[key])
+          : extendWith[key]
+      } else {
+        merged[key] = base[key]
+      }
+    }
+    for (var prop in extendWith) {
+      if (!merged.hasOwnProperty(prop)) {
+        merged[prop] = extendWith[prop]
+      }
+    }
+    return merged
+  }
+ 
+  /**
+   * Determine what "class" of input this element is given the "type".
+   * @param {string} type
+   */
+  classify (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].classification
+    }
+    return 'unknown'
+  }
+ 
+  /**
+   * Determine what type of component to render given the "type".
+   * @param {string} type
+   */
+  component (type) {
+    Eif (this.options.library.hasOwnProperty(type)) {
+      return this.options.library[type].component
+    }
+    return false
+  }
+}
+ 
+export default new Formulate()
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/FormulateForm.vue.html b/coverage/lcov-report/vue-formulate/src/FormulateForm.vue.html new file mode 100644 index 0000000..40c3ab8 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/FormulateForm.vue.html @@ -0,0 +1,321 @@ + + + + Code coverage report for vue-formulate/src/FormulateForm.vue + + + + + + + +
+
+

+ All files / vue-formulate/src FormulateForm.vue +

+
+
+ 11.76% + Statements + 2/17 +
+
+ 0% + Branches + 0/20 +
+
+ 0% + Functions + 0/10 +
+
+ 11.76% + Lines + 2/17 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85  +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import { shallowEqualObjects } from './libs/utils'
+ 
+export default {
+  provide () {
+    return {
+      formulateFormSetter: this.setFieldValue,
+      formulateFormRegister: this.register
+    }
+  },
+  name: 'FormulateForm',
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    name: {
+      type: [String, Boolean],
+      default: false
+    },
+    formulateValue: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data () {
+    return {
+      registry: {}
+    }
+  },
+  computed: {
+    formModel: {
+      get () {
+        return this.formulateValue
+      },
+      set (value) {
+        this.$emit('input', value)
+      }
+    },
+    hasFormulateValue () {
+      return this.formulateValue && typeof this.formulateValue === 'object'
+    },
+    isVmodeled () {
+      return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+        this._events &&
+        Array.isArray(this._events.input) &&
+        this._events.input.length)
+    }
+  },
+  watch: {
+    formulateValue: {
+      handler (newValue, oldValue) {
+        if (this.isVmodeled &&
+          newValue &&
+          typeof newValue === 'object'
+        ) {
+          for (const field in newValue) {
+            if (this.registry.hasOwnProperty(field) && !shallowEqualObjects(newValue[field], this.registry[field].internalModelProxy)) {
+              // If the value of the formulateValue changed (probably as a prop)
+              // and it doesn't match the internal proxied value of the registered
+              // component, we set it explicitly. Its important we check the
+              // model proxy here since the model itself is not fully synchronous.
+              this.registry[field].context.model = newValue[field]
+            }
+          }
+        }
+      },
+      deep: true
+    }
+  },
+  methods: {
+    setFieldValue (field, value) {
+      this.formModel = Object.assign({}, this.formulateValue, { [field]: value })
+    },
+    register (field, component) {
+      this.registry[field] = component
+      if (!component.$options.propsData.hasOwnProperty('formulateValue') && this.hasFormulateValue && this.formulateValue[field]) {
+        // In the case that the form is carrying an initial value and the
+        // element is not, set it directly.
+        component.context.model = this.formulateValue[field]
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/FormulateInput.vue.html b/coverage/lcov-report/vue-formulate/src/FormulateInput.vue.html new file mode 100644 index 0000000..ba4c945 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/FormulateInput.vue.html @@ -0,0 +1,402 @@ + + + + Code coverage report for vue-formulate/src/FormulateInput.vue + + + + + + + +
+
+

+ All files / vue-formulate/src FormulateInput.vue +

+
+
+ 94.44% + Statements + 17/18 +
+
+ 85% + Branches + 17/20 +
+
+ 100% + Functions + 8/8 +
+
+ 94.44% + Lines + 17/18 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112  +3x +3x +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +47x +  +  +  +  +  +  +  +  +49x +49x +  +  +49x +  +  +  +  +  +10x +  +  +  +  +10x +1x +  +  +  +9x +9x +  +  +  +  +47x +  +  +47x +  +  +  +57x +18x +  +  +  +  + 
 
+import context from './libs/context'
+import { shallowEqualObjects } from './libs/utils'
+import nanoid from 'nanoid'
+ 
+export default {
+  name: 'FormulateInput',
+  inheritAttrs: false,
+  inject: {
+    formulateFormSetter: { default: undefined },
+    formulateFormRegister: { default: undefined }
+  },
+  model: {
+    prop: 'formulateValue',
+    event: 'input'
+  },
+  props: {
+    type: {
+      type: String,
+      default: 'text'
+    },
+    name: {
+      type: [Boolean, String],
+      default: true
+    },
+    /* eslint-disable */
+    formulateValue: {
+      default: ''
+    },
+    value: {
+      default: false
+    },
+    /* eslint-enable */
+    options: {
+      type: [Object, Array, Boolean],
+      default: false
+    },
+    optionGroups: {
+      type: [Object, Boolean],
+      default: false
+    },
+    id: {
+      type: [String, Boolean, Number],
+      default: false
+    },
+    label: {
+      type: [String, Boolean],
+      default: false
+    },
+    labelPosition: {
+      type: [String, Boolean],
+      default: false
+    },
+    help: {
+      type: [String, Boolean],
+      default: false
+    },
+    debug: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultId: nanoid(9),
+      localAttributes: {},
+      internalModelProxy: this.formulateValue
+    }
+  },
+  computed: {
+    ...context,
+    classification () {
+      const classification = this.$formulate.classify(this.type)
+      return (classification === 'box' && this.options) ? 'group' : classification
+    },
+    component () {
+      return (this.classification === 'group') ? 'FormulateInputGroup' : this.$formulate.component(this.type)
+    }
+  },
+  watch: {
+    '$attrs': {
+      handler (value) {
+        this.updateLocalAttributes(value)
+      },
+      deep: true
+    },
+    internalModelProxy (newValue, oldValue) {
+      if (!this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    },
+    formulateValue (newValue, oldValue) {
+      Eif (this.isVmodeled && !shallowEqualObjects(newValue, oldValue)) {
+        this.context.model = newValue
+      }
+    }
+  },
+  created () {
+    Iif (this.formulateFormRegister && typeof this.formulateFormRegister === 'function') {
+      this.formulateFormRegister(this.nameOrFallback, this)
+    }
+    this.updateLocalAttributes(this.$attrs)
+  },
+  methods: {
+    updateLocalAttributes (value) {
+      if (!shallowEqualObjects(value, this.localAttributes)) {
+        this.localAttributes = value
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/FormulateInputGroup.vue.html b/coverage/lcov-report/vue-formulate/src/FormulateInputGroup.vue.html new file mode 100644 index 0000000..28eec39 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/FormulateInputGroup.vue.html @@ -0,0 +1,147 @@ + + + + Code coverage report for vue-formulate/src/FormulateInputGroup.vue + + + + + + + +
+
+

+ All files / vue-formulate/src FormulateInputGroup.vue +

+
+
+ 100% + Statements + 6/6 +
+
+ 50% + Branches + 1/2 +
+
+ 100% + Functions + 4/4 +
+
+ 100% + Lines + 5/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27  +3x +  +  +  +  +  +  +  +  +  +9x +  +  +9x +21x +  +  +  +  +21x +  +  +  +  +  + 
 
+export default {
+  name: 'FormulateInputGroup',
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    options () {
+      return this.context.options || []
+    },
+    optionsWithContext () {
+      const { options, labelPosition, attributes, classification, ...context } = this.context
+      return this.options.map(option => this.groupItemContext(context, option))
+    }
+  },
+  methods: {
+    groupItemContext (...args) {
+      return Object.assign({}, ...args, {
+        component: 'FormulateInput'
+      })
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/FormulateInputMixin.js.html b/coverage/lcov-report/vue-formulate/src/FormulateInputMixin.js.html new file mode 100644 index 0000000..3b0ba7c --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/FormulateInputMixin.js.html @@ -0,0 +1,144 @@ + + + + Code coverage report for vue-formulate/src/FormulateInputMixin.js + + + + + + + +
+
+

+ All files / vue-formulate/src FormulateInputMixin.js +

+
+
+ 75% + Statements + 3/4 +
+
+ 50% + Branches + 1/2 +
+
+ 75% + Functions + 3/4 +
+
+ 75% + Lines + 3/4 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26  +  +  +  +  +  +  +  +  +  +  +  +41x +  +  +18x +  +  +41x +  +  +  +  +  +  + 
/**
+ * Default base for input components.
+ */
+export default {
+  props: {
+    context: {
+      type: Object,
+      required: true
+    }
+  },
+  computed: {
+    type () {
+      return this.context.type
+    },
+    id () {
+      return this.context.id
+    },
+    attributes () {
+      return this.context.attributes || {}
+    },
+    hasValue () {
+      return !!this.context.model
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/index.html b/coverage/lcov-report/vue-formulate/src/index.html new file mode 100644 index 0000000..4923e53 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/index.html @@ -0,0 +1,149 @@ + + + + Code coverage report for vue-formulate/src + + + + + + + +
+
+

+ All files vue-formulate/src +

+
+
+ 71.21% + Statements + 47/66 +
+
+ 53.45% + Branches + 31/58 +
+
+ 64.52% + Functions + 20/31 +
+
+ 70.77% + Lines + 46/65 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Formulate.js
90.48%19/2185.71%12/14100%5/590.48%19/21
FormulateForm.vue
11.76%2/170%0/200%0/1011.76%2/17
FormulateInput.vue
94.44%17/1885%17/20100%8/894.44%17/18
FormulateInputGroup.vue
100%6/650%1/2100%4/4100%5/5
FormulateInputMixin.js
75%3/450%1/275%3/475%3/4
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputBox.vue.html b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputBox.vue.html new file mode 100644 index 0000000..70f91fe --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputBox.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for vue-formulate/src/inputs/FormulateInputBox.vue + + + + + + + +
+
+

+ All files / vue-formulate/src/inputs FormulateInputBox.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputBox',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputSelect.vue.html b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputSelect.vue.html new file mode 100644 index 0000000..8cabcb7 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputSelect.vue.html @@ -0,0 +1,123 @@ + + + + Code coverage report for vue-formulate/src/inputs/FormulateInputSelect.vue + + + + + + + +
+
+

+ All files / vue-formulate/src/inputs FormulateInputSelect.vue +

+
+
+ 40% + Statements + 2/5 +
+
+ 0% + Branches + 0/7 +
+
+ 0% + Functions + 0/3 +
+
+ 40% + Lines + 2/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19  +3x +  +3x +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputSelect',
+  mixins: [FormulateInputMixin],
+  computed: {
+    options () {
+      return this.context.options || {}
+    },
+    optionGroups () {
+      return this.context.optionGroups || false
+    },
+    placeholderSelected () {
+      return !!(!this.hasValue && this.context.attributes && this.context.attributes.placeholder)
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputText.vue.html b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputText.vue.html new file mode 100644 index 0000000..500809c --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputText.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for vue-formulate/src/inputs/FormulateInputText.vue + + + + + + + +
+
+

+ All files / vue-formulate/src/inputs FormulateInputText.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputText',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputTextArea.vue.html b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputTextArea.vue.html new file mode 100644 index 0000000..9a58b2f --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/inputs/FormulateInputTextArea.vue.html @@ -0,0 +1,90 @@ + + + + Code coverage report for vue-formulate/src/inputs/FormulateInputTextArea.vue + + + + + + + +
+
+

+ All files / vue-formulate/src/inputs FormulateInputTextArea.vue +

+
+
+ 100% + Statements + 2/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 100% + Lines + 2/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +3x +  +3x +  +  +  + 
 
+import FormulateInputMixin from '../FormulateInputMixin'
+ 
+export default {
+  name: 'FormulateInputTextArea',
+  mixins: [FormulateInputMixin]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/inputs/index.html b/coverage/lcov-report/vue-formulate/src/inputs/index.html new file mode 100644 index 0000000..6ac888d --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/inputs/index.html @@ -0,0 +1,136 @@ + + + + Code coverage report for vue-formulate/src/inputs + + + + + + + +
+
+

+ All files vue-formulate/src/inputs +

+
+
+ 72.73% + Statements + 8/11 +
+
+ 0% + Branches + 0/7 +
+
+ 0% + Functions + 0/3 +
+
+ 72.73% + Lines + 8/11 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
FormulateInputBox.vue
100%2/2100%0/0100%0/0100%2/2
FormulateInputSelect.vue
40%2/50%0/70%0/340%2/5
FormulateInputText.vue
100%2/2100%0/0100%0/0100%2/2
FormulateInputTextArea.vue
100%2/2100%0/0100%0/0100%2/2
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/libs/context.js.html b/coverage/lcov-report/vue-formulate/src/libs/context.js.html new file mode 100644 index 0000000..f807d0e --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/libs/context.js.html @@ -0,0 +1,567 @@ + + + + Code coverage report for vue-formulate/src/libs/context.js + + + + + + + +
+
+

+ All files / vue-formulate/src/libs context.js +

+
+
+ 78.26% + Statements + 36/46 +
+
+ 64.15% + Branches + 34/53 +
+
+ 90.91% + Functions + 10/11 +
+
+ 78.26% + Lines + 36/46 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167  +  +  +  +  +  +  +  +  +  +50x +  +  +50x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +49x +  +  +  +  +  +  +  +9x +9x +  +  +  +  +  +40x +  +  +  +  +  +  +  +  +48x +48x +15x +  +33x +  +48x +  +  +  +  +  +  +  +49x +  +  +49x +  +18x +  +31x +  +  +  +  +  +  +  +48x +33x +  +15x +  +  +15x +  +  +  +  +  +  +47x +  +  +  +  +  +  +  +  +  +  +  +  +9x +9x +9x +9x +21x +  +9x +  +  +  +  +  +  +  +  +  +  +  +50x +  +  +  +  +  +  +  +  +  +136x +136x +6x +  +130x +64x +  +66x +  +  +  +  +  +  +22x +22x +22x +  +  +  + 
import nanoid from 'nanoid'
+import { map } from './utils'
+ 
+/**
+ * For a single instance of an input, export all of the context needed to fully
+ * render that element.
+ * @return {object}
+ */
+export default {
+  context () {
+    Iif (this.debug) {
+      console.log(`${this.type} re-context`)
+    }
+    return defineModel.call(this, {
+      type: this.type,
+      value: this.value,
+      name: this.nameOrFallback,
+      classification: this.classification,
+      component: this.component,
+      id: this.id || this.defaultId,
+      label: this.label,
+      labelPosition: this.logicalLabelPosition,
+      attributes: this.elementAttributes,
+      ...this.typeContext
+    })
+  },
+  nameOrFallback,
+  typeContext,
+  elementAttributes,
+  logicalLabelPosition,
+  isVmodeled
+}
+ 
+/**
+ * Given (this.type), return an object to merge with the context
+ * @return {object}
+ * @return {object}
+ */
+function typeContext () {
+  switch (this.classification) {
+    case 'select':
+      return {
+        options: createOptionList.call(this, this.options),
+        optionGroups: this.optionGroups ? map(this.optionGroups, (k, v) => createOptionList.call(this, v)) : false,
+        placeholder: this.$attrs.placeholder || false
+      }
+    case 'group':
+      Eif (this.options) {
+        return {
+          options: createOptionList.call(this, this.options)
+        }
+      }
+      break
+    default:
+      return {}
+  }
+}
+ 
+/**
+ * Reducer for attributes that will be applied to each core input element.
+ * @return {object}
+ */
+function elementAttributes () {
+  const attrs = Object.assign({}, this.localAttributes)
+  if (this.id) {
+    attrs.id = this.id
+  } else {
+    attrs.id = this.defaultId
+  }
+  return attrs
+}
+ 
+/**
+ * Determine the a best-guess location for the label (before or after).
+ * @return {string} before|after
+ */
+function logicalLabelPosition () {
+  Iif (this.labelPosition) {
+    return this.labelPosition
+  }
+  switch (this.classification) {
+    case 'box':
+      return 'after'
+    default:
+      return 'before'
+  }
+}
+ 
+/**
+ * Return the element’s name, or select a fallback.
+ */
+function nameOrFallback () {
+  if (this.name === true) {
+    return `${this.type}_${this.elementAttributes.id}`
+  }
+  Iif (this.name === false) {
+    return false
+  }
+  return this.name
+}
+ 
+/**
+ * Determines if this formulate element is v-modeled or not.
+ */
+function isVmodeled () {
+  return !!(this.$options.propsData.hasOwnProperty('formulateValue') &&
+    this._events &&
+    Array.isArray(this._events.input) &&
+    this._events.input.length)
+}
+ 
+/**
+ * Given an object or array of options, create an array of objects with label,
+ * value, and id.
+ * @param {array|object}
+ * @return {array}
+ */
+function createOptionList (options) {
+  Eif (!Array.isArray(options) && options && typeof options === 'object') {
+    const optionList = []
+    const that = this
+    for (const value in options) {
+      optionList.push({ value, label: options[value], id: `${that.elementAttributes.id}_${value}` })
+    }
+    return optionList
+  } else if (Array.isArray(options) && !options.length) {
+    return [{ value: this.value, label: (this.label || this.name), id: this.context.id || nanoid(9) }]
+  }
+  return options
+}
+ 
+/**
+ * Defines the model used throughout the existing context.
+ * @param {object} context
+ */
+function defineModel (context) {
+  return Object.defineProperty(context, 'model', {
+    get: modelGetter.bind(this),
+    set: modelSetter.bind(this)
+  })
+}
+ 
+/**
+ * Get the value from a model.
+ **/
+function modelGetter () {
+  const model = this.isVmodeled ? 'formulateValue' : 'internalModelProxy'
+  if (this.type === 'checkbox' && !Array.isArray(this[model]) && this.options) {
+    return []
+  }
+  if (!this[model]) {
+    return ''
+  }
+  return this[model]
+}
+ 
+/**
+ * Set the value from a model.
+ **/
+function modelSetter (value) {
+  this.internalModelProxy = value
+  this.$emit('input', value)
+  Iif (this.context.name && typeof this.formulateFormSetter === 'function') {
+    this.formulateFormSetter(this.context.name, value)
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/libs/index.html b/coverage/lcov-report/vue-formulate/src/libs/index.html new file mode 100644 index 0000000..9bfe920 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/libs/index.html @@ -0,0 +1,123 @@ + + + + Code coverage report for vue-formulate/src/libs + + + + + + + +
+
+

+ All files vue-formulate/src/libs +

+
+
+ 68.49% + Statements + 50/73 +
+
+ 66.15% + Branches + 43/65 +
+
+ 73.33% + Functions + 11/15 +
+
+ 68.06% + Lines + 49/72 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
context.js
78.26%36/4664.15%34/5390.91%10/1178.26%36/46
library.js
0%0/00%0/00%0/00%0/0
utils.js
51.85%14/2775%9/1225%1/450%13/26
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/libs/library.js.html b/coverage/lcov-report/vue-formulate/src/libs/library.js.html new file mode 100644 index 0000000..c392f8b --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/libs/library.js.html @@ -0,0 +1,354 @@ + + + + Code coverage report for vue-formulate/src/libs/library.js + + + + + + + +
+
+

+ All files / vue-formulate/src/libs library.js +

+
+
+ 0% + Statements + 0/0 +
+
+ 0% + Branches + 0/0 +
+
+ 0% + Functions + 0/0 +
+
+ 0% + Lines + 0/0 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
export default {
+  // === SINGLE LINE TEXT STYLE INPUTS
+  text: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  email: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  number: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  color: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  date: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  hidden: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  month: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  password: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  range: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  search: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  tel: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  time: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  url: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  week: {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+  'datetime-local': {
+    classification: 'text',
+    component: 'FormulateInputText'
+  },
+ 
+  // === MULTI LINE TEXT INPUTS
+  textarea: {
+    classification: 'textarea',
+    component: 'FormulateInputTextArea'
+  },
+ 
+  // === BOX STYLE INPUTS
+  checkbox: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+  radio: {
+    classification: 'box',
+    component: 'FormulateInputBox'
+  },
+ 
+  // === BUTTON STYLE INPUTS
+  submit: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+  button: {
+    classification: 'button',
+    component: 'FormulateInputButton'
+  },
+ 
+  // === SELECT STYLE INPUTS
+  select: {
+    classification: 'select',
+    component: 'FormulateInputSelect'
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src/libs/utils.js.html b/coverage/lcov-report/vue-formulate/src/libs/utils.js.html new file mode 100644 index 0000000..87599b7 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src/libs/utils.js.html @@ -0,0 +1,282 @@ + + + + Code coverage report for vue-formulate/src/libs/utils.js + + + + + + + +
+
+

+ All files / vue-formulate/src/libs utils.js +

+
+
+ 51.85% + Statements + 14/27 +
+
+ 75% + Branches + 9/12 +
+
+ 25% + Functions + 1/4 +
+
+ 50% + Lines + 13/26 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +67x +  +  +67x +1x +  +66x +66x +66x +  +66x +26x +  +  +40x +8x +  +8x +1x +  +  +39x +  + 
 
+/**
+ * Function to map over an object.
+ * @param {Object} obj An object to map over
+ * @param {Function} callback
+ */
+export function map (original, callback) {
+  const obj = {}
+  for (let key in original) {
+    obj[key] = callback(key, original[key])
+  }
+  return obj
+}
+ 
+/**
+ * Function to filter an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ */
+export function filter (original, callback) {
+  let obj = {}
+  for (let key in original) {
+    if (callback(key, original[key])) {
+      obj[key] = original[key]
+    }
+  }
+  return obj
+}
+ 
+/**
+ * Function to reduce an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ * @param {*} accumulator
+ */
+export function reduce (original, callback, accumulator) {
+  for (let key in original) {
+    accumulator = callback(accumulator, key, original[key])
+  }
+  return accumulator
+}
+ 
+/**
+ * Shallow equal.
+ * @param {} objA
+ * @param {*} objB
+ */
+export function shallowEqualObjects (objA, objB) {
+  Iif (objA === objB) {
+    return true
+  }
+  if (!objA || !objB) {
+    return false
+  }
+  var aKeys = Object.keys(objA)
+  var bKeys = Object.keys(objB)
+  var len = aKeys.length
+ 
+  if (bKeys.length !== len) {
+    return false
+  }
+ 
+  for (var i = 0; i < len; i++) {
+    var key = aKeys[i]
+ 
+    if (objA[key] !== objB[key]) {
+      return false
+    }
+  }
+  return true
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/components/Formulate.vue.html b/coverage/lcov-report/vue-formulate/src~v1/components/Formulate.vue.html new file mode 100644 index 0000000..937c216 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/components/Formulate.vue.html @@ -0,0 +1,582 @@ + + + + Code coverage report for vue-formulate/src~v1/components/Formulate.vue + + + + + + + +
+
+

+ All files / vue-formulate/src~v1/components Formulate.vue +

+
+
+ 0% + Statements + 0/49 +
+
+ 0% + Branches + 0/49 +
+
+ 0% + Functions + 0/30 +
+
+ 0% + Lines + 0/47 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import {equals, reduce} from '../utils'
+import cloneDeep from 'clone-deep'
+ 
+export default {
+  props: {
+    name: {
+      type: String,
+      required: true
+    },
+    module: {
+      type: [String, Boolean],
+      default: function () {
+        return this.$formulate.options.vuexModule
+      }
+    },
+    initial: {
+      type: Object,
+      default: () => ({})
+    },
+    behavior: {
+      type: String,
+      default: 'blur'
+    },
+    showErrors: {
+      type: [Boolean, Object],
+      default: () => ({})
+    },
+    errors: {
+      type: Object,
+      default: () => ({})
+    },
+    prevent: {
+      type: String,
+      default: 'validation'
+    }
+  },
+  data () {
+    return {
+      parentIdentifier: 'vue-formulate-wrapper-element',
+      forceErrors: null,
+      fieldInitials: {},
+      whenFinishedValidating: Promise.resolve()
+    }
+  },
+  computed: {
+    m () {
+      return `${this.module ? this.module + '/' : ''}`
+    },
+    hasErrors () {
+      return this.$store.getters[`${this.m}hasErrors`][this.name] || false
+    },
+    hasValidationErrors () {
+      return this.$store.getters[`${this.m}hasValidationErrors`][this.name] || false
+    },
+    values () {
+      return cloneDeep(this.$store.getters[`${this.m}formValues`][this.name] || {})
+    },
+    storeErrors () {
+      return this.$store.getters[`${this.m}formErrors`][this.name] || {}
+    },
+    validationErrors () {
+      return this.$store.getters[`${this.m}formValidationErrors`][this.name] || {}
+    },
+    fields () {
+      return this.$store.getters[`${this.m}formMeta`][this.name] || []
+    },
+    shouldShowErrors () {
+      if (this.forceErrors === false || this.forceErrors === true) {
+        return this.forceErrors
+      }
+      if (this.showErrors === false || this.showErrors === true) {
+        return this.showErrors
+      }
+      return this.behavior === 'live'
+    },
+    mergedInitial () {
+      return Object.assign({}, this.initial, this.fieldInitials)
+    }
+  },
+  watch: {
+    mergedInitial () {
+      this.hydrate(this.mergedInitial)
+    },
+    values () {
+      this.updateFormValidation()
+    }
+  },
+  created () {
+    this.hydrate(this.mergedInitial)
+  },
+  mounted () {
+    this.hydrate(this.mergedInitial)
+  },
+  methods: {
+    registerField (field, data) {
+      this.$store.commit(`${this.m}setFieldMeta`, {form: this.name, field, data})
+      if (data.type !== 'submit') {
+        this.$store.commit(`${this.m}setFieldValue`, {
+          field,
+          value: this.mergedInitial.hasOwnProperty(field) ? this.mergedInitial[field] : undefined,
+          form: this.name
+        })
+      }
+    },
+    async deregisterField (field) {
+      await this.whenFinishedValidating
+      this.$store.commit(`${this.m}removeField`, {
+        form: this.name,
+        field
+      })
+    },
+    hydrate (values) {
+      for (let field of this.fields) {
+        if (field.type !== 'submit' && typeof this.values[field.name] === 'undefined') {
+          this.$store.commit(`${this.m}setFieldValue`, {
+            field: field.name,
+            value: values[field.name],
+            form: this.name
+          })
+        }
+      }
+    },
+    setInitial (field, value) {
+      this.fieldInitials = Object.assign({}, this.fieldInitials, {[field]: value})
+    },
+    update (change) {
+      this.$store.commit(`${this.m}setFieldValue`, Object.assign(change, {
+        form: this.name
+      }))
+    },
+    updateFieldErrors (change) {
+      this.$store.commit(`${this.m}setFieldErrors`, Object.assign(change, {
+        form: this.name
+      }))
+    },
+    updateFieldValidationErrors (change) {
+      this.$store.commit(`${this.m}setFieldValidationErrors`, Object.assign(change, {
+        form: this.name
+      }))
+    },
+    async validateField ({field, validation, label}) {
+      let errors = await this.$formulate.validationErrors({
+        field,
+        value: this.values[field],
+        label
+      }, validation, this.values)
+      if (!equals(errors || [], (this.validationErrors[field] || []))) {
+        if (this.fields.find(f => f.name === field)) {
+          this.updateFieldValidationErrors({field, errors: errors || []})
+        }
+      }
+      return errors
+    },
+    async updateFormValidation () {
+      await this.whenFinishedValidating
+      this.whenFinishedValidating = Promise.all(this.fields.map(async field => this.validateField({
+        field: field.name,
+        validation: field.validation,
+        label: field.validationLabel || field.label || field.name
+      })))
+    },
+    submit () {
+      if ((this.prevent === 'validation' && this.hasValidationErrors) || (this.prevent === 'any' && this.hasErrors)) {
+        this.forceErrors = true
+      } else {
+        this.$emit('submit', Object.assign({}, this.values))
+      }
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/components/FormulateElement.vue.html b/coverage/lcov-report/vue-formulate/src~v1/components/FormulateElement.vue.html new file mode 100644 index 0000000..16e401f --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/components/FormulateElement.vue.html @@ -0,0 +1,912 @@ + + + + Code coverage report for vue-formulate/src~v1/components/FormulateElement.vue + + + + + + + +
+
+

+ All files / vue-formulate/src~v1/components FormulateElement.vue +

+
+
+ 0% + Statements + 0/97 +
+
+ 0% + Branches + 0/79 +
+
+ 0% + Functions + 0/50 +
+
+ 0% + Lines + 0/90 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
 
+import {inputTypes, equals, reduce, filter} from '../utils'
+import shortid from 'shortid'
+ 
+export default {
+  props: {
+    type: {
+      type: [String, Boolean],
+      default: 'text'
+    },
+    name: {
+      type: String,
+      required: true
+    },
+    initial: {
+      type: [String, Number, Boolean],
+      default: false
+    },
+    validation: {
+      type: [String, Boolean],
+      default: false
+    },
+    errors: {
+      type: Array,
+      default: () => []
+    },
+    label: {
+      type: [String, Boolean],
+      default: false
+    },
+    id: {
+      type: [String],
+      default: () => shortid.generate()
+    },
+    min: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    max: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    maxlength: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    pattern: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    minlength: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    placeholder: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    step: {
+      type: [String, Number, Boolean],
+      default: () => false
+    },
+    options: {
+      type: [Object, Array],
+      default: () => []
+    },
+    optionGroups: {
+      type: [Boolean, Object],
+      default: false,
+      validator: function (value) {
+        if (value === false) {
+          return true
+        } else if (typeof value === 'boolean') {
+          return false
+        }
+        return true
+      }
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    showErrors: {
+      type: [Object, Boolean],
+      default: () => ({})
+    },
+    validationLabel: {
+      type: [String, Boolean],
+      default: false
+    },
+    elementClasses: {
+      type: [String, Array, Object],
+      default: () => {}
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    help: {
+      type: [Boolean, String],
+      default: false
+    }
+  },
+  data () {
+    return {
+      errorBlurState: false,
+      focusState: false
+    }
+  },
+  computed: {
+    classification () {
+      if (this.isTextInput) return 'text'
+      if (this.isTextareaInput) return 'textarea'
+      if (this.isBoxInput) return 'box'
+      if (this.isButtonInput) return 'button'
+      if (this.isSelectInput) return 'select'
+      if (this.hasCustomInput) return 'custom'
+      return 'unsupported'
+    },
+    hasCustomInput () {
+      return (this.$slots.default && this.$slots.default.length)
+    },
+    isTextInput () {
+      return !this.hasCustomInput && inputTypes.text.includes(this.type)
+    },
+    isTextareaInput () {
+      return !this.hasCustomInput && inputTypes.textarea.includes(this.type)
+    },
+    isButtonInput () {
+      return !this.hasCustomInput && inputTypes.button.includes(this.type)
+    },
+    isSelectInput () {
+      return !this.hasCustomInput && inputTypes.select.includes(this.type)
+    },
+    isBoxInput () {
+      return !this.hasCustomInput && inputTypes.box.includes(this.type)
+    },
+    isUnsupportedInput () {
+      return (!this.hasCustomInput && !this.isTextInput && !this.isButtonInput && !this.isSelectInput && !this.isBoxInput && !this.isTextareaInput)
+    },
+    form () {
+      let parent = this.$parent
+      while (parent && parent.$data && parent.$data.parentIdentifier !== 'vue-formulate-wrapper-element') {
+        parent = parent.$parent
+      }
+      if (!parent.$data || parent.$data.parentIdentifier !== 'vue-formulate-wrapper-element') {
+        throw new Error('FormulateElement has no FormulateWrapper element')
+      }
+      return parent
+    },
+    values () {
+      return this.form.values
+    },
+    value () {
+      let value = this.values[this.name]
+      if (value === undefined) {
+        switch (this.type) {
+          case 'color':
+            return '#000000'
+          case 'checkbox':
+            if (this.optionList.length > 1) {
+              return []
+            }
+            break
+        }
+      }
+      return value
+    },
+    module () {
+      return this.form.$props['module']
+    },
+    formName () {
+      return this.form.$props['name']
+    },
+    classes () {
+      return {
+        'formulate-element': true,
+        [`formulate-element--type--${this.type}`]: true,
+        'formulate-element--has-value': !!this.value,
+        'formulate-element--has-errors': this.localAndValidationErrors.length && this.shouldShowErrors,
+        'formulate-element--has-prefix': !!this.$slots.prefix,
+        'formulate-element--has-suffix': !!this.$slots.suffix,
+        'formulate-element--has-focus': !!this.focusState
+      }
+    },
+    validationErrors () {
+      return this.form.validationErrors[this.name] || []
+    },
+    storeErrors () {
+      return this.form.storeErrors[this.name] || []
+    },
+    formErrors () {
+      return this.form.errors[this.name] || []
+    },
+    localAndValidationErrors () {
+      return this.errors.concat(this.validationErrors).concat(this.formErrors)
+    },
+    shouldShowErrors () {
+      let show = this.form.shouldShowErrors
+      if (this.form.behavior === 'blur') {
+        show = show || this.errorBlurState
+      }
+      if (this.showErrors === false || this.showErrors === true) {
+        show = this.showErrors
+      }
+      return show
+    },
+    attributes () {
+      return ['min', 'max', 'minlength', 'maxlength', 'placeholder', 'id', 'multiple', 'pattern']
+        .filter(prop => this[prop] !== false)
+        .reduce((attributes, attr) => {
+          attributes[attr] = this[attr]
+          return attributes
+        }, {})
+    },
+    optionList () {
+      return this.createOptionList(this.options)
+    },
+    val: {
+      set (value) {
+        this.form.update({field: this.name, value})
+        if (this.isTextInput) {
+          this.$refs.input.value = value
+        }
+      },
+      get () {
+        return this.value
+      }
+    }
+  },
+  watch: {
+    localAndValidationErrors () {
+      if (!equals(this.localAndValidationErrors, this.storeErrors)) {
+        this.form.updateFieldErrors({
+          field: this.name,
+          errors: this.localAndValidationErrors
+        })
+      }
+    },
+    initial () {
+      this.form.update({field: this.name, value: this.initial})
+    }
+  },
+  created () {
+    if (typeof window === 'undefined') {
+      this.register()
+    }
+  },
+  mounted () {
+    this.register()
+  },
+  beforeDestroy () {
+    this.form.deregisterField(this.name)
+  },
+  methods: {
+    register () {
+      this.form.registerField(
+        this.name,
+        filter(this.$props, (prop, value) => ['name', 'type', 'id', 'label', 'validation', 'validationLabel'].includes(prop))
+      )
+      if (this.initial !== false) {
+        this.form.setInitial(this.name, this.initial)
+      }
+    },
+    setBlurState () {
+      this.errorBlurState = true
+      this.focusState = false
+    },
+    setFocusState () {
+      this.focusState = true
+    },
+    createOptionList (options) {
+      if (!Array.isArray(options)) {
+        return reduce(options, (options, value, label) => options.concat({value, label, id: shortid.generate()}), [])
+      } else if (Array.isArray(options) && !options.length) {
+        return [{value: this.name, label: (this.label || this.name), id: shortid.generate()}]
+      }
+      return options
+    }
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/components/index.html b/coverage/lcov-report/vue-formulate/src~v1/components/index.html new file mode 100644 index 0000000..9ea124d --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/components/index.html @@ -0,0 +1,110 @@ + + + + Code coverage report for vue-formulate/src~v1/components + + + + + + + +
+
+

+ All files vue-formulate/src~v1/components +

+
+
+ 0% + Statements + 0/146 +
+
+ 0% + Branches + 0/128 +
+
+ 0% + Functions + 0/80 +
+
+ 0% + Lines + 0/137 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
Formulate.vue
0%0/490%0/490%0/300%0/47
FormulateElement.vue
0%0/970%0/790%0/500%0/90
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/errors.js.html b/coverage/lcov-report/vue-formulate/src~v1/errors.js.html new file mode 100644 index 0000000..a0307a5 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/errors.js.html @@ -0,0 +1,90 @@ + + + + Code coverage report for vue-formulate/src~v1/errors.js + + + + + + + +
+
+

+ All files / vue-formulate/src~v1 errors.js +

+
+
+ 0% + Statements + 0/5 +
+
+ 100% + Branches + 0/0 +
+
+ 0% + Functions + 0/5 +
+
+ 0% + Lines + 0/5 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8  +  +  +  +  +  +  + 
export default {
+  required: ({label, value}) => `${label} is required`,
+  email: ({label, value}) => `${label} is invalid.`,
+  confirmed: ({label, value}) => `${label} does not match the confirmation field.`,
+  number: ({label, value}) => `${label} is not a number`,
+  default: ({label, value}) => `This field is invalid.`
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/formulate.js.html b/coverage/lcov-report/vue-formulate/src~v1/formulate.js.html new file mode 100644 index 0000000..2dbf83a --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/formulate.js.html @@ -0,0 +1,414 @@ + + + + Code coverage report for vue-formulate/src~v1/formulate.js + + + + + + + +
+
+

+ All files / vue-formulate/src~v1 formulate.js +

+
+
+ 0% + Statements + 0/38 +
+
+ 0% + Branches + 0/27 +
+
+ 0% + Functions + 0/15 +
+
+ 0% + Lines + 0/38 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import FormulateGroup from './components/Formulate'
+import FormulateElement from './components/FormulateElement'
+import DefaultRules from './rules'
+import DefaultErrors from './errors'
+ 
+class Formulate {
+  /**
+   * Initialize vue-formulate.
+   */
+  constructor () {
+    this.defaultOptions = {
+      registerComponents: true,
+      tags: {
+        Formulate: 'formulate',
+        FormulateElement: 'formulate-element'
+      },
+      errors: {},
+      rules: {},
+      vuexModule: false
+    }
+    this.errors = DefaultErrors
+    this.rules = DefaultRules
+  }
+ 
+  /**
+   * Install vue-formulate as an instance of Vue.
+   * @param {Vue} Vue
+   */
+  install (Vue, options = {}) {
+    Vue.prototype.$formulate = this
+    options = Object.assign(this.defaultOptions, options)
+    if (options.registerComponents) {
+      Vue.component(options.tags.Formulate, FormulateGroup)
+      Vue.component(options.tags.FormulateElement, FormulateElement)
+    }
+    if (options.errors) {
+      this.errors = Object.assign(this.errors, options.errors)
+    }
+    if (options.rules) {
+      this.rules = Object.assign(this.rules, options.rules)
+    }
+    this.options = options
+  }
+ 
+  /**
+   * Given a string of rules parse them out to relevant pieces/parts
+   * @param {string} rulesString
+   */
+  parseRules (rulesString) {
+    return rulesString.split('|')
+      .map(rule => rule.trim())
+      .map(rule => rule.match(/([a-zA-Z0-9]+)\((.*)?\)/) || [null, rule, ''])
+      .map(([ruleString, rule, args]) => Object.assign({}, {rule}, args ? {
+        args: args.split(',').map(arg => arg.trim())
+      } : {args: []}))
+  }
+ 
+  /**
+   * Return the function that generates a validation error message for a given
+   * validation rule.
+   * @param {string} rule
+   */
+  errorFactory (rule) {
+    return this.errors[rule] ? this.errors[rule] : this.errors['default']
+  }
+ 
+  /**
+   * Given a particular field, value, validation rules, and form values
+   * perform asynchronous field validation.
+   * @param {Object} validatee
+   * @param {string} rulesString
+   * @param {Object} values
+   */
+  async validationErrors ({field, value, label}, rulesString, values) {
+    return rulesString ? Promise.all(
+      this.parseRules(rulesString)
+        .map(({rule, args}) => {
+          if (typeof this.rules[rule] !== 'function') {
+            throw new Error(`Validation rule is invalid: ${rule}`)
+          }
+          return this.rules[rule]({field, value, label, error: this.errorFactory(rule), values}, ...args)
+        })
+    ).then(responses => responses.reduce((errors, error) => {
+      return error ? (Array.isArray(errors) ? errors.concat(error) : [error]) : errors
+    }, false)) : false
+  }
+}
+const formulate = new Formulate()
+export default formulate
+export * from './store'
+ 
+/**
+ * Mapper to allow  bindings to the vuex store for custom fields.
+ * @param {Object} definitions
+ */
+export const mapModels = (definitions) => {
+  const models = {}
+  for (let mapTo in definitions) {
+    let [form, field] = definitions[mapTo].split('/')
+    models[mapTo] = {
+      set (value) {
+        let m = formulate.options.vuexModule ? `${formulate.options.vuexModule}/` : ''
+        this.$store.commit(`${m}setFieldValue`, {form, field, value})
+      },
+      get () {
+        let m = formulate.options.vuexModule ? `${formulate.options.vuexModule}/` : ''
+        if (this.$store.getters[`${m}formValues`][form]) {
+          return this.$store.getters[`${m}formValues`][form][field]
+        }
+        return ''
+      }
+    }
+  }
+  return models
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/index.html b/coverage/lcov-report/vue-formulate/src~v1/index.html new file mode 100644 index 0000000..a88cac3 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/index.html @@ -0,0 +1,149 @@ + + + + Code coverage report for vue-formulate/src~v1 + + + + + + + +
+
+

+ All files vue-formulate/src~v1 +

+
+
+ 0% + Statements + 0/107 +
+
+ 0% + Branches + 0/76 +
+
+ 0% + Functions + 0/56 +
+
+ 0% + Lines + 0/95 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
errors.js
0%0/5100%0/00%0/50%0/5
formulate.js
0%0/380%0/270%0/150%0/38
rules.js
0%0/60%0/170%0/40%0/6
store.js
0%0/370%0/260%0/280%0/27
utils.js
0%0/210%0/60%0/40%0/19
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/rules.js.html b/coverage/lcov-report/vue-formulate/src~v1/rules.js.html new file mode 100644 index 0000000..e08a21c --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/rules.js.html @@ -0,0 +1,192 @@ + + + + Code coverage report for vue-formulate/src~v1/rules.js + + + + + + + +
+
+

+ All files / vue-formulate/src~v1 rules.js +

+
+
+ 0% + Statements + 0/6 +
+
+ 0% + Branches + 0/17 +
+
+ 0% + Functions + 0/4 +
+
+ 0% + Lines + 0/6 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
export default {
+  /**
+   * Validate a required field.
+   * @param {Object} field
+   * @param {string} label
+   */
+  async required ({value, error}) {
+    return (!value || (Array.isArray(value) && !value.length)) ? error(...arguments) : false
+  },
+ 
+  /**
+   *  Validates the field contains only numbers
+   * @param {Object} field
+   * @param {string} label
+   */
+  async number ({value, error}) {
+    return isNaN(value) ? error(...arguments) : false
+  },
+ 
+  /**
+   * Validate email addresses
+   * @param {Object} field
+   * @param {string} label
+   */
+  async email ({value, error}) {
+    // eslint-disable-next-line
+    var re = /^(?:[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/;
+    return (value && !re.test(value.toLowerCase())) ? error(...arguments) : false
+  },
+ 
+  /**
+   * Check if a particular field is matches another field in the form.
+   * @param {Object} field
+   * @param {string} label
+   * @param {string} confirmField (uses `${field}_confirmation` by default)
+   */
+  async confirmed ({field, value, error, values}, confirmField) {
+    confirmField = confirmField || `${field}_confirmation`
+    return (value && value !== values[confirmField]) ? error(...arguments) : false
+  }
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/store.js.html b/coverage/lcov-report/vue-formulate/src~v1/store.js.html new file mode 100644 index 0000000..8908cc5 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/store.js.html @@ -0,0 +1,405 @@ + + + + Code coverage report for vue-formulate/src~v1/store.js + + + + + + + +
+
+

+ All files / vue-formulate/src~v1 store.js +

+
+
+ 0% + Statements + 0/37 +
+
+ 0% + Branches + 0/26 +
+
+ 0% + Functions + 0/28 +
+
+ 0% + Lines + 0/27 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import {map, reduce, filter} from './utils'
+ 
+/**
+ * Curried function for creating the formState
+ * @param {Object} options
+ */
+export const formulateState = (options = {}) => () => Object.assign({
+  values: {},
+  errors: {},
+  validationErrors: {},
+  meta: {}
+}, options)
+ 
+/**
+ * Function for creating the formGetters
+ * @param {string} module
+ * @param {Object} getters
+ */
+export const formulateGetters = (moduleName = '', getters = {}) => Object.assign({
+  formValues (state) {
+    return state.values
+  },
+  formErrors (state) {
+    return state.errors
+  },
+  formValidationErrors (state) {
+    return state.validationErrors
+  },
+  formMeta (state) {
+    return reduce(state.meta, (forms, form, fields) => {
+      forms[form] = reduce(fields, (arr, field, data) => arr.concat(data), [])
+      return forms
+    }, {})
+  },
+  hasErrors (state) {
+    return map(state.errors, (form, errors) => {
+      return reduce(errors, (hasErrors, field, errors) => hasErrors || !!errors.length, false)
+    })
+  },
+  hasValidationErrors (state) {
+    return map(state.validationErrors, (form, errors) => {
+      return reduce(errors, (hasErrors, field, errors) => hasErrors || !!errors.length, false)
+    })
+  }
+}, getters)
+ 
+/**
+ * Function for creating the formActions
+ * @param {string} moduleName
+ * @param {Object} actions
+ */
+export const formulateActions = (moduleName = '', actions = {}) => Object.assign({
+}, actions)
+ 
+/**
+ * Function for creating the formMutations
+ * @param {Object} mutations
+ */
+export const formulateMutations = (mutations = {}) => Object.assign({
+  setFieldValue (state, {form, field, value}) {
+    state.values = Object.assign({}, state.values, {
+      [form]: Object.assign({}, state.values[form] || {}, {[field]: value})
+    })
+  },
+  setFieldErrors (state, {form, field, errors}) {
+    state.errors = Object.assign({}, state.errors, {
+      [form]: Object.assign({}, state.errors[form] || {}, {[field]: errors})
+    })
+  },
+  setFieldValidationErrors (state, {form, field, errors}) {
+    state.validationErrors = Object.assign({}, state.validationErrors, {
+      [form]: Object.assign({}, state.validationErrors[form] || {}, {[field]: errors})
+    })
+  },
+  setFieldMeta (state, {form, field, data}) {
+    state.meta = Object.assign({}, state.meta, {
+      [form]: Object.assign({}, state.meta[form] || {}, {[field]: data})
+    })
+  },
+  resetForm (state, form) {
+    if (state.values[form]) {
+      state.values = Object.assign({}, state.values, {
+        [form]: map(state.values[form], (key, value) => undefined)
+      })
+    }
+  },
+  removeField (state, {form, field}) {
+    for (let group in state) {
+      if (state[group][form] && state[group][form].hasOwnProperty(field)) {
+        state[group][form] = filter(state[group][form], (key, value) => key !== field)
+      }
+    }
+  },
+  removeFieldValidationErrors (state, {form, field}) {
+    state.validationErrors = Object.assign({}, state.validationErrors, {
+      [form]: filter(state.validationErrors[form] || {}, key => key !== field)
+    })
+  }
+}, mutations)
+ 
+/**
+ * Function for exposing a full vuex module.
+ * @param {string} moduleName
+ * @param {Object} validation
+ */
+export const formulateModule = (moduleName) => ({
+  state: formulateState(),
+  getters: formulateGetters(moduleName),
+  actions: formulateActions(moduleName),
+  mutations: formulateMutations(),
+  namespaced: true
+})
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/src~v1/utils.js.html b/coverage/lcov-report/vue-formulate/src~v1/utils.js.html new file mode 100644 index 0000000..008a542 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/src~v1/utils.js.html @@ -0,0 +1,354 @@ + + + + Code coverage report for vue-formulate/src~v1/utils.js + + + + + + + +
+
+

+ All files / vue-formulate/src~v1 utils.js +

+
+
+ 0% + Statements + 0/21 +
+
+ 0% + Branches + 0/6 +
+
+ 0% + Functions + 0/4 +
+
+ 0% + Lines + 0/19 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import cloneDeep from 'clone-deep'
+ 
+/**
+ * Compare the equality of two arrays.
+ * @param {Array} arr1
+ * @param {Array} arr2
+ */
+export function equals (arr1, arr2) {
+  var length = arr1.length
+  if (length !== arr2.length) return false
+  for (var i = 0; i < length; i++) {
+    if (arr1[i] !== arr2[i]) {
+      return false
+    }
+  }
+  return true
+}
+ 
+/**
+ * Function to map over an object.
+ * @param {Object} obj An object to map over
+ * @param {Function} callback
+ */
+export function map (original, callback) {
+  let obj = cloneDeep(original)
+  for (let key in obj) {
+    obj[key] = callback(key, obj[key])
+  }
+  return obj
+}
+ 
+/**
+ * Function to filter an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ */
+export function filter (original, callback) {
+  let obj = {}
+  for (let key in original) {
+    if (callback(key, original[key])) {
+      obj[key] = original[key]
+    }
+  }
+  return obj
+}
+ 
+/**
+ * Function to reduce an object's properties
+ * @param {Object} original
+ * @param {Function} callback
+ * @param {*} accumulator
+ */
+export function reduce (original, callback, accumulator) {
+  for (let key in original) {
+    accumulator = callback(accumulator, key, original[key])
+  }
+  return accumulator
+}
+ 
+/**
+ * Comprehensive list of input types supported.
+ */
+export const inputTypes = {
+  text: [
+    'text',
+    'email',
+    'number',
+    'color',
+    'date',
+    'datetime-local',
+    'hidden',
+    'month',
+    'password',
+    'range',
+    'search',
+    'tel',
+    'time',
+    'url',
+    'week'
+  ],
+  button: [
+    'submit',
+    'button'
+  ],
+  select: [
+    'select'
+  ],
+  box: [
+    'radio',
+    'checkbox'
+  ],
+  textarea: [
+    'textarea'
+  ]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/test/index.html b/coverage/lcov-report/vue-formulate/test/index.html new file mode 100644 index 0000000..55b27c3 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/test/index.html @@ -0,0 +1,97 @@ + + + + Code coverage report for vue-formulate/test + + + + + + + +
+
+

+ All files vue-formulate/test +

+
+
+ 0% + Statements + 0/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
jest.conf.js
0%0/2100%0/0100%0/00%0/2
+
+
+ + + + + + + + diff --git a/coverage/lcov-report/vue-formulate/test/jest.conf.js.html b/coverage/lcov-report/vue-formulate/test/jest.conf.js.html new file mode 100644 index 0000000..7516591 --- /dev/null +++ b/coverage/lcov-report/vue-formulate/test/jest.conf.js.html @@ -0,0 +1,150 @@ + + + + Code coverage report for vue-formulate/test/jest.conf.js + + + + + + + +
+
+

+ All files / vue-formulate/test jest.conf.js +

+
+
+ 0% + Statements + 0/2 +
+
+ 100% + Branches + 0/0 +
+
+ 100% + Functions + 0/0 +
+
+ 0% + Lines + 0/2 +
+
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
const path = require('path')
+ 
+module.exports = {
+  rootDir: path.resolve(__dirname, '../'),
+  moduleFileExtensions: [
+    'js',
+    'json',
+    'vue'
+  ],
+  moduleNameMapper: {
+    '^@/(.*)$': '<rootDir>/src/$1'
+  },
+  transform: {
+    '^.+\\.js$': '<rootDir>/node_modules/babel-jest',
+    '.*\\.(vue)$': '<rootDir>/node_modules/jest-vue-preprocessor'
+  },
+  collectCoverageFrom: [
+    "**/*.{js,vue}",
+    "!**/node_modules/**",
+    "!**/coverage/**",
+    "!**/example/**",
+    "!**/src~v1/**",
+    "!**/build/**",
+    "!**/.cache/**",
+    "!**/dist/**"
+  ]
+}
+ 
+
+
+ + + + + + + + diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000..021e1a2 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,230 @@ +TN: +SF:/Users/justinschroeder/Projects/vue-formulate/src/Formulate.js +FN:17,(anonymous_0) +FN:35,(anonymous_1) +FN:49,(anonymous_2) +FN:72,(anonymous_3) +FN:83,(anonymous_4) +FNF:5 +FNH:5 +FNDA:3,(anonymous_0) +FNDA:3,(anonymous_1) +FNDA:6,(anonymous_2) +FNDA:49,(anonymous_3) +FNDA:40,(anonymous_4) +DA:18,3 +DA:36,3 +DA:37,3 +DA:38,3 +DA:39,21 +DA:41,3 +DA:50,6 +DA:51,6 +DA:52,13 +DA:53,4 +DA:57,9 +DA:60,6 +DA:61,6 +DA:62,2 +DA:65,6 +DA:73,49 +DA:74,49 +DA:76,0 +DA:84,40 +DA:85,40 +DA:87,0 +LF:21 +LH:19 +BRDA:37,0,0,3 +BRDA:37,0,1,2 +BRDA:52,1,0,4 +BRDA:52,1,1,9 +BRDA:53,2,0,1 +BRDA:53,2,1,3 +BRDA:53,3,0,4 +BRDA:53,3,1,1 +BRDA:61,4,0,2 +BRDA:61,4,1,4 +BRDA:73,5,0,49 +BRDA:73,5,1,0 +BRDA:84,6,0,40 +BRDA:84,6,1,0 +BRF:14 +BRH:12 +end_of_record +TN: +SF:/Users/justinschroeder/Projects/vue-formulate/src/FormulateForm.vue +FN:5,(anonymous_0) +FN:23,(anonymous_1) +FN:26,(anonymous_2) +FN:33,(anonymous_3) +FN:36,(anonymous_4) +FN:40,(anonymous_5) +FN:43,(anonymous_6) +FN:52,(anonymous_7) +FN:72,(anonymous_8) +FN:75,(anonymous_9) +FNF:10 +FNH:0 +FNDA:0,(anonymous_0) +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +FNDA:0,(anonymous_4) +FNDA:0,(anonymous_5) +FNDA:0,(anonymous_6) +FNDA:0,(anonymous_7) +FNDA:0,(anonymous_8) +FNDA:0,(anonymous_9) +DA:2,3 +DA:4,3 +DA:6,0 +DA:23,0 +DA:27,0 +DA:34,0 +DA:37,0 +DA:41,0 +DA:44,0 +DA:53,0 +DA:57,0 +DA:58,0 +DA:63,0 +DA:73,0 +DA:76,0 +DA:77,0 +DA:80,0 +LF:17 +LH:2 +BRDA:41,0,0,0 +BRDA:41,0,1,0 +BRDA:44,1,0,0 +BRDA:44,1,1,0 +BRDA:44,1,2,0 +BRDA:44,1,3,0 +BRDA:53,2,0,0 +BRDA:53,2,1,0 +BRDA:53,3,0,0 +BRDA:53,3,1,0 +BRDA:53,3,2,0 +BRDA:58,4,0,0 +BRDA:58,4,1,0 +BRDA:58,5,0,0 +BRDA:58,5,1,0 +BRDA:77,6,0,0 +BRDA:77,6,1,0 +BRDA:77,7,0,0 +BRDA:77,7,1,0 +BRDA:77,7,2,0 +BRF:20 +BRH:0 +end_of_record +TN: +SF:/Users/justinschroeder/Projects/vue-formulate/src/FormulateInput.vue +FN:63,(anonymous_1) +FN:72,(anonymous_2) +FN:76,(anonymous_3) +FN:82,(anonymous_4) +FN:87,(anonymous_5) +FN:92,(anonymous_6) +FN:98,(anonymous_7) +FN:105,(anonymous_8) +FNF:8 +FNH:8 +FNDA:47,(anonymous_1) +FNDA:49,(anonymous_2) +FNDA:49,(anonymous_3) +FNDA:10,(anonymous_4) +FNDA:10,(anonymous_5) +FNDA:9,(anonymous_6) +FNDA:47,(anonymous_7) +FNDA:57,(anonymous_8) +DA:2,3 +DA:3,3 +DA:4,3 +DA:6,3 +DA:64,47 +DA:73,49 +DA:74,49 +DA:77,49 +DA:83,10 +DA:88,10 +DA:89,1 +DA:93,9 +DA:94,9 +DA:99,47 +DA:100,0 +DA:102,47 +DA:106,57 +DA:107,18 +LF:18 +LH:17 +BRDA:74,0,0,9 +BRDA:74,0,1,40 +BRDA:74,1,0,49 +BRDA:74,1,1,27 +BRDA:77,2,0,9 +BRDA:77,2,1,40 +BRDA:88,3,0,1 +BRDA:88,3,1,9 +BRDA:88,4,0,10 +BRDA:88,4,1,1 +BRDA:93,5,0,9 +BRDA:93,5,1,0 +BRDA:93,6,0,9 +BRDA:93,6,1,9 +BRDA:99,7,0,0 +BRDA:99,7,1,47 +BRDA:99,8,0,47 +BRDA:99,8,1,0 +BRDA:106,9,0,18 +BRDA:106,9,1,39 +BRF:20 +BRH:17 +end_of_record +TN: +SF:/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputGroup.vue +FN:11,(anonymous_0) +FN:14,(anonymous_1) +FN:16,(anonymous_2) +FN:20,(anonymous_3) +FNF:4 +FNH:4 +FNDA:9,(anonymous_0) +FNDA:9,(anonymous_1) +FNDA:21,(anonymous_2) +FNDA:21,(anonymous_3) +DA:2,3 +DA:12,9 +DA:15,9 +DA:16,21 +DA:21,21 +LF:5 +LH:5 +BRDA:12,0,0,9 +BRDA:12,0,1,0 +BRF:2 +BRH:1 +end_of_record +TN: +SF:/Users/justinschroeder/Projects/vue-formulate/src/FormulateInputMixin.js +FN:12,(anonymous_0) +FN:15,(anonymous_1) +FN:18,(anonymous_2) +FN:21,(anonymous_3) +FNF:4 +FNH:3 +FNDA:41,(anonymous_0) +FNDA:18,(anonymous_1) +FNDA:41,(anonymous_2) +FNDA:0,(anonymous_3) +DA:13,41 +DA:16,18 +DA:19,41 +DA:22,0 +LF:4 +LH:3 +BRDA:19,0,0,41 +BRDA:19,0,1,0 +BRF:2 +BRH:1 +end_of_record diff --git a/dist/formulate.esm.js b/dist/formulate.esm.js index 19d34d9..f5f8084 100644 --- a/dist/formulate.esm.js +++ b/dist/formulate.esm.js @@ -683,7 +683,13 @@ var script$1 = { // In the case that the form is carrying an initial value and the // element is not, set it directly. component.context.model = this.formulateValue[field]; + } else if (component.$options.propsData.hasOwnProperty('formulateValue')) { + this.setFieldValue(field, component.context.model); } + }, + formSubmitted: function formSubmitted () { + // perform validation here + this.$emit('submit', this.formModel); } } }; diff --git a/dist/formulate.min.js b/dist/formulate.min.js index 7773d35..51983ff 100644 --- a/dist/formulate.min.js +++ b/dist/formulate.min.js @@ -686,7 +686,13 @@ var Formulate = (function (exports, isPlainObject, nanoid) { // In the case that the form is carrying an initial value and the // element is not, set it directly. component.context.model = this.formulateValue[field]; + } else if (component.$options.propsData.hasOwnProperty('formulateValue')) { + this.setFieldValue(field, component.context.model); } + }, + formSubmitted: function formSubmitted () { + // perform validation here + this.$emit('submit', this.formModel); } } }; diff --git a/dist/formulate.umd.js b/dist/formulate.umd.js index 884d098..33b5f9a 100644 --- a/dist/formulate.umd.js +++ b/dist/formulate.umd.js @@ -689,7 +689,13 @@ // In the case that the form is carrying an initial value and the // element is not, set it directly. component.context.model = this.formulateValue[field]; + } else if (component.$options.propsData.hasOwnProperty('formulateValue')) { + this.setFieldValue(field, component.context.model); } + }, + formSubmitted: function formSubmitted () { + // perform validation here + this.$emit('submit', this.formModel); } } }; diff --git a/package-lock.json b/package-lock.json index 77e34a1..567b95d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,18 +14,18 @@ } }, "@babel/core": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.2.tgz", - "integrity": "sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.4.tgz", + "integrity": "sha512-Rm0HGw101GY8FTzpWSyRbki/jzq+/PkNQJ+nSulrdY6gFGOsNseCqD6KHRYe2E+EdzuBdr2pxCp6s4Uk6eJ+XQ==", "dev": true, "requires": { "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.6.2", + "@babel/generator": "^7.6.4", "@babel/helpers": "^7.6.2", - "@babel/parser": "^7.6.2", + "@babel/parser": "^7.6.4", "@babel/template": "^7.6.0", - "@babel/traverse": "^7.6.2", - "@babel/types": "^7.6.0", + "@babel/traverse": "^7.6.3", + "@babel/types": "^7.6.3", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -33,6 +33,66 @@ "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.4.tgz", + "integrity": "sha512-jsBuXkFoZxk0yWLyGI9llT9oiQ2FeTASmRFE32U+aaDTfoE92t78eroO7PTpU/OrYq38hlcDM6vbfLDaOLy+7w==", + "dev": true, + "requires": { + "@babel/types": "^7.6.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/parser": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.4.tgz", + "integrity": "sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A==", + "dev": true + }, + "@babel/traverse": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz", + "integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.6.3", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.6.3", + "@babel/types": "^7.6.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", + "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@babel/generator": { @@ -412,9 +472,9 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.2.tgz", - "integrity": "sha512-zZT8ivau9LOQQaOGC7bQLQOT4XPkPXgN2ERfUgk1X8ql+mVkLc4E8eKk+FO3o0154kxzqenWCorfmEXpEZcrSQ==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.6.3.tgz", + "integrity": "sha512-7hvrg75dubcO3ZI2rjYTzUrEuh1E9IyDEhhB6qfcooxhDA33xx2MasuLVgdxzcP6R/lipAC6n9ub9maNW6RKdw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -567,9 +627,9 @@ } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.2.tgz", - "integrity": "sha512-xBdB+XOs+lgbZc2/4F5BVDVcDNS4tcSKQc96KmlqLEAwz6tpYPEvPdmDfvVG0Ssn8lAhronaRs6Z6KSexIpK5g==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.6.3.tgz", + "integrity": "sha512-jTkk7/uE6H2s5w6VlMHeWuH+Pcy2lmdwFoeWCVnvIrDUnB5gQqTVI8WfmEAhF2CDEarGrknZcmSFg1+bkfCoSw==", "dev": true, "requires": { "regexpu-core": "^4.6.0" @@ -691,9 +751,9 @@ } }, "@babel/preset-env": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.2.tgz", - "integrity": "sha512-Ru7+mfzy9M1/YTEtlDS8CD45jd22ngb9tXnn64DvQK3ooyqSw9K4K9DUWmYknTTVk4TqygL9dqCrZgm1HMea/Q==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.6.3.tgz", + "integrity": "sha512-CWQkn7EVnwzlOdR5NOm2+pfgSNEZmvGjOhlCHBDq0J8/EStr+G+FvPEiz9B56dR6MoiUFjXhfE4hjLoAKKJtIQ==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -712,7 +772,7 @@ "@babel/plugin-transform-arrow-functions": "^7.2.0", "@babel/plugin-transform-async-to-generator": "^7.5.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.6.2", + "@babel/plugin-transform-block-scoping": "^7.6.3", "@babel/plugin-transform-classes": "^7.5.5", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.6.0", @@ -727,7 +787,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.6.0", "@babel/plugin-transform-modules-systemjs": "^7.5.0", "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.2", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.6.3", "@babel/plugin-transform-new-target": "^7.4.4", "@babel/plugin-transform-object-super": "^7.5.5", "@babel/plugin-transform-parameters": "^7.4.4", @@ -740,12 +800,31 @@ "@babel/plugin-transform-template-literals": "^7.4.4", "@babel/plugin-transform-typeof-symbol": "^7.2.0", "@babel/plugin-transform-unicode-regex": "^7.6.2", - "@babel/types": "^7.6.0", + "@babel/types": "^7.6.3", "browserslist": "^4.6.0", "core-js-compat": "^3.1.1", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.5.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz", + "integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } } }, "@babel/template": { @@ -1204,9 +1283,9 @@ "dev": true }, "@vue/component-compiler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@vue/component-compiler/-/component-compiler-4.0.0.tgz", - "integrity": "sha512-XZkpbE1B16g7RqM8AL/LP/wr3qkOLDwiO9yF2k/2O5BwGcqPyQOYHtD67sjMso6/703ztykFsbZsJbD/7xFWDQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@vue/component-compiler/-/component-compiler-4.1.0.tgz", + "integrity": "sha512-20S7mm7CYP94m2Morw2ftz1tqoBu1nX7KYiqo5rlgKPZ0dlY7VZX7wAL/etN3s4HD0PBeenr1pUUCBIgGSaB2g==", "dev": true, "requires": { "@vue/component-compiler-utils": "^3.0.0", @@ -1548,18 +1627,58 @@ "dev": true }, "autoprefixer": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.1.tgz", - "integrity": "sha512-aVo5WxR3VyvyJxcJC3h4FKfwCQvQWb1tSI5VHNibddCVWrcD1NvlxEweg3TSgiPztMnWfjpy2FURKA2kvDE+Tw==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.0.tgz", + "integrity": "sha512-j2IRvaCfrUxIiZun9ba4mhJ2omhw4OY88/yVzLO+lHhGBumAAK72PgM6gkbSN8iregPOn1ZlxGkmZh2CQ7X4AQ==", "dev": true, "requires": { - "browserslist": "^4.6.3", - "caniuse-lite": "^1.0.30000980", + "browserslist": "^4.7.2", + "caniuse-lite": "^1.0.30001004", "chalk": "^2.4.2", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.17", - "postcss-value-parser": "^4.0.0" + "postcss": "^7.0.19", + "postcss-value-parser": "^4.0.2" + }, + "dependencies": { + "browserslist": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", + "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001004", + "electron-to-chromium": "^1.3.295", + "node-releases": "^1.1.38" + } + }, + "caniuse-lite": { + "version": "1.0.30001006", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz", + "integrity": "sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.296", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.296.tgz", + "integrity": "sha512-s5hv+TSJSVRsxH190De66YHb50pBGTweT9XGWYu/LMR20KX6TsjFzObo36CjVAzM+PUeeKSBRtm/mISlCzeojQ==", + "dev": true + }, + "node-releases": { + "version": "1.1.39", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.39.tgz", + "integrity": "sha512-8MRC/ErwNCHOlAFycy9OPca46fQYUjbJRDcZTHVWIGXIjYLM73k70vv3WkYutVnM4cCo4hE0MqBVVZjP6vjISA==", + "dev": true, + "requires": { + "semver": "^6.3.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "aws-sign2": { @@ -2261,20 +2380,20 @@ "dev": true }, "chokidar": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.2.1.tgz", - "integrity": "sha512-/j5PPkb5Feyps9e+jo07jUZGvkB5Aj953NrI4s8xSVScrAo/RHeILrtdb4uzR7N6aaFFxxJ+gt8mA8HfNpw76w==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.2.3.tgz", + "integrity": "sha512-GtrxGuRf6bzHQmXWRepvsGnXpkQkVU+D2/9a7dAe4a7v1NhrfZOZ2oKf76M3nOs46fFYL8D+Q8JYA4GYeJ8Cjw==", "dev": true, "optional": true, "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.0", + "fsevents": "~2.1.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.1.3" + "readdirp": "~3.2.0" }, "dependencies": { "anymatch": { @@ -2309,9 +2428,9 @@ } }, "fsevents": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.0.tgz", - "integrity": "sha512-+iXhW3LuDQsno8dOIrCIT/CBjeBWuP7PXe8w9shnj9Lebny/Gx1ZjVBYwexLz36Ri2jKuXMNpV6CYNh8lHHgrQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.1.tgz", + "integrity": "sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw==", "dev": true, "optional": true }, @@ -2614,15 +2733,47 @@ "dev": true }, "core-js-compat": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.2.1.tgz", - "integrity": "sha512-MwPZle5CF9dEaMYdDeWm73ao/IflDH+FjeJCWEADcEgFSE9TLimFKwJsfmkwzI8eC0Aj0mgvMDjeQjrElkz4/A==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.3.5.tgz", + "integrity": "sha512-44ZORuapx0MUht0MUk0p9lcQPh7n/LDXehimTmjCs0CYblpKZcqVd5w0OQDUDq5OQjEbazWObHDQJWvvHYPNTg==", "dev": true, "requires": { - "browserslist": "^4.6.6", + "browserslist": "^4.7.2", "semver": "^6.3.0" }, "dependencies": { + "browserslist": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.2.tgz", + "integrity": "sha512-uZavT/gZXJd2UTi9Ov7/Z340WOSQ3+m1iBVRUknf+okKxonL9P83S3ctiBDtuRmRu8PiCHjqyueqQ9HYlJhxiw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001004", + "electron-to-chromium": "^1.3.295", + "node-releases": "^1.1.38" + } + }, + "caniuse-lite": { + "version": "1.0.30001006", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001006.tgz", + "integrity": "sha512-MXnUVX27aGs/QINz+QG1sWSLDr3P1A3Hq5EUWoIt0T7K24DuvMxZEnh3Y5aHlJW6Bz2aApJdSewdYLd8zQnUuw==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.296", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.296.tgz", + "integrity": "sha512-s5hv+TSJSVRsxH190De66YHb50pBGTweT9XGWYu/LMR20KX6TsjFzObo36CjVAzM+PUeeKSBRtm/mISlCzeojQ==", + "dev": true + }, + "node-releases": { + "version": "1.1.39", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.39.tgz", + "integrity": "sha512-8MRC/ErwNCHOlAFycy9OPca46fQYUjbJRDcZTHVWIGXIjYLM73k70vv3WkYutVnM4cCo4hE0MqBVVZjP6vjISA==", + "dev": true, + "requires": { + "semver": "^6.3.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -4006,6 +4157,12 @@ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, + "flush-promises": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flush-promises/-/flush-promises-1.0.2.tgz", + "integrity": "sha512-G0sYfLQERwKz4+4iOZYQEZVpOt9zQrlItIxQAAYAWpfby3gbHrx0osCHz5RLl/XoXevXk0xoN4hDFky/VV9TrA==", + "dev": true + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -6034,15 +6191,14 @@ } }, "jest-vue-preprocessor": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/jest-vue-preprocessor/-/jest-vue-preprocessor-1.5.0.tgz", - "integrity": "sha512-2O0pewvL8urvjjkDq/ZorvFpk3vKtXFawfJ3nVlv38o7V3j4YY0nAWh+7p/2yYLZrBOg2aDTiQTwxCRt4qZNWA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/jest-vue-preprocessor/-/jest-vue-preprocessor-1.7.0.tgz", + "integrity": "sha512-8iGenPDG68r8oZIYNW5BPdbKx2YyVnjEkhQLbTF0c/znmDdPcaExPoNFki89U4mIUJBW/pSdDe+pH1GVM/itlA==", "dev": true, "requires": { "babel-plugin-transform-runtime": "6.23.0", "find-babel-config": "1.2.0", - "typescript": "2.7.2", - "vue-property-decorator": "6.1.0" + "vue-property-decorator": "8.2.2" } }, "jest-watcher": { @@ -6786,9 +6942,9 @@ "dev": true }, "nanoid": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.1.tgz", - "integrity": "sha512-0YbJdaL4JFoejIOoawgLcYValFGJ2iyUuVDIWL3g8Es87SSOWFbWdRUMV3VMSiyPs3SQ3QxCIxFX00q5DLkMCw==" + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.6.tgz", + "integrity": "sha512-2NDzpiuEy3+H0AVtdt8LoFi7PnqkOnIzYmJQp7xsEU6VexLluHQwKREuiz57XaQC5006seIadPrIZJhyS2n7aw==" }, "nanomatch": { "version": "1.2.13", @@ -6909,9 +7065,9 @@ } }, "node-sass": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", - "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz", + "integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -6921,7 +7077,7 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash": "^4.17.11", + "lodash": "^4.17.15", "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", @@ -7427,9 +7583,9 @@ "dev": true }, "picomatch": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", - "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.0.tgz", + "integrity": "sha512-uhnEDzAbrcJ8R3g2fANnSuXZMBtkpSjxTTgn2LeSiQlfmq72enQJWdQllXW24MBLYnA1SBD2vfvx2o0Zw3Ielw==", "dev": true, "optional": true }, @@ -7485,9 +7641,9 @@ "dev": true }, "postcss": { - "version": "7.0.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", - "integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", + "version": "7.0.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz", + "integrity": "sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -8822,9 +8978,9 @@ } }, "readdirp": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.1.3.tgz", - "integrity": "sha512-ZOsfTGkjO2kqeR5Mzr5RYDbTGYneSkdNKX2fOX2P5jF7vMrd/GNnIAUtDldeHHumHUCQ3V05YfWUdxMPAsRu9Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "dev": true, "optional": true, "requires": { @@ -8850,12 +9006,6 @@ "strip-indent": "^1.0.1" } }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", - "dev": true - }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -9122,9 +9272,9 @@ } }, "rollup": { - "version": "1.22.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.22.0.tgz", - "integrity": "sha512-x4l4ZrV/Mr/x/jvFTmwROdEAhbZjx16yDRTVSKWh/i4oJDuW2dVEbECT853mybYCz7BAitU8ElGlhx7dNjw3qQ==", + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.26.0.tgz", + "integrity": "sha512-5HljNYn9icFvXX+Oe97qY5TWvnWhKqgGT0HGeWWqFPx7w7+Anzg7dfHMtUif7YYy6QxAgynDSwK6uxbgcrVUxw==", "dev": true, "requires": { "@types/estree": "*", @@ -9164,12 +9314,12 @@ } }, "rollup-plugin-vue": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-5.0.1.tgz", - "integrity": "sha512-1fOKOXbQicev1/GV0WtM9cOu7Bi582pgucrXeapc5eHgh45NnLRg4Qyl7I2LsazrT2yiuZGzDYOg3DCjoOqYOQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-vue/-/rollup-plugin-vue-5.1.2.tgz", + "integrity": "sha512-j0tKshZOoiUq/f/c2k8l8+QRGZRqnH/iJtQsYoK5fNQwxwhOS3rbOu0FA0hx6IdnLZmXInmuAq1aTHY14N87WA==", "dev": true, "requires": { - "@vue/component-compiler": "^4.0.0", + "@vue/component-compiler": "^4.1.0", "@vue/component-compiler-utils": "^3.0.0", "debug": "^4.1.1", "hash-sum": "^1.0.2", @@ -9177,7 +9327,7 @@ "querystring": "^0.2.0", "rollup-pluginutils": "^2.4.1", "source-map": "0.7.3", - "vue-runtime-helpers": "1.0.1" + "vue-runtime-helpers": "^1.1.2" }, "dependencies": { "source-map": { @@ -9268,9 +9418,9 @@ } }, "sass": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.23.0.tgz", - "integrity": "sha512-W4HT8+WE31Rzk3EPQC++CXjD5O+lOxgYBIB8Ohvt7/zeE2UzYW+TOczDrRU3KcEy3+xwXXbmDsOZFkoqgD4TKw==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.23.2.tgz", + "integrity": "sha512-ZfOl81QxcWmjxOgjPbyog3uELzOxd4X9OaqEIAi9r/d2kEjtEYaMAD9a3E+xgjcKeP3NDLMhU9GB/WMv+rAeSw==", "dev": true, "optional": true, "requires": { @@ -10479,9 +10629,9 @@ } }, "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz", + "integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==", "dev": true }, "uglify-js": { @@ -10719,9 +10869,9 @@ "dev": true }, "vue-class-component": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-6.3.2.tgz", - "integrity": "sha512-cH208IoM+jgZyEf/g7mnFyofwPDJTM/QvBNhYMjqGB8fCsRyTf68rH2ISw/G20tJv+5mIThQ3upKwoL4jLTr1A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.1.0.tgz", + "integrity": "sha512-G9152NzUkz0i0xTfhk0Afc8vzdXxDR1pfN4dTwE72cskkgJtdXfrKBkMfGvDuxUh35U500g5Ve4xL8PEGdWeHg==", "dev": true }, "vue-eslint-parser": { @@ -10770,19 +10920,18 @@ } }, "vue-property-decorator": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-6.1.0.tgz", - "integrity": "sha512-NM4PYPOkOIO7SFtWiQqVrbp+ORzd7CJXcIz0X710PNW9pxGfbil0/x/ULFympzIUoHXBKN2dqoOQzh6oeMzpTQ==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.2.2.tgz", + "integrity": "sha512-3gRrIeoUtjXvkoMX2stJsVs7805Pa9MXEndnk21ej+sWO7AIc5HF1TKqK0Pox5TEjpO02UbadIF0QWNrx6ZwXQ==", "dev": true, "requires": { - "reflect-metadata": "^0.1.10", - "vue-class-component": "^6.1.0" + "vue-class-component": "^7.0.1" } }, "vue-runtime-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vue-runtime-helpers/-/vue-runtime-helpers-1.0.1.tgz", - "integrity": "sha512-yodqdAWt/QrUkb51jN2DS4dtF4vQWg5YejYdBAcHIOi6kBoGLRVEDz5NYGdh5IhzLrElgi+eKX1DQJmj3bCuJw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vue-runtime-helpers/-/vue-runtime-helpers-1.1.2.tgz", + "integrity": "sha512-pZfGp+PW/IXEOyETE09xQHR1CKkR9HfHZdnMD/FVLUNI+HxYTa82evx5WrF6Kz4s82qtqHvMZ8MZpbk2zT2E1Q==", "dev": true }, "vue-template-compiler": { diff --git a/package.json b/package.json index ed37f0e..367496f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "build:es": "rollup --config build/rollup.config.js --format es --file dist/formulate.esm.js", "build:unpkg": "rollup --config build/rollup.config.js --format iife --file dist/formulate.min.js", "test": "NODE_ENV=test jest --config test/jest.conf.js", - "test:watch": "NODE_ENV=test jest --config test/jest.conf.js --watch" + "test:watch": "NODE_ENV=test jest --config test/jest.conf.js --watch", + "test:coverage": "NODE_ENV=test jest --config test/jest.conf.js --coverage" }, "repository": { "type": "git", @@ -36,12 +37,12 @@ }, "homepage": "https://www.vueformulate.com", "devDependencies": { - "@babel/core": "^7.6.2", + "@babel/core": "^7.6.4", "@babel/plugin-transform-modules-commonjs": "^7.6.0", - "@babel/preset-env": "^7.6.2", + "@babel/preset-env": "^7.6.3", "@vue/component-compiler-utils": "^3.0.0", - "@vue/test-utils": "^1.0.0-beta.29", - "autoprefixer": "^9.6.1", + "@vue/test-utils": "1.0.0-beta.29", + "autoprefixer": "^9.7.0", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.0.1", "babel-jest": "^24.9.0", @@ -53,15 +54,17 @@ "eslint-plugin-promise": "^4.1.1", "eslint-plugin-standard": "^4.0.0", "eslint-plugin-vue": "^5.2.3", + "flush-promises": "^1.0.2", "jest": "^24.9.0", - "jest-vue-preprocessor": "^1.5.0", - "node-sass": "^4.12.0", - "postcss": "^7.0.18", + "jest-vue-preprocessor": "^1.7.0", + "node-sass": "^4.13.0", + "postcss": "^7.0.21", "postcss-cli": "^6.1.3", - "rollup": "^1.22.0", + "rollup": "^1.26.0", "rollup-plugin-buble": "^0.19.8", "rollup-plugin-commonjs": "^10.1.0", - "rollup-plugin-vue": "^5.0.1", + "rollup-plugin-vue": "^5.1.2", + "typescript": "^3.6.4", "vue": "^2.6.10", "vue-jest": "^3.0.5", "vue-template-compiler": "^2.6.10", @@ -70,6 +73,6 @@ }, "dependencies": { "is-plain-object": "^3.0.0", - "nanoid": "^2.1.1" + "nanoid": "^2.1.6" } } diff --git a/src/FormulateForm.vue b/src/FormulateForm.vue index 32fede1..11ebc87 100644 --- a/src/FormulateForm.vue +++ b/src/FormulateForm.vue @@ -86,7 +86,13 @@ export default { // In the case that the form is carrying an initial value and the // element is not, set it directly. component.context.model = this.formulateValue[field] + } else if (component.$options.propsData.hasOwnProperty('formulateValue') && !shallowEqualObjects(component.internalModelProxy, this.formulateValue[field])) { + this.setFieldValue(field, component.internalModelProxy) } + }, + formSubmitted () { + // perform validation here + this.$emit('submit', this.formModel) } } } diff --git a/test/Formulate.test.js b/test/Formulate.test.js index 5cf2d52..851a034 100644 --- a/test/Formulate.test.js +++ b/test/Formulate.test.js @@ -1,4 +1,4 @@ -import Formulate from '../dist/formulate.esm.js' +import Formulate from '../src/Formulate.js' test('can extend simple object', () => { let a = { diff --git a/test/FormulateForm.test.js b/test/FormulateForm.test.js new file mode 100644 index 0000000..c1f3e0f --- /dev/null +++ b/test/FormulateForm.test.js @@ -0,0 +1,128 @@ +import Vue from 'vue' +import { mount, shallowMount } from '@vue/test-utils' +import flushPromises from 'flush-promises' +import Formulate from '../src/Formulate.js' +import FormulateForm from '../src/FormulateForm.vue' +import FormulateInput from '../src/FormulateInput.vue' + +Vue.use(Formulate) + +describe('FormulateForm', () => { + it('render a form DOM element', () => { + const wrapper = mount(FormulateForm) + expect(wrapper.find('form').exists()).toBe(true) + }) + + it('accepts a default slot', () => { + const wrapper = mount(FormulateForm, { + slots: { + default: '
' + } + }) + expect(wrapper.find('form div.default-slot-item').exists()).toBe(true) + }) + + it('intercepts submit event', () => { + const formSubmitted = jest.fn() + const wrapper = mount(FormulateForm, { + slots: { + default: "