import{h as c}from"./preact.js";function a(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function f(n,e){var r=c(function(){return{value:n,callback:e,facade:{get current(){return r.value},set current(t){var u=r.value;u!==t&&(r.value=t,r.callback(t,u))}}}})[0];return r.callback=e,r.facade}function o(n,e){return f(e||null,function(r){return n.forEach(function(t){return a(t,r)})})}export{o as u};
