import{a as r,q as y}from"./index-8c26cc43-1776006071491.js";import{S as s}from"./index-36a9fdea-1776006071491.js";const a=e=>{const t=r(),o=new s(t.path).get(t.path);y(()=>{e(o)})},k=(e,t="current",c)=>{const o=new s(c.path);o.update({[t]:e},void 0,"form"),o.get(c.path)},d=e=>{const t=r();if(!e.current)return;e.key||(e.key="form"),e.saveKey||(e.saveKey=t.path);const c=new s(e.saveKey),o=c.get(e.saveKey),n=e.current,h=o[e.key];for(const i in h)if(Object.prototype.hasOwnProperty.call(n,i)){const u=h[i];n[i]=u}c.update({...n},void 0,e.key),y(()=>{e.callBack&&e.callBack(n)})},l=e=>{if(!e.current||!e.saveKey)return;e.key||(e.key="form"),new s(e.saveKey).update({...e.current},void 0,e.key)};export{k as a,a as g,d as i,l as s};
