Liferay.Loader.define("commerce-frontend-js@4.0.52/utilities/forms/formsHelper",["module","exports","require"],(function(e,r,n){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.isFormElement=function(e){return e instanceof HTMLFormElement},r.toJSON=function(r){const n={};for(const[u,i]of r.entries())if(t=u,!e.includes(t)){if(!(u in n)){n[u]=i;continue}Array.isArray(n[u])||(n[u]=[n[u]]),n[u].push(i)}var t;return n},r.getDefaultFieldsShape=function(e){try{const r=e.pages[0].rows;return r.map((e=>e.columns[0].fields[0])).map((e=>{const{fieldName:r,predefinedValue:n,required:u}=e;return{key:r,required:u,value:t(n)}}))}catch(e){return[]}},r.updateFields=function(e,r){return e.reduce(((e,n)=>{const{key:u}=n,{fieldInstance:i,value:o}=r,{fieldName:s}=i;return s===u?e.push({key:s,required:n.required,value:t(o)}):e.push(n),e}),[])};const e=["formDate","p_auth"];function t(e){return Array.isArray(e)?[...e]:[e]}}}));
//# sourceMappingURL=formsHelper.js.map