1import{x as i}from"./main-Ex-1LHMJ.js";function s(t,e,r){const{objAtPath:n,lastKey:a}=l(t,e);return r!==void 0?n[a]=r:n[a]}function l(t,e){let r=t;const{pathSplit:n,lastKey:a}=f(e);return n.reduce((u,c)=>{const o=u.replaceAll("\\","");return p(o).onThe(r).anObjectOrArrayDependingOn(c),r=r[o],c}),{objAtPath:r,lastKey:a}}function f(t){const e=t.split(/\]\[|\]\.|(?<!\\)\[|(?<!\\)\.|(?<!\\)\]/g);return e.at(-1)===""&&e.pop(),{pathSplit:e,lastKey:e.at(-1)?.replaceAll("\\","")||""}}function p(t){let e=null;const r=a=>{e[t]||(Number.isInteger(Number(a))?e[t]=[]:e[t]={})};return{onThe:a=>(e=a,{anObjectOrArrayDependingOn:r})}}function b(t){const e=Array.from(t.querySelectorAll("[name]")),r={};for(const n of e){const a=n.getAttribute("name")||"",{val:u,skip:c}=d(n);c||s(r,a,u)}return r}function d(t){return t.type==="radio"&&t.checked?{val:t.id||t.value}:t.type==="radio"&&!t.checked?{skip:!0}:t.type==="checkbox"?{val:t.checked}:t.type==="number"?{val:+t.value}:t.value?{val:t.value}:{val:""}}function g(t){return i("form",{onSubmit:r=>{r.preventDefault();const n=r.target;if(!n||n.checkValidity()===!1)return;const a=b(r.target);t.onSubmit(a),n.reset()},class:t.class},t.children)}export{g as F,b as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.