System.register(["./p-1a0e1932.system.js"],(function(e){"use strict";var t,i,r,n;return{setters:[function(e){t=e.r;i=e.c;r=e.h;n=e.g}],execute:function(){var o=e("taro_form_core",function(){function e(e){t(this,e);this.onSubmit=i(this,"submit",7);this.value={}}e.prototype.onButtonSubmit=function(e){e.stopPropagation();this.value=this.getFormValue();this.onSubmit.emit({value:this.value})};e.prototype.onButtonReset=function(e){e.stopPropagation();this.form.reset()};e.prototype.componentDidLoad=function(){var e=this;this.value=this.getFormValue();Object.defineProperty(this.el,"value",{get:function(){return e.value},configurable:true})};e.prototype.componentDidRender=function(){var e=this;if(!this.originalAppendChild){this.originalAppendChild=this.el.appendChild;this.originalInsertBefore=this.el.insertBefore;this.originalReplaceChild=this.el.replaceChild;this.originalRemoveChild=this.el.removeChild}if(!this.form){this.el.appendChild=this.originalAppendChild;this.el.insertBefore=this.originalInsertBefore;this.el.replaceChild=this.originalReplaceChild;this.el.removeChild=this.originalRemoveChild;return}this.el.appendChild=function(t){return e.form.appendChild(t)};this.el.insertBefore=function(t,i){return e.form.insertBefore(t,i)};this.el.replaceChild=function(t,i){return e.form.replaceChild(t,i)};this.el.removeChild=function(t){return e.form.removeChild(t)}};e.prototype.getFormValue=function(){var e=this.el;var t=[];var i=e.getElementsByTagName("input");for(var r=0;r<i.length;r++){t.push(i[r])}var n={};var o={};t.forEach((function(e){if(typeof e.name!=="string")return;if(e.className.indexOf("weui-switch")!==-1){n[e.name]=e.checked;return}if(e.type==="radio"){if(e.checked){o[e.name]=true;n[e.name]=e.value}else{if(!o[e.name]){n[e.name]=""}}return}if(e.type==="checkbox"){if(e.checked){if(o[e.name]){n[e.name].push(e.value)}else{o[e.name]=true;n[e.name]=[e.value]}}else{if(!o[e.name]){n[e.name]=[]}}return}n[e.name]=e.value}));var a=e.getElementsByTagName("textarea");var l=[];for(var s=0;s<a.length;s++){l.push(a[s])}l.forEach((function(e){if(typeof e.name!=="string")return;n[e.name]=e.value}));return n};e.prototype.render=function(){var e=this;return r("form",{ref:function(t){e.form=t}},r("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}())}}}));
//# sourceMappingURL=p-de2d8e2e.system.entry.js.map