var p=Object.defineProperty;var c=Object.getOwnPropertySymbols;var r=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var d=(a,o,t)=>o in a?p(a,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[o]=t,s=(a,o)=>{for(var t in o||(o={}))r.call(o,t)&&d(a,t,o[t]);if(c)for(var t of c(o))f.call(o,t)&&d(a,t,o[t]);return a};import"./main.2.8.1.js";const w=a=>{const o={},l=window.location.href.replace(`${window.opener.location.href}/redirect`,"").split("&");l&&l.forEach(i=>{const e=i.split("=");e[1]&&(o[e[0]]=e[1])}),localStorage.setItem(`__${a}`,JSON.stringify(o)),window.close()},g=(a,o,t,l,i)=>{const e=s({},o);e.field_map.splice(a,0,{}),t(s({},e))},h=(a,o,t,l,i)=>{const e=s({},o);e.field_map.length>1&&e.field_map.splice(a,1),t(s({},e))},_=(a,o,t,l,i,e)=>{const n=s({},t);n.field_map[o][a.target.name]=a.target.value,a.target.value==="custom"&&(n.field_map[o].customValue=""),l(s({},n))},F=(a,o,t,l,i)=>{var n;const e=s({},t);e.field_map[o].customValue=((n=a==null?void 0:a.target)==null?void 0:n.value)||a,l(s({},e))};export{F as a,g as b,h as d,_ as h,w as s};
