From 8daba6453d48810237a14644237b466bcd550e12 Mon Sep 17 00:00:00 2001 From: Chirag Ravindra Date: Tue, 8 Dec 2020 22:19:06 +0530 Subject: [PATCH 1/4] Set `name` attribute of radio-groups which are scoped to the instance Decouples the name attribute from the model value and makes it unique across multiple instances of radio fields which may now share the same model value and still operate independently --- src/fields/core/fieldRadios.vue | 2 +- test/unit/specs/fields/fieldRadios.spec.js | 66 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/src/fields/core/fieldRadios.vue b/src/fields/core/fieldRadios.vue index b3ee3dc5..4b09602d 100644 --- a/src/fields/core/fieldRadios.vue +++ b/src/fields/core/fieldRadios.vue @@ -23,7 +23,7 @@ export default { } }, id() { - return this.schema.model; + return `${this.getFieldID(this.schema, true)}`; } }, diff --git a/test/unit/specs/fields/fieldRadios.spec.js b/test/unit/specs/fields/fieldRadios.spec.js index 631886bc..86a20054 100644 --- a/test/unit/specs/fields/fieldRadios.spec.js +++ b/test/unit/specs/fields/fieldRadios.spec.js @@ -123,6 +123,28 @@ describe("FieldRadios.vue", () => { expect(labelList.at(6).classes()).to.not.include("is-checked"); }); }); + + describe("test 'name' attribute for the radio group", () => { + it("should render the same 'name' attribute for all input[type=radio] within an instance", () => { + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + }); + it("should render different 'name' attribute for all input[type=radio] across different instances", () => { + const wrapper2 = mount(FieldRadios, { + localVue, + propsData: { schema, model, disabled: false } + }); + const radios2 = wrapper2.findAll("input[type=radio]"); + + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + + const nameAttribute2 = radios2.at(0).attributes().name; + expect(radios2.is(`input[name="${nameAttribute2}"]`)); + + expect(nameAttribute).not.to.equal(nameAttribute2); + }); + }); }); describe("check static values with { value, name } objects (default key name)", () => { @@ -221,6 +243,28 @@ describe("FieldRadios.vue", () => { expect(labelList.at(6).classes()).to.not.include("is-checked"); }); }); + + describe("test 'name' attribute for the radio group", () => { + it("should render the same 'name' attribute for all input[type=radio] within an instance", () => { + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + }); + it("should render different 'name' attribute for all input[type=radio] across different instances", () => { + const wrapper2 = mount(FieldRadios, { + localVue, + propsData: { schema, model, disabled: false } + }); + const radios2 = wrapper2.findAll("input[type=radio]"); + + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + + const nameAttribute2 = radios2.at(0).attributes().name; + expect(radios2.is(`input[name="${nameAttribute2}"]`)); + + expect(nameAttribute).not.to.equal(nameAttribute2); + }); + }); }); describe("check static values with { id, label } objects (custom key name with `radiosOptions`)", () => { @@ -323,5 +367,27 @@ describe("FieldRadios.vue", () => { expect(labelList.at(6).classes()).to.not.include("is-checked"); }); }); + + describe("test 'name' attribute for the radio group", () => { + it("should render the same 'name' attribute for all input[type=radio] within an instance", () => { + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + }); + it("should render different 'name' attribute for all input[type=radio] across different instances", () => { + const wrapper2 = mount(FieldRadios, { + localVue, + propsData: { schema, model, disabled: false } + }); + const radios2 = wrapper2.findAll("input[type=radio]"); + + const nameAttribute = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute}"]`)); + + const nameAttribute2 = radios2.at(0).attributes().name; + expect(radios2.is(`input[name="${nameAttribute2}"]`)); + + expect(nameAttribute).not.to.equal(nameAttribute2); + }); + }); }); }); From 45b20873963d16e4e6291c8a793e3c62bad818da Mon Sep 17 00:00:00 2001 From: Chirag Ravindra Date: Wed, 9 Dec 2020 12:15:59 +0530 Subject: [PATCH 2/4] update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6c546dcb..5b3c5479 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ test/e2e/reports stats.json typings/ typings.json +.idea/ From 51147fa8952b641c5ff267cd73637aa1ca55f7d6 Mon Sep 17 00:00:00 2001 From: Chirag Ravindra Date: Wed, 9 Dec 2020 12:22:15 +0530 Subject: [PATCH 3/4] Clean up unnecessarily verbose code --- src/fields/core/fieldRadios.vue | 2 +- test/unit/specs/fields/fieldRadios.spec.js | 36 ++++++++-------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/fields/core/fieldRadios.vue b/src/fields/core/fieldRadios.vue index 4b09602d..e21f1676 100644 --- a/src/fields/core/fieldRadios.vue +++ b/src/fields/core/fieldRadios.vue @@ -23,7 +23,7 @@ export default { } }, id() { - return `${this.getFieldID(this.schema, true)}`; + return this.getFieldID(this.schema, true); } }, diff --git a/test/unit/specs/fields/fieldRadios.spec.js b/test/unit/specs/fields/fieldRadios.spec.js index 86a20054..8673f5ec 100644 --- a/test/unit/specs/fields/fieldRadios.spec.js +++ b/test/unit/specs/fields/fieldRadios.spec.js @@ -130,17 +130,13 @@ describe("FieldRadios.vue", () => { expect(radios.is(`input[name="${nameAttribute}"]`)); }); it("should render different 'name' attribute for all input[type=radio] across different instances", () => { - const wrapper2 = mount(FieldRadios, { - localVue, - propsData: { schema, model, disabled: false } - }); - const radios2 = wrapper2.findAll("input[type=radio]"); - const nameAttribute = radios.at(0).attributes().name; expect(radios.is(`input[name="${nameAttribute}"]`)); - const nameAttribute2 = radios2.at(0).attributes().name; - expect(radios2.is(`input[name="${nameAttribute2}"]`)); + createField2({ schema, model, disabled: false }); + + const nameAttribute2 = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute2}"]`)); expect(nameAttribute).not.to.equal(nameAttribute2); }); @@ -250,17 +246,13 @@ describe("FieldRadios.vue", () => { expect(radios.is(`input[name="${nameAttribute}"]`)); }); it("should render different 'name' attribute for all input[type=radio] across different instances", () => { - const wrapper2 = mount(FieldRadios, { - localVue, - propsData: { schema, model, disabled: false } - }); - const radios2 = wrapper2.findAll("input[type=radio]"); - const nameAttribute = radios.at(0).attributes().name; expect(radios.is(`input[name="${nameAttribute}"]`)); - const nameAttribute2 = radios2.at(0).attributes().name; - expect(radios2.is(`input[name="${nameAttribute2}"]`)); + createField2({ schema, model, disabled: false }); + + const nameAttribute2 = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute2}"]`)); expect(nameAttribute).not.to.equal(nameAttribute2); }); @@ -374,17 +366,13 @@ describe("FieldRadios.vue", () => { expect(radios.is(`input[name="${nameAttribute}"]`)); }); it("should render different 'name' attribute for all input[type=radio] across different instances", () => { - const wrapper2 = mount(FieldRadios, { - localVue, - propsData: { schema, model, disabled: false } - }); - const radios2 = wrapper2.findAll("input[type=radio]"); - const nameAttribute = radios.at(0).attributes().name; expect(radios.is(`input[name="${nameAttribute}"]`)); - const nameAttribute2 = radios2.at(0).attributes().name; - expect(radios2.is(`input[name="${nameAttribute2}"]`)); + createField2({ schema, model, disabled: false }); + + const nameAttribute2 = radios.at(0).attributes().name; + expect(radios.is(`input[name="${nameAttribute2}"]`)); expect(nameAttribute).not.to.equal(nameAttribute2); }); From ee5abf3b153358f8f290b7c6d74cf0607339e4f0 Mon Sep 17 00:00:00 2001 From: Chirag Ravindra Date: Fri, 11 Dec 2020 10:58:25 +0530 Subject: [PATCH 4/4] 2.4.0 releases --- .bumpedrc | 4 ++-- CHANGELOG.md | 10 ++++++++++ bower.json | 2 +- dist/vfg-core.css | 2 +- dist/vfg-core.js | 4 ++-- dist/vfg.css | 2 +- dist/vfg.js | 4 ++-- package.json | 2 +- 8 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.bumpedrc b/.bumpedrc index a500b7f4..a4b49ac6 100644 --- a/.bumpedrc +++ b/.bumpedrc @@ -17,8 +17,8 @@ plugins: 'Commiting new version': plugin: 'bumped-terminal' - command: 'git commit -am "$newVersion releases" && git push origin master' + command: 'git commit -am "$newVersion releases" && git push My_Fork master' 'Publishing tag at GitHub': plugin: 'bumped-terminal' - command: 'git tag v$newVersion && git push origin v$newVersion' \ No newline at end of file + command: 'git tag v$newVersion && git push My_Fork v$newVersion' diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fa93c1b..309827a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.4.0 (2020-12-11) + +* Changed in intro ([cdf6f93](https://github.com/vue-generators/vue-form-generator/commit/cdf6f93)) +* Clean up unnecessarily verbose code ([51147fa](https://github.com/vue-generators/vue-form-generator/commit/51147fa)) +* Set `name` attribute of radio-groups which are scoped to the instance ([8daba64](https://github.com/vue-generators/vue-form-generator/commit/8daba64)) +* update gitignore ([45b2087](https://github.com/vue-generators/vue-form-generator/commit/45b2087)) +* Updated bundle sizes ([6c5af99](https://github.com/vue-generators/vue-form-generator/commit/6c5af99)) + + + ## 2.3.4 (2019-02-07) * #469 - fixes example in README, tested with a fresh vue-cli project ([b0037c9](https://github.com/vue-generators/vue-form-generator/commit/b0037c9)) diff --git a/bower.json b/bower.json index d8ea0950..f0bd5256 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "vue-form-generator", - "version": "2.3.4", + "version": "2.4.0", "homepage": "https://github.com/vue-generators/vue-form-generator/", "authors": [ "Icebob" diff --git a/dist/vfg-core.css b/dist/vfg-core.css index d13c2914..94fcdd7e 100644 --- a/dist/vfg-core.css +++ b/dist/vfg-core.css @@ -1,5 +1,5 @@ /** - * vue-form-generator v2.3.4 + * vue-form-generator v2.4.0 * https://github.com/vue-generators/vue-form-generator/ * Released under the MIT License. */ diff --git a/dist/vfg-core.js b/dist/vfg-core.js index 60406ccc..5f1a50b5 100644 --- a/dist/vfg-core.js +++ b/dist/vfg-core.js @@ -1,7 +1,7 @@ /** - * vue-form-generator v2.3.4 + * vue-form-generator v2.4.0 * https://github.com/vue-generators/vue-form-generator/ * Released under the MIT License. */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.VueFormGenerator=n():t.VueFormGenerator=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=92)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(49)("wks"),i=e(50),u=e(1).Symbol,o="function"==typeof u;(t.exports=function(t){return r[t]||(r[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=r},function(t,n,e){function r(t){if(!u(t))return!1;var n=i(t);return n==a||n==c||n==o||n==f}var i=e(37),u=e(5),o="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",f="[object Proxy]";t.exports=r},function(t,n,e){"use strict";function r(t,n,e,r,i,u,o,a){t=t||{};var c=typeof t.default;"object"!==c&&"function"!==c||(t=t.default);var f="function"==typeof t?t.options:t;n&&(f.render=n,f.staticRenderFns=e,f._compiled=!0),r&&(f.functional=!0),u&&(f._scopeId=u);var s;if(o?(s=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=s):i&&(s=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),s)if(f.functional){f._injectStyles=s;var l=f.render;f.render=function(t,n){return s.call(n),l(t,n)}}else{var h=f.beforeCreate;f.beforeCreate=h?[].concat(h,s):[s]}return{exports:t,options:f}}n.a=r},function(t,n){function e(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}t.exports=e},function(t,n,e){"use strict";function r(t){return m()(t)?null!=j.default[t]?j.default[t]:(console.warn("'"+t+"' is not a validator function!"),null):t}function i(t,n,e){var r=w()(e.context,"schema.attributes",{}),i=n.value||"input";m()(i)&&(r=w()(r,i)||r),b()(r,function(n,e){t.setAttribute(e,n)})}Object.defineProperty(n,"__esModule",{value:!0});var u=e(43),o=e.n(u),a=e(182),c=e.n(a),f=e(190),s=e.n(f),l=e(77),h=e.n(l),d=e(0),p=e.n(d),v=e(39),m=e.n(v),g=e(3),_=e.n(g),y=e(21),b=e.n(y),x=e(8),w=e.n(x),j=e(79),O=e(26);n.default={props:["vfg","model","schema","formOptions","disabled"],data:function(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{bind:i,updated:i,componentUpdated:i}},computed:{value:{cache:!1,get:function(){var t=void 0;return t=_()(w()(this.schema,"get"))?this.schema.get(this.model):w()(this.model,this.schema.model),this.formatValueToField(t)},set:function(t){var n=this.value;t=this.formatValueToModel(t),_()(t)?t(t,n):this.updateModelValue(t,n)}}},methods:{validate:function(t){var n=this;this.clearValidationErrors();var e=w()(this.formOptions,"validateAsync",!1),i=[];if(this.schema.validator&&!0!==this.schema.readonly&&!0!==this.disabled){var u=[];p()(this.schema.validator)?b()(this.schema.validator,function(t){u.push(r(t).bind(n))}):u.push(r(this.schema.validator).bind(this)),b()(u,function(t){if(e)i.push(t(n.value,n.schema,n.model));else{var r=t(n.value,n.schema,n.model);r&&_()(r.then)?r.then(function(t){t&&(n.errors=n.errors.concat(t));var e=0===n.errors.length;n.$emit("validated",e,n.errors,n)}):r&&(i=i.concat(r))}})}var a=function(e){var r=[];b()(c()(e),function(t){p()(t)&&t.length>0?r=r.concat(t):m()(t)&&r.push(t)}),_()(n.schema.onValidated)&&n.schema.onValidated.call(n,n.model,r,n.schema);var i=0===r.length;return t||n.$emit("validated",i,r,n),n.errors=r,r};return e?o.a.all(i).then(a):a(i)},debouncedValidate:function(){_()(this.debouncedValidateFunc)||(this.debouncedValidateFunc=h()(this.validate.bind(this),w()(this.schema,"validateDebounceTime",w()(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue:function(t,n){var e=!1;_()(this.schema.set)?(this.schema.set(this.model,t),e=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,t),e=!0),e&&(this.$emit("model-updated",t,this.schema.model),_()(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,t,n,this.schema),!0===w()(this.formOptions,"validateAfterChanged",!1)&&(w()(this.schema,"validateDebounceTime",w()(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors:function(){this.errors.splice(0)},setModelValueByPath:function(t,n){var e=t.replace(/\[(\w+)\]/g,".$1");e=e.replace(/^\./,"");for(var r=this.model,i=e.split("."),u=0,o=i.length;u1&&void 0!==arguments[1]&&arguments[1],e=w()(this.formOptions,"fieldIdPrefix","");return Object(O.slugifyFormID)(t,e)+(n?"-"+s()():"")},getFieldClasses:function(){return w()(this.schema,"fieldClasses",[])},formatValueToField:function(t){return t},formatValueToModel:function(t){return t}}}},function(t,n){var e=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=e)},function(t,n,e){function r(t,n,e){var r=null==t?void 0:i(t,n);return void 0===r?e:r}var i=e(134);t.exports=r},function(t,n,e){var r=e(15);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n,e){var r=e(1),i=e(7),u=e(17),o=e(11),a=function(t,n,e){var c,f,s,l=t&a.F,h=t&a.G,d=t&a.S,p=t&a.P,v=t&a.B,m=t&a.W,g=h?i:i[n]||(i[n]={}),_=g.prototype,y=h?r:d?r[n]:(r[n]||{}).prototype;h&&(e=n);for(c in e)(f=!l&&y&&void 0!==y[c])&&c in g||(s=f?y[c]:e[c],g[c]=h&&"function"!=typeof y[c]?e[c]:v&&f?u(s,r):m&&y[c]==s?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(s):p&&"function"==typeof s?u(Function.call,s):s,p&&((g.virtual||(g.virtual={}))[c]=s,t&a.R&&_&&!_[c]&&o(_,c,s)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,e){var r=e(14),i=e(46);t.exports=e(12)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){t.exports=!e(31)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){function e(t){return null==t}t.exports=e},function(t,n,e){var r=e(9),i=e(99),u=e(100),o=Object.defineProperty;n.f=e(12)?Object.defineProperty:function(t,n,e){if(r(t),n=u(n,!0),r(e),i)try{return o(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports={}},function(t,n,e){var r=e(18);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){function r(t,n){return(a(t)?i:u)(t,o(n))}var i=e(59),u=e(127),o=e(133),a=e(0);t.exports=r},function(t,n,e){var r=e(23),i=r(Object.keys,Object);t.exports=i},function(t,n){function e(t,n){return function(e){return t(n(e))}}t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n,e){var r=e(140),i="object"==typeof self&&self&&self.Object===Object&&self,u=r||i||Function("return this")();t.exports=u},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e.d(n,"createDefaultObject",function(){return g}),e.d(n,"getMultipleFields",function(){return _}),e.d(n,"mergeMultiObjectFields",function(){return y}),e.d(n,"slugifyFormID",function(){return b}),e.d(n,"slugify",function(){return x});var r=e(148),i=e.n(r),u=e(3),o=e.n(u),a=e(0),c=e.n(a),f=e(5),s=e.n(f),l=e(174),h=e.n(l),d=e(175),p=e.n(d),v=e(8),m=e.n(v),g=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h()(t.fields,function(e){void 0===m()(n,e.model)&&void 0!==e.default&&(o()(e.default)?p()(n,e.model,e.default(e,t,n)):s()(e.default)||c()(e.default)?p()(n,e.model,i()(e.default)):p()(n,e.model,e.default))}),n},_=function(t){var n=[];return h()(t.fields,function(t){!0===t.multi&&n.push(t)}),n},y=function(t,n){var e={},r=_(t);return h()(r,function(t){var r=void 0,i=!0,u=t.model;h()(n,function(t){var n=m()(t,u);i?(r=n,i=!1):r!==n&&(r=void 0)}),p()(e,u,r)}),e},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return void 0!==t.id?n+t.id:n+(t.inputName||t.label||t.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,"")},x=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_\/.\/:]+)/g,"")}},function(t,n,e){function r(t,n){for(var e=t.length;e--;)if(i(t[e][0],n))return e;return-1}var i=e(40);t.exports=r},function(t,n,e){function r(t,n,e,r){var o=!e;e||(e={});for(var a=-1,c=n.length;++a0?r:e)(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r=e(15),i=e(1).document,u=r(i)&&r(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(106),i=e(30);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(49)("keys"),i=e(50);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n,e){var r=e(14).f,i=e(19),u=e(2)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,u)&&r(t,u,{configurable:!0,value:n})}},function(t,n,e){"use strict";function r(t){var n,e;this.promise=new t(function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r}),this.resolve=i(n),this.reject=i(e)}var i=e(18);t.exports.f=function(t){return new r(t)}},function(t,n){function e(t){return i.call(t)}var r=Object.prototype,i=r.toString;t.exports=e},function(t,n,e){function r(t){return null!=t&&u(t.length)&&!i(t)}var i=e(3),u=e(132);t.exports=r},function(t,n,e){function r(t){return"string"==typeof t||!u(t)&&o(t)&&i(t)==a}var i=e(37),u=e(0),o=e(65),a="[object String]";t.exports=r},function(t,n){function e(t,n){return t===n||t!==t&&n!==n}t.exports=e},function(t,n,e){function r(t,n,e){var r=t[n];a.call(t,n)&&u(r,e)&&(void 0!==e||n in t)||i(t,n,e)}var i=e(68),u=e(40),o=Object.prototype,a=o.hasOwnProperty;t.exports=r},function(t,n,e){"use strict";var r=e(43),i=e.n(r),u=e(0),o=e.n(u),a=e(13),c=e.n(a),f=e(3),s=e.n(f),l=e(21),h=e.n(l),d=e(8),p=e.n(d),v=e(64),m=e(146);n.a={name:"formGenerator",components:{formGroup:m.a},mixins:[v.a],props:{schema:Object,model:Object,options:{type:Object,default:function(){return{validateAfterLoad:!1,validateAfterChanged:!1,fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:""}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(t){return t.length>0}}},data:function(){return{vfg:this,errors:[]}},computed:{fields:function(){var t=this,n=[];return this.schema&&this.schema.fields&&h()(this.schema.fields,function(e){t.multiple&&!0!==e.multi||n.push(e)}),n},groups:function(){var t=[];return this.schema&&this.schema.groups&&h()(this.schema.groups.slice(0),function(n){t.push(n)}),t}},watch:{model:function(t,n){var e=this;n!==t&&null!=t&&this.$nextTick(function(){!0===e.options.validateAfterLoad&&!0!==e.isNewModel?e.validate():e.clearValidationErrors()})}},mounted:function(){var t=this;this.$nextTick(function(){t.model&&(!0===t.options.validateAfterLoad&&!0!==t.isNewModel?t.validate():t.clearValidationErrors())})},methods:{fieldVisible:function(t){return s()(t.visible)?t.visible.call(this,this.model,t,this):!!c()(t.visible)||t.visible},onFieldValidated:function(t,n,e){var r=this;this.errors=this.errors.filter(function(t){return t.field!==e.schema}),!t&&n&&n.length>0&&h()(n,function(t){r.errors.push({field:e.schema,error:t})});var i=0===this.errors.length;this.$emit("validated",i,this.errors,this)},onModelUpdated:function(t,n){this.$emit("model-updated",t,n)},validate:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===n&&(n=p()(this.options,"validateAsync",!1)),this.clearValidationErrors();var e=[],r=[];h()(this.$children,function(t){s()(t.validate)&&(e.push(t.$refs.child),r.push(t.validate(!0)))});var u=function(r){var i=[];h()(r,function(t,n){o()(t)&&t.length>0&&h()(t,function(t){i.push({field:e[n].schema,error:t})})}),t.errors=i;var u=0===i.length;return t.$emit("validated",u,i,t),n?i:u};return n?i.a.all(r).then(u):u(r)},clearValidationErrors:function(){this.errors.splice(0),h()(this.$children,function(t){t.clearValidationErrors()})}}}},function(t,n,e){t.exports={default:e(95),__esModule:!0}},function(t,n,e){"use strict";var r=e(45),i=e(10),u=e(101),o=e(11),a=e(19),c=e(16),f=e(102),s=e(35),l=e(109),h=e(2)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,e,v,m,g,_){f(e,n,v);var y,b,x,w=function(t){if(!d&&t in M)return M[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},j=n+" Iterator",O="values"==m,C=!1,M=t.prototype,I=M[h]||M["@@iterator"]||m&&M[m],S=I||w(m),T=m?O?w("entries"):S:void 0,k="Array"==n?M.entries||I:I;if(k&&(x=l(k.call(new t)))!==Object.prototype&&x.next&&(s(x,j,!0),r||a(x,h)||o(x,h,p)),O&&I&&"values"!==I.name&&(C=!0,S=function(){return I.call(this)}),r&&!_||!d&&!C&&M[h]||o(M,h,S),c[n]=S,c[j]=p,m)if(y={values:O?S:w("values"),keys:g?S:w("keys"),entries:T},_)for(b in y)b in M||u(M,b,y[b]);else i(i.P+i.F*(d||C),n,y);return y}},function(t,n){t.exports=!0},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(105),i=e(51);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n,e){var r=e(29),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){var r=e(1),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(1).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(30);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(20),i=e(2)("toStringTag"),u="Arguments"==r(function(){return arguments}()),o=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=o(n=Object(t),i))?e:u?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(9),i=e(18),u=e(2)("species");t.exports=function(t,n){var e,o=r(t).constructor;return void 0===o||void 0==(e=r(o)[u])?n:i(e)}},function(t,n,e){var r,i,u,o=e(17),a=e(120),c=e(52),f=e(32),s=e(1),l=s.process,h=s.setImmediate,d=s.clearImmediate,p=s.MessageChannel,v=s.Dispatch,m=0,g={},_=function(){var t=+this;if(g.hasOwnProperty(t)){var n=g[t];delete g[t],n()}},y=function(t){_.call(t.data)};h&&d||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return g[++m]=function(){a("function"==typeof t?t:Function(t),n)},r(m),m},d=function(t){delete g[t]},"process"==e(20)(l)?r=function(t){l.nextTick(o(_,t,1))}:v&&v.now?r=function(t){v.now(o(_,t,1))}:p?(i=new p,u=i.port2,i.port1.onmessage=y,r=o(u.postMessage,u,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(r=function(t){s.postMessage(t+"","*")},s.addEventListener("message",y,!1)):r="onreadystatechange"in f("script")?function(t){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),_.call(t)}}:function(t){setTimeout(o(_,t,1),0)}),t.exports={set:h,clear:d}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(9),i=e(15),u=e(36);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=u.f(t);return(0,e.resolve)(n),e.promise}},function(t,n){function e(t,n){for(var e=-1,r=null==t?0:t.length;++e0,r=(n={},i()(n,m()(this.options,"validationErrorClass","error"),e),i()(n,m()(this.options,"validationSuccessClass","valid"),!e),i()(n,"disabled",this.fieldDisabled(t)),i()(n,"readonly",this.fieldReadonly(t)),i()(n,"featured",this.fieldFeatured(t)),i()(n,"required",this.fieldRequired(t)),n);return s()(t.styleClasses)?p()(t.styleClasses,function(t){return r[t]=!0}):c()(t.styleClasses)&&(r[t.styleClasses]=!0),h()(t.type)||(r["field-"+t.type]=!0),r},fieldErrors:function(t){return this.errors.filter(function(n){return n.field===t}).map(function(t){return t.error})},fieldDisabled:function(t){return o()(t.disabled)?t.disabled.call(this,this.model,t,this):!h()(t.disabled)&&t.disabled},fieldReadonly:function(t){return o()(t.readonly)?t.readonly.call(this,this.model,t,this):!h()(t.readonly)&&t.readonly},fieldFeatured:function(t){return o()(t.featured)?t.featured.call(this,this.model,t,this):!h()(t.featured)&&t.featured},fieldRequired:function(t){return o()(t.required)?t.required.call(this,this.model,t,this):!h()(t.required)&&t.required}}}},function(t,n){function e(t){return null!=t&&"object"==typeof t}t.exports=e},function(t,n,e){"use strict";var r=e(3),i=e.n(r),u=e(13),o=e.n(u),a=e(8),c=e.n(a),f=e(26),s=e(64),l=e(74),h=e.n(l);n.a={name:"form-group",components:h.a,mixins:[s.a],props:{vfg:{type:Object,required:!0},model:Object,options:{type:Object},field:{type:Object,required:!0},errors:{type:Array,default:function(){return[]}}},methods:{fieldTypeHasLabel:function(t){if(o()(t.label))return!1;switch("input"===t.type?t.inputType:t.type){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID:function(t){var n=c()(this.options,"fieldIdPrefix","");return Object(f.slugifyFormID)(t,n)},getFieldType:function(t){return"field-"+t.type},getButtonType:function(t){return c()(t,"type","button")},onFieldValidated:function(t,n,e){this.$emit("validated",t,n,e)},buttonVisibility:function(t){return t.buttons&&t.buttons.length>0},buttonClickHandler:function(t,n,e){return t.onclick.call(this,this.model,n,e,this)},fieldHint:function(t){return i()(t.hint)?t.hint.call(this,this.model,t,this):t.hint},fieldErrors:function(t){return this.errors.filter(function(n){return n.field===t}).map(function(t){return t.error})},onModelUpdated:function(t,n){this.$emit("model-updated",t,n)},validate:function(t){return this.$refs.child.validate(t)},clearValidationErrors:function(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()}}}},function(t,n,e){function r(t,n,e,F,D,P){var N,L=n&C,R=n&M,V=n&I;if(e&&(N=D?e(t,F,D,P):e(t)),void 0!==N)return N;if(!w(t))return t;var $=y(t);if($){if(N=m(t),!L)return s(t,N)}else{var z=v(t),U=z==T||z==k;if(b(t))return f(t,L);if(z==A||z==S||U&&!D){if(N=R||U?{}:_(t),!L)return R?h(t,c(N,t)):l(t,a(N,t))}else{if(!E[z])return D?t:{};N=g(t,z,L)}}P||(P=new i);var q=P.get(t);if(q)return q;if(P.set(t,N),j(t))return t.forEach(function(i){N.add(r(i,n,e,i,t,P))}),N;if(x(t))return t.forEach(function(i,u){N.set(u,r(i,n,e,u,t,P))}),N;var B=V?R?p:d:R?keysIn:O,Y=$?void 0:B(t);return u(Y||t,function(i,u){Y&&(u=i,i=t[u]),o(N,u,r(i,n,e,u,t,P))}),N}var i=e(149),u=e(59),o=e(41),a=e(157),c=e(158),f=e(159),s=e(160),l=e(161),h=e(163),d=e(165),p=e(166),v=e(71),m=e(167),g=e(168),_=e(169),y=e(0),b=e(73),x=e(172),w=e(5),j=e(173),O=e(22),C=1,M=2,I=4,S="[object Arguments]",T="[object Function]",k="[object GeneratorFunction]",A="[object Object]",E={};E[S]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[A]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[T]=E["[object WeakMap]"]=!1,t.exports=r},function(t,n,e){function r(t,n,e){"__proto__"==n&&i?i(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}var i=e(155);t.exports=r},function(t,n){function e(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n){function e(t){return i.call(t)}var r=Object.prototype,i=r.toString;t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n){function e(){return!1}t.exports=e},function(t,n,e){var r=e(178).forEach,i={},u=e(179);r(u.keys(),function(t){var n=t.replace(/^\.\//,"").replace(/\.vue/,"");i[n]=u(t).default});t.exports=i},function(t,n,e){"use strict";var r=e(6);n.a={mixins:[r.default]}},function(t,n){function e(t,n,e){for(var r=e-1,i=t.length;++r=n||e<0||M&&r>=b}function d(){var t=u();if(h(t))return p(t);w=setTimeout(d,l(t))}function p(t){return w=void 0,I&&_?r(t):(_=y=void 0,x)}function v(){void 0!==w&&clearTimeout(w),O=0,_=j=y=w=void 0}function m(){return void 0===w?x:p(u())}function g(){var t=u(),e=h(t);if(_=arguments,y=this,j=t,e){if(void 0===w)return s(j);if(M)return w=setTimeout(d,n),r(j)}return void 0===w&&(w=setTimeout(d,n)),x}var _,y,b,x,w,j,O=0,C=!1,M=!1,I=!0;if("function"!=typeof t)throw new TypeError(a);return n=o(n)||0,i(e)&&(C=!!e.leading,M="maxWait"in e,b=M?c(o(e.maxWait)||0,n):b,I="trailing"in e?!!e.trailing:I),g.cancel=v,g.flush=m,g}var i=e(5),u=e(191),o=e(78),a="Expected a function",c=Math.max,f=Math.min;t.exports=r},function(t,n,e){function r(t){if("number"==typeof t)return t;if(u(t))return o;if(i(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=i(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var e=f.test(t);return e||s.test(t)?l(t.slice(2),e?2:8):c.test(t)?o:+t}var i=e(5),u=e(24),o=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=r},function(t,n,e){"use strict";function r(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;return b()(t)||""===t?n?[i(e.fieldIsRequired)]:[]:null}function i(t){if(null!=t&&arguments.length>1)for(var n=1;n3&&void 0!==arguments[3]?arguments[3]:C;return r(t,n.required,i)},number:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;var a=[];return c()(t)?(!b()(n.min)&&tn.max&&a.push(i(u.numberTooBig,n.max))):a.push(i(u.invalidNumber)),a},integer:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;var a=M.number(t,n,e,u);return m()(t)||a.push(i(u.invalidInteger)),a},double:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);return null!=o?o:!_()(t)||isNaN(t)?[i(u.invalidNumber)]:void 0},string:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;var a=[];return p()(t)?(!b()(n.min)&&t.lengthn.max&&a.push(i(u.textTooBig,t.length,n.max))):a.push(i(u.thisNotText)),a},array:function(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C;if(n.required){if(!h()(t))return[i(r.thisNotArray)];if(0===t.length)return[i(r.fieldIsRequired)]}if(!b()(t)){if(!b()(n.min)&&t.lengthn.max)return[i(r.selectMaxItems,n.max)]}},date:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;var a=new Date(t);if(isNaN(a.getDate()))return[i(u.invalidDate)];var c=[];if(!b()(n.min)){var f=new Date(n.min);a.valueOf()s.valueOf()&&c.push(i(u.dateIsLate,O.a.format(a),O.a.format(s)))}return c},regexp:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;if(!b()(n.pattern)){if(!new RegExp(n.pattern).test(t))return[i(u.invalidFormat)]}},email:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);return null!=o?o:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)?void 0:[i(u.invalidEmail)]},url:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);return null!=o?o:/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g.test(t)?void 0:[i(u.invalidURL)]},creditCard:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);if(null!=o)return o;var a=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,c=t.replace(/[^0-9]+/g,"");if(!a.test(c))return[i(u.invalidCard)];for(var f=0,s=void 0,l=void 0,h=void 0,d=c.length-1;d>=0;d--)s=c.substring(d,d+1),l=parseInt(s,10),h?(l*=2,f+=l>=10?l%10+1:l):f+=l,h=!h;return f%10==0&&c?void 0:[i(u.invalidCardNumber)]},alpha:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);return null!=o?o:/^[a-zA-Z]*$/.test(t)?void 0:[i(u.invalidTextContainNumber)]},alphaNumeric:function(t,n,e){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:C,o=r(t,n.required,u);return null!=o?o:/^[a-zA-Z0-9]*$/.test(t)?void 0:[i(u.invalidTextContainSpec)]}};o()(M).forEach(function(t){var n=M[t];s()(n)&&(n.locale=function(t){return function(e,r,i){return n(e,r,i,w()(t,C))}})}),n.default=M},function(t,n,e){function r(t){var n=i(t),e=n%1;return n===n?e?n-e:n:0}var i=e(198);t.exports=r},function(t,n,e){function r(t){return"number"==typeof t||u(t)&&i(t)==o}var i=e(37),u=e(65),o="[object Number]";t.exports=r},function(t,n,e){var r;!function(i){"use strict";function u(t,n){for(var e=[],r=0,i=t.length;r3?0:(t-t%10!=10)*t%10]}};var b={D:function(t){return t.getDate()},DD:function(t){return a(t.getDate())},Do:function(t,n){return n.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return a(t.getDay())},ddd:function(t,n){return n.dayNamesShort[t.getDay()]},dddd:function(t,n){return n.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return a(t.getMonth()+1)},MMM:function(t,n){return n.monthNamesShort[t.getMonth()]},MMMM:function(t,n){return n.monthNames[t.getMonth()]},YY:function(t){return String(t.getFullYear()).substr(2)},YYYY:function(t){return a(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return a(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return a(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return a(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return a(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return a(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return a(t.getMilliseconds(),3)},a:function(t,n){return t.getHours()<12?n.amPm[0]:n.amPm[1]},A:function(t,n){return t.getHours()<12?n.amPm[0].toUpperCase():n.amPm[1].toUpperCase()},ZZ:function(t){var n=t.getTimezoneOffset();return(n>0?"-":"+")+a(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4)}},x={D:[s,function(t,n){t.day=n}],Do:[new RegExp(s.source+d.source),function(t,n){t.day=parseInt(n,10)}],M:[s,function(t,n){t.month=n-1}],YY:[s,function(t,n){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);t.year=""+(n>68?r-1:r)+n}],h:[s,function(t,n){t.hour=n}],m:[s,function(t,n){t.minute=n}],s:[s,function(t,n){t.second=n}],YYYY:[h,function(t,n){t.year=n}],S:[/\d/,function(t,n){t.millisecond=100*n}],SS:[/\d{2}/,function(t,n){t.millisecond=10*n}],SSS:[l,function(t,n){t.millisecond=n}],d:[s,v],ddd:[d,v],MMM:[d,o("monthNamesShort")],MMMM:[d,o("monthNames")],a:[d,function(t,n,e){var r=n.toLowerCase();r===e.amPm[0]?t.isPm=!1:r===e.amPm[1]&&(t.isPm=!0)}],ZZ:[/([\+\-]\d\d:?\d\d|Z)/,function(t,n){"Z"===n&&(n="+00:00");var e,r=(n+"").match(/([\+\-]|\d\d)/gi);r&&(e=60*r[1]+parseInt(r[2],10),t.timezoneOffset="+"===r[0]?e:-e)}]};x.dd=x.d,x.dddd=x.ddd,x.DD=x.D,x.mm=x.m,x.hh=x.H=x.HH=x.h,x.MM=x.M,x.ss=x.s,x.A=x.a,c.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},c.format=function(t,n,e){var r=e||c.i18n;if("number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");n=c.masks[n]||n||c.masks.default;var i=[];return n=n.replace(p,function(t,n){return i.push(n),"??"}),n=n.replace(f,function(n){return n in b?b[n](t,r):n.slice(1,n.length-1)}),n.replace(/\?\?/g,function(){return i.shift()})},c.parse=function(t,n,e){var r=e||c.i18n;if("string"!=typeof n)throw new Error("Invalid format in fecha.parse");if(n=c.masks[n]||n,t.length>1e3)return!1;var i=!0,u={};if(n.replace(f,function(n){if(x[n]){var e=x[n],o=t.search(e[0]);~o?t.replace(e[0],function(n){return e[1](u,n,r),t=t.substr(o+n.length),n}):i=!1}return x[n]?"":n.slice(1,n.length-1)}),!i)return!1;var o=new Date;!0===u.isPm&&null!=u.hour&&12!=+u.hour?u.hour=+u.hour+12:!1===u.isPm&&12==+u.hour&&(u.hour=0);var a;return null!=u.timezoneOffset?(u.minute=+(u.minute||0)-+u.timezoneOffset,a=new Date(Date.UTC(u.year||o.getFullYear(),u.month||0,u.day||1,u.hour||0,u.minute||0,u.second||0,u.millisecond||0))):a=new Date(u.year||o.getFullYear(),u.month||0,u.day||1,u.hour||0,u.minute||0,u.second||0,u.millisecond||0),a},void 0!==t&&t.exports?t.exports=c:void 0!==(r=function(){return c}.call(n,e,n,t))&&(t.exports=r)}()},function(t,n,e){"use strict";var r=e(209),i=e.n(r),u=e(13),o=e.n(u),a=e(5),c=e.n(a),f=e(6),s=e(26);n.a={mixins:[f.default],data:function(){return{comboExpanded:!1}},computed:{items:function(){var t=this.schema.values;return"function"==typeof t?t.apply(this,[this.model,this.schema]):t},selectedCount:function(){return this.value?this.value.length:0}},methods:{getInputName:function(t){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?Object(s.slugify)(this.schema.inputName+"_"+this.getItemValue(t)):Object(s.slugify)(this.getItemValue(t))},getItemValue:function(t){if(c()(t)){if(void 0!==this.schema.checklistOptions&&void 0!==this.schema.checklistOptions.value)return t[this.schema.checklistOptions.value];if(void 0!==t.value)return t.value;throw"`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values"}return t},getItemName:function(t){if(c()(t)){if(void 0!==this.schema.checklistOptions&&void 0!==this.schema.checklistOptions.name)return t[this.schema.checklistOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values"}return t},isItemChecked:function(t){return this.value&&-1!==this.value.indexOf(this.getItemValue(t))},onChanged:function(t,n){if(!o()(this.value)&&Array.isArray(this.value)||(this.value=[]),t.target.checked){var e=i()(this.value);e.push(this.getItemValue(n)),this.value=e}else{var r=i()(this.value);r.splice(this.value.indexOf(this.getItemValue(n)),1),this.value=r}},onExpandCombo:function(){this.comboExpanded=!this.comboExpanded}}}},function(t,n,e){"use strict";var r=e(81),i=e.n(r),u=e(3),o=e.n(u),a=e(8),c=e.n(a),f=e(77),s=e.n(f),l=e(6),h=e(82),d=e.n(h),p={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"};n.a={mixins:[l.default],computed:{inputType:function(){return this.schema&&"datetime"===this.schema.inputType?"datetime-local":this.schema.inputType}},methods:{formatValueToModel:function(t){var n=this;if(null!=t)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return function(e,r){n.debouncedFormatFunc(t,r)}}return t},formatValueToField:function(t){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(t)}return t},formatDatetimeToModel:function(t,n){var e=p[this.schema.inputType.toLowerCase()],r=d.a.parse(t,e);!1!==r&&(t=this.schema.format?d.a.format(r,this.schema.format):r.valueOf()),this.updateModelValue(t,n)},formatDatetimeValueToField:function(t){if(null===t||void 0===t)return null;var n=p[this.schema.inputType.toLowerCase()],e=t;return i()(t)||(e=d.a.parse(t,n)),!1!==e?d.a.format(e,n):t},formatNumberToModel:function(t,n){i()(t)||(t=NaN),this.updateModelValue(t,n)},onInput:function(t){var n=t.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":i()(parseFloat(t.target.value))&&(n=parseFloat(t.target.value))}this.value=n},onBlur:function(){o()(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}},mounted:function(){var t=this;switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=s()(function(n,e){t.formatNumberToModel(n,e)},parseInt(c()(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=s()(function(n,e){t.formatDatetimeToModel(n,e)},parseInt(c()(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1})}},created:function(){"file"===this.schema.inputType.toLowerCase()&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")}}},function(t,n,e){"use strict";var r=e(6);n.a={mixins:[r.default]}},function(t,n,e){"use strict";var r=e(8),i=e.n(r),u=e(3),o=e.n(u),a=e(5),c=e.n(a),f=e(6);n.a={mixins:[f.default],computed:{items:function(){var t=this.schema.values;return"function"==typeof t?t.apply(this,[this.model,this.schema]):t},id:function(){return this.schema.model}},methods:{getItemValue:function(t){if(c()(t)){if(void 0!==this.schema.radiosOptions&&void 0!==this.schema.radiosOptions.value)return t[this.schema.radiosOptions.value];if(void 0!==t.value)return t.value;throw"`value` is not defined. If you want to use another key name, add a `value` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values"}return t},getItemName:function(t){if(c()(t)){if(void 0!==this.schema.radiosOptions&&void 0!==this.schema.radiosOptions.name)return t[this.schema.radiosOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values"}return t},getItemCssClasses:function(t){return{"is-checked":this.isItemChecked(t),"is-disabled":this.isItemDisabled(t)}},onSelection:function(t){this.value=this.getItemValue(t)},isItemChecked:function(t){return this.getItemValue(t)===this.value},isItemDisabled:function(t){if(this.disabled)return!0;var n=i()(t,"disabled",!1);return o()(n)?n(this.model):n}}}},function(t,n,e){"use strict";var r=e(222),i=e.n(r),u=e(13),o=e.n(u),a=e(5),c=e.n(a),f=e(6);n.a={mixins:[f.default],computed:{selectOptions:function(){return this.schema.selectOptions||{}},items:function(){var t=this.schema.values;return"function"==typeof t?this.groupValues(t.apply(this,[this.model,this.schema])):this.groupValues(t)}},methods:{formatValueToField:function(t){return o()(t)?null:t},groupValues:function(t){var n=[],e={};return t.forEach(function(t){e=null,t.group&&c()(t)?(e=i()(n,function(n){return n.group===t.group}),e?e.ops.push({id:t.id,name:t.name}):(e={group:"",ops:[]},e.group=t.group,e.ops.push({id:t.id,name:t.name}),n.push(e))):n.push(t)}),n},getGroupName:function(t){if(t&&t.group)return t.group;throw"Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"},getItemValue:function(t){if(c()(t)){if(void 0!==this.schema.selectOptions&&void 0!==this.schema.selectOptions.value)return t[this.schema.selectOptions.value];if(void 0!==t.id)return t.id;throw"`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"}return t},getItemName:function(t){if(c()(t)){if(void 0!==this.schema.selectOptions&&void 0!==this.schema.selectOptions.name)return t[this.schema.selectOptions.name];if(void 0!==t.name)return t.name;throw"`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items"}return t}}}},function(t,n){function e(t){return t}t.exports=e},function(t,n,e){"use strict";var r=e(229),i=e.n(r),u=e(3),o=e.n(u),a=e(8),c=e.n(a),f=e(6);n.a={mixins:[f.default],methods:{onClick:function(t){var n=this;if(!0===this.schema.validateBeforeSubmit){t.preventDefault();var e=c()(this.formOptions,"validateAsync",!1),r=this.vfg.validate(),u=function(r){e&&!i()(r)||!e&&!r?o()(n.schema.onValidationError)&&n.schema.onValidationError(n.model,n.schema,r,t):o()(n.schema.onSubmit)&&n.schema.onSubmit(n.model,n.schema,t)};r&&o()(r.then)?r.then(u):u(r)}else o()(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,t)}}}},function(t,n,e){"use strict";var r=e(6);n.a={mixins:[r.default]}},function(t,n,e){"use strict";var r=e(3),i=e.n(r),u=e(6);n.a={mixins:[u.default],methods:{onChange:function(t){i()(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,t,this)}}}},function(t,n,e){var r=e(93).default,i=e(26),u=e(79).default,o=e(74).default,a=e(6).default,c=function(n,e){if(n.component("VueFormGenerator",t.exports.component),e&&e.validators)for(var r in e.validators)({}).hasOwnProperty.call(e.validators,r)&&(u[r]=e.validators[r])};t.exports={component:r,schema:i,validators:u,abstractField:a,fieldComponents:o,install:c}},function(t,n,e){"use strict";function r(t){e(94)}Object.defineProperty(n,"__esModule",{value:!0});var i=e(42),u=e(241),o=e(4),a=r,c=Object(o.a)(i.a,u.a,u.b,!1,a,null,null);n.default=c.exports},function(t,n){},function(t,n,e){e(96),e(97),e(110),e(114),e(125),e(126),t.exports=e(7).Promise},function(t,n){},function(t,n,e){"use strict";var r=e(98)(!0);e(44)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){var r=e(29),i=e(30);t.exports=function(t){return function(n,e){var u,o,a=String(i(n)),c=r(e),f=a.length;return c<0||c>=f?t?"":void 0:(u=a.charCodeAt(c),u<55296||u>56319||c+1===f||(o=a.charCodeAt(c+1))<56320||o>57343?t?a.charAt(c):u:t?a.slice(c,c+2):o-56320+(u-55296<<10)+65536)}}},function(t,n,e){t.exports=!e(12)&&!e(31)(function(){return 7!=Object.defineProperty(e(32)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(15);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,e){t.exports=e(11)},function(t,n,e){"use strict";var r=e(103),i=e(46),u=e(35),o={};e(11)(o,e(2)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(o,{next:i(1,e)}),u(t,n+" Iterator")}},function(t,n,e){var r=e(9),i=e(104),u=e(51),o=e(34)("IE_PROTO"),a=function(){},c=function(){var t,n=e(32)("iframe"),r=u.length;for(n.style.display="none",e(52).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("