use-async-44e3cc0a-1731319840132.js 732 B

1
  1. import{a as r,q as y}from"./index-6198d9d3-1731319840132.js";import{S as s}from"./index-9710e333-1731319840132.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};