import{a3 as v,g as f,Y as d,J as _,aG as c,a6 as m,aH as p,a as b}from"./7RXv2Ffc.js";import"./DsnmJJEf.js";function s(e,r,u=!1){if(e.multiple){if(r==null)return;if(!_(r))return c();for(var a of e.options)a.selected=r.includes(i(a));return}for(a of e.options){var n=i(a);if(m(n,r)){a.selected=!0;return}}(!u||r!==void 0)&&(e.selectedIndex=-1)}function g(e){var r=new MutationObserver(()=>{s(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),d(()=>{r.disconnect()})}function y(e,r,u=r){var a=!0;v(e,"change",n=>{var t=n?"[selected]":":checked",l;if(e.multiple)l=[].map.call(e.querySelectorAll(t),i);else{var o=e.querySelector(t)??e.querySelector("option:not([disabled])");l=o&&i(o)}u(l)}),f(()=>{var n=r();if(s(e,n,a),a&&n===void 0){var t=e.querySelector(":checked");t!==null&&(n=i(t),u(n))}e.__value=n,a=!1}),g(e)}function i(e){return"__value"in e?e.__value:e.value}var h=p('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"></path></svg>');function q(e){var r=h();b(e,r)}export{q as X,y as b};
