const n=Symbol("LMVZ__ariaValidationRuntimeState"),o="lmvz:aria-validation-runtime-changed";function i(){const o=globalThis;return o[n]||(o[n]={enabled:!1}),o[n]}function t(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o))}const a=()=>i().enabled,e=()=>i().verboseLogging??!1,r=(n={})=>{const o=i();o.enabled||(Object.assign(o,n),o.enabled=!0,async function(...n){const o=await async function(){const n=i();if(!n.enabled)return null;if(n.runtime)return n.runtime;n.loadPromise||(n.loadPromise=import("./p-DXOTa5VF.js").catch((()=>null)));const o=await n.loadPromise;return o&&(n.runtime=o),o}();i().enabled&&(o?o.initializeValidationStream(...n):console.warn("Failed to load aria validation runtime"))}().then((()=>{t()})))},l=()=>{const n=i();n.enabled&&(n.enabled=!1,t())};function u(...n){const{enabled:o,runtime:t,loadPromise:a,lazyCondition:e}=i();if(o){if(!e)return r();(function(n,o=[]){const i=n(...o);return(t=i)&&"object"==typeof t&&"function"==typeof t.then?i:Promise.resolve(i);var t})(e).then((n=>{n&&r()}))}function r(){if(t)return t.enqueueValidation(...n);a?a.then((o=>{o?.enqueueValidation?o.enqueueValidation(...n):console.error("Failed to load aria validation runtime")})).catch((()=>{console.error("Failed to enqueue validation due to an error while loading the runtime")})):console.warn("neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.")}}export{o as A,l as d,r as e,a as i,u as q,e as u}