@antadesign/anta 0.3.21 → 0.3.23

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.
Files changed (75) hide show
  1. package/dist/avatar-core.d.ts +160 -0
  2. package/dist/avatar-core.js +271 -0
  3. package/dist/bundle.css +1 -0
  4. package/dist/bundle.d.ts +11 -0
  5. package/dist/bundle.js +1239 -0
  6. package/dist/components/Avatar.d.ts +63 -0
  7. package/dist/components/Avatar.js +29 -0
  8. package/dist/components/Button.d.ts +1 -1
  9. package/dist/components/Button.js +12 -5
  10. package/dist/components/Checkbox.js +6 -2
  11. package/dist/components/Input.d.ts +2 -1
  12. package/dist/components/Input.js +1 -1
  13. package/dist/components/InputDate.js +1 -0
  14. package/dist/components/Loader.d.ts +5 -1
  15. package/dist/components/Loader.js +2 -1
  16. package/dist/components/Menu.d.ts +6 -1
  17. package/dist/components/Menu.js +2 -0
  18. package/dist/components/RadioGroup.js +21 -5
  19. package/dist/components/Select.d.ts +3 -1
  20. package/dist/components/Select.js +1 -0
  21. package/dist/components/SelectFaceted.d.ts +4 -2
  22. package/dist/components/Slider.d.ts +1 -1
  23. package/dist/components/Steps.css +1 -0
  24. package/dist/components/Steps.d.ts +93 -0
  25. package/dist/components/Steps.js +128 -0
  26. package/dist/components/Tabs.d.ts +10 -5
  27. package/dist/components/Tabs.js +5 -2
  28. package/dist/components/Tooltip.d.ts +5 -5
  29. package/dist/elements/a-avatar.css +1 -0
  30. package/dist/elements/a-avatar.d.ts +31 -0
  31. package/dist/elements/a-avatar.js +98 -0
  32. package/dist/elements/a-checkbox.css +1 -1
  33. package/dist/elements/a-icon.shapes.css +1 -1
  34. package/dist/elements/a-icon.shapes.d.ts +1 -8
  35. package/dist/elements/a-icon.shapes.js +0 -14
  36. package/dist/elements/a-input-time.css +1 -1
  37. package/dist/elements/a-input-time.js +1 -1
  38. package/dist/elements/a-input.css +1 -1
  39. package/dist/elements/a-input.js +1 -1
  40. package/dist/elements/a-loader.css +1 -1
  41. package/dist/elements/a-menu.d.ts +4 -2
  42. package/dist/elements/a-menu.js +122 -4
  43. package/dist/elements/a-radio.css +1 -1
  44. package/dist/elements/a-slider.css +1 -1
  45. package/dist/elements/a-switch.css +1 -1
  46. package/dist/elements/a-tabs.css +1 -1
  47. package/dist/elements/a-tooltip.d.ts +4 -4
  48. package/dist/elements/a-tooltip.js +18 -15
  49. package/dist/elements/index.d.ts +1 -0
  50. package/dist/elements/index.js +3 -0
  51. package/dist/general_types.d.ts +42 -0
  52. package/dist/index.d.ts +6 -0
  53. package/dist/index.js +28 -0
  54. package/dist/jsx-runtime.d.ts +6 -1
  55. package/dist/theme-anta.css +1 -1
  56. package/docs/changelog.md +68 -0
  57. package/docs/comparison.md +2 -2
  58. package/docs/components/banner.md +1 -1
  59. package/docs/components/button.md +3 -3
  60. package/docs/components/card.md +1 -1
  61. package/docs/components/expander.md +1 -1
  62. package/docs/components/input.md +3 -3
  63. package/docs/components/loader.md +1 -0
  64. package/docs/components/menu.md +34 -1
  65. package/docs/components/radio.md +1 -1
  66. package/docs/components/select-faceted.md +4 -2
  67. package/docs/components/select.md +3 -1
  68. package/docs/components/slider.md +1 -1
  69. package/docs/components/steps.md +324 -0
  70. package/docs/components/tabs.md +24 -8
  71. package/docs/components/tag.md +3 -3
  72. package/docs/components/tooltip.md +5 -5
  73. package/docs/index.md +1 -0
  74. package/docs/install-config.md +17 -0
  75. package/package.json +9 -3
