oink-ui 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/oink-ui.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),Ks=require("react-dom"),Aa=require("react-dom/client");function L(...t){const e=[],n=s=>{if(!(!s&&s!==0)){if(typeof s=="string"||typeof s=="number")e.push(String(s));else if(Array.isArray(s))s.forEach(n);else if(typeof s=="object")for(const r in s)s[r]&&e.push(r)}};return t.forEach(n),e.join(" ")}const ye=(t,e,n)=>Math.min(n,Math.max(e,t)),Ae=typeof window<"u"&&typeof document<"u",Ta='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function zt(t){return Array.from(t.querySelectorAll(Ta)).filter(e=>{if(e.closest('[inert], [aria-hidden="true"]'))return!1;const n=getComputedStyle(e);return n.display!=="none"&&n.visibility!=="hidden"})}function Gt(...t){return e=>{for(const n of t)if(n==null||n(e),e.defaultPrevented)break}}function Ge(){if(!Ae)return 1;const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--ok-ms"));return Number.isFinite(t)?t:1}const $a=t=>new Promise(e=>setTimeout(e,t*Ge()));function Pa(t,e,n){const s=Math.sqrt(t/n),r=e/(2*Math.sqrt(t*n));if(r<1){const d=s*Math.sqrt(1-r*r);return u=>1-Math.exp(-r*s*u)*(Math.cos(d*u)+r*s/d*Math.sin(d*u))}if(r===1)return d=>1-Math.exp(-s*d)*(1+s*d);const o=Math.sqrt(r*r-1),i=-s*(r-o),l=-s*(r+o);return d=>1-(l*Math.exp(i*d)-i*Math.exp(l*d))/(l-i)}function Wn(t={}){const e=t.stiffness||260,n=t.damping||24,s=t.mass||1,r=Pa(e,n,s);let o=.1;for(let u=3;u>0;u-=1/240)if(Math.abs(r(u)-1)>(t.precision||.004)){o=u+1/240;break}const i=ye(Math.round(o*70),18,48),l=[];let d=1;for(let u=0;u<=i;u++){const f=u===i?1:r(o*u/i);f>d&&(d=f),l.push(+f.toFixed(3))}return{stiffness:e,damping:n,mass:s,duration:Math.round(o*1e3),easing:"linear("+l.join(", ")+")",overshoot:d-1,at:u=>r(u*o)}}var Xs;const Js=Ae&&typeof CSS<"u"&&!!((Xs=CSS.supports)!=null&&Xs.call(CSS,"transition-timing-function","linear(0, 1)")),ze={out:"cubic-bezier(.22, 1, .36, 1)",in:"cubic-bezier(.55, 0, 1, .45)",inOut:"cubic-bezier(.65, 0, .35, 1)",standard:"cubic-bezier(.2, 0, 0, 1)"},Zs={in:303,fade:100,out:160},Mn={soft:{stiffness:170,damping:26,fallback:"cubic-bezier(.22, 1, .36, 1)"},spring:{stiffness:260,damping:24,fallback:"cubic-bezier(.3, 1.3, .5, 1)"},snappy:{stiffness:520,damping:34,fallback:"cubic-bezier(.3, 1.25, .45, 1)"},bouncy:{stiffness:300,damping:18,fallback:"cubic-bezier(.3, 1.7, .5, 1)"},wobbly:{stiffness:180,damping:9,fallback:"cubic-bezier(.3, 2.3, .5, 1)"}},Gn=Object.fromEntries(Object.keys(Mn).map(t=>[t,{...Wn(Mn[t]),fallback:Mn[t].fallback}]));function Ne(t,e,n={}){if(!t||typeof t.animate!="function")return null;const{spring:s,...r}=n,o={duration:240,easing:ze.out,...r};if(s){const l=typeof s=="string"?Gn[s]:Wn(s);o.duration=l.duration,o.easing=Js?l.easing:l.fallback||ze.out}const i=Ge();return o.duration=Math.max(0,o.duration*i),o.delay&&(o.delay*=i,o.fill||(o.fill="backwards")),t.animate(e,o)}function Ia(t,e,n){const s=t.filter(Boolean),r=new Map(s.map(o=>[o,o.getBoundingClientRect()]));e(),dn(r,n)}function dn(t,e){t.forEach((n,s)=>{if(!s.isConnected)return;const r=s.getBoundingClientRect(),o=n.left-r.left,i=n.top-r.top;Math.abs(o)<.5&&Math.abs(i)<.5||Ne(s,[{transform:`translate(${o}px, ${i}px)`},{transform:"none"}],{spring:"spring",...e})})}const ve=Ae?c.useLayoutEffect:c.useEffect;function ke(t){const e=c.useRef(t);return ve(()=>{e.current=t}),c.useCallback((...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function le(t,e,n){const[s,r]=c.useState(e),o=t!==void 0,i=o?t:s,l=ke(n),d=c.useRef(i),u=c.useRef(o),f=c.useRef(null);ve(()=>{d.current=i,u.current=o,f.current=null});const p=c.useCallback(h=>{const m=f.current?f.current.value:d.current,b=typeof h=="function"?h:null,v=b?b(m):h;if(Object.is(v,m))return;const g={value:v};f.current=g,Promise.resolve().then(()=>{f.current===g&&(f.current=null)}),u.current||r(b?w=>b(w):()=>v),l(v)},[l]);return[i,p]}function xe(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})}}function un(t,e=!1){const n=c.useCallback(s=>{if(!Ae)return()=>{};const r=window.matchMedia(t);return r.addEventListener("change",s),()=>r.removeEventListener("change",s)},[t]);return c.useSyncExternalStore(n,()=>window.matchMedia(t).matches,()=>e)}const fn={sm:520,md:768,lg:1024,xl:1280};function ht(t,e=!0){return un(`(min-width: ${fn[t]}px)`,e)}function Ut(t,e=400){const[n,s]=c.useState(t),[r,o]=c.useState("closed"),i=c.useRef(null);return ve(()=>{t&&s(!0)},[t]),c.useEffect(()=>{if(!n)return;if(t){let h=0,m=0;const b=()=>{const g=i.current;if(!g&&m++<10){h=requestAnimationFrame(b);return}g==null||g.offsetWidth,o("open")};b();const v=setTimeout(()=>{cancelAnimationFrame(h),b()},100);return()=>{cancelAnimationFrame(h),clearTimeout(v)}}o("closed");const l=i.current;let d=!1;const u=()=>{d||(d=!0,s(!1))},f=h=>{h.target===l&&u()};l==null||l.addEventListener("transitionend",f);const p=setTimeout(u,e*Ge());return()=>{l==null||l.removeEventListener("transitionend",f),clearTimeout(p)}},[t,n,e]),{mounted:n,state:t?r:"closed",ref:i}}let js=0,$t=null;function Qs(t){c.useEffect(()=>{if(!(!t||!Ae)){if(js++===0){const e=document.documentElement,n=e.style.overflow,s=e.style.paddingRight,r=window.innerWidth-e.clientWidth;e.style.overflow="hidden",r>0&&(e.style.paddingRight=r+"px"),$t=()=>{e.style.overflow=n,e.style.paddingRight=s}}return()=>{--js===0&&($t==null||$t(),$t=null)}}},[t])}const Pt=[];function Yt(t,e){const n=ke(e);c.useEffect(()=>{if(!t||!Ae)return;Pt.push(n);const s=r=>{r.key!=="Escape"||r.defaultPrevented||Pt[Pt.length-1]===n&&(r.preventDefault(),n())};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s);const r=Pt.lastIndexOf(n);r>=0&&Pt.splice(r,1)}},[t,n])}function La(t,e,n){const s=ke(n),r=c.useRef(e);r.current=e,c.useEffect(()=>{if(!t||!Ae)return;const o=i=>{const l=i.target;r.current.some(d=>d.current&&d.current.contains(l))||s(i)};return document.addEventListener("pointerdown",o,!0),()=>document.removeEventListener("pointerdown",o,!0)},[t,s])}const Zt=new Map,Da='[data-ok-layer], .ok-popup, .ok-toasts, .ok-tooltip, [role="tooltip"], [data-ok-confirmer], [aria-live], script, style, link, template, noscript';function er(t,e){c.useEffect(()=>{if(!t||!Ae)return;const n=e.current,s="inert"in HTMLElement.prototype,r=[];return Array.from(document.body.children).forEach(o=>{if(o.matches(Da)||n&&o.contains(n))return;let i=Zt.get(o);i||(i={count:0,inert:o.hasAttribute("inert"),ariaHidden:o.getAttribute("aria-hidden"),viaInert:s},Zt.set(o,i),s?o.setAttribute("inert",""):o.setAttribute("aria-hidden","true")),i.count++,r.push(o)}),()=>{r.forEach(o=>{const i=Zt.get(o);!i||--i.count>0||(Zt.delete(o),i.viaInert?i.inert||o.removeAttribute("inert"):i.ariaHidden===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i.ariaHidden))})}},[t,e])}function vt({children:t,container:e,disabled:n}){const[s,r]=c.useState(null);return c.useEffect(()=>{r(e??document.body)},[e]),n?a.jsx(a.Fragment,{children:t}):s?Ks.createPortal(t,s):null}const Oa='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex], [contenteditable="true"]';function Un(t){const e=t instanceof HTMLElement&&t!==document.body&&t!==document.documentElement?t:null,n=[];for(let s=(e==null?void 0:e.parentElement)??null;s&&s!==document.body&&s!==document.documentElement;s=s.parentElement)n.push(s);return{target:e,ancestors:n}}const tr=t=>!!t.closest('[inert], [aria-hidden="true"]'),Ns=t=>t.isConnected&&!tr(t);function Yn(t){var r,o;if(!t||!t.target)return null;const e={preventScroll:!0};if(t.target.isConnected)return tr(t.target)?null:(t.target.focus(e),t.target);const n=t.ancestors.find(i=>Ns(i)&&i.matches(Oa));if(n)return n.focus(e),n;const s=document.querySelector('main, [role="main"]');return s&&Ns(s)?(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus(e),s):((o=(r=document.activeElement)==null?void 0:r.blur)==null||o.call(r),document.body)}function nr({children:t,trap:e=!0,autoFocus:n=!0,restoreFocus:s=!0,initialFocus:r,scopeRef:o}){const i=c.useRef(null),l=c.useRef(s);return l.current=s,c.useEffect(()=>{const d=o.current;if(d)return(!i.current||!d.contains(document.activeElement))&&(i.current=Un(document.activeElement)),n&&!d.contains(document.activeElement)&&((r==null?void 0:r.current)??d.querySelector("[data-autofocus]")??d).focus({preventScroll:!0}),()=>{l.current&&Yn(i.current)}},[]),c.useEffect(()=>{const d=o.current;if(!e||!d)return;const u=p=>{if(p.key!=="Tab")return;const h=zt(d);if(!h.length){p.preventDefault(),d.focus();return}const m=h[0],b=h[h.length-1],v=document.activeElement;p.shiftKey&&(v===m||v===d)?(p.preventDefault(),b.focus()):!p.shiftKey&&v===b&&(p.preventDefault(),m.focus())},f=p=>{var m;const h=p.target;d.contains(h)||((m=h.closest)==null?void 0:m.call(h,"[data-ok-layer]"))!==d.closest("[data-ok-layer]")||(zt(d)[0]??d).focus()};return d.addEventListener("keydown",u),document.addEventListener("focusin",f),()=>{d.removeEventListener("keydown",u),document.removeEventListener("focusin",f)}},[e,o]),a.jsx(a.Fragment,{children:t})}const Xn={search:'<circle cx="9" cy="9" r="5.5"/><path d="M13.2 13.2L17 17"/>',check:'<path d="M4.500 10.500l3.500 3.500 7.500-8"/>',x:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',plus:'<path d="M10 4.500v11M4.500 10h11"/>',minus:'<path d="M4.500 10h11"/>',"chevron-right":'<path d="M7.500 4.500L13 10l-5.500 5.500"/>',"chevron-down":'<path d="M4.500 7.500L10 13l5.500-5.500"/>',sun:'<circle cx="10" cy="10" r="3.300"/><path d="M10 2.500v1.800M10 15.700v1.800M2.500 10h1.800M15.700 10h1.800M4.700 4.700L6 6M14 14l1.300 1.300M4.700 15.300L6 14M14 6l1.300-1.300"/>',moon:'<path d="M16.500 11.800A7 7 0 1 1 8.200 3.500a5.500 5.500 0 0 0 8.300 8.300z"/>',monitor:'<rect x="3" y="4" width="14" height="9.500" rx="2.200"/><path d="M7.500 16.500h5M10 13.500v3"/>',copy:'<rect x="7" y="7" width="9.500" height="9.500" rx="2.500"/><path d="M13 7V5.500A2 2 0 0 0 11 3.500H5.500a2 2 0 0 0-2 2V11a2 2 0 0 0 2 2H7"/>',play:'<path d="M7 4.600v10.800a.7.700 0 0 0 1.100.600l8-5.400a.7.700 0 0 0 0-1.200l-8-5.400A.7.700 0 0 0 7 4.600z" fill="currentColor" stroke="none"/>',replay:'<path d="M4.300 10a5.700 5.700 0 1 0 1.900-4.200M4 3.500v3h3"/>',info:'<circle cx="10" cy="10" r="7"/><path d="M10 9.300v4.200M10 6.500v.1"/>',alert:'<path d="M10 3.500l7 12.500H3l7-12.500zM10 8.500v3.200M10 14v.1"/>',bell:'<path d="M5.500 8.500a4.500 4.500 0 0 1 9 0c0 4 1.500 5 1.500 5H4s1.500-1 1.500-5zM8.300 16.200a1.800 1.800 0 0 0 3.400 0"/>',trash:'<path d="M4.500 6h11M8 6V4.500h4V6M6 6l.7 8.800a1.600 1.600 0 0 0 1.600 1.500h3.400a1.600 1.600 0 0 0 1.600-1.500L14 6"/>',more:'<path d="M5 10v.1M10 10v.1M15 10v.1" stroke-width="2.600"/>',download:'<path d="M10 3.500v9M6.500 9.500L10 13l3.500-3.500M4.500 16.500h11"/>',upload:'<path d="M10 13V4M6.500 7.500L10 4l3.500 3.500M4.500 16.500h11"/>',edit:'<path d="M4 16l.8-3.300L13.400 4a1.700 1.700 0 0 1 2.400 0l.2.2a1.700 1.700 0 0 1 0 2.400L7.300 15.200 4 16z"/>',share:'<path d="M10 12.500V3.500M6.800 6.500L10 3.500l3.200 3M5 10v5a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15v-5"/>',mail:'<rect x="3" y="4.800" width="14" height="10.500" rx="2.500"/><path d="M3.800 7l6.200 4.300L16.200 7"/>',sparkle:'<path d="M10 3.500l1.700 4.800 4.800 1.700-4.800 1.700L10 16.500l-1.700-4.800L3.500 10l4.800-1.700z"/>',shuffle:'<path d="M3.500 6h2.300c1.400 0 2.600.7 3.300 1.900l1.800 4.200c.7 1.200 1.900 1.900 3.300 1.900h2.300M14.500 4l2 2-2 2M14.500 12l2 2-2 2M3.500 14h2.300c.9 0 1.700-.3 2.300-.8M16.500 6h-2.300c-.9 0-1.700.3-2.300.8"/>',sliders:'<path d="M3.500 6.500h6M13.500 6.500h3M3.500 13.500h3M10.500 13.500h6"/><circle cx="11.500" cy="6.500" r="2"/><circle cx="8.500" cy="13.500" r="2"/>',home:'<path d="M3.5 9.2L10 3.5l6.5 5.7V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9.2z"/><path d="M8 16.5V12h4v4.5"/>',user:'<circle cx="10" cy="7" r="3.2"/><path d="M4 16.5c.7-2.8 3-4.3 6-4.3s5.3 1.5 6 4.3"/>',users:'<circle cx="7.5" cy="7.2" r="2.8"/><path d="M2.5 16c.6-2.5 2.5-3.800 5-3.800s4.400 1.300 5 3.800M12.800 4.600a2.800 2.800 0 0 1 0 5.200M14.800 12.500c1.400.5 2.300 1.700 2.700 3.500"/>',settings:'<path d="M8.600 3h2.800l.5 2 1.800 1 2-.6 1.400 2.400-1.500 1.500v1.400l1.500 1.500-1.400 2.400-2-.6-1.800 1-.5 2H8.600l-.5-2-1.800-1-2 .6-1.400-2.400 1.500-1.500V9.300L2.900 7.800l1.400-2.400 2 .6 1.800-1z"/><circle cx="10" cy="10" r="2.500"/>',heart:'<path d="M10 16.500S3.500 12.700 3.500 8.200A3.700 3.700 0 0 1 10 5.900a3.700 3.700 0 0 1 6.500 2.300c0 4.500-6.500 8.300-6.500 8.300z"/>',star:'<path d="M10 3.500l1.800 4.500 4.900.4-3.700 3.100 1.100 4.700L10 13.600l-4.100 2.600 1.100-4.700-3.700-3.100 4.900-.4z"/>',cart:'<path d="M2.500 3.500h2l1.800 8.500h8.200l1.500-6H5"/><circle cx="7.500" cy="15.500" r="1.200"/><circle cx="13.500" cy="15.500" r="1.200"/>',bag:'<path d="M4.500 7h11l-.7 8.100a1.500 1.500 0 0 1-1.500 1.400H6.700a1.500 1.500 0 0 1-1.500-1.400L4.500 7z"/><path d="M7.500 9V6.500a2.500 2.500 0 0 1 5 0V9"/>',grid:'<rect x="3.500" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="3.500" y="11" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="11" width="5.500" height="5.500" rx="1.500"/>',list:'<path d="M7.500 5.500h9M7.500 10h9M7.500 14.500h9"/><path d="M3.800 5.500v.1M3.800 10v.1M3.800 14.500v.1" stroke-width="2.400"/>',filter:'<path d="M3.500 4.500h13l-5 6V15l-3 1.500v-6l-5-6z"/>',calendar:'<rect x="3.500" y="4.500" width="13" height="12" rx="2.500"/><path d="M3.500 8.500h13M7 3v3M13 3v3"/>',clock:'<circle cx="10" cy="10" r="7"/><path d="M10 6v4l2.500 1.500"/>',inbox:'<path d="M3.500 11l2-6a1.500 1.500 0 0 1 1.400-1h6.200a1.500 1.500 0 0 1 1.400 1l2 6v3.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V11z"/><path d="M3.500 11H7l1 2h4l1-2h3.500"/>',send:'<path d="M16.500 3.500L3.500 8.700l5.300 2.500 2.500 5.300 5.200-13zM8.800 11.200L12 8"/>',archive:'<rect x="3" y="4" width="14" height="4" rx="1.200"/><path d="M4.500 8v6.500A1.500 1.500 0 0 0 6 16h8a1.500 1.500 0 0 0 1.500-1.500V8M8.300 11.200h3.400"/>',reply:'<path d="M8 5.500L3.500 10 8 14.500M3.500 10h8a5 5 0 0 1 5 5v.5"/>',forward:'<path d="M12 5.500l4.500 4.500-4.500 4.500M16.500 10h-8a5 5 0 0 0-5 5v.5"/>',paperclip:'<path d="M15.500 9.500l-5.700 5.700a3.540 3.540 0 0 1-5-5l6-6a2.340 2.340 0 0 1 3.300 3.300l-5.900 5.900a1.200 1.200 0 0 1-1.700-1.700l5.300-5.300"/>',folder:'<path d="M3.500 6A1.500 1.500 0 0 1 5 4.500h3l1.800 2H15A1.500 1.500 0 0 1 16.500 8v6.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V6z"/>',file:'<path d="M11.500 3.500h-5A1.500 1.500 0 0 0 5 5v10a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15V7l-3.500-3.500z"/><path d="M11.500 3.500V7H15"/>',image:'<rect x="3.500" y="4" width="13" height="12" rx="2.500"/><circle cx="7.500" cy="8" r="1.300"/><path d="M4.200 13.800l3.300-3.300 3 3 2-2 3.300 3.300"/>',link:'<path d="M8.500 11.500a3.200 3.200 0 0 0 4.500 0L15.500 9A3.200 3.200 0 0 0 11 4.500l-.8.8"/><path d="M11.500 8.500a3.200 3.200 0 0 0-4.500 0L4.500 11A3.200 3.200 0 0 0 9 15.500l.8-.8"/>',external:'<path d="M11.500 4H16v4.500M16 4l-7 7M14 11.500V15a1.500 1.500 0 0 1-1.500 1.500H5A1.500 1.500 0 0 1 3.500 15V7.500A1.500 1.500 0 0 1 5 6h3.500"/>',eye:'<path d="M2.500 10S5.200 5 10 5s7.500 5 7.500 5-2.700 5-7.500 5-7.500-5-7.500-5z"/><circle cx="10" cy="10" r="2.300"/>',"eye-off":'<path d="M8.300 5.200A7 7 0 0 1 10 5c4.800 0 7.500 5 7.500 5a12.500 12.500 0 0 1-1.900 2.500M12.900 14.300A6.500 6.500 0 0 1 10 15c-4.800 0-7.500-5-7.500-5a12.300 12.300 0 0 1 3.300-3.700M3.500 3.500l13 13M8.400 8.400a2.300 2.300 0 0 0 3.200 3.200"/>',lock:'<rect x="4.500" y="9" width="11" height="7.500" rx="2"/><path d="M7 9V6.500a3 3 0 0 1 6 0V9"/>',tag:'<path d="M3.500 4.500v5.200a1.500 1.500 0 0 0 .4 1l5.700 5.700a1.500 1.500 0 0 0 2.100 0l4.700-4.700a1.500 1.500 0 0 0 0-2.100l-5.700-5.700a1.500 1.500 0 0 0-1-.4H4.500a1 1 0 0 0-1 1z"/><path d="M7 7v.1" stroke-width="2.400"/>',bookmark:'<path d="M5.500 4.500A1.500 1.500 0 0 1 7 3h6a1.500 1.500 0 0 1 1.500 1.500v12L10 13.500l-4.500 3v-12z"/>',"chevron-left":'<path d="M12.500 4.500L7 10l5.500 5.500"/>',"chevron-up":'<path d="M4.500 12.500L10 7l5.500 5.500"/>',"arrow-left":'<path d="M16 10H4M8.500 5.500L4 10l4.500 4.500"/>',"arrow-right":'<path d="M4 10h12M11.500 5.500L16 10l-4.500 4.500"/>',"arrow-up":'<path d="M10 16V4M5.500 8.500L10 4l4.500 4.500"/>',"arrow-down":'<path d="M10 4v12M5.500 11.500L10 16l4.500-4.500"/>',refresh:'<path d="M16 10a6 6 0 0 1-10.600 3.800M4 10a6 6 0 0 1 10.600-3.800M14.500 3v3.200h-3.200M5.500 17v-3.200h3.200"/>',menu:'<path d="M3.500 6h13M3.500 10h13M3.500 14h13"/>',close:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',"check-circle":'<circle cx="10" cy="10" r="7"/><path d="M6.800 10.300l2.200 2.200 4.200-4.600"/>',"x-circle":'<circle cx="10" cy="10" r="7"/><path d="M7.500 7.500l5 5M12.500 7.500l-5 5"/>',help:'<circle cx="10" cy="10" r="7"/><path d="M7.900 8a2.200 2.200 0 1 1 3.200 2c-.7.4-1.100.9-1.100 1.600M10 14v.1"/>',globe:'<circle cx="10" cy="10" r="7"/><path d="M3 10h14M10 3c2 2.200 3 4.500 3 7s-1 4.800-3 7c-2-2.200-3-4.500-3-7s1-4.800 3-7z"/>',phone:'<rect x="5.500" y="2.500" width="9" height="15" rx="2.200"/><path d="M9 14.500h2"/>',"credit-card":'<rect x="2.500" y="4.500" width="15" height="11" rx="2.200"/><path d="M2.500 8.500h15M5.500 12.500h3"/>',truck:'<path d="M4.200 13.500H2.500v-8h9v8M7.800 13.500h4.400M11.500 8.500h3l3 3v2h-1.700"/><circle cx="6" cy="14.500" r="1.600"/><circle cx="14" cy="14.500" r="1.600"/>',chart:'<path d="M3.500 16.500h13M6 13.500V10M10 13.500V5M14 13.500V8"/>',"trending-up":'<path d="M3 14l4.500-4.500 3 3L17 6M12.500 6H17v4.500"/>',"trending-down":'<path d="M3 6l4.500 4.500 3-3L17 14M12.500 14H17V9.500"/>',layout:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M3 8h14M8 8v8.500"/>',sidebar:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M8 3.500v13"/>',command:'<path d="M7.500 7.500h5v5h-5zM7.500 7.500h-2a2 2 0 1 1 2-2zM12.500 7.500v-2a2 2 0 1 1 2 2zM12.500 12.500h2a2 2 0 1 1-2 2zM7.500 12.500v2a2 2 0 1 1-2-2z"/>',zap:'<path d="M11 2.500l-6.500 9H10l-1 6 6.500-9H10l1-6z"/>'},pe=c.forwardRef(function({name:e,size:n,label:s,filled:r,className:o,style:i,children:l,...d},u){const f=s?{role:"img","aria-label":s}:{"aria-hidden":!0},p=n?{width:n,height:n,...i}:i,h=L("ok-icon",r&&"ok-icon--fill",o);return e?a.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:h,style:p,...f,...d,dangerouslySetInnerHTML:{__html:Xn[e]}}):a.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:h,style:p,...f,...d,children:l})});function Kn({className:t,...e}){return a.jsx("span",{className:L("ok-sr",t),...e})}const sr=(t,e=0,n=1)=>Math.min(n,Math.max(e,t));function Ct(t){const e=t.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(e)?[0,1,2].map(n=>parseInt(e[n]+e[n],16)):/^[0-9a-f]{6}$/i.test(e)?[0,2,4].map(n=>parseInt(e.slice(n,n+2),16)):null}function Ke(t){const e=Ct(t);return e?mt(e):null}function mt([t,e,n]){return"#"+[t,e,n].map(s=>Math.round(sr(s,0,255)).toString(16).padStart(2,"0")).join("")}function rr([t,e,n]){const[s,r,o]=[t/255,e/255,n/255],i=Math.max(s,r,o),l=Math.min(s,r,o),d=i-l;let u=0;return d&&(i===s?u=(r-o)/d%6:i===r?u=(o-s)/d+2:u=(s-r)/d+4,u*=60,u<0&&(u+=360)),{h:u,s:i?d/i:0,v:i}}function ar({h:t,s:e,v:n}){const s=r=>{const o=(r+t/60)%6;return Math.round(255*(n-n*e*Math.max(0,Math.min(o,4-o,1))))};return[s(5),s(3),s(1)]}const or=t=>{const e=Ct(t);return e?rr(e):null},ir=t=>mt(ar(t)),jt=t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4},Ba=t=>255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055);function Ln([t,e,n]){return .2126*jt(t)+.7152*jt(e)+.0722*jt(n)}function Ht(t,e){const[n,s]=[Ln(t),Ln(e)].sort((r,o)=>o-r);return(n+.05)/(s+.05)}function lr([t,e,n]){const[s,r,o]=[jt(t),jt(e),jt(n)],i=Math.cbrt(.4122214708*s+.5363325363*r+.0514459929*o),l=Math.cbrt(.2119034982*s+.6806995451*r+.1073969566*o),d=Math.cbrt(.0883024619*s+.2817188376*r+.6299787005*o);return[.2104542553*i+.793617785*l-.0040720468*d,1.9779984951*i-2.428592205*l+.4505937099*d,.0259040371*i+.7827717662*l-.808675766*d]}function Fa([t,e,n]){const s=(t+.3963377774*e+.2158037573*n)**3,r=(t-.1055613458*e-.0638541728*n)**3,o=(t-.0894841775*e-1.291485548*n)**3;return[4.0767416621*s-3.3077115913*r+.2309699292*o,-1.2684380046*s+2.6097574011*r-.3413193965*o,-.0041960863*s-.7034186147*r+1.707614701*o]}const Jn=t=>lr(t)[0];function Ms(t,e){const[,n,s]=lr(t),r=Math.hypot(n,s),o=Math.atan2(s,n);let i=0,l=r;const d=f=>Fa([e,f*Math.cos(o),f*Math.sin(o)]),u=f=>f.every(p=>p>=-1e-4&&p<=1+1e-4);if(u(d(r)))i=r;else for(let f=0;f<20;f++){const p=(i+l)/2;u(d(p))?i=p:l=p}return d(i).map(f=>Ba(sr(f)))}function Rs(t,e,n,s){if(Ht(t,e)>=n)return t;const r=Jn(t);let o=0,i=1,l=Ms(t,s);for(let d=0;d<24;d++){const u=(o+i)/2,f=s===0?r-(r-0)*u:r+(1-r)*u,p=Ms(t,f);Ht(p,e)>=n?(l=p,i=u):o=u}return l}const cr=.65,za=[255,255,255],Ha=[42,41,39],Ss={light:[27,28,34],dark:[244,244,246]},Dn=1.45;function On(t){const e=Ct(t);if(!e)return{light:"#ffffff",dark:"#1b1c22"};const n=mt(e);return{light:Ht(e,Ss.light)<Dn?"#ffffff":n,dark:Ht(e,Ss.dark)<Dn?"#1b1c22":n}}function dr(t){const e=Ct(t);return e&&Jn(e)<cr?"#ffffff":"#1b1c22"}function Bn(t){const e=Ct(t);if(!e)return{};const n=dr(t),s={"--ok-accent":mt(e),"--ok-on-accent":n,"--ok-accent-deep":mt(Rs(e,za,4.6,0)),"--ok-accent-light":mt(Rs(e,Ha,4.6,1)),"--ok-logo-snout-light":On(t).light,"--ok-logo-snout-dark":On(t).dark};return n==="#ffffff"&&(s["--ok-accent-fill"]="var(--ok-accent)",s["--ok-accent-fill-hover"]="var(--ok-accent-hover)"),s}const ur="M9 10C9 26 20 38 31 38c7 0 11-5 11-10.500S37.500 18 32 18c-5 0-8.500 3.500-9 8",on=c.createContext(void 0);function fr({tail:t,children:e}){const n=c.useContext(on);return a.jsx(on.Provider,{value:t===void 0?n:t,children:e})}function qa(){return c.useContext(on)}function Zn({className:t="ok-tail",...e}){const n=c.useContext(on);if(n==null||n===!1)return a.jsx("svg",{className:t,viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false",...e,children:a.jsx("path",{pathLength:1,d:ur})});if(typeof n=="function")return a.jsx(a.Fragment,{children:n({className:t})});if(c.isValidElement(n)){const s=n;return c.cloneElement(s,{className:L(t,s.props.className),"aria-hidden":s.props["aria-hidden"]??!0,...s.type==="svg"?{focusable:s.props.focusable??"false"}:null})}return a.jsx("span",{className:t,"aria-hidden":"true",children:n})}const Va={common:{close:"关闭",clear:"清除",loading:"加载中",remove:"移除",separator:","},avatar:{status:{online:"在线",busy:"忙碌",away:"离开",offline:"离线"},more:t=>`还有 ${t} 人`,moreButton:(t,e)=>`还有 ${t} 人${e?","+e:""},查看全部成员`,panel:(t,e)=>e?`${e}(共 ${t} 人)`:`全部成员(共 ${t} 人)`,rest:t=>`另有 ${t} 人`},breadcrumb:{label:"面包屑",expand:t=>`显示中间的 ${t} 级路径`},code:{label:"代码",copy:"复制代码",copied:"已复制",copyFailed:"复制失败"},pagination:{label:"分页",prev:"上一页",next:"下一页",page:t=>`第 ${t} 页`,status:(t,e)=>`第 ${t} 页,共 ${e} 页`},reaction:{label:"Oink 一下"},stat:{trend:{up:"上升",down:"下降",flat:"持平"}},steps:{label:"步骤",state:{complete:"已完成",current:"当前步骤",upcoming:"未开始"},error:"出错",prefix:(t,e)=>`第 ${t} 步,${e}:`},table:{label:"表格",empty:"暂无数据",selectAll:"选择全部",selectColumn:"选择",selectRow:t=>`选择 ${t}`,row:t=>`第 ${t} 行`,selected:t=>`已选择 ${t} 行`,pagination:t=>`${t}分页`},tag:{remove:t=>`移除${t?` ${t}`:""}`},button:{status:{loading:"正在处理",success:"已完成",error:"操作失败"}},colorPicker:{label:"颜色",area:"饱和度与亮度",areaRole:"二维滑块",areaValue:(t,e)=>`饱和度 ${t}%,亮度 ${e}%`,hue:"色相",hex:"十六进制色值",eyedropper:"从屏幕取色",swatches:"预设颜色"},fileDrop:{title:"把文件拖到这里,或点击选择",status:(t,e,n)=>t?(t===1?`已选择 ${e}`:`已选择 ${t} 个文件`)+(n?`,${n} 个不符合要求`:""):`${n} 个文件不符合要求`},hotkey:{placeholder:"点击录制",recording:"按下组合键…",spokenRecording:t=>`正在录制,${t}`,spokenCurrent:t=>`当前:${t}`,none:"未设置"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"空格",ArrowUp:"上",ArrowDown:"下",ArrowLeft:"左",ArrowRight:"右",Enter:"回车",Backspace:"退格",Tab:"Tab",Escape:"Esc"},input:{showPassword:"显示密码"},numberInput:{decrement:"减少",increment:"增加"},pinInput:{label:"验证码",cell:(t,e)=>`第 ${t} 位,共 ${e} 位`},rangeSlider:{thumbs:["最小值","最大值"]},rating:{label:"评分",star:t=>`${t} 星`,value:(t,e)=>`评分:${t} / ${e}`},searchInput:{placeholder:"搜索…"},appShell:{skipLink:"跳到主要内容",sidebar:"侧栏",aside:"辅助栏",toggleSidebar:"切换导航",toggleAside:"切换辅助栏"},splitPane:{separator:"调整分栏大小"},commandPalette:{label:"命令面板",placeholder:"搜索命令…",empty:"没有匹配的结果",results:t=>`${t} 条结果`},toast:{label:"通知"},confirm:{confirm:"确定",cancel:"取消"},calendar:{prevMonth:"上个月",nextMonth:"下个月",todaySuffix:",今天"},datePicker:{placeholder:"年-月-日",dialog:"选择日期",open:"打开日历",rangePlaceholder:"开始日期 – 结束日期",rangeDialog:"选择日期范围"},combobox:{loading:"加载中…",empty:"没有匹配的选项",listbox:"选项"},select:{placeholder:"请选择",count:t=>`已选 ${t} 项`}},kt=(t,e,n)=>`${t} ${t===1?e:n}`,Wa={common:{close:"Close",clear:"Clear",loading:"Loading",remove:"Remove",separator:", "},avatar:{status:{online:"Online",busy:"Busy",away:"Away",offline:"Offline"},more:t=>`${t} more`,moreButton:(t,e)=>`${t} more${e?", "+e:""}, show all members`,panel:(t,e)=>e?`${e} (${kt(t,"person","people")})`:`All members (${t})`,rest:t=>`And ${t} more`},breadcrumb:{label:"Breadcrumb",expand:t=>`Show ${kt(t,"hidden level","hidden levels")}`},code:{label:"Code",copy:"Copy code",copied:"Copied",copyFailed:"Copy failed"},pagination:{label:"Pagination",prev:"Previous page",next:"Next page",page:t=>`Page ${t}`,status:(t,e)=>`Page ${t} of ${e}`},reaction:{label:"Oink"},stat:{trend:{up:"Up",down:"Down",flat:"Unchanged"}},steps:{label:"Steps",state:{complete:"Completed",current:"Current step",upcoming:"Not started"},error:"Error",prefix:(t,e)=>`Step ${t}, ${e}: `},table:{label:"Table",empty:"No data",selectAll:"Select all",selectColumn:"Select",selectRow:t=>`Select ${t}`,row:t=>`Row ${t}`,selected:t=>`${kt(t,"row","rows")} selected`,pagination:t=>`${t} pagination`},tag:{remove:t=>`Remove${t?` ${t}`:""}`},button:{status:{loading:"Working",success:"Done",error:"Failed"}},colorPicker:{label:"Color",area:"Saturation and brightness",areaRole:"2D slider",areaValue:(t,e)=>`Saturation ${t}%, brightness ${e}%`,hue:"Hue",hex:"Hex color",eyedropper:"Pick color from screen",swatches:"Preset colors"},fileDrop:{title:"Drop files here, or click to browse",status:(t,e,n)=>t?(t===1?`Selected ${e}`:`Selected ${t} files`)+(n?`, ${n} not accepted`:""):`${kt(n,"file","files")} not accepted`},hotkey:{placeholder:"Click to record",recording:"Press keys…",spokenRecording:t=>`Recording, ${t}`,spokenCurrent:t=>`Current: ${t}`,none:"Not set"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right",Enter:"Enter",Backspace:"Backspace",Tab:"Tab",Escape:"Esc"},input:{showPassword:"Show password"},numberInput:{decrement:"Decrease",increment:"Increase"},pinInput:{label:"Verification code",cell:(t,e)=>`Digit ${t} of ${e}`},rangeSlider:{thumbs:["Minimum","Maximum"]},rating:{label:"Rating",star:t=>kt(t,"star","stars"),value:(t,e)=>`Rating: ${t} of ${e}`},searchInput:{placeholder:"Search…"},appShell:{skipLink:"Skip to main content",sidebar:"Sidebar",aside:"Side panel",toggleSidebar:"Toggle navigation",toggleAside:"Toggle side panel"},splitPane:{separator:"Resize panes"},commandPalette:{label:"Command palette",placeholder:"Search commands…",empty:"No results",results:t=>kt(t,"result","results")},toast:{label:"Notifications"},confirm:{confirm:"OK",cancel:"Cancel"},calendar:{prevMonth:"Previous month",nextMonth:"Next month",todaySuffix:", today"},datePicker:{placeholder:"YYYY-MM-DD",dialog:"Choose date",open:"Open calendar",rangePlaceholder:"Start date – End date",rangeDialog:"Choose date range"},combobox:{loading:"Loading…",empty:"No matching options",listbox:"Options"},select:{placeholder:"Select…",count:t=>`${t} selected`}},qt={"zh-CN":Va,"en-US":Wa},hr="en-US";function pr(t){const e=(t.find(Boolean)??"").toLowerCase();return e==="zh"||e.startsWith("zh-")?"zh-CN":"en-US"}const Ga=t=>(window.addEventListener("languagechange",t),()=>window.removeEventListener("languagechange",t)),Ua=()=>{var t;return pr((t=navigator.languages)!=null&&t.length?navigator.languages:[navigator.language])},Ya=()=>hr;function Xa(){return c.useSyncExternalStore(Ga,Ua,Ya)}const Fn=c.createContext("auto");function mr({locale:t,children:e}){const n=c.useContext(Fn);return a.jsx(Fn.Provider,{value:t??n,children:e})}function he(){const t=c.useContext(Fn),e=Xa(),n=t==="auto"||!qt[t]?e:t;return{locale:n,messages:qt[n]}}const It=[[0,0,.4714],[.25,.0266,.447],[.5,.061,.4174],[.75,.1043,.3848],[1.1,.1846,.3359],[1.25,.2171,.3201],[1.375,.2551,.302],[1.5,.2917,.2864],[1.625,.3294,.2714],[1.75,.3673,.2565],[1.875,.4047,.2418],[2,.4393,.2274],[2.25,.4946,.2011],[2.5,.5519,.1767],[2.75,.6129,.1541],[3,.6749,.1334],[3.5,.7875,.0985],[4,.8701,.0718],[5,.9667,.0372],[8,1,0]],Cs=4/3*Math.tan(Math.PI/16),Ka=t=>2**t;function br(t){if(t===1)return[Cs,Cs];if(t>=It[It.length-1][0])return[1,0];for(let e=1;e<It.length;e++){const[n,s,r]=It[e];if(t<=n){const[o,i,l]=It[e-1],d=(t-o)/(n-o);return[i+(s-i)*d,l+(r-l)*d]}}return[1,0]}function vr(t){if(t<0)return vr(-t).map(([o,i])=>[1-i,1-o]);if(t===1/0)return[[0,1],[0,1],[0,0],[0,0],[0,0],[1,0],[1,0]];const e=1-2**(-1/Ka(t)),[n,s]=br(t),r=s*Math.SQRT1_2;return[[0,1],[0,1-n],[e-r,e+r],[e,e],[e+r,e-r],[1-n,0],[1,0]]}function gr(t,e,n){const[s,r,o,i]=n;let l=1;const d=(u,f)=>{f>u&&f>0&&(l=Math.min(l,Math.max(0,u)/f))};return d(t,s[0]+r[0]),d(t,i[0]+o[0]),d(e,s[1]+i[1]),d(e,r[1]+o[1]),l===1?n:n.map(([u,f])=>[u*l,f*l])}function Je(t,e){return t.map(([n,s])=>[n>0?Math.max(0,n+e):0,s>0?Math.max(0,s+e):0])}const Oe=(t,e,n=0,s=0)=>({x:t.x-e+n,y:t.y-e+s,w:t.w+2*e,h:t.h+2*e}),Me=t=>{const e=(Math.round(t*1e3)/1e3).toString();return e==="-0"?"0":e};function $e(t,e,n,s=!1){if(t.w<=0||t.h<=0)return"";const{x:r,y:o,w:i,h:l}=t,d=[(h,m,b,v)=>[r+h*b,o+m*v],(h,m,b,v)=>[r+i-h*b,o+m*v],(h,m,b,v)=>[r+i-h*b,o+l-m*v],(h,m,b,v)=>[r+h*b,o+l-m*v]],u=h=>{const[m,b]=e[h];if(m<=0||b<=0)return[d[h](0,0,0,0)];let v=vr(n[h]);return(h===1||h===3)&&(v=v.slice().reverse()),v.map(([g,w])=>d[h](g,w,m,b))},f=[1,2,3,0].map(u);if(s){f.reverse();for(let h=0;h<f.length;h++)f[h]=f[h].slice().reverse()}let p="";return f.forEach((h,m)=>{p+=(m===0?"M":"L")+Me(h[0][0])+" "+Me(h[0][1]);for(let b=1;b+2<h.length;b+=3)p+="C"+[h[b],h[b+1],h[b+2]].map(v=>Me(v[0])+" "+Me(v[1])).join(" ")}),p+"Z"}function Ve(t,e=!1){const{x:n,y:s,w:r,h:o}=t;return r<=0||o<=0?"":e?`M${Me(n)} ${Me(s)}V${Me(s+o)}H${Me(n+r)}V${Me(s)}Z`:`M${Me(n)} ${Me(s)}H${Me(n+r)}V${Me(s+o)}H${Me(n)}Z`}function xr(t){const e=t.trim().toLowerCase().match(/superellipse\(\s*[^)]*\)|[a-z-]+/g);if(!e||!e.length||e.length>4)return null;const n=[];for(const d of e){let u;const f=/^superellipse\(\s*([^)]*?)\s*\)$/.exec(d);if(f?u=f[1]==="infinity"?1/0:f[1]==="-infinity"?-1/0:parseFloat(f[1]):u={round:1,squircle:2,square:1/0,bevel:0,scoop:-1,notch:-1/0}[d]??NaN,Number.isNaN(u))return null;n.push(u)}const[s,r=s,o=s,i=r]=n,l=[s,r,o,i];return l.every(d=>d===1)?null:l}function kr(t){return!!t&&t.width>0&&!!t.style&&t.style!=="none"&&t.style!=="solid"}function Se(t){const e=t.trim().toLowerCase();if(e==="transparent")return 0;let n=/\/\s*([\d.]+%?)\s*\)$/.exec(e);return!n&&/^(rgba|hsla)\(/.test(e)&&(n=/,\s*([\d.]+%?)\s*\)$/.exec(e)),n?n[1].endsWith("%")?parseFloat(n[1])/100:parseFloat(n[1]):1}function Ja(t){const e=[];let n=0,s=0;for(let r=0;r<t.length;r++){const o=t[r];o==="("?n++:o===")"?n--:o===","&&n===0&&(e.push(t.slice(s,r)),s=r+1)}return e.push(t.slice(s)),e.map(r=>r.trim()).filter(Boolean)}function yr(t){return!t||t==="none"?[]:Ja(t).map(e=>{const n=/[a-z-]+\([^()]*(?:\([^()]*\)[^()]*)*\)/i.exec(e);let s=n?n[0]:"",r=n?e.replace(n[0]," "):e;const o=/\binset\b/.test(r);r=r.replace(/\binset\b/," "),s||(s=r.split(/\s+/).find(d=>d&&!/^-?[\d.]/.test(d))||"currentcolor");const i=(r.match(/-?[\d.]+(?:e-?\d+)?(?=px)/g)||[]).map(Number);return{inset:o,dx:i[0]||0,dy:i[1]||0,spread:i[3]||0,color:s,...i[2]>0?{blur:i[2]}:{}}})}const Rt=t=>(t.blur??0)*1.5;function et(t){let e=0;for(const n of t.shadows)!n.inset&&Se(n.color)>0&&(e=Math.max(e,n.spread+Rt(n)+Math.max(Math.abs(n.dx),Math.abs(n.dy))));return t.outline&&Se(t.outline.color)>0&&(e=Math.max(e,t.outline.offset+t.outline.width)),Math.max(0,e)}const wr=t=>({x:0,y:0,w:t.w,h:t.h});function Za(t){const[e,n,s,r]=t.border,[o,i,l,d]=t.radii,u=(f,p)=>Math.max(0,f-p);return{box:{x:r,y:e,w:t.w-r-n,h:t.h-e-s},radii:[[u(o[0],r),u(o[1],e)],[u(i[0],n),u(i[1],e)],[u(l[0],n),u(l[1],s)],[u(d[0],r),u(d[1],s)]]}}function _r(t,e={x:0,y:0},n=0){let s="";const r={x:e.x,y:e.y,w:t.w,h:t.h};for(const i of t.shadows)i.inset||Se(i.color)<=0||(s+=$e(Oe(r,i.spread+Rt(i)+n,i.dx,i.dy),Je(t.radii,i.spread+Rt(i)+n),t.ks));const o=t.outline;return o&&o.width>0&&Se(o.color)>0&&(s+=$e(Oe(r,o.offset+o.width+n),Je(t.radii,o.offset+o.width+n),t.ks),s+=$e(Oe(r,o.offset-n),Je(t.radii,o.offset-n),t.ks,!0)),s}function Qa(t,e,n="",s=0){const{w:r,h:o,radii:i}=t,l=Math.max(et(t),s),d=Math.max(e,l+2);let u=Ve({x:-d,y:-d,w:r+2*d,h:o+2*d});const[f,p,h,m]=i,b=l+1;return f[0]>0&&f[1]>0&&(u+=Ve({x:-b,y:-b,w:f[0]+b,h:f[1]+b},!0)),p[0]>0&&p[1]>0&&(u+=Ve({x:r-p[0],y:-b,w:p[0]+b,h:p[1]+b},!0)),h[0]>0&&h[1]>0&&(u+=Ve({x:r-h[0],y:o-h[1],w:h[0]+b,h:h[1]+b},!0)),m[0]>0&&m[1]>0&&(u+=Ve({x:-b,y:o-m[1],w:m[0]+b,h:m[1]+b},!0)),u+=$e(wr(t),i,t.ks),u+_r(t)+n}function jr(t){const e=t.shadows.filter(m=>Se(m.color)>0),n=Math.ceil(et(t))+1+(t.attached?Math.ceil(eo(t.attached,t)):0);let s=1+Math.max(...t.border);for(const m of e)(m.inset||m.blur)&&(s=Math.max(s,1+m.spread+Rt(m)+Math.max(Math.abs(m.dx),Math.abs(m.dy))));s=Math.ceil(s);const[r,o,i,l]=t.radii,d=Math.ceil(Math.max(r[0],l[0]))+s,u=Math.ceil(Math.max(o[0],i[0]))+s,f=Math.ceil(Math.max(r[1],o[1]))+s,p=Math.ceil(Math.max(l[1],i[1]))+s,h=!!t.attached;return{E:n,L:d,R:u,T:f,B:p,stretchX:!h&&d+u+1<=t.w,stretchY:!h&&f+p+1<=t.h}}function eo(t,e){let n=0;const s=t.match(/-?[\d.]+/g)||[];for(let r=0;r+1<s.length;r+=2){const o=+s[r],i=+s[r+1];n=Math.max(n,-o,-i,o-e.w,i-e.h)}return n}function to(t){const e=jr(t);return(e.stretchX?"S":t.w)+"x"+(e.stretchY?"S":t.h)}function Nr(t,e=t){const{w:n,h:s,radii:r,ks:o}=t;if(n<=0||s<=0||kr(t.outline))return null;const i=r.some(([$,Y])=>$>0&&Y>0),l=t.border.some($=>$>0)&&Se(t.borderColor)>0,d=t.shadows.filter($=>Se($.color)>0),u=t.outline&&t.outline.width>0&&Se(t.outline.color)>0?t.outline:null;if(!l&&(!i||!d.length&&!u))return null;const{E:f,L:p,R:h,T:m,B:b,stretchX:v,stretchY:g}=jr(e),w=v?p+h+1:n,x=g?m+b+1:s,j=[g?m+f:x/2+f,v?h+f:w/2+f,g?b+f:x/2+f,v?p+f:w/2+f],_={...t,w,h:x},k=wr(_),S=$e(k,r,o),M=Za(_),C=l?$e(M.box,M.radii,o):null,A=1,E=d.filter($=>!$.inset),N=$=>$.spread+Math.max(Math.abs($.dx),Math.abs($.dy)),y=et(t),B=E.length>0||!!t.attached||u!==null&&u.offset<A&&u.offset+u.width>0?S:$e(Oe(k,A),Je(r,A),o),[D,I,O,T]=r,F=($,Y,K,ee)=>K>0&&ee>0?Ve({x:$,y:Y,w:K,h:ee}):"",q=($,Y,K)=>$[0]>0&&$[1]>0?F(Y,K,$[0]+f-1,$[1]+f-1):"";let V=`<clipPath id='h'><path d='${q(D,-f,-f)+q(I,w-I[0]+1,-f)+q(O,w-O[0]+1,x-O[1]+1)+q(T,-f,x-T[1]+1)}'/></clipPath><clipPath id='p'><path d='${C??B}'/></clipPath>`,J="";if(t.attached&&t.backdrop&&Se(t.backdrop)>0&&(V+=`<mask id='ba' maskUnits='userSpaceOnUse' x='${-f}' y='${-f}' width='${w+2*f}' height='${x+2*f}'><path fill='#fff' d='${Ve(k)}'/><path fill='#000' d='${S}'/></mask>`,J+=`<path mask='url(#ba)' clip-path='url(#h)' fill='${t.backdrop}' d='${t.attached}'/>`),E.length){if(V+=`<clipPath id='s'><path clip-rule='evenodd' d='${Ve(Oe(k,f))}${S}'/></clipPath>`,J+="<g clip-path='url(#h)'><g clip-path='url(#s)'>",t.backdrop&&Se(t.backdrop)>0){const $=E.map(Y=>$e(Oe(k,Y.spread+Rt(Y),Y.dx,Y.dy),Je(r,Y.spread+Rt(Y)),o)).join("");J+=`<path fill='${t.backdrop}' d='${$}'/>`}E.slice().reverse().forEach(($,Y)=>{const K=!$.blur&&N($)>=y&&y>0?A:0,ee=$e(Oe(k,$.spread+K,$.dx,$.dy),Je(r,$.spread+K),o);let ie="";if($.blur){const U=`sb${Y}`;V+=`<filter id='${U}' filterUnits='userSpaceOnUse' x='${-f}' y='${-f}' width='${w+2*f}' height='${x+2*f}' color-interpolation-filters='sRGB'><feGaussianBlur stdDeviation='${$.blur/2}'/></filter>`,ie=` filter='url(#${U})'`}J+=`<path${ie} fill='${$.color}' d='${ee}'/>`}),J+="</g></g>"}if(d.filter($=>$.inset).reverse().forEach($=>{const Y=Oe(M.box,-$.spread,$.dx,$.dy);if(Y.w<=0||Y.h<=0)return;const K=$e(Y,Je(M.radii,-$.spread),o);J+=`<path clip-path='url(#p)' fill-rule='evenodd' fill='${$.color}' d='${Ve(Y)}${K}'/>`}),C&&(J+=`<path fill-rule='evenodd' fill='${t.borderColor}' d='${S}${C}'/>`,B!==S&&(J+=`<path clip-path='url(#h)' fill-rule='evenodd' fill='${t.borderColor}' d='${B}${S}'/>`)),u&&i){const $=u.offset,Y=u.width,K=Oe(k,$);V+=`<clipPath id='o' clip-path='url(#h)'><path d='${Ve(K)}'/></clipPath>`;const ee=$+Y>0&&$+Y>=y?A:0,ie=$>=A?A:0,U=$e(Oe(k,$+Y+ee),Je(r,$+Y+ee),o),H=$e(Oe(k,$-ie),Je(r,$-ie),o);J+=`<path clip-path='url(#o)' fill-rule='evenodd' fill='${u.color}' d='${U}${H}'/>`}if(!J)return null;const X=w+2*f,P=x+2*f;return{svg:`<svg xmlns='http://www.w3.org/2000/svg' width='${X}' height='${P}' viewBox='${-f} ${-f} ${X} ${P}'><defs>${V}</defs>${J}</svg>`,slice:j,outset:f}}function Mr(t){const e=t.slice.map(s=>Me(s)).join(" "),n=t.slice.map(s=>Me(s)+"px").join(" ");return`url("data:image/svg+xml,${encodeURIComponent(t.svg)}") ${e} / ${n} / ${Me(t.outset)}px stretch`}const no=["","::before","::after"],Qt={"":"data-ok-se","::before":"data-ok-se-before","::after":"data-ok-se-after"},Rn={"":"--ok-se","::before":"--ok-se-before","::after":"--ok-se-after"},Sn="data-ok-corner-fallback",so=/^(box-shadow|outline|outline-(color|width|offset|style)|border(-(top|right|bottom|left))?(-(color|width))?|width|height|inset|top|right|bottom|left|border-.*radius|all)$/,Es=/^(box-shadow|outline-color|border(-top)?-color)$/;function Rr(){return!Ae||typeof CSS>"u"||typeof CSS.supports!="function"||CSS.supports("corner-shape","superellipse(2)")?!1:typeof ResizeObserver=="function"&&typeof MutationObserver=="function"}let As=0,_t=null;function Sr(){if(!Rr())return()=>{};As++,_t||(_t=new fo(document));let t=!1;return()=>{t||(t=!0,--As===0&&_t&&(_t.destroy(),_t=null))}}const ro=()=>_t!==null;function Cr(t=!0){ve(()=>t?Sr():void 0,[t])}const qe=t=>parseFloat(t)||0;function ao(t,e,n){const s=t.trim().split(/\s+/),r=(o,i)=>o.endsWith("%")?parseFloat(o)/100*i:qe(o);return[r(s[0],e),r(s[1]??s[0],n)]}const en=new Map,Lt=new Map;let oo=0;function io(t,e){const n=JSON.stringify([t,e]);return Lt.has(n)||(Lt.size>500&&Lt.clear(),Lt.set(n,Nr(t,e))),Lt.get(n)}function lo(t,e){let n=t;for(const f of e)n=pt(n,f,!1);const s={...t,shadows:[...n.shadows,...t.shadows],outline:et(n)>et(t)?n.outline:t.outline},r=++oo,o=(f,p)=>f.replace(/^<svg[^>]*>|<\/svg>$/g,"").replace(/id='([^']+)'/g,`id='${p}$1'`).replace(/url\(#([^)]*)\)/g,`url(#${p}$1)`),i=e.map((f,p)=>`@keyframes ok-se-fade-${r}-${p}-a{from{opacity:1}to{opacity:0}}@keyframes ok-se-fade-${r}-${p}-b{from{opacity:0}to{opacity:1}}`).join("");let l=null,d="";for(let f=0;f<2**e.length;f++){let p=t;e.forEach((b,v)=>{p=pt(p,b,!!(f&1<<v))});const h=io(p,s);if(!h)continue;l=h;let m=o(h.svg,`p${f}-`);e.forEach((b,v)=>{m=`<g style='animation:ok-se-fade-${r}-${v}-${f&1<<v?"b":"a"} ${b.duration}ms ${b.easing} ${b.delay}ms both'>${m}</g>`}),d+=`<g style='mix-blend-mode:plus-lighter'>${m}</g>`}if(!l)return"";const u=`<style>${i}</style><g style='isolation:isolate'>${d}</g>`;return Mr({...l,svg:l.svg.replace(/(<svg[^>]*>)[\s\S]*<\/svg>$/,`$1${u}</svg>`)})}function pt(t,e,n){const s=n?e.to:e.from;return e.property==="box-shadow"?{...t,shadows:yr(s)}:e.property==="outline-color"?{...t,outline:t.outline&&{...t.outline,color:s}}:{...t,borderColor:s}}function co(t,e){const n=s=>s.shadows.map(r=>[r.inset,r.dx,r.dy,r.spread,r.blur??0]);return JSON.stringify(n(t))===JSON.stringify(n(e))||!t.shadows.length&&e.shadows.every(s=>s.dx===0&&s.dy===0&&!s.blur&&s.spread===0)||!e.shadows.length&&t.shadows.every(s=>s.dx===0&&s.dy===0&&!s.blur&&s.spread===0)}function Ts(t){const e=t.decor;let n=e;for(const s of t.fades.values())n=pt(n,s,!1);return{...e,shadows:e.shadows.map((s,r)=>Se(s.color)>0?s:n.shadows[r]??s),outline:e.outline&&Se(e.outline.color)>0?e.outline:n.outline}}function uo(t){const e=JSON.stringify({...t,w:0,h:0})+to(t);let n=en.get(e);if(n===void 0){const s=Nr(t);n=s?Mr(s):"",en.size>500&&en.clear(),en.set(e,n)}return n}function $s(t,e){for(let n=e;n;n=n.parentElement){const s=t.getComputedStyle(n).backgroundColor;if(Se(s)>=.99)return s}return""}class fo{constructor(e){var n,s,r,o,i;this.parts=new Map,this.sizes=new WeakMap,this.watchers=new Map,this.raf=0,this.animating=new Map,this.pendingScan=new Set,this.scanAll=!1,this.mql=null,this.flushing=!1,this.interactionPending=!1,this.destroyed=!1,this.onInteract=l=>{if(!this.parts.size)return;const d=l.target instanceof Node?l.target:null,u=l.relatedTarget instanceof Node?l.relatedTarget:null;let f=this.doc;if(d&&u){let h=d;for(;h&&!h.contains(u);)h=h.parentNode;f=h??this.doc}else d&&(l.type==="click"||l.type==="change"||l.type==="input"||l.type==="pointerdown"||l.type==="pointerup")&&(f=d.parentNode??this.doc);let p=!1;for(const[h,m]of this.parts)(f===this.doc||f.contains(h)||d&&h.contains(d))&&(m.forEach(b=>{b.paintDirty=!0}),p=!0);p&&!this.interactionPending&&(this.interactionPending=!0,queueMicrotask(()=>{this.interactionPending=!1,this.destroyed||this.flush()}))},this.onAnim=l=>{var p;const d=l.target,u=(p=this.parts.get(d))==null?void 0:p.get(l.pseudoElement||"");if(!u)return;if("propertyName"in l){if(!so.test(l.propertyName))return;if(l.type==="transitionrun"&&Es.test(l.propertyName)&&this.startFade(u,l.propertyName)){u.paintDirty=!0,this.flush();return}if(u.fades.has(l.propertyName)){l.type!=="transitionrun"&&u.fades.delete(l.propertyName),u.paintDirty=!0,u.needsWrite=!0,this.flush();return}}else if(l.type==="animationstart"&&!this.animationTouchesPaint(d,l.animationName))return;const f=this.animating.get(u)??0;l.type==="transitionrun"||l.type==="animationstart"?this.animating.set(u,f+1):f<=1?this.animating.delete(u):this.animating.set(u,f-1),u.paintDirty=!0,this.flush(),this.animating.size&&this.schedule()},this.onResize=()=>{for(const l of this.parts.values())l.forEach(d=>{d.geomDirty=d.paintDirty=!0});this.schedule()},this.doc=e,this.root=e.documentElement,this.root.setAttribute(Sn,""),this.ro=new ResizeObserver(l=>{var d;for(const u of l){const f=u.borderBoxSize&&u.borderBoxSize[0];this.sizes.set(u.target,f?[f.inlineSize,f.blockSize]:[u.contentRect.width,u.contentRect.height]),(d=this.watchers.get(u.target))==null||d.forEach(p=>{p.paintDirty=!0})}this.flush()}),this.mo=new MutationObserver(l=>{this.onMutations(l),this.flush()}),this.mo.observe(this.root,{subtree:!0,childList:!0,attributes:!0});for(const l of["pointerover","pointerout","pointerdown","pointerup","pointercancel","focusin","focusout","keydown","keyup","click","change","input"])e.addEventListener(l,this.onInteract,!0);for(const l of["transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel"])e.addEventListener(l,this.onAnim,!0);(n=e.defaultView)==null||n.addEventListener("resize",this.onResize),this.mql=((r=(s=e.defaultView)==null?void 0:s.matchMedia)==null?void 0:r.call(s,"(prefers-color-scheme: dark)"))??null,(i=(o=this.mql)==null?void 0:o.addEventListener)==null||i.call(o,"change",this.onResize),this.scanAll=!0,this.flush()}destroy(){var e,n,s;this.destroyed=!0,this.mo.disconnect(),this.ro.disconnect(),this.raf&&cancelAnimationFrame(this.raf);for(const r of["pointerover","pointerout","pointerdown","pointerup","pointercancel","focusin","focusout","keydown","keyup","click","change","input"])this.doc.removeEventListener(r,this.onInteract,!0);for(const r of["transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel"])this.doc.removeEventListener(r,this.onAnim,!0);(e=this.doc.defaultView)==null||e.removeEventListener("resize",this.onResize),(s=(n=this.mql)==null?void 0:n.removeEventListener)==null||s.call(n,"change",this.onResize);for(const r of this.parts.values())for(const o of r.values())this.clearPart(o);this.parts.clear(),this.watchers.clear(),this.animating.clear(),this.root.removeAttribute(Sn)}onMutations(e){for(const n of e)if(n.type==="childList")n.addedNodes.forEach(s=>{s.nodeType===1&&this.pendingScan.add(s)});else if(n.type==="attributes"){const s=n.target;n.attributeName==="style"?this.forPartsIn(s,r=>{r.paintDirty=!0,r.el===s&&(r.geomDirty=!0)}):s===this.root||s===this.doc.body?n.attributeName!==Sn&&this.forPartsIn(this.doc,r=>{r.paintDirty=!0}):this.pendingScan.add(s.parentElement??s)}}forPartsIn(e,n){for(const[s,r]of this.parts)(e===this.doc||e.contains(s))&&r.forEach(n)}identify(e){var s;if(!(e instanceof HTMLElement))return;const n=this.doc.defaultView;for(const r of no){const o=n.getComputedStyle(e,r||null).getPropertyValue("--ok-shape"),i=o?xr(o):null,l=(s=this.parts.get(e))==null?void 0:s.get(r);i&&!l?this.addPart(e,r,i):!i&&l?this.removePart(l):i&&l&&(i.join()!==l.ks.join()&&(l.ks=i),l.geomDirty=l.paintDirty=!0)}}addPart(e,n,s){const r={el:e,pseudo:n,ks:s,rawRadii:null,geomDirty:!0,paintDirty:!0,needsWrite:!0,clipsOverflow:!1,key:"",decor:null,attached:"",attachedReach:0,clip:"",paint:"",active:!1,native:!1,anchor:null,watched:[],clipKey:"",fades:new Map,fadeKey:""};let o=this.parts.get(e);if(o||(o=new Map,this.parts.set(e,o)),o.set(n,r),this.watch(e,r),n){const i=e.offsetParent;i&&i!==e&&this.watch(i,r)}}watch(e,n){let s=this.watchers.get(e);s||(s=new Set,this.watchers.set(e,s),this.ro.observe(e)),s.add(n),n.watched.push(e)}removePart(e){this.clearPart(e);const n=this.parts.get(e.el);n==null||n.delete(e.pseudo),n&&!n.size&&this.parts.delete(e.el),this.animating.delete(e);for(const s of e.watched){const r=this.watchers.get(s);r&&r.delete(e)&&!r.size&&(this.watchers.delete(s),this.ro.unobserve(s))}e.watched=[]}clearPart(e){e.el.removeAttribute(Qt[e.pseudo]),e.el.style.removeProperty(Rn[e.pseudo]+"-clip"),e.el.style.removeProperty(Rn[e.pseudo]+"-paint"),e.fades.clear(),e.fadeKey="",e.clip=e.paint=e.clipKey="",e.active=!1}startFade(e,n){var p,h,m;const s=(h=(p=e.el).getAnimations)==null?void 0:h.call(p).find(b=>{const v=b.effect;return b.transitionProperty===n&&((v==null?void 0:v.pseudoElement)||"")===e.pseudo}),r=s==null?void 0:s.effect,o=r==null?void 0:r.getKeyframes();if(!s||!r||!o||o.length!==2||!e.decor)return!1;if(((m=e.fades.get(n))==null?void 0:m.animation)===s)return!0;const i=n.replace(/-([a-z])/g,(b,v)=>v.toUpperCase()),l=o[0][i],d=o[1][i],u=r.getTiming();if(typeof l!="string"||typeof d!="string"||typeof u.duration!="number"||!u.duration)return!1;const f={animation:s,property:n,from:l,to:d,duration:u.duration,delay:Number(u.delay)-Number(s.currentTime??0),easing:u.easing&&u.easing!=="linear"?u.easing:o[0].easing||"linear"};return co(pt(e.decor,f,!1),pt(e.decor,f,!0))?(e.fades.set(n,f),e.fadeKey="",e.needsWrite=!0,!0):!1}animationTouchesPaint(e,n){var s,r,o;try{const i=(s=e.getAnimations)==null?void 0:s.call(e,{subtree:!0}).find(d=>d.animationName===n),l=(o=(r=i==null?void 0:i.effect)==null?void 0:r.getKeyframes)==null?void 0:o.call(r);return l?l.some(d=>Object.keys(d).some(u=>/^(boxShadow|outline|border)/.test(u))):!0}catch{return!0}}schedule(){this.raf||(this.raf=requestAnimationFrame(()=>{this.raf=0,this.animating.forEach((e,n)=>{n.paintDirty=!0}),this.flush(),this.animating.size&&this.schedule()}))}flush(){if(!this.flushing){this.flushing=!0;try{this.flushInner()}finally{this.mo.takeRecords(),this.flushing=!1}}}flushInner(){if(this.onMutations(this.mo.takeRecords()),this.scanAll)this.scanAll=!1,this.pendingScan.clear(),this.identify(this.root),this.root.querySelectorAll("*").forEach(i=>this.identify(i));else if(this.pendingScan.size){const i=[...this.pendingScan];this.pendingScan.clear();for(const l of i)l.isConnected&&(this.identify(l),l.querySelectorAll("*").forEach(d=>this.identify(d)),this.forPartsIn(l,d=>{d.geomDirty=d.paintDirty=!0}))}for(const[i,l]of this.parts)i.isConnected||l.forEach(d=>this.removePart(d));const e=[];this.parts.forEach(i=>i.forEach(l=>e.push(l)));const n=e.filter(i=>i.geomDirty);n.length&&this.readRadii(n);const s=this.doc.defaultView;for(const i of e)i.paintDirty&&(i.paintDirty=!1,this.readDecor(i,s));const r=new Set(e.filter(i=>i.decor&&kr(i.decor.outline)));for(const i of r)if(i.pseudo){const l=this.anchorOf(i);l&&r.add(l)}for(const i of e){const l=r.has(i);i.native!==l&&(i.native=l,i.needsWrite=!0)}const o=new Map;for(const i of e){if(!i.pseudo||!i.decor||i.native)continue;const l=Ts(i),d=et(l);if(d<=0)continue;const u=this.anchorOf(i);if(!u)continue;const f=o.get(u)??{path:"",reach:0};f.path+=_r(l,{x:0,y:0},1),f.reach=Math.max(f.reach,d+1),o.set(u,f)}for(const i of e){const l=o.get(i)??{path:"",reach:0};l.path!==i.attached&&(i.attached=l.path,i.attachedReach=l.reach,i.needsWrite=!0)}for(const i of e)i.needsWrite&&(i.needsWrite=!1,this.write(i))}readRadii(e){var i;const n=this.doc.defaultView,s=new Set,r=l=>{l.active&&!s.has(l)&&(s.add(l),l.el.setAttribute(Qt[l.pseudo],"r"))},o=new Set;for(const l of e)for(let d=l.el;d&&!o.has(d);d=d.parentElement)o.add(d),(i=this.parts.get(d))==null||i.forEach(r);for(const l of e){const d=n.getComputedStyle(l.el,l.pseudo||null);l.rawRadii=[d.borderTopLeftRadius,d.borderTopRightRadius,d.borderBottomRightRadius,d.borderBottomLeftRadius],l.geomDirty=!1,l.paintDirty=!0}for(const l of s)l.el.setAttribute(Qt[l.pseudo],"on")}sizeOf(e,n){if(e.pseudo)return n.display==="none"||n.content==="none"?null:[qe(n.width),qe(n.height)];if(n.display==="inline"){const s=e.el.parentElement;s&&!e.watched.includes(s)&&this.watch(s,e);const r=e.el.getClientRects();return r.length!==1?null:[r[0].width,r[0].height]}return this.sizes.get(e.el)??null}readDecor(e,n){var b,v;const s=n.getComputedStyle(e.el,e.pseudo||null);for(const g of((v=(b=e.el).getAnimations)==null?void 0:v.call(b))??[]){const w=g.transitionProperty;Es.test(w)&&this.startFade(e,w)}const r=this.sizeOf(e,s);if(!r||!e.rawRadii){(e.decor||e.active)&&(e.needsWrite=!0),e.decor=null,e.key="";return}const[o,i]=r,l=e.rawRadii.map(g=>ao(g,o,i)),d=s.outlineStyle!=="none"&&qe(s.outlineWidth)>0,u=[qe(s.borderTopWidth),qe(s.borderRightWidth),qe(s.borderBottomWidth),qe(s.borderLeftWidth)];let f={w:o,h:i,radii:gr(o,i,l),ks:e.ks,border:u,borderColor:u.some(g=>g>0)?s.borderTopColor:"transparent",shadows:yr(s.boxShadow),outline:d?{offset:qe(s.outlineOffset),width:qe(s.outlineWidth),color:s.outlineColor,style:s.outlineStyle}:null};for(const g of e.fades.values())f=pt(f,g,!0);let p=f;for(const g of e.fades.values())p=pt(p,g,!1);if(et(f)>0||et(p)>0){const g=e.pseudo?this.anchorOf({...e,decor:f}):null;f.backdrop=$s(n,(g?g.el:e.el).parentElement)}const h=e.pseudo?!0:s.overflowX!=="visible"&&s.overflowY!=="visible",m=JSON.stringify(f)+h;m!==e.key&&(e.key=m,e.decor=f,e.clipsOverflow=h,e.needsWrite=!0)}anchorOf(e){var r;const n=e.decor,s=o=>{const i=this.sizes.get(o);return!!i&&Math.abs(i[0]-n.w)<.5&&Math.abs(i[1]-n.h)<.5};for(let o=e.el;o;o=o.parentElement){const i=(r=this.parts.get(o))==null?void 0:r.get("");if(i&&i!==e&&s(o))return i}return null}write(e){const n=e.decor,s=Qt[e.pseudo],r=Rn[e.pseudo];if(!n||e.native){e.active&&this.clearPart(e);return}const o=Ts(e),i=JSON.stringify([o.w,o.h,o.radii,o.ks,o.shadows.map(p=>[p.inset,p.dx,p.dy,p.spread,p.blur??0,Se(p.color)>0]),o.outline&&[o.outline.offset,o.outline.width,Se(o.outline.color)>0],e.attached,e.attachedReach,e.clipsOverflow]),l=i===e.clipKey?e.clip:`path("${Qa(o,e.clipsOverflow?0:1024,e.attached,e.attachedReach)}")`;e.clipKey=i;let d=n;e.attached&&(d={...n,attached:e.attached,backdrop:n.backdrop||$s(this.doc.defaultView,e.el.parentElement)});let u;const f=JSON.stringify({...d,backdrop:et(d)>0||d.attached?d.backdrop:void 0});e.fades.size?e.fadeKey===f?u=e.paint:(u=lo(d,[...e.fades.values()].map(p=>{var h;return{...p,delay:Number(((h=p.animation.effect)==null?void 0:h.getTiming().delay)??0)-Number(p.animation.currentTime??0)}})),e.fadeKey=f):u=e.fadeKey===f?e.paint:uo(d),l!==e.clip&&(e.el.style.setProperty(r+"-clip",l),e.clip=l),u!==e.paint&&(u?e.el.style.setProperty(r+"-paint",u):e.el.style.removeProperty(r+"-paint"),e.paint=u),(!e.active||e.el.getAttribute(s)!=="on")&&(e.el.setAttribute(s,"on"),e.active=!0)}}const Er=["pink","orange","amber","blue","violet"],Bt=t=>t.startsWith("#");function Ar(t){return typeof t=="string"&&(Er.includes(t)||t.startsWith("#")&&Ke(t)!==null)}function Qn(t){return Ar(t)?Bt(t)?Ke(t):t:null}const Tr=520,$r=c.createContext(null);function ho(t){if(!t||!Ae)return{};let e={};try{e=JSON.parse(localStorage.getItem(t)||"{}")||{}}catch{return{}}return{theme:["light","dark","system"].includes(e.theme)?e.theme:void 0,accent:Qn(e.accent)??void 0,motion:["auto","full","reduced"].includes(e.motion)?e.motion:void 0}}const po=["--ok-accent","--ok-on-accent","--ok-accent-deep","--ok-accent-light","--ok-accent-fill","--ok-accent-fill-hover","--ok-logo-snout-light","--ok-logo-snout-dark"];let tn=null;function mo(){if(tn)return tn;const t=":root.ok-theming::view-transition-new(root){clip-path:circle(0px at 50% 0%)}:root.ok-theming::view-transition-old(root){animation-duration:600ms}";let e;try{e=new CSSStyleSheet,e.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}catch{const n=document.createElement("style");n.textContent=t,document.head.appendChild(n),e=n.sheet}return tn={next:e.cssRules[0].style,old:e.cssRules[1].style},tn}function bo(t){const o=1.2000000000000002,i=3*(.2-.4)-o,l=1-o-i,d=3*0,u=3*1-d,f=1-d-u;let p=t;for(let h=0;h<6;h++){const m=(3*l*p+2*i)*p+o;if(Math.abs(m)<1e-6)break;p-=(((l*p+i)*p+o)*p-t)/m}return((f*p+u)*p+d)*p}function vo({children:t,defaultTheme:e="system",defaultAccent:n="pink",defaultMotion:s="auto",storageKey:r,tail:o,locale:i,cornerFallback:l=!0}){Cr(l);const[d,u]=c.useState(e),[f,p]=c.useState(n),h=c.useCallback(M=>{const C=Qn(M);C&&p(C)},[]),[m,b]=c.useState(s),v=un("(prefers-color-scheme: dark)"),g=d==="system"?v?"dark":"light":d,[w,x]=c.useState(!r);ve(()=>{if(!r)return;const M=ho(r);M.theme&&u(M.theme),M.accent&&p(M.accent),M.motion&&b(M.motion),x(!0)},[r]),c.useEffect(()=>{if(!w)return;const M=document.documentElement;M.dataset.theme=g,M.dataset.accent=Bt(f)?"custom":f,po.forEach(C=>M.style.removeProperty(C)),Bt(f)&&Object.entries(Bn(f)).forEach(([C,A])=>M.style.setProperty(C,A)),m==="auto"?delete M.dataset.motion:M.dataset.motion=m,M.style.colorScheme=g},[w,g,f,m]),c.useEffect(()=>{if(!r||!w)return;const M=Bt(f)?Bn(f):void 0;try{localStorage.setItem(r,JSON.stringify({theme:d,accent:f,motion:m,vars:M}))}catch{}},[r,w,d,f,m]);const j=c.useRef(null),_=c.useRef(0),k=ke((M,C)=>{var q;const A=document.documentElement,E=document.startViewTransition,N=M==="system"?v?"dark":"light":M,y=()=>{A.dataset.theme=N,A.style.colorScheme=N,u(M)},R=++_.current;if(j.current){const G=j.current;j.current=null,A.classList.remove("ok-theming");try{(q=G.skipTransition)==null||q.call(G)}catch{}y();return}if(!C||!E||Ge()===0||document.hidden||N===g){u(M);return}const B=Math.ceil(Math.hypot(Math.max(C.x,innerWidth-C.x),Math.max(C.y,innerHeight-C.y))),D=Tr*Ge(),I=mo(),O=` at ${Math.round(C.x)}px ${Math.round(C.y)}px)`;I.next.clipPath="circle(0px"+O,I.old.animationDuration=Math.round(D+80)+"ms",A.classList.add("ok-theming");let T;try{T=E.call(document,()=>Ks.flushSync(y))}catch{A.classList.remove("ok-theming"),y();return}j.current=T,T.ready.then(()=>{const G=performance.now(),V=J=>{if(R!==_.current)return;const X=Math.min(1,(J-G)/D);I.next.clipPath=`circle(${Math.round(B*bo(X))}px${O}`,X<1&&requestAnimationFrame(V)};requestAnimationFrame(V)}).catch(()=>{});const F=()=>{j.current===T&&(j.current=null,A.classList.remove("ok-theming"))};T.finished.then(F,F)}),S=c.useMemo(()=>({theme:d,resolvedTheme:g,accent:f,motion:m,setTheme:k,setAccent:h,setMotion:b}),[d,g,f,m,k,h]);return a.jsx($r.Provider,{value:S,children:a.jsx(mr,{locale:i,children:a.jsx(fr,{tail:o,children:t})})})}function go(){const t=c.useContext($r),e=c.useCallback(()=>{},[]);return t??{theme:"light",resolvedTheme:"light",accent:"pink",motion:"auto",setTheme:e,setAccent:e,setMotion:e}}const Pr="M10 3H18A7 7 0 0 1 25 10V18A7 7 0 0 1 18 25H5A2 2 0 0 1 3 23V10A7 7 0 0 1 10 3Z",sn={x:15.5,y:15,width:13.5,height:10,rx:5},zn=[{cx:20,cy:20},{cx:24.5,cy:20}],xo=c.forwardRef(function({size:e=28,wordmark:n=!1,title:s="Oink UI",animated:r=!1,mono:o=!1,className:i,style:l,...d},u){const f=c.useId().replace(/:/g,""),p=`ok-logo-gap-${f}`,h=`ok-logo-holes-${f}`,b=d["aria-hidden"]===!0||d["aria-hidden"]==="true"?null:{role:"img","aria-label":s};return a.jsxs("span",{ref:u,className:L("ok-logo",o&&"ok-logo--mono",i),"data-animated":r||void 0,style:{"--ok-logo-size":`${e}px`,...l},...b,...d,children:[a.jsxs("svg",{className:"ok-logo__mark",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:[o&&a.jsxs("defs",{children:[a.jsxs("mask",{id:p,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[a.jsx("rect",{x:"0",y:"0",width:"32",height:"32",fill:"#fff"}),a.jsx("rect",{...sn,fill:"#000",stroke:"#000",strokeWidth:3})]}),a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[a.jsx("rect",{...sn,fill:"#fff"}),zn.map(v=>a.jsx("ellipse",{cx:v.cx,cy:v.cy,rx:1.3,ry:1.9,fill:"#000"},v.cx))]})]}),a.jsxs("g",{transform:"rotate(-8 16 16)",children:[a.jsx("path",{className:"ok-logo__ink",d:Pr,mask:o?`url(#${p})`:void 0}),a.jsxs("g",{className:"ok-logo__snout",children:[a.jsx("rect",{className:"ok-logo__accent",...sn,mask:o?`url(#${h})`:void 0}),!o&&zn.map(v=>a.jsx("ellipse",{className:"ok-logo__nostril",cx:v.cx,cy:v.cy,rx:1.3,ry:1.9},v.cx))]})]})]}),n&&a.jsx("span",{className:"ok-logo__word","aria-hidden":"true",children:"Oink UI"})]})}),hn="M3.6 8.4l2.9 2.9 5.9-6.4",ko="M4.5 4.5l7 7M11.5 4.5l-7 7";function pn(t,e){const n={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key],s=t.key==="Home"?"first":t.key==="End"?"last":null;if(!n&&!s)return null;const r=Array.from(t.currentTarget.querySelectorAll(e)).filter(i=>!i.disabled&&i.getAttribute("aria-disabled")!=="true");if(!r.length)return null;if(t.preventDefault(),s)return s==="first"?r[0]:r[r.length-1];const o=r.indexOf(document.activeElement);return r[(o+n+r.length)%r.length]}function es(t,e,n,s){if(!Ae)return()=>{};const r=e.pointerId;let o=!0;const i=d=>{if(!(!o||d.pointerId!==r)){if(!(d.buttons&1)){l();return}n(d)}};function l(){if(o){o=!1,document.removeEventListener("pointermove",i,!0),document.removeEventListener("pointerup",l,!0),document.removeEventListener("pointercancel",l,!0),document.removeEventListener("pointerdown",l,!0),window.removeEventListener("blur",l);try{t.releasePointerCapture(r)}catch{}s()}}try{t.setPointerCapture(r)}catch{}return document.addEventListener("pointermove",i,!0),document.addEventListener("pointerup",l,!0),document.addEventListener("pointercancel",l,!0),document.addEventListener("pointerdown",l,!0),window.addEventListener("blur",l),l}function yo(t){const e=String(t);if(e.includes("e-"))return parseInt(e.split("e-")[1],10);const n=e.indexOf(".");return n<0?0:e.length-n-1}qt["zh-CN"].button.status;const Ir=c.createContext({}),Lr=c.forwardRef(function(e,n){const s=c.useContext(Ir),{variant:r=s.variant??"soft",size:o=s.size??"md",loading:i,success:l,error:d,statusLabels:u,leading:f,trailing:p,block:h,iconOnly:m,disabled:b=s.disabled,href:v,target:g,rel:w,download:x,type:j="button",className:_,children:k,onClick:S,"aria-disabled":M,...C}=e,A=he().messages.button.status,E=M===!0||M==="true",N=!!b||E,y=i?"loading":l?"success":d?"error":void 0,R=i!==void 0||l!==void 0||d!==void 0,[B,D]=c.useState(""),I=y?(u==null?void 0:u[y])??A[y]:null;c.useEffect(()=>{I&&D(I)},[I]);const O=G=>{if(N||y==="loading"||y==="success"){G.preventDefault(),G.stopPropagation();return}S==null||S(G)},T=L("ok-btn ok-focusable",r!=="soft"&&`ok-btn--${r}`,o!=="md"&&`ok-btn--${o}`,m&&"ok-btn--icon",h&&"ok-btn--block",_),F=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"ok-btn__label",children:[f,k,p]}),R&&a.jsxs("span",{className:"ok-btn__status","aria-hidden":"true",children:[a.jsx(Zn,{className:"ok-tail"}),a.jsx("svg",{className:"ok-btn__check",viewBox:"0 0 16 16",children:a.jsx("path",{d:hn,pathLength:1})}),a.jsx("svg",{className:"ok-btn__cross",viewBox:"0 0 16 16",children:a.jsx("path",{d:ko,pathLength:1})})]})]}),q=R&&a.jsx(vt,{children:a.jsx(Kn,{role:"status","aria-live":"polite","aria-atomic":"true","data-ok-button-status":"",children:B})});return v!==void 0?a.jsxs(a.Fragment,{children:[a.jsx("a",{...C,ref:n,className:T,href:N?void 0:v,target:g,rel:w??(g==="_blank"?"noopener noreferrer":void 0),download:x,role:N?"link":void 0,"aria-disabled":N||void 0,"aria-busy":i||void 0,"data-state":y,onClick:O,children:F}),q]}):a.jsxs(a.Fragment,{children:[a.jsx("button",{...C,ref:n,type:j,className:T,disabled:b,"aria-disabled":E||void 0,"aria-busy":i||void 0,"data-state":y,onClick:O,children:F}),q]})}),wo=c.forwardRef(function({size:e,variant:n,disabled:s,attached:r,orientation:o="horizontal",block:i,className:l,children:d,...u},f){return a.jsx("div",{ref:f,role:"group",className:L("ok-btn-group",r&&"ok-btn-group--attached",o==="vertical"&&"ok-btn-group--vertical",i&&"ok-btn-group--block",l),...u,children:a.jsx(Ir.Provider,{value:{size:e,variant:n,disabled:s},children:d})})}),_o=c.forwardRef(function({pressed:e,defaultPressed:n=!1,onChange:s,onClick:r,...o},i){const[l,d]=le(e,n,s),u={...o,"aria-pressed":l,onClick:f=>{r==null||r(f),f.defaultPrevented||d(!l)}};return a.jsx(Lr,{ref:i,...u})});function jo(t={}){const{successHold:e=1200,errorHold:n=1200,labels:s}=t,[r,o]=c.useState("idle"),i=c.useRef(0),l=c.useRef(void 0),d=c.useRef({successHold:e,errorHold:n});d.current={successHold:e,errorHold:n},c.useEffect(()=>()=>{i.current++,clearTimeout(l.current)},[]);const u=c.useCallback(()=>{i.current++,clearTimeout(l.current),o("idle")},[]),f=c.useCallback(h=>{const m=++i.current;clearTimeout(l.current),o("loading");const b=g=>{m===i.current&&(o(g),l.current=setTimeout(()=>{m===i.current&&o("idle")},g==="success"?d.current.successHold:d.current.errorHold))};let v;try{v=Promise.resolve(typeof h=="function"?h():h)}catch(g){v=Promise.reject(g)}return v.then(g=>(b("success"),g),g=>{throw b("error"),g})},[]),p=c.useMemo(()=>({loading:r==="loading",success:r==="success",error:r==="error",...s?{statusLabels:s}:{}}),[r,s]);return{state:r,run:f,reset:u,buttonProps:p}}const Le=c.createContext(null);function we(t,e=!0){const n=c.useContext(Le),s=`${t["aria-describedby"]??""} ${(n==null?void 0:n.describedBy)??""}`.split(/\s+/).filter(Boolean),r=Array.from(new Set(s)).join(" ")||void 0;return{id:t.id??(n==null?void 0:n.id),disabled:t.disabled??(n==null?void 0:n.disabled)??!1,required:t.required??(n==null?void 0:n.required)??!1,invalid:t.invalid??(n==null?void 0:n.invalid)??!1,describedBy:r,labelledBy:t["aria-labelledby"]??(!e&&!t["aria-label"]?n==null?void 0:n.labelId:void 0)}}const ts=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,size:r="md",pill:o,block:i=!0,icon:l,prefix:d,suffix:u,clearable:f,clearLabel:p,onClear:h,revealable:m=!0,invalid:b,type:v="text",className:g,style:w,rootClassName:x,rootStyle:j,id:_,disabled:k,required:S,"aria-describedby":M,...C},A){const E=we({id:_,disabled:k,required:S,invalid:b,"aria-describedby":M}),[N,y]=le(e,n,s),{messages:R}=he(),B=p??R.common.clear,[D,I]=c.useState(!1),O=c.useRef(null),T=v==="password",F=N!=="",q=G=>{var V;G.target.closest("input, button, a, select")||(G.preventDefault(),(V=O.current)==null||V.focus())};return a.jsxs("div",{className:L("ok-input",r!=="md"&&`ok-input--${r}`,o&&"ok-input--pill",!i&&"ok-input--inline",x,g),style:{...j,...w},"data-has-value":F?"":void 0,"data-invalid":E.invalid?"":void 0,"data-disabled":E.disabled?"":void 0,onMouseDown:q,children:[l&&a.jsx(pe,{name:l,className:"ok-input__icon"}),d!=null&&a.jsx("span",{className:"ok-input__affix",children:d}),a.jsx("input",{...C,ref:xe(A,O),id:E.id,type:T&&D?"text":v,value:N,disabled:E.disabled,required:E.required||void 0,"aria-invalid":E.invalid||void 0,"aria-describedby":E.describedBy,onChange:G=>y(G.target.value)}),f&&a.jsx("button",{type:"button",className:"ok-input__clear","aria-label":B,disabled:!F||E.disabled,tabIndex:F?void 0:-1,onClick:()=>{var G;y(""),h==null||h(),(G=O.current)==null||G.focus()},children:a.jsx(pe,{name:"x"})}),T&&m&&a.jsx("button",{type:"button",className:"ok-input__toggle ok-focusable","aria-label":R.input.showPassword,"aria-pressed":D,disabled:E.disabled,onClick:()=>I(G=>!G),children:a.jsx(pe,{children:D?a.jsx("path",{d:"M3 3l14 14M8.3 5.200A7.600 7.600 0 0 1 10 5c4.200 0 6.800 3.600 7.500 5-.3.600-1 1.700-2.100 2.700M12.700 14.400A7 7 0 0 1 10 15c-4.200 0-6.800-3.600-7.500-5 .4-.8 1.400-2.300 3-3.400M8.200 8.300a2.500 2.500 0 0 0 3.500 3.500"}):a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M2.500 10C3.200 8.600 5.800 5 10 5s6.800 3.600 7.500 5c-.7 1.400-3.300 5-7.500 5s-6.800-3.600-7.500-5z"}),a.jsx("circle",{cx:"10",cy:"10",r:"2.500"})]})})}),u!=null&&a.jsx("span",{className:"ok-input__affix",children:u})]})}),No=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,autoGrow:r=!0,minRows:o=3,maxRows:i,resize:l="none",invalid:d,className:u,style:f,id:p,disabled:h,required:m,"aria-describedby":b,...v},g){const w=we({id:p,disabled:h,required:m,invalid:d,"aria-describedby":b}),[x,j]=le(e,n,s),_=c.useRef(null);ve(()=>{var C;const S=_.current;if(!S||!r||typeof CSS<"u"&&((C=CSS.supports)!=null&&C.call(CSS,"field-sizing","content")))return;S.style.height="auto";const M=S.offsetHeight-S.clientHeight;S.style.height=S.scrollHeight+M+"px"},[x,r,o,i]);const k={"--_min-rows":o,...i?{"--_max-rows":i}:null};return a.jsx("textarea",{...v,ref:xe(g,_),id:w.id,rows:o,className:L("ok-textarea ok-scroll",u),style:{...k,...f},"data-autogrow":r?"":void 0,"data-resize":l!=="none"?l:void 0,value:x,disabled:w.disabled,required:w.required||void 0,"aria-invalid":w.invalid||void 0,"aria-describedby":w.describedBy,onChange:S=>j(S.target.value)})}),Mo=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,onSearch:r,onKeyDown:o,pill:i=!0,clearable:l=!0,placeholder:d,...u},f){const{messages:p}=he(),h=d??p.searchInput.placeholder,[m,b]=le(e,n,s);return a.jsx(ts,{ref:f,type:"search",icon:"search",enterKeyHint:"search",autoComplete:"off",pill:i,clearable:l,placeholder:h,value:m,onChange:b,onKeyDown:v=>{o==null||o(v),!v.defaultPrevented&&(v.key==="Enter"?r==null||r(m):v.key==="Escape"&&m!==""&&(v.preventDefault(),b("")))},...u})}),Ro=400,So=60,Co=c.forwardRef(function({value:e,defaultValue:n,onChange:s,min:r=-1/0,max:o=1/0,step:i=1,largeStep:l,precision:d,format:u,size:f="md",invalid:p,decrementLabel:h,incrementLabel:m,className:b,style:v,rootClassName:g,rootStyle:w,id:x,disabled:j,required:_,readOnly:k,"aria-describedby":S,onKeyDown:M,onBlur:C,onFocus:A,...E},N){const y=we({id:x,disabled:j,required:_,invalid:p,"aria-describedby":S}),{messages:R}=he(),B=h??R.numberInput.decrement,D=m??R.numberInput.increment,I=d??yo(i),O=Z=>ye(+Z.toFixed(I),r,o),[T,F]=le(e,O(n??0),s),[q,G]=c.useState(null),[V,J]=c.useState(!1),X=c.useRef(null),P=y.disabled||!!k,z=c.useRef(T);z.current=T;const $=c.useRef(F);$.current=F;const Y=()=>{if(q===null)return;const Z=parseFloat(q.replace(/,/g,""));if(G(null),Number.isFinite(Z)){const W=O(Z);z.current=W,$.current(W)}},K=(Z,W)=>{const ce=O(Z),ue=X.current;return ce===z.current?(Ne(ue,[{transform:"translateX(0)"},{transform:`translateX(${W*6}px)`},{transform:"translateX(0)"}],{spring:"bouncy"}),!1):(z.current=ce,$.current(ce),Ne(ue,[{transform:`translateY(${W*60}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"}),!0)},ee=(Z,W=i)=>K(z.current+Z*W,Z),ie=c.useRef({}),U=()=>{clearTimeout(ie.current.delay),clearInterval(ie.current.every),ie.current={}};c.useEffect(()=>U,[]);const H=c.useRef(!1),re=Z=>({onPointerDown:W=>{W.button||P||(H.current=!0,Y(),U(),ee(Z)&&(ie.current.delay=setTimeout(()=>{ie.current.every=setInterval(()=>{ee(Z)||U()},So)},Ro)))},onPointerUp:U,onPointerCancel:()=>{U(),H.current=!1},onPointerLeave:()=>{U()},onClick:()=>{if(H.current){H.current=!1;return}P||(Y(),ee(Z))}}),de=Z=>{if(M==null||M(Z),Z.defaultPrevented||P)return;const W=l??i*10,ce={ArrowUp:()=>ee(1),ArrowDown:()=>ee(-1),PageUp:()=>ee(1,W),PageDown:()=>ee(-1,W)};if(Number.isFinite(r)&&(ce.Home=()=>K(r,-1)),Number.isFinite(o)&&(ce.End=()=>K(o,1)),Z.key==="Enter"){Y();return}const ue=ce[Z.key];ue&&(Z.preventDefault(),Y(),ue())},ne=q??(u&&!V?u(T):T.toFixed(I)),oe=T<=r,Q=T>=o;return a.jsxs("div",{className:L("ok-stepper",f!=="md"&&`ok-stepper--${f}`,g,b),style:{...w,...v},"data-invalid":y.invalid?"":void 0,"data-disabled":y.disabled?"":void 0,children:[a.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":B,"aria-disabled":oe||P,...re(-1),children:a.jsx(pe,{name:"minus"})}),a.jsx("input",{...E,ref:xe(N,X),id:y.id,className:"ok-stepper__value",type:"text",inputMode:I>0?"decimal":"numeric",autoComplete:"off",role:"spinbutton","aria-valuenow":T,"aria-valuemin":Number.isFinite(r)?r:void 0,"aria-valuemax":Number.isFinite(o)?o:void 0,"aria-valuetext":u?u(T):void 0,"aria-invalid":y.invalid||void 0,"aria-describedby":y.describedBy,"aria-required":y.required||void 0,value:ne,disabled:y.disabled,readOnly:k,onChange:Z=>G(Z.target.value),onFocus:Z=>{J(!0),A==null||A(Z)},onBlur:Z=>{J(!1),Y(),C==null||C(Z)},onKeyDown:de}),a.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":D,"aria-disabled":Q||P,...re(1),children:a.jsx(pe,{name:"plus"})})]})}),Eo=c.forwardRef(function({length:e=6,value:n,defaultValue:s="",onChange:r,onComplete:o,type:i="numeric",mask:l,size:d="md",disabled:u,invalid:f,required:p,autoFocus:h,name:m,className:b,id:v,"aria-label":g,"aria-labelledby":w,"aria-describedby":x,...j},_){const k=we({id:v,disabled:u,required:p,invalid:f,"aria-describedby":x,"aria-labelledby":w,"aria-label":g},!1),{messages:S}=he(),[M,C]=le(n,s,r),A=c.useRef([]),E=O=>O.replace(i==="numeric"?/\D/g:/[^a-zA-Z0-9]/g,""),N=O=>{const T=A.current[Math.max(0,Math.min(e-1,O))];T==null||T.focus(),T==null||T.select()},y=(O,T)=>{const F=E(T);if(!F)return;const q=Math.min(O,M.length),G=(M.slice(0,q)+F+M.slice(q+F.length)).slice(0,e);C(G),N(q+F.length),G.length===e&&G!==M&&(o==null||o(G))},R=(O,T)=>{const F=M[O]??"";let q=E(T);if(!q){F&&C(M.slice(0,O)+M.slice(O+1));return}F&&q.length===2&&(q=q.startsWith(F)?q.slice(1):q.slice(0,1)),y(O,q)},B=(O,T)=>{T.key==="Backspace"&&!M[O]&&O>0?(T.preventDefault(),C(M.slice(0,O-1)+M.slice(O)),N(O-1)):T.key==="ArrowLeft"?(T.preventDefault(),N(O-1)):T.key==="ArrowRight"?(T.preventDefault(),N(O+1)):T.key==="Home"?(T.preventDefault(),N(0)):T.key==="End"&&(T.preventDefault(),N(Math.min(M.length,e-1)))},D=(O,T)=>{T.preventDefault(),y(O,T.clipboardData.getData("text"))},I=k.labelledBy?void 0:g??S.pinInput.label;return a.jsxs("div",{ref:_,role:"group",className:L("ok-pin",d==="sm"&&"ok-pin--sm",b),"aria-label":I,"aria-labelledby":k.labelledBy,"aria-describedby":k.describedBy,"data-invalid":k.invalid?"":void 0,...j,children:[a.jsx(Le.Provider,{value:null,children:Array.from({length:e},(O,T)=>a.jsx("input",{ref:F=>{A.current[T]=F},id:T===0?k.id:void 0,className:"ok-pin__cell",type:l?"password":"text",inputMode:i==="numeric"?"numeric":"text",pattern:i==="numeric"?"[0-9]*":void 0,autoComplete:T===0?"one-time-code":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-label":S.pinInput.cell(T+1,e),"aria-invalid":k.invalid||void 0,"aria-required":k.required||void 0,autoFocus:h&&T===0,disabled:k.disabled,value:M[T]??"",onChange:F=>R(T,F.target.value),onKeyDown:F=>B(T,F),onPaste:F=>D(T,F),onFocus:F=>F.target.select()},T))}),m&&a.jsx("input",{type:"hidden",name:m,value:M})]})}),Ao=new Set(["input","select","textarea"]),To=c.forwardRef(function({label:e,hint:n,error:s,invalid:r,required:o=!1,disabled:i=!1,id:l,orientation:d="vertical",className:u,children:f,...p},h){const m=c.useId(),b=l??`ok-field-${m}`,v=`${b}-label`,g=`${b}-hint`,w=`${b}-error`,x=s!=null&&s!==!1&&s!=="",j=r??x,_=[n!=null&&g,x&&w].filter(Boolean).join(" ")||void 0,k=c.useMemo(()=>({id:b,labelId:e!=null?v:void 0,describedBy:_,invalid:j,required:o,disabled:i}),[b,e!=null,v,_,j,o,i]),S=c.useRef(null),M=c.useRef(j);c.useEffect(()=>{j&&!M.current&&Ne(S.current,{transform:["translateX(0)","translateX(-7px)","translateX(6px)","translateX(-4px)","translateX(2px)","translateX(0)"]},{duration:520}),M.current=j},[j]);const C={id:b,"aria-describedby":_,"aria-invalid":j?!0:void 0,required:o||void 0,disabled:i||void 0};let A;if(typeof f=="function")A=f(C);else if(c.isValidElement(f)&&typeof f.type=="string"&&Ao.has(f.type)){const E=f,N=E.props;A=c.cloneElement(E,{...C,id:N.id??b,"aria-describedby":[N["aria-describedby"],_].filter(Boolean).join(" ")||void 0,required:N.required??C.required,disabled:N.disabled??C.disabled})}else A=f;return a.jsxs("div",{ref:h,className:L("ok-field",d==="horizontal"&&"ok-field--horizontal",u),"data-invalid":j?"":void 0,"data-disabled":i?"":void 0,...p,children:[e!=null&&a.jsxs("label",{className:"ok-field__label",id:v,htmlFor:b,onClick:E=>{const N=E.currentTarget.ownerDocument.getElementById(b);!N||!N.hasAttribute("data-label-focus")||(E.preventDefault(),N.disabled||N.focus())},children:[e,o&&a.jsx("span",{className:"ok-field__required","aria-hidden":"true",children:"*"})]}),a.jsx("div",{className:"ok-field__control",ref:S,children:a.jsx(Le.Provider,{value:k,children:A})}),n!=null&&a.jsx("span",{className:"ok-field__hint",id:g,children:n}),a.jsx("span",{className:"ok-field__msg",id:w,"aria-live":"polite",children:a.jsx("span",{children:x&&a.jsxs(a.Fragment,{children:[a.jsx(pe,{name:"alert"}),s]})})})]})}),$o=c.forwardRef(function({legend:e,hint:n,className:s,children:r,"aria-describedby":o,...i},l){const d=`ok-fieldset-${c.useId()}-hint`;return a.jsxs("fieldset",{ref:l,className:L("ok-fieldset",s),"aria-describedby":[o,n!=null&&d].filter(Boolean).join(" ")||void 0,...i,children:[e!=null&&a.jsx("legend",{className:"ok-fieldset__legend",children:e}),n!=null&&a.jsx("span",{className:"ok-fieldset__hint",id:d,children:n}),a.jsx("div",{className:"ok-fieldset__body",children:r})]})}),Po=c.forwardRef(function({required:e,disabled:n,size:s="sm",className:r,children:o,...i},l){return a.jsxs("label",{ref:l,className:L("ok-label",s==="md"&&"ok-label--md",r),"data-disabled":n?"":void 0,...i,children:[o,e&&a.jsx("span",{className:"ok-label__required","aria-hidden":"true",children:"*"})]})}),Io=c.forwardRef(function({size:e="md",onSubmit:n,className:s,children:r,...o},i){return a.jsx("form",{ref:i,className:L("ok-form",e!=="md"&&`ok-form--${e}`,s),onSubmit:l=>{l.preventDefault(),n==null||n(new FormData(l.currentTarget),l)},...o,children:r})}),Lo=c.forwardRef(function({align:e="start",stack:n=!0,className:s,...r},o){return a.jsx("div",{ref:o,className:L("ok-form__actions",e!=="start"&&`ok-form__actions--${e}`,n&&"ok-form__actions--stack",s),...r})}),Dr=c.createContext(null),Do=c.forwardRef(function({checked:e,defaultChecked:n=!1,onChange:s,indeterminate:r=!1,value:o,description:i,invalid:l,children:d,className:u,style:f,rootClassName:p,rootStyle:h,id:m,disabled:b,required:v,name:g,"aria-describedby":w,...x},j){const _=c.useContext(Dr),k=we({id:m,disabled:b??((_==null?void 0:_.disabled)||void 0),required:v,invalid:l??((_==null?void 0:_.invalid)||void 0),"aria-describedby":w}),S=!!_&&o!==void 0,[M,C]=le(e,n,s),A=S?_.value.includes(o):M,E=c.useRef(null);return c.useEffect(()=>{E.current&&(E.current.indeterminate=r)},[r,A]),a.jsxs("label",{className:L("ok-check",p,u),style:{...h,...f},"data-invalid":k.invalid?"":void 0,"data-described":i!=null?"":void 0,children:[a.jsx("input",{...x,ref:xe(j,E),id:k.id,type:"checkbox",name:g??(_==null?void 0:_.name),value:o,checked:A,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:N=>{S?(_.toggle(o),s==null||s(N.target.checked)):C(N.target.checked)}}),a.jsxs("span",{className:"ok-check__box","aria-hidden":"true",children:[a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{className:"ok-check__tick",d:hn,pathLength:1})}),a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{className:"ok-check__dash",d:"M4 8h8",pathLength:1})})]}),i!=null?a.jsxs("span",{className:"ok-check__text",children:[a.jsx("span",{children:d}),a.jsx("span",{className:"ok-check__desc",children:i})]}):d]})}),Oo=[],Bo=c.forwardRef(function({value:e,defaultValue:n=Oo,onChange:s,name:r,orientation:o="vertical",disabled:i,invalid:l,className:d,children:u,id:f,"aria-label":p,"aria-labelledby":h,"aria-describedby":m,...b},v){const g=we({id:f,disabled:i,invalid:l,"aria-describedby":m,"aria-labelledby":h,"aria-label":p},!1),[w,x]=le(e,n,s),j=_=>x(w.includes(_)?w.filter(k=>k!==_):[...w,_]);return a.jsx("div",{ref:v,id:g.id,role:"group",className:L("ok-check-group",o==="horizontal"&&"ok-check-group--horizontal",d),"aria-label":p,"aria-labelledby":g.labelledBy,"aria-describedby":g.describedBy,"aria-invalid":g.invalid||void 0,...b,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Dr.Provider,{value:{value:w,toggle:j,name:r,disabled:g.disabled,invalid:g.invalid},children:u})})})}),Or=c.createContext(null),Fo=c.forwardRef(function({value:e,onChange:n,description:s,children:r,className:o,style:i,rootClassName:l,rootStyle:d,name:u,checked:f,disabled:p,required:h,...m},b){const v=c.useContext(Or);return a.jsxs("label",{className:L("ok-radio",l,o),style:{...d,...i},"data-described":s!=null?"":void 0,children:[a.jsx("input",{...m,ref:b,type:"radio",name:u??(v==null?void 0:v.name),value:e,checked:v?v.value===e:f,disabled:p??(v==null?void 0:v.disabled),required:h??((v==null?void 0:v.required)||void 0),onChange:g=>{g.target.checked&&(v&&v.select(e),n==null||n(e))}}),a.jsx("span",{className:"ok-radio__dot","aria-hidden":"true"}),s!=null?a.jsxs("span",{className:"ok-radio__text",children:[a.jsx("span",{children:r}),a.jsx("span",{className:"ok-radio__desc",children:s})]}):r]})}),zo=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,name:r,orientation:o="vertical",disabled:i,required:l,invalid:d,className:u,children:f,id:p,"aria-label":h,"aria-labelledby":m,"aria-describedby":b,...v},g){const w=we({id:p,disabled:i,required:l,invalid:d,"aria-describedby":b,"aria-labelledby":m,"aria-label":h},!1),x=`ok-radio-${c.useId()}`,[j,_]=le(e,n,s);return a.jsx("div",{ref:g,id:w.id,role:"radiogroup",className:L("ok-radio-group",o==="horizontal"&&"ok-radio-group--horizontal",u),"aria-label":h,"aria-labelledby":w.labelledBy,"aria-describedby":w.describedBy,"aria-orientation":o,"aria-required":w.required||void 0,"aria-invalid":w.invalid||void 0,"data-invalid":w.invalid?"":void 0,...v,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Or.Provider,{value:{value:j,select:_,name:r??x,disabled:w.disabled,required:w.required},children:f})})})}),Ho=c.forwardRef(function({checked:e,defaultChecked:n=!1,onChange:s,labelPosition:r="end",children:o,className:i,style:l,rootClassName:d,rootStyle:u,id:f,disabled:p,required:h,"aria-describedby":m,...b},v){const g=we({id:f,disabled:p,required:h,"aria-describedby":m}),[w,x]=le(e,n,s),j=o!=null&&a.jsx("span",{className:"ok-switch__label",children:o});return a.jsxs("label",{className:L("ok-switch",d,i),style:{...u,...l},"data-label-position":r,children:[r==="start"&&j,a.jsx("input",{...b,ref:v,id:g.id,type:"checkbox",role:"switch",checked:w,disabled:g.disabled,required:g.required||void 0,"aria-describedby":g.describedBy,onChange:_=>x(_.target.checked)}),a.jsx("span",{className:"ok-switch__track",children:a.jsx("span",{className:"ok-switch__thumb"})}),r!=="start"&&j]})});function rn(t,e,n,s){return+ye(s==="any"?t:Math.round((t-e)/s)*s+e,e,n).toFixed(6)}function Br(t,e,n){const s=n==="any"?(e-t)/100:n;return{small:s,big:Math.max(s,(e-t)/10)}}const qo=c.forwardRef(function({value:e,defaultValue:n,onChange:s,onChangeEnd:r,onActiveChange:o,min:i=0,max:l=100,step:d=1,ticks:u,bubble:f=!0,format:p,digits:h,disabled:m,name:b,className:v,style:g,id:w,onKeyDown:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":S,...M},C){const A=we({id:w,disabled:m,"aria-describedby":S,"aria-labelledby":k,"aria-label":_},!1),E=d==="any",N=H=>rn(H,i,l,d),[y,R]=le(e,N(n??i),s),B=N(y),D=E?1/0:Math.round((l-i)/d),I=D<=12,O=h??(E?0:void 0),T=H=>p?p(H):O==null?String(H):H.toFixed(O),F=c.useRef(null),q=c.useRef(null),[G,V]=c.useState(!1),[J,X]=c.useState(!1),P=c.useRef(B);P.current=B;const z=ke(H=>{const re=N(H);P.current=re,R(re)}),$=ke(()=>r==null?void 0:r(P.current)),Y=ke(H=>o==null?void 0:o(H)),K=c.useRef(null);c.useEffect(()=>()=>{var H;return(H=K.current)==null?void 0:H.call(K)},[]);const ee=H=>{var Z;j==null||j(H);const re=F.current;if(H.defaultPrevented||H.button||A.disabled||!re)return;(Z=K.current)==null||Z.call(K),V(!0),Y(!0);const de=H.clientX;let ne=0;const oe=q.current;if(oe&&oe.contains(H.target)){const W=oe.getBoundingClientRect();ne=H.clientX-(W.left+W.width/2)}const Q=W=>{const ce=re.getBoundingClientRect(),ue=oe?oe.offsetWidth:0,je=ye((W-ne-ce.left-ue/2)/(ce.width-ue||1),0,1);z(i+je*(l-i))};Q(H.clientX),K.current=es(re,H,W=>{!I&&Math.abs(W.clientX-de)>2&&X(!0),Q(W.clientX)},()=>{K.current=null,V(!1),X(!1),Y(!1),$()})},ie=H=>{if(x==null||x(H),H.defaultPrevented||A.disabled)return;const{small:re,big:de}=Br(i,l,d),ne={ArrowRight:re,ArrowUp:re,ArrowLeft:-re,ArrowDown:-re,PageUp:de,PageDown:-de}[H.key];let oe;if(ne)oe=P.current+ne;else if(H.key==="Home")oe=i;else if(H.key==="End")oe=l;else return;H.preventDefault(),z(oe),$()},U=(B-i)/(l-i||1);return a.jsxs("div",{ref:xe(C,F),id:A.id,role:"slider",tabIndex:A.disabled?-1:0,className:L("ok-slider ok-focusable",v),style:{"--v":U,...g},"aria-label":_,"aria-labelledby":A.labelledBy,"aria-describedby":A.describedBy,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":B,"aria-valuetext":T(B),"aria-orientation":"horizontal","aria-disabled":A.disabled||void 0,"data-ticks":u&&I?"":void 0,"data-active":G?"":void 0,"data-tracking":J?"":void 0,onPointerDown:ee,onKeyDown:ie,...M,children:[a.jsx("span",{className:"ok-slider__track",children:a.jsx("span",{className:"ok-slider__fill"})}),u&&I&&a.jsx("span",{className:"ok-slider__ticks","aria-hidden":"true",children:Array.from({length:D+1},(H,re)=>a.jsx("i",{style:{left:`${re/D*100}%`}},re))}),a.jsx("span",{className:"ok-slider__thumb",ref:q,children:f&&a.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:T(B)})}),b&&a.jsx("input",{type:"hidden",name:b,value:B})]})}),Vo=c.forwardRef(function({value:e,defaultValue:n,onChange:s,onChangeEnd:r,onActiveChange:o,min:i=0,max:l=100,step:d=1,minDistance:u=0,bubble:f=!0,format:p,digits:h,disabled:m,thumbLabels:b,name:v,className:g,style:w,id:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":S,...M},C){const A=we({id:x,disabled:m,"aria-describedby":S,"aria-labelledby":k,"aria-label":_},!1),{messages:E}=he(),N=b??E.rangeSlider.thumbs,y=d==="any",[R,B]=le(e,n??[i,l],s),D=rn(Math.min(R[0],R[1]),i,l,d),I=rn(Math.max(R[0],R[1]),i,l,d),T=(y?1/0:Math.round((l-i)/d))<=12,F=h??(y?0:void 0),q=ne=>p?p(ne):F==null?String(ne):ne.toFixed(F),G=c.useRef(null),V=c.useRef([null,null]),[J,X]=c.useState(null),[P,z]=c.useState(!1),$=c.useRef([D,I]);$.current=[D,I];const Y=ke((ne,oe)=>{const[Q,Z]=$.current,W=rn(oe,i,l,d),ce=ne===0?[Math.min(W,Z-u),Z]:[Q,Math.max(W,Q+u)];ce[ne]=ye(ce[ne],i,l),!(ce[0]===Q&&ce[1]===Z)&&($.current=ce,B(ce))}),K=ke(()=>r==null?void 0:r($.current)),ee=ke(ne=>o==null?void 0:o(ne)),ie=c.useRef(null);c.useEffect(()=>()=>{var ne;return(ne=ie.current)==null?void 0:ne.call(ie)},[]);const U=ne=>{var De,xt,Ie;j==null||j(ne);const oe=G.current;if(ne.defaultPrevented||ne.button||A.disabled||!oe)return;(De=ie.current)==null||De.call(ie);const Q=((xt=V.current[0])==null?void 0:xt.offsetWidth)??0,Z=(_e,Ce)=>{const ge=oe.getBoundingClientRect();return i+ye((_e-Ce-ge.left-Q/2)/(ge.width-Q||1),0,1)*(l-i)};let W=V.current.findIndex(_e=>_e&&_e.contains(ne.target)),ce=0;if(W>=0){const _e=V.current[W].getBoundingClientRect();ce=ne.clientX-(_e.left+_e.width/2)}else{const _e=Z(ne.clientX,0),[Ce,ge]=$.current;W=Math.abs(_e-Ce)<=Math.abs(_e-ge)?0:1,Ce===ge&&(W=_e<Ce?0:1)}const ue=W,je=ne.clientX;X(ue),ee(!0),(Ie=V.current[ue])==null||Ie.focus({preventScroll:!0}),Y(ue,Z(ne.clientX,ce)),ie.current=es(oe,ne,_e=>{!T&&Math.abs(_e.clientX-je)>2&&z(!0),Y(ue,Z(_e.clientX,ce))},()=>{ie.current=null,X(null),z(!1),ee(!1),K()})},H=(ne,oe)=>{if(A.disabled)return;const{small:Q,big:Z}=Br(i,l,d),W={ArrowRight:Q,ArrowUp:Q,ArrowLeft:-Q,ArrowDown:-Q,PageUp:Z,PageDown:-Z}[oe.key];let ce;if(W)ce=$.current[ne]+W;else if(oe.key==="Home")ce=i;else if(oe.key==="End")ce=l;else return;oe.preventDefault(),Y(ne,ce),K()},re=l-i||1,de=[D,I];return a.jsxs("div",{ref:xe(C,G),id:A.id,role:"group",className:L("ok-slider ok-slider--range",g),style:{"--a":(D-i)/re,"--b":(I-i)/re,...w},"aria-label":_,"aria-labelledby":A.labelledBy,"aria-describedby":A.describedBy,"data-disabled":A.disabled?"":void 0,"data-active":J!==null?"":void 0,"data-tracking":P?"":void 0,onPointerDown:U,...M,children:[a.jsx("span",{className:"ok-slider__track",children:a.jsx("span",{className:"ok-slider__fill"})}),de.map((ne,oe)=>a.jsx("span",{ref:Q=>{V.current[oe]=Q},className:"ok-slider__thumb ok-focusable",role:"slider",tabIndex:A.disabled?-1:0,"data-index":oe,"data-active":J===oe?"":void 0,"aria-label":N[oe],"aria-valuemin":oe===0?i:Math.min(l,D+u),"aria-valuemax":oe===0?Math.max(i,I-u):l,"aria-valuenow":ne,"aria-valuetext":q(ne),"aria-orientation":"horizontal","aria-disabled":A.disabled||void 0,onKeyDown:Q=>H(oe,Q),children:f&&a.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:q(ne)})},oe)),v&&a.jsxs(a.Fragment,{children:[a.jsx("input",{type:"hidden",name:v,value:D}),a.jsx("input",{type:"hidden",name:v,value:I})]})]})});function Wo({options:t,value:e,defaultValue:n,onChange:s,size:r="md",block:o,disabled:i,className:l,id:d,"aria-label":u,"aria-labelledby":f,"aria-describedby":p,onKeyDown:h,...m},b){var E,N;const v=we({id:d,disabled:i,"aria-describedby":p,"aria-labelledby":f,"aria-label":u},!1),g=((E=t.find(y=>!y.disabled))==null?void 0:E.value)??((N=t[0])==null?void 0:N.value),[w,x]=le(e,n??g,s),j=c.useRef(null),_=c.useRef(null),[k,S]=c.useState(!1),M=c.useRef(null),C=()=>{const y=j.current,R=y==null?void 0:y.querySelector('[aria-checked="true"]');!y||!R||(y.style.setProperty("--x",R.offsetLeft+"px"),y.style.setProperty("--w",R.offsetWidth+"px"))},A=()=>{const y=j.current,R=y==null?void 0:y.querySelector('[aria-checked="true"]');if(!y||!R||y.scrollWidth<=y.clientWidth)return;const B=3,D=R.offsetLeft-B,I=R.offsetLeft+R.offsetWidth+B;D<y.scrollLeft?y.scrollLeft=D:I>y.scrollLeft+y.clientWidth&&(y.scrollLeft=I-y.clientWidth)};return ve(()=>{C(),A(),M.current!==null&&M.current!==w&&Ne(_.current,{scale:["1 1","1.05 .86","1 1"]},{duration:340,easing:ze.out}),M.current=w},[w]),ve(C),c.useEffect(()=>{const y=j.current;if(!y||typeof ResizeObserver>"u"){S(!0);return}let R=0;const B=new ResizeObserver(()=>{S(!1),C(),A(),cancelAnimationFrame(R),R=requestAnimationFrame(()=>{R=requestAnimationFrame(()=>S(!0))})});return B.observe(y),R=requestAnimationFrame(()=>S(!0)),()=>{B.disconnect(),cancelAnimationFrame(R)}},[]),a.jsxs("div",{ref:xe(b,j),id:v.id,role:"radiogroup",className:L("ok-seg",r!=="md"&&`ok-seg--${r}`,o&&"ok-seg--block",l),"aria-label":u,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":v.disabled||void 0,"data-ready":k?"":void 0,onKeyDown:y=>{if(h==null||h(y),y.defaultPrevented)return;const R=pn(y,'[role="radio"]');if(!R)return;R.focus();const B=R.dataset.value;B!==void 0&&x(B)},...m,children:[a.jsx("span",{className:"ok-seg__thumb",ref:_,"aria-hidden":"true"}),t.map(y=>{const R=y.value===w;return a.jsxs("button",{type:"button",role:"radio",className:"ok-seg__item ok-focusable","aria-checked":R,"aria-label":y["aria-label"],tabIndex:R?0:-1,disabled:v.disabled||y.disabled,"data-value":y.value,onClick:()=>x(y.value),children:[y.icon,y.label!=null&&y.label!==""&&a.jsx("span",{children:y.label})]},y.value)})]})}const Go=c.forwardRef(Wo),Fr=c.createContext(null),Uo=c.forwardRef(function({value:e,selected:n,defaultSelected:s,onChange:r,onRemove:o,removeLabel:i,icon:l,disabled:d,className:u,children:f,onClick:p,...h},m){const{messages:b}=he(),v=i??b.common.remove,g=c.useContext(Fr),w=!!g&&g.selectable&&e!==void 0,x=w||n!==void 0||s!==void 0||r!==void 0&&!o,[j,_]=le(n,s??!1,r),k=w?g.value.includes(e):j,S=d??(g==null?void 0:g.disabled)??!1,M=c.useRef(null),[C,A]=c.useState(!1),E=L("ok-chip",u),N=l!=null&&a.jsx("span",{className:"ok-chip__lead",children:l});if(x&&!o)return a.jsxs("button",{ref:xe(m,M),type:"button",className:L(E,"ok-focusable"),"aria-pressed":k,disabled:S,"data-value":e,onClick:R=>{p==null||p(R),!R.defaultPrevented&&(w?(g.toggle(e),r==null||r(!k)):_(!k))},...h,children:[a.jsx("span",{className:"ok-chip__check","aria-hidden":"true",children:a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{d:hn,pathLength:1})})}),N,a.jsx("span",{className:"ok-chip__text",children:f})]});const y=()=>{A(!0);const R=Ne(M.current,[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(.5)"}],{duration:140,easing:ze.in,fill:"forwards"}),B=()=>o==null?void 0:o();R!=null&&R.finished?R.finished.then(B,B):B()};return a.jsxs("span",{ref:xe(m,M),className:E,"data-value":e,"data-removing":C||void 0,"aria-disabled":S||void 0,onClick:p,...h,children:[N,a.jsx("span",{className:"ok-chip__text",children:f}),o&&a.jsx("button",{type:"button",className:"ok-chip__remove ok-focusable","aria-label":typeof f=="string"?`${v} ${f}`:v,disabled:S,onClick:y,children:a.jsx(pe,{name:"x"})})]})}),Yo=[],Ps="ok-chips-flip";class Xo extends c.Component{getSnapshotBeforeUpdate(){const e=this.props.root.current;if(!e)return null;const n=Array.from(e.children);return{node:e,count:n.length,rects:new Map(n.map(s=>[s,s.getBoundingClientRect()]))}}componentDidUpdate(e,n,s){if(!s||!s.node.isConnected)return;const r=s.node,o=Array.from(r.children);if(o.length===s.count)return;o.forEach(l=>{var d;return(d=l.getAnimations)==null?void 0:d.call(l).forEach(u=>{u.id===Ps&&u.cancel()})});const i=new Map;s.rects.forEach((l,d)=>{var u;(u=d.dataset)!=null&&u.removing||i.set(d,l)}),dn(i,{id:Ps})}render(){return this.props.children}}const Ko=c.forwardRef(function({value:e,defaultValue:n,onChange:s,multiple:r=!0,disabled:o,className:i,children:l,id:d,"aria-label":u,"aria-labelledby":f,"aria-describedby":p,...h},m){const b=we({id:d,disabled:o,"aria-describedby":p,"aria-labelledby":f,"aria-label":u},!1),v=e!==void 0||n!==void 0||s!==void 0,[g,w]=le(e,n??Yo,s),x=_=>{g.includes(_)?w(g.filter(k=>k!==_)):w(r?[...g,_]:[_])},j=c.useRef(null);return a.jsx("div",{ref:xe(m,j),id:b.id,role:"group",className:L("ok-chips",i),"aria-label":u,"aria-labelledby":b.labelledBy,"aria-describedby":b.describedBy,...h,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Fr.Provider,{value:{value:g,toggle:x,selectable:v,disabled:b.disabled},children:a.jsx(Xo,{root:j,children:l})})})})}),zr=c.createContext(null),Jo=c.forwardRef(function({value:e,art:n,description:s,checked:r,onChange:o,disabled:i,className:l,children:d,onClick:u,...f},p){const h=c.useContext(zr),m=h?h.values.includes(e):!!r,b=h?!h.multiple:!1;return a.jsxs("button",{ref:p,type:"button",role:b?"radio":"checkbox",className:L("ok-option ok-focusable",l),"aria-checked":m,tabIndex:b?h.tabStop===e?0:-1:void 0,disabled:i??(h==null?void 0:h.disabled),"data-value":e,onClick:v=>{u==null||u(v),!v.defaultPrevented&&(h&&h.pick(e),o==null||o(h?h.multiple?!m:!0:!m))},...f,children:[n!=null&&a.jsx("span",{className:"ok-option__art",children:n}),a.jsxs("span",{className:"ok-option__foot",children:[a.jsx("span",{className:"ok-option__title",children:d}),a.jsx("span",{className:"ok-option__check","aria-hidden":"true",children:a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{d:hn,pathLength:1})})})]}),s!=null&&a.jsx("span",{className:"ok-option__desc",children:s})]})}),Is=t=>t===void 0?void 0:t===null?[]:Array.isArray(t)?t:[t],Zo=c.forwardRef(function(e,n){const{multiple:s=!1,value:r,defaultValue:o,onChange:i,disabled:l,minItemWidth:d,className:u,style:f,children:p,id:h,onKeyDown:m,"aria-label":b,"aria-labelledby":v,"aria-describedby":g,...w}=e,x=we({id:h,disabled:l,"aria-describedby":g,"aria-labelledby":v,"aria-label":b},!1),j=i,[_,k]=le(Is(r),Is(o)??[],E=>{s?j==null||j(E):E.length&&(j==null||j(E[0]))}),S=E=>{s?k(_.includes(E)?_.filter(N=>N!==E):[..._,E]):_[0]!==E&&k([E])};let M;const C=E=>{var y,R;if(M!==void 0||E==null||typeof E!="object")return;if(Array.isArray(E)){E.forEach(C);return}const N=E;typeof((y=N.props)==null?void 0:y.value)=="string"&&!N.props.disabled?M=N.props.value:(R=N.props)!=null&&R.children&&C(N.props.children)};!s&&!_.length&&C(p);const A=_[0]??M;return a.jsx("div",{ref:n,id:x.id,role:s?"group":"radiogroup",className:L("ok-options",u),style:d?{gridTemplateColumns:`repeat(auto-fit, minmax(${d}px, 1fr))`,...f}:f,"aria-label":b,"aria-labelledby":x.labelledBy,"aria-describedby":x.describedBy,onKeyDown:E=>{if(m==null||m(E),E.defaultPrevented||s)return;const N=pn(E,'[role="radio"]');N&&(N.focus(),N.dataset.value!==void 0&&S(N.dataset.value))},...w,children:a.jsx(Le.Provider,{value:null,children:a.jsx(zr.Provider,{value:{values:_,multiple:s,pick:S,disabled:x.disabled,tabStop:A},children:p})})})}),Hr=c.forwardRef(function({colors:e,value:n,defaultValue:s=null,onChange:r,size:o="md",disabled:i,className:l,id:d,onKeyDown:u,"aria-label":f,"aria-labelledby":p,"aria-describedby":h,...m},b){var j;const v=we({id:d,disabled:i,"aria-describedby":h,"aria-labelledby":p,"aria-label":f},!1),[g,w]=le(n,s,r),x=e.some(_=>_.value===g)?g:(j=e.find(_=>!_.disabled))==null?void 0:j.value;return a.jsx("div",{ref:b,id:v.id,role:"radiogroup",className:L("ok-swatches",o!=="md"&&`ok-swatches--${o}`,l),"aria-label":f,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,onKeyDown:_=>{if(u==null||u(_),_.defaultPrevented)return;const k=pn(_,'[role="radio"]');k&&(k.focus(),k.dataset.value!==void 0&&w(k.dataset.value))},...m,children:e.map(_=>a.jsx("button",{type:"button",role:"radio",className:"ok-swatch ok-focusable",style:{"--c":_.color},"aria-checked":_.value===g,"aria-label":_.label,title:_.label,tabIndex:_.value===x?0:-1,disabled:v.disabled||_.disabled,"data-value":_.value,onClick:()=>w(_.value)},_.value))})}),Cn="#ff6b8e",Qo=()=>()=>{},ei=()=>"EyeDropper"in window,ti=()=>!1;function En(t,e){const n=or(t);return n?n.v===0?{h:e.h,s:e.s,v:0}:n.s===0?{h:e.h,s:0,v:n.v}:n:e}const An=t=>Math.round(t*100),ni=c.forwardRef(function({value:e,defaultValue:n=Cn,onChange:s,onChangeEnd:r,swatches:o,disabled:i,className:l,style:d,id:u,"aria-label":f,"aria-labelledby":p,"aria-describedby":h,...m},b){const v=we({id:u,disabled:i,"aria-describedby":h,"aria-labelledby":p,"aria-label":f},!1),{messages:g}=he(),w=v.disabled,[x,j]=le(e,Ke(n)??Cn,s),_=Ke(x)??Cn,[k,S]=c.useState(()=>({hex:_,hsv:En(_,{h:0,s:0,v:0})}));let M=k.hsv;k.hex!==_&&(M=En(_,k.hsv),S({hex:_,hsv:M}));const C=c.useRef({hex:_,hsv:M});C.current={hex:_,hsv:M};const A=ke(z=>{const $=ir(z);C.current={hex:$,hsv:z},S({hex:$,hsv:z}),j($)}),E=ke(z=>A(En(z,C.current.hsv))),N=ke(()=>r==null?void 0:r(C.current.hex)),y=c.useRef(null),[R,B]=c.useState(!1),D=c.useRef(null);c.useEffect(()=>()=>{var z;return(z=D.current)==null?void 0:z.call(D)},[]);const I=z=>{var K;const $=y.current;if(z.button||w||!$)return;(K=D.current)==null||K.call(D),$.focus({preventScroll:!0}),B(!0);const Y=(ee,ie)=>{const U=$.getBoundingClientRect(),H=ye((ee-U.left)/(U.width||1),0,1),re=1-ye((ie-U.top)/(U.height||1),0,1);A({h:C.current.hsv.h,s:H,v:re})};Y(z.clientX,z.clientY),D.current=es($,z,ee=>Y(ee.clientX,ee.clientY),()=>{D.current=null,B(!1),N()})},O=z=>{if(w||z.altKey||z.ctrlKey||z.metaKey)return;const{h:$,s:Y,v:K}=C.current.hsv,ee=z.shiftKey?10:1,ie=(H,re)=>ye(Math.round(H*100+re)/100,0,1);let U;switch(z.key){case"ArrowLeft":U={h:$,s:ie(Y,-ee),v:K};break;case"ArrowRight":U={h:$,s:ie(Y,ee),v:K};break;case"ArrowUp":U={h:$,s:Y,v:ie(K,ee)};break;case"ArrowDown":U={h:$,s:Y,v:ie(K,-ee)};break;case"PageUp":U={h:$,s:Y,v:ie(K,10)};break;case"PageDown":U={h:$,s:Y,v:ie(K,-10)};break;case"Home":U={h:$,s:0,v:K};break;case"End":U={h:$,s:1,v:K};break;default:return}z.preventDefault(),A(U),N()},T=c.useRef(null),F=ke(z=>{z!==Math.round(C.current.hsv.h)&&A({...C.current.hsv,h:z})});c.useEffect(()=>{const z=T.current;if(!z)return;const $=()=>{F(Number(z.value)),N()};return z.addEventListener("change",$),()=>z.removeEventListener("change",$)},[F,N]);const[q,G]=c.useState(null),V=()=>{if(q===null)return;G(null);const z=Ke(q);!z||z===C.current.hex||(E(z),N())},J=c.useSyncExternalStore(Qo,ei,ti),X=async()=>{const z=window.EyeDropper;if(z)try{const{sRGBHex:$}=await new z().open(),Y=Ke($);if(!Y)return;E(Y),N()}catch{}},P=o==null?void 0:o.map(z=>{const $=Ke(z)??z;return{value:$,color:z,label:$}});return a.jsxs("div",{ref:b,id:v.id,role:"group",className:L("ok-color-picker",l),style:{"--h":M.h,"--c":_,...d},"aria-label":f??(v.labelledBy?void 0:g.colorPicker.label),"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":w||void 0,"data-disabled":w?"":void 0,...m,children:[a.jsx("div",{ref:y,role:"slider",tabIndex:w?-1:0,className:"ok-color-picker__area ok-focusable",style:{"--s":M.s,"--v":M.v},"aria-label":g.colorPicker.area,"aria-roledescription":g.colorPicker.areaRole,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":An(M.s),"aria-valuetext":g.colorPicker.areaValue(An(M.s),An(M.v)),"aria-disabled":w||void 0,"data-active":R?"":void 0,onPointerDown:I,onKeyDown:O,children:a.jsx("span",{className:"ok-color-picker__thumb"})}),a.jsx("input",{ref:T,type:"range",className:"ok-color-picker__hue ok-focusable",min:0,max:360,step:1,value:Math.round(M.h),"aria-label":g.colorPicker.hue,"aria-valuetext":`${Math.round(M.h)}°`,disabled:w,onChange:z=>F(Number(z.target.value))}),a.jsxs(Le.Provider,{value:null,children:[a.jsxs("div",{className:"ok-color-picker__row",children:[a.jsx(ts,{size:"sm",className:"ok-color-picker__hex","aria-label":g.colorPicker.hex,prefix:a.jsx("span",{className:"ok-color-picker__chip"}),value:q??_,onChange:G,onBlur:V,onKeyDown:z=>{z.key==="Enter"?(z.preventDefault(),V()):z.key==="Escape"&&q!==null&&G(null)},spellCheck:!1,autoComplete:"off",autoCapitalize:"off",disabled:w}),J&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":g.colorPicker.eyedropper,title:g.colorPicker.eyedropper,disabled:w,onClick:X,children:a.jsx(pe,{children:a.jsx("path",{d:"M13.6 3.4a2 2 0 0 1 2.9 2.9l-1.7 1.7.9.9-1.4 1.4-4.2-4.2 1.4-1.4.9.9zM10.6 7.4l-6 6a1.5 1.5 0 0 0-.4.8l-.4 2.4 2.4-.4a1.5 1.5 0 0 0 .8-.4l6-6"})})})]}),P&&P.length>0&&a.jsx(Hr,{size:"sm",className:"ok-color-picker__swatches","aria-label":g.colorPicker.swatches,colors:P,value:P.some(z=>z.value===_)?_:null,onChange:z=>{const $=Ke(z);$&&(E($),N())},disabled:w})]})]})}),qr={Meta:"⌘",Control:"⌃",Alt:"⌥",Shift:"⇧",Space:"Space",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Enter:"↩",Backspace:"⌫",Tab:"⇥",Escape:"Esc"},ns=t=>qr[t]??t,ln=(t,e=qt["zh-CN"].keyNames)=>e[t]??t,si=c.forwardRef(function({k:e,size:n="md",className:s,children:r,...o},i){const l=he().messages.keyNames,d=e?ns(e):null;return a.jsx("kbd",{ref:i,className:L("ok-kbd",n!=="md"&&`ok-kbd--${n}`,s),"data-key":e,...o,children:d!==null&&d!==ln(e,l)?a.jsx("abbr",{title:ln(e,l),style:{textDecoration:"none"},children:d}):d??r})}),Vr=["Control","Alt","Shift","Meta"],Ls=t=>Vr.filter(e=>({Control:t.ctrlKey,Alt:t.altKey,Shift:t.shiftKey,Meta:t.metaKey})[e]);function ri({k:t,index:e}){const n=c.useRef(null);return c.useEffect(()=>{Ne(n.current,[{transform:"scale(.3) translateY(8px)",opacity:0},{transform:"none",opacity:1}],{spring:"bouncy",delay:e*45})},[]),a.jsx("kbd",{ref:n,className:"ok-kbd","data-key":t,children:ns(t)})}const ai=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,placeholder:r,recordingText:o,size:i="md",disabled:l,className:d,id:u,onClick:f,onKeyDown:p,onKeyUp:h,onBlur:m,onPointerDown:b,"aria-label":v,"aria-labelledby":g,"aria-describedby":w,...x},j){const _=we({id:u,disabled:l,"aria-describedby":w,"aria-labelledby":g,"aria-label":v},!1),{messages:k}=he(),S=r??k.hotkey.placeholder,M=o??k.hotkey.recording,[C,A]=le(e,n,P=>s==null?void 0:s(P,P.split("+").filter(Boolean))),E=C.split("+").filter(Boolean),[N,y]=c.useState(!1),[R,B]=c.useState([]),[D,I]=c.useState(!1),O=c.useRef(null),T=`ok-hotkey-${c.useId()}`,F=()=>{!N&&!_.disabled&&(y(!0),B([]))},q=()=>{y(!1),B([])},G=P=>{var K,ee;if(p==null||p(P),_.disabled)return;if(!N){(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),F());return}if(P.key==="Tab"){q();return}if(P.preventDefault(),P.stopPropagation(),(ee=(K=P.nativeEvent).stopImmediatePropagation)==null||ee.call(K),P.key==="Escape"){q();return}const z=Ls(P);if(Vr.includes(P.key)){B(z);return}const $=P.code||"";let Y=$.startsWith("Key")?$.slice(3):$.startsWith("Digit")?$.slice(5):$==="Space"?"Space":P.key;Y.length===1&&(Y=Y.toUpperCase()),q(),A([...z,Y].join("+"))},V=N?R:E,J=N?R.length?"…":M:E.length?"":S,X=N?k.hotkey.spokenRecording(M):E.length?k.hotkey.spokenCurrent(E.map(P=>ln(P,k.keyNames)).join(" + ")):k.hotkey.none;return a.jsxs("div",{ref:xe(j,O),id:_.id,role:"button",tabIndex:_.disabled?-1:0,className:L("ok-hotkey ok-focusable",i!=="md"&&`ok-hotkey--${i}`,d),"aria-label":v,"aria-labelledby":_.labelledBy,"aria-describedby":[_.describedBy,T].filter(Boolean).join(" "),"aria-disabled":_.disabled||void 0,"aria-pressed":N,"data-recording":N?"":void 0,"data-pointer":D?"":void 0,onPointerDown:P=>{b==null||b(P),I(!0)},onClick:P=>{f==null||f(P),P.defaultPrevented||F()},onKeyDown:G,onKeyUp:P=>{h==null||h(P),N&&B(Ls(P))},onBlur:P=>{m==null||m(P),I(!1),N&&q()},...x,children:[V.map((P,z)=>a.jsx(ri,{k:P,index:z},P)),J&&a.jsx("span",{className:"ok-hotkey__hint",children:J}),a.jsx(Kn,{id:T,"aria-live":"polite",children:X})]})}),Ds=2.9,oi=17.1,Os="M10 2.600l2.200 4.700 5.100.600-3.800 3.500 1 5-4.500-2.500-4.500 2.500 1-5-3.800-3.500 5.100-.600z",ii=c.forwardRef(function({value:e,defaultValue:n=0,onChange:s,max:r=5,allowClear:o=!0,readOnly:i,disabled:l,size:d="md",starLabel:u,name:f,className:p,id:h,onKeyDown:m,"aria-label":b,"aria-labelledby":v,"aria-describedby":g,...w},x){const j=we({id:h,disabled:l,"aria-describedby":g,"aria-labelledby":v,"aria-label":b},!1),{messages:_}=he(),k=u??_.rating.star,[S,M]=le(e,n,s),C=Array.from({length:r},(N,y)=>y+1),A=L("ok-rating",d!=="md"&&`ok-rating--${d}`,p),E=a.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:a.jsx("path",{d:Os})});return i?a.jsx("div",{ref:x,id:j.id,role:"img",className:A,"data-readonly":"","aria-label":v?void 0:b??_.rating.value(S,r),"aria-labelledby":v,"aria-describedby":j.describedBy,...w,children:C.map(N=>{const y=Math.min(1,Math.max(0,S-(N-1))),R=y>0&&y<1,B=100-(Ds+y*(oi-Ds))/20*100;return a.jsxs("span",{className:"ok-rating__star","data-on":y>=1?"":void 0,"data-partial":R?"":void 0,children:[E,R&&a.jsx("svg",{className:"ok-rating__fill",viewBox:"0 0 20 20","aria-hidden":"true",style:{"--ok-rating-cut":`${+B.toFixed(2)}%`},children:a.jsx("path",{d:Os})})]},N)})}):a.jsxs("div",{ref:x,id:j.id,role:"radiogroup",className:A,"aria-label":j.labelledBy?void 0:b??_.rating.label,"aria-labelledby":j.labelledBy,"aria-describedby":j.describedBy,"aria-disabled":j.disabled||void 0,onKeyDown:N=>{if(m==null||m(N),N.defaultPrevented||j.disabled)return;const y=pn(N,'[role="radio"]');y&&(y.focus(),M(Number(y.dataset.value)))},...w,children:[C.map(N=>a.jsx("button",{type:"button",role:"radio",className:"ok-rating__star ok-focusable","aria-checked":N===S,"aria-label":k(N),tabIndex:N===(S||1)?0:-1,disabled:j.disabled,"data-value":N,"data-on":N<=S?"":void 0,onClick:()=>M(o&&N===S?0:N),children:E},N)),f&&a.jsx("input",{type:"hidden",name:f,value:S})]})});function li(t,e){if(!e)return!0;const n=t.name.toLowerCase(),s=(t.type||"").toLowerCase();return e.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean).some(r=>r.startsWith(".")?n.endsWith(r):r.endsWith("/*")?s.startsWith(r.slice(0,-1)):s===r)}const ci=c.forwardRef(function({onChange:e,onReject:n,maxSize:s,title:r,hint:o,icon:i,invalid:l,accept:d,multiple:u,children:f,className:p,style:h,rootClassName:m,rootStyle:b,id:v,disabled:g,required:w,"aria-describedby":x,...j},_){const k=we({id:v,disabled:g,required:w,invalid:l,"aria-describedby":x}),{messages:S}=he(),M=r===void 0?S.fileDrop.title:r,[C,A]=c.useState(!1),[E,N]=c.useState(""),y=c.useRef(null),R=c.useRef(0),B=O=>{var G;let T=Array.from(O??[]);if(!T.length)return;const F=T.filter(V=>li(V,d)&&(s==null||V.size<=s)),q=T.filter(V=>!F.includes(V));T=u?F:F.slice(0,1),q.length&&(n==null||n(q)),T.length&&(e==null||e(T)),N(S.fileDrop.status(T.length,((G=T[0])==null?void 0:G.name)??"",q.length))},D=O=>{var T;return Array.from(((T=O.dataTransfer)==null?void 0:T.types)??[]).includes("Files")},I={onDragEnter:O=>{k.disabled||!D(O)||(O.preventDefault(),R.current++,A(!0))},onDragOver:O=>{k.disabled||!D(O)||O.preventDefault()},onDragLeave:()=>{R.current=Math.max(0,R.current-1),R.current||A(!1)},onDrop:O=>{R.current=0,A(!1),!(k.disabled||!D(O))&&(O.preventDefault(),B(O.dataTransfer.files))}};return a.jsxs("label",{className:L("ok-filedrop",m,p),style:{...b,...h},"data-dragging":C?"":void 0,"data-invalid":k.invalid?"":void 0,"data-disabled":k.disabled?"":void 0,...I,children:[a.jsx("input",{...j,ref:xe(_,y),id:k.id,className:"ok-filedrop__input",type:"file",accept:d,multiple:u,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:O=>{B(O.target.files),O.target.value=""}}),a.jsxs("span",{className:"ok-filedrop__body",children:[i??a.jsx(pe,{name:"upload",className:"ok-filedrop__icon"}),a.jsx("span",{className:"ok-filedrop__title",children:M}),o!=null&&a.jsx("span",{className:"ok-filedrop__hint",children:o}),f,a.jsx("span",{className:"ok-filedrop__status","aria-live":"polite",children:E})]})]})}),di=1e3,ui='button, a[href], [role="button"], [role="menuitem"], [role="option"], [role="tab"], summary, label, input, select, textarea, [tabindex]';function fi(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement?!0:t instanceof HTMLInputElement?!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(t.type):t instanceof HTMLElement&&t.isContentEditable}function Wr({pointer:t,active:e,now:n,viewport:s}){const r={x:s.width/2,y:s.height/2},o=e==null?void 0:e.ownerDocument,i=!e||e===(o==null?void 0:o.body)||e===(o==null?void 0:o.documentElement);if(t&&t.target&&n-t.time<=di){const l=t.target;if(!i&&(e===l||e.contains(l)))return{x:t.x,y:t.y};if(i&&l.closest(ui))return{x:t.x,y:t.y}}if(!i&&!fi(e)){const l=e.getBoundingClientRect();if(l.width>0&&l.height>0&&l.right>0&&l.bottom>0&&l.left<s.width&&l.top<s.height)return{x:l.left+l.width/2,y:l.top+l.height/2}}return r}let Gr=null,Bs=!1;function Ur(){Bs||!Ae||(Bs=!0,document.addEventListener("pointerdown",t=>{Gr={x:t.clientX,y:t.clientY,time:performance.now(),target:t.target instanceof Element?t.target:null}},!0))}function hi(t="trigger"){if(typeof t=="object")return t;const e={width:window.innerWidth,height:window.innerHeight};return t==="center"?{x:e.width/2,y:e.height/2}:Wr({pointer:Gr,active:document.activeElement,now:performance.now(),viewport:e})}function mn(t,e){return t==="sm"||t==="md"||t==="lg"?e[t]:t}const Yr=c.createContext(null);function Xr(){return c.useContext(Yr)}function pi({active:t,layerRef:e}){return er(t,e),null}const mi=t=>typeof t=="number"?t+"px":t;function bi(t,e){for(let n=t;n&&n!==e;n=n.parentElement)if(n.scrollWidth>n.clientWidth+1){const s=getComputedStyle(n).overflowX;if(s==="auto"||s==="scroll")return!0}return!1}const vi='button, a[href], input, select, textarea, label, [role="button"], [contenteditable="true"], [data-ok-no-drag]',gi=.5,ot=c.forwardRef(function({open:e,onOpenChange:n,placement:s="center",modal:r=!0,autoFocus:o=!1,dismissible:i=!0,size:l,gap:d,stretch:u=!0,align:f,role:p="dialog",initialFocus:h,restoreFocus:m=!0,container:b,contained:v,dragToDismiss:g=!1,swipeToDismiss:w=!0,closeButton:x="auto",closeLabel:j,origin:_,onExited:k,className:S,style:M,children:C,"aria-label":A,"aria-labelledby":E,"aria-describedby":N,onPointerDown:y,onFocus:R,onBlur:B,...D},I){const O=he().messages.common.close,T=j??O,{mounted:F,state:q,ref:G}=Ut(e,Zs.out*2),V=c.useRef(null),J=c.useRef(null),X=c.useRef(null),P=c.useId(),z=P+"title",$=P+"desc",[Y,K]=c.useState(!1),[ee,ie]=c.useState(!1),[U,H]=c.useState(!1),re=c.useRef(null),de=_!==void 0||s==="center",[ne,oe]=c.useState(null);c.useEffect(()=>{Ur()},[]),ve(()=>{e&&de&&oe(hi(_??"trigger"))},[e]);const Q=c.useRef(null),Z=te=>{if(!te||!de||!ne||Q.current&&Q.current.node===te&&Q.current.point===ne)return;Q.current={node:te,point:ne};const me=te.offsetParent;if(!me)return;const fe=me.getBoundingClientRect();te.style.setProperty("--_ox",`${ne.x-fe.left-te.offsetLeft}px`),te.style.setProperty("--_oy",`${ne.y-fe.top-te.offsetTop}px`)},W=ke(()=>{n==null||n(!1)}),ce=ke(()=>{k==null||k()});Qs(F&&r&&!v),Yt(e&&i&&(r||U),W);const ue=c.useRef(F);c.useEffect(()=>{ue.current&&!F&&(H(!1),ce()),ue.current=F},[F,ce]),c.useEffect(()=>{if(e||r||!m)return;const te=V.current;te&&te.contains(document.activeElement)&&Yn(re.current)},[e,r,m]);const je=g&&i&&s!=="center",De=un("(max-width: 519.98px)"),Ie=w&&i&&De&&(s==="left"||s==="right")&&!v,[_e,Ce]=c.useState(!1),ge=i&&!_e&&(x===!0||x==="auto"&&De&&s!=="center"&&!v),tt=c.useMemo(()=>({titleId:z,descriptionId:$,setTitled:K,setDescribed:ie,close:W,dismissible:i,modal:r,placement:s,draggable:je,setHeaderClose:Ce}),[z,$,W,i,r,s,je]);if(!F)return null;const nt=te=>{R==null||R(te);const me=V.current,fe=te.relatedTarget;!U&&fe&&me&&!me.contains(fe)&&(re.current=Un(fe)),H(!0)},Ue=te=>{var fe;B==null||B(te);const me=te.relatedTarget;(!me||!((fe=V.current)!=null&&fe.contains(me)))&&H(!1)},lt=te=>{var ws;y==null||y(te);const me=V.current;if(!je&&!Ie||!me||te.defaultPrevented||q!=="open"||te.pointerType==="mouse"&&te.button!==0)return;const fe=te.target,ae=(ws=fe.closest)==null?void 0:ws.call(fe,"[data-ok-drag-handle]");if(!me.contains(fe)||fe.closest(vi))return;const be=je&&!!ae&&me.contains(ae),Re=!be&&Ie&&te.pointerType!=="mouse"&&!bi(fe,me);if(!be&&!Re)return;const rt=te.clientX,Ye=te.clientY,ct=s==="left"||s==="right",At=s==="bottom"||s==="right"?1:-1,ps=te.pointerId,Ea=ct?te.clientX:te.clientY,ms=me.getBoundingClientRect(),wn=ct?ms.width:ms.height,He=X.current;let _n=!1,dt=0,jn=0,Nn=te.timeStamp,bs=0;const vs=Ee=>{if(Ee.pointerId!==ps)return;const ut=((ct?Ee.clientX:Ee.clientY)-Ea)*At;if(!_n){if(Re){const Tt=Math.abs(Ee.clientX-rt),_s=Math.abs(Ee.clientY-Ye);if(Tt<8&&_s<8)return;if(_s>Tt||ut<=0){gs();return}}if(Math.abs(ut)<4)return;_n=!0,me.style.transition="none",me.setAttribute("data-dragging",""),He&&(He.style.transition="none")}dt=ut>=0?ut:Math.max(ut*.15,-8);const Kt=Ee.timeStamp-Nn;Kt>0&&(jn=(dt-bs)/Kt,Nn=Ee.timeStamp,bs=dt);const Jt=dt*At;me.style.transform=ct?`translateX(${Jt}px)`:`translateY(${Jt}px)`,He&&(He.style.opacity=String(1-ye(dt/(wn||320),0,1)*.7))},gs=()=>{document.removeEventListener("pointermove",vs),document.removeEventListener("pointerup",ks),document.removeEventListener("pointercancel",ys)},xs=(Ee,ut)=>{if(Ee.pointerId!==ps||(gs(),!_n))return;Ee.timeStamp-Nn>120&&(jn=0);const Kt=wn>0?Math.min(wn*.4,160):160,Jt=!ut&&(dt>Kt||jn>gi&&dt>12);me.style.transition="",me.style.transform="",me.removeAttribute("data-dragging"),He&&(He.style.transition=""),Jt?(W(),requestAnimationFrame(()=>{var Tt;He&&((Tt=J.current)==null?void 0:Tt.getAttribute("data-state"))==="open"&&(He.style.opacity="")})):He&&(He.style.opacity="")},ks=Ee=>xs(Ee,!1),ys=Ee=>xs(Ee,!0);document.addEventListener("pointermove",vs),document.addEventListener("pointerup",ks),document.addEventListener("pointercancel",ys)},st=l==="auto",se={"--ok-float-size":st?void 0:mi(l),"--ok-float-gap":d!=null?d+"px":void 0};return a.jsx(vt,{container:b,children:a.jsxs("div",{ref:J,className:L("ok-float",v&&"ok-float--contained",r&&"ok-float--modal"),"data-ok-layer":"","data-state":q,"data-placement":s,"data-stretch":u?"":void 0,"data-align":f,"data-size":st?"auto":void 0,"data-zoom":de?"":void 0,style:se,children:[r&&a.jsx("div",{ref:X,className:"ok-float__scrim","aria-hidden":"true",onClick:i?W:void 0}),a.jsx(nr,{scopeRef:V,trap:r,autoFocus:r||o,restoreFocus:m&&r,initialFocus:h,children:a.jsxs("div",{...D,ref:xe(I,V,G,Z),className:L("ok-float__card",S),style:M,role:p,"aria-modal":r&&(p==="dialog"||p==="alertdialog")?!0:void 0,"aria-label":A,"aria-labelledby":E??(Y&&!A?z:void 0),"aria-describedby":N??(ee?$:void 0),"data-draggable":je?"":void 0,"data-swipe":Ie?"":void 0,tabIndex:-1,onPointerDown:lt,onFocus:nt,onBlur:Ue,children:[a.jsx(Yr.Provider,{value:tt,children:C}),ge&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close ok-float__close--auto","aria-label":T,onClick:W,children:a.jsx(pe,{name:"x"})})]})}),r&&!v&&a.jsx(pi,{active:e,layerRef:J})]})})}),Kr=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{ref:s,className:L("ok-float__grip",e),"aria-hidden":"true","data-ok-drag-handle":"",...n,children:a.jsx("span",{})})}),xi=c.forwardRef(function({title:e,description:n,icon:s,level:r=2,closable:o,closeLabel:i,onClose:l,className:d,children:u,...f},p){const h=he().messages.common.close,m=i??h,b=Xr(),v=c.useId(),g=(b==null?void 0:b.titleId)??v+"title",w=(b==null?void 0:b.descriptionId)??v+"desc",x=e!=null&&e!==!1,j=n!=null&&n!==!1,_=b==null?void 0:b.setTitled,k=b==null?void 0:b.setDescribed;ve(()=>{if(!(!x||!_))return _(!0),()=>_(!1)},[x,_]),ve(()=>{if(!(!j||!k))return k(!0),()=>k(!1)},[j,k]);const S="h"+r,M=o??(b==null?void 0:b.dismissible)??!0,C=b==null?void 0:b.setHeaderClose;return ve(()=>{if(!(!M||!C))return C(!0),()=>C(!1)},[M,C]),a.jsxs("div",{ref:p,className:L("ok-float__header",d),"data-ok-drag-handle":b!=null&&b.draggable?"":void 0,...f,children:[s!=null&&s!==!1&&a.jsx("span",{className:"ok-float__icon",children:s}),a.jsxs("div",{className:"ok-float__heading",children:[x&&a.jsx(S,{id:g,className:"ok-float__title",children:e}),j&&a.jsx("p",{id:w,className:"ok-float__desc",children:n})]}),u,M&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close","aria-label":m,onClick:l??(b==null?void 0:b.close),children:a.jsx(pe,{name:"x"})})]})}),ki=c.forwardRef(function({padded:e=!0,className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-float__body ok-scroll",!e&&"ok-float__body--flush",n),...s})}),yi=c.forwardRef(function({align:e="end",className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-float__footer",n),"data-align":e,...s})}),wi={sm:320,md:400,lg:560},Jr=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,size:r="md",icon:o,tone:i="accent",title:l,description:d,actions:u,align:f="start",role:p="dialog",closable:h=!1,closeLabel:m,dismissible:b=!0,as:v="div",onSubmit:g,origin:w,className:x,children:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":S,...M},C){const A=he().messages.common.close,E=m??A,[N,y]=le(e,n,s),R=c.useId(),B=l!=null&&l!==!1,D=d!=null&&d!==!1,I=o!=null&&o!==!1,O=a.jsxs(a.Fragment,{children:[(B||I||h)&&a.jsxs("div",{className:"ok-dialog__head",children:[I&&a.jsx("div",{className:L("ok-dialog__icon",i!=="accent"&&"ok-dialog__icon--"+i),children:o}),B&&a.jsx("h2",{id:R+"title",className:"ok-dialog__title",children:l}),h&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-dialog__close","aria-label":E,onClick:()=>y(!1),children:a.jsx(pe,{name:"x"})})]}),D&&a.jsx("p",{id:R+"desc",className:"ok-dialog__desc",children:d}),j!=null&&j!==!1&&a.jsx("div",{className:"ok-dialog__body ok-scroll",children:j}),u!=null&&u!==!1&&a.jsx("div",{className:"ok-dialog__actions",children:u})]});return a.jsx(ot,{...M,ref:C,open:N,onOpenChange:y,placement:"center",origin:w,size:mn(r,wi),role:p,dismissible:b,className:L("ok-dialog__panel ok-scroll",f==="center"&&"ok-dialog__panel--center",x),"aria-label":_,"aria-labelledby":k??(B&&!_?R+"title":void 0),"aria-describedby":S??(D?R+"desc":void 0),children:v==="form"?a.jsx("form",{className:"ok-dialog__form",onSubmit:T=>{T.preventDefault(),T.stopPropagation(),g==null||g(T)},children:O}):O})});let at=[],Zr=0,_i=0;const Hn=new Set,Nt=[];let Fs=!1;const Vt=()=>{Zr++,Hn.forEach(t=>t())},ji=t=>(Hn.add(t),()=>{Hn.delete(t)}),zs=()=>Zr,Ni=()=>{var t;return(t=Nt.find(e=>!e.auto)??Nt[0])==null?void 0:t.id};function Tn(t,e){const n=at.find(s=>s.id===t);!n||!n.open||(n.resolve(e),at=at.map(s=>s.id===t?{...s,open:!1}:s),Vt())}function Mi(t){at=at.filter(e=>e.id!==t),Vt()}function Ri(t){if(!Ae)return Promise.resolve(!1);const e=typeof t=="string"?{title:t}:t;return Ur(),new Promise(n=>{if(at=[...at,{id:++_i,options:e,open:!0,resolve:n}],!Nt.some(s=>!s.auto)&&!Fs){Fs=!0;const s=document.createElement("div");s.setAttribute("data-ok-confirmer",""),document.body.appendChild(s),Aa.createRoot(s).render(a.jsx(Qr,{auto:!0}))}Vt()})}function Qr({auto:t=!1}){const e=c.useRef();e.current||(e.current=Symbol("confirmer")),c.useSyncExternalStore(ji,zs,zs);const{messages:n}=he();return c.useEffect(()=>{const s={id:e.current,auto:t};return Nt.push(s),Vt(),()=>{const r=Nt.indexOf(s);r>=0&&Nt.splice(r,1),Vt()}},[t]),Ni()!==e.current?null:a.jsx(a.Fragment,{children:at.map(s=>{const r=s.options,o=r.tone==="danger";return a.jsx(Jr,{role:"alertdialog",open:s.open,onOpenChange:i=>{i||Tn(s.id,!1)},onExited:()=>Mi(s.id),title:r.title,description:r.description,icon:r.icon,tone:r.tone,size:r.size,align:r.align??(r.icon==null?"center":"start"),dismissible:r.dismissible??!0,origin:r.origin,actions:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable","data-autofocus":o?"":void 0,onClick:()=>Tn(s.id,!1),children:r.cancelText??n.confirm.cancel}),a.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable "+(o?"ok-btn--danger":"ok-btn--primary"),"data-autofocus":o?void 0:"",onClick:()=>Tn(s.id,!0),children:r.confirmText??n.confirm.confirm})]})},s.id)})})}const Si={sm:280,md:360,lg:480},Ci={sm:240,md:360,lg:520},Ei=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,placement:r="right",size:o="md",modal:i=!0,className:l,...d},u){const[f,p]=le(e,n,s),h=r==="left"||r==="right";return a.jsx(ot,{...d,ref:u,open:f,onOpenChange:p,placement:r,modal:i,size:mn(o,h?Si:Ci),className:L("ok-drawer",l)})}),Hs={auto:void 0,sm:"40%",md:"60%",lg:"85%",full:"100%"},Ai=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,size:r="auto",grip:o=!0,dragToDismiss:i=!0,stretch:l=!1,modal:d=!0,className:u,children:f,...p},h){const[m,b]=le(e,n,s),v=typeof r=="string"&&r in Hs?Hs[r]:r;return a.jsxs(ot,{...p,ref:h,open:m,onOpenChange:b,placement:"bottom",modal:d,stretch:l,size:v,dragToDismiss:i,className:L("ok-sheet",u),children:[o&&a.jsx(Kr,{}),f]})}),Ti={sm:280,md:320,lg:400},$i={sm:200,md:280,lg:400},ea=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,placement:r="right",size:o="md",role:i="complementary",className:l,...d},u){const[f,p]=le(e,n,s),h=r==="left"||r==="right";return a.jsx(ot,{...d,ref:u,open:f,onOpenChange:p,placement:r,modal:!1,role:i,size:mn(o,h?Ti:$i),className:L("ok-panel-float",l)})}),Pi=ea;let Pe=[],Ii=0;const qn=new Set,ss=()=>qn.forEach(t=>t());function yt(t,e){const n=typeof t=="string"?{title:t}:t,s=e?{...n,tone:e}:n,r=s.id??"ok-toast-"+ ++Ii;return Pe=Pe.some(i=>i.id===r&&!i.leaving)?Pe.map(i=>i.id===r&&!i.leaving?{...s,id:r,leaving:!1,createdAt:i.createdAt,rev:i.rev+1,closable:s.closable??i.closable,live:s.live??i.live,onDismiss:s.onDismiss??i.onDismiss}:i):[{...s,id:r,leaving:!1,createdAt:Date.now(),rev:0},...Pe],ss(),r}function ft(t){let e=!1;Pe=Pe.map(n=>n.leaving||t!=null&&n.id!==t?n:(e=!0,{...n,leaving:!0})),e&&ss()}function Li(t){var n;const e=Pe.find(s=>s.id===t);e&&(Pe=Pe.filter(s=>s.id!==t),ss(),(n=e.onDismiss)==null||n.call(e))}const Di=Object.assign(t=>yt(t),{success:t=>yt(t,"success"),warning:t=>yt(t,"warning"),danger:t=>yt(t,"danger"),error:t=>yt(t,"danger"),info:t=>yt(t,"info"),dismiss:ft}),Oi={success:a.jsx("path",{pathLength:1,d:"M5 10.5l3.2 3.2L15 6.5"}),danger:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M6 6l8 8"}),a.jsx("path",{pathLength:1,d:"M14 6l-8 8"})]}),warning:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M10 5v6"}),a.jsx("path",{pathLength:1,d:"M10 14.5v.1"})]}),info:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M10 9v5.5"}),a.jsx("path",{pathLength:1,d:"M10 5.8v.1"})]}),default:a.jsx("path",{pathLength:1,d:"M4 4.5c0 6.500 4.500 11 9 11 2.800 0 4.500-2 4.500-4.200S15.700 7.500 13.500 7.500c-2 0-3.400 1.400-3.600 3.200"})};function Bi({record:t,position:e,defaultDuration:n,pauseOnHover:s,closeLabel:r,register:o}){const i=c.useRef(null),[l,d]=c.useState(!1),u=c.useRef(!1),f=c.useRef(!1),p=t.duration??n,h=c.useRef(p),{id:m,leaving:b}=t,v=e.startsWith("top");ve(()=>{Ne(i.current,[{opacity:0,transform:`translateY(${v?-32:32}px) scale(.84)`},{opacity:1,transform:"none"}],{spring:"bouncy"})},[]),c.useEffect(()=>{h.current=p},[p,t.rev]),c.useEffect(()=>{if(b||l||p<=0)return;const S=Date.now(),M=setTimeout(()=>ft(m),h.current);return()=>{clearTimeout(M),h.current=Math.max(800,h.current-(Date.now()-S))}},[b,l,p,m,t.rev]),c.useEffect(()=>{if(!b)return;const S=e.endsWith("right")?56:e.endsWith("left")?-56:0,M=S?0:v?-24:24,C=Ne(i.current,[{opacity:1,transform:"none"},{opacity:0,transform:`translate(${S}px, ${M}px) scale(.92)`}],{duration:170,easing:ze.in,fill:"forwards"});let A=!1;const E=()=>{A||(A=!0,Li(m))};C!=null&&C.finished&&C.finished.then(E,E);const N=setTimeout(E,170*Ge()+80);return()=>clearTimeout(N)},[b,m]);const g=()=>d(u.current||f.current),w=t.tone&&t.tone!=="neutral"&&t.tone!=="accent"?t.tone:"default",x=t.live??(t.tone==="danger"?"assertive":"polite"),j=t.closable??p<=0,_=t.action,k=t.description!=null&&t.description!==!1;return a.jsxs("div",{ref:xe(i,S=>o(m,S)),className:L("ok-toast","ok-toast--"+w),role:x==="assertive"?"alert":"status","aria-live":x,"aria-atomic":"true","data-leaving":b?"":void 0,onClick:()=>ft(m),onKeyDown:S=>{S.key==="Escape"&&(S.stopPropagation(),ft(m))},onPointerEnter:s?()=>{u.current=!0,g()}:void 0,onPointerLeave:s?()=>{u.current=!1,g()}:void 0,onFocus:()=>{f.current=!0,g()},onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||(f.current=!1,g())},children:[t.icon!==!1&&a.jsx("span",{className:"ok-toast__icon","aria-hidden":"true",children:t.icon??a.jsx("svg",{className:"ok-toast__glyph",viewBox:"0 0 20 20",children:Oi[w]})}),a.jsxs("div",{className:"ok-toast__body",children:[a.jsx("div",{className:"ok-toast__title",children:t.title}),k&&a.jsx("div",{className:"ok-toast__desc",children:t.description})]}),_&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-focusable ok-toast__action",onClick:S=>{var M;S.stopPropagation(),(M=_.onClick)==null||M.call(_),_.dismiss!==!1&&ft(m)},children:_.label}),j&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-toast__close","aria-label":r,onClick:S=>{S.stopPropagation(),ft(m)},children:a.jsx(pe,{name:"x"})})]})}const Fi=c.forwardRef(function({position:e,mobilePosition:n,max:s=4,duration:r=4200,pauseOnHover:o=!0,offset:i,label:l,closeLabel:d,container:u,className:f,style:p,...h},m){const{messages:b}=he(),v=l??b.toast.label,g=d??b.common.close,w=ht("sm"),x=ht("md"),j=ht("lg"),_=ht("xl");let k;if(typeof e=="object"&&e!==null){const y=e;k=(_?y.xl:void 0)??(j?y.lg:void 0)??(x?y.md:void 0)??(w?y.sm:void 0)??y.base??(w?"top-right":"bottom-center")}else k=(w?e:n??e)??(w?"top-right":"bottom-center");const[S,M]=c.useState(()=>Pe),C=c.useRef(new Map),A=c.useRef(null),E=ke((y,R)=>{R?C.current.set(y,R):C.current.delete(y)});c.useEffect(()=>{const y=()=>{const R=new Map;C.current.forEach(B=>R.set(B,B.getBoundingClientRect())),A.current=R,M(Pe)};return qn.add(y),Pe.length&&M(Pe),()=>{qn.delete(y)}},[]),ve(()=>{A.current&&(dn(A.current),A.current=null)},[S]),c.useEffect(()=>{const y=S.filter(R=>!R.leaving);s>0&&y.length>s&&y.slice(s).forEach(R=>ft(R.id))},[S,s]);const N=i!=null?{...p,"--ok-toast-offset":i+"px"}:p;return a.jsx(vt,{container:u,children:a.jsx("div",{ref:m,className:L("ok-toasts",f),role:"region","aria-label":v,"data-position":k,"data-ok-layer":"",style:N,...h,children:S.map(y=>a.jsx(Bi,{record:y,position:k,defaultDuration:r,pauseOnHover:o,closeLabel:g,register:E},y.id))})})});function bn(t,e,n){const s=t.props,r={...e};for(const i in e){const l=e[i],d=s[i];/^on[A-Z]/.test(i)&&typeof d=="function"&&typeof l=="function"?r[i]=Gt(d,l):i==="className"?r[i]=L(d,l):i==="style"?r[i]={...l,...d}:l===void 0&&d!==void 0&&(r[i]=d)}const o=parseInt(c.version,10)>=19?s.ref:t.ref;return n&&(r.ref=o?xe(o,n):n),c.cloneElement(t,r)}function rs(t){return t==null||t===!1?null:typeof t=="string"&&t in Xn?a.jsx(pe,{name:t}):c.isValidElement(t)?t:null}function as(){return a.jsx("svg",{className:"ok-menu__check",viewBox:"0 0 16 16","aria-hidden":"true",children:a.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.900-6.400",pathLength:1})})}function os(){const t=c.useRef(null),e=c.useRef(!1),n=c.useCallback(s=>{const r=t.current,o=r==null?void 0:r.parentElement;if(!r||!o)return;if(!s||s.getAttribute("aria-disabled")==="true"){e.current=!1,o.removeAttribute("data-hl");return}const i=!e.current;i&&(r.style.transition="none"),r.dataset.tone=s.dataset.tone||"",r.style.setProperty("--y",s.offsetTop+"px"),r.style.height=s.offsetHeight+"px",i&&(r.offsetWidth,r.style.transition=""),e.current=!0,o.setAttribute("data-hl","")},[]);return{hlRef:t,moveTo:n}}function is(t,e){const n=c.useRef(t);return ve(()=>{e||(n.current=t)}),e?n.current:t}function zi(t,e,n,s){const r=(f,p,h)=>(f.x-h.x)*(p.y-h.y)-(p.x-h.x)*(f.y-h.y),o=r(t,e,n),i=r(t,n,s),l=r(t,s,e),d=o<0||i<0||l<0,u=o>0||i>0||l>0;return!(d&&u)}function Hi(t,e,n){if(t.x===e.x&&t.y===e.y)return!1;const s=n.left>=t.x,r=s?n.left:n.right;if(s?e.x>n.right:e.x<n.left)return!1;const o=4;return zi(e,t,{x:r,y:n.top-o},{x:r,y:n.bottom+o})}const ta=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;function na(){const t=c.useRef(""),e=c.useRef();c.useEffect(()=>()=>clearTimeout(e.current),[]);const n=c.useCallback((r,o,i)=>{clearTimeout(e.current),e.current=setTimeout(()=>{t.current=""},500),t.current+=r.toLowerCase();const l=t.current,d=l.length>1&&l.split("").every(h=>h===l[0]),u=d?l[0]:l,f=o.length,p=d||l.length===1?i+1:Math.max(i,0);for(let h=0;h<f;h++){const m=((p+h)%f+f)%f;if(o[m].trim().toLowerCase().startsWith(u))return m}return-1},[]),s=c.useCallback(()=>t.current.length>0,[]);return{search:n,pending:s}}const $n="\0none",qi=(t,e)=>{const n=[t.label,t.description,t.group,...t.keywords??[]].filter(Boolean).join(" ").toLowerCase();return e.toLowerCase().split(/\s+/).filter(Boolean).every(s=>n.includes(s))},Vi=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,items:r,query:o,defaultQuery:i="",onQueryChange:l,filter:d,onSelect:u,closeOnSelect:f=!0,placeholder:p,emptyText:h,label:m,width:b,footer:v,origin:g="trigger",className:w,style:x,...j},_){const{messages:k}=he(),S=p??k.commandPalette.placeholder,M=h===void 0?k.commandPalette.empty:h,C=m??k.commandPalette.label,[A,E]=le(e,n,s),[N,y]=le(o,i,l),[R,B]=c.useState(null),D=c.useRef(null),[I,O]=c.useState(null),{hlRef:T,moveTo:F}=os(),q=c.useId(),G=q+"list",V=U=>q+"opt-"+U,J=c.useMemo(()=>{const U=d===!1?null:d??qi,H=N.trim(),re=U&&H?r.filter(ne=>U(ne,H)):r,de=[];return re.forEach(ne=>{let oe=de.find(Q=>Q.label===ne.group);oe||(oe={label:ne.group,items:[]},de.push(oe)),oe.items.push(ne)}),de},[r,N,d]),X=c.useMemo(()=>J.flatMap(U=>U.items).filter(U=>!U.disabled),[J]),P=R===$n?null:X.find(U=>U.id===R)??X[0]??null,z=c.useRef(A);c.useEffect(()=>{A&&!z.current&&(y(""),B(null)),z.current=A},[A,y]),ve(()=>{I&&F(P?I.querySelector("[data-active]"):null)},[I,P,J,F]),ve(()=>{var U;!A||!P||!I||(P===X[0]?I.scrollTop=0:(U=I.querySelector("[data-active]"))==null||U.scrollIntoView({block:"nearest"}))},[A,P==null?void 0:P.id,I]);const $=U=>{var H;U.disabled||((H=U.onSelect)==null||H.call(U),u==null||u(U),f&&E(!1))},Y=U=>{if(!X.length)return;let H;U==="first"?H=0:U==="last"?H=X.length-1:P?H=(X.indexOf(P)+U+X.length)%X.length:H=U>0?0:X.length-1,B(X[H].id)},K=U=>{if(!X.length)return;const H=P?X.indexOf(P):U>0?-1:X.length;B(X[Math.min(X.length-1,Math.max(0,H+U))].id)},ee=U=>{if(!U.nativeEvent.isComposing)switch(U.key){case"ArrowDown":U.preventDefault(),Y(1);break;case"ArrowUp":U.preventDefault(),Y(-1);break;case"Home":X.length&&(U.preventDefault(),Y("first"));break;case"End":X.length&&(U.preventDefault(),Y("last"));break;case"PageDown":U.preventDefault(),K(5);break;case"PageUp":U.preventDefault(),K(-5);break;case"Enter":P&&(U.preventDefault(),$(P));break}},ie=b!=null?{...x,"--ok-cmdk-width":typeof b=="number"?b+"px":b}:x;return a.jsxs(ot,{"aria-label":C,...j,ref:_,open:A,onOpenChange:E,placement:"top",stretch:!1,origin:g,initialFocus:D,className:L("ok-cmdk",w),style:ie,children:[a.jsxs("div",{className:"ok-cmdk__search",children:[a.jsx(pe,{name:"search",className:"ok-cmdk__search-icon"}),a.jsx("input",{ref:D,className:"ok-cmdk__input",type:"text",role:"combobox","aria-label":C,"aria-expanded":"true","aria-controls":G,"aria-autocomplete":"list","aria-activedescendant":P?V(P.id):void 0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,enterKeyHint:"go",placeholder:S,value:N,onChange:U=>{y(U.target.value),B(null)},onKeyDown:ee}),a.jsx("kbd",{className:"ok-kbd ok-cmdk__esc","aria-hidden":"true",children:"Esc"})]}),a.jsxs("div",{ref:O,id:G,className:"ok-cmdk__list ok-scroll",role:"listbox","aria-label":C,hidden:J.length===0,onPointerLeave:()=>B($n),children:[a.jsx("span",{className:"ok-cmdk__hl",ref:T,"aria-hidden":"true"}),J.map((U,H)=>{const re=q+"group-"+H;return a.jsxs("div",{className:"ok-cmdk__group",role:"group","aria-labelledby":U.label?re:void 0,children:[U.label&&a.jsx("div",{id:re,className:"ok-cmdk__group-label",role:"presentation",children:U.label}),U.items.map(de=>{const ne=(P==null?void 0:P.id)===de.id;return a.jsxs("div",{id:V(de.id),className:"ok-cmdk__item",role:"option","aria-selected":ne,"aria-disabled":de.disabled||void 0,"data-active":ne?"":void 0,onMouseDown:oe=>oe.preventDefault(),onPointerMove:ne?void 0:()=>B(de.disabled?$n:de.id),onClick:()=>$(de),children:[de.icon!=null&&a.jsx("span",{className:"ok-cmdk__item-icon","aria-hidden":"true",children:de.icon}),a.jsxs("span",{className:"ok-cmdk__item-text",children:[a.jsx("span",{className:"ok-cmdk__item-label",children:de.label}),de.description&&a.jsx("span",{className:"ok-cmdk__item-desc",children:de.description})]}),de.shortcut&&de.shortcut.length>0&&a.jsx("span",{className:"ok-cmdk__item-keys","aria-hidden":"true",children:de.shortcut.map((oe,Q)=>a.jsx("kbd",{className:"ok-kbd",children:oe},Q))})]},de.id)})]},U.label??"\0"+H)})]}),a.jsx("div",{className:"ok-cmdk__empty",role:"status","aria-live":"polite","data-empty":X.length===0&&J.length===0?"":void 0,children:J.length===0?M:a.jsx("span",{className:"ok-sr",children:k.commandPalette.results(X.length)})}),v!=null&&v!==!1&&a.jsx("div",{className:"ok-cmdk__footer",children:v})]})}),qs={top:"bottom",bottom:"top",left:"right",right:"left"},Wi=96;function sa(t){const{anchor:e,floating:n,viewport:s,placement:r="bottom",offset:o=8,alignOffset:i=0,padding:l=8,flip:d=!0,shift:u=!0}=t,f=r.split("-");let p=f[0];const h=f[1]??"center",m=p==="top"||p==="bottom",b=Math.max(0,s.width-l*2),v=Math.max(0,s.height-l*2),g={top:e.top-o-l,bottom:s.height-e.bottom-o-l,left:e.left-o-l,right:s.width-e.right-o-l},w=m?n.height:n.width;d&&w>g[p]&&g[qs[p]]>g[p]&&(p=qs[p]);let x,j,_,k,S=b,M=v;return m?(M=Math.min(v,Math.max(g[p],Wi)),_=Math.min(n.width,b),k=Math.min(n.height,M),j=p==="bottom"?e.bottom+o:e.top-o-k,x=(h==="start"?e.left:h==="end"?e.right-_:e.left+e.width/2-_/2)+i):(_=Math.min(n.width,b),k=Math.min(n.height,v),x=p==="right"?e.right+o:e.left-o-_,j=(h==="start"?e.top:h==="end"?e.bottom-k:e.top+e.height/2-k/2)+i),u&&(x=ye(x,l,Math.max(l,s.width-l-_)),j=ye(j,l,Math.max(l,s.height-l-k))),{x:Math.round(x),y:Math.round(j),side:p,align:h,availableWidth:S,availableHeight:M}}function vn(t){const{open:e,anchorRef:n,floatingRef:s,placement:r="bottom",offset:o=8,alignOffset:i=0,padding:l=8,flip:d=!0,shift:u=!0,matchWidth:f=!1}=t,p=ke(t.onPosition),h=c.useRef(0),m=c.useCallback(()=>{const b=n.current,v=s.current;if(!b||!v)return;const g=b.getBoundingClientRect(),w=document.documentElement,x={width:w.clientWidth||window.innerWidth,height:window.innerHeight||w.clientHeight};f===!0?v.style.width=g.width+"px":f==="min"&&(v.style.minWidth=g.width+"px");const j=v.style.getPropertyValue("--ok-popup-avail-h")?[v,...Array.from(v.querySelectorAll(".ok-scroll"))].map(S=>[S,S.scrollTop]):[];v.style.setProperty("--ok-popup-avail-h","100000px"),v.style.setProperty("--ok-popup-avail-w",Math.max(0,x.width-l*2)+"px");const _={width:v.offsetWidth,height:v.offsetHeight},k=sa({anchor:g,floating:_,viewport:x,placement:r,offset:o,alignOffset:i,padding:l,flip:d,shift:u});v.style.setProperty("--ok-popup-avail-h",k.availableHeight+"px"),v.style.setProperty("--ok-popup-avail-w",k.availableWidth+"px"),v.style.left=k.x+"px",v.style.top=k.y+"px",v.dataset.side=k.side,v.dataset.align=k.align,j.forEach(([S,M])=>{S.scrollTop!==M&&(S.scrollTop=M)}),p({...k,anchor:g,width:Math.min(_.width,k.availableWidth),height:Math.min(_.height,k.availableHeight)})},[n,s,r,o,i,l,d,u,f,p]);return ve(()=>{e&&m()},[e,m]),c.useEffect(()=>{var w;if(!e)return;const b=()=>{h.current||(h.current=requestAnimationFrame(()=>{h.current=0,m()}))},v=x=>{const j=s.current;j&&x.target instanceof Node&&j.contains(x.target)||b()};window.addEventListener("scroll",v,{capture:!0,passive:!0}),window.addEventListener("resize",b),(w=window.visualViewport)==null||w.addEventListener("resize",b);let g;if(typeof ResizeObserver<"u"){g=new ResizeObserver(b);const x=n.current;x instanceof Element&&g.observe(x),s.current&&g.observe(s.current)}return()=>{var x;window.removeEventListener("scroll",v,{capture:!0}),window.removeEventListener("resize",b),(x=window.visualViewport)==null||x.removeEventListener("resize",b),g==null||g.disconnect(),h.current&&(cancelAnimationFrame(h.current),h.current=0)}},[e,m,n,s]),{update:m}}const Vs=c.createContext(null),ra=c.createContext(!0),ls=()=>c.useContext(ra),Et=c.forwardRef(function(e,n){const{open:s,container:r}=e,o=Ut(s,200);return o.mounted?a.jsx(vt,{container:r,children:a.jsx(Gi,{...e,ref:n,state:o.state,presenceRef:o.ref})}):null}),Gi=c.forwardRef(function({open:e,anchorRef:n,placement:s="bottom-start",offset:r=8,alignOffset:o=0,padding:i=8,flip:l=!0,shift:d=!0,matchWidth:u=!1,onDismiss:f,insideRefs:p,surface:h=!0,container:m,updateRef:b,onPosition:v,state:g,presenceRef:w,className:x,children:j,..._},k){const S=c.useRef(null),{update:M}=vn({open:!0,anchorRef:n,floatingRef:S,placement:s,offset:r,alignOffset:o,padding:i,flip:l,shift:d,matchWidth:u,onPosition:v});ve(()=>{if(b)return b.current=M,()=>{b.current=null}},[b,M]);const C=c.useContext(Vs),A=c.useRef(new Set),E=c.useMemo(()=>({register(R){A.current.add(R);const B=C==null?void 0:C.register(R);return()=>{A.current.delete(R),B==null||B()}}}),[C]);c.useEffect(()=>{const R=S.current;if(!(!R||!C))return C.register(R)},[C]);const N=ke(f),y=c.useRef(p);return y.current=p,c.useEffect(()=>{if(!e)return;const R=B=>{var O,T;const D=B.target;if(!D||(O=S.current)!=null&&O.contains(D))return;const I=n.current;if(!(I instanceof Element&&I.contains(D))&&!((T=y.current)!=null&&T.some(F=>{var q;return(q=F.current)==null?void 0:q.contains(D)}))){for(const F of A.current)if(F.contains(D))return;N("outside",B)}};return document.addEventListener("pointerdown",R,!0),()=>document.removeEventListener("pointerdown",R,!0)},[e,n,N]),Yt(e&&!!f,()=>N("escape",new Event("keydown"))),a.jsx(Vs.Provider,{value:E,children:a.jsx(ra.Provider,{value:e,children:a.jsx("div",{..._,ref:xe(k,S,w),className:L("ok-popup",h&&"ok-popup--surface",x),"data-state":g,"data-ok-layer":"",children:j})})})}),cs=c.forwardRef(function({trigger:e,children:n,open:s,defaultOpen:r=!1,onOpenChange:o,placement:i="bottom",offset:l=8,matchWidth:d=!1,anchorRef:u,initialFocus:f,autoFocus:p=!0,closeOnOutsidePress:h=!0,closeOnEscape:m=!0,id:b,className:v,role:g="dialog",onKeyDown:w,...x},j){const[_,k]=le(s,r,o),S=c.useRef(null),M=c.useId(),C=b??`${M}-popover`,A=(y=!0)=>{var R;y&&((R=S.current)==null||R.focus({preventScroll:!0})),k(!1)},E=bn(e,{"aria-haspopup":g==="dialog"?"dialog":"true","aria-expanded":_,"aria-controls":_?C:void 0,"data-state":_?"open":"closed",onClick:()=>_?A(!1):k(!0)},S),N=y=>{if(w==null||w(y),y.defaultPrevented||y.key!=="Tab")return;const R=y.currentTarget;if(!R.contains(y.target))return;const B=zt(R),D=document.activeElement,I=!B.length||D===B[B.length-1],O=!B.length||D===B[0]||D===R;(y.shiftKey?O:I)&&(y.shiftKey&&y.preventDefault(),A(!0))};return a.jsxs(a.Fragment,{children:[E,a.jsx(Et,{...x,ref:j,id:C,role:g,tabIndex:-1,open:_,anchorRef:u??S,insideRefs:[S],placement:i,offset:l,matchWidth:d,className:L("ok-popover",v),onKeyDown:N,onDismiss:y=>{y==="escape"?m&&A(!0):h&&A(!1)},children:a.jsx(Ui,{open:_,autoFocus:p,initialFocus:f,children:typeof n=="function"?n({close:()=>A(!0)}):n})})]})});function Ui({open:t,autoFocus:e,initialFocus:n,children:s}){const r=c.useRef(null);return c.useEffect(()=>{var l;if(!t||!e)return;const o=(l=r.current)==null?void 0:l.parentElement;if(!o||o.contains(document.activeElement))return;((n==null?void 0:n.current)??o.querySelector("[data-autofocus]")??zt(o)[0]??o).focus({preventScroll:!0})},[t]),a.jsx("div",{className:"ok-popover__body ok-scroll",ref:r,children:s})}const Te={current:null,hiddenAt:-1/0,lastPos:null},Yi=t=>{try{return t.matches(":focus-visible")}catch{return!0}};function Xi({content:t,shortcut:e,children:n,placement:s="top",offset:r=8,delay:o=380,skipDelayWithin:i=320,hideDelay:l=160,interactive:d=!0,disabled:u,open:f,defaultOpen:p=!1,onOpenChange:h,className:m}){const[b,v]=le(f,p,h),[g,w]=c.useState(!1),[x,j]=c.useState(!1),_=c.useId(),k=c.useRef(null),S=c.useRef(null),M=c.useRef(),C=c.useRef(),A=c.useRef(!1),E=c.useRef(!1),N=c.useRef(!1),y=Ut(b,250);let R=t,B=e;if(typeof t=="string"&&B==null&&t.includes("|")){const V=t.indexOf("|");R=t.slice(0,V),B=t.slice(V+1)}const D=()=>{clearTimeout(M.current),M.current=void 0,clearTimeout(C.current),C.current=void 0},I=ke((V=!1)=>{var J;D(),A.current=!1,N.current=!1,((J=Te.current)==null?void 0:J.id)===_&&(Te.current=null,Te.hiddenAt=performance.now()),j(V),w(!1),v(!1)}),O=ke(()=>{if(D(),u||b)return;const V=Te.current,J=!!V&&V.id!==_;J?V.hide(!0):Te.lastPos=null,Te.current={id:_,hide:I},j(!1),w(J),v(!0)}),T=()=>{if(clearTimeout(C.current),C.current=void 0,u||b||M.current)return;Te.current&&Te.current.id!==_||performance.now()-Te.hiddenAt<i||o<=0?O():M.current=setTimeout(O,o)},F=()=>{clearTimeout(M.current),M.current=void 0,!(!b||C.current)&&(C.current=setTimeout(()=>{C.current=void 0,!(A.current||E.current||N.current)&&I()},l))};c.useEffect(()=>()=>{var V;D(),((V=Te.current)==null?void 0:V.id)===_&&(Te.current=null)},[]),c.useEffect(()=>{u&&b&&I()},[u,b,I]),Yt(b,()=>I()),c.useEffect(()=>{if(!b)return;const V=P=>{var z;if((z=S.current)!=null&&z.contains(P.target)){N.current=!0;return}I()},J=()=>{N.current&&(N.current=!1,A.current||F())},X=()=>I();return document.addEventListener("pointerdown",V,!0),document.addEventListener("pointerup",J,!0),document.addEventListener("pointercancel",J,!0),window.addEventListener("scroll",X,{capture:!0,passive:!0}),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("pointerup",J,!0),document.removeEventListener("pointercancel",J,!0),window.removeEventListener("scroll",X,{capture:!0})}},[b,I]);const q=n.props["aria-describedby"],G=bn(n,{"aria-describedby":y.mounted?L(q,_):q,onPointerEnter:V=>{V.pointerType!=="touch"&&(E.current=!0,T())},onPointerLeave:()=>{E.current=!1,F()},onFocus:V=>{Yi(V.currentTarget)&&T()},onBlur:()=>{!A.current&&!N.current&&I()}},k);return a.jsxs(a.Fragment,{children:[G,y.mounted&&R!=null&&R!==""&&a.jsx(vt,{children:a.jsxs(Ki,{id:_,anchorRef:k,tipRef:S,presenceRef:y.ref,state:y.state,warm:g,instant:x,placement:s,offset:r,className:m,interactive:d,onPointerEnter:d?()=>{A.current=!0,clearTimeout(C.current),C.current=void 0}:void 0,onPointerLeave:d?()=>{A.current=!1,N.current||F()}:void 0,children:[R,B!=null&&B!==""&&a.jsx("kbd",{children:B})]})})]})}function Ki({id:t,anchorRef:e,tipRef:n,presenceRef:s,state:r,warm:o,instant:i,placement:l,offset:d,className:u,interactive:f,onPointerEnter:p,onPointerLeave:h,children:m}){const b=c.useRef(!0);return vn({open:!0,anchorRef:e,floatingRef:n,placement:l,offset:d,onPosition:g=>{const w=n.current;if(!w)return;w.style.setProperty("--bl",Math.max(0,g.x-g.anchor.left)+"px"),w.style.setProperty("--br",Math.max(0,g.anchor.right-(g.x+g.width))+"px");const x=Te.lastPos;b.current&&o&&x&&Ne(w,[{translate:`${x.x-g.x}px ${x.y-g.y}px`},{translate:"0 0"}],{spring:"snappy"}),b.current=!1,Te.lastPos={x:g.x,y:g.y}}}),a.jsx("div",{id:t,role:"tooltip",ref:g=>{n.current=g,s.current=g},className:L("ok-tip",u),"data-state":r,"data-warm":o||void 0,"data-instant":i||void 0,"data-interactive":f?void 0:"false",onPointerEnter:p,onPointerLeave:h,children:m})}const gn=c.createContext(null),ds=c.createContext(null),an='[data-ok-item]:not([aria-disabled="true"])',Ji=150,Zi=t=>{var e;return t.dataset.text??((e=t.querySelector(".ok-menu__label"))==null?void 0:e.textContent)??t.textContent??""},xn=c.forwardRef(function({focusOnOpen:e=null,bare:n=!1,className:s,children:r,onKeyDown:o,onPointerMove:i,onPointerLeave:l,onFocus:d,...u},f){const p=c.useContext(gn),h=c.useRef(null),{hlRef:m,moveTo:b}=os(),[v,g]=c.useState(null),w=na(),x=c.useRef(null),j=c.useRef(!1),_=ke(()=>j.current),k=ke(()=>{j.current=!1,g(null),b(null);const E=h.current;E&&E!==document.activeElement&&E.contains(document.activeElement)&&E.focus({preventScroll:!0})}),S=c.useMemo(()=>({highlight:b,openSub:v,setOpenSub:g,holding:_,clear:k}),[b,v,_,k]),M=()=>{var E;return Array.from(((E=h.current)==null?void 0:E.querySelectorAll(an))??[])};c.useEffect(()=>{if(!v)return;j.current=!1;let E=!1,N;const y=()=>{var I;return((I=document.getElementById(`${v}-sub`))==null?void 0:I.closest(".ok-popup"))??null},R=()=>{var I;return((I=h.current)==null?void 0:I.querySelector(`[aria-controls="${v}-sub"]`))??null},B=I=>{var F,q;if(!I||(F=y())!=null&&F.contains(I)||(q=R())!=null&&q.contains(I))return;const O=h.current,T=O!=null&&O.contains(I)?I.closest(an):null;T?T.focus({preventScroll:!0}):(O!=null&&O.contains(I)||!E)&&k()},D=I=>{var G,V;const O={x:I.clientX,y:I.clientY},T=x.current;x.current=O,clearTimeout(N);const F=I.target,q=y();if(j.current=!1,!(!q||!F)){if(q.contains(F)){E=!0;return}if(!((G=R())!=null&&G.contains(F))){if(T&&Hi(T,O,q.getBoundingClientRect())){j.current=!0,N=setTimeout(()=>{j.current=!1,B(F)},Ji);return}(V=h.current)!=null&&V.contains(F)&&F.closest(an)||B(F)}}};return document.addEventListener("pointermove",D,!0),()=>{document.removeEventListener("pointermove",D,!0),clearTimeout(N),j.current=!1}},[v,k]),c.useEffect(()=>{var y;if(!e)return;const E=M(),N=e==="first"?E[0]:e==="last"?E[E.length-1]:null;(y=N??h.current)==null||y.focus({preventScroll:!0}),N||b(null)},[e]);const C=p==null?void 0:p.open;c.useEffect(()=>{C===!1&&g(null)},[C]);const A=E=>{if(o==null||o(E),E.defaultPrevented||!E.currentTarget.contains(E.target))return;const N=M(),y=N.length,R=N.indexOf(document.activeElement),B=D=>{E.preventDefault();const I=N[D];I&&(I.focus({preventScroll:!0}),I.scrollIntoView({block:"nearest"}))};if(E.key==="ArrowDown")B(R<0?0:(R+1)%y);else if(E.key==="ArrowUp")B(R<0?y-1:(R-1+y)%y);else if(E.key==="Home"||E.key==="PageUp")B(0);else if(E.key==="End"||E.key==="PageDown")B(y-1);else if(E.key==="Tab")p==null||p.close("tab");else if(ta(E)&&(E.key!==" "||w.pending())){const D=w.search(E.key,N.map(Zi),R);E.preventDefault(),D>=0&&B(D)}};return a.jsx(ds.Provider,{value:S,children:a.jsxs("div",{role:"menu","aria-orientation":"vertical",tabIndex:-1,...u,ref:xe(f,h),className:L("ok-menu ok-scroll",!n&&"ok-menu--static",s),onKeyDown:A,onPointerMove:E=>{i==null||i(E),v||(x.current={x:E.clientX,y:E.clientY})},onFocus:E=>{d==null||d(E),E.target===E.currentTarget&&b(null)},onPointerLeave:E=>{l==null||l(E),!v&&k()},children:[a.jsx("span",{className:"ok-menu__hl",ref:m,"aria-hidden":"true"}),r]})})}),kn=c.forwardRef(function({role:e="menuitem",icon:n,shortcut:s,tone:r,disabled:o,onSelect:i,closeOnSelect:l=!0,textValue:d,trailing:u,subId:f,className:p,children:h,onClick:m,onFocus:b,onPointerMove:v,...g},w){const x=c.useContext(ds),j=c.useContext(gn),_=r&&r!=="neutral"?r:void 0;return a.jsxs("button",{type:"button",role:e,tabIndex:-1,...g,ref:w,className:L("ok-menu__item",_&&`ok-menu__item--${_}`,p),"data-ok-item":"","data-icon":n!=null&&n!==!1?"":void 0,"data-tone":_,"data-text":d,"aria-disabled":o||void 0,onClick:k=>{if(o){k.preventDefault();return}m==null||m(k),!k.defaultPrevented&&(i==null||i(),l&&(j==null||j.close("select")))},onFocus:k=>{b==null||b(k),x==null||x.highlight(k.currentTarget),x&&!f&&x.openSub&&x.setOpenSub(null)},onPointerMove:k=>{if(v==null||v(k),!!x&&!(x.openSub&&x.openSub!==f&&x.holding())){if(o){x.clear();return}document.activeElement!==k.currentTarget&&k.currentTarget.focus({preventScroll:!0})}},children:[rs(n),a.jsx("span",{className:"ok-menu__label",children:h}),s!=null&&a.jsx("span",{className:"ok-menu__meta",children:s}),u]})}),Qi=c.forwardRef(function(e,n){return a.jsx(kn,{...e,ref:n})}),el=c.forwardRef(function({checked:e,defaultChecked:n=!1,onCheckedChange:s,onSelect:r,closeOnSelect:o=!1,...i},l){const[d,u]=le(e,n,s),f=is(d,!ls());return a.jsx(kn,{...i,ref:l,role:"menuitemcheckbox","aria-checked":f,closeOnSelect:o,onSelect:()=>{u(!d),r==null||r()},trailing:a.jsx(as,{})})}),aa=c.createContext(null),tl=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,children:r,...o},i){const[l,d]=le(e,n,s),u=c.useMemo(()=>({value:l,set:d}),[l,d]);return a.jsx(aa.Provider,{value:u,children:a.jsx("div",{role:"group",...o,ref:i,children:r})})}),nl=c.forwardRef(function({value:e,onSelect:n,closeOnSelect:s=!1,...r},o){const i=c.useContext(aa),l=is((i==null?void 0:i.value)===e,!ls());return a.jsx(kn,{...r,ref:o,role:"menuitemradio","aria-checked":l,closeOnSelect:s,onSelect:()=>{i==null||i.set(e),n==null||n()},trailing:a.jsx(as,{})})}),sl=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{role:"separator",...n,ref:s,className:L("ok-menu__sep",e)})}),rl=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{role:"presentation",...n,ref:s,className:L("ok-menu__heading",e)})}),al=c.forwardRef(function({label:e,children:n,disabled:s,onKeyDown:r,...o},i){const l=c.useId(),d=c.useContext(ds),u=c.useRef(null),f=c.useRef(null),p=!!d&&d.openSub===l,[h,m]=c.useState(null),b=g=>{var w,x;if(!(s||!d)){if(p&&g){(x=(w=f.current)==null?void 0:w.querySelector(an))==null||x.focus({preventScroll:!0});return}m(g?"first":null),d.setOpenSub(l)}},v=()=>{var g;d==null||d.setOpenSub(null),(g=u.current)==null||g.focus({preventScroll:!0})};return c.useEffect(()=>{p||m(null)},[p]),a.jsxs(a.Fragment,{children:[a.jsx(kn,{...o,ref:xe(i,u),disabled:s,subId:l,closeOnSelect:!1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?`${l}-sub`:void 0,onSelect:()=>b(!0),onPointerMove:()=>{!p&&!(d!=null&&d.holding())&&b(!1)},onKeyDown:g=>{r==null||r(g),g.key==="ArrowRight"&&(g.preventDefault(),b(!0))},trailing:a.jsx(pe,{name:"chevron-right",className:"ok-menu__chevron"}),children:e}),a.jsx(Et,{open:p,anchorRef:u,placement:"right-start",offset:8,alignOffset:-6,className:"ok-popup--menu",onDismiss:g=>{g==="escape"&&v()},children:a.jsx(xn,{bare:!0,id:`${l}-sub`,ref:f,focusOnOpen:p?h:null,onKeyDown:g=>{g.key==="ArrowLeft"&&g.currentTarget.contains(g.target)&&(g.preventDefault(),v())},children:n})})]})}),ol=c.forwardRef(function({trigger:e,children:n,open:s,defaultOpen:r=!1,onOpenChange:o,placement:i="bottom-start",offset:l=8,matchTriggerWidth:d=!0,id:u,...f},p){const[h,m]=le(s,r,o),[b,v]=c.useState("menu"),g=c.useRef(null),w=c.useId(),x=u??`${w}-menu`,j=M=>{v(M),m(!0)},_=M=>{var C;M&&((C=g.current)==null||C.focus({preventScroll:!0})),m(!1)},k=c.useMemo(()=>({open:h,close:()=>_(!0)}),[h,m]),S=bn(e,{"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?x:void 0,"data-state":h?"open":"closed",onClick:M=>h?_(!1):j(M.detail===0?"first":"menu"),onKeyDown:M=>{(M.key==="ArrowDown"||M.key==="ArrowUp")&&(M.preventDefault(),j(M.key==="ArrowDown"?"first":"last"))}},g);return a.jsxs(gn.Provider,{value:k,children:[S,a.jsx(Et,{open:h,anchorRef:g,placement:i,offset:l,matchWidth:d?"min":!1,className:"ok-popup--menu",onDismiss:M=>_(M==="escape"),children:a.jsx(xn,{...f,bare:!0,id:x,ref:p,focusOnOpen:h?b:null,children:n})})]})}),il=10,ll=c.forwardRef(function({children:e,menu:n,open:s,onOpenChange:r,disabled:o,longPressMs:i=500,id:l,...d},u){const[f,p]=le(s,!1,r),[h,m]=c.useState({x:0,y:0}),b=c.useRef(h);b.current=h;const v=c.useRef({getBoundingClientRect:()=>{const{x:N,y}=b.current;return{left:N,top:y,right:N,bottom:y,width:0,height:0}}}),g=c.useRef(null),w=c.useRef(null),x=c.useRef(null),j=c.useRef(null),_=c.useId(),k=l??`${_}-menu`,S=(N,y)=>{const R=document.activeElement;R!=null&&R.closest(".ok-popup")||(x.current=R),m({x:N,y}),p(!0)},M=N=>{var y;N&&((y=x.current)!=null&&y.isConnected)&&x.current.focus({preventScroll:!0}),p(!1)};ve(()=>{var N;(N=g.current)==null||N.call(g)},[h]);const C=()=>{j.current&&(clearTimeout(j.current.timer),j.current=null)};c.useEffect(()=>C,[]),c.useEffect(()=>{if(!f)return;const N=y=>{y.target instanceof Element&&y.target.closest(".ok-popup")||p(!1)};return window.addEventListener("scroll",N,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",N,{capture:!0})},[f,p]);const A=c.useMemo(()=>({open:f,close:()=>M(!0)}),[f,p]),E=bn(e,{"data-state":f?"open":"closed",className:"ok-context-area",onContextMenu:N=>{if(!o)if(N.preventDefault(),C(),N.clientX===0&&N.clientY===0){const y=N.target.getBoundingClientRect();S(y.left,y.bottom)}else S(N.clientX,N.clientY)},onPointerDown:N=>{if(o||N.pointerType!=="touch")return;C();const{clientX:y,clientY:R}=N;j.current={x:y,y:R,timer:setTimeout(()=>{j.current=null,S(y,R)},i)}},onPointerMove:N=>{const y=j.current;y&&Math.hypot(N.clientX-y.x,N.clientY-y.y)>il&&C()},onPointerUp:C,onPointerCancel:C,onPointerLeave:C},w);return a.jsxs(gn.Provider,{value:A,children:[E,a.jsx(Et,{open:f,anchorRef:v,placement:"bottom-start",offset:2,className:"ok-popup--menu",updateRef:g,onDismiss:N=>M(N==="escape"),children:a.jsx(xn,{...d,bare:!0,id:k,ref:u,focusOnOpen:f?"menu":null,children:n})})]})}),cn=t=>"options"in t,bt=t=>t.flatMap(e=>cn(e)?e.options:[e]),Mt=t=>t.textValue??(typeof t.label=="string"||typeof t.label=="number"?String(t.label):t.value);function St(t,e,n){const s=t.length;for(let r=1;r<=s;r++){const o=((e+n*r)%s+s)%s;if(!t[o].disabled)return o}return-1}const Ft=t=>St(t,-1,1),Vn=t=>St(t,t.length,-1),us=(t,e)=>`${t}-opt-${e}`,oa=c.forwardRef(function({id:e,entries:n,activeIndex:s,onActiveChange:r,isSelected:o,onPick:i,multi:l,lockWidth:d,followActive:u,className:f,...p},h){const m=c.useRef(null),{hlRef:b,moveTo:v}=os(),g=!ls(),w=bt(n).filter(k=>o(k.value)).map(k=>k.value),x=new Set(JSON.parse(is(JSON.stringify(w),g)));ve(()=>{var S;const k=m.current;if(k){if(d){k.style.minWidth="",k.setAttribute("data-measuring","");const M=Math.ceil(k.getBoundingClientRect().width);k.removeAttribute("data-measuring"),M>0&&(k.style.minWidth=M+"px")}(S=k.querySelector('[aria-selected="true"]'))==null||S.scrollIntoView({block:"nearest"})}},[]),c.useEffect(()=>{var S;const k=s>=0?((S=m.current)==null?void 0:S.querySelector(`[data-index="${s}"]`))??null:null;v(k),k&&u&&k.scrollIntoView({block:"nearest"})},[s,u,v,n]);let j=-1;const _=k=>{j+=1;const S=j,M=x.has(k.value),C=k.tone&&k.tone!=="neutral"?k.tone:void 0;return a.jsxs("div",{role:"option",id:us(e,S),className:L("ok-menu__item",C&&`ok-menu__item--${C}`),"data-index":S,"data-value":k.value,"data-icon":k.icon!=null&&k.icon!==!1?"":void 0,"data-tone":C,"data-active":S===s||void 0,"aria-selected":M,"aria-disabled":k.disabled||void 0,onPointerMove:()=>{const A=k.disabled?-1:S;A!==s&&r(A)},onClick:()=>{k.disabled||i(k)},children:[rs(k.icon),a.jsx("span",{className:"ok-menu__label",children:k.label}),k.meta!=null&&a.jsx("span",{className:"ok-menu__meta",children:k.meta}),a.jsx(as,{})]},k.value)};return a.jsxs("div",{role:"listbox","aria-multiselectable":l||void 0,tabIndex:-1,...p,id:e,ref:xe(h,m),className:L("ok-menu ok-scroll",f),"data-check":l?void 0:"instant",onMouseDown:k=>k.preventDefault(),onPointerLeave:()=>r(-1),children:[a.jsx("span",{className:"ok-menu__hl",ref:b,"aria-hidden":"true"}),n.map((k,S)=>cn(k)?a.jsxs("div",{role:"group","aria-labelledby":`${e}-group-${S}`,children:[a.jsx("div",{className:"ok-menu__heading",id:`${e}-group-${S}`,role:"presentation",children:k.label}),k.options.map(_)]},`group-${S}`):_(k))]})}),ia=c.forwardRef(function({multi:e,selected:n,onPick:s,display:r,options:o,placeholder:i,size:l="md",block:d,disabled:u,required:f,invalid:p,name:h,form:m,open:b,defaultOpen:v=!1,onOpenChange:g,placement:w="bottom-start",id:x,className:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":S,...M},C){const A=he().messages.select.placeholder,E=i===void 0?A:i,N=c.useContext(Le),y=we({id:x,disabled:u,required:f,invalid:p,"aria-describedby":S,"aria-labelledby":k,"aria-label":_}),{disabled:R,invalid:B}=y,D=d??!!N,[I,O]=le(b,v,g),[T,F]=c.useState(-1),[q,G]=c.useState(!1),V=c.useRef(null),X=`${c.useId()}-list`,P=c.useMemo(()=>bt(o),[o]),z=na(),$=P.findIndex(H=>n.includes(H.value)&&!H.disabled),Y=H=>{F(H),G(H>=0),O(!0)},K=()=>O(!1),ee=H=>{H>=0&&(F(H),G(!0))},ie=H=>{s(H),e||K()},U=H=>{if(R)return;const re=H.key,de=ta(H)&&(re!==" "||z.pending());if(!I){if(re==="ArrowDown"||re==="ArrowUp"||re==="Enter"||re===" ")H.preventDefault(),Y($>=0?$:re==="ArrowUp"?Vn(P):Ft(P));else if(de){H.preventDefault();const ne=z.search(re,P.map(Mt),$);Y(ne>=0&&!P[ne].disabled?ne:$)}return}if(re==="ArrowDown"||re==="ArrowUp")H.preventDefault(),T<0&&$>=0?ee($):ee(re==="ArrowDown"?St(P,T,1):St(P,T<0?P.length:T,-1));else if(re==="Home"||re==="PageUp")H.preventDefault(),ee(Ft(P));else if(re==="End"||re==="PageDown")H.preventDefault(),ee(Vn(P));else if(de){H.preventDefault();const ne=z.search(re,P.map(Mt),T);ne>=0&&!P[ne].disabled&&ee(ne)}else re==="Enter"||re===" "?(H.preventDefault(),T>=0&&P[T]&&!P[T].disabled?ie(P[T]):K()):re==="Tab"&&K()};return a.jsxs("div",{...M,ref:C,className:L("ok-select",D&&"ok-select--block",j),"data-size":l,"data-disabled":R||void 0,children:[a.jsxs("button",{type:"button",ref:V,id:y.id,"data-label-focus":"",className:"ok-select__trigger ok-focusable",role:"combobox","aria-haspopup":"listbox","aria-expanded":I,"aria-controls":I?X:void 0,"aria-activedescendant":I&&T>=0?us(X,T):void 0,"aria-label":_,"aria-labelledby":k,"aria-describedby":y.describedBy,"aria-invalid":B||void 0,"aria-required":y.required||void 0,disabled:R,"data-state":I?"open":"closed",onClick:()=>I?K():Y(-1),onKeyDown:U,onKeyUp:H=>{H.key===" "&&H.preventDefault()},children:[a.jsx("span",{className:"ok-select__value","data-placeholder":n.length?void 0:"",children:n.length?r:E}),a.jsx(pe,{name:"chevron-down"})]}),h&&(e?n.map(H=>a.jsx("input",{type:"hidden",name:h,value:H,form:m,disabled:R},H)):a.jsx("input",{type:"hidden",name:h,value:n[0]??"",form:m,disabled:R})),a.jsx(Et,{open:I,anchorRef:V,placement:w,matchWidth:"min",className:"ok-popup--menu",onDismiss:K,children:a.jsx(oa,{id:X,entries:o,activeIndex:T,onActiveChange:H=>{F(H),G(!1)},followActive:q,isSelected:H=>n.includes(H),onPick:ie,multi:e,lockWidth:!0,"aria-label":_,"aria-labelledby":k??(_||N==null?void 0:N.labelId)})})]})}),cl=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,...r},o){const[i,l]=le(e,n),d=ke(s),u=c.useMemo(()=>bt(r.options).find(f=>f.value===i),[r.options,i]);return a.jsx(ia,{...r,ref:o,multi:!1,selected:i==null?[]:[i],display:u?u.label:i,onPick:f=>{f.value!==i&&(l(f.value),d(f.value,f))}})}),dl=[],ul=c.forwardRef(function({value:e,defaultValue:n=dl,onChange:s,display:r="chips",maxChips:o=2,renderValue:i,...l},d){const{messages:u}=he(),[f,p]=le(e,n,s),h=c.useMemo(()=>{const b=bt(l.options);return f.map(v=>b.find(g=>g.value===v)).filter(Boolean)},[l.options,f]);let m;return i?m=i(h):r==="count"?m=u.select.count(f.length):m=a.jsxs("span",{className:"ok-select__chips",children:[h.slice(0,o).map(b=>a.jsx("span",{className:"ok-select__chip",children:b.label},b.value)),h.length>o&&a.jsxs("span",{className:"ok-select__chip ok-select__chip--more",children:["+",h.length-o]})]}),a.jsx(ia,{...l,ref:d,multi:!0,selected:f,display:m,onPick:b=>p(f.includes(b.value)?f.filter(v=>v!==b.value):[...f,b.value])})}),fl=(t,e)=>Mt(t).toLowerCase().includes(e.trim().toLowerCase()),la=c.forwardRef(function({options:e,value:n,defaultValue:s=null,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:l,filter:d=fl,loading:u=!1,loadingText:f,emptyText:p,freeSolo:h=!1,clearable:m=!1,icon:b,size:v="md",invalid:g,name:w,form:x,disabled:j,required:_,open:k,defaultOpen:S=!1,onOpenChange:M,placement:C="bottom-start",className:A,style:E,rootRef:N,rootClassName:y,rootStyle:R,id:B,onKeyDown:D,onBlur:I,onClick:O,"aria-describedby":T,...F},q){const{messages:G}=he(),V=f===void 0?G.combobox.loading:f,J=p===void 0?G.combobox.empty:p,X=c.useContext(Le),P=we({id:B,disabled:j,required:_,invalid:g,"aria-describedby":T}),{disabled:z,invalid:$}=P,Y=c.useMemo(()=>bt(e),[e]),K=ae=>{if(ae==null)return"";const be=Y.find(Re=>Re.value===ae);return be?Mt(be):h?ae:""},[ee,ie]=le(n,s),U=ke(r),[H,re]=le(o??(h&&n!=null?n:void 0),i??K(s),l),[de,ne]=le(k,S,M),[oe,Q]=c.useState(-1),[Z,W]=c.useState(!1),[ce,ue]=c.useState(!1),je=c.useRef(null),De=c.useRef(null),Ie=`${c.useId()}-list`,_e=(ae,be)=>!d||!be||!ae.trim()?e:e.map(Re=>cn(Re)?{...Re,options:Re.options.filter(rt=>d(rt,ae))}:Re).filter(Re=>cn(Re)?Re.options.length>0:d(Re,ae)),Ce=_e(H,ce),ge=bt(Ce),tt=(ae,be)=>{ae!==ee&&(ie(ae),U(ae,be))},nt=(ae,be)=>{Q(ae),W(be),ne(!0)},Ue=()=>{ne(!1),Q(-1),ue(!1)},lt=ae=>{re(Mt(ae)),tt(h?Mt(ae):ae.value,ae),Ue()},st=ge.findIndex(ae=>ae.value===ee&&!ae.disabled),se=ge.map(ae=>ae.disabled?`${ae.value}`:ae.value).join("\0");c.useEffect(()=>{!de||!ce||u||(Q(Ft(ge)),W(!0))},[se,u]);const te=ae=>{if(D==null||D(ae),ae.defaultPrevented||z)return;const be=ae.key;be==="ArrowDown"||be==="ArrowUp"?(ae.preventDefault(),de?(W(!0),Q(be==="ArrowDown"?St(ge,oe,1):St(ge,oe<0?ge.length:oe,-1))):nt(st>=0?st:be==="ArrowDown"?Ft(ge):Vn(ge),!0)):be==="Enter"?de&&oe>=0&&ge[oe]&&!ge[oe].disabled?(ae.preventDefault(),lt(ge[oe])):de&&Ue():be==="Tab"&&de&&Ue()},me=u||ge.length>0||J!=null,fe=de&&me&&!z;return a.jsxs("div",{ref:xe(N,je),className:L("ok-input ok-combobox",v==="lg"&&"ok-input--lg",H&&m&&"has-value",y,A),style:{...R,...E},"data-size":v,"data-disabled":z||void 0,"data-invalid":$||void 0,onClick:ae=>{var be;ae.target===ae.currentTarget&&((be=De.current)==null||be.focus())},children:[b!=null&&a.jsx("span",{className:"ok-input__icon ok-combobox__icon",children:rs(b)}),a.jsx("input",{type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,...F,ref:xe(q,De),id:P.id,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":fe,"aria-controls":fe?Ie:void 0,"aria-activedescendant":fe&&oe>=0?us(Ie,oe):void 0,"aria-invalid":$||void 0,"aria-describedby":P.describedBy,"aria-busy":u||void 0,disabled:z,required:P.required||void 0,name:h?w:void 0,form:h?x:void 0,value:H,onChange:ae=>{const be=ae.target.value;re(be),ue(!0),h?tt(be):be===""&&ee!=null&&tt(null),nt(Ft(bt(_e(be,!0))),!0)},onClick:ae=>{O==null||O(ae),de||nt(-1,!1)},onKeyDown:te,onBlur:ae=>{I==null||I(ae),de&&Ue(),!h&&H!==K(ee)&&re(K(ee))}}),m&&a.jsx("button",{type:"button",className:"ok-input__clear","aria-label":G.common.clear,tabIndex:-1,disabled:z||!H,onMouseDown:ae=>ae.preventDefault(),onClick:()=>{var ae;re(""),tt(h?"":null),(ae=De.current)==null||ae.focus()},children:a.jsx(pe,{name:"x"})}),w&&!h&&a.jsx("input",{type:"hidden",name:w,form:x,value:ee??"",disabled:z}),a.jsxs(Et,{open:fe,anchorRef:je,placement:C,matchWidth:"min",className:"ok-popup--menu",onDismiss:Ue,onMouseDown:ae=>ae.preventDefault(),children:[u&&a.jsx("div",{className:"ok-menu__empty",role:"status",children:V}),!u&&ge.length===0&&a.jsx("div",{className:"ok-menu__empty",role:"status",children:J}),a.jsx(oa,{id:Ie,entries:Ce,hidden:ge.length===0,activeIndex:oe,onActiveChange:ae=>{Q(ae),W(!1)},followActive:Z,isSelected:ae=>!h&&ae===ee,onPick:lt,"aria-label":F["aria-label"]??G.combobox.listbox,"aria-labelledby":F["aria-labelledby"]??(F["aria-label"]||X==null?void 0:X.labelId)})]})]})}),hl=c.forwardRef(function(e,n){return a.jsx(la,{...e,ref:n,freeSolo:!0})}),Ze=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),Xe=(t,e)=>new Date(t.getFullYear(),t.getMonth(),t.getDate()+e);function Dt(t,e){const n=new Date(t.getFullYear(),t.getMonth()+e,1),s=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return new Date(n.getFullYear(),n.getMonth(),Math.min(t.getDate(),s))}const Fe=(t,e)=>!!t&&!!e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),Ot=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),Pn=(t,e=2)=>String(t).padStart(e,"0"),We=t=>`${Pn(t.getFullYear(),4)}-${Pn(t.getMonth()+1)}-${Pn(t.getDate())}`;function fs(t){const e=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*[-/.月]\s*(\d{1,2})\s*日?\s*$/.exec(t);if(!e)return null;const[n,s,r]=[Number(e[1]),Number(e[2]),Number(e[3])],o=new Date(n,s-1,r);return o.setFullYear(n),o.getFullYear()===n&&o.getMonth()===s-1&&o.getDate()===r?o:null}const ca=c.forwardRef(function({anchorDate:e,isSelected:n,rangePart:s,onPick:r,onHoverDate:o,onFocusDate:i,multiselectable:l,month:d,defaultMonth:u,onMonthChange:f,min:p,max:h,isDateDisabled:m,weekStartsOn:b=1,locale:v,today:g,autoFocus:w,disabled:x,className:j,"aria-label":_,...k},S){const{locale:M,messages:C}=he(),A=v??M,E=c.useMemo(()=>Ze(g??new Date),[g]),N=c.useMemo(()=>p?Ze(p):null,[p]),y=c.useMemo(()=>h?Ze(h):null,[h]),R=Q=>N&&Q<N?N:y&&Q>y?y:Q,B=Q=>!!x||!!N&&Q<N||!!y&&Q>y||!!(m!=null&&m(Q)),D=R(Ze(e??u??d??E)),[I,O]=c.useState(D),[T,F]=le(d,u??D,f),q=new Date(T.getFullYear(),T.getMonth(),1),G=c.useRef(null),V=c.useRef(!!w),J=c.useId(),X=e?We(e):"";c.useEffect(()=>{if(!e)return;const Q=Ze(e);O(Q),Ot(Q,T)||F(Q)},[X]);const P=Ot(I,q)?I:q,z=We(P);c.useEffect(()=>{var Q,Z;V.current&&(V.current=!1,(Z=(Q=G.current)==null?void 0:Q.querySelector(`[data-date="${z}"]`))==null||Z.focus({preventScroll:!0}))});const $=Q=>{const Z=R(Q);V.current=!0,O(Z),Ot(Z,q)||F(Z)},Y=Q=>{const Z=Dt(q,Q);F(Z),O(R(Dt(P,Q)))},K=Q=>{const Z=Q.target.closest("[data-date]");if(!Z)return;const W=fs(Z.dataset.date),ce=(W.getDay()-b+7)%7;let ue=null;switch(Q.key){case"ArrowLeft":ue=Xe(W,-1);break;case"ArrowRight":ue=Xe(W,1);break;case"ArrowUp":ue=Xe(W,-7);break;case"ArrowDown":ue=Xe(W,7);break;case"Home":ue=Xe(W,-ce);break;case"End":ue=Xe(W,6-ce);break;case"PageUp":ue=Dt(W,Q.shiftKey?-12:-1);break;case"PageDown":ue=Dt(W,Q.shiftKey?12:1);break;default:return}Q.preventDefault(),$(ue)},ee=c.useMemo(()=>new Intl.DateTimeFormat(A,{year:"numeric",month:"long"}),[A]),ie=c.useMemo(()=>new Intl.DateTimeFormat(A,{dateStyle:"full"}),[A]),U=c.useMemo(()=>{const Q=new Intl.DateTimeFormat(A,{weekday:"narrow"}),Z=new Intl.DateTimeFormat(A,{weekday:"long"});return Array.from({length:7},(W,ce)=>{const ue=new Date(2023,0,1+(ce+b)%7);return{short:Q.format(ue),long:Z.format(ue)}})},[A,b]),H=(q.getDay()-b+7)%7,re=Xe(q,-H),de=Array.from({length:6},(Q,Z)=>Array.from({length:7},(W,ce)=>Xe(re,Z*7+ce))),ne=!!N&&Xe(q,-1)<N,oe=!!y&&Dt(q,1)>y;return a.jsxs("div",{...k,ref:xe(S,G),className:L("ok-calendar",j),"data-disabled":x||void 0,children:[a.jsxs("div",{className:"ok-calendar__head",children:[a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":C.calendar.prevMonth,disabled:x||ne,onClick:()=>Y(-1),children:a.jsx(pe,{children:a.jsx("path",{d:"M12.5 4.5L7 10l5.500 5.500"})})}),a.jsx("div",{className:"ok-calendar__title",id:`${J}-title`,"aria-live":"polite",children:ee.format(q)}),a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":C.calendar.nextMonth,disabled:x||oe,onClick:()=>Y(1),children:a.jsx(pe,{name:"chevron-right"})})]}),a.jsxs("table",{role:"grid",className:"ok-calendar__grid","aria-label":_,"aria-labelledby":_?void 0:`${J}-title`,"aria-multiselectable":l||void 0,onKeyDown:K,onPointerLeave:()=>o==null?void 0:o(null),children:[a.jsx("thead",{children:a.jsx("tr",{children:U.map(Q=>a.jsxs("th",{scope:"col",abbr:Q.long,children:[a.jsx("span",{"aria-hidden":"true",children:Q.short}),a.jsx("span",{className:"ok-sr",children:Q.long})]},Q.long))})}),a.jsx("tbody",{children:de.map(Q=>a.jsx("tr",{children:Q.map(Z=>{const W=We(Z),ce=B(Z),ue=n(Z),je=s==null?void 0:s(Z);return a.jsx("td",{role:"gridcell","aria-selected":ue,"aria-disabled":ce||void 0,"data-range":je,children:a.jsx("button",{type:"button",className:"ok-calendar__day ok-focusable",tabIndex:W===z?0:-1,"data-date":W,"data-autofocus":w&&W===z?"":void 0,"data-outside":Ot(Z,q)?void 0:"","data-today":Fe(Z,E)?"":void 0,"data-selected":ue?"":void 0,"aria-label":ie.format(Z)+(Fe(Z,E)?C.calendar.todaySuffix:""),"aria-current":Fe(Z,E)?"date":void 0,"aria-pressed":ue,"aria-disabled":ce||void 0,onFocus:()=>{O(Z),i==null||i(Z)},onPointerEnter:()=>o==null?void 0:o(Z),onClick:()=>{ce||(O(Z),Ot(Z,q)||(V.current=!0,F(Z)),r(Z))},children:Z.getDate()})},W)})},We(Q[0])))})]})]})}),da=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,...r},o){const[i,l]=le(e,n,s);return a.jsx(ca,{...r,ref:o,anchorDate:i,isSelected:d=>Fe(d,i),onPick:d=>l(d)})}),pl={start:null,end:null},ua=c.forwardRef(function({value:e,defaultValue:n=pl,onChange:s,...r},o){const[i,l]=le(e,n,s),[d,u]=c.useState(null),[f,p]=c.useState(null),{start:h,end:m}=i,b=d??f,v=m??(h&&b?b:null),g=h&&v?h<=v?h:v:h,w=h&&v&&h<=v?v:h;return a.jsx(ca,{...r,ref:o,multiselectable:!0,anchorDate:h,isSelected:x=>Fe(x,h)||Fe(x,m)||!!h&&!!m&&x>h&&x<m,rangePart:x=>{if(!(!g||!w))return Fe(g,w)?Fe(x,g)?"single":void 0:Fe(x,g)?"start":Fe(x,w)?"end":x>g&&x<w?"in":void 0},onHoverDate:u,onFocusDate:x=>{u(null),p(x)},onPick:x=>{l(!h||m?{start:x,end:null}:x<h?{start:x,end:h}:{start:h,end:x})}})});function Ws(t,e){const n=e(t);if(n)return new Date(n.getFullYear(),n.getMonth(),1);const s=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*([-/.月])?\s*$/.exec(t);if(!s)return null;const[,r,o,i]=s;if(o.length===1&&!i&&(o==="0"||o==="1"))return null;const l=Number(o);return l>=1&&l<=12?new Date(Number(r),l-1,1):null}const ml=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),fa=()=>a.jsxs(pe,{children:[a.jsx("rect",{x:"3.500",y:"4.500",width:"13",height:"12",rx:"2.500"}),a.jsx("path",{d:"M3.500 8.500h13M7 3v3M13 3v3"})]}),bl=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,parse:r=fs,format:o=We,min:i,max:l,isDateDisabled:d,weekStartsOn:u,locale:f,today:p,size:h="md",invalid:m,name:b,form:v,disabled:g,required:w,readOnly:x,open:j,defaultOpen:_=!1,onOpenChange:k,placement:S="bottom-start",className:M,style:C,placeholder:A,id:E,onBlur:N,onKeyDown:y,"aria-describedby":R,...B},D){const{messages:I}=he(),O=A??I.datePicker.placeholder,T=we({id:E,disabled:g,required:w,invalid:m,"aria-describedby":R}),{disabled:F,invalid:q}=T,[G,V]=le(e,n,s),[J,X]=le(j,_,k),[P,z]=c.useState(G?o(G):""),$=c.useRef(null),Y=c.useRef(null),K=`${c.useId()}-calendar`,[ee,ie]=c.useState(!1),[U,H]=c.useState(()=>Ze(G??p??new Date));c.useEffect(()=>{if(!J)return;const W=Ws(P,r);H(Ze(W??G??p??new Date))},[J]),c.useEffect(()=>{J||ie(!1)},[J]);const re=()=>{J||F||x||(ie(!0),X(!0))},de=W=>{z(W);const ce=Ws(W,r);ce&&!ml(ce,U)&&H(ce)},ne=G?We(G):"";c.useEffect(()=>{z(G?o(G):"")},[ne]);const oe=W=>!(i&&W<Ze(i))&&!(l&&W>Ze(l))&&!(d!=null&&d(W)),Q=(()=>{if(P.trim()==="")return null;const W=r(P);return W&&oe(W)?W:G&&P===o(G)?G:null})(),Z=()=>{if(P.trim()===""){G&&V(null);return}const W=r(P);W&&oe(W)?Fe(W,G)?z(o(W)):V(W):z(G?o(G):"")};return a.jsxs("div",{ref:xe(D,$),className:L("ok-input ok-datepicker",h==="lg"&&"ok-input--lg",M),style:C,"data-size":h,"data-disabled":F||void 0,"data-invalid":q||void 0,children:[a.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"off",...B,id:T.id,placeholder:O,disabled:F,readOnly:x,required:T.required||void 0,"aria-invalid":q||void 0,"aria-describedby":T.describedBy,ref:Y,"aria-haspopup":"dialog","aria-expanded":J,"aria-controls":J?K:void 0,value:P,onChange:W=>de(W.target.value),onClick:re,onBlur:W=>{var ue,je;N==null||N(W),Z();const ce=W.relatedTarget;J&&ee&&!(ce&&((ue=$.current)!=null&&ue.contains(ce)||(je=document.getElementById(K))!=null&&je.contains(ce)))&&X(!1)},onKeyDown:W=>{var ce,ue;y==null||y(W),!W.defaultPrevented&&(W.key==="Enter"?(Z(),J&&ee&&X(!1)):W.key==="Escape"&&J?(W.preventDefault(),X(!1)):W.key==="ArrowDown"&&W.altKey&&!F&&!x?(W.preventDefault(),ie(!1),X(!0)):W.key==="ArrowDown"&&J&&(W.preventDefault(),(ue=(ce=document.getElementById(K))==null?void 0:ce.querySelector('.ok-calendar__day[tabindex="0"]'))==null||ue.focus()))}}),b&&a.jsx("input",{type:"hidden",name:b,form:v,value:ne,disabled:F}),a.jsx(cs,{id:K,open:J,onOpenChange:W=>{W&&ie(!1),X(W)},autoFocus:!ee,anchorRef:$,placement:S,"aria-label":I.datePicker.dialog,className:"ok-popover--calendar",trigger:a.jsx("button",{type:"button",className:"ok-datepicker__btn ok-focusable","aria-label":I.datePicker.open,disabled:F||x,children:a.jsx(fa,{})}),children:({close:W})=>a.jsx(da,{autoFocus:!ee,value:Q,month:U,onMonthChange:H,onChange:ce=>{var ue;V(ce),ee?(X(!1),(ue=Y.current)==null||ue.focus()):W()},min:i,max:l,isDateDisabled:d,weekStartsOn:u,locale:f,today:p})})]})}),vl={start:null,end:null},gl=c.forwardRef(function({value:e,defaultValue:n=vl,onChange:s,placeholder:r,startName:o,endName:i,form:l,separator:d=" – ",format:u=We,min:f,max:p,isDateDisabled:h,weekStartsOn:m,locale:b,today:v,size:g="md",invalid:w,disabled:x,required:j,open:_,defaultOpen:k=!1,onOpenChange:S,placement:M="bottom-start",className:C,id:A,"aria-label":E,"aria-labelledby":N,"aria-describedby":y,...R},B){const{messages:D}=he(),I=r===void 0?D.datePicker.rangePlaceholder:r,O=c.useContext(Le),T=we({id:A,disabled:x,required:j,invalid:w,"aria-describedby":y,"aria-labelledby":N,"aria-label":E}),{disabled:F,invalid:q}=T,[G,V]=le(e,n,s),[J,X]=le(_,k,S),[P,z]=c.useState(null);c.useEffect(()=>{J||z(null)},[J]);const{start:$,end:Y}=G,K=J&&P||G,ee=K.start?`${u(K.start)}${d}${K.end?u(K.end):"…"}`:null,ie=c.useRef(null),U=`${c.useId()}-value`,[H,re]=c.useState(!1);c.useEffect(()=>{var oe,Q;re(!!((Q=(oe=ie.current)==null?void 0:oe.labels)!=null&&Q.length))});const ne=[(!!E||!!N||!!(O!=null&&O.labelId)||H)&&U,T.describedBy].filter(Boolean).join(" ")||void 0;return a.jsxs(a.Fragment,{children:[a.jsx(cs,{open:J,onOpenChange:X,placement:M,"aria-label":D.datePicker.rangeDialog,className:"ok-popover--calendar",trigger:a.jsxs("button",{type:"button",...R,ref:xe(B,ie),id:T.id,className:L("ok-input ok-daterange ok-focusable",g==="lg"&&"ok-input--lg",C),"data-size":g,"data-label-focus":"","data-invalid":q||void 0,"aria-label":E,"aria-labelledby":N,"aria-describedby":ne,"aria-invalid":q||void 0,"aria-required":T.required||void 0,disabled:F,children:[a.jsx("span",{className:"ok-daterange__value",id:U,"data-placeholder":ee?void 0:"",children:ee??I}),a.jsx(fa,{})]}),children:({close:oe})=>a.jsx(ua,{autoFocus:!0,value:P??G,onChange:Q=>{Q.start&&Q.end?(z(null),V(Q),oe()):z(Q)},min:f,max:p,isDateDisabled:h,weekStartsOn:m,locale:b,today:v})}),o&&a.jsx("input",{type:"hidden",name:o,form:l,value:$?We($):"",disabled:F}),i&&a.jsx("input",{type:"hidden",name:i,form:l,value:Y?We(Y):"",disabled:F})]})}),xl=c.forwardRef(function({variant:e="body",as:n="span",tone:s="default",truncate:r,lineClamp:o,align:i,className:l,style:d,...u},f){const p=n,h=o&&o>0?{"--ok-clamp":o}:void 0;return a.jsx(p,{ref:f,className:L("ok-text",`ok-t-${e}`,l),"data-tone":s==="default"?void 0:s,"data-truncate":r?"":void 0,"data-clamp":h?"":void 0,"data-align":i,style:h?{...h,...d}:d,...u})}),kl=c.forwardRef(function({level:e=2,variant:n,tone:s="default",truncate:r,align:o,className:i,...l},d){const u=`h${e}`;return a.jsx(u,{ref:d,className:L("ok-text ok-heading",`ok-t-${n??`h${e}`}`,i),"data-tone":s==="default"?void 0:s,"data-truncate":r?"":void 0,"data-align":o,...l})}),yl=c.forwardRef(function({as:e="div",size:n="md",className:s,...r},o){const i=e;return a.jsx(i,{ref:o,className:L("ok-panel",n!=="md"&&`ok-panel--${n}`,s),...r})}),wl=t=>t===void 0?void 0:typeof t=="number"?String(t):t,ha=c.forwardRef(function({src:e,alt:n,ratio:s,fit:r="cover",radius:o=3,fallback:i,placeholder:l="skeleton",loading:d="lazy",children:u,className:f,style:p,onLoad:h,onError:m,decoding:b="async",...v},g){const w=c.useRef(null),[x,j]=c.useState({src:e,status:"loading"}),_=u!=null&&u!==!1;let k;e?k=x.src===e?x.status:"loading":k=_?"content":"empty",c.useEffect(()=>{const N=w.current;e&&N&&N.complete&&N.naturalWidth>0&&j({src:e,status:"loaded"})},[e]);const S=N=>{j({src:e,status:"loaded"}),h==null||h(N)},M=N=>{j({src:e,status:"error"}),m==null||m(N)},A=k==="content"||k==="error"||k==="empty"?n?{role:"img","aria-label":n}:{"aria-hidden":!0}:null,E=wl(s);return a.jsxs("span",{ref:g,className:L("ok-image",f),"data-status":k,"data-fit":r,"data-radius":o,"data-placeholder":l,"data-ratio":E!==void 0?"":void 0,style:E!==void 0?{aspectRatio:E,...p}:p,...A,children:[e&&k!=="error"&&a.jsx("img",{...v,ref:w,className:"ok-image__img",src:e,alt:n,loading:d,decoding:b,onLoad:S,onError:M}),(k==="error"||k==="empty")&&a.jsx("span",{className:"ok-image__fallback",children:i??a.jsx(pe,{name:"image",className:"ok-image__icon"})}),_&&a.jsx("span",{className:e?"ok-image__overlay":"ok-image__content",children:u})]})}),_l=c.forwardRef(function({as:e="div",size:n="md",href:s,target:r,rel:o,interactive:i,disabled:l,chevron:d,className:u,children:f,...p},h){const m=s!==void 0,b=!m&&!!i,v=m?"a":b?"button":e,g=b?"span":"div",w=m?{href:s,target:r,rel:o}:b?{type:"button",disabled:l}:null;return a.jsx(v,{ref:h,className:L("ok-card",n!=="md"&&`ok-card--${n}`,(m||b)&&"ok-card--interactive ok-focusable",d&&"ok-card--chev",u),...w,...p,children:d?a.jsxs(a.Fragment,{children:[a.jsx(g,{className:"ok-card__main",children:f}),a.jsx(pe,{name:"chevron-right",className:"ok-card__chev"})]}):f})}),jl=c.forwardRef(function({href:e,className:n,...s},r){const o=e!==void 0?"a":"button",i=e!==void 0?{href:e}:{type:"button"};return a.jsx(o,{ref:r,className:L("ok-card__link",n),...i,...s})}),Nl=c.forwardRef(function({title:e,description:n,titleAs:s="h3",titleId:r,actions:o,className:i,children:l,...d},u){return a.jsxs("div",{ref:u,className:L("ok-card__header",i),...d,children:[a.jsxs("div",{className:"ok-card__heading",children:[e!=null&&a.jsx(s,{id:r,className:"ok-card__title",children:e}),n!=null&&a.jsx("p",{className:"ok-card__desc",children:n}),l]}),o!=null&&a.jsx("div",{className:"ok-card__actions",children:o})]})}),Ml=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{ref:s,className:L("ok-card__body",e),...n})}),Rl=c.forwardRef(function({align:e="start",className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-card__footer",n),"data-align":e,...s})}),Sl=c.forwardRef(function({ratio:e=16/9,position:n="top",className:s,...r},o){return a.jsx(ha,{ref:o,ratio:e,radius:0,className:L("ok-card__media",n==="start"&&"ok-card__media--start",s),...r})}),Cl=c.forwardRef(function({as:e="div",compact:n,className:s,...r},o){const i=e;return a.jsx(i,{ref:o,className:L("ok-group",n&&"ok-group--compact",s),...r})}),El=c.forwardRef(function({as:e="div",label:n,description:s,leading:r,stack:o,controlWidth:i="auto",href:l,target:d,rel:u,interactive:f,disabled:p,className:h,children:m,...b},v){const g=l!==void 0,w=!g&&!!f,x=g||w,j=g?"a":w?"button":e,_=g?{href:l,target:d,rel:u}:w?{type:"button",disabled:p}:null,k=n!=null||s!=null,S=!x&&i!=="auto"&&m!=null,M=S&&i==="fill",C=S&&!M,A=S?a.jsx("span",{className:"ok-row__control",style:C?{"--_cw":typeof i=="number"?`${i}px`:i}:void 0,children:m}):m;return a.jsxs(j,{ref:v,className:L("ok-row",o===!0&&"ok-row--stack",o==="auto"&&"ok-row--wrap",M&&"ok-row--fill",C&&"ok-row--fixed",x&&"ok-row--link ok-focusable",h),..._,...b,children:[r!=null&&a.jsx("span",{className:"ok-row__leading",children:r}),k&&a.jsxs("span",{className:"ok-row__text",children:[n!=null&&a.jsx("span",{className:"ok-row__label",children:n}),s!=null&&a.jsx("span",{className:"ok-row__desc",children:s})]}),x&&m!=null?a.jsx("span",{className:"ok-row__value",children:m}):A,x&&a.jsx(pe,{name:"chevron-right",className:"ok-row__chev"})]})}),Al=c.forwardRef(function({as:e,marker:n="none",divided:s,size:r="md",className:o,...i},l){const d=e??(n==="number"?"ol":"ul");return a.jsx(d,{ref:l,role:"list",className:L("ok-list",r!=="md"&&`ok-list--${r}`,o),"data-marker":n,"data-divided":s?"":void 0,...i})}),Tl=c.forwardRef(function({leading:e,trailing:n,title:s,description:r,className:o,children:i,...l},d){return a.jsxs("li",{ref:d,className:L("ok-list__item",o),...l,children:[e!=null&&a.jsx("span",{className:"ok-list__leading",children:e}),a.jsxs("div",{className:"ok-list__content",children:[s!=null&&a.jsx("span",{className:"ok-list__title",children:s}),r!=null&&a.jsx("span",{className:"ok-list__desc",children:r}),i]}),n!=null&&a.jsx("span",{className:"ok-list__trailing",children:n})]})}),$l=c.forwardRef(function({items:e,layout:n="auto",divided:s,className:r,children:o,...i},l){return a.jsxs("dl",{ref:l,className:L("ok-dl",r),"data-layout":n,"data-divided":s?"":void 0,...i,children:[e==null?void 0:e.map((d,u)=>a.jsx(pa,{term:d.term,children:d.description},d.key??u)),o]})}),pa=c.forwardRef(function({term:e,className:n,children:s,...r},o){return a.jsxs("div",{ref:o,className:L("ok-dl__item",n),...r,children:[a.jsx("dt",{className:"ok-dl__term",children:e}),a.jsx("dd",{className:"ok-dl__desc",children:s})]})});function ma(t,e,n=1,s=1){const r=s*2+n*2+3;if(t<=r)return Array.from({length:t},(h,m)=>m+1);const o=Math.max(e-n,s+2),i=Math.min(e+n,t-s-1),l=o>s+2,d=i<t-s-1,u=(h,m)=>Array.from({length:Math.max(0,m-h+1)},(b,v)=>h+v),f=u(1,s),p=u(t-s+1,t);return!l&&d?[...u(1,s+n*2+2),0,...p]:l&&!d?[...f,0,...u(t-s-n*2-1,t)]:[...f,0,...u(o,i),0,...p]}const ba=c.forwardRef(function({count:e,page:n,defaultPage:s=1,onChange:r,siblings:o=1,boundaries:i=1,label:l,size:d="md",disabled:u,className:f,...p},h){const{messages:m}=he(),b=l??m.pagination.label,v=Math.max(1,Math.floor(e)),[g,w]=le(n,s,r),x=ye(g,1,v),j=k=>{u||w(ye(k,1,v))},_=ma(v,x,o,i);return a.jsxs("nav",{ref:h,"aria-label":b,className:L("ok-pagination",d==="sm"&&"ok-pagination--sm",f),...p,children:[a.jsxs("ul",{className:"ok-pagination__list",children:[a.jsx("li",{children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":m.pagination.prev,disabled:u||x<=1,onClick:()=>j(x-1),children:a.jsx(pe,{children:a.jsx("path",{d:"M12.500 4.500L7 10l5.500 5.500"})})})}),_.map((k,S)=>k===0?a.jsx("li",{className:"ok-pagination__gap","aria-hidden":"true",children:"…"},`gap-${S}`):a.jsx("li",{className:"ok-pagination__page",children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-focusable","aria-label":m.pagination.page(k),"aria-current":k===x?"page":void 0,disabled:u,onClick:()=>j(k),children:k})},k)),a.jsxs("li",{className:"ok-pagination__status","aria-hidden":"true",children:[x," / ",v]}),a.jsx("li",{children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":m.pagination.next,disabled:u||x>=v,onClick:()=>j(x+1),children:a.jsx(pe,{name:"chevron-right"})})})]}),a.jsx("span",{className:"ok-sr",role:"status",children:m.pagination.status(x,v)})]})}),Gs=a.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:a.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.9-6.4",pathLength:1})}),nn=(t,e)=>t.accessor?t.accessor(e):e[t.key],Pl=t=>t.label??(typeof t.header=="string"?t.header:t.key);function Il(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0})}function Ll({columns:t,data:e,rowKey:n,label:s,caption:r,sort:o,defaultSort:i=null,onSortChange:l,manualSort:d,selectable:u,selectedKeys:f,defaultSelectedKeys:p,onSelectionChange:h,getRowLabel:m,scroll:b,maxHeight:v,stackOnMobile:g,empty:w,noHighlight:x,rowAction:j,pageSize:_,page:k,defaultPage:S=1,onPageChange:M,className:C,style:A,onScroll:E,...N},y){const{messages:R}=he(),B=w===void 0?R.table.empty:w,D=c.useId(),I=c.useRef(null),O=c.useRef(null),T=c.useRef(null),[F,q]=le(o,i,l),[G,V]=le(f,p??[],h),[J,X]=c.useState(!1),P=(se,te)=>typeof n=="function"?n(se,te):n!=null?String(se[n]):String(te),z=c.useMemo(()=>{const se=e.map((ae,be)=>({row:ae,index:be})),te=F&&t.find(ae=>ae.key===F.key);if(!F||!te||d)return se;const me=F.direction==="desc"?-1:1,fe=te.compare??((ae,be)=>Il(nn(te,ae),nn(te,be)));return se.sort((ae,be)=>me*fe(ae.row,be.row)||ae.index-be.index)},[e,t,F,d]),$=_!=null&&_>0,Y=$?Math.max(1,Math.floor(_)):0,K=$?Math.max(1,Math.ceil(z.length/Y)):1,[ee,ie]=le(k,S,M),U=ye(ee,1,K),H=c.useMemo(()=>$?z.slice((U-1)*Y,U*Y):z,[z,$,U,Y]),re=H.map(se=>P(se.row,se.index)),de=new Set(G),ne=re.filter(se=>de.has(se)).length,oe=re.length>0&&ne===re.length,Q=ne>0&&!oe;ve(()=>{T.current&&(T.current.indeterminate=Q)},[Q]),c.useEffect(()=>{const se=I.current,te=O.current;if(!se||!te||typeof ResizeObserver>"u")return;const me=()=>X(se.scrollWidth>se.clientWidth+1);me();const fe=new ResizeObserver(me);return fe.observe(se),fe.observe(te),()=>fe.disconnect()},[]);const Z=c.useRef({cur:null,x:0,y:0,top:0,calm:void 0}),W=se=>{const te=O.current,me=Z.current;if(!te||se===me.cur)return;if(me.cur=se,!se){delete te.dataset.hl;return}const fe=()=>{const ae=se.getBoundingClientRect();te.style.setProperty("--hl-y",(ae.top-te.getBoundingClientRect().top).toFixed(2)+"px"),te.style.setProperty("--hl-h",ae.height.toFixed(2)+"px")};te.dataset.hl!==void 0?fe():(te.dataset.noAnim="",fe(),te.offsetWidth,delete te.dataset.noAnim,te.dataset.hl="")},ce=se=>{var me,fe;const te=(me=se==null?void 0:se.closest)==null?void 0:me.call(se,"tr");return te&&((fe=te.parentElement)==null?void 0:fe.tagName)==="TBODY"&&!te.hasAttribute("data-empty")?te:null},ue=se=>{if(se.pointerType==="touch")return;Z.current.x=se.clientX,Z.current.y=se.clientY;const te=ce(se.target);te&&W(te)},je=se=>{const te=se.currentTarget,me=O.current,fe=Z.current;me&&(te.scrollTop!==fe.top&&(fe.top=te.scrollTop,me.dataset.jumping="",clearTimeout(fe.calm),fe.calm=setTimeout(()=>{delete me.dataset.jumping},140)),!(!fe.cur||typeof document.elementFromPoint!="function")&&W(ce(document.elementFromPoint(fe.x,fe.y))))};c.useEffect(()=>()=>clearTimeout(Z.current.calm),[]),ve(()=>{W(null)},[H]);const De=se=>{!F||F.key!==se?q({key:se,direction:"asc"}):F.direction==="asc"?q({key:se,direction:"desc"}):q(null),$&&ie(1)},xt=()=>{V(oe?G.filter(se=>!re.includes(se)):Array.from(new Set([...G,...re])))},Ie=se=>V(de.has(se)?G.filter(te=>te!==se):[...G,se]),_e=b||J,Ce=s??(typeof r=="string"?r:void 0),ge=se=>g?{role:se}:null,tt=t.length+(u?1:0),nt=se=>L(se.numeric&&"is-num",se.align&&`ok-table__cell--${se.align}`)||void 0,Ue=t.some(se=>se.hideBelow),lt=v!=null?{"--ok-table-h":typeof v=="number"?`${v}px`:v}:void 0,st=a.jsxs("div",{ref:xe(y,I),className:L("ok-table",b&&"ok-table--scroll ok-scroll",g&&"ok-table--stack",C),"data-ready":x?void 0:"","data-responsive":Ue?"":void 0,style:lt?{...lt,...A}:A,..._e?{role:"region",tabIndex:0,"aria-label":Ce??R.table.label}:null,onScroll:Gt(E,x?void 0:je),...N,children:[a.jsxs("table",{ref:O,"aria-label":r==null?Ce:void 0,...ge("table"),children:[r!=null&&a.jsx("caption",{className:"ok-table__caption",children:r}),a.jsx("thead",{...ge("rowgroup"),children:a.jsxs("tr",{...ge("row"),children:[u&&a.jsx("th",{className:"ok-table__select",scope:"col",...ge("columnheader"),children:a.jsxs("label",{className:"ok-check",children:[a.jsx("input",{ref:T,type:"checkbox",checked:oe,onChange:xt,disabled:re.length===0,"aria-label":R.table.selectAll}),a.jsx("span",{className:"ok-check__box",children:Gs})]})}),t.map(se=>{const te=F&&F.key===se.key?F.direction:null;return a.jsx("th",{scope:"col",className:nt(se),"data-hide-below":se.hideBelow,style:se.width!=null?{width:se.width}:void 0,"aria-sort":se.sortable?te==="asc"?"ascending":te==="desc"?"descending":"none":void 0,...ge("columnheader"),children:se.sortable?a.jsxs("button",{type:"button",className:"ok-table__sort ok-focusable","data-dir":te??void 0,onClick:()=>De(se.key),children:[se.header,a.jsx(pe,{className:"ok-table__sort-icon",children:a.jsx("path",{d:"M10 15.500v-11M5.500 9L10 4.500 14.500 9"})})]}):se.header},se.key)})]})}),a.jsxs("tbody",{onPointerMove:x?void 0:ue,onPointerLeave:x?void 0:()=>W(null),...ge("rowgroup"),children:[H.length===0&&a.jsx("tr",{"data-empty":"",...ge("row"),children:a.jsx("td",{className:"ok-table__empty",colSpan:tt,...ge("cell"),children:B})}),H.map(({row:se,index:te},me)=>{const fe=re[me],ae=de.has(fe),be=t[0]?nn(t[0],se):void 0,Re=m?m(se,te):typeof be=="string"||typeof be=="number"?String(be):R.table.row(me+1),rt=(j==null?void 0:j(se,te))??null;return a.jsxs("tr",{"data-selected":u&&ae?"":void 0,"data-action":rt?"":void 0,"aria-selected":u?ae:void 0,...ge("row"),children:[u&&a.jsx("td",{className:"ok-table__select","data-label":R.table.selectColumn,...ge("cell"),children:a.jsxs("label",{className:"ok-check",children:[a.jsx("input",{type:"checkbox",checked:ae,onChange:()=>Ie(fe),"aria-label":R.table.selectRow(Re)}),a.jsx("span",{className:"ok-check__box",children:Gs})]})}),t.map((Ye,ct)=>{const At=Ye.render?Ye.render(se,te):nn(Ye,se);return a.jsxs("td",{className:L(nt(Ye),ct===0&&"ok-table__primary")||void 0,"data-label":Pl(Ye),"data-hide-below":Ye.hideBelow,...ge("cell"),children:[ct===0&&rt&&a.jsx("button",{type:"button",className:"ok-table__row-action ok-focusable","aria-label":rt.label,onClick:rt.onSelect}),g?a.jsx("span",{className:"ok-table__value",children:At}):At]},Ye.key)})]},fe)})]})]}),u&&a.jsx("span",{className:"ok-sr",role:"status",id:`${D}-count`,children:G.length>0?R.table.selected(G.length):""})]});return $?a.jsxs("div",{className:"ok-table-paged",children:[st,K>1&&a.jsx(ba,{className:"ok-table__pagination",label:R.table.pagination(Ce??R.table.label),count:K,page:U,onChange:ie})]}):st}const Dl=c.forwardRef(Ll),Ol=c.forwardRef(function({items:e,value:n,defaultValue:s,onChange:r,activation:o="auto",label:i,keepMounted:l=!1,unmountInactive:d,className:u,...f},p){var E;const h=d??!l,m=c.useId(),[b,v]=le(n,s??((E=e.find(N=>!N.disabled))==null?void 0:E.value)??"",r),g=Math.max(0,e.findIndex(N=>N.value===b)),w=c.useRef(null),x=c.useRef(null),j=c.useRef([]),_=c.useRef([]),k=c.useRef(null),S=c.useRef(null),M=c.useRef(g),C=ke(()=>{const N=w.current,y=j.current[g];!N||!y||(N.style.setProperty("--x",y.offsetLeft+"px"),N.style.setProperty("--w",y.offsetWidth+"px"))});ve(()=>{const N=M.current;M.current=g,C();const y=w.current,R=j.current[N],B=j.current[g];if(N===g||!y||!R||!B)return;const D=g>N?1:-1,I=R.offsetLeft,O=R.offsetWidth,T=B.offsetLeft,F=B.offsetWidth,q=Math.min(I,T),G=Math.max(I+O,T+F);if(Ne(x.current,[{transform:`translateX(${I}px)`,width:O+"px"},{transform:`translateX(${q}px)`,width:G-q+"px",offset:.42},{transform:`translateX(${T}px)`,width:F+"px"}],{duration:420,easing:ze.inOut}),y.scrollWidth>y.clientWidth&&typeof y.scrollTo=="function"){const $=Ge()===0?"auto":"smooth";T<y.scrollLeft?y.scrollTo({left:T-16,behavior:$}):T+F>y.scrollLeft+y.clientWidth&&y.scrollTo({left:T+F-y.clientWidth+16,behavior:$})}const V=_.current[N],J=_.current[g];if(V&&V!==J){V.dataset.leaving="";const $=()=>{delete V.dataset.leaving},Y=Ne(V,[{opacity:1,transform:"none"},{opacity:0,transform:`translateX(${-20*D}px)`}],{duration:150,easing:ze.in});Y?Y.finished.then($,$):$()}J&&Ne(J,[{opacity:0,transform:`translateX(${24*D}px)`},{opacity:1,transform:"none"}],{spring:"spring",delay:h?0:110});const X=k.current,P=S.current,z=(X==null?void 0:X.offsetHeight)??0;X&&P!==null&&Math.abs(z-P)>=1&&Ne(X,[{height:P+"px",overflow:"hidden"},{height:z+"px",overflow:"hidden"}],{spring:"soft"})},[g]),ve(()=>{var N;S.current=((N=k.current)==null?void 0:N.offsetHeight)??null}),c.useEffect(()=>{C();const N=w.current;if(!N||typeof ResizeObserver>"u")return;const y=new ResizeObserver(()=>C());return y.observe(N),j.current.forEach(R=>R&&y.observe(R)),()=>y.disconnect()},[e.length,C]);const A=N=>{var I;const y=e.map((O,T)=>O.disabled?-1:T).filter(O=>O>=0);if(!y.length)return;const R=j.current.findIndex(O=>O===document.activeElement),B=y.indexOf(R>=0?R:g);let D;if(N.key==="ArrowRight")D=y[(B+1)%y.length];else if(N.key==="ArrowLeft")D=y[(B-1+y.length)%y.length];else if(N.key==="Home")D=y[0];else if(N.key==="End")D=y[y.length-1];else return;N.preventDefault(),(I=j.current[D])==null||I.focus(),o==="auto"&&v(e[D].value)};return a.jsxs("div",{ref:p,className:L("ok-tabs",u),...f,children:[a.jsxs("div",{ref:w,className:"ok-tabs__list",role:"tablist","aria-label":i,"aria-orientation":"horizontal",onKeyDown:A,children:[e.map((N,y)=>a.jsx("button",{ref:R=>{j.current[y]=R},type:"button",role:"tab",id:`${m}-tab-${y}`,className:"ok-tabs__tab ok-focusable","aria-selected":y===g,"aria-controls":h&&y!==g?void 0:`${m}-panel-${y}`,tabIndex:y===g?0:-1,disabled:N.disabled,onClick:()=>v(N.value),children:N.label},N.value)),a.jsx("span",{ref:x,className:"ok-tabs__ink","aria-hidden":"true"})]}),a.jsx("div",{ref:k,className:"ok-tabs__panels","data-keep-mounted":h?void 0:"",children:e.map((N,y)=>h&&y!==g?null:a.jsx("div",{ref:R=>{_.current[y]=R},role:"tabpanel",id:`${m}-panel-${y}`,"aria-labelledby":`${m}-tab-${y}`,className:"ok-tabs__panel","data-state":y===g?"active":"inactive",tabIndex:y===g?0:-1,children:N.content},N.value))})]})}),Bl=c.forwardRef(function({items:e,type:n="multiple",value:s,defaultValue:r,onChange:o,collapsible:i=!0,headingLevel:l=3,variant:d="group",className:u,...f},p){const h=c.useId(),[m,b]=le(s,r??[],o),v=c.useRef([]),g=`h${l}`,w=j=>{const _=m.includes(j);n==="single"?_?i&&b([]):b([j]):b(_?m.filter(k=>k!==j):[...m,j])},x=j=>{const _=v.current.filter(M=>!!M&&!M.disabled),k=_.indexOf(j.target);if(k<0)return;let S;if(j.key==="ArrowDown")S=(k+1)%_.length;else if(j.key==="ArrowUp")S=(k-1+_.length)%_.length;else if(j.key==="Home")S=0;else if(j.key==="End")S=_.length-1;else return;j.preventDefault(),_[S].focus()};return a.jsx("div",{ref:p,className:L("ok-accordion",d==="group"?"ok-group":"ok-accordion--plain",u),onKeyDown:x,...f,children:e.map((j,_)=>{const k=m.includes(j.value),S=n==="single"&&k&&!i;return a.jsxs("div",{className:"ok-accordion__item","data-state":k?"open":"closed",children:[a.jsx(g,{className:"ok-accordion__heading",children:a.jsxs("button",{ref:M=>{v.current[_]=M},type:"button",id:`${h}-head-${_}`,className:"ok-accordion__head ok-focusable","aria-expanded":k,"aria-controls":`${h}-body-${_}`,"aria-disabled":S||void 0,disabled:j.disabled,onClick:()=>w(j.value),children:[a.jsx("span",{className:"ok-accordion__title",children:j.title}),a.jsx(pe,{name:"chevron-right"})]})}),a.jsx("div",{className:"ok-accordion__body",id:`${h}-body-${_}`,role:"region","aria-labelledby":`${h}-head-${_}`,children:a.jsx("div",{children:a.jsx("div",{className:"ok-accordion__content",children:j.content})})})]},j.value)})})}),Fl=c.forwardRef(function({items:e,label:n,maxItems:s,separator:r,className:o,...i},l){const{messages:d}=he(),u=n??d.breadcrumb.label,[f,p]=c.useState(!1),h=c.useRef(null),m=c.useRef(!1),b=e.length-1,v=e.length>2,g=s!=null&&e.length>s,w=a.jsx("span",{className:"ok-breadcrumb__sep","aria-hidden":"true",children:r??a.jsx(pe,{name:"chevron-right"})});return ve(()=>{var x,j;!f||!m.current||(m.current=!1,(j=(x=h.current)==null?void 0:x.querySelector("[data-middle] a, [data-middle] button"))==null||j.focus())},[f]),a.jsx("nav",{ref:l,"aria-label":u,className:L("ok-breadcrumb",o),"data-collapse":!v||f?void 0:g?"always":"narrow",...i,children:a.jsx("ol",{ref:h,className:"ok-breadcrumb__list",children:e.map((x,j)=>{const k=j===b?a.jsx("span",{className:"ok-breadcrumb__current","aria-current":"page",children:x.label}):x.href!==void 0?a.jsx("a",{className:"ok-breadcrumb__link ok-focusable",href:x.href,onClick:x.onClick,children:x.label}):x.onClick?a.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable",onClick:x.onClick,children:x.label}):a.jsx("span",{className:"ok-breadcrumb__text",children:x.label});return[a.jsxs("li",{className:"ok-breadcrumb__item","data-middle":j>0&&j<b?"":void 0,children:[j>0&&w,k]},j),j===0&&v&&!f?a.jsxs("li",{className:"ok-breadcrumb__item ok-breadcrumb__more",children:[w,a.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable","aria-label":d.breadcrumb.expand(e.length-2),"aria-expanded":!1,onClick:()=>{m.current=!0,p(!0)},children:a.jsx(pe,{name:"more"})})]},"more"):null]})})})}),zl=c.forwardRef(function({items:e,current:n=0,orientation:s="horizontal",status:r="default",label:o,className:i,...l},d){const{messages:u}=he(),f=o??u.steps.label;return a.jsx("ol",{ref:d,"aria-label":f,className:L("ok-steps",i),"data-orientation":s,...l,children:e.map((p,h)=>{const m=h<n?"complete":h===n?"current":"upcoming",b=m==="current"&&r==="error";return a.jsxs("li",{className:"ok-steps__item","data-state":m,"data-error":b?"":void 0,"aria-current":m==="current"?"step":void 0,children:[a.jsx("span",{className:"ok-steps__marker","aria-hidden":"true",children:m==="complete"?a.jsx(pe,{name:"check"}):b?a.jsx(pe,{name:"x"}):p.icon??h+1}),a.jsxs("span",{className:"ok-steps__text",children:[a.jsxs("span",{className:"ok-steps__title",children:[a.jsx("span",{className:"ok-sr",children:u.steps.prefix(h+1,b?u.steps.error:u.steps.state[m])}),p.title]}),p.description!=null&&a.jsx("span",{className:"ok-steps__desc",children:p.description})]})]},h)})})}),Hl=c.forwardRef(function({items:e,className:n,...s},r){return a.jsx("ol",{ref:r,className:L("ok-timeline",n),...s,children:e.map((o,i)=>a.jsxs("li",{className:"ok-timeline__item","data-tone":o.tone??"neutral",children:[a.jsx("span",{className:"ok-timeline__marker","data-icon":o.icon!=null?"":void 0,"aria-hidden":"true",children:o.icon}),a.jsxs("div",{className:"ok-timeline__content",children:[a.jsxs("div",{className:"ok-timeline__head",children:[a.jsx("span",{className:"ok-timeline__title",children:o.title}),o.time!=null&&a.jsx("time",{className:"ok-timeline__time",dateTime:o.dateTime,children:o.time})]}),o.description!=null&&a.jsx("div",{className:"ok-timeline__desc",children:o.description})]})]},o.key??i))})}),ql=c.forwardRef(function({items:e,expanded:n,defaultExpanded:s,onExpandedChange:r,selected:o,defaultSelected:i=null,onSelect:l,label:d,className:u,...f},p){var y;const[h,m]=le(n,s??[],r),[b,v]=le(o,i,l),[g,w]=c.useState(b),x=c.useRef(new Map),j=new Set(h),_=[],k=(R,B,D)=>R.forEach(I=>{var O;_.push({node:I,level:B,parent:D}),(O=I.children)!=null&&O.length&&j.has(I.id)&&k(I.children,B+1,I.id)});k(e,1,null);const S=_.filter(R=>!R.node.disabled),M=S.some(R=>R.node.id===g)?g:((y=S[0])==null?void 0:y.node.id)??null,C=R=>{var B;R!=null&&(w(R),(B=x.current.get(R))==null||B.focus())},A=(R,B)=>m(B?[...h.filter(D=>D!==R),R]:h.filter(D=>D!==R)),E=R=>{var q,G,V,J;const B=R.target;if(B.getAttribute("role")!=="treeitem")return;const D=S.findIndex(X=>X.node.id===B.dataset.id);if(D<0)return;const{node:I,parent:O}=S[D],T=!!((q=I.children)!=null&&q.length);let F=!0;switch(R.key){case"ArrowDown":C((G=S[D+1])==null?void 0:G.node.id);break;case"ArrowUp":C((V=S[D-1])==null?void 0:V.node.id);break;case"Home":C(S[0].node.id);break;case"End":C(S[S.length-1].node.id);break;case"ArrowRight":T&&!j.has(I.id)?A(I.id,!0):T&&C((J=I.children.find(X=>!X.disabled))==null?void 0:J.id);break;case"ArrowLeft":T&&j.has(I.id)?A(I.id,!1):O&&C(O);break;case"Enter":case" ":v(I.id),T&&A(I.id,!j.has(I.id));break;default:F=!1}F&&R.preventDefault()},N=(R,B)=>R.map((D,I)=>{var F;const O=!!((F=D.children)!=null&&F.length),T=O&&j.has(D.id);return a.jsxs("li",{ref:q=>{q?x.current.set(D.id,q):x.current.delete(D.id)},role:"treeitem","data-id":D.id,className:"ok-tree__item","aria-level":B,"aria-setsize":R.length,"aria-posinset":I+1,"aria-expanded":O?T:void 0,"aria-selected":b===D.id,"aria-disabled":D.disabled||void 0,tabIndex:M===D.id?0:-1,onFocus:q=>{q.target===q.currentTarget&&w(D.id)},children:[a.jsxs("div",{className:"ok-tree__row",onClick:()=>{D.disabled||(w(D.id),v(D.id),O&&A(D.id,!T))},children:[a.jsx("span",{className:"ok-tree__chev","aria-hidden":"true",children:O&&a.jsx(pe,{name:"chevron-right"})}),D.icon!=null&&a.jsx("span",{className:"ok-tree__icon","aria-hidden":"true",children:D.icon}),a.jsx("span",{className:"ok-tree__label",children:D.label})]}),T&&a.jsx("ul",{role:"group",className:"ok-tree__group",children:N(D.children,B+1)})]},D.id)});return a.jsx("ul",{ref:p,role:"tree","aria-label":d,className:L("ok-tree",u),onKeyDown:E,...f,children:N(e,1)})}),Vl=c.forwardRef(function({tone:e="neutral",variant:n="soft",dot:s,ping:r,className:o,children:i,...l},d){return a.jsxs("span",{ref:d,className:L("ok-badge",e!=="neutral"&&`ok-badge--${e}`,n==="solid"&&"ok-badge--solid",n==="ink"&&"ok-badge--ink",o),...l,children:[(s||r)&&a.jsx("span",{className:L("ok-dot",r&&"ok-dot--live"),"aria-hidden":"true"}),i]})}),Wl=c.forwardRef(function({tone:e="neutral",size:n="md",icon:s,onRemove:r,removeLabel:o,className:i,children:l,...d},u){const{messages:f}=he(),p=typeof l=="string"||typeof l=="number"?String(l):"";return a.jsxs("span",{ref:u,className:L("ok-tag",n==="sm"&&"ok-tag--sm",i),"data-tone":e,...d,children:[s!=null&&a.jsx("span",{className:"ok-tag__icon","aria-hidden":"true",children:s}),a.jsx("span",{className:"ok-tag__label",children:l}),r&&a.jsx("button",{type:"button",className:"ok-tag__remove ok-focusable","aria-label":o??f.tag.remove(p),onClick:r,children:a.jsx(pe,{name:"x"})})]})}),yn=c.forwardRef(function({value:e,direction:n="auto",className:s,...r},o){const i=c.useRef(null),l=c.useRef(null),d=c.useRef(e);return ve(()=>{const u=d.current;if(u===e)return;d.current=e;const f=i.current,p=l.current;if(!f||!p)return;const h=n==="auto"?Number(e)<Number(u)?-1:1:n,m=document.createElement("span");m.textContent=String(u),m.setAttribute("aria-hidden","true"),f.insertBefore(m,p);const b=()=>m.remove(),v=Ne(m,[{transform:"translateY(0)",opacity:1},{transform:`translateY(${-h*80}%)`,opacity:0}],{duration:150,easing:ze.in,fill:"forwards"});v?v.finished.then(b,b):b(),Ne(p,[{transform:`translateY(${h*80}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"})},[e,n]),a.jsx("span",{ref:xe(o,i),className:L("ok-roll",s),...r,children:a.jsx("span",{ref:l,children:e})})}),Gl=c.forwardRef(function({value:e,max:n=99,showZero:s,tone:r="accent",label:o,className:i,...l},d){const u=c.useRef(null),f=c.useRef(e);if(ve(()=>{f.current!==e&&(f.current=e,Ne(u.current,[{transform:"scale(1)"},{transform:"scale(1.35)",offset:.3},{transform:"scale(1)"}],{duration:Gn.bouncy.duration,easing:ze.out}))},[e]),e===0&&!s)return null;const p=e>n?`${n}+`:String(e);return a.jsxs("span",{ref:xe(d,u),className:L("ok-count",i),"data-tone":r==="accent"?void 0:r,...l,children:[a.jsx(yn,{value:p,direction:e>=f.current?1:-1,"aria-hidden":o?!0:void 0}),o&&a.jsx("span",{className:"ok-sr",children:o})]})}),Ul={neutral:"info",accent:"sparkle",info:"info",success:"check",warning:"alert",danger:"alert"},Yl=c.forwardRef(function({tone:e="accent",title:n,icon:s,action:r,closable:o,open:i,defaultOpen:l=!0,onOpenChange:d,onClose:u,closeLabel:f,className:p,children:h,...m},b){const{messages:v}=he(),g=f??v.common.close,[w,x]=le(i,l,d),{mounted:j,ref:_}=Ut(w,700);if(!j)return null;const k=a.jsxs("div",{ref:b,role:e==="warning"||e==="danger"?"alert":"status",className:L("ok-alert",e!=="accent"&&`ok-alert--${e}`,p),...m,children:[s!==!1&&(s??a.jsx(pe,{name:Ul[e]})),a.jsxs("div",{className:"ok-alert__body",children:[n!=null&&a.jsx("b",{className:"ok-alert__title",children:n}),h]}),r!=null&&a.jsx("div",{className:"ok-alert__action",children:r}),o&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-alert__close","aria-label":g,onClick:()=>{u==null||u(),x(!1)},children:a.jsx(pe,{name:"x"})})]});return a.jsx("div",{ref:_,className:"ok-collapse ok-alert-wrap","data-state":w?"open":"closed",children:k})}),Xl=c.forwardRef(function({value:e,max:n=100,label:s,tone:r="accent",size:o="md",noDoneState:i,className:l,style:d,...u},f){const p=e!=null,h=p?ye(e/(n||1),0,1):0;return a.jsx("div",{ref:f,role:"progressbar","aria-label":s,"aria-valuemin":p?0:void 0,"aria-valuemax":p?n:void 0,"aria-valuenow":p?ye(e,0,n):void 0,className:L("ok-progress",!p&&"ok-progress--indeterminate",o!=="md"&&`ok-progress--${o}`,l),"data-tone":r==="accent"?void 0:r,"data-done":p&&h>=1&&!i?"":void 0,style:{"--v":h,...d},...u,children:a.jsx("div",{className:"ok-progress__bar"})})}),Kl={sm:40,md:64,lg:96},Jl=c.forwardRef(function({value:e=0,max:n=100,label:s,size:r="md",thickness:o=6,showValue:i,noDoneState:l,className:d,style:u,children:f,...p},h){const m=ye(e/(n||1),0,1),b=typeof r=="number"?r:Kl[r],v=i??b>=56;return a.jsxs("div",{ref:h,role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":ye(e,0,n),className:L("ok-ring",d),"data-done":m>=1&&!l?"":void 0,style:{"--v":m,"--size":`${b}px`,...u},...p,children:[a.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",style:{strokeWidth:o},children:[a.jsx("circle",{className:"ok-ring__track",cx:"18",cy:"18",r:"15"}),a.jsx("circle",{className:"ok-ring__bar",cx:"18",cy:"18",r:"15",pathLength:100})]}),f!=null?a.jsx("span",{className:"ok-ring__label",children:f}):v?a.jsx(yn,{className:"ok-ring__label",value:Math.round(m*100),"aria-hidden":"true"}):null]})}),Zl=c.forwardRef(function({value:e,min:n=0,max:s=100,segments:r=10,label:o,valueText:i,tone:l,warnAt:d,dangerAt:u,size:f="md",className:p,...h},m){const b=Math.max(1,Math.floor(r)),v=ye(e,n,s),g=Math.round((v-n)/(s-n||1)*b);return a.jsx("div",{ref:m,role:"meter","aria-label":o,"aria-valuemin":n,"aria-valuemax":s,"aria-valuenow":v,"aria-valuetext":i,className:L("ok-level",f!=="md"&&`ok-level--${f}`,p),"data-tone":l,...h,children:Array.from({length:b},(w,x)=>{const j=n+(s-n)*x/b,_=u!=null&&j>=u?"danger":d!=null&&j>=d?"warning":void 0;return a.jsx("i",{className:"ok-level__seg","data-on":x<g?"":void 0,"data-zone":_},x)})})}),wt=t=>typeof t=="number"?`${t}px`:t,Ql=c.forwardRef(function({variant:e="text",width:n,height:s,lines:r=1,className:o,style:i,...l},d){const u=L("ok-skel",e==="circle"&&"ok-skel--circle",e==="rect"&&"ok-skel--rect");if(e==="text"&&r>1)return a.jsx("span",{ref:d,"aria-hidden":"true",className:L("ok-skel-lines",o),style:{width:wt(n),...i},...l,children:Array.from({length:r},(p,h)=>a.jsx("span",{className:u,style:{height:wt(s),width:h===r-1?"70%":void 0}},h))});const f=e==="circle"?{width:wt(n??s),height:wt(s??n)}:{width:wt(n),height:wt(s)};return a.jsx("span",{ref:d,"aria-hidden":"true",className:L(u,o),style:{...f,...i},...l})}),ec={sm:20,md:28,lg:40},tc=c.forwardRef(function({variant:e="tail",size:n="md",label:s,className:r,style:o,...i},l){const{messages:d}=he(),u=s??d.common.loading,f=typeof n=="number"?n:ec[n];return a.jsxs("span",{ref:l,role:"status",className:L("ok-loader",r),style:{"--size":`${f}px`,...o},...i,children:[e==="tail"?a.jsx(Zn,{className:"ok-tail"}):a.jsx("span",{className:"ok-spinner","aria-hidden":"true"}),a.jsx("span",{className:"ok-sr",children:u})]})}),nc=c.forwardRef(function({label:e,className:n,...s},r){const{messages:o}=he(),i=e??o.common.loading;return a.jsxs("span",{ref:r,role:"status",className:L("ok-dots",n),...s,children:[a.jsx("i",{"aria-hidden":"true"}),a.jsx("i",{"aria-hidden":"true"}),a.jsx("i",{"aria-hidden":"true"}),a.jsx("span",{className:"ok-sr",children:i})]})}),sc=c.forwardRef(function({icon:e,title:n,description:s,actions:r,titleAs:o="h3",size:i="md",className:l,children:d,...u},f){return a.jsxs("div",{ref:f,className:L("ok-empty",i!=="md"&&`ok-empty--${i}`,l),...u,children:[e!=null&&a.jsx("div",{className:"ok-empty__media","aria-hidden":"true",children:e}),a.jsx(o,{className:"ok-empty__title",children:n}),s!=null&&a.jsx("p",{className:"ok-empty__desc",children:s}),d,r!=null&&a.jsx("div",{className:"ok-empty__actions",children:r})]})}),rc=c.forwardRef(function({label:e,value:n,delta:s,trend:r,positive:o="up",hint:i,icon:l,variant:d="card",className:u,...f},p){const h=he().messages.stat.trend,m=r??(s!=null?"flat":void 0),b=!m||m==="flat"?"neutral":m===o?"good":"bad";return a.jsxs("div",{ref:p,className:L("ok-stat",d==="card"&&"ok-card",u),...f,children:[a.jsxs("div",{className:"ok-stat__label",children:[l!=null&&a.jsx("span",{className:"ok-stat__icon","aria-hidden":"true",children:l}),a.jsx("span",{children:e})]}),a.jsx("div",{className:"ok-stat__value",children:n}),(m||i!=null)&&a.jsxs("div",{className:"ok-stat__foot",children:[m&&a.jsxs("span",{className:"ok-stat__delta","data-trend":m,"data-mood":b,children:[a.jsx(pe,{children:m==="flat"?a.jsx("path",{d:"M4.500 10h11"}):a.jsx("path",{d:m==="up"?"M10 15.500v-11M5.500 9L10 4.500 14.500 9":"M10 4.500v11M5.500 11l4.500 4.500 4.500-4.500"})}),a.jsx("span",{className:"ok-sr",children:h[m]}),s]}),i!=null&&a.jsx("span",{className:"ok-stat__hint",children:i})]})]})}),ac={sm:28,md:36,lg:48},Us=["#FF8FA9","#FFBE3B","#4CD787","#D9A6FF","#7FB0FF","#FF9A5C"];function va(t){const e=t.trim();if(!e)return"";const n=Array.from(e)[0];if(/[⺀-鿿가-힯豈-﫿]/.test(n))return n;const s=e.split(/[\s._-]+/).filter(Boolean),r=Array.from(s[0])[0]??"",o=s.length>1?Array.from(s[s.length-1])[0]:"";return(r+o).toUpperCase()}const ga=c.createContext(void 0),hs=c.forwardRef(function({src:e,name:n,alt:s,size:r,color:o,status:i,statusLabel:l,decorative:d,className:u,style:f,children:p,...h},m){const b=c.useContext(ga),v=r??b??"md",g=typeof v=="number"?v:ac[v],[w,x]=c.useState(!1);c.useEffect(()=>{x(!1)},[e]);const{messages:j}=he(),k=[s??n,i?l??j.avatar.status[i]:void 0].filter(Boolean).join(j.common.separator);let S=o;if(o==="auto"){let C=0;for(const A of n??"")C=C*31+(A.codePointAt(0)??0)>>>0;S=Us[C%Us.length]}const M={"--size":`${g}px`,...S?{"--c":S}:null};return a.jsxs("span",{ref:m,className:L("ok-avatar",u),style:{...M,...f},...k&&!d?{role:"img","aria-label":k}:{"aria-hidden":!0},...h,children:[a.jsx("span",{className:"ok-avatar__fallback","aria-hidden":"true",children:p??(n?va(n):a.jsxs(pe,{children:[a.jsx("circle",{cx:"10",cy:"7.500",r:"3"}),a.jsx("path",{d:"M4 16.500c.8-2.800 3.100-4.300 6-4.300s5.200 1.500 6 4.300"})]}))}),e&&!w&&a.jsx("img",{className:"ok-avatar__img",src:e,alt:"",onError:()=>x(!0),draggable:!1}),i&&a.jsx("span",{className:"ok-avatar__status","data-status":i,"aria-hidden":"true"})]})});function oc({extra:t,members:e,label:n,total:s}){const{messages:r}=he(),[o,i]=c.useState(!1),l=c.useRef(null),d=c.useRef(null),u=c.useRef(),f=c.useId();vn({open:o,anchorRef:l,floatingRef:d,placement:"bottom",offset:8}),Yt(o,()=>i(!1)),c.useEffect(()=>()=>clearTimeout(u.current),[]);const p=x=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!0),x)},h=()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!1),160)},[m,b]=c.useState("closed"),[v,g]=c.useState(!1);c.useEffect(()=>{if(o){g(!0);const j=requestAnimationFrame(()=>requestAnimationFrame(()=>b("open")));return()=>cancelAnimationFrame(j)}b("closed");const x=setTimeout(()=>g(!1),200*Ge());return()=>clearTimeout(x)},[o]);const w=e.map(x=>x.props.name||x.props.alt).filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("button",{ref:l,type:"button",className:"ok-avatars__more ok-focusable","aria-expanded":o,"aria-controls":v?f:void 0,"aria-label":r.avatar.moreButton(t,n),onPointerEnter:x=>{x.pointerType!=="touch"&&p(120)},onPointerLeave:h,onFocus:()=>p(0),onBlur:h,onClick:()=>i(x=>!x),children:a.jsxs(hs,{className:"ok-avatar--more",decorative:!0,children:["+",t]})}),v&&a.jsx(vt,{children:a.jsxs("div",{ref:d,id:f,className:"ok-popup ok-popup--surface ok-avatars__panel","data-state":m,role:"group","aria-label":r.avatar.panel(s,n),onPointerEnter:()=>clearTimeout(u.current),onPointerLeave:h,children:[a.jsx("ul",{className:"ok-avatars__list ok-scroll",children:e.map((x,j)=>a.jsxs("li",{className:"ok-avatars__item",children:[c.cloneElement(x,{size:"sm",decorative:!0}),a.jsx("span",{className:"ok-avatars__name",children:x.props.name||x.props.alt})]},x.key??j))}),s>w.length&&a.jsx("p",{className:"ok-avatars__rest",children:r.avatar.rest(s-w.length)})]})})]})}const ic=c.forwardRef(function({max:e,total:n,size:s,label:r,overflowList:o=!0,className:i,children:l,...d},u){const{messages:f}=he(),p=c.Children.toArray(l),h=e!=null&&p.length>e?p.slice(0,e):p,m=Math.max(0,(n??p.length)-h.length),b=p.filter(g=>c.isValidElement(g)),v=o&&b.some(g=>g.props.name||g.props.alt);return a.jsx("div",{ref:u,role:"group","aria-label":r,className:L("ok-avatars",i),...d,children:a.jsxs(ga.Provider,{value:s,children:[h,m>0&&(v?a.jsx(oc,{extra:m,members:b,label:r,total:n??p.length}):a.jsxs(hs,{className:"ok-avatar--more",alt:f.avatar.more(m),children:["+",m]}))]})})});function xa(t,e,n={}){if(typeof document>"u"||Ge()===0)return;const s=n.count??12,r=getComputedStyle(n.source??document.documentElement),o=n.colors??[r.getPropertyValue("--ok-accent").trim()||"#FF6B8E",r.getPropertyValue("--ok-accent-tint-2").trim()||"#FFC4D2",r.getPropertyValue("--ok-text").trim()||"#1B1C22"];for(let i=0;i<s;i++){const l=document.createElement("i");l.className="ok-particle",l.setAttribute("aria-hidden","true");const d=4+Math.random()*6,u=i/s*Math.PI*2+(Math.random()-.5)*.5,f=(n.distance??46)*(.6+Math.random()*.7);l.style.cssText=`width:${d}px;height:${d}px;margin:${-d/2}px 0 0 ${-d/2}px;background:${o[i%o.length]}`,document.body.appendChild(l);const p=Math.cos(u)*f,h=Math.sin(u)*f,m=()=>l.remove(),b=Ne(l,[{transform:`translate(${t}px,${e}px) scale(0)`,opacity:1},{transform:`translate(${t+p*.8}px,${e+h*.8}px) scale(1)`,opacity:1,offset:.4},{transform:`translate(${t+p}px,${e+h+14}px) scale(0)`,opacity:0}],{duration:620+Math.random()*260,easing:ze.out,fill:"forwards"});b?b.finished.then(m,m):m()}}const lc=a.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[a.jsx("ellipse",{cx:"12",cy:"12",rx:"8.5",ry:"6.5"}),a.jsx("ellipse",{className:"nostril",cx:"9",cy:"12",rx:"1.2",ry:"1.9"}),a.jsx("ellipse",{className:"nostril",cx:"15",cy:"12",rx:"1.2",ry:"1.9"})]}),cc=c.forwardRef(function({pressed:e,defaultPressed:n=!1,onChange:s,count:r,label:o,icon:i,noBurst:l,className:d,onClick:u,children:f,...p},h){const{messages:m}=he(),b=o??m.reaction.label,[v,g]=le(e,n,s),w=c.useRef(null),x=j=>{var k,S;const _=!v;if(g(_),_&&!l){const M=(S=(k=w.current)==null?void 0:k.querySelector(".ok-react__icon"))==null?void 0:S.getBoundingClientRect();M&&xa(M.left+M.width/2,M.top+M.height/2,{source:w.current??void 0})}};return a.jsxs("button",{ref:xe(h,w),type:"button",className:L("ok-react ok-focusable",d),"aria-pressed":v,"data-icon-only":r==null&&f==null?"":void 0,onClick:Gt(u,x),...p,children:[a.jsx("span",{className:"ok-react__icon",children:i??lc}),a.jsx("span",{className:"ok-sr",children:b}),f,r!=null&&a.jsx(yn,{className:"ok-react__count",value:r+(v?1:0)})]})}),dc=c.forwardRef(function({className:e,...n},s){return a.jsx("code",{ref:s,className:L("ok-code",e),...n})});async function uc(t){var s;if((s=navigator.clipboard)!=null&&s.writeText)return navigator.clipboard.writeText(t);const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="position:fixed;left:-9999px;top:0;opacity:0",document.body.appendChild(e),e.select();const n=document.execCommand("copy");if(e.remove(),!n)throw new Error("copy failed")}const fc=c.forwardRef(function({code:e,children:n,language:s,title:r,copyable:o=!0,wrap:i,maxHeight:l,label:d,onCopy:u,className:f,...p},h){const{messages:m}=he(),b=e??n??"",[v,g]=c.useState("idle"),w=c.useRef();c.useEffect(()=>()=>clearTimeout(w.current),[]);const x=async()=>{let k="copied";try{await uc(b),u==null||u(b)}catch{k="failed"}g(k),clearTimeout(w.current),w.current=setTimeout(()=>g("idle"),2e3)},j=r!=null||!!s,_=d??(typeof r=="string"?r:void 0)??s??m.code.label;return a.jsxs("div",{ref:h,className:L("ok-codeblock",f),"data-head":j?"":void 0,...p,children:[(j||o)&&a.jsxs("div",{className:"ok-codeblock__head",children:[r!=null&&a.jsx("span",{className:"ok-codeblock__title",children:r}),s&&a.jsx("span",{className:"ok-codeblock__lang",children:s}),o&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-codeblock__copy","aria-label":m.code.copy,"data-state":v,onClick:x,children:a.jsx(pe,{name:v==="copied"?"check":v==="failed"?"x":"copy"})})]}),a.jsx("pre",{className:"ok-codeblock__pre ok-scroll",tabIndex:0,role:"group","aria-label":_,"data-wrap":i?"":void 0,style:l!=null?{maxHeight:typeof l=="number"?`${l}px`:l}:void 0,children:a.jsx("code",{className:s?`language-${s}`:void 0,children:b})}),a.jsx("span",{className:"ok-sr",role:"status","aria-live":"polite",children:v==="copied"?m.code.copied:v==="failed"?m.code.copyFailed:""})]})}),ka=t=>{const e=t!=null&&t!==c.Fragment;return{Tag:e?t:"div",box:e}},hc=c.forwardRef(function({as:e,above:n,below:s,className:r,...o},i){const{Tag:l,box:d}=ka(e);return a.jsx(l,{ref:i,className:L("ok-show",r),"data-box":d?"":void 0,"data-ok-hide-below":n,"data-ok-hide-above":s,...o})}),pc=c.forwardRef(function({as:e,above:n,below:s,className:r,...o},i){const{Tag:l,box:d}=ka(e);return a.jsx(l,{ref:i,className:L("ok-show",r),"data-box":d?"":void 0,"data-ok-hide-below":s,"data-ok-hide-above":n,...o})}),mc=["base","sm","md","lg","xl"];function bc(t){return typeof t=="object"&&t!==null}const Qe=t=>t===0?"0px":`var(--ok-s-${t})`,vc=t=>t*4,gc={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},xc={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},kc=t=>gc[t],yc=t=>xc[t];function Be(t,e,n){const s={};if(e==null)return s;const r=`--ok-l-${t}`;if(!bc(e))return s[r]=String(n(e)),s;let o;for(const i of mc){const l=e[i];l!==void 0&&(o=String(n(l))),o!==void 0&&(s[i==="base"?r:`${r}-${i}`]=o)}return s}function it(t,e){return{...Be("gap",t.gap,Qe),...Be("rgap",t.rowGap,Qe),...Be("p",t.padding,Qe),...Be("px",t.paddingX,Qe),...Be("py",t.paddingY,Qe),...Be("align",t.align,kc),...Be("justify",t.justify,yc),...e}}const Xt=t=>t.padding!==void 0||t.paddingX!==void 0||t.paddingY!==void 0?"":void 0,wc=c.forwardRef(function({as:e,padding:n,paddingX:s,paddingY:r,radius:o,surface:i,border:l,highlight:d,className:u,style:f,...p},h){const m=e??"div",b={};return o!==void 0&&(b["--ok-box-r"]=o===0?"0px":`var(--ok-r-${o})`),i&&(b["--ok-box-bg"]=`var(--ok-${i})`),a.jsx(m,{ref:h,className:L("ok-l ok-box",u),"data-pad":Xt({padding:n,paddingX:s,paddingY:r}),"data-radius":o,"data-surface":i,"data-border":l?l==="strong"?"strong":"line":void 0,"data-highlight":d?"":void 0,style:it({padding:n,paddingX:s,paddingY:r},{...b,...f}),...p})}),ya=c.forwardRef(function({orientation:e="horizontal",labelAlign:n="center",decorative:s,className:r,children:o,...i},l){const d=o!=null&&o!==!1&&e==="horizontal";return a.jsx("div",{ref:l,role:s?"none":"separator","aria-orientation":!s&&e==="vertical"?"vertical":void 0,"aria-label":!s&&d&&typeof o=="string"?o:void 0,className:L("ok-divider",d&&"ok-divider--label",r),"data-orientation":e,"data-label-align":d?n:void 0,...i,children:d?a.jsx("span",{className:"ok-divider__label",children:o}):null})}),_c=c.forwardRef(function({as:e,gap:n,align:s,justify:r,divider:o,padding:i,paddingX:l,paddingY:d,className:u,style:f,children:p,...h},m){const b=e??"div";let v=p;return o&&(v=c.Children.toArray(p).filter(w=>w!=null&&typeof w!="boolean").map((w,x)=>a.jsxs(c.Fragment,{children:[x>0&&(o===!0?a.jsx(ya,{}):o),w]},c.isValidElement(w)&&w.key!=null?w.key:x))),a.jsx(b,{ref:m,className:L("ok-l ok-stack",u),"data-pad":Xt({padding:i,paddingX:l,paddingY:d}),style:it({gap:n,align:s,justify:r,padding:i,paddingX:l,paddingY:d},f),...h,children:v})}),wa=c.forwardRef(function({as:e,gap:n,rowGap:s,align:r,justify:o,wrap:i=!0,padding:l,paddingX:d,paddingY:u,className:f,style:p,...h},m){const b=e??"div";return a.jsx(b,{ref:m,className:L("ok-l ok-inline",f),"data-nowrap":i?void 0:"","data-pad":Xt({padding:l,paddingX:d,paddingY:u}),style:it({gap:n,rowGap:s,align:r,justify:o,padding:l,paddingX:d,paddingY:u},p),...h})}),jc=wa,Nc={start:"start",center:"center",end:"end",stretch:"stretch"},Mc={start:"start",center:"center",end:"end",stretch:"stretch",baseline:"baseline"},Rc=c.forwardRef(function({as:e,columns:n,minItemWidth:s,gap:r,rowGap:o,align:i,justify:l,padding:d,paddingX:u,paddingY:f,className:p,style:h,...m},b){const v=e??"div",g=s!==void 0,w={...Be("cols",g?void 0:n,x=>Math.max(1,Math.round(x))),...Be("align",i,x=>Mc[x]),...Be("justify",l,x=>Nc[x]),...g?{"--ok-grid-min":typeof s=="number"?`${s}px`:s}:null};return a.jsx(v,{ref:b,className:L("ok-l ok-grid",p),"data-auto":g?"":void 0,"data-pad":Xt({padding:d,paddingX:u,paddingY:f}),style:it({gap:r,rowGap:o,padding:d,paddingX:u,paddingY:f},{...w,...h}),...m})}),Sc=c.forwardRef(function({as:e,span:n,rowSpan:s,className:r,style:o,...i},l){const d=e??"div",u=Be("span",n,f=>f==="full"?"1 / -1":`span ${Math.max(1,Math.round(f))}`);return a.jsx(d,{ref:l,className:L("ok-l ok-grid__item",r),style:{...u,...s?{gridRow:`span ${s}`}:null,...o},...i})}),Cc=c.forwardRef(function({as:e,size:n="lg",gutter:s=!0,center:r=!0,className:o,...i},l){const d=e??"div";return a.jsx(d,{ref:l,className:L("ok-container",o),"data-size":n,"data-gutter":s?void 0:"false","data-center":r?void 0:"false",...i})}),Ec=c.forwardRef(function({as:e,axis:n="both",inline:s,padding:r,paddingX:o,paddingY:i,className:l,style:d,...u},f){const p=e??"div";return a.jsx(p,{ref:f,className:L("ok-l ok-center",l),"data-axis":n,"data-inline":s?"":void 0,"data-pad":Xt({padding:r,paddingX:o,paddingY:i}),style:it({padding:r,paddingX:o,paddingY:i},d),...u})}),Ac=c.forwardRef(function({size:e,className:n,style:s,...r},o){return a.jsx("div",{ref:o,"aria-hidden":"true",className:L("ok-spacer",n),style:e!==void 0?{flex:`0 0 ${Qe(e)}`,...s}:s,...r})}),Tc=c.forwardRef(function({ratio:e=16/9,className:n,style:s,...r},o){return a.jsx("div",{ref:o,className:L("ok-aspect",n),style:{aspectRatio:String(e),...s},...r})}),$c=c.forwardRef(function({as:e,edge:n="top",offset:s=0,className:r,style:o,...i},l){const d=e??"div";return a.jsx(d,{ref:l,className:L("ok-sticky",r),"data-edge":n,style:{[n]:typeof s=="number"?Qe(s):s,...o},...i})}),Pc=c.forwardRef(function({direction:e="vertical",label:n,focusable:s=!0,className:r,role:o,tabIndex:i,...l},d){const u=!!(n??l["aria-label"]??l["aria-labelledby"]);return a.jsx("div",{ref:d,role:o??(u?"region":"group"),"aria-label":n,tabIndex:i??(s?0:void 0),className:L("ok-scroll ok-scroll-area",r),"data-direction":e,...l})}),Ic=c.forwardRef(function({as:e,size:n="lg",gap:s,padded:r=!0,className:o,style:i,...l},d){const u=e??"div";return a.jsx(u,{ref:d,className:L("ok-l ok-container ok-page",o),"data-size":n,"data-padded":r?void 0:"false",style:it({gap:s},i),...l})}),Lc=c.forwardRef(function({title:e,description:n,breadcrumb:s,actions:r,headingLevel:o=1,titleId:i,className:l,children:d,...u},f){const p=`h${o}`;return a.jsxs("header",{ref:f,className:L("ok-page-header",l),...u,children:[s?a.jsx("div",{className:"ok-page-header__breadcrumb",children:s}):null,a.jsxs("div",{className:"ok-page-header__row",children:[a.jsxs("div",{className:"ok-page-header__text",children:[a.jsx(p,{id:i,className:"ok-page-header__title",children:e}),n?a.jsx("p",{className:"ok-page-header__desc",children:n}):null]}),r?a.jsx("div",{className:"ok-page-header__actions",children:r}):null]}),d]})}),Dc=c.forwardRef(function({title:e,description:n,actions:s,headingLevel:r=2,gap:o,className:i,style:l,children:d,...u},f){const p=c.useId(),h=`h${r}`,m=e!=null&&e!==!1,b=u["aria-labelledby"]??(m&&!u["aria-label"]?p:void 0);return a.jsxs("section",{ref:f,className:L("ok-l ok-section",i),style:it({gap:o},l),...u,"aria-labelledby":b,children:[m||s?a.jsxs("div",{className:"ok-section__head",children:[a.jsxs("div",{className:"ok-section__text",children:[m?a.jsx(h,{id:p,className:"ok-section__title",children:e}):null,n?a.jsx("p",{className:"ok-section__desc",children:n}):null]}),s?a.jsx("div",{className:"ok-section__actions",children:s}):null]}):null,d]})}),Oc='a[href], button, input:not([type="hidden"]), select, textarea, [tabindex]';function In(t){return Array.from(t.querySelectorAll(Oc)).filter(e=>!e.disabled&&e.getAttribute("aria-hidden")!=="true"&&!e.closest("[hidden], [inert]"))}function Bc(t){const e=t;if(!e||!e.tagName)return!1;if(e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT")return!0;if(e.tagName!=="INPUT")return!1;const n=e.type;return!["button","checkbox","radio","submit","reset","image","file","color"].includes(n)}function _a(t,e,n,s,r=!0){if(n===0)return null;const o=s==="horizontal"?"ArrowLeft":"ArrowUp",i=s==="horizontal"?"ArrowRight":"ArrowDown";return t==="Home"?0:t==="End"?n-1:t===i?e+1<n?e+1:r?0:e:t===o?e>0?e-1:r?n-1:e:null}const Fc=c.forwardRef(function({orientation:e="horizontal",gap:n,loop:s=!0,wrap:r=!1,className:o,style:i,onKeyDown:l,onFocus:d,...u},f){const p=c.useRef(null),h=c.useRef(null),m=()=>{const g=p.current;if(!g)return;const w=In(g);if(!w.length)return;const x=h.current&&w.includes(h.current)?h.current:w[0];h.current=x,w.forEach(j=>{j.tabIndex=j===x?0:-1})};ve(m);const b=g=>{d==null||d(g);const w=p.current,x=g.target;w&&x!==w&&In(w).includes(x)&&(h.current=x,m())},v=g=>{l==null||l(g);const w=p.current;if(g.defaultPrevented||!w||g.altKey||g.ctrlKey||g.metaKey||Bc(g.target))return;const x=In(w),j=x.indexOf(g.target);if(j<0)return;const _=_a(g.key,j,x.length,e,s);_!==null&&(g.preventDefault(),x[_].focus())};return a.jsx("div",{ref:xe(f,p),role:"toolbar","aria-orientation":e,className:L("ok-l ok-toolbar",o),"data-orientation":e,"data-wrap":r&&e==="horizontal"?"":void 0,style:it({gap:n},i),onFocus:b,onKeyDown:v,...u})}),Wt=c.createContext(!1),zc=c.forwardRef(function({collapsed:e,className:n,children:s,...r},o){const i=c.useContext(Wt),l=e??i,d=c.useRef(null);return ve(()=>{const u=d.current;if(!u)return;const f=()=>{const m=u.querySelector('.ok-nav__item[aria-current]:not([aria-current="false"])');if(!m){u.removeAttribute("data-ready");return}u.style.setProperty("--y",m.offsetTop+"px"),u.style.setProperty("--h",m.offsetHeight+"px"),u.hasAttribute("data-ready")||(u.offsetWidth,u.setAttribute("data-ready",""))};f();const p=typeof ResizeObserver<"u"?new ResizeObserver(f):null;p==null||p.observe(u);const h=typeof MutationObserver<"u"?new MutationObserver(f):null;return h==null||h.observe(u,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current"]}),()=>{p==null||p.disconnect(),h==null||h.disconnect()}},[]),a.jsx(Wt.Provider,{value:l,children:a.jsxs("nav",{ref:xe(o,d),className:L("ok-nav",n),"data-collapsed":l?"":void 0,...r,children:[a.jsx("span",{className:"ok-nav__pill","aria-hidden":"true"}),s]})})}),Hc=c.forwardRef(function({label:e,className:n,children:s,...r},o){const i=c.useId(),l=e!=null&&e!==!1;return a.jsxs("div",{ref:o,role:"group","aria-labelledby":l?i:void 0,className:L("ok-nav__group",n),...r,children:[l?a.jsx("div",{id:i,className:"ok-nav__group-label",children:a.jsx("span",{children:e})}):null,s]})}),qc=c.forwardRef(function({as:e,current:n,icon:s,badge:r,sub:o,label:i,disabled:l,href:d,className:u,children:f,onClick:p,title:h,...m},b){const v=c.useContext(Wt),g=e??(d!==void 0?"a":"button"),w=i??(typeof f=="string"||typeof f=="number"?String(f):void 0),x=r!=null&&r!==!1,j=k=>{if(l){k.preventDefault();return}p==null||p(k)},_={...d!==void 0&&!l?{href:d}:null,...g==="button"?{type:"button",...l?{disabled:!0}:null}:null};return a.jsxs(g,{ref:b,className:L("ok-nav__item ok-focusable",o&&"ok-nav__item--sub",u),..._,"aria-current":n?"page":void 0,"aria-disabled":l?!0:void 0,"aria-label":v?w:void 0,title:h??(v?w:void 0),"data-has-badge":x?"":void 0,onClick:j,...m,children:[s?a.jsx("span",{className:"ok-nav__icon","aria-hidden":"true",children:s}):null,a.jsx("span",{className:"ok-nav__label",children:f}),x?a.jsx("span",{className:"ok-nav__badge",children:r}):null]})}),ja=c.createContext(null);function gt(t){const e=c.useContext(ja);if(!e)throw new Error(`${t} 必须放在 <AppShell> 里面`);return e}function Vc(){const{root:t,floatGap:e,...n}=gt("useAppShell()");return n}const Wc=c.forwardRef(function({contained:e=!1,collapsed:n="auto",collapseBelow:s="md",asideCollapseBelow:r="lg",sidebarOpen:o,defaultSidebarOpen:i=!1,onSidebarOpenChange:l,asideOpen:d,defaultAsideOpen:u,onAsideOpenChange:f,rail:p,defaultRail:h=!1,onRailChange:m,gap:b,skipLinkLabel:v,mainId:g,className:w,style:x,children:j,..._},k){const S=he().messages.appShell.skipLink,M=v??S,C=c.useId(),A=g??`ok-main-${C.replace(/[^a-zA-Z0-9_-]/g,"")}`,[E,N]=c.useState(null),[y,R]=le(o,i,l),[B,D]=le(p,h,m),I=ht(s),O=ht(r),[T,F]=c.useState(null);ve(()=>{if(!E||!e){F(null);return}const ee=()=>{const U=E.getBoundingClientRect().width;F(U>0?U:null)};if(ee(),typeof ResizeObserver>"u")return;const ie=new ResizeObserver(ee);return ie.observe(E),()=>ie.disconnect()},[E,e]);const q=(ee,ie)=>e?T===null||T>=fn[ee]:ie,G=n==="auto"?!q(s,I):n,V=n==="auto"?!q(r,O):n,[J,X]=le(d,u??!V,f),P=d!==void 0,z=c.useRef(V),$=z.current===V?J:V?!1:P?J:u??!0;c.useEffect(()=>{!G&&y&&R(!1)},[G,y,R]),c.useEffect(()=>{z.current!==V&&(z.current=V,V?X(!1):P||X(u??!0))},[V,P,u,X]);const Y=c.useMemo(()=>({sidebarCollapsed:G,asideCollapsed:V,sidebarOpen:y,setSidebarOpen:R,openSidebar:()=>R(!0),closeSidebar:()=>R(!1),toggleSidebar:()=>G?R(ee=>!ee):D(ee=>!ee),rail:B,setRail:D,toggleRail:()=>D(ee=>!ee),asideOpen:$,setAsideOpen:X,toggleAside:()=>X(ee=>!ee),contained:e,mainId:A,root:E,floatGap:b!==void 0?vc(b):void 0}),[G,V,y,R,B,D,$,X,e,A,E,b]),K=ee=>{const ie=document.getElementById(A);ie&&(ee.preventDefault(),ie.focus())};return a.jsx(ja.Provider,{value:Y,children:a.jsxs("div",{ref:xe(k,N),className:L("ok-shell",w),"data-contained":e?"":void 0,"data-collapsed":String(n),"data-collapse-below":s,"data-aside-collapse-below":r,style:b!==void 0?{"--ok-shell-gap":Qe(b),...x}:x,..._,children:[a.jsx("a",{className:"ok-skip-link ok-focusable",href:`#${A}`,onClick:K,children:M}),j]})})}),Gc=c.forwardRef(function({variant:e="plain",className:n,...s},r){return gt("<AppShell.Header>"),a.jsx("header",{ref:r,className:L("ok-shell__header",n),"data-variant":e,...s})}),Uc=c.forwardRef(function({variant:e="plain",className:n,...s},r){return gt("<AppShell.Footer>"),a.jsx("footer",{ref:r,className:L("ok-shell__footer",n),"data-variant":e,...s})});function Na(t){const{role:e,...n}=t;return n}const Yc=t=>typeof t=="number"?`${t}px`:t;function Ma(t,e,n,s){return{...e!==void 0?{[`--ok-shell-${t}-w`]:Yc(e)}:null,...n!==void 0?{"--ok-shell-card-pad":Qe(n)}:null,...s}}const Xc=c.forwardRef(function({label:e,width:n,drawerWidth:s=300,padding:r,closeOnNavigate:o=!0,className:i,style:l,children:d,...u},f){const p=he().messages.appShell.sidebar,h=e??p,m=gt("<AppShell.Sidebar>"),b=Ma("sidebar",n,r,l);return m.sidebarCollapsed?a.jsx(ot,{...Na(u),ref:f,open:m.sidebarOpen,onOpenChange:m.setSidebarOpen,placement:"left",modal:!0,size:s,gap:m.floatGap,container:m.contained?m.root:void 0,contained:m.contained,"aria-label":h,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:b,children:a.jsx(Wt.Provider,{value:!1,children:a.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Ra(v,m.setSidebarOpen):void 0,children:d})})}):a.jsx("aside",{ref:f,"aria-label":h,className:L("ok-shell__sidebar ok-shell-card ok-scroll",i),"data-rail":m.rail?"":void 0,style:b,...u,children:a.jsx(Wt.Provider,{value:m.rail,children:d})})}),Kc=c.forwardRef(function({label:e,width:n,drawerWidth:s=360,padding:r,closeOnNavigate:o=!1,className:i,style:l,children:d,...u},f){const p=he().messages.appShell.aside,h=e??p,m=gt("<AppShell.Aside>"),b=Ma("aside",n,r,l);return m.asideCollapsed?a.jsx(ot,{...Na(u),ref:f,open:m.asideOpen,onOpenChange:m.setAsideOpen,placement:"right",modal:!0,size:s,gap:m.floatGap,container:m.contained?m.root:void 0,contained:m.contained,"aria-label":h,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:b,children:a.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Ra(v,m.setAsideOpen):void 0,children:d})}):m.asideOpen?a.jsx("aside",{ref:f,"aria-label":h,className:L("ok-shell__aside ok-shell-card ok-scroll",i),style:b,...u,children:d}):null});function Ra(t,e){var s,r;const n=(r=(s=t.target).closest)==null?void 0:r.call(s,"a[href], .ok-nav__item");n&&n.getAttribute("aria-disabled")!=="true"&&e(!1)}const Jc=c.forwardRef(function({className:e,id:n,tabIndex:s,...r},o){const i=gt("<AppShell.Main>");return a.jsx("main",{ref:o,id:n??i.mainId,tabIndex:s??-1,className:L("ok-shell__main ok-scroll",e),...r})}),Zc=c.forwardRef(function({target:e="sidebar",label:n,drawerOnly:s,className:r,children:o,onClick:i,...l},d){const{messages:u}=he(),f=gt("<AppShell.Trigger>"),p=e==="sidebar",h=p?f.sidebarCollapsed:f.asideCollapsed;if(!h&&s)return null;const m=p?h?f.sidebarOpen:!f.rail:f.asideOpen;return a.jsx("button",{ref:d,type:"button",className:L("ok-btn ok-btn--ghost ok-btn--icon ok-focusable",r),"aria-label":n??(p?u.appShell.toggleSidebar:u.appShell.toggleAside),"aria-expanded":m,"aria-haspopup":h?"dialog":void 0,onClick:Gt(i,()=>p?f.toggleSidebar():f.toggleAside()),...l,children:o??a.jsx(pe,{children:a.jsx("path",{d:"M3.5 6h13M3.5 10h13M3.5 14h13"})})})}),Qc=Object.assign(Wc,{Header:Gc,Sidebar:Xc,Main:Jc,Aside:Kc,Footer:Uc,Trigger:Zc}),Sa=c.createContext(null),Ys=t=>typeof t=="number"?`${t}px`:t,ed=c.forwardRef(function({value:e,defaultValue:n,onChange:s,action:r,position:o="fixed",layout:i="auto",insetStart:l,insetEnd:d,className:u,style:f,children:p,onKeyDown:h,...m},b){const[v,g]=le(e,n,s),w=c.useRef(null),[x,j]=c.useState(0),_=()=>{const M=w.current;if(!M)return;const C=M.querySelector('.ok-tabbar__item[aria-current="page"]');if(!C){M.removeAttribute("data-ready");return}M.style.setProperty("--x",C.offsetLeft+"px"),M.style.setProperty("--w",C.offsetWidth+"px"),M.hasAttribute("data-ready")||(M.offsetWidth,M.setAttribute("data-ready",""))},k=c.useRef(_);k.current=_,ve(()=>{var C;const M=(C=w.current)!=null&&C.querySelector(".ok-tabbar__label")?w.current.querySelectorAll(".ok-tabbar__item").length:0;M!==x&&j(M),_()}),ve(()=>{const M=w.current;if(!M||typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>k.current());return C.observe(M),()=>C.disconnect()},[]);const S=M=>{h==null||h(M);const C=w.current;if(M.defaultPrevented||!C||M.altKey||M.ctrlKey||M.metaKey)return;const A=Array.from(C.querySelectorAll('.ok-tabbar__item:not([aria-disabled="true"])')),E=A.indexOf(M.target);if(E<0)return;const N=_a(M.key,E,A.length,"horizontal");N!==null&&(M.preventDefault(),A[N].focus())};return a.jsx(Sa.Provider,{value:{value:v,select:g},children:a.jsxs("nav",{ref:b,className:L("ok-tabbar",u),"data-position":o,"data-layout":i==="auto"?x>=4?"stacked":"inline":i,style:l!==void 0||d!==void 0?{"--ok-tabbar-inset-start":Ys(l),"--ok-tabbar-inset-end":Ys(d),...f}:f,onKeyDown:S,...m,children:[a.jsxs("div",{ref:w,className:"ok-tabbar__list",children:[a.jsx("span",{className:"ok-tabbar__thumb","aria-hidden":"true"}),p]}),r?a.jsx("div",{className:"ok-tabbar__action",children:r}):null]})})}),Ca=c.forwardRef(function({value:e,as:n,icon:s,badge:r,label:o,disabled:i,href:l,className:d,children:u,onClick:f,...p},h){const m=c.useContext(Sa),b=n??(l!==void 0?"a":"button"),v=(m==null?void 0:m.value)===e,g=j=>{if(i){j.preventDefault();return}f==null||f(j),j.defaultPrevented||m==null||m.select(e)},w=u!=null&&u!==!1,x={...l!==void 0&&!i?{href:l}:null,...b==="button"?{type:"button",...i?{disabled:!0}:null}:null};return a.jsxs(b,{ref:h,className:L("ok-tabbar__item ok-focusable",d),...x,"aria-current":v?"page":void 0,"aria-disabled":i?!0:void 0,"aria-label":w?void 0:o,"data-value":e,onClick:g,...p,children:[s?a.jsx("span",{className:"ok-tabbar__icon","aria-hidden":"true",children:s}):null,w?a.jsx("span",{className:"ok-tabbar__label",children:u}):null,r!=null&&r!==!1?a.jsx("span",{className:"ok-tabbar__badge",children:r}):null]})}),td=Object.assign(ed,{Item:Ca}),nd=c.forwardRef(function({orientation:e="horizontal",value:n,defaultValue:s=50,onChange:r,min:o=20,max:i=80,step:l=2,stackBelow:d="md",stacked:u,separatorLabel:f,className:p,style:h,children:m,...b},v){const{messages:g}=he(),w=f??g.splitPane.separator,[x,j]=le(n,s,r),_=c.useRef(null),k=c.useRef(null),S=c.useRef(!1),[M,C]=c.useState(!1),[A,E]=c.useState(!1),N=c.useId(),[y,R]=c.Children.toArray(m),B=ye(x,o,i),D=e==="horizontal",I=D?d:!1;ve(()=>{const P=_.current;if(!P||u!==void 0||I===!1){E(!1);return}const z=fn[I],$=()=>{const K=P.getBoundingClientRect().width;E(K>0&&K<z)};if($(),typeof ResizeObserver>"u")return;const Y=new ResizeObserver($);return Y.observe(P),()=>Y.disconnect()},[u,I]);const O=u??A,T=P=>j(ye(Math.round(P*10)/10,o,i)),F=P=>{const z=k.current;if(!z)return;const $=z.getBoundingClientRect(),Y=D?$.width:$.height;if(Y<=0)return;let K=D?(P.clientX-$.left)/Y:(P.clientY-$.top)/Y;D&&getComputedStyle(z).direction==="rtl"&&(K=1-K),T(K*100)},q=P=>{var z,$;O||P.button!==0||(P.preventDefault(),P.currentTarget.focus(),($=(z=P.currentTarget).setPointerCapture)==null||$.call(z,P.pointerId),S.current=!0,C(!0))},G=P=>{S.current&&F(P)},V=P=>{var z,$;S.current&&(S.current=!1,C(!1),($=(z=P.currentTarget).releasePointerCapture)==null||$.call(z,P.pointerId))},J=P=>{if(O)return;const z=P.shiftKey?10:l,$=D?"ArrowLeft":"ArrowUp",Y=D?"ArrowRight":"ArrowDown";let K=null;P.key===$?K=B-z:P.key===Y?K=B+z:P.key==="Home"?K=o:P.key==="End"?K=i:P.key==="Enter"&&(K=s),K!==null&&(P.preventDefault(),T(K))},X=!O;return a.jsx("div",{ref:xe(v,_),className:L("ok-split",p),"data-orientation":e,"data-stack-below":u===void 0&&I?I:void 0,"data-stacked":u!==void 0?String(u):A?"true":void 0,"data-dragging":M?"":void 0,style:{"--ok-split-size":B,...h},...b,children:a.jsxs("div",{ref:k,className:"ok-split__track",children:[a.jsx("div",{id:N,className:"ok-split__pane ok-split__pane--first",children:y}),a.jsx("div",{role:"separator",className:"ok-split__sep ok-focusable",tabIndex:X?0:void 0,"aria-orientation":O?"horizontal":D?"vertical":"horizontal","aria-label":X?w:void 0,"aria-controls":X?N:void 0,"aria-valuenow":X?Math.round(B):void 0,"aria-valuemin":X?o:void 0,"aria-valuemax":X?i:void 0,onPointerDown:q,onPointerMove:G,onPointerUp:V,onPointerCancel:V,onDoubleClick:X?()=>T(s):void 0,onKeyDown:J}),a.jsx("div",{className:"ok-split__pane ok-split__pane--second",children:R})]})})});exports.ACCENTS=Er;exports.Accordion=Bl;exports.Alert=Yl;exports.AppShell=Qc;exports.AspectRatio=Tc;exports.Autocomplete=hl;exports.Avatar=hs;exports.AvatarGroup=ic;exports.BREAKPOINTS=fn;exports.Badge=Vl;exports.Box=wc;exports.Breadcrumb=Fl;exports.Button=Lr;exports.ButtonGroup=wo;exports.Calendar=da;exports.Card=_l;exports.CardBody=Ml;exports.CardFooter=Rl;exports.CardHeader=Nl;exports.CardLink=jl;exports.CardMedia=Sl;exports.Center=Ec;exports.Checkbox=Do;exports.CheckboxGroup=Bo;exports.Chip=Uo;exports.ChipGroup=Ko;exports.Cluster=jc;exports.Code=dc;exports.CodeBlock=fc;exports.ColorPicker=ni;exports.ColorSwatches=Hr;exports.Combobox=la;exports.CommandPalette=Vi;exports.Confirmer=Qr;exports.Container=Cc;exports.ContextMenu=ll;exports.Count=Gl;exports.DatePicker=bl;exports.DateRangePicker=gl;exports.DescriptionItem=pa;exports.DescriptionList=$l;exports.Dialog=Jr;exports.Divider=ya;exports.Dots=nc;exports.Drawer=Ei;exports.DropdownMenu=ol;exports.EmptyState=sc;exports.Field=To;exports.FieldContext=Le;exports.Fieldset=$o;exports.FileDrop=ci;exports.FloatingBody=ki;exports.FloatingCard=ot;exports.FloatingFooter=yi;exports.FloatingGrip=Kr;exports.FloatingHeader=xi;exports.FloatingPanel=Pi;exports.FocusScope=nr;exports.Form=Io;exports.FormActions=Lo;exports.Grid=Rc;exports.GridItem=Sc;exports.Group=Cl;exports.Heading=kl;exports.Hide=pc;exports.Hotkey=ai;exports.ICONS=Xn;exports.Icon=pe;exports.Image=ha;exports.Inline=wa;exports.Input=ts;exports.KEY_SYMBOL=qr;exports.Kbd=si;exports.LOGO_SNOUT_MIN_CONTRAST=Dn;exports.Label=Po;exports.List=Al;exports.ListItem=Tl;exports.LocaleProvider=mr;exports.Menu=xn;exports.MenuCheckboxItem=el;exports.MenuItem=Qi;exports.MenuLabel=rl;exports.MenuRadioGroup=tl;exports.MenuRadioItem=nl;exports.MenuSeparator=sl;exports.MenuSub=al;exports.Meter=Zl;exports.MultiSelect=ul;exports.Nav=zc;exports.NavGroup=Hc;exports.NavItem=qc;exports.NumberInput=Co;exports.OINK_LOGO_INK_PATH=Pr;exports.OINK_LOGO_NOSTRILS=zn;exports.OINK_LOGO_SNOUT=sn;exports.OINK_MESSAGES=qt;exports.ON_ACCENT_THRESHOLD=cr;exports.OinkLogo=xo;exports.OinkProvider=vo;exports.OptionCard=Jo;exports.OptionCardGroup=Zo;exports.Page=Ic;exports.PageHeader=Lc;exports.Pagination=ba;exports.Panel=ea;exports.PinInput=Eo;exports.Popover=cs;exports.Portal=vt;exports.Progress=Xl;exports.ProgressRing=Jl;exports.Radio=Fo;exports.RadioGroup=zo;exports.RangeCalendar=ua;exports.RangeSlider=Vo;exports.Rating=ii;exports.Reaction=cc;exports.Roll=yn;exports.Row=El;exports.SERVER_LOCALE=hr;exports.ScrollArea=Pc;exports.SearchInput=Mo;exports.Section=Dc;exports.Segmented=Go;exports.Select=cl;exports.Sheet=Ai;exports.Show=hc;exports.Skeleton=Ql;exports.Slider=qo;exports.Spacer=Ac;exports.Spinner=tc;exports.SplitPane=nd;exports.Stack=_c;exports.Stat=rc;exports.Steps=zl;exports.Sticky=$c;exports.Surface=yl;exports.Switch=Ho;exports.TAIL_PATH=ur;exports.THEME_REVEAL_MS=Tr;exports.TabBar=td;exports.TabBarItem=Ca;exports.Table=Dl;exports.Tabs=Ol;exports.Tag=Wl;exports.TailGlyph=Zn;exports.TailProvider=fr;exports.Text=xl;exports.Textarea=No;exports.Timeline=Hl;exports.Toaster=Fi;exports.ToggleButton=_o;exports.Toolbar=Fc;exports.Tooltip=Xi;exports.Tree=ql;exports.VisuallyHidden=Kn;exports.accentVars=Bn;exports.animate=Ne;exports.burst=xa;exports.canUseDOM=Ae;exports.captureFocusTrail=Un;exports.chain=Gt;exports.clamp=ye;exports.clampCornerRadii=gr;exports.computePosition=sa;exports.confirm=Ri;exports.contrastRatio=Ht;exports.cornerFallbackActive=ro;exports.cornerFallbackNeeded=Rr;exports.cornerHandles=br;exports.cornerShapePath=$e;exports.cx=L;exports.detectLocale=pr;exports.ease=ze;exports.flip=Ia;exports.floatMotion=Zs;exports.formatISODate=We;exports.getFocusable=zt;exports.hexToHsv=or;exports.hsvToHex=ir;exports.hsvToRgb=ar;exports.initialsOf=va;exports.installCornerFallback=Sr;exports.isAccent=Ar;exports.isCustomAccent=Bt;exports.keyName=ln;exports.keySymbol=ns;exports.logoSnoutColors=On;exports.luminance=Ln;exports.mergeRefs=xe;exports.normalizeAccent=Qn;exports.normalizeHex=Ke;exports.onAccentColor=dr;exports.paginationRange=ma;exports.parseCornerShape=xr;exports.parseHex=Ct;exports.parseISODate=fs;exports.perceivedLightness=Jn;exports.playFlip=dn;exports.presets=Gn;exports.resolveFloatSize=mn;exports.resolveTriggerPoint=Wr;exports.restoreFocusTo=Yn;exports.rgbToHsv=rr;exports.speed=Ge;exports.spring=Wn;exports.supportsLinear=Js;exports.toHex=mt;exports.toast=Di;exports.useAppShell=Vc;exports.useBreakpoint=ht;exports.useBusy=jo;exports.useControllable=le;exports.useCornerFallback=Cr;exports.useEscape=Yt;exports.useEvent=ke;exports.useFieldControl=we;exports.useFloatingCard=Xr;exports.useInertOthers=er;exports.useIsoLayoutEffect=ve;exports.useLocale=he;exports.useMediaQuery=un;exports.useOink=go;exports.useOutsidePress=La;exports.usePosition=vn;exports.usePresence=Ut;exports.useScrollLock=Qs;exports.useTail=qa;exports.wait=$a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),Zs=require("react-dom"),$a=require("react-dom/client");function L(...t){const e=[],n=s=>{if(!(!s&&s!==0)){if(typeof s=="string"||typeof s=="number")e.push(String(s));else if(Array.isArray(s))s.forEach(n);else if(typeof s=="object")for(const r in s)s[r]&&e.push(r)}};return t.forEach(n),e.join(" ")}const ye=(t,e,n)=>Math.min(n,Math.max(e,t)),Ae=typeof window<"u"&&typeof document<"u",Pa='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function Ht(t){return Array.from(t.querySelectorAll(Pa)).filter(e=>{if(e.closest('[inert], [aria-hidden="true"]'))return!1;const n=getComputedStyle(e);return n.display!=="none"&&n.visibility!=="hidden"})}function Ut(...t){return e=>{for(const n of t)if(n==null||n(e),e.defaultPrevented)break}}function Ue(){if(!Ae)return 1;const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--ok-ms"));return Number.isFinite(t)?t:1}const Ia=t=>new Promise(e=>setTimeout(e,t*Ue()));function La(t,e,n){const s=Math.sqrt(t/n),r=e/(2*Math.sqrt(t*n));if(r<1){const d=s*Math.sqrt(1-r*r);return u=>1-Math.exp(-r*s*u)*(Math.cos(d*u)+r*s/d*Math.sin(d*u))}if(r===1)return d=>1-Math.exp(-s*d)*(1+s*d);const o=Math.sqrt(r*r-1),i=-s*(r-o),l=-s*(r+o);return d=>1-(l*Math.exp(i*d)-i*Math.exp(l*d))/(l-i)}function Gn(t={}){const e=t.stiffness||260,n=t.damping||24,s=t.mass||1,r=La(e,n,s);let o=.1;for(let u=3;u>0;u-=1/240)if(Math.abs(r(u)-1)>(t.precision||.004)){o=u+1/240;break}const i=ye(Math.round(o*70),18,48),l=[];let d=1;for(let u=0;u<=i;u++){const f=u===i?1:r(o*u/i);f>d&&(d=f),l.push(+f.toFixed(3))}return{stiffness:e,damping:n,mass:s,duration:Math.round(o*1e3),easing:"linear("+l.join(", ")+")",overshoot:d-1,at:u=>r(u*o)}}var Js;const Qs=Ae&&typeof CSS<"u"&&!!((Js=CSS.supports)!=null&&Js.call(CSS,"transition-timing-function","linear(0, 1)")),ze={out:"cubic-bezier(.22, 1, .36, 1)",in:"cubic-bezier(.55, 0, 1, .45)",inOut:"cubic-bezier(.65, 0, .35, 1)",standard:"cubic-bezier(.2, 0, 0, 1)"},er={in:303,fade:100,out:160},Rn={soft:{stiffness:170,damping:26,fallback:"cubic-bezier(.22, 1, .36, 1)"},spring:{stiffness:260,damping:24,fallback:"cubic-bezier(.3, 1.3, .5, 1)"},snappy:{stiffness:520,damping:34,fallback:"cubic-bezier(.3, 1.25, .45, 1)"},bouncy:{stiffness:300,damping:18,fallback:"cubic-bezier(.3, 1.7, .5, 1)"},wobbly:{stiffness:180,damping:9,fallback:"cubic-bezier(.3, 2.3, .5, 1)"}},Un=Object.fromEntries(Object.keys(Rn).map(t=>[t,{...Gn(Rn[t]),fallback:Rn[t].fallback}]));function Ne(t,e,n={}){if(!t||typeof t.animate!="function")return null;const{spring:s,...r}=n,o={duration:240,easing:ze.out,...r};if(s){const l=typeof s=="string"?Un[s]:Gn(s);o.duration=l.duration,o.easing=Qs?l.easing:l.fallback||ze.out}const i=Ue();return o.duration=Math.max(0,o.duration*i),o.delay&&(o.delay*=i,o.fill||(o.fill="backwards")),t.animate(e,o)}function Da(t,e,n){const s=t.filter(Boolean),r=new Map(s.map(o=>[o,o.getBoundingClientRect()]));e(),un(r,n)}function un(t,e){t.forEach((n,s)=>{if(!s.isConnected)return;const r=s.getBoundingClientRect(),o=n.left-r.left,i=n.top-r.top;Math.abs(o)<.5&&Math.abs(i)<.5||Ne(s,[{transform:`translate(${o}px, ${i}px)`},{transform:"none"}],{spring:"spring",...e})})}const ve=Ae?c.useLayoutEffect:c.useEffect;function ke(t){const e=c.useRef(t);return ve(()=>{e.current=t}),c.useCallback((...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function le(t,e,n){const[s,r]=c.useState(e),o=t!==void 0,i=o?t:s,l=ke(n),d=c.useRef(i),u=c.useRef(o),f=c.useRef(null);ve(()=>{d.current=i,u.current=o,f.current=null});const m=c.useCallback(h=>{const b=f.current?f.current.value:d.current,p=typeof h=="function"?h:null,v=p?p(b):h;if(Object.is(v,b))return;const g={value:v};f.current=g,Promise.resolve().then(()=>{f.current===g&&(f.current=null)}),u.current||r(p?w=>p(w):()=>v),l(v)},[l]);return[i,m]}function xe(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})}}function fn(t,e=!1){const n=c.useCallback(s=>{if(!Ae)return()=>{};const r=window.matchMedia(t);return r.addEventListener("change",s),()=>r.removeEventListener("change",s)},[t]);return c.useSyncExternalStore(n,()=>window.matchMedia(t).matches,()=>e)}const hn={sm:520,md:768,lg:1024,xl:1280};function pt(t,e=!0){return fn(`(min-width: ${hn[t]}px)`,e)}function Yt(t,e=400){const[n,s]=c.useState(t),[r,o]=c.useState("closed"),i=c.useRef(null);return ve(()=>{t&&s(!0)},[t]),c.useEffect(()=>{if(!n)return;if(t){let h=0,b=0;const p=()=>{const g=i.current;if(!g&&b++<10){h=requestAnimationFrame(p);return}g==null||g.offsetWidth,o("open")};p();const v=setTimeout(()=>{cancelAnimationFrame(h),p()},100);return()=>{cancelAnimationFrame(h),clearTimeout(v)}}o("closed");const l=i.current;let d=!1;const u=()=>{d||(d=!0,s(!1))},f=h=>{h.target===l&&u()};l==null||l.addEventListener("transitionend",f);const m=setTimeout(u,e*Ue());return()=>{l==null||l.removeEventListener("transitionend",f),clearTimeout(m)}},[t,n,e]),{mounted:n,state:t?r:"closed",ref:i}}let Ms=0,Pt=null;function tr(t){c.useEffect(()=>{if(!(!t||!Ae)){if(Ms++===0){const e=document.documentElement,n=e.style.overflow,s=e.style.paddingRight,r=window.innerWidth-e.clientWidth;e.style.overflow="hidden",r>0&&(e.style.paddingRight=r+"px"),Pt=()=>{e.style.overflow=n,e.style.paddingRight=s}}return()=>{--Ms===0&&(Pt==null||Pt(),Pt=null)}}},[t])}const It=[];function Kt(t,e){const n=ke(e);c.useEffect(()=>{if(!t||!Ae)return;It.push(n);const s=r=>{r.key!=="Escape"||r.defaultPrevented||It[It.length-1]===n&&(r.preventDefault(),n())};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s);const r=It.lastIndexOf(n);r>=0&&It.splice(r,1)}},[t,n])}function Oa(t,e,n){const s=ke(n),r=c.useRef(e);r.current=e,c.useEffect(()=>{if(!t||!Ae)return;const o=i=>{const l=i.target;r.current.some(d=>d.current&&d.current.contains(l))||s(i)};return document.addEventListener("pointerdown",o,!0),()=>document.removeEventListener("pointerdown",o,!0)},[t,s])}const Qt=new Map,Ba='[data-ok-layer], .ok-popup, .ok-toasts, .ok-tooltip, [role="tooltip"], [data-ok-confirmer], [aria-live], script, style, link, template, noscript';function nr(t,e){c.useEffect(()=>{if(!t||!Ae)return;const n=e.current,s="inert"in HTMLElement.prototype,r=[];return Array.from(document.body.children).forEach(o=>{if(o.matches(Ba)||n&&o.contains(n))return;let i=Qt.get(o);i||(i={count:0,inert:o.hasAttribute("inert"),ariaHidden:o.getAttribute("aria-hidden"),viaInert:s},Qt.set(o,i),s?o.setAttribute("inert",""):o.setAttribute("aria-hidden","true")),i.count++,r.push(o)}),()=>{r.forEach(o=>{const i=Qt.get(o);!i||--i.count>0||(Qt.delete(o),i.viaInert?i.inert||o.removeAttribute("inert"):i.ariaHidden===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i.ariaHidden))})}},[t,e])}function gt({children:t,container:e,disabled:n}){const[s,r]=c.useState(null);return c.useEffect(()=>{r(e??document.body)},[e]),n?a.jsx(a.Fragment,{children:t}):s?Zs.createPortal(t,s):null}const Fa='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex], [contenteditable="true"]';function Yn(t){const e=t instanceof HTMLElement&&t!==document.body&&t!==document.documentElement?t:null,n=[];for(let s=(e==null?void 0:e.parentElement)??null;s&&s!==document.body&&s!==document.documentElement;s=s.parentElement)n.push(s);return{target:e,ancestors:n}}const sr=t=>!!t.closest('[inert], [aria-hidden="true"]'),Rs=t=>t.isConnected&&!sr(t);function Kn(t){var r,o;if(!t||!t.target)return null;const e={preventScroll:!0};if(t.target.isConnected)return sr(t.target)?null:(t.target.focus(e),t.target);const n=t.ancestors.find(i=>Rs(i)&&i.matches(Fa));if(n)return n.focus(e),n;const s=document.querySelector('main, [role="main"]');return s&&Rs(s)?(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus(e),s):((o=(r=document.activeElement)==null?void 0:r.blur)==null||o.call(r),document.body)}function rr({children:t,trap:e=!0,autoFocus:n=!0,restoreFocus:s=!0,initialFocus:r,scopeRef:o}){const i=c.useRef(null),l=c.useRef(s);return l.current=s,c.useEffect(()=>{const d=o.current;if(d)return(!i.current||!d.contains(document.activeElement))&&(i.current=Yn(document.activeElement)),n&&!d.contains(document.activeElement)&&((r==null?void 0:r.current)??d.querySelector("[data-autofocus]")??d).focus({preventScroll:!0}),()=>{l.current&&Kn(i.current)}},[]),c.useEffect(()=>{const d=o.current;if(!e||!d)return;const u=m=>{if(m.key!=="Tab")return;const h=Ht(d);if(!h.length){m.preventDefault(),d.focus();return}const b=h[0],p=h[h.length-1],v=document.activeElement;m.shiftKey&&(v===b||v===d)?(m.preventDefault(),p.focus()):!m.shiftKey&&v===p&&(m.preventDefault(),b.focus())},f=m=>{var b;const h=m.target;d.contains(h)||((b=h.closest)==null?void 0:b.call(h,"[data-ok-layer]"))!==d.closest("[data-ok-layer]")||(Ht(d)[0]??d).focus()};return d.addEventListener("keydown",u),document.addEventListener("focusin",f),()=>{d.removeEventListener("keydown",u),document.removeEventListener("focusin",f)}},[e,o]),a.jsx(a.Fragment,{children:t})}const Xn={search:'<circle cx="9" cy="9" r="5.5"/><path d="M13.2 13.2L17 17"/>',check:'<path d="M4.500 10.500l3.500 3.500 7.500-8"/>',x:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',plus:'<path d="M10 4.500v11M4.500 10h11"/>',minus:'<path d="M4.500 10h11"/>',"chevron-right":'<path d="M7.500 4.500L13 10l-5.500 5.500"/>',"chevron-down":'<path d="M4.500 7.500L10 13l5.500-5.500"/>',sun:'<circle cx="10" cy="10" r="3.300"/><path d="M10 2.500v1.800M10 15.700v1.800M2.500 10h1.800M15.700 10h1.800M4.700 4.700L6 6M14 14l1.300 1.300M4.700 15.300L6 14M14 6l1.300-1.300"/>',moon:'<path d="M16.500 11.800A7 7 0 1 1 8.200 3.500a5.500 5.500 0 0 0 8.300 8.300z"/>',monitor:'<rect x="3" y="4" width="14" height="9.500" rx="2.200"/><path d="M7.500 16.500h5M10 13.500v3"/>',copy:'<rect x="7" y="7" width="9.500" height="9.500" rx="2.500"/><path d="M13 7V5.500A2 2 0 0 0 11 3.500H5.500a2 2 0 0 0-2 2V11a2 2 0 0 0 2 2H7"/>',play:'<path d="M7 4.600v10.800a.7.700 0 0 0 1.100.600l8-5.400a.7.700 0 0 0 0-1.200l-8-5.400A.7.700 0 0 0 7 4.600z" fill="currentColor" stroke="none"/>',replay:'<path d="M4.300 10a5.700 5.700 0 1 0 1.900-4.200M4 3.500v3h3"/>',info:'<circle cx="10" cy="10" r="7"/><path d="M10 9.300v4.200M10 6.500v.1"/>',alert:'<path d="M10 3.500l7 12.500H3l7-12.500zM10 8.500v3.200M10 14v.1"/>',bell:'<path d="M5.500 8.500a4.500 4.500 0 0 1 9 0c0 4 1.500 5 1.500 5H4s1.500-1 1.500-5zM8.300 16.200a1.800 1.800 0 0 0 3.400 0"/>',trash:'<path d="M4.500 6h11M8 6V4.500h4V6M6 6l.7 8.800a1.600 1.600 0 0 0 1.600 1.500h3.400a1.600 1.600 0 0 0 1.600-1.500L14 6"/>',more:'<path d="M5 10v.1M10 10v.1M15 10v.1" stroke-width="2.600"/>',download:'<path d="M10 3.500v9M6.500 9.500L10 13l3.500-3.500M4.500 16.500h11"/>',upload:'<path d="M10 13V4M6.500 7.500L10 4l3.500 3.500M4.500 16.500h11"/>',edit:'<path d="M4 16l.8-3.300L13.400 4a1.700 1.700 0 0 1 2.400 0l.2.2a1.700 1.700 0 0 1 0 2.400L7.300 15.200 4 16z"/>',share:'<path d="M10 12.500V3.500M6.800 6.500L10 3.500l3.200 3M5 10v5a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15v-5"/>',mail:'<rect x="3" y="4.800" width="14" height="10.500" rx="2.500"/><path d="M3.800 7l6.200 4.300L16.200 7"/>',sparkle:'<path d="M10 3.500l1.700 4.800 4.800 1.700-4.800 1.700L10 16.500l-1.700-4.800L3.500 10l4.800-1.700z"/>',shuffle:'<path d="M3.500 6h2.300c1.400 0 2.600.7 3.300 1.900l1.800 4.200c.7 1.200 1.900 1.900 3.300 1.900h2.300M14.500 4l2 2-2 2M14.500 12l2 2-2 2M3.500 14h2.300c.9 0 1.700-.3 2.300-.8M16.500 6h-2.300c-.9 0-1.700.3-2.300.8"/>',sliders:'<path d="M3.500 6.500h6M13.500 6.500h3M3.500 13.500h3M10.500 13.500h6"/><circle cx="11.500" cy="6.500" r="2"/><circle cx="8.500" cy="13.500" r="2"/>',home:'<path d="M3.5 9.2L10 3.5l6.5 5.7V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9.2z"/><path d="M8 16.5V12h4v4.5"/>',user:'<circle cx="10" cy="7" r="3.2"/><path d="M4 16.5c.7-2.8 3-4.3 6-4.3s5.3 1.5 6 4.3"/>',users:'<circle cx="7.5" cy="7.2" r="2.8"/><path d="M2.5 16c.6-2.5 2.5-3.800 5-3.800s4.400 1.300 5 3.800M12.800 4.600a2.800 2.800 0 0 1 0 5.200M14.800 12.500c1.400.5 2.300 1.700 2.700 3.500"/>',settings:'<path d="M8.600 3h2.800l.5 2 1.800 1 2-.6 1.400 2.400-1.500 1.500v1.400l1.500 1.500-1.400 2.400-2-.6-1.800 1-.5 2H8.600l-.5-2-1.800-1-2 .6-1.400-2.400 1.500-1.500V9.300L2.900 7.800l1.400-2.400 2 .6 1.800-1z"/><circle cx="10" cy="10" r="2.500"/>',heart:'<path d="M10 16.500S3.500 12.700 3.500 8.200A3.700 3.700 0 0 1 10 5.900a3.700 3.700 0 0 1 6.500 2.300c0 4.500-6.500 8.300-6.500 8.300z"/>',star:'<path d="M10 3.500l1.800 4.500 4.900.4-3.700 3.100 1.100 4.700L10 13.600l-4.100 2.600 1.100-4.700-3.700-3.100 4.900-.4z"/>',cart:'<path d="M2.500 3.500h2l1.800 8.500h8.200l1.500-6H5"/><circle cx="7.500" cy="15.500" r="1.200"/><circle cx="13.500" cy="15.500" r="1.200"/>',bag:'<path d="M4.500 7h11l-.7 8.100a1.500 1.500 0 0 1-1.500 1.400H6.700a1.500 1.500 0 0 1-1.500-1.400L4.500 7z"/><path d="M7.500 9V6.500a2.500 2.500 0 0 1 5 0V9"/>',grid:'<rect x="3.500" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="3.500" y="11" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="11" width="5.500" height="5.500" rx="1.500"/>',list:'<path d="M7.500 5.500h9M7.500 10h9M7.500 14.500h9"/><path d="M3.800 5.500v.1M3.800 10v.1M3.800 14.500v.1" stroke-width="2.400"/>',filter:'<path d="M3.500 4.500h13l-5 6V15l-3 1.500v-6l-5-6z"/>',calendar:'<rect x="3.500" y="4.500" width="13" height="12" rx="2.500"/><path d="M3.500 8.500h13M7 3v3M13 3v3"/>',clock:'<circle cx="10" cy="10" r="7"/><path d="M10 6v4l2.500 1.500"/>',inbox:'<path d="M3.500 11l2-6a1.500 1.500 0 0 1 1.400-1h6.200a1.500 1.500 0 0 1 1.400 1l2 6v3.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V11z"/><path d="M3.500 11H7l1 2h4l1-2h3.500"/>',send:'<path d="M16.500 3.500L3.500 8.700l5.300 2.500 2.500 5.300 5.200-13zM8.800 11.200L12 8"/>',archive:'<rect x="3" y="4" width="14" height="4" rx="1.200"/><path d="M4.500 8v6.500A1.500 1.500 0 0 0 6 16h8a1.500 1.500 0 0 0 1.500-1.500V8M8.300 11.200h3.400"/>',reply:'<path d="M8 5.500L3.500 10 8 14.500M3.500 10h8a5 5 0 0 1 5 5v.5"/>',forward:'<path d="M12 5.500l4.500 4.500-4.500 4.500M16.500 10h-8a5 5 0 0 0-5 5v.5"/>',paperclip:'<path d="M15.500 9.500l-5.700 5.700a3.540 3.540 0 0 1-5-5l6-6a2.340 2.340 0 0 1 3.300 3.300l-5.900 5.900a1.200 1.200 0 0 1-1.700-1.700l5.300-5.300"/>',folder:'<path d="M3.500 6A1.500 1.500 0 0 1 5 4.500h3l1.800 2H15A1.500 1.500 0 0 1 16.500 8v6.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V6z"/>',file:'<path d="M11.500 3.500h-5A1.500 1.500 0 0 0 5 5v10a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15V7l-3.500-3.500z"/><path d="M11.500 3.500V7H15"/>',image:'<rect x="3.500" y="4" width="13" height="12" rx="2.500"/><circle cx="7.500" cy="8" r="1.300"/><path d="M4.200 13.800l3.300-3.300 3 3 2-2 3.300 3.300"/>',link:'<path d="M8.500 11.500a3.200 3.200 0 0 0 4.500 0L15.500 9A3.200 3.200 0 0 0 11 4.500l-.8.8"/><path d="M11.500 8.500a3.200 3.200 0 0 0-4.500 0L4.500 11A3.200 3.200 0 0 0 9 15.500l.8-.8"/>',external:'<path d="M11.500 4H16v4.500M16 4l-7 7M14 11.500V15a1.500 1.500 0 0 1-1.500 1.500H5A1.500 1.500 0 0 1 3.500 15V7.500A1.500 1.500 0 0 1 5 6h3.500"/>',eye:'<path d="M2.500 10S5.200 5 10 5s7.500 5 7.500 5-2.700 5-7.500 5-7.500-5-7.500-5z"/><circle cx="10" cy="10" r="2.300"/>',"eye-off":'<path d="M8.300 5.200A7 7 0 0 1 10 5c4.800 0 7.500 5 7.500 5a12.500 12.500 0 0 1-1.900 2.500M12.900 14.300A6.500 6.500 0 0 1 10 15c-4.800 0-7.500-5-7.500-5a12.300 12.300 0 0 1 3.300-3.700M3.500 3.500l13 13M8.400 8.400a2.300 2.300 0 0 0 3.200 3.200"/>',lock:'<rect x="4.500" y="9" width="11" height="7.500" rx="2"/><path d="M7 9V6.500a3 3 0 0 1 6 0V9"/>',tag:'<path d="M3.500 4.500v5.200a1.500 1.500 0 0 0 .4 1l5.700 5.700a1.500 1.500 0 0 0 2.100 0l4.700-4.700a1.500 1.500 0 0 0 0-2.100l-5.700-5.700a1.500 1.500 0 0 0-1-.4H4.500a1 1 0 0 0-1 1z"/><path d="M7 7v.1" stroke-width="2.400"/>',bookmark:'<path d="M5.500 4.500A1.500 1.500 0 0 1 7 3h6a1.500 1.500 0 0 1 1.500 1.500v12L10 13.500l-4.500 3v-12z"/>',"chevron-left":'<path d="M12.500 4.500L7 10l5.500 5.500"/>',"chevron-up":'<path d="M4.500 12.500L10 7l5.500 5.500"/>',"arrow-left":'<path d="M16 10H4M8.500 5.500L4 10l4.500 4.500"/>',"arrow-right":'<path d="M4 10h12M11.500 5.500L16 10l-4.500 4.500"/>',"arrow-up":'<path d="M10 16V4M5.500 8.500L10 4l4.500 4.500"/>',"arrow-down":'<path d="M10 4v12M5.500 11.500L10 16l4.500-4.500"/>',refresh:'<path d="M16 10a6 6 0 0 1-10.600 3.800M4 10a6 6 0 0 1 10.600-3.800M14.500 3v3.200h-3.200M5.500 17v-3.200h3.200"/>',menu:'<path d="M3.500 6h13M3.500 10h13M3.500 14h13"/>',close:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',"check-circle":'<circle cx="10" cy="10" r="7"/><path d="M6.800 10.300l2.200 2.200 4.200-4.600"/>',"x-circle":'<circle cx="10" cy="10" r="7"/><path d="M7.500 7.500l5 5M12.500 7.500l-5 5"/>',help:'<circle cx="10" cy="10" r="7"/><path d="M7.900 8a2.200 2.200 0 1 1 3.200 2c-.7.4-1.100.9-1.100 1.600M10 14v.1"/>',globe:'<circle cx="10" cy="10" r="7"/><path d="M3 10h14M10 3c2 2.200 3 4.500 3 7s-1 4.800-3 7c-2-2.200-3-4.500-3-7s1-4.800 3-7z"/>',phone:'<rect x="5.500" y="2.500" width="9" height="15" rx="2.200"/><path d="M9 14.500h2"/>',"credit-card":'<rect x="2.500" y="4.500" width="15" height="11" rx="2.200"/><path d="M2.500 8.500h15M5.500 12.500h3"/>',truck:'<path d="M4.200 13.500H2.500v-8h9v8M7.800 13.500h4.400M11.500 8.500h3l3 3v2h-1.700"/><circle cx="6" cy="14.500" r="1.600"/><circle cx="14" cy="14.500" r="1.600"/>',chart:'<path d="M3.500 16.500h13M6 13.500V10M10 13.500V5M14 13.500V8"/>',"trending-up":'<path d="M3 14l4.500-4.500 3 3L17 6M12.500 6H17v4.500"/>',"trending-down":'<path d="M3 6l4.500 4.500 3-3L17 14M12.500 14H17V9.500"/>',layout:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M3 8h14M8 8v8.500"/>',sidebar:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M8 3.500v13"/>',command:'<path d="M7.500 7.500h5v5h-5zM7.500 7.500h-2a2 2 0 1 1 2-2zM12.500 7.500v-2a2 2 0 1 1 2 2zM12.500 12.500h2a2 2 0 1 1-2 2zM7.500 12.500v2a2 2 0 1 1-2-2z"/>',zap:'<path d="M11 2.500l-6.500 9H10l-1 6 6.500-9H10l1-6z"/>'},pe=c.forwardRef(function({name:e,size:n,label:s,filled:r,className:o,style:i,children:l,...d},u){const f=s?{role:"img","aria-label":s}:{"aria-hidden":!0},m=n?{width:n,height:n,...i}:i,h=L("ok-icon",r&&"ok-icon--fill",o);return e?a.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:h,style:m,...f,...d,dangerouslySetInnerHTML:{__html:Xn[e]}}):a.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:h,style:m,...f,...d,children:l})});function Jn({className:t,...e}){return a.jsx("span",{className:L("ok-sr",t),...e})}const ar=(t,e=0,n=1)=>Math.min(n,Math.max(e,t));function Et(t){const e=t.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(e)?[0,1,2].map(n=>parseInt(e[n]+e[n],16)):/^[0-9a-f]{6}$/i.test(e)?[0,2,4].map(n=>parseInt(e.slice(n,n+2),16)):null}function Je(t){const e=Et(t);return e?bt(e):null}function bt([t,e,n]){return"#"+[t,e,n].map(s=>Math.round(ar(s,0,255)).toString(16).padStart(2,"0")).join("")}function or([t,e,n]){const[s,r,o]=[t/255,e/255,n/255],i=Math.max(s,r,o),l=Math.min(s,r,o),d=i-l;let u=0;return d&&(i===s?u=(r-o)/d%6:i===r?u=(o-s)/d+2:u=(s-r)/d+4,u*=60,u<0&&(u+=360)),{h:u,s:i?d/i:0,v:i}}function ir({h:t,s:e,v:n}){const s=r=>{const o=(r+t/60)%6;return Math.round(255*(n-n*e*Math.max(0,Math.min(o,4-o,1))))};return[s(5),s(3),s(1)]}const lr=t=>{const e=Et(t);return e?or(e):null},cr=t=>bt(ir(t)),Nt=t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4},za=t=>255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055);function Dn([t,e,n]){return .2126*Nt(t)+.7152*Nt(e)+.0722*Nt(n)}function qt(t,e){const[n,s]=[Dn(t),Dn(e)].sort((r,o)=>o-r);return(n+.05)/(s+.05)}function dr([t,e,n]){const[s,r,o]=[Nt(t),Nt(e),Nt(n)],i=Math.cbrt(.4122214708*s+.5363325363*r+.0514459929*o),l=Math.cbrt(.2119034982*s+.6806995451*r+.1073969566*o),d=Math.cbrt(.0883024619*s+.2817188376*r+.6299787005*o);return[.2104542553*i+.793617785*l-.0040720468*d,1.9779984951*i-2.428592205*l+.4505937099*d,.0259040371*i+.7827717662*l-.808675766*d]}function Ha([t,e,n]){const s=(t+.3963377774*e+.2158037573*n)**3,r=(t-.1055613458*e-.0638541728*n)**3,o=(t-.0894841775*e-1.291485548*n)**3;return[4.0767416621*s-3.3077115913*r+.2309699292*o,-1.2684380046*s+2.6097574011*r-.3413193965*o,-.0041960863*s-.7034186147*r+1.707614701*o]}const Zn=t=>dr(t)[0];function Ss(t,e){const[,n,s]=dr(t),r=Math.hypot(n,s),o=Math.atan2(s,n);let i=0,l=r;const d=f=>Ha([e,f*Math.cos(o),f*Math.sin(o)]),u=f=>f.every(m=>m>=-1e-4&&m<=1+1e-4);if(u(d(r)))i=r;else for(let f=0;f<20;f++){const m=(i+l)/2;u(d(m))?i=m:l=m}return d(i).map(f=>za(ar(f)))}function Cs(t,e,n,s){if(qt(t,e)>=n)return t;const r=Zn(t);let o=0,i=1,l=Ss(t,s);for(let d=0;d<24;d++){const u=(o+i)/2,f=s===0?r-(r-0)*u:r+(1-r)*u,m=Ss(t,f);qt(m,e)>=n?(l=m,i=u):o=u}return l}const ur=.65,qa=[255,255,255],Va=[42,41,39],Es={light:[27,28,34],dark:[244,244,246]},On=1.45;function Bn(t){const e=Et(t);if(!e)return{light:"#ffffff",dark:"#1b1c22"};const n=bt(e);return{light:qt(e,Es.light)<On?"#ffffff":n,dark:qt(e,Es.dark)<On?"#1b1c22":n}}function fr(t){const e=Et(t);return e&&Zn(e)<ur?"#ffffff":"#1b1c22"}function Fn(t){const e=Et(t);if(!e)return{};const n=fr(t),s={"--ok-accent":bt(e),"--ok-on-accent":n,"--ok-accent-deep":bt(Cs(e,qa,4.6,0)),"--ok-accent-light":bt(Cs(e,Va,4.6,1)),"--ok-logo-snout-light":Bn(t).light,"--ok-logo-snout-dark":Bn(t).dark};return n==="#ffffff"&&(s["--ok-accent-fill"]="var(--ok-accent)",s["--ok-accent-fill-hover"]="var(--ok-accent-hover)"),s}const hr="M9 10C9 26 20 38 31 38c7 0 11-5 11-10.500S37.500 18 32 18c-5 0-8.500 3.500-9 8",ln=c.createContext(void 0);function pr({tail:t,children:e}){const n=c.useContext(ln);return a.jsx(ln.Provider,{value:t===void 0?n:t,children:e})}function Wa(){return c.useContext(ln)}function Qn({className:t="ok-tail",...e}){const n=c.useContext(ln);if(n==null||n===!1)return a.jsx("svg",{className:t,viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false",...e,children:a.jsx("path",{pathLength:1,d:hr})});if(typeof n=="function")return a.jsx(a.Fragment,{children:n({className:t})});if(c.isValidElement(n)){const s=n;return c.cloneElement(s,{className:L(t,s.props.className),"aria-hidden":s.props["aria-hidden"]??!0,...s.type==="svg"?{focusable:s.props.focusable??"false"}:null})}return a.jsx("span",{className:t,"aria-hidden":"true",children:n})}const Ga={common:{close:"关闭",clear:"清除",loading:"加载中",remove:"移除",separator:","},avatar:{status:{online:"在线",busy:"忙碌",away:"离开",offline:"离线"},more:t=>`还有 ${t} 人`,moreButton:(t,e)=>`还有 ${t} 人${e?","+e:""},查看全部成员`,panel:(t,e)=>e?`${e}(共 ${t} 人)`:`全部成员(共 ${t} 人)`,rest:t=>`另有 ${t} 人`},breadcrumb:{label:"面包屑",expand:t=>`显示中间的 ${t} 级路径`},code:{label:"代码",copy:"复制代码",copied:"已复制",copyFailed:"复制失败"},pagination:{label:"分页",prev:"上一页",next:"下一页",page:t=>`第 ${t} 页`,status:(t,e)=>`第 ${t} 页,共 ${e} 页`},reaction:{label:"Oink 一下"},stat:{trend:{up:"上升",down:"下降",flat:"持平"}},steps:{label:"步骤",state:{complete:"已完成",current:"当前步骤",upcoming:"未开始"},error:"出错",prefix:(t,e)=>`第 ${t} 步,${e}:`},table:{label:"表格",empty:"暂无数据",selectAll:"选择全部",selectColumn:"选择",selectRow:t=>`选择 ${t}`,row:t=>`第 ${t} 行`,selected:t=>`已选择 ${t} 行`,pagination:t=>`${t}分页`},tag:{remove:t=>`移除${t?` ${t}`:""}`},button:{status:{loading:"正在处理",success:"已完成",error:"操作失败"}},colorPicker:{label:"颜色",area:"饱和度与亮度",areaRole:"二维滑块",areaValue:(t,e)=>`饱和度 ${t}%,亮度 ${e}%`,hue:"色相",hex:"十六进制色值",eyedropper:"从屏幕取色",swatches:"预设颜色"},fileDrop:{title:"把文件拖到这里,或点击选择",status:(t,e,n)=>t?(t===1?`已选择 ${e}`:`已选择 ${t} 个文件`)+(n?`,${n} 个不符合要求`:""):`${n} 个文件不符合要求`},hotkey:{placeholder:"点击录制",recording:"按下组合键…",spokenRecording:t=>`正在录制,${t}`,spokenCurrent:t=>`当前:${t}`,none:"未设置"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"空格",ArrowUp:"上",ArrowDown:"下",ArrowLeft:"左",ArrowRight:"右",Enter:"回车",Backspace:"退格",Tab:"Tab",Escape:"Esc"},input:{showPassword:"显示密码"},numberInput:{decrement:"减少",increment:"增加"},pinInput:{label:"验证码",cell:(t,e)=>`第 ${t} 位,共 ${e} 位`},rangeSlider:{thumbs:["最小值","最大值"]},rating:{label:"评分",star:t=>`${t} 星`,value:(t,e)=>`评分:${t} / ${e}`},searchInput:{placeholder:"搜索…"},appShell:{skipLink:"跳到主要内容",sidebar:"侧栏",aside:"辅助栏",toggleSidebar:"切换导航",toggleAside:"切换辅助栏"},splitPane:{separator:"调整分栏大小"},commandPalette:{label:"命令面板",placeholder:"搜索命令…",empty:"没有匹配的结果",results:t=>`${t} 条结果`},toast:{label:"通知"},confirm:{confirm:"确定",cancel:"取消"},calendar:{prevMonth:"上个月",nextMonth:"下个月",todaySuffix:",今天"},datePicker:{placeholder:"年-月-日",dialog:"选择日期",open:"打开日历",rangePlaceholder:"开始日期 – 结束日期",rangeDialog:"选择日期范围"},combobox:{loading:"加载中…",empty:"没有匹配的选项",listbox:"选项"},select:{placeholder:"请选择",count:t=>`已选 ${t} 项`}},yt=(t,e,n)=>`${t} ${t===1?e:n}`,Ua={common:{close:"Close",clear:"Clear",loading:"Loading",remove:"Remove",separator:", "},avatar:{status:{online:"Online",busy:"Busy",away:"Away",offline:"Offline"},more:t=>`${t} more`,moreButton:(t,e)=>`${t} more${e?", "+e:""}, show all members`,panel:(t,e)=>e?`${e} (${yt(t,"person","people")})`:`All members (${t})`,rest:t=>`And ${t} more`},breadcrumb:{label:"Breadcrumb",expand:t=>`Show ${yt(t,"hidden level","hidden levels")}`},code:{label:"Code",copy:"Copy code",copied:"Copied",copyFailed:"Copy failed"},pagination:{label:"Pagination",prev:"Previous page",next:"Next page",page:t=>`Page ${t}`,status:(t,e)=>`Page ${t} of ${e}`},reaction:{label:"Oink"},stat:{trend:{up:"Up",down:"Down",flat:"Unchanged"}},steps:{label:"Steps",state:{complete:"Completed",current:"Current step",upcoming:"Not started"},error:"Error",prefix:(t,e)=>`Step ${t}, ${e}: `},table:{label:"Table",empty:"No data",selectAll:"Select all",selectColumn:"Select",selectRow:t=>`Select ${t}`,row:t=>`Row ${t}`,selected:t=>`${yt(t,"row","rows")} selected`,pagination:t=>`${t} pagination`},tag:{remove:t=>`Remove${t?` ${t}`:""}`},button:{status:{loading:"Working",success:"Done",error:"Failed"}},colorPicker:{label:"Color",area:"Saturation and brightness",areaRole:"2D slider",areaValue:(t,e)=>`Saturation ${t}%, brightness ${e}%`,hue:"Hue",hex:"Hex color",eyedropper:"Pick color from screen",swatches:"Preset colors"},fileDrop:{title:"Drop files here, or click to browse",status:(t,e,n)=>t?(t===1?`Selected ${e}`:`Selected ${t} files`)+(n?`, ${n} not accepted`:""):`${yt(n,"file","files")} not accepted`},hotkey:{placeholder:"Click to record",recording:"Press keys…",spokenRecording:t=>`Recording, ${t}`,spokenCurrent:t=>`Current: ${t}`,none:"Not set"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right",Enter:"Enter",Backspace:"Backspace",Tab:"Tab",Escape:"Esc"},input:{showPassword:"Show password"},numberInput:{decrement:"Decrease",increment:"Increase"},pinInput:{label:"Verification code",cell:(t,e)=>`Digit ${t} of ${e}`},rangeSlider:{thumbs:["Minimum","Maximum"]},rating:{label:"Rating",star:t=>yt(t,"star","stars"),value:(t,e)=>`Rating: ${t} of ${e}`},searchInput:{placeholder:"Search…"},appShell:{skipLink:"Skip to main content",sidebar:"Sidebar",aside:"Side panel",toggleSidebar:"Toggle navigation",toggleAside:"Toggle side panel"},splitPane:{separator:"Resize panes"},commandPalette:{label:"Command palette",placeholder:"Search commands…",empty:"No results",results:t=>yt(t,"result","results")},toast:{label:"Notifications"},confirm:{confirm:"OK",cancel:"Cancel"},calendar:{prevMonth:"Previous month",nextMonth:"Next month",todaySuffix:", today"},datePicker:{placeholder:"YYYY-MM-DD",dialog:"Choose date",open:"Open calendar",rangePlaceholder:"Start date – End date",rangeDialog:"Choose date range"},combobox:{loading:"Loading…",empty:"No matching options",listbox:"Options"},select:{placeholder:"Select…",count:t=>`${t} selected`}},Vt={"zh-CN":Ga,"en-US":Ua},mr="en-US";function br(t){const e=(t.find(Boolean)??"").toLowerCase();return e==="zh"||e.startsWith("zh-")?"zh-CN":"en-US"}const Ya=t=>(window.addEventListener("languagechange",t),()=>window.removeEventListener("languagechange",t)),Ka=()=>{var t;return br((t=navigator.languages)!=null&&t.length?navigator.languages:[navigator.language])},Xa=()=>mr;function Ja(){return c.useSyncExternalStore(Ya,Ka,Xa)}const zn=c.createContext("auto");function vr({locale:t,children:e}){const n=c.useContext(zn);return a.jsx(zn.Provider,{value:t??n,children:e})}function he(){const t=c.useContext(zn),e=Ja(),n=t==="auto"||!Vt[t]?e:t;return{locale:n,messages:Vt[n]}}const Lt=[[0,0,.4714],[.25,.0266,.447],[.5,.061,.4174],[.75,.1043,.3848],[1.1,.1846,.3359],[1.25,.2171,.3201],[1.375,.2551,.302],[1.5,.2917,.2864],[1.625,.3294,.2714],[1.75,.3673,.2565],[1.875,.4047,.2418],[2,.4393,.2274],[2.25,.4946,.2011],[2.5,.5519,.1767],[2.75,.6129,.1541],[3,.6749,.1334],[3.5,.7875,.0985],[4,.8701,.0718],[5,.9667,.0372],[8,1,0]],As=4/3*Math.tan(Math.PI/16),Za=t=>2**t;function gr(t){if(t===1)return[As,As];if(t>=Lt[Lt.length-1][0])return[1,0];for(let e=1;e<Lt.length;e++){const[n,s,r]=Lt[e];if(t<=n){const[o,i,l]=Lt[e-1],d=(t-o)/(n-o);return[i+(s-i)*d,l+(r-l)*d]}}return[1,0]}function xr(t){if(t<0)return xr(-t).map(([o,i])=>[1-i,1-o]);if(t===1/0)return[[0,1],[0,1],[0,0],[0,0],[0,0],[1,0],[1,0]];const e=1-2**(-1/Za(t)),[n,s]=gr(t),r=s*Math.SQRT1_2;return[[0,1],[0,1-n],[e-r,e+r],[e,e],[e+r,e-r],[1-n,0],[1,0]]}function kr(t,e,n){const[s,r,o,i]=n;let l=1;const d=(u,f)=>{f>u&&f>0&&(l=Math.min(l,Math.max(0,u)/f))};return d(t,s[0]+r[0]),d(t,i[0]+o[0]),d(e,s[1]+i[1]),d(e,r[1]+o[1]),l===1?n:n.map(([u,f])=>[u*l,f*l])}function Ze(t,e){return t.map(([n,s])=>[n>0?Math.max(0,n+e):0,s>0?Math.max(0,s+e):0])}const Oe=(t,e,n=0,s=0)=>({x:t.x-e+n,y:t.y-e+s,w:t.w+2*e,h:t.h+2*e}),Me=t=>{const e=(Math.round(t*1e3)/1e3).toString();return e==="-0"?"0":e};function $e(t,e,n,s=!1){if(t.w<=0||t.h<=0)return"";const{x:r,y:o,w:i,h:l}=t,d=[(h,b,p,v)=>[r+h*p,o+b*v],(h,b,p,v)=>[r+i-h*p,o+b*v],(h,b,p,v)=>[r+i-h*p,o+l-b*v],(h,b,p,v)=>[r+h*p,o+l-b*v]],u=h=>{const[b,p]=e[h];if(b<=0||p<=0)return[d[h](0,0,0,0)];let v=xr(n[h]);return(h===1||h===3)&&(v=v.slice().reverse()),v.map(([g,w])=>d[h](g,w,b,p))},f=[1,2,3,0].map(u);if(s){f.reverse();for(let h=0;h<f.length;h++)f[h]=f[h].slice().reverse()}let m="";return f.forEach((h,b)=>{m+=(b===0?"M":"L")+Me(h[0][0])+" "+Me(h[0][1]);for(let p=1;p+2<h.length;p+=3)m+="C"+[h[p],h[p+1],h[p+2]].map(v=>Me(v[0])+" "+Me(v[1])).join(" ")}),m+"Z"}function We(t,e=!1){const{x:n,y:s,w:r,h:o}=t;return r<=0||o<=0?"":e?`M${Me(n)} ${Me(s)}V${Me(s+o)}H${Me(n+r)}V${Me(s)}Z`:`M${Me(n)} ${Me(s)}H${Me(n+r)}V${Me(s+o)}H${Me(n)}Z`}function yr(t){const e=t.trim().toLowerCase().match(/superellipse\(\s*[^)]*\)|[a-z-]+/g);if(!e||!e.length||e.length>4)return null;const n=[];for(const d of e){let u;const f=/^superellipse\(\s*([^)]*?)\s*\)$/.exec(d);if(f?u=f[1]==="infinity"?1/0:f[1]==="-infinity"?-1/0:parseFloat(f[1]):u={round:1,squircle:2,square:1/0,bevel:0,scoop:-1,notch:-1/0}[d]??NaN,Number.isNaN(u))return null;n.push(u)}const[s,r=s,o=s,i=r]=n,l=[s,r,o,i];return l.every(d=>d===1)?null:l}function wr(t){return!!t&&t.width>0&&!!t.style&&t.style!=="none"&&t.style!=="solid"}function Se(t){const e=t.trim().toLowerCase();if(e==="transparent")return 0;let n=/\/\s*([\d.]+%?)\s*\)$/.exec(e);return!n&&/^(rgba|hsla)\(/.test(e)&&(n=/,\s*([\d.]+%?)\s*\)$/.exec(e)),n?n[1].endsWith("%")?parseFloat(n[1])/100:parseFloat(n[1]):1}function Qa(t){const e=[];let n=0,s=0;for(let r=0;r<t.length;r++){const o=t[r];o==="("?n++:o===")"?n--:o===","&&n===0&&(e.push(t.slice(s,r)),s=r+1)}return e.push(t.slice(s)),e.map(r=>r.trim()).filter(Boolean)}function _r(t){return!t||t==="none"?[]:Qa(t).map(e=>{const n=/[a-z-]+\([^()]*(?:\([^()]*\)[^()]*)*\)/i.exec(e);let s=n?n[0]:"",r=n?e.replace(n[0]," "):e;const o=/\binset\b/.test(r);r=r.replace(/\binset\b/," "),s||(s=r.split(/\s+/).find(d=>d&&!/^-?[\d.]/.test(d))||"currentcolor");const i=(r.match(/-?[\d.]+(?:e-?\d+)?(?=px)/g)||[]).map(Number);return{inset:o,dx:i[0]||0,dy:i[1]||0,spread:i[3]||0,color:s,...i[2]>0?{blur:i[2]}:{}}})}const St=t=>(t.blur??0)*1.5;function tt(t){let e=0;for(const n of t.shadows)!n.inset&&Se(n.color)>0&&(e=Math.max(e,n.spread+St(n)+Math.max(Math.abs(n.dx),Math.abs(n.dy))));return t.outline&&Se(t.outline.color)>0&&(e=Math.max(e,t.outline.offset+t.outline.width)),Math.max(0,e)}const jr=t=>({x:0,y:0,w:t.w,h:t.h});function eo(t){const[e,n,s,r]=t.border,[o,i,l,d]=t.radii,u=(f,m)=>Math.max(0,f-m);return{box:{x:r,y:e,w:t.w-r-n,h:t.h-e-s},radii:[[u(o[0],r),u(o[1],e)],[u(i[0],n),u(i[1],e)],[u(l[0],n),u(l[1],s)],[u(d[0],r),u(d[1],s)]]}}function Nr(t,e={x:0,y:0},n=0){let s="";const r={x:e.x,y:e.y,w:t.w,h:t.h};for(const i of t.shadows)i.inset||Se(i.color)<=0||(s+=$e(Oe(r,i.spread+St(i)+n,i.dx,i.dy),Ze(t.radii,i.spread+St(i)+n),t.ks));const o=t.outline;return o&&o.width>0&&Se(o.color)>0&&(s+=$e(Oe(r,o.offset+o.width+n),Ze(t.radii,o.offset+o.width+n),t.ks),s+=$e(Oe(r,o.offset-n),Ze(t.radii,o.offset-n),t.ks,!0)),s}function to(t,e,n="",s=0){const{w:r,h:o,radii:i}=t,l=Math.max(tt(t),s),d=Math.max(e,l+2);let u=We({x:-d,y:-d,w:r+2*d,h:o+2*d});const[f,m,h,b]=i,p=l+1;return f[0]>0&&f[1]>0&&(u+=We({x:-p,y:-p,w:f[0]+p,h:f[1]+p},!0)),m[0]>0&&m[1]>0&&(u+=We({x:r-m[0],y:-p,w:m[0]+p,h:m[1]+p},!0)),h[0]>0&&h[1]>0&&(u+=We({x:r-h[0],y:o-h[1],w:h[0]+p,h:h[1]+p},!0)),b[0]>0&&b[1]>0&&(u+=We({x:-p,y:o-b[1],w:b[0]+p,h:b[1]+p},!0)),u+=$e(jr(t),i,t.ks),u+Nr(t)+n}function Mr(t){const e=t.shadows.filter(b=>Se(b.color)>0),n=Math.ceil(tt(t))+1+(t.attached?Math.ceil(no(t.attached,t)):0);let s=1+Math.max(...t.border);for(const b of e)(b.inset||b.blur)&&(s=Math.max(s,1+b.spread+St(b)+Math.max(Math.abs(b.dx),Math.abs(b.dy))));s=Math.ceil(s);const[r,o,i,l]=t.radii,d=Math.ceil(Math.max(r[0],l[0]))+s,u=Math.ceil(Math.max(o[0],i[0]))+s,f=Math.ceil(Math.max(r[1],o[1]))+s,m=Math.ceil(Math.max(l[1],i[1]))+s,h=!!t.attached;return{E:n,L:d,R:u,T:f,B:m,stretchX:!h&&d+u+1<=t.w,stretchY:!h&&f+m+1<=t.h}}function no(t,e){let n=0;const s=t.match(/-?[\d.]+/g)||[];for(let r=0;r+1<s.length;r+=2){const o=+s[r],i=+s[r+1];n=Math.max(n,-o,-i,o-e.w,i-e.h)}return n}function so(t){const e=Mr(t);return(e.stretchX?"S":t.w)+"x"+(e.stretchY?"S":t.h)}function es(t,e=t){const{w:n,h:s,radii:r,ks:o}=t;if(n<=0||s<=0||wr(t.outline))return null;const i=r.some(([$,Y])=>$>0&&Y>0),l=t.border.some($=>$>0)&&Se(t.borderColor)>0,d=t.shadows.filter($=>Se($.color)>0),u=t.outline&&t.outline.width>0&&Se(t.outline.color)>0?t.outline:null;if(!l&&(!i||!d.length&&!u))return null;const{E:f,L:m,R:h,T:b,B:p,stretchX:v,stretchY:g}=Mr(e),w=v?m+h+1:n,x=g?b+p+1:s,j=[g?b+f:x/2+f,v?h+f:w/2+f,g?p+f:x/2+f,v?m+f:w/2+f],_={...t,w,h:x},k=jr(_),R=$e(k,r,o),M=eo(_),C=l?$e(M.box,M.radii,o):null,A=1,E=d.filter($=>!$.inset),N=$=>$.spread+Math.max(Math.abs($.dx),Math.abs($.dy)),y=tt(t),B=E.length>0||!!t.attached||u!==null&&u.offset<A&&u.offset+u.width>0?R:$e(Oe(k,A),Ze(r,A),o),[D,I,O,T]=r,F=($,Y,X,ee)=>X>0&&ee>0?We({x:$,y:Y,w:X,h:ee}):"",q=($,Y,X)=>$[0]>0&&$[1]>0?F(Y,X,$[0]+f-1,$[1]+f-1):"";let V=`<clipPath id='h'><path d='${q(D,-f,-f)+q(I,w-I[0]+1,-f)+q(O,w-O[0]+1,x-O[1]+1)+q(T,-f,x-T[1]+1)}'/></clipPath><clipPath id='p'><path d='${C??B}'/></clipPath>`,Z="";if(t.attached&&t.backdrop&&Se(t.backdrop)>0&&(V+=`<mask id='ba' maskUnits='userSpaceOnUse' x='${-f}' y='${-f}' width='${w+2*f}' height='${x+2*f}'><path fill='#fff' d='${We(k)}'/><path fill='#000' d='${R}'/></mask>`,Z+=`<path mask='url(#ba)' clip-path='url(#h)' fill='${t.backdrop}' d='${t.attached}'/>`),E.length){if(V+=`<clipPath id='s'><path clip-rule='evenodd' d='${We(Oe(k,f))}${R}'/></clipPath>`,Z+="<g clip-path='url(#h)'><g clip-path='url(#s)'>",t.backdrop&&Se(t.backdrop)>0){const $=E.map(Y=>$e(Oe(k,Y.spread+St(Y),Y.dx,Y.dy),Ze(r,Y.spread+St(Y)),o)).join("");Z+=`<path fill='${t.backdrop}' d='${$}'/>`}E.slice().reverse().forEach(($,Y)=>{const X=!$.blur&&N($)>=y&&y>0?A:0,ee=$e(Oe(k,$.spread+X,$.dx,$.dy),Ze(r,$.spread+X),o);let ie="";if($.blur){const U=`sb${Y}`;V+=`<filter id='${U}' filterUnits='userSpaceOnUse' x='${-f}' y='${-f}' width='${w+2*f}' height='${x+2*f}' color-interpolation-filters='sRGB'><feGaussianBlur stdDeviation='${$.blur/2}'/></filter>`,ie=` filter='url(#${U})'`}Z+=`<path${ie} fill='${$.color}' d='${ee}'/>`}),Z+="</g></g>"}if(d.filter($=>$.inset).reverse().forEach($=>{const Y=Oe(M.box,-$.spread,$.dx,$.dy);if(Y.w<=0||Y.h<=0)return;const X=$e(Y,Ze(M.radii,-$.spread),o);Z+=`<path clip-path='url(#p)' fill-rule='evenodd' fill='${$.color}' d='${We(Y)}${X}'/>`}),C&&(Z+=`<path fill-rule='evenodd' fill='${t.borderColor}' d='${R}${C}'/>`,B!==R&&(Z+=`<path clip-path='url(#h)' fill-rule='evenodd' fill='${t.borderColor}' d='${B}${R}'/>`)),u&&i){const $=u.offset,Y=u.width,X=Oe(k,$);V+=`<clipPath id='o' clip-path='url(#h)'><path d='${We(X)}'/></clipPath>`;const ee=$+Y>0&&$+Y>=y?A:0,ie=$>=A?A:0,U=$e(Oe(k,$+Y+ee),Ze(r,$+Y+ee),o),H=$e(Oe(k,$-ie),Ze(r,$-ie),o);Z+=`<path clip-path='url(#o)' fill-rule='evenodd' fill='${u.color}' d='${U}${H}'/>`}if(!Z)return null;const K=w+2*f,P=x+2*f;return{svg:`<svg xmlns='http://www.w3.org/2000/svg' width='${K}' height='${P}' viewBox='${-f} ${-f} ${K} ${P}'><defs>${V}</defs>${Z}</svg>`,slice:j,outset:f}}function Rr(t){const e=t.slice.map(s=>Me(s)).join(" "),n=t.slice.map(s=>Me(s)+"px").join(" ");return`url("data:image/svg+xml,${encodeURIComponent(t.svg)}") ${e} / ${n} / ${Me(t.outset)}px stretch`}let ro=0;function ao(t){var e,n;return typeof t.getCSSCanvasContext=="function"&&!!((n=(e=t.defaultView)==null?void 0:e.CSS)!=null&&n.supports("border-image-source","-webkit-canvas(ok-se-probe)"))}class oo{constructor(e){this.name=`ok-se-${++ro}`,this.context=null,this.doc=e}paint(e){var b;if(!e)return this.context&&this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height),"";const n=new DOMParser().parseFromString(e.svg,"image/svg+xml"),s=n.documentElement,r=Number(s.getAttribute("width")),o=Number(s.getAttribute("height")),i=((b=this.doc.defaultView)==null?void 0:b.devicePixelRatio)||1,l=this.doc.getCSSCanvasContext("2d",this.name,Math.ceil(r*i),Math.ceil(o*i));this.context=l,l.clearRect(0,0,l.canvas.width,l.canvas.height),l.save(),l.scale(i,i),l.translate(e.outset,e.outset);const d=p=>p?n.getElementById(p.slice(5,-1)):null,u=p=>{const v=d(p.getAttribute("clip-path"));v&&u(v);for(const g of Array.from(p.children))g.tagName==="path"&&l.clip(new Path2D(g.getAttribute("d")),g.getAttribute("clip-rule")==="evenodd"?"evenodd":"nonzero")},f=p=>{var w;if(p.tagName==="defs")return;l.save();const v=d(p.getAttribute("clip-path"));v&&u(v);const g=d(p.getAttribute("mask"));if(g&&l.clip(new Path2D(Array.from(g.children).map(x=>x.getAttribute("d")).join("")),"evenodd"),p.tagName==="path"){const x=new Path2D(p.getAttribute("d")),j=p.getAttribute("fill")||"#000",_=p.getAttribute("fill-rule")==="evenodd"?"evenodd":"nonzero",k=d(p.getAttribute("filter")),R=Number((w=k==null?void 0:k.firstElementChild)==null?void 0:w.getAttribute("stdDeviation"));R?(l.shadowColor=j,l.shadowBlur=R*2*i,l.shadowOffsetX=1e4*i,l.translate(-1e4,0),l.fillStyle="#000"):l.fillStyle=j,l.fill(x,_)}else for(const x of Array.from(p.children))f(x);l.restore()};f(s),l.restore();const m=e.slice.map(p=>p*i).join(" "),h=e.slice.map(p=>`${p}px`).join(" ");return`-webkit-canvas(${this.name}) ${m} / ${h} / ${e.outset}px stretch`}destroy(){this.context&&this.doc.getCSSCanvasContext("2d",this.name,0,0),this.context=null}}const io=["","::before","::after"],en={"":"data-ok-se","::before":"data-ok-se-before","::after":"data-ok-se-after"},Sn={"":"--ok-se","::before":"--ok-se-before","::after":"--ok-se-after"},Cn="data-ok-corner-fallback",lo=/^(box-shadow|outline|outline-(color|width|offset|style)|border(-(top|right|bottom|left))?(-(color|width))?|width|height|inset|top|right|bottom|left|border-.*radius|all)$/,Ts=/^(box-shadow|outline-color|border(-top)?-color)$/;function Sr(){return!Ae||typeof CSS>"u"||typeof CSS.supports!="function"||CSS.supports("corner-shape","superellipse(2)")?!1:typeof ResizeObserver=="function"&&typeof MutationObserver=="function"}let $s=0,jt=null;function Cr(){if(!Sr())return()=>{};$s++,jt||(jt=new vo(document));let t=!1;return()=>{t||(t=!0,--$s===0&&jt&&(jt.destroy(),jt=null))}}const co=()=>jt!==null;function Er(t=!0){ve(()=>t?Cr():void 0,[t])}const Ve=t=>parseFloat(t)||0;function uo(t,e,n){const s=t.trim().split(/\s+/),r=(o,i)=>o.endsWith("%")?parseFloat(o)/100*i:Ve(o);return[r(s[0],e),r(s[1]??s[0],n)]}const tn=new Map,Dt=new Map;let fo=0;function ho(t,e){const n=JSON.stringify([t,e]);return Dt.has(n)||(Dt.size>500&&Dt.clear(),Dt.set(n,es(t,e))),Dt.get(n)}function po(t,e){let n=t;for(const f of e)n=mt(n,f,!1);const s={...t,shadows:[...n.shadows,...t.shadows],outline:tt(n)>tt(t)?n.outline:t.outline},r=++fo,o=(f,m)=>f.replace(/^<svg[^>]*>|<\/svg>$/g,"").replace(/id='([^']+)'/g,`id='${m}$1'`).replace(/url\(#([^)]*)\)/g,`url(#${m}$1)`),i=e.map((f,m)=>`@keyframes ok-se-fade-${r}-${m}-a{from{opacity:1}to{opacity:0}}@keyframes ok-se-fade-${r}-${m}-b{from{opacity:0}to{opacity:1}}`).join("");let l=null,d="";for(let f=0;f<2**e.length;f++){let m=t;e.forEach((p,v)=>{m=mt(m,p,!!(f&1<<v))});const h=ho(m,s);if(!h)continue;l=h;let b=o(h.svg,`p${f}-`);e.forEach((p,v)=>{b=`<g style='animation:ok-se-fade-${r}-${v}-${f&1<<v?"b":"a"} ${p.duration}ms ${p.easing} ${p.delay}ms both'>${b}</g>`}),d+=`<g style='mix-blend-mode:plus-lighter'>${b}</g>`}if(!l)return"";const u=`<style>${i}</style><g style='isolation:isolate'>${d}</g>`;return Rr({...l,svg:l.svg.replace(/(<svg[^>]*>)[\s\S]*<\/svg>$/,`$1${u}</svg>`)})}function mt(t,e,n){const s=n?e.to:e.from;return e.property==="box-shadow"?{...t,shadows:_r(s)}:e.property==="outline-color"?{...t,outline:t.outline&&{...t.outline,color:s}}:{...t,borderColor:s}}function mo(t,e){const n=s=>s.shadows.map(r=>[r.inset,r.dx,r.dy,r.spread,r.blur??0]);return JSON.stringify(n(t))===JSON.stringify(n(e))||!t.shadows.length&&e.shadows.every(s=>s.dx===0&&s.dy===0&&!s.blur&&s.spread===0)||!e.shadows.length&&t.shadows.every(s=>s.dx===0&&s.dy===0&&!s.blur&&s.spread===0)}function Ps(t){const e=t.decor;let n=e;for(const s of t.fades.values())n=mt(n,s,!1);return{...e,shadows:e.shadows.map((s,r)=>Se(s.color)>0?s:n.shadows[r]??s),outline:e.outline&&Se(e.outline.color)>0?e.outline:n.outline}}function bo(t){const e=JSON.stringify({...t,w:0,h:0})+so(t);let n=tn.get(e);if(n===void 0){const s=es(t);n=s?Rr(s):"",tn.size>500&&tn.clear(),tn.set(e,n)}return n}function Is(t,e){for(let n=e;n;n=n.parentElement){const s=t.getComputedStyle(n).backgroundColor;if(Se(s)>=.99)return s}return""}class vo{constructor(e){var n,s,r,o,i;this.parts=new Map,this.sizes=new WeakMap,this.watchers=new Map,this.raf=0,this.animating=new Map,this.pendingScan=new Set,this.scanAll=!1,this.mql=null,this.flushing=!1,this.interactionPending=!1,this.destroyed=!1,this.onInteract=l=>{if(!this.parts.size)return;const d=l.target instanceof Node?l.target:null,u=l.relatedTarget instanceof Node?l.relatedTarget:null;let f=this.doc;if(d&&u){let h=d;for(;h&&!h.contains(u);)h=h.parentNode;f=h??this.doc}else d&&(l.type==="click"||l.type==="change"||l.type==="input"||l.type==="pointerdown"||l.type==="pointerup")&&(f=d.parentNode??this.doc);let m=!1;for(const[h,b]of this.parts)(f===this.doc||f.contains(h)||d&&h.contains(d))&&(b.forEach(p=>{p.paintDirty=!0}),m=!0);m&&!this.interactionPending&&(this.interactionPending=!0,queueMicrotask(()=>{this.interactionPending=!1,this.destroyed||this.flush()}))},this.onAnim=l=>{var m;const d=l.target,u=(m=this.parts.get(d))==null?void 0:m.get(l.pseudoElement||"");if(!u)return;if("propertyName"in l){if(!lo.test(l.propertyName))return;if(!this.canvas&&l.type==="transitionrun"&&Ts.test(l.propertyName)&&this.startFade(u,l.propertyName)){u.paintDirty=!0,this.flush();return}if(u.fades.has(l.propertyName)){l.type!=="transitionrun"&&u.fades.delete(l.propertyName),u.paintDirty=!0,u.needsWrite=!0,this.flush();return}}else if(l.type==="animationstart"&&!this.animationTouchesPaint(d,l.animationName))return;const f=this.animating.get(u)??0;l.type==="transitionrun"||l.type==="animationstart"?this.animating.set(u,f+1):f<=1?this.animating.delete(u):this.animating.set(u,f-1),u.paintDirty=!0,this.flush(),this.animating.size&&this.schedule()},this.onResize=()=>{for(const l of this.parts.values())l.forEach(d=>{d.geomDirty=d.paintDirty=!0});this.schedule()},this.doc=e,this.canvas=ao(e),this.root=e.documentElement,this.root.setAttribute(Cn,""),this.ro=new ResizeObserver(l=>{var d;for(const u of l){const f=u.borderBoxSize&&u.borderBoxSize[0];this.sizes.set(u.target,f?[f.inlineSize,f.blockSize]:[u.contentRect.width,u.contentRect.height]),(d=this.watchers.get(u.target))==null||d.forEach(m=>{m.paintDirty=!0})}this.flush()}),this.mo=new MutationObserver(l=>{this.onMutations(l),this.flush()}),this.mo.observe(this.root,{subtree:!0,childList:!0,attributes:!0});for(const l of["pointerover","pointerout","pointerdown","pointerup","pointercancel","focusin","focusout","keydown","keyup","click","change","input"])e.addEventListener(l,this.onInteract,!0);for(const l of["transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel"])e.addEventListener(l,this.onAnim,!0);(n=e.defaultView)==null||n.addEventListener("resize",this.onResize),this.mql=((r=(s=e.defaultView)==null?void 0:s.matchMedia)==null?void 0:r.call(s,"(prefers-color-scheme: dark)"))??null,(i=(o=this.mql)==null?void 0:o.addEventListener)==null||i.call(o,"change",this.onResize),this.scanAll=!0,this.flush()}destroy(){var e,n,s;this.destroyed=!0,this.mo.disconnect(),this.ro.disconnect(),this.raf&&cancelAnimationFrame(this.raf);for(const r of["pointerover","pointerout","pointerdown","pointerup","pointercancel","focusin","focusout","keydown","keyup","click","change","input"])this.doc.removeEventListener(r,this.onInteract,!0);for(const r of["transitionrun","transitionend","transitioncancel","animationstart","animationend","animationcancel"])this.doc.removeEventListener(r,this.onAnim,!0);(e=this.doc.defaultView)==null||e.removeEventListener("resize",this.onResize),(s=(n=this.mql)==null?void 0:n.removeEventListener)==null||s.call(n,"change",this.onResize);for(const r of this.parts.values())for(const o of r.values())this.clearPart(o);this.parts.clear(),this.watchers.clear(),this.animating.clear(),this.root.removeAttribute(Cn)}onMutations(e){for(const n of e)if(n.type==="childList")n.addedNodes.forEach(s=>{s.nodeType===1&&this.pendingScan.add(s)});else if(n.type==="attributes"){const s=n.target;n.attributeName==="style"?this.forPartsIn(s,r=>{r.paintDirty=!0,r.el===s&&(r.geomDirty=!0)}):s===this.root||s===this.doc.body?n.attributeName!==Cn&&this.forPartsIn(this.doc,r=>{r.paintDirty=!0}):this.pendingScan.add(s.parentElement??s)}}forPartsIn(e,n){for(const[s,r]of this.parts)(e===this.doc||e.contains(s))&&r.forEach(n)}identify(e){var s;if(!(e instanceof HTMLElement))return;const n=this.doc.defaultView;for(const r of io){const o=n.getComputedStyle(e,r||null).getPropertyValue("--ok-shape"),i=o?yr(o):null,l=(s=this.parts.get(e))==null?void 0:s.get(r);i&&!l?this.addPart(e,r,i):!i&&l?this.removePart(l):i&&l&&(i.join()!==l.ks.join()&&(l.ks=i),l.geomDirty=l.paintDirty=!0)}}addPart(e,n,s){const r={el:e,pseudo:n,ks:s,rawRadii:null,geomDirty:!0,paintDirty:!0,needsWrite:!0,clipsOverflow:!1,key:"",decor:null,attached:"",attachedReach:0,clip:"",paint:"",active:!1,native:!1,anchor:null,watched:[],clipKey:"",fades:new Map,fadeKey:"",canvas:null};let o=this.parts.get(e);if(o||(o=new Map,this.parts.set(e,o)),o.set(n,r),this.watch(e,r),n){const i=e.offsetParent;i&&i!==e&&this.watch(i,r)}}watch(e,n){let s=this.watchers.get(e);s||(s=new Set,this.watchers.set(e,s),this.ro.observe(e)),s.add(n),n.watched.push(e)}removePart(e){this.clearPart(e);const n=this.parts.get(e.el);n==null||n.delete(e.pseudo),n&&!n.size&&this.parts.delete(e.el),this.animating.delete(e);for(const s of e.watched){const r=this.watchers.get(s);r&&r.delete(e)&&!r.size&&(this.watchers.delete(s),this.ro.unobserve(s))}e.watched=[]}clearPart(e){var n;(n=e.canvas)==null||n.destroy(),e.canvas=null,e.el.removeAttribute(en[e.pseudo]),e.el.style.removeProperty(Sn[e.pseudo]+"-clip"),e.el.style.removeProperty(Sn[e.pseudo]+"-paint"),e.fades.clear(),e.fadeKey="",e.clip=e.paint=e.clipKey="",e.active=!1}startFade(e,n){var m,h,b;const s=(h=(m=e.el).getAnimations)==null?void 0:h.call(m).find(p=>{const v=p.effect;return p.transitionProperty===n&&((v==null?void 0:v.pseudoElement)||"")===e.pseudo}),r=s==null?void 0:s.effect,o=r==null?void 0:r.getKeyframes();if(!s||!r||!o||o.length!==2||!e.decor)return!1;if(((b=e.fades.get(n))==null?void 0:b.animation)===s)return!0;const i=n.replace(/-([a-z])/g,(p,v)=>v.toUpperCase()),l=o[0][i],d=o[1][i],u=r.getTiming();if(typeof l!="string"||typeof d!="string"||typeof u.duration!="number"||!u.duration)return!1;const f={animation:s,property:n,from:l,to:d,duration:u.duration,delay:Number(u.delay)-Number(s.currentTime??0),easing:u.easing&&u.easing!=="linear"?u.easing:o[0].easing||"linear"};return mo(mt(e.decor,f,!1),mt(e.decor,f,!0))?(e.fades.set(n,f),e.fadeKey="",e.needsWrite=!0,!0):!1}animationTouchesPaint(e,n){var s,r,o;try{const i=(s=e.getAnimations)==null?void 0:s.call(e,{subtree:!0}).find(d=>d.animationName===n),l=(o=(r=i==null?void 0:i.effect)==null?void 0:r.getKeyframes)==null?void 0:o.call(r);return l?l.some(d=>Object.keys(d).some(u=>/^(boxShadow|outline|border)/.test(u))):!0}catch{return!0}}schedule(){this.raf||(this.raf=requestAnimationFrame(()=>{this.raf=0,this.animating.forEach((e,n)=>{n.paintDirty=!0}),this.flush(),this.animating.size&&this.schedule()}))}flush(){if(!this.flushing){this.flushing=!0;try{this.flushInner()}finally{this.mo.takeRecords(),this.flushing=!1}}}flushInner(){if(this.onMutations(this.mo.takeRecords()),this.scanAll)this.scanAll=!1,this.pendingScan.clear(),this.identify(this.root),this.root.querySelectorAll("*").forEach(i=>this.identify(i));else if(this.pendingScan.size){const i=[...this.pendingScan];this.pendingScan.clear();for(const l of i)l.isConnected&&(this.identify(l),l.querySelectorAll("*").forEach(d=>this.identify(d)),this.forPartsIn(l,d=>{d.geomDirty=d.paintDirty=!0}))}for(const[i,l]of this.parts)i.isConnected||l.forEach(d=>this.removePart(d));const e=[];this.parts.forEach(i=>i.forEach(l=>e.push(l)));const n=e.filter(i=>i.geomDirty);n.length&&this.readRadii(n);const s=this.doc.defaultView;for(const i of e)i.paintDirty&&(i.paintDirty=!1,this.readDecor(i,s));const r=new Set(e.filter(i=>i.decor&&wr(i.decor.outline)));for(const i of r)if(i.pseudo){const l=this.anchorOf(i);l&&r.add(l)}for(const i of e){const l=r.has(i);i.native!==l&&(i.native=l,i.needsWrite=!0)}const o=new Map;for(const i of e){if(!i.pseudo||!i.decor||i.native)continue;const l=Ps(i),d=tt(l);if(d<=0)continue;const u=this.anchorOf(i);if(!u)continue;const f=o.get(u)??{path:"",reach:0};f.path+=Nr(l,{x:0,y:0},1),f.reach=Math.max(f.reach,d+1),o.set(u,f)}for(const i of e){const l=o.get(i)??{path:"",reach:0};l.path!==i.attached&&(i.attached=l.path,i.attachedReach=l.reach,i.needsWrite=!0)}for(const i of e)i.needsWrite&&(i.needsWrite=!1,this.write(i))}readRadii(e){var i;const n=this.doc.defaultView,s=new Set,r=l=>{l.active&&!s.has(l)&&(s.add(l),l.el.setAttribute(en[l.pseudo],"r"))},o=new Set;for(const l of e)for(let d=l.el;d&&!o.has(d);d=d.parentElement)o.add(d),(i=this.parts.get(d))==null||i.forEach(r);for(const l of e){const d=n.getComputedStyle(l.el,l.pseudo||null);l.rawRadii=[d.borderTopLeftRadius,d.borderTopRightRadius,d.borderBottomRightRadius,d.borderBottomLeftRadius],l.geomDirty=!1,l.paintDirty=!0}for(const l of s)l.el.setAttribute(en[l.pseudo],"on")}sizeOf(e,n){if(e.pseudo)return n.display==="none"||n.content==="none"?null:[Ve(n.width),Ve(n.height)];if(n.display==="inline"){const s=e.el.parentElement;s&&!e.watched.includes(s)&&this.watch(s,e);const r=e.el.getClientRects();return r.length!==1?null:[r[0].width,r[0].height]}return this.sizes.get(e.el)??null}readDecor(e,n){var p,v;const s=n.getComputedStyle(e.el,e.pseudo||null);for(const g of((v=(p=e.el).getAnimations)==null?void 0:v.call(p))??[]){const w=g.transitionProperty;!this.canvas&&Ts.test(w)&&this.startFade(e,w)}const r=this.sizeOf(e,s);if(!r||!e.rawRadii){(e.decor||e.active)&&(e.needsWrite=!0),e.decor=null,e.key="";return}const[o,i]=r,l=e.rawRadii.map(g=>uo(g,o,i)),d=s.outlineStyle!=="none"&&Ve(s.outlineWidth)>0,u=[Ve(s.borderTopWidth),Ve(s.borderRightWidth),Ve(s.borderBottomWidth),Ve(s.borderLeftWidth)];let f={w:o,h:i,radii:kr(o,i,l),ks:e.ks,border:u,borderColor:u.some(g=>g>0)?s.borderTopColor:"transparent",shadows:_r(s.boxShadow),outline:d?{offset:Ve(s.outlineOffset),width:Ve(s.outlineWidth),color:s.outlineColor,style:s.outlineStyle}:null};for(const g of e.fades.values())f=mt(f,g,!0);let m=f;for(const g of e.fades.values())m=mt(m,g,!1);if(tt(f)>0||tt(m)>0){const g=e.pseudo?this.anchorOf({...e,decor:f}):null;f.backdrop=Is(n,(g?g.el:e.el).parentElement)}const h=e.pseudo?!0:s.overflowX!=="visible"&&s.overflowY!=="visible",b=JSON.stringify(f)+h+(this.canvas?n.devicePixelRatio:"");b!==e.key&&(e.key=b,e.decor=f,e.clipsOverflow=h,e.needsWrite=!0)}anchorOf(e){var r;const n=e.decor,s=o=>{const i=this.sizes.get(o);return!!i&&Math.abs(i[0]-n.w)<.5&&Math.abs(i[1]-n.h)<.5};for(let o=e.el;o;o=o.parentElement){const i=(r=this.parts.get(o))==null?void 0:r.get("");if(i&&i!==e&&s(o))return i}return null}write(e){const n=e.decor,s=en[e.pseudo],r=Sn[e.pseudo];if(!n||e.native){e.active&&this.clearPart(e);return}const o=Ps(e),i=JSON.stringify([o.w,o.h,o.radii,o.ks,o.shadows.map(m=>[m.inset,m.dx,m.dy,m.spread,m.blur??0,Se(m.color)>0]),o.outline&&[o.outline.offset,o.outline.width,Se(o.outline.color)>0],e.attached,e.attachedReach,e.clipsOverflow]),l=i===e.clipKey?e.clip:`path("${to(o,e.clipsOverflow?0:1024,e.attached,e.attachedReach)}")`;e.clipKey=i;let d=n;e.attached&&(d={...n,attached:e.attached,backdrop:n.backdrop||Is(this.doc.defaultView,e.el.parentElement)});let u;const f=JSON.stringify({...d,backdrop:tt(d)>0||d.attached?d.backdrop:void 0});this.canvas?(e.canvas??(e.canvas=new oo(this.doc)),u=e.canvas.paint(es(d))):e.fades.size?e.fadeKey===f?u=e.paint:(u=po(d,[...e.fades.values()].map(m=>{var h;return{...m,delay:Number(((h=m.animation.effect)==null?void 0:h.getTiming().delay)??0)-Number(m.animation.currentTime??0)}})),e.fadeKey=f):u=e.fadeKey===f?e.paint:bo(d),l!==e.clip&&(e.el.style.setProperty(r+"-clip",l),e.clip=l),u!==e.paint&&(u?e.el.style.setProperty(r+"-paint",u):e.el.style.removeProperty(r+"-paint"),e.paint=u),(!e.active||e.el.getAttribute(s)!=="on")&&(e.el.setAttribute(s,"on"),e.active=!0)}}const Ar=["pink","orange","amber","blue","violet"],Ft=t=>t.startsWith("#");function Tr(t){return typeof t=="string"&&(Ar.includes(t)||t.startsWith("#")&&Je(t)!==null)}function ts(t){return Tr(t)?Ft(t)?Je(t):t:null}const $r=520,Pr=c.createContext(null);function go(t){if(!t||!Ae)return{};let e={};try{e=JSON.parse(localStorage.getItem(t)||"{}")||{}}catch{return{}}return{theme:["light","dark","system"].includes(e.theme)?e.theme:void 0,accent:ts(e.accent)??void 0,motion:["auto","full","reduced"].includes(e.motion)?e.motion:void 0}}const xo=["--ok-accent","--ok-on-accent","--ok-accent-deep","--ok-accent-light","--ok-accent-fill","--ok-accent-fill-hover","--ok-logo-snout-light","--ok-logo-snout-dark"];let nn=null;function ko(){if(nn)return nn;const t=":root.ok-theming::view-transition-new(root){clip-path:circle(0px at 50% 0%)}:root.ok-theming::view-transition-old(root){animation-duration:600ms}";let e;try{e=new CSSStyleSheet,e.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}catch{const n=document.createElement("style");n.textContent=t,document.head.appendChild(n),e=n.sheet}return nn={next:e.cssRules[0].style,old:e.cssRules[1].style},nn}function yo(t){const o=1.2000000000000002,i=3*(.2-.4)-o,l=1-o-i,d=3*0,u=3*1-d,f=1-d-u;let m=t;for(let h=0;h<6;h++){const b=(3*l*m+2*i)*m+o;if(Math.abs(b)<1e-6)break;m-=(((l*m+i)*m+o)*m-t)/b}return((f*m+u)*m+d)*m}function wo({children:t,defaultTheme:e="system",defaultAccent:n="pink",defaultMotion:s="auto",storageKey:r,tail:o,locale:i,cornerFallback:l=!0}){Er(l);const[d,u]=c.useState(e),[f,m]=c.useState(n),h=c.useCallback(M=>{const C=ts(M);C&&m(C)},[]),[b,p]=c.useState(s),v=fn("(prefers-color-scheme: dark)"),g=d==="system"?v?"dark":"light":d,[w,x]=c.useState(!r);ve(()=>{if(!r)return;const M=go(r);M.theme&&u(M.theme),M.accent&&m(M.accent),M.motion&&p(M.motion),x(!0)},[r]),c.useEffect(()=>{if(!w)return;const M=document.documentElement;M.dataset.theme=g,M.dataset.accent=Ft(f)?"custom":f,xo.forEach(C=>M.style.removeProperty(C)),Ft(f)&&Object.entries(Fn(f)).forEach(([C,A])=>M.style.setProperty(C,A)),b==="auto"?delete M.dataset.motion:M.dataset.motion=b,M.style.colorScheme=g},[w,g,f,b]),c.useEffect(()=>{if(!r||!w)return;const M=Ft(f)?Fn(f):void 0;try{localStorage.setItem(r,JSON.stringify({theme:d,accent:f,motion:b,vars:M}))}catch{}},[r,w,d,f,b]);const j=c.useRef(null),_=c.useRef(0),k=ke((M,C)=>{var q;const A=document.documentElement,E=document.startViewTransition,N=M==="system"?v?"dark":"light":M,y=()=>{A.dataset.theme=N,A.style.colorScheme=N,u(M)},S=++_.current;if(j.current){const G=j.current;j.current=null,A.classList.remove("ok-theming");try{(q=G.skipTransition)==null||q.call(G)}catch{}y();return}if(!C||!E||Ue()===0||document.hidden||N===g){u(M);return}const B=Math.ceil(Math.hypot(Math.max(C.x,innerWidth-C.x),Math.max(C.y,innerHeight-C.y))),D=$r*Ue(),I=ko(),O=` at ${Math.round(C.x)}px ${Math.round(C.y)}px)`;I.next.clipPath="circle(0px"+O,I.old.animationDuration=Math.round(D+80)+"ms",A.classList.add("ok-theming");let T;try{T=E.call(document,()=>Zs.flushSync(y))}catch{A.classList.remove("ok-theming"),y();return}j.current=T,T.ready.then(()=>{const G=performance.now(),V=Z=>{if(S!==_.current)return;const K=Math.min(1,(Z-G)/D);I.next.clipPath=`circle(${Math.round(B*yo(K))}px${O}`,K<1&&requestAnimationFrame(V)};requestAnimationFrame(V)}).catch(()=>{});const F=()=>{j.current===T&&(j.current=null,A.classList.remove("ok-theming"))};T.finished.then(F,F)}),R=c.useMemo(()=>({theme:d,resolvedTheme:g,accent:f,motion:b,setTheme:k,setAccent:h,setMotion:p}),[d,g,f,b,k,h]);return a.jsx(Pr.Provider,{value:R,children:a.jsx(vr,{locale:i,children:a.jsx(pr,{tail:o,children:t})})})}function _o(){const t=c.useContext(Pr),e=c.useCallback(()=>{},[]);return t??{theme:"light",resolvedTheme:"light",accent:"pink",motion:"auto",setTheme:e,setAccent:e,setMotion:e}}const Ir="M10 3H18A7 7 0 0 1 25 10V18A7 7 0 0 1 18 25H5A2 2 0 0 1 3 23V10A7 7 0 0 1 10 3Z",rn={x:15.5,y:15,width:13.5,height:10,rx:5},Hn=[{cx:20,cy:20},{cx:24.5,cy:20}],jo=c.forwardRef(function({size:e=28,wordmark:n=!1,title:s="Oink UI",animated:r=!1,mono:o=!1,className:i,style:l,...d},u){const f=c.useId().replace(/:/g,""),m=`ok-logo-gap-${f}`,h=`ok-logo-holes-${f}`,p=d["aria-hidden"]===!0||d["aria-hidden"]==="true"?null:{role:"img","aria-label":s};return a.jsxs("span",{ref:u,className:L("ok-logo",o&&"ok-logo--mono",i),"data-animated":r||void 0,style:{"--ok-logo-size":`${e}px`,...l},...p,...d,children:[a.jsxs("svg",{className:"ok-logo__mark",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:[o&&a.jsxs("defs",{children:[a.jsxs("mask",{id:m,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[a.jsx("rect",{x:"0",y:"0",width:"32",height:"32",fill:"#fff"}),a.jsx("rect",{...rn,fill:"#000",stroke:"#000",strokeWidth:3})]}),a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[a.jsx("rect",{...rn,fill:"#fff"}),Hn.map(v=>a.jsx("ellipse",{cx:v.cx,cy:v.cy,rx:1.3,ry:1.9,fill:"#000"},v.cx))]})]}),a.jsxs("g",{transform:"rotate(-8 16 16)",children:[a.jsx("path",{className:"ok-logo__ink",d:Ir,mask:o?`url(#${m})`:void 0}),a.jsxs("g",{className:"ok-logo__snout",children:[a.jsx("rect",{className:"ok-logo__accent",...rn,mask:o?`url(#${h})`:void 0}),!o&&Hn.map(v=>a.jsx("ellipse",{className:"ok-logo__nostril",cx:v.cx,cy:v.cy,rx:1.3,ry:1.9},v.cx))]})]})]}),n&&a.jsx("span",{className:"ok-logo__word","aria-hidden":"true",children:"Oink UI"})]})}),pn="M3.6 8.4l2.9 2.9 5.9-6.4",No="M4.5 4.5l7 7M11.5 4.5l-7 7";function mn(t,e){const n={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key],s=t.key==="Home"?"first":t.key==="End"?"last":null;if(!n&&!s)return null;const r=Array.from(t.currentTarget.querySelectorAll(e)).filter(i=>!i.disabled&&i.getAttribute("aria-disabled")!=="true");if(!r.length)return null;if(t.preventDefault(),s)return s==="first"?r[0]:r[r.length-1];const o=r.indexOf(document.activeElement);return r[(o+n+r.length)%r.length]}function ns(t,e,n,s){if(!Ae)return()=>{};const r=e.pointerId;let o=!0;const i=d=>{if(!(!o||d.pointerId!==r)){if(!(d.buttons&1)){l();return}n(d)}};function l(){if(o){o=!1,document.removeEventListener("pointermove",i,!0),document.removeEventListener("pointerup",l,!0),document.removeEventListener("pointercancel",l,!0),document.removeEventListener("pointerdown",l,!0),window.removeEventListener("blur",l);try{t.releasePointerCapture(r)}catch{}s()}}try{t.setPointerCapture(r)}catch{}return document.addEventListener("pointermove",i,!0),document.addEventListener("pointerup",l,!0),document.addEventListener("pointercancel",l,!0),document.addEventListener("pointerdown",l,!0),window.addEventListener("blur",l),l}function Mo(t){const e=String(t);if(e.includes("e-"))return parseInt(e.split("e-")[1],10);const n=e.indexOf(".");return n<0?0:e.length-n-1}Vt["zh-CN"].button.status;const Lr=c.createContext({}),Dr=c.forwardRef(function(e,n){const s=c.useContext(Lr),{variant:r=s.variant??"soft",size:o=s.size??"md",loading:i,success:l,error:d,statusLabels:u,leading:f,trailing:m,block:h,iconOnly:b,disabled:p=s.disabled,href:v,target:g,rel:w,download:x,type:j="button",className:_,children:k,onClick:R,"aria-disabled":M,...C}=e,A=he().messages.button.status,E=M===!0||M==="true",N=!!p||E,y=i?"loading":l?"success":d?"error":void 0,S=i!==void 0||l!==void 0||d!==void 0,[B,D]=c.useState(""),I=y?(u==null?void 0:u[y])??A[y]:null;c.useEffect(()=>{I&&D(I)},[I]);const O=G=>{if(N||y==="loading"||y==="success"){G.preventDefault(),G.stopPropagation();return}R==null||R(G)},T=L("ok-btn ok-focusable",r!=="soft"&&`ok-btn--${r}`,o!=="md"&&`ok-btn--${o}`,b&&"ok-btn--icon",h&&"ok-btn--block",_),F=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"ok-btn__label",children:[f,k,m]}),S&&a.jsxs("span",{className:"ok-btn__status","aria-hidden":"true",children:[a.jsx(Qn,{className:"ok-tail"}),a.jsx("svg",{className:"ok-btn__check",viewBox:"0 0 16 16",children:a.jsx("path",{d:pn,pathLength:1})}),a.jsx("svg",{className:"ok-btn__cross",viewBox:"0 0 16 16",children:a.jsx("path",{d:No,pathLength:1})})]})]}),q=S&&a.jsx(gt,{children:a.jsx(Jn,{role:"status","aria-live":"polite","aria-atomic":"true","data-ok-button-status":"",children:B})});return v!==void 0?a.jsxs(a.Fragment,{children:[a.jsx("a",{...C,ref:n,className:T,href:N?void 0:v,target:g,rel:w??(g==="_blank"?"noopener noreferrer":void 0),download:x,role:N?"link":void 0,"aria-disabled":N||void 0,"aria-busy":i||void 0,"data-state":y,onClick:O,children:F}),q]}):a.jsxs(a.Fragment,{children:[a.jsx("button",{...C,ref:n,type:j,className:T,disabled:p,"aria-disabled":E||void 0,"aria-busy":i||void 0,"data-state":y,onClick:O,children:F}),q]})}),Ro=c.forwardRef(function({size:e,variant:n,disabled:s,attached:r,orientation:o="horizontal",block:i,className:l,children:d,...u},f){return a.jsx("div",{ref:f,role:"group",className:L("ok-btn-group",r&&"ok-btn-group--attached",o==="vertical"&&"ok-btn-group--vertical",i&&"ok-btn-group--block",l),...u,children:a.jsx(Lr.Provider,{value:{size:e,variant:n,disabled:s},children:d})})}),So=c.forwardRef(function({pressed:e,defaultPressed:n=!1,onChange:s,onClick:r,...o},i){const[l,d]=le(e,n,s),u={...o,"aria-pressed":l,onClick:f=>{r==null||r(f),f.defaultPrevented||d(!l)}};return a.jsx(Dr,{ref:i,...u})});function Co(t={}){const{successHold:e=1200,errorHold:n=1200,labels:s}=t,[r,o]=c.useState("idle"),i=c.useRef(0),l=c.useRef(void 0),d=c.useRef({successHold:e,errorHold:n});d.current={successHold:e,errorHold:n},c.useEffect(()=>()=>{i.current++,clearTimeout(l.current)},[]);const u=c.useCallback(()=>{i.current++,clearTimeout(l.current),o("idle")},[]),f=c.useCallback(h=>{const b=++i.current;clearTimeout(l.current),o("loading");const p=g=>{b===i.current&&(o(g),l.current=setTimeout(()=>{b===i.current&&o("idle")},g==="success"?d.current.successHold:d.current.errorHold))};let v;try{v=Promise.resolve(typeof h=="function"?h():h)}catch(g){v=Promise.reject(g)}return v.then(g=>(p("success"),g),g=>{throw p("error"),g})},[]),m=c.useMemo(()=>({loading:r==="loading",success:r==="success",error:r==="error",...s?{statusLabels:s}:{}}),[r,s]);return{state:r,run:f,reset:u,buttonProps:m}}const Le=c.createContext(null);function we(t,e=!0){const n=c.useContext(Le),s=`${t["aria-describedby"]??""} ${(n==null?void 0:n.describedBy)??""}`.split(/\s+/).filter(Boolean),r=Array.from(new Set(s)).join(" ")||void 0;return{id:t.id??(n==null?void 0:n.id),disabled:t.disabled??(n==null?void 0:n.disabled)??!1,required:t.required??(n==null?void 0:n.required)??!1,invalid:t.invalid??(n==null?void 0:n.invalid)??!1,describedBy:r,labelledBy:t["aria-labelledby"]??(!e&&!t["aria-label"]?n==null?void 0:n.labelId:void 0)}}function Or(t){const e="nativeEvent"in t?t.nativeEvent:t;return e.isComposing||e.keyCode===229}function He(t){return t.key!=="Enter"||!Or(t)?!1:(t.preventDefault(),t.stopPropagation(),!0)}const ss=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,size:r="md",pill:o,block:i=!0,icon:l,prefix:d,suffix:u,clearable:f,clearLabel:m,onClear:h,revealable:b=!0,invalid:p,type:v="text",className:g,style:w,rootClassName:x,rootStyle:j,id:_,disabled:k,required:R,"aria-describedby":M,...C},A){const E=we({id:_,disabled:k,required:R,invalid:p,"aria-describedby":M}),[N,y]=le(e,n,s),{messages:S}=he(),B=m??S.common.clear,[D,I]=c.useState(!1),O=c.useRef(null),T=v==="password",F=N!=="",q=G=>{var V;G.target.closest("input, button, a, select")||(G.preventDefault(),(V=O.current)==null||V.focus())};return a.jsxs("div",{className:L("ok-input",r!=="md"&&`ok-input--${r}`,o&&"ok-input--pill",!i&&"ok-input--inline",x,g),style:{...j,...w},"data-has-value":F?"":void 0,"data-invalid":E.invalid?"":void 0,"data-disabled":E.disabled?"":void 0,onMouseDown:q,children:[l&&a.jsx(pe,{name:l,className:"ok-input__icon"}),d!=null&&a.jsx("span",{className:"ok-input__affix",children:d}),a.jsx("input",{...C,onKeyDownCapture:G=>{var V;He(G)||(V=C.onKeyDownCapture)==null||V.call(C,G)},ref:xe(A,O),id:E.id,type:T&&D?"text":v,value:N,disabled:E.disabled,required:E.required||void 0,"aria-invalid":E.invalid||void 0,"aria-describedby":E.describedBy,onChange:G=>y(G.target.value)}),f&&a.jsx("button",{type:"button",className:"ok-input__clear","aria-label":B,disabled:!F||E.disabled,tabIndex:F?void 0:-1,onClick:()=>{var G;y(""),h==null||h(),(G=O.current)==null||G.focus()},children:a.jsx(pe,{name:"x"})}),T&&b&&a.jsx("button",{type:"button",className:"ok-input__toggle ok-focusable","aria-label":S.input.showPassword,"aria-pressed":D,disabled:E.disabled,onClick:()=>I(G=>!G),children:a.jsx(pe,{children:D?a.jsx("path",{d:"M3 3l14 14M8.3 5.200A7.600 7.600 0 0 1 10 5c4.200 0 6.800 3.600 7.500 5-.3.600-1 1.700-2.100 2.700M12.700 14.400A7 7 0 0 1 10 15c-4.200 0-6.800-3.600-7.500-5 .4-.8 1.400-2.300 3-3.400M8.200 8.300a2.500 2.500 0 0 0 3.500 3.500"}):a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M2.500 10C3.200 8.600 5.800 5 10 5s6.800 3.600 7.500 5c-.7 1.400-3.300 5-7.500 5s-6.800-3.600-7.500-5z"}),a.jsx("circle",{cx:"10",cy:"10",r:"2.500"})]})})}),u!=null&&a.jsx("span",{className:"ok-input__affix",children:u})]})}),Eo=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,autoGrow:r=!0,minRows:o=3,maxRows:i,resize:l="none",invalid:d,className:u,style:f,id:m,disabled:h,required:b,"aria-describedby":p,...v},g){const w=we({id:m,disabled:h,required:b,invalid:d,"aria-describedby":p}),[x,j]=le(e,n,s),_=c.useRef(null);ve(()=>{var C;const R=_.current;if(!R||!r||typeof CSS<"u"&&((C=CSS.supports)!=null&&C.call(CSS,"field-sizing","content")))return;R.style.height="auto";const M=R.offsetHeight-R.clientHeight;R.style.height=R.scrollHeight+M+"px"},[x,r,o,i]);const k={"--_min-rows":o,...i?{"--_max-rows":i}:null};return a.jsx("textarea",{...v,onKeyDownCapture:R=>{var M;He(R)||(M=v.onKeyDownCapture)==null||M.call(v,R)},ref:xe(g,_),id:w.id,rows:o,className:L("ok-textarea ok-scroll",u),style:{...k,...f},"data-autogrow":r?"":void 0,"data-resize":l!=="none"?l:void 0,value:x,disabled:w.disabled,required:w.required||void 0,"aria-invalid":w.invalid||void 0,"aria-describedby":w.describedBy,onChange:R=>j(R.target.value)})}),Ao=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,onSearch:r,onKeyDown:o,pill:i=!0,clearable:l=!0,placeholder:d,...u},f){const{messages:m}=he(),h=d??m.searchInput.placeholder,[b,p]=le(e,n,s);return a.jsx(ss,{ref:f,type:"search",icon:"search",enterKeyHint:"search",autoComplete:"off",pill:i,clearable:l,placeholder:h,value:b,onChange:p,onKeyDown:v=>{o==null||o(v),!v.defaultPrevented&&(v.key==="Enter"?r==null||r(b):v.key==="Escape"&&b!==""&&(v.preventDefault(),p("")))},...u})}),To=400,$o=60,Po=c.forwardRef(function({value:e,defaultValue:n,onChange:s,min:r=-1/0,max:o=1/0,step:i=1,largeStep:l,precision:d,format:u,size:f="md",invalid:m,decrementLabel:h,incrementLabel:b,className:p,style:v,rootClassName:g,rootStyle:w,id:x,disabled:j,required:_,readOnly:k,"aria-describedby":R,onKeyDown:M,onBlur:C,onFocus:A,...E},N){const y=we({id:x,disabled:j,required:_,invalid:m,"aria-describedby":R}),{messages:S}=he(),B=h??S.numberInput.decrement,D=b??S.numberInput.increment,I=d??Mo(i),O=J=>ye(+J.toFixed(I),r,o),[T,F]=le(e,O(n??0),s),[q,G]=c.useState(null),[V,Z]=c.useState(!1),K=c.useRef(null),P=y.disabled||!!k,z=c.useRef(T);z.current=T;const $=c.useRef(F);$.current=F;const Y=()=>{if(q===null)return;const J=parseFloat(q.replace(/,/g,""));if(G(null),Number.isFinite(J)){const W=O(J);z.current=W,$.current(W)}},X=(J,W)=>{const ce=O(J),ue=K.current;return ce===z.current?(Ne(ue,[{transform:"translateX(0)"},{transform:`translateX(${W*6}px)`},{transform:"translateX(0)"}],{spring:"bouncy"}),!1):(z.current=ce,$.current(ce),Ne(ue,[{transform:`translateY(${W*60}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"}),!0)},ee=(J,W=i)=>X(z.current+J*W,J),ie=c.useRef({}),U=()=>{clearTimeout(ie.current.delay),clearInterval(ie.current.every),ie.current={}};c.useEffect(()=>U,[]);const H=c.useRef(!1),ae=J=>({onPointerDown:W=>{W.button||P||(H.current=!0,Y(),U(),ee(J)&&(ie.current.delay=setTimeout(()=>{ie.current.every=setInterval(()=>{ee(J)||U()},$o)},To)))},onPointerUp:U,onPointerCancel:()=>{U(),H.current=!1},onPointerLeave:()=>{U()},onClick:()=>{if(H.current){H.current=!1;return}P||(Y(),ee(J))}}),de=J=>{if(M==null||M(J),J.defaultPrevented||P)return;const W=l??i*10,ce={ArrowUp:()=>ee(1),ArrowDown:()=>ee(-1),PageUp:()=>ee(1,W),PageDown:()=>ee(-1,W)};if(Number.isFinite(r)&&(ce.Home=()=>X(r,-1)),Number.isFinite(o)&&(ce.End=()=>X(o,1)),J.key==="Enter"){Y();return}const ue=ce[J.key];ue&&(J.preventDefault(),Y(),ue())},ne=q??(u&&!V?u(T):T.toFixed(I)),oe=T<=r,Q=T>=o;return a.jsxs("div",{className:L("ok-stepper",f!=="md"&&`ok-stepper--${f}`,g,p),style:{...w,...v},"data-invalid":y.invalid?"":void 0,"data-disabled":y.disabled?"":void 0,children:[a.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":B,"aria-disabled":oe||P,...ae(-1),children:a.jsx(pe,{name:"minus"})}),a.jsx("input",{...E,onKeyDownCapture:J=>{var W;He(J)||(W=E.onKeyDownCapture)==null||W.call(E,J)},ref:xe(N,K),id:y.id,className:"ok-stepper__value",type:"text",inputMode:I>0?"decimal":"numeric",autoComplete:"off",role:"spinbutton","aria-valuenow":T,"aria-valuemin":Number.isFinite(r)?r:void 0,"aria-valuemax":Number.isFinite(o)?o:void 0,"aria-valuetext":u?u(T):void 0,"aria-invalid":y.invalid||void 0,"aria-describedby":y.describedBy,"aria-required":y.required||void 0,value:ne,disabled:y.disabled,readOnly:k,onChange:J=>G(J.target.value),onFocus:J=>{Z(!0),A==null||A(J)},onBlur:J=>{Z(!1),Y(),C==null||C(J)},onKeyDown:de}),a.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":D,"aria-disabled":Q||P,...ae(1),children:a.jsx(pe,{name:"plus"})})]})}),Io=c.forwardRef(function({length:e=6,value:n,defaultValue:s="",onChange:r,onComplete:o,type:i="numeric",mask:l,size:d="md",disabled:u,invalid:f,required:m,autoFocus:h,name:b,className:p,id:v,"aria-label":g,"aria-labelledby":w,"aria-describedby":x,...j},_){const k=we({id:v,disabled:u,required:m,invalid:f,"aria-describedby":x,"aria-labelledby":w,"aria-label":g},!1),{messages:R}=he(),[M,C]=le(n,s,r),A=c.useRef([]),E=O=>O.replace(i==="numeric"?/\D/g:/[^a-zA-Z0-9]/g,""),N=O=>{const T=A.current[Math.max(0,Math.min(e-1,O))];T==null||T.focus(),T==null||T.select()},y=(O,T)=>{const F=E(T);if(!F)return;const q=Math.min(O,M.length),G=(M.slice(0,q)+F+M.slice(q+F.length)).slice(0,e);C(G),N(q+F.length),G.length===e&&G!==M&&(o==null||o(G))},S=(O,T)=>{const F=M[O]??"";let q=E(T);if(!q){F&&C(M.slice(0,O)+M.slice(O+1));return}F&&q.length===2&&(q=q.startsWith(F)?q.slice(1):q.slice(0,1)),y(O,q)},B=(O,T)=>{T.key==="Backspace"&&!M[O]&&O>0?(T.preventDefault(),C(M.slice(0,O-1)+M.slice(O)),N(O-1)):T.key==="ArrowLeft"?(T.preventDefault(),N(O-1)):T.key==="ArrowRight"?(T.preventDefault(),N(O+1)):T.key==="Home"?(T.preventDefault(),N(0)):T.key==="End"&&(T.preventDefault(),N(Math.min(M.length,e-1)))},D=(O,T)=>{T.preventDefault(),y(O,T.clipboardData.getData("text"))},I=k.labelledBy?void 0:g??R.pinInput.label;return a.jsxs("div",{ref:_,role:"group",className:L("ok-pin",d==="sm"&&"ok-pin--sm",p),"aria-label":I,"aria-labelledby":k.labelledBy,"aria-describedby":k.describedBy,"data-invalid":k.invalid?"":void 0,...j,children:[a.jsx(Le.Provider,{value:null,children:Array.from({length:e},(O,T)=>a.jsx("input",{ref:F=>{A.current[T]=F},id:T===0?k.id:void 0,className:"ok-pin__cell",type:l?"password":"text",inputMode:i==="numeric"?"numeric":"text",pattern:i==="numeric"?"[0-9]*":void 0,autoComplete:T===0?"one-time-code":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-label":R.pinInput.cell(T+1,e),"aria-invalid":k.invalid||void 0,"aria-required":k.required||void 0,autoFocus:h&&T===0,disabled:k.disabled,value:M[T]??"",onChange:F=>S(T,F.target.value),onKeyDownCapture:He,onKeyDown:F=>B(T,F),onPaste:F=>D(T,F),onFocus:F=>F.target.select()},T))}),b&&a.jsx("input",{type:"hidden",name:b,value:M})]})}),Lo=new Set(["input","select","textarea"]),Do=c.forwardRef(function({label:e,hint:n,error:s,invalid:r,required:o=!1,disabled:i=!1,id:l,orientation:d="vertical",className:u,children:f,...m},h){const b=c.useId(),p=l??`ok-field-${b}`,v=`${p}-label`,g=`${p}-hint`,w=`${p}-error`,x=s!=null&&s!==!1&&s!=="",j=r??x,_=[n!=null&&g,x&&w].filter(Boolean).join(" ")||void 0,k=c.useMemo(()=>({id:p,labelId:e!=null?v:void 0,describedBy:_,invalid:j,required:o,disabled:i}),[p,e!=null,v,_,j,o,i]),R=c.useRef(null),M=c.useRef(j);c.useEffect(()=>{j&&!M.current&&Ne(R.current,{transform:["translateX(0)","translateX(-7px)","translateX(6px)","translateX(-4px)","translateX(2px)","translateX(0)"]},{duration:520}),M.current=j},[j]);const C={id:p,"aria-describedby":_,"aria-invalid":j?!0:void 0,required:o||void 0,disabled:i||void 0};let A;if(typeof f=="function")A=f(C);else if(c.isValidElement(f)&&typeof f.type=="string"&&Lo.has(f.type)){const E=f,N=E.props;A=c.cloneElement(E,{...C,id:N.id??p,"aria-describedby":[N["aria-describedby"],_].filter(Boolean).join(" ")||void 0,required:N.required??C.required,disabled:N.disabled??C.disabled})}else A=f;return a.jsxs("div",{ref:h,className:L("ok-field",d==="horizontal"&&"ok-field--horizontal",u),"data-invalid":j?"":void 0,"data-disabled":i?"":void 0,...m,children:[e!=null&&a.jsxs("label",{className:"ok-field__label",id:v,htmlFor:p,onClick:E=>{const N=E.currentTarget.ownerDocument.getElementById(p);!N||!N.hasAttribute("data-label-focus")||(E.preventDefault(),N.disabled||N.focus())},children:[e,o&&a.jsx("span",{className:"ok-field__required","aria-hidden":"true",children:"*"})]}),a.jsx("div",{className:"ok-field__control",ref:R,children:a.jsx(Le.Provider,{value:k,children:A})}),n!=null&&a.jsx("span",{className:"ok-field__hint",id:g,children:n}),a.jsx("span",{className:"ok-field__msg",id:w,"aria-live":"polite",children:a.jsx("span",{children:x&&a.jsxs(a.Fragment,{children:[a.jsx(pe,{name:"alert"}),s]})})})]})}),Oo=c.forwardRef(function({legend:e,hint:n,className:s,children:r,"aria-describedby":o,...i},l){const d=`ok-fieldset-${c.useId()}-hint`;return a.jsxs("fieldset",{ref:l,className:L("ok-fieldset",s),"aria-describedby":[o,n!=null&&d].filter(Boolean).join(" ")||void 0,...i,children:[e!=null&&a.jsx("legend",{className:"ok-fieldset__legend",children:e}),n!=null&&a.jsx("span",{className:"ok-fieldset__hint",id:d,children:n}),a.jsx("div",{className:"ok-fieldset__body",children:r})]})}),Bo=c.forwardRef(function({required:e,disabled:n,size:s="sm",className:r,children:o,...i},l){return a.jsxs("label",{ref:l,className:L("ok-label",s==="md"&&"ok-label--md",r),"data-disabled":n?"":void 0,...i,children:[o,e&&a.jsx("span",{className:"ok-label__required","aria-hidden":"true",children:"*"})]})}),Fo=c.forwardRef(function({size:e="md",onSubmit:n,className:s,children:r,...o},i){return a.jsx("form",{ref:i,className:L("ok-form",e!=="md"&&`ok-form--${e}`,s),onSubmit:l=>{l.preventDefault(),n==null||n(new FormData(l.currentTarget),l)},...o,onKeyDownCapture:l=>{var d;He(l)||(d=o.onKeyDownCapture)==null||d.call(o,l)},children:r})}),zo=c.forwardRef(function({align:e="start",stack:n=!0,className:s,...r},o){return a.jsx("div",{ref:o,className:L("ok-form__actions",e!=="start"&&`ok-form__actions--${e}`,n&&"ok-form__actions--stack",s),...r})}),Br=c.createContext(null),Ho=c.forwardRef(function({checked:e,defaultChecked:n=!1,onChange:s,indeterminate:r=!1,value:o,description:i,invalid:l,children:d,className:u,style:f,rootClassName:m,rootStyle:h,id:b,disabled:p,required:v,name:g,"aria-describedby":w,...x},j){const _=c.useContext(Br),k=we({id:b,disabled:p??((_==null?void 0:_.disabled)||void 0),required:v,invalid:l??((_==null?void 0:_.invalid)||void 0),"aria-describedby":w}),R=!!_&&o!==void 0,[M,C]=le(e,n,s),A=R?_.value.includes(o):M,E=c.useRef(null);return c.useEffect(()=>{E.current&&(E.current.indeterminate=r)},[r,A]),a.jsxs("label",{className:L("ok-check",m,u),style:{...h,...f},"data-invalid":k.invalid?"":void 0,"data-described":i!=null?"":void 0,children:[a.jsx("input",{...x,ref:xe(j,E),id:k.id,type:"checkbox",name:g??(_==null?void 0:_.name),value:o,checked:A,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:N=>{R?(_.toggle(o),s==null||s(N.target.checked)):C(N.target.checked)}}),a.jsxs("span",{className:"ok-check__box","aria-hidden":"true",children:[a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{className:"ok-check__tick",d:pn,pathLength:1})}),a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{className:"ok-check__dash",d:"M4 8h8",pathLength:1})})]}),i!=null?a.jsxs("span",{className:"ok-check__text",children:[a.jsx("span",{children:d}),a.jsx("span",{className:"ok-check__desc",children:i})]}):d]})}),qo=[],Vo=c.forwardRef(function({value:e,defaultValue:n=qo,onChange:s,name:r,orientation:o="vertical",disabled:i,invalid:l,className:d,children:u,id:f,"aria-label":m,"aria-labelledby":h,"aria-describedby":b,...p},v){const g=we({id:f,disabled:i,invalid:l,"aria-describedby":b,"aria-labelledby":h,"aria-label":m},!1),[w,x]=le(e,n,s),j=_=>x(w.includes(_)?w.filter(k=>k!==_):[...w,_]);return a.jsx("div",{ref:v,id:g.id,role:"group",className:L("ok-check-group",o==="horizontal"&&"ok-check-group--horizontal",d),"aria-label":m,"aria-labelledby":g.labelledBy,"aria-describedby":g.describedBy,"aria-invalid":g.invalid||void 0,...p,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Br.Provider,{value:{value:w,toggle:j,name:r,disabled:g.disabled,invalid:g.invalid},children:u})})})}),Fr=c.createContext(null),Wo=c.forwardRef(function({value:e,onChange:n,description:s,children:r,className:o,style:i,rootClassName:l,rootStyle:d,name:u,checked:f,disabled:m,required:h,...b},p){const v=c.useContext(Fr);return a.jsxs("label",{className:L("ok-radio",l,o),style:{...d,...i},"data-described":s!=null?"":void 0,children:[a.jsx("input",{...b,ref:p,type:"radio",name:u??(v==null?void 0:v.name),value:e,checked:v?v.value===e:f,disabled:m??(v==null?void 0:v.disabled),required:h??((v==null?void 0:v.required)||void 0),onChange:g=>{g.target.checked&&(v&&v.select(e),n==null||n(e))}}),a.jsx("span",{className:"ok-radio__dot","aria-hidden":"true"}),s!=null?a.jsxs("span",{className:"ok-radio__text",children:[a.jsx("span",{children:r}),a.jsx("span",{className:"ok-radio__desc",children:s})]}):r]})}),Go=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,name:r,orientation:o="vertical",disabled:i,required:l,invalid:d,className:u,children:f,id:m,"aria-label":h,"aria-labelledby":b,"aria-describedby":p,...v},g){const w=we({id:m,disabled:i,required:l,invalid:d,"aria-describedby":p,"aria-labelledby":b,"aria-label":h},!1),x=`ok-radio-${c.useId()}`,[j,_]=le(e,n,s);return a.jsx("div",{ref:g,id:w.id,role:"radiogroup",className:L("ok-radio-group",o==="horizontal"&&"ok-radio-group--horizontal",u),"aria-label":h,"aria-labelledby":w.labelledBy,"aria-describedby":w.describedBy,"aria-orientation":o,"aria-required":w.required||void 0,"aria-invalid":w.invalid||void 0,"data-invalid":w.invalid?"":void 0,...v,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Fr.Provider,{value:{value:j,select:_,name:r??x,disabled:w.disabled,required:w.required},children:f})})})}),Uo=c.forwardRef(function({size:e="md",checked:n,defaultChecked:s=!1,onChange:r,labelPosition:o="end",children:i,className:l,style:d,rootClassName:u,rootStyle:f,id:m,disabled:h,required:b,"aria-describedby":p,...v},g){const w=we({id:m,disabled:h,required:b,"aria-describedby":p}),[x,j]=le(n,s,r),_=i!=null&&a.jsx("span",{className:"ok-switch__label",children:i});return a.jsxs("label",{className:L("ok-switch",e!=="md"&&`ok-switch--${e}`,u,l),style:{...f,...d},"data-label-position":o,children:[o==="start"&&_,a.jsx("input",{...v,ref:g,id:w.id,type:"checkbox",role:"switch",checked:x,disabled:w.disabled,required:w.required||void 0,"aria-describedby":w.describedBy,onChange:k=>j(k.target.checked)}),a.jsx("span",{className:"ok-switch__track",children:a.jsx("span",{className:"ok-switch__thumb"})}),o!=="start"&&_]})});function an(t,e,n,s){return+ye(s==="any"?t:Math.round((t-e)/s)*s+e,e,n).toFixed(6)}function zr(t,e,n){const s=n==="any"?(e-t)/100:n;return{small:s,big:Math.max(s,(e-t)/10)}}const Yo=c.forwardRef(function({value:e,defaultValue:n,onChange:s,onChangeEnd:r,onActiveChange:o,min:i=0,max:l=100,step:d=1,ticks:u,bubble:f=!0,format:m,digits:h,disabled:b,name:p,className:v,style:g,id:w,onKeyDown:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},C){const A=we({id:w,disabled:b,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),E=d==="any",N=H=>an(H,i,l,d),[y,S]=le(e,N(n??i),s),B=N(y),D=E?1/0:Math.round((l-i)/d),I=D<=12,O=h??(E?0:void 0),T=H=>m?m(H):O==null?String(H):H.toFixed(O),F=c.useRef(null),q=c.useRef(null),[G,V]=c.useState(!1),[Z,K]=c.useState(!1),P=c.useRef(B);P.current=B;const z=ke(H=>{const ae=N(H);P.current=ae,S(ae)}),$=ke(()=>r==null?void 0:r(P.current)),Y=ke(H=>o==null?void 0:o(H)),X=c.useRef(null);c.useEffect(()=>()=>{var H;return(H=X.current)==null?void 0:H.call(X)},[]);const ee=H=>{var J;j==null||j(H);const ae=F.current;if(H.defaultPrevented||H.button||A.disabled||!ae)return;(J=X.current)==null||J.call(X),V(!0),Y(!0);const de=H.clientX;let ne=0;const oe=q.current;if(oe&&oe.contains(H.target)){const W=oe.getBoundingClientRect();ne=H.clientX-(W.left+W.width/2)}const Q=W=>{const ce=ae.getBoundingClientRect(),ue=oe?oe.offsetWidth:0,je=ye((W-ne-ce.left-ue/2)/(ce.width-ue||1),0,1);z(i+je*(l-i))};Q(H.clientX),X.current=ns(ae,H,W=>{!I&&Math.abs(W.clientX-de)>2&&K(!0),Q(W.clientX)},()=>{X.current=null,V(!1),K(!1),Y(!1),$()})},ie=H=>{if(x==null||x(H),H.defaultPrevented||A.disabled)return;const{small:ae,big:de}=zr(i,l,d),ne={ArrowRight:ae,ArrowUp:ae,ArrowLeft:-ae,ArrowDown:-ae,PageUp:de,PageDown:-de}[H.key];let oe;if(ne)oe=P.current+ne;else if(H.key==="Home")oe=i;else if(H.key==="End")oe=l;else return;H.preventDefault(),z(oe),$()},U=(B-i)/(l-i||1);return a.jsxs("div",{ref:xe(C,F),id:A.id,role:"slider",tabIndex:A.disabled?-1:0,className:L("ok-slider ok-focusable",v),style:{"--v":U,...g},"aria-label":_,"aria-labelledby":A.labelledBy,"aria-describedby":A.describedBy,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":B,"aria-valuetext":T(B),"aria-orientation":"horizontal","aria-disabled":A.disabled||void 0,"data-ticks":u&&I?"":void 0,"data-active":G?"":void 0,"data-tracking":Z?"":void 0,onPointerDown:ee,onKeyDown:ie,...M,children:[a.jsx("span",{className:"ok-slider__track",children:a.jsx("span",{className:"ok-slider__fill"})}),u&&I&&a.jsx("span",{className:"ok-slider__ticks","aria-hidden":"true",children:Array.from({length:D+1},(H,ae)=>a.jsx("i",{style:{left:`${ae/D*100}%`}},ae))}),a.jsx("span",{className:"ok-slider__thumb",ref:q,children:f&&a.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:T(B)})}),p&&a.jsx("input",{type:"hidden",name:p,value:B})]})}),Ko=c.forwardRef(function({value:e,defaultValue:n,onChange:s,onChangeEnd:r,onActiveChange:o,min:i=0,max:l=100,step:d=1,minDistance:u=0,bubble:f=!0,format:m,digits:h,disabled:b,thumbLabels:p,name:v,className:g,style:w,id:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},C){const A=we({id:x,disabled:b,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),{messages:E}=he(),N=p??E.rangeSlider.thumbs,y=d==="any",[S,B]=le(e,n??[i,l],s),D=an(Math.min(S[0],S[1]),i,l,d),I=an(Math.max(S[0],S[1]),i,l,d),T=(y?1/0:Math.round((l-i)/d))<=12,F=h??(y?0:void 0),q=ne=>m?m(ne):F==null?String(ne):ne.toFixed(F),G=c.useRef(null),V=c.useRef([null,null]),[Z,K]=c.useState(null),[P,z]=c.useState(!1),$=c.useRef([D,I]);$.current=[D,I];const Y=ke((ne,oe)=>{const[Q,J]=$.current,W=an(oe,i,l,d),ce=ne===0?[Math.min(W,J-u),J]:[Q,Math.max(W,Q+u)];ce[ne]=ye(ce[ne],i,l),!(ce[0]===Q&&ce[1]===J)&&($.current=ce,B(ce))}),X=ke(()=>r==null?void 0:r($.current)),ee=ke(ne=>o==null?void 0:o(ne)),ie=c.useRef(null);c.useEffect(()=>()=>{var ne;return(ne=ie.current)==null?void 0:ne.call(ie)},[]);const U=ne=>{var De,kt,Ie;j==null||j(ne);const oe=G.current;if(ne.defaultPrevented||ne.button||A.disabled||!oe)return;(De=ie.current)==null||De.call(ie);const Q=((kt=V.current[0])==null?void 0:kt.offsetWidth)??0,J=(_e,Ce)=>{const ge=oe.getBoundingClientRect();return i+ye((_e-Ce-ge.left-Q/2)/(ge.width-Q||1),0,1)*(l-i)};let W=V.current.findIndex(_e=>_e&&_e.contains(ne.target)),ce=0;if(W>=0){const _e=V.current[W].getBoundingClientRect();ce=ne.clientX-(_e.left+_e.width/2)}else{const _e=J(ne.clientX,0),[Ce,ge]=$.current;W=Math.abs(_e-Ce)<=Math.abs(_e-ge)?0:1,Ce===ge&&(W=_e<Ce?0:1)}const ue=W,je=ne.clientX;K(ue),ee(!0),(Ie=V.current[ue])==null||Ie.focus({preventScroll:!0}),Y(ue,J(ne.clientX,ce)),ie.current=ns(oe,ne,_e=>{!T&&Math.abs(_e.clientX-je)>2&&z(!0),Y(ue,J(_e.clientX,ce))},()=>{ie.current=null,K(null),z(!1),ee(!1),X()})},H=(ne,oe)=>{if(A.disabled)return;const{small:Q,big:J}=zr(i,l,d),W={ArrowRight:Q,ArrowUp:Q,ArrowLeft:-Q,ArrowDown:-Q,PageUp:J,PageDown:-J}[oe.key];let ce;if(W)ce=$.current[ne]+W;else if(oe.key==="Home")ce=i;else if(oe.key==="End")ce=l;else return;oe.preventDefault(),Y(ne,ce),X()},ae=l-i||1,de=[D,I];return a.jsxs("div",{ref:xe(C,G),id:A.id,role:"group",className:L("ok-slider ok-slider--range",g),style:{"--a":(D-i)/ae,"--b":(I-i)/ae,...w},"aria-label":_,"aria-labelledby":A.labelledBy,"aria-describedby":A.describedBy,"data-disabled":A.disabled?"":void 0,"data-active":Z!==null?"":void 0,"data-tracking":P?"":void 0,onPointerDown:U,...M,children:[a.jsx("span",{className:"ok-slider__track",children:a.jsx("span",{className:"ok-slider__fill"})}),de.map((ne,oe)=>a.jsx("span",{ref:Q=>{V.current[oe]=Q},className:"ok-slider__thumb ok-focusable",role:"slider",tabIndex:A.disabled?-1:0,"data-index":oe,"data-active":Z===oe?"":void 0,"aria-label":N[oe],"aria-valuemin":oe===0?i:Math.min(l,D+u),"aria-valuemax":oe===0?Math.max(i,I-u):l,"aria-valuenow":ne,"aria-valuetext":q(ne),"aria-orientation":"horizontal","aria-disabled":A.disabled||void 0,onKeyDown:Q=>H(oe,Q),children:f&&a.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:q(ne)})},oe)),v&&a.jsxs(a.Fragment,{children:[a.jsx("input",{type:"hidden",name:v,value:D}),a.jsx("input",{type:"hidden",name:v,value:I})]})]})});function Xo({options:t,value:e,defaultValue:n,onChange:s,size:r="md",block:o,disabled:i,className:l,id:d,"aria-label":u,"aria-labelledby":f,"aria-describedby":m,onKeyDown:h,...b},p){var E,N;const v=we({id:d,disabled:i,"aria-describedby":m,"aria-labelledby":f,"aria-label":u},!1),g=((E=t.find(y=>!y.disabled))==null?void 0:E.value)??((N=t[0])==null?void 0:N.value),[w,x]=le(e,n??g,s),j=c.useRef(null),_=c.useRef(null),[k,R]=c.useState(!1),M=c.useRef(null),C=()=>{const y=j.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');!y||!S||(y.style.setProperty("--x",S.offsetLeft+"px"),y.style.setProperty("--w",S.offsetWidth+"px"))},A=()=>{const y=j.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');if(!y||!S||y.scrollWidth<=y.clientWidth)return;const B=3,D=S.offsetLeft-B,I=S.offsetLeft+S.offsetWidth+B;D<y.scrollLeft?y.scrollLeft=D:I>y.scrollLeft+y.clientWidth&&(y.scrollLeft=I-y.clientWidth)};return ve(()=>{C(),A(),M.current!==null&&M.current!==w&&Ne(_.current,{scale:["1 1","1.05 .86","1 1"]},{duration:340,easing:ze.out}),M.current=w},[w]),ve(C),c.useEffect(()=>{const y=j.current;if(!y||typeof ResizeObserver>"u"){R(!0);return}let S=0;const B=new ResizeObserver(()=>{R(!1),C(),A(),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{S=requestAnimationFrame(()=>R(!0))})});return B.observe(y),S=requestAnimationFrame(()=>R(!0)),()=>{B.disconnect(),cancelAnimationFrame(S)}},[]),a.jsxs("div",{ref:xe(p,j),id:v.id,role:"radiogroup",className:L("ok-seg",r!=="md"&&`ok-seg--${r}`,o&&"ok-seg--block",l),"aria-label":u,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":v.disabled||void 0,"data-ready":k?"":void 0,onKeyDown:y=>{if(h==null||h(y),y.defaultPrevented)return;const S=mn(y,'[role="radio"]');if(!S)return;S.focus();const B=S.dataset.value;B!==void 0&&x(B)},...b,children:[a.jsx("span",{className:"ok-seg__thumb",ref:_,"aria-hidden":"true"}),t.map(y=>{const S=y.value===w;return a.jsxs("button",{type:"button",role:"radio",className:"ok-seg__item ok-focusable","aria-checked":S,"aria-label":y["aria-label"],tabIndex:S?0:-1,disabled:v.disabled||y.disabled,"data-value":y.value,onClick:()=>x(y.value),children:[y.icon,y.label!=null&&y.label!==""&&a.jsx("span",{children:y.label})]},y.value)})]})}const Jo=c.forwardRef(Xo),Hr=c.createContext(null),Zo=c.forwardRef(function({value:e,selected:n,defaultSelected:s,onChange:r,onRemove:o,removeLabel:i,icon:l,disabled:d,className:u,children:f,onClick:m,...h},b){const{messages:p}=he(),v=i??p.common.remove,g=c.useContext(Hr),w=!!g&&g.selectable&&e!==void 0,x=w||n!==void 0||s!==void 0||r!==void 0&&!o,[j,_]=le(n,s??!1,r),k=w?g.value.includes(e):j,R=d??(g==null?void 0:g.disabled)??!1,M=c.useRef(null),[C,A]=c.useState(!1),E=L("ok-chip",u),N=l!=null&&a.jsx("span",{className:"ok-chip__lead",children:l});if(x&&!o)return a.jsxs("button",{ref:xe(b,M),type:"button",className:L(E,"ok-focusable"),"aria-pressed":k,disabled:R,"data-value":e,onClick:S=>{m==null||m(S),!S.defaultPrevented&&(w?(g.toggle(e),r==null||r(!k)):_(!k))},...h,children:[a.jsx("span",{className:"ok-chip__check","aria-hidden":"true",children:a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{d:pn,pathLength:1})})}),N,a.jsx("span",{className:"ok-chip__text",children:f})]});const y=()=>{A(!0);const S=Ne(M.current,[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(.5)"}],{duration:140,easing:ze.in,fill:"forwards"}),B=()=>o==null?void 0:o();S!=null&&S.finished?S.finished.then(B,B):B()};return a.jsxs("span",{ref:xe(b,M),className:E,"data-value":e,"data-removing":C||void 0,"aria-disabled":R||void 0,onClick:m,...h,children:[N,a.jsx("span",{className:"ok-chip__text",children:f}),o&&a.jsx("button",{type:"button",className:"ok-chip__remove ok-focusable","aria-label":typeof f=="string"?`${v} ${f}`:v,disabled:R,onClick:y,children:a.jsx(pe,{name:"x"})})]})}),Qo=[],Ls="ok-chips-flip";class ei extends c.Component{getSnapshotBeforeUpdate(){const e=this.props.root.current;if(!e)return null;const n=Array.from(e.children);return{node:e,count:n.length,rects:new Map(n.map(s=>[s,s.getBoundingClientRect()]))}}componentDidUpdate(e,n,s){if(!s||!s.node.isConnected)return;const r=s.node,o=Array.from(r.children);if(o.length===s.count)return;o.forEach(l=>{var d;return(d=l.getAnimations)==null?void 0:d.call(l).forEach(u=>{u.id===Ls&&u.cancel()})});const i=new Map;s.rects.forEach((l,d)=>{var u;(u=d.dataset)!=null&&u.removing||i.set(d,l)}),un(i,{id:Ls})}render(){return this.props.children}}const ti=c.forwardRef(function({value:e,defaultValue:n,onChange:s,multiple:r=!0,disabled:o,className:i,children:l,id:d,"aria-label":u,"aria-labelledby":f,"aria-describedby":m,...h},b){const p=we({id:d,disabled:o,"aria-describedby":m,"aria-labelledby":f,"aria-label":u},!1),v=e!==void 0||n!==void 0||s!==void 0,[g,w]=le(e,n??Qo,s),x=_=>{g.includes(_)?w(g.filter(k=>k!==_)):w(r?[...g,_]:[_])},j=c.useRef(null);return a.jsx("div",{ref:xe(b,j),id:p.id,role:"group",className:L("ok-chips",i),"aria-label":u,"aria-labelledby":p.labelledBy,"aria-describedby":p.describedBy,...h,children:a.jsx(Le.Provider,{value:null,children:a.jsx(Hr.Provider,{value:{value:g,toggle:x,selectable:v,disabled:p.disabled},children:a.jsx(ei,{root:j,children:l})})})})}),qr=c.createContext(null),ni=c.forwardRef(function({value:e,art:n,description:s,checked:r,onChange:o,disabled:i,className:l,children:d,onClick:u,...f},m){const h=c.useContext(qr),b=h?h.values.includes(e):!!r,p=h?!h.multiple:!1;return a.jsxs("button",{ref:m,type:"button",role:p?"radio":"checkbox",className:L("ok-option ok-focusable",l),"aria-checked":b,tabIndex:p?h.tabStop===e?0:-1:void 0,disabled:i??(h==null?void 0:h.disabled),"data-value":e,onClick:v=>{u==null||u(v),!v.defaultPrevented&&(h&&h.pick(e),o==null||o(h?h.multiple?!b:!0:!b))},...f,children:[n!=null&&a.jsx("span",{className:"ok-option__art",children:n}),a.jsxs("span",{className:"ok-option__foot",children:[a.jsx("span",{className:"ok-option__title",children:d}),a.jsx("span",{className:"ok-option__check","aria-hidden":"true",children:a.jsx("svg",{viewBox:"0 0 16 16",children:a.jsx("path",{d:pn,pathLength:1})})})]}),s!=null&&a.jsx("span",{className:"ok-option__desc",children:s})]})}),Ds=t=>t===void 0?void 0:t===null?[]:Array.isArray(t)?t:[t],si=c.forwardRef(function(e,n){const{multiple:s=!1,value:r,defaultValue:o,onChange:i,disabled:l,minItemWidth:d,className:u,style:f,children:m,id:h,onKeyDown:b,"aria-label":p,"aria-labelledby":v,"aria-describedby":g,...w}=e,x=we({id:h,disabled:l,"aria-describedby":g,"aria-labelledby":v,"aria-label":p},!1),j=i,[_,k]=le(Ds(r),Ds(o)??[],E=>{s?j==null||j(E):E.length&&(j==null||j(E[0]))}),R=E=>{s?k(_.includes(E)?_.filter(N=>N!==E):[..._,E]):_[0]!==E&&k([E])};let M;const C=E=>{var y,S;if(M!==void 0||E==null||typeof E!="object")return;if(Array.isArray(E)){E.forEach(C);return}const N=E;typeof((y=N.props)==null?void 0:y.value)=="string"&&!N.props.disabled?M=N.props.value:(S=N.props)!=null&&S.children&&C(N.props.children)};!s&&!_.length&&C(m);const A=_[0]??M;return a.jsx("div",{ref:n,id:x.id,role:s?"group":"radiogroup",className:L("ok-options",u),style:d?{gridTemplateColumns:`repeat(auto-fit, minmax(${d}px, 1fr))`,...f}:f,"aria-label":p,"aria-labelledby":x.labelledBy,"aria-describedby":x.describedBy,onKeyDown:E=>{if(b==null||b(E),E.defaultPrevented||s)return;const N=mn(E,'[role="radio"]');N&&(N.focus(),N.dataset.value!==void 0&&R(N.dataset.value))},...w,children:a.jsx(Le.Provider,{value:null,children:a.jsx(qr.Provider,{value:{values:_,multiple:s,pick:R,disabled:x.disabled,tabStop:A},children:m})})})}),Vr=c.forwardRef(function({colors:e,value:n,defaultValue:s=null,onChange:r,size:o="md",disabled:i,className:l,id:d,onKeyDown:u,"aria-label":f,"aria-labelledby":m,"aria-describedby":h,...b},p){var j;const v=we({id:d,disabled:i,"aria-describedby":h,"aria-labelledby":m,"aria-label":f},!1),[g,w]=le(n,s,r),x=e.some(_=>_.value===g)?g:(j=e.find(_=>!_.disabled))==null?void 0:j.value;return a.jsx("div",{ref:p,id:v.id,role:"radiogroup",className:L("ok-swatches",o!=="md"&&`ok-swatches--${o}`,l),"aria-label":f,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,onKeyDown:_=>{if(u==null||u(_),_.defaultPrevented)return;const k=mn(_,'[role="radio"]');k&&(k.focus(),k.dataset.value!==void 0&&w(k.dataset.value))},...b,children:e.map(_=>a.jsx("button",{type:"button",role:"radio",className:"ok-swatch ok-focusable",style:{"--c":_.color},"aria-checked":_.value===g,"aria-label":_.label,title:_.label,tabIndex:_.value===x?0:-1,disabled:v.disabled||_.disabled,"data-value":_.value,onClick:()=>w(_.value)},_.value))})}),En="#ff6b8e",ri=()=>()=>{},ai=()=>"EyeDropper"in window,oi=()=>!1;function An(t,e){const n=lr(t);return n?n.v===0?{h:e.h,s:e.s,v:0}:n.s===0?{h:e.h,s:0,v:n.v}:n:e}const Tn=t=>Math.round(t*100),ii=c.forwardRef(function({value:e,defaultValue:n=En,onChange:s,onChangeEnd:r,swatches:o,disabled:i,className:l,style:d,id:u,"aria-label":f,"aria-labelledby":m,"aria-describedby":h,...b},p){const v=we({id:u,disabled:i,"aria-describedby":h,"aria-labelledby":m,"aria-label":f},!1),{messages:g}=he(),w=v.disabled,[x,j]=le(e,Je(n)??En,s),_=Je(x)??En,[k,R]=c.useState(()=>({hex:_,hsv:An(_,{h:0,s:0,v:0})}));let M=k.hsv;k.hex!==_&&(M=An(_,k.hsv),R({hex:_,hsv:M}));const C=c.useRef({hex:_,hsv:M});C.current={hex:_,hsv:M};const A=ke(z=>{const $=cr(z);C.current={hex:$,hsv:z},R({hex:$,hsv:z}),j($)}),E=ke(z=>A(An(z,C.current.hsv))),N=ke(()=>r==null?void 0:r(C.current.hex)),y=c.useRef(null),[S,B]=c.useState(!1),D=c.useRef(null);c.useEffect(()=>()=>{var z;return(z=D.current)==null?void 0:z.call(D)},[]);const I=z=>{var X;const $=y.current;if(z.button||w||!$)return;(X=D.current)==null||X.call(D),$.focus({preventScroll:!0}),B(!0);const Y=(ee,ie)=>{const U=$.getBoundingClientRect(),H=ye((ee-U.left)/(U.width||1),0,1),ae=1-ye((ie-U.top)/(U.height||1),0,1);A({h:C.current.hsv.h,s:H,v:ae})};Y(z.clientX,z.clientY),D.current=ns($,z,ee=>Y(ee.clientX,ee.clientY),()=>{D.current=null,B(!1),N()})},O=z=>{if(w||z.altKey||z.ctrlKey||z.metaKey)return;const{h:$,s:Y,v:X}=C.current.hsv,ee=z.shiftKey?10:1,ie=(H,ae)=>ye(Math.round(H*100+ae)/100,0,1);let U;switch(z.key){case"ArrowLeft":U={h:$,s:ie(Y,-ee),v:X};break;case"ArrowRight":U={h:$,s:ie(Y,ee),v:X};break;case"ArrowUp":U={h:$,s:Y,v:ie(X,ee)};break;case"ArrowDown":U={h:$,s:Y,v:ie(X,-ee)};break;case"PageUp":U={h:$,s:Y,v:ie(X,10)};break;case"PageDown":U={h:$,s:Y,v:ie(X,-10)};break;case"Home":U={h:$,s:0,v:X};break;case"End":U={h:$,s:1,v:X};break;default:return}z.preventDefault(),A(U),N()},T=c.useRef(null),F=ke(z=>{z!==Math.round(C.current.hsv.h)&&A({...C.current.hsv,h:z})});c.useEffect(()=>{const z=T.current;if(!z)return;const $=()=>{F(Number(z.value)),N()};return z.addEventListener("change",$),()=>z.removeEventListener("change",$)},[F,N]);const[q,G]=c.useState(null),V=()=>{if(q===null)return;G(null);const z=Je(q);!z||z===C.current.hex||(E(z),N())},Z=c.useSyncExternalStore(ri,ai,oi),K=async()=>{const z=window.EyeDropper;if(z)try{const{sRGBHex:$}=await new z().open(),Y=Je($);if(!Y)return;E(Y),N()}catch{}},P=o==null?void 0:o.map(z=>{const $=Je(z)??z;return{value:$,color:z,label:$}});return a.jsxs("div",{ref:p,id:v.id,role:"group",className:L("ok-color-picker",l),style:{"--h":M.h,"--c":_,...d},"aria-label":f??(v.labelledBy?void 0:g.colorPicker.label),"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":w||void 0,"data-disabled":w?"":void 0,...b,children:[a.jsx("div",{ref:y,role:"slider",tabIndex:w?-1:0,className:"ok-color-picker__area ok-focusable",style:{"--s":M.s,"--v":M.v},"aria-label":g.colorPicker.area,"aria-roledescription":g.colorPicker.areaRole,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Tn(M.s),"aria-valuetext":g.colorPicker.areaValue(Tn(M.s),Tn(M.v)),"aria-disabled":w||void 0,"data-active":S?"":void 0,onPointerDown:I,onKeyDown:O,children:a.jsx("span",{className:"ok-color-picker__thumb"})}),a.jsx("input",{ref:T,type:"range",className:"ok-color-picker__hue ok-focusable",min:0,max:360,step:1,value:Math.round(M.h),"aria-label":g.colorPicker.hue,"aria-valuetext":`${Math.round(M.h)}°`,disabled:w,onChange:z=>F(Number(z.target.value))}),a.jsxs(Le.Provider,{value:null,children:[a.jsxs("div",{className:"ok-color-picker__row",children:[a.jsx(ss,{size:"sm",className:"ok-color-picker__hex","aria-label":g.colorPicker.hex,prefix:a.jsx("span",{className:"ok-color-picker__chip"}),value:q??_,onChange:G,onBlur:V,onKeyDown:z=>{z.key==="Enter"?(z.preventDefault(),V()):z.key==="Escape"&&q!==null&&G(null)},spellCheck:!1,autoComplete:"off",autoCapitalize:"off",disabled:w}),Z&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":g.colorPicker.eyedropper,title:g.colorPicker.eyedropper,disabled:w,onClick:K,children:a.jsx(pe,{children:a.jsx("path",{d:"M13.6 3.4a2 2 0 0 1 2.9 2.9l-1.7 1.7.9.9-1.4 1.4-4.2-4.2 1.4-1.4.9.9zM10.6 7.4l-6 6a1.5 1.5 0 0 0-.4.8l-.4 2.4 2.4-.4a1.5 1.5 0 0 0 .8-.4l6-6"})})})]}),P&&P.length>0&&a.jsx(Vr,{size:"sm",className:"ok-color-picker__swatches","aria-label":g.colorPicker.swatches,colors:P,value:P.some(z=>z.value===_)?_:null,onChange:z=>{const $=Je(z);$&&(E($),N())},disabled:w})]})]})}),Wr={Meta:"⌘",Control:"⌃",Alt:"⌥",Shift:"⇧",Space:"Space",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Enter:"↩",Backspace:"⌫",Tab:"⇥",Escape:"Esc"},rs=t=>Wr[t]??t,cn=(t,e=Vt["zh-CN"].keyNames)=>e[t]??t,li=c.forwardRef(function({k:e,size:n="md",className:s,children:r,...o},i){const l=he().messages.keyNames,d=e?rs(e):null;return a.jsx("kbd",{ref:i,className:L("ok-kbd",n!=="md"&&`ok-kbd--${n}`,s),"data-key":e,...o,children:d!==null&&d!==cn(e,l)?a.jsx("abbr",{title:cn(e,l),style:{textDecoration:"none"},children:d}):d??r})}),Gr=["Control","Alt","Shift","Meta"],Os=t=>Gr.filter(e=>({Control:t.ctrlKey,Alt:t.altKey,Shift:t.shiftKey,Meta:t.metaKey})[e]);function ci({k:t,index:e}){const n=c.useRef(null);return c.useEffect(()=>{Ne(n.current,[{transform:"scale(.3) translateY(8px)",opacity:0},{transform:"none",opacity:1}],{spring:"bouncy",delay:e*45})},[]),a.jsx("kbd",{ref:n,className:"ok-kbd","data-key":t,children:rs(t)})}const di=c.forwardRef(function({value:e,defaultValue:n="",onChange:s,placeholder:r,recordingText:o,size:i="md",disabled:l,className:d,id:u,onClick:f,onKeyDown:m,onKeyUp:h,onBlur:b,onPointerDown:p,"aria-label":v,"aria-labelledby":g,"aria-describedby":w,...x},j){const _=we({id:u,disabled:l,"aria-describedby":w,"aria-labelledby":g,"aria-label":v},!1),{messages:k}=he(),R=r??k.hotkey.placeholder,M=o??k.hotkey.recording,[C,A]=le(e,n,P=>s==null?void 0:s(P,P.split("+").filter(Boolean))),E=C.split("+").filter(Boolean),[N,y]=c.useState(!1),[S,B]=c.useState([]),[D,I]=c.useState(!1),O=c.useRef(null),T=`ok-hotkey-${c.useId()}`,F=()=>{!N&&!_.disabled&&(y(!0),B([]))},q=()=>{y(!1),B([])},G=P=>{var X,ee;if(He(P)||(m==null||m(P),_.disabled))return;if(!N){(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),F());return}if(P.key==="Tab"){q();return}if(P.preventDefault(),P.stopPropagation(),(ee=(X=P.nativeEvent).stopImmediatePropagation)==null||ee.call(X),P.key==="Escape"){q();return}const z=Os(P);if(Gr.includes(P.key)){B(z);return}const $=P.code||"";let Y=$.startsWith("Key")?$.slice(3):$.startsWith("Digit")?$.slice(5):$==="Space"?"Space":P.key;Y.length===1&&(Y=Y.toUpperCase()),q(),A([...z,Y].join("+"))},V=N?S:E,Z=N?S.length?"…":M:E.length?"":R,K=N?k.hotkey.spokenRecording(M):E.length?k.hotkey.spokenCurrent(E.map(P=>cn(P,k.keyNames)).join(" + ")):k.hotkey.none;return a.jsxs("div",{ref:xe(j,O),id:_.id,role:"button",tabIndex:_.disabled?-1:0,className:L("ok-hotkey ok-focusable",i!=="md"&&`ok-hotkey--${i}`,d),"aria-label":v,"aria-labelledby":_.labelledBy,"aria-describedby":[_.describedBy,T].filter(Boolean).join(" "),"aria-disabled":_.disabled||void 0,"aria-pressed":N,"data-recording":N?"":void 0,"data-pointer":D?"":void 0,onPointerDown:P=>{p==null||p(P),I(!0)},onClick:P=>{f==null||f(P),P.defaultPrevented||F()},onKeyDown:G,onKeyUp:P=>{h==null||h(P),N&&B(Os(P))},onBlur:P=>{b==null||b(P),I(!1),N&&q()},...x,children:[V.map((P,z)=>a.jsx(ci,{k:P,index:z},P)),Z&&a.jsx("span",{className:"ok-hotkey__hint",children:Z}),a.jsx(Jn,{id:T,"aria-live":"polite",children:K})]})}),Bs=2.9,ui=17.1,Fs="M10 2.600l2.200 4.700 5.100.600-3.800 3.500 1 5-4.500-2.500-4.500 2.500 1-5-3.800-3.500 5.100-.600z",fi=c.forwardRef(function({value:e,defaultValue:n=0,onChange:s,max:r=5,allowClear:o=!0,readOnly:i,disabled:l,size:d="md",starLabel:u,name:f,className:m,id:h,onKeyDown:b,"aria-label":p,"aria-labelledby":v,"aria-describedby":g,...w},x){const j=we({id:h,disabled:l,"aria-describedby":g,"aria-labelledby":v,"aria-label":p},!1),{messages:_}=he(),k=u??_.rating.star,[R,M]=le(e,n,s),C=Array.from({length:r},(N,y)=>y+1),A=L("ok-rating",d!=="md"&&`ok-rating--${d}`,m),E=a.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:a.jsx("path",{d:Fs})});return i?a.jsx("div",{ref:x,id:j.id,role:"img",className:A,"data-readonly":"","aria-label":v?void 0:p??_.rating.value(R,r),"aria-labelledby":v,"aria-describedby":j.describedBy,...w,children:C.map(N=>{const y=Math.min(1,Math.max(0,R-(N-1))),S=y>0&&y<1,B=100-(Bs+y*(ui-Bs))/20*100;return a.jsxs("span",{className:"ok-rating__star","data-on":y>=1?"":void 0,"data-partial":S?"":void 0,children:[E,S&&a.jsx("svg",{className:"ok-rating__fill",viewBox:"0 0 20 20","aria-hidden":"true",style:{"--ok-rating-cut":`${+B.toFixed(2)}%`},children:a.jsx("path",{d:Fs})})]},N)})}):a.jsxs("div",{ref:x,id:j.id,role:"radiogroup",className:A,"aria-label":j.labelledBy?void 0:p??_.rating.label,"aria-labelledby":j.labelledBy,"aria-describedby":j.describedBy,"aria-disabled":j.disabled||void 0,onKeyDown:N=>{if(b==null||b(N),N.defaultPrevented||j.disabled)return;const y=mn(N,'[role="radio"]');y&&(y.focus(),M(Number(y.dataset.value)))},...w,children:[C.map(N=>a.jsx("button",{type:"button",role:"radio",className:"ok-rating__star ok-focusable","aria-checked":N===R,"aria-label":k(N),tabIndex:N===(R||1)?0:-1,disabled:j.disabled,"data-value":N,"data-on":N<=R?"":void 0,onClick:()=>M(o&&N===R?0:N),children:E},N)),f&&a.jsx("input",{type:"hidden",name:f,value:R})]})});function hi(t,e){if(!e)return!0;const n=t.name.toLowerCase(),s=(t.type||"").toLowerCase();return e.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean).some(r=>r.startsWith(".")?n.endsWith(r):r.endsWith("/*")?s.startsWith(r.slice(0,-1)):s===r)}const pi=c.forwardRef(function({onChange:e,onReject:n,maxSize:s,title:r,hint:o,icon:i,invalid:l,accept:d,multiple:u,children:f,className:m,style:h,rootClassName:b,rootStyle:p,id:v,disabled:g,required:w,"aria-describedby":x,...j},_){const k=we({id:v,disabled:g,required:w,invalid:l,"aria-describedby":x}),{messages:R}=he(),M=r===void 0?R.fileDrop.title:r,[C,A]=c.useState(!1),[E,N]=c.useState(""),y=c.useRef(null),S=c.useRef(0),B=O=>{var G;let T=Array.from(O??[]);if(!T.length)return;const F=T.filter(V=>hi(V,d)&&(s==null||V.size<=s)),q=T.filter(V=>!F.includes(V));T=u?F:F.slice(0,1),q.length&&(n==null||n(q)),T.length&&(e==null||e(T)),N(R.fileDrop.status(T.length,((G=T[0])==null?void 0:G.name)??"",q.length))},D=O=>{var T;return Array.from(((T=O.dataTransfer)==null?void 0:T.types)??[]).includes("Files")},I={onDragEnter:O=>{k.disabled||!D(O)||(O.preventDefault(),S.current++,A(!0))},onDragOver:O=>{k.disabled||!D(O)||O.preventDefault()},onDragLeave:()=>{S.current=Math.max(0,S.current-1),S.current||A(!1)},onDrop:O=>{S.current=0,A(!1),!(k.disabled||!D(O))&&(O.preventDefault(),B(O.dataTransfer.files))}};return a.jsxs("label",{className:L("ok-filedrop",b,m),style:{...p,...h},"data-dragging":C?"":void 0,"data-invalid":k.invalid?"":void 0,"data-disabled":k.disabled?"":void 0,...I,children:[a.jsx("input",{...j,ref:xe(_,y),id:k.id,className:"ok-filedrop__input",type:"file",accept:d,multiple:u,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:O=>{B(O.target.files),O.target.value=""}}),a.jsxs("span",{className:"ok-filedrop__body",children:[i??a.jsx(pe,{name:"upload",className:"ok-filedrop__icon"}),a.jsx("span",{className:"ok-filedrop__title",children:M}),o!=null&&a.jsx("span",{className:"ok-filedrop__hint",children:o}),f,a.jsx("span",{className:"ok-filedrop__status","aria-live":"polite",children:E})]})]})}),mi=1e3,bi='button, a[href], [role="button"], [role="menuitem"], [role="option"], [role="tab"], summary, label, input, select, textarea, [tabindex]';function vi(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement?!0:t instanceof HTMLInputElement?!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(t.type):t instanceof HTMLElement&&t.isContentEditable}function Ur({pointer:t,active:e,now:n,viewport:s}){const r={x:s.width/2,y:s.height/2},o=e==null?void 0:e.ownerDocument,i=!e||e===(o==null?void 0:o.body)||e===(o==null?void 0:o.documentElement);if(t&&t.target&&n-t.time<=mi){const l=t.target;if(!i&&(e===l||e.contains(l)))return{x:t.x,y:t.y};if(i&&l.closest(bi))return{x:t.x,y:t.y}}if(!i&&!vi(e)){const l=e.getBoundingClientRect();if(l.width>0&&l.height>0&&l.right>0&&l.bottom>0&&l.left<s.width&&l.top<s.height)return{x:l.left+l.width/2,y:l.top+l.height/2}}return r}let Yr=null,zs=!1;function Kr(){zs||!Ae||(zs=!0,document.addEventListener("pointerdown",t=>{Yr={x:t.clientX,y:t.clientY,time:performance.now(),target:t.target instanceof Element?t.target:null}},!0))}function gi(t="trigger"){if(typeof t=="object")return t;const e={width:window.innerWidth,height:window.innerHeight};return t==="center"?{x:e.width/2,y:e.height/2}:Ur({pointer:Yr,active:document.activeElement,now:performance.now(),viewport:e})}function bn(t,e){return t==="sm"||t==="md"||t==="lg"?e[t]:t}const Xr=c.createContext(null);function Jr(){return c.useContext(Xr)}function xi({active:t,layerRef:e}){return nr(t,e),null}const ki=t=>typeof t=="number"?t+"px":t;function yi(t,e){for(let n=t;n&&n!==e;n=n.parentElement)if(n.scrollWidth>n.clientWidth+1){const s=getComputedStyle(n).overflowX;if(s==="auto"||s==="scroll")return!0}return!1}const wi='button, a[href], input, select, textarea, label, [role="button"], [contenteditable="true"], [data-ok-no-drag]',_i=.5,it=c.forwardRef(function({open:e,onOpenChange:n,placement:s="center",modal:r=!0,autoFocus:o=!1,dismissible:i=!0,size:l,gap:d,stretch:u=!0,align:f,role:m="dialog",initialFocus:h,restoreFocus:b=!0,container:p,contained:v,dragToDismiss:g=!1,swipeToDismiss:w=!0,closeButton:x="auto",closeLabel:j,origin:_,onExited:k,className:R,style:M,children:C,"aria-label":A,"aria-labelledby":E,"aria-describedby":N,onPointerDown:y,onFocus:S,onBlur:B,...D},I){const O=he().messages.common.close,T=j??O,{mounted:F,state:q,ref:G}=Yt(e,er.out*2),V=c.useRef(null),Z=c.useRef(null),K=c.useRef(null),P=c.useId(),z=P+"title",$=P+"desc",[Y,X]=c.useState(!1),[ee,ie]=c.useState(!1),[U,H]=c.useState(!1),ae=c.useRef(null),de=_!==void 0||s==="center",[ne,oe]=c.useState(null);c.useEffect(()=>{Kr()},[]),ve(()=>{e&&de&&oe(gi(_??"trigger"))},[e]);const Q=c.useRef(null),J=te=>{if(!te||!de||!ne||Q.current&&Q.current.node===te&&Q.current.point===ne)return;Q.current={node:te,point:ne};const me=te.offsetParent;if(!me)return;const fe=me.getBoundingClientRect();te.style.setProperty("--_ox",`${ne.x-fe.left-te.offsetLeft}px`),te.style.setProperty("--_oy",`${ne.y-fe.top-te.offsetTop}px`)},W=ke(()=>{n==null||n(!1)}),ce=ke(()=>{k==null||k()});tr(F&&r&&!v),Kt(e&&i&&(r||U),W);const ue=c.useRef(F);c.useEffect(()=>{ue.current&&!F&&(H(!1),ce()),ue.current=F},[F,ce]),c.useEffect(()=>{if(e||r||!b)return;const te=V.current;te&&te.contains(document.activeElement)&&Kn(ae.current)},[e,r,b]);const je=g&&i&&s!=="center",De=fn("(max-width: 519.98px)"),Ie=w&&i&&De&&(s==="left"||s==="right")&&!v,[_e,Ce]=c.useState(!1),ge=i&&!_e&&(x===!0||x==="auto"&&De&&s!=="center"&&!v),nt=c.useMemo(()=>({titleId:z,descriptionId:$,setTitled:X,setDescribed:ie,close:W,dismissible:i,modal:r,placement:s,draggable:je,setHeaderClose:Ce}),[z,$,W,i,r,s,je]);if(!F)return null;const st=te=>{S==null||S(te);const me=V.current,fe=te.relatedTarget;!U&&fe&&me&&!me.contains(fe)&&(ae.current=Yn(fe)),H(!0)},Ye=te=>{var fe;B==null||B(te);const me=te.relatedTarget;(!me||!((fe=V.current)!=null&&fe.contains(me)))&&H(!1)},ct=te=>{var js;y==null||y(te);const me=V.current;if(!je&&!Ie||!me||te.defaultPrevented||q!=="open"||te.pointerType==="mouse"&&te.button!==0)return;const fe=te.target,re=(js=fe.closest)==null?void 0:js.call(fe,"[data-ok-drag-handle]");if(!me.contains(fe)||fe.closest(wi))return;const be=je&&!!re&&me.contains(re),Re=!be&&Ie&&te.pointerType!=="mouse"&&!yi(fe,me);if(!be&&!Re)return;const at=te.clientX,Ke=te.clientY,dt=s==="left"||s==="right",Tt=s==="bottom"||s==="right"?1:-1,bs=te.pointerId,Ta=dt?te.clientX:te.clientY,vs=me.getBoundingClientRect(),_n=dt?vs.width:vs.height,qe=K.current;let jn=!1,ut=0,Nn=0,Mn=te.timeStamp,gs=0;const xs=Ee=>{if(Ee.pointerId!==bs)return;const ft=((dt?Ee.clientX:Ee.clientY)-Ta)*Tt;if(!jn){if(Re){const $t=Math.abs(Ee.clientX-at),Ns=Math.abs(Ee.clientY-Ke);if($t<8&&Ns<8)return;if(Ns>$t||ft<=0){ks();return}}if(Math.abs(ft)<4)return;jn=!0,me.style.transition="none",me.setAttribute("data-dragging",""),qe&&(qe.style.transition="none")}ut=ft>=0?ft:Math.max(ft*.15,-8);const Jt=Ee.timeStamp-Mn;Jt>0&&(Nn=(ut-gs)/Jt,Mn=Ee.timeStamp,gs=ut);const Zt=ut*Tt;me.style.transform=dt?`translateX(${Zt}px)`:`translateY(${Zt}px)`,qe&&(qe.style.opacity=String(1-ye(ut/(_n||320),0,1)*.7))},ks=()=>{document.removeEventListener("pointermove",xs),document.removeEventListener("pointerup",ws),document.removeEventListener("pointercancel",_s)},ys=(Ee,ft)=>{if(Ee.pointerId!==bs||(ks(),!jn))return;Ee.timeStamp-Mn>120&&(Nn=0);const Jt=_n>0?Math.min(_n*.4,160):160,Zt=!ft&&(ut>Jt||Nn>_i&&ut>12);me.style.transition="",me.style.transform="",me.removeAttribute("data-dragging"),qe&&(qe.style.transition=""),Zt?(W(),requestAnimationFrame(()=>{var $t;qe&&(($t=Z.current)==null?void 0:$t.getAttribute("data-state"))==="open"&&(qe.style.opacity="")})):qe&&(qe.style.opacity="")},ws=Ee=>ys(Ee,!1),_s=Ee=>ys(Ee,!0);document.addEventListener("pointermove",xs),document.addEventListener("pointerup",ws),document.addEventListener("pointercancel",_s)},rt=l==="auto",se={"--ok-float-size":rt?void 0:ki(l),"--ok-float-gap":d!=null?d+"px":void 0};return a.jsx(gt,{container:p,children:a.jsxs("div",{ref:Z,className:L("ok-float",v&&"ok-float--contained",r&&"ok-float--modal"),"data-ok-layer":"","data-state":q,"data-placement":s,"data-stretch":u?"":void 0,"data-align":f,"data-size":rt?"auto":void 0,"data-zoom":de?"":void 0,style:se,children:[r&&a.jsx("div",{ref:K,className:"ok-float__scrim","aria-hidden":"true",onClick:i?W:void 0}),a.jsx(rr,{scopeRef:V,trap:r,autoFocus:r||o,restoreFocus:b&&r,initialFocus:h,children:a.jsxs("div",{...D,ref:xe(I,V,G,J),className:L("ok-float__card",R),style:M,role:m,"aria-modal":r&&(m==="dialog"||m==="alertdialog")?!0:void 0,"aria-label":A,"aria-labelledby":E??(Y&&!A?z:void 0),"aria-describedby":N??(ee?$:void 0),"data-draggable":je?"":void 0,"data-swipe":Ie?"":void 0,tabIndex:-1,onPointerDown:ct,onFocus:st,onBlur:Ye,children:[a.jsx(Xr.Provider,{value:nt,children:C}),ge&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close ok-float__close--auto","aria-label":T,onClick:W,children:a.jsx(pe,{name:"x"})})]})}),r&&!v&&a.jsx(xi,{active:e,layerRef:Z})]})})}),Zr=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{ref:s,className:L("ok-float__grip",e),"aria-hidden":"true","data-ok-drag-handle":"",...n,children:a.jsx("span",{})})}),ji=c.forwardRef(function({title:e,description:n,icon:s,level:r=2,closable:o,closeLabel:i,onClose:l,className:d,children:u,...f},m){const h=he().messages.common.close,b=i??h,p=Jr(),v=c.useId(),g=(p==null?void 0:p.titleId)??v+"title",w=(p==null?void 0:p.descriptionId)??v+"desc",x=e!=null&&e!==!1,j=n!=null&&n!==!1,_=p==null?void 0:p.setTitled,k=p==null?void 0:p.setDescribed;ve(()=>{if(!(!x||!_))return _(!0),()=>_(!1)},[x,_]),ve(()=>{if(!(!j||!k))return k(!0),()=>k(!1)},[j,k]);const R="h"+r,M=o??(p==null?void 0:p.dismissible)??!0,C=p==null?void 0:p.setHeaderClose;return ve(()=>{if(!(!M||!C))return C(!0),()=>C(!1)},[M,C]),a.jsxs("div",{ref:m,className:L("ok-float__header",d),"data-ok-drag-handle":p!=null&&p.draggable?"":void 0,...f,children:[s!=null&&s!==!1&&a.jsx("span",{className:"ok-float__icon",children:s}),a.jsxs("div",{className:"ok-float__heading",children:[x&&a.jsx(R,{id:g,className:"ok-float__title",children:e}),j&&a.jsx("p",{id:w,className:"ok-float__desc",children:n})]}),u,M&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close","aria-label":b,onClick:l??(p==null?void 0:p.close),children:a.jsx(pe,{name:"x"})})]})}),Ni=c.forwardRef(function({padded:e=!0,className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-float__body ok-scroll",!e&&"ok-float__body--flush",n),...s})}),Mi=c.forwardRef(function({align:e="end",className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-float__footer",n),"data-align":e,...s})}),Ri={sm:320,md:400,lg:560},Qr=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,size:r="md",icon:o,tone:i="accent",title:l,description:d,actions:u,align:f="start",role:m="dialog",closable:h=!1,closeLabel:b,dismissible:p=!0,as:v="div",onSubmit:g,origin:w,className:x,children:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},C){const A=he().messages.common.close,E=b??A,[N,y]=le(e,n,s),S=c.useId(),B=l!=null&&l!==!1,D=d!=null&&d!==!1,I=o!=null&&o!==!1,O=a.jsxs(a.Fragment,{children:[(B||I||h)&&a.jsxs("div",{className:"ok-dialog__head",children:[I&&a.jsx("div",{className:L("ok-dialog__icon",i!=="accent"&&"ok-dialog__icon--"+i),children:o}),B&&a.jsx("h2",{id:S+"title",className:"ok-dialog__title",children:l}),h&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-dialog__close","aria-label":E,onClick:()=>y(!1),children:a.jsx(pe,{name:"x"})})]}),D&&a.jsx("p",{id:S+"desc",className:"ok-dialog__desc",children:d}),j!=null&&j!==!1&&a.jsx("div",{className:"ok-dialog__body ok-scroll",children:j}),u!=null&&u!==!1&&a.jsx("div",{className:"ok-dialog__actions",children:u})]});return a.jsx(it,{...M,ref:C,open:N,onOpenChange:y,placement:"center",origin:w,size:bn(r,Ri),role:m,dismissible:p,className:L("ok-dialog__panel ok-scroll",f==="center"&&"ok-dialog__panel--center",x),"aria-label":_,"aria-labelledby":k??(B&&!_?S+"title":void 0),"aria-describedby":R??(D?S+"desc":void 0),children:v==="form"?a.jsx("form",{className:"ok-dialog__form",onSubmit:T=>{T.preventDefault(),T.stopPropagation(),g==null||g(T)},children:O}):O})});let ot=[],ea=0,Si=0;const qn=new Set,Mt=[];let Hs=!1;const Wt=()=>{ea++,qn.forEach(t=>t())},Ci=t=>(qn.add(t),()=>{qn.delete(t)}),qs=()=>ea,Ei=()=>{var t;return(t=Mt.find(e=>!e.auto)??Mt[0])==null?void 0:t.id};function $n(t,e){const n=ot.find(s=>s.id===t);!n||!n.open||(n.resolve(e),ot=ot.map(s=>s.id===t?{...s,open:!1}:s),Wt())}function Ai(t){ot=ot.filter(e=>e.id!==t),Wt()}function Ti(t){if(!Ae)return Promise.resolve(!1);const e=typeof t=="string"?{title:t}:t;return Kr(),new Promise(n=>{if(ot=[...ot,{id:++Si,options:e,open:!0,resolve:n}],!Mt.some(s=>!s.auto)&&!Hs){Hs=!0;const s=document.createElement("div");s.setAttribute("data-ok-confirmer",""),document.body.appendChild(s),$a.createRoot(s).render(a.jsx(ta,{auto:!0}))}Wt()})}function ta({auto:t=!1}){const e=c.useRef();e.current||(e.current=Symbol("confirmer")),c.useSyncExternalStore(Ci,qs,qs);const{messages:n}=he();return c.useEffect(()=>{const s={id:e.current,auto:t};return Mt.push(s),Wt(),()=>{const r=Mt.indexOf(s);r>=0&&Mt.splice(r,1),Wt()}},[t]),Ei()!==e.current?null:a.jsx(a.Fragment,{children:ot.map(s=>{const r=s.options,o=r.tone==="danger";return a.jsx(Qr,{role:"alertdialog",open:s.open,onOpenChange:i=>{i||$n(s.id,!1)},onExited:()=>Ai(s.id),title:r.title,description:r.description,icon:r.icon,tone:r.tone,size:r.size,align:r.align??(r.icon==null?"center":"start"),dismissible:r.dismissible??!0,origin:r.origin,actions:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable","data-autofocus":o?"":void 0,onClick:()=>$n(s.id,!1),children:r.cancelText??n.confirm.cancel}),a.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable "+(o?"ok-btn--danger":"ok-btn--primary"),"data-autofocus":o?void 0:"",onClick:()=>$n(s.id,!0),children:r.confirmText??n.confirm.confirm})]})},s.id)})})}const $i={sm:280,md:360,lg:480},Pi={sm:240,md:360,lg:520},Ii=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,placement:r="right",size:o="md",modal:i=!0,className:l,...d},u){const[f,m]=le(e,n,s),h=r==="left"||r==="right";return a.jsx(it,{...d,ref:u,open:f,onOpenChange:m,placement:r,modal:i,size:bn(o,h?$i:Pi),className:L("ok-drawer",l)})}),Vs={auto:void 0,sm:"40%",md:"60%",lg:"85%",full:"100%"},Li=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,size:r="auto",grip:o=!0,dragToDismiss:i=!0,stretch:l=!1,modal:d=!0,className:u,children:f,...m},h){const[b,p]=le(e,n,s),v=typeof r=="string"&&r in Vs?Vs[r]:r;return a.jsxs(it,{...m,ref:h,open:b,onOpenChange:p,placement:"bottom",modal:d,stretch:l,size:v,dragToDismiss:i,className:L("ok-sheet",u),children:[o&&a.jsx(Zr,{}),f]})}),Di={sm:280,md:320,lg:400},Oi={sm:200,md:280,lg:400},na=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,placement:r="right",size:o="md",role:i="complementary",className:l,...d},u){const[f,m]=le(e,n,s),h=r==="left"||r==="right";return a.jsx(it,{...d,ref:u,open:f,onOpenChange:m,placement:r,modal:!1,role:i,size:bn(o,h?Di:Oi),className:L("ok-panel-float",l)})}),Bi=na;let Pe=[],Fi=0;const Vn=new Set,as=()=>Vn.forEach(t=>t());function wt(t,e){const n=typeof t=="string"?{title:t}:t,s=e?{...n,tone:e}:n,r=s.id??"ok-toast-"+ ++Fi;return Pe=Pe.some(i=>i.id===r&&!i.leaving)?Pe.map(i=>i.id===r&&!i.leaving?{...s,id:r,leaving:!1,createdAt:i.createdAt,rev:i.rev+1,closable:s.closable??i.closable,live:s.live??i.live,onDismiss:s.onDismiss??i.onDismiss}:i):[{...s,id:r,leaving:!1,createdAt:Date.now(),rev:0},...Pe],as(),r}function ht(t){let e=!1;Pe=Pe.map(n=>n.leaving||t!=null&&n.id!==t?n:(e=!0,{...n,leaving:!0})),e&&as()}function zi(t){var n;const e=Pe.find(s=>s.id===t);e&&(Pe=Pe.filter(s=>s.id!==t),as(),(n=e.onDismiss)==null||n.call(e))}const Hi=Object.assign(t=>wt(t),{success:t=>wt(t,"success"),warning:t=>wt(t,"warning"),danger:t=>wt(t,"danger"),error:t=>wt(t,"danger"),info:t=>wt(t,"info"),dismiss:ht}),qi={success:a.jsx("path",{pathLength:1,d:"M5 10.5l3.2 3.2L15 6.5"}),danger:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M6 6l8 8"}),a.jsx("path",{pathLength:1,d:"M14 6l-8 8"})]}),warning:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M10 5v6"}),a.jsx("path",{pathLength:1,d:"M10 14.5v.1"})]}),info:a.jsxs(a.Fragment,{children:[a.jsx("path",{pathLength:1,d:"M10 9v5.5"}),a.jsx("path",{pathLength:1,d:"M10 5.8v.1"})]}),default:a.jsx("path",{pathLength:1,d:"M4 4.5c0 6.500 4.500 11 9 11 2.800 0 4.500-2 4.500-4.200S15.700 7.500 13.500 7.500c-2 0-3.400 1.400-3.600 3.200"})};function Vi({record:t,position:e,defaultDuration:n,pauseOnHover:s,closeLabel:r,register:o}){const i=c.useRef(null),[l,d]=c.useState(!1),u=c.useRef(!1),f=c.useRef(!1),m=t.duration??n,h=c.useRef(m),{id:b,leaving:p}=t,v=e.startsWith("top");ve(()=>{Ne(i.current,[{opacity:0,transform:`translateY(${v?-32:32}px) scale(.84)`},{opacity:1,transform:"none"}],{spring:"bouncy"})},[]),c.useEffect(()=>{h.current=m},[m,t.rev]),c.useEffect(()=>{if(p||l||m<=0)return;const R=Date.now(),M=setTimeout(()=>ht(b),h.current);return()=>{clearTimeout(M),h.current=Math.max(800,h.current-(Date.now()-R))}},[p,l,m,b,t.rev]),c.useEffect(()=>{if(!p)return;const R=e.endsWith("right")?56:e.endsWith("left")?-56:0,M=R?0:v?-24:24,C=Ne(i.current,[{opacity:1,transform:"none"},{opacity:0,transform:`translate(${R}px, ${M}px) scale(.92)`}],{duration:170,easing:ze.in,fill:"forwards"});let A=!1;const E=()=>{A||(A=!0,zi(b))};C!=null&&C.finished&&C.finished.then(E,E);const N=setTimeout(E,170*Ue()+80);return()=>clearTimeout(N)},[p,b]);const g=()=>d(u.current||f.current),w=t.tone&&t.tone!=="neutral"&&t.tone!=="accent"?t.tone:"default",x=t.live??(t.tone==="danger"?"assertive":"polite"),j=t.closable??m<=0,_=t.action,k=t.description!=null&&t.description!==!1;return a.jsxs("div",{ref:xe(i,R=>o(b,R)),className:L("ok-toast","ok-toast--"+w),role:x==="assertive"?"alert":"status","aria-live":x,"aria-atomic":"true","data-leaving":p?"":void 0,onClick:()=>ht(b),onKeyDown:R=>{R.key==="Escape"&&(R.stopPropagation(),ht(b))},onPointerEnter:s?()=>{u.current=!0,g()}:void 0,onPointerLeave:s?()=>{u.current=!1,g()}:void 0,onFocus:()=>{f.current=!0,g()},onBlur:R=>{R.currentTarget.contains(R.relatedTarget)||(f.current=!1,g())},children:[t.icon!==!1&&a.jsx("span",{className:"ok-toast__icon","aria-hidden":"true",children:t.icon??a.jsx("svg",{className:"ok-toast__glyph",viewBox:"0 0 20 20",children:qi[w]})}),a.jsxs("div",{className:"ok-toast__body",children:[a.jsx("div",{className:"ok-toast__title",children:t.title}),k&&a.jsx("div",{className:"ok-toast__desc",children:t.description})]}),_&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-focusable ok-toast__action",onClick:R=>{var M;R.stopPropagation(),(M=_.onClick)==null||M.call(_),_.dismiss!==!1&&ht(b)},children:_.label}),j&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-toast__close","aria-label":r,onClick:R=>{R.stopPropagation(),ht(b)},children:a.jsx(pe,{name:"x"})})]})}const Wi=c.forwardRef(function({position:e,mobilePosition:n,max:s=4,duration:r=4200,pauseOnHover:o=!0,offset:i,label:l,closeLabel:d,container:u,className:f,style:m,...h},b){const{messages:p}=he(),v=l??p.toast.label,g=d??p.common.close,w=pt("sm"),x=pt("md"),j=pt("lg"),_=pt("xl");let k;if(typeof e=="object"&&e!==null){const y=e;k=(_?y.xl:void 0)??(j?y.lg:void 0)??(x?y.md:void 0)??(w?y.sm:void 0)??y.base??(w?"top-right":"bottom-center")}else k=(w?e:n??e)??(w?"top-right":"bottom-center");const[R,M]=c.useState(()=>Pe),C=c.useRef(new Map),A=c.useRef(null),E=ke((y,S)=>{S?C.current.set(y,S):C.current.delete(y)});c.useEffect(()=>{const y=()=>{const S=new Map;C.current.forEach(B=>S.set(B,B.getBoundingClientRect())),A.current=S,M(Pe)};return Vn.add(y),Pe.length&&M(Pe),()=>{Vn.delete(y)}},[]),ve(()=>{A.current&&(un(A.current),A.current=null)},[R]),c.useEffect(()=>{const y=R.filter(S=>!S.leaving);s>0&&y.length>s&&y.slice(s).forEach(S=>ht(S.id))},[R,s]);const N=i!=null?{...m,"--ok-toast-offset":i+"px"}:m;return a.jsx(gt,{container:u,children:a.jsx("div",{ref:b,className:L("ok-toasts",f),role:"region","aria-label":v,"data-position":k,"data-ok-layer":"",style:N,...h,children:R.map(y=>a.jsx(Vi,{record:y,position:k,defaultDuration:r,pauseOnHover:o,closeLabel:g,register:E},y.id))})})});function vn(t,e,n){const s=t.props,r={...e};for(const i in e){const l=e[i],d=s[i];/^on[A-Z]/.test(i)&&typeof d=="function"&&typeof l=="function"?r[i]=Ut(d,l):i==="className"?r[i]=L(d,l):i==="style"?r[i]={...l,...d}:l===void 0&&d!==void 0&&(r[i]=d)}const o=parseInt(c.version,10)>=19?s.ref:t.ref;return n&&(r.ref=o?xe(o,n):n),c.cloneElement(t,r)}function os(t){return t==null||t===!1?null:typeof t=="string"&&t in Xn?a.jsx(pe,{name:t}):c.isValidElement(t)?t:null}function is(){return a.jsx("svg",{className:"ok-menu__check",viewBox:"0 0 16 16","aria-hidden":"true",children:a.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.900-6.400",pathLength:1})})}function ls(){const t=c.useRef(null),e=c.useRef(!1),n=c.useCallback(s=>{const r=t.current,o=r==null?void 0:r.parentElement;if(!r||!o)return;if(!s||s.getAttribute("aria-disabled")==="true"){e.current=!1,o.removeAttribute("data-hl");return}const i=!e.current;i&&(r.style.transition="none"),r.dataset.tone=s.dataset.tone||"",r.style.setProperty("--y",s.offsetTop+"px"),r.style.height=s.offsetHeight+"px",i&&(r.offsetWidth,r.style.transition=""),e.current=!0,o.setAttribute("data-hl","")},[]);return{hlRef:t,moveTo:n}}function cs(t,e){const n=c.useRef(t);return ve(()=>{e||(n.current=t)}),e?n.current:t}function Gi(t,e,n,s){const r=(f,m,h)=>(f.x-h.x)*(m.y-h.y)-(m.x-h.x)*(f.y-h.y),o=r(t,e,n),i=r(t,n,s),l=r(t,s,e),d=o<0||i<0||l<0,u=o>0||i>0||l>0;return!(d&&u)}function Ui(t,e,n){if(t.x===e.x&&t.y===e.y)return!1;const s=n.left>=t.x,r=s?n.left:n.right;if(s?e.x>n.right:e.x<n.left)return!1;const o=4;return Gi(e,t,{x:r,y:n.top-o},{x:r,y:n.bottom+o})}const sa=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;function ra(){const t=c.useRef(""),e=c.useRef();c.useEffect(()=>()=>clearTimeout(e.current),[]);const n=c.useCallback((r,o,i)=>{clearTimeout(e.current),e.current=setTimeout(()=>{t.current=""},500),t.current+=r.toLowerCase();const l=t.current,d=l.length>1&&l.split("").every(h=>h===l[0]),u=d?l[0]:l,f=o.length,m=d||l.length===1?i+1:Math.max(i,0);for(let h=0;h<f;h++){const b=((m+h)%f+f)%f;if(o[b].trim().toLowerCase().startsWith(u))return b}return-1},[]),s=c.useCallback(()=>t.current.length>0,[]);return{search:n,pending:s}}const Pn="\0none",Yi=(t,e)=>{const n=[t.label,t.description,t.group,...t.keywords??[]].filter(Boolean).join(" ").toLowerCase();return e.toLowerCase().split(/\s+/).filter(Boolean).every(s=>n.includes(s))},Ki=c.forwardRef(function({open:e,defaultOpen:n=!1,onOpenChange:s,items:r,query:o,defaultQuery:i="",onQueryChange:l,filter:d,onSelect:u,closeOnSelect:f=!0,placeholder:m,emptyText:h,label:b,width:p,footer:v,origin:g="trigger",className:w,style:x,...j},_){const{messages:k}=he(),R=m??k.commandPalette.placeholder,M=h===void 0?k.commandPalette.empty:h,C=b??k.commandPalette.label,[A,E]=le(e,n,s),[N,y]=le(o,i,l),[S,B]=c.useState(null),D=c.useRef(null),[I,O]=c.useState(null),{hlRef:T,moveTo:F}=ls(),q=c.useId(),G=q+"list",V=U=>q+"opt-"+U,Z=c.useMemo(()=>{const U=d===!1?null:d??Yi,H=N.trim(),ae=U&&H?r.filter(ne=>U(ne,H)):r,de=[];return ae.forEach(ne=>{let oe=de.find(Q=>Q.label===ne.group);oe||(oe={label:ne.group,items:[]},de.push(oe)),oe.items.push(ne)}),de},[r,N,d]),K=c.useMemo(()=>Z.flatMap(U=>U.items).filter(U=>!U.disabled),[Z]),P=S===Pn?null:K.find(U=>U.id===S)??K[0]??null,z=c.useRef(A);c.useEffect(()=>{A&&!z.current&&(y(""),B(null)),z.current=A},[A,y]),ve(()=>{I&&F(P?I.querySelector("[data-active]"):null)},[I,P,Z,F]),ve(()=>{var U;!A||!P||!I||(P===K[0]?I.scrollTop=0:(U=I.querySelector("[data-active]"))==null||U.scrollIntoView({block:"nearest"}))},[A,P==null?void 0:P.id,I]);const $=U=>{var H;U.disabled||((H=U.onSelect)==null||H.call(U),u==null||u(U),f&&E(!1))},Y=U=>{if(!K.length)return;let H;U==="first"?H=0:U==="last"?H=K.length-1:P?H=(K.indexOf(P)+U+K.length)%K.length:H=U>0?0:K.length-1,B(K[H].id)},X=U=>{if(!K.length)return;const H=P?K.indexOf(P):U>0?-1:K.length;B(K[Math.min(K.length-1,Math.max(0,H+U))].id)},ee=U=>{if(!(He(U)||Or(U)))switch(U.key){case"ArrowDown":U.preventDefault(),Y(1);break;case"ArrowUp":U.preventDefault(),Y(-1);break;case"Home":K.length&&(U.preventDefault(),Y("first"));break;case"End":K.length&&(U.preventDefault(),Y("last"));break;case"PageDown":U.preventDefault(),X(5);break;case"PageUp":U.preventDefault(),X(-5);break;case"Enter":P&&(U.preventDefault(),$(P));break}},ie=p!=null?{...x,"--ok-cmdk-width":typeof p=="number"?p+"px":p}:x;return a.jsxs(it,{"aria-label":C,...j,ref:_,open:A,onOpenChange:E,placement:"top",stretch:!1,origin:g,initialFocus:D,className:L("ok-cmdk",w),style:ie,children:[a.jsxs("div",{className:"ok-cmdk__search",children:[a.jsx(pe,{name:"search",className:"ok-cmdk__search-icon"}),a.jsx("input",{ref:D,className:"ok-cmdk__input",type:"text",role:"combobox","aria-label":C,"aria-expanded":"true","aria-controls":G,"aria-autocomplete":"list","aria-activedescendant":P?V(P.id):void 0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,enterKeyHint:"go",placeholder:R,value:N,onChange:U=>{y(U.target.value),B(null)},onKeyDown:ee}),a.jsx("kbd",{className:"ok-kbd ok-cmdk__esc","aria-hidden":"true",children:"Esc"})]}),a.jsxs("div",{ref:O,id:G,className:"ok-cmdk__list ok-scroll",role:"listbox","aria-label":C,hidden:Z.length===0,onPointerLeave:()=>B(Pn),children:[a.jsx("span",{className:"ok-cmdk__hl",ref:T,"aria-hidden":"true"}),Z.map((U,H)=>{const ae=q+"group-"+H;return a.jsxs("div",{className:"ok-cmdk__group",role:"group","aria-labelledby":U.label?ae:void 0,children:[U.label&&a.jsx("div",{id:ae,className:"ok-cmdk__group-label",role:"presentation",children:U.label}),U.items.map(de=>{const ne=(P==null?void 0:P.id)===de.id;return a.jsxs("div",{id:V(de.id),className:"ok-cmdk__item",role:"option","aria-selected":ne,"aria-disabled":de.disabled||void 0,"data-active":ne?"":void 0,onMouseDown:oe=>oe.preventDefault(),onPointerMove:ne?void 0:()=>B(de.disabled?Pn:de.id),onClick:()=>$(de),children:[de.icon!=null&&a.jsx("span",{className:"ok-cmdk__item-icon","aria-hidden":"true",children:de.icon}),a.jsxs("span",{className:"ok-cmdk__item-text",children:[a.jsx("span",{className:"ok-cmdk__item-label",children:de.label}),de.description&&a.jsx("span",{className:"ok-cmdk__item-desc",children:de.description})]}),de.shortcut&&de.shortcut.length>0&&a.jsx("span",{className:"ok-cmdk__item-keys","aria-hidden":"true",children:de.shortcut.map((oe,Q)=>a.jsx("kbd",{className:"ok-kbd",children:oe},Q))})]},de.id)})]},U.label??"\0"+H)})]}),a.jsx("div",{className:"ok-cmdk__empty",role:"status","aria-live":"polite","data-empty":K.length===0&&Z.length===0?"":void 0,children:Z.length===0?M:a.jsx("span",{className:"ok-sr",children:k.commandPalette.results(K.length)})}),v!=null&&v!==!1&&a.jsx("div",{className:"ok-cmdk__footer",children:v})]})}),Ws={top:"bottom",bottom:"top",left:"right",right:"left"},Xi=96;function aa(t){const{anchor:e,floating:n,viewport:s,placement:r="bottom",offset:o=8,alignOffset:i=0,padding:l=8,flip:d=!0,shift:u=!0}=t,f=r.split("-");let m=f[0];const h=f[1]??"center",b=m==="top"||m==="bottom",p=Math.max(0,s.width-l*2),v=Math.max(0,s.height-l*2),g={top:e.top-o-l,bottom:s.height-e.bottom-o-l,left:e.left-o-l,right:s.width-e.right-o-l},w=b?n.height:n.width;d&&w>g[m]&&g[Ws[m]]>g[m]&&(m=Ws[m]);let x,j,_,k,R=p,M=v;return b?(M=Math.min(v,Math.max(g[m],Xi)),_=Math.min(n.width,p),k=Math.min(n.height,M),j=m==="bottom"?e.bottom+o:e.top-o-k,x=(h==="start"?e.left:h==="end"?e.right-_:e.left+e.width/2-_/2)+i):(_=Math.min(n.width,p),k=Math.min(n.height,v),x=m==="right"?e.right+o:e.left-o-_,j=(h==="start"?e.top:h==="end"?e.bottom-k:e.top+e.height/2-k/2)+i),u&&(x=ye(x,l,Math.max(l,s.width-l-_)),j=ye(j,l,Math.max(l,s.height-l-k))),{x:Math.round(x),y:Math.round(j),side:m,align:h,availableWidth:R,availableHeight:M}}function gn(t){const{open:e,anchorRef:n,floatingRef:s,placement:r="bottom",offset:o=8,alignOffset:i=0,padding:l=8,flip:d=!0,shift:u=!0,matchWidth:f=!1}=t,m=ke(t.onPosition),h=c.useRef(0),b=c.useCallback(()=>{const p=n.current,v=s.current;if(!p||!v)return;const g=p.getBoundingClientRect(),w=document.documentElement,x={width:w.clientWidth||window.innerWidth,height:window.innerHeight||w.clientHeight};f===!0?v.style.width=g.width+"px":f==="min"&&(v.style.minWidth=g.width+"px");const j=v.style.getPropertyValue("--ok-popup-avail-h")?[v,...Array.from(v.querySelectorAll(".ok-scroll"))].map(R=>[R,R.scrollTop]):[];v.style.setProperty("--ok-popup-avail-h","100000px"),v.style.setProperty("--ok-popup-avail-w",Math.max(0,x.width-l*2)+"px");const _={width:v.offsetWidth,height:v.offsetHeight},k=aa({anchor:g,floating:_,viewport:x,placement:r,offset:o,alignOffset:i,padding:l,flip:d,shift:u});v.style.setProperty("--ok-popup-avail-h",k.availableHeight+"px"),v.style.setProperty("--ok-popup-avail-w",k.availableWidth+"px"),v.style.left=k.x+"px",v.style.top=k.y+"px",v.dataset.side=k.side,v.dataset.align=k.align,j.forEach(([R,M])=>{R.scrollTop!==M&&(R.scrollTop=M)}),m({...k,anchor:g,width:Math.min(_.width,k.availableWidth),height:Math.min(_.height,k.availableHeight)})},[n,s,r,o,i,l,d,u,f,m]);return ve(()=>{e&&b()},[e,b]),c.useEffect(()=>{var w;if(!e)return;const p=()=>{h.current||(h.current=requestAnimationFrame(()=>{h.current=0,b()}))},v=x=>{const j=s.current;j&&x.target instanceof Node&&j.contains(x.target)||p()};window.addEventListener("scroll",v,{capture:!0,passive:!0}),window.addEventListener("resize",p),(w=window.visualViewport)==null||w.addEventListener("resize",p);let g;if(typeof ResizeObserver<"u"){g=new ResizeObserver(p);const x=n.current;x instanceof Element&&g.observe(x),s.current&&g.observe(s.current)}return()=>{var x;window.removeEventListener("scroll",v,{capture:!0}),window.removeEventListener("resize",p),(x=window.visualViewport)==null||x.removeEventListener("resize",p),g==null||g.disconnect(),h.current&&(cancelAnimationFrame(h.current),h.current=0)}},[e,b,n,s]),{update:b}}const Gs=c.createContext(null),oa=c.createContext(!0),ds=()=>c.useContext(oa),At=c.forwardRef(function(e,n){const{open:s,container:r}=e,o=Yt(s,200);return o.mounted?a.jsx(gt,{container:r,children:a.jsx(Ji,{...e,ref:n,state:o.state,presenceRef:o.ref})}):null}),Ji=c.forwardRef(function({open:e,anchorRef:n,placement:s="bottom-start",offset:r=8,alignOffset:o=0,padding:i=8,flip:l=!0,shift:d=!0,matchWidth:u=!1,onDismiss:f,insideRefs:m,surface:h=!0,container:b,updateRef:p,onPosition:v,state:g,presenceRef:w,className:x,children:j,..._},k){const R=c.useRef(null),{update:M}=gn({open:!0,anchorRef:n,floatingRef:R,placement:s,offset:r,alignOffset:o,padding:i,flip:l,shift:d,matchWidth:u,onPosition:v});ve(()=>{if(p)return p.current=M,()=>{p.current=null}},[p,M]);const C=c.useContext(Gs),A=c.useRef(new Set),E=c.useMemo(()=>({register(S){A.current.add(S);const B=C==null?void 0:C.register(S);return()=>{A.current.delete(S),B==null||B()}}}),[C]);c.useEffect(()=>{const S=R.current;if(!(!S||!C))return C.register(S)},[C]);const N=ke(f),y=c.useRef(m);return y.current=m,c.useEffect(()=>{if(!e)return;const S=B=>{var O,T;const D=B.target;if(!D||(O=R.current)!=null&&O.contains(D))return;const I=n.current;if(!(I instanceof Element&&I.contains(D))&&!((T=y.current)!=null&&T.some(F=>{var q;return(q=F.current)==null?void 0:q.contains(D)}))){for(const F of A.current)if(F.contains(D))return;N("outside",B)}};return document.addEventListener("pointerdown",S,!0),()=>document.removeEventListener("pointerdown",S,!0)},[e,n,N]),Kt(e&&!!f,()=>N("escape",new Event("keydown"))),a.jsx(Gs.Provider,{value:E,children:a.jsx(oa.Provider,{value:e,children:a.jsx("div",{..._,ref:xe(k,R,w),className:L("ok-popup",h&&"ok-popup--surface",x),"data-state":g,"data-ok-layer":"",children:j})})})}),us=c.forwardRef(function({trigger:e,children:n,open:s,defaultOpen:r=!1,onOpenChange:o,placement:i="bottom",offset:l=8,matchWidth:d=!1,anchorRef:u,initialFocus:f,autoFocus:m=!0,closeOnOutsidePress:h=!0,closeOnEscape:b=!0,id:p,className:v,role:g="dialog",onKeyDown:w,...x},j){const[_,k]=le(s,r,o),R=c.useRef(null),M=c.useId(),C=p??`${M}-popover`,A=(y=!0)=>{var S;y&&((S=R.current)==null||S.focus({preventScroll:!0})),k(!1)},E=vn(e,{"aria-haspopup":g==="dialog"?"dialog":"true","aria-expanded":_,"aria-controls":_?C:void 0,"data-state":_?"open":"closed",onClick:()=>_?A(!1):k(!0)},R),N=y=>{if(w==null||w(y),y.defaultPrevented||y.key!=="Tab")return;const S=y.currentTarget;if(!S.contains(y.target))return;const B=Ht(S),D=document.activeElement,I=!B.length||D===B[B.length-1],O=!B.length||D===B[0]||D===S;(y.shiftKey?O:I)&&(y.shiftKey&&y.preventDefault(),A(!0))};return a.jsxs(a.Fragment,{children:[E,a.jsx(At,{...x,ref:j,id:C,role:g,tabIndex:-1,open:_,anchorRef:u??R,insideRefs:[R],placement:i,offset:l,matchWidth:d,className:L("ok-popover",v),onKeyDown:N,onDismiss:y=>{y==="escape"?b&&A(!0):h&&A(!1)},children:a.jsx(Zi,{open:_,autoFocus:m,initialFocus:f,children:typeof n=="function"?n({close:()=>A(!0)}):n})})]})});function Zi({open:t,autoFocus:e,initialFocus:n,children:s}){const r=c.useRef(null);return c.useEffect(()=>{var l;if(!t||!e)return;const o=(l=r.current)==null?void 0:l.parentElement;if(!o||o.contains(document.activeElement))return;((n==null?void 0:n.current)??o.querySelector("[data-autofocus]")??Ht(o)[0]??o).focus({preventScroll:!0})},[t]),a.jsx("div",{className:"ok-popover__body ok-scroll",ref:r,children:s})}const Te={current:null,hiddenAt:-1/0,lastPos:null},Qi=t=>{try{return t.matches(":focus-visible")}catch{return!0}};function el({content:t,shortcut:e,children:n,placement:s="top",offset:r=8,delay:o=380,skipDelayWithin:i=320,hideDelay:l=160,interactive:d=!0,disabled:u,open:f,defaultOpen:m=!1,onOpenChange:h,className:b}){const[p,v]=le(f,m,h),[g,w]=c.useState(!1),[x,j]=c.useState(!1),_=c.useId(),k=c.useRef(null),R=c.useRef(null),M=c.useRef(),C=c.useRef(),A=c.useRef(!1),E=c.useRef(!1),N=c.useRef(!1),y=Yt(p,250);let S=t,B=e;if(typeof t=="string"&&B==null&&t.includes("|")){const V=t.indexOf("|");S=t.slice(0,V),B=t.slice(V+1)}const D=()=>{clearTimeout(M.current),M.current=void 0,clearTimeout(C.current),C.current=void 0},I=ke((V=!1)=>{var Z;D(),A.current=!1,N.current=!1,((Z=Te.current)==null?void 0:Z.id)===_&&(Te.current=null,Te.hiddenAt=performance.now()),j(V),w(!1),v(!1)}),O=ke(()=>{if(D(),u||p)return;const V=Te.current,Z=!!V&&V.id!==_;Z?V.hide(!0):Te.lastPos=null,Te.current={id:_,hide:I},j(!1),w(Z),v(!0)}),T=()=>{if(clearTimeout(C.current),C.current=void 0,u||p||M.current)return;Te.current&&Te.current.id!==_||performance.now()-Te.hiddenAt<i||o<=0?O():M.current=setTimeout(O,o)},F=()=>{clearTimeout(M.current),M.current=void 0,!(!p||C.current)&&(C.current=setTimeout(()=>{C.current=void 0,!(A.current||E.current||N.current)&&I()},l))};c.useEffect(()=>()=>{var V;D(),((V=Te.current)==null?void 0:V.id)===_&&(Te.current=null)},[]),c.useEffect(()=>{u&&p&&I()},[u,p,I]),Kt(p,()=>I()),c.useEffect(()=>{if(!p)return;const V=P=>{var z;if((z=R.current)!=null&&z.contains(P.target)){N.current=!0;return}I()},Z=()=>{N.current&&(N.current=!1,A.current||F())},K=()=>I();return document.addEventListener("pointerdown",V,!0),document.addEventListener("pointerup",Z,!0),document.addEventListener("pointercancel",Z,!0),window.addEventListener("scroll",K,{capture:!0,passive:!0}),()=>{document.removeEventListener("pointerdown",V,!0),document.removeEventListener("pointerup",Z,!0),document.removeEventListener("pointercancel",Z,!0),window.removeEventListener("scroll",K,{capture:!0})}},[p,I]);const q=n.props["aria-describedby"],G=vn(n,{"aria-describedby":y.mounted?L(q,_):q,onPointerEnter:V=>{V.pointerType!=="touch"&&(E.current=!0,T())},onPointerLeave:()=>{E.current=!1,F()},onFocus:V=>{Qi(V.currentTarget)&&T()},onBlur:()=>{!A.current&&!N.current&&I()}},k);return a.jsxs(a.Fragment,{children:[G,y.mounted&&S!=null&&S!==""&&a.jsx(gt,{children:a.jsxs(tl,{id:_,anchorRef:k,tipRef:R,presenceRef:y.ref,state:y.state,warm:g,instant:x,placement:s,offset:r,className:b,interactive:d,onPointerEnter:d?()=>{A.current=!0,clearTimeout(C.current),C.current=void 0}:void 0,onPointerLeave:d?()=>{A.current=!1,N.current||F()}:void 0,children:[S,B!=null&&B!==""&&a.jsx("kbd",{children:B})]})})]})}function tl({id:t,anchorRef:e,tipRef:n,presenceRef:s,state:r,warm:o,instant:i,placement:l,offset:d,className:u,interactive:f,onPointerEnter:m,onPointerLeave:h,children:b}){const p=c.useRef(!0);return gn({open:!0,anchorRef:e,floatingRef:n,placement:l,offset:d,onPosition:g=>{const w=n.current;if(!w)return;w.style.setProperty("--bl",Math.max(0,g.x-g.anchor.left)+"px"),w.style.setProperty("--br",Math.max(0,g.anchor.right-(g.x+g.width))+"px");const x=Te.lastPos;p.current&&o&&x&&Ne(w,[{translate:`${x.x-g.x}px ${x.y-g.y}px`},{translate:"0 0"}],{spring:"snappy"}),p.current=!1,Te.lastPos={x:g.x,y:g.y}}}),a.jsx("div",{id:t,role:"tooltip",ref:g=>{n.current=g,s.current=g},className:L("ok-tip",u),"data-state":r,"data-warm":o||void 0,"data-instant":i||void 0,"data-interactive":f?void 0:"false",onPointerEnter:m,onPointerLeave:h,children:b})}const xn=c.createContext(null),fs=c.createContext(null),on='[data-ok-item]:not([aria-disabled="true"])',nl=150,sl=t=>{var e;return t.dataset.text??((e=t.querySelector(".ok-menu__label"))==null?void 0:e.textContent)??t.textContent??""},kn=c.forwardRef(function({focusOnOpen:e=null,bare:n=!1,className:s,children:r,onKeyDown:o,onPointerMove:i,onPointerLeave:l,onFocus:d,...u},f){const m=c.useContext(xn),h=c.useRef(null),{hlRef:b,moveTo:p}=ls(),[v,g]=c.useState(null),w=ra(),x=c.useRef(null),j=c.useRef(!1),_=ke(()=>j.current),k=ke(()=>{j.current=!1,g(null),p(null);const E=h.current;E&&E!==document.activeElement&&E.contains(document.activeElement)&&E.focus({preventScroll:!0})}),R=c.useMemo(()=>({highlight:p,openSub:v,setOpenSub:g,holding:_,clear:k}),[p,v,_,k]),M=()=>{var E;return Array.from(((E=h.current)==null?void 0:E.querySelectorAll(on))??[])};c.useEffect(()=>{if(!v)return;j.current=!1;let E=!1,N;const y=()=>{var I;return((I=document.getElementById(`${v}-sub`))==null?void 0:I.closest(".ok-popup"))??null},S=()=>{var I;return((I=h.current)==null?void 0:I.querySelector(`[aria-controls="${v}-sub"]`))??null},B=I=>{var F,q;if(!I||(F=y())!=null&&F.contains(I)||(q=S())!=null&&q.contains(I))return;const O=h.current,T=O!=null&&O.contains(I)?I.closest(on):null;T?T.focus({preventScroll:!0}):(O!=null&&O.contains(I)||!E)&&k()},D=I=>{var G,V;const O={x:I.clientX,y:I.clientY},T=x.current;x.current=O,clearTimeout(N);const F=I.target,q=y();if(j.current=!1,!(!q||!F)){if(q.contains(F)){E=!0;return}if(!((G=S())!=null&&G.contains(F))){if(T&&Ui(T,O,q.getBoundingClientRect())){j.current=!0,N=setTimeout(()=>{j.current=!1,B(F)},nl);return}(V=h.current)!=null&&V.contains(F)&&F.closest(on)||B(F)}}};return document.addEventListener("pointermove",D,!0),()=>{document.removeEventListener("pointermove",D,!0),clearTimeout(N),j.current=!1}},[v,k]),c.useEffect(()=>{var y;if(!e)return;const E=M(),N=e==="first"?E[0]:e==="last"?E[E.length-1]:null;(y=N??h.current)==null||y.focus({preventScroll:!0}),N||p(null)},[e]);const C=m==null?void 0:m.open;c.useEffect(()=>{C===!1&&g(null)},[C]);const A=E=>{if(o==null||o(E),E.defaultPrevented||!E.currentTarget.contains(E.target))return;const N=M(),y=N.length,S=N.indexOf(document.activeElement),B=D=>{E.preventDefault();const I=N[D];I&&(I.focus({preventScroll:!0}),I.scrollIntoView({block:"nearest"}))};if(E.key==="ArrowDown")B(S<0?0:(S+1)%y);else if(E.key==="ArrowUp")B(S<0?y-1:(S-1+y)%y);else if(E.key==="Home"||E.key==="PageUp")B(0);else if(E.key==="End"||E.key==="PageDown")B(y-1);else if(E.key==="Tab")m==null||m.close("tab");else if(sa(E)&&(E.key!==" "||w.pending())){const D=w.search(E.key,N.map(sl),S);E.preventDefault(),D>=0&&B(D)}};return a.jsx(fs.Provider,{value:R,children:a.jsxs("div",{role:"menu","aria-orientation":"vertical",tabIndex:-1,...u,ref:xe(f,h),className:L("ok-menu ok-scroll",!n&&"ok-menu--static",s),onKeyDown:A,onPointerMove:E=>{i==null||i(E),v||(x.current={x:E.clientX,y:E.clientY})},onFocus:E=>{d==null||d(E),E.target===E.currentTarget&&p(null)},onPointerLeave:E=>{l==null||l(E),!v&&k()},children:[a.jsx("span",{className:"ok-menu__hl",ref:b,"aria-hidden":"true"}),r]})})}),yn=c.forwardRef(function({role:e="menuitem",icon:n,shortcut:s,tone:r,disabled:o,onSelect:i,closeOnSelect:l=!0,textValue:d,trailing:u,subId:f,className:m,children:h,onClick:b,onFocus:p,onPointerMove:v,...g},w){const x=c.useContext(fs),j=c.useContext(xn),_=r&&r!=="neutral"?r:void 0;return a.jsxs("button",{type:"button",role:e,tabIndex:-1,...g,ref:w,className:L("ok-menu__item",_&&`ok-menu__item--${_}`,m),"data-ok-item":"","data-icon":n!=null&&n!==!1?"":void 0,"data-tone":_,"data-text":d,"aria-disabled":o||void 0,onClick:k=>{if(o){k.preventDefault();return}b==null||b(k),!k.defaultPrevented&&(i==null||i(),l&&(j==null||j.close("select")))},onFocus:k=>{p==null||p(k),x==null||x.highlight(k.currentTarget),x&&!f&&x.openSub&&x.setOpenSub(null)},onPointerMove:k=>{if(v==null||v(k),!!x&&!(x.openSub&&x.openSub!==f&&x.holding())){if(o){x.clear();return}document.activeElement!==k.currentTarget&&k.currentTarget.focus({preventScroll:!0})}},children:[os(n),a.jsx("span",{className:"ok-menu__label",children:h}),s!=null&&a.jsx("span",{className:"ok-menu__meta",children:s}),u]})}),rl=c.forwardRef(function(e,n){return a.jsx(yn,{...e,ref:n})}),al=c.forwardRef(function({checked:e,defaultChecked:n=!1,onCheckedChange:s,onSelect:r,closeOnSelect:o=!1,...i},l){const[d,u]=le(e,n,s),f=cs(d,!ds());return a.jsx(yn,{...i,ref:l,role:"menuitemcheckbox","aria-checked":f,closeOnSelect:o,onSelect:()=>{u(!d),r==null||r()},trailing:a.jsx(is,{})})}),ia=c.createContext(null),ol=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,children:r,...o},i){const[l,d]=le(e,n,s),u=c.useMemo(()=>({value:l,set:d}),[l,d]);return a.jsx(ia.Provider,{value:u,children:a.jsx("div",{role:"group",...o,ref:i,children:r})})}),il=c.forwardRef(function({value:e,onSelect:n,closeOnSelect:s=!1,...r},o){const i=c.useContext(ia),l=cs((i==null?void 0:i.value)===e,!ds());return a.jsx(yn,{...r,ref:o,role:"menuitemradio","aria-checked":l,closeOnSelect:s,onSelect:()=>{i==null||i.set(e),n==null||n()},trailing:a.jsx(is,{})})}),ll=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{role:"separator",...n,ref:s,className:L("ok-menu__sep",e)})}),cl=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{role:"presentation",...n,ref:s,className:L("ok-menu__heading",e)})}),dl=c.forwardRef(function({label:e,children:n,disabled:s,onKeyDown:r,...o},i){const l=c.useId(),d=c.useContext(fs),u=c.useRef(null),f=c.useRef(null),m=!!d&&d.openSub===l,[h,b]=c.useState(null),p=g=>{var w,x;if(!(s||!d)){if(m&&g){(x=(w=f.current)==null?void 0:w.querySelector(on))==null||x.focus({preventScroll:!0});return}b(g?"first":null),d.setOpenSub(l)}},v=()=>{var g;d==null||d.setOpenSub(null),(g=u.current)==null||g.focus({preventScroll:!0})};return c.useEffect(()=>{m||b(null)},[m]),a.jsxs(a.Fragment,{children:[a.jsx(yn,{...o,ref:xe(i,u),disabled:s,subId:l,closeOnSelect:!1,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?`${l}-sub`:void 0,onSelect:()=>p(!0),onPointerMove:()=>{!m&&!(d!=null&&d.holding())&&p(!1)},onKeyDown:g=>{r==null||r(g),g.key==="ArrowRight"&&(g.preventDefault(),p(!0))},trailing:a.jsx(pe,{name:"chevron-right",className:"ok-menu__chevron"}),children:e}),a.jsx(At,{open:m,anchorRef:u,placement:"right-start",offset:8,alignOffset:-6,className:"ok-popup--menu",onDismiss:g=>{g==="escape"&&v()},children:a.jsx(kn,{bare:!0,id:`${l}-sub`,ref:f,focusOnOpen:m?h:null,onKeyDown:g=>{g.key==="ArrowLeft"&&g.currentTarget.contains(g.target)&&(g.preventDefault(),v())},children:n})})]})}),ul=c.forwardRef(function({trigger:e,children:n,open:s,defaultOpen:r=!1,onOpenChange:o,placement:i="bottom-start",offset:l=8,matchTriggerWidth:d=!0,id:u,...f},m){const[h,b]=le(s,r,o),[p,v]=c.useState("menu"),g=c.useRef(null),w=c.useId(),x=u??`${w}-menu`,j=M=>{v(M),b(!0)},_=M=>{var C;M&&((C=g.current)==null||C.focus({preventScroll:!0})),b(!1)},k=c.useMemo(()=>({open:h,close:()=>_(!0)}),[h,b]),R=vn(e,{"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?x:void 0,"data-state":h?"open":"closed",onClick:M=>h?_(!1):j(M.detail===0?"first":"menu"),onKeyDown:M=>{(M.key==="ArrowDown"||M.key==="ArrowUp")&&(M.preventDefault(),j(M.key==="ArrowDown"?"first":"last"))}},g);return a.jsxs(xn.Provider,{value:k,children:[R,a.jsx(At,{open:h,anchorRef:g,placement:i,offset:l,matchWidth:d?"min":!1,className:"ok-popup--menu",onDismiss:M=>_(M==="escape"),children:a.jsx(kn,{...f,bare:!0,id:x,ref:m,focusOnOpen:h?p:null,children:n})})]})}),fl=10,hl=c.forwardRef(function({children:e,menu:n,open:s,onOpenChange:r,disabled:o,longPressMs:i=500,id:l,...d},u){const[f,m]=le(s,!1,r),[h,b]=c.useState({x:0,y:0}),p=c.useRef(h);p.current=h;const v=c.useRef({getBoundingClientRect:()=>{const{x:N,y}=p.current;return{left:N,top:y,right:N,bottom:y,width:0,height:0}}}),g=c.useRef(null),w=c.useRef(null),x=c.useRef(null),j=c.useRef(null),_=c.useId(),k=l??`${_}-menu`,R=(N,y)=>{const S=document.activeElement;S!=null&&S.closest(".ok-popup")||(x.current=S),b({x:N,y}),m(!0)},M=N=>{var y;N&&((y=x.current)!=null&&y.isConnected)&&x.current.focus({preventScroll:!0}),m(!1)};ve(()=>{var N;(N=g.current)==null||N.call(g)},[h]);const C=()=>{j.current&&(clearTimeout(j.current.timer),j.current=null)};c.useEffect(()=>C,[]),c.useEffect(()=>{if(!f)return;const N=y=>{y.target instanceof Element&&y.target.closest(".ok-popup")||m(!1)};return window.addEventListener("scroll",N,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",N,{capture:!0})},[f,m]);const A=c.useMemo(()=>({open:f,close:()=>M(!0)}),[f,m]),E=vn(e,{"data-state":f?"open":"closed",className:"ok-context-area",onContextMenu:N=>{if(!o)if(N.preventDefault(),C(),N.clientX===0&&N.clientY===0){const y=N.target.getBoundingClientRect();R(y.left,y.bottom)}else R(N.clientX,N.clientY)},onPointerDown:N=>{if(o||N.pointerType!=="touch")return;C();const{clientX:y,clientY:S}=N;j.current={x:y,y:S,timer:setTimeout(()=>{j.current=null,R(y,S)},i)}},onPointerMove:N=>{const y=j.current;y&&Math.hypot(N.clientX-y.x,N.clientY-y.y)>fl&&C()},onPointerUp:C,onPointerCancel:C,onPointerLeave:C},w);return a.jsxs(xn.Provider,{value:A,children:[E,a.jsx(At,{open:f,anchorRef:v,placement:"bottom-start",offset:2,className:"ok-popup--menu",updateRef:g,onDismiss:N=>M(N==="escape"),children:a.jsx(kn,{...d,bare:!0,id:k,ref:u,focusOnOpen:f?"menu":null,children:n})})]})}),dn=t=>"options"in t,vt=t=>t.flatMap(e=>dn(e)?e.options:[e]),Rt=t=>t.textValue??(typeof t.label=="string"||typeof t.label=="number"?String(t.label):t.value);function Ct(t,e,n){const s=t.length;for(let r=1;r<=s;r++){const o=((e+n*r)%s+s)%s;if(!t[o].disabled)return o}return-1}const zt=t=>Ct(t,-1,1),Wn=t=>Ct(t,t.length,-1),hs=(t,e)=>`${t}-opt-${e}`,la=c.forwardRef(function({id:e,entries:n,activeIndex:s,onActiveChange:r,isSelected:o,onPick:i,multi:l,lockWidth:d,followActive:u,className:f,...m},h){const b=c.useRef(null),{hlRef:p,moveTo:v}=ls(),g=!ds(),w=vt(n).filter(k=>o(k.value)).map(k=>k.value),x=new Set(JSON.parse(cs(JSON.stringify(w),g)));ve(()=>{var R;const k=b.current;if(k){if(d){k.style.minWidth="",k.setAttribute("data-measuring","");const M=Math.ceil(k.getBoundingClientRect().width);k.removeAttribute("data-measuring"),M>0&&(k.style.minWidth=M+"px")}(R=k.querySelector('[aria-selected="true"]'))==null||R.scrollIntoView({block:"nearest"})}},[]),c.useEffect(()=>{var R;const k=s>=0?((R=b.current)==null?void 0:R.querySelector(`[data-index="${s}"]`))??null:null;v(k),k&&u&&k.scrollIntoView({block:"nearest"})},[s,u,v,n]);let j=-1;const _=k=>{j+=1;const R=j,M=x.has(k.value),C=k.tone&&k.tone!=="neutral"?k.tone:void 0;return a.jsxs("div",{role:"option",id:hs(e,R),className:L("ok-menu__item",C&&`ok-menu__item--${C}`),"data-index":R,"data-value":k.value,"data-icon":k.icon!=null&&k.icon!==!1?"":void 0,"data-tone":C,"data-active":R===s||void 0,"aria-selected":M,"aria-disabled":k.disabled||void 0,onPointerMove:()=>{const A=k.disabled?-1:R;A!==s&&r(A)},onClick:()=>{k.disabled||i(k)},children:[os(k.icon),a.jsx("span",{className:"ok-menu__label",children:k.label}),k.meta!=null&&a.jsx("span",{className:"ok-menu__meta",children:k.meta}),a.jsx(is,{})]},k.value)};return a.jsxs("div",{role:"listbox","aria-multiselectable":l||void 0,tabIndex:-1,...m,id:e,ref:xe(h,b),className:L("ok-menu ok-scroll",f),"data-check":l?void 0:"instant",onMouseDown:k=>k.preventDefault(),onPointerLeave:()=>r(-1),children:[a.jsx("span",{className:"ok-menu__hl",ref:p,"aria-hidden":"true"}),n.map((k,R)=>dn(k)?a.jsxs("div",{role:"group","aria-labelledby":`${e}-group-${R}`,children:[a.jsx("div",{className:"ok-menu__heading",id:`${e}-group-${R}`,role:"presentation",children:k.label}),k.options.map(_)]},`group-${R}`):_(k))]})}),ca=c.forwardRef(function({multi:e,selected:n,onPick:s,display:r,options:o,placeholder:i,size:l="md",block:d,disabled:u,required:f,invalid:m,name:h,form:b,open:p,defaultOpen:v=!1,onOpenChange:g,placement:w="bottom-start",id:x,className:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},C){const A=he().messages.select.placeholder,E=i===void 0?A:i,N=c.useContext(Le),y=we({id:x,disabled:u,required:f,invalid:m,"aria-describedby":R,"aria-labelledby":k,"aria-label":_}),{disabled:S,invalid:B}=y,D=d??!!N,[I,O]=le(p,v,g),[T,F]=c.useState(-1),[q,G]=c.useState(!1),V=c.useRef(null),K=`${c.useId()}-list`,P=c.useMemo(()=>vt(o),[o]),z=ra(),$=P.findIndex(H=>n.includes(H.value)&&!H.disabled),Y=H=>{F(H),G(H>=0),O(!0)},X=()=>O(!1),ee=H=>{H>=0&&(F(H),G(!0))},ie=H=>{s(H),e||X()},U=H=>{if(He(H)||S)return;const ae=H.key,de=sa(H)&&(ae!==" "||z.pending());if(!I){if(ae==="ArrowDown"||ae==="ArrowUp"||ae==="Enter"||ae===" ")H.preventDefault(),Y($>=0?$:ae==="ArrowUp"?Wn(P):zt(P));else if(de){H.preventDefault();const ne=z.search(ae,P.map(Rt),$);Y(ne>=0&&!P[ne].disabled?ne:$)}return}if(ae==="ArrowDown"||ae==="ArrowUp")H.preventDefault(),T<0&&$>=0?ee($):ee(ae==="ArrowDown"?Ct(P,T,1):Ct(P,T<0?P.length:T,-1));else if(ae==="Home"||ae==="PageUp")H.preventDefault(),ee(zt(P));else if(ae==="End"||ae==="PageDown")H.preventDefault(),ee(Wn(P));else if(de){H.preventDefault();const ne=z.search(ae,P.map(Rt),T);ne>=0&&!P[ne].disabled&&ee(ne)}else ae==="Enter"||ae===" "?(H.preventDefault(),T>=0&&P[T]&&!P[T].disabled?ie(P[T]):X()):ae==="Tab"&&X()};return a.jsxs("div",{...M,ref:C,className:L("ok-select",D&&"ok-select--block",j),"data-size":l,"data-disabled":S||void 0,children:[a.jsxs("button",{type:"button",ref:V,id:y.id,"data-label-focus":"",className:"ok-select__trigger ok-focusable",role:"combobox","aria-haspopup":"listbox","aria-expanded":I,"aria-controls":I?K:void 0,"aria-activedescendant":I&&T>=0?hs(K,T):void 0,"aria-label":_,"aria-labelledby":k,"aria-describedby":y.describedBy,"aria-invalid":B||void 0,"aria-required":y.required||void 0,disabled:S,"data-state":I?"open":"closed",onClick:()=>I?X():Y(-1),onKeyDown:U,onKeyUp:H=>{H.key===" "&&H.preventDefault()},children:[a.jsx("span",{className:"ok-select__value","data-placeholder":n.length?void 0:"",children:n.length?r:E}),a.jsx(pe,{name:"chevron-down"})]}),h&&(e?n.map(H=>a.jsx("input",{type:"hidden",name:h,value:H,form:b,disabled:S},H)):a.jsx("input",{type:"hidden",name:h,value:n[0]??"",form:b,disabled:S})),a.jsx(At,{open:I,anchorRef:V,placement:w,matchWidth:"min",className:"ok-popup--menu",onDismiss:X,children:a.jsx(la,{id:K,entries:o,activeIndex:T,onActiveChange:H=>{F(H),G(!1)},followActive:q,isSelected:H=>n.includes(H),onPick:ie,multi:e,lockWidth:!0,"aria-label":_,"aria-labelledby":k??(_||N==null?void 0:N.labelId)})})]})}),pl=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,...r},o){const[i,l]=le(e,n),d=ke(s),u=c.useMemo(()=>vt(r.options).find(f=>f.value===i),[r.options,i]);return a.jsx(ca,{...r,ref:o,multi:!1,selected:i==null?[]:[i],display:u?u.label:i,onPick:f=>{f.value!==i&&(l(f.value),d(f.value,f))}})}),ml=[],bl=c.forwardRef(function({value:e,defaultValue:n=ml,onChange:s,display:r="chips",maxChips:o=2,renderValue:i,...l},d){const{messages:u}=he(),[f,m]=le(e,n,s),h=c.useMemo(()=>{const p=vt(l.options);return f.map(v=>p.find(g=>g.value===v)).filter(Boolean)},[l.options,f]);let b;return i?b=i(h):r==="count"?b=u.select.count(f.length):b=a.jsxs("span",{className:"ok-select__chips",children:[h.slice(0,o).map(p=>a.jsx("span",{className:"ok-select__chip",children:p.label},p.value)),h.length>o&&a.jsxs("span",{className:"ok-select__chip ok-select__chip--more",children:["+",h.length-o]})]}),a.jsx(ca,{...l,ref:d,multi:!0,selected:f,display:b,onPick:p=>m(f.includes(p.value)?f.filter(v=>v!==p.value):[...f,p.value])})}),vl=(t,e)=>Rt(t).toLowerCase().includes(e.trim().toLowerCase()),da=c.forwardRef(function({options:e,value:n,defaultValue:s=null,onChange:r,inputValue:o,defaultInputValue:i,onInputChange:l,filter:d=vl,loading:u=!1,loadingText:f,emptyText:m,freeSolo:h=!1,clearable:b=!1,icon:p,size:v="md",invalid:g,name:w,form:x,disabled:j,required:_,open:k,defaultOpen:R=!1,onOpenChange:M,placement:C="bottom-start",className:A,style:E,rootRef:N,rootClassName:y,rootStyle:S,id:B,onKeyDown:D,onBlur:I,onClick:O,"aria-describedby":T,...F},q){const{messages:G}=he(),V=f===void 0?G.combobox.loading:f,Z=m===void 0?G.combobox.empty:m,K=c.useContext(Le),P=we({id:B,disabled:j,required:_,invalid:g,"aria-describedby":T}),{disabled:z,invalid:$}=P,Y=c.useMemo(()=>vt(e),[e]),X=re=>{if(re==null)return"";const be=Y.find(Re=>Re.value===re);return be?Rt(be):h?re:""},[ee,ie]=le(n,s),U=ke(r),[H,ae]=le(o??(h&&n!=null?n:void 0),i??X(s),l),[de,ne]=le(k,R,M),[oe,Q]=c.useState(-1),[J,W]=c.useState(!1),[ce,ue]=c.useState(!1),je=c.useRef(null),De=c.useRef(null),Ie=`${c.useId()}-list`,_e=(re,be)=>!d||!be||!re.trim()?e:e.map(Re=>dn(Re)?{...Re,options:Re.options.filter(at=>d(at,re))}:Re).filter(Re=>dn(Re)?Re.options.length>0:d(Re,re)),Ce=_e(H,ce),ge=vt(Ce),nt=(re,be)=>{re!==ee&&(ie(re),U(re,be))},st=(re,be)=>{Q(re),W(be),ne(!0)},Ye=()=>{ne(!1),Q(-1),ue(!1)},ct=re=>{ae(Rt(re)),nt(h?Rt(re):re.value,re),Ye()},rt=ge.findIndex(re=>re.value===ee&&!re.disabled),se=ge.map(re=>re.disabled?`${re.value}`:re.value).join("\0");c.useEffect(()=>{!de||!ce||u||(Q(zt(ge)),W(!0))},[se,u]);const te=re=>{if(D==null||D(re),re.defaultPrevented||z)return;const be=re.key;be==="ArrowDown"||be==="ArrowUp"?(re.preventDefault(),de?(W(!0),Q(be==="ArrowDown"?Ct(ge,oe,1):Ct(ge,oe<0?ge.length:oe,-1))):st(rt>=0?rt:be==="ArrowDown"?zt(ge):Wn(ge),!0)):be==="Enter"?de&&oe>=0&&ge[oe]&&!ge[oe].disabled?(re.preventDefault(),ct(ge[oe])):de&&Ye():be==="Tab"&&de&&Ye()},me=u||ge.length>0||Z!=null,fe=de&&me&&!z;return a.jsxs("div",{ref:xe(N,je),className:L("ok-input ok-combobox",v==="lg"&&"ok-input--lg",H&&b&&"has-value",y,A),style:{...S,...E},"data-size":v,"data-disabled":z||void 0,"data-invalid":$||void 0,onClick:re=>{var be;re.target===re.currentTarget&&((be=De.current)==null||be.focus())},children:[p!=null&&a.jsx("span",{className:"ok-input__icon ok-combobox__icon",children:os(p)}),a.jsx("input",{type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,...F,onKeyDownCapture:re=>{var be;He(re)||(be=F.onKeyDownCapture)==null||be.call(F,re)},ref:xe(q,De),id:P.id,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":fe,"aria-controls":fe?Ie:void 0,"aria-activedescendant":fe&&oe>=0?hs(Ie,oe):void 0,"aria-invalid":$||void 0,"aria-describedby":P.describedBy,"aria-busy":u||void 0,disabled:z,required:P.required||void 0,name:h?w:void 0,form:h?x:void 0,value:H,onChange:re=>{const be=re.target.value;ae(be),ue(!0),h?nt(be):be===""&&ee!=null&&nt(null),st(zt(vt(_e(be,!0))),!0)},onClick:re=>{O==null||O(re),de||st(-1,!1)},onKeyDown:te,onBlur:re=>{I==null||I(re),de&&Ye(),!h&&H!==X(ee)&&ae(X(ee))}}),b&&a.jsx("button",{type:"button",className:"ok-input__clear","aria-label":G.common.clear,tabIndex:-1,disabled:z||!H,onMouseDown:re=>re.preventDefault(),onClick:()=>{var re;ae(""),nt(h?"":null),(re=De.current)==null||re.focus()},children:a.jsx(pe,{name:"x"})}),w&&!h&&a.jsx("input",{type:"hidden",name:w,form:x,value:ee??"",disabled:z}),a.jsxs(At,{open:fe,anchorRef:je,placement:C,matchWidth:"min",className:"ok-popup--menu",onDismiss:Ye,onMouseDown:re=>re.preventDefault(),children:[u&&a.jsx("div",{className:"ok-menu__empty",role:"status",children:V}),!u&&ge.length===0&&a.jsx("div",{className:"ok-menu__empty",role:"status",children:Z}),a.jsx(la,{id:Ie,entries:Ce,hidden:ge.length===0,activeIndex:oe,onActiveChange:re=>{Q(re),W(!1)},followActive:J,isSelected:re=>!h&&re===ee,onPick:ct,"aria-label":F["aria-label"]??G.combobox.listbox,"aria-labelledby":F["aria-labelledby"]??(F["aria-label"]||K==null?void 0:K.labelId)})]})]})}),gl=c.forwardRef(function(e,n){return a.jsx(da,{...e,ref:n,freeSolo:!0})}),Qe=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),Xe=(t,e)=>new Date(t.getFullYear(),t.getMonth(),t.getDate()+e);function Ot(t,e){const n=new Date(t.getFullYear(),t.getMonth()+e,1),s=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return new Date(n.getFullYear(),n.getMonth(),Math.min(t.getDate(),s))}const Fe=(t,e)=>!!t&&!!e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),Bt=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),In=(t,e=2)=>String(t).padStart(e,"0"),Ge=t=>`${In(t.getFullYear(),4)}-${In(t.getMonth()+1)}-${In(t.getDate())}`;function ps(t){const e=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*[-/.月]\s*(\d{1,2})\s*日?\s*$/.exec(t);if(!e)return null;const[n,s,r]=[Number(e[1]),Number(e[2]),Number(e[3])],o=new Date(n,s-1,r);return o.setFullYear(n),o.getFullYear()===n&&o.getMonth()===s-1&&o.getDate()===r?o:null}const ua=c.forwardRef(function({anchorDate:e,isSelected:n,rangePart:s,onPick:r,onHoverDate:o,onFocusDate:i,multiselectable:l,month:d,defaultMonth:u,onMonthChange:f,min:m,max:h,isDateDisabled:b,weekStartsOn:p=1,locale:v,today:g,autoFocus:w,disabled:x,className:j,"aria-label":_,...k},R){const{locale:M,messages:C}=he(),A=v??M,E=c.useMemo(()=>Qe(g??new Date),[g]),N=c.useMemo(()=>m?Qe(m):null,[m]),y=c.useMemo(()=>h?Qe(h):null,[h]),S=Q=>N&&Q<N?N:y&&Q>y?y:Q,B=Q=>!!x||!!N&&Q<N||!!y&&Q>y||!!(b!=null&&b(Q)),D=S(Qe(e??u??d??E)),[I,O]=c.useState(D),[T,F]=le(d,u??D,f),q=new Date(T.getFullYear(),T.getMonth(),1),G=c.useRef(null),V=c.useRef(!!w),Z=c.useId(),K=e?Ge(e):"";c.useEffect(()=>{if(!e)return;const Q=Qe(e);O(Q),Bt(Q,T)||F(Q)},[K]);const P=Bt(I,q)?I:q,z=Ge(P);c.useEffect(()=>{var Q,J;V.current&&(V.current=!1,(J=(Q=G.current)==null?void 0:Q.querySelector(`[data-date="${z}"]`))==null||J.focus({preventScroll:!0}))});const $=Q=>{const J=S(Q);V.current=!0,O(J),Bt(J,q)||F(J)},Y=Q=>{const J=Ot(q,Q);F(J),O(S(Ot(P,Q)))},X=Q=>{const J=Q.target.closest("[data-date]");if(!J)return;const W=ps(J.dataset.date),ce=(W.getDay()-p+7)%7;let ue=null;switch(Q.key){case"ArrowLeft":ue=Xe(W,-1);break;case"ArrowRight":ue=Xe(W,1);break;case"ArrowUp":ue=Xe(W,-7);break;case"ArrowDown":ue=Xe(W,7);break;case"Home":ue=Xe(W,-ce);break;case"End":ue=Xe(W,6-ce);break;case"PageUp":ue=Ot(W,Q.shiftKey?-12:-1);break;case"PageDown":ue=Ot(W,Q.shiftKey?12:1);break;default:return}Q.preventDefault(),$(ue)},ee=c.useMemo(()=>new Intl.DateTimeFormat(A,{year:"numeric",month:"long"}),[A]),ie=c.useMemo(()=>new Intl.DateTimeFormat(A,{dateStyle:"full"}),[A]),U=c.useMemo(()=>{const Q=new Intl.DateTimeFormat(A,{weekday:"narrow"}),J=new Intl.DateTimeFormat(A,{weekday:"long"});return Array.from({length:7},(W,ce)=>{const ue=new Date(2023,0,1+(ce+p)%7);return{short:Q.format(ue),long:J.format(ue)}})},[A,p]),H=(q.getDay()-p+7)%7,ae=Xe(q,-H),de=Array.from({length:6},(Q,J)=>Array.from({length:7},(W,ce)=>Xe(ae,J*7+ce))),ne=!!N&&Xe(q,-1)<N,oe=!!y&&Ot(q,1)>y;return a.jsxs("div",{...k,ref:xe(R,G),className:L("ok-calendar",j),"data-disabled":x||void 0,children:[a.jsxs("div",{className:"ok-calendar__head",children:[a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":C.calendar.prevMonth,disabled:x||ne,onClick:()=>Y(-1),children:a.jsx(pe,{children:a.jsx("path",{d:"M12.5 4.5L7 10l5.500 5.500"})})}),a.jsx("div",{className:"ok-calendar__title",id:`${Z}-title`,"aria-live":"polite",children:ee.format(q)}),a.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":C.calendar.nextMonth,disabled:x||oe,onClick:()=>Y(1),children:a.jsx(pe,{name:"chevron-right"})})]}),a.jsxs("table",{role:"grid",className:"ok-calendar__grid","aria-label":_,"aria-labelledby":_?void 0:`${Z}-title`,"aria-multiselectable":l||void 0,onKeyDown:X,onPointerLeave:()=>o==null?void 0:o(null),children:[a.jsx("thead",{children:a.jsx("tr",{children:U.map(Q=>a.jsxs("th",{scope:"col",abbr:Q.long,children:[a.jsx("span",{"aria-hidden":"true",children:Q.short}),a.jsx("span",{className:"ok-sr",children:Q.long})]},Q.long))})}),a.jsx("tbody",{children:de.map(Q=>a.jsx("tr",{children:Q.map(J=>{const W=Ge(J),ce=B(J),ue=n(J),je=s==null?void 0:s(J);return a.jsx("td",{role:"gridcell","aria-selected":ue,"aria-disabled":ce||void 0,"data-range":je,children:a.jsx("button",{type:"button",className:"ok-calendar__day ok-focusable",tabIndex:W===z?0:-1,"data-date":W,"data-autofocus":w&&W===z?"":void 0,"data-outside":Bt(J,q)?void 0:"","data-today":Fe(J,E)?"":void 0,"data-selected":ue?"":void 0,"aria-label":ie.format(J)+(Fe(J,E)?C.calendar.todaySuffix:""),"aria-current":Fe(J,E)?"date":void 0,"aria-pressed":ue,"aria-disabled":ce||void 0,onFocus:()=>{O(J),i==null||i(J)},onPointerEnter:()=>o==null?void 0:o(J),onClick:()=>{ce||(O(J),Bt(J,q)||(V.current=!0,F(J)),r(J))},children:J.getDate()})},W)})},Ge(Q[0])))})]})]})}),fa=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,...r},o){const[i,l]=le(e,n,s);return a.jsx(ua,{...r,ref:o,anchorDate:i,isSelected:d=>Fe(d,i),onPick:d=>l(d)})}),xl={start:null,end:null},ha=c.forwardRef(function({value:e,defaultValue:n=xl,onChange:s,...r},o){const[i,l]=le(e,n,s),[d,u]=c.useState(null),[f,m]=c.useState(null),{start:h,end:b}=i,p=d??f,v=b??(h&&p?p:null),g=h&&v?h<=v?h:v:h,w=h&&v&&h<=v?v:h;return a.jsx(ua,{...r,ref:o,multiselectable:!0,anchorDate:h,isSelected:x=>Fe(x,h)||Fe(x,b)||!!h&&!!b&&x>h&&x<b,rangePart:x=>{if(!(!g||!w))return Fe(g,w)?Fe(x,g)?"single":void 0:Fe(x,g)?"start":Fe(x,w)?"end":x>g&&x<w?"in":void 0},onHoverDate:u,onFocusDate:x=>{u(null),m(x)},onPick:x=>{l(!h||b?{start:x,end:null}:x<h?{start:x,end:h}:{start:h,end:x})}})});function Us(t,e){const n=e(t);if(n)return new Date(n.getFullYear(),n.getMonth(),1);const s=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*([-/.月])?\s*$/.exec(t);if(!s)return null;const[,r,o,i]=s;if(o.length===1&&!i&&(o==="0"||o==="1"))return null;const l=Number(o);return l>=1&&l<=12?new Date(Number(r),l-1,1):null}const kl=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),pa=()=>a.jsxs(pe,{children:[a.jsx("rect",{x:"3.500",y:"4.500",width:"13",height:"12",rx:"2.500"}),a.jsx("path",{d:"M3.500 8.500h13M7 3v3M13 3v3"})]}),yl=c.forwardRef(function({value:e,defaultValue:n=null,onChange:s,parse:r=ps,format:o=Ge,min:i,max:l,isDateDisabled:d,weekStartsOn:u,locale:f,today:m,size:h="md",invalid:b,name:p,form:v,disabled:g,required:w,readOnly:x,open:j,defaultOpen:_=!1,onOpenChange:k,placement:R="bottom-start",className:M,style:C,placeholder:A,id:E,onBlur:N,onKeyDown:y,"aria-describedby":S,...B},D){const{messages:I}=he(),O=A??I.datePicker.placeholder,T=we({id:E,disabled:g,required:w,invalid:b,"aria-describedby":S}),{disabled:F,invalid:q}=T,[G,V]=le(e,n,s),[Z,K]=le(j,_,k),[P,z]=c.useState(G?o(G):""),$=c.useRef(null),Y=c.useRef(null),X=`${c.useId()}-calendar`,[ee,ie]=c.useState(!1),[U,H]=c.useState(()=>Qe(G??m??new Date));c.useEffect(()=>{if(!Z)return;const W=Us(P,r);H(Qe(W??G??m??new Date))},[Z]),c.useEffect(()=>{Z||ie(!1)},[Z]);const ae=()=>{Z||F||x||(ie(!0),K(!0))},de=W=>{z(W);const ce=Us(W,r);ce&&!kl(ce,U)&&H(ce)},ne=G?Ge(G):"";c.useEffect(()=>{z(G?o(G):"")},[ne]);const oe=W=>!(i&&W<Qe(i))&&!(l&&W>Qe(l))&&!(d!=null&&d(W)),Q=(()=>{if(P.trim()==="")return null;const W=r(P);return W&&oe(W)?W:G&&P===o(G)?G:null})(),J=()=>{if(P.trim()===""){G&&V(null);return}const W=r(P);W&&oe(W)?Fe(W,G)?z(o(W)):V(W):z(G?o(G):"")};return a.jsxs("div",{ref:xe(D,$),className:L("ok-input ok-datepicker",h==="lg"&&"ok-input--lg",M),style:C,"data-size":h,"data-disabled":F||void 0,"data-invalid":q||void 0,children:[a.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"off",...B,id:T.id,placeholder:O,disabled:F,readOnly:x,required:T.required||void 0,"aria-invalid":q||void 0,"aria-describedby":T.describedBy,ref:Y,"aria-haspopup":"dialog","aria-expanded":Z,"aria-controls":Z?X:void 0,value:P,onChange:W=>de(W.target.value),onClick:ae,onBlur:W=>{var ue,je;N==null||N(W),J();const ce=W.relatedTarget;Z&&ee&&!(ce&&((ue=$.current)!=null&&ue.contains(ce)||(je=document.getElementById(X))!=null&&je.contains(ce)))&&K(!1)},onKeyDown:W=>{var ce,ue;y==null||y(W),!W.defaultPrevented&&(W.key==="Enter"?(J(),Z&&ee&&K(!1)):W.key==="Escape"&&Z?(W.preventDefault(),K(!1)):W.key==="ArrowDown"&&W.altKey&&!F&&!x?(W.preventDefault(),ie(!1),K(!0)):W.key==="ArrowDown"&&Z&&(W.preventDefault(),(ue=(ce=document.getElementById(X))==null?void 0:ce.querySelector('.ok-calendar__day[tabindex="0"]'))==null||ue.focus()))}}),p&&a.jsx("input",{type:"hidden",name:p,form:v,value:ne,disabled:F}),a.jsx(us,{id:X,open:Z,onOpenChange:W=>{W&&ie(!1),K(W)},autoFocus:!ee,anchorRef:$,placement:R,"aria-label":I.datePicker.dialog,className:"ok-popover--calendar",trigger:a.jsx("button",{type:"button",className:"ok-datepicker__btn ok-focusable","aria-label":I.datePicker.open,disabled:F||x,children:a.jsx(pa,{})}),children:({close:W})=>a.jsx(fa,{autoFocus:!ee,value:Q,month:U,onMonthChange:H,onChange:ce=>{var ue;V(ce),ee?(K(!1),(ue=Y.current)==null||ue.focus()):W()},min:i,max:l,isDateDisabled:d,weekStartsOn:u,locale:f,today:m})})]})}),wl={start:null,end:null},_l=c.forwardRef(function({value:e,defaultValue:n=wl,onChange:s,placeholder:r,startName:o,endName:i,form:l,separator:d=" – ",format:u=Ge,min:f,max:m,isDateDisabled:h,weekStartsOn:b,locale:p,today:v,size:g="md",invalid:w,disabled:x,required:j,open:_,defaultOpen:k=!1,onOpenChange:R,placement:M="bottom-start",className:C,id:A,"aria-label":E,"aria-labelledby":N,"aria-describedby":y,...S},B){const{messages:D}=he(),I=r===void 0?D.datePicker.rangePlaceholder:r,O=c.useContext(Le),T=we({id:A,disabled:x,required:j,invalid:w,"aria-describedby":y,"aria-labelledby":N,"aria-label":E}),{disabled:F,invalid:q}=T,[G,V]=le(e,n,s),[Z,K]=le(_,k,R),[P,z]=c.useState(null);c.useEffect(()=>{Z||z(null)},[Z]);const{start:$,end:Y}=G,X=Z&&P||G,ee=X.start?`${u(X.start)}${d}${X.end?u(X.end):"…"}`:null,ie=c.useRef(null),U=`${c.useId()}-value`,[H,ae]=c.useState(!1);c.useEffect(()=>{var oe,Q;ae(!!((Q=(oe=ie.current)==null?void 0:oe.labels)!=null&&Q.length))});const ne=[(!!E||!!N||!!(O!=null&&O.labelId)||H)&&U,T.describedBy].filter(Boolean).join(" ")||void 0;return a.jsxs(a.Fragment,{children:[a.jsx(us,{open:Z,onOpenChange:K,placement:M,"aria-label":D.datePicker.rangeDialog,className:"ok-popover--calendar",trigger:a.jsxs("button",{type:"button",...S,ref:xe(B,ie),id:T.id,className:L("ok-input ok-daterange ok-focusable",g==="lg"&&"ok-input--lg",C),"data-size":g,"data-label-focus":"","data-invalid":q||void 0,"aria-label":E,"aria-labelledby":N,"aria-describedby":ne,"aria-invalid":q||void 0,"aria-required":T.required||void 0,disabled:F,children:[a.jsx("span",{className:"ok-daterange__value",id:U,"data-placeholder":ee?void 0:"",children:ee??I}),a.jsx(pa,{})]}),children:({close:oe})=>a.jsx(ha,{autoFocus:!0,value:P??G,onChange:Q=>{Q.start&&Q.end?(z(null),V(Q),oe()):z(Q)},min:f,max:m,isDateDisabled:h,weekStartsOn:b,locale:p,today:v})}),o&&a.jsx("input",{type:"hidden",name:o,form:l,value:$?Ge($):"",disabled:F}),i&&a.jsx("input",{type:"hidden",name:i,form:l,value:Y?Ge(Y):"",disabled:F})]})}),jl=c.forwardRef(function({variant:e="body",as:n="span",tone:s="default",truncate:r,lineClamp:o,align:i,className:l,style:d,...u},f){const m=n,h=o&&o>0?{"--ok-clamp":o}:void 0;return a.jsx(m,{ref:f,className:L("ok-text",`ok-t-${e}`,l),"data-tone":s==="default"?void 0:s,"data-truncate":r?"":void 0,"data-clamp":h?"":void 0,"data-align":i,style:h?{...h,...d}:d,...u})}),Nl=c.forwardRef(function({level:e=2,variant:n,tone:s="default",truncate:r,align:o,className:i,...l},d){const u=`h${e}`;return a.jsx(u,{ref:d,className:L("ok-text ok-heading",`ok-t-${n??`h${e}`}`,i),"data-tone":s==="default"?void 0:s,"data-truncate":r?"":void 0,"data-align":o,...l})}),Ml=c.forwardRef(function({as:e="div",size:n="md",className:s,...r},o){const i=e;return a.jsx(i,{ref:o,className:L("ok-panel",n!=="md"&&`ok-panel--${n}`,s),...r})}),Rl=t=>t===void 0?void 0:typeof t=="number"?String(t):t,ma=c.forwardRef(function({src:e,alt:n,ratio:s,fit:r="cover",radius:o=3,fallback:i,placeholder:l="skeleton",loading:d="lazy",children:u,className:f,style:m,onLoad:h,onError:b,decoding:p="async",...v},g){const w=c.useRef(null),[x,j]=c.useState({src:e,status:"loading"}),_=u!=null&&u!==!1;let k;e?k=x.src===e?x.status:"loading":k=_?"content":"empty",c.useEffect(()=>{const N=w.current;e&&N&&N.complete&&N.naturalWidth>0&&j({src:e,status:"loaded"})},[e]);const R=N=>{j({src:e,status:"loaded"}),h==null||h(N)},M=N=>{j({src:e,status:"error"}),b==null||b(N)},A=k==="content"||k==="error"||k==="empty"?n?{role:"img","aria-label":n}:{"aria-hidden":!0}:null,E=Rl(s);return a.jsxs("span",{ref:g,className:L("ok-image",f),"data-status":k,"data-fit":r,"data-radius":o,"data-placeholder":l,"data-ratio":E!==void 0?"":void 0,style:E!==void 0?{aspectRatio:E,...m}:m,...A,children:[e&&k!=="error"&&a.jsx("img",{...v,ref:w,className:"ok-image__img",src:e,alt:n,loading:d,decoding:p,onLoad:R,onError:M}),(k==="error"||k==="empty")&&a.jsx("span",{className:"ok-image__fallback",children:i??a.jsx(pe,{name:"image",className:"ok-image__icon"})}),_&&a.jsx("span",{className:e?"ok-image__overlay":"ok-image__content",children:u})]})}),Sl=c.forwardRef(function({as:e="div",size:n="md",href:s,target:r,rel:o,interactive:i,disabled:l,chevron:d,className:u,children:f,...m},h){const b=s!==void 0,p=!b&&!!i,v=b?"a":p?"button":e,g=p?"span":"div",w=b?{href:s,target:r,rel:o}:p?{type:"button",disabled:l}:null;return a.jsx(v,{ref:h,className:L("ok-card",n!=="md"&&`ok-card--${n}`,(b||p)&&"ok-card--interactive ok-focusable",d&&"ok-card--chev",u),...w,...m,children:d?a.jsxs(a.Fragment,{children:[a.jsx(g,{className:"ok-card__main",children:f}),a.jsx(pe,{name:"chevron-right",className:"ok-card__chev"})]}):f})}),Cl=c.forwardRef(function({href:e,className:n,...s},r){const o=e!==void 0?"a":"button",i=e!==void 0?{href:e}:{type:"button"};return a.jsx(o,{ref:r,className:L("ok-card__link",n),...i,...s})}),El=c.forwardRef(function({title:e,description:n,titleAs:s="h3",titleId:r,actions:o,className:i,children:l,...d},u){return a.jsxs("div",{ref:u,className:L("ok-card__header",i),...d,children:[a.jsxs("div",{className:"ok-card__heading",children:[e!=null&&a.jsx(s,{id:r,className:"ok-card__title",children:e}),n!=null&&a.jsx("p",{className:"ok-card__desc",children:n}),l]}),o!=null&&a.jsx("div",{className:"ok-card__actions",children:o})]})}),Al=c.forwardRef(function({className:e,...n},s){return a.jsx("div",{ref:s,className:L("ok-card__body",e),...n})}),Tl=c.forwardRef(function({align:e="start",className:n,...s},r){return a.jsx("div",{ref:r,className:L("ok-card__footer",n),"data-align":e,...s})}),$l=c.forwardRef(function({ratio:e=16/9,position:n="top",className:s,...r},o){return a.jsx(ma,{ref:o,ratio:e,radius:0,className:L("ok-card__media",n==="start"&&"ok-card__media--start",s),...r})}),Pl=c.forwardRef(function({as:e="div",compact:n,className:s,...r},o){const i=e;return a.jsx(i,{ref:o,className:L("ok-group",n&&"ok-group--compact",s),...r})}),Il=c.forwardRef(function({as:e="div",label:n,description:s,leading:r,stack:o,controlWidth:i="auto",href:l,target:d,rel:u,interactive:f,disabled:m,className:h,children:b,...p},v){const g=l!==void 0,w=!g&&!!f,x=g||w,j=g?"a":w?"button":e,_=g?{href:l,target:d,rel:u}:w?{type:"button",disabled:m}:null,k=n!=null||s!=null,R=!x&&i!=="auto"&&b!=null,M=R&&i==="fill",C=R&&!M,A=R?a.jsx("span",{className:"ok-row__control",style:C?{"--_cw":typeof i=="number"?`${i}px`:i}:void 0,children:b}):b;return a.jsxs(j,{ref:v,className:L("ok-row",o===!0&&"ok-row--stack",o==="auto"&&"ok-row--wrap",M&&"ok-row--fill",C&&"ok-row--fixed",x&&"ok-row--link ok-focusable",h),..._,...p,children:[r!=null&&a.jsx("span",{className:"ok-row__leading",children:r}),k&&a.jsxs("span",{className:"ok-row__text",children:[n!=null&&a.jsx("span",{className:"ok-row__label",children:n}),s!=null&&a.jsx("span",{className:"ok-row__desc",children:s})]}),x&&b!=null?a.jsx("span",{className:"ok-row__value",children:b}):A,x&&a.jsx(pe,{name:"chevron-right",className:"ok-row__chev"})]})}),Ll=c.forwardRef(function({as:e,marker:n="none",divided:s,size:r="md",className:o,...i},l){const d=e??(n==="number"?"ol":"ul");return a.jsx(d,{ref:l,role:"list",className:L("ok-list",r!=="md"&&`ok-list--${r}`,o),"data-marker":n,"data-divided":s?"":void 0,...i})}),Dl=c.forwardRef(function({leading:e,trailing:n,title:s,description:r,className:o,children:i,...l},d){return a.jsxs("li",{ref:d,className:L("ok-list__item",o),...l,children:[e!=null&&a.jsx("span",{className:"ok-list__leading",children:e}),a.jsxs("div",{className:"ok-list__content",children:[s!=null&&a.jsx("span",{className:"ok-list__title",children:s}),r!=null&&a.jsx("span",{className:"ok-list__desc",children:r}),i]}),n!=null&&a.jsx("span",{className:"ok-list__trailing",children:n})]})}),Ol=c.forwardRef(function({items:e,layout:n="auto",divided:s,className:r,children:o,...i},l){return a.jsxs("dl",{ref:l,className:L("ok-dl",r),"data-layout":n,"data-divided":s?"":void 0,...i,children:[e==null?void 0:e.map((d,u)=>a.jsx(ba,{term:d.term,children:d.description},d.key??u)),o]})}),ba=c.forwardRef(function({term:e,className:n,children:s,...r},o){return a.jsxs("div",{ref:o,className:L("ok-dl__item",n),...r,children:[a.jsx("dt",{className:"ok-dl__term",children:e}),a.jsx("dd",{className:"ok-dl__desc",children:s})]})});function va(t,e,n=1,s=1){const r=s*2+n*2+3;if(t<=r)return Array.from({length:t},(h,b)=>b+1);const o=Math.max(e-n,s+2),i=Math.min(e+n,t-s-1),l=o>s+2,d=i<t-s-1,u=(h,b)=>Array.from({length:Math.max(0,b-h+1)},(p,v)=>h+v),f=u(1,s),m=u(t-s+1,t);return!l&&d?[...u(1,s+n*2+2),0,...m]:l&&!d?[...f,0,...u(t-s-n*2-1,t)]:[...f,0,...u(o,i),0,...m]}const ga=c.forwardRef(function({count:e,page:n,defaultPage:s=1,onChange:r,siblings:o=1,boundaries:i=1,label:l,size:d="md",disabled:u,className:f,...m},h){const{messages:b}=he(),p=l??b.pagination.label,v=Math.max(1,Math.floor(e)),[g,w]=le(n,s,r),x=ye(g,1,v),j=k=>{u||w(ye(k,1,v))},_=va(v,x,o,i);return a.jsxs("nav",{ref:h,"aria-label":p,className:L("ok-pagination",d==="sm"&&"ok-pagination--sm",f),...m,children:[a.jsxs("ul",{className:"ok-pagination__list",children:[a.jsx("li",{children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":b.pagination.prev,disabled:u||x<=1,onClick:()=>j(x-1),children:a.jsx(pe,{children:a.jsx("path",{d:"M12.500 4.500L7 10l5.500 5.500"})})})}),_.map((k,R)=>k===0?a.jsx("li",{className:"ok-pagination__gap","aria-hidden":"true",children:"…"},`gap-${R}`):a.jsx("li",{className:"ok-pagination__page",children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-focusable","aria-label":b.pagination.page(k),"aria-current":k===x?"page":void 0,disabled:u,onClick:()=>j(k),children:k})},k)),a.jsxs("li",{className:"ok-pagination__status","aria-hidden":"true",children:[x," / ",v]}),a.jsx("li",{children:a.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":b.pagination.next,disabled:u||x>=v,onClick:()=>j(x+1),children:a.jsx(pe,{name:"chevron-right"})})})]}),a.jsx("span",{className:"ok-sr",role:"status",children:b.pagination.status(x,v)})]})}),Ys=a.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:a.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.9-6.4",pathLength:1})}),sn=(t,e)=>t.accessor?t.accessor(e):e[t.key],Bl=t=>t.label??(typeof t.header=="string"?t.header:t.key);function Fl(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0})}function zl({columns:t,data:e,rowKey:n,label:s,caption:r,sort:o,defaultSort:i=null,onSortChange:l,manualSort:d,selectable:u,selectedKeys:f,defaultSelectedKeys:m,onSelectionChange:h,getRowLabel:b,scroll:p,maxHeight:v,stackOnMobile:g,empty:w,noHighlight:x,rowAction:j,pageSize:_,page:k,defaultPage:R=1,onPageChange:M,className:C,style:A,onScroll:E,...N},y){const{messages:S}=he(),B=w===void 0?S.table.empty:w,D=c.useId(),I=c.useRef(null),O=c.useRef(null),T=c.useRef(null),[F,q]=le(o,i,l),[G,V]=le(f,m??[],h),[Z,K]=c.useState(!1),P=(se,te)=>typeof n=="function"?n(se,te):n!=null?String(se[n]):String(te),z=c.useMemo(()=>{const se=e.map((re,be)=>({row:re,index:be})),te=F&&t.find(re=>re.key===F.key);if(!F||!te||d)return se;const me=F.direction==="desc"?-1:1,fe=te.compare??((re,be)=>Fl(sn(te,re),sn(te,be)));return se.sort((re,be)=>me*fe(re.row,be.row)||re.index-be.index)},[e,t,F,d]),$=_!=null&&_>0,Y=$?Math.max(1,Math.floor(_)):0,X=$?Math.max(1,Math.ceil(z.length/Y)):1,[ee,ie]=le(k,R,M),U=ye(ee,1,X),H=c.useMemo(()=>$?z.slice((U-1)*Y,U*Y):z,[z,$,U,Y]),ae=H.map(se=>P(se.row,se.index)),de=new Set(G),ne=ae.filter(se=>de.has(se)).length,oe=ae.length>0&&ne===ae.length,Q=ne>0&&!oe;ve(()=>{T.current&&(T.current.indeterminate=Q)},[Q]),c.useEffect(()=>{const se=I.current,te=O.current;if(!se||!te||typeof ResizeObserver>"u")return;const me=()=>K(se.scrollWidth>se.clientWidth+1);me();const fe=new ResizeObserver(me);return fe.observe(se),fe.observe(te),()=>fe.disconnect()},[]);const J=c.useRef({cur:null,x:0,y:0,top:0,calm:void 0}),W=se=>{const te=O.current,me=J.current;if(!te||se===me.cur)return;if(me.cur=se,!se){delete te.dataset.hl;return}const fe=()=>{const re=se.getBoundingClientRect();te.style.setProperty("--hl-y",(re.top-te.getBoundingClientRect().top).toFixed(2)+"px"),te.style.setProperty("--hl-h",re.height.toFixed(2)+"px")};te.dataset.hl!==void 0?fe():(te.dataset.noAnim="",fe(),te.offsetWidth,delete te.dataset.noAnim,te.dataset.hl="")},ce=se=>{var me,fe;const te=(me=se==null?void 0:se.closest)==null?void 0:me.call(se,"tr");return te&&((fe=te.parentElement)==null?void 0:fe.tagName)==="TBODY"&&!te.hasAttribute("data-empty")?te:null},ue=se=>{if(se.pointerType==="touch")return;J.current.x=se.clientX,J.current.y=se.clientY;const te=ce(se.target);te&&W(te)},je=se=>{const te=se.currentTarget,me=O.current,fe=J.current;me&&(te.scrollTop!==fe.top&&(fe.top=te.scrollTop,me.dataset.jumping="",clearTimeout(fe.calm),fe.calm=setTimeout(()=>{delete me.dataset.jumping},140)),!(!fe.cur||typeof document.elementFromPoint!="function")&&W(ce(document.elementFromPoint(fe.x,fe.y))))};c.useEffect(()=>()=>clearTimeout(J.current.calm),[]),ve(()=>{W(null)},[H]);const De=se=>{!F||F.key!==se?q({key:se,direction:"asc"}):F.direction==="asc"?q({key:se,direction:"desc"}):q(null),$&&ie(1)},kt=()=>{V(oe?G.filter(se=>!ae.includes(se)):Array.from(new Set([...G,...ae])))},Ie=se=>V(de.has(se)?G.filter(te=>te!==se):[...G,se]),_e=p||Z,Ce=s??(typeof r=="string"?r:void 0),ge=se=>g?{role:se}:null,nt=t.length+(u?1:0),st=se=>L(se.numeric&&"is-num",se.align&&`ok-table__cell--${se.align}`)||void 0,Ye=t.some(se=>se.hideBelow),ct=v!=null?{"--ok-table-h":typeof v=="number"?`${v}px`:v}:void 0,rt=a.jsxs("div",{ref:xe(y,I),className:L("ok-table",p&&"ok-table--scroll ok-scroll",g&&"ok-table--stack",C),"data-ready":x?void 0:"","data-responsive":Ye?"":void 0,style:ct?{...ct,...A}:A,..._e?{role:"region",tabIndex:0,"aria-label":Ce??S.table.label}:null,onScroll:Ut(E,x?void 0:je),...N,children:[a.jsxs("table",{ref:O,"aria-label":r==null?Ce:void 0,...ge("table"),children:[r!=null&&a.jsx("caption",{className:"ok-table__caption",children:r}),a.jsx("thead",{...ge("rowgroup"),children:a.jsxs("tr",{...ge("row"),children:[u&&a.jsx("th",{className:"ok-table__select",scope:"col",...ge("columnheader"),children:a.jsxs("label",{className:"ok-check",children:[a.jsx("input",{ref:T,type:"checkbox",checked:oe,onChange:kt,disabled:ae.length===0,"aria-label":S.table.selectAll}),a.jsx("span",{className:"ok-check__box",children:Ys})]})}),t.map(se=>{const te=F&&F.key===se.key?F.direction:null;return a.jsx("th",{scope:"col",className:st(se),"data-hide-below":se.hideBelow,style:se.width!=null?{width:se.width}:void 0,"aria-sort":se.sortable?te==="asc"?"ascending":te==="desc"?"descending":"none":void 0,...ge("columnheader"),children:se.sortable?a.jsxs("button",{type:"button",className:"ok-table__sort ok-focusable","data-dir":te??void 0,onClick:()=>De(se.key),children:[se.header,a.jsx(pe,{className:"ok-table__sort-icon",children:a.jsx("path",{d:"M10 15.500v-11M5.500 9L10 4.500 14.500 9"})})]}):se.header},se.key)})]})}),a.jsxs("tbody",{onPointerMove:x?void 0:ue,onPointerLeave:x?void 0:()=>W(null),...ge("rowgroup"),children:[H.length===0&&a.jsx("tr",{"data-empty":"",...ge("row"),children:a.jsx("td",{className:"ok-table__empty",colSpan:nt,...ge("cell"),children:B})}),H.map(({row:se,index:te},me)=>{const fe=ae[me],re=de.has(fe),be=t[0]?sn(t[0],se):void 0,Re=b?b(se,te):typeof be=="string"||typeof be=="number"?String(be):S.table.row(me+1),at=(j==null?void 0:j(se,te))??null;return a.jsxs("tr",{"data-selected":u&&re?"":void 0,"data-action":at?"":void 0,"aria-selected":u?re:void 0,...ge("row"),children:[u&&a.jsx("td",{className:"ok-table__select","data-label":S.table.selectColumn,...ge("cell"),children:a.jsxs("label",{className:"ok-check",children:[a.jsx("input",{type:"checkbox",checked:re,onChange:()=>Ie(fe),"aria-label":S.table.selectRow(Re)}),a.jsx("span",{className:"ok-check__box",children:Ys})]})}),t.map((Ke,dt)=>{const Tt=Ke.render?Ke.render(se,te):sn(Ke,se);return a.jsxs("td",{className:L(st(Ke),dt===0&&"ok-table__primary")||void 0,"data-label":Bl(Ke),"data-hide-below":Ke.hideBelow,...ge("cell"),children:[dt===0&&at&&a.jsx("button",{type:"button",className:"ok-table__row-action ok-focusable","aria-label":at.label,onClick:at.onSelect}),g?a.jsx("span",{className:"ok-table__value",children:Tt}):Tt]},Ke.key)})]},fe)})]})]}),u&&a.jsx("span",{className:"ok-sr",role:"status",id:`${D}-count`,children:G.length>0?S.table.selected(G.length):""})]});return $?a.jsxs("div",{className:"ok-table-paged",children:[rt,X>1&&a.jsx(ga,{className:"ok-table__pagination",label:S.table.pagination(Ce??S.table.label),count:X,page:U,onChange:ie})]}):rt}const Hl=c.forwardRef(zl),ql=c.forwardRef(function({items:e,value:n,defaultValue:s,onChange:r,activation:o="auto",label:i,keepMounted:l=!1,unmountInactive:d,className:u,...f},m){var E;const h=d??!l,b=c.useId(),[p,v]=le(n,s??((E=e.find(N=>!N.disabled))==null?void 0:E.value)??"",r),g=Math.max(0,e.findIndex(N=>N.value===p)),w=c.useRef(null),x=c.useRef(null),j=c.useRef([]),_=c.useRef([]),k=c.useRef(null),R=c.useRef(null),M=c.useRef(g),C=ke(()=>{const N=w.current,y=j.current[g];!N||!y||(N.style.setProperty("--x",y.offsetLeft+"px"),N.style.setProperty("--w",y.offsetWidth+"px"))});ve(()=>{const N=M.current;M.current=g,C();const y=w.current,S=j.current[N],B=j.current[g];if(N===g||!y||!S||!B)return;const D=g>N?1:-1,I=S.offsetLeft,O=S.offsetWidth,T=B.offsetLeft,F=B.offsetWidth,q=Math.min(I,T),G=Math.max(I+O,T+F);if(Ne(x.current,[{transform:`translateX(${I}px)`,width:O+"px"},{transform:`translateX(${q}px)`,width:G-q+"px",offset:.42},{transform:`translateX(${T}px)`,width:F+"px"}],{duration:420,easing:ze.inOut}),y.scrollWidth>y.clientWidth&&typeof y.scrollTo=="function"){const $=Ue()===0?"auto":"smooth";T<y.scrollLeft?y.scrollTo({left:T-16,behavior:$}):T+F>y.scrollLeft+y.clientWidth&&y.scrollTo({left:T+F-y.clientWidth+16,behavior:$})}const V=_.current[N],Z=_.current[g];if(V&&V!==Z){V.dataset.leaving="";const $=()=>{delete V.dataset.leaving},Y=Ne(V,[{opacity:1,transform:"none"},{opacity:0,transform:`translateX(${-20*D}px)`}],{duration:150,easing:ze.in});Y?Y.finished.then($,$):$()}Z&&Ne(Z,[{opacity:0,transform:`translateX(${24*D}px)`},{opacity:1,transform:"none"}],{spring:"spring",delay:h?0:110});const K=k.current,P=R.current,z=(K==null?void 0:K.offsetHeight)??0;K&&P!==null&&Math.abs(z-P)>=1&&Ne(K,[{height:P+"px",overflow:"hidden"},{height:z+"px",overflow:"hidden"}],{spring:"soft"})},[g]),ve(()=>{var N;R.current=((N=k.current)==null?void 0:N.offsetHeight)??null}),c.useEffect(()=>{C();const N=w.current;if(!N||typeof ResizeObserver>"u")return;const y=new ResizeObserver(()=>C());return y.observe(N),j.current.forEach(S=>S&&y.observe(S)),()=>y.disconnect()},[e.length,C]);const A=N=>{var I;const y=e.map((O,T)=>O.disabled?-1:T).filter(O=>O>=0);if(!y.length)return;const S=j.current.findIndex(O=>O===document.activeElement),B=y.indexOf(S>=0?S:g);let D;if(N.key==="ArrowRight")D=y[(B+1)%y.length];else if(N.key==="ArrowLeft")D=y[(B-1+y.length)%y.length];else if(N.key==="Home")D=y[0];else if(N.key==="End")D=y[y.length-1];else return;N.preventDefault(),(I=j.current[D])==null||I.focus(),o==="auto"&&v(e[D].value)};return a.jsxs("div",{ref:m,className:L("ok-tabs",u),...f,children:[a.jsxs("div",{ref:w,className:"ok-tabs__list",role:"tablist","aria-label":i,"aria-orientation":"horizontal",onKeyDown:A,children:[e.map((N,y)=>a.jsx("button",{ref:S=>{j.current[y]=S},type:"button",role:"tab",id:`${b}-tab-${y}`,className:"ok-tabs__tab ok-focusable","aria-selected":y===g,"aria-controls":h&&y!==g?void 0:`${b}-panel-${y}`,tabIndex:y===g?0:-1,disabled:N.disabled,onClick:()=>v(N.value),children:N.label},N.value)),a.jsx("span",{ref:x,className:"ok-tabs__ink","aria-hidden":"true"})]}),a.jsx("div",{ref:k,className:"ok-tabs__panels","data-keep-mounted":h?void 0:"",children:e.map((N,y)=>h&&y!==g?null:a.jsx("div",{ref:S=>{_.current[y]=S},role:"tabpanel",id:`${b}-panel-${y}`,"aria-labelledby":`${b}-tab-${y}`,className:"ok-tabs__panel","data-state":y===g?"active":"inactive",tabIndex:y===g?0:-1,children:N.content},N.value))})]})}),Vl=c.forwardRef(function({items:e,type:n="multiple",value:s,defaultValue:r,onChange:o,collapsible:i=!0,headingLevel:l=3,variant:d="group",className:u,...f},m){const h=c.useId(),[b,p]=le(s,r??[],o),v=c.useRef([]),g=`h${l}`,w=j=>{const _=b.includes(j);n==="single"?_?i&&p([]):p([j]):p(_?b.filter(k=>k!==j):[...b,j])},x=j=>{const _=v.current.filter(M=>!!M&&!M.disabled),k=_.indexOf(j.target);if(k<0)return;let R;if(j.key==="ArrowDown")R=(k+1)%_.length;else if(j.key==="ArrowUp")R=(k-1+_.length)%_.length;else if(j.key==="Home")R=0;else if(j.key==="End")R=_.length-1;else return;j.preventDefault(),_[R].focus()};return a.jsx("div",{ref:m,className:L("ok-accordion",d==="group"?"ok-group":"ok-accordion--plain",u),onKeyDown:x,...f,children:e.map((j,_)=>{const k=b.includes(j.value),R=n==="single"&&k&&!i;return a.jsxs("div",{className:"ok-accordion__item","data-state":k?"open":"closed",children:[a.jsx(g,{className:"ok-accordion__heading",children:a.jsxs("button",{ref:M=>{v.current[_]=M},type:"button",id:`${h}-head-${_}`,className:"ok-accordion__head ok-focusable","aria-expanded":k,"aria-controls":`${h}-body-${_}`,"aria-disabled":R||void 0,disabled:j.disabled,onClick:()=>w(j.value),children:[a.jsx("span",{className:"ok-accordion__title",children:j.title}),a.jsx(pe,{name:"chevron-right"})]})}),a.jsx("div",{className:"ok-accordion__body",id:`${h}-body-${_}`,role:"region","aria-labelledby":`${h}-head-${_}`,children:a.jsx("div",{children:a.jsx("div",{className:"ok-accordion__content",children:j.content})})})]},j.value)})})}),Wl=c.forwardRef(function({items:e,label:n,maxItems:s,separator:r,className:o,...i},l){const{messages:d}=he(),u=n??d.breadcrumb.label,[f,m]=c.useState(!1),h=c.useRef(null),b=c.useRef(!1),p=e.length-1,v=e.length>2,g=s!=null&&e.length>s,w=a.jsx("span",{className:"ok-breadcrumb__sep","aria-hidden":"true",children:r??a.jsx(pe,{name:"chevron-right"})});return ve(()=>{var x,j;!f||!b.current||(b.current=!1,(j=(x=h.current)==null?void 0:x.querySelector("[data-middle] a, [data-middle] button"))==null||j.focus())},[f]),a.jsx("nav",{ref:l,"aria-label":u,className:L("ok-breadcrumb",o),"data-collapse":!v||f?void 0:g?"always":"narrow",...i,children:a.jsx("ol",{ref:h,className:"ok-breadcrumb__list",children:e.map((x,j)=>{const k=j===p?a.jsx("span",{className:"ok-breadcrumb__current","aria-current":"page",children:x.label}):x.href!==void 0?a.jsx("a",{className:"ok-breadcrumb__link ok-focusable",href:x.href,onClick:x.onClick,children:x.label}):x.onClick?a.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable",onClick:x.onClick,children:x.label}):a.jsx("span",{className:"ok-breadcrumb__text",children:x.label});return[a.jsxs("li",{className:"ok-breadcrumb__item","data-middle":j>0&&j<p?"":void 0,children:[j>0&&w,k]},j),j===0&&v&&!f?a.jsxs("li",{className:"ok-breadcrumb__item ok-breadcrumb__more",children:[w,a.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable","aria-label":d.breadcrumb.expand(e.length-2),"aria-expanded":!1,onClick:()=>{b.current=!0,m(!0)},children:a.jsx(pe,{name:"more"})})]},"more"):null]})})})}),Gl=c.forwardRef(function({items:e,current:n=0,orientation:s="horizontal",status:r="default",label:o,className:i,...l},d){const{messages:u}=he(),f=o??u.steps.label;return a.jsx("ol",{ref:d,"aria-label":f,className:L("ok-steps",i),"data-orientation":s,...l,children:e.map((m,h)=>{const b=h<n?"complete":h===n?"current":"upcoming",p=b==="current"&&r==="error";return a.jsxs("li",{className:"ok-steps__item","data-state":b,"data-error":p?"":void 0,"aria-current":b==="current"?"step":void 0,children:[a.jsx("span",{className:"ok-steps__marker","aria-hidden":"true",children:b==="complete"?a.jsx(pe,{name:"check"}):p?a.jsx(pe,{name:"x"}):m.icon??h+1}),a.jsxs("span",{className:"ok-steps__text",children:[a.jsxs("span",{className:"ok-steps__title",children:[a.jsx("span",{className:"ok-sr",children:u.steps.prefix(h+1,p?u.steps.error:u.steps.state[b])}),m.title]}),m.description!=null&&a.jsx("span",{className:"ok-steps__desc",children:m.description})]})]},h)})})}),Ul=c.forwardRef(function({items:e,className:n,...s},r){return a.jsx("ol",{ref:r,className:L("ok-timeline",n),...s,children:e.map((o,i)=>a.jsxs("li",{className:"ok-timeline__item","data-tone":o.tone??"neutral",children:[a.jsx("span",{className:"ok-timeline__marker","data-icon":o.icon!=null?"":void 0,"aria-hidden":"true",children:o.icon}),a.jsxs("div",{className:"ok-timeline__content",children:[a.jsxs("div",{className:"ok-timeline__head",children:[a.jsx("span",{className:"ok-timeline__title",children:o.title}),o.time!=null&&a.jsx("time",{className:"ok-timeline__time",dateTime:o.dateTime,children:o.time})]}),o.description!=null&&a.jsx("div",{className:"ok-timeline__desc",children:o.description})]})]},o.key??i))})}),Yl=c.forwardRef(function({items:e,expanded:n,defaultExpanded:s,onExpandedChange:r,selected:o,defaultSelected:i=null,onSelect:l,label:d,className:u,...f},m){var y;const[h,b]=le(n,s??[],r),[p,v]=le(o,i,l),[g,w]=c.useState(p),x=c.useRef(new Map),j=new Set(h),_=[],k=(S,B,D)=>S.forEach(I=>{var O;_.push({node:I,level:B,parent:D}),(O=I.children)!=null&&O.length&&j.has(I.id)&&k(I.children,B+1,I.id)});k(e,1,null);const R=_.filter(S=>!S.node.disabled),M=R.some(S=>S.node.id===g)?g:((y=R[0])==null?void 0:y.node.id)??null,C=S=>{var B;S!=null&&(w(S),(B=x.current.get(S))==null||B.focus())},A=(S,B)=>b(B?[...h.filter(D=>D!==S),S]:h.filter(D=>D!==S)),E=S=>{var q,G,V,Z;if(He(S))return;const B=S.target;if(B.getAttribute("role")!=="treeitem")return;const D=R.findIndex(K=>K.node.id===B.dataset.id);if(D<0)return;const{node:I,parent:O}=R[D],T=!!((q=I.children)!=null&&q.length);let F=!0;switch(S.key){case"ArrowDown":C((G=R[D+1])==null?void 0:G.node.id);break;case"ArrowUp":C((V=R[D-1])==null?void 0:V.node.id);break;case"Home":C(R[0].node.id);break;case"End":C(R[R.length-1].node.id);break;case"ArrowRight":T&&!j.has(I.id)?A(I.id,!0):T&&C((Z=I.children.find(K=>!K.disabled))==null?void 0:Z.id);break;case"ArrowLeft":T&&j.has(I.id)?A(I.id,!1):O&&C(O);break;case"Enter":case" ":v(I.id),T&&A(I.id,!j.has(I.id));break;default:F=!1}F&&S.preventDefault()},N=(S,B)=>S.map((D,I)=>{var F;const O=!!((F=D.children)!=null&&F.length),T=O&&j.has(D.id);return a.jsxs("li",{ref:q=>{q?x.current.set(D.id,q):x.current.delete(D.id)},role:"treeitem","data-id":D.id,className:"ok-tree__item","aria-level":B,"aria-setsize":S.length,"aria-posinset":I+1,"aria-expanded":O?T:void 0,"aria-selected":p===D.id,"aria-disabled":D.disabled||void 0,tabIndex:M===D.id?0:-1,onFocus:q=>{q.target===q.currentTarget&&w(D.id)},children:[a.jsxs("div",{className:"ok-tree__row",onClick:()=>{D.disabled||(w(D.id),v(D.id),O&&A(D.id,!T))},children:[a.jsx("span",{className:"ok-tree__chev","aria-hidden":"true",children:O&&a.jsx(pe,{name:"chevron-right"})}),D.icon!=null&&a.jsx("span",{className:"ok-tree__icon","aria-hidden":"true",children:D.icon}),a.jsx("span",{className:"ok-tree__label",children:D.label})]}),T&&a.jsx("ul",{role:"group",className:"ok-tree__group",children:N(D.children,B+1)})]},D.id)});return a.jsx("ul",{ref:m,role:"tree","aria-label":d,className:L("ok-tree",u),onKeyDown:E,...f,children:N(e,1)})}),Kl=c.forwardRef(function({tone:e="neutral",variant:n="soft",dot:s,ping:r,className:o,children:i,...l},d){return a.jsxs("span",{ref:d,className:L("ok-badge",e!=="neutral"&&`ok-badge--${e}`,n==="solid"&&"ok-badge--solid",n==="ink"&&"ok-badge--ink",o),...l,children:[(s||r)&&a.jsx("span",{className:L("ok-dot",r&&"ok-dot--live"),"aria-hidden":"true"}),i]})}),Xl=c.forwardRef(function({tone:e="neutral",size:n="md",icon:s,onRemove:r,removeLabel:o,className:i,children:l,...d},u){const{messages:f}=he(),m=typeof l=="string"||typeof l=="number"?String(l):"";return a.jsxs("span",{ref:u,className:L("ok-tag",n==="sm"&&"ok-tag--sm",i),"data-tone":e,...d,children:[s!=null&&a.jsx("span",{className:"ok-tag__icon","aria-hidden":"true",children:s}),a.jsx("span",{className:"ok-tag__label",children:l}),r&&a.jsx("button",{type:"button",className:"ok-tag__remove ok-focusable","aria-label":o??f.tag.remove(m),onClick:r,children:a.jsx(pe,{name:"x"})})]})}),wn=c.forwardRef(function({value:e,direction:n="auto",className:s,...r},o){const i=c.useRef(null),l=c.useRef(null),d=c.useRef(e);return ve(()=>{const u=d.current;if(u===e)return;d.current=e;const f=i.current,m=l.current;if(!f||!m)return;const h=n==="auto"?Number(e)<Number(u)?-1:1:n,b=document.createElement("span");b.textContent=String(u),b.setAttribute("aria-hidden","true"),f.insertBefore(b,m);const p=()=>b.remove(),v=Ne(b,[{transform:"translateY(0)",opacity:1},{transform:`translateY(${-h*80}%)`,opacity:0}],{duration:150,easing:ze.in,fill:"forwards"});v?v.finished.then(p,p):p(),Ne(m,[{transform:`translateY(${h*80}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"})},[e,n]),a.jsx("span",{ref:xe(o,i),className:L("ok-roll",s),...r,children:a.jsx("span",{ref:l,children:e})})}),Jl=c.forwardRef(function({value:e,max:n=99,showZero:s,tone:r="accent",label:o,className:i,...l},d){const u=c.useRef(null),f=c.useRef(e);if(ve(()=>{f.current!==e&&(f.current=e,Ne(u.current,[{transform:"scale(1)"},{transform:"scale(1.35)",offset:.3},{transform:"scale(1)"}],{duration:Un.bouncy.duration,easing:ze.out}))},[e]),e===0&&!s)return null;const m=e>n?`${n}+`:String(e);return a.jsxs("span",{ref:xe(d,u),className:L("ok-count",i),"data-tone":r==="accent"?void 0:r,...l,children:[a.jsx(wn,{value:m,direction:e>=f.current?1:-1,"aria-hidden":o?!0:void 0}),o&&a.jsx("span",{className:"ok-sr",children:o})]})}),Zl={neutral:"info",accent:"sparkle",info:"info",success:"check",warning:"alert",danger:"alert"},Ql=c.forwardRef(function({tone:e="accent",title:n,icon:s,action:r,closable:o,open:i,defaultOpen:l=!0,onOpenChange:d,onClose:u,closeLabel:f,className:m,children:h,...b},p){const{messages:v}=he(),g=f??v.common.close,[w,x]=le(i,l,d),{mounted:j,ref:_}=Yt(w,700);if(!j)return null;const k=a.jsxs("div",{ref:p,role:e==="warning"||e==="danger"?"alert":"status",className:L("ok-alert",e!=="accent"&&`ok-alert--${e}`,m),...b,children:[s!==!1&&(s??a.jsx(pe,{name:Zl[e]})),a.jsxs("div",{className:"ok-alert__body",children:[n!=null&&a.jsx("b",{className:"ok-alert__title",children:n}),h]}),r!=null&&a.jsx("div",{className:"ok-alert__action",children:r}),o&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-alert__close","aria-label":g,onClick:()=>{u==null||u(),x(!1)},children:a.jsx(pe,{name:"x"})})]});return a.jsx("div",{ref:_,className:"ok-collapse ok-alert-wrap","data-state":w?"open":"closed",children:k})}),ec=c.forwardRef(function({value:e,max:n=100,label:s,tone:r="accent",size:o="md",noDoneState:i,className:l,style:d,...u},f){const m=e!=null,h=m?ye(e/(n||1),0,1):0;return a.jsx("div",{ref:f,role:"progressbar","aria-label":s,"aria-valuemin":m?0:void 0,"aria-valuemax":m?n:void 0,"aria-valuenow":m?ye(e,0,n):void 0,className:L("ok-progress",!m&&"ok-progress--indeterminate",o!=="md"&&`ok-progress--${o}`,l),"data-tone":r==="accent"?void 0:r,"data-done":m&&h>=1&&!i?"":void 0,style:{"--v":h,...d},...u,children:a.jsx("div",{className:"ok-progress__bar"})})}),tc={sm:40,md:64,lg:96},nc=c.forwardRef(function({value:e=0,max:n=100,label:s,size:r="md",thickness:o=6,showValue:i,noDoneState:l,className:d,style:u,children:f,...m},h){const b=ye(e/(n||1),0,1),p=typeof r=="number"?r:tc[r],v=i??p>=56;return a.jsxs("div",{ref:h,role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":ye(e,0,n),className:L("ok-ring",d),"data-done":b>=1&&!l?"":void 0,style:{"--v":b,"--size":`${p}px`,...u},...m,children:[a.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",style:{strokeWidth:o},children:[a.jsx("circle",{className:"ok-ring__track",cx:"18",cy:"18",r:"15"}),a.jsx("circle",{className:"ok-ring__bar",cx:"18",cy:"18",r:"15",pathLength:100})]}),f!=null?a.jsx("span",{className:"ok-ring__label",children:f}):v?a.jsx(wn,{className:"ok-ring__label",value:Math.round(b*100),"aria-hidden":"true"}):null]})}),sc=c.forwardRef(function({value:e,min:n=0,max:s=100,segments:r=10,label:o,valueText:i,tone:l,warnAt:d,dangerAt:u,size:f="md",className:m,...h},b){const p=Math.max(1,Math.floor(r)),v=ye(e,n,s),g=Math.round((v-n)/(s-n||1)*p);return a.jsx("div",{ref:b,role:"meter","aria-label":o,"aria-valuemin":n,"aria-valuemax":s,"aria-valuenow":v,"aria-valuetext":i,className:L("ok-level",f!=="md"&&`ok-level--${f}`,m),"data-tone":l,...h,children:Array.from({length:p},(w,x)=>{const j=n+(s-n)*x/p,_=u!=null&&j>=u?"danger":d!=null&&j>=d?"warning":void 0;return a.jsx("i",{className:"ok-level__seg","data-on":x<g?"":void 0,"data-zone":_},x)})})}),_t=t=>typeof t=="number"?`${t}px`:t,rc=c.forwardRef(function({variant:e="text",width:n,height:s,lines:r=1,className:o,style:i,...l},d){const u=L("ok-skel",e==="circle"&&"ok-skel--circle",e==="rect"&&"ok-skel--rect");if(e==="text"&&r>1)return a.jsx("span",{ref:d,"aria-hidden":"true",className:L("ok-skel-lines",o),style:{width:_t(n),...i},...l,children:Array.from({length:r},(m,h)=>a.jsx("span",{className:u,style:{height:_t(s),width:h===r-1?"70%":void 0}},h))});const f=e==="circle"?{width:_t(n??s),height:_t(s??n)}:{width:_t(n),height:_t(s)};return a.jsx("span",{ref:d,"aria-hidden":"true",className:L(u,o),style:{...f,...i},...l})}),ac={sm:20,md:28,lg:40},oc=c.forwardRef(function({variant:e="tail",size:n="md",label:s,className:r,style:o,...i},l){const{messages:d}=he(),u=s??d.common.loading,f=typeof n=="number"?n:ac[n];return a.jsxs("span",{ref:l,role:"status",className:L("ok-loader",r),style:{"--size":`${f}px`,...o},...i,children:[e==="tail"?a.jsx(Qn,{className:"ok-tail"}):a.jsx("span",{className:"ok-spinner","aria-hidden":"true"}),a.jsx("span",{className:"ok-sr",children:u})]})}),ic=c.forwardRef(function({label:e,className:n,...s},r){const{messages:o}=he(),i=e??o.common.loading;return a.jsxs("span",{ref:r,role:"status",className:L("ok-dots",n),...s,children:[a.jsx("i",{"aria-hidden":"true"}),a.jsx("i",{"aria-hidden":"true"}),a.jsx("i",{"aria-hidden":"true"}),a.jsx("span",{className:"ok-sr",children:i})]})}),lc=c.forwardRef(function({icon:e,title:n,description:s,actions:r,titleAs:o="h3",size:i="md",className:l,children:d,...u},f){return a.jsxs("div",{ref:f,className:L("ok-empty",i!=="md"&&`ok-empty--${i}`,l),...u,children:[e!=null&&a.jsx("div",{className:"ok-empty__media","aria-hidden":"true",children:e}),a.jsx(o,{className:"ok-empty__title",children:n}),s!=null&&a.jsx("p",{className:"ok-empty__desc",children:s}),d,r!=null&&a.jsx("div",{className:"ok-empty__actions",children:r})]})}),cc=c.forwardRef(function({label:e,value:n,delta:s,trend:r,positive:o="up",hint:i,icon:l,variant:d="card",className:u,...f},m){const h=he().messages.stat.trend,b=r??(s!=null?"flat":void 0),p=!b||b==="flat"?"neutral":b===o?"good":"bad";return a.jsxs("div",{ref:m,className:L("ok-stat",d==="card"&&"ok-card",u),...f,children:[a.jsxs("div",{className:"ok-stat__label",children:[l!=null&&a.jsx("span",{className:"ok-stat__icon","aria-hidden":"true",children:l}),a.jsx("span",{children:e})]}),a.jsx("div",{className:"ok-stat__value",children:n}),(b||i!=null)&&a.jsxs("div",{className:"ok-stat__foot",children:[b&&a.jsxs("span",{className:"ok-stat__delta","data-trend":b,"data-mood":p,children:[a.jsx(pe,{children:b==="flat"?a.jsx("path",{d:"M4.500 10h11"}):a.jsx("path",{d:b==="up"?"M10 15.500v-11M5.500 9L10 4.500 14.500 9":"M10 4.500v11M5.500 11l4.500 4.500 4.500-4.500"})}),a.jsx("span",{className:"ok-sr",children:h[b]}),s]}),i!=null&&a.jsx("span",{className:"ok-stat__hint",children:i})]})]})}),dc={sm:28,md:36,lg:48},Ks=["#FF8FA9","#FFBE3B","#4CD787","#D9A6FF","#7FB0FF","#FF9A5C"];function xa(t){const e=t.trim();if(!e)return"";const n=Array.from(e)[0];if(/[⺀-鿿가-힯豈-﫿]/.test(n))return n;const s=e.split(/[\s._-]+/).filter(Boolean),r=Array.from(s[0])[0]??"",o=s.length>1?Array.from(s[s.length-1])[0]:"";return(r+o).toUpperCase()}const ka=c.createContext(void 0),ms=c.forwardRef(function({src:e,name:n,alt:s,size:r,color:o,status:i,statusLabel:l,decorative:d,className:u,style:f,children:m,...h},b){const p=c.useContext(ka),v=r??p??"md",g=typeof v=="number"?v:dc[v],[w,x]=c.useState(!1);c.useEffect(()=>{x(!1)},[e]);const{messages:j}=he(),k=[s??n,i?l??j.avatar.status[i]:void 0].filter(Boolean).join(j.common.separator);let R=o;if(o==="auto"){let C=0;for(const A of n??"")C=C*31+(A.codePointAt(0)??0)>>>0;R=Ks[C%Ks.length]}const M={"--size":`${g}px`,...R?{"--c":R}:null};return a.jsxs("span",{ref:b,className:L("ok-avatar",u),style:{...M,...f},...k&&!d?{role:"img","aria-label":k}:{"aria-hidden":!0},...h,children:[a.jsx("span",{className:"ok-avatar__fallback","aria-hidden":"true",children:m??(n?xa(n):a.jsxs(pe,{children:[a.jsx("circle",{cx:"10",cy:"7.500",r:"3"}),a.jsx("path",{d:"M4 16.500c.8-2.800 3.100-4.300 6-4.300s5.200 1.500 6 4.300"})]}))}),e&&!w&&a.jsx("img",{className:"ok-avatar__img",src:e,alt:"",onError:()=>x(!0),draggable:!1}),i&&a.jsx("span",{className:"ok-avatar__status","data-status":i,"aria-hidden":"true"})]})});function uc({extra:t,members:e,label:n,total:s}){const{messages:r}=he(),[o,i]=c.useState(!1),l=c.useRef(null),d=c.useRef(null),u=c.useRef(),f=c.useId();gn({open:o,anchorRef:l,floatingRef:d,placement:"bottom",offset:8}),Kt(o,()=>i(!1)),c.useEffect(()=>()=>clearTimeout(u.current),[]);const m=x=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!0),x)},h=()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!1),160)},[b,p]=c.useState("closed"),[v,g]=c.useState(!1);c.useEffect(()=>{if(o){g(!0);const j=requestAnimationFrame(()=>requestAnimationFrame(()=>p("open")));return()=>cancelAnimationFrame(j)}p("closed");const x=setTimeout(()=>g(!1),200*Ue());return()=>clearTimeout(x)},[o]);const w=e.map(x=>x.props.name||x.props.alt).filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("button",{ref:l,type:"button",className:"ok-avatars__more ok-focusable","aria-expanded":o,"aria-controls":v?f:void 0,"aria-label":r.avatar.moreButton(t,n),onPointerEnter:x=>{x.pointerType!=="touch"&&m(120)},onPointerLeave:h,onFocus:()=>m(0),onBlur:h,onClick:()=>i(x=>!x),children:a.jsxs(ms,{className:"ok-avatar--more",decorative:!0,children:["+",t]})}),v&&a.jsx(gt,{children:a.jsxs("div",{ref:d,id:f,className:"ok-popup ok-popup--surface ok-avatars__panel","data-state":b,role:"group","aria-label":r.avatar.panel(s,n),onPointerEnter:()=>clearTimeout(u.current),onPointerLeave:h,children:[a.jsx("ul",{className:"ok-avatars__list ok-scroll",children:e.map((x,j)=>a.jsxs("li",{className:"ok-avatars__item",children:[c.cloneElement(x,{size:"sm",decorative:!0}),a.jsx("span",{className:"ok-avatars__name",children:x.props.name||x.props.alt})]},x.key??j))}),s>w.length&&a.jsx("p",{className:"ok-avatars__rest",children:r.avatar.rest(s-w.length)})]})})]})}const fc=c.forwardRef(function({max:e,total:n,size:s,label:r,overflowList:o=!0,className:i,children:l,...d},u){const{messages:f}=he(),m=c.Children.toArray(l),h=e!=null&&m.length>e?m.slice(0,e):m,b=Math.max(0,(n??m.length)-h.length),p=m.filter(g=>c.isValidElement(g)),v=o&&p.some(g=>g.props.name||g.props.alt);return a.jsx("div",{ref:u,role:"group","aria-label":r,className:L("ok-avatars",i),...d,children:a.jsxs(ka.Provider,{value:s,children:[h,b>0&&(v?a.jsx(uc,{extra:b,members:p,label:r,total:n??m.length}):a.jsxs(ms,{className:"ok-avatar--more",alt:f.avatar.more(b),children:["+",b]}))]})})});function ya(t,e,n={}){if(typeof document>"u"||Ue()===0)return;const s=n.count??12,r=getComputedStyle(n.source??document.documentElement),o=n.colors??[r.getPropertyValue("--ok-accent").trim()||"#FF6B8E",r.getPropertyValue("--ok-accent-tint-2").trim()||"#FFC4D2",r.getPropertyValue("--ok-text").trim()||"#1B1C22"];for(let i=0;i<s;i++){const l=document.createElement("i");l.className="ok-particle",l.setAttribute("aria-hidden","true");const d=4+Math.random()*6,u=i/s*Math.PI*2+(Math.random()-.5)*.5,f=(n.distance??46)*(.6+Math.random()*.7);l.style.cssText=`width:${d}px;height:${d}px;margin:${-d/2}px 0 0 ${-d/2}px;background:${o[i%o.length]}`,document.body.appendChild(l);const m=Math.cos(u)*f,h=Math.sin(u)*f,b=()=>l.remove(),p=Ne(l,[{transform:`translate(${t}px,${e}px) scale(0)`,opacity:1},{transform:`translate(${t+m*.8}px,${e+h*.8}px) scale(1)`,opacity:1,offset:.4},{transform:`translate(${t+m}px,${e+h+14}px) scale(0)`,opacity:0}],{duration:620+Math.random()*260,easing:ze.out,fill:"forwards"});p?p.finished.then(b,b):b()}}const hc=a.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[a.jsx("ellipse",{cx:"12",cy:"12",rx:"8.5",ry:"6.5"}),a.jsx("ellipse",{className:"nostril",cx:"9",cy:"12",rx:"1.2",ry:"1.9"}),a.jsx("ellipse",{className:"nostril",cx:"15",cy:"12",rx:"1.2",ry:"1.9"})]}),pc=c.forwardRef(function({pressed:e,defaultPressed:n=!1,onChange:s,count:r,label:o,icon:i,noBurst:l,className:d,onClick:u,children:f,...m},h){const{messages:b}=he(),p=o??b.reaction.label,[v,g]=le(e,n,s),w=c.useRef(null),x=j=>{var k,R;const _=!v;if(g(_),_&&!l){const M=(R=(k=w.current)==null?void 0:k.querySelector(".ok-react__icon"))==null?void 0:R.getBoundingClientRect();M&&ya(M.left+M.width/2,M.top+M.height/2,{source:w.current??void 0})}};return a.jsxs("button",{ref:xe(h,w),type:"button",className:L("ok-react ok-focusable",d),"aria-pressed":v,"data-icon-only":r==null&&f==null?"":void 0,onClick:Ut(u,x),...m,children:[a.jsx("span",{className:"ok-react__icon",children:i??hc}),a.jsx("span",{className:"ok-sr",children:p}),f,r!=null&&a.jsx(wn,{className:"ok-react__count",value:r+(v?1:0)})]})}),mc=c.forwardRef(function({className:e,...n},s){return a.jsx("code",{ref:s,className:L("ok-code",e),...n})});async function bc(t){var s;if((s=navigator.clipboard)!=null&&s.writeText)return navigator.clipboard.writeText(t);const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="position:fixed;left:-9999px;top:0;opacity:0",document.body.appendChild(e),e.select();const n=document.execCommand("copy");if(e.remove(),!n)throw new Error("copy failed")}const vc=c.forwardRef(function({code:e,children:n,language:s,title:r,copyable:o=!0,wrap:i,maxHeight:l,label:d,onCopy:u,className:f,...m},h){const{messages:b}=he(),p=e??n??"",[v,g]=c.useState("idle"),w=c.useRef();c.useEffect(()=>()=>clearTimeout(w.current),[]);const x=async()=>{let k="copied";try{await bc(p),u==null||u(p)}catch{k="failed"}g(k),clearTimeout(w.current),w.current=setTimeout(()=>g("idle"),2e3)},j=r!=null||!!s,_=d??(typeof r=="string"?r:void 0)??s??b.code.label;return a.jsxs("div",{ref:h,className:L("ok-codeblock",f),"data-head":j?"":void 0,...m,children:[(j||o)&&a.jsxs("div",{className:"ok-codeblock__head",children:[r!=null&&a.jsx("span",{className:"ok-codeblock__title",children:r}),s&&a.jsx("span",{className:"ok-codeblock__lang",children:s}),o&&a.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-codeblock__copy","aria-label":b.code.copy,"data-state":v,onClick:x,children:a.jsx(pe,{name:v==="copied"?"check":v==="failed"?"x":"copy"})})]}),a.jsx("pre",{className:"ok-codeblock__pre ok-scroll",tabIndex:0,role:"group","aria-label":_,"data-wrap":i?"":void 0,style:l!=null?{maxHeight:typeof l=="number"?`${l}px`:l}:void 0,children:a.jsx("code",{className:s?`language-${s}`:void 0,children:p})}),a.jsx("span",{className:"ok-sr",role:"status","aria-live":"polite",children:v==="copied"?b.code.copied:v==="failed"?b.code.copyFailed:""})]})}),wa=t=>{const e=t!=null&&t!==c.Fragment;return{Tag:e?t:"div",box:e}},gc=c.forwardRef(function({as:e,above:n,below:s,className:r,...o},i){const{Tag:l,box:d}=wa(e);return a.jsx(l,{ref:i,className:L("ok-show",r),"data-box":d?"":void 0,"data-ok-hide-below":n,"data-ok-hide-above":s,...o})}),xc=c.forwardRef(function({as:e,above:n,below:s,className:r,...o},i){const{Tag:l,box:d}=wa(e);return a.jsx(l,{ref:i,className:L("ok-show",r),"data-box":d?"":void 0,"data-ok-hide-below":s,"data-ok-hide-above":n,...o})}),kc=["base","sm","md","lg","xl"];function yc(t){return typeof t=="object"&&t!==null}const et=t=>t===0?"0px":`var(--ok-s-${t})`,wc=t=>t*4,_c={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},jc={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Nc=t=>_c[t],Mc=t=>jc[t];function Be(t,e,n){const s={};if(e==null)return s;const r=`--ok-l-${t}`;if(!yc(e))return s[r]=String(n(e)),s;let o;for(const i of kc){const l=e[i];l!==void 0&&(o=String(n(l))),o!==void 0&&(s[i==="base"?r:`${r}-${i}`]=o)}return s}function lt(t,e){return{...Be("gap",t.gap,et),...Be("rgap",t.rowGap,et),...Be("p",t.padding,et),...Be("px",t.paddingX,et),...Be("py",t.paddingY,et),...Be("align",t.align,Nc),...Be("justify",t.justify,Mc),...e}}const Xt=t=>t.padding!==void 0||t.paddingX!==void 0||t.paddingY!==void 0?"":void 0,Rc=c.forwardRef(function({as:e,padding:n,paddingX:s,paddingY:r,radius:o,surface:i,border:l,highlight:d,className:u,style:f,...m},h){const b=e??"div",p={};return o!==void 0&&(p["--ok-box-r"]=o===0?"0px":`var(--ok-r-${o})`),i&&(p["--ok-box-bg"]=`var(--ok-${i})`),a.jsx(b,{ref:h,className:L("ok-l ok-box",u),"data-pad":Xt({padding:n,paddingX:s,paddingY:r}),"data-radius":o,"data-surface":i,"data-border":l?l==="strong"?"strong":"line":void 0,"data-highlight":d?"":void 0,style:lt({padding:n,paddingX:s,paddingY:r},{...p,...f}),...m})}),_a=c.forwardRef(function({orientation:e="horizontal",labelAlign:n="center",decorative:s,className:r,children:o,...i},l){const d=o!=null&&o!==!1&&e==="horizontal";return a.jsx("div",{ref:l,role:s?"none":"separator","aria-orientation":!s&&e==="vertical"?"vertical":void 0,"aria-label":!s&&d&&typeof o=="string"?o:void 0,className:L("ok-divider",d&&"ok-divider--label",r),"data-orientation":e,"data-label-align":d?n:void 0,...i,children:d?a.jsx("span",{className:"ok-divider__label",children:o}):null})}),Sc=c.forwardRef(function({as:e,gap:n,align:s,justify:r,divider:o,padding:i,paddingX:l,paddingY:d,className:u,style:f,children:m,...h},b){const p=e??"div";let v=m;return o&&(v=c.Children.toArray(m).filter(w=>w!=null&&typeof w!="boolean").map((w,x)=>a.jsxs(c.Fragment,{children:[x>0&&(o===!0?a.jsx(_a,{}):o),w]},c.isValidElement(w)&&w.key!=null?w.key:x))),a.jsx(p,{ref:b,className:L("ok-l ok-stack",u),"data-pad":Xt({padding:i,paddingX:l,paddingY:d}),style:lt({gap:n,align:s,justify:r,padding:i,paddingX:l,paddingY:d},f),...h,children:v})}),ja=c.forwardRef(function({as:e,gap:n,rowGap:s,align:r,justify:o,wrap:i=!0,padding:l,paddingX:d,paddingY:u,className:f,style:m,...h},b){const p=e??"div";return a.jsx(p,{ref:b,className:L("ok-l ok-inline",f),"data-nowrap":i?void 0:"","data-pad":Xt({padding:l,paddingX:d,paddingY:u}),style:lt({gap:n,rowGap:s,align:r,justify:o,padding:l,paddingX:d,paddingY:u},m),...h})}),Cc=ja,Ec={start:"start",center:"center",end:"end",stretch:"stretch"},Ac={start:"start",center:"center",end:"end",stretch:"stretch",baseline:"baseline"},Tc=c.forwardRef(function({as:e,columns:n,minItemWidth:s,gap:r,rowGap:o,align:i,justify:l,padding:d,paddingX:u,paddingY:f,className:m,style:h,...b},p){const v=e??"div",g=s!==void 0,w={...Be("cols",g?void 0:n,x=>Math.max(1,Math.round(x))),...Be("align",i,x=>Ac[x]),...Be("justify",l,x=>Ec[x]),...g?{"--ok-grid-min":typeof s=="number"?`${s}px`:s}:null};return a.jsx(v,{ref:p,className:L("ok-l ok-grid",m),"data-auto":g?"":void 0,"data-pad":Xt({padding:d,paddingX:u,paddingY:f}),style:lt({gap:r,rowGap:o,padding:d,paddingX:u,paddingY:f},{...w,...h}),...b})}),$c=c.forwardRef(function({as:e,span:n,rowSpan:s,className:r,style:o,...i},l){const d=e??"div",u=Be("span",n,f=>f==="full"?"1 / -1":`span ${Math.max(1,Math.round(f))}`);return a.jsx(d,{ref:l,className:L("ok-l ok-grid__item",r),style:{...u,...s?{gridRow:`span ${s}`}:null,...o},...i})}),Pc=c.forwardRef(function({as:e,size:n="lg",gutter:s=!0,center:r=!0,className:o,...i},l){const d=e??"div";return a.jsx(d,{ref:l,className:L("ok-container",o),"data-size":n,"data-gutter":s?void 0:"false","data-center":r?void 0:"false",...i})}),Ic=c.forwardRef(function({as:e,axis:n="both",inline:s,padding:r,paddingX:o,paddingY:i,className:l,style:d,...u},f){const m=e??"div";return a.jsx(m,{ref:f,className:L("ok-l ok-center",l),"data-axis":n,"data-inline":s?"":void 0,"data-pad":Xt({padding:r,paddingX:o,paddingY:i}),style:lt({padding:r,paddingX:o,paddingY:i},d),...u})}),Lc=c.forwardRef(function({size:e,className:n,style:s,...r},o){return a.jsx("div",{ref:o,"aria-hidden":"true",className:L("ok-spacer",n),style:e!==void 0?{flex:`0 0 ${et(e)}`,...s}:s,...r})}),Dc=c.forwardRef(function({ratio:e=16/9,className:n,style:s,...r},o){return a.jsx("div",{ref:o,className:L("ok-aspect",n),style:{aspectRatio:String(e),...s},...r})}),Oc=c.forwardRef(function({as:e,edge:n="top",offset:s=0,className:r,style:o,...i},l){const d=e??"div";return a.jsx(d,{ref:l,className:L("ok-sticky",r),"data-edge":n,style:{[n]:typeof s=="number"?et(s):s,...o},...i})}),Bc=c.forwardRef(function({direction:e="vertical",label:n,focusable:s=!0,className:r,role:o,tabIndex:i,...l},d){const u=!!(n??l["aria-label"]??l["aria-labelledby"]);return a.jsx("div",{ref:d,role:o??(u?"region":"group"),"aria-label":n,tabIndex:i??(s?0:void 0),className:L("ok-scroll ok-scroll-area",r),"data-direction":e,...l})}),Fc=c.forwardRef(function({as:e,size:n="lg",gap:s,padded:r=!0,className:o,style:i,...l},d){const u=e??"div";return a.jsx(u,{ref:d,className:L("ok-l ok-container ok-page",o),"data-size":n,"data-padded":r?void 0:"false",style:lt({gap:s},i),...l})}),zc=c.forwardRef(function({title:e,description:n,breadcrumb:s,actions:r,headingLevel:o=1,titleId:i,className:l,children:d,...u},f){const m=`h${o}`;return a.jsxs("header",{ref:f,className:L("ok-page-header",l),...u,children:[s?a.jsx("div",{className:"ok-page-header__breadcrumb",children:s}):null,a.jsxs("div",{className:"ok-page-header__row",children:[a.jsxs("div",{className:"ok-page-header__text",children:[a.jsx(m,{id:i,className:"ok-page-header__title",children:e}),n?a.jsx("p",{className:"ok-page-header__desc",children:n}):null]}),r?a.jsx("div",{className:"ok-page-header__actions",children:r}):null]}),d]})}),Hc=c.forwardRef(function({title:e,description:n,actions:s,headingLevel:r=2,gap:o,className:i,style:l,children:d,...u},f){const m=c.useId(),h=`h${r}`,b=e!=null&&e!==!1,p=u["aria-labelledby"]??(b&&!u["aria-label"]?m:void 0);return a.jsxs("section",{ref:f,className:L("ok-l ok-section",i),style:lt({gap:o},l),...u,"aria-labelledby":p,children:[b||s?a.jsxs("div",{className:"ok-section__head",children:[a.jsxs("div",{className:"ok-section__text",children:[b?a.jsx(h,{id:m,className:"ok-section__title",children:e}):null,n?a.jsx("p",{className:"ok-section__desc",children:n}):null]}),s?a.jsx("div",{className:"ok-section__actions",children:s}):null]}):null,d]})}),qc='a[href], button, input:not([type="hidden"]), select, textarea, [tabindex]';function Ln(t){return Array.from(t.querySelectorAll(qc)).filter(e=>!e.disabled&&e.getAttribute("aria-hidden")!=="true"&&!e.closest("[hidden], [inert]"))}function Vc(t){const e=t;if(!e||!e.tagName)return!1;if(e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT")return!0;if(e.tagName!=="INPUT")return!1;const n=e.type;return!["button","checkbox","radio","submit","reset","image","file","color"].includes(n)}function Na(t,e,n,s,r=!0){if(n===0)return null;const o=s==="horizontal"?"ArrowLeft":"ArrowUp",i=s==="horizontal"?"ArrowRight":"ArrowDown";return t==="Home"?0:t==="End"?n-1:t===i?e+1<n?e+1:r?0:e:t===o?e>0?e-1:r?n-1:e:null}const Wc=c.forwardRef(function({orientation:e="horizontal",gap:n,loop:s=!0,wrap:r=!1,className:o,style:i,onKeyDown:l,onFocus:d,...u},f){const m=c.useRef(null),h=c.useRef(null),b=()=>{const g=m.current;if(!g)return;const w=Ln(g);if(!w.length)return;const x=h.current&&w.includes(h.current)?h.current:w[0];h.current=x,w.forEach(j=>{j.tabIndex=j===x?0:-1})};ve(b);const p=g=>{d==null||d(g);const w=m.current,x=g.target;w&&x!==w&&Ln(w).includes(x)&&(h.current=x,b())},v=g=>{l==null||l(g);const w=m.current;if(g.defaultPrevented||!w||g.altKey||g.ctrlKey||g.metaKey||Vc(g.target))return;const x=Ln(w),j=x.indexOf(g.target);if(j<0)return;const _=Na(g.key,j,x.length,e,s);_!==null&&(g.preventDefault(),x[_].focus())};return a.jsx("div",{ref:xe(f,m),role:"toolbar","aria-orientation":e,className:L("ok-l ok-toolbar",o),"data-orientation":e,"data-wrap":r&&e==="horizontal"?"":void 0,style:lt({gap:n},i),onFocus:p,onKeyDown:v,...u})}),Gt=c.createContext(!1),Gc=c.forwardRef(function({collapsed:e,className:n,children:s,...r},o){const i=c.useContext(Gt),l=e??i,d=c.useRef(null);return ve(()=>{const u=d.current;if(!u)return;const f=()=>{const b=u.querySelector('.ok-nav__item[aria-current]:not([aria-current="false"])');if(!b){u.removeAttribute("data-ready");return}u.style.setProperty("--y",b.offsetTop+"px"),u.style.setProperty("--h",b.offsetHeight+"px"),u.hasAttribute("data-ready")||(u.offsetWidth,u.setAttribute("data-ready",""))};f();const m=typeof ResizeObserver<"u"?new ResizeObserver(f):null;m==null||m.observe(u);const h=typeof MutationObserver<"u"?new MutationObserver(f):null;return h==null||h.observe(u,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current"]}),()=>{m==null||m.disconnect(),h==null||h.disconnect()}},[]),a.jsx(Gt.Provider,{value:l,children:a.jsxs("nav",{ref:xe(o,d),className:L("ok-nav",n),"data-collapsed":l?"":void 0,...r,children:[a.jsx("span",{className:"ok-nav__pill","aria-hidden":"true"}),s]})})}),Uc=c.forwardRef(function({label:e,className:n,children:s,...r},o){const i=c.useId(),l=e!=null&&e!==!1;return a.jsxs("div",{ref:o,role:"group","aria-labelledby":l?i:void 0,className:L("ok-nav__group",n),...r,children:[l?a.jsx("div",{id:i,className:"ok-nav__group-label",children:a.jsx("span",{children:e})}):null,s]})}),Yc=c.forwardRef(function({as:e,current:n,icon:s,badge:r,sub:o,label:i,disabled:l,href:d,className:u,children:f,onClick:m,title:h,...b},p){const v=c.useContext(Gt),g=e??(d!==void 0?"a":"button"),w=i??(typeof f=="string"||typeof f=="number"?String(f):void 0),x=r!=null&&r!==!1,j=k=>{if(l){k.preventDefault();return}m==null||m(k)},_={...d!==void 0&&!l?{href:d}:null,...g==="button"?{type:"button",...l?{disabled:!0}:null}:null};return a.jsxs(g,{ref:p,className:L("ok-nav__item ok-focusable",o&&"ok-nav__item--sub",u),..._,"aria-current":n?"page":void 0,"aria-disabled":l?!0:void 0,"aria-label":v?w:void 0,title:h??(v?w:void 0),"data-has-badge":x?"":void 0,onClick:j,...b,children:[s?a.jsx("span",{className:"ok-nav__icon","aria-hidden":"true",children:s}):null,a.jsx("span",{className:"ok-nav__label",children:f}),x?a.jsx("span",{className:"ok-nav__badge",children:r}):null]})}),Ma=c.createContext(null);function xt(t){const e=c.useContext(Ma);if(!e)throw new Error(`${t} 必须放在 <AppShell> 里面`);return e}function Kc(){const{root:t,floatGap:e,...n}=xt("useAppShell()");return n}const Xc=c.forwardRef(function({contained:e=!1,collapsed:n="auto",collapseBelow:s="md",asideCollapseBelow:r="lg",sidebarOpen:o,defaultSidebarOpen:i=!1,onSidebarOpenChange:l,asideOpen:d,defaultAsideOpen:u,onAsideOpenChange:f,rail:m,defaultRail:h=!1,onRailChange:b,gap:p,skipLinkLabel:v,mainId:g,className:w,style:x,children:j,..._},k){const R=he().messages.appShell.skipLink,M=v??R,C=c.useId(),A=g??`ok-main-${C.replace(/[^a-zA-Z0-9_-]/g,"")}`,[E,N]=c.useState(null),[y,S]=le(o,i,l),[B,D]=le(m,h,b),I=pt(s),O=pt(r),[T,F]=c.useState(null);ve(()=>{if(!E||!e){F(null);return}const ee=()=>{const U=E.getBoundingClientRect().width;F(U>0?U:null)};if(ee(),typeof ResizeObserver>"u")return;const ie=new ResizeObserver(ee);return ie.observe(E),()=>ie.disconnect()},[E,e]);const q=(ee,ie)=>e?T===null||T>=hn[ee]:ie,G=n==="auto"?!q(s,I):n,V=n==="auto"?!q(r,O):n,[Z,K]=le(d,u??!V,f),P=d!==void 0,z=c.useRef(V),$=z.current===V?Z:V?!1:P?Z:u??!0;c.useEffect(()=>{!G&&y&&S(!1)},[G,y,S]),c.useEffect(()=>{z.current!==V&&(z.current=V,V?K(!1):P||K(u??!0))},[V,P,u,K]);const Y=c.useMemo(()=>({sidebarCollapsed:G,asideCollapsed:V,sidebarOpen:y,setSidebarOpen:S,openSidebar:()=>S(!0),closeSidebar:()=>S(!1),toggleSidebar:()=>G?S(ee=>!ee):D(ee=>!ee),rail:B,setRail:D,toggleRail:()=>D(ee=>!ee),asideOpen:$,setAsideOpen:K,toggleAside:()=>K(ee=>!ee),contained:e,mainId:A,root:E,floatGap:p!==void 0?wc(p):void 0}),[G,V,y,S,B,D,$,K,e,A,E,p]),X=ee=>{const ie=document.getElementById(A);ie&&(ee.preventDefault(),ie.focus())};return a.jsx(Ma.Provider,{value:Y,children:a.jsxs("div",{ref:xe(k,N),className:L("ok-shell",w),"data-contained":e?"":void 0,"data-collapsed":String(n),"data-collapse-below":s,"data-aside-collapse-below":r,style:p!==void 0?{"--ok-shell-gap":et(p),...x}:x,..._,children:[a.jsx("a",{className:"ok-skip-link ok-focusable",href:`#${A}`,onClick:X,children:M}),j]})})}),Jc=c.forwardRef(function({variant:e="plain",className:n,...s},r){return xt("<AppShell.Header>"),a.jsx("header",{ref:r,className:L("ok-shell__header",n),"data-variant":e,...s})}),Zc=c.forwardRef(function({variant:e="plain",className:n,...s},r){return xt("<AppShell.Footer>"),a.jsx("footer",{ref:r,className:L("ok-shell__footer",n),"data-variant":e,...s})});function Ra(t){const{role:e,...n}=t;return n}const Qc=t=>typeof t=="number"?`${t}px`:t;function Sa(t,e,n,s){return{...e!==void 0?{[`--ok-shell-${t}-w`]:Qc(e)}:null,...n!==void 0?{"--ok-shell-card-pad":et(n)}:null,...s}}const ed=c.forwardRef(function({label:e,width:n,drawerWidth:s=300,padding:r,closeOnNavigate:o=!0,className:i,style:l,children:d,...u},f){const m=he().messages.appShell.sidebar,h=e??m,b=xt("<AppShell.Sidebar>"),p=Sa("sidebar",n,r,l);return b.sidebarCollapsed?a.jsx(it,{...Ra(u),ref:f,open:b.sidebarOpen,onOpenChange:b.setSidebarOpen,placement:"left",modal:!0,size:s,gap:b.floatGap,container:b.contained?b.root:void 0,contained:b.contained,"aria-label":h,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:p,children:a.jsx(Gt.Provider,{value:!1,children:a.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Ca(v,b.setSidebarOpen):void 0,children:d})})}):a.jsx("aside",{ref:f,"aria-label":h,className:L("ok-shell__sidebar ok-shell-card ok-scroll",i),"data-rail":b.rail?"":void 0,style:p,...u,children:a.jsx(Gt.Provider,{value:b.rail,children:d})})}),td=c.forwardRef(function({label:e,width:n,drawerWidth:s=360,padding:r,closeOnNavigate:o=!1,className:i,style:l,children:d,...u},f){const m=he().messages.appShell.aside,h=e??m,b=xt("<AppShell.Aside>"),p=Sa("aside",n,r,l);return b.asideCollapsed?a.jsx(it,{...Ra(u),ref:f,open:b.asideOpen,onOpenChange:b.setAsideOpen,placement:"right",modal:!0,size:s,gap:b.floatGap,container:b.contained?b.root:void 0,contained:b.contained,"aria-label":h,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:p,children:a.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Ca(v,b.setAsideOpen):void 0,children:d})}):b.asideOpen?a.jsx("aside",{ref:f,"aria-label":h,className:L("ok-shell__aside ok-shell-card ok-scroll",i),style:p,...u,children:d}):null});function Ca(t,e){var s,r;const n=(r=(s=t.target).closest)==null?void 0:r.call(s,"a[href], .ok-nav__item");n&&n.getAttribute("aria-disabled")!=="true"&&e(!1)}const nd=c.forwardRef(function({className:e,id:n,tabIndex:s,...r},o){const i=xt("<AppShell.Main>");return a.jsx("main",{ref:o,id:n??i.mainId,tabIndex:s??-1,className:L("ok-shell__main ok-scroll",e),...r})}),sd=c.forwardRef(function({target:e="sidebar",label:n,drawerOnly:s,className:r,children:o,onClick:i,...l},d){const{messages:u}=he(),f=xt("<AppShell.Trigger>"),m=e==="sidebar",h=m?f.sidebarCollapsed:f.asideCollapsed;if(!h&&s)return null;const b=m?h?f.sidebarOpen:!f.rail:f.asideOpen;return a.jsx("button",{ref:d,type:"button",className:L("ok-btn ok-btn--ghost ok-btn--icon ok-focusable",r),"aria-label":n??(m?u.appShell.toggleSidebar:u.appShell.toggleAside),"aria-expanded":b,"aria-haspopup":h?"dialog":void 0,onClick:Ut(i,()=>m?f.toggleSidebar():f.toggleAside()),...l,children:o??a.jsx(pe,{children:a.jsx("path",{d:"M3.5 6h13M3.5 10h13M3.5 14h13"})})})}),rd=Object.assign(Xc,{Header:Jc,Sidebar:ed,Main:nd,Aside:td,Footer:Zc,Trigger:sd}),Ea=c.createContext(null),Xs=t=>typeof t=="number"?`${t}px`:t,ad=c.forwardRef(function({value:e,defaultValue:n,onChange:s,action:r,position:o="fixed",layout:i="auto",insetStart:l,insetEnd:d,className:u,style:f,children:m,onKeyDown:h,...b},p){const[v,g]=le(e,n,s),w=c.useRef(null),[x,j]=c.useState(0),_=()=>{const M=w.current;if(!M)return;const C=M.querySelector('.ok-tabbar__item[aria-current="page"]');if(!C){M.removeAttribute("data-ready");return}M.style.setProperty("--x",C.offsetLeft+"px"),M.style.setProperty("--w",C.offsetWidth+"px"),M.hasAttribute("data-ready")||(M.offsetWidth,M.setAttribute("data-ready",""))},k=c.useRef(_);k.current=_,ve(()=>{var C;const M=(C=w.current)!=null&&C.querySelector(".ok-tabbar__label")?w.current.querySelectorAll(".ok-tabbar__item").length:0;M!==x&&j(M),_()}),ve(()=>{const M=w.current;if(!M||typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>k.current());return C.observe(M),()=>C.disconnect()},[]);const R=M=>{h==null||h(M);const C=w.current;if(M.defaultPrevented||!C||M.altKey||M.ctrlKey||M.metaKey)return;const A=Array.from(C.querySelectorAll('.ok-tabbar__item:not([aria-disabled="true"])')),E=A.indexOf(M.target);if(E<0)return;const N=Na(M.key,E,A.length,"horizontal");N!==null&&(M.preventDefault(),A[N].focus())};return a.jsx(Ea.Provider,{value:{value:v,select:g},children:a.jsxs("nav",{ref:p,className:L("ok-tabbar",u),"data-position":o,"data-layout":i==="auto"?x>=4?"stacked":"inline":i,style:l!==void 0||d!==void 0?{"--ok-tabbar-inset-start":Xs(l),"--ok-tabbar-inset-end":Xs(d),...f}:f,onKeyDown:R,...b,children:[a.jsxs("div",{ref:w,className:"ok-tabbar__list",children:[a.jsx("span",{className:"ok-tabbar__thumb","aria-hidden":"true"}),m]}),r?a.jsx("div",{className:"ok-tabbar__action",children:r}):null]})})}),Aa=c.forwardRef(function({value:e,as:n,icon:s,badge:r,label:o,disabled:i,href:l,className:d,children:u,onClick:f,...m},h){const b=c.useContext(Ea),p=n??(l!==void 0?"a":"button"),v=(b==null?void 0:b.value)===e,g=j=>{if(i){j.preventDefault();return}f==null||f(j),j.defaultPrevented||b==null||b.select(e)},w=u!=null&&u!==!1,x={...l!==void 0&&!i?{href:l}:null,...p==="button"?{type:"button",...i?{disabled:!0}:null}:null};return a.jsxs(p,{ref:h,className:L("ok-tabbar__item ok-focusable",d),...x,"aria-current":v?"page":void 0,"aria-disabled":i?!0:void 0,"aria-label":w?void 0:o,"data-value":e,onClick:g,...m,children:[s?a.jsx("span",{className:"ok-tabbar__icon","aria-hidden":"true",children:s}):null,w?a.jsx("span",{className:"ok-tabbar__label",children:u}):null,r!=null&&r!==!1?a.jsx("span",{className:"ok-tabbar__badge",children:r}):null]})}),od=Object.assign(ad,{Item:Aa}),id=c.forwardRef(function({orientation:e="horizontal",value:n,defaultValue:s=50,onChange:r,min:o=20,max:i=80,step:l=2,stackBelow:d="md",stacked:u,separatorLabel:f,className:m,style:h,children:b,...p},v){const{messages:g}=he(),w=f??g.splitPane.separator,[x,j]=le(n,s,r),_=c.useRef(null),k=c.useRef(null),R=c.useRef(!1),[M,C]=c.useState(!1),[A,E]=c.useState(!1),N=c.useId(),[y,S]=c.Children.toArray(b),B=ye(x,o,i),D=e==="horizontal",I=D?d:!1;ve(()=>{const P=_.current;if(!P||u!==void 0||I===!1){E(!1);return}const z=hn[I],$=()=>{const X=P.getBoundingClientRect().width;E(X>0&&X<z)};if($(),typeof ResizeObserver>"u")return;const Y=new ResizeObserver($);return Y.observe(P),()=>Y.disconnect()},[u,I]);const O=u??A,T=P=>j(ye(Math.round(P*10)/10,o,i)),F=P=>{const z=k.current;if(!z)return;const $=z.getBoundingClientRect(),Y=D?$.width:$.height;if(Y<=0)return;let X=D?(P.clientX-$.left)/Y:(P.clientY-$.top)/Y;D&&getComputedStyle(z).direction==="rtl"&&(X=1-X),T(X*100)},q=P=>{var z,$;O||P.button!==0||(P.preventDefault(),P.currentTarget.focus(),($=(z=P.currentTarget).setPointerCapture)==null||$.call(z,P.pointerId),R.current=!0,C(!0))},G=P=>{R.current&&F(P)},V=P=>{var z,$;R.current&&(R.current=!1,C(!1),($=(z=P.currentTarget).releasePointerCapture)==null||$.call(z,P.pointerId))},Z=P=>{if(He(P)||O)return;const z=P.shiftKey?10:l,$=D?"ArrowLeft":"ArrowUp",Y=D?"ArrowRight":"ArrowDown";let X=null;P.key===$?X=B-z:P.key===Y?X=B+z:P.key==="Home"?X=o:P.key==="End"?X=i:P.key==="Enter"&&(X=s),X!==null&&(P.preventDefault(),T(X))},K=!O;return a.jsx("div",{ref:xe(v,_),className:L("ok-split",m),"data-orientation":e,"data-stack-below":u===void 0&&I?I:void 0,"data-stacked":u!==void 0?String(u):A?"true":void 0,"data-dragging":M?"":void 0,style:{"--ok-split-size":B,...h},...p,children:a.jsxs("div",{ref:k,className:"ok-split__track",children:[a.jsx("div",{id:N,className:"ok-split__pane ok-split__pane--first",children:y}),a.jsx("div",{role:"separator",className:"ok-split__sep ok-focusable",tabIndex:K?0:void 0,"aria-orientation":O?"horizontal":D?"vertical":"horizontal","aria-label":K?w:void 0,"aria-controls":K?N:void 0,"aria-valuenow":K?Math.round(B):void 0,"aria-valuemin":K?o:void 0,"aria-valuemax":K?i:void 0,onPointerDown:q,onPointerMove:G,onPointerUp:V,onPointerCancel:V,onDoubleClick:K?()=>T(s):void 0,onKeyDown:Z}),a.jsx("div",{className:"ok-split__pane ok-split__pane--second",children:S})]})})});exports.ACCENTS=Ar;exports.Accordion=Vl;exports.Alert=Ql;exports.AppShell=rd;exports.AspectRatio=Dc;exports.Autocomplete=gl;exports.Avatar=ms;exports.AvatarGroup=fc;exports.BREAKPOINTS=hn;exports.Badge=Kl;exports.Box=Rc;exports.Breadcrumb=Wl;exports.Button=Dr;exports.ButtonGroup=Ro;exports.Calendar=fa;exports.Card=Sl;exports.CardBody=Al;exports.CardFooter=Tl;exports.CardHeader=El;exports.CardLink=Cl;exports.CardMedia=$l;exports.Center=Ic;exports.Checkbox=Ho;exports.CheckboxGroup=Vo;exports.Chip=Zo;exports.ChipGroup=ti;exports.Cluster=Cc;exports.Code=mc;exports.CodeBlock=vc;exports.ColorPicker=ii;exports.ColorSwatches=Vr;exports.Combobox=da;exports.CommandPalette=Ki;exports.Confirmer=ta;exports.Container=Pc;exports.ContextMenu=hl;exports.Count=Jl;exports.DatePicker=yl;exports.DateRangePicker=_l;exports.DescriptionItem=ba;exports.DescriptionList=Ol;exports.Dialog=Qr;exports.Divider=_a;exports.Dots=ic;exports.Drawer=Ii;exports.DropdownMenu=ul;exports.EmptyState=lc;exports.Field=Do;exports.FieldContext=Le;exports.Fieldset=Oo;exports.FileDrop=pi;exports.FloatingBody=Ni;exports.FloatingCard=it;exports.FloatingFooter=Mi;exports.FloatingGrip=Zr;exports.FloatingHeader=ji;exports.FloatingPanel=Bi;exports.FocusScope=rr;exports.Form=Fo;exports.FormActions=zo;exports.Grid=Tc;exports.GridItem=$c;exports.Group=Pl;exports.Heading=Nl;exports.Hide=xc;exports.Hotkey=di;exports.ICONS=Xn;exports.Icon=pe;exports.Image=ma;exports.Inline=ja;exports.Input=ss;exports.KEY_SYMBOL=Wr;exports.Kbd=li;exports.LOGO_SNOUT_MIN_CONTRAST=On;exports.Label=Bo;exports.List=Ll;exports.ListItem=Dl;exports.LocaleProvider=vr;exports.Menu=kn;exports.MenuCheckboxItem=al;exports.MenuItem=rl;exports.MenuLabel=cl;exports.MenuRadioGroup=ol;exports.MenuRadioItem=il;exports.MenuSeparator=ll;exports.MenuSub=dl;exports.Meter=sc;exports.MultiSelect=bl;exports.Nav=Gc;exports.NavGroup=Uc;exports.NavItem=Yc;exports.NumberInput=Po;exports.OINK_LOGO_INK_PATH=Ir;exports.OINK_LOGO_NOSTRILS=Hn;exports.OINK_LOGO_SNOUT=rn;exports.OINK_MESSAGES=Vt;exports.ON_ACCENT_THRESHOLD=ur;exports.OinkLogo=jo;exports.OinkProvider=wo;exports.OptionCard=ni;exports.OptionCardGroup=si;exports.Page=Fc;exports.PageHeader=zc;exports.Pagination=ga;exports.Panel=na;exports.PinInput=Io;exports.Popover=us;exports.Portal=gt;exports.Progress=ec;exports.ProgressRing=nc;exports.Radio=Wo;exports.RadioGroup=Go;exports.RangeCalendar=ha;exports.RangeSlider=Ko;exports.Rating=fi;exports.Reaction=pc;exports.Roll=wn;exports.Row=Il;exports.SERVER_LOCALE=mr;exports.ScrollArea=Bc;exports.SearchInput=Ao;exports.Section=Hc;exports.Segmented=Jo;exports.Select=pl;exports.Sheet=Li;exports.Show=gc;exports.Skeleton=rc;exports.Slider=Yo;exports.Spacer=Lc;exports.Spinner=oc;exports.SplitPane=id;exports.Stack=Sc;exports.Stat=cc;exports.Steps=Gl;exports.Sticky=Oc;exports.Surface=Ml;exports.Switch=Uo;exports.TAIL_PATH=hr;exports.THEME_REVEAL_MS=$r;exports.TabBar=od;exports.TabBarItem=Aa;exports.Table=Hl;exports.Tabs=ql;exports.Tag=Xl;exports.TailGlyph=Qn;exports.TailProvider=pr;exports.Text=jl;exports.Textarea=Eo;exports.Timeline=Ul;exports.Toaster=Wi;exports.ToggleButton=So;exports.Toolbar=Wc;exports.Tooltip=el;exports.Tree=Yl;exports.VisuallyHidden=Jn;exports.accentVars=Fn;exports.animate=Ne;exports.burst=ya;exports.canUseDOM=Ae;exports.captureFocusTrail=Yn;exports.chain=Ut;exports.clamp=ye;exports.clampCornerRadii=kr;exports.computePosition=aa;exports.confirm=Ti;exports.contrastRatio=qt;exports.cornerFallbackActive=co;exports.cornerFallbackNeeded=Sr;exports.cornerHandles=gr;exports.cornerShapePath=$e;exports.cx=L;exports.detectLocale=br;exports.ease=ze;exports.flip=Da;exports.floatMotion=er;exports.formatISODate=Ge;exports.getFocusable=Ht;exports.hexToHsv=lr;exports.hsvToHex=cr;exports.hsvToRgb=ir;exports.initialsOf=xa;exports.installCornerFallback=Cr;exports.isAccent=Tr;exports.isCustomAccent=Ft;exports.keyName=cn;exports.keySymbol=rs;exports.logoSnoutColors=Bn;exports.luminance=Dn;exports.mergeRefs=xe;exports.normalizeAccent=ts;exports.normalizeHex=Je;exports.onAccentColor=fr;exports.paginationRange=va;exports.parseCornerShape=yr;exports.parseHex=Et;exports.parseISODate=ps;exports.perceivedLightness=Zn;exports.playFlip=un;exports.presets=Un;exports.resolveFloatSize=bn;exports.resolveTriggerPoint=Ur;exports.restoreFocusTo=Kn;exports.rgbToHsv=or;exports.speed=Ue;exports.spring=Gn;exports.supportsLinear=Qs;exports.toHex=bt;exports.toast=Hi;exports.useAppShell=Kc;exports.useBreakpoint=pt;exports.useBusy=Co;exports.useControllable=le;exports.useCornerFallback=Er;exports.useEscape=Kt;exports.useEvent=ke;exports.useFieldControl=we;exports.useFloatingCard=Jr;exports.useInertOthers=nr;exports.useIsoLayoutEffect=ve;exports.useLocale=he;exports.useMediaQuery=fn;exports.useOink=_o;exports.useOutsidePress=Oa;exports.usePosition=gn;exports.usePresence=Yt;exports.useScrollLock=tr;exports.useTail=Wa;exports.wait=Ia;