package/dist/bundle.js ADDED
@@ -0,0 +1,1239 @@
1
+ import Qn from"react";var Ua=Qn.createElement,pe=Qn.Fragment,wc=Qn.useState,kc=Qn.useId,Cc=Qn.useMemo,Ec=Qn.useSyncExternalStore;function $m(t,e,n){Ua=t,e!==void 0&&(pe=e),n?.useState&&(wc=n.useState),n?.useId&&(kc=n.useId),n?.useMemo&&(Cc=n.useMemo),n?.useSyncExternalStore&&(Ec=n.useSyncExternalStore)}function U(t){return wc(t)}function qt(){return kc()}function Ye(t,e){return Cc(t,e)}function Sc(t,e,n){return Ec(t,e,n)}function p(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,a):Ua(t,o)}function A(t,e,n){let{children:a,...r}=e??{},o=n!==void 0?{...r,key:n}:r;return a!==void 0?Ua(t,o,...a):Ua(t,o)}function Tc(t){return Array.isArray(t)?t.length>0:t!=null}function ot(t,e=!1){let n={};for(let[a,r]of Object.entries(t))(a==="className"||a==="style"||a.startsWith("data-")&&(!e||!a.startsWith("data-menu-")&&a!=="data-anta-menu-item"))&&(n[a]=r);return n}function Br(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((a,r)=>typeof a=="string"?a.trim()===""?null:p(e,{children:a},r):typeof a=="number"?Number.isNaN(a)?null:p(e,{children:a},r):a==null||typeof a=="boolean"?null:a)}function J(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}var Um=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),Rr=Um?"\u2325+Click to select only this":"Alt+Click to select only this";function Zt(t){return t==="open"?"open":"closed"}function Fr(t,e,n){t.addEventListener("click",a=>{let r=a.target;if(!(r instanceof Element))return;let o=r.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Ym=new Set(["brand","neutral","info","success","warning","critical"]);function F(t,e,n){return t!=null&&!Ym.has(t)?{...n,[e]:t}:n}function Vr(t){return typeof t=="number"?`${t}px`:t||void 0}function on(t,e,n){let a=Vr(t);return a?{...n,[e]:a}:n}function Q(t,e,n){return on(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function G(t){return t||t===0?"":void 0}var Wm=2e3;function Hr(t,e,n){let[a,r]=U("idle"),o=Ye(()=>({timer:void 0}),[]);return{shownIcon:a==="ok"?"check":a==="fail"?"x":t,shownTone:a==="ok"?"success":a==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),r(c?"ok":"fail"),o.timer=setTimeout(()=>r("idle"),Wm),n?.(c)}}}function Dt(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ai=null;function Ac(t){Ai=t}function Mc(){return Ai?.isOpen()??!1}function Ic(t){return Ai?.contains(t)??!1}var Gm=typeof HTMLElement<"u"?HTMLElement:class{},P=class extends Gm{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}},ea=class extends P{static observedAttributes=["selected"];ariaProp="ariaChecked";internals=this.attachInternals?.();connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"selected")){let e=this.selected;delete this.selected,this.selected=e}this.hasAttribute("selected")&&this.applyState(!0)}attributeChangedCallback(e){e==="selected"&&this.applyState(this.hasAttribute("selected"))}get selected(){return this.internals?.states.has("selected")??!1}set selected(e){this.applyState(!!e)}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}applyState(e){this.internals&&(e?this.internals.states.add("selected"):this.internals.states.delete("selected"),this.internals[this.ariaProp]=e?"true":"false")}};function _c(t){let e=1779033703^t.length;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),3432918353),e=e<<13|e>>>19;return e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0}function Oc(t){let e=t>>>0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var Pc=t=>Oc(_c(t));function Oi(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var Km=.4;function Xm(t,e,n){let a=n*Math.PI/180,r=e*Math.cos(a),o=e*Math.sin(a),i=(t+.3963377774*r+.2158037573*o)**3,s=(t-.1055613458*r-.0638541728*o)**3,l=(t-.0894841775*r-1.291485548*o)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*l,-1.2684380046*i+2.6097574011*s-.3413193965*l,-.0041960863*i-.7034186147*s+1.707614701*l]}function Jm(t,e,n){let[a,r,o]=Xm(t,e,n),i=8e-4;return a>=-i&&a<=1+i&&r>=-i&&r<=1+i&&o>=-i&&o<=1+i}function Nc(t,e){let n=0,a=Km;for(let r=0;r<18;r++){let o=(n+a)/2;Jm(t,o,e)?n=o:a=o}return n}var gt=(t,e=3)=>Math.round(t*10**e)/10**e;function jr(t,e,n){let a=Math.min(e,Nc(t,n));return`oklch(${gt(t)} ${gt(a)} ${gt((n%360+360)%360,1)})`}function zi(t){let e=t.trim(),n=/^oklch\(\s*([\d.]+)/i.exec(e);if(n)return Math.max(0,Math.min(1,parseFloat(n[1])));let a=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(a){let r=a[1];r.length===3&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);let o=parseInt(r.slice(0,2),16)/255,i=parseInt(r.slice(2,4),16)/255,s=parseInt(r.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var sn={figureScale:{range:[.76,1.2],off:1},figureAngle:{range:[-15,15],off:0},headAngle:{range:[-20,20],off:0},bodyAngle:{range:[-16,16],off:0},figureGap:{range:[.12,.42],off:.25},headRadiusTop:{range:[.35,1.25],off:1,bias:.6},headRadiusBottom:{range:[.45,1.5],off:1,bias:.6},bodyBorderRadius:{range:[.25,1],off:1}},Ya={x:[-15,15],y:[-14,4],off:[0,0]},Mi={bgColor:{l:[.5,.82],c:[.02,.12],h:[0,360],off:"oklch(0.7 0 0)"},headColor:{l:[.78,.96],c:[.015,.075],h:[0,360],off:"oklch(0.9 0 0)"},bodyColor:{l:[.68,.9],c:[.015,.09],h:[0,360],off:"oklch(0.88 0 0)"}},Dn={bgColor:{mode:"any"},headColor:{mode:"any"},bodyColor:{mode:"any"},figureScale:{mode:"any"},figureTranslate:{mode:"any"},figureAngle:{mode:"any"},headAngle:{mode:"any"},bodyAngle:{mode:"any"},figureGap:{mode:"any"},headRadiusTop:{mode:"any"},headRadiusBottom:{mode:"any"},bodyBorderRadius:{mode:"any"},harmony:!0},In=(t,e,n)=>e+(n-e)*t,Pi=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function ln(t,e,n){let a=e?.mode??"any";return a==="off"?n.off:a==="list"&&e?.values?.length?Pi(t(),e.values):a==="range"?In(t(),e?.min??n.range[0],e?.max??n.range[1]):In(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function Qm(t,e){let n=e?.mode??"off";if(n==="off")return Ya.off;if(n==="list"&&e?.values?.length)return Pi(t(),e.values);let a=n==="range"?e?.x??Ya.x:Ya.x,r=n==="range"?e?.y??Ya.y:Ya.y;return[In(t(),a[0],a[1]),In(t(),r[0],r[1])]}function Ii(t,e,n,a){let r=e?.mode??"any";if(r==="off")return{color:n.off,l:zi(n.off)};if(r==="list"&&e?.values?.length){let u=Pi(t(),e.values);return{color:u,l:zi(u)}}let o=r==="range"?e?.l??n.l:n.l,i=r==="range"?e?.c??n.c:n.c,s=r==="range"?e?.h??n.h:n.h,l=In(t(),o[0],o[1]),c=In(t(),i[0],i[1]),d=a??In(t(),s[0],s[1]);return{color:jr(l,c,d),l}}var aa=100,Di=aa/2,na=40,_i=74,eb=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function Lc(t){return eb.some(e=>(t[e]?.mode??Dn[e].mode)!=="off")}function Ni(t,e){let n={...Dn,...t},a=Pc(e),r=Ii(a,n.bgColor,Mi.bgColor),o=Bc(r.color),i=Ii(a,n.headColor,Mi.headColor,n.harmony?o:void 0),s=Ii(a,n.bodyColor,Mi.bodyColor,n.harmony?o:void 0),l=ln(a,n.figureScale,sn.figureScale),c=Qm(a,n.figureTranslate),d=ln(a,n.figureAngle,sn.figureAngle),u=ln(a,n.headAngle,sn.headAngle),m=ln(a,n.bodyAngle,sn.bodyAngle),h=ln(a,n.figureGap,sn.figureGap),b=ln(a,n.headRadiusTop,sn.headRadiusTop),f=ln(a,n.headRadiusBottom,sn.headRadiusBottom),g=ln(a,n.bodyBorderRadius,sn.bodyBorderRadius),x=na/2,y=_i/2,k=aa/Math.min(1,l),S=b,M=Math.max(b,f),N=Math.min(S,1)*x,L=Math.min(M,1)*x,C=Math.max(0,S-1)*x,I=Math.max(0,M-1)*x;return{figure:Lc(t),bg:r.color,bgLightness:r.l,initialsColor:tb(r.color,r.l),scale:l,translate:c,angle:d,gap:h*(na+C+I),head:{color:i.color,radiusTop:N,radiusBottom:L,extendTop:C,extendBottom:I,angle:u},body:{color:s.color,radius:g*y,height:k,angle:m}}}function tb(t,e){let n=/^oklch\(/i.test(t.trim()),a=n?Bc(t):0;return e>.5?jr(.35,n?.06:0,a):jr(.95,n?.04:0,a)}function Bc(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var ta=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Li(t,e={}){let n=ta(t.bg),a=e.title?`<title>${ta(e.title)}</title>`:"",r=`<rect x="0" y="0" width="${aa}" height="${aa}" fill="${n}"/>`;if(!t.figure){let x=e.initials?`<text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="var(--avatar-font, system-ui, sans-serif)" font-weight="500" font-size="${nb(e.initials.length)}" fill="var(--avatar-initials-color, ${ta(t.initialsColor)})">${ta(e.initials)}</text>`:"";return zc(a+r+x)}let[o,i]=t.translate,s=`translate(${gt(o,2)} ${gt(i,2)}) rotate(${gt(t.angle,2)} 50 50) translate(50 50) scale(${gt(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Di-na/2-l,u=na+l+c,m=Dc(Di-na/2,d,na,u,t.head.radiusTop,t.head.radiusBottom),h=`<g transform="rotate(${gt(t.head.angle,2)} 50 50)"><path d="${m}" fill="${ta(t.head.color)}"/></g>`,b=d+u+t.gap,f=Dc(Di-_i/2,b,_i,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${gt(t.body.angle,2)} 50 ${gt(b,2)})"><path d="${f}" fill="${ta(t.body.color)}"/></g>`;return zc(`${a}${r}<g transform="${s}">${g}${h}</g>`)}function Dc(t,e,n,a,r,o){let i=Math.max(0,Math.min(r,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>a&&l>0){let u=a/l;i*=u,s*=u}let c=u=>gt(u,2),d=(u,m,h)=>`A${c(u)} ${c(u)} 0 0 1 ${c(m)} ${c(h)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+a-s)}`,s?d(s,t+n-s,e+a):"",`H${c(t+s)}`,s?d(s,t,e+a-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var zc=t=>`<svg viewBox="0 0 ${aa} ${aa}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,nb=t=>t>=3?30:t===2?38:46;var qr=class extends P{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=ab,this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),this.#e.style.display="none",e.append(n,this.#e)}#n(e){this.#t?this.#t.replaceWith(e):this.#e.before(e),this.#t=e}connectedCallback(){this.#r()}attributeChangedCallback(){this.#r()}#a(){let e=this.getAttribute("config");if(!e)return Dn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:Dn}catch{return Dn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,a=this.getAttribute("src");if(a){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=a,l.alt=n??"",l.loading="lazy",this.#n(l);return}let r=this.getAttribute("seed")??n??"",o=Ni(this.#a(),r),i=document.createElement("template");i.innerHTML=Li(o,{initials:Oi(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},ab=`
2
+ :host { display: inline-block; position: relative; vertical-align: middle; }
3
+ svg, img {
4
+ display: block;
5
+ inline-size: 100%;
6
+ block-size: 100%;
7
+ border-radius: var(--avatar-radius);
8
+ background: var(--avatar-placeholder-bg);
9
+ mask-image: var(--avatar-badge-mask);
10
+ }
11
+ img { object-fit: cover; }
12
+ .badge {
13
+ position: absolute;
14
+ right: var(--avatar-badge-inset);
15
+ bottom: var(--avatar-badge-inset);
16
+ inline-size: var(--avatar-badge-size);
17
+ block-size: var(--avatar-badge-size);
18
+ border-radius: 50%;
19
+ background: var(--avatar-badge-color);
20
+ }
21
+ `;function Rc(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",qr)}Rc();var Zr=class extends P{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
22
+ :host {
23
+ display: block;
24
+ position: relative;
25
+ overflow: hidden;
26
+ }
27
+ .indicator {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ bottom: 0;
32
+ width: var(--_percent, 0%);
33
+ background: var(--progress-indicator-bg);
34
+ border-radius: 0;
35
+ transition: width 0.2s ease;
36
+ }
37
+ .indicator::after {
38
+ content: '';
39
+ position: absolute;
40
+ top: 0;
41
+ right: 0;
42
+ bottom: 0;
43
+ width: 90px;
44
+ box-sizing: border-box;
45
+ background: var(--progress-indicator-edge);
46
+ border-right: var(--progress-indicator-edge-border, none);
47
+ }
48
+ :host(:not([value])) .indicator {
49
+ left: calc(0px - var(--progress-loading-x-period));
50
+ width: calc(100% + var(--progress-loading-x-period));
51
+ background: repeating-linear-gradient(
52
+ var(--progress-loading-angle),
53
+ transparent 0,
54
+ transparent var(--progress-loading-stripe-gap),
55
+ var(--progress-text-color) var(--progress-loading-stripe-gap),
56
+ var(--progress-text-color) calc(var(--progress-loading-stripe-gap) + var(--progress-loading-stripe))
57
+ );
58
+ filter: blur(var(--progress-loading-blur));
59
+ opacity: var(--progress-loading-opacity);
60
+ transition: none;
61
+ }
62
+ :host(:not([value])) .indicator::after { display: none; }
63
+ @media (prefers-reduced-motion: no-preference) {
64
+ :host(:not([value])) .indicator {
65
+ will-change: transform;
66
+ animation: progress-loading-slide var(--progress-loading-duration) linear infinite;
67
+ animation-delay: -9999s;
68
+ }
69
+ }
70
+ @keyframes progress-loading-slide {
71
+ to { transform: translateX(var(--progress-loading-x-period)); }
72
+ }
73
+ slot {
74
+ display: block;
75
+ position: relative;
76
+ }
77
+ `,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let a=document.createElement("slot");e.append(n,this.indicator,a)}connectedCallback(){this.update()}attributeChangedCallback(){this.update()}update(){let e=this.getAttribute("value");if(e==null){this.indicator.style.removeProperty("--_percent");return}let n=Number(e),a=Number(this.getAttribute("max")??100),r=Number.isFinite(n)&&Number.isFinite(a)&&a>0?Math.min(100,Math.max(0,n/a*100)):0;this.indicator.style.setProperty("--_percent",`${r}%`)}};function Fc(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",Zr)}Fc();var $r=class extends P{};function Vc(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",$r)}Vc();var rb=`
78
+ :host {
79
+ display: block;
80
+ position: relative;
81
+ }
82
+ :host([inline]) {
83
+ display: inline-block;
84
+ }
85
+
86
+ slot {
87
+ display: contents;
88
+ }
89
+
90
+ :host([truncate]) slot {
91
+ display: -webkit-box;
92
+ -webkit-box-orient: vertical;
93
+ -webkit-line-clamp: var(--line-clamp, 1);
94
+ overflow: hidden;
95
+ }
96
+
97
+ :host([truncate][expandable]) slot.overflowing:not(.expanded) {
98
+ -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 2em), transparent 97%);
99
+ mask-image: linear-gradient(to bottom, black calc(100% - 2em), transparent 97%);
100
+ }
101
+
102
+ :host([truncate="1"][expandable]) slot.overflowing:not(.expanded) {
103
+ -webkit-mask-image: linear-gradient(to right, black calc(100% - 7ch), transparent 97%);
104
+ mask-image: linear-gradient(to right, black calc(100% - 7ch), transparent 97%);
105
+ }
106
+
107
+ :host([truncate]) slot.expanded {
108
+ display: block;
109
+ -webkit-line-clamp: unset;
110
+ overflow: visible;
111
+ }
112
+
113
+ .expand-btn {
114
+ appearance: none;
115
+ background: transparent;
116
+ border: none;
117
+ margin: 0;
118
+ padding: 0;
119
+ color: var(--text-3);
120
+ cursor: pointer;
121
+ font: inherit;
122
+ display: none;
123
+ position: absolute;
124
+ z-index: 1;
125
+ opacity: 0;
126
+ transition: opacity 150ms ease-out, color 150ms ease-out;
127
+ }
128
+ .expand-btn:hover {
129
+ color: var(--text-1);
130
+ }
131
+ .expand-btn::before {
132
+ content: '';
133
+ position: absolute;
134
+ right: -1px;
135
+ bottom: -1px;
136
+ width: 14px;
137
+ height: 14px;
138
+ background-color: currentColor;
139
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
140
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
141
+ -webkit-mask-position: center;
142
+ mask-position: center;
143
+ -webkit-mask-repeat: no-repeat;
144
+ mask-repeat: no-repeat;
145
+ -webkit-mask-size: contain;
146
+ mask-size: contain;
147
+ transition: transform 150ms ease-out;
148
+ }
149
+
150
+ :host([truncate][expandable]) slot.overflowing ~ .expand-btn {
151
+ display: block;
152
+ left: 0;
153
+ right: 0;
154
+ bottom: 0;
155
+ height: 1.5em;
156
+ }
157
+
158
+ :host([truncate="1"][expandable]) slot.overflowing ~ .expand-btn {
159
+ left: auto;
160
+ top: 0;
161
+ bottom: 0;
162
+ width: 3em;
163
+ }
164
+
165
+ :host([truncate][expandable]:hover) slot.overflowing ~ .expand-btn,
166
+ :host([truncate][expandable]:focus-within) slot.overflowing ~ .expand-btn,
167
+ .expand-btn.expanded {
168
+ opacity: 1;
169
+ }
170
+
171
+ .expand-btn.expanded::before {
172
+ transform: rotate(180deg);
173
+ }
174
+ `,Ur=class extends P{static observedAttributes=["expandable","truncate","collapsible"];slotEl;expandBtn;expanded=!1;overflowObserver;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=rb,this.slotEl=document.createElement("slot"),e.append(n,this.slotEl)}connectedCallback(){this.syncExpandButton(),this.#e&&this.startOverflowObserver()}disconnectedCallback(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect()}attributeChangedCallback(e,n,a){n!==a&&((e==="truncate"||e==="expandable")&&this.setExpanded(!1),this.syncExpandButton(),(e==="truncate"||e==="expandable")&&(this.#e?this.startOverflowObserver():this.stopOverflowObserver()))}get#e(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get#t(){return this.hasAttribute("collapsible")}get isTruncated(){if(!this.hasAttribute("truncate")||this.expanded)return!1;let e=this.slotEl;return e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}syncExpandButton(){if(this.#e&&!this.expandBtn){let e=document.createElement("button");e.className="expand-btn",e.type="button",e.addEventListener("click",this.handleToggle),this.shadowRoot.append(e),this.expandBtn=e}else!this.#e&&this.expandBtn&&(this.expandBtn.remove(),this.expandBtn=void 0);this.refreshButton()}handleToggle=()=>{this.setExpanded(!this.expanded)};setExpanded(e){e!==this.expanded&&(this.expanded=e,this.slotEl.classList.toggle("expanded",e),this.refreshButton(),e||this.measureOverflow())}startOverflowObserver(){this.#e&&(this.overflowObserver??=new ResizeObserver(()=>this.measureOverflow()),this.contentObserver??=new MutationObserver(()=>this.measureOverflow()),this.overflowObserver.observe(this.slotEl),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}),this.measureOverflow())}stopOverflowObserver(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect(),this.slotEl.classList.remove("overflowing")}measureOverflow(){!this.#e||this.expanded||this.slotEl.classList.toggle("overflowing",this.isTruncated)}refreshButton(){let e=this.expandBtn;if(e){if(this.expanded&&!this.#t){e.remove(),this.expandBtn=void 0;return}e.setAttribute("aria-expanded",this.expanded?"true":"false"),e.setAttribute("aria-label",this.expanded?"Show less":"Show more"),e.classList.toggle("expanded",this.expanded)}}};function Hc(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Ur)}Hc();var Yr=class extends P{};function jc(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Yr)}jc();function Wr(t,e){let n=null;t.addEventListener("keydown",a=>{if(a.repeat||!e.keys.includes(a.key))return;let r=e.resolve(a.target);r&&(a.preventDefault(),n=e.blocked?.(r)?null:r)},!0),t.addEventListener("keyup",a=>{if(!e.keys.includes(a.key))return;let r=e.resolve(a.target);if(!r||r!==n){n=null;return}n=null,!e.blocked?.(r)&&e.activate(r)},!0)}function qc(t){!t||t.hasKeyListenerForAButton||(Wr(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",ib,!0),t.hasKeyListenerForAButton=!0)}var Gr=class extends P{connectedCallback(){qc(this.doc)}};function ob(t){let e=t.getAttribute("form");return e?t.ownerDocument.getElementById(e):t.closest("form")}function ib(t){let e=t.target.closest("a-button");if(!e||e.hasAttribute("disabled")||e.hasAttribute("loading"))return;let n=e.getAttribute("data-custom-event");n&&e.dispatchEvent(new CustomEvent(n,{bubbles:!0,cancelable:!0}));let a=e.getAttribute("type")||"button",r=ob(e);if(r)if(a==="submit"){r.requestSubmit();let o=new FormData(r);r.dispatchEvent(new CustomEvent("submitdetailed",{bubbles:!0,cancelable:!0,detail:{formData:Object.fromEntries(o.entries()),submitter:{tag:e.tagName.toLowerCase(),attrs:Object.fromEntries(Array.from(e.attributes).map(i=>[i.name,i.value]))}}}))}else a==="reset"&&r.reset()}function Zc(){typeof customElements>"u"||(qc(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Gr))}Zc();async function sb(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function lb(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(r=>r.remove());let n=e.outerHTML,a=e.textContent??"";try{return typeof ClipboardItem<"u"&&navigator.clipboard?.write?(await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([n],{type:"text/html"}),"text/plain":new Blob([a],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(a),!0)}catch{return!1}}function cb(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function $c(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function Uc(){return typeof location<"u"?location.href:""}function db(t){if(t.hasAttribute("copy-url"))return Uc();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${Uc()}
175
+ ${e}`:e}function ub(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Kr(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function Yc(t){if(t.hasAttribute("copy-node")){let e=cb(t);return $c(t,e?lb(e):Promise.resolve(!1)),!0}return ub(t)?($c(t,sb(db(t))),!0):!1}var Gc="a-button, button, [role=button]",Kc="a-menu-item, [role=menuitem]",Xc=`${Gc}, ${Kc}`,zn=new WeakMap;function Bi(t){return t?.querySelector(":scope > a-copy")??null}function Ri(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function hb(t){if(!t||t.hasCopyDelegation)return;let e=(n,a)=>{let r=n?.closest?.(Xc);if(!r||Ri(r))return;let o=Bi(r);o&&(a?zn.set(o,a):zn.delete(o),Kr(o))};t.addEventListener("pointerdown",n=>e(n.target,{x:n.clientX,y:n.clientY}),!0),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e(n.target)},!0),t.addEventListener("click",n=>{let a=n.target?.closest?.(Gc);if(!a||Ri(a))return;let r=Bi(a);r&&(n.detail?zn.set(r,{x:n.clientX,y:n.clientY}):zn.delete(r),r.activate())},!0),t.addEventListener("menuselect",n=>{let a=n.target?.closest?.(Kc);!a||Ri(a)||Bi(a)?.activate()},!0),t.hasCopyDelegation=!0}var Jc=900,Wc=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
176
+ .feedback {
177
+ position: fixed;
178
+ margin: 0;
179
+ padding: 0;
180
+ border: 0;
181
+ inset: auto;
182
+ background: none;
183
+ overflow: visible;
184
+ pointer-events: none;
185
+ display: inline-flex;
186
+ align-items: center;
187
+ gap: 4px;
188
+ box-sizing: border-box;
189
+ color: var(--text-2-success);
190
+ font-family: var(--sans-serif);
191
+ font-size: 13px;
192
+ line-height: 16px;
193
+ font-weight: 500;
194
+ white-space: nowrap;
195
+ transform: translate(var(--_feedback-x), calc(-100% - 10px));
196
+ }
197
+ .feedback:not(:popover-open) { display: none; }
198
+ .feedback[data-show] { animation: a-copy-feedback-rise ${Jc}ms ease-out forwards; }
199
+ @keyframes a-copy-feedback-rise {
200
+ from { opacity: 1; transform: translate(var(--_feedback-x), calc(-100% - 10px)); }
201
+ to { opacity: 0; transform: translate(var(--_feedback-x), calc(-100% - 1.5em)); }
202
+ }
203
+ `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let a=document.createElement("span");a.setAttribute("aria-hidden","true"),a.textContent="\u2713";let r=document.createElement("span");return r.className="label",n.append(a,r),t.content.append(e,n),t})(),Xr=class extends P{#e;#t;#n;connectedCallback(){hb(this.doc),this.addEventListener("copydone",this.#a)}activate(){Yc(this)}#a=e=>{let n=zn.get(this);if(zn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let a=this.closest(Xc);a&&this.#o(a,n)};#r(){if(!Wc)return;let e=this.attachShadow({mode:"open"});e.append(Wc.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#o(e,n){this.#e||this.#r();let a=this.#e,r=this.#t;if(!(!a||!r)){if(r.textContent=this.getAttribute("copied-label")??"Copied",n)a.style.left=`${n.x}px`,a.style.top=`${n.y}px`,a.style.setProperty("--_feedback-x","8px");else{let o=e.getBoundingClientRect(),i=this.view.getComputedStyle(e).direction==="rtl";a.style.left=`${i?o.right-12:o.left+12}px`,a.style.top=`${o.top}px`,a.style.setProperty("--_feedback-x",i?"-100%":"0")}clearTimeout(this.#n),a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover(),a.showPopover(),a.offsetWidth,a.setAttribute("data-show",""),this.#n=setTimeout(()=>{a.removeAttribute("data-show"),a.matches(":popover-open")&&a.hidePopover()},Jc)}}disconnectedCallback(){clearTimeout(this.#n),zn.delete(this),this.removeEventListener("copydone",this.#a)}};function Qc(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",Xr)}Qc();var Fi=t=>t==="checked"||t==="indeterminate"?t:"unchecked",Jr=class extends P{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;get checked(){return this.currentState==="checked"}get indeterminate(){return this.currentState==="indeterminate"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Fi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=Fi(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e.states.delete("checked"),e.states.delete("indeterminate"),this.currentState==="indeterminate"?e.states.add("indeterminate"):this.currentState==="checked"&&e.states.add("checked"),e.ariaChecked=this.currentState==="indeterminate"?"mixed":this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Fi(e),this.paint()}formDisabledCallback(){this.paint()}};function ed(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",Jr)}ed();var Vi=t=>t==="checked"?"checked":"unchecked",Qr=class extends P{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;get checked(){return this.currentState==="checked"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.alive=!0}attributeChangedCallback(e){if(e==="state"){let n=Vi(this.getAttribute("state")),a=n!==this.currentState;this.currentState=n,this.paint(),a&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=Vi(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,a=n==="checked"?"unchecked":"checked",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#t||r&&(this.currentState=a,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e.states.delete("checked"),this.currentState==="checked"&&e.states.add("checked"),e.ariaChecked=this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Vi(e),this.paint()}formDisabledCallback(){this.paint()}};function td(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Qr)}td();var nd=200,pb='a-button,a-checkbox,a-radio,a-radio-group,a-input,a-input-time,a-calendar,a-menu-item,a-tab,[data-anta][role="button"],button,a[href],input,select,textarea,label,[contenteditable=""],[contenteditable="true"]',mb=':disabled,[disabled],[aria-disabled="true"]';function bb(t){return t.matches("[data-expander-ignore]")?!0:t.matches(pb)&&!t.matches(mb)}var fb=`
204
+ :host { display: block; }
205
+
206
+ .header {
207
+ display: flex;
208
+ /* Stretch so the trigger button (and the actions row) fill the full host
209
+ height \u2014 the title's hit area is the whole header, not just the text. */
210
+ align-items: stretch;
211
+ }
212
+
213
+ slot[name="actions"] { display: none; }
214
+ .header.has-actions slot[name="actions"] {
215
+ display: flex;
216
+ align-items: center;
217
+ gap: 2px;
218
+ flex-shrink: 0;
219
+ margin-inline-start: 8px;
220
+ /* Inset from the right edge (the host has no padding of its own). */
221
+ margin-inline-end: 4px;
222
+ }
223
+
224
+ button {
225
+ appearance: none;
226
+ -webkit-appearance: none;
227
+ background: none;
228
+ border: none;
229
+ margin: 0;
230
+ /* The button is the full-bleed header: it spans the host's width (flex: 1)
231
+ and height (.header stretch). The title is inset by --expander-gutter
232
+ (the chevron lives absolutely inside that gutter, below \u2014 it never pushes
233
+ the title), so the title + the body share one inset value; 6px block
234
+ gives the header a touch more height. Restyle it edge-to-edge via
235
+ ::part(summary). */
236
+ position: relative;
237
+ padding: 6px 4px 6px var(--expander-gutter);
238
+ flex: 1;
239
+ min-width: 0;
240
+ font: inherit;
241
+ color: inherit;
242
+ text-align: left;
243
+
244
+ display: flex;
245
+ align-items: center;
246
+ gap: 0;
247
+ cursor: pointer;
248
+ user-select: text;
249
+ border-radius: 2px;
250
+ outline: none;
251
+ }
252
+
253
+ button:focus-visible {
254
+ outline: 1px solid var(--focus-ring);
255
+ outline-offset: 0px;
256
+ }
257
+
258
+ /* The chevron sits absolutely INSIDE the gutter \u2014 out of flow, so it never
259
+ pushes the title. Its right edge lands 2px before the gutter (left = gutter
260
+ - 16px - 2px), leaving a 2px gap before the title; at the default 24px
261
+ gutter the chevron box is [6px, 22px], and on outdent (gutter 0) it
262
+ auto-hangs at -18px in the negative gutter. One var drives the title inset,
263
+ the body inset, and the chevron position. */
264
+ button::before {
265
+ content: '';
266
+ position: absolute;
267
+ left: calc(var(--expander-gutter) - 16px - 2px);
268
+ top: 50%;
269
+ width: 16px;
270
+ height: 16px;
271
+ background-color: currentColor;
272
+ -webkit-mask-image: var(--_expander-chevron);
273
+ mask-image: var(--_expander-chevron);
274
+ -webkit-mask-size: contain;
275
+ mask-size: contain;
276
+ -webkit-mask-repeat: no-repeat;
277
+ mask-repeat: no-repeat;
278
+ -webkit-mask-position: center;
279
+ mask-position: center;
280
+ opacity: 0.6;
281
+ /* translateY centers it; the open state adds rotate (same transform so the
282
+ transition animates only the rotation). */
283
+ transform: translateY(-50%);
284
+ transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease;
285
+ }
286
+ button:enabled:hover::before { opacity: 1; }
287
+ button[aria-expanded="true"]::before { transform: translateY(-50%) rotate(90deg); opacity: 1; }
288
+
289
+ button:enabled:hover { color: var(--expander-text-hover); }
290
+ :host([priority="tertiary"]) button:enabled:hover { --_summary-underline: underline; }
291
+ button:enabled:active { color: var(--expander-text); }
292
+ button:disabled { cursor: default; }
293
+ button:enabled:not([aria-expanded="true"]):active::before {
294
+ opacity: 0.6;
295
+ }
296
+
297
+ .region {
298
+ display: grid;
299
+ grid-template-rows: 0fr;
300
+ grid-template-columns: minmax(0, 1fr);
301
+ }
302
+ .header:has(button[aria-expanded="true"]) + .region { grid-template-rows: 1fr; }
303
+
304
+ /* Outdent flush correction: the host keeps its 1px (transparent) border for
305
+ cross-priority box stability, which insets the content-box by 1px. Pull the
306
+ header + region back by that 1px so the title and body land exactly on the
307
+ surrounding content (the chevron, absolutely positioned inside the header,
308
+ rides along). Logical start so it follows RTL. */
309
+ :host([priority="tertiary"][outdent]) .header,
310
+ :host([priority="tertiary"][outdent]) .region {
311
+ margin-inline-start: -1px;
312
+ }
313
+ @media (prefers-reduced-motion: no-preference) {
314
+ .region { transition: grid-template-rows ${nd}ms ease; }
315
+ }
316
+
317
+ [part="content"] { display: block; min-height: 0; overflow: clip; }
318
+ .header:has(button[aria-expanded="true"]) + .region [part="content"] {
319
+ overflow: visible;
320
+ transition: overflow 0s ${nd}ms;
321
+ transition-behavior: allow-discrete;
322
+ }
323
+ `,ad=Zt,eo=class extends P{static observedAttributes=["state","disabled","round"];summary;titleSlot;region;header;roundStyle;roundObserver;internals;constructor(){super(),this.internals=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=fb,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let a=document.createElement("slot");a.name="title",this.titleSlot=a,this.summary.append(a),this.summary.addEventListener("click",this.onSummaryClick);let r=document.createElement("div");r.className="header",this.header=r;let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions"),o.addEventListener("slotchange",()=>{r.classList.toggle("has-actions",o.assignedElements().length>0)}),r.append(this.summary,o),this.region=document.createElement("div"),this.region.className="region";let i=document.createElement("slot");i.setAttribute("part","content"),this.region.append(i),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,r,this.region)}hasFixedRound(){let e=this.getAttribute("round");return e!=null&&e.trim()!==""}measureRoundRadius(){if(!this.hasAttribute("round")||this.hasFixedRound())return;let e=this.header.getBoundingClientRect().height;if(e<=0)return;let n=getComputedStyle(this),a=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),r=(e+a)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${r}px}`}startRoundObserver(){!this.roundObserver||this.hasFixedRound()||(this.roundObserver.observe(this.header),this.measureRoundRadius())}stopRoundObserver(){this.roundObserver?.disconnect(),this.roundStyle.textContent=""}get#e(){return this.hasAttribute("state")}get#t(){return this.summary.getAttribute("aria-expanded")==="true"?"open":"closed"}connectedCallback(){this.syncDisabled(),this.applyState(ad(this.getAttribute(this.#e?"state":"default-state"))),this.hasAttribute("round")&&this.startRoundObserver()}disconnectedCallback(){this.roundObserver?.disconnect()}attributeChangedCallback(e){e==="disabled"?this.syncDisabled():e==="state"&&this.#e?this.applyState(ad(this.getAttribute("state"))):e==="round"&&(this.hasAttribute("round")?this.startRoundObserver():this.stopRoundObserver())}syncDisabled(){this.summary.disabled=this.hasAttribute("disabled")}applyState(e){let n=e==="open";this.summary.setAttribute("aria-expanded",n?"true":"false"),this.region.inert=!n;try{n?this.internals?.states.add("open"):this.internals?.states.delete("open")}catch{}}#n(e){let n=e.composedPath(),a=n.indexOf(this.summary);return(a===-1?n:n.slice(0,a)).some(o=>o instanceof Element&&bb(o))}#a(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(a=>n.intersectsNode(a))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#a())return;let n=this.#t,a=n==="open"?"closed":"open",r=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:n}}));this.#e||r&&this.applyState(a)}};function rd(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",eo)}rd();function Hi(t,e,{signal:n,edges:a}={}){let r,o=null,i=a!=null&&a.includes("leading"),s=a==null||a.includes("trailing"),l=()=>{o!==null&&(t.apply(r,o),r=void 0,o=null)},c=()=>{s&&l(),h()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},m=()=>{d!==null&&(clearTimeout(d),d=null)},h=()=>{m(),r=void 0,o=null},b=()=>{l()},f=function(...g){if(n?.aborted)return;r=this,o=g;let x=d==null;u(),i&&x&&l()};return f.schedule=u,f.cancel=h,f.flush=b,n?.addEventListener("abort",h,{once:!0}),f}var _n=4,gb=16,vb=8,od=300,id=150,xb=300,yb=120,ji=10,sd=100,wb=60,kb=500,Cb="a-tab-label, a-button-label, a-step-hint",qi="data-anta-text-tooltip",Eb=1500,Sb=10,it=null,oa;function Tb(){return oa!==void 0}function Ab(){return it!==null||Tb()}function ud(){oa!==void 0&&(clearTimeout(oa),oa=void 0)}function Mb(t){it&&it!==t&&(it.isConnected?it.hide():it.cleanup()),it=t,ud()}function ld(t){it===t&&(it=null,ud(),oa=setTimeout(()=>{oa=void 0},xb))}var ra=new WeakMap;function cd(t){let e,n;for(let a of t.tooltips)a.hasAttribute(qi)?e=a:n=a;return n??e}function Zi(t,e){let n=cd(e);for(let a of e.tooltips)a!==n&&a.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let a=ra.get(t);a!==e||!a.intersecting||cd(a)!==n||n.setupListeners()})}function Ib(t){for(let e of t){let n=ra.get(e.target);n&&(n.intersecting=e.isIntersecting,Zi(e.target,n))}}var dd=typeof IntersectionObserver<"u"?new IntersectionObserver(Ib,{root:null,rootMargin:"0px",threshold:0}):null,to=class extends P{static observedAttributes=["delay"];container;bubble;anchor=null;listening=!1;shown=!1;touchOpen=!1;lastMouse;debouncedShow;teardown;closeTimer;fading=!1;fadeTimer;docMoveBound=!1;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
324
+ :host { display: contents; }
325
+
326
+ .container {
327
+ --_dur: ${id}ms;
328
+ position: fixed;
329
+ left: 0;
330
+ top: 0;
331
+ margin: 0;
332
+ padding: 0;
333
+ border: 0;
334
+ background: transparent;
335
+ color: inherit;
336
+ overflow: visible;
337
+ box-sizing: border-box;
338
+ width: fit-content;
339
+ pointer-events: none;
340
+ opacity: 0;
341
+ transition:
342
+ opacity var(--_dur) ease,
343
+ overlay var(--_dur) ease allow-discrete,
344
+ display var(--_dur) ease allow-discrete;
345
+ }
346
+
347
+ .container:popover-open { opacity: 1; }
348
+
349
+ @starting-style {
350
+ .container:popover-open { opacity: 0; }
351
+ }
352
+
353
+ .bubble {
354
+ display: block;
355
+ box-sizing: border-box;
356
+ width: fit-content;
357
+ max-width: var(--tooltip-max-width, min(calc(100vw - 20px), 80ch));
358
+ max-height: calc(100vh - 20px);
359
+ overflow: clip;
360
+ text-align: left;
361
+ background: var(--tooltip-bg, Canvas);
362
+ color: var(--text-2, CanvasText);
363
+ box-shadow: var(--tooltip-shadow, 0 1px 8px rgba(0, 0, 0, 0.2));
364
+ -webkit-backdrop-filter: var(--tooltip-backdrop-filter, blur(8px));
365
+ backdrop-filter: var(--tooltip-backdrop-filter, blur(8px));
366
+ padding: var(--tooltip-padding, 4px 8px);
367
+ border: var(--tooltip-border, none);
368
+ border-radius: var(--tooltip-radius, 3px);
369
+ outline: none;
370
+ font-family: var(--sans-serif, system-ui, sans-serif);
371
+ font-size: 14px;
372
+ font-weight: 400;
373
+ font-style: normal;
374
+ font-stretch: normal;
375
+ font-variation-settings: "wdth" 100, "slnt" 0, "ital" 0;
376
+ line-height: 1.5;
377
+ letter-spacing: 0.02ch;
378
+ word-spacing: normal;
379
+ text-transform: none;
380
+ white-space: break-spaces;
381
+ word-break: break-word;
382
+ overflow-wrap: break-word;
383
+ opacity: 1;
384
+ transition: opacity ${wb}ms linear;
385
+ }
386
+
387
+ :host([interactive]) .container { pointer-events: auto; }
388
+ `,this.container=document.createElement("div"),this.container.className="container",this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=document.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#e&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#e&&this.shown&&this.scheduleHide()}),e.append(n,this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=ra.get(e);n||(n={tooltips:new Set,intersecting:!1},ra.set(e,n),dd?.observe(e)),n.tooltips.add(this),Zi(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=ra.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(ra.delete(e),dd?.unobserve(this.anchor)):n&&Zi(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=Hi(e=>this.show(e),this.#a)}get#e(){return this.hasAttribute("interactive")}get#t(){return this.#e||this.touchOpen?!0:!this.hasAttribute("follow")}get#n(){return this.getAttribute("placement")==="top"}get#a(){let e=this.getAttribute("delay");if(e==null)return od;let n=parseInt(e,10);return Number.isFinite(n)?n:od}get#r(){return this.hasAttribute("truncated-only")}get#o(){return this.hasAttribute(qi)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#o||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(qi))}anchorText(){let e=n=>n.nodeType===3?n.textContent??"":n.nodeType===1&&n.localName==="a-tooltip"?"":Array.from(n.childNodes).map(e).join("");return this.anchor?Array.from(this.anchor.childNodes).map(e).join("").trim():""}syncAutomaticTextContent(){this.#o&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let r=Array.from(e.querySelectorAll(n));if(r.length)return r}catch{}let a=Array.from(e.querySelectorAll(Cb));return a.length?a:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>{let n=e.isTruncated;return typeof n=="boolean"?n:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1})}isEmpty(){return this.#o?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()&&this.hide())})),this.contentObserver.observe(this.#o?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.positionFrame=this.view.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,a,r,o){return o?e<_n?n:e:n+a>r?e:n}place(e,n,a,r){e+a>r&&(e=r-a-_n),e=Math.max(_n,e),n=Math.max(_n,n),this.container.style.transform=`translate(${Math.round(e)}px, ${Math.round(n)}px)`}positionToTarget=()=>{this.schedulePosition(()=>{if(!this.anchor||!this.shown)return;let e=Dt(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.top-n.height-_n,e.bottom+_n,n.height,r,this.#n||this.touchOpen);this.place(e.left,o,n.width,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:a,innerHeight:r}=this.view,o=this.flipVertical(e.clientY-n.height-_n*2,e.clientY+gb,n.height,r,this.#n);this.place(e.clientX-vb,o,n.width,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Dt(this.anchor),a=Math.max(n.left-e.clientX,0,e.clientX-n.right),r=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(a,r);return o<=ji?1:o>=sd?0:1-(o-ji)/(sd-ji)}show=e=>{this.anchor&&(Mc()&&!Ic(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#r&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(it&&it!==this&&this.anchor.contains(it.anchor))&&(Mb(this),this.shown||(this.shown=!0,this.fading=!1,this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.view.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),this.doc.addEventListener("keydown",this.onKeyDown,!0),this.docMoveBound||(this.doc.addEventListener("mousemove",this.onDocMove),this.docMoveBound=!0),this.observeContent()),this.position(e))))};hide=()=>{this.cancelHide(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.contentObserver?.disconnect(),this.container.hidePopover(),this.fading=!0,this.fadeTimer!==void 0&&clearTimeout(this.fadeTimer),this.fadeTimer=setTimeout(()=>this.detachGlobals(),id),ld(this))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1,this.view.removeEventListener("scroll",this.hide,{capture:!0}),this.doc.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(this.doc.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1)}cleanup(){this.cancelHide(),this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),ld(this),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#t)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.bubble.style.transition="none",this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.bubble.style.transition="",this.bubble.style.opacity=String(n)};scheduleHide=(e=yb)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.hide()},e)};cancelHide(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}onKeyDown=e=>{e.key==="Escape"&&this.hide()};trigger(e){this.hasExplicitTextTooltip()||this.isEmpty()||this.#r&&!this.isTargetTruncated()||(Ab()?(this.debouncedShow?.cancel(),this.show(e)):this.debouncedShow?.(e))}setupListeners(){if(this.listening||!this.anchor){this.listening=!0;return}let e=this.anchor,n=this.view,a=this.doc;this.makeDebouncedShow();let r=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",r),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),a.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),a.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},m=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>Sb&&u()},h=()=>{u(),b(),this.shown&&this.touchOpen&&this.scheduleHide(Eb)},b=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",h),e.removeEventListener("contextmenu",d)},f=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",m),e.addEventListener("pointerup",h),e.addEventListener("pointercancel",h),e.addEventListener("contextmenu",d),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show()},kb))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",f),this.teardown=()=>{this.debouncedShow?.cancel(),u(),b(),e.removeEventListener("pointermove",r),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",f),n.removeEventListener("pagehide",o),a.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function hd(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",to)}hd();var pd=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step","aria-label"],Db=new Set(["readonly","required"]),$i=!1,md=new WeakSet;function zb(t){md.has(t)||(md.add(t),t.addEventListener("keydown",()=>{$i=!0},!0),t.addEventListener("pointerdown",()=>{$i=!1},!0))}var _b="clearrequest",Ob="clearclick",Pb="clearinput",bd=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),Nb=`
389
+ :host {
390
+ --_fs: 15px;
391
+ --_lh: 20px;
392
+
393
+ display: grid;
394
+ grid-template-columns: minmax(0, 1fr);
395
+ row-gap: 4px;
396
+ outline: none;
397
+ }
398
+
399
+ .label {
400
+ display: none;
401
+ color: var(--input-label);
402
+ font-family: var(--sans-serif);
403
+ font-size: var(--_fs);
404
+ line-height: var(--_lh);
405
+ font-weight: 500;
406
+ }
407
+
408
+ .field {
409
+ --_bc: var(--input-border);
410
+ --_bw: 0.5px;
411
+ --_pad-block: 4px;
412
+
413
+ display: flex;
414
+ align-items: center;
415
+ box-sizing: border-box;
416
+ min-height: 28px;
417
+ background: var(--input-bg);
418
+ border-radius: 4px;
419
+ box-shadow: inset 0 0 0 var(--_bw) var(--_bc);
420
+ transition: box-shadow 120ms ease;
421
+ }
422
+ :host([multiline]) .field { align-items: stretch; }
423
+ :host([status]:not([status="neutral"])) .field { --_bw: 1px; }
424
+ :host([size="small"]) { --_fs: 13px; --_lh: 16px; }
425
+ :host([size="large"]) { --_fs: 17px; --_lh: 22px; }
426
+ :host([size="small"]) .field { min-height: 24px; }
427
+ :host([size="large"]) .field { min-height: 32px; }
428
+ :host([round]) .field { border-radius: var(--input-round, 999px); }
429
+
430
+ @media (hover: hover) and (pointer: fine) {
431
+ :host(:not(:disabled)) .field:hover { --_bw: 1px; }
432
+ }
433
+ :host(:not([readonly])) .field:has(input:focus, textarea:focus),
434
+ :host([readonly]:state(kb-focus)) .field {
435
+ --_bw: 1px;
436
+ outline: 1px solid var(--focus-ring);
437
+ outline-offset: 1px;
438
+ }
439
+ @media (forced-colors: active) { .field { border: 1px solid ButtonBorder; } }
440
+
441
+ input, textarea {
442
+ flex: 1 1 auto;
443
+ min-width: 0;
444
+ width: 100%;
445
+ box-sizing: border-box;
446
+ border: 0;
447
+ margin: 0;
448
+ padding-block: 0;
449
+ padding-inline: 7px;
450
+ background: transparent;
451
+ outline: none;
452
+ color: var(--input-text);
453
+ font-family: var(--sans-serif);
454
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
455
+ font-variation-settings: 'wdth' 100, 'slnt' 0, 'ital' 0;
456
+ font-size: var(--_fs);
457
+ line-height: var(--_lh);
458
+ font-weight: 400;
459
+ -webkit-appearance: none;
460
+ appearance: none;
461
+ }
462
+ textarea {
463
+ resize: none;
464
+ padding-block: var(--_pad-block);
465
+ overflow-y: auto;
466
+ }
467
+ :host([maxrows]:not([rows])) textarea {
468
+ max-height: calc(var(--_lh) * var(--_maxrows) + var(--_pad-block) * 2);
469
+ }
470
+ input::placeholder, textarea::placeholder { color: var(--input-placeholder); opacity: 1; }
471
+ input:disabled, textarea:disabled { cursor: not-allowed; }
472
+ :host([readonly]:not([disabled])) .field,
473
+ :host([readonly]:not([disabled])) input,
474
+ :host([readonly]:not([disabled])) textarea { cursor: pointer; }
475
+ :host([readonly]:not([disabled])) input { text-overflow: ellipsis; }
476
+ input::-webkit-search-cancel-button,
477
+ input::-webkit-search-decoration,
478
+ input::-webkit-search-results-button,
479
+ input::-webkit-search-results-decoration,
480
+ input::-webkit-inner-spin-button,
481
+ input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; display: none; }
482
+ input::-ms-clear, input::-ms-reveal { display: none; }
483
+
484
+ slot[name="leading"], slot[name="trailing"] {
485
+ display: none;
486
+ color: var(--input-adornment);
487
+ font-size: var(--_fs);
488
+ line-height: var(--_lh);
489
+ font-variation-settings: "wdth" 88, "slnt" 0, "ital" 0;
490
+ }
491
+ :host([dim-actions]) slot[name="leading"],
492
+ :host([dim-actions]) slot[name="trailing"],
493
+ :host([dim-actions]) slot[name="clear"] {
494
+ opacity: 0.6;
495
+ transition: opacity 120ms ease;
496
+ }
497
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="leading"],
498
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="trailing"],
499
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="clear"],
500
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="leading"],
501
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="trailing"],
502
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="clear"] {
503
+ opacity: 1;
504
+ }
505
+
506
+ :host(:disabled) slot[name="leading"],
507
+ :host(:disabled) slot[name="trailing"] { opacity: 0.5; pointer-events: none; }
508
+
509
+ slot[name="clear"] { display: none; flex-shrink: 0; }
510
+ :host(:state(filled)) slot[name="clear"] { display: flex; align-items: center; }
511
+ :host(:disabled) slot[name="clear"],
512
+ :host([readonly]) slot[name="clear"] { display: none; }
513
+
514
+ :host([multiline]:state(filled)) slot[name="clear"] {
515
+ align-self: flex-start;
516
+ height: calc(var(--_lh) + var(--_pad-block) * 2);
517
+ }
518
+
519
+ .hint {
520
+ display: none;
521
+ gap: 4px;
522
+ align-items: flex-start;
523
+ padding-inline-start: 1px;
524
+ color: var(--input-hint);
525
+ font-family: var(--sans-serif);
526
+ font-size: calc(var(--_fs) - 1px);
527
+ line-height: calc(var(--_lh) - 2px);
528
+ }
529
+ `,no=class extends P{static formAssociated=!0;static observedAttributes=[...pd,"value","defaultvalue","multiline","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;constructor(){super();try{this.internals=this.attachInternals?.()}catch(i){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",i)}let e=this.attachShadow({mode:"open",delegatesFocus:!0}),n=document.createElement("style");n.textContent=Nb,this.labelSlot=document.createElement("slot"),this.labelSlot.className="label",this.labelSlot.setAttribute("part","label"),this.labelSlot.name="label",this.labelSlot.addEventListener("click",()=>this.control?.focus()),this.labelSlot.addEventListener("slotchange",this.onLabelSlotChange),this.field=document.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=document.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading");let a=document.createElement("slot");a.name="trailing",a.setAttribute("part","trailing");let r=document.createElement("slot");r.name="clear",r.setAttribute("part","clear"),this.field.append(this.leadingSlot,r,a),this.addEventListener(_b,()=>{this.dispatchEvent(new CustomEvent(Ob,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=document.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let o=document.createElement("slot");e.append(n,this.labelSlot,this.field,o,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(zb(this.doc),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.control||this.buildControl(),this.ready=!0}attributeChangedCallback(e,n,a){if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="rows"||e==="maxrows"){if(!this.control)return;let r=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement;r!==o?this.buildControl(this.value):this.control instanceof HTMLTextAreaElement&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){a!==null&&(this.value=a);return}e!=="defaultvalue"&&this.control&&(this.forward(e,a),this.updateValidity())}}buildControl(e){let n=this.control,a=n!=null&&this.shadowRoot?.activeElement===n,r=null,o=null;if(n)try{r=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=document.createElement(i?"textarea":"input");s.setAttribute("part","input"),this.control?this.control.replaceWith(s):this.leadingSlot.after(s),this.control=s;for(let c of pd)s instanceof HTMLTextAreaElement&&c==="type"||this.forward(c,this.getAttribute(c));this.syncDisabled(),this.syncStatus(),this.applyLabelAria(),this.applyDescriptionAria(),i&&this.configureTextarea(s);let l=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(s.value=l,s.addEventListener("input",this.onInput),s.addEventListener("change",this.onChange),s.addEventListener("focus",this.onFocus),s.addEventListener("blur",this.onBlur),a&&(s.focus(),r!=null))try{s.setSelectionRange(r,o??r)}catch{}this.internals?.setFormValue(l),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),a=this.getAttribute("maxrows");n!=null?(e.rows=Math.max(1,parseInt(n,10)||1),e.style.setProperty("field-sizing","fixed"),e.style.removeProperty("--_maxrows"),e.style.removeProperty("height")):(e.rows=1,bd?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),a!=null?e.style.setProperty("--_maxrows",String(parseInt(a,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(bd)return;let e=this.control;!(e instanceof HTMLTextAreaElement)||this.getAttribute("rows")!=null||(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};forward(e,n){let a=this.control;a&&(a instanceof HTMLTextAreaElement&&e==="type"||(Db.has(e)?a.toggleAttribute(e,n!=null):n==null?a.removeAttribute(e):a.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncStatus(){let e=this.getAttribute("status")==="critical";this.control?.setAttribute("aria-invalid",e?"true":"false");try{e?this.internals?.states.add("invalid"):this.internals?.states.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.internals?.setFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};onFocus=()=>{try{$i?this.internals?.states.add("kb-focus"):this.internals?.states.delete("kb-focus")}catch{}};onBlur=()=>{try{this.internals?.states.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria()};applyLabelAria(){let e=this.control;if(!e||this.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.hasAttribute("aria-description")||this.hasAttribute("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(a=>a.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}updateFilled(){this.value?this.internals?.states.add("filled"):this.internals?.states.delete("filled")}updateValidity(){let e=this.control;!this.internals||!e||(this.getAttribute("status")==="critical"&&e.validity.valid?this.internals.setValidity({customError:!0},"Invalid value.",e):this.internals.setValidity(e.validity,e.validationMessage,e))}get value(){return this.control?this.control.value:this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??""}set value(e){this.pendingValue=e,this.control&&this.control.value!==e&&(this.control.value=e),this.internals?.setFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}clear(){this.control&&(this.control.value="",this.internals?.setFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Pb,{bubbles:!0})),this.control.focus())}get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){this.value=this.getAttribute("defaultvalue")??"",this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}formDisabledCallback(e){this.formDisabled=e,this.syncDisabled()}formStateRestoreCallback(e){this.value=e??""}};function fd(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",no)}fd();var cn=(t,e)=>{if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e},Ui=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},ao=class extends P{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];#e;#t;#n;#a;#r;#o;#u;#h;#l;#c;#s;#d;#x;#p;#f;#b;#g;#y;#i=0;#k=!1;#v=!1;#C;get value(){return this.#i}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return cn(this.getAttribute("defaultvalue"),this.#m)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.#e=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
530
+ :host {
531
+ display: grid;
532
+ grid-template-columns: minmax(0, 1fr);
533
+ gap: 1px;
534
+ outline: none;
535
+ }
536
+ [hidden] { display: none !important; }
537
+ .header {
538
+ display: flex;
539
+ align-items: baseline;
540
+ gap: 1px;
541
+ min-width: 0;
542
+ }
543
+ slot[name="label"] {
544
+ display: block;
545
+ min-width: 0;
546
+ color: var(--slider-label);
547
+ font-family: var(--sans-serif);
548
+ font-size: var(--slider-label-size);
549
+ font-weight: 500;
550
+ line-height: var(--slider-label-line-height);
551
+ }
552
+ .inline-value,
553
+ .end-value {
554
+ color: var(--slider-value);
555
+ font-family: var(--sans-serif);
556
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
557
+ font-size: var(--slider-value-size);
558
+ font-variant-numeric: tabular-nums;
559
+ line-height: var(--slider-value-line-height);
560
+ }
561
+ .value-affix { color: var(--slider-value-affix); }
562
+ .inline-separator,
563
+ .inline-value { display: none; }
564
+ .inline-value { margin-inline-start: 0.5ch; }
565
+ .end-value {
566
+ display: block;
567
+ flex: 0 0 auto;
568
+ margin-inline-start: auto;
569
+ padding-inline-start: 1ch;
570
+ }
571
+ :host([value-display="inline"]) .inline-separator,
572
+ :host([value-display="inline"]) .inline-value { display: block; }
573
+ :host([value-display="inline"]) .end-value,
574
+ :host([value-display="thumb"]) .end-value,
575
+ :host([value-display="none"]) .end-value { display: none; }
576
+ .control {
577
+ position: relative;
578
+ block-size: var(--anta-slider-control-size);
579
+ border-radius: 4px;
580
+ cursor: grab;
581
+ touch-action: none;
582
+ user-select: none;
583
+ }
584
+ :host([track-click="jump"]) .control { cursor: pointer; }
585
+ .control[data-dragging] { cursor: grabbing; }
586
+ .control[data-dragging] .thumb { background: var(--slider-thumb-active); }
587
+ :host(:focus-visible) .control:not([data-pointer-focus]) {
588
+ outline: 1px solid var(--focus-ring);
589
+ outline-offset: 0;
590
+ }
591
+ .rail-area {
592
+ position: absolute;
593
+ inset-block-start: 50%;
594
+ inset-inline: calc(var(--anta-slider-thumb-size) / 2);
595
+ block-size: var(--anta-slider-track-size);
596
+ transform: translateY(-50%);
597
+ }
598
+ .rail,
599
+ .fill {
600
+ position: absolute;
601
+ inset: 0;
602
+ border-radius: var(--slider-track-radius);
603
+ transition: background-color 75ms ease-out;
604
+ }
605
+ .rail {
606
+ inset-inline: calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2);
607
+ background: var(--slider-track);
608
+ }
609
+ .fill {
610
+ inset-inline-start: calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2);
611
+ inset-inline-end: auto;
612
+ inline-size: calc(var(--_percent, 0%) + var(--anta-slider-thumb-size) / 2 - var(--slider-track-inset));
613
+ background: var(--slider-fill);
614
+ }
615
+ .thumb {
616
+ position: absolute;
617
+ inset-block-start: 50%;
618
+ inset-inline-start: var(--_percent, 0%);
619
+ box-sizing: border-box;
620
+ inline-size: var(--anta-slider-thumb-size);
621
+ block-size: var(--anta-slider-thumb-size);
622
+ border: var(--anta-slider-thumb-border-width) solid var(--slider-thumb-border);
623
+ border-radius: var(--slider-thumb-radius);
624
+ background: var(--slider-thumb);
625
+ transition: background-color 75ms ease-out, border-color 75ms ease-out;
626
+ transform: translate(-50%, -50%);
627
+ }
628
+ .thumb-value {
629
+ display: none;
630
+ position: absolute;
631
+ inset-inline-start: var(--_percent, 0%);
632
+ inset-block-start: 50%;
633
+ min-inline-size: max-content;
634
+ color: var(--slider-value);
635
+ font-family: var(--sans-serif);
636
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
637
+ font-size: var(--slider-value-size);
638
+ font-variant-numeric: tabular-nums;
639
+ line-height: var(--slider-value-line-height);
640
+ padding-inline: 6px;
641
+ background: var(--bg-2);
642
+ border: 1px solid var(--border-3);
643
+ border-radius: 4px;
644
+ text-align: center;
645
+ transform: translate(-50%, calc(
646
+ -50% - var(--anta-slider-control-size) / 2 - 1px - var(--slider-value-line-height) / 2
647
+ ));
648
+ }
649
+ :host([value-display="thumb"]) .thumb-value { display: block; }
650
+ slot[name="markers"] {
651
+ display: block;
652
+ position: relative;
653
+ min-block-size: var(--slider-marker-line-height);
654
+ }
655
+ slot[name="markers"]::slotted(*) {
656
+ position: absolute;
657
+ inset-inline-start: var(--slider-marker-position);
658
+ max-inline-size: min(12rem, 50vw);
659
+ color: var(--slider-marker);
660
+ font-family: var(--sans-serif);
661
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
662
+ font-size: var(--slider-marker-size);
663
+ font-variant-numeric: tabular-nums;
664
+ line-height: var(--slider-marker-line-height);
665
+ text-align: center;
666
+ transform: translateX(-50%);
667
+ white-space: nowrap;
668
+ }
669
+ slot[name="markers"]::slotted([data-slider-marker-start]) { text-align: start; transform: translateX(0); }
670
+ slot[name="markers"]::slotted([data-slider-marker-end]) { text-align: end; transform: translateX(-100%); }
671
+ slot:not([name]) { display: block; }
672
+ :host([disabled]) .control,
673
+ :host(:disabled) .control { cursor: not-allowed; }
674
+ @media (forced-colors: active) {
675
+ .rail { background: Canvas; border: 1px solid CanvasText; }
676
+ .fill { background: Highlight; }
677
+ .thumb { background: Canvas; border-color: CanvasText; }
678
+ :host(:focus-visible) .control { outline: 2px solid Highlight; }
679
+ }
680
+ @media (prefers-reduced-motion: reduce) {
681
+ .rail,
682
+ .fill,
683
+ .thumb { transition: none; }
684
+ }
685
+ `,this.#o=document.createElement("div"),this.#o.className="header",this.#o.part.add("header"),this.#u=document.createElement("slot"),this.#u.name="label",this.#u.part.add("label");let a=document.createElement("span");a.className="inline-separator",a.textContent=":",this.#h=document.createElement("span"),this.#h.className="inline-value",this.#h.part.add("value"),this.#l=document.createElement("span"),this.#l.className="value-affix",this.#c=document.createElement("span"),this.#c.className="value-affix",this.#h.append(this.#l,this.#c),this.#s=document.createElement("span"),this.#s.className="end-value",this.#s.part.add("value"),this.#d=document.createElement("span"),this.#d.className="value-affix",this.#x=document.createElement("span"),this.#x.className="value-affix",this.#s.append(this.#d,this.#x),this.#o.append(this.#u,a,this.#h,this.#s),this.#t=document.createElement("div"),this.#t.className="control",this.#t.part.add("control"),this.#n=document.createElement("div"),this.#n.className="rail-area";let r=document.createElement("div");r.className="rail",r.part.add("track"),this.#a=document.createElement("div"),this.#a.className="fill",this.#a.part.add("fill"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb"),this.#p=document.createElement("span"),this.#p.className="thumb-value",this.#p.part.add("thumb-value"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#b=document.createElement("span"),this.#b.className="value-affix",this.#p.append(this.#f,this.#b),this.#n.append(r,this.#a,this.#r,this.#p),this.#t.append(this.#n),this.#g=document.createElement("slot"),this.#g.name="markers",this.#g.part.add("markers"),this.#y=document.createElement("slot"),this.#y.part.add("extras");for(let o of[this.#u,this.#g,this.#y])o.addEventListener("slotchange",()=>this.#z());this.#t.addEventListener("pointerdown",o=>this.#L(o)),this.#t.addEventListener("pointermove",o=>this.#V(o)),this.#t.addEventListener("pointerup",o=>this.#D(o)),this.#t.addEventListener("pointercancel",o=>this.#D(o)),this.addEventListener("keydown",o=>this.#H(o)),this.addEventListener("blur",()=>delete this.#t.dataset.pointerFocus),e.append(n,this.#o,this.#t,this.#g,this.#y)}connectedCallback(){this.#k||(this.#i=this.#I(),this.#k=!0),this.#A(),this.#z()}attributeChangedCallback(e){this.#k&&(e==="value"?this.hasAttribute("value")?(this.#i=this.#T(cn(this.getAttribute("value"),this.#m)),this.#v=!1):this.#v||(this.#i=this.#I()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#v?this.#i=this.#I():(e==="min"||e==="max"||e==="step")&&(this.#i=this.#T(this.#i)),this.#A(),e==="value-display"&&this.#z())}formResetCallback(){let e=this.#i;this.#i=this.#T(cn(this.getAttribute("defaultvalue"),this.#m)),this.#v=!1,this.#A(),this.#i!==e&&this.#F()}formStateRestoreCallback(e){typeof e=="string"&&(this.#i=this.#T(cn(e,this.#m)),this.#v=!0,this.#A())}formDisabledCallback(){this.#A()}get#m(){return cn(this.getAttribute("min"),0)}get#w(){return Math.max(this.#m,cn(this.getAttribute("max"),100))}get#S(){let e=cn(this.getAttribute("step"),1);return e>0?e:1}get#M(){return this.hasAttribute("disabled")||this.matches(":disabled")}#I(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return this.#T(cn(e,this.#m))}#T(e){let n=this.#m,a=this.#w,r=this.#S,o=n+Math.round((Math.min(a,Math.max(n,e))-n)/r)*r,i=Math.min(12,Math.max(Ui(n),Ui(a),Ui(r)));return Number(Math.min(a,Math.max(n,o)).toFixed(i))}#P(e=this.#i){let n=this.#w-this.#m;return n>0?(e-this.#m)/n*100:0}#A(){let e=`${this.#P()}%`;this.#n.style.setProperty("--_percent",e);let n=this.#R(),a=String(this.#i),r=this.getAttribute("value-prefix")??"",o=this.getAttribute("value-suffix")??"";for(let[s,l,c]of[[this.#h,this.#l,this.#c],[this.#s,this.#d,this.#x],[this.#p,this.#f,this.#b]])s.textContent=a,l.textContent=r,c.textContent=o,s.prepend(l),s.append(c);let i=this.#e;i&&(i.ariaValueMin=String(this.#m),i.ariaValueMax=String(this.#w),i.ariaValueNow=String(this.#i),i.ariaValueText=n,i.setFormValue(this.#M?null:String(this.#i),String(this.#i)))}#R(){return`${this.getAttribute("value-prefix")??""}${this.#i}${this.getAttribute("value-suffix")??""}`}#z(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#o.hidden=!e(this.#u)&&this.getAttribute("value-display")==="none",this.#g.hidden=!e(this.#g),this.#y.hidden=!e(this.#y)}#_(e){let n=this.#T(e);return n===this.#i?!1:(this.#i=n,this.#v=!0,this.#A(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0)}#F(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#N(e){let n=this.#n.getBoundingClientRect();return n.width<=0?this.#i:this.#m+(e-n.left)/n.width*(this.#w-this.#m)}#L(e){this.#M||e.button!==0||this.#n.getBoundingClientRect().width<=0||(this.#C={pointerId:e.pointerId,startX:e.clientX,startValue:this.#i},this.#t.setPointerCapture(e.pointerId),this.#t.dataset.dragging="",this.#t.dataset.pointerFocus="",this.focus({preventScroll:!0}),this.getAttribute("track-click")==="jump"&&this.#_(this.#N(e.clientX)),e.preventDefault())}#V(e){let n=this.#C;if(!n||n.pointerId!==e.pointerId)return;let a=this.getAttribute("track-click")==="jump"?this.#N(e.clientX):n.startValue+(e.clientX-n.startX)/this.#n.getBoundingClientRect().width*(this.#w-this.#m);this.#_(a),e.preventDefault()}#D(e){let n=this.#C;!n||n.pointerId!==e.pointerId||(this.#C=void 0,delete this.#t.dataset.dragging,this.#t.hasPointerCapture(e.pointerId)&&this.#t.releasePointerCapture(e.pointerId),this.#i!==n.startValue&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#H(e){if(e.target!==this||this.#M)return;delete this.#t.dataset.pointerFocus;let n=Math.max(this.#S,(this.#w-this.#m)/10),a;switch(e.key){case"ArrowRight":case"ArrowUp":a=this.#i+this.#S;break;case"ArrowLeft":case"ArrowDown":a=this.#i-this.#S;break;case"PageUp":a=this.#i+n;break;case"PageDown":a=this.#i-n;break;case"Home":a=this.#m;break;case"End":a=this.#w;break;default:return}e.preventDefault(),this.#_(a)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function gd(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",ao)}gd();var Lb="clearrequest",Bb="clearinput",Wa=t=>String(t).padStart(2,"0"),vd=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),Rb=(t,e)=>e==="pm"?t%12+12:t%12,xd=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec((t??"").trim());return e?{h:Math.min(23,Number(e[1])),min:Math.min(59,Number(e[2]))}:null},Fb=`
686
+ :host {
687
+ display: grid;
688
+ grid-template-columns: minmax(0, 1fr);
689
+ row-gap: 4px;
690
+ outline: none;
691
+ }
692
+
693
+ .label {
694
+ display: none;
695
+ color: var(--input-time-label);
696
+ font-family: var(--sans-serif);
697
+ font-size: var(--input-time-font-size);
698
+ line-height: var(--input-time-line-height);
699
+ font-weight: 500;
700
+ }
701
+
702
+ .field {
703
+ --_bc: var(--input-time-border);
704
+ --_bw: 0.5px;
705
+
706
+ display: flex;
707
+ align-items: center;
708
+ box-sizing: border-box;
709
+ min-height: var(--input-time-field-height);
710
+ background: var(--input-time-bg);
711
+ border-radius: var(--input-time-field-radius);
712
+ box-shadow: inset 0 0 0 var(--_bw) var(--_bc);
713
+ transition: box-shadow 120ms ease;
714
+ }
715
+ :host([status]:not([status="neutral"])) .field { --_bw: 1px; }
716
+
717
+ @media (hover: hover) and (pointer: fine) {
718
+ :host(:not(:disabled)) .field:hover {
719
+ --_bc: var(--input-time-border-hover);
720
+ --_bw: 1px;
721
+ }
722
+ }
723
+ .field:focus-within {
724
+ --_bc: var(--input-time-border-hover);
725
+ --_bw: 1px;
726
+ outline: 1px solid var(--focus-ring);
727
+ outline-offset: 1px;
728
+ }
729
+ @media (forced-colors: active) { .field { border: 1px solid ButtonBorder; } }
730
+
731
+ slot[name="leading"] {
732
+ display: none;
733
+ color: var(--input-time-adornment);
734
+ font-size: var(--input-time-font-size);
735
+ line-height: var(--input-time-line-height);
736
+ }
737
+ :host([dim-actions]) slot[name="leading"] { opacity: 0.6; transition: opacity 120ms ease; }
738
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="leading"],
739
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="leading"] { opacity: 1; }
740
+ :host(:disabled) slot[name="leading"] { opacity: 0.5; pointer-events: none; }
741
+
742
+ .segments {
743
+ display: flex;
744
+ align-items: center;
745
+ flex: 1 1 auto;
746
+ min-width: 0;
747
+ padding-inline: 7px;
748
+ color: var(--input-time-text);
749
+ font-family: var(--sans-serif);
750
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
751
+ font-variation-settings: 'wdth' 100, 'slnt' 0, 'ital' 0;
752
+ font-size: var(--input-time-font-size);
753
+ line-height: var(--input-time-line-height);
754
+ font-weight: 400;
755
+ }
756
+
757
+ .seg {
758
+ appearance: none;
759
+ display: inline-block;
760
+ box-sizing: border-box;
761
+ min-width: 0;
762
+ padding-inline: 1px;
763
+ border: 0;
764
+ border-radius: 2px;
765
+ background: transparent;
766
+ color: inherit;
767
+ font: inherit;
768
+ font-feature-settings: 'ss02', 'ss05', 'tnum';
769
+ font-variation-settings: 'wdth' 100, 'slnt' 0, 'ital' 0;
770
+ line-height: inherit;
771
+ text-align: center;
772
+ white-space: nowrap;
773
+ outline: none;
774
+ cursor: text;
775
+ font-variant-numeric: tabular-nums;
776
+ }
777
+ .seg--period {
778
+ field-sizing: content;
779
+ width: auto;
780
+ color: var(--input-time-period-color);
781
+ }
782
+ .seg::placeholder {
783
+ color: var(--input-time-placeholder);
784
+ opacity: 1;
785
+ }
786
+ .lit {
787
+ margin-inline: -1px;
788
+ white-space: pre;
789
+ color: var(--input-time-text);
790
+ }
791
+
792
+ :host(:disabled) .segments { cursor: not-allowed; }
793
+ :host(:disabled) .seg { cursor: not-allowed; }
794
+
795
+ slot[name="trailing"] { display: none; }
796
+ :host([dim-actions]) slot[name="trailing"],
797
+ :host([dim-actions]) slot[name="clear"] { opacity: 0.6; transition: opacity 120ms ease; }
798
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="trailing"],
799
+ :host([dim-actions]:not(:disabled)) .field:hover slot[name="clear"],
800
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="trailing"],
801
+ :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="clear"] { opacity: 1; }
802
+
803
+ slot[name="clear"] {
804
+ display: flex;
805
+ align-items: center;
806
+ flex-shrink: 0;
807
+ visibility: hidden;
808
+ }
809
+ :host(:state(filled)) slot[name="clear"] { visibility: visible; }
810
+ :host(:disabled) slot[name="clear"] { display: none; }
811
+
812
+ .hint {
813
+ display: none;
814
+ gap: 4px;
815
+ align-items: flex-start;
816
+ padding-inline-start: 1px;
817
+ color: var(--input-time-hint);
818
+ font-family: var(--sans-serif);
819
+ font-size: calc(var(--input-time-font-size) - 1px);
820
+ line-height: calc(var(--input-time-line-height) - 2px);
821
+ }
822
+ `,yd=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=Fb;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let a=document.createElement("div");a.className="field",a.part.add("field");let r=document.createElement("slot");r.name="leading",r.part.add("leading");let o=document.createElement("div");o.className="segments",o.part.add("segments"),o.setAttribute("role","group");let i=document.createElement("slot");i.name="clear",i.part.add("clear");let s=document.createElement("slot");s.name="trailing",s.part.add("trailing"),a.append(r,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,a,document.createElement("slot"),l),t})(),ro=class extends P{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","aria-label","required"];#e;#t;#n;#a;#r=!1;#o=!1;#u=!1;#h="";#l=null;#c=null;#s=null;#d=[];#x=[];#p;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-input-time: ElementInternals unavailable \u2014 form association disabled.",n)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});if(!yd)throw new Error("a-input-time requires a DOM document");e.append(yd.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#d[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#W),this.#t=e.querySelector(".field"),this.#a=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#C),this.#a.addEventListener("input",this.#I),this.#a.addEventListener("keydown",this.#S),this.#a.addEventListener("focusin",this.#m),this.#a.addEventListener("focusout",this.#w),this.#a.addEventListener("paste",this.#M),this.addEventListener(Lb,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#f(e)}else this.#u||this.#f(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#y(),this.#r=!0}#f(e){this.#O(e),this.#h=this.value}attributeChangedCallback(e,n,a){if(this.#r){if(e==="value"){a!==null&&(this.value=a);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#y();return}if(e==="status"){this.#U();return}if(e==="disabled"){this.#Z();return}if(e==="min"||e==="max"){this.#$();return}if(e==="aria-label"){this.#q();return}if(e==="required"){this.#$();return}}}}get#b(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#g(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#b,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#y(){let e=this.#g,n=this.#b,a=this.#h,r=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});r=s.formatToParts(new Date(2e3,0,1,13,5));let l=s.formatToParts(new Date(2e3,0,1,1,5)).find(d=>d.type==="dayPeriod"),c=r.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{r=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#i=o,this.#k=i,this.#a.replaceChildren(),this.#d=[],this.#x=[];for(let s of r)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=document.createElement("input"),c=s.type==="dayPeriod"?"period":s.type;if(l.className=`seg seg--${c}`,l.type="text",l.spellcheck=!1,l.part.add("segment",c),l.autocomplete="off",l.autocorrect=!1,l.autocapitalize="off",l.setAttribute("aria-label",c==="hour"?"Hour":c==="minute"?"Minute":"AM/PM"),l.inputMode=c==="period"?"text":"numeric",c==="period"){let u=Math.max(2,vd(this.#i),vd(this.#k));l.maxLength=u,l.size=u}else l.maxLength=2,l.size=2;let d=c==="hour"?{kind:c,el:l,min:e?1:0,max:e?12:23}:c==="minute"?{kind:c,el:l,min:0,max:59}:{kind:c,el:l,min:0,max:1};this.#a.append(l),this.#d.push(d)}else{if(!s.value.trim())continue;let l=document.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#a.append(l),this.#x.push(s.value)}this.#O(a),this.#q(),this.#U(),this.#Z(),this.#E({dispatch:!1})}#i="AM";#k="PM";#v(e){if(e instanceof HTMLInputElement)return this.#d.find(n=>n.el===e)}#C=e=>{let n=this.#v(e.target);if(n){this.#p=n.el;return}(e.target===this.#t||e.target===this.#a)&&(e.preventDefault(),this.#V(this.#d[0]))};#m=e=>{let n=this.#v(e.target);if(!n)return;let a=this.#p===n.el;this.#p=void 0,a||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#w=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#d.some(a=>a.el===n)||(this.#L()&&this.#E(),this.#B("change"))})};#S=e=>{let n=this.#v(e.target);if(!n)return;let{el:a}=n,r=e.key;if(r==="ArrowUp"||r==="ArrowDown"){e.preventDefault(),this.#A(n,r==="ArrowUp"?1:-1);return}if(r==="PageUp"||r==="PageDown"){e.preventDefault(),this.#A(n,(r==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(r==="ArrowLeft"||r==="ArrowRight"){let o=a.selectionStart??0,i=a.selectionEnd??o;(r==="ArrowLeft"?o===0&&i===0:o===a.value.length&&i===a.value.length)&&(e.preventDefault(),this.#j(),this.#D(n,r==="ArrowRight"?1:-1));return}if(r==="Backspace"&&a.value===""){e.preventDefault(),this.#D(n,-1);return}n.kind!=="period"&&this.#x.some(o=>o.includes(r))&&(e.preventDefault(),this.#j(),this.#D(n,1,{numeric:!0}))};#M=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#O(n),this.#E(),this.#B("change"))};#I=e=>{let n=this.#v(e.target);!n||e.isComposing||(n.kind==="period"?this.#P(e,n):this.#T(n))};#T(e){let{el:n}=e,a=n.value.replace(/\D/g,"");a!==n.value&&(n.value=a);let r=e.kind==="hour"&&this.#g,o=r?23:e.max;if(a===""){e.kind==="hour"?this.#l=null:this.#c=null,this.#E({dispatch:!1,preserve:n});return}let i=a.slice(0,2),s=Number(i),l=!1;s>o&&(i=i.at(-1),s=Number(i),l=!0);let c=i.length===2||+`${s}0`>o;r?s===0&&i.length===1?this.#l=null:s===0?(this.#l=12,this.#s="am"):s>12?(this.#l=s-12,this.#s="pm"):(this.#l=s,this.#s==null&&(this.#s="am")):this.#R(e,Math.max(e.min,s)),this.#E({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#D(e,1)}#P(e,n){let{el:a}=n,r=a.value.trim();if(!r){this.#s=null,this.#E({dispatch:!1,preserve:a});return}let o=r.toLowerCase(),i=this.#i.toLowerCase(),s=this.#k.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#s=l,this.#E({dispatch:!1}),this.#D(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#s=null,this.#E({dispatch:!1,preserve:a});return}e.stopPropagation(),a.value=this.#s==="pm"?this.#k:this.#s==="am"?this.#i:""}#A(e,n){if(e.kind==="period"){this.#s=this.#s==null?"am":this.#s==="am"?"pm":"am",this.#L(),this.#E();return}let a=e.kind==="hour"?this.#l:this.#c,r=e.max-e.min+1,o;a==null?o=n>0?e.min:e.max:o=((a-e.min+n)%r+r)%r+e.min,this.#R(e,o),this.#L(),this.#E()}#R(e,n){e.kind==="hour"?this.#l=n:this.#c=n,e.kind==="hour"&&this.#g&&this.#s==null&&(this.#s="am")}#z(e){let n=xd(e);return n?n.h*60+n.min:null}get#_(){return this.#z(this.getAttribute("min"))}get#F(){return this.#z(this.getAttribute("max"))}#N(){let e=this.#H;return e==null||this.#c==null?null:e*60+this.#c}#L(){let e=this.#N();if(e==null)return!1;let n=this.#_,a=this.#F,r=e;return n!=null&&r<n&&(r=n),a!=null&&r>a&&(r=a),r===e?!1:(this.#O(`${Wa(Math.floor(r/60))}:${Wa(r%60)}`),!0)}#V(e){e&&(e.el.focus(),e.el.select())}#D(e,n,a={}){let r=this.#d.indexOf(e);for(let o=r+n;o>=0&&o<this.#d.length;o+=n){let i=this.#d[o];if(!a.numeric||i.kind!=="period"){this.#V(i);return}}}get#H(){return this.#l==null?null:this.#g?this.#s==null?null:Rb(this.#l,this.#s):this.#l}#E({dispatch:e=!0,preserve:n}={}){this.#j(n),this.#h=this.value,this.#e?.setFormValue(this.value),this.#G(),this.#$(),e&&this.#B("input")}#j(e){for(let n of this.#d)this.#Y(n,e===n.el)}#Y(e,n){let a=e.el;if(e.kind==="period"){let o=this.#s==="pm"?this.#k:this.#s==="am"?this.#i:"";n||(a.value=o),a.placeholder=this.#i;return}let r=e.kind==="hour"?this.#l:this.#c;n||(a.value=r==null?"":Wa(r)),a.placeholder="\u2013\u2013"}#O(e){let n=xd(e);if(!n){this.#l=null,this.#c=null,this.#s=null;return}this.#c=n.min,this.#g?(this.#l=(n.h+11)%12+1,this.#s=n.h<12?"am":"pm"):(this.#l=n.h,this.#s=null)}#B(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#q(){let e=this.getAttribute("aria-label")||this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#a.setAttribute("aria-label",e):this.#a.removeAttribute("aria-label")}#W=()=>{this.#q()};#Z(){let e=this.hasAttribute("disabled")||this.#o;for(let n of this.#d)n.el.disabled=e}#U(){let e=this.getAttribute("status")==="critical";for(let n of this.#d)n.el.setAttribute("aria-invalid",e?"true":"false");try{e?this.#e?.states.add("invalid"):this.#e?.states.delete("invalid")}catch{}}#G(){this.value?this.#e?.states.add("filled"):this.#e?.states.delete("filled")}#$(){if(!this.#e)return;let e=this.#d[0]?.el??this,n=this.hasAttribute("required"),a=this.#N(),r=this.#_,o=this.#F;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):a!=null&&r!=null&&a<r?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):a!=null&&o!=null&&a>o?this.#e.setValidity({rangeOverflow:!0},`Time must be ${this.getAttribute("max")} or earlier.`,e):this.getAttribute("status")==="critical"?this.#e.setValidity({customError:!0},"Invalid value.",e):this.#e.setValidity({})}get value(){let e=this.#H;return e==null||this.#c==null?"":`${Wa(e)}:${Wa(this.#c)}`}set value(e){this.#u=!0;let n=e??"";n!==this.value&&(this.#O(n),this.#r?this.#E({dispatch:!1}):this.#h=this.value)}clear(){this.#l=null,this.#c=null,this.#s=null,this.#E(),this.#B("change"),this.dispatchEvent(new CustomEvent(Bb,{bubbles:!0})),this.#d[0]?.el.focus()}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get validity(){return this.#e?.validity}get validationMessage(){return this.#e?.validationMessage??""}get willValidate(){return this.#e?.willValidate??!1}checkValidity(){return this.#e?.checkValidity()??!0}reportValidity(){return this.#e?.reportValidity()??!0}formResetCallback(){this.#O(this.getAttribute("defaultvalue")??""),this.#E(),this.#B("change")}formDisabledCallback(e){this.#o=e,this.#Z()}formStateRestoreCallback(e){this.value=e??""}};function wd(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ro)}wd();var Yi=globalThis.Temporal;var kd=(t,e)=>`Non-positive ${t}: ${e}`,Cd=(t,e)=>`Non-finite ${t}: ${e}`,Ed=t=>`Cannot convert bigint to ${t}`,Sd="Invalid object",Ga=(t,e,n,a)=>On(t,e)+`; must be between ${n}-${a}`,On=(t,e)=>`Invalid ${t}: ${e}`;var Wi=1e3,Gi=1e6,Ki=1e9,Xi=6e10,Ji=36e11;function st(t){return t===void 0?Object.create(null):Pn(t)}function oo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Ed(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Cd(e,t));return t}function Le(t,e){return Math.trunc(oo(t,e))||0}function io(t,e){return Td(Le(t,e),e)}function Td(t,e="number"){if(t<=0)throw new RangeError(kd(e,t));return t}function Qi(t,e,n){return Math.min(Math.max(t,e),n)}function ia(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function Pn(t){if(!ia(t))throw new TypeError(Sd);return t}var fo=On;var tr=t=>`Missing ${t}`,Ld=t=>"No valid fields: "+t.join(),Bd="Invalid bag",Rd=(t,e,n)=>On(t,e)+"; must be "+Object.keys(n).join(),Fd="Cannot use valueOf",Vd="Invalid calling context",go=t=>"Missing year"+(t?"/era/eraYear":""),Ln="Invalid leap month",Hd=t=>On("Calendar",t),jd=(t,e)=>`Unknown calendar ${t}; might need ${e}`,bs=t=>On("TimeZone",t),dn="Out-of-bounds date";var qd=t=>`Cannot parse: ${t}`,$t=t=>`Invalid substring: ${t}`;var fs=Qi,Ke=ia;function D(t){throw new RangeError(t)}function le(t){throw new TypeError(t)}function as(t,e,n,a,r){return _t(e,((o,i)=>{let s=o[i];return s===void 0&&le(tr(i)),s})(t,e),n,a,r)}function _t(t,e,n,a,r,o){let i=fs(e,n,a);return r&&e!==i&&D(((s,l,c,d,u)=>u?Ga(s,u[l],u[c],u[d]):Ga(s,l,c,d))(t,e,n,a,o)),i}function ca(t,e=Map){let n=new e;return(a,...r)=>{if(n.has(a))return n.get(a);let o=t(a,...r);return n.set(a,o),o}}var Zd=t=>vo({name:t},1),vo=(t,e)=>bn(n=>({value:n,configurable:1,writable:!e}),t),nr=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function bn(t,e){let n={};for(let a in e)n[a]=t(e[a],a);return n}function ar(t,e){let n={};for(let a of t)n[a]=e;return n}function xo(t){let e={};for(let n of t)e[n]=a=>a[n];return e}function Ot(t,e,n=Object.create(null)){for(let a of t)n[a]=e[a];return n}function $d(t,e,n){for(let a of t)if(e[a]!==n[a])return 0;return 1}function Zb(t,e,n){let a={...n};for(let r=0;r<e;r++)a[t[r]]=0;return a}function Xe(t,...e){return(...n)=>t(...e,...n)}function gs(){}function Ad(t){return t[0].toUpperCase()+t.substring(1)}function Ne(...t){return[].concat(...t).sort()}function pa(t){return new RegExp(`^${t}$`,"i")}function vs(t){return parseInt(t.padEnd(9,"0"))}function xs(t){return t&&t!=="+"?-1:1}function sa(t){return t===void 0?0:parseInt(t)}function uo(t,e){return String(e).padStart(t,"0")}var vt=Xe(uo,2);function Ut(t,e){return Math.sign(t-e)}function Me(t,e){return t<e?-1:t>e?1:0}function Ud(t,e){let n=t/e;return t%e<0n?n-1n:n}function ys(t,e){let n=Ud(t,e);return[n,t-n*e]}function zt(t,e){return[Math.floor(t/e),yo(t,e)]}function yo(t,e){return(t%e+e)%e}function ma(t,e){return Math.trunc(t/e)||0}function ws(t,e){return t%e||0}function Yd(t,e=1){return e*(.5+t/5)}function so(t){return Math.abs(t%1)===.5}var ks="iso8601",Wd="gregory",$b={bce:-1,ce:0};function Gd(t){let e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}var lt=void 0,Kd=0;function yt(t){return t===lt?"iso8601":t===0?"gregory":t.id}var Ub=/^M(\d{2})(L?)$/;function Xd(t){let e=Ub.exec(t);return e||D((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function Jd(t,e){return"M"+vt(t)+(e?"L":"")}function rs(t,e,n){return t+(e||n&&t>=n?1:0)}var os={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Cs=Object.keys(os);var rr=Wi,or=Gi,fn=Ki,ir=Xi,sr=Ji,Gt=864e11,wt=[1,rr,or,fn,ir,sr,Gt],Yb=BigInt(rr),ba=BigInt(or),Bn=BigInt(fn),Wb=BigInt(ir),Gb=BigInt(sr),ge=BigInt(Gt);function Qd(t,e){let n=Number(t/ge),a=Number(t%ge);return n*(Gt/e)+(Math.trunc(a/e)+a%e/e)}var Ze=Cs.slice(0,6),lr=xo(Ze),wo=["year"],qn=["day"],Es=["day","month","year"],ko=["offset"],Ss=["timeZone"],fa=["era","eraYear"],Kb=["era","eraYear","year"],eu=["month","monthCode"],Xb=["day","month","monthCode"],is=Ne(Ze),Jb=Ne(fa,wo),cr=Ne(eu,wo),tu=Ne(fa,cr),dr=Ne(["monthCode"],wo),nu=Ne(fa,dr),au=Ne(qn,["monthCode"]),Zn=Ne(qn,cr),$n=Ne(qn,fa,cr),ru=Ne(Zn,Ze),ou=Ne($n,Ze),Qb=Ne(Zn,Ze,ko),ef=Ne($n,Ze,ko),iu=Ne(Zn,Ze,ko,Ss),su=Ne($n,Ze,ko,Ss),tf=Ne(qn,dr),nf=Ne(qn,fa,dr),We=ar(Ze,0);function ur(t){return Co(t,1),t}var af={hour:23,minute:59,second:59};function Co(t,e){let n={};for(let a of Ze)n[a]=_t(a,t[a],0,af[a]||999,e);return n}function nt(t){return As(t)*fn+lu(t)}function Ts(t){return 1e3*As(t)+t.millisecond}function As(t){return 3600*t.hour+60*t.minute+t.second}function lu(t){return t.millisecond*or+t.microsecond*rr+t.nanosecond}function Ms(t){let[e,n]=zt(t,Gt);return[cu(n),e]}function cu(t){let[e,n]=zt(t,or),[a,r]=zt(n,rr);return rf(e,a,r)}function rf(t,e=0,n=0){let[a,r]=zt(t,36e5),[o,i]=zt(r,6e4),[s,l]=zt(i,1e3);return{hour:a,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Md(t){let[e,n]=ys(t,Bn);return[Number(e),Number(n)]}function ct(t){return un(t)+BigInt(nt(t))}function du(t){return hr(t)+Ts(t)}function un(t){return BigInt(Pt(t))*ge}function hr(t){return 864e5*Pt(t)}function Pt(t){return Ka(t.year,t.month,t.day)}function Ka(t,e=1,n=1){let a=e-1;return t+=Math.floor(a/12),e=yo(a,12),Date.UTC(t%400-400,e,0)/864e5+146097*(ma(t,400)+1)+n}function pr(t){let[e,n]=ys(t,ge);return{...uu(Number(e)),...cu(Number(n))}}function uu(t){let e=new Date(864e5*yo(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var hu=1972;function of(t){return[t,0]}function ss(t,e){if(!e)return{year:1972,month:t}}function sf(t,e,n){return{year:t,month:e,day:n}}function pu(t,e){switch(e){case 2:return Eo(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function lf(t){return Eo(t)?366:365}function Eo(t){return t%4==0&&(t%100!=0||t%400==0)}function mu(t,e,n){return t+=ma(n,12),(e+=ws(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function cf(t,e,n,a){return 12*(n-t)+a-e}function So(t){return yo(Ka(t.year,t.month,t.day)+4,7)||7}function bu(t){return Ka(t.year,t.month,t.day)-Ka(t.year)+1}function fu(t){let e=t.year,n=Math.floor((bu(t)-So(t)+10)/7),a=es(e);return n<1?n=a=es(--e):n>a&&(n=1,a=es(++e)),{weekOfYear:n,yearOfWeek:e,Be:a}}function es(t){let e=So({year:t,month:1,day:1});return e===4||e===3&&Eo(t)?53:52}function df({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function mr(t){return Kt(t),ur(t)}function Kt(t){return gu(t,1),t}function Id(t){return $d(Es,t,gu(t))}function gu(t,e){let{year:n}=t,a=as(t,"month",1,12,e);return{year:n,month:a,day:as(t,"day",1,pu(n,a),e)}}function me(t,e){return t?t.ae(e):e}function Rn(t,e,n){return t?t.L(e,n):of(n)}function br(t,e){return t===0?df(e):t&&t.h?.(e)||{}}function Fn(t,e,n,a){return t?t.de(e,n,a):sf(e,n,a)}function Xa(t,e){return t?t.j(e):12}function Ja(t,e,n){return t?t.o(e,n):pu(e,n)}function To(t,e){let{year:n,month:a}=me(t,e),[r,o]=Rn(t,n,a);return Jd(r,o)}function Is(t,e){let{year:n}=me(t,e);return t?t.q(n):Eo(n)}function Ds(t,e){let{year:n}=me(t,e);return Xa(t,n)}function zs(t,e){let{year:n,month:a}=me(t,e);return Ja(t,n,a)}function _s(t,e){let{year:n}=me(t,e);return t?t.i(n):lf(n)}function vu(t,e){if(!t)return bu(e);let{year:n}=me(t,e),a=Fn(t,n,1,1);return Pt(e)-Pt(a)+1}function xu(t,e){return t===lt?fu(e).weekOfYear:void 0}function yu(t,e){return t===lt?fu(e).yearOfWeek:void 0}var ve=Cs.map(t=>t+"s"),Os=xo(ve),wu=Ne(ve),uf=ve.slice(0,6),ku=ve.slice(6),hf=ku.slice(1),Ie=ar(ve,0),Ps=ar(uf,0),Ns=Xe(Zb,ve);function Cu(t,e){return e==null&&D(tr(t)),e}var Ve=Xe(pf,"string");function pf(t,e,n=t){return typeof e!==t&&le(fo(n,e)),e}function Ls(t,e="number"){return Number.isInteger(t)||D(((n,a)=>`Non-integer ${n}: ${a}`)(e,t)),t||0}function Bs(t){return typeof t=="symbol"&&le("Cannot convert Symbol to string"),String(t)}function Rs(t,e){return ia(t)?String(t):Ve(t,e)}function Ao(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&le(`Invalid bigint: ${t}`),t)}function Mo(t,e){return Ls(oo(t,e),e)}function Io(t,e){return typeof t=="string"?((n,a)=>{let r=Object.create(null);return r[n]=a,r})(e,t):Pn(t)}var Yt="smallestUnit";var mf={constrain:0,reject:1},bf={compatible:0,reject:1,earlier:2,later:3},ff={reject:0,use:1,prefer:2,ignore:3},gf={auto:0,never:1,critical:2,always:3},vf={auto:0,never:1,critical:2},xf={auto:0,never:1},yf={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},wf=[Math.floor,t=>so(t)?Math.floor(t):Math.round(t),Math.ceil,t=>so(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>so(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>so(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)],kf={previous:-1,next:1};function Fs(t){let e=t.roundingIncrement;return e===void 0?1:Le(e,"roundingIncrement")}function Vs(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Bs(e)==="auto")return;D(fo("fractionalSecondDigits",e))}e=_t("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Hs(t,e,n=0,a){let r=e[t];if(r===void 0)return a?n:void 0;if(r=Bs(r),r==="auto")return a?n:null;let o=os[r];return o===void 0&&(o=ve.indexOf(r)),o<0&&D(Rd(t,r,os)),o}function gn(t,e,n,a=0){let r=n[t];if(r===void 0)return a;let o=Bs(r),i=e[o];return i===void 0&&D(Rd(t,o,e)),i}var ga=Xe(Hs,Yt),Eu=Xe(Hs,"largestUnit"),Cf=Xe(Hs,"unit"),Su=Xe(gn,"overflow",mf),Tu=Xe(gn,"disambiguation",bf),Ef=Xe(gn,"offset",ff),js=Xe(gn,"calendarName",gf),Sf=Xe(gn,"timeZoneName",vf),Tf=Xe(gn,"offset",xf),va=Xe(gn,"roundingMode",yf),Af=Xe(gn,"direction",kf);function qs(t,e,n,a){let r=a?Gt:wt[e+1];if(r){let o=wt[e];r%((t=_t("roundingIncrement",t,1,r/o-(a?0:1),1))*o)&&D(fo("roundingIncrement",t))}else t=_t("roundingIncrement",t,1,n?10**9:1,1);return t}function da(t,e,n,a){return e!=null&&_t(t,e,n,a,1,Cs),e}function Au(t,e){e>t&&D("smallestUnit > largestUnit")}function xa(t,e,n,a=9,r=0,o=4){e=st(e);let i=Eu(e,r),s=Fs(e),l=va(e,o),c=ga(e,r,1);return i=da("largestUnit",i,r,a),c=da(Yt,c,r,a),i==null?i=Math.max(n,c):Au(i,c),s=qs(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function fr(t,e=6,n){let a=Fs(t=Io(t,Yt)),r=va(t,7),o=ga(t);return o=Cu(Yt,o),o=da(Yt,o,0,e),a=qs(a,o,void 0,n),[o,a,r]}function ue(t,e){return Ot(Es,t,Ot(Ze,e))}function ne(t){return t===void 0?0:Su(Pn(t))}function ua(t,e=0){t=st(t);let n=Tu(t),a=Ef(t,e);return[Su(t),a,n]}var Mu=BigInt(1e8)*ge,Zs=BigInt(-1e8)*ge,Iu=Zs-ge,Du=-3261848;function Do(t){let e=12*t.year+t.month;return(e<Du||e>3309129)&&D(dn),t}function Ge(t,e=1){return zu(un(t),e),t}function Un(t){let e=un(t);return zu(e),e!==Iu||nt(t)||D(dn),t}function zu(t,e=1){(t<(e?Iu:Zs)||t>Mu)&&D(dn)}function kt(t){return(t<Zs||t>Mu)&&D(dn),t}function $s(t,e){return kt(un(t)+BigInt(nt(t)-e))}function dt(t){return{epochNanoseconds:t}}function Ct(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Nt(t,e){return Ot(Ze,t,be(t,e))}function be(t,e){return Ot(Es,t,{calendar:e})}function Yn(t){return Ot(Ze,t)}function Pe(t){return Ot(ve,t,{sign:Ro(t)})}function gr(t){return e=t.epochNanoseconds,Number(Ud(e,ba));var e}function Us(t){return t.epochNanoseconds}function _u(t,e,n){let a=mn(e),[r,o]=((u,m)=>{let h=m((u=Io(u,"unit")).relativeTo),b=Cf(u);return b=Cu("unit",b),[b,h]})(n,t),i=Math.max(r,a),s=o&&jn(o);if(!o&&la(i,s))return Dd(e,r);if(o||D("Missing relativeTo"),!e.sign&&la(r,s))return 0;let[l,c,d]=Yu(o,e,r);return la(r,s)?Dd(l,r):Mf(l,c,r,d)}function Mf(t,e,n,a){let r=Ro(t)||1,o=Ys(Ns(n,t),n,r,a,e),i=o.ee,s=o.te,l=Number(s-i),c=Number(e-i);return o.pe[ve[n]]+c/l*r}function Dd(t,e){return Qd(Wt(t),wt[e])}function Ys(t,e,n,a,r){let o=ve[e],i=t,s=0,l=zd(i,o,n,a);return r&&!((c,d,u,m)=>m>0?Me(d,c)<=0&&Me(c,u)<=0:Me(u,c)<=0&&Me(c,d)<=0)(r,l.ee,l.te,Math.sign(n))&&(i={...t,[o]:t[o]+n},s=1,l=zd(i,o,n,a)),{...l,pe:i,Ae:s}}function zd(t,e,n,a){let r={...t,[e]:t[e]+n};return{ee:ds(a,t),te:ds(a,r),se:r}}function Ou(t,e,n){let a=n-e,r=t-e;if(!r)return 0;let o=r<0n?-r:r,i=a<0n?-a:a,s=Me(r,0n)===Me(a,0n)?1:-1;return Me(o,i)<=0?o===i?s:Yd(Me(2n*o,i),s):Number(r)/Number(a)}function Pu(t,e,n,a){let{epochNanoseconds:r}=t,{timeZone:o,calendar:i}=t;if(e===0&&n===1)return{epochNanoseconds:r,timeZone:o,calendar:i};if(e===6){let s=ue(De(t),We),l=ue(vn(s,1),We),c=hn(o,s),d=hn(o,l);r=Ws(If(r,c,d),a)?d:c}else{let s=De(t),l=s.offsetNanoseconds;r=wa(o,zo(s,ya(e,n),a),l,2,0,1)}return{epochNanoseconds:r,timeZone:o,calendar:i}}function Nu(t){let{timeZone:e}=t,n=ue(De(t),We),a=ue(vn(n,1),We),r=hn(e,n);return Qd(hn(e,a)-r,sr)}function Lu(t){let{timeZone:e,calendar:n}=t;return Ct(hn(e,ue(De(t),We)),e,n)}function If(t,e,n){return Ou(t<n?t:n-1n,e,n)}function zo(t,e,n){let[a,r]=_o(t,e,n),o=ue(vn(t,r),a);return Un(o),o}function _o(t,e,n){return Ms(ha(nt(t),e,n))}function ho(t){return ha(t,ir,7)}function ya(t,e){return wt[t]*e}function vr(t,e){return BigInt(wt[t])*BigInt(e)}function Df(t,e,n){let a=Math.min(mn(t),6);return pn(Po(Wt(t),BigInt(e),n),a)}function Oo(t,e,n,a,r,o,i,s){if(a===0&&r===1)return t;let l=Ro(t)||1,c=la(a,s)?s&&a<6&&n>=6?_f:zf:Of,[d,u,m]=c(l,t,e,n,a,r,o,i);return m&&a!==7&&(d=((h,b,f,g,x,y)=>{for(let k=g+1;k<=f;k++){if(k===7&&f!==7)continue;let S=Ns(k,h);S[ve[k]]+=x;let M=Me(b,ds(y,S));if(M&&M!==x)break;h=S}return h})(d,u,n,Math.max(6,a),l,i)),d}function Po(t,e,n){return Bu(t,e,n,t/e%2n)}function No(t,e,n){let[a,r]=ys(t,ge),o=a*ge;return o+Bu(r,e,n,(o/e+r/e)%2n)}function Bu(t,e,n,a){let r=t/e,o=t%e,i=0;o&&(i=Yd(Me(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=Ws(Number(a)+i,n);return(r-a+BigInt(s))*e}function ha(t,e,n){return Ws(t/e,n)*e}function Ws(t,e){return wf[e](t)}function zf(t,e,n,a,r,o,i){let s=Wt(e),l=Po(s,vr(r,o),i),c=l-s,d=Math.sign(Number(l/ge)-Number(s/ge))===t,u=pn(l,Math.min(a,6));return[{...e,...u},n+c,d]}function _f(t,e,n,a,r,o,i,s){let l=Number(Wn(e)),c=ya(r,o),d=ha(l,c,i),u=Ys({...e,...Ps},6,t,s,n),m=u.ee,h=u.te,b=d-Number(h-m),f=0;b&&Math.sign(b)!==t?n=m+BigInt(d):(f+=t,d=ha(b,c,i),n=h+BigInt(d));let g=Fo(d);return[{...e,...g,days:e.days+f},n,!!f]}function Of(t,e,n,a,r,o,i,s){let l=ve[r],c=Ns(r,e);r===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=ma(e[l],o)*o;c[l]=d;let u=Ys(c,r,o*t,s,n),m=u.ee,h=u.te,b=Ou(n,m,h),f=u.pe[l],g=u.se[l],x=ha(f+b*t*o,o,i),y=x===g;return c[l]=x,[c,y?h:m,u.Ae||y]}function Ru(t,e){return t.timeZone.O(t.epochNanoseconds,(n=>{let a=Io(n,"direction"),r=Af(a,0);return r||D(fo("direction",r)),r})(e))}var De=ca(Pf,WeakMap);function Pf(t){let{epochNanoseconds:e,timeZone:n}=t,a=n.B(e);return{...pr(e+BigInt(a)),offsetNanoseconds:a}}function wa(t,e,n,a=0,r=0,o,i){if(n!==void 0&&a===1&&(a===1||i))return $s(e,n);a!==2&&a!==0||Ge(e,0);let s=t.N(e);if(n!==void 0&&a!==3){let l=((c,d,u,m)=>{let h=ct(d);m&&(u=ho(u));for(let b of c){let f=Number(h-b);if(m&&(f=ho(f)),f===u)return b}})(s,e,n,o);if(l!==void 0)return l;a===0&&D("Invalid TimeZone offset")}return i?ct(e):ka(t,e,r,s)}function ka(t,e,n=0,a=t.N(e)){if(a.length===1)return a[0];if(n===1&&D("Ambiguous offset"),a.length)return a[n===3?1:0];let r=ct(e),o=((s,l)=>{let c=s.B(l-ge);return(d=>(d>Gt&&D("Out-of-bounds TimeZone gap"),d))(s.B(l+ge)-c)})(t,r),i=pr(r+BigInt(o*(n===2?-1:1)));return(a=t.N(i))[n===2?0:a.length-1]}function hn(t,e){let n=t.N(e);if(n.length)return n[0];let a=ct(e)-ge;return t.O(a,1)}function Gs(t,e,n,a,r){let o=ne(r);a.sign&&mn(a)<8&&D("Cannot use small units");let i=Ge(Qa(e,n));return Qa(e,Fu(e,i,t?He(a):a,o))}function Ks(t,e){return kt(t+(ll(n=e)&&D("Cannot use large units"),Wn(n)));var n}function Vn(t,e,n){let{calendar:a,epochNanoseconds:r,timeZone:o}=t,i=Wn(e),s=r;if(ll(e)){let l=De(t);s=ka(o,ue(Ca(a,l,{...e,...Ps},n),l))+i}else s+=i,ne(n);return{...t,epochNanoseconds:kt(s)}}function Hn(t,e,n,a){let[r,o]=Lo(e,n);return Un(ue(Ca(t,e,{...n,...Ps,days:n.days+o},a),r))}function Ca(t,e,n,a){if(n.years||n.months||n.weeks)return Fu(t,e,n,ne(a));ne(a);let r=n.days+Number(Wn(n)/ge);return r?Ge(vn(e,r)):e}function Qa(t,e){return vn(e,1-me(t,e).day)}function Lo(t,e){let n=Wn(e),a=Number(n/ge),r=Number(n%ge),[o,i]=Ms(nt(t)+r);return[o,a+i]}function vn(t,e){return e?uu(Pt(t)+e):t}function Fu(t,e,n,a){let{years:r,months:o,weeks:i,days:s}=n,l;if(s+=Number(Wn(n)/ge),r||o)l=ls(t,e,r,o,a);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=vn(l,7*i+s)),Ge(l)}function ls(t,e,n,a,r){let o=me(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Rn(t,i,s);i+=n,s=cs(t,c,d,t?t.p(i):void 0,r),s=_t("month",s,1,Xa(t,i),r)}return a&&({year:i,month:s}=t?t.K(i,s,a):mu(i,s,a)),l=_t("day",l,1,Ja(t,i,s),r),Fn(t,i,s,l)}function cs(t,e,n,a,r){if(n){let o=t?t.l:void 0;return a!==void 0&&(o<0||a===e+1)?a:(r===1&&D(Ln),o<0?-o:e)}return rs(e,0,a)}function Xt(t,e){return yt(t)!==yt(e)&&D("Mismatching Calendars"),t}function Nf(t,e){return t.m!==e.m&&D("Mismatching TimeZones"),t}function Vu(t){return t.timeZone.id}function Xs(t,e,n,a){let[r,o,i,s]=xa(t,a,3,5),l=Bo(e.epochNanoseconds,n.epochNanoseconds,r,o,i,s);return Pe(t?He(l):l)}function Js(t,e,n,a,r){let[o,i,s,l]=xa(t,r,5),c=n.epochNanoseconds,d=a.epochNanoseconds,u;if(Me(d,c))if(o<6)u=Bo(c,d,o,i,s,l);else{let m=Nf(n.timeZone,a.timeZone);u=al(m,e,n,a,o),u=Oo(u,d,o,i,s,l,Uu(e,m,n),1)}else u=Ie;return Pe(t?He(u):u)}function Qs(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6),c=ct(n),d=ct(a),u=Me(d,c),m;return u?o<=6?m=Bo(c,d,o,i,s,l):(m=qu(e,n,a,u,o),m=Oo(m,d,o,i,s,l,Bf(e,n))):m=Ie,Pe(t?He(m):m)}function el(t,e,n,a,r){let[o,i,s,l]=xa(t,r,6,9,6);return Hu(t,e,n,a,o,i,s,l)}function tl(t,e,n,a,r){let[o,i,s,l]=xa(t,r,9,9,8),c=Qa(e,n),d=Qa(e,a);return Zu(c,d)?Hu(t,e,Ge(c),Ge(d),o,i,s,l,8):Pe(Ie)}function Hu(t,e,n,a,r,o,i,s,l=6){let c=un(n),d=un(a),u;return Me(d,c)?r===6?u=Bo(c,d,r,o,i,s):(u=rl(e,n,a,r),o===l&&i===1||(u=Oo(u,d,r,o,i,s,$u(e,n)))):u=Ie,Pe(t?He(u):u)}function nl(t,e,n,a){let[r,o,i,s]=xa(t,a,5,5),l=ha(nt(n)-nt(e),ya(o,i),s),c={...Ie,...Fo(l,r)};return Pe(t?He(c):c)}function al(t,e,n,a,r){let o=Me(a.epochNanoseconds,n.epochNanoseconds);if(!o)return Ie;if(r<6)return{...Ie,...pn(a.epochNanoseconds-n.epochNanoseconds,r)};if(!Zu(De(n),De(a)))return{...Ie,...pn(a.epochNanoseconds-n.epochNanoseconds,5)};let[i,s,l]=Lf(t,n,a,o);return{...r===6?{...Ie,days:co(i,s)}:rl(e,i,s,r),...Fo(l)}}function ju(t,e,n,a){let r=ct(e),o=ct(n),i=Me(o,r);return i?a<=6?{...Ie,...pn(o-r,a)}:qu(t,e,n,i,a):Ie}function qu(t,e,n,a,r){let o=n,i=nt(n)-nt(e);return Math.sign(i)===-a&&(o=vn(n,-a),i+=Gt*a),{...rl(t,e,o,r),...Fo(i)}}function rl(t,e,n,a){if(a<=7){let f=co(e,n);return a===7?{...Ie,weeks:ma(f,7),days:ws(f,7)}:{...Ie,days:f}}let r=me(t,e),o=me(t,n);if(a===8){let{year:f,month:g,day:x}=r,{year:y,month:k,day:S}=o,M=Math.sign(Ut(y,f)||Ut(k,g)||co(e,n)),N=0,L=0;if(M){N=t?t._(f,g,y,k):cf(f,g,y,k);let C=ls(t,e,0,N,0);M*Ut(x,S)>0&&(N-=M,C=ls(t,e,0,N,0)),L=co(C,n)}return{...Ie,months:N,days:L}}let{year:i,month:s,day:l}=r,{year:c,month:d,day:u}=o,m=c-i,h=d-s,b=u-l;if(m||h){let f=Math.sign(m||h),g=Ja(t,c,d),x=0;if(Math.sign(u-l)===-f){let y=g;({year:c,month:d}=t?t.K(c,d,-f):mu(c,d,-f)),m=c-i,h=d-s,g=Ja(t,c,d),x=f<0?-y:g}if(b=u-Math.min(l,g)+x,m){let[y,k]=Rn(t,i,s),[S,M]=Rn(t,c,d),N=t?t.l:void 0;if(h=N!==void 0&&k&&!M&&(N<0?f>0&&S===-N:f<0&&S===y)?0:S-y||Number(M)-Number(k),Math.sign(h)===-f){let L=f<0&&-Xa(t,c);c-=f,m=c-i,h=d-cs(t,y,k,t?t.p(c):void 0,0)+(L||Xa(t,c))}else if(t){let L=cs(t,y,k,t.p(c),0);h=t._(c,L,c,d)}}}return{...Ie,years:m,months:h,days:b}}function Zu(t,e){return Ut(t.year,e.year)||Ut(t.month,e.month)||Ut(t.day,e.day)}function Lf(t,e,n,a){let r=De(e),o=De(n),i=n.epochNanoseconds,s=0,l=nt(o)-nt(r);Math.sign(l)===-a&&s++;let c=s+(a>0?1:0);for(;s<=c;s++){let d=vn(o,s*-a),u=ka(t,ue(d,r));if(Me(i,u)!==-a)return[r,d,Number(i-u)]}}function Bo(t,e,n,a,r,o){return{...Ie,...pn(Po(e-t,vr(a,r),o),n)}}function co(t,e){return Pt(e)-Pt(t)}function $u(t,e){return{origin:e,ie:un(e),calendar:t,he:un}}function Bf(t,e){return{origin:e,ie:ct(e),calendar:t,he:n=>ct(ue(n,e))}}function Uu(t,e,n){let a=De(n);return{origin:a,ie:n.epochNanoseconds,calendar:t,he:r=>ka(e,ue(r,a))}}function ds(t,e){return ll(e)?t.he(Ca(t.calendar,t.origin,e)):t.ie}function Yu(t,e,n){let{calendar:a}=t;if(jn(t)){let{timeZone:i}=t,s=Vn(t,e);return[al(i,a,t,s,n),s.epochNanoseconds,Uu(a,i,t)]}let r=Un(ue(t,We)),o=Hn(a,r,e);return[ju(a,r,o,n),ct(o),$u(a,t)]}function _d(t,e){return jn(t)?Vn(t,e).epochNanoseconds:ct(Hn(t.calendar,ue(t,We),e))}function jn(t){return"timeZone"in t}function la(t,e){return t<=6-(e?1:0)}function ol(t,e,n){let a={};for(let r=e;r>=0;r--){let o=wt[r];a[n[r]]=ma(t,o),t=ws(t,o)}return a}var Rf=2**53;function il(t,e,n,a,r){let o=t(st(r).relativeTo),i=Math.max(mn(n),mn(a));return la(i,o&&jn(o))?Ff(e,n,a,i):(o||D("Missing relativeTo"),e&&(a=He(a)),Pe(((s,l,c,d)=>{let{calendar:u}=s;if(jn(s)){let{timeZone:b}=s,f=Vn(s,l);return al(b,u,s,Vn(f,c),d)}let m=ue(s,We),h=Hn(u,m,l);return ju(u,m,Hn(u,h,c),d)})(o,n,a,i)))}function Ff(t,e,n,a){return Pe(xn(((r,o,i,s)=>{let l=Wt(r)+Wt(o)*BigInt(s?-1:1);return Number.isFinite(Number(l/ge))||D(dn),{...Ie,...pn(l,i)}})(e,n,a,t)))}function Wu(t,e,n){let a=mn(e),[r,o,i,s,l]=((b,f,g)=>{b=Io(b,Yt);let x=Eu(b),y=g(b.relativeTo),k=Fs(b),S=va(b,7),M=ga(b);return x===void 0&&M===void 0&&D("Required smallestUnit or largestUnit"),M==null&&(M=0),x==null&&(x=Math.max(M,f)),Au(x,M),k=qs(k,M,1),k>1&&M>5&&x!==M&&D("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[x,M,k,S,y]})(n,a,t);if(!l&&Math.max(a,r)<=6)return Pe(xn(((b,f,g,x,y)=>{let k=Po(Wt(b),vr(g,x),y);return{...Ie,...pn(k,f)}})(e,r,o,i,s)));let c=l&&jn(l),d=c&&r>=6&&o<6;if(!e.sign&&!d)return e;l||D("Missing relativeTo");let[u,m,h]=Yu(l,e,r);return Pe(Oo(u,m,r,o,i,s,h,c))}function Gu(t){return t.sign===-1?sl(t):t}function sl(t){return Pe(He(t))}function He(t){let e={};for(let n of ve)e[n]=-1*t[n]||0;return e}function Ro(t,e=ve){let n=0;for(let a of e){let r=Math.sign(t[a]);r&&(n&&n!==r&&D("Cannot mix duration signs"),n=r)}return n}function xn(t){for(let n of hf)_t(n,t[n],-4294967295,4294967295,1);let e=Wt(t);return Ku(Number(e/Bn)),t}function Ku(t){Number.isSafeInteger(t)||D("Out-of-bounds duration")}function Wt(t){return BigInt(t.days)*ge+Wn(t)}function Wn(t){return BigInt(t.hours)*Gb+BigInt(t.minutes)*Wb+Xu(t)}function Xu(t){return BigInt(t.seconds)*Bn+BigInt(t.milliseconds)*ba+BigInt(t.microseconds)*Yb+BigInt(t.nanoseconds)}function pn(t,e=6){let n=Number(t/ge),a=Number(t%ge),r=wt[e],o=e<=3?Number(t/BigInt(r)):n*(Gt/r)+ma(a,r);Number.isFinite(o)||D(dn),e<=3&&Math.abs(o)/(fn/wt[e])>=Rf&&D(dn);let i=ol(a,e,ve);return i[ve[e]]=o,i}function Fo(t,e=5){return ol(t,e,ve)}function ll(t){return!!Ro(t,ku)}function mn(t){let e=9;for(;e>0&&!t[ve[e]];e--);return e}function xr(t,e){return Me(t.epochNanoseconds,e.epochNanoseconds)}function Ju(t,e,n,a){let r=t(st(a).relativeTo),o=Math.max(mn(e),mn(n));return $d(ve,e,n)?0:la(o,r&&jn(r))?Me(Wt(e),Wt(n)):(r||D("Missing relativeTo"),Me(_d(r,e),_d(r,n)))}function cl(t,e){return Gn(t,e)||Vo(t,e)}function Gn(t,e){return Ut(Pt(t),Pt(e))}function Vo(t,e){return Ut(nt(t),nt(e))}function Qu(t,e){return!xr(t,e)}function eh(t,e){return!xr(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function th(t,e){return!cl(t,e)&&t.calendar===e.calendar}function nh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function ah(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function rh(t,e){return!Gn(t,e)&&t.calendar===e.calendar}function oh(t,e){return!Vo(t,e)}function Ea(t){return t===0?$b:t?t.k:void 0}function $e(t,e,n=e){return Ea(t)?n:e}function dl(t,e){let n=t||void 0,a=Ea(t),{era:r,eraYear:o,year:i}=e;if(i!==void 0&&(i=Le(i,"year")),o!==void 0&&(o=Le(o,"eraYear")),r!==void 0||o!==void 0){r!==void 0&&o!==void 0||le("Mismatching era/eraYear"),a||D("Forbidden era/eraYear");let s=Gd(r),l=a[s];l===void 0&&D((d=>`Invalid era: ${d}`)(r));let c=n?.$?n.$(o,s,l):Vf(o,l);i!==void 0&&i!==c&&D("Mismatching year/eraYear"),i=c}else i===void 0&&le(go(a));return i}function po(t,e,n,a,r){let{month:o,monthCode:i}=e;if(i!==void 0){let s=((l,c,d,u,m=Xd(c))=>{let h=l?l.p(d):void 0,[b,f]=m,g=rs(b,f,h);if(f){let x=l?l.l:void 0;x===void 0&&D(Ln),x>0?(g>x&&D(Ln),h!==g&&(u===1&&D(Ln),g=rs(b,0,h))):(g!==-x&&D(Ln),h===void 0&&u===1&&D(Ln))}return g})(t,i,n,a,r);o!==void 0&&o!==s&&D("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&le("Missing month/monthCode");return _t("month",o,1,Xa(t,n),a)}function us(t,e,n,a,r){return as(e,"day",1,Ja(t,a,n),r)}function Vf(t,e){return(e+t)*(Math.sign(e)||1)||0}function yr(t,e){return Co(Ot(Ze,{...We,...t}),e)}var Hf=pa("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Ho(t){let e=ul(t);return e===void 0&&D(qd(t)),e}function ul(t,e){let n=Hf.exec(t);if(n&&(a=>(r=>{r[0]!=="T"&&r[0]!=="t"||(r=r.slice(1));let o=r.search(/[.,]/),i=o<0?r:r.slice(0,o),s=i.split(":");return s.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(i):(s.length===2||s.length===3)&&s.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(a.slice(1)))(n[0]))return((a,r)=>{let o=a[4]||a[5];return r&&o&&D($t(o)),s=(sa(a[2])*sr+sa(a[3])*ir+sa(a[4])*fn+vs(a[5]||""))*xs(a[1]),Math.abs(s)>=Gt&&D("Out-of-bounds offset"),s;var s})(n,e)}var ut={era:Rs,month:io,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){let n=t.toString;if(typeof n=="function")return Ve(n.call(t),e)}return Ve(t,e)},day:io},hl=ar(Ze,Le),ih=ar(ve,Mo),pl=Object.assign({},ut,hl),ml={offset(t){return Ho(Rs(t))},...pl};function ke(t,e,n,a,r=!a){let o={},i=0;for(let s of e){let l=t[s];if(l!==void 0){i=1;let c=n[s];c&&(l=c(l,s)),o[s]=l}else a&&a.includes(s)&&le(tr(s))}return r&&!i&&le(Ld(e)),o}function wr(t,e=We,n){let a=ue(t,e);return Un(a),Nt(a,n)}function er(t,e,n){return sh(t,e,lh(t,e),ne(n))}function jo(t,e,n){let a=lh(t,e),r=n();return[sh(t,e,a,r[0]),...r]}function sh(t,e,n,a){let r=n[1],o=po(t,e,r,a,n[0]);return be(Ge(Fn(t,r,o,us(t,e,o,r,a))),t)}function bl(t){if(t.monthCode!==void 0)return Xd(t.monthCode)}function lh(t,e){let n=Ea(t);return e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(n)),e.monthCode===void 0&&e.month===void 0&&le("Missing month/monthCode"),e.day===void 0&&le(tr("day")),[bl(e),dl(t,e)]}function fl(t,e,n){let a=Ea(t);e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(a)),e.monthCode===void 0&&e.month===void 0&&le("Missing month/monthCode");let r=bl(e),o=dl(t,e);return be(Do(Fn(t,o,po(t,e,o,ne(n),r),1)),t)}function gl(t,e,n){let a=t===lt,r=Ea(t);e.day===void 0&&le(tr("day")),a||e.month===void 0||e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||le(go(r));let o=bl(e),i=e.eraYear!==void 0||e.year!==void 0?dl(t,e):void 0,s=ne(n),l,c,d;if(i===void 0&&a&&(i=1972),i!==void 0){a||Ge(Fn(t,i,1,1));let b=po(t,e,i,s,o);l=us(t,e,b,i,s),[c,d]=Rn(t,i,b)}else{e.monthCode===void 0&&le("Missing month/monthCode"),[c,d]=o;let b=t?t.ne:1972;if(b!==void 0)l=us(t,e,po(t,e,b,s,o),b,s);else{let f=s===0&&t?t.fe?.(c,d,e.day):void 0;l=f!==void 0?f:e.day}}d&&((t&&t.U?.[c])??1/0)<e.day&&(s===1&&D(Ln),d=0,l=fs(e.day,1,(t&&t.R)??1/0));let u=t?t.u(c,!!d,l):ss(c,!!d);for(;!u&&s===0&&l>1;)l--,u=t?t.u(c,!!d,l):ss(c,!!d);u||D("Cannot guess year");let{year:m,month:h}=u;return be(Ge(Fn(t,m,h,l)),t)}var Lt=Intl.DateTimeFormat;function jf(t,e){e<-864e13&&D(dn);let n=t.formatToParts(e),a={};for(let r of n)a[r.type]=r.value;return a}var qf={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},ts=-388152e4;function ch(t,e=4){let n=Vs(t),a=va(t,4),r=ga(t);return[a,...xl(da(Yt,r,0,e),n)]}function vl(t){return js(st(t))}function dh(t,e){return ch(st(t),e)}function xl(t,e){return t!=null?[wt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function yl(t,e,n){let[a,r,o,i]=(l=>{let c=Vs(l=st(l)),d=va(l,4),u=ga(l);return[l.timeZone,d,...xl(da(Yt,u,0,4),c)]})(n),s=a!==void 0;return((l,c,d,u,m,h)=>{d=No(d,BigInt(m),u);let b=c.B(d);return Al(pr(d+BigInt(b)),h)+(l?kr(ho(b)):"Z")})(s,Je(s?t(a):"UTC"),e.epochNanoseconds,r,o,i)}function wl(t,e){let n=(a=>{a=st(a);let r=js(a),o=Vs(a),i=Tf(a),s=va(a,4),l=ga(a);return[r,Sf(a),i,s,...xl(da(Yt,l,0,4),o)]})(e);return((a,r,o,i,s,l,c,d,u,m)=>{i=No(i,BigInt(u),d);let h=o.B(i);return Al(pr(i+BigInt(h)),m)+kr(ho(h),c)+Uf(r,l)+Ml(a,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function kl(t,e){let n=(a=>(a=st(a),[js(a),...ch(a)]))(e);return((a,r,o,i,s,l)=>Al(zo(r,s,i),l)+Ml(a,o))(t.calendar,t,...n)}function Cl(t,e){return n=t.calendar,a=t,r=vl(e),mo(a)+Ml(n,r);var n,a,r}function El(t,e){return uh(t.calendar,hh,t,vl(e))}function Sl(t,e){return uh(t.calendar,$f,t,vl(e))}function uh(t,e,n,a){let r=a>1||a===0&&t!==lt;return a===1?t===lt?e(n):mo(n):r?mo(n)+mh(yt(t),a===2):e(n)}function Tl(t,e){return((n,a,r,o)=>ph(_o(n,r,a)[0],o))(t,...dh(e))}function qo(t,e){let[n,a,r]=dh(e,3);return a>1&&xn(t={...t,...Df(t,a,n)}),Zf(t,r)}function Zf(t,e){let{sign:n}=t,a=n===-1?He(t):t,{hours:r,minutes:o}=a,i=Xu(a),s=Number(i/Bn),l=Number(i%Bn);Ku(s);let c=Il(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+Od({Y:Nn(a.years),M:Nn(a.months),W:Nn(a.weeks),D:Nn(a.days)})+(r||o||s||d?"T"+Od({H:Nn(r),M:Nn(o),S:Nn(s,d)+c}):"")}function Od(t){let e=[];for(let n in t){let a=t[n];a&&e.push(a,n)}return e.join("")}function Nn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Al(t,e){return mo(t)+"T"+ph(t,e)}function mo(t){return hh(t)+"-"+vt(t.day)}function hh(t){let{year:e}=t;return(e<0||e>9999?bh(e)+uo(6,Math.abs(e)):uo(4,e))+"-"+vt(t.month)}function $f(t){return vt(t.month)+"-"+vt(t.day)}function ph(t,e){let n=[vt(t.hour),vt(t.minute)];return e!==-1&&n.push(vt(t.second)+((a,r,o,i)=>Il(a*or+r*rr+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function kr(t,e=0){if(e===1)return"";let[n,a]=zt(Math.abs(t),sr),[r,o]=zt(a,ir),[i,s]=zt(o,fn);return bh(t)+vt(n)+":"+vt(r)+(i||s?":"+vt(i)+Il(s):"")}function Uf(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Ml(t,e){return e>1||e===0&&t!==lt?mh(yt(t),e===2):""}function mh(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var Yf=/0+$/;function Il(t,e){let n=uo(9,t);return n=e===void 0?n.replace(Yf,""):n.slice(0,e),n?"."+n:""}function bh(t){return t<0?"-":"+"}var Wf=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Gf=/[^\w\/:+-]+/;function fh(t){return Zo(Ve(t))}function Zo(t){return gh(t).id}function gh(t){let e=t.toUpperCase(),n=(r=>{let o=ul(r,1);if(o!==void 0)return{id:kr(o),X:o,m:o}})(e);if(n)return{kind:"fixed",...n};let a=e==="UTC"?"UTC":(r=>(Gf.test(r)&&D(bs(r)),Wf.test(r)&&D("Forbidden ICU TimeZone"),r.toLowerCase().split("/").map((o,i)=>(o.length<=3||/\d/.test(o))&&!/etc|yap/.test(o)?o.toUpperCase():o.replace(/baja|dumont|[a-z]+/g,(s,l)=>s.length<=2&&!i||s==="in"||s==="chat"?s.toUpperCase():s.length>2||!l?Ad(s).replace(/island|noronha|murdo|rivadavia|urville/,Ad):s)).join("/")))(t);return Kf(a)}var Kf=ca(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=Xf(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),Xf=ca(t=>new Lt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Je(t){let e=gh(t);return Jf(e.id,e)}var Jf=ca((t,e)=>e.kind==="named"?new ps(t,e.m,e.format):new hs(t,e.m,e.kind==="fixed"?e.X:0)),hs=class{constructor(e,n,a){this.id=e,this.m=n,this.X=a}B(){return this.X}N(e){return[$s(e,this.X)]}O(){}},ps=class{constructor(e,n,a){this.id=e,this.m=n,this.ke=((r,o)=>{let i=ca(r),s=ca(Qf),l=86400*o;function c(u){let[m,h]=Nd(u,l),b=lo(m),f=lo(h),g=i(b),x=i(f);return g===x?g:d(s(b,f),g,x,u)}function d(u,m,h,b){let f,g;for(;(b===void 0||(f=b<u[0]?m:b>=u[1]?h:void 0)===void 0)&&(g=u[1]-u[0]);){let x=u[0]+Math.floor(g/2);r(x)===h?u[1]=x:u[0]=x+1}return f}return{xe(u){let m=c(u-86400),h=c(u+86400),b=u-m,f=u-h;if(m===h)return[b];let g=c(b);return g===c(f)?[u-g]:m>h?[b,f]:[]},we:c,O:function u(m,h){if(h>0&&m>=864e10)return;if(h<0){if(m<=ts)return;let S=Pd()+94867200;if(m>S)return u(S,-1)}let b=h>0?Math.max(m,ts):m,[f,g]=Nd(b,l),x=l*h,y=h>0?Math.max(m,Pd())+94867200:ts,k=()=>h<0?g>y:f<y;for(;k();){let S=lo(f),M=lo(g),N=i(S),L=i(M);if(N!==L){let C=s(S,M);d(C,N,L);let I=C[0];if((Ut(I,m)||1)===h)return I}f+=x,g+=x}}}})((r=>o=>{let i=jf(r,1e3*o);return 86400*Ka((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&Gd(s.era)==="bce"?1-c:c})(i),parseInt(i.month),parseInt(i.day))+3600*parseInt(i.hour)+60*parseInt(i.minute)+parseInt(i.second)-o})(a),(r=>{let o=r.split("/").pop();return qf[o]||60})(e))}B(e){return this.ke.we((n=>Md(n)[0])(e))*fn}N(e){let n=86400*Pt(e)+As(e),a=lu(e);return this.ke.xe(n).map(r=>kt(BigInt(r)*Bn+BigInt(a)))}O(e,n){let[a,r]=Md(e),o=this.ke.O(a+(n>0||r?1:0),n);if(o!==void 0)return BigInt(o)*Bn}};function Pd(){return Math.floor(Date.now()/1e3)}function Qf(t,e){return[t,e]}function Nd(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function lo(t){return fs(t,-1e10,864e10)}function vh(t,e,n){let a=ke(n,$e(e,iu,su),ml,[],0);if(a.timeZone!==void 0){let r=er(e,a),o=yr(a),i=Je(t(a.timeZone));return{epochNanoseconds:wa(i,ue(r,o),a.offset),timeZone:i,calendar:e}}return er(e,a)}function xh(t,e,n,a){let r=ke(n,$e(e,iu,su),ml,Ss,0),o=t(r.timeZone),[i,s,l,c]=jo(e,r,()=>ua(a)),d=yr(r,s),u=Je(o);return Ct(wa(u,ue(i,d),r.offset,l,c),u,e)}function yh(t,e,n){let a=ke(e,$e(t,ru,ou),pl,[],0),[r,o]=jo(t,a,()=>[ne(n)]);return wr(r,yr(a,o),t)}function wh(t,e,n,a=[]){return er(t,ke(e,$e(t,Zn,$n),ut,a),n)}function kh(t,e,n,a){return fl(t,ke(e,$e(t,cr,tu),ut,a),n)}function Ch(t,e,n,a){let r=ke(n,$e(t,Zn,$n),ut,qn,0);return e&&r.month!==void 0&&r.monthCode===void 0&&r.year===void 0&&(r.year=1972),gl(t,r,a)}function Eh(t,e){return yr(ke(t,is,hl,[],1),ne(e))}function Sh(t){let e=ke(t,wu,ih);return Pe(xn({...Ie,...e}))}function xt(t){D(qd(t))}function Th(t){let e=yn(t=Rs(t)),n;return e||xt(t),e.C?n=0:e.offset?n=Ho(e.offset):xt(t),e.timeZoneId&&ul(e.timeZoneId,1),mr(e),dt($s(e,n))}function Ah(t,e){let n=yn(Ve(t));return n||xt(t),n.timeZoneId?Bh(n,e,void 0):(n.C&&xt(t),ms(n,e))}function Mh(t,e,n){let a=yn(Ve(t));return a&&a.timeZoneId||xt(t),Bh(a,e,n)}function Ih(t,e){let n=yn(Ve(t));return n&&!n.C||xt(t),Rh(n,e)}function Dh(t,e){let n=_l(zl(Ve(t)),void 0,e);return be(n,n.calendar)}function zh(t,e){let n=Ol(Ve(t));if(n)return Dl(n),be(Do(Kt(n)),e(n.calendarId));let a=_l(zl(t),eg,e),{calendar:r}=a;return be(Qa(r,a),r)}function Dl(t){t.calendarId!=="iso8601"&&D($t(t.calendarId))}function _h(t,e){let n=Pl(Ve(t));if(n)return Dl(n),be(Kt(n),e(n.calendarId));let a=_l(zl(t),tg,e),{calendar:r}=a,{year:o,month:i,day:s}=me(r,a),[l,c]=Rn(r,o,i),{year:d,month:u}=((m,h,b,f)=>{let g=m?m.u(h,b,f):ss(h,b);return g||D("Cannot guess year"),g})(r,l,c,s);return be(Ge(Fn(r,d,u,s)),r)}function Oh(t){let e=(a=>{let r=Fh(a);return r?(Cr(r[13]),Vh(r,1)):void 0})(t=Ve(t));if(!e){let a=yn(t);a&&a.re||xt(t),a.C&&D($t("Z")),Dl(a),e=a}let n;return(n=Ol(t))&&Id(n)&&xt(t),(n=Pl(t))&&Id(n)&&xt(t),Yn(ur(e))}function Ph(t){let e=lg.exec(Ve(t));return e||xt(t),Pe(xn((n=>{let a=0,r=0,o=0,i={years:s(n[2]),months:s(n[3]),weeks:s(n[4]),days:s(n[5]),hours:s(n[6],n[7],5),minutes:s(n[8],n[9],4),seconds:s(n[10],n[11],3),...ol(o,2,ve)};return a||D(Ld(ve)),xs(n[1])<0&&(i=He(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=zt(o,wt[d])),l!==void 0&&(r&&D($t(l)),m=(h=>{let b=parseInt(h);return Number.isFinite(b)||D($t(h)),b})(l),a=1,c&&(o=vs(c)*(wt[d]/fn),r=1)),u+m}})(e)))}function Nh(t){let e=yn(t)||Ol(t)||Pl(t);if(e)return e.calendarId;let n=Fh(t);return n?Cr(n[13]).calendarId:t}function Lh(t){let e=yn(t);return e&&(e.timeZoneId||e.C&&"UTC"||e.offset)||t}function zl(t){let e=yn(t);return e&&!e.C||xt(t),e}function _l(t,e,n){return e&&t.calendarId==="iso8601"?(Kt(t),t.re&&ur(t),ms(e(t),n)):t.re?Rh(t,n):ms(t,n)}function eg(t){let e=12*t.year+t.month===Du?20:1;return{...t,day:e}}function tg(t){return{...t,year:1972}}function Bh(t,e,n){let a=Je(Zo(t.timeZoneId)),r;if(mr(t),t.re){let i=t.offset?Ho(t.offset):void 0,[,s,l]=ua(n);r=wa(a,t,i,s,l,!(a.X||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.C)}else ua(n),r=hn(a,t);var o;return kt(r),Ct(r,a,e(t.calendarId))}function Rh(t,e){return mr(t),Un(t),{...ue(t,t),calendar:e(t.calendarId)}}function ms(t,e){return Kt(t),Ge(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function bo(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var ng="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+bo(8)+"(Z|([+-])"+bo(15)+")?)?",ag=pa("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),rg=pa("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),og=pa(ng+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ig=pa("T?"+bo(2)+`(([+-])${bo(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),sg=new RegExp("\\[(!?)([^\\]]*)\\]","g"),lg=pa("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function yn(t){let e=og.exec(t);return e?(n=>{let a=n[12],r=(a||"").toUpperCase()==="Z";return{year:Hh(n),month:parseInt(n[5]),day:parseInt(n[6]),...Vh(n,7),...Cr(n[19]),re:!!n[7],C:r,offset:r?void 0:a}})(e):void 0}function Ol(t){let e=ag.exec(t);if(e)return(n=>({year:Hh(n),month:parseInt(n[4]),day:1,...Cr(n[5])}))(e)}function Pl(t){let e=rg.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...Cr(n[3])}))(e):void 0}function Fh(t){let e=ig.exec(t);if(e)return e[6]&&Ho(e[6]),e}function Vh(t,e){let n=sa(t[e+3]);return{...Ms(vs(t[e+4]||""))[0],hour:sa(t[e]),minute:sa(t[e+2]),second:n===60?59:n}}function Hh(t){let e=xs(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&D($t(-0)),e*n}function Cr(t){let e,n,a=[];return t.replace(sg,(r,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(a.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&D($t(r)):(n&&D($t(r)),n=l),""}),a.length>1&&e&&D($t(t)),{timeZoneId:n,calendarId:a[0]||"iso8601"}}function Sa(t,e,n){let a=Object.assign(Object.create(null),e);return ns(a,n,eu),Ea(t)&&(ns(a,n,Kb),t&&t.ge&&ns(a,n,Xb,fa)),a}function ns(t,e,n,a){let r=0,o=[];for(let i of n)e[i]!==void 0?r=1:o.push(i);if(Object.assign(t,e),r)for(let i of a||o)delete t[i]}function jh(t,e,n){let{calendar:a,timeZone:r}=t,o=$e(a,Qb,ef),i=De(t),{year:s,month:l,day:c}=me(a,i),d={year:s,monthCode:Er(a,s,l),day:c,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond,nanosecond:i.nanosecond,offset:i.offsetNanoseconds},u=ke(e,o,ml),m=Sa(a,d,u),h={...d,...u},[b,f,g,x]=jo(a,m,()=>ua(n,2));return Ct(wa(r,ue(b,Co(h,f)),h.offset,g,x),r,a)}function qh(t,e,n){let{calendar:a}=t,r=$e(a,ru,ou),{year:o,month:i,day:s}=me(a,t),l={year:o,monthCode:Er(a,o,i),day:s,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,microsecond:t.microsecond,nanosecond:t.nanosecond},c=ke(e,r,pl),d=Sa(a,l,c),u={...l,...c},[m,h]=jo(a,d,()=>[ne(n)]);return wr(m,Co(u,h),a)}function Zh(t,e,n){let{calendar:a}=t,r=$e(a,Zn,$n),{year:o,month:i,day:s}=me(a,t);return er(a,Sa(a,{year:o,monthCode:Er(a,o,i),day:s},ke(e,r,ut)),n)}function $h(t,e,n){let{calendar:a}=t,r=$e(a,cr,tu),{year:o,month:i}=me(a,t);return fl(a,Sa(a,{year:o,monthCode:Er(a,o,i)},ke(e,r,ut)),n)}function Uh(t,e,n){let{calendar:a}=t,r=$e(a,Zn,$n),{year:o,month:i,day:s}=me(a,t);return gl(a,Sa(a,{monthCode:Er(a,o,i),day:s},ke(e,r,ut)),n)}function Yh(t,e,n){return((a,r,o)=>yr({...Ot(is,a),...ke(r,is,hl)},ne(o)))(t,e,n)}function Wh(t,e){return Pe((n=t,a=e,xn({...n,...ke(a,wu,ih)})));var n,a}function Er(t,e,n){let[a,r]=Rn(t,e,n);return Jd(a,r)}function Gh(t,e,n){return Ct(t.epochNanoseconds,e,n)}function Kh(t){return dt(t.epochNanoseconds)}function Nl(t){return Nt(De(t),t.calendar)}function Ll(t){return be(De(t),t.calendar)}function Bl(t){return Yn(De(t))}function Xh(t,e,n){let a=ka(e,t,(r=>Tu(st(r)))(n));return Ct(kt(a),e,t.calendar)}function Jh(t,e,n,a){let r=t(a.timeZone),o=a.plainTime,i=o!==void 0?e(o):void 0,s=Je(r),l;return l=i?ka(s,ue(n,i)):hn(s,ue(n,We)),Ct(l,s,n.calendar)}function Qh(t,e,n){return ap(t,Ot($e(t,dr,nu),e),ke(Pn(n),qn,ut,[]))}function ep(t,e,n){let a=$e(t,wo,Jb);return ap(t,Ot(au,e),ke(Pn(n),a,ut,[]))}function tp(t,e){return gl(t,ke(e,au,ut))}function np(t,e,n){return fl(t,ke(e,$e(t,dr,nu),ut),n)}function ap(t,e,n){let a=$e(t,tf,nf),r=Sa(t,e,n);return r=ke(r,a,ut,[]),er(t,r)}function rp(t){return dt(kt(BigInt(Mo(t))*ba))}function op(t){return dt(kt(Ao(t)))}function Ta(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function ip(t,e){return t.timeZone!==void 0&&le("Cannot specify TimeZone"),t.timeZone=e,t}function Aa(t,e,n){let a=t.resolvedOptions().calendar;!n&&e.calendar===lt||yt(e.calendar)===a||D("Mismatching Calendars")}function Kn(t,e,n,a,r){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},h={},b={},f=0,g=0;for(let I of Object.keys(l)){let R=l[I];R===void 0||s.has(I)||(o.has(I)?I==="dateStyle"?d=R:I==="timeStyle"?u=R:m[I]=R:I==="era"?h[I]=R:i.has(I)?I==="dateStyle"||I==="timeStyle"?g=1:f=1:b[I]=R)}let x=d!==void 0,y=u!==void 0,k=x||y,S=Object.keys(m).length>0,M=f||g,N=S||x||y,L=Object.keys(h).length>0;(!c&&M||c&&M&&!N||k&&(S||L||f))&&le("Invalid formatting options");let C={};return k||N||Object.assign(C,a),Object.assign(C,m,h,b),x&&(r?Object.assign(C,r[d]):C.dateStyle=d),y&&(C.timeStyle=u),C}}var sp={year:"numeric",month:"numeric",day:"numeric"},lp={hour:"numeric",minute:"numeric",second:"numeric"},Rl=Object.assign({},sp,lp),Fl=["weekday","year","month","day","dateStyle"],Sr=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],Vl=Fl.concat(Sr),cg=["weekday","day"].concat(Sr),dg=["weekday","year"].concat(Sr),cp=Kn(Vl,[],[],Rl),dp=Kn(Vl,[],[],{...Rl,timeZoneName:"short"}),up=Kn(Vl,[],["timeZoneName"],Rl),hp=Kn(Fl,Sr,["timeZoneName"],sp),pp=Kn(Sr,Fl,["timeZoneName","era"],lp),mp=Kn(["year","month","dateStyle"],cg,["timeZoneName"],{year:"numeric",month:"numeric"},{full:{year:"numeric",month:"long"},long:{year:"numeric",month:"long"},medium:{year:"numeric",month:"short"},short:{year:"2-digit",month:"numeric"}}),bp=Kn(["month","day","dateStyle"],dg,["timeZoneName","era"],{month:"numeric",day:"numeric"},{full:{month:"long",day:"numeric"},long:{month:"long",day:"numeric"},medium:{month:"short",day:"numeric"},short:{month:"numeric",day:"numeric"}});function fp(t,e){let{timeZone:n}=t,a=De(t),{offsetNanoseconds:r}=a,o=e||We,i;return i=e?wa(n,ue(a,o),r,2):hn(n,ue(a,o)),Ct(i,n,t.calendar)}function $o(t){let e=Uo(),n=t.B(e);return pr(e+BigInt(n))}function Uo(){return BigInt(Date.now())*ba}function Ma(){return new Lt().resolvedOptions().timeZone}var Hl="PlainYearMonth",jl="PlainMonthDay",ql="PlainDate",Zl="PlainDateTime",$l="PlainTime",Ul="ZonedDateTime",Yl="Instant",Wl="Duration";function Jt(t,e,n,...a){return Object.defineProperties(e,Zd(t)),Object.defineProperties(e.prototype,nr("Temporal."+t)),Object.defineProperties(e.prototype,bn(r=>({get(){return r(n(this))},configurable:1}),Object.assign({},...a))),e}var Qt=gs.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:gs;function en(){le(Vd)}function tn(){le(Fd)}var vp={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return me(t.calendar,t).year},month(t){return me(t.calendar,t).month},monthCode(t){return To(t.calendar,t)}},Yo={era(t){return br(t.calendar,t).era},eraYear(t){return br(t.calendar,t).eraYear},year(t){return me(t.calendar,t).year},month(t){return me(t.calendar,t).month},monthCode(t){return To(t.calendar,t)},day(t){return me(t.calendar,t).day}},xp={monthCode(t){return To(t.calendar,t)},day(t){return me(t.calendar,t).day}},Gl={daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}},Tr={dayOfWeek(t){return So(t)},dayOfYear(t){return vu(t.calendar,t)},weekOfYear(t){return xu(t.calendar,t)},yearOfWeek(t){return yu(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return zs(t.calendar,t)},daysInYear(t){return _s(t.calendar,t)},monthsInYear(t){return Ds(t.calendar,t)},inLeapYear(t){return Is(t.calendar,t)}};function gp(t){return xo(Object.keys(t))}gp(Gl),gp(Tr);function En(t){let e=Ve(t).toLowerCase();return e===ks?lt:e===Wd?Kd:void D(jd(t,"temporal-polyfill/full"))}function Ir(t=ks){return En(t)}var wp=new WeakMap,kp=Jt(Ul,class{constructor(t,e,n=void 0){let a=kt(Ao(t)),r=Je(fh(e)),o=Ir(n);Cp(this,Ct(a,r,o))}static from(t,e=void 0){return Qe(Ia(t,e))}static compare(t,e){return xr(Ia(t),Ia(e))}get calendarId(){return yt(ie(this).calendar)}get timeZoneId(){return ie(this).timeZone.id}get epochMilliseconds(){return gr(ie(this))}get epochNanoseconds(){return Us(ie(this))}get offset(){return kr(De(ie(this)).offsetNanoseconds)}get offsetNanoseconds(){return De(ie(this)).offsetNanoseconds}get hoursInDay(){return Nu(ie(this))}with(t,e=void 0){return Qe(jh(ie(this),Pa(t),e))}withCalendar(t){return Qe({...ie(this),calendar:Ko(t)})}withTimeZone(t){return Qe({...ie(this),timeZone:Je(mt(t))})}withPlainTime(t=void 0){return Qe(fp(ie(this),Ql(t)))}add(t,e=void 0){let n=ie(this);return Qe(Vn(n,Re(t),e))}subtract(t,e=void 0){let n=ie(this);return Qe(Vn(n,He(Re(t)),e))}until(t,e=void 0){let n=ie(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return ze(Pe(Js(0,r,n,a,e)))}since(t,e=void 0){let n=ie(this),a=Ia(t),r=Xt(n.calendar,a.calendar);return ze(Pe(Js(1,r,n,a,e)))}round(t){let e=ie(this),[n,a,r]=fr(t);return Qe(Pu(e,n,a,r))}startOfDay(){return Qe(Lu(ie(this)))}equals(t){return eh(ie(this),Ia(t))}toInstant(){return nn(Kh(ie(this)))}toPlainDateTime(){return Bt(Nl(ie(this)))}toPlainDate(){return Rt(Ll(ie(this)))}toPlainTime(){return Cn(Bl(ie(this)))}toLocaleString(t=void 0,e={}){let n=ie(this),a=new Lt(t,ip(dp(e),Vu(n)));return Aa(a,n),a.format(gr(n))}toString(t=void 0){return wl(ie(this),t)}toJSON(){return wl(ie(this))}getTimeZoneTransition(t){let e=ie(this),n=Ru(e,t);return n?Qe({...e,epochNanoseconds:n}):null}valueOf(){return tn()}},ug,Yo,Tr,lr);function Qe(t){return Cp(Object.create(kp.prototype),t)}function ie(t){return Ft(t)||en()}function ug(t){let e=ie(t);return{...De(e),calendar:e.calendar}}function Ft(t){return wp.get(t)}function Ia(t,e){if(Ke(t)){let n=Ft(t);if(n)return ua(e),n;let a=Dr(t);return xh(mt,a,t,e)}return Mh(t,En,e)}function Cp(t,e){return wp.set(t,e),Qt(t),t}function mt(t){if(Ke(t)){let e=Ft(t);return e||le(bs(t)),e.timeZone.id}return(e=>Zo(Lh(Ve(e))))(t)}var Ep=new WeakMap,Sp=Jt(Yl,class{constructor(t){let e=kt(Ao(t));Ap(this,dt(e))}static from(t){return nn(Da(t))}static fromEpochMilliseconds(t){return nn(rp(t))}static fromEpochNanoseconds(t){return nn(op(t))}static compare(t,e){return xr(Da(t),Da(e))}get epochMilliseconds(){return gr(ht(this))}get epochNanoseconds(){return Us(ht(this))}add(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,Re(t))))}subtract(t){let e=ht(this);return nn(dt(Ks(e.epochNanoseconds,He(Re(t)))))}until(t,e=void 0){return ze(Xs(0,ht(this),Da(t),e))}since(t,e=void 0){return ze(Xs(1,ht(this),Da(t),e))}round(t){let e=ht(this),[n,a,r]=fr(t,5,1);return nn(dt(No(e.epochNanoseconds,vr(n,a),r)))}equals(t){return Qu(ht(this),Da(t))}toZonedDateTimeISO(t){return Qe(Gh(ht(this),Je(mt(t))))}toLocaleString(t=void 0,e={}){let n=ht(this);return new Lt(t,cp(e)).format(gr(n))}toString(t=void 0){return yl(mt,ht(this),t)}toJSON(){return yl(mt,ht(this))}valueOf(){return tn()}});function nn(t){return Ap(Object.create(Sp.prototype),t)}function ht(t){return Xl(t)||en()}function Xl(t){return Ep.get(t)}function Da(t){if(Ke(t)){let e=Xl(t);if(e)return e;let n=Ft(t);if(n)return dt(n.epochNanoseconds)}return Th(t)}var{toTemporalInstant:Tp}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return nn(dt(BigInt(Ls(t))*ba))}};function Ap(t,e){return Ep.set(t,e),Qt(t),t}var Mp=new WeakMap,Ip=Jt(jl,class{constructor(t,e,n=void 0,a){let r=Le(t),o=Le(e),i=Ir(n),s=Le(a??hu),l=Ge(Kt({year:s,month:r,day:o}));Dp(this,be(l,i))}static from(t,e=void 0){return Kl(yp(t,e))}get calendarId(){return yt(wn(this).calendar)}with(t,e=void 0){return Kl(Uh(wn(this),Pa(t),e))}equals(t){return rh(wn(this),yp(t))}toPlainDate(t){let e=wn(this);return Rt(ep(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=wn(this),a=new Lt(t,Ta(bp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return Sl(wn(this),t)}toJSON(){return Sl(wn(this))}valueOf(){return tn()}},wn,xp);function Kl(t){return Dp(Object.create(Ip.prototype),t)}function wn(t){return Wo(t)||en()}function Wo(t){return Mp.get(t)}function yp(t,e){if(Ke(t)){let a=Wo(t);if(a)return ne(e),a;let r=qp(t);return Ch(r===void 0?lt:r,r===void 0,t,e)}let n=_h(t,En);return ne(e),n}function Dp(t,e){return Mp.set(t,e),Qt(t),t}var zp=new WeakMap,_p=Jt(Hl,class{constructor(t,e,n=void 0,a){let r=Le(t),o=Le(e),i=Ir(n),s=Le(a??1),l=Do(Kt({year:r,month:o,day:s}));Op(this,be(l,i))}static from(t,e=void 0){return Mr(za(t,e))}static compare(t,e){return Gn(za(t),za(e))}get calendarId(){return yt(pt(this).calendar)}with(t,e=void 0){return Mr($h(pt(this),Pa(t),e))}add(t,e=void 0){let n=pt(this);return Mr(be(Gs(0,n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=pt(this);return Mr(be(Gs(1,n.calendar,n,Re(t),e),n.calendar))}until(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return ze(tl(0,r,n,a,e))}since(t,e=void 0){let n=pt(this),a=za(t),r=Xt(n.calendar,a.calendar);return ze(tl(1,r,n,a,e))}equals(t){return ah(pt(this),za(t))}toPlainDate(t){let e=pt(this);return Rt(Qh(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=pt(this),a=new Lt(t,Ta(mp(e)));return Aa(a,n,1),a.format(hr(n))}toString(t=void 0){return El(pt(this),t)}toJSON(){return El(pt(this))}valueOf(){return tn()}},pt,vp,Gl);function Mr(t){return Op(Object.create(_p.prototype),t)}function pt(t){return Go(t)||en()}function Go(t){return zp.get(t)}function za(t,e){if(Ke(t)){let a=Go(t);if(a)return ne(e),a;let r=Dr(t);return kh(r,t,e)}let n=zh(t,En);return ne(e),n}function Op(t,e){return zp.set(t,e),Qt(t),t}function hg(t){if(!Ke(t))return;let e=Xl(t);return e?[Yl,e]:(e=Ft(t),e?[Ul,e]:(e=Xn(t),e?[Zl,e]:(e=Na(t),e?[ql,e]:(e=Jl(t),e?[$l,e]:(e=Go(t),e?[Hl,e]:(e=Wo(t),e?[jl,e]:(e=ec(t),e?[Wl,e]:void 0)))))))}function Pa(t){return(hg(t)||t.calendar!==void 0||t.timeZone!==void 0)&&le(Bd),t}var Pp=new WeakMap,Np=Jt($l,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0){let i=ur(bn(Le,{hour:t,minute:e,second:n,millisecond:a,microsecond:r,nanosecond:o}));Lp(this,Yn(i))}static from(t,e=void 0){return Cn(kn(t,e))}static compare(t,e){return Vo(kn(t),kn(e))}with(t,e=void 0){return Cn(Yh(Et(this),Pa(t),e))}add(t){let e=Et(this);return Cn(Lo(e,Re(t))[0])}subtract(t){let e=Et(this);return Cn(Lo(e,He(Re(t)))[0])}until(t,e=void 0){return ze(nl(0,Et(this),kn(t),e))}since(t,e=void 0){return ze(nl(1,Et(this),kn(t),e))}round(t){let e=Et(this),[n,a,r]=fr(t,5);return Cn(_o(e,ya(n,a),r)[0])}equals(t){return oh(Et(this),kn(t))}toLocaleString(t=void 0,e={}){let n=Et(this);return new Lt(t,Ta(pp(e))).format(Ts(n))}toString(t=void 0){return Tl(Et(this),t)}toJSON(){return Tl(Et(this))}valueOf(){return tn()}},Et,lr);function Cn(t){return Lp(Object.create(Np.prototype),t)}function Et(t){return Jl(t)||en()}function Jl(t){return Pp.get(t)}function kn(t,e){if(Ke(t)){let a=Jl(t);if(a)return ne(e),a;let r=Xn(t);if(r)return ne(e),Yn(r);let o=Ft(t);return o?(ne(e),Bl(o)):Eh(t,e)}let n=Oh(t);return ne(e),n}function Ql(t){return t===void 0?void 0:kn(t)}function Lp(t,e){return Pp.set(t,e),Qt(t),t}var Bp=new WeakMap,Rp=Jt(Zl,class{constructor(t,e,n,a=0,r=0,o=0,i=0,s=0,l=0,c=void 0){let d=Un(mr(bn(Le,{year:t,month:e,day:n,hour:a,minute:r,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=Ir(c);Fp(this,Nt(d,u))}static from(t,e=void 0){return Bt(_a(t,e))}static compare(t,e){let n=_a(t),a=_a(e);return cl(n,a)}get calendarId(){return yt(Be(this).calendar)}with(t,e=void 0){return Bt(qh(Be(this),Pa(t),e))}withCalendar(t){let e=Be(this);return Bt(Nt(e,Ko(t)))}withPlainTime(t=void 0){let e=Be(this);return Bt(wr(e,Ql(t),e.calendar))}add(t,e=void 0){let n=Be(this);return Bt(Nt(Hn(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=Be(this);return Bt(Nt(Hn(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=Be(this),a=_a(t),r=Xt(n.calendar,a.calendar);return ze(Qs(0,r,n,a,e))}since(t,e=void 0){let n=Be(this),a=_a(t),r=Xt(n.calendar,a.calendar);return ze(Qs(1,r,n,a,e))}round(t){let e=Be(this),[n,a,r]=fr(t);return Bt(Nt(zo(e,ya(n,a),r),e.calendar))}equals(t){return th(Be(this),_a(t))}toZonedDateTime(t,e=void 0){return Qe(Xh(Be(this),Je(mt(t)),e))}toPlainDate(){let t=Be(this);return Rt(be(t,t.calendar))}toPlainTime(){return Cn(Yn(Be(this)))}toLocaleString(t=void 0,e={}){let n=Be(this),a=new Lt(t,Ta(up(e)));return Aa(a,n),a.format(du(n))}toString(t=void 0){return kl(Be(this),t)}toJSON(){return kl(Be(this))}valueOf(){return tn()}},Be,Yo,Tr,lr);function Bt(t){return Fp(Object.create(Rp.prototype),t)}function Be(t){return Xn(t)||en()}function Xn(t){return Bp.get(t)}function _a(t,e){if(Ke(t)){let a=Xn(t);if(a)return ne(e),a;let r=Na(t);if(r)return ne(e),Nt(ue(r,We),r.calendar);let o=Ft(t);if(o)return ne(e),Nl(o);let i=Dr(t);return yh(i,t,e)}let n=Ih(t,En);return ne(e),n}function Fp(t,e){return Bp.set(t,e),Qt(t),t}var Vp=new WeakMap,Hp=Jt(ql,class{constructor(t,e,n,a=void 0){let r=Ge(Kt(bn(Le,{year:t,month:e,day:n}))),o=Ir(a);jp(this,be(r,o))}static from(t,e=void 0){return Rt(Oa(t,e))}static compare(t,e){return Gn(Oa(t),Oa(e))}get calendarId(){return yt(je(this).calendar)}with(t,e=void 0){let n=je(this);return Rt(Zh(n,Pa(t),e))}withCalendar(t){let e=je(this);return Rt(be(e,Ko(t)))}add(t,e=void 0){let n=je(this);return Rt(be(Ca(n.calendar,n,Re(t),e),n.calendar))}subtract(t,e=void 0){let n=je(this);return Rt(be(Ca(n.calendar,n,He(Re(t)),e),n.calendar))}until(t,e=void 0){let n=je(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return ze(el(0,r,n,a,e))}since(t,e=void 0){let n=je(this),a=Oa(t),r=Xt(n.calendar,a.calendar);return ze(el(1,r,n,a,e))}equals(t){return nh(je(this),Oa(t))}toZonedDateTime(t){let e=Ke(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t};return Qe(Jh(mt,kn,je(this),e))}toPlainDateTime(t=void 0){let e=je(this);return Bt(wr(e,Ql(t),e.calendar))}toPlainYearMonth(){let t=je(this);return Mr(np(t.calendar,this))}toPlainMonthDay(){let t=je(this);return Kl(tp(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=je(this),a=new Lt(t,Ta(hp(e)));return Aa(a,n),a.format(hr(n))}toString(t=void 0){return Cl(je(this),t)}toJSON(){return Cl(je(this))}valueOf(){return tn()}},je,Yo,Tr);function Rt(t){return jp(Object.create(Hp.prototype),t)}function je(t){return Na(t)||en()}function Na(t){return Vp.get(t)}function Oa(t,e){if(Ke(t)){let a=Na(t);if(a)return ne(e),a;let r=Xn(t);if(r)return ne(e),be(r,r.calendar);let o=Ft(t);if(o)return ne(e),Ll(o);let i=Dr(t);return wh(i,t,e)}let n=Dh(t,En);return ne(e),n}function jp(t,e){return Vp.set(t,e),Qt(t),t}function Dr(t){let e=qp(t);return e===void 0?lt:e}function qp(t){let{calendar:e}=t;if(e!==void 0)return Ko(e)}function Ko(t){if(Ke(t)){let e=Na(t)||Xn(t)||Ft(t)||Wo(t)||Go(t);return e||le(Hd(t)),e.calendar}return(e=>En(Nh(Ve(e))))(t)}var Zp=new WeakMap,$p=Jt(Wl,class{constructor(t=0,e=0,n=0,a=0,r=0,o=0,i=0,s=0,l=0,c=0){let d=xn(bn(Mo,{years:t,months:e,weeks:n,days:a,hours:r,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));Up(this,Pe(d))}static from(t){return ze(Re(t))}static compare(t,e,n=void 0){return Ju(Ar,Re(t),Re(e),n)}get sign(){return at(this).sign}get blank(){return!at(this).sign}with(t){return ze(Wh(at(this),t))}negated(){return ze(sl(at(this)))}abs(){return ze(Gu(at(this)))}add(t,e=void 0){return ze(il(Ar,0,at(this),Re(t),e))}subtract(t,e=void 0){return ze(il(Ar,1,at(this),Re(t),e))}round(t){return ze(Wu(Ar,at(this),t))}total(t){return _u(Ar,at(this),t)}toLocaleString(t=void 0,e){let n=at(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):qo(n,e)}toString(t=void 0){return qo(at(this),t)}toJSON(){return qo(at(this))}valueOf(){return tn()}},at,Os);function ze(t){return Up(Object.create($p.prototype),t)}function at(t){return ec(t)||en()}function ec(t){return Zp.get(t)}function Re(t){return Ke(t)?ec(t)||Sh(t):Ph(t)}function Ar(t){if(t!==void 0){if(Ke(t)){let e=Ft(t);if(e)return e;let n=Na(t);if(n)return n;let a=Xn(t);if(a)return be(a,a.calendar);let r=Dr(t);return vh(mt,r,t)}return Ah(t,En)}}function Up(t,e){return Zp.set(t,e),Qt(t),t}var pg=Object.defineProperties({},{...nr("Temporal.Now"),...vo({timeZoneId(){return Ma()},instant(){return nn(dt(Uo()))},zonedDateTimeISO(t=Ma()){let e=Je(mt(t));return Qe(Ct(Uo(),e))},plainDateTimeISO(t=Ma()){let e=$o(Je(mt(t)));return Bt(Nt(e))},plainDateISO(t=Ma()){let e=$o(Je(mt(t)));return Rt(be(e))},plainTimeISO(t=Ma()){let e=$o(Je(mt(t)));return Cn(Yn(e))}})}),Yp=Object.defineProperties({},{...nr("Temporal"),...vo({PlainYearMonth:_p,PlainMonthDay:Ip,PlainDate:Hp,PlainTime:Np,PlainDateTime:Rp,ZonedDateTime:kp,Instant:Sp,Duration:$p,Now:pg})});var Ce=Yi||Yp;var Bx=Yi?Date.prototype.toTemporalInstant:Tp;var Xo=class extends P{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(e){console.warn("a-calendar: ElementInternals unavailable \u2014 form association disabled.",e)}this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown)}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.selectedIso=this.getAttribute("value")||this.getAttribute("defaultvalue")||null,this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,a){if(e==="value"){this.applyFormValue(a);return}e==="data-focus"&&this.focusCell(a)}get#e(){return this.hasAttribute("value")}currentIso(){return this.#e?this.getAttribute("value")||null:this.selectedIso}applyFormValue(e){this.internals?.setFormValue(e||null);try{e?this.internals?.states.add("filled"):this.internals?.states.delete("filled")}catch{}}onClick=e=>{if(this.hasAttribute("disabled"))return;let n=e.target?.closest('[data-part="day-cell"]');if(!n||n.hasAttribute("disabled"))return;let a=n.dataset.date;a&&this.requestSelect(a)};requestSelect(e){let n=this.currentIso();if(e===n)return;let a=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!a||(this.selectedIso=e,this.applyFormValue(e),this.dispatchEvent(new Event("change",{bubbles:!0})))}get#t(){return Array.from(this.querySelectorAll('[data-part="day-cell"]'))}onKeydown=e=>{if(this.hasAttribute("disabled"))return;let n=this.#t;if(n.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??n.find(i=>i.tabIndex===0)??null;if(!a?.dataset.date)return;let r=null;switch(e.key){case"Home":case"End":{let i=n.indexOf(a);if(i<0)return;let s=i-i%7;r=n[e.key==="Home"?s:s+6]?.dataset.date??null;break}default:{let i=Ce.PlainDate.from(a.dataset.date),s;switch(e.key){case"ArrowLeft":s=i.subtract({days:1});break;case"ArrowRight":s=i.add({days:1});break;case"ArrowUp":s=i.subtract({days:7});break;case"ArrowDown":s=i.add({days:7});break;case"PageUp":s=i.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":s=i.add({[e.shiftKey?"years":"months"]:1});break;default:return}r=s.toString()}}if(!r)return;e.preventDefault();let o=n.find(i=>i.dataset.date===r);o&&!o.hasAttribute("disabled")&&o.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:r}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,a){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:a}})),this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()??""}set value(e){this.selectedIso=e||null,this.applyFormValue(e||null)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.selectedIso=e,this.applyFormValue(e),this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.selectedIso=e||null,this.applyFormValue(e||null),this.emitState(e||null,n,"restore")}};function Wp(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Xo)}Wp();var Jo=class extends ea{ariaProp="ariaChecked"};function Gp(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Jo)}Gp();var Qo=class extends P{static formAssociated=!0;static observedAttributes=["state","disabled"];internals;uncontrolledValue=null;seeded=!1;observer;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-RADIO"||r.querySelector?.("a-radio")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect()}attributeChangedCallback(e,n,a){this.sync(),e==="state"&&this.alive&&a!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states.add("disabled"):this.internals?.states.delete("disabled"),this.sync()}formResetCallback(){let e=this.getAttribute("default-state");this.emitStateChange(e,this.#e,"reset",!1),this.uncontrolledValue=e,this.sync()}formStateRestoreCallback(e){this.emitStateChange(e,this.#e,"restore",!1),this.uncontrolledValue=e,this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states.has("disabled")??!1)}get#n(){return Array.from(this.querySelectorAll("a-radio"))}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#n,a=n.find(o=>o.value===e&&e!=null)??null,r=a?a.value:null;this.internals?.setFormValue(r,r);for(let o of n)o.selected=o===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a)};requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||a&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,a,r){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:r,detail:{next:e,prev:n,reason:a}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-radio");!n||n.hasAttribute("disabled")||(n.focus(),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t)return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.value));return}let r=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function Kp(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",Qo)}Kp();var St=class extends P{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals.states.add("active"):this.internals.states.delete("active"))}get active(){return this.internals?.states.has("active")??!1}connectedCallback(){tc(this.doc)}},mg="a-menu-item, a[data-anta-menu-item]";function zr(t){return t instanceof St||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function tc(t){t.hasKeyListenerForAMenuItem||(Wr(t,{keys:["Enter"," "],resolve:e=>{let n=e;return n?.closest?.('input, textarea, select, a-input, a-input-time, [contenteditable]:not([contenteditable="false"])')?null:n?.closest?.(mg)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function Xp(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",St)}Xp();var W=4,ei=96,bg=130,fg=130,gg=500,vg='a-button, button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',xg="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",yg="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",$=[],ni=!1,La=null,nc=null;function wg(t,e){ni||(t.addEventListener("pointerdown",tm,!0),t.addEventListener("keydown",rm,!0),t.addEventListener("keyup",om,!0),t.addEventListener("contextmenu",nm,!0),e.addEventListener("resize",am),La=t,nc=e,ni=!0)}function Qp(){ni&&(La?.removeEventListener("pointerdown",tm,!0),La?.removeEventListener("keydown",rm,!0),La?.removeEventListener("keyup",om,!0),La?.removeEventListener("contextmenu",nm,!0),nc?.removeEventListener("resize",am),La=null,nc=null,ni=!1)}function em(t,e=!1){let n=t.composedPath();for(let a of $){if(n.includes(a.surface))return!0;let r=a.triggerAnchor;if(r&&!(e&&a.hasAttribute("context"))&&n.includes(r))return!0}return!1}function kg(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(n instanceof HTMLDialogElement&&n.matches(":modal")||n instanceof HTMLElement&&n.matches(":popover-open"))return!0}return!1}function Cg(t){for(let e of $)if(e.contains(t)||e.surface.contains(t))return!0;return!1}Ac({isOpen:()=>$.length>0,contains:Cg});function tm(t){$.length&&(em(t,t.button===0)||ac(t))}function nm(t){$.length&&(em(t)||ac(t))}function am(){$.length&&ac()}function rm(t){let e=$[$.length-1];e&&e.handleKey(t)}function om(t){let e=$[$.length-1];e&&e.handleKeyUp(t)}function ac(t){$[0]?.requestClose(t)}function Eg(){for(let t=$.length-1;t>=0;t--){let e=$[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}$.length=0,Qp()}var ti=new WeakMap;function Sg(t){for(let e of t){let n=ti.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var Jp=typeof IntersectionObserver<"u"?new IntersectionObserver(Sg,{root:null,rootMargin:"0px",threshold:0}):null,ai=class extends P{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;typeBuffer="";typeTimer;activeItem=null;comboObserver;#e;#t;#n;#a;#r=new Set;#o=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
823
+ :host { display: contents; }
824
+
825
+ .container {
826
+ position: fixed;
827
+ left: 0;
828
+ top: 0;
829
+ margin: 0;
830
+ padding: 0;
831
+ box-sizing: border-box;
832
+ flex-direction: column;
833
+ min-width: max(var(--menu-min-width, 88px), var(--_anchor-width, 0px));
834
+ max-width: calc(100vw - ${2*W}px);
835
+ max-height: calc(100dvh - ${2*W}px);
836
+ overflow: hidden;
837
+ background: var(--menu-bg, Canvas);
838
+ color: var(--text-2, CanvasText);
839
+ border: var(--menu-border, 1px solid);
840
+ border-radius: var(--menu-radius, 8px);
841
+ box-shadow: var(--menu-shadow, 0 8px 24px rgba(0,0,0,0.2));
842
+ -webkit-backdrop-filter: var(--menu-backdrop-filter, blur(20px));
843
+ backdrop-filter: var(--menu-backdrop-filter, blur(20px));
844
+ outline: none;
845
+
846
+ /* Closed / exit state \u2014 fade + a tiny vertical settle (no horizontal
847
+ shift). This 140ms governs the EXIT (open \u2192 closed); the enter is a
848
+ touch quicker (see :popover-open below) so the menu feels snappy to
849
+ open but unhurried to dismiss. 'display' and 'overlay' transition with
850
+ 'allow-discrete' so the menu stays in the top layer and visible while
851
+ it animates OUT, then hides. */
852
+ opacity: 0;
853
+ translate: 0 -4px;
854
+ transition:
855
+ opacity 140ms ease-out,
856
+ translate 140ms ease-out,
857
+ width var(--menu-width-duration, 160ms) ease,
858
+ display 140ms allow-discrete,
859
+ overlay 140ms allow-discrete;
860
+ }
861
+ .container:popover-open {
862
+ display: flex;
863
+ opacity: 1;
864
+ translate: 0 0;
865
+ /* Enter (closed \u2192 open) \u2014 quicker than the exit above. */
866
+ transition:
867
+ opacity 100ms ease-out,
868
+ translate 100ms ease-out,
869
+ width var(--menu-width-duration, 160ms) ease,
870
+ display 100ms allow-discrete,
871
+ overlay 100ms allow-discrete;
872
+ }
873
+ /* Enter: start from the closed state and transition in. */
874
+ @starting-style {
875
+ .container:popover-open { opacity: 0; translate: 0 -4px; }
876
+ }
877
+ slot[name="header"],
878
+ slot[name="footer"] {
879
+ display: block;
880
+ flex: none;
881
+ }
882
+ slot[name="header"]::slotted(a-menu-header),
883
+ slot[name="header"]::slotted(a-select-header),
884
+ slot[name="footer"]::slotted(a-menu-footer),
885
+ slot[name="footer"]::slotted(a-select-footer) {
886
+ display: block;
887
+ padding: var(--menu-padding, 4px);
888
+ }
889
+ /* The scrolling body \u2014 only the items scroll; the header / footer slots stay
890
+ fixed above and below it. min-height:0 lets it shrink so its own scrollbar
891
+ engages instead of the flex item overflowing. The 1px inter-item gap that
892
+ used to live on the container lives here now. */
893
+ .scroll {
894
+ flex: 1 1 auto;
895
+ min-height: 0;
896
+ display: flex;
897
+ flex-direction: column;
898
+ gap: 1px;
899
+ overflow-y: auto;
900
+ overscroll-behavior: contain;
901
+ scrollbar-width: thin;
902
+ /* The menu's padding lives here (not on the clipping container) so an item's
903
+ focus outline has room inside the scroll box instead of being clipped at
904
+ the edge; scroll-padding keeps a focused row off the edge when scrolled. */
905
+ padding: var(--menu-padding, 4px);
906
+ scroll-padding-block: var(--menu-padding, 4px);
907
+ /* Soft scroll edges: fade the content into the top / bottom only on the side
908
+ with more to scroll (the --fade-* vars, set from JS, are 0 otherwise). The
909
+ top also clears a hard --gap-top band (fully transparent, ahead of the ramp)
910
+ so a row scrolling up disappears cleanly under a pinned header / filter field
911
+ before the fade begins, instead of bleeding right against it. */
912
+ --fade-top: 0px;
913
+ --fade-bottom: 0px;
914
+ --gap-top: 0px;
915
+ -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
916
+ mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
917
+ }
918
+ `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let a=document.createElement("slot");a.setAttribute("name","header");let r=document.createElement("div");r.className="scroll",r.setAttribute("part","scroll"),r.append(document.createElement("slot")),r.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=r;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(a,r,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.cancelCloseTimer()}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#l&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){tc(this.doc),this.#m();let e=this.triggerAnchor;e&&(ti.set(e,this),Jp?.observe(e)),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer();let e=this.triggerAnchor;e&&ti.get(e)===this&&(ti.delete(e),Jp?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#m();return}this.listening&&(this.teardownListeners(),this.setupListeners())}syncState(){if(!this.isConnected)return;let e=this.getAttribute("state");e==="open"&&!this._shown?this.show():e==="closed"&&this._shown&&this.hide()}get isControlled(){return this.hasAttribute("state")}get isSubmenu(){return!!this.parentElement&&zr(this.parentElement)}get#u(){return this.hasAttribute("context")}get#h(){return this.hasAttribute("coord")}get#l(){return!this.hasAttribute("nohover")}get#c(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:W}get#s(){let e=this.getAttribute("placement");return e==="bottom-end"||e==="top-start"||e==="top-end"||e==="bottom"||e==="top"||e==="right-start"||e==="right-end"||e==="left-start"||e==="left-end"||e==="right"||e==="left"?e:"bottom-start"}get triggerAnchor(){let e=this.parentElement;return e&&zr(e)?e:this.previousElementSibling}get#d(){let e=this.triggerAnchor;if(!e)return null;let n='a-input, a-button, button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';return e.matches(n)?e:e.querySelector(n)}focusTrigger(){let e=this.#d;e?e.focus():this.triggerAnchor&&console.warn("[a-menu] trigger has no focusable element \u2014 a menu trigger (or `Select` renderTrigger) must be a single focusable element.")}get#x(){return this.isSubmenu?this.triggerAnchor?.closest("a-menu")??null:null}get isOpen(){return this._shown}isVisible(e){let n=e.checkVisibility;return typeof n=="function"?n.call(e,{visibilityProperty:!0,contentVisibilityAuto:!0}):e.getClientRects().length>0}focusableItems(){return this.focusables().filter(e=>e instanceof St)}navigableItems(){return this.focusables().filter(e=>zr(e))}focusables(){return Array.from(this.querySelectorAll('a-menu-item, a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), a-input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [data-menu-search]')).filter(n=>n.closest("a-menu")===this&&!n.hasAttribute("disabled")&&this.isVisible(n))}seatInitialFocus(e){let n=this.navigableItems(),a=n.find(r=>r.hasAttribute("selected")||r.getAttribute("aria-checked")==="true"||r.getAttribute("aria-selected")==="true");a&&this.scrollItemIntoView(a),e&&(a??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let a=4,r=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<r.top+a?n.scrollTop-=r.top+a-o.top:o.bottom>r.bottom-a&&(n.scrollTop+=o.bottom-r.bottom+a)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,a=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--fade-top",n?"16px":"0px"),e.style.setProperty("--gap-top",n?"3px":"0px"),e.style.setProperty("--fade-bottom",a?"14px":"0px")}get#p(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#f(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#p}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#f?.value;if(!e||!e.trim())return this.setActive(null);if(this.#p)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(a=>!a.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),a=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[a<0?0:(a+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[a<=0?n.length-1:a-1]??null),!0;case"PageUp":return e.preventDefault(),this.setActive(n[0]??null),!0;case"PageDown":return e.preventDefault(),this.setActive(n[n.length-1]??null),!0;case"Enter":if(this.activeItem){e.preventDefault();let r=this.activeItem.querySelector(":scope > a-copy");r&&Kr(r),this.#b=this.activeItem}return!0;default:return!1}}#b=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#b;this.#b=null,n?.click()}open(e){this.requestOpen(e)}close(e){this.requestClose(e)}toggle(e){this._shown?this.requestClose(e?.originEvent):this.requestOpen(e)}emitChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this._shown?"open":"closed",coord:n?.coord,originEvent:n?.originEvent}}))}requestOpen(e){if(this._shown){this.show(e?.coord,e?.viaKeyboard,e?.originEvent);return}let n=this.emitChange("open",e);this.isControlled||n&&this.show(e?.coord,e?.viaKeyboard,e?.originEvent)}requestClose(e){if(!this._shown)return;let n=$.indexOf(this);if(n!==-1){for(let r=$.length-1;r>n;r--){let o=$[r];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}$.length=n+1}let a=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}a&&this.hide()}show(e,n=!1,a){if(this.isSubmenu){let i=this.#x;if(i){let s=$.indexOf(i);if(s!==-1){for(let l=$.length-1;l>s;l--)$[l]._doHide();$.length=s+1}}}else if(!$.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=$.length-1;l>=0;l--)if($[l]!==this&&$[l].contains(i)){s=$[l];break}}if(s){let l=$.indexOf(s);for(let c=$.length-1;c>l;c--){let d=$[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}$.length=l+1}else Eg()}if($.includes(this)){this.position(e);return}let r=$.length===0;this._doShow(e,!r),$.push(this),r&&wg(this.doc,this.view);let o=this.#f;o?(o.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(()=>{!this._shown||!this.#f||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let e=$.indexOf(this);if(e===-1){this._shown&&this._doHide();return}for(let n=$.length-1;n>=e;n--)$[n]._doHide();$.length=e,$.length===0&&Qp()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#g(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){this.#i(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states.add("open"):this.internals?.states.delete("open")}catch{}}#g(e){if(this.#i(),e||this.#h)return;let n=this.triggerAnchor;if(!n)return;this.#t=this.#k(n);let a=()=>{if(!this._shown){this.#e=void 0;return}let r=this.triggerAnchor;if(!r){this.#e=void 0;return}let o=this.#k(r);this.#v(o)||(this.#t=o,this.#y(r)),this.#e=this.view.requestAnimationFrame(a)};this.#e=this.view.requestAnimationFrame(a)}#y(e){if(this.#a===void 0||this.#n===void 0)return;let n=this.surface.getBoundingClientRect(),a=Dt(e).top+this.#a;a=Math.min(a,this.view.innerHeight-n.height-W),a=Math.max(W,a),this.surface.style.transform=`translate(${this.#n}px, ${Math.round(a)}px)`,this.updateScrollFade()}#i(){this.#e!==void 0&&(this.view.cancelAnimationFrame(this.#e),this.#e=void 0),this.#t=void 0,this.#n=void 0,this.#a=void 0}#k(e){let{left:n,top:a,right:r,bottom:o,width:i,height:s}=Dt(e);return[n,a,r,o,i,s]}#v(e){let n=this.#t;return!!n&&n.length===e.length&&n.every((a,r)=>a===e[r])}position(e,n=!1,a=!1){let r=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=W,d=W;if(e){l.style.maxHeight=`${Math.max(ei,s-2*W)}px`;let h=l.getBoundingClientRect();c=e[0],c+h.width>i-W&&(c=i-h.width-W),c=Math.max(W,c),d=e[1],d+h.height>s-W&&(d=d-h.height),d=Math.max(W,d)}else if(this.isSubmenu){let h=this.triggerAnchor?Dt(this.triggerAnchor):null;if(!h)return;l.style.maxHeight=`${Math.max(ei,s-2*W)}px`;let b=l.getBoundingClientRect();c=h.right+this.#c,c+b.width>i-W&&(c=h.left-b.width-this.#c),c=Math.max(W,c);let f=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),x=parseFloat(f.borderTopWidth)+parseFloat(f.paddingTop)+parseFloat(g.paddingTop);d=h.top-x,d+b.height>s-W&&(d=s-b.height-W),d=Math.max(W,d)}else{let h=this.triggerAnchor?Dt(this.triggerAnchor):null;if(!h)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(h.width)}px`);let b=this.#s;if(b.startsWith("right")||b.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(ei,s-2*W)}px`;let f=l.getBoundingClientRect(),g=i-h.right-2*W,x=h.left-2*W,y=b.startsWith("left");a&&this._flippedSide!==null?y=this._flippedSide:y&&x<f.width&&g>x?y=!1:!y&&g<f.width&&x>g&&(y=!0),this._flippedSide=y,c=y?h.left-f.width-this.#c:h.right+this.#c,c=Math.max(W,Math.min(c,i-f.width-W));let k=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";d=k==="center"?h.top+h.height/2-f.height/2:k==="end"?h.bottom-f.height:h.top,d+f.height>s-W&&(d=s-f.height-W),d=Math.max(W,d)}else{let f=s-h.bottom-2*W,g=h.top-2*W,x=b.startsWith("top");l.style.maxHeight="";let y=l.scrollHeight;a&&this._flippedTop!==null?x=this._flippedTop:x&&g<y&&f>g?x=!1:!x&&f<y&&g>f&&(x=!0),this._flippedTop=x;let k=x?g:f;l.style.maxHeight=`${Math.max(ei,Math.floor(k))}px`;let S=l.getBoundingClientRect(),M=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";c=M==="center"?h.left+h.width/2-S.width/2:M==="end"?h.right-S.width:h.left,c+S.width>i-W&&(c=i-S.width-W),c=Math.max(W,c),d=x?h.top-S.height-this.#c:h.bottom+this.#c,d=Math.max(W,d)}}let u=Math.round(c),m=Math.round(d);l.style.transform=`translate(${u}px, ${m}px)`,this.updateScrollFade(),!e&&!this.#h&&this.triggerAnchor&&(this.#n=u,this.#a=m-Dt(this.triggerAnchor).top)};n?r():requestAnimationFrame(r)}onSurfaceClick=e=>{let n=!1,a=!1;for(let r of e.composedPath()){if(r===this.surface)break;r instanceof Element&&(r.matches(yg)&&(a=!0),(r instanceof St||r.hasAttribute("data-menu-close"))&&(n=!0))}n&&!a&&e.stopPropagation();for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof St){!r.hasAttribute("disabled")&&!r.querySelector(":scope > a-menu")&&r.closest("a-menu")===this&&r.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let r of e.composedPath()){if(r===this.surface)break;if(r instanceof Element){if(r.hasAttribute("data-menu-open"))return;if(r instanceof St){if(r.hasAttribute("disabled")){e.preventDefault();return}return r.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(r.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(r.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){($[0]??this).requestClose(e)}#C(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#m(){let e=this.#C();for(let n of this.#r)e.has(n)||this.surface.removeEventListener(n,this.#o);for(let n of e)this.#r.has(n)||this.surface.addEventListener(n,this.#o);this.#r=e}handleKey(e){let n=this.doc.activeElement;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.requestClose(e),this.focusTrigger();return}if(e.key==="Tab"){if(this.#p){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault();let l=n?s.indexOf(n):-1;if(l===-1){s[0]?.focus();return}let c=e.shiftKey?l===0?s.length-1:l-1:l===s.length-1?0:l+1;s[c]?.focus();return}let a=this.#f;if(a&&(n===a||a.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!zr(n))return;let o=this.navigableItems(),i=n?o.indexOf(n):-1;switch(e.key){case"ArrowDown":e.preventDefault(),o[i<0?0:(i+1)%o.length]?.focus({preventScroll:!0});break;case"ArrowUp":e.preventDefault(),o[i<=0?o.length-1:i-1]?.focus({preventScroll:!0});break;case"Home":e.preventDefault(),o[0]?.focus({preventScroll:!0});break;case"End":e.preventDefault(),o[o.length-1]?.focus({preventScroll:!0});break;case"ArrowRight":{let s=this.submenuOf(n);s&&(e.preventDefault(),s.requestOpen({viaKeyboard:!0}));break}case"ArrowLeft":if(this.isSubmenu){e.preventDefault();let s=this.triggerAnchor;this.requestClose(e),s?.focus()}break;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeahead(e.key,o)}}submenuOf(e){return!e||!(e instanceof St)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",gg),n.find(r=>this.itemLabel(r).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#w(e){let n=Dt(e);return[n.left,n.bottom]}setupListeners(){if(this.listening)return;let e=this.triggerAnchor;if(!e){this.listening=!0;return}if(this.isSubmenu){let n=o=>{o.composedPath().includes(this.surface)||this.requestOpen({originEvent:o})};e.addEventListener("click",n);let a,r;this.#l&&(a=o=>{o.pointerType==="mouse"&&this.scheduleOpen()},r=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",a),e.addEventListener("pointerleave",r)),this.teardown=()=>{e.removeEventListener("click",n),a&&e.removeEventListener("pointerenter",a),r&&e.removeEventListener("pointerleave",r),this.listening=!1}}else if(this.#u){let n=a=>{kg(a,e)||(a.preventDefault(),this.requestOpen({coord:[a.clientX,a.clientY],originEvent:a}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#p){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=r=>{let o=r.detail===0,i=this.#h?o?this.#w(e):[r.clientX,r.clientY]:void 0;this._shown?this.requestClose(r):this.requestOpen({coord:i,viaKeyboard:o,originEvent:r})},a=r=>{if(this._shown||e.matches(vg)||e.hasAttribute("disabled"))return;let o=e.matches(xg);if(!(r.key==="ArrowDown"||r.key==="ArrowUp"||!o&&(r.key==="Enter"||r.key===" ")))return;r.preventDefault();let s=this.#h?this.#w(e):void 0;this.requestOpen({coord:s,viaKeyboard:!0,originEvent:r})};e.addEventListener("click",n),e.addEventListener("keydown",a),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",a),this.listening=!1}}this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}scheduleOpen(){this.cancelCloseTimer(),!this._shown&&(this.cancelOpenTimer(),this.openTimer=setTimeout(()=>{this.openTimer=void 0,this.requestOpen()},bg))}scheduleClose(){this.cancelOpenTimer(),this._shown&&(this.#S||$.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))||(this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},fg)))}get#S(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}cancelOpenTimer(){this.openTimer!==void 0&&(clearTimeout(this.openTimer),this.openTimer=void 0)}cancelCloseTimer(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}};function im(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ai)}im();var ri=class extends P{};function sm(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ri)}sm();var oi=class extends P{};function lm(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",oi)}lm();var ii=class extends ea{ariaProp="ariaSelected"};function cm(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",ii)}cm();var si=class extends P{static observedAttributes=["state","disabled","orientation","noslide"];internals;uncontrolledValue=null;seeded=!1;observer;resizeObserver;resizeTimer;resizeFrame;lastSelected=null;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(a=>[...a.addedNodes,...a.removedNodes].some(r=>r.nodeName==="A-TAB"||r.querySelector?.("a-tab")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),this.#r(),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.#u()}attributeChangedCallback(e,n,a){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&a!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states.add("disabled"):this.internals?.states.delete("disabled"),this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states.has("disabled")??!1)}get#n(){return this.getAttribute("orientation")==="vertical"}get#a(){return Array.from(this.querySelectorAll("a-tab"))}#r(){if(!(!this.hasAttribute("noslide")&&typeof this.view.ResizeObserver=="function"&&this.view.CSS.supports("anchor-scope: all"))){this.resizeObserver?.disconnect(),this.#u();return}this.resizeObserver??=new this.view.ResizeObserver(this.#o),this.resizeObserver.observe(this)}#o=()=>{this.internals?.states.add("resizing"),this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.resizeTimer=this.view.setTimeout(()=>{this.resizeTimer=void 0,this.resizeFrame=this.view.requestAnimationFrame(()=>{this.resizeFrame=void 0,this.internals?.states.delete("resizing")})},120)};#u(){this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeTimer=void 0,this.resizeFrame=void 0,this.internals?.states.delete("resizing")}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#a,a=n.find(r=>r.value===e&&e!=null)??null;for(let r of n)r.selected=r===a;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=a),this.alive&&a&&a!==this.lastSelected&&this.#h(a),this.lastSelected=a};#h(e){let n=this.getBoundingClientRect(),a=e.getBoundingClientRect();this.#n?a.top<n.top?this.scrollTop-=n.top-a.top:a.bottom>n.bottom&&(this.scrollTop+=a.bottom-n.bottom):a.left<n.left?this.scrollLeft-=n.left-a.left:a.right>n.right&&(this.scrollLeft+=a.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let a=this.emitStateChange(e,n);this.hasAttribute("state")||a&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-tab");!n||n.hasAttribute("disabled")||(n.focus({preventScroll:!0}),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t)return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let a=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){a&&n.includes(a)&&(e.preventDefault(),this.requestSelect(a.value));return}if(e.key==="Home"||e.key==="End"){e.preventDefault();let l=e.key==="Home"?n[0]:n[n.length-1];l.focus({preventScroll:!0}),this.requestSelect(l.value);return}let r=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!r&&!o)return;e.preventDefault();let i=a?n.indexOf(a):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(r?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function dm(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",si)}dm();var li=class extends P{static observedAttributes=["value"];internals;tabs=null;onTabsChange=()=>this.sync();constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){this.bindTabs(),this.sync(),requestAnimationFrame(()=>{this.tabs||this.bindTabs(),this.sync()})}disconnectedCallback(){this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=null}attributeChangedCallback(){this.sync()}bindTabs(){let e=this.parentElement?.querySelector(":scope > a-tabs")??null;e!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=e,this.tabs?.addEventListener("change",this.onTabsChange))}sync(){let e=this.getAttribute("value"),n=!!this.tabs&&e===(this.tabs.value??null);try{n?this.internals?.states.add("active"):this.internals?.states.delete("active")}catch{}if(this.internals&&"ariaLabelledByElements"in this.internals){let a=e!=null?this.tabs?.querySelector(`a-tab[value="${Tg(e)}"]`):null;this.internals.ariaLabelledByElements=a?[a]:[]}}};function Tg(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function um(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",li)}um();var Ag="closerequest",Mg=200,Ig=`
919
+ :host { display: contents; }
920
+
921
+ dialog {
922
+ --_dur: ${Mg}ms;
923
+ --_r: var(--dialog-round, var(--dialog-radius, 10px));
924
+
925
+ position: fixed;
926
+ box-sizing: border-box;
927
+ padding: 0;
928
+ border: var(--dialog-outline, none);
929
+ max-width: calc(100vw - 2 * var(--dialog-margin, 32px));
930
+ max-height: calc(100dvh - 2 * var(--dialog-margin, 32px));
931
+ width: var(--dialog-width, 480px);
932
+ height: var(--dialog-height, fit-content);
933
+ overflow: visible;
934
+ color: var(--dialog-text, inherit);
935
+ background: var(--dialog-bg, #fff);
936
+ border-radius: var(--_r);
937
+ box-shadow: var(--dialog-shadow, inset 0 0 0 1px color-mix(in oklch, black 8%, transparent), 0 10px 38px color-mix(in oklch, black 28%, transparent));
938
+
939
+ flex-direction: column;
940
+ }
941
+
942
+ dialog[open] {
943
+ display: flex;
944
+ }
945
+
946
+ dialog:focus, dialog:focus-visible { outline: none; }
947
+
948
+ dialog::backdrop {
949
+ background: var(--dialog-overlay, color-mix(in oklch, black 40%, transparent));
950
+ }
951
+
952
+ :host { --_enter-from: scale(0.97); }
953
+ :host([position="left"]) { --_enter-from: translateX(-100%); }
954
+ :host([position="right"]) { --_enter-from: translateX(100%); }
955
+ :host([position="top"]) { --_enter-from: translateY(-100%); }
956
+ :host([position="bottom"]) { --_enter-from: translateY(100%); }
957
+
958
+ @media (prefers-reduced-motion: no-preference) {
959
+ dialog {
960
+ opacity: 0;
961
+ transform: var(--_enter-from);
962
+ transition:
963
+ opacity var(--_dur) ease,
964
+ transform var(--_dur) ease,
965
+ overlay var(--_dur) ease allow-discrete,
966
+ display var(--_dur) ease allow-discrete;
967
+ }
968
+ dialog[open] {
969
+ opacity: 1;
970
+ transform: none;
971
+ }
972
+ @starting-style {
973
+ dialog[open] { opacity: 0; transform: var(--_enter-from); }
974
+ }
975
+
976
+ dialog::backdrop {
977
+ background: transparent;
978
+ transition:
979
+ background var(--_dur) ease,
980
+ overlay var(--_dur) ease allow-discrete,
981
+ display var(--_dur) ease allow-discrete;
982
+ }
983
+ dialog[open]::backdrop { background: var(--dialog-overlay, color-mix(in oklch, black 40%, transparent)); }
984
+ @starting-style {
985
+ dialog[open]::backdrop { background: transparent; }
986
+ }
987
+ }
988
+
989
+ :host([position="left"]) dialog,
990
+ :host([position="right"]) dialog {
991
+ width: var(--dialog-width, 380px);
992
+ max-width: calc(100vw - var(--dialog-margin, 32px));
993
+ height: 100dvh;
994
+ max-height: 100dvh;
995
+ border-radius: 0;
996
+ }
997
+ :host([position="left"]) dialog { margin: 0 auto 0 0; }
998
+ :host([position="right"]) dialog { margin: 0 0 0 auto; }
999
+
1000
+ :host([position="top"]) dialog,
1001
+ :host([position="bottom"]) dialog {
1002
+ width: 100vw;
1003
+ max-width: 100vw;
1004
+ height: var(--dialog-height, fit-content);
1005
+ max-height: calc(100dvh - var(--dialog-margin, 32px));
1006
+ border-radius: 0;
1007
+ }
1008
+ :host([position="top"]) dialog { margin: 0 auto auto auto; }
1009
+ :host([position="bottom"]) dialog { margin: auto auto 0 auto; }
1010
+
1011
+ :host([position="fullscreen"]) dialog {
1012
+ width: 100vw;
1013
+ max-width: 100vw;
1014
+ height: 100dvh;
1015
+ max-height: 100dvh;
1016
+ margin: 0;
1017
+ border-radius: 0;
1018
+ }
1019
+
1020
+ :host([round]) dialog { border-radius: var(--_r); }
1021
+ :host([round="top"]) dialog { border-radius: var(--_r) var(--_r) 0 0; }
1022
+ :host([round="bottom"]) dialog { border-radius: 0 0 var(--_r) var(--_r); }
1023
+ :host([round="left"]) dialog { border-radius: var(--_r) 0 0 var(--_r); }
1024
+ :host([round="right"]) dialog { border-radius: 0 var(--_r) var(--_r) 0; }
1025
+
1026
+ slot[name="header"] {
1027
+ display: none;
1028
+ flex: 0 0 auto;
1029
+ padding: var(--dialog-header-padding, 18px 20px 8px);
1030
+ font-size: 17px;
1031
+ font-weight: 560;
1032
+ line-height: 24px;
1033
+ }
1034
+ slot[name="header"].has-content { display: block; }
1035
+ dialog.has-close slot[name="header"] { padding-inline-end: 52px; }
1036
+
1037
+ slot[part="body"] {
1038
+ display: block;
1039
+ flex: 1 1 auto;
1040
+ min-height: 0;
1041
+ overflow: auto;
1042
+ padding: var(--dialog-body-padding, 8px 20px 12px);
1043
+ }
1044
+ /* With a close button but no header, the body is the top zone, so it takes the
1045
+ \u2715 clearance instead of the header (which is display:none when empty). */
1046
+ dialog.has-close slot[name="header"]:not(.has-content) ~ slot[part="body"] {
1047
+ padding-inline-end: 52px;
1048
+ }
1049
+
1050
+ slot[name="footer"] {
1051
+ display: none;
1052
+ flex: 0 0 auto;
1053
+ padding: var(--dialog-footer-padding, 8px 20px 18px);
1054
+ }
1055
+ slot[name="footer"].has-content {
1056
+ display: flex;
1057
+ gap: 8px;
1058
+ justify-content: flex-end;
1059
+ align-items: center;
1060
+ flex-wrap: wrap;
1061
+ }
1062
+
1063
+ slot[name="close"] { display: none; }
1064
+ slot[name="close"].has-content {
1065
+ display: block;
1066
+ position: absolute;
1067
+ inset-block-start: 10px;
1068
+ inset-inline-end: 10px;
1069
+ z-index: 1;
1070
+ }
1071
+ `,ci=class extends P{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#a=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Ig,this.dialog=document.createElement("dialog"),this.dialog.setAttribute("part","dialog"),this.dialog.tabIndex=-1,this.closeSlot=document.createElement("slot"),this.closeSlot.name="close",this.closeSlot.setAttribute("part","close"),this.headerSlot=document.createElement("slot"),this.headerSlot.name="header",this.headerSlot.setAttribute("part","header");let a=document.createElement("slot");a.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let r of[this.headerSlot,this.footerSlot,this.closeSlot])r.addEventListener("slotchange",()=>{let o=r.assignedNodes().length>0;r.classList.toggle("has-content",o),r===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#x()),this.dialog.append(this.headerSlot,a,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",r=>{r.preventDefault(),this.#u||this.requestClose()}),this.dialog.addEventListener("pointerdown",r=>{this.#a=r.target===this.dialog}),this.dialog.addEventListener("click",r=>{this.#u||this.#a&&r.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#o?this.#c(Zt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(Ag,()=>this.requestClose())}connectedCallback(){this.#o?this.#c(Zt(this.getAttribute("state"))):(this.#n||(Zt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#s()),this.#p(),this.#x()}disconnectedCallback(){this.#b(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#o&&this.#c(Zt(this.getAttribute("state"))),this.#p()):e==="name"&&this.#p()}get#o(){return this.hasAttribute("state")}get#u(){return this.hasAttribute("persistent")}get#h(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#h==="open")return;let e=this.#l("open");this.#o||e&&this.#s()}requestClose(){if(this.#h==="closed")return;let e=this.#l("closed");this.#o||e&&this.#d()}#l(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#h}}))}#c(e){e==="open"?this.#s():this.#d()}#s(){this.#t=!0,!(this.dialog.open||!this.isConnected)&&(this.dialog.showModal(),this.querySelector("[autofocus]")||this.dialog.focus())}#d(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#x(){let e=this.headerSlot.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.dialog.setAttribute("aria-label",e):this.dialog.removeAttribute("aria-label")}#p(){let e=!this.#o&&!!this.getAttribute("name");e&&!this.#r?this.#f():!e&&this.#r&&this.#b()}#f(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let a=e.target;a instanceof Element&&(a.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():a.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#b(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function hm(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",ci)}hm();var Dg=`
1072
+ .container {
1073
+ display: flex;
1074
+ flex-direction: column;
1075
+ box-sizing: border-box;
1076
+ width: 100%;
1077
+ height: 100%;
1078
+ min-width: 0;
1079
+ color: inherit;
1080
+ text-decoration: none;
1081
+ cursor: default;
1082
+ border-radius: var(--card-radius, 8px);
1083
+ -webkit-user-drag: none;
1084
+ }
1085
+ :host([media-position="bottom"]) .container { flex-direction: column-reverse; }
1086
+ :host([media-position="left"]) .container { flex-direction: row; }
1087
+ :host([media-position="right"]) .container { flex-direction: row-reverse; }
1088
+
1089
+ :host([href]) .container { user-select: none; }
1090
+ :host([href]:not([loading])) .container { cursor: pointer; }
1091
+
1092
+ .container:focus-visible {
1093
+ outline: none;
1094
+ box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px var(--focus-ring);
1095
+ }
1096
+
1097
+ [part="media"] { display: block; }
1098
+ :host([media-position="left"]) [part="media"],
1099
+ :host([media-position="right"]) [part="media"] { flex: none; }
1100
+
1101
+ .content {
1102
+ display: flex;
1103
+ flex-direction: column;
1104
+ flex: 1 1 auto;
1105
+ min-width: 0;
1106
+ min-height: 0;
1107
+ /* Base type for the content zone, matching the body <a-text> at this size. The
1108
+ title / subtitle / body all set their own font, so this changes nothing
1109
+ visible \u2014 it defines the em/ch base so the header gap (in ch) resolves against
1110
+ the body's type size. */
1111
+ font-size: var(--card-content-fs, 15px);
1112
+ line-height: var(--card-content-lh, 20px);
1113
+ }
1114
+
1115
+ .header {
1116
+ display: flex;
1117
+ align-items: center;
1118
+ gap: 1ch;
1119
+ padding: var(--card-padding, 12px);
1120
+ padding-block-start: calc(var(--card-padding, 12px) - var(--card-header-nudge, 1px));
1121
+ padding-block-end: calc(var(--card-padding, 12px) / 2);
1122
+ }
1123
+ slot[name="icon"] {
1124
+ flex: none;
1125
+ display: flex;
1126
+ align-items: center;
1127
+ /* Off by default; secondary cards in light multiply the chip into the deeper
1128
+ surface (see --card-icon-blend in the external sheet). */
1129
+ mix-blend-mode: var(--card-icon-blend, normal);
1130
+ }
1131
+ slot[name="header"] {
1132
+ display: block;
1133
+ flex: 1 1 auto;
1134
+ min-width: 0;
1135
+ }
1136
+ slot[part="body"] {
1137
+ display: block;
1138
+ flex: 1 1 auto;
1139
+ min-width: 0;
1140
+ min-height: 0;
1141
+ padding: var(--card-padding, 12px);
1142
+ }
1143
+ slot[name="footer"] {
1144
+ display: flex;
1145
+ align-items: center;
1146
+ gap: 8px;
1147
+ flex-wrap: wrap;
1148
+ justify-content: flex-start;
1149
+ padding: var(--card-padding, 12px);
1150
+ }
1151
+
1152
+ :host([selected]) .container { box-shadow: inset 0 0 0 2px var(--card-selected-ring, var(--focus-ring)); }
1153
+ :host([selected]) .container:focus-visible { box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px var(--focus-ring); }
1154
+
1155
+ :host([loading]) .container { pointer-events: none; }
1156
+ @media (prefers-reduced-motion: no-preference) {
1157
+ :host([loading]) [part="content"] { animation: card-pulse 1.4s ease-in-out infinite; }
1158
+ }
1159
+ @keyframes card-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
1160
+ `,di=class extends P{static observedAttributes=["href","target","rel","ping","loading","aria-label"];#e;#t;#n;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Dg,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let a=document.createElement("slot");a.name="media",a.setAttribute("part","media");let r=document.createElement("div");r.className="content",r.setAttribute("part","content");let o=document.createElement("div");o.className="header",o.setAttribute("part","header");let i=document.createElement("slot");i.name="icon",i.setAttribute("part","icon"),this.#t=document.createElement("slot"),this.#t.name="header",this.#t.setAttribute("part","title"),o.append(i,this.#t),this.#n=document.createElement("slot"),this.#n.setAttribute("part","body");let s=document.createElement("slot");s.name="footer",s.setAttribute("part","footer"),r.append(o,this.#n,s),this.#e.append(a,r),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#a()}attributeChangedCallback(){this.#a()}#a(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let a of["target","rel","ping"]){let r=this.getAttribute(a);r!=null?this.#e.setAttribute(a,r):this.#e.removeAttribute(a)}}else for(let a of["href","target","rel","ping"])this.#e.removeAttribute(a);n?this.#e.setAttribute("aria-busy","true"):this.#e.removeAttribute("aria-busy"),this.#r()}#r(){if(!this.#e.hasAttribute("href")){this.#e.removeAttribute("aria-label");return}let n=this.getAttribute("aria-label")?.trim()||this.#o(this.#t)||this.#o(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#o(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function pm(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",di)}pm();var zg="dismissrequest",_g="data-banner-dismiss",Og=`
1161
+ slot[name="message"], slot:not([name]) { display: contents; }
1162
+
1163
+ slot[name="actions"] {
1164
+ display: flex;
1165
+ align-items: center;
1166
+ gap: 4px;
1167
+ flex-shrink: 0;
1168
+ }
1169
+
1170
+ slot[name="close"] {
1171
+ position: absolute;
1172
+ inset-inline-end: 0;
1173
+ inset-block: 0;
1174
+ display: grid;
1175
+ place-items: center;
1176
+ opacity: 0.65;
1177
+ transition: opacity 150ms ease;
1178
+ }
1179
+ slot[name="close"]:hover,
1180
+ slot[name="close"]:focus-within {
1181
+ opacity: 1;
1182
+ }
1183
+ `,mm=Zt,ui=class extends P{static observedAttributes=["state"];#e;#t=!1;constructor(){super(),this.#e=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Og;let a=document.createElement("slot");a.name="message",a.setAttribute("part","message");let r=document.createElement("slot");r.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=document.createElement("slot");i.name="close",i.setAttribute("part","close"),e.append(n,a,r,o,i),this.addEventListener(zg,s=>{s.stopPropagation(),this.#u()}),Fr(this,_g,()=>this.#u())}get#n(){return this.hasAttribute("state")}get#a(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#o(mm(this.getAttribute("state"))):this.#t||(this.#o(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#o(mm(this.getAttribute("state")))}#o(e){if(this.#e)try{e==="closed"?(this.#e.states.add("closed"),this.#e.states.delete("open")):(this.#e.states.add("open"),this.#e.states.delete("closed"))}catch{}}#u(){if(this.#a==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#o("closed")}};function bm(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",ui)}bm();var gm=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],Pg="bottom-right",fm=Object.freeze([]),Ng=0;function hi(){let t=fm,e=new Set,n=()=>e.forEach(l=>l());function a(l,c={}){let d=c.id??`t${++Ng}`,u=t.findIndex(b=>b.id===d),m=u===-1?void 0:t[u],h={id:d,render:l,placement:c.placement??m?.placement??Pg,duration:"duration"in c?c.duration:m?.duration,politeness:c.politeness??m?.politeness,leaving:!1,rev:m?m.rev+1:0};return t=m?t.map((b,f)=>f===u?h:b):[...t,h],n(),d}function r(l){let c=!1;t=t.map(d=>d.id===l&&!d.leaving?(c=!0,{...d,leaving:!0}):d),c&&n()}function o(l,c){let d=!1;t=t.map(u=>u.id===l&&!u.leaving?(d=!0,{...u,render:c,rev:u.rev+1}):u),d&&n()}function i(l){let c=t.filter(d=>d.id!==l);c.length!==t.length&&(t=c,n())}function s(){let l=!1;t=t.map(c=>c.leaving?c:(l=!0,{...c,leaving:!0})),l&&n()}return{add:a,dismiss:r,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return fm}}}var Lg=gm,pi=class extends P{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Bg,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let a of Lg){let r=document.createElement("slot");r.name=a,this.#e.append(r)}this.#e.addEventListener("slotchange",this.#n),e.append(n,this.#e)}connectedCallback(){this.#n()}disconnectedCallback(){this.#t=!1}#n=()=>{let e=this.#e;if(typeof e.showPopover!="function")return;let n=this.childElementCount>0;if(n&&!this.#t){if(!this.isConnected)return;try{e.showPopover(),this.#t=!0}catch{}}else if(!n&&this.#t){try{e.matches(":popover-open")&&e.hidePopover()}catch{}this.#t=!1}}},Bg=`
1184
+ :host { display: contents; }
1185
+
1186
+ .region {
1187
+ position: fixed;
1188
+ inset: 0;
1189
+ margin: 0;
1190
+ padding: 0;
1191
+ border: 0;
1192
+ background: transparent;
1193
+ overflow: visible;
1194
+ pointer-events: none;
1195
+ width: auto;
1196
+ height: auto;
1197
+ }
1198
+ .region:popover-open { display: block; }
1199
+
1200
+ slot {
1201
+ position: absolute;
1202
+ display: flex;
1203
+ flex-direction: column;
1204
+ gap: var(--toaster-gap, 12px);
1205
+ width: min(var(--toaster-width, 380px), calc(100vw - 2 * var(--toaster-inset, 16px)));
1206
+ box-sizing: border-box;
1207
+ pointer-events: none;
1208
+ }
1209
+
1210
+ ::slotted(*) { pointer-events: auto; }
1211
+
1212
+ slot[name^="top-"] { top: var(--toaster-inset, 16px); flex-direction: column-reverse; }
1213
+ slot[name^="bottom-"] { bottom: var(--toaster-inset, 16px); flex-direction: column; }
1214
+ slot[name$="-left"] { left: var(--toaster-inset, 16px); }
1215
+ slot[name$="-right"] { right: var(--toaster-inset, 16px); }
1216
+ slot[name$="-center"] { left: 50%; transform: translateX(-50%); }
1217
+ `;function vm(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",pi)}vm();var Rg=220,xm=5e3,Fg="data-toast-dismiss",mi=class extends P{static observedAttributes=["leaving","rev"];#e;#t;#n;#a;#r;#o;#u=0;#h=0;#l=!1;#c=!1;#s=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(a){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",a)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Vg,this.#t=document.createElement("slot"),e.append(n,this.#t),Fr(this,Fg,()=>this.dismiss())}connectedCallback(){if(this.#x(),this.addEventListener("pointerenter",this.#w),this.addEventListener("pointerleave",this.#S),this.addEventListener("focusin",this.#M),this.addEventListener("focusout",this.#I),this.hasAttribute("leaving")){this.dismiss();return}this.#b()}disconnectedCallback(){this.#C(),this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.removeEventListener("pointerenter",this.#w),this.removeEventListener("pointerleave",this.#S),this.removeEventListener("focusin",this.#M),this.removeEventListener("focusout",this.#I)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#l&&this.#d():e==="rev"&&this.isConnected&&this.restart()}#d(){this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.#l=!1,this.#e?.states.delete("leaving"),this.#b()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#x()}#x(){this.#n!==this.#a&&(this.#a?.parentNode===this&&this.removeChild(this.#a),this.#a=this.#n,this.#n&&this.append(this.#n))}get#p(){let e=this.getAttribute("duration");if(e==null)return xm;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:xm}get#f(){return this.#c||this.#s}#b(){this.#u=this.#p,this.#g(),this.#v()}#g(){Number.isFinite(this.#p)?(this.#t.style.animation=`toast-remaining ${this.#p}ms linear forwards`,this.#y(e=>{e.currentTime=0}),(this.#f||this.#l)&&this.#i()):this.#t.style.animation=""}#y(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#i(){this.#y(e=>e.pause())}#k(){this.#y(e=>e.play())}#v(){if(!(this.#r!=null||this.#l||this.#f||!Number.isFinite(this.#p))){if(this.#u<=0){this.dismiss();return}this.#h=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#u),this.#k()}}#C(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#m(){this.#r!=null&&(this.#u-=Date.now()-this.#h,this.#C(),this.#i())}#w=()=>{this.#c=!0,this.#m()};#S=()=>{this.#c=!1,this.#v()};#M=()=>{this.#s=!0,this.#m()};#I=()=>{this.#s=!1,this.#v()};#T(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#P(){if(this.#T())return 0;let e=this.view.getComputedStyle?.(this).getPropertyValue("--toast-dur").trim();if(e){let n=parseFloat(e);if(Number.isFinite(n))return e.endsWith("ms")?n:n*1e3}return Rg}restart(){this.#l||(this.#C(),this.#b())}dismiss(){if(this.#l)return;this.#l=!0,this.#C(),this.#i(),this.#e?.states.add("leaving");let e=this.#P();this.#o=this.view.setTimeout(()=>{this.#o=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},Vg=`
1218
+ :host { display: block; opacity: 1; translate: 0 0; }
1219
+ :host(:state(leaving)) { opacity: 0; }
1220
+
1221
+ @starting-style {
1222
+ :host { opacity: 0; translate: 0 12px; }
1223
+ }
1224
+
1225
+ @media (prefers-reduced-motion: no-preference) {
1226
+ :host {
1227
+ transition:
1228
+ opacity var(--toast-dur, 220ms) ease,
1229
+ translate var(--toast-dur, 220ms) ease;
1230
+ }
1231
+ }
1232
+
1233
+ slot { display: block; }
1234
+
1235
+ @keyframes toast-remaining {
1236
+ from { --toast-remaining: 1; }
1237
+ to { --toast-remaining: 0; }
1238
+ }
1239
+ `;function ym(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",mi)}ym();var Hg=({seed:t,name:e,src:n,size:a,badge:r,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof a=="number",u=d?on(a,"--avatar-size",l):l,m=Q(o,"--avatar-radius",u),h=F(r,"--avatar-badge-tone-source",m);return p("a-avatar",{seed:t,name:e,src:n,size:!d&&a&&a!=="medium"?a:void 0,badge:r,round:G(o),config:i?JSON.stringify(i):void 0,role:e?"img":void 0,"aria-label":e||void 0,"aria-hidden":e?void 0:"true",class:s,style:h,...c})};var jg=({value:t,max:e=100,tone:n,size:a,round:r,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,m=typeof t=="number"?t:0,h=e>0?Math.round(Math.min(100,Math.max(0,m/e*100))):0,b=e>0?Math.min(e,Math.max(0,m)):0,f=[o,!u&&`${h}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return p("a-progress",{value:u?!1:m,max:e,tone:n&&n!=="neutral"?n:void 0,size:a&&a!=="medium"?a:void 0,round:G(r),role:"progressbar","aria-valuenow":u?void 0:b,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":f,class:s,style:Q(r,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:Tc(c)?c:A("a-progress-label",{children:[!u&&A("a-progress-number",{children:[h,"%"]}),o!=null&&p("a-progress-text",{children:o}),i!=null&&p("a-progress-hint",{children:i})]})})};var rc=({tone:t,value:e,max:n=100,size:a,speed:r,label:o,className:i,style:s,...l})=>{let c=typeof e=="number"&&Number.isFinite(e),d=Number.isFinite(n)&&n>0?n:100,u=c?Math.min(d,Math.max(0,e)):void 0,m=u!=null?u/d*100:void 0,h={...s,...a!=null?{"--loader-size":`${a}px`}:{},...!c&&r!=null&&Number.isFinite(r)&&r>0?{"--loader-speed":`${r}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},b=o!=null?{role:"progressbar","aria-label":o,"aria-valuenow":c?u:void 0,"aria-valuemin":c?0:void 0,"aria-valuemax":c?d:void 0}:{"aria-hidden":"true"};return p("a-loader",{tone:t,...c?{value:u}:{},class:i,style:h,...b,...l})};var Tt=({delay:t,placement:e,round:n,follow:a,interactive:r,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>p("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"?"top":void 0,round:G(n),follow:a?"":void 0,interactive:r?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:Q(n,"--tooltip-round",l),...d,children:c});var bi=({priority:t,tone:e,size:n,inline:a,truncate:r,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=typeof r=="number"?r:r?1:null,m=u!=null&&u>=1?u:null,h=e||void 0,b=F(h,"--text-tone-source",m!=null?{...l,"--line-clamp":m}:l),f=o&&m!=null;return A("a-text",{priority:t,tone:h,size:n,inline:a?"":void 0,truncate:m!=null?String(m):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:b,...d,children:[c,m!=null&&!f&&p(Tt,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var oc=({level:t=2,priority:e,tone:n,className:a,style:r,children:o,...i})=>{let s=n||void 0;return p("a-title",{level:String(t),priority:e,tone:s,role:"heading","aria-level":t,class:a,style:F(s,"--title-tone-source",r),...i,children:o})};var xe=({shape:t,size:e,label:n,className:a,style:r,...o})=>{let i=e!=null?{...r,"--icon-size":`${e}px`}:r,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return p("a-icon",{shape:t,class:a,style:i,...s,...o})};var fi=({icon:t,iconTrailing:e,label:n,value:a,tone:r,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=r||void 0,h=F(m,"--tag-tone-source",c),b=a!=null,f=t!=null&&n==null&&a==null&&d==null&&e==null;return A("a-tag",{tone:m,"aria-label":f?`${t} tag`:void 0,priority:o&&o!=="secondary"?o:void 0,size:i&&i!=="medium"?i:void 0,allcaps:s?"":void 0,class:l,style:h,...u,children:[t&&p(xe,{shape:t}),n!=null&&(b?p("a-tag-label",{children:n}):p("a-tag-value",{children:n})),b&&p("a-tag-value",{children:a}),d,e&&p(xe,{shape:e})]})};var Ee=({priority:t,tone:e,underline:n,icon:a,iconTrailing:r,paddingless:o,label:i,size:s,loading:l,disabled:c,selected:d,round:u,onClick:m,href:h,target:b,rel:f,download:g,ping:x,type:y,form:k,className:S,style:M,children:N,...L})=>{let C=e||void 0,I=c||l,R=Q(u,"--button-round",F(C,"--button-tone-source",M)),Y=a!=null&&i==null&&N==null&&r==null,j={role:"button",priority:t,tone:C,underline:n,size:s&&s!=="medium"?s:void 0,paddingless:o?"":void 0,round:G(u),loading:l?"":void 0,disabled:c?"":void 0,selected:d?"":void 0,tabIndex:I?-1:0,"aria-disabled":I?"true":void 0,"aria-busy":l?"true":void 0,"aria-pressed":d?"true":void 0,"aria-label":Y?a:void 0,class:S,style:R,onClick:I?void 0:m},ae=A(pe,{children:[a&&p("a-icon",{shape:a,"aria-hidden":"true"}),i!=null&&p("a-button-label",{children:i}),Br(N,"a-button-label"),r&&p("a-icon",{shape:r,"aria-hidden":"true"})]});if(h!=null){let z={...j,disabled:I||void 0};return p("a",{href:I?void 0:h,"data-anta":"",target:b,rel:f,download:g,ping:x,...z,...L,children:ae})}return p("a-button",{type:y,form:k,...j,...L,children:ae})};function gi(t){let{copy:e,copyNode:n,copyUrl:a,copyWithUrl:r,onCopyRequest:o,onCopied:i,toast:s,copiedLabel:l}=t;return{copy:e??void 0,"copy-node":n===!0?"":typeof n=="string"?n:void 0,"copy-url":a?"":void 0,"copy-with-url":r?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(J(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function vi(t){return t.copyNode!=null&&t.copyNode!==!1}var qg=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:a,onCopied:r,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...h})=>{let b=e==="none"?void 0:t??"copy",{shownIcon:f,shownTone:g,handleCopied:x}=Hr(b,a,r),y=e==="trailing"?{iconTrailing:f}:e==="none"?{}:{icon:f},k=d!=null||u!=null,S=gi({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:x,toast:e==="none",copiedLabel:n});return A(Ee,{...y,label:d,tone:e==="none"?a:g,"aria-label":m??(k?void 0:"Copy"),"data-copy-node-button":vi({copyNode:s})?"":void 0,...h,children:[u,p("a-copy",{...S})]})};var Zg=["arrow-left-to-line","arrow-left","arrow-narrow-down","arrow-narrow-up-down","arrow-narrow-up","arrow-right","arrow-top-right","asterisk","blank","book-open","braces","bug","calendar-days","calendar","case-sensitive","chat","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-right","circle-check","circle-dot","circle-large","circle-small-solid","circle","click","clock","cloud-upload","columns-3-cog","copy","corner-down-right","cube","dollar-sign","dots-vertical","download","edit","external-link","eye-closed","eye","file-down","file","filter-x","filter","folder-close","folder-open","folder-tree","hat-glasses","heart-handshake","heart","history-tree","history","home","hourglass","info","link","list-collapse","maximize","megaphone","menu","minimize","minus","moon","more","move-horizontal","not-equal","play","plus","pointer","presentation","refresh-ccw-dot","refresh","regex","repeat","rotate-ccw","rss","runs-history","scroll-text","search-check","search","send","settings","share","sparkles","square-check-big","square-menu","sun","swatch-book","table-2","tag","text-cursor-input","text-highlight","text-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],$g={"columns-3-cog":["columns","table","settings","configure","fields","visibility"],blank:["spacer","empty","placeholder","space","none"],"warning-diamond":["error","invalid","alert","danger"],"swatch-book":["palette","color","swatch","paint","design"],"hat-glasses":["accessibility","vision","disguise","person"],"heart-handshake":["credits","thanks","agreement","deal","partnership"],heart:["like","favorite","love","wishlist"],hourglass:["progress","time","wait","loading","timer"],"text-initial":["text","typography","letter","a"],"chevron-down":["arrow","expand","open","down"],"chevron-up":["arrow","collapse","close","up"],"chevron-left":["arrow","back","previous"],"chevron-right":["arrow","forward","next"],"chevrons-right":["skip","fast forward"],"arrow-narrow-down":["download","fall","down"],"arrow-narrow-up":["upload","rise","up"],"arrow-left":["back","previous","prev"],"arrow-right":["forward","next"],"arrow-narrow-up-down":["sort","swap","transfer","reorder"],"arrow-top-right":["external","open","leave"],"arrow-left-to-line":["dock","snap","align"],"move-horizontal":["resize","swap","horizontal"],"external-link":["open","link","share","outbound"],check:["tick","ok","done","confirm","approve"],"dollar-sign":["currency","money","payment"],"circle-check":["success","ok","done"],x:["close","cancel","dismiss","remove","no"],plus:["add","new","create"],minus:["remove","subtract"],menu:["hamburger","list","more"],"dots-vertical":["more","kebab","options"],search:["find","magnify","lookup"],"search-check":["found","validated"],copy:["duplicate","clone"],trash:["delete","remove","bin"],edit:["pencil","modify","rename"],view:["show","display","preview"],click:["tap","press","touch"],send:["submit","share","deliver"],play:["start","run","execute"],refresh:["reload","sync","update"],regex:["pattern","match"],repeat:["loop","retry","rerun"],info:["information","about","i"],"warning-triangle":["alert","danger","caution"],bug:["defect","issue","error"],asterisk:["star","wildcard"],braces:["code","brackets","json"],"case-sensitive":["aA","capitalize","case"],"text-highlight":["mark","highlight"],"list-collapse":["list","collapse","expand","items"],"table-2":["table","grid","data","spreadsheet","rows","columns"],"folder-open":["directory","browse"],"folder-close":["directory"],"folder-tree":["hierarchy","structure","tree"],file:["document","page"],"file-down":["download","save"],calendar:["date","schedule"],clock:["time"],timer:["stopwatch","countdown","time"],"toggle-right":["toggle","switch","on","off","boolean"],history:["log","past"],"history-tree":["log","past"],"runs-history":["log","past"],chat:["message","comment","discuss"],presentation:["slides","deck"],"book-open":["read","docs","documentation"],sparkles:["ai","magic","generate"],cube:["box","package"],circle:["dot","point"],"circle-large":["dot","marker"],"not-equal":["neq","different"],"corner-down-right":["branch","indent","return"],rss:["feed","subscribe"],"scroll-text":["log","output","console"],workflow:["pipeline","process","flow"],webhook:["integration","hook"],megaphone:["announcement","broadcast"],maximize:["fullscreen","expand"],minimize:["collapse","shrink"],filter:["sort","narrow"],"filter-x":["clear filter","reset filter","remove filter"],download:["save","import"],"cloud-upload":["save","sync","upload","send","export"],link:["url","href","anchor"],more:["options","extra"],tag:["label","badge","chip"]};var wm=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",km=t=>t==="indeterminate"?"indeterminate":t==="checked",Ug=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Yg=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:h,children:b,tabIndex:f,...g})=>{let x=Q(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(a,"--checkbox-off-tone-source",r==null?F(a,"--checkbox-tone-source",h):h))),y=g["aria-label"],k=(typeof y=="string"?y:void 0)??d??(typeof b=="string"?b:void 0),S=s?I=>{let{event:R,detail:Y}=J(I);Y&&s(R,{next:km(Y.next),prev:km(Y.prev)})}:void 0,M=l||c?I=>{l?.(I),c?.(I,Ug(I.currentTarget))}:void 0,N=t!==void 0?wm(t):void 0,L=t===void 0&&e!==void 0?wm(e):void 0,C=d!=null||b!=null;return A("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":k,...g,state:N,"default-state":L,disabled:n?"":void 0,tone:a&&a!=="neutral"?a:void 0,"tone-selected":r||void 0,size:o&&o!=="medium"?o:void 0,round:G(i),tabIndex:n?-1:f??0,onstatechange:S,onchange:M,class:m,style:x,children:[C&&A("a-checkbox-label",{children:[d,b]}),u!=null&&p("a-checkbox-hint",{children:u})]})};var Wg=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Gg=({checked:t,defaultChecked:e,disabled:n,tone:a,toneSelected:r,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:h,style:b,children:f,tabIndex:g,...x})=>{let y=Q(i,"--switch-round",F(r,"--switch-tone-source",F(a,"--switch-off-tone-source",r==null?F(a,"--switch-tone-source",b):b))),k=x["aria-label"],S=(typeof k=="string"?k:void 0)??u??(typeof f=="string"?f:void 0),M=l?R=>{let{event:Y,detail:j}=J(R);j&&l(Y,{next:j.next==="checked",prev:j.prev==="checked"})}:void 0,N=c||d?R=>{c?.(R),d?.(R,Wg(R.currentTarget))}:void 0,L=t===void 0?void 0:t?"checked":"unchecked",C=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,I=u!=null||f!=null;return A("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":S,...x,state:L,"default-state":C,disabled:n?"":void 0,tone:a,"tone-selected":r,size:o&&o!=="medium"?o:void 0,round:G(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:M,onchange:N,class:h,style:y,children:[I&&A("a-switch-label",{children:[u,f]}),m!=null&&p("a-switch-hint",{children:m})]})};var et=({placement:t,context:e,coord:n,nohover:a,offset:r,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:h,children:b,...f})=>p("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:a?"":void 0,offset:r!=null?String(r):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:x,detail:y,isOwn:k}=J(g);k&&y&&l(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,round:G(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":"vertical",class:m,style:on(i,"--menu-padding",Q(c,"--menu-round",h)),...f,children:b});var Se=({icon:t,label:e,hint:n,kbd:a,iconTrailing:r,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneSelected:u,submenu:m,value:h,onSelect:b,href:f,target:g,rel:x,download:y,ping:k,role:S,className:M,style:N,children:L,...C})=>{let I=t,R=s==="checkbox"||s==="radio"||s==="check",Y=s==="checkbox"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",j=R?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,ae=i&&(s===void 0||s==="check"),z=i&&u||d,se=z&&z!=="neutral"?z:void 0,O=e!=null&&(n!=null?A("a-menu-item-text",{children:[p("a-menu-item-label",{children:e}),p("a-menu-item-hint",{children:n})]}):p("a-menu-item-label",{children:e}));if(f!=null){let T={"data-anta-menu-item":"",role:S??"menuitem",href:o?void 0:f,target:g,rel:x,download:y===!0?"":y||void 0,ping:k,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,tone:se,style:F(z,"--menu-item-tone-source",N),onClick:b&&!o?V=>b(V,{value:h,label:e}):void 0,class:M};return A("a",{...T,...C,children:[t&&p("a-icon",{shape:t,"aria-hidden":"true"}),O,L,a&&p("kbd",{children:a}),r&&p("a-icon",{shape:r,"aria-hidden":"true"})]})}return A("a-menu-item",{role:S??Y,tabIndex:0,disabled:o?"":void 0,selected:ae?"":void 0,"aria-checked":j,tone:se,style:F(z,"--menu-item-tone-source",N),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,onmenuselect:b?T=>b(T,{value:h,label:e}):void 0,class:M,...C,children:[c!=null?p("span",{"aria-hidden":"true","data-indicator":"",style:{flex:"none",display:"inline-flex",alignItems:"center",minHeight:"1lh",pointerEvents:"none"},children:c}):s==="checkbox"?p("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:se,style:F(z,"--checkbox-tone-source")}):s==="radio"?p("a-radio",{"aria-hidden":"true",selected:!!i,tone:se,style:F(z,"--radio-tone-source")}):null,I&&p("a-icon",{shape:I,"aria-hidden":"true"}),O,L,a&&p("kbd",{children:a}),(()=>{let T=m?r??"chevron-right":r;return!m&&!r&&s==="check"&&c==null&&(T=i?"check":"blank"),T?p("a-icon",{shape:T,"aria-hidden":"true"}):null})()]})};var Kg=({label:t="Copy",icon:e="copy",tone:n,onCopied:a,onCopyRequest:r,copy:o,copyNode:i,copyUrl:s,copyWithUrl:l,children:c,...d})=>{let{shownIcon:u,shownTone:m,handleCopied:h}=Hr(e,n,a),b=gi({copy:o,copyNode:i,copyUrl:s,copyWithUrl:l,onCopyRequest:r,onCopied:h});return A(Se,{label:t,icon:u,tone:m,"data-menu-open":"","data-copy-node-button":vi({copyNode:i})?"":void 0,...d,children:[c,p("a-copy",{...b})]})};var Sn=({className:t,children:e,...n})=>{let a=!!e&&!(typeof e=="string"&&e.trim()==="");return p("a-menu-separator",{role:a?"status":"separator","aria-live":a?"polite":void 0,class:t,...n,children:a?e:null})};var Ba=({label:t,className:e,children:n,...a})=>A("a-menu-group",{role:"group","aria-label":t,class:e,...a,children:[t!=null&&p("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var Xg=({title:t,level:e,tone:n,priority:a,outdent:r,actions:o,disabled:i,round:s,open:l,defaultOpen:c,onStateChange:d,className:u,style:m,children:h,...b})=>{let f=l!==void 0,g=Q(s,"--expander-round",F(n,"--expander-tone-source",m)),x=typeof t=="object"&&t!==null?p("span",{slot:"title",style:{display:"contents"},children:t}):p("a-expander-summary",{slot:"title",children:t});return A("a-expander",{state:f?l?"open":"closed":void 0,"default-state":!f&&c?"open":void 0,level:e!=null?String(e):void 0,tone:n&&n!=="neutral"?n:void 0,priority:a&&a!=="secondary"?a:void 0,outdent:r?"":void 0,round:G(s),disabled:i?"":void 0,onstatechange:d?y=>{let{event:k,detail:S,isOwn:M}=J(y);M&&S&&d(k,{next:S.next==="open",prev:S.prev==="open"})}:void 0,class:u,style:g,...b,children:[x,o!=null&&p("span",{slot:"actions",children:o}),p("a-expander-details",{children:h})]})};var Ra=t=>t?"":void 0,Jg=t=>typeof t=="string"||typeof t=="number",Cm=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},Qg={email:"email",tel:"tel",url:"url"},ev={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},tv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},bt=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:m,leading:h,trailing:b,type:f,autoComplete:g,inputMode:x,name:y,placeholder:k,truncate:S=!0,disabled:M,readOnly:N,required:L,dimActions:C,spellCheck:I,maxLength:R,minLength:Y,pattern:j,min:ae,max:z,step:se,onInput:O,onChange:T,onValueChange:V,onClearClick:fe,onClearInput:Te,children:_e,className:ce,style:de,...Oe})=>{let K=n&&n!=="neutral"?n:void 0,ye=a===void 0?K?tv[K]:void 0:a,Z=f==="search",Ae=Z?void 0:f,Fe=h??(Z?p(xe,{shape:"search"}):void 0),At=Z?m??!0:m;return A("a-input",{size:o&&o!=="medium"?o:void 0,round:G(i),value:s,defaultvalue:l,multiline:Ra(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:K,tone:r||void 0,type:!c&&d==null?Ae:void 0,name:y,placeholder:k,truncate:Ra(S),disabled:Ra(M),readonly:Ra(N),required:Ra(L),"dim-actions":Ra(C),autocomplete:g??(!c&&d==null&&f?Qg[f]:void 0),inputmode:x??(!c&&d==null&&f?ev[f]:void 0),spellcheck:I!=null?I?"true":"false":void 0,maxlength:R!=null?String(R):void 0,minlength:Y!=null?String(Y):void 0,pattern:j,min:ae,max:z,step:se,"aria-invalid":n==="critical"?"true":void 0,oninput:O||V?we=>{O?.(we),V?.(we,Cm(we))}:void 0,onchange:T||V?we=>{T?.(we),V?.(we,Cm(we))}:void 0,onclearclick:fe?we=>fe(J(we).event):void 0,onclearinput:Te?we=>Te(J(we).event):void 0,class:ce,style:Q(i,"--input-round",F(r,"--input-tone-source",de)),...Oe,children:[t!=null&&(Jg(t)?p("span",{slot:"label",children:t}):p("span",{slot:"label",style:{display:"contents"},children:t})),Fe!=null&&p("span",{slot:"leading",style:{display:"contents"},children:Fe}),At&&p("span",{slot:"clear",style:{display:"contents"},children:p(Ee,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&p("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[ye&&p(xe,{shape:ye,"aria-hidden":"true"}),p("span",{children:e})]}),_e]})};var xi=(t,e)=>Number.isFinite(t)?t:e,nv=t=>typeof t=="string"||typeof t=="number",av=(t,e)=>{let n=xi(t,0);return{min:n,max:Math.max(n,xi(e,100))}},Em=t=>{let e=t?.target??{};return{value:Number(e.value??0),min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},rv=({label:t,value:e,defaultValue:n,min:a,max:r,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:h,round:b,valueDisplay:f="end",valuePrefix:g,valueSuffix:x,markers:y,trackClick:k="drag-only",onInput:S,onChange:M,onValueChange:N,onValueCommit:L,className:C,style:I,children:R,tabIndex:Y,...j})=>{let ae=Vr(u),z=Vr(m),se=on(m,"--anta-slider-thumb-size",on(u,"--anta-slider-track-size",Q(b,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",I))))),{min:O,max:T}=av(a,r),V=xi(o,1)>0?xi(o,1):1,fe=j["aria-label"],Te=(typeof fe=="string"?fe:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),_e=f==="inline"&&t==null?"end":f,ce=Z=>Z.value<=O?"0%":Z.value>=T?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(Z.value-O)/(T-O)} + var(--anta-slider-thumb-size) / 2)`,de=Z=>Z.value<=O?"start":Z.value>=T?"end":void 0,Oe=Z=>{let Ae={};return Object.assign(Ae,{"--slider-marker-position":ce(Z)}),Ae},K=S||N?Z=>{let Ae=Em(Z);S?.(Z),N?.(Z,Ae)}:void 0,ye=M||L?Z=>{let Ae=Em(Z);M?.(Z),L?.(Z,Ae)}:void 0;return A("a-slider",{value:e,defaultvalue:n,min:O,max:T,step:V,name:i,disabled:s?"":void 0,tone:l&&l!=="neutral"?l:void 0,"thumb-tone":c&&c!=="neutral"?c:void 0,size:d&&d!=="medium"?d:void 0,"track-size":ae,"thumb-size":z,"thumb-fill":h?"":void 0,round:G(b),"track-click":k==="jump"?"jump":void 0,"value-display":_e==="end"?void 0:_e,"value-prefix":g,"value-suffix":x,role:"slider","aria-label":Te,tabIndex:s?-1:Y??0,oninput:K,onchange:ye,class:C,style:se,...j,children:[t!=null&&(nv(t)?p("span",{slot:"label",children:t}):p("span",{slot:"label",style:{display:"contents"},children:t})),y?.map((Z,Ae)=>{let Fe=de(Z);return p("span",{slot:"markers",style:Oe(Z),"data-slider-marker-start":Fe==="start"?"":void 0,"data-slider-marker-end":Fe==="end"?"":void 0,children:Z.label},`${Z.value}-${Ae}`)}),R]})};function Sm(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=Sm(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function ov(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=Sm(t))&&(a&&(a+=" "),a+=e);return a}var Tm=ov;var Fa=Ce.PlainDate.compare,Am=new Map;function Vt(t,e){let n=`${t}|${JSON.stringify(e)}`,a=Am.get(n);return a||(a=new Intl.DateTimeFormat(t,e),Am.set(n,a)),a}var _r=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ue(t){if(!t)return null;try{return Ce.PlainDate.from(t)}catch{return null}}function ic(t){try{let e=new Intl.Locale(t),a=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof a=="number"&&a>=1&&a<=7)return a}catch{}return 1}function Tn(t,e,n){return e&&Fa(t,e)<0?e:n&&Fa(t,n)>0?n:t}function sc(t,e,n){return e!=null&&Fa(t,e)<0||n!=null&&Fa(t,n)>0}var iv=t=>Array.from(t).slice(0,2).join("");function Mm(t,e=ic(t)){let n=Ce.PlainDate.from("2021-02-01"),a=n.add({days:(e-n.dayOfWeek+7)%7}),r=Vt(t,{weekday:"short",timeZone:"UTC"}),o=Vt(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=a.add({days:s}),c=r.format(_r(l));i.push({short:c,narrow:iv(c),long:o.format(_r(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function lc(t){let{anchor:e,locale:n="en-US",min:a=null,max:r=null,selected:o=null,today:i=Ce.Now.plainDateISO(),weeks:s=6}=t,l=ic(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,h=u.subtract({days:m}),b=Vt(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),f=[];for(let g=0;g<s;g++){let x=[];for(let y=0;y<7;y++){let k=h.add({days:g*7+y});x.push({date:k,iso:k.toString(),day:k.day,weekday:k.dayOfWeek,outside:k.month!==d||k.year!==c,disabled:sc(k,a,r),today:i!=null&&Fa(k,i)===0,selected:o!=null&&Fa(k,o)===0,label:b.format(_r(k))})}f.push(x)}return{year:c,month:d,heading:Vt(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(_r(e)),weekdays:Mm(n,l),weeks:f}}var Im=new Date(Date.UTC(2026,5,15)),cc={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function sv(t){try{return Vt(t,cc).formatToParts(Im).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function yi(t){try{return Vt(t,cc).formatToParts(Im).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function wi(t,e){return Vt(e,cc).format(_r(t))}function lv(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let a=Vt(e,{month:"long",timeZone:"UTC"}),r=Vt(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=a.format(i).toLowerCase(),l=r.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function Or(t,e,n={}){let a=u=>sc(u,n.min??null,n.max??null)?null:u,r=(t??"").trim();if(!r)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(r)){let u=Ue(r);return u?a(u):null}let o=sv(e),i=lv(r,e),s=(r.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Ce.Now.plainDateISO().year;else if(s.length>=2){let[u,m]=s;u>31?[l,d]=[u,m]:m>31?[l,d]=[m,u]:[d,l]=[u,m]}else return null;else if(s.length===1){let u=r.replace(/\D/g,"");if(u.length!==8)return null;let m=0,h={};for(let b of o){let f=b==="year"?4:2;h[b]=Number(u.slice(m,m+f)),m+=f}({year:l,month:c,day:d}=h)}else if(s.length===2){let u=o.filter(h=>h!=="year"),m={};u.forEach((h,b)=>m[h]=s[b]),c=m.month,d=m.day,l=Ce.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((m,h)=>u[m]=s[h]),l=u.year,c=u.month,d=u.day}else return null;l!=null&&l<100&&(l=l<70?2e3+l:1900+l);try{return a(Ce.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function Dm(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,a=e.match(/([ap])\.?m?\.?$/);a&&(n=a[1]==="p"?"pm":"am",e=e.slice(0,a.index).trim());let r,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);r=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)r=Number(i),o=0;else{let s=i.length-2;r=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&r<12&&(r+=12),n==="am"&&r===12&&(r=0);try{return Ce.PlainTime.from({hour:r,minute:o},{overflow:"reject"})}catch{return null}}function ki(t,e,n={}){let a=(t??"").trim();if(!a)return null;let r=a.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=a,i=null;r&&(i=Dm(r[1]),i&&(o=a.slice(0,r.index).trim()));let s=Or(o,e,n);return s?s.toPlainDateTime(i??Ce.PlainTime.from("00:00")):null}function Pr(t){try{let e=Vt(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function dc(t,e,n=Pr(e)){let a=wi(t.toPlainDate(),e),r=String(t.minute).padStart(2,"0");if(!n)return`${a} ${String(t.hour).padStart(2,"0")}:${r}`;let o=(t.hour+11)%12+1;return`${a} ${String(o).padStart(2,"0")}:${r} ${t.hour<12?"AM":"PM"}`}function uc(t,e=Pr(t)){return`${yi(t)} HH:MM${e?" AM":""}`}var hc=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:h,"aria-label":b,...f})=>{let g=t!==void 0,x=r||(typeof navigator<"u"?navigator.language:"en-US"),y=Ue(n),k=Ue(a),S=Ce.Now.plainDateISO(),[M,N]=U(()=>Ue(e)),L=g?Ue(t):M,[C,I]=U(()=>Tn(Ue(t??e)??S,y,k)),[R,Y]=U(t),j=C;if(t!==R){Y(t);let B=Ue(t);B&&(j=Tn(B,y,k),I(j))}let[ae,z]=U(null),[se,O]=U(!1),T=qt(),V=lc({anchor:j,locale:x,min:y,max:k,selected:L,today:S}),fe=j.toString(),[Te,_e]=U(l);l!==Te&&(_e(l),l!==void 0&&z({iso:fe,n:l}));let ce=y?y.year:S.year-3,de=k?k.year:S.year+3,Oe=[];for(let B=ce;B<=de;B++)Oe.push(B);let K=Ye(()=>Array.from({length:12},(B,H)=>Ce.PlainDate.from({year:2e3,month:H+1,day:1}).toLocaleString(x,{month:"long"})),[x]),ye=(B,H)=>y!=null&&(B<y.year||B===y.year&&H<y.month)||k!=null&&(B>k.year||B===k.year&&H>k.month),Z=B=>{s||I(H=>Tn(H.add({months:B}),y,k))},Ae=(B,H)=>{s||I(re=>Tn(re.with({year:B,month:H}),y,k))},Fe=Ye(()=>{let B=(H,re)=>{let w=re+1,v=H===C.year&&w===C.month;return p(Se,{label:K[re],selected:v,disabled:ye(H,w)||void 0,"data-menu-open":"",onSelect:()=>{Ae(H,w),O(!1)},children:v&&p("span",{className:"jump-dot","aria-hidden":"true"})},`${H}-${w}`)};return Oe.length===1?K.map((H,re)=>B(Oe[0],re)):Oe.map(H=>A(Se,{submenu:!0,label:String(H),selected:H===C.year,children:[H===C.year&&p("span",{className:"jump-dot","aria-hidden":"true"}),p(et,{children:K.map((re,w)=>B(H,w))})]},H))},[K,C.year,C.month,ce,de,n,a,s]),At=B=>{let{event:H,detail:re}=J(B);if(!re||(c?.(H,re),re.reason==="user"&&(g||H.defaultPrevented)))return;let w=Ue(re.next);g||N(w),I(Tn(w??C,y,k))},we=B=>{let H="nativeEvent"in B?B.nativeEvent:B;d?.(H),u?.(H,{value:H?.target?.value||null,name:o})},Mt=B=>{if(s)return;let{detail:H}=J(B),re=Ue(H?.date??null);if(!re)return;let w=Tn(re,y,k);I(w),z(v=>({iso:w.toString(),n:(v?.n??0)+1}))},an=s||y!=null&&Ce.PlainDate.compare(C.with({day:1}).subtract({days:1}),y)<0,It=s||k!=null&&Ce.PlainDate.compare(C.with({day:1}).add({months:1}),k)>0;return A("div",{className:Tm("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:h,...f,children:[A("div",{"data-part":"header",children:[p(Ee,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:an,onClick:()=>Z(-1)}),p(Ee,{id:T,"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${V.heading} \u2014 choose month and year`,disabled:s||an&&It,children:V.heading}),p(et,{placement:"bottom",open:se,onStateChange:(B,{next:H})=>O(H),children:Fe}),p(Ee,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:It,onClick:()=>Z(1)})]}),A("a-calendar",{role:"group","aria-labelledby":T,"aria-label":b,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":ae?`${ae.iso}#${ae.n}`:void 0,onstatechange:At,onchange:we,onnavigate:Mt,children:[V.weekdays.map((B,H)=>p("span",{"data-part":"weekday","data-weekend":B.weekend?"":void 0,"aria-hidden":"true",children:B.narrow},`wd${H}`)),V.weeks.flat().map(B=>{let H=B.today&&!B.selected?{priority:"secondary"}:{priority:"tertiary",selected:B.selected,tone:B.selected?"brand":void 0};return A(Ee,{...H,size:i,disabled:s||B.disabled,tabIndex:B.iso===fe?0:-1,"aria-label":B.label,"aria-current":B.today?"date":void 0,"data-part":"day-cell","data-date":B.iso,"data-today":B.today?"":void 0,"data-outside":B.outside?"":void 0,children:[B.day,B.today&&p(Tt,{children:"Today"})]},B.iso)})]})]})};var pc=t=>t?"":void 0,cv=t=>typeof t=="string"||typeof t=="number",zm=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},dv={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},mc=({label:t,hint:e,status:n,statusIcon:a,tone:r,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:h,disabled:b,required:f,icon:g,clearable:x,dimActions:y,trailing:k,onValueChange:S,onClearInput:M,children:N,className:L,style:C,...I})=>{let R=n&&n!=="neutral"?n:void 0,Y=a===void 0?R?dv[R]:void 0:a;return A("a-input-time",{size:o&&o!=="medium"?o:void 0,round:G(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:R,tone:r||void 0,name:h,disabled:pc(b),required:pc(f),"dim-actions":pc(y),"aria-invalid":n==="critical"?"true":void 0,oninput:S?j=>S(j,zm(j)):void 0,onchange:S?j=>S(j,zm(j)):void 0,onclearinput:M?j=>M(J(j).event):void 0,class:L,style:Q(i,"--input-time-round",F(r,"--input-time-tone-source",C)),...I,children:[t!=null&&(cv(t)?p("span",{slot:"label",children:t}):p("span",{slot:"label",style:{display:"contents"},children:t})),g!==!1&&p("span",{slot:"leading",style:{display:"contents"},children:p(xe,{shape:g??"clock"})}),x&&p("span",{slot:"clear",style:{display:"contents"},children:p(Ee,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),k!=null&&p("span",{slot:"trailing",style:{display:"contents"},children:k}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[Y&&p(xe,{shape:Y,"aria-hidden":"true"}),p("span",{children:e})]}),N]})};var uv=({value:t,defaultValue:e,min:n,max:a,locale:r,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:h,offset:b,clearable:f,icon:g,time:x,hour12:y,onValueChange:k,className:S,style:M,...N})=>{let L=r||(typeof navigator<"u"?navigator.language:"en-US"),C=Ue(n),I=Ue(a),R=x?y??Pr(L):!1,Y=Ye(()=>d??(x?uc(L,R):yi(L)),[d,x,L,R]),j=v=>{if(!v)return"";let _=Ue(v.slice(0,10));if(!_)return"";if(!x)return wi(_,L);let q=v.length>=16&&v[10]==="T",X=_.toPlainDateTime(Ce.PlainTime.from(q?v.slice(11,16):"00:00"));return dc(X,L,R)},ae=v=>!v||!x?v:v.length<=10?`${v}T00:00`:v.slice(0,16),z=t!==void 0,[se,O]=U(()=>ae(e)),T=z?t:se,V=T?T.slice(0,10):"",fe=!!T&&T.length>=16&&T[10]==="T",Te=fe&&parseInt(T.slice(11,13),10)||0,_e=fe?T.slice(14,16):"00",[ce,de]=U(()=>j(T)),[Oe,K]=U(!1),[ye,Z]=U(!1),[Ae,Fe]=U(0),[At,we]=U(T);T!==At&&(we(T),de(j(T)),Z(!1));let Mt=v=>{z||O(v||void 0),k?.(v,{value:v,name:o})},an=v=>`${v}T${String(Te).padStart(2,"0")}:${_e}`,It=v=>{Z(!1),v===(T??"")?de(j(v)):Mt(v)},B=v=>{let _=v.trim();if(!_)return Z(!1),T?Mt(""):de(""),!0;let q=x?ki(_,L,{min:C,max:I}):Or(_,L,{min:C,max:I});if(!q)return Z(!0),!1;let X=x?q.toString({smallestUnit:"minute"}):q.toString();return It(X),!0},H=Ye(()=>{let v=ce.trim();if(!v)return V;let _=x?ki(v,L,{min:C,max:I}):Or(v,L,{min:C,max:I});return _?_.toString().slice(0,10):null},[ce,x,L,V,n,a]),[re,w]=U(V);return H!==null&&H!==re&&w(H),A(pe,{children:[p(bt,{label:l,hint:ye?`Unrecognized date. Try ${Y}.`:c,status:ye?"critical":u,size:i,round:m,disabled:s,clearable:f,leading:g===!1?void 0:p(xe,{shape:g??"calendar-days"}),value:ce,placeholder:Y,inputMode:x?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":Oe?"true":"false",onInput:v=>{de(v.currentTarget.value),ye&&Z(!1)},onChange:v=>B(v.currentTarget.value),onKeyDown:v=>{(v.key==="ArrowDown"||v.key==="ArrowUp")&&!s&&(v.preventDefault(),Fe(_=>_+1)),v.key==="Enter"&&!s&&(v.preventDefault(),B(v.currentTarget.value)&&K(!1))},truncate:!0,className:S,style:M,...N}),p(et,{open:Oe,placement:h??"bottom-start",offset:b,autoWidth:!0,inset:8,onStateChange:(v,{next:_})=>K(_),children:A("div",{"data-menu-open":"",children:[p(hc,{value:re,min:n,max:a,locale:r,size:i,disabled:s,focusSignal:Ae,onStateChange:(v,{next:_,reason:q})=>{if(q!=="user")return;let X=_??"";It(x&&X?an(X):X),x||K(!1)}}),x&&A("a-input-date-time-container",{children:[p(mc,{size:i,locale:r,hour12:y,disabled:s,"aria-label":"Time",value:fe?`${String(Te).padStart(2,"0")}:${_e}`:"",onValueChange:(v,{value:_})=>{if(("nativeEvent"in v?v.nativeEvent:v)?.type!=="change")return;let X=V||Ce.Now.plainDateISO().toString();Mt(_?`${X}T${_}`:X)}}),p(Ee,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>K(!1)})]})]})}),o?p("input",{type:"hidden",name:o,value:T??""}):null]})};var An=t=>typeof t=="string"?{value:t,label:t}:t;function Va(t){let e=t.trim();if(!e)return null;let n=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var Ha=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),ja=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),a=[],r=0,o;for(;(o=n.exec(t))!==null;)o.index>r&&a.push(t.slice(r,o.index)),a.push(p("b",{children:o[0]},a.length)),r=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return a.length===0?t:(r<t.length&&a.push(t.slice(r)),a)};var hv=t=>{let{suggestions:e,value:n,defaultValue:a,onValueChange:r,onSelect:o,filter:i=!0,...s}=t,l=qt(),c=n!==void 0,[d,u]=U(a??""),m=c?n:d,[h,b]=U(!1),[f,g]=U(null),x=Ye(()=>e.map(An),[e]),y=typeof i=="function",k=i!==!1&&!y?Va(m):null,S=y?x.filter(C=>i(C,m)):x.filter(C=>Ha(C,k)),M=h&&S.length>0,N=C=>{c||u(C),r?.(C)},L=C=>{N(C.value),o?.(C),b(!1)};return A(pe,{children:[p(bt,{...s,value:m,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-controls":`${l}-list`,"aria-expanded":M?"true":"false","aria-autocomplete":"list","aria-activedescendant":M&&f?f:void 0,onFocus:()=>b(!0),onInput:C=>{N(C.currentTarget.value),b(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&b(!1)}}),p(et,{id:`${l}-list`,role:"listbox",open:M,onStateChange:(C,{next:I})=>{b(I),I||g(null)},onactivedescendant:C=>g(J(C).detail?.id??null),children:S.map((C,I)=>{let{className:R,style:Y,...j}=ot(C,!0);return p(Se,{...j,id:`${l}-o${I}`,role:"option","aria-selected":f===`${l}-o${I}`?"true":"false",icon:C.icon,label:ja(C.label??C.value,k),hint:C.hint?ja(C.hint,k):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:ae=>ae.preventDefault(),onSelect:()=>L(C),className:R,style:Y},`${l}-${C.value}-${I}`)})})]})};var pv=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),mv=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneSelected:h,size:b,disabled:f,orientation:g,className:x,style:y,...k})=>{let S=e!==void 0,[M,N]=U(n),L=S?e:M,C=new Set;for(let z of t)C.has(z.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(z.value)} \u2014 values must be unique.`),C.add(z.value);let I=qt(),R=qt(),Y=f?void 0:t.find(z=>z.value===L)?.value??t.find(z=>!z.disabled)?.value;return A("a-radio-group",{role:"radiogroup","aria-disabled":f?"true":void 0,"aria-labelledby":c?I:void 0,"aria-describedby":d?R:void 0,...k,state:S?e:void 0,"default-state":S?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:m&&m!=="neutral"?m:void 0,"tone-selected":h||void 0,size:b&&b!=="medium"?b:void 0,disabled:f?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:z=>{let{event:se,detail:O}=J(z);O&&(a?.(se,O),!S&&(O.reason==="user"&&se.defaultPrevented||N(O.next??void 0)))},onchange:r||o?z=>{r?.(z),o?.(z,pv(z.currentTarget))}:void 0,onfocusin:i,onfocusout:s,class:x,style:F(h,"--radio-tone-source",F(m,"--radio-off-tone-source",h==null?F(m,"--radio-tone-source",y):y)),children:[c&&p("a-radio-group-label",{id:I,children:c}),d&&p("a-radio-group-hint",{id:R,children:d}),p("a-radio-list",{children:t.map(z=>{let se=f||z.disabled,{className:O,style:T,...V}=ot(z);return A("a-radio",{...V,role:"radio",value:z.value,"aria-disabled":se?"true":void 0,tabIndex:z.value===Y?0:-1,tone:z.tone||void 0,"tone-selected":z.toneSelected||void 0,size:z.size&&z.size!=="medium"?z.size:void 0,disabled:z.disabled?"":void 0,class:O,style:F(z.toneSelected,"--radio-tone-source",F(z.tone,"--radio-off-tone-source",z.toneSelected==null?F(z.tone,"--radio-tone-source",T):T)),children:[p("a-radio-label",{children:z.label}),z.hint!=null&&p("a-radio-hint",{children:z.hint})]},z.value)})})]})};function bv(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),a=(o,i)=>o===0?"none":o===i?"all":"some",r=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=r(c.submenu),u=d.reduce((h,b)=>h+b.on,0),m=d.reduce((h,b)=>h+b.total,0);return{node:{...c,submenu:d.map(h=>h.node),selectionState:a(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=r(c.options),u=d.reduce((h,b)=>h+b.on,0),m=d.reduce((h,b)=>h+b.total,0);return{node:{...c,options:d.map(h=>h.node),selectionState:a(u,m)},on:u,total:m}}let s=An(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return r(t).map(o=>o.node)}var fv=t=>{let{options:e,placement:n,offset:a,selection:r,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:h,size:b,status:f,statusIcon:g,round:x,disabled:y,toneSelected:k,filter:S,selectAll:M=!0,selectAllLabel:N="Select all",clearable:L,clearLabel:C="Clear",renderOption:I,renderIndicator:R,verbose:Y,renderSummary:j,renderTrigger:ae,renderEmpty:z,className:se,style:O,...T}=t,V=r==="multiple",fe=f&&f!=="neutral"?`var(--text-2-${f})`:void 0,Te=V?"checkbox":o??"none",_e=Te==="none"?void 0:Te,ce=l,de=i!==void 0,[Oe,K]=U(s),ye=de?i:Oe,[Z,Ae]=U(!1),[Fe,At]=U(""),[we,Mt]=U(null),an=qt(),It=E=>typeof E=="object"&&Array.isArray(E.submenu),B=E=>typeof E=="object"&&Array.isArray(E.options),H=(E,oe,ee,te)=>{for(let he of E)if(typeof he!="string"&&It(he))H(he.submenu,he.label,ee||!!he.disabled,te);else if(typeof he!="string"&&B(he))H(he.options,he.label,ee||!!he.disabled,te);else{let ft=An(he);te.push({opt:ft,disabled:ee||!!ft.disabled,group:oe})}},re=[];H(e,void 0,!1,re);let w=new Set;for(let E of re){let oe=String(E.opt.value);w.has(oe)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(E.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),w.add(oe)}let v=new Map(re.map(E=>[E.opt.value,E.opt])),_=S!==void 0&&S!==!1,q=Fe.trim(),X=_&&typeof S!="function"?Va(q):null,Ht=E=>typeof S=="function"?S(E,q):Ha(E,X),rn=typeof S=="function"||_&&!!q?re.filter(E=>Ht(E.opt)):re,qa=_&&!!q,rt=Array.isArray(ye)?ye:ye!=null?[ye]:[],Za=E=>rt.includes(E),tt=rt.map(E=>v.get(E)).filter(Boolean),Nr=re.filter(E=>!E.disabled).map(E=>E.opt.value),Lm=V&&Nr.length>1&&Nr.every(E=>rt.includes(E)),Ei=E=>E.label??String(E.value),Jn="";if(V){let E=tt.length>0?j?.(tt):void 0;if(E!=null&&E!=="")Jn=E;else if(Lm)Jn="All";else if(tt.length===1)Jn=Ei(tt[0]);else if(tt.length>1){let oe=`${tt.length} selected`;Jn=Y?`${oe}: ${tt.map(Ei).join(", ")}`:oe}}else if(ye!=null){let E=v.get(ye);Jn=E?Ei(E):""}let Bm=(E,oe)=>{if(V){if(M&&oe?.altKey){let he=[E.value];de||K(he),ce?.(he,{value:E.value,option:E,selected:!0});return}let ee=rt.includes(E.value),te=ee?rt.filter(he=>he!==E.value):[...rt,E.value];de||K(te),ce?.(te,{value:E.value,option:E,selected:!ee})}else de||K(E.value),ce?.(E.value,{value:E.value,option:E})},$a=V?rn.filter(E=>!E.disabled).map(E=>E.opt.value):[],vc=$a.filter(E=>rt.includes(E)),Lr=$a.length>0&&vc.length===$a.length,Rm=vc.length>0&&!Lr,Fm=()=>{let E=rt.filter(ee=>!$a.includes(ee)),oe=Lr?E:[...E,...$a];de||K(oe),ce?.(oe,{all:!0,selected:!Lr})},Vm=()=>{let E=V?[]:void 0;de||K(E),ce?.(E,{all:!0,selected:!1})},Si=(E,oe)=>{let{className:ee,style:te,...he}=ot(E,!0),ft={value:E.value,selected:Za(E.value),disabled:oe},jt=I?.(E,ft),Mn=R?.(ft),jm=!V&&Te==="none"?{role:"menuitemradio","aria-checked":Za(E.value)?"true":"false"}:void 0,xc=V&&M&&!oe?Rr:void 0,yc=E.tooltip??xc,qm=E.tooltip==null&&xc!=null;return A(Se,{...he,id:`${an}-opt-${E.value}`,selectionIndicator:_e,...jm,indicator:Mn??void 0,label:jt?void 0:ja(E.label??String(E.value),X),hint:jt?void 0:E.hint?ja(E.hint,X):E.hint,icon:jt?void 0:E.icon,tone:E.tone,toneSelected:k,selected:Za(E.value),disabled:oe||void 0,"data-menu-open":V?"":void 0,onSelect:Zm=>Bm(E,Zm),className:ee,style:te,children:[jt,yc&&p(Tt,{follow:!0,...qm?{delay:700}:{},children:yc})]},String(E.value))},Ti=(E,oe)=>{let ee=[];return E.forEach((te,he)=>{if(typeof te!="string"&&It(te)){let jt=oe||!!te.disabled,Mn=Ti(te.submenu,jt);Mn.length&&ee.push(p(Se,{submenu:!0,label:te.label,icon:te.icon,disabled:jt||void 0,"data-menu-open":V?"":void 0,children:p(et,{children:Mn})},`sub-${he}-${te.label}`));return}if(typeof te!="string"&&B(te)){let jt=oe||!!te.disabled,Mn=Ti(te.options,jt);Mn.length&&ee.push(p(Ba,{label:te.label,children:Mn},`grp-${he}-${te.label}`));return}let ft=An(te);typeof S=="function"&&!Ht(ft)||ee.push(Si(ft,oe||!!ft.disabled))}),ee},Hm=()=>{let E=re.filter(ee=>Ht(ee.opt)),oe=[];for(let ee=0;ee<E.length;){let te=E[ee].group;if(te===void 0){oe.push(Si(E[ee].opt,E[ee].disabled)),ee++;continue}let he=[],ft=ee;for(;ee<E.length&&E[ee].group===te;)he.push(Si(E[ee].opt,E[ee].disabled)),ee++;oe.push(p(Ba,{label:te,children:he},`flat-${ft}-${te}`))}return oe};return A(pe,{children:[ae?ae({open:Z,value:ye,selected:tt,disabled:!!y,icon:d}):p(bt,{label:m,hint:h,placeholder:c,value:Jn,readOnly:!0,dimActions:!0,disabled:y,leading:u??(d?p(xe,{shape:d}):void 0),size:b,status:f,statusIcon:g,round:x,role:"combobox","aria-haspopup":"menu","aria-expanded":Z?"true":"false",trailing:p("a-select-chevron",{open:Z?"":void 0,style:fe?{color:fe}:void 0,children:p(xe,{shape:"chevron-down"})}),className:se,style:O,...T}),A(et,{placement:n,offset:a,onStateChange:(E,{next:oe})=>{Ae(oe),oe||(At(""),Mt(null))},onactivedescendant:E=>Mt((E.nativeEvent??E).detail?.id??null),children:[_&&p("a-select-header",{slot:"header","data-menu-open":"",children:p(bt,{"data-menu-search":"",size:"small",value:Fe,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list","aria-activedescendant":Z&&we?we:void 0,onInput:E=>At(E.currentTarget.value)})}),V&&M&&rn.length>0&&A(pe,{children:[p(Se,{selectionIndicator:"checkbox",selected:Lr,indeterminate:Rm,label:N,"data-menu-open":"","data-menu-skip-active":"",onSelect:Fm}),p(Sn,{})]}),rn.length===0?z?.({query:q}):qa?Hm():Ti(e,!1),L&&rt.length>0&&A(pe,{children:[p(Sn,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"x",label:C,"data-menu-open":"",onSelect:Vm})})]})]})]})};var bc=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...bc(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...bc(n.options)):e.push(An(n));return e},Ci=t=>t==null||t===""||Array.isArray(t)&&t.length===0,_m=(t,e)=>Ha(t,Va(e)),gv=t=>{let{facets:e,placement:n,offset:a,value:r,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,toneSelected:m,searchable:h,searchPlaceholder:b="Filter\u2026",clearable:f=!0,clearAllLabel:g="Clear all",renderTrigger:x,className:y,style:k,...S}=t,M=r!==void 0,[N,L]=U(o??{}),C=M?r:N,[I,R]=U(!1),[Y,j]=U({}),[ae,z]=U({});{let w=null,v=Y;for(let _ of e)_.kind==="text"&&ae[_.key]!==C[_.key]&&(w={...w??ae,[_.key]:C[_.key]},v={...v,[_.key]:C[_.key]??""});w&&(z(w),j(v))}let[se,O]=U({}),[T,V]=U(""),[fe,Te]=U({}),_e=w=>v=>{let _=J(v).detail?.id??null;Te(q=>q[w]===_?q:{...q,[w]:_})},ce=e.reduce((w,v)=>w+(Ci(C[v.key])?0:1),0),de=Ye(()=>new Map(e.map(w=>[w.key,w.kind==="single"||w.kind==="multiple"?bc(w.options):[]])),[e]),Oe=(w,v)=>{M||L(w),i?.(w,v)},K=(w,v)=>{let _=Ci(v),q={...C};_?delete q[w.key]:q[w.key]=v,Oe(q,{facet:w.key,kind:w.kind,value:_?void 0:v})},ye=()=>Oe({},{all:!0}),Z=w=>{let v=de.get(w.key)??[];if(!w.filter)return v;let _=se[w.key]??"",q=typeof w.filter=="function"?w.filter:_m;return v.filter(X=>q(X,_))},Ae=w=>w.filter?p("a-select-header",{slot:"header","data-menu-open":"",children:p(bt,{"data-menu-search":"",size:"small",value:se[w.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${w.label}`,"aria-autocomplete":"list","aria-activedescendant":fe[w.key]??void 0,onInput:v=>O(_=>({..._,[w.key]:v.currentTarget.value}))})}):null,Fe=(w,v,_="")=>{let{className:q,style:X,...Ht}=ot(v,!0),qe={...Ht,icon:v.icon,label:v.label??String(v.value),hint:v.hint,tone:v.tone,toneSelected:m,disabled:v.disabled,className:q,style:X,"data-menu-open":""};if(w.kind==="single"){let tt=C[w.key];return p(Se,{...qe,selectionIndicator:"check",selected:tt===v.value,onSelect:()=>K(w,tt===v.value?void 0:v.value)},`${_}${v.value}`)}let rn=C[w.key]??[],qa=w.selectAll!==!1&&!v.disabled,rt=v.tooltip??(qa?Rr:void 0),Za=v.tooltip==null&&qa;return p(Se,{...qe,selectionIndicator:"checkbox",selected:rn.includes(v.value),onSelect:tt=>qa&&tt?.altKey?K(w,[v.value]):K(w,rn.includes(v.value)?rn.filter(Nr=>Nr!==v.value):[...rn,v.value]),children:rt&&p(Tt,{follow:!0,...Za?{delay:700}:{},children:rt})},`${_}${v.value}`)},At=w=>Z(w).map(v=>Fe(w,v)),we=w=>{let v=C[w.key]??[],_=Z(w),q=_.filter(qe=>!qe.disabled).map(qe=>qe.value),X=q.length>0&&q.every(qe=>v.includes(qe)),Ht=q.some(qe=>v.includes(qe));return A(pe,{children:[w.selectAll!==!1&&_.length>0&&A(pe,{children:[p(Se,{selectionIndicator:"checkbox",selected:X,indeterminate:Ht&&!X,label:w.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>K(w,X?v.filter(qe=>!q.includes(qe)):[...new Set([...v,...q])])}),p(Sn,{})]}),_.map(qe=>Fe(w,qe))]})},Mt=()=>e.filter(v=>v.kind==="single"||v.kind==="multiple").map(v=>{let _=typeof v.filter=="function"?v.filter:_m;return{facet:v,matched:(de.get(v.key)??[]).filter(q=>_(q,T))}}).filter(v=>v.matched.length>0).map(({facet:v,matched:_})=>p(Ba,{label:v.label,children:_.map(q=>Fe(v,q,`${v.key}:`))},v.key)),an=w=>{let v=C[w.key]??"",_=Y[w.key]??v,q=()=>{let X=_.trim()===""?void 0:_;X!==(v||void 0)&&K(w,X)};return p("div",{"data-menu-open":"",style:{padding:"4px"},children:p(bt,{size:"small",value:_,placeholder:w.placeholder,"aria-label":w.label,onInput:X=>j(Ht=>({...Ht,[w.key]:X.currentTarget.value})),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),q())},onBlur:q})})},It=w=>p("div",{"data-menu-open":"",children:w.render({value:C[w.key],onChange:v=>K(w,v),close:()=>R(!1)})}),B=w=>{let v=w.kind==="single"||w.kind==="multiple",_=w.kind==="single"?At(w):w.kind==="multiple"?we(w):w.kind==="text"?an(w):It(w),q=!Ci(C[w.key]);return A(et,{onactivedescendant:v&&w.filter?_e(w.key):void 0,children:[v&&Ae(w),_,f&&q&&A(pe,{children:[p(Sn,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"x",label:"Clear","data-menu-open":"",onSelect:()=>K(w,void 0)})})]})]})},H=w=>{let v=C[w.key];if(Ci(v))return null;switch(w.kind){case"single":return(de.get(w.key)??[]).find(q=>q.value===v)?.label??String(v);case"multiple":return String(v.length);case"text":return String(v);case"custom":return w.summary(v)}};return A(pe,{children:[x?x({open:I,value:C,count:ce,disabled:!!u}):p(Ee,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":"menu","aria-expanded":I?"true":"false",className:y,style:k,...S,children:ce>0&&p(fi,{size:"small",priority:"primary",tone:"brand",children:String(ce)})}),A(et,{placement:n,offset:a,open:I,onStateChange:(w,{next:v})=>{R(v),v||V("")},onactivedescendant:h?_e("__root__"):void 0,children:[h&&p("a-select-header",{slot:"header","data-menu-open":"",children:p(bt,{"data-menu-search":"",size:"small",value:T,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list","aria-activedescendant":fe.__root__??void 0,onInput:w=>V(w.currentTarget.value)})}),h&&T.trim()?Mt():e.map(w=>A(Se,{submenu:!0,icon:w.icon,label:w.label,children:[(()=>{let v=H(w);return v!=null?p(fi,{size:"small",tone:"brand",children:p("a-select-faceted-summary",{children:v})}):null})(),B(w)]},w.key)),f&&A(pe,{children:[p(Sn,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"filter-x",label:g,disabled:ce===0,"data-menu-open":"",onSelect:ye})})]})]})]})};var fc=({children:t,options:e,value:n,defaultValue:a,onStateChange:r,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:h,fill:b,noslide:f,round:g,disabled:x,className:y,style:k,id:S,...M})=>{let N=n!==void 0,[L,C]=U(a),I=N?n:L,R=e??[],Y=new Set;for(let O of R)Y.has(O.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(O.value)} \u2014 values must be unique.`),Y.add(O.value);let j=O=>{let{event:T,detail:V}=J(O);V&&(r?.(T,V),!N&&(T.defaultPrevented||C(V.next??void 0)))},ae=o||i?O=>{o?.(O),i?.(O,{value:O.currentTarget?.value??null})}:void 0,z=h==="vertical",se=p("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":z?"vertical":void 0,"aria-disabled":x?"true":void 0,state:N?n:void 0,"default-state":N?void 0:a,priority:d&&d!=="primary"?d:void 0,tone:u&&u!=="neutral"?u:void 0,size:m&&m!=="medium"?m:void 0,orientation:z?"vertical":void 0,fill:b?"":void 0,noslide:f?"":void 0,round:G(g),disabled:x?"":void 0,onstatechange:j,onchange:ae,onfocusin:s,onfocusout:l,class:y,id:S,style:Q(g,"--tabs-round",F(u,"--tabs-tone-source",k)),...M,children:R.map(O=>{let T=x||O.disabled,V=O.value===I,{className:fe,style:Te,..._e}=ot(O);return A("a-tab",{..._e,role:"tab",value:O.value,tone:O.tone||void 0,"aria-disabled":T?"true":void 0,tabIndex:T&&!V?-1:0,disabled:T?"":void 0,round:G(g)??G(O.round),class:fe,style:F(O.tone,"--tabs-tone-source",Te),children:[O.icon&&p("a-icon",{shape:O.icon,"aria-hidden":"true"}),Br(O.label!=null?O.label:O.children,"a-tab-label"),O.iconTrailing&&p("a-icon",{shape:O.iconTrailing,"aria-hidden":"true"}),O.tooltip!=null&&O.tooltip!==""?p(Tt,{truncatedOnly:!0,children:O.tooltip}):null]},O.value)})});return A(pe,{children:[se,t]})};var Om={incomplete:"circle-large",completed:"check",error:"x"},vv=({options:t,value:e,defaultValue:n,onStateChange:a,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:h,fill:b,disabled:f,children:g,className:x,style:y,id:k,...S})=>{let M=e!==void 0,[N,L]=U(n),C=M?e:N??t[0]?.value,I=(T,V)=>{a?.(T,V),!(M||T.defaultPrevented)&&L(V.next??void 0)},R=t.map(T=>{let{className:V,style:fe,...Te}=ot(T),_e=T.tone||void 0,ce=T.disabled?"neutral":T.state==="error"?"critical":_e||d||"neutral",de=u?.(T,{state:T.state,selected:T.value===C,disabled:!!T.disabled}),Oe=T.disabled?p(xe,{shape:Om.incomplete}):T.state==="loading"?p(rc,{tone:ce}):p(xe,{shape:Om[T.state]}),K=de!==void 0?de:T.marker!==void 0?typeof T.marker=="number"?T.marker:p(xe,{shape:T.marker}):Oe;return{...Te,value:T.value,disabled:T.disabled,"data-step-state":T.state,tone:ce,tooltip:A(pe,{children:[T.label,T.hint!=null&&A(pe,{children:[" \u2014 ",T.hint]})]}),className:V,style:fe,children:A(pe,{children:[p("a-step-marker",{"aria-hidden":"true",children:K}),A("a-step-desc",{children:[p("a-tab-label",{children:T.label}),T.hint!=null&&p("a-step-hint",{children:T.hint})]})]})}}),Y=t.findIndex(T=>T.value===C),j=h==="vertical",ae=g!=null&&g!==!1,z=j&&ae,se=(Y>=0?Y:t.length-1)+2,O=z?{...y,"--steps-panel-row":se}:y;return p("a-steps",{class:x,style:O,id:k,...S,"data-orientation":j?"vertical":void 0,children:p(fc,{options:R,value:C,onStateChange:I,onChange:r,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:h,fill:b,priority:c,noslide:!0,disabled:f,"data-steps":"",children:g})})};var xv=({value:t,children:e,hideMode:n,className:a,style:r})=>p("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:a,style:r,children:e});var yv=new Set(["top","right","bottom","left"]),wv=({header:t,footer:e,position:n,closable:a,persistent:r,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...h})=>{let b=i!==void 0,f=typeof o=="string"&&yv.has(o)?o:void 0;return A("a-dialog",{state:b?i?"open":"closed":void 0,"default-state":!b&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:r?"":void 0,round:f??G(o),name:b?void 0:l,onstatechange:c?g=>{let{event:x,detail:y,isOwn:k}=J(g);k&&y&&c(x,{next:y.next==="open",prev:y.prev==="open"})}:void 0,class:d,style:Q(f?void 0:o,"--dialog-round",u),...h,children:[a!==!1&&p("span",{slot:"close",style:{display:"contents"},children:p(Ee,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&p("div",{slot:"header",children:t}),m,e!=null&&p("span",{slot:"footer",style:{display:"contents"},children:e})]})};var kv=({header:t,subtitle:e,icon:n,footer:a,media:r,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:h,rel:b,ping:f,className:g,style:x,children:y,...k})=>{let S=i||void 0,M=Q(u,"--card-round",F(S,"--card-tone-source",x)),N=l==="small"?5:l==="large"?3:4;return A("a-card",{tone:S,priority:s&&s!=="primary"?s:void 0,size:l&&l!=="medium"?l:void 0,"media-position":o&&o!=="top"?o:void 0,selected:c?"":void 0,loading:d?"":void 0,round:G(u),href:m,target:m?h:void 0,rel:m?b:void 0,ping:m?f:void 0,class:g,style:M,...k,children:[r!=null&&p("div",{slot:"media",children:r}),n!=null&&(typeof n=="string"?p("a-card-icon-chip",{slot:"icon",children:p(xe,{shape:n})}):p("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?p(oc,{slot:"header",level:N,tone:S,children:t}):p("div",{slot:"header",children:t})),e!=null&&p(bi,{slot:"header",size:"small",priority:"tertiary",tone:S,children:e}),typeof y=="string"||typeof y=="number"?p(bi,{priority:"secondary",tone:S,size:l,children:y}):y,a!=null&&p("span",{slot:"footer",style:{display:"contents"},children:a})]})};var gc=({message:t,actions:e,tone:n,round:a,closable:r,role:o="status",dismissed:i,defaultDismissed:s,onDismiss:l,className:c,style:d,children:u,...m})=>{let h=i!=null,b=Q(a,"--banner-round",F(n,"--banner-tone-source",d)),f=t==null?null:typeof t=="string"||typeof t=="number"?p("a-banner-message",{slot:"message",children:t}):p("span",{slot:"message",style:{display:"contents"},children:t});return A("a-banner",{state:h?i?"closed":"open":void 0,"default-state":h?void 0:s?"closed":"open",tone:n&&n!=="neutral"?n:void 0,round:G(a),role:o,onstatechange:l?g=>{let{detail:x,isOwn:y}=J(g);y&&x?.next==="closed"&&l()}:void 0,class:c,style:b,...m,children:[f,u,e!=null&&p("span",{slot:"actions",style:{display:"contents"},children:e}),r!==!1&&p("span",{slot:"close",style:{display:"contents"},children:p(Ee,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var Cv=({entry:t,store:e})=>{let n=Ye(()=>t.render(t.id),[t.id,t.rev]),a=typeof Node<"u"&&n instanceof Node,r=typeof n=="string"||typeof n=="number",o={slot:t.placement,duration:t.duration,leaving:t.leaving?"":void 0,rev:t.rev,role:t.politeness==="assertive"?"alert":t.politeness==="polite"?"status":void 0,ondismiss:()=>e.remove(t.id)};return a?p("a-toast",{...o,content:n}):r?p("a-toast",{...o,children:p(gc,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):p("a-toast",{...o,children:n})},Ev=({toaster:t,label:e="Notifications",className:n,style:a,children:r,...o})=>{let i=t??Pm(),s=Sc(i.subscribe,i.getSnapshot,i.getServerSnapshot);return p("a-toaster",{role:"region","aria-label":e,class:n,style:a,...o,children:s.map(l=>p(Cv,{entry:l,store:i},l.id))})},Sv,Pm=()=>Sv??=hi(),Nm=Ev;Object.defineProperty(Nm,"manager",{get:Pm,enumerable:!0});export{Hg as Avatar,gc as Banner,Ee as Button,qg as ButtonCopy,hc as Calendar,kv as Card,Yg as Checkbox,Dn as DEFAULT_CONFIG,wv as Dialog,Xg as Expander,Zg as ICON_SHAPES,$g as ICON_SYNONYMS,xe as Icon,bt as Input,hv as InputAutocomplete,uv as InputDate,mc as InputTime,rc as Loader,et as Menu,Ba as MenuGroup,Se as MenuItem,Kg as MenuItemCopy,Sn as MenuSeparator,jg as Progress,mv as RadioGroup,fv as Select,gv as SelectFaceted,rv as Slider,vv as Steps,Gg as Switch,xv as TabPanel,fc as Tabs,fi as Tag,bi as Text,oc as Title,Nm as Toaster,Tt as Tooltip,Li as avatarToSvg,lc as buildMonth,Tn as clampDate,zi as colorLightness,$m as configure,hi as createToaster,yi as dateFormatPattern,uc as dateTimeFormatPattern,ic as firstDayOfWeek,wi as formatDateInput,dc as formatDateTimeInput,Oi as getInitials,Mm as getWeekdays,Lc as hasFigure,_c as hashSeed,sc as isOutOfRange,Nc as maxChroma,Oc as mulberry32,jr as oklchString,bv as optionsWithSelection,Or as parseDateInput,ki as parseDateTimeInput,Ue as parseISODate,Dm as parseTimeInput,Ni as resolveAvatar,Pc as rngFromSeed,Pr as usesHour12};