@antadesign/anta 0.3.33 → 0.3.35

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 (205) hide show
  1. package/LICENSE.md +14 -1
  2. package/README.md +9 -0
  3. package/dist/anta_helpers.d.ts +46 -30
  4. package/dist/anta_helpers.js +66 -25
  5. package/dist/bundle.css +1 -1
  6. package/dist/bundle.js +2 -1353
  7. package/dist/components/Banner.d.ts +25 -40
  8. package/dist/components/Banner.js +15 -17
  9. package/dist/components/Breadcrumbs.d.ts +0 -1
  10. package/dist/components/Breadcrumbs.js +0 -1
  11. package/dist/components/Button.d.ts +2 -3
  12. package/dist/components/Button.js +1 -0
  13. package/dist/components/ButtonCopy.js +3 -2
  14. package/dist/components/Calendar.js +13 -13
  15. package/dist/components/Card.d.ts +9 -17
  16. package/dist/components/Card.js +50 -46
  17. package/dist/components/Dialog.d.ts +1 -0
  18. package/dist/components/Dialog.js +16 -10
  19. package/dist/components/Expander.d.ts +6 -21
  20. package/dist/components/Expander.js +24 -23
  21. package/dist/components/Icon.d.ts +8 -14
  22. package/dist/components/Input.d.ts +77 -96
  23. package/dist/components/Input.js +23 -27
  24. package/dist/components/InputAutocomplete.d.ts +29 -10
  25. package/dist/components/InputAutocomplete.js +25 -8
  26. package/dist/components/InputDate.d.ts +0 -1
  27. package/dist/components/InputDate.js +2 -3
  28. package/dist/components/InputTime.d.ts +10 -4
  29. package/dist/components/InputTime.js +20 -16
  30. package/dist/components/Loader.d.ts +2 -2
  31. package/dist/components/Menu.d.ts +5 -4
  32. package/dist/components/Menu.js +13 -8
  33. package/dist/components/MenuItem.js +1 -14
  34. package/dist/components/MenuItemCopy.js +2 -2
  35. package/dist/components/Panel.d.ts +3 -1
  36. package/dist/components/Panel.js +17 -11
  37. package/dist/components/Progress.d.ts +21 -23
  38. package/dist/components/Progress.js +13 -9
  39. package/dist/components/RadioGroup.js +6 -8
  40. package/dist/components/{select-parts.css → Select.css} +1 -1
  41. package/dist/components/Select.d.ts +53 -36
  42. package/dist/components/Select.js +53 -98
  43. package/dist/components/SelectFaceted.d.ts +7 -4
  44. package/dist/components/SelectFaceted.js +21 -10
  45. package/dist/components/Slider.d.ts +28 -11
  46. package/dist/components/Slider.js +20 -20
  47. package/dist/components/Steps.css +1 -1
  48. package/dist/components/Steps.d.ts +0 -1
  49. package/dist/components/Steps.js +1 -12
  50. package/dist/components/Tabs.d.ts +17 -20
  51. package/dist/components/Tabs.js +7 -9
  52. package/dist/components/Text.d.ts +55 -36
  53. package/dist/components/Text.js +35 -22
  54. package/dist/components/Title.d.ts +19 -27
  55. package/dist/components/Title.js +2 -1
  56. package/dist/components/Toaster.js +9 -2
  57. package/dist/components/Tooltip.d.ts +10 -15
  58. package/dist/components/copy-props.d.ts +14 -3
  59. package/dist/components/copy-props.js +14 -3
  60. package/dist/components/select-tree.d.ts +24 -0
  61. package/dist/components/select-tree.js +35 -0
  62. package/dist/element-base.d.ts +10 -0
  63. package/dist/element-base.js +15 -0
  64. package/dist/elements/a-avatar.css +1 -1
  65. package/dist/elements/a-avatar.js +2 -28
  66. package/dist/elements/a-banner.css +1 -1
  67. package/dist/elements/a-banner.d.ts +4 -1
  68. package/dist/elements/a-banner.js +22 -112
  69. package/dist/elements/a-breadcrumbs.d.ts +1 -0
  70. package/dist/elements/a-breadcrumbs.js +1 -0
  71. package/dist/elements/a-button.css +1 -1
  72. package/dist/elements/a-button.d.ts +10 -7
  73. package/dist/elements/a-button.js +18 -1
  74. package/dist/elements/a-calendar.d.ts +14 -13
  75. package/dist/elements/a-calendar.js +29 -24
  76. package/dist/elements/a-card.css +1 -1
  77. package/dist/elements/a-card.d.ts +0 -9
  78. package/dist/elements/a-card.js +0 -184
  79. package/dist/elements/a-checkbox.css +1 -1
  80. package/dist/elements/a-copy.css +1 -1
  81. package/dist/elements/a-copy.d.ts +1 -5
  82. package/dist/elements/a-copy.js +129 -108
  83. package/dist/elements/a-dialog.css +1 -1
  84. package/dist/elements/a-dialog.d.ts +1 -1
  85. package/dist/elements/a-dialog.js +68 -194
  86. package/dist/elements/a-expander.css +1 -1
  87. package/dist/elements/a-expander.d.ts +4 -30
  88. package/dist/elements/a-expander.js +85 -344
  89. package/dist/elements/a-icon.d.ts +5 -23
  90. package/dist/elements/a-icon.js +1 -2
  91. package/dist/elements/a-input-date.d.ts +1 -0
  92. package/dist/elements/a-input-date.js +1 -0
  93. package/dist/elements/a-input-time.css +1 -1
  94. package/dist/elements/a-input-time.d.ts +2 -1
  95. package/dist/elements/a-input-time.js +101 -168
  96. package/dist/elements/a-input.css +1 -1
  97. package/dist/elements/a-input.d.ts +10 -8
  98. package/dist/elements/a-input.js +155 -230
  99. package/dist/elements/a-loader.d.ts +5 -8
  100. package/dist/elements/a-loader.js +1 -2
  101. package/dist/elements/a-menu-item.css +1 -1
  102. package/dist/elements/a-menu-item.d.ts +5 -3
  103. package/dist/elements/a-menu-item.js +5 -1
  104. package/dist/elements/a-menu.css +1 -1
  105. package/dist/elements/a-menu.d.ts +5 -7
  106. package/dist/elements/a-menu.js +383 -299
  107. package/dist/elements/a-panel.css +1 -1
  108. package/dist/elements/a-panel.js +19 -37
  109. package/dist/elements/a-progress.css +1 -1
  110. package/dist/elements/a-progress.d.ts +0 -22
  111. package/dist/elements/a-progress.js +0 -100
  112. package/dist/elements/a-radio-group.d.ts +1 -1
  113. package/dist/elements/a-radio-group.js +6 -4
  114. package/dist/elements/a-select-faceted.d.ts +1 -0
  115. package/dist/elements/a-select-faceted.js +1 -0
  116. package/dist/elements/a-select.d.ts +1 -0
  117. package/dist/elements/a-select.js +1 -0
  118. package/dist/elements/a-slider.css +1 -1
  119. package/dist/elements/a-slider.d.ts +11 -3
  120. package/dist/elements/a-slider.js +244 -242
  121. package/dist/elements/a-steps.d.ts +1 -0
  122. package/dist/elements/a-steps.js +1 -0
  123. package/dist/elements/a-switch.css +1 -1
  124. package/dist/elements/a-tab.css +1 -1
  125. package/dist/elements/a-tabpanel.d.ts +2 -2
  126. package/dist/elements/a-tabpanel.js +13 -3
  127. package/dist/elements/a-tabs.css +1 -1
  128. package/dist/elements/a-tabs.d.ts +1 -1
  129. package/dist/elements/a-tabs.js +6 -4
  130. package/dist/elements/a-tag.css +1 -1
  131. package/dist/elements/a-tag.d.ts +1 -0
  132. package/dist/elements/a-tag.js +1 -0
  133. package/dist/elements/a-text.css +1 -1
  134. package/dist/elements/a-text.d.ts +6 -43
  135. package/dist/elements/a-text.js +110 -193
  136. package/dist/elements/a-title.css +1 -1
  137. package/dist/elements/a-title.d.ts +1 -0
  138. package/dist/elements/a-title.js +1 -0
  139. package/dist/elements/a-toast.css +1 -1
  140. package/dist/elements/a-toast.d.ts +10 -45
  141. package/dist/elements/a-toast.js +80 -66
  142. package/dist/elements/a-toaster.css +1 -1
  143. package/dist/elements/a-toaster.js +9 -44
  144. package/dist/elements/a-tooltip.css +1 -1
  145. package/dist/elements/a-tooltip.d.ts +1 -1
  146. package/dist/elements/a-tooltip.js +142 -136
  147. package/dist/elements/copy-behavior.d.ts +1 -1
  148. package/dist/elements/copy-behavior.js +21 -21
  149. package/dist/elements/index.d.ts +9 -3
  150. package/dist/elements/index.js +6 -6
  151. package/dist/elements/input-focus-modality.d.ts +15 -0
  152. package/dist/elements/input-focus-modality.js +44 -0
  153. package/dist/elements/input-trailing-actions.d.ts +5 -0
  154. package/dist/elements/input-trailing-actions.js +38 -0
  155. package/dist/elements/shadow-aria.d.ts +2 -0
  156. package/dist/elements/shadow-aria.js +2 -1
  157. package/dist/elements/value-input.d.ts +3 -0
  158. package/dist/elements/value-input.js +12 -0
  159. package/dist/general_types.d.ts +103 -96
  160. package/dist/index.d.ts +1 -1
  161. package/dist/input-events.d.ts +4 -0
  162. package/dist/input-events.js +15 -0
  163. package/dist/jsx-runtime.d.ts +70 -23
  164. package/dist/jsx-runtime.js +26 -19
  165. package/dist/native-event-props.d.ts +2 -0
  166. package/dist/native-event-props.js +10 -0
  167. package/dist/reset.css +1 -1
  168. package/dist/theme-antithesis.css +10 -1
  169. package/dist/theme-antune.css +1 -1
  170. package/docs/accessibility.md +17 -3
  171. package/docs/changelog.md +384 -2
  172. package/docs/comparison.md +2 -2
  173. package/docs/components/avatar.md +5 -0
  174. package/docs/components/banner.md +117 -187
  175. package/docs/components/breadcrumbs.md +9 -6
  176. package/docs/components/button.md +22 -0
  177. package/docs/components/card.md +74 -28
  178. package/docs/components/checkbox.md +9 -10
  179. package/docs/components/dialog.md +83 -32
  180. package/docs/components/expander.md +198 -435
  181. package/docs/components/icon.md +11 -17
  182. package/docs/components/input-autocomplete.md +152 -52
  183. package/docs/components/input-date.md +175 -148
  184. package/docs/components/input-time.md +81 -38
  185. package/docs/components/input.md +343 -349
  186. package/docs/components/loader.md +2 -1
  187. package/docs/components/menu.md +35 -6
  188. package/docs/components/panel.md +18 -0
  189. package/docs/components/progress.md +83 -49
  190. package/docs/components/radio.md +39 -43
  191. package/docs/components/select-faceted.md +54 -7
  192. package/docs/components/select.md +390 -386
  193. package/docs/components/slider.md +136 -19
  194. package/docs/components/steps.md +6 -3
  195. package/docs/components/switch.md +8 -9
  196. package/docs/components/tabs.md +110 -104
  197. package/docs/components/text.md +110 -86
  198. package/docs/components/title.md +47 -33
  199. package/docs/components/toaster.md +242 -84
  200. package/docs/components/tooltip.md +204 -113
  201. package/docs/install-config.md +461 -96
  202. package/docs/packages/plot.md +228 -143
  203. package/docs/theming.md +29 -13
  204. package/package.json +43 -4
  205. package/theme-antithesis-license.md +66 -0
package/dist/bundle.js CHANGED
@@ -1,1356 +1,5 @@
1
- import pn from"react";var sa=pn.createElement,me=pn.Fragment,Kd=pn.useState,Xd=pn.useId,Jd=pn.useMemo,kv=pn.useRef,Ev=pn.useLayoutEffect,Qd=pn.useSyncExternalStore;function Cv(t,e,n){sa=t,e!==void 0&&(me=e),n?.useState&&(Kd=n.useState),n?.useId&&(Xd=n.useId),n?.useMemo&&(Jd=n.useMemo),n?.useRef&&(kv=n.useRef),n?.useLayoutEffect&&(Ev=n.useLayoutEffect),n?.useSyncExternalStore&&(Qd=n.useSyncExternalStore)}function W(t){return Kd(t)}function Ss(){return Xd()}function Ge(t,e){return Jd(t,e)}function eu(t,e,n){return Qd(t,e,n)}function p(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,r):sa(t,o)}function S(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,...r):sa(t,o)}function tu(t){return Array.isArray(t)?t.length>0:t!=null}function ht(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function fo(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:p(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:p(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function oe(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function Vn(t){if(t)return e=>{let{event:n,detail:r}=oe(e);r!=null&&t(n,r)}}function fr(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}function bo(t){let e=typeof t=="number"?t:t?1:void 0;return e!=null&&e>=1?e:void 0}var Av=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Tab"]);function Ye(t){return Av.has(t.key)&&(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey&&t.key!=="Tab")}var Sv=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),go=Sv?"\u2325+Click to select only this":"Alt+Click to select only this",vo=700;function Kt(t){return t==="open"?"open":"closed"}function xo(t,e,n){t.addEventListener("click",r=>{let a=r.target;if(!(a instanceof Element))return;let o=a.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Tv=new Set(["brand","neutral","info","success","warning","critical"]);function Q(t){return t&&t!=="neutral"?t:void 0}function F(t,e,n){return t!=null&&!Tv.has(t)?{...n,[e]:t}:n}function br(t){return typeof t=="number"?`${t}px`:t||void 0}function nt(t,e,n){let r=br(t);return r?{...n,[e]:r}:n}function te(t,e,n){return nt(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function X(t){return t||t===0?"":void 0}var Mv=2e3;function yo(t,e,n){let[r,a]=W("idle"),o=Ge(()=>({timer:void 0}),[]);return{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),Mv),n?.(c)}}}function _t(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Ts=null;function nu(t){Ts=t}function ru(){return Ts?.isOpen()??!1}function au(t){return Ts?.contains(t)??!1}var Xt=Symbol("anta.sync-popup-aria");function Ms(t){return t!=null&&typeof t[Xt]=="function"}var Iv=typeof HTMLElement<"u"?HTMLElement:class{},z=class extends Iv{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};function la(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var mr=class extends z{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")}applyAccessibilityRelations(e,n){la(this.internals,e,n)}};function su(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 lu(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 cu=t=>lu(su(t));function Bs(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var Dv=.4;function Ov(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-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 Pv(t,e,n){let[r,a,o]=Ov(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function du(t,e){let n=0,r=Dv;for(let a=0;a<18;a++){let o=(n+r)/2;Pv(t,o,e)?n=o:r=o}return n}var St=(t,e=3)=>Math.round(t*10**e)/10**e;function wo(t,e,n){let r=Math.min(e,du(t,n));return`oklch(${St(t)} ${St(r)} ${St((n%360+360)%360,1)})`}function Ps(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 r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var mn={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}},ca={x:[-15,15],y:[-14,4],off:[0,0]},Is={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)"}},jn={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},Hn=(t,e,n)=>e+(n-e)*t,Ls=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function fn(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?Ls(t(),e.values):r==="range"?Hn(t(),e?.min??n.range[0],e?.max??n.range[1]):Hn(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function zv(t,e){let n=e?.mode??"off";if(n==="off")return ca.off;if(n==="list"&&e?.values?.length)return Ls(t(),e.values);let r=n==="range"?e?.x??ca.x:ca.x,a=n==="range"?e?.y??ca.y:ca.y;return[Hn(t(),r[0],r[1]),Hn(t(),a[0],a[1])]}function Ds(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:Ps(n.off)};if(a==="list"&&e?.values?.length){let u=Ls(t(),e.values);return{color:u,l:Ps(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=Hn(t(),o[0],o[1]),c=Hn(t(),i[0],i[1]),d=r??Hn(t(),s[0],s[1]);return{color:wo(l,c,d),l}}var xr=100,Os=xr/2,vr=40,zs=74,Bv=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function uu(t){return Bv.some(e=>(t[e]?.mode??jn[e].mode)!=="off")}function Rs(t,e){let n={...jn,...t},r=cu(e),a=Ds(r,n.bgColor,Is.bgColor),o=hu(a.color),i=Ds(r,n.headColor,Is.headColor,n.harmony?o:void 0),s=Ds(r,n.bodyColor,Is.bodyColor,n.harmony?o:void 0),l=fn(r,n.figureScale,mn.figureScale),c=zv(r,n.figureTranslate),d=fn(r,n.figureAngle,mn.figureAngle),u=fn(r,n.headAngle,mn.headAngle),m=fn(r,n.bodyAngle,mn.bodyAngle),h=fn(r,n.figureGap,mn.figureGap),f=fn(r,n.headRadiusTop,mn.headRadiusTop),b=fn(r,n.headRadiusBottom,mn.headRadiusBottom),g=fn(r,n.bodyBorderRadius,mn.bodyBorderRadius),v=vr/2,x=zs/2,w=xr/Math.min(1,l),I=f,C=Math.max(f,b),B=Math.min(I,1)*v,L=Math.min(C,1)*v,D=Math.max(0,I-1)*v,T=Math.max(0,C-1)*v;return{figure:uu(t),bg:a.color,bgLightness:a.l,initialsColor:Lv(a.color,a.l),scale:l,translate:c,angle:d,gap:h*(vr+D+T),head:{color:i.color,radiusTop:B,radiusBottom:L,extendTop:D,extendBottom:T,angle:u},body:{color:s.color,radius:g*x,height:w,angle:m}}}function Lv(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?hu(t):0;return e>.5?wo(.35,n?.06:0,r):wo(.95,n?.04:0,r)}function hu(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var gr=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Ns(t,e={}){let n=gr(t.bg),r=e.title?`<title>${gr(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${xr}" height="${xr}" fill="${n}"/>`;if(!t.figure){let v=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="${Rv(e.initials.length)}" fill="var(--avatar-initials-color, ${gr(t.initialsColor)})">${gr(e.initials)}</text>`:"";return iu(r+a+v)}let[o,i]=t.translate,s=`translate(${St(o,2)} ${St(i,2)}) rotate(${St(t.angle,2)} 50 50) translate(50 50) scale(${St(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Os-vr/2-l,u=vr+l+c,m=ou(Os-vr/2,d,vr,u,t.head.radiusTop,t.head.radiusBottom),h=`<g transform="rotate(${St(t.head.angle,2)} 50 50)"><path d="${m}" fill="${gr(t.head.color)}"/></g>`,f=d+u+t.gap,b=ou(Os-zs/2,f,zs,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${St(t.body.angle,2)} 50 ${St(f,2)})"><path d="${b}" fill="${gr(t.body.color)}"/></g>`;return iu(`${r}${a}<g transform="${s}">${g}${h}</g>`)}function ou(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>St(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+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var iu=t=>`<svg viewBox="0 0 ${xr} ${xr}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,Rv=t=>t>=3?30:t===2?38:46;var ko=class extends z{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Nv,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()}#o(){let e=this.getAttribute("config");if(!e)return jn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:jn}catch{return jn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,r=this.getAttribute("src");if(r){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=r,l.alt=n??"",l.loading="lazy",this.#n(l);return}let a=this.getAttribute("seed")??n??"",o=Rs(this.#o(),a),i=document.createElement("template");i.innerHTML=Ns(o,{initials:Bs(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},Nv=`
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 pu(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",ko)}pu();var Eo=class extends z{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 r=document.createElement("slot");e.append(n,this.indicator,r)}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),r=Number(this.getAttribute("max")??100),a=Number.isFinite(n)&&Number.isFinite(r)&&r>0?Math.min(100,Math.max(0,n/r*100)):0;this.indicator.style.setProperty("--_percent",`${a}%`)}};function mu(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",Eo)}mu();var Co=class extends z{};function fu(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",Co)}fu();var _v=`
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
- font-variation-settings: inherit;
123
- display: none;
124
- position: absolute;
125
- z-index: 1;
126
- opacity: 0;
127
- transition: opacity 150ms ease-out, color 150ms ease-out;
128
- }
129
- .expand-btn:hover {
130
- color: var(--text-1);
131
- }
132
- .expand-btn::before {
133
- content: '';
134
- position: absolute;
135
- right: -1px;
136
- bottom: -1px;
137
- width: 14px;
138
- height: 14px;
139
- background-color: currentColor;
140
- -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");
141
- 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");
142
- -webkit-mask-position: center;
143
- mask-position: center;
144
- -webkit-mask-repeat: no-repeat;
145
- mask-repeat: no-repeat;
146
- -webkit-mask-size: contain;
147
- mask-size: contain;
148
- transition: transform 150ms ease-out;
149
- }
150
-
151
- :host([truncate][expandable]) slot.overflowing ~ .expand-btn {
152
- display: block;
153
- left: 0;
154
- right: 0;
155
- bottom: 0;
156
- height: 1.5em;
157
- }
158
-
159
- :host([truncate="1"][expandable]) slot.overflowing ~ .expand-btn {
160
- left: auto;
161
- top: 0;
162
- bottom: 0;
163
- width: 3em;
164
- }
165
-
166
- :host([truncate][expandable]:hover) slot.overflowing ~ .expand-btn,
167
- :host([truncate][expandable]:focus-within) slot.overflowing ~ .expand-btn,
168
- .expand-btn.expanded {
169
- opacity: 1;
170
- }
171
-
172
- .expand-btn.expanded::before {
173
- transform: rotate(180deg);
174
- }
175
- `,Ao=class extends z{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=_v,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,r){n!==r&&((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 bu(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Ao)}bu();var _s=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function da(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=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(),a=void 0,o=null},f=()=>{l()},b=function(...g){if(n?.aborted)return;a=this,o=g;let v=d==null;u(),i&&v&&l()};return b.schedule=u,b.cancel=h,b.flush=f,n?.addEventListener("abort",h,{once:!0}),b}function gu(){}function Fs(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=da(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}function Vs(t){return typeof _s.Buffer<"u"&&_s.Buffer.isBuffer(t)}function Hs(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function js(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var vu="[object RegExp]",xu="[object String]",yu="[object Number]",wu="[object Boolean]";var ku="[object Symbol]",Eu="[object Date]",Cu="[object Map]",Au="[object Set]",Su="[object Array]",Tu="[object Function]",Mu="[object ArrayBuffer]",So="[object Object]",Iu="[object Error]",Du="[object DataView]",Ou="[object Uint8Array]",Pu="[object Uint8ClampedArray]",zu="[object Uint16Array]",Bu="[object Uint32Array]",Lu="[object BigUint64Array]",Ru="[object Int8Array]",Nu="[object Int16Array]",_u="[object Int32Array]",Fu="[object BigInt64Array]",Vu="[object Float32Array]",Hu="[object Float64Array]";function qs(t){if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function ju(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function qu(t,e,n){return ua(t,e,void 0,void 0,void 0,void 0,n)}function ua(t,e,n,r,a,o,i){let s=i(t,e,n,r,a,o);if(s!==void 0)return s;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return ha(t,e,o,i)}return ha(t,e,o,i)}function ha(t,e,n,r){if(Object.is(t,e))return!0;let a=js(t),o=js(e);if(a==="[object Arguments]"&&(a=So),o==="[object Arguments]"&&(o=So),a!==o)return!1;switch(a){case xu:return t.toString()===e.toString();case yu:return ju(t.valueOf(),e.valueOf());case wu:case Eu:case ku:return Object.is(t.valueOf(),e.valueOf());case vu:return t.source===e.source&&t.flags===e.flags;case Tu:return t===e}n=n??new Map;let i=n.get(t),s=n.get(e);if(i!=null&&s!=null)return i===e;n.set(t,e),n.set(e,t);try{switch(a){case Cu:if(t.size!==e.size)return!1;for(let[l,c]of t.entries())if(!e.has(l)||!ua(c,e.get(l),l,t,e,n,r))return!1;return!0;case Au:{if(t.size!==e.size)return!1;let l=Array.from(t.values()),c=Array.from(e.values());for(let d=0;d<l.length;d++){let u=l[d],m=c.findIndex(h=>ua(u,h,void 0,t,e,n,r));if(m===-1)return!1;c.splice(m,1)}return!0}case Su:case Ou:case Pu:case zu:case Bu:case Lu:case Ru:case Nu:case _u:case Fu:case Vu:case Hu:if(Vs(t)!==Vs(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!ua(t[l],e[l],l,t,e,n,r))return!1;return!0;case Mu:return t.byteLength!==e.byteLength?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Du:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:ha(new Uint8Array(t),new Uint8Array(e),n,r);case Iu:return t.name===e.name&&t.message===e.message;case So:{if(!(ha(t.constructor,e.constructor,n,r)||qs(t)&&qs(e)))return!1;let l=[...Object.keys(t),...Hs(t)],c=[...Object.keys(e),...Hs(e)];if(l.length!==c.length)return!1;for(let d=0;d<l.length;d++){let u=l[d],m=t[u];if(!Object.hasOwn(e,u))return!1;let h=e[u];if(!ua(m,h,u,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function To(t,e){return qu(t,e,gu)}var pa={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},Fv=new Set(Object.values(pa).flat());function Mo(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of Fv)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(pa,i))for(let s of pa[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...pa.scroll,...pa.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var Io=new WeakMap,Vv=140,Hv=/(?:^|\s)(?:dark|light)(?:\s|$)/;function jv(t){return t.classList.contains("dark")||t.classList.contains("light")}var Us=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#o=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#a=e.matchMedia("(hover: hover)"),this.#l=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#u=[this.#n,this.#o,this.#r,this.#a,this.#l],this.#p=Wv(e.navigator)}view;doc;#e=new Set;#t=new Set;#n;#o;#r;#a;#l;#u;#i;#h;#f;#b=0;#p;subscribeContext(e){this.#e.size===0&&this.#s(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#A(),this.#v())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#h??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#h.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#h?.unobserve(e),this.#t.size===0&&(this.#h?.disconnect(),this.#h=void 0),this.#v())}snapshot(){return{globalMode:Zu(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#p,pointer:this.#o.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#a.matches,reducedMotion:this.#l.matches,devicePixelRatio:this.view.devicePixelRatio}}#m(){this.#f?.removeEventListener("change",this.#c),this.#f=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#f.addEventListener("change",this.#c,{once:!0}),this.#b=this.view.devicePixelRatio}#c=()=>{this.view.devicePixelRatio!==this.#b&&(this.#m(),this.#S())};#s(){for(let n of this.#u)n.addEventListener("change",this.#S);this.#m(),this.view.addEventListener("resize",this.#c,{passive:!0});let e=this.doc.documentElement;e&&(this.#i=new this.view.MutationObserver(this.#x),this.#i.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#A(){for(let e of this.#u)e.removeEventListener("change",this.#S);this.#f?.removeEventListener("change",this.#c),this.#f=void 0,this.view.removeEventListener("resize",this.#c),this.#i?.disconnect(),this.#i=void 0}#v(){this.#e.size>0||this.#t.size>0||Io.get(this.view)===this&&Io.delete(this.view)}#x=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!jv(a)&&!Hv.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#S=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function Uu(t,e){let n=Io.get(t);return n||(n=new Us(t,e),Io.set(t,n)),n}function Zu(t){return t?.classList.contains("dark")?"dark":"light"}function qv(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return Zu(t.ownerDocument.documentElement)}var Uv={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},Yv={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function Wv(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(Yv[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(Uv[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function Zv(t,e){return t!==void 0&&Object.keys(e).every(n=>To(t[n],e[n]))}function Yu(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!To(t[n],r))):{...e}}function bn(t){return parseFloat(t)||0}function $v(t){return{paddingTop:bn(t.paddingTop),paddingRight:bn(t.paddingRight),paddingBottom:bn(t.paddingBottom),paddingLeft:bn(t.paddingLeft),borderTop:bn(t.borderTopWidth),borderRight:bn(t.borderRightWidth),borderBottom:bn(t.borderBottomWidth),borderLeft:bn(t.borderLeftWidth)}}function Wu(t){return t==="normal"?"0px":t}function Gv(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:Wu(t.letterSpacing),wordSpacing:Wu(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function gn(t){return Math.round(t*100)/100}var Do=class extends z{static observedAttributes=["fade","observe","observe-offscreen","throttle"];#e=this.attachInternals?.();#t;#n;#o;#r;#a;#l=!1;#u;#i=new Set;#h=!1;#f=!1;#b;#p;#m;#c;#s=!1;#A=!1;#v=new Set;#x=!1;#S;#y=!1;#T=!1;connectedCallback(){this.#t=Uu(this.view,this.doc),this.#d()}disconnectedCallback(){this.#F(),this.#B(),this.#D(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#S=void 0}attributeChangedCallback(e,n,r){n!==r&&(e==="fade"&&r===null&&this.#F(),this.#t&&((e==="fade"||e==="observe"||e==="observe-offscreen")&&this.#d(),e==="throttle"&&this.#L(),(e==="observe"||e==="throttle")&&this.#k()))}get measurement(){return this.#N()}get context(){return this.#Z()}get isTruncated(){let e=this.#N(!1);return e.clippedX||e.clippedY}contextStoreDidChange(){this.#P(),this.#k()}visibilityDidChange(e){this.#S!==e&&(this.#S=e,this.#d())}#d(){let{fields:e,context:n,content:r,scroll:a}=Mo(this.getAttribute("observe"));(e.size!==this.#i.size||[...e].some(l=>!this.#i.has(l)))&&(this.#y=!0,this.#L()),this.#i=e,this.#h=this.hasAttribute("fade")||r,this.#f=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0,i=this.hasAttribute("observe-offscreen");this.isConnected&&o&&(i||(this.#S??this.hasAttribute("fade")))?this.#E():this.#B(),this.#s&&this.#O(),this.isConnected&&o&&!i?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#w():this.#D(),this.#g()}#g(){let e=this.#s||this.#x;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#I),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#I=()=>{this.#k(),this.#P()};#E(){this.#s||(this.#s=!0,this.#L(),this.#n=new this.view.ResizeObserver(this.#k),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#k),this.#u=this.#N(!1),this.#q(this.#u),this.#M(),this.#y=!0,this.#k())}#O(){this.#h&&!this.#o?(this.#o=new this.view.MutationObserver(this.#k),this.#o.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#k),this.addEventListener("load",this.#k,!0)):!this.#h&&this.#o&&(this.#o.disconnect(),this.#o=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("load",this.#k,!0)),this.#f?this.addEventListener("scroll",this.#k,{passive:!0}):this.removeEventListener("scroll",this.#k),this.#M()}#M(){if(!this.#h||!this.#A||!this.#s){for(let n of this.#v)this.#n?.unobserve(n);this.#v.clear();return}let e=new Set(this.children);for(let n of this.#v)e.has(n)||(this.#n?.unobserve(n),this.#v.delete(n));for(let n of e)this.#v.has(n)||(this.#n?.observe(n),this.#v.add(n))}#B(){this.#s&&(this.#s=!1,this.#v.clear(),this.#n?.disconnect(),this.#n=void 0,this.#o?.disconnect(),this.#o=void 0,this.#a!=null&&this.view.cancelAnimationFrame(this.#a),this.#a=void 0,this.#p?.cancel(),this.#p=void 0,this.removeEventListener("input",this.#k),this.removeEventListener("scroll",this.#k),this.removeEventListener("load",this.#k,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#k))}#w(){this.#x||(this.#x=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#P),this.addEventListener("focusout",this.#V),this.doc.fonts?.addEventListener("loadingdone",this.#P),this.#T=!0,this.#P())}#D(){this.#x&&(this.#x=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#P),this.removeEventListener("focusout",this.#V),this.doc.fonts?.removeEventListener("loadingdone",this.#P))}#V=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#P()};#k=()=>{!this.#s||this.#a!=null||(this.#a=this.view.requestAnimationFrame(()=>{this.#a=void 0,this.#s&&(this.#p?this.#p():this.#R())}))};#P=()=>{!this.#x||this.#l||(this.#l=!0,queueMicrotask(()=>{if(this.#l=!1,!this.#x)return;let e=this.#T;this.#T=!1,this.#H(e)}))};#j(e){let n=[],r=this.getAttribute("include-rects-for");if(r)try{let a=e??this.getBoundingClientRect();n=Array.from(this.querySelectorAll(r),o=>{let i=o.getBoundingClientRect();return{top:gn(i.top-a.top),right:gn(i.right-a.left),bottom:gn(i.bottom-a.top),left:gn(i.left-a.left),width:gn(i.width),height:gn(i.height)}})}catch(a){if(!(a instanceof this.view.DOMException)||a.name!=="SyntaxError")throw a}return n}#N(e=!0){let n=this.getBoundingClientRect(),r=this.clientWidth,a=this.clientHeight,o=this.scrollWidth,i=this.scrollHeight,s=r>0||a>0,l=s&&o>r+1,c=s&&i>a+1,d=this.view.getComputedStyle(this);this.#A=d.overflowX!=="visible"||d.overflowY!=="visible";let u=l&&d.overflowX!=="visible",m=c&&d.overflowY!=="visible",h=l&&(d.overflowX==="auto"||d.overflowX==="scroll"),f=c&&(d.overflowY==="auto"||d.overflowY==="scroll"),b=Math.round(this.scrollLeft),g=Math.round(this.scrollTop),v=Math.max(0,d.direction==="rtl"?-b:b),x=Math.max(0,g);return{width:gn(n.width),height:gn(n.height),rects:e?this.#j(n):[],clientWidth:r,clientHeight:a,scrollWidth:o,scrollHeight:i,overflowX:l,overflowY:c,clippedX:u,clippedY:m,scrollableX:h,scrollableY:f,scrollLeft:b,scrollTop:g,hiddenStartX:u&&v>1,hiddenEndX:u&&v<o-r-1,hiddenStartY:m&&x>1,hiddenEndY:m&&x<i-a-1}}#Z(){let e=(this.#t??Uu(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:qv(this),focusWithin:this.matches(":focus-within"),font:Gv(n),inset:$v(n),backgroundColor:n.backgroundColor}}#L(){this.#p?.cancel(),this.#p=void 0;let e=Number(this.getAttribute("throttle"));this.#s&&Number.isFinite(e)&&e>0&&(this.#p=Fs(()=>this.#R(),Math.min(e,2147483647)))}#_(e){if(this.#i.size===0)return!1;let n=this.#b;if(!n||this.#y)return!0;for(let r of this.#i)if(n[r]!==e[r])return!0;return!1}#R(){let e=this.#N(!1);if(this.#u=e,this.#q(e),this.#M(),!this.#_(e))return;let n={...e,rects:this.#j()},r=this.#y,a=this.#b;this.#y=!1,this.#b=n;let o={changed:Yu(r?void 0:a,n),current:n};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:o}))}#H(e){let n=this.#Z(),r=this.#c;if(this.#c=n,!e&&Zv(r,n))return;let a={changed:e?{...n}:Yu(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#q(e){this.#C("overflow-x",e.overflowX),this.#C("overflow-y",e.overflowY),this.#C("clipped-x",e.clippedX),this.#C("clipped-y",e.clippedY),this.#C("scrollable-x",e.scrollableX),this.#C("scrollable-y",e.scrollableY),this.#C("hidden-start-x",e.hiddenStartX),this.#C("hidden-end-x",e.hiddenEndX),this.#C("hidden-start-y",e.hiddenStartY),this.#C("hidden-end-y",e.hiddenEndY),this.#U(e)}#U(e){if((e.hiddenStartX||e.hiddenEndX||e.hiddenStartY||e.hiddenEndY)&&this.hasAttribute("fade")){this.#m!==void 0&&this.view.clearTimeout(this.#m),this.#m=void 0,this.#C("fade-mask-active",!0);return}if(!this.hasAttribute("fade")){this.#F();return}if(!(!this.#e?.states?.has("fade-mask-active")||this.#m!==void 0)){if(this.view.matchMedia("(prefers-reduced-motion: reduce)").matches){this.#F();return}this.#m=this.view.setTimeout(()=>this.#F(),Vv)}}#F(){this.#m!==void 0&&this.view.clearTimeout(this.#m),this.#m=void 0,this.#C("fade-mask-active",!1)}#C(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function $u(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",Do)}$u();var nh=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],pt=new WeakMap,mt=new WeakMap,rh={up:1,down:2,left:4,right:8},Gs={mouse:1,pen:2,touch:4},Kv='textarea, select, input[type="number"], input[type="range"], a-menu',Gu=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function Oo(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function yr(t,e,n,r=0){return Math.max(r,fr(t.getAttribute(e)?.trim()??null,n))}function ah(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function Xv(t){if(!t.hasAttribute("wheel-capture"))return;let e=Oo(t.getAttribute("wheel-capture"),rh,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:ah(t,"wheel-modifier","none"),delay:yr(t,"wheel-delay",150),tolerance:yr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function Jv(t){if(!t.hasAttribute("pointer-capture"))return;let e=Oo(t.getAttribute("pointer-capture"),Gs,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:yr(t,"pointer-threshold",0),modifier:ah(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function Qv(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=Oo(t.getAttribute("pan-pointer-types"),Gs,4);if(n)return{types:n,axis:e||"both",threshold:yr(t,"pan-threshold",3),directions:Oo(t.getAttribute("pan-directions"),rh,15),inertia:t.hasAttribute("pan-inertia"),tau:yr(t,"pan-time-constant",325,1),minVelocity:yr(t,"pan-min-velocity",.02,.001)}}function e0(t){let e=t.ownerDocument,n=mt.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},mt.set(e,n),r.addEventListener("blur",wh),e.addEventListener("visibilitychange",kh),n}function Ks(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=pt.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=Xv(t),a=Jv(t),o=Qv(t);if(!r&&!a&&!o){Xs(t,"disabled");return}n||(n={surface:t,store:e0(t)},pt.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",Zs,{passive:!1}):t.removeEventListener("wheel",Zs)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",ch),t.addEventListener("lostpointercapture",uh),t.addEventListener("click",vh,!0),t.addEventListener("dragstart",xh)):oh(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&Un(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&qn(n.momentum,"disabled"),ih(n.store)}function Xs(t,e="disconnected"){let n=pt.get(t);if(!n)return;pt.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",Zs),oh(t),n.session&&Un(n.session,null,e),n.momentum&&qn(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),ih(r),!r.states.size&&(r.view.removeEventListener("blur",wh),r.doc.removeEventListener("visibilitychange",kh),mt.get(r.doc)===r&&mt.delete(r.doc))}function oh(t){t.removeEventListener("pointerdown",ch),t.removeEventListener("lostpointercapture",uh),t.removeEventListener("click",vh,!0),t.removeEventListener("dragstart",xh)}function Js(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function ih(t){let e=Array.from(t.states).some(n=>Js(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",Ku,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",Xu,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",Ju,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",Ku,!0),t.doc.removeEventListener("pointerout",Xu,!0),t.doc.removeEventListener("wheel",Ju,!0),t.dwell.clear()))}function Ku(t){let e=mt.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!ma(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=pt.get(r),o=a?.wheel;if(!a||!o||!Js(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function Xu(t){t.pointerType!=="touch"&&t.relatedTarget===null&&mt.get(this)?.dwell.clear()}function Ju(t){let e=mt.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function sh(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function Ys(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function Ws(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function ma(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function lh(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function Qs(t){return{...lh(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function el(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function Zs(t){let e=pt.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!sh(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!Ws(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!Js(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(Ys(this,t,Kv))return;let l=ma(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...lh(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&qn(e.momentum,"interrupted"),el(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function Po(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function ch(t){let e=pt.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&qn(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=Gs[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&sh(t,r.modifier)&&!Ys(this,t,r.interactive?"":Gu),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!Ys(this,t,Gu);if(!a&&!o)return;let i=Qs(t),s=Po(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...ma(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),dh(e.store),fh(l,t,!0)}function dh(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",Qu,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",eh,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",th,!0)):(t.doc.removeEventListener("pointermove",Qu,!0),t.doc.removeEventListener("pointerup",eh,!0),t.doc.removeEventListener("pointercancel",th,!0)))}function Qu(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&fh(e,t)}function eh(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t)}function th(t){let e=mt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t,"pointer-cancel")}function uh(t){let e=pt.get(this)?.session;e?.id===t.pointerId&&e.captured&&Un(e,t,"lost-capture")}function hh(t){t.cancelable&&t.preventDefault()}function ph(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(Po(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function mh(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function wr(t,e,n){return{x:t.axis!=="y"&&Ws(t.directions,e,!0)?e:0,y:t.axis!=="x"&&Ws(t.directions,n,!1)?n:0}}function fh(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{Un(t,e,"lost-capture");return}t.captured=!0}hh(e)}if(t.current=Qs(e),n&&(t.start.pointerEvent=t.current),n||ph(t,e),!(s&&(t.pointerStarted=!0,$s(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,vn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&($s(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=wr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=mh(t,e.timeStamp),m=wr(r.pan,u.x,u.y);t.panLast=Po(e),vn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:m.x,velocityY:m.y})}}function $s(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=Po(a),el(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:bh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function vn(t,e,n,r){let a=n??t.current;el(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:bh(t),...ma(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function bh(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function Un(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),dh(r.store),e&&(t.captured&&!n&&hh(e),ph(t,e),t.current=Qs(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&$s(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||pt.get(r.surface)!==r||!r.pan){vn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=wr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=mh(t,t.current.timeStamp),i=wr(r.pan,o.x,o.y);vn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(pt.get(r.surface)!==r||!s||r.session){vn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),gh(r.store)}else vn(t,"end",t.current)}function gh(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>t0(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function t0(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){qn(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=wr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=wr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&vn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&qn(n)}gh(t)}function qn(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),vn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function vh(t){let e=pt.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function xh(t){pt.get(this)?.session&&t.preventDefault()}function yh(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))Un(e,null,"blur");for(let e of Array.from(t.momenta))qn(e,"blur")}function wh(){let t=mt.get(this.document);t&&yh(t)}function kh(){let t=mt.get(this);t&&this.hidden&&yh(t)}var zo=class extends z{static observedAttributes=nh;connectedCallback(){Ks(this)}disconnectedCallback(){Xs(this)}attributeChangedCallback(e){Ks(this,e)}};function Eh(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",zo)}Eh();var Sh=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tl=Sh.join(","),Th=typeof Element>"u",kr=Th?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bo=!Th&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Lo=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Lo(e.parentNode));return i},n0=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},r0=function(e,n,r){if(Lo(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(tl));return n&&kr.call(e,tl)&&a.unshift(e),a=a.filter(r),a},nl=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!Lo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=nl(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=kr.call(i,tl);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!Lo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&m){var h=nl(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,h):a.push({scopeParent:i,candidates:h})}else o.unshift.apply(o,i.children)}}return a},Mh=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ih=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||n0(e))&&!Mh(e)?0:e.tabIndex},a0=function(e,n){var r=Ih(e);return r<0&&n&&!Mh(e)?0:r},o0=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Dh=function(e){return e.tagName==="INPUT"},i0=function(e){return Dh(e)&&e.type==="hidden"},s0=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},l0=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},c0=function(e){if(!e.name)return!0;var n=e.form||Bo(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=l0(a,e.form);return!o||o===e},d0=function(e){return Dh(e)&&e.type==="radio"},u0=function(e){return d0(e)&&!c0(e)},h0=function(e){var n,r=e&&Bo(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=Bo(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},Ch=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},p0=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=kr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(kr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,m=Bo(e);if(u&&!u.shadowRoot&&a(u)===!0)return Ch(e);e.assignedSlot?e=e.assignedSlot:!u&&m!==e.ownerDocument?e=m.host:e=u}e=d}if(h0(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ch(e);return!1},m0=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return kr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},Oh=function(e,n){return!(n.disabled||i0(n)||p0(n,e)||s0(n)||m0(n))},Ah=function(e,n){return!(u0(n)||Ih(n)<0||!Oh(e,n))},f0=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ph=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=a0(s,i),c=i?Ph(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(o0).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},zh=function(e,n){n=n||{};var r;return n.getShadowRoot?r=nl([e],n.includeContainer,{filter:Ah.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:f0}):r=r0(e,n.includeContainer,Ah.bind(null,n)),Ph(r)};var b0=Sh.concat("iframe:not([inert]):not([inert] *)").join(","),Bh=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return kr.call(e,b0)===!1?!1:Oh(n,e)};var Lh={getShadowRoot:!0};function Jt(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function rl(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function fa(t,e){for(;e;){if(e===t)return!0;e=rl(e)}return!1}function ba(t){return!!t&&"focus"in t&&Bh(t,Lh)}function ga(t){return zh(t,Lh)}function Ro(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var Rh=new WeakMap,No=class{#e;#t;#n;#o=null;#r=null;#a=!1;#l=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=Rh.get(this.#t)??[],Rh.set(this.#t,this.#e)}get#u(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#a||(this.#a=!0,this.#o=e,this.#r=fa(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#h,!0),this.#t.addEventListener("keydown",this.#f))}focusInside(e=this.#r){if(!this.#u)return;(fa(this.#n,e)&&ba(e)?e:ga(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#a)return()=>{};let e=Jt(this.#t),n=this.#e.at(-1)===this&&fa(this.#n,e),r=this.#o,a=r&&!fa(this.#n,r)?r:e;this.#a=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#h,!0),this.#t.removeEventListener("keydown",this.#f),this.#o=this.#r=null,()=>{n&&(ba(a)?a.focus({preventScroll:!0}):ba(e)?e.focus({preventScroll:!0}):ba(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#i(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#h=e=>{if(!this.#u||this.#l)return;let n=e.composedPath();if(!this.#i(n)){if(n.includes(this.#n)){this.#r=Jt(this.#t);return}this.#l=!0,this.focusInside(),this.#l=!1}};#f=e=>{!this.#u||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#i(e.composedPath())||(e.preventDefault(),Ro(ga(this.#n),Jt(this.#t),e.shiftKey,this.#n))}};var g0=`
176
- slot:not([popover]) { display: contents; }
177
- slot:popover-open {
178
- display: block;
179
- position: fixed;
180
- inset: 0;
181
- width: auto;
182
- height: auto;
183
- max-width: none;
184
- max-height: none;
185
- margin: 0;
186
- padding: 0;
187
- border: 0;
188
- box-sizing: border-box;
189
- overflow: auto;
190
- overscroll-behavior: contain;
191
- color: inherit;
192
- background: inherit;
193
- }
194
- slot::backdrop { background: transparent; pointer-events: none; }
195
- .placeholder { display: none; }
196
- .placeholder.active {
197
- display: block;
198
- flex: 0 0 auto;
199
- max-width: 100%;
200
- pointer-events: none;
201
- }
202
- `,al=t=>t==="maximized"?"maximized":"normal",_o=class extends z{static observedAttributes=["state"];#e;#t;#n;#o="normal";#r=!1;#a=!1;#l;constructor(){super(),this.#n=this.attachInternals();let e=this.attachShadow({mode:"open"}),n=this.ownerDocument,r=n.createElement("style");r.textContent=g0,this.#e=n.createElement("slot"),this.#e.setAttribute("part","content"),this.#l=new No(this.#e),this.#t=n.createElement("div"),this.#t.className="placeholder",this.#t.setAttribute("aria-hidden","true"),e.append(r,this.#t,this.#e),this.#e.addEventListener("toggle",()=>{this.#a&&this.isConnected&&this.#f()}),this.addEventListener("panelmaximizerequest",this.#i),this.addEventListener("panelrestorerequest",this.#i),this.addEventListener("paneltoggle",this.#i)}get#u(){return typeof this.#e.showPopover=="function"&&this.#e.matches(":popover-open")?"maximized":"normal"}connectedCallback(){this.hasAttribute("state")?this.#o=al(this.getAttribute("state")):this.#r||(this.#o=al(this.getAttribute("default-state"))),this.#r=!0,queueMicrotask(()=>{this.isConnected&&(this.#a=!0,this.#f())})}disconnectedCallback(){this.#a=!1,this.#b(!1)}attributeChangedCallback(){this.hasAttribute("state")&&(this.#o=al(this.getAttribute("state")),this.#a&&this.isConnected&&this.#f())}requestMaximize(){this.#h("maximized")}requestRestore(){this.#h("normal")}#i=e=>{e.composedPath().find(r=>r instanceof Element&&r.localName==="a-panel")!==this||e.defaultPrevented||this.#h(e.type==="paneltoggle"?this.#u==="maximized"?"normal":"maximized":e.type==="panelmaximizerequest"?"maximized":"normal")};#h(e){let n=this.#u;e===n||!this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))||this.hasAttribute("state")||(this.#o=e,this.#a&&this.isConnected&&this.#f())}#f(){if(!(this.#u===this.#o&&(this.#o==="maximized"||!this.#e.hasAttribute("popover"))))if(this.#o==="maximized"){if(typeof this.#e.showPopover!="function")return;let e=Jt(this.ownerDocument),n=this.ownerDocument.defaultView.getComputedStyle(this),r=n.boxSizing==="border-box",a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),i=Math.max(0,this.offsetWidth-this.clientWidth-Math.round(a)),s=Math.max(0,this.offsetHeight-this.clientHeight-Math.round(o)),l=parseFloat(n.width)-(r?parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+a:0)-i,c=parseFloat(n.height)-(r?parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+o:0)-s;this.#t.style.width=`${Math.max(0,l||0)}px`,this.#t.style.height=`${Math.max(0,c||0)}px`,this.#t.classList.add("active"),this.#e.tabIndex=-1,this.#e.setAttribute("popover","manual"),this.#l.activate(e),this.#e.showPopover(),this.#n.states?.add("maximized"),this.#l.focusInside(e)}else this.#b()}#b(e=!0){let n=this.#l.deactivate();this.#u==="maximized"&&this.#e.hidePopover(),this.#e.removeAttribute("popover"),this.#e.removeAttribute("tabindex"),this.#t.classList.remove("active"),this.#n.states?.delete("maximized"),e&&n()}};function Nh(){typeof customElements>"u"||customElements.get("a-panel")||customElements.define("a-panel",_o)}Nh();var Fo=class extends z{};function _h(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Fo)}_h();function Vo(t,e){let n=null;t.addEventListener("keydown",r=>{if(r.repeat||!e.keys.includes(r.key))return;let a=e.resolve(r.target);a&&(r.preventDefault(),n=e.blocked?.(a)?null:a)},!0),t.addEventListener("keyup",r=>{if(!e.keys.includes(r.key))return;let a=e.resolve(r.target);if(!a||a!==n){n=null;return}n=null,!e.blocked?.(a)&&e.activate(a)},!0)}function Fh(t){!t||t.hasKeyListenerForAButton||(Vo(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",x0,!0),t.hasKeyListenerForAButton=!0)}var Ho=class extends z{static observedAttributes=["aria-label","aria-labelledby","aria-describedby"];internals;popupAriaSource;#e;#t;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){Fh(this.doc),this.parentElement?.localName==="a-select-field"&&(this.#t=this.parentElement,this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this.#t,{childList:!0,subtree:!0}),this.#t.addEventListener("click",this.#o),this.#n())}disconnectedCallback(){this.#t&&(this.#e?.disconnect(),this.#t?.removeEventListener("click",this.#o),this.#t=void 0,this.#n())}attributeChangedCallback(){this.#t&&this.#n()}#n(){if(!this.internals)return;let e=this.#t?.querySelector(":scope > a-select-label"),n=this.#t?.querySelector(":scope > a-select-hint"),a=[this.#t?this.querySelector(":scope > a-button-label"):null,n].filter(o=>!!o);try{this.internals.ariaLabelledByElements=e&&!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")?[e]:null,this.internals.ariaDescribedByElements=a.length&&!this.hasAttribute("aria-describedby")?a:null}catch{}}#o=e=>{this.hasAttribute("disabled")||this.hasAttribute("loading")||e.composedPath().some(n=>n instanceof Element&&n.localName==="a-select-label")&&this.focus()};[Xt](e){if(!(!this.internals||!("ariaControlsElements"in this.internals))){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0;try{this.internals.ariaControlsElements=null}catch{}return}if("controls"in e){this.popupAriaSource=e.source;try{this.internals.ariaControlsElements=e.controls?[e.controls]:null}catch{}}}}};function v0(t){let e=t.getAttribute("form"),n=e===null?t.closest("form"):t.ownerDocument.getElementById(e);return n?.namespaceURI==="http://www.w3.org/1999/xhtml"&&n.localName==="form"?n:null}function x0(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 r=e.getAttribute("type")||"button",a=v0(e);if(a)if(r==="submit"){a.requestSubmit();let o=new FormData(a);a.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 r==="reset"&&a.reset()}function Vh(){typeof customElements>"u"||(Fh(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Ho))}Vh();async function y0(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function w0(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(a=>a.remove());let n=e.outerHTML,r=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([r],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(r),!0)}catch{return!1}}function k0(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function Hh(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function jh(){return typeof location<"u"?location.href:""}function E0(t){if(t.hasAttribute("copy-url"))return jh();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${jh()}
203
- ${e}`:e}function C0(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function jo(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function qh(t){if(t.hasAttribute("copy-node")){let e=k0(t);return Hh(t,e?w0(e):Promise.resolve(!1)),!0}return C0(t)?(Hh(t,y0(E0(t))),!0):!1}var Yh="a-button, button, [role=button]",Wh="a-menu-item, [role=menuitem]",Zh=`${Yh}, ${Wh}`,Yn=new WeakMap;function ol(t){return t?.querySelector(":scope > a-copy")??null}function il(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function A0(t){if(!t||t.hasCopyDelegation)return;let e=(n,r)=>{let a=n?.closest?.(Zh);if(!a||il(a))return;let o=ol(a);o&&(r?Yn.set(o,r):Yn.delete(o),jo(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 r=n.target?.closest?.(Yh);if(!r||il(r))return;let a=ol(r);a&&(n.detail?Yn.set(a,{x:n.clientX,y:n.clientY}):Yn.delete(a),a.activate())},!0),t.addEventListener("menuselect",n=>{let r=n.target?.closest?.(Wh);!r||il(r)||ol(r)?.activate()},!0),t.hasCopyDelegation=!0}var $h=900,Uh=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
204
- .feedback {
205
- position: fixed;
206
- margin: 0;
207
- padding: 0;
208
- border: 0;
209
- inset: auto;
210
- background: none;
211
- overflow: visible;
212
- pointer-events: none;
213
- display: inline-flex;
214
- align-items: center;
215
- gap: 4px;
216
- box-sizing: border-box;
217
- color: var(--text-2-success);
218
- font-family: var(--sans-serif);
219
- font-size: 13px;
220
- line-height: 16px;
221
- font-weight: 500;
222
- white-space: nowrap;
223
- --_feedback-y-from: calc(-100% - 10px);
224
- --_feedback-y-to: calc(-100% - 1.5em);
225
- transform: translate(var(--_feedback-x), var(--_feedback-y-from));
226
- }
227
- .feedback[data-placement="below"] {
228
- --_feedback-y-from: 10px;
229
- --_feedback-y-to: 1.5em;
230
- }
231
- .feedback[data-measure-end] {
232
- transform: translate(var(--_feedback-x), var(--_feedback-y-to));
233
- }
234
- .feedback:not(:popover-open) { display: none; }
235
- .feedback[data-show] { animation: a-copy-feedback-rise ${$h}ms ease-out forwards; }
236
- @keyframes a-copy-feedback-rise {
237
- from { opacity: 1; transform: translate(var(--_feedback-x), var(--_feedback-y-from)); }
238
- to { opacity: 0; transform: translate(var(--_feedback-x), var(--_feedback-y-to)); }
239
- }
240
- `;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="\u2713";let a=document.createElement("span");return a.className="label",n.append(r,a),t.content.append(e,n),t})(),qo=class extends z{#e;#t;#n;connectedCallback(){A0(this.doc),this.addEventListener("copydone",this.#o)}activate(){qh(this)}#o=e=>{let n=Yn.get(this);if(Yn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let r=this.closest(Zh);r&&this.#a(r,n)};#r(){if(!Uh)return;let e=this.attachShadow({mode:"open"});e.append(Uh.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#a(e,n){this.#e||this.#r();let r=this.#e,a=this.#t;if(!r||!a)return;a.textContent=this.getAttribute("copied-label")??"Copied";let o;if(n)r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.setProperty("--_feedback-x","8px"),o=n.y;else{let s=e.getBoundingClientRect(),l=this.view.getComputedStyle(e).direction==="rtl";r.style.left=`${l?s.right-12:s.left+12}px`,r.style.top=`${s.top}px`,r.style.setProperty("--_feedback-x",l?"-100%":"0"),o=s.bottom}clearTimeout(this.#n),r.removeAttribute("data-show"),r.removeAttribute("data-placement"),r.matches(":popover-open")&&r.hidePopover(),r.showPopover(),r.setAttribute("data-measure-end","");let i=r.getBoundingClientRect().top<0;r.removeAttribute("data-measure-end"),i&&(r.setAttribute("data-placement","below"),r.style.top=`${o}px`),r.offsetWidth,r.setAttribute("data-show",""),this.#n=setTimeout(()=>{r.removeAttribute("data-show"),r.matches(":popover-open")&&r.hidePopover()},$h)}disconnectedCallback(){clearTimeout(this.#n),Yn.delete(this),this.removeEventListener("copydone",this.#o)}};function Gh(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",qo)}Gh();var sl=t=>t==="checked"||t==="indeterminate"?t:"unchecked",Uo=class extends z{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;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.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=sl(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&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=sl(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,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,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))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-checkbox-label")),Array.from(this.querySelectorAll(":scope > a-checkbox-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=sl(e),this.paint()}formDisabledCallback(){this.paint()}};function Kh(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",Uo)}Kh();var ll=t=>t==="checked"?"checked":"unchecked",Yo=class extends z{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;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.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=ll(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&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=ll(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,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,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))}syncAccessibilityRelations(){la(this.internals,Array.from(this.querySelectorAll(":scope > a-switch-label")),Array.from(this.querySelectorAll(":scope > a-switch-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=ll(e),this.paint()}formDisabledCallback(){this.paint()}};function Xh(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Yo)}Xh();var Jh=200,S0='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"]',T0=':disabled,[disabled],[aria-disabled="true"]';function M0(t){return t.matches("[data-expander-ignore]")?!0:t.matches(S0)&&!t.matches(T0)}var I0=`
241
- :host { display: block; }
242
-
243
- .header {
244
- display: flex;
245
- /* Stretch so the trigger button (and the actions row) fill the full host
246
- height \u2014 the title's hit area is the whole header, not just the text. */
247
- align-items: stretch;
248
- }
249
-
250
- :host([indicator-placement="end"]) .header {
251
- display: grid;
252
- grid-template-columns: minmax(0, 1fr) auto var(--_expander-indicator-track);
253
- }
254
-
255
- slot[name="actions"] { display: none; }
256
- .header.has-actions slot[name="actions"] {
257
- display: flex;
258
- align-items: center;
259
- gap: var(--_expander-actions-gap);
260
- flex-shrink: 0;
261
- margin-inline-start: var(--_expander-actions-start);
262
- /* Inset from the right edge (the host has no padding of its own). */
263
- margin-inline-end: var(--_expander-actions-end);
264
- }
265
- :host([indicator-placement="end"]) .header.has-actions slot[name="actions"] {
266
- grid-column: 2;
267
- grid-row: 1;
268
- z-index: 1;
269
- }
270
-
271
- button {
272
- appearance: none;
273
- -webkit-appearance: none;
274
- background: none;
275
- border: none;
276
- margin: 0;
277
- /* The default button fills the header beside its actions. The title and
278
- body share --expander-gutter, and the indicator hangs inside that gutter.
279
- End placement switches to the header's subgrid. */
280
- position: relative;
281
- padding: var(--_expander-header-padding-block) var(--_expander-header-padding-end) var(--_expander-header-padding-block) var(--expander-gutter);
282
- flex: 1;
283
- min-width: 0;
284
- font: inherit;
285
- font-variation-settings: inherit;
286
- color: inherit;
287
- text-align: left;
288
-
289
- display: flex;
290
- align-items: center;
291
- gap: 0;
292
- cursor: pointer;
293
- user-select: text;
294
- border-radius: 2px;
295
- outline: none;
296
- }
297
-
298
- :host([indicator-placement="end"]) button {
299
- grid-column: 1 / -1;
300
- grid-row: 1;
301
- display: grid;
302
- grid-template-columns: subgrid;
303
- padding: var(--_expander-header-padding-block) 0;
304
- }
305
- :host([indicator-placement="end"]) slot[name="title"] {
306
- grid-column: 1;
307
- display: block;
308
- min-width: 0;
309
- margin-inline-start: var(--expander-gutter);
310
- }
311
-
312
- button:focus-visible {
313
- outline: 1px solid var(--focus-ring);
314
- outline-offset: 0px;
315
- }
316
-
317
- .indicator {
318
- position: absolute;
319
- inset-inline-start: var(--_expander-indicator-start);
320
- top: 50%;
321
- width: var(--_expander-indicator-size);
322
- height: var(--_expander-indicator-size);
323
- pointer-events: none;
324
- opacity: 0.6;
325
- transform: translateY(-50%);
326
- transition: transform 150ms ease, opacity 150ms ease;
327
- }
328
- .indicator slot { display: grid; place-items: center; width: 100%; height: 100%; }
329
- .indicator slot::slotted(*) { pointer-events: none; }
330
- .indicator .glyph {
331
- display: block;
332
- width: var(--_expander-indicator-size);
333
- height: var(--_expander-indicator-size);
334
- background-color: currentColor;
335
- -webkit-mask-image: var(--_expander-indicator-mask);
336
- mask-image: var(--_expander-indicator-mask);
337
- -webkit-mask-size: contain;
338
- mask-size: contain;
339
- -webkit-mask-repeat: no-repeat;
340
- mask-repeat: no-repeat;
341
- -webkit-mask-position: center;
342
- mask-position: center;
343
- }
344
- :host([indicator="plus"]) .indicator .glyph { position: relative; background: none; mask: none; -webkit-mask: none; }
345
- :host([indicator="plus"]) .indicator .glyph::before,
346
- :host([indicator="plus"]) .indicator .glyph::after {
347
- content: '';
348
- position: absolute;
349
- background: currentColor;
350
- border-radius: calc(var(--_expander-indicator-stroke) / 2);
351
- }
352
- :host([indicator="plus"]) .indicator .glyph::before {
353
- width: calc(var(--_expander-indicator-size) - 2 * var(--_expander-indicator-stroke));
354
- height: var(--_expander-indicator-stroke);
355
- left: var(--_expander-indicator-stroke);
356
- top: calc((var(--_expander-indicator-size) - var(--_expander-indicator-stroke)) / 2);
357
- }
358
- :host([indicator="plus"]) .indicator .glyph::after {
359
- width: var(--_expander-indicator-stroke);
360
- height: calc(var(--_expander-indicator-size) - 2 * var(--_expander-indicator-stroke));
361
- left: calc((var(--_expander-indicator-size) - var(--_expander-indicator-stroke)) / 2);
362
- top: var(--_expander-indicator-stroke);
363
- transition: transform 150ms ease;
364
- }
365
- button:enabled:hover .indicator { opacity: 1; }
366
- button[aria-expanded="true"] .indicator { transform: translateY(-50%) rotate(90deg); opacity: 1; }
367
- :host([indicator="plus"]) button[aria-expanded="true"] .indicator,
368
- button[aria-expanded="true"] .indicator.has-pair { transform: translateY(-50%); }
369
- :host([indicator="plus"]) button[aria-expanded="true"] .glyph::after { transform: scaleY(0); }
370
- button[aria-expanded="false"] slot[name="indicator"]::slotted([data-when="open"]),
371
- button[aria-expanded="true"] slot[name="indicator"]::slotted([data-when="closed"]) { display: none; }
372
-
373
- :host([indicator-placement="end"]) .indicator {
374
- position: static;
375
- grid-column: 3;
376
- grid-row: 1;
377
- justify-self: end;
378
- align-self: center;
379
- margin-inline-end: var(--_expander-indicator-edge);
380
- transform: rotate(90deg);
381
- }
382
- :host([indicator-placement="end"]) button[aria-expanded="true"] .indicator { transform: rotate(270deg); }
383
- :host([indicator-placement="end"]) .indicator.has-custom,
384
- :host([indicator-placement="end"]) .indicator.has-pair { transform: none; }
385
- :host([indicator-placement="end"][indicator="plus"]) .indicator { transform: none; }
386
- :host([indicator-placement="end"]) button[aria-expanded="true"] .indicator.has-custom { transform: rotate(180deg); }
387
- :host([indicator-placement="end"]) button[aria-expanded="true"] .indicator.has-pair,
388
- :host([indicator-placement="end"][indicator="plus"]) button[aria-expanded="true"] .indicator { transform: none; }
389
-
390
- button:enabled:hover { color: var(--expander-text-hover); }
391
- :host([priority="tertiary"]) button:enabled:hover { --_summary-underline: underline; }
392
- button:enabled:active { color: var(--expander-text); }
393
- button:disabled { cursor: default; }
394
- button:enabled:not([aria-expanded="true"]):active .indicator {
395
- opacity: 0.6;
396
- }
397
- @media (prefers-reduced-motion: reduce) {
398
- .indicator, :host([indicator="plus"]) .indicator .glyph::after { transition: none; }
399
- }
400
-
401
- .region {
402
- display: grid;
403
- grid-template-rows: 0fr;
404
- grid-template-columns: minmax(0, 1fr);
405
- }
406
- .header:has(button[aria-expanded="true"]) + .region { grid-template-rows: 1fr; }
407
-
408
- /* The transparent tertiary border still insets the content by 1px. Pull the
409
- header and region back so outdent lands flush with surrounding content. */
410
- :host([priority="tertiary"][outdent]) .header,
411
- :host([priority="tertiary"][outdent]) .region {
412
- margin-inline-start: -1px;
413
- }
414
- @media (prefers-reduced-motion: no-preference) {
415
- .region { transition: grid-template-rows ${Jh}ms ease; }
416
- }
417
-
418
- [part="content"] { display: block; min-height: 0; overflow: clip; }
419
- .header:has(button[aria-expanded="true"]) + .region [part="content"] {
420
- overflow: visible;
421
- transition: overflow 0s ${Jh}ms;
422
- transition-behavior: allow-discrete;
423
- }
424
- `,Qh=Kt,Wo=class extends z{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=I0,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let r=document.createElement("slot");r.name="title",this.titleSlot=r;let a=document.createElement("span");a.className="indicator",a.setAttribute("part","indicator"),a.setAttribute("aria-hidden","true"),a.inert=!0;let o=document.createElement("slot");o.name="indicator";let i=document.createElement("span");i.className="glyph",o.append(i),o.addEventListener("slotchange",()=>{let d=o.assignedElements(),u=d.some(m=>m.hasAttribute("data-when"));a.classList.toggle("has-custom",d.length>0&&!u),a.classList.toggle("has-pair",u)}),a.append(o),this.summary.append(r,a),this.summary.addEventListener("click",this.onSummaryClick);let s=document.createElement("div");s.className="header",this.header=s;let l=document.createElement("slot");l.name="actions",l.setAttribute("part","actions"),l.addEventListener("slotchange",()=>{s.classList.toggle("has-actions",l.assignedElements().length>0)}),s.append(this.summary,l),this.region=document.createElement("div"),this.region.className="region";let c=document.createElement("slot");c.setAttribute("part","content"),this.region.append(c),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,s,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),r=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),a=(e+r)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${a}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(Qh(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(Qh(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(),r=n.indexOf(this.summary);return(r===-1?n:n.slice(0,r)).some(o=>o instanceof Element&&M0(o))}#o(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(r=>n.intersectsNode(r))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#o())return;let n=this.#t,r=n==="open"?"closed":"open",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#e||a&&this.applyState(r)}};function ep(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",Wo)}ep();var rt=4,tp=16,D0=8,np=300,rp=150,O0=300,P0=120,cl=10,ap=100,z0=60,B0=500,L0="a-tab-label, a-button-label, a-step-hint";function op(t){return typeof t.isTruncated=="boolean"}var dl="data-anta-text-tooltip",R0=1500,N0=10,at=null,Cr,Zo=!1;function _0(){return Cr!==void 0}function F0(t){return t.hasAttribute("follow")?at?at.hasAttribute("follow"):_0()&&Zo:!1}function cp(){Cr!==void 0&&(clearTimeout(Cr),Cr=void 0),Zo=!1}function V0(t){at&&at!==t&&(at.isConnected?at.hide():at.cleanup()),at=t,cp()}function ip(t){at===t&&(at=null,cp(),Zo=t.hasAttribute("follow"),Cr=setTimeout(()=>{Cr=void 0,Zo=!1},O0))}var Er=new WeakMap;function sp(t){let e,n;for(let r of t.tooltips)r.hasAttribute(dl)?e=r:n=r;return n??e}function ul(t,e){let n=sp(e);for(let r of e.tooltips)r!==n&&r.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let r=Er.get(t);r!==e||!r.intersecting||sp(r)!==n||n.setupListeners()})}function H0(t){for(let e of t){let n=Er.get(e.target);n&&(n.intersecting=e.isIntersecting,ul(e.target,n))}}var lp=typeof IntersectionObserver<"u"?new IntersectionObserver(H0,{root:null,rootMargin:"0px",threshold:0}):null,$o=class extends z{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=`
425
- :host { display: contents; }
426
-
427
- .container {
428
- --_dur: ${rp}ms;
429
- position: fixed;
430
- left: 0;
431
- top: 0;
432
- margin: 0;
433
- padding: 0;
434
- border: 0;
435
- background: transparent;
436
- color: inherit;
437
- overflow: visible;
438
- box-sizing: border-box;
439
- width: fit-content;
440
- pointer-events: none;
441
- opacity: 0;
442
- transition:
443
- opacity var(--_dur) ease,
444
- overlay var(--_dur) ease allow-discrete,
445
- display var(--_dur) ease allow-discrete;
446
- }
447
-
448
- .container:popover-open { opacity: 1; }
449
-
450
- @starting-style {
451
- .container:popover-open { opacity: 0; }
452
- }
453
-
454
- .bubble {
455
- display: block;
456
- box-sizing: border-box;
457
- width: fit-content;
458
- max-width: var(--tooltip-max-width, min(calc(100vw - 20px), 80ch));
459
- max-height: calc(100vh - 20px);
460
- overflow: clip;
461
- text-align: left;
462
- background: var(--tooltip-bg, Canvas);
463
- color: var(--text-2, CanvasText);
464
- box-shadow: var(--tooltip-shadow, 0 1px 8px rgba(0, 0, 0, 0.2));
465
- -webkit-backdrop-filter: var(--tooltip-backdrop-filter, blur(8px));
466
- backdrop-filter: var(--tooltip-backdrop-filter, blur(8px));
467
- padding: var(--tooltip-padding, 4px 8px);
468
- border: var(--tooltip-border, none);
469
- border-radius: var(--tooltip-radius, 3px);
470
- outline: none;
471
- font-family: var(--sans-serif, system-ui, sans-serif);
472
- font-size: 14px;
473
- font-weight: 400;
474
- font-style: normal;
475
- font-stretch: normal;
476
- line-height: 1.5;
477
- letter-spacing: var(--_tooltip-letter-spacing, 0.025ch);
478
- word-spacing: normal;
479
- text-transform: none;
480
- white-space: break-spaces;
481
- word-break: break-word;
482
- overflow-wrap: break-word;
483
- opacity: 1;
484
- transition: opacity ${z0}ms linear;
485
- }
486
-
487
- :host([interactive]) .container { pointer-events: auto; }
488
- `,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=Er.get(e);n||(n={tooltips:new Set,intersecting:!1},Er.set(e,n),lp?.observe(e)),n.tooltips.add(this),ul(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=Er.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(Er.delete(e),lp?.unobserve(this.anchor)):n&&ul(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=da(e=>this.show(e),this.#r)}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#o(){return this.getAttribute("placement")==="left"}get#r(){let e=this.getAttribute("delay");if(e==null)return np;let n=parseInt(e,10);return Number.isFinite(n)?n:np}get#a(){return this.hasAttribute("truncated-only")}get#l(){return this.hasAttribute(dl)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#l||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(dl))}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.#l&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(op(e))return[e];let r=Array.from(e.querySelectorAll(L0));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>op(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#l?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.#l?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,r,a,o){return o?e<rt?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-rt),e=Math.max(rt,e),n+a>i&&(n=i-a-rt),n=Math.max(rt,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=_t(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.left-n.width-rt,s=i>=rt?i:e.right+rt,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-rt,e.bottom+rt,n.height,a,this.#n||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#o){let i=e.clientX-n.width-rt,s=i>=rt?i:e.clientX+tp;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-rt*2,e.clientY+tp,n.height,a,this.#n);this.place(e.clientX-D0,o,n.width,n.height,r,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=_t(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=cl?1:o>=ap?0:1-(o-cl)/(ap-cl)}show=e=>{this.anchor&&(ru()&&!au(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#a&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(at&&at!==this&&this.anchor.contains(at.anchor))&&(V0(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(),rp),ip(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(),ip(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=P0)=>{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.#a&&!this.isTargetTruncated()||(F0(this)?(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,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),r.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)>N0&&u()},h=()=>{u(),f(),this.shown&&this.touchOpen&&this.scheduleHide(R0)},f=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",h),e.removeEventListener("contextmenu",d)},b=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()},B0))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",b),this.teardown=()=>{this.debouncedShow?.cancel(),u(),f(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",b),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function dp(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",$o)}dp();var Go=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Ko=new Set(Go),j0={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function Xo(t){return j0[t]}var q0={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function U0(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Wn(t,e,n,r){let a=q0[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:U0(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var up=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],Y0=new Set(["readonly","required"]),hl=!1,hp=new WeakSet;function W0(t){hp.has(t)||(hp.add(t),t.addEventListener("keydown",()=>{hl=!0},!0),t.addEventListener("pointerdown",()=>{hl=!1},!0))}var Z0="clearrequest",$0="clearclick",G0="clearinput",pp=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),K0=`
489
- :host {
490
- --_fs: 15px;
491
- --_lh: 20px;
492
-
493
- display: grid;
494
- grid-template-columns: minmax(0, 1fr);
495
- row-gap: 4px;
496
- outline: none;
497
- }
498
-
499
- .label {
500
- display: none;
501
- color: var(--input-label);
502
- font-family: var(--sans-serif);
503
- font-size: var(--_fs);
504
- line-height: var(--_lh);
505
- font-weight: 500;
506
- }
507
-
508
- .field {
509
- --_bc: var(--input-rest-border);
510
- --_bw: var(--input-border-width);
511
- --_pad-block: 4px;
512
-
513
- display: flex;
514
- align-items: center;
515
- box-sizing: border-box;
516
- min-height: 28px;
517
- background: var(--input-bg);
518
- border-radius: 4px;
519
- box-shadow: inset 0 0 0 var(--_bw) var(--_bc);
520
- transition: box-shadow 120ms ease;
521
- }
522
- :host([multiline]) .field { align-items: stretch; }
523
- :host([size="small"]) { --_fs: 13px; --_lh: 16px; }
524
- :host([size="large"]) { --_fs: 17px; --_lh: 22px; }
525
- :host([size="small"]) .field { min-height: 24px; }
526
- :host([size="large"]) .field { min-height: 32px; }
527
- :host([round]) .field { border-radius: var(--input-round, 999px); }
528
-
529
- @media (hover: hover) and (pointer: fine) {
530
- :host(:not(:disabled)) .field:hover { --_bw: 1px; --_bc: var(--input-border); }
531
- }
532
- :host(:not([readonly])) .field:has(input:focus, textarea:focus, button:focus-visible),
533
- :host([readonly]:state(kb-focus)) .field {
534
- --_bw: 1px;
535
- --_bc: var(--input-border);
536
- outline: 1px solid var(--focus-ring);
537
- outline-offset: 1px;
538
- }
539
- @media (forced-colors: active) { .field { border: 1px solid ButtonBorder; } }
540
-
541
- input, textarea, button {
542
- flex: 1 1 auto;
543
- min-width: 0;
544
- width: 100%;
545
- box-sizing: border-box;
546
- border: 0;
547
- margin: 0;
548
- padding-block: 0;
549
- padding-inline: 7px;
550
- background: transparent;
551
- outline: none;
552
- color: var(--input-text);
553
- font-family: var(--sans-serif);
554
- font-stretch: normal;
555
- font-style: normal;
556
- font-variation-settings: inherit;
557
- font-size: var(--_fs);
558
- line-height: var(--_lh);
559
- font-weight: 400;
560
- -webkit-appearance: none;
561
- appearance: none;
562
- }
563
- textarea {
564
- resize: none;
565
- padding-block: var(--_pad-block);
566
- overflow-y: auto;
567
- }
568
- button { text-align: start; white-space: nowrap; overflow: hidden; cursor: pointer; }
569
- button.placeholder { color: var(--input-placeholder); }
570
- :host([maxrows]:not([rows])) textarea {
571
- max-height: calc(var(--_lh) * var(--_maxrows) + var(--_pad-block) * 2);
572
- }
573
- input::placeholder, textarea::placeholder { color: var(--input-placeholder); opacity: 1; }
574
- input:disabled, textarea:disabled, button:disabled { cursor: not-allowed; }
575
- :host([readonly]:not([disabled])) .field,
576
- :host([readonly]:not([disabled])) input,
577
- :host([readonly]:not([disabled])) textarea { cursor: pointer; }
578
- :host([readonly]:not([disabled])) input { text-overflow: ellipsis; }
579
- input::-webkit-search-cancel-button,
580
- input::-webkit-search-decoration,
581
- input::-webkit-search-results-button,
582
- input::-webkit-search-results-decoration,
583
- input::-webkit-inner-spin-button,
584
- input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; display: none; }
585
- input::-ms-clear, input::-ms-reveal { display: none; }
586
-
587
- slot[name="leading"], slot[name="trailing"] {
588
- display: none;
589
- color: var(--input-adornment);
590
- font-size: var(--_fs);
591
- line-height: var(--_lh);
592
- font-stretch: var(--_input-adornment-font-stretch, normal);
593
- }
594
- :host([dim-actions]) slot[name="leading"],
595
- :host([dim-actions]) slot[name="trailing"],
596
- :host([dim-actions]) slot[name="clear"] {
597
- opacity: 0.6;
598
- transition: opacity 120ms ease;
599
- }
600
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="leading"],
601
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="trailing"],
602
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="clear"],
603
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="leading"],
604
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="trailing"],
605
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="clear"] {
606
- opacity: 1;
607
- }
608
-
609
- :host(:disabled) slot[name="leading"],
610
- :host(:disabled) slot[name="trailing"] { opacity: 0.5; pointer-events: none; }
611
-
612
- slot[name="clear"] {
613
- display: flex;
614
- align-items: center;
615
- flex-shrink: 0;
616
- visibility: hidden;
617
- }
618
- :host(:state(filled):not(:disabled):not([readonly])) slot[name="clear"] { visibility: visible; }
619
-
620
- :host([multiline]:state(filled)) slot[name="clear"] {
621
- align-self: flex-start;
622
- height: calc(var(--_lh) + var(--_pad-block) * 2);
623
- }
624
-
625
- .hint {
626
- display: none;
627
- gap: 4px;
628
- align-items: flex-start;
629
- padding-inline-start: 1px;
630
- color: var(--input-hint);
631
- font-family: var(--sans-serif);
632
- font-size: calc(var(--_fs) - 1px);
633
- line-height: calc(var(--_lh) - 2px);
634
- }
635
- `,mp=Symbol("readDelegatedAria"),fp=Symbol("writeDelegatedAria"),va=class extends z{static formAssociated=!0;static observedAttributes=[...up,...Go,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;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=K0,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 r=document.createElement("slot");r.name="trailing",r.setAttribute("part","trailing");let a=document.createElement("slot");a.name="clear",a.setAttribute("part","clear"),this.field.append(this.leadingSlot,a,r),this.addEventListener(Z0,()=>{this.dispatchEvent(new CustomEvent($0,{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(W0(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}[Xt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(Ko.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement,i=!a&&this.hasAttribute("button"),s=this.control instanceof HTMLButtonElement;a!==o||i!==s?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"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(Ko.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(Ko.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[mp](e){return this.delegatedAria.get(e)??null}[fp](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Wn(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&this.applyLabelAria(),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e)for(let[n,r]of this.delegatedAria)Wn(this,e,n,r)}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)try{a=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=!i&&this.hasAttribute("button"),l=document.createElement(s?"button":i?"textarea":"input");l instanceof HTMLButtonElement&&(l.type="button"),l.setAttribute("part","input"),this.control?this.control.replaceWith(l):this.leadingSlot.after(l),this.control=l;for(let d of up)l instanceof HTMLTextAreaElement&&d==="type"||this.forward(d,this.getAttribute(d));this.syncDisabled(),this.syncStatus();for(let[d,u]of this.delegatedAria)Wn(this,l,d,u);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),i&&this.configureTextarea(l);let c=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(l.value=c,this.syncButtonPresentation(),l.addEventListener("input",this.onInput),l.addEventListener("change",this.onChange),l.addEventListener("focus",this.onFocus),l.addEventListener("blur",this.onBlur),r&&(l.focus(),a!=null&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)))try{l.setSelectionRange(a,o??a)}catch{}this.syncFormValue(c),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=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,pp?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(pp)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 r=this.control;r&&(r instanceof HTMLButtonElement||r instanceof HTMLTextAreaElement&&e==="type"||(Y0.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!(e instanceof HTMLButtonElement))return;let n=e.value;e.textContent=n||this.getAttribute("placeholder")||"",e.classList.toggle("placeholder",!n)}syncFormValue(e){this.internals?.setFormValue(this.control instanceof HTMLButtonElement?null:e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(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{hl?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.delegatedAria.has("aria-label")||this.delegatedAria.has("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-description")||this.delegatedAria.has("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}applyPopupAria(){let e=this.control;if(e)try{!this.delegatedAria.has("aria-controls")&&"ariaControlsElements"in e&&(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),!this.delegatedAria.has("aria-activedescendant")&&"ariaActiveDescendantElement"in e&&(e.ariaActiveDescendantElement=this.popupActiveDescendant)}catch{}}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.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(G0,{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??""}};for(let t of Go)Object.defineProperty(va.prototype,Xo(t),{configurable:!0,enumerable:!0,get(){return this[mp](t)},set(e){this[fp](t,e)}});function bp(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",va)}bp();var pl=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},xa=(t,e)=>{if(t===null||!t.trim())return e;let n=t.trim().split(/\s+/);if(n.length!==1&&n.length!==2)return e;let r=n.map(Number);return r.every(Number.isFinite)?r.length===2?[r[0],r[1]]:r[0]:e},X0=t=>Array.isArray(t)?t.join(" "):String(t),ml=(t,e)=>Array.isArray(t)&&Array.isArray(e)?t[0]===e[0]&&t[1]===e[1]:!Array.isArray(t)&&!Array.isArray(e)&&t===e,Jo=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix","inverted","name","aria-label","aria-labelledby"];internals;#e;#t;#n;#o;#r;#a;#l;#u;#i;#h;#f;#b;#p;#m;#c;#s;#A;#v;#x;#S;#y;#T;#d=0;#g=[0,0];#I=!1;#E=0;#O=!1;#M=!1;#B;get value(){return Array.isArray(this.#d)?[...this.#d]:this.#d}set value(e){this.setAttribute("value",Array.isArray(e)?e.join(" "):String(e))}get defaultValue(){return xa(this.getAttribute("defaultvalue"),this.#P())}set defaultValue(e){this.setAttribute("defaultvalue",Array.isArray(e)?e.join(" "):String(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
636
- :host {
637
- display: grid;
638
- grid-template-columns: minmax(0, 1fr);
639
- gap: 1px;
640
- outline: none;
641
- }
642
- [hidden] { display: none !important; }
643
- .header {
644
- display: flex;
645
- align-items: baseline;
646
- gap: 1px;
647
- min-width: 0;
648
- }
649
- slot[name="label"] {
650
- display: block;
651
- min-width: 0;
652
- color: var(--slider-label);
653
- font-family: var(--sans-serif);
654
- font-size: var(--slider-label-size);
655
- font-weight: 500;
656
- line-height: var(--slider-label-line-height);
657
- }
658
- .inline-value,
659
- .end-value {
660
- color: var(--slider-value);
661
- font-family: var(--sans-serif);
662
- font-size: var(--slider-value-size);
663
- font-variant-numeric: tabular-nums;
664
- line-height: var(--slider-value-line-height);
665
- }
666
- .value-affix { color: var(--slider-value-affix); }
667
- .inline-separator,
668
- .inline-value { display: none; }
669
- .inline-value { margin-inline-start: 0.5ch; }
670
- .end-value {
671
- display: block;
672
- flex: 0 0 auto;
673
- margin-inline-start: auto;
674
- padding-inline-start: 1ch;
675
- }
676
- :host([value-display="inline"]) .inline-separator,
677
- :host([value-display="inline"]) .inline-value { display: block; }
678
- :host([value-display="inline"]) .end-value,
679
- :host([value-display="thumb"]) .end-value,
680
- :host([value-display="none"]) .end-value { display: none; }
681
- .control {
682
- position: relative;
683
- block-size: var(--anta-slider-control-size);
684
- border-radius: 4px;
685
- cursor: grab;
686
- touch-action: none;
687
- user-select: none;
688
- }
689
- :host([track-click="jump"]) .control { cursor: pointer; }
690
- .control[data-dragging] { cursor: grabbing; }
691
- .control[data-dragging] .thumb[data-active] { background: var(--slider-thumb-active); }
692
- :host(:focus-visible) .control:not([data-pointer-focus]) {
693
- outline: 1px solid var(--focus-ring);
694
- outline-offset: 0;
695
- }
696
- .rail-area {
697
- position: absolute;
698
- inset-block-start: 50%;
699
- inset-inline: calc(var(--anta-slider-thumb-size) / 2);
700
- block-size: var(--anta-slider-track-size);
701
- transform: translateY(-50%);
702
- }
703
- .rail,
704
- .fill {
705
- position: absolute;
706
- inset: 0;
707
- border-radius: var(--slider-track-radius);
708
- transition: background-color 75ms ease-out;
709
- }
710
- .rail {
711
- inset-inline: calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2);
712
- background: var(--slider-track);
713
- }
714
- .fill {
715
- inset-inline-start: calc(var(--_fill-start, 0%) + var(--_fill-start-edge, 0px));
716
- inset-inline-end: auto;
717
- inline-size: calc(var(--_fill-end, 0%) - var(--_fill-start, 0%) + var(--_fill-end-edge, 0px) - var(--_fill-start-edge, 0px));
718
- background: var(--slider-fill);
719
- }
720
- .thumb {
721
- position: absolute;
722
- inset-block-start: 50%;
723
- inset-inline-start: var(--_percent, 0%);
724
- box-sizing: border-box;
725
- inline-size: var(--anta-slider-thumb-size);
726
- block-size: var(--anta-slider-thumb-size);
727
- border: var(--anta-slider-thumb-border-width) solid var(--slider-thumb-border);
728
- border-radius: var(--slider-thumb-radius);
729
- background: var(--slider-thumb);
730
- transition: background-color 75ms ease-out, border-color 75ms ease-out;
731
- transform: translate(-50%, -50%);
732
- }
733
- .thumb[data-last-active] { z-index: 1; }
734
- .thumb:focus-visible {
735
- outline: 1px solid var(--focus-ring);
736
- outline-offset: 2px;
737
- z-index: 2;
738
- }
739
- .thumb-value {
740
- display: none;
741
- position: absolute;
742
- inset-inline-start: var(--_percent, 0%);
743
- inset-block-start: 50%;
744
- min-inline-size: max-content;
745
- color: var(--slider-value);
746
- font-family: var(--sans-serif);
747
- font-size: var(--slider-value-size);
748
- font-variant-numeric: tabular-nums;
749
- line-height: var(--slider-value-line-height);
750
- padding-inline: 6px;
751
- background: var(--bg-2);
752
- border: 1px solid var(--border-3);
753
- border-radius: 4px;
754
- text-align: center;
755
- transform: translate(-50%, calc(
756
- -50% - var(--anta-slider-control-size) / 2 - 1px - var(--slider-value-line-height) / 2
757
- ));
758
- }
759
- :host([value-display="thumb"]) .thumb-value { display: block; }
760
- :host([value-display="thumb"]) .thumb-value[hidden] { display: none !important; }
761
- slot[name="markers"] {
762
- display: block;
763
- position: relative;
764
- min-block-size: var(--slider-marker-line-height);
765
- }
766
- slot[name="markers"]::slotted(*) {
767
- position: absolute;
768
- inset-inline-start: var(--slider-marker-position);
769
- max-inline-size: min(12rem, 50vw);
770
- color: var(--slider-marker);
771
- font-family: var(--sans-serif);
772
- font-size: var(--slider-marker-size);
773
- font-variant-numeric: tabular-nums;
774
- line-height: var(--slider-marker-line-height);
775
- text-align: center;
776
- transform: translateX(-50%);
777
- white-space: nowrap;
778
- }
779
- slot[name="markers"]::slotted([data-slider-marker-start]) { text-align: start; transform: translateX(0); }
780
- slot[name="markers"]::slotted([data-slider-marker-end]) { text-align: end; transform: translateX(-100%); }
781
- slot:not([name]) { display: block; }
782
- :host([disabled]) .control,
783
- :host(:disabled) .control { cursor: not-allowed; }
784
- @media (forced-colors: active) {
785
- .rail { background: Canvas; border: 1px solid CanvasText; }
786
- .fill { background: Highlight; }
787
- .thumb { background: Canvas; border-color: CanvasText; }
788
- :host(:focus-visible) .control { outline: 2px solid Highlight; }
789
- .thumb:focus-visible { outline: 2px solid Highlight; }
790
- }
791
- @media (prefers-reduced-motion: reduce) {
792
- .rail,
793
- .fill,
794
- .thumb { transition: none; }
795
- }
796
- `,this.#l=document.createElement("div"),this.#l.className="header",this.#l.part.add("header"),this.#u=document.createElement("slot"),this.#u.name="label",this.#u.part.add("label");let r=document.createElement("span");r.className="inline-separator",r.textContent=":",this.#i=document.createElement("span"),this.#i.className="inline-value",this.#i.part.add("value"),this.#h=document.createElement("span"),this.#h.className="value-affix",this.#f=document.createElement("span"),this.#f.className="value-affix",this.#i.append(this.#h,this.#f),this.#b=document.createElement("span"),this.#b.className="end-value",this.#b.part.add("value"),this.#p=document.createElement("span"),this.#p.className="value-affix",this.#m=document.createElement("span"),this.#m.className="value-affix",this.#b.append(this.#p,this.#m),this.#l.append(this.#u,r,this.#i,this.#b),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area";let a=document.createElement("div");a.className="rail",a.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill"),this.#o=document.createElement("div"),this.#o.className="fill",this.#o.part.add("fill","fill-end"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb","thumb-1"),this.#a=document.createElement("div"),this.#a.className="thumb",this.#a.part.add("thumb","thumb-2"),this.#c=document.createElement("span"),this.#c.className="thumb-value",this.#c.part.add("thumb-value"),this.#A=document.createElement("span"),this.#A.className="value-affix",this.#v=document.createElement("span"),this.#v.className="value-affix",this.#c.append(this.#A,this.#v),this.#s=document.createElement("span"),this.#s.className="thumb-value",this.#s.part.add("thumb-value","thumb-value-2"),this.#x=document.createElement("span"),this.#x.className="value-affix",this.#S=document.createElement("span"),this.#S.className="value-affix",this.#s.append(this.#x,this.#S),this.#t.append(a,this.#n,this.#o,this.#r,this.#a,this.#c,this.#s),this.#e.append(this.#t),this.#y=document.createElement("slot"),this.#y.name="markers",this.#y.part.add("markers"),this.#T=document.createElement("slot"),this.#T.part.add("extras");for(let o of[this.#u,this.#y,this.#T])o.addEventListener("slotchange",()=>{this.#C(),o===this.#u&&this.#U()});for(let[o,i]of[this.#r,this.#a].entries())i.addEventListener("focus",()=>{Array.isArray(this.#d)&&(this.#E=o,this.#R())});this.#e.addEventListener("pointerdown",o=>this.#Y(o)),this.#e.addEventListener("pointermove",o=>this.#G(o)),this.#e.addEventListener("pointerup",o=>this.#W(o)),this.#e.addEventListener("pointercancel",o=>this.#W(o)),this.#e.addEventListener("lostpointercapture",o=>this.#W(o)),this.addEventListener("keydown",o=>this.#J(o)),this.addEventListener("blur",()=>delete this.#e.dataset.pointerFocus),e.append(n,this.#l,this.#e,this.#y,this.#T)}connectedCallback(){this.#O||(this.#L(this.#j()),this.#O=!0),this.#R(),this.#C()}attributeChangedCallback(e){this.#O&&(e==="value"?this.hasAttribute("value")?(this.#L(xa(this.getAttribute("value"),this.#P())),this.#M=!1):this.#M||this.#L(this.#j()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#M?this.#L(this.#j()):(e==="min"||e==="max"||e==="step")&&this.#L(this.#d),this.#R(),e==="value-display"&&this.#C())}formResetCallback(){let e=this.#d;this.#L(this.defaultValue),this.#M=!1,this.#R(),ml(this.#d,e)||this.#z()}formStateRestoreCallback(e){typeof e=="string"&&(this.#L(xa(e,this.#P())),this.#M=!0,this.#R())}formDisabledCallback(){this.#R()}get#w(){return fr(this.getAttribute("min"),0)}get#D(){return Math.max(this.#w,fr(this.getAttribute("max"),100))}get#V(){let e=fr(this.getAttribute("step"),1);return e>0?e:1}get#k(){return this.hasAttribute("disabled")||this.matches(":disabled")}#P(){return Array.isArray(this.#d)||Array.isArray(xa(this.getAttribute("value"),this.#w))?[this.#w,this.#D]:this.#w}#j(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return xa(e,this.#P())}#N(e){let n=this.#w,r=this.#D,a=this.#V,o=n+Math.round((Math.min(r,Math.max(n,e))-n)/a)*a,i=Math.min(12,Math.max(pl(n),pl(r),pl(a)));return Number(Math.min(r,Math.max(n,o)).toFixed(i))}#Z(e){if(!Array.isArray(e))return this.#N(e);let n=this.#N(e[0]),r=this.#N(e[1]);return n<=r?[n,r]:[r,n]}#L(e){let n=this.#Z(e),r=Array.isArray(this.#d);this.#d=n,Array.isArray(n)?(r||(this.#I=!1),this.#g=this.#I?[n[1],n[0]]:[n[0],n[1]]):(this.#g=[n,n],this.#I=!1)}#_(e){let n=this.#D-this.#w;return n>0?(e-this.#w)/n*100:0}#R(){let e=this.#d,n=Array.isArray(e),r=n?e[0]:this.#w,a=n?e[1]:e,o=`${this.#_(r)}%`,i=`${this.#_(a)}%`,[s,l]=n?this.#g:[a,a];this.#r.style.setProperty("--_percent",`${this.#_(s)}%`),this.#a.style.setProperty("--_percent",`${this.#_(l)}%`),this.#r.toggleAttribute("data-last-active",this.#E===0),this.#a.toggleAttribute("data-last-active",this.#E===1),this.#c.style.setProperty("--_percent",`${this.#_(s)}%`),this.#s.style.setProperty("--_percent",`${this.#_(l)}%`),this.#a.hidden=!n;let c=n&&s===l;this.#c.hidden=c&&this.#E!==0,this.#s.hidden=!n||c&&this.#E!==1;let d="calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2)",u="calc(var(--anta-slider-thumb-size) / 2 - var(--slider-track-inset))",m=(h,f,b,g="0px",v="0px")=>{h.style.setProperty("--_fill-start",f),h.style.setProperty("--_fill-end",b),h.style.setProperty("--_fill-start-edge",g),h.style.setProperty("--_fill-end-edge",v)};this.hasAttribute("inverted")?(this.#n.hidden=n?r===this.#w:a===this.#D,m(this.#n,n?"0%":i,n?o:"100%",n||a===this.#w?d:"0px",n?"0px":u),this.#o.hidden=!n||a===this.#D,n&&m(this.#o,i,"100%","0px",u)):(this.#n.hidden=n?r===a:a===this.#w,m(this.#n,n?o:"0%",i,n&&r!==this.#w?"0px":d,n&&a===this.#D?u:"0px"),this.#o.hidden=!0),this.#H(this.#i,this.#h,this.#f,n?r:a,n?a:void 0),this.#H(this.#b,this.#p,this.#m,n?r:a,n?a:void 0),this.#H(this.#c,this.#A,this.#v,s),n&&this.#H(this.#s,this.#x,this.#S,l),this.#U(),this.#F()}#H(e,n,r,a,o){let i=this.getAttribute("value-prefix")??"",s=this.getAttribute("value-suffix")??"";if(e.textContent=String(a),n.textContent=i,r.textContent=s,e.prepend(n),e.append(r),o===void 0)return;let l=n.cloneNode(!0),c=r.cloneNode(!0);e.append("\u2013",l,String(o),c)}#q(e){let n=this.getAttribute("value-prefix")??"",r=this.getAttribute("value-suffix")??"";return`${n}${e}${r}`}#U(){let e=Array.isArray(this.#d),n=this.#u.assignedNodes({flatten:!0}).map(s=>s.textContent??"").join("").trim(),r=this.getRootNode(),a=(this.getAttribute("aria-labelledby")??"").split(/\s+/).map(s=>r.getElementById(s)?.textContent?.trim()??"").filter(Boolean).join(" "),o=(this.getAttribute("aria-label")??a??n).trim()||n,i=this.internals;i&&(i.role=e?"group":"slider",i.ariaLabel=!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&n||null,i.ariaValueMin=e?null:String(this.#w),i.ariaValueMax=e?null:String(this.#D),i.ariaValueNow=e?null:String(this.#d),i.ariaValueText=e?null:this.#q(this.#d));for(let[s,l]of[this.#r,this.#a].entries()){if(!e){l.removeAttribute("role"),l.tabIndex=-1,l.removeAttribute("aria-label"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuenow"),l.removeAttribute("aria-valuetext"),l.removeAttribute("aria-disabled");continue}let c=s===0!==this.#I?"minimum":"maximum",d=this.#g[s];l.role="slider",l.tabIndex=this.#k?-1:0,l.ariaLabel=o?`${o} ${c}`:`${c[0].toUpperCase()}${c.slice(1)} value`,l.ariaValueMin=String(this.#w),l.ariaValueMax=String(this.#D),l.ariaValueNow=String(d),l.ariaValueText=this.#q(d),l.ariaDisabled=this.#k?"true":null}}#F(){let e=this.internals;if(!e)return;let n=X0(this.#d);if(this.#k)e.setFormValue(null,n);else if(Array.isArray(this.#d)){let r=new FormData,a=this.getAttribute("name");a&&(r.append(a,String(this.#d[0])),r.append(a,String(this.#d[1]))),e.setFormValue(r,n)}else e.setFormValue(n,n)}#C(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#l.hidden=!e(this.#u)&&this.getAttribute("value-display")==="none",this.#y.hidden=!e(this.#y),this.#T.hidden=!e(this.#T)}#K(e,n=0){let r=this.#N(e);if(Array.isArray(this.#d)){let a=this.#d;if(this.#g[n]=r,this.#g[0]!==this.#g[1]&&(this.#I=this.#g[0]>this.#g[1]),this.#d=this.#I?[this.#g[1],this.#g[0]]:[this.#g[0],this.#g[1]],this.#E=n,this.#R(),ml(a,this.#d))return!1}else{if(r===this.#d)return!1;this.#d=r,this.#g=[r,r],this.#R()}return this.#M=!0,this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0}#z(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#$(e){let n=this.#t.getBoundingClientRect();return n.width<=0?Array.isArray(this.#d)?this.#g[this.#E]:this.#d:this.#w+(e-n.left)/n.width*(this.#D-this.#w)}#X(e){if(!Array.isArray(this.#d))return 0;let n=this.#$(e),r=Math.abs(n-this.#g[0]),a=Math.abs(n-this.#g[1]);return r===a?this.#E:r<a?0:1}#Y(e){if(this.#k||e.button!==0||this.#t.getBoundingClientRect().width<=0)return;let r=e.composedPath()[0]===this.#r?0:e.composedPath()[0]===this.#a?1:this.#X(e.clientX),a=Array.isArray(this.#d)?this.#g[r]:this.#d;this.#B={pointerId:e.pointerId,startX:e.clientX,startValue:a,startPublicValue:this.value,thumb:r},this.#e.setPointerCapture(e.pointerId),this.#e.dataset.dragging="",this.#e.dataset.pointerFocus="",this.#E=r,this.#r.toggleAttribute("data-last-active",r===0),this.#a.toggleAttribute("data-last-active",r===1),(Array.isArray(this.#d)?[this.#r,this.#a][r]:this).focus({preventScroll:!0}),[this.#r,this.#a][r].dataset.active="",this.getAttribute("track-click")==="jump"&&this.#K(this.#$(e.clientX),r),e.preventDefault()}#G(e){let n=this.#B;if(!n||n.pointerId!==e.pointerId)return;if(!(e.buttons&1)){this.#W(e);return}let r=this.getAttribute("track-click")==="jump"?this.#$(e.clientX):n.startValue+(e.clientX-n.startX)/this.#t.getBoundingClientRect().width*(this.#D-this.#w);this.#K(r,n.thumb),e.preventDefault()}#W(e){let n=this.#B;!n||n.pointerId!==e.pointerId||(this.#B=void 0,delete this.#e.dataset.dragging,delete[this.#r,this.#a][n.thumb].dataset.active,this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),ml(this.#d,n.startPublicValue)||this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#J(e){let n=e.composedPath()[0],r=Array.isArray(this.#d),a=n===this.#r?0:n===this.#a?1:void 0;if((r?a===void 0:n!==this)||this.#k||Ye(e))return;delete this.#e.dataset.pointerFocus;let o=Math.max(this.#V,(this.#D-this.#w)/10),i=r?this.#g[a??0]:this.#d,s;switch(e.key){case"ArrowRight":case"ArrowUp":s=i+this.#V;break;case"ArrowLeft":case"ArrowDown":s=i-this.#V;break;case"PageUp":s=i+o;break;case"PageDown":s=i-o;break;case"Home":s=this.#w;break;case"End":s=this.#D;break;default:return}e.preventDefault(),this.#K(s,r?a??0:0)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function gp(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",Jo)}gp();var bl=["aria-label","aria-labelledby","aria-description","aria-describedby","aria-invalid","aria-errormessage"],fl=new Set(bl),wp=Symbol("readDelegatedAria"),kp=Symbol("writeDelegatedAria"),J0="clearrequest",Q0="clearinput",ya=t=>String(t).padStart(2,"0"),vp=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),ex=(t,e)=>e==="pm"?t%12+12:t%12,xp=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},tx=`
797
- :host {
798
- display: grid;
799
- grid-template-columns: minmax(0, 1fr);
800
- row-gap: 4px;
801
- outline: none;
802
- }
803
-
804
- .label {
805
- display: none;
806
- color: var(--input-time-label);
807
- font-family: var(--sans-serif);
808
- font-size: var(--input-time-font-size);
809
- line-height: var(--input-time-line-height);
810
- font-weight: 500;
811
- }
812
-
813
- .field {
814
- --_bc: var(--input-time-border);
815
- --_bw: 0.5px;
816
-
817
- display: flex;
818
- align-items: center;
819
- box-sizing: border-box;
820
- min-height: var(--input-time-field-height);
821
- background: var(--input-time-bg);
822
- border-radius: var(--input-time-field-radius);
823
- box-shadow: inset 0 0 0 var(--_bw) var(--_bc);
824
- transition: box-shadow 120ms ease;
825
- }
826
- :host([status]:not([status="neutral"])) .field { --_bw: 1px; }
827
-
828
- @media (hover: hover) and (pointer: fine) {
829
- :host(:not(:disabled)) .field:hover {
830
- --_bc: var(--input-time-border-hover);
831
- --_bw: 1px;
832
- }
833
- }
834
- .field:focus-within {
835
- --_bc: var(--input-time-border-hover);
836
- --_bw: 1px;
837
- outline: 1px solid var(--focus-ring);
838
- outline-offset: 1px;
839
- }
840
- @media (forced-colors: active) { .field { border: 1px solid ButtonBorder; } }
841
-
842
- slot[name="leading"] {
843
- display: none;
844
- color: var(--input-time-adornment);
845
- font-size: var(--input-time-font-size);
846
- line-height: var(--input-time-line-height);
847
- }
848
- :host([dim-actions]) slot[name="leading"] { opacity: 0.6; transition: opacity 120ms ease; }
849
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="leading"],
850
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="leading"] { opacity: 1; }
851
- :host(:disabled) slot[name="leading"] { opacity: 0.5; pointer-events: none; }
852
-
853
- .segments {
854
- display: flex;
855
- align-items: center;
856
- flex: 1 1 auto;
857
- min-width: 0;
858
- padding-inline: 7px;
859
- color: var(--input-time-text);
860
- font-family: var(--sans-serif);
861
- font-stretch: normal;
862
- font-style: normal;
863
- font-size: var(--input-time-font-size);
864
- line-height: var(--input-time-line-height);
865
- font-weight: 400;
866
- }
867
-
868
- .seg {
869
- appearance: none;
870
- display: inline-block;
871
- box-sizing: border-box;
872
- min-width: 0;
873
- padding-inline: 1px;
874
- border: 0;
875
- border-radius: 2px;
876
- background: transparent;
877
- color: inherit;
878
- font: inherit;
879
- font-variation-settings: inherit;
880
- font-stretch: inherit;
881
- font-style: inherit;
882
- line-height: inherit;
883
- text-align: center;
884
- white-space: nowrap;
885
- outline: none;
886
- cursor: text;
887
- font-variant-numeric: tabular-nums;
888
- }
889
- .seg--period {
890
- field-sizing: content;
891
- width: auto;
892
- color: var(--input-time-period-color);
893
- }
894
- .seg::placeholder {
895
- color: var(--input-time-placeholder);
896
- opacity: 1;
897
- }
898
- .lit {
899
- margin-inline: -1px;
900
- white-space: pre;
901
- color: var(--input-time-text);
902
- }
903
-
904
- :host(:disabled) .segments { cursor: not-allowed; }
905
- :host(:disabled) .seg { cursor: not-allowed; }
906
-
907
- slot[name="trailing"] { display: none; }
908
- :host([dim-actions]) slot[name="trailing"],
909
- :host([dim-actions]) slot[name="clear"] { opacity: 0.6; transition: opacity 120ms ease; }
910
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="trailing"],
911
- :host([dim-actions]:not(:disabled)) .field:hover slot[name="clear"],
912
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="trailing"],
913
- :host([dim-actions]:not(:disabled)) .field:focus-within slot[name="clear"] { opacity: 1; }
914
-
915
- slot[name="clear"] {
916
- display: flex;
917
- align-items: center;
918
- flex-shrink: 0;
919
- visibility: hidden;
920
- }
921
- :host(:state(filled):not(:disabled)) slot[name="clear"] { visibility: visible; }
922
-
923
- .hint {
924
- display: none;
925
- gap: 4px;
926
- align-items: flex-start;
927
- padding-inline-start: 1px;
928
- color: var(--input-time-hint);
929
- font-family: var(--sans-serif);
930
- font-size: calc(var(--input-time-font-size) - 1px);
931
- line-height: calc(var(--input-time-line-height) - 2px);
932
- }
933
- `,yp=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=tx;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let r=document.createElement("div");r.className="field",r.part.add("field");let a=document.createElement("slot");a.name="leading",a.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"),r.append(a,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,r,document.createElement("slot"),l),t})(),wa=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","required",...bl];#e;#t;#n;#o;#r;#a=!1;#l=!1;#u=!1;#i=new Map;#h=new Set;#f=!1;#b="";#p=null;#m=null;#c=null;#s=[];#A=[];#v;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(!yp)throw new Error("a-input-time requires a DOM document");e.append(yp.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#s[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#J),this.#o=e.querySelector(".hint"),this.#o.addEventListener("slotchange",this.#ae),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#B),this.#r.addEventListener("input",this.#P),this.#r.addEventListener("keydown",this.#V),this.#r.addEventListener("focusin",this.#w),this.#r.addEventListener("focusout",this.#D),this.#r.addEventListener("paste",this.#k),this.addEventListener(J0,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#x(e)}else this.#u||this.#x(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#I(),this.#a=!0}#x(e){this.#Y(e),this.#b=this.value}attributeChangedCallback(e,n,r){if(fl.has(e)){if(this.#h.has(e))return;this.#S(e,r);return}if(this.#a){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#I();return}if(e==="status"){this.#te();return}if(e==="disabled"){this.#ee();return}if(e==="min"||e==="max"){this.#ne();return}if(e==="required"){this.#re(),this.#ne();return}}}}#S(e,n){n==null?this.#i.delete(e):this.#i.set(e,n),this.hasAttribute(e)&&(this.#h.add(e),super.removeAttribute(e),this.#h.delete(e)),this.#y(e),this.#T()}removeAttribute(e){if(fl.has(e)&&!this.#h.has(e)&&!this.hasAttribute(e)){let n=e;this.#i.delete(n)&&(this.#y(n),this.#T());return}super.removeAttribute(e)}toggleAttribute(e,n){if(fl.has(e)){let r=e,a=n??!this.#i.has(r);return this.#S(r,a?"":null),a}return super.toggleAttribute(e,n)}[wp](e){return this.#i.get(e)??null}[kp](e,n){this.#S(e,n==null?null:String(n))}#y(e){let n=this.#i.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#s)Wn(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#te();return}Wn(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#W(),(e==="aria-description"||e==="aria-describedby")&&this.#Q()}#T(){this.#f||(this.#f=!0,queueMicrotask(()=>{this.#f=!1;for(let e of this.#i.keys())this.#y(e)}))}get#d(){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.#d,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#I(){let e=this.#g,n=this.#d,r=this.#b,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=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=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#E=o,this.#O=i,this.#r.replaceChildren(),this.#s=[],this.#A=[];for(let s of a)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,vp(this.#E),vp(this.#O));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.#r.append(l),this.#s.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.#r.append(l),this.#A.push(s.value)}this.#Y(r);for(let s of this.#i.keys())this.#y(s);this.#T(),this.#W(),this.#Q(),this.#re(),this.#te(),this.#ee(),this.#z({dispatch:!1})}#E="AM";#O="PM";#M(e){if(e instanceof HTMLInputElement)return this.#s.find(n=>n.el===e)}#B=e=>{let n=this.#M(e.target);if(n){this.#v=n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#F(this.#s[0]))};#w=e=>{let n=this.#M(e.target);if(!n)return;let r=this.#v===n.el;this.#v=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#D=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#s.some(r=>r.el===n)||(this.#U()&&this.#z(),this.#G("change"))})};#V=e=>{if(Ye(e))return;let n=this.#M(e.target);if(!n)return;let{el:r}=n,a=e.key;if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#Z(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#Z(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#$(),this.#C(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#C(n,-1);return}n.kind!=="period"&&this.#A.some(o=>o.includes(a))&&(e.preventDefault(),this.#$(),this.#C(n,1,{numeric:!0}))};#k=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#Y(n),this.#z(),this.#G("change"))};#P=e=>{let n=this.#M(e.target);!n||e.isComposing||(n.kind==="period"?this.#N(e,n):this.#j(n))};#j(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#g,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#p=null:this.#m=null,this.#z({dispatch:!1,preserve:n});return}let i=r.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;a?s===0&&i.length===1?this.#p=null:s===0?(this.#p=12,this.#c="am"):s>12?(this.#p=s-12,this.#c="pm"):(this.#p=s,this.#c==null&&(this.#c="am")):this.#L(e,Math.max(e.min,s)),this.#z({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#C(e,1)}#N(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#c=null,this.#z({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#E.toLowerCase(),s=this.#O.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#c=l,this.#z({dispatch:!1}),this.#C(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#c=null,this.#z({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#c==="pm"?this.#O:this.#c==="am"?this.#E:""}#Z(e,n){if(e.kind==="period"){this.#c=this.#c==null?"am":this.#c==="am"?"pm":"am",this.#U(),this.#z();return}let r=e.kind==="hour"?this.#p:this.#m,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#L(e,o),this.#U(),this.#z()}#L(e,n){e.kind==="hour"?this.#p=n:this.#m=n,e.kind==="hour"&&this.#g&&this.#c==null&&(this.#c="am")}#_(e){let n=xp(e);return n?n.h*60+n.min:null}get#R(){return this.#_(this.getAttribute("min"))}get#H(){return this.#_(this.getAttribute("max"))}#q(){let e=this.#K;return e==null||this.#m==null?null:e*60+this.#m}#U(){let e=this.#q();if(e==null)return!1;let n=this.#R,r=this.#H,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#Y(`${ya(Math.floor(a/60))}:${ya(a%60)}`),!0)}#F(e){e&&(e.el.focus(),e.el.select())}#C(e,n,r={}){let a=this.#s.indexOf(e);for(let o=a+n;o>=0&&o<this.#s.length;o+=n){let i=this.#s[o];if(!r.numeric||i.kind!=="period"){this.#F(i);return}}}get#K(){return this.#p==null?null:this.#g?this.#c==null?null:ex(this.#p,this.#c):this.#p}#z({dispatch:e=!0,preserve:n}={}){this.#$(n),this.#b=this.value,this.#e?.setFormValue(this.value),this.#oe(),this.#ne(),e&&this.#G("input")}#$(e){for(let n of this.#s)this.#X(n,e===n.el)}#X(e,n){let r=e.el;if(e.kind==="period"){let o=this.#c==="pm"?this.#O:this.#c==="am"?this.#E:"";n||(r.value=o),r.placeholder=this.#E;return}let a=e.kind==="hour"?this.#p:this.#m;n||(r.value=a==null?"":ya(a)),r.placeholder="\u2013\u2013"}#Y(e){let n=xp(e);if(!n){this.#p=null,this.#m=null,this.#c=null;return}this.#m=n.min,this.#g?(this.#p=(n.h+11)%12+1,this.#c=n.h<12?"am":"pm"):(this.#p=n.h,this.#c=null)}#G(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#W(){if(this.#i.has("aria-label")||this.#i.has("aria-labelledby"))return;let e=this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-label",e):this.#r.removeAttribute("aria-label")}#J=()=>{this.#W()};#Q(){if(this.#i.has("aria-description")||this.#i.has("aria-describedby"))return;let e=this.#o.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-description",e):this.#r.removeAttribute("aria-description")}#ae=()=>{this.#Q()};#ee(){let e=this.hasAttribute("disabled")||this.#l;for(let n of this.#s)n.el.disabled=e}#te(){let e=this.getAttribute("status")==="critical",n=this.#i.get("aria-invalid");for(let r of this.#s)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#re(){let e=this.hasAttribute("required");for(let n of this.#s)n.el.setAttribute("aria-required",e?"true":"false")}#oe(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#ne(){if(!this.#e)return;let e=this.#s[0]?.el??this,n=this.hasAttribute("required"),r=this.#q(),a=this.#R,o=this.#H;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>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.#K;return e==null||this.#m==null?"":`${ya(e)}:${ya(this.#m)}`}set value(e){this.#u=!0;let n=e??"";n!==this.value&&(this.#Y(n),this.#a?this.#z({dispatch:!1}):this.#b=this.value)}clear(){this.#p=null,this.#m=null,this.#c=null,this.#z(),this.#G("change"),this.dispatchEvent(new CustomEvent(Q0,{bubbles:!0})),this.#s[0]?.el.focus()}focus(e){this.#s[0]?.el.focus(e)}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.#Y(this.getAttribute("defaultvalue")??""),this.#z(),this.#G("change")}formDisabledCallback(e){this.#l=e,this.#ee()}formStateRestoreCallback(e){this.value=e??""}};for(let t of bl)Object.defineProperty(wa.prototype,Xo(t),{configurable:!0,enumerable:!0,get(){return this[wp](t)},set(e){this[kp](t,e)}});function Ep(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",wa)}Ep();var gl=globalThis.Temporal;var Cp=(t,e)=>`Non-positive ${t}: ${e}`,Ap=(t,e)=>`Non-finite ${t}: ${e}`,Sp=t=>`Cannot convert bigint to ${t}`,Tp="Invalid object",ka=(t,e,n,r)=>Zn(t,e)+`; must be between ${n}-${r}`,Zn=(t,e)=>`Invalid ${t}: ${e}`;var vl=1e3,xl=1e6,yl=1e9,wl=6e10,kl=36e11;function ft(t){return t===void 0?Object.create(null):xn(t)}function Qo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Sp(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Ap(e,t));return t}function Ie(t,e){return Math.trunc(Qo(t,e))||0}function ei(t,e){return Mp(Ie(t,e),e)}function Mp(t,e="number"){if(t<=0)throw new RangeError(Cp(e,t));return t}function El(t,e,n){return Math.min(Math.max(t,e),n)}function $n(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xn(t){if(!$n(t))throw new TypeError(Tp);return t}function ni(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):xn(t)}var Qt="smallestUnit",ix={constrain:0,reject:1},sx={compatible:0,reject:1,earlier:2,later:3},lx={reject:0,use:1,prefer:2,ignore:3},cx={auto:0,never:1,critical:2,always:3},dx={auto:0,never:1,critical:2},ux={auto:0,never:1},hx={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Ip=[Math.floor,Wp,Math.ceil,Zp,Math.trunc,$p,Up,Yp,Gp],px={previous:-1,next:1};function Cl(t){let e=t.roundingIncrement;return e===void 0?1:Ie(e,"roundingIncrement")}function Al(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Aa(e)==="auto")return;P(Ca("fractionalSecondDigits",e))}e=Tt("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Sl(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=Aa(a),a==="auto")return r?n:null;let o=ti[a];return o===void 0&&(o=Ee.indexOf(a)),o<0&&P(Ol(t,a,ti)),o}function yn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=Aa(a),i=e[o];return i===void 0&&P(Ol(t,o,e)),i}var Sr=Fe(Sl,Qt),Dp=Fe(Sl,"largestUnit"),mx=Fe(Sl,"unit"),Op=Fe(yn,"overflow",ix),Pp=Fe(yn,"disambiguation",sx),fx=Fe(yn,"offset",lx),Tl=Fe(yn,"calendarName",cx),bx=Fe(yn,"timeZoneName",dx),gx=Fe(yn,"offset",ux),Tr=Fe(yn,"roundingMode",hx),vx=Fe(yn,"direction",px);function Ml(t,e,n,r){let a=r?Ft:bt[e+1];if(a){let o=bt[e];a%((t=Tt("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&P(Ca("roundingIncrement",t))}else t=Tt("roundingIncrement",t,1,n?10**9:1,1);return t}function Ar(t,e,n,r){return e!=null&&Tt(t,e,n,r,1,ai),e}function zp(t,e){e>t&&P(qp)}function Gn(t,e,n,r=9,a=0,o=4){e=ft(e);let i=Dp(e,a),s=Cl(e),l=Tr(e,o),c=Sr(e,a,1);return i=Ar("largestUnit",i,a,r),c=Ar(Qt,c,a,r),i==null?i=Math.max(n,c):zp(i,c),s=Ml(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function Bp(t,e,n){t=ni(t,Qt);let r=Dp(t),a=n(t.relativeTo),o=Cl(t),i=Tr(t,7),s=Sr(t);return r===void 0&&s===void 0&&P(jp),s==null&&(s=0),r==null&&(r=Math.max(s,e)),zp(r,s),o=Ml(o,s,1),o>1&&s>5&&r!==s&&P("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[r,s,o,i,a]}function Ea(t,e=6,n){let r=Cl(t=ni(t,Qt)),a=Tr(t,7),o=Sr(t);return o=Pl(Qt,o),o=Ar(Qt,o,0,e),r=Ml(r,o,void 0,n),[o,r,a]}function Lp(t,e){let n=e((t=ni(t,"unit")).relativeTo),r=mx(t);return r=Pl("unit",r),[r,n]}function Z(t){return t===void 0?0:Op(xn(t))}function wn(t,e=0){t=ft(t);let n=Pp(t),r=fx(t,e);return[Op(t),r,n]}function Rp(t){return Pp(ft(t))}function Np(t,e=4){let n=Al(t),r=Tr(t,4),a=Sr(t);return[r,...Dl(Ar(Qt,a,0,e),n)]}function _p(t){return t=ft(t),[Tl(t),...Np(t)]}function ri(t){return Tl(ft(t))}function Il(t,e){return Np(ft(t),e)}function Fp(t){t=ft(t);let e=Tl(t),n=Al(t),r=gx(t),a=Tr(t,4),o=Sr(t);return[e,bx(t),r,a,...Dl(Ar(Qt,o,0,4),n)]}function Vp(t){let e=Al(t=ft(t)),n=Tr(t,4),r=Sr(t);return[t.timeZone,n,...Dl(Ar(Qt,r,0,4),e)]}function Dl(t,e){return t!=null?[bt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function Hp(t){let e=ni(t,"direction"),n=vx(e,0);return n||P(Ca("direction",n)),n}var Ca=Zn;var Da=t=>`Missing ${t}`,om=t=>"No valid fields: "+t.join(),im="Invalid bag",Ol=(t,e,n)=>Zn(t,e)+"; must be "+Object.keys(n).join(),sm="Cannot use valueOf",lm="Invalid calling context",Wl=t=>"Missing year"+(t?"/era/eraYear":""),Xn="Invalid leap month",cm=t=>Zn("Calendar",t),dm=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Zl=t=>Zn("TimeZone",t),kn="Out-of-bounds date";var jp="Required smallestUnit or largestUnit",qp="smallestUnit > largestUnit",um=t=>`Cannot parse: ${t}`,en=t=>`Invalid substring: ${t}`;var $l=El,Ke=$n;function P(t){throw new RangeError(t)}function he(t){throw new TypeError(t)}function Nl(t,e,n,r,a){return Tt(e,((o,i)=>{let s=o[i];return s===void 0&&he(Da(i)),s})(t,e),n,r,a)}function Tt(t,e,n,r,a,o){let i=$l(e,n,r);return a&&e!==i&&P(((s,l,c,d,u)=>u?ka(s,u[l],u[c],u[d]):ka(s,l,c,d))(t,e,n,r,o)),i}function Ir(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var hm=t=>pi({name:t},1),pi=(t,e)=>An(n=>({value:n,configurable:1,writable:!e}),t),Oa=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function An(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Pa(t,e){let n={};for(let r of t)n[r]=e;return n}function Gl(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function Ht(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function pm(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function xx(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function Fe(t,...e){return(...n)=>t(...e,...n)}function Kl(){}function Kp(t){return t[0].toUpperCase()+t.substring(1)}function Le(...t){return[].concat(...t).sort()}function Pr(t){return new RegExp(`^${t}$`,"i")}function Xl(t){return parseInt(t.padEnd(9,"0"))}function Jl(t){return t&&t!=="+"?-1:1}function Mr(t){return t===void 0?0:parseInt(t)}function ii(t,e){return String(e).padStart(t,"0")}var Mt=Fe(ii,2);function tn(t,e){return Math.sign(t-e)}function ot(t,e){return t<e?-1:t>e?1:0}function mm(t,e){let n=t/e;return t%e<0n?n-1n:n}function Ql(t,e){let n=mm(t,e);return[n,t-n*e]}function Vt(t,e){return[Math.floor(t/e),mi(t,e)]}function mi(t,e){return(t%e+e)%e}function zr(t,e){return Math.trunc(t/e)||0}function ec(t,e){return t%e||0}function Up(t){return t<0?Math.floor(t):Math.ceil(t)}function fm(t,e=1){return e*(.5+t/5)}function Yp(t){return Math.sign(t)*Math.round(Math.abs(t))||0}function Wp(t){return fi(t)?Math.floor(t):Math.round(t)}function Zp(t){return fi(t)?Math.ceil(t):Math.round(t)}function $p(t){return fi(t)?Math.trunc(t)||0:Math.round(t)}function Gp(t){return fi(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)}function fi(t){return Math.abs(t%1)===.5}var tc="iso8601",bm="gregory",yx={bce:-1,ce:0};function gm(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 it=void 0,vm=0;function Dt(t){return t===it?"iso8601":t===0?"gregory":t.id}var wx=/^M(\d{2})(L?)$/;function xm(t){let e=wx.exec(t);return e||P((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function ym(t,e){return"M"+Mt(t)+(e?"L":"")}function _l(t,e,n){return t+(e||n&&t>=n?1:0)}var ti={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},ai=Object.keys(ti);var za=vl,Ba=xl,Sn=yl,La=wl,Ra=kl,Ft=864e11,bt=[1,za,Ba,Sn,La,Ra,Ft],kx=BigInt(za),Br=BigInt(Ba),Jn=BigInt(Sn),Ex=BigInt(La),Cx=BigInt(Ra),Ce=BigInt(Ft);function wm(t,e){let n=Number(t/Ce),r=Number(t%Ce);return n*(Ft/e)+(Math.trunc(r/e)+r%e/e)}var We=ai.slice(0,6),Na=Gl(We),bi=["year"],er=["day"],nc=["day","month","year"],gi=["offset"],rc=["timeZone"],Lr=["era","eraYear"],Ax=["era","eraYear","year"],km=["month","monthCode"],Sx=["day","month","monthCode"],Fl=Le(We),Tx=Le(Lr,bi),_a=Le(km,bi),Em=Le(Lr,_a),Fa=Le(["monthCode"],bi),Cm=Le(Lr,Fa),Am=Le(er,["monthCode"]),tr=Le(er,_a),nr=Le(er,Lr,_a),Sm=Le(tr,We),Tm=Le(nr,We),Mx=Le(tr,We,gi),Ix=Le(nr,We,gi),Mm=Le(tr,We,gi,rc),Im=Le(nr,We,gi,rc),Dx=Le(er,Fa),Ox=Le(er,Lr,Fa),Ot=Pa(We,0);function Va(t){return vi(t,1),t}var Px={hour:23,minute:59,second:59};function vi(t,e){let n={};for(let r of We)n[r]=Tt(r,t[r],0,Px[r]||999,e);return n}function st(t){return oc(t)*Sn+Dm(t)}function ac(t){return 1e3*oc(t)+t.millisecond}function oc(t){return 3600*t.hour+60*t.minute+t.second}function Dm(t){return t.millisecond*Ba+t.microsecond*za+t.nanosecond}function ic(t){let[e,n]=Vt(t,Ft);return[Om(n),e]}function Om(t){let[e,n]=Vt(t,Ba),[r,a]=Vt(n,za);return zx(e,r,a)}function zx(t,e=0,n=0){let[r,a]=Vt(t,36e5),[o,i]=Vt(a,6e4),[s,l]=Vt(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Xp(t){let[e,n]=Ql(t,Jn);return[Number(e),Number(n)]}function Ha(t){return Number(mm(t,Br))}function Ve(t){return nn(t)+BigInt(st(t))}function Pm(t){return ja(t)+ac(t)}function nn(t){return BigInt(jt(t))*Ce}function ja(t){return 864e5*jt(t)}function jt(t){return Sa(t.year,t.month,t.day)}function Sa(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=mi(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(zr(t,400)+1)+n}function qa(t){let[e,n]=Ql(t,Ce);return{...zm(Number(e)),...Om(Number(n))}}function zm(t){let e=new Date(864e5*mi(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var Bm=1972;function Bx(t){return[t,0]}function Vl(t,e){if(!e)return{year:1972,month:t}}function Lx(t,e,n){return{year:t,month:e,day:n}}function Lm(t,e){switch(e){case 2:return xi(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Rx(t){return xi(t)?366:365}function xi(t){return t%4==0&&(t%100!=0||t%400==0)}function Nx(t,e,n){return t+=zr(n,12),(e+=ec(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function _x(t,e,n,r){return 12*(n-t)+r-e}function yi(t){return mi(Sa(t.year,t.month,t.day)+4,7)||7}function Rm(t){return Sa(t.year,t.month,t.day)-Sa(t.year)+1}function Nm(t){let e=t.year,n=Math.floor((Rm(t)-yi(t)+10)/7),r=zl(e);return n<1?n=r=zl(--e):n>r&&(n=1,r=zl(++e)),{weekOfYear:n,yearOfWeek:e,De:r}}function zl(t){let e=yi({year:t,month:1,day:1});return e===4||e===3&&xi(t)?53:52}function Fx({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Ua(t){return an(t),Va(t)}function an(t){return _m(t,1),t}function Jp(t){return pm(nc,t,_m(t))}function _m(t,e){let{year:n}=t,r=Nl(t,"month",1,12,e);return{year:n,month:r,day:Nl(t,"day",1,Lm(n,r),e)}}function we(t,e){return t?t.de(e):e}function Qn(t,e,n){return t?t.N(e,n):Bx(n)}function Ya(t,e){return t===0?Fx(e):t&&t.h?.(e)||{}}function rr(t,e,n,r){return t?t.fe(e,n,r):Lx(e,n,r)}function Ta(t,e){return t?t.j(e):12}function Ma(t,e,n){return t?t.o(e,n):Lm(e,n)}function wi(t,e){let{year:n,month:r}=we(t,e),[a,o]=Qn(t,n,r);return ym(a,o)}function sc(t,e){let{year:n}=we(t,e);return t?t.q(n):xi(n)}function lc(t,e){let{year:n}=we(t,e);return Ta(t,n)}function cc(t,e){let{year:n,month:r}=we(t,e);return Ma(t,n,r)}function dc(t,e){let{year:n}=we(t,e);return t?t.i(n):Rx(n)}function Fm(t,e){if(!t)return Rm(e);let{year:n}=we(t,e),r=rr(t,n,1,1);return jt(e)-jt(r)+1}function Vm(t,e){return t===it?Nm(e).weekOfYear:void 0}function Hm(t,e){return t===it?Nm(e).yearOfWeek:void 0}var Ee=ai.map(t=>t+"s"),uc=Gl(Ee),jm=Le(Ee),Vx=Ee.slice(0,6),qm=Ee.slice(6),Hx=qm.slice(1),ze=Pa(Ee,0),hc=Pa(Vx,0),pc=Fe(xx,Ee);function Pl(t,e){return e==null&&P(Da(t)),e}var He=Fe(jx,"string");function jx(t,e,n=t){return typeof e!==t&&he(Ca(n,e)),e}function mc(t,e="number"){return Number.isInteger(t)||P(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Aa(t){return typeof t=="symbol"&&he("Cannot convert Symbol to string"),String(t)}function fc(t){if(!$n(t))return t;let e=t[Symbol.toPrimitive];if(e!=null){typeof e!="function"&&he();let n=Reflect.apply(e,t,["string"]);return $n(n)&&he(),n}return Date.prototype[Symbol.toPrimitive].call(t,"string")}function ki(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&he(`Invalid bigint: ${t}`),t)}function Wa(t,e){return mc(Qo(t,e),e)}function Ae(t,e){return Ht(nc,t,Ht(We,e))}var bc=BigInt(1e8)*Ce,gc=BigInt(-1e8)*Ce,Um=gc-Ce,Ym=-3261848;function Ei(t){let e=12*t.year+t.month;return(e<Ym||e>3309129)&&P(kn),t}function lt(t,e=1){let n=nn(t);return(n<(e?Um:gc)||n>bc)&&P(kn),t}function ar(t){return qx(Ve(t)),t}function qx(t){return(t<=Um||t>=bc+Ce)&&P(kn),t}function zt(t){return(t<gc||t>bc)&&P(kn),t}function vc(t,e){return zt(nn(t)+BigInt(st(t)-e))}function Dr(t,e,n){return xc(t/e,n)*e}function xc(t,e){return Ip[e](t)}function Ux(t,e,n,r){let a=yc(t,e,r,n);return Wm(a,Number(n-a.I)/Number(a.O-a.I))}function Yx(t,e,n,r){return Dr(Wm(t,Zm(e,t.I,t.O)),n,r)}function yc(t,e,n,r){let a=Qp(t,e,n);return((o,i,s,l)=>l>0?i<=o&&o<=s:s<=o&&o<=i)(r,a.I,a.O,Math.sign(e))||(a=Qp(t+e,e,n)),a}function Qp(t,e,n){let r=t+e;return{ve:t,qe:r,I:n(t),O:n(r)}}function Wm(t,e){return t.ve+e*(t.qe-t.ve)}function Zm(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=ot(a,0n)===ot(r,0n)?1:-1;return ot(o,i)<=0?o===i?s:fm(ot(2n*o,i),s):Number(a)/Number(r)}function gt(t){return{epochNanoseconds:t}}function vt(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function qt(t,e){return Ht(We,t,ke(t,e))}function ke(t,e){return Ht(nc,t,{calendar:e})}function or(t){return Ht(We,t)}function Pt(t){return Ht(Ee,t,{sign:Qa(t)})}function $m(t,e,n,r){return vt(e===6?Zx(t,r):$x(t,e,n,r),t.timeZone,t.calendar)}function Gm(t){let[e,n]=Xm(t);return wm(n-e,Ra)}function Km(t){let{timeZone:e,calendar:n}=t;return vt(Or(e,Ae(Be(t),Ot)),e,n)}function Ci(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=Qa(t)||1,c=ci(r,s)?s&&r<6&&n>=6?Kx:Xx:Gx,[d,u,m]=c(l,t,e,n,r,a,o,i);return m&&r!==7&&(d=((h,f,b,g,v,x)=>{for(let w=g+1;w<=b;w++){if(w===7&&b!==7)continue;let I=pc(w,h);I[Ee[w]]+=v;let C=ot(f,Oi(x,I));if(C&&C!==v)break;h=I}return h})(d,u,n,Math.max(6,r),l,i)),d}function Wx(t,e,n){let r=Math.min(Cn(t),6);return En(Ti(rn(t),BigInt(e),n),r)}function Zx(t,e){let[n,r]=Xm(t);return Jx(t.epochNanoseconds,n,r,e)}function $x(t,e,n,r){if(e===0&&n===1)return t.epochNanoseconds;let a=Be(t);return Nr(t.timeZone,Ai(a,Rr(e,n),r),a.offsetNanoseconds,2,0,1)}function Ai(t,e,n){let[r,a]=Si(t,e,n),o=Ae(Fr(t,a),r);return ar(o),o}function Si(t,e,n){return ic(Dr(st(t),e,n))}function Gx(t,e,n,r,a,o,i,s){let l=Ee[a],c=pc(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=zr(e[l],o)*o,u=yc(d,o*t,h=>(c[l]=h,Oi(s,c)),n),m=Yx(u,n,o,i);return c[l]=m,[c,m===u.qe?u.O:u.I,m!==d]}function Kx(t,e,n,r,a,o,i,s){let l=Number(Vr(e)),c=Rr(a,o),d=Dr(l,c,i),u={...e,...hc},m=yc(u.days,t,x=>(u.days=x,Oi(s,u)),n),h=m.I,f=m.O,b=d-Number(f-h),g=0;b&&Math.sign(b)!==t?n=h+BigInt(d):(g+=t,d=Dr(b,c,i),n=f+BigInt(d));let v=Pi(d);return[{...e,...v,days:e.days+g},n,!!g]}function Xx(t,e,n,r,a,o,i){let s=rn(e),l=Ti(s,Za(a,o),i),c=l-s,d=Math.sign(Number(l/Ce)-Number(s/Ce))===t,u=En(l,Math.min(r,6));return[{...e,...u},n+c,d]}function Xm(t){let{timeZone:e}=t,n=Ae(Be(t),Ot),r=Ae(Fr(n,1),Ot);return[Or(e,n),Or(e,r)]}function Jx(t,e,n,r){return xc(Zm(t<n?t:n-1n,e,n),r)?n:e}function si(t){return Dr(t,La,7)}function Ti(t,e,n){return Jm(t,e,n,t/e%2n)}function Mi(t,e,n){let[r,a]=Ql(t,Ce),o=r*Ce;return o+Jm(a,e,n,(o/e+a/e)%2n)}function Jm(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=fm(ot(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=xc(Number(r)+i,n);return(a-r+BigInt(s))*e}function Rr(t,e){return bt[t]*e}function Za(t,e){return BigInt(bt[t])*BigInt(e)}var Be=Ir(Qx,WeakMap);function Qx(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...qa(e+BigInt(r)),offsetNanoseconds:r}}function Nr(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return vc(e,n);r!==2&&r!==0||lt(e,0);let s=t.R(e);if(n!==void 0&&r!==3){let l=((c,d,u,m)=>{let h=Ve(d);m&&(u=si(u));for(let f of c){let b=Number(h-f);if(m&&(b=si(b)),b===u)return f}})(s,e,n,o);if(l!==void 0)return l;r===0&&P("Invalid TimeZone offset")}return i?Ve(e):_r(t,e,a,s)}function _r(t,e,n=0,r=t.R(e)){if(r.length===1)return r[0];if(n===1&&P("Ambiguous offset"),r.length)return r[n===3?1:0];let a=Ve(e),o=((s,l)=>{let c=s.B(l-Ce);return(d=>(d>Ft&&P("Out-of-bounds TimeZone gap"),d))(s.B(l+Ce)-c)})(t,a),i=qa(a+BigInt(o*(n===2?-1:1)));return(r=t.R(i))[n===2?0:r.length-1]}function Or(t,e){let n=t.R(e);if(n.length)return n[0];let r=Ve(e)-Ce;return t.C(r,1)}function wc(t,e,n,r=0){Qa(n)&&Cn(n)<8&&P("Cannot use small units");let a=lt(Ia(t,e));return Ia(t,on(t,a,n,r))}function $a(t,e,n=0){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=Vr(e),s=a;if(Dc(e)){let l=Be(t);s=_r(o,Ae(on(r,l,{...e,...hc},n),l))+i}else s+=i;return{...t,epochNanoseconds:zt(s)}}function Ga(t,e,n,r=0){let[a,o]=Ii(e,n);return ar(Ae(on(t,e,{...n,...hc,days:n.days+o},r),a))}function Ii(t,e){return ey(t,Vr(e))}function kc(t,e){return ty(t,(Dc(n=e)&&P("Cannot use large units"),Vr(n)));var n}function on(t,e,n,r=0){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(Vr(n)/Ce),a||o)l=li(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=Fr(l,7*i+s)),lt(l)}function Ia(t,e){return Fr(e,1-we(t,e).day)}function li(t,e,n,r,a){let o=we(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Qn(t,i,s);i+=n,s=Hl(t,c,d,t?t.p(i):void 0,a),s=Tt("month",s,1,Ta(t,i),a)}return r&&({year:i,month:s}=Qm(t,i,s,r)),l=Tt("day",l,1,Ma(t,i,s),a),rr(t,i,s,l)}function Qm(t,e,n,r){return t?t.ae(e,n,r):Nx(e,n,r)}function Hl(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&P(Xn),o<0?-o:e)}return _l(e,0,r)}function ey(t,e){let n=Number(e/Ce),r=Number(e%Ce),[a,o]=ic(st(t)+r);return[a,n+o]}function ty(t,e){return zt(t+e)}function Fr(t,e){return e?zm(jt(t)+e):t}function Ka(t,e){return Dt(t)!==Dt(e)&&P("Mismatching Calendars"),t}function ef(t,e){return t.m!==e.m&&P("Mismatching TimeZones"),t}function tf(t){return t.timeZone.id}function nf(t,e,n,r,a,o,i){return r<6?Xa(e.epochNanoseconds,n.epochNanoseconds,r,a,o,i):((s,l,c,d,u,m,h)=>{let f=c.epochNanoseconds;if(f===l.epochNanoseconds)return ze;let b,g=ef(l.timeZone,c.timeZone);return b=Ec(g,s,l,c,d),b=Ci(b,f,d,u,m,h,Ac(s,g,l),1),b})(t,e,n,r,a,o,i)}function rf(t,e,n,r,a,o,i){return r<=6?Xa(Ve(e),Ve(n),r,a,o,i):((s,l,c,d,u,m,h)=>{let f=Ve(c),b=ot(f,Ve(l));if(!b)return ze;let g;return g=df(s,l,c,b,d),g=Ci(g,f,d,u,m,h,((v,x)=>({ne:Ve(x),ke:w=>Ve(Ae(on(v,x,w),x))}))(s,l)),g})(t,e,n,r,a,o,i)}function af(t,e,n,r,a,o,i){let s=Ia(t,e),l=Ia(t,n);return Cc(s,l)?lf(t,lt(s),lt(l),r,a,o,i,8):ze}function of(t,e,n,r,a,o,i,s=6){return r===6?Xa(nn(e),nn(n),r,a,o,i):lf(t,e,n,r,a,o,i,s)}function sf(t,e,n,r,a,o){let i=Dr(st(e)-st(t),Rr(r,a),o);return{...ze,...Pi(i,n)}}function lf(t,e,n,r,a,o,i,s=6){let l=nn(n);if(!Cc(e,n))return ze;let c;return c=Di(t,e,n,r),a===s&&o===1||(c=Ci(c,l,r,a,o,i,Sc(t,e))),c}function Xa(t,e,n,r,a,o){return{...ze,...En(Ti(e-t,Za(r,a),o),n)}}function Ec(t,e,n,r,a){return a<6?{...ze,...En(r.epochNanoseconds-n.epochNanoseconds,a)}:((o,i,s)=>{let l=ot(s.epochNanoseconds,i.epochNanoseconds);if(!l)return ze;if(!Cc(Be(i),Be(s)))return{...ze,...En(s.epochNanoseconds-i.epochNanoseconds,5)};let[c,d,u]=ny(o,i,s,l);return{...(m=c,h=d,Di(e,m,h,a)),...Pi(u)};var m,h})(t,n,r)}function cf(t,e,n,r){let a=Ve(e),o=Ve(n),i=ot(o,a);return i?r<=6?{...ze,...En(o-a,r)}:df(t,e,n,i,r):ze}function df(t,e,n,r,a){let o=n,i=st(n)-st(e);return Math.sign(i)===-r&&(o=Fr(n,-r),i+=Ft*r),{...Di(t,e,o,a),...Pi(i)}}function ny(t,e,n,r){let a=Be(e),o=Be(n),i=n.epochNanoseconds,s=0,l=st(o)-st(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;;s++){let d=Fr(o,s*-r),u=_r(t,Ae(d,a));if(s===c||ot(i,u)!==-r)return[a,d,Number(i-u)]}}function Di(t,e,n,r){if(r<=7)return((b,g,v)=>{let x=Bl(g,v);return b?{...ze,weeks:zr(x,7),days:ec(x,7)}:{...ze,days:x}})(r===7,e,n);let a=we(t,e),o=we(t,n);if(r===8){let{year:b,month:g,day:v}=a,{year:x,month:w,day:I}=o,C=Math.sign(tn(x,b)||tn(w,g)||Bl(e,n)),B=0,L=0;if(C){B=t?t.ee(b,g,x,w):_x(b,g,x,w);let D=li(t,e,0,B,0);C*tn(v,I)>0&&(B-=C,D=li(t,e,0,B,0)),L=Bl(D,n)}return{...ze,months:B,days:L}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,m=c-i,h=d-s,f=u-l;if(m||h){let b=Math.sign(m||h),g=Ma(t,c,d),v=0;if(Math.sign(u-l)===-b){let x=g;({year:c,month:d}=Qm(t,c,d,-b)),m=c-i,h=d-s,g=Ma(t,c,d),v=b<0?-x:g}if(f=u-Math.min(l,g)+v,m){let[x,w]=Qn(t,i,s),[I,C]=Qn(t,c,d),B=t?t.l:void 0;if(h=B!==void 0&&w&&!C&&(B<0?b>0&&I===-B:b<0&&I===x)?0:I-x||Number(C)-Number(w),Math.sign(h)===-b){let L=b<0&&-Ta(t,c);c-=b,m=c-i,h=d-Hl(t,x,w,t?t.p(c):void 0,0)+(L||Ta(t,c))}else if(t){let L=Hl(t,x,w,t.p(c),0);h=t.ee(c,L,c,d)}}}return{...ze,years:m,months:h,days:f}}function Cc(t,e){return tn(t.year,e.year)||tn(t.month,e.month)||tn(t.day,e.day)}function Bl(t,e){return jt(e)-jt(t)}function uf(t,e,n){return Ja(t)?((r,a,o)=>{let{calendar:i,timeZone:s}=r,l=$a(r,a);return[Ec(s,i,r,l,o),l.epochNanoseconds,Ac(i,s,r)]})(t,e,n):((r,a,o)=>{let{calendar:i}=r,s=ar(Ae(r,Ot)),l=Ga(i,s,a);return[cf(i,s,l,o),Ve(l),Sc(i,r)]})(t,e,n)}function em(t,e){return Ja(t)?$a(t,e).epochNanoseconds:Ve(Ga(t.calendar,Ae(t,Ot),e))}function Oi(t,e){return Dc(e)?t.ke(e):t.ne}function Ac(t,e,n){let r=Be(n);return{ne:n.epochNanoseconds,ke:a=>_r(e,Ae(on(t,r,a),r))}}function Sc(t,e){return{ne:nn(e),ke:n=>nn(on(t,e,n))}}function Ja(t){return"timeZone"in t}function ci(t,e){return t<=6-(e?1:0)}function Tc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=bt[a];r[n[a]]=zr(t,o),t=ec(t,o)}return r}var ry=2**53;function Mc(t,e,n){let r=Math.max(Cn(e),Cn(n));return r>6&&P("Cannot use large units"),((a,o,i,s)=>Pt(Tn(((l,c,d,u)=>{let m=rn(l)+rn(c)*BigInt(u?-1:1);return Number.isFinite(Number(m/Ce))||P(kn),{...ze,...En(m,d)}})(o,i,s,a))))(t,e,n,r)}function hf(t,e,n){let r=Cn(e),[a,o,i,s,l]=Bp(n,r,t);if(!l&&Math.max(r,a)<=6)return Pt(Tn(((h,f,b,g,v)=>{let x=Ti(rn(h),Za(b,g),v);return{...ze,...En(x,f)}})(e,a,o,i,s)));l||P("Missing relativeTo");let c=Ja(l);if(!e.sign&&(!c||a<6))return e;let[d,u,m]=uf(l,e,a);return Pt(Ci(d,u,a,o,i,s,m,c))}function pf(t){return t.sign===-1?Ic(t):t}function Ic(t){return Pt(xt(t))}function xt(t){let e={};for(let n of Ee)e[n]=-1*t[n]||0;return e}function Qa(t,e=Ee){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&P("Cannot mix duration signs"),n=a)}return n}function Tn(t){for(let n of Hx)ay(n,t[n]);let e=rn(t);return mf(Number(e/Jn)),t}function ay(t,e){return Tt(t,e,-4294967295,4294967295,1)}function mf(t){Number.isSafeInteger(t)||P("Out-of-bounds duration")}function rn(t){return BigInt(t.days)*Ce+Vr(t)}function Vr(t){return BigInt(t.hours)*Cx+BigInt(t.minutes)*Ex+ff(t)}function ff(t){return BigInt(t.seconds)*Jn+BigInt(t.milliseconds)*Br+BigInt(t.microseconds)*kx+BigInt(t.nanoseconds)}function En(t,e=6){let n=Number(t/Ce),r=Number(t%Ce),a=bt[e],o=e<=3?Number(t/BigInt(a)):n*(Ft/a)+zr(r,a);Number.isFinite(o)||P(kn),e<=3&&Math.abs(o)/(Sn/bt[e])>=ry&&P(kn);let i=Tc(r,e,Ee);return i[Ee[e]]=o,i}function Pi(t,e=5){return Tc(t,e,Ee)}function Dc(t){return!!Qa(t,qm)}function Cn(t){let e=9;for(;e>0&&!t[Ee[e]];e--);return e}function eo(t,e){return ot(t.epochNanoseconds,e.epochNanoseconds)}function bf(t,e,n,r){let a=t(ft(r).relativeTo),o=Math.max(Cn(e),Cn(n));return pm(Ee,e,n)?0:ci(o,a&&Ja(a))?ot(rn(e),rn(n)):(a||P("Missing relativeTo"),ot(em(a,e),em(a,n)))}function Oc(t,e){return ir(t,e)||zi(t,e)}function ir(t,e){return tn(jt(t),jt(e))}function zi(t,e){return tn(st(t),st(e))}function gf(t,e){return!eo(t,e)}function vf(t,e){return!eo(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function xf(t,e){return!Oc(t,e)&&t.calendar===e.calendar}function yf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function wf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function kf(t,e){return!ir(t,e)&&t.calendar===e.calendar}function Ef(t,e){return!zi(t,e)}function to(t){return t===0?yx:t?t.k:void 0}function Ze(t,e,n=e){return to(t)?n:e}function Cf(t,e){let n=e||void 0,r=to(e),{era:a,eraYear:o,year:i}=t;if(i!==void 0&&(i=Ie(i,"year")),o!==void 0&&(o=Ie(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||he("Mismatching era/eraYear"),r||P("Forbidden era/eraYear");let s=gm(a),l=r[s];l===void 0&&P((d=>`Invalid era: ${d}`)(a));let c=n?._?n._(o,s,l):oy(o,l);i!==void 0&&i!==c&&P("Mismatching year/eraYear"),i=c}else i===void 0&&he(Wl(r));return i}function di(t,e,n,r,a){let{month:o,monthCode:i}=t;if(i!==void 0){let s=((l,c,d,u,m=xm(c))=>{let h=l?l.p(d):void 0,[f,b]=m,g=_l(f,b,h);if(b){let v=l?l.l:void 0;v===void 0&&P(Xn),v>0?(g>v&&P(Xn),h!==g&&(u===1&&P(Xn),g=_l(f,0,h))):(g!==-v&&P(Xn),h===void 0&&u===1&&P(Xn))}return g})(e,i,n,a,r);o!==void 0&&o!==s&&P("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&he("Missing month/monthCode");return Tt("month",o,1,Ta(e,n),a)}function jl(t,e,n,r,a){return Nl(t,"day",1,Ma(e,n,r),a)}function oy(t,e){return(e+t)*(Math.sign(e)||1)||0}function Hr(t,e){return vi(Ht(We,{...Ot,...t}),e)}var iy=Pr("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Bi(t){let e=Pc(t);return e===void 0&&P(um(t)),e}function Pc(t,e){let n=iy.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.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))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&P(en(o)),s=(Mr(r[2])*Ra+Mr(r[3])*La+Mr(r[4])*Sn+Xl(r[5]||""))*Jl(r[1]),Math.abs(s)>=Ft&&P("Out-of-bounds offset"),s;var s})(n,e)}var yt={era:Aa,month:ei,monthCode(t,e){return He(fc(t),e)},day:ei},zc=Pa(We,Ie),Af=Pa(Ee,Wa),Bc=Object.assign({},yt,zc),Lc={offset(t){return Bi(He(fc(t)))},...Bc};function Te(t,e,n,r,a=!r){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 r&&r.includes(s)&&he(Da(s))}return a&&!i&&he(om(e)),o}function wt(t,e,n){let r=to(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||he(Wl(r)),t.monthCode===void 0&&t.month===void 0&&he("Missing month/monthCode"),n||t.day!==void 0||he(Da("day"));let a=Sf(t);return[Cf(t,e),a]}function Li(t,e){let n=e===it,r=to(e);t.day===void 0&&he(Da("day")),n||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||he(Wl(r));let a=Sf(t);return[t.eraYear!==void 0||t.year!==void 0?Cf(t,e):void 0,a]}function no(t,e=Ot,n){let r=Ae(t,e);return ar(r),qt(r,n)}function sn(t,e,n,r,a){let o=di(t,e,n,r,a);return ke(lt(rr(e,n,o,jl(t,e,n,o,a))),e)}function Ri(t,e,n,r,a){return sy(e,n,di(t,e,n,r,a))}function Ni(t,e,n,r,a){let o=e===it,i=n,s,l,c;if(i===void 0&&o&&(i=1972),i!==void 0){o||lt(rr(e,i,1,1));let d=di(t,e,i,r,a);s=jl(t,e,i,d,a),[l,c]=Qn(e,i,d)}else{t.monthCode===void 0&&he("Missing month/monthCode"),[l,c]=r;let d=e?e.re:1972;if(d!==void 0)s=jl(t,e,d,di(t,e,d,r,a),a);else{let u=a===0&&e?e.ge?.(l,c,t.day):void 0;s=u!==void 0?u:t.day}}return ly(e,l,c,s,t.day,a)}function sy(t,e,n){return ke(Ei(rr(t,e,n,1)),t)}function ly(t,e,n,r,a,o){let i=n;i&&((t&&t.V?.[e])??1/0)<a&&(o===1&&P(Xn),i=0,r=$l(a,1,(t&&t.U)??1/0));let s=t?t.u(e,!!i,r):Vl(e,!!i);for(;!s&&o===0&&r>1;)r--,s=t?t.u(e,!!i,r):Vl(e,!!i);s||P("Cannot guess year");let{year:l,month:c}=s;return ke(lt(rr(t,l,c,r)),t)}function Sf(t){if(t.monthCode!==void 0)return xm(t.monthCode)}var Ut=Intl.DateTimeFormat;function cy(t,e){e<-864e13&&P(kn);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var dy={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},Ll=-388152e4;function Rc(t,e,n){let[r,a,o,i]=Vp(n),s=r!==void 0;return((l,c,d,u,m,h)=>{d=Mi(d,BigInt(m),u);let f=c.B(d);return qc(qa(d+BigInt(f)),h)+(l?ro(si(f)):"Z")})(s,Xe(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Nc(t,e){let n=Fp(e);return((r,a,o,i,s,l,c,d,u,m)=>{i=Mi(i,BigInt(u),d);let h=o.B(i);return qc(qa(i+BigInt(h)),m)+ro(si(h),c)+py(a,l)+Uc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function _c(t,e){let n=_p(e);return((r,a,o,i,s,l)=>qc(Ai(a,s,i),l)+Uc(r,o))(t.calendar,t,...n)}function Fc(t,e){return n=t.calendar,r=t,a=ri(e),ui(r)+Uc(n,a);var n,r,a}function Vc(t,e){return Tf(t.calendar,Mf,t,ri(e))}function Hc(t,e){return Tf(t.calendar,hy,t,ri(e))}function Tf(t,e,n,r){let a=r>1||r===0&&t!==it;return r===1?t===it?e(n):ui(n):a?ui(n)+Df(Dt(t),r===2):e(n)}function jc(t,e){return((n,r,a,o)=>If(Si(n,a,r)[0],o))(t,...Il(e))}function _i(t,e){let[n,r,a]=Il(e,3);return r>1&&Tn(t={...t,...Wx(t,r,n)}),uy(t,a)}function uy(t,e){let{sign:n}=t,r=n===-1?xt(t):t,{hours:a,minutes:o}=r,i=ff(r),s=Number(i/Jn),l=Number(i%Jn);mf(s);let c=Yc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+tm({Y:Kn(r.years),M:Kn(r.months),W:Kn(r.weeks),D:Kn(r.days)})+(a||o||s||d?"T"+tm({H:Kn(a),M:Kn(o),S:Kn(s,d)+c}):"")}function tm(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function Kn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function qc(t,e){return ui(t)+"T"+If(t,e)}function ui(t){return Mf(t)+"-"+Mt(t.day)}function Mf(t){let{year:e}=t;return(e<0||e>9999?Of(e)+ii(6,Math.abs(e)):ii(4,e))+"-"+Mt(t.month)}function hy(t){return Mt(t.month)+"-"+Mt(t.day)}function If(t,e){let n=[Mt(t.hour),Mt(t.minute)];return e!==-1&&n.push(Mt(t.second)+((r,a,o,i)=>Yc(r*Ba+a*za+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function ro(t,e=0){if(e===1)return"";let[n,r]=Vt(Math.abs(t),Ra),[a,o]=Vt(r,La),[i,s]=Vt(o,Sn);return Of(t)+Mt(n)+":"+Mt(a)+(i||s?":"+Mt(i)+Yc(s):"")}function py(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Uc(t,e){return e>1||e===0&&t!==it?Df(Dt(t),e===2):""}function Df(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var my=/0+$/;function Yc(t,e){let n=ii(9,t);return n=e===void 0?n.replace(my,""):n.slice(0,e),n?"."+n:""}function Of(t){return t<0?"-":"+"}var fy=/^(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$/,by=/[^\w\/:+-]+/;function Pf(t){return Fi(He(t))}function Fi(t){return zf(t).id}function zf(t){let e=t.toUpperCase(),n=(a=>{let o=Pc(a,1);if(o!==void 0)return{id:ro(o),Z:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(by.test(a)&&P(Zl(a)),fy.test(a)&&P("Forbidden ICU TimeZone"),a.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?Kp(s).replace(/island|noronha|murdo|rivadavia|urville/,Kp):s)).join("/")))(t);return gy(r)}var gy=Ir(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=vy(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),vy=Ir(t=>new Ut("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Xe(t){let e=zf(t);return xy(e.id,e)}var xy=Ir((t,e)=>e.kind==="named"?new Ul(t,e.m,e.format):new ql(t,e.m,e.kind==="fixed"?e.Z:0)),ql=class{constructor(e,n,r){this.id=e,this.m=n,this.Z=r}B(){return this.Z}R(e){return[vc(e,this.Z)]}C(){}},Ul=class{constructor(e,n,r){this.id=e,this.m=n,this.oe=((a,o)=>{let i=Ir(a),s=Ir(yy),l=86400*o;function c(u){let[m,h]=rm(u,l),f=oi(m),b=oi(h),g=i(f),v=i(b);return g===v?g:d(s(f,b),g,v,u)}function d(u,m,h,f){let b,g;for(;(f===void 0||(b=f<u[0]?m:f>=u[1]?h:void 0)===void 0)&&(g=u[1]-u[0]);){let v=u[0]+Math.floor(g/2);a(v)===h?u[1]=v:u[0]=v+1}return b}return{Ae(u){let m=c(u-86400),h=c(u+86400),f=u-m,b=u-h;if(m===h)return[f];let g=c(f);return g===c(b)?[u-g]:m>h?[f,b]:[]},ze:c,C:function u(m,h){if(h>0&&m>=864e10)return;if(h<0){if(m<=Ll)return;let I=nm()+94867200;if(m>I)return u(I,-1)}let f=h>0?Math.max(m,Ll):m,[b,g]=rm(f,l),v=l*h,x=h>0?Math.max(m,nm())+94867200:Ll,w=()=>h<0?g>x:b<x;for(;w();){let I=oi(b),C=oi(g),B=i(I),L=i(C);if(B!==L){let D=s(I,C);d(D,B,L);let T=D[0];if((tn(T,m)||1)===h)return T}b+=v,g+=v}}}})((a=>o=>{let i=cy(a,1e3*o);return 86400*Sa((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&gm(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})(r),(a=>{let o=a.split("/").pop();return dy[o]||60})(e))}B(e){return this.oe.ze((n=>Xp(n)[0])(e))*Sn}R(e){let n=86400*jt(e)+oc(e),r=Dm(e);return this.oe.Ae(n).map(a=>zt(BigInt(a)*Jn+BigInt(r)))}C(e,n){let[r,a]=Xp(e),o=this.oe.C(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Jn}};function nm(){return Math.floor(Date.now()/1e3)}function yy(t,e){return[t,e]}function rm(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function oi(t){return $l(t,-1e10,864e10)}function Bf(t,e,n){let r=Te(n,Ze(e,Mm,Im),Lc,[],0),a=r.timeZone!==void 0,[o,i]=wt(r,e),s=sn(r,e,o,i,0);if(a){let l=Hr(r),c=Xe(t(r.timeZone));return{epochNanoseconds:Nr(c,Ae(s,l),r.offset),timeZone:c,calendar:e}}return s}function Lf(t,e,n,r){let a=Te(n,Ze(e,Mm,Im),Lc,rc,0),o=t(a.timeZone),[i,s]=wt(a,e),[l,c,d]=wn(r),u=sn(a,e,i,s,l),m=Hr(a,l),h=Xe(o);return vt(Nr(h,Ae(u,m),a.offset,c,d),h,e)}function Rf(t,e,n){let r=Te(e,Ze(t,Sm,Tm),Bc,[],0),[a,o]=wt(r,t),i=Z(n);return no(sn(r,t,a,o,i),Hr(r,i),t)}function Nf(t,e,n,r=[]){let a=Te(e,Ze(t,tr,nr),yt,r),[o,i]=wt(a,t);return sn(a,t,o,i,Z(n))}function _f(t,e,n,r){let a=Te(e,Ze(t,_a,Em),yt,r),[o,i]=wt(a,t,1);return Ri(a,t,o,i,Z(n))}function Ff(t,e,n,r){let a=Te(n,Ze(t,tr,nr),yt,er,0);e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972);let[o,i]=Li(a,t);return Ni(a,t,o,i,Z(r))}function Vf(t,e){return Hr(Te(t,Fl,zc,[],1),Z(e))}function Hf(t){let e=Te(t,jm,Af);return Pt(Tn({...ze,...e}))}function It(t){P(um(t))}function jf(t){let e=Mn(t=He(fc(t))),n;return e||It(t),e.F?n=0:e.offset?n=Bi(e.offset):It(t),e.timeZoneId&&Pc(e.timeZoneId,1),Ua(e),gt(vc(e,n))}function qf(t,e){let n=Mn(He(t));return n||It(t),n.timeZoneId?Qf(n,e,void 0):(n.F&&It(t),Yl(n,e))}function Uf(t,e,n){let r=Mn(He(t));return r&&r.timeZoneId||It(t),Qf(r,e,n)}function Yf(t,e){let n=Mn(He(t));return n&&!n.F||It(t),eb(n,e)}function Wf(t,e){let n=$c(Zc(He(t)),void 0,e);return ke(n,n.calendar)}function Zf(t,e){let n=Gc(He(t));if(n)return Wc(n),ke(Ei(an(n)),e(n.calendarId));let r=$c(Zc(t),wy,e),{calendar:a}=r;return ke(Ia(a,r),a)}function Wc(t){t.calendarId!=="iso8601"&&P(en(t.calendarId))}function $f(t,e){let n=Kc(He(t));if(n)return Wc(n),ke(an(n),e(n.calendarId));let r=$c(Zc(t),ky,e),{calendar:a}=r,{year:o,month:i,day:s}=we(a,r),[l,c]=Qn(a,o,i),{year:d,month:u}=((m,h,f,b)=>{let g=m?m.u(h,f,b):Vl(h,f);return g||P("Cannot guess year"),g})(a,l,c,s);return ke(lt(rr(a,d,u,s)),a)}function Gf(t){let e=(r=>{let a=tb(r);return a?(ao(a[13]),nb(a,1)):void 0})(t=He(t));if(!e){let r=Mn(t);r&&r.te||It(t),r.F&&P(en("Z")),Wc(r),e=r}let n;return(n=Gc(t))&&Jp(n)&&It(t),(n=Kc(t))&&Jp(n)&&It(t),or(Va(e))}function Kf(t){let e=Iy.exec(He(t));return e||It(t),Pt(Tn((n=>{let r=0,a=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),...Tc(o,2,Ee)};return r||P(om(Ee)),Jl(n[1])<0&&(i=xt(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=Vt(o,bt[d])),l!==void 0&&(a&&P(en(l)),m=(h=>{let f=parseInt(h);return Number.isFinite(f)||P(en(h)),f})(l),r=1,c&&(o=Xl(c)*(bt[d]/Sn),a=1)),u+m}})(e)))}function Xf(t){let e=Mn(t)||Gc(t)||Kc(t);if(e)return e.calendarId;let n=tb(t);return n?ao(n[13]).calendarId:t}function Jf(t){let e=Mn(t);return e&&(e.timeZoneId||e.F&&"UTC"||e.offset)||t}function Zc(t){let e=Mn(t);return e&&!e.F||It(t),e}function $c(t,e,n){return e&&t.calendarId==="iso8601"?(an(t),t.te&&Va(t),Yl(e(t),n)):t.te?eb(t,n):Yl(t,n)}function wy(t){let e=12*t.year+t.month===Ym?20:1;return{...t,day:e}}function ky(t){return{...t,year:1972}}function Qf(t,e,n){let r=Xe(Fi(t.timeZoneId)),a;if(Ua(t),t.te){let i=t.offset?Bi(t.offset):void 0,[,s,l]=wn(n);a=Nr(r,t,i,s,l,!(r.Z||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.F)}else wn(n),a=Or(r,t);var o;return zt(a),vt(a,r,e(t.calendarId))}function eb(t,e){return Ua(t),ar(t),{...Ae(t,t),calendar:e(t.calendarId)}}function Yl(t,e){return an(t),lt(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function hi(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var Ey="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+hi(8)+"(Z|([+-])"+hi(15)+")?)?",Cy=Pr("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Ay=Pr("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Sy=Pr(Ey+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),Ty=Pr("T?"+hi(2)+`(([+-])${hi(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),My=new RegExp("\\[(!?)([^\\]]*)\\]","g"),Iy=Pr("([+-])?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 Mn(t){let e=Sy.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:rb(n),month:parseInt(n[5]),day:parseInt(n[6]),...nb(n,7),...ao(n[19]),te:!!n[7],F:a,offset:a?void 0:r}})(e):void 0}function Gc(t){let e=Cy.exec(t);if(e)return(n=>({year:rb(n),month:parseInt(n[4]),day:1,...ao(n[5])}))(e)}function Kc(t){let e=Ay.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...ao(n[3])}))(e):void 0}function tb(t){let e=Ty.exec(t);if(e)return e[6]&&Bi(e[6]),e}function nb(t,e){let n=Mr(t[e+3]);return{...ic(Xl(t[e+4]||""))[0],hour:Mr(t[e]),minute:Mr(t[e+2]),second:n===60?59:n}}function rb(t){let e=Jl(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&P(en(-0)),e*n}function ao(t){let e,n,r=[];return t.replace(My,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&P(en(a)):(n&&P(en(a)),n=l),""}),r.length>1&&e&&P(en(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function jr(t,e,n){let r=Object.assign(Object.create(null),e);return Rl(r,n,km),to(t)&&(Rl(r,n,Ax),t&&t.je&&Rl(r,n,Sx,Lr)),r}function Rl(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function ab(t,e,n){let r=Ze(t,Mx,Ix),a=Be(e),{year:o,month:i,day:s}=we(t,a),l={year:o,monthCode:oo(t,o,i),day:s,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},c=Te(n,r,Lc),d=jr(t,l,c);return[{...l,...c},d]}function ob(t,e,n){let r=Ze(t,Sm,Tm),{year:a,month:o,day:i}=we(t,e),s={year:a,monthCode:oo(t,a,o),day:i,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=Te(n,r,Bc),c=jr(t,s,l);return[{...s,...l},c]}function ib(t,e,n){let r=Ze(t,tr,nr),{year:a,month:o,day:i}=we(t,e);return jr(t,{year:a,monthCode:oo(t,a,o),day:i},Te(n,r,yt))}function sb(t,e,n){let r=Ze(t,_a,Em),{year:a,month:o}=we(t,e);return jr(t,{year:a,monthCode:oo(t,a,o)},Te(n,r,yt))}function lb(t,e,n){let r=Ze(t,tr,nr),{year:a,month:o,day:i}=we(t,e);return jr(t,{monthCode:oo(t,a,o),day:i},Te(n,r,yt))}function cb(t,e,n,r,a,o,i,s){let{calendar:l,timeZone:c}=t;return vt(Nr(c,Ae(sn(n,l,r,a,o),vi(e,o)),e.offset,i,s),c,l)}function db(t,e,n,r,a,o){return no(sn(e,n,r,a,o),vi(t,o),n)}function ub(t,e){return{...Ht(Fl,t),...Te(e,Fl,zc)}}function hb(t,e){return Pt((n=t,r=e,Tn({...n,...Te(r,jm,Af)})));var n,r}function oo(t,e,n){let[r,a]=Qn(t,e,n);return ym(r,a)}function pb(t,e,n){let[r,a]=Lp(n,t),o=Cn(e),i=Math.max(r,o),s=a&&Ja(a);if(!a&&ci(i,s))return am(e,r);if(a||P("Missing relativeTo"),!e.sign&&(!s||r<6))return 0;let[l,c,d]=uf(a,e,r);return ci(r,s)?am(l,r):((u,m,h,f)=>{let b=Ee[h],g=pc(h,u);return Ux(u[b],Qa(u)||1,m,v=>(g[b]=v,Oi(f,g)))})(l,c,r,d)}function am(t,e){return wm(rn(t),bt[e])}function mb(t,e,n){return vt(t.epochNanoseconds,e,n)}function fb(t){return gt(t.epochNanoseconds)}function Xc(t){return qt(Be(t),t.calendar)}function Jc(t){return ke(Be(t),t.calendar)}function Qc(t){return or(Be(t))}function bb(t,e,n){return vt(zt(_r(e,t,n)),e,t.calendar)}function gb(t,e,n){let r;return r=n?_r(e,Ae(t,n)):Or(e,Ae(t,Ot)),vt(r,e,t.calendar)}function vb(t,e,n){return kb(t,Ht(Ze(t,Fa,Cm),e),Te(xn(n),er,yt,[]))}function xb(t,e,n){let r=Ze(t,bi,Tx);return kb(t,Ht(Am,e),Te(xn(n),r,yt,[]))}function yb(t,e){let n=Te(e,Am,yt),[r,a]=Li(n,t);return Ni(n,t,r,a,0)}function wb(t,e){let n=Te(e,Ze(t,Fa,Cm),yt),[r,a]=wt(n,t,1);return Ri(n,t,r,a,0)}function kb(t,e,n){let r=Ze(t,Dx,Ox),a=jr(t,e,n);a=Te(a,r,yt,[]);let[o,i]=wt(a,t);return sn(a,t,o,i,0)}function Eb(t){return gt(zt(BigInt(Wa(t))*Br))}function Cb(t){return gt(zt(ki(t)))}function qr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function Ab(t,e){return t.timeZone!==void 0&&he("Cannot specify TimeZone"),t.timeZone=e,t}function Ur(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===it||Dt(e.calendar)===r||P("Mismatching Calendars")}function sr(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},h={},f={},b=0,g=0;for(let T of Object.keys(l)){let N=l[T];N===void 0||s.has(T)||(o.has(T)?T==="dateStyle"?d=N:T==="timeStyle"?u=N:m[T]=N:T==="era"?h[T]=N:i.has(T)?T==="dateStyle"||T==="timeStyle"?g=1:b=1:f[T]=N)}let v=d!==void 0,x=u!==void 0,w=v||x,I=Object.keys(m).length>0,C=b||g,B=I||v||x,L=Object.keys(h).length>0;(!c&&C||c&&C&&!B||w&&(I||L||b))&&he("Invalid formatting options");let D={};return w||B||Object.assign(D,r),Object.assign(D,m,h,f),v&&(a?Object.assign(D,a[d]):D.dateStyle=d),x&&(D.timeStyle=u),D}}var Sb={year:"numeric",month:"numeric",day:"numeric"},Tb={hour:"numeric",minute:"numeric",second:"numeric"},ed=Object.assign({},Sb,Tb),td=["weekday","year","month","day","dateStyle"],io=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],nd=td.concat(io),Dy=["weekday","day"].concat(io),Oy=["weekday","year"].concat(io),Mb=sr(nd,[],[],ed),Ib=sr(nd,[],[],{...ed,timeZoneName:"short"}),Db=sr(nd,[],["timeZoneName"],ed),Ob=sr(td,io,["timeZoneName"],Sb),Pb=sr(io,td,["timeZoneName","era"],Tb),zb=sr(["year","month","dateStyle"],Dy,["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"}}),Bb=sr(["month","day","dateStyle"],Oy,["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 Lb(t,e){let{timeZone:n}=t,r=Be(t),{offsetNanoseconds:a}=r,o=e||Ot,i;return i=e?Nr(n,Ae(r,o),a,2):Or(n,Ae(r,o)),vt(i,n,t.calendar)}function Vi(t){let e=Hi(),n=t.B(e);return qa(e+BigInt(n))}function Hi(){return BigInt(Date.now())*Br}function Yr(){return new Ut().resolvedOptions().timeZone}var rd="PlainYearMonth",ad="PlainMonthDay",od="PlainDate",id="PlainDateTime",sd="PlainTime",ld="ZonedDateTime",cd="Instant",dd="Duration";function ln(t,e,n,...r){return Object.defineProperties(e,hm(t)),Object.defineProperties(e.prototype,Oa("Temporal."+t)),Object.defineProperties(e.prototype,An(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var cn=Kl.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:Kl;function dn(){he(lm)}function un(){he(sm)}var Rb={era(t){return Ya(t.calendar,t).era},eraYear(t){return Ya(t.calendar,t).eraYear},year(t){return we(t.calendar,t).year},month(t){return we(t.calendar,t).month},monthCode(t){return wi(t.calendar,t)}},ji={era(t){return Ya(t.calendar,t).era},eraYear(t){return Ya(t.calendar,t).eraYear},year(t){return we(t.calendar,t).year},month(t){return we(t.calendar,t).month},monthCode(t){return wi(t.calendar,t)},day(t){return we(t.calendar,t).day}},Nb={monthCode(t){return wi(t.calendar,t)},day(t){return we(t.calendar,t).day}},_b={daysInMonth(t){return cc(t.calendar,t)},daysInYear(t){return dc(t.calendar,t)},monthsInYear(t){return lc(t.calendar,t)},inLeapYear(t){return sc(t.calendar,t)}},qi={dayOfWeek(t){return yi(t)},dayOfYear(t){return Fm(t.calendar,t)},weekOfYear(t){return Vm(t.calendar,t)},yearOfWeek(t){return Hm(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return cc(t.calendar,t)},daysInYear(t){return dc(t.calendar,t)},monthsInYear(t){return lc(t.calendar,t)},inLeapYear(t){return sc(t.calendar,t)}};function ud(t,e,n,r){let[a,o,i,s]=Gn(t,r,3,5);return Wr(t,Xa(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s))}function hd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,5);return Wr(t,nf(a,e,n,o,i,s,l))}function pd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6);return Wr(t,rf(a,e,n,o,i,s,l))}function md(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6,9,6);return Wr(t,of(a,e,n,o,i,s,l))}function fd(t,e,n,r){let a=Ka(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,9,9,8);return Wr(t,af(a,e,n,o,i,s,l))}function bd(t,e,n,r){let[a,o,i,s]=Gn(t,r,5,5);return Wr(t,sf(e,n,a,o,i,s))}function Wr(t,e){return Pt(t?xt(e):e)}function Fb(t,e,n){let{calendar:r}=t,a=ib(r,t,e),[o,i]=wt(a,r),s=Z(n);return sn(a,r,o,i,s)}function Vb(t,e,n){let{calendar:r}=t,[a,o]=ob(r,t,e),[i,s]=wt(o,r),l=Z(n);return db(a,o,r,i,s,l)}function Hb(t,e,n){let{calendar:r}=t,a=sb(r,t,e),[o,i]=wt(a,r,1),s=Z(n);return Ri(a,r,o,i,s)}function jb(t,e,n){let{calendar:r}=t,a=lb(r,t,e),[o,i]=Li(a,r),s=Z(n);return Ni(a,r,o,i,s)}function qb(t,e,n){let r=ub(t,e),a=Z(n);return Hr(r,a)}function Ub(t,e,n){let{calendar:r}=t,[a,o]=ab(r,t,e),[i,s]=wt(o,r),[l,c,d]=wn(n,2);return cb(t,a,o,i,s,l,c,d)}function Pn(t){let e=He(t).toLowerCase();return e===tc?it:e===bm?vm:void P(dm(t,"temporal-polyfill/full"))}function lo(t=tc){return Pn(t)}var Wb=new WeakMap,Zb=ln(ld,class{constructor(t,e,n=void 0){let r=zt(ki(t)),a=Xe(Pf(e)),o=lo(n);$b(this,vt(r,a,o))}static from(t,e=void 0){return Je(Zr(t,e))}static compare(t,e){return eo(Zr(t),Zr(e))}get calendarId(){return Dt(ce(this).calendar)}get timeZoneId(){return ce(this).timeZone.id}get epochMilliseconds(){return Ha(ce(this).epochNanoseconds)}get epochNanoseconds(){return ce(this).epochNanoseconds}get offset(){return ro(Be(ce(this)).offsetNanoseconds)}get offsetNanoseconds(){return Be(ce(this)).offsetNanoseconds}get hoursInDay(){return Gm(ce(this))}with(t,e=void 0){return Je(Ub(ce(this),Jr(t),e))}withCalendar(t){return Je({...ce(this),calendar:Wi(t)})}withTimeZone(t){return Je({...ce(this),timeZone:Xe(Ct(t))})}withPlainTime(t=void 0){return Je(Lb(ce(this),wd(t)))}add(t,e=void 0){let n=ce(this);return Je($a(n,_e(t),Z(e)))}subtract(t,e=void 0){let n=ce(this);return Je($a(n,xt(_e(t)),Z(e)))}until(t,e=void 0){let n=ce(this),r=Zr(t);return De(hd(0,n,r,e))}since(t,e=void 0){let n=ce(this),r=Zr(t);return De(hd(1,n,r,e))}round(t){let e=ce(this),[n,r,a]=Ea(t);return Je($m(e,n,r,a))}startOfDay(){return Je(Km(ce(this)))}equals(t){return vf(ce(this),Zr(t))}toInstant(){return hn(fb(ce(this)))}toPlainDateTime(){return Yt(Xc(ce(this)))}toPlainDate(){return Wt(Jc(ce(this)))}toPlainTime(){return On(Qc(ce(this)))}toLocaleString(t=void 0,e={}){let n=ce(this),r=new Ut(t,Ab(Ib(e),tf(n)));return Ur(r,n),r.format(Ha(n.epochNanoseconds))}toString(t=void 0){return Nc(ce(this),t)}toJSON(){return Nc(ce(this))}getTimeZoneTransition(t){let e=ce(this),n=e.timeZone.C(e.epochNanoseconds,Hp(t));return n!==void 0?Je({...e,epochNanoseconds:n}):null}valueOf(){return un()}},Py,ji,qi,Na);function Je(t){return $b(Object.create(Zb.prototype),t)}function ce(t){return Zt(t)||dn()}function Py(t){let e=ce(t);return{...Be(e),calendar:e.calendar}}function Zt(t){return Wb.get(t)}function Zr(t,e){if(Ke(t)){let n=Zt(t);if(n)return wn(e),n;let r=co(t);return Lf(Ct,r,t,e)}return Uf(t,Pn,e)}function $b(t,e){return Wb.set(t,e),cn(t),t}function Ct(t){if(Ke(t)){let e=Zt(t);return e||he(Zl(t)),e.timeZone.id}return(e=>Fi(Jf(He(e))))(t)}var Gb=new WeakMap,Kb=ln(cd,class{constructor(t){let e=zt(ki(t));Jb(this,gt(e))}static from(t){return hn($r(t))}static fromEpochMilliseconds(t){return hn(Eb(t))}static fromEpochNanoseconds(t){return hn(Cb(t))}static compare(t,e){return eo($r(t),$r(e))}get epochMilliseconds(){return Ha(kt(this).epochNanoseconds)}get epochNanoseconds(){return kt(this).epochNanoseconds}add(t){let e=kt(this);return hn(gt(kc(e.epochNanoseconds,_e(t))))}subtract(t){let e=kt(this);return hn(gt(kc(e.epochNanoseconds,xt(_e(t)))))}until(t,e=void 0){return De(ud(0,kt(this),$r(t),e))}since(t,e=void 0){return De(ud(1,kt(this),$r(t),e))}round(t){let e=kt(this),[n,r,a]=Ea(t,5,1);return hn(gt(Mi(e.epochNanoseconds,Za(n,r),a)))}equals(t){return gf(kt(this),$r(t))}toZonedDateTimeISO(t){return Je(mb(kt(this),Xe(Ct(t))))}toLocaleString(t=void 0,e={}){let n=kt(this);return new Ut(t,Mb(e)).format(Ha(n.epochNanoseconds))}toString(t=void 0){return Rc(Ct,kt(this),t)}toJSON(){return Rc(Ct,kt(this))}valueOf(){return un()}});function hn(t){return Jb(Object.create(Kb.prototype),t)}function kt(t){return xd(t)||dn()}function xd(t){return Gb.get(t)}function $r(t){if(Ke(t)){let e=xd(t);if(e)return e;let n=Zt(t);if(n)return gt(n.epochNanoseconds)}return jf(t)}var{toTemporalInstant:Xb}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return hn(gt(BigInt(mc(t))*Br))}};function Jb(t,e){return Gb.set(t,e),cn(t),t}var Qb=new WeakMap,eg=ln(ad,class{constructor(t,e,n=void 0,r){let a=Ie(t),o=Ie(e),i=lo(n),s=Ie(r??Bm),l=lt(an({year:s,month:a,day:o}));tg(this,ke(l,i))}static from(t,e=void 0){return vd(Yb(t,e))}get calendarId(){return Dt(In(this).calendar)}with(t,e=void 0){return vd(jb(In(this),Jr(t),e))}equals(t){return kf(In(this),Yb(t))}toPlainDate(t){let e=In(this);return Wt(xb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=In(this),r=new Ut(t,qr(Bb(e)));return Ur(r,n,1),r.format(ja(n))}toString(t=void 0){return Hc(In(this),t)}toJSON(){return Hc(In(this))}valueOf(){return un()}},In,Nb);function vd(t){return tg(Object.create(eg.prototype),t)}function In(t){return Ui(t)||dn()}function Ui(t){return Qb.get(t)}function Yb(t,e){if(Ke(t)){let r=Ui(t);if(r)return Z(e),r;let a=mg(t);return Ff(a===void 0?it:a,a===void 0,t,e)}let n=$f(t,Pn);return Z(e),n}function tg(t,e){return Qb.set(t,e),cn(t),t}var ng=new WeakMap,rg=ln(rd,class{constructor(t,e,n=void 0,r){let a=Ie(t),o=Ie(e),i=lo(n),s=Ie(r??1),l=Ei(an({year:a,month:o,day:s}));ag(this,ke(l,i))}static from(t,e=void 0){return so(Gr(t,e))}static compare(t,e){return ir(Gr(t),Gr(e))}get calendarId(){return Dt(Et(this).calendar)}with(t,e=void 0){return so(Hb(Et(this),Jr(t),e))}add(t,e=void 0){let n=Et(this);return so(ke(wc(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Et(this);return so(ke(wc(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Et(this),r=Gr(t);return De(fd(0,n,r,e))}since(t,e=void 0){let n=Et(this),r=Gr(t);return De(fd(1,n,r,e))}equals(t){return wf(Et(this),Gr(t))}toPlainDate(t){let e=Et(this);return Wt(vb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=Et(this),r=new Ut(t,qr(zb(e)));return Ur(r,n,1),r.format(ja(n))}toString(t=void 0){return Vc(Et(this),t)}toJSON(){return Vc(Et(this))}valueOf(){return un()}},Et,Rb,_b);function so(t){return ag(Object.create(rg.prototype),t)}function Et(t){return Yi(t)||dn()}function Yi(t){return ng.get(t)}function Gr(t,e){if(Ke(t)){let r=Yi(t);if(r)return Z(e),r;let a=co(t);return _f(a,t,e)}let n=Zf(t,Pn);return Z(e),n}function ag(t,e){return ng.set(t,e),cn(t),t}function zy(t){if(!Ke(t))return;let e=xd(t);return e?[cd,e]:(e=Zt(t),e?[ld,e]:(e=lr(t),e?[id,e]:(e=Qr(t),e?[od,e]:(e=yd(t),e?[sd,e]:(e=Yi(t),e?[rd,e]:(e=Ui(t),e?[ad,e]:(e=kd(t),e?[dd,e]:void 0)))))))}function Jr(t){return(zy(t)||t.calendar!==void 0||t.timeZone!==void 0)&&he(im),t}var og=new WeakMap,ig=ln(sd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=Va(An(Ie,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));sg(this,or(i))}static from(t,e=void 0){return On(Dn(t,e))}static compare(t,e){return zi(Dn(t),Dn(e))}with(t,e=void 0){return On(qb(Bt(this),Jr(t),e))}add(t){let e=Bt(this);return On(Ii(e,_e(t))[0])}subtract(t){let e=Bt(this);return On(Ii(e,xt(_e(t)))[0])}until(t,e=void 0){return De(bd(0,Bt(this),Dn(t),e))}since(t,e=void 0){return De(bd(1,Bt(this),Dn(t),e))}round(t){let e=Bt(this),[n,r,a]=Ea(t,5);return On(Si(e,Rr(n,r),a)[0])}equals(t){return Ef(Bt(this),Dn(t))}toLocaleString(t=void 0,e={}){let n=Bt(this);return new Ut(t,qr(Pb(e))).format(ac(n))}toString(t=void 0){return jc(Bt(this),t)}toJSON(){return jc(Bt(this))}valueOf(){return un()}},Bt,Na);function On(t){return sg(Object.create(ig.prototype),t)}function Bt(t){return yd(t)||dn()}function yd(t){return og.get(t)}function Dn(t,e){if(Ke(t)){let r=yd(t);if(r)return Z(e),r;let a=lr(t);if(a)return Z(e),or(a);let o=Zt(t);return o?(Z(e),Qc(o)):Vf(t,e)}let n=Gf(t);return Z(e),n}function wd(t){return t===void 0?void 0:Dn(t)}function sg(t,e){return og.set(t,e),cn(t),t}var lg=new WeakMap,cg=ln(id,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=ar(Ua(An(Ie,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=lo(c);dg(this,qt(d,u))}static from(t,e=void 0){return Yt(Kr(t,e))}static compare(t,e){let n=Kr(t),r=Kr(e);return Oc(n,r)}get calendarId(){return Dt(Ne(this).calendar)}with(t,e=void 0){return Yt(Vb(Ne(this),Jr(t),e))}withCalendar(t){let e=Ne(this);return Yt(qt(e,Wi(t)))}withPlainTime(t=void 0){let e=Ne(this);return Yt(no(e,wd(t),e.calendar))}add(t,e=void 0){let n=Ne(this);return Yt(qt(Ga(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=Ne(this);return Yt(qt(Ga(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=Ne(this),r=Kr(t);return De(pd(0,n,r,e))}since(t,e=void 0){let n=Ne(this),r=Kr(t);return De(pd(1,n,r,e))}round(t){let e=Ne(this),[n,r,a]=Ea(t);return Yt(qt(Ai(e,Rr(n,r),a),e.calendar))}equals(t){return xf(Ne(this),Kr(t))}toZonedDateTime(t,e=void 0){return Je(bb(Ne(this),Xe(Ct(t)),Rp(e)))}toPlainDate(){let t=Ne(this);return Wt(ke(t,t.calendar))}toPlainTime(){return On(or(Ne(this)))}toLocaleString(t=void 0,e={}){let n=Ne(this),r=new Ut(t,qr(Db(e)));return Ur(r,n),r.format(Pm(n))}toString(t=void 0){return _c(Ne(this),t)}toJSON(){return _c(Ne(this))}valueOf(){return un()}},Ne,ji,qi,Na);function Yt(t){return dg(Object.create(cg.prototype),t)}function Ne(t){return lr(t)||dn()}function lr(t){return lg.get(t)}function Kr(t,e){if(Ke(t)){let r=lr(t);if(r)return Z(e),r;let a=Qr(t);if(a)return Z(e),qt(Ae(a,Ot),a.calendar);let o=Zt(t);if(o)return Z(e),Xc(o);let i=co(t);return Rf(i,t,e)}let n=Yf(t,Pn);return Z(e),n}function dg(t,e){return lg.set(t,e),cn(t),t}var ug=new WeakMap,hg=ln(od,class{constructor(t,e,n,r=void 0){let a=lt(an(An(Ie,{year:t,month:e,day:n}))),o=lo(r);pg(this,ke(a,o))}static from(t,e=void 0){return Wt(Xr(t,e))}static compare(t,e){return ir(Xr(t),Xr(e))}get calendarId(){return Dt(je(this).calendar)}with(t,e=void 0){return Wt(Fb(je(this),Jr(t),e))}withCalendar(t){let e=je(this);return Wt(ke(e,Wi(t)))}add(t,e=void 0){let n=je(this);return Wt(ke(on(n.calendar,n,_e(t),Z(e)),n.calendar))}subtract(t,e=void 0){let n=je(this);return Wt(ke(on(n.calendar,n,xt(_e(t)),Z(e)),n.calendar))}until(t,e=void 0){let n=je(this),r=Xr(t);return De(md(0,n,r,e))}since(t,e=void 0){let n=je(this),r=Xr(t);return De(md(1,n,r,e))}equals(t){return yf(je(this),Xr(t))}toZonedDateTime(t){let e=Ke(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t},n=je(this),r=Ct(e.timeZone),a=e.plainTime,o=a!==void 0?Dn(a):void 0;return Je(gb(n,Xe(r),o))}toPlainDateTime(t=void 0){let e=je(this);return Yt(no(e,wd(t),e.calendar))}toPlainYearMonth(){let t=je(this);return so(wb(t.calendar,this))}toPlainMonthDay(){let t=je(this);return vd(yb(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=je(this),r=new Ut(t,qr(Ob(e)));return Ur(r,n),r.format(ja(n))}toString(t=void 0){return Fc(je(this),t)}toJSON(){return Fc(je(this))}valueOf(){return un()}},je,ji,qi);function Wt(t){return pg(Object.create(hg.prototype),t)}function je(t){return Qr(t)||dn()}function Qr(t){return ug.get(t)}function Xr(t,e){if(Ke(t)){let r=Qr(t);if(r)return Z(e),r;let a=lr(t);if(a)return Z(e),ke(a,a.calendar);let o=Zt(t);if(o)return Z(e),Jc(o);let i=co(t);return Nf(i,t,e)}let n=Wf(t,Pn);return Z(e),n}function pg(t,e){return ug.set(t,e),cn(t),t}function co(t){let e=mg(t);return e===void 0?it:e}function mg(t){let{calendar:e}=t;if(e!==void 0)return Wi(e)}function Wi(t){if(Ke(t)){let e=Qr(t)||lr(t)||Zt(t)||Ui(t)||Yi(t);return e||he(cm(t)),e.calendar}return(e=>Pn(Xf(He(e))))(t)}var fg=new WeakMap,bg=ln(dd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=Tn(An(Wa,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));gg(this,Pt(d))}static from(t){return De(_e(t))}static compare(t,e,n=void 0){return bf(gd,_e(t),_e(e),n)}get sign(){return ct(this).sign}get blank(){return!ct(this).sign}with(t){return De(hb(ct(this),t))}negated(){return De(Ic(ct(this)))}abs(){return De(pf(ct(this)))}add(t){return De(Mc(0,ct(this),_e(t)))}subtract(t){return De(Mc(1,ct(this),_e(t)))}round(t){return De(hf(gd,ct(this),t))}total(t){return pb(gd,ct(this),t)}toLocaleString(t=void 0,e){let n=ct(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):_i(n,e)}toString(t=void 0){return _i(ct(this),t)}toJSON(){return _i(ct(this))}valueOf(){return un()}},ct,uc);function De(t){return gg(Object.create(bg.prototype),t)}function ct(t){return kd(t)||dn()}function kd(t){return fg.get(t)}function _e(t){return Ke(t)?kd(t)||Hf(t):Kf(t)}function gd(t){if(t!==void 0){if(Ke(t)){let e=Zt(t);if(e)return e;let n=Qr(t);if(n)return n;let r=lr(t);if(r)return ke(r,r.calendar);let a=co(t);return Bf(Ct,a,t)}return qf(t,Pn)}}function gg(t,e){return fg.set(t,e),cn(t),t}var By=Object.defineProperties({},{...Oa("Temporal.Now"),...pi({timeZoneId(){return Yr()},instant(){return hn(gt(Hi()))},zonedDateTimeISO(t=Yr()){let e=Xe(Ct(t));return Je(vt(Hi(),e))},plainDateTimeISO(t=Yr()){let e=Vi(Xe(Ct(t)));return Yt(qt(e))},plainDateISO(t=Yr()){let e=Vi(Xe(Ct(t)));return Wt(ke(e))},plainTimeISO(t=Yr()){let e=Vi(Xe(Ct(t)));return On(or(e))}})}),vg=Object.defineProperties({},{...Oa("Temporal"),...pi({PlainYearMonth:rg,PlainMonthDay:eg,PlainDate:hg,PlainTime:ig,PlainDateTime:cg,ZonedDateTime:Zb,Instant:Kb,Duration:bg,Now:By})});var Me=gl||vg;var R2=gl?Date.prototype.toTemporalInstant:Xb;var Zi=class extends z{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,r){if(e==="value"){this.applyFormValue(r);return}e==="data-focus"&&this.focusCell(r)}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 r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(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=e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.key==="PageUp"||e.key==="PageDown");if(Ye(e)&&!n)return;let r=this.#t;if(r.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??r.find(s=>s.tabIndex===0)??null;if(!a?.dataset.date)return;let o=null;switch(e.key){case"Home":case"End":{let s=r.indexOf(a);if(s<0)return;let l=s-s%7;o=r[e.key==="Home"?l:l+6]?.dataset.date??null;break}default:{let s=Me.PlainDate.from(a.dataset.date),l;switch(e.key){case"ArrowLeft":l=s.subtract({days:1});break;case"ArrowRight":l=s.add({days:1});break;case"ArrowUp":l=s.subtract({days:7});break;case"ArrowDown":l=s.add({days:7});break;case"PageUp":l=s.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":l=s.add({[e.shiftKey?"years":"months"]:1});break;default:return}o=l.toString()}}if(!o)return;e.preventDefault();let i=r.find(s=>s.dataset.date===o);i&&!i.hasAttribute("disabled")&&i.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:o}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),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 xg(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Zi)}xg();var $i=class extends mr{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function yg(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",$i)}yg();var Gi=class extends z{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(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.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,r){this.sync(),e==="state"&&this.alive&&r!==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,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}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||Ye(e))return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function wg(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",Gi)}wg();var Lt=class extends z{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){Ed(this.doc)}},Ki="a-menu-item, a[data-anta-menu-item]";function Xi(t){return t instanceof Lt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function Ed(t){t.hasKeyListenerForAMenuItem||(Vo(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?.(Ki)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function kg(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Lt)}kg();var ee=4,Ji=96,Ly=130,Ry=130,Ny=500,_y='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',Fy="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Vy="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",j=[],es=!1,zn=null,Cd=null,Bn=null,Ad=0;function Sd(t){Bn=t.pointerType==="mouse"?t.clientX:null,Bn!==null&&(Ad=t.clientY)}function Hy(t){return Bn!==null&&Bn>=t.left&&Bn<t.right&&Ad>=t.top&&Ad<t.bottom}function jy(t,e){es||(t.addEventListener("pointerdown",Tg,!0),t.addEventListener("pointermove",Sd,{capture:!0,passive:!0}),t.addEventListener("pointerleave",Ag),t.addEventListener("keydown",Dg,!0),t.addEventListener("keyup",Og,!0),t.addEventListener("contextmenu",Mg,!0),e.addEventListener("resize",Ig),zn=t,Cd=e,es=!0)}function Cg(){es&&(zn?.removeEventListener("pointerdown",Tg,!0),zn?.removeEventListener("pointermove",Sd,!0),zn?.removeEventListener("pointerleave",Ag),zn?.removeEventListener("keydown",Dg,!0),zn?.removeEventListener("keyup",Og,!0),zn?.removeEventListener("contextmenu",Mg,!0),Cd?.removeEventListener("resize",Ig),zn=null,Cd=null,es=!1,Bn=null)}function Ag(){Bn=null}function Sg(t,e=!1){let n=t.composedPath();for(let r=j.length-1;r>=0;r--){let a=j[r];if(n.includes(a.surface))return r;let o=a.triggerAnchor;if(o&&!(e&&a.hasAttribute("context"))&&n.includes(o))return r}return-1}function qy(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 Uy(t){for(let e of j)if(e.contains(t)||e.surface.contains(t))return!0;return!1}nu({isOpen:()=>j.length>0,contains:Uy});function Tg(t){if(Sd(t),!j.length)return;let e=Sg(t,t.button===0);j[e+1]?.requestClose(t)}function Mg(t){j.length&&Sg(t)===-1&&Pg(t)}function Ig(){j.length&&Pg()}function Dg(t){let e=j[j.length-1];e&&e.handleKey(t)}function Og(t){let e=j[j.length-1];e&&e.handleKeyUp(t)}function Pg(t){j[0]?.requestClose(t)}function Yy(){for(let t=j.length-1;t>=0;t--){let e=j[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}j.length=0,Cg()}var Qi=new WeakMap;function Wy(t){for(let e of t){let n=Qi.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var Eg=typeof IntersectionObserver<"u"?new IntersectionObserver(Wy,{root:null,rootMargin:"0px",threshold:0}):null,ts=class t extends z{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;#e=!1;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#t=new Set;#n;#o;#r;#a;#l=new Set;#u=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
934
- :host { display: contents; }
935
-
936
- .container {
937
- position: fixed;
938
- left: 0;
939
- top: 0;
940
- margin: 0;
941
- padding: 0;
942
- box-sizing: border-box;
943
- flex-direction: column;
944
- min-width: max(var(--menu-min-width, 88px), var(--_anchor-width, 0px));
945
- max-width: calc(100vw - ${2*ee}px);
946
- max-height: calc(100dvh - ${2*ee}px);
947
- overflow: hidden;
948
- background: var(--menu-bg, Canvas);
949
- color: var(--text-2, CanvasText);
950
- border: var(--menu-border, 1px solid);
951
- border-radius: var(--menu-radius, 8px);
952
- box-shadow: var(--menu-shadow, 0 8px 24px rgba(0,0,0,0.2));
953
- -webkit-backdrop-filter: var(--menu-backdrop-filter, blur(20px));
954
- backdrop-filter: var(--menu-backdrop-filter, blur(20px));
955
- outline: none;
956
-
957
- /* Closed / exit state \u2014 fade + a tiny vertical settle (no horizontal
958
- shift). This 140ms governs the EXIT (open \u2192 closed); the enter is a
959
- touch quicker (see :popover-open below) so the menu feels snappy to
960
- open but unhurried to dismiss. 'display' and 'overlay' transition with
961
- 'allow-discrete' so the menu stays in the top layer and visible while
962
- it animates OUT, then hides. */
963
- opacity: 0;
964
- translate: 0 -4px;
965
- transition:
966
- opacity 140ms ease-out,
967
- translate 140ms ease-out,
968
- width var(--menu-width-duration, 160ms) ease,
969
- display 140ms allow-discrete,
970
- overlay 140ms allow-discrete;
971
- }
972
- .container:popover-open {
973
- display: flex;
974
- opacity: 1;
975
- translate: 0 0;
976
- /* Enter (closed \u2192 open) \u2014 quicker than the exit above. */
977
- transition:
978
- opacity 100ms ease-out,
979
- translate 100ms ease-out,
980
- width var(--menu-width-duration, 160ms) ease,
981
- display 100ms allow-discrete,
982
- overlay 100ms allow-discrete;
983
- }
984
- /* Enter: start from the closed state and transition in. */
985
- @starting-style {
986
- .container:popover-open { opacity: 0; translate: 0 -4px; }
987
- }
988
- slot[name="header"],
989
- slot[name="footer"] {
990
- display: block;
991
- flex: none;
992
- }
993
- slot[name="header"]::slotted(a-menu-header),
994
- slot[name="header"]::slotted(a-select-header),
995
- slot[name="footer"]::slotted(a-menu-footer),
996
- slot[name="footer"]::slotted(a-select-footer) {
997
- display: block;
998
- padding: var(--menu-padding, 4px);
999
- }
1000
- /* The scrolling body \u2014 only the items scroll; the header / footer slots stay
1001
- fixed above and below it. min-height:0 lets it shrink so its own scrollbar
1002
- engages instead of the flex item overflowing. The 1px inter-item gap that
1003
- used to live on the container lives here now. */
1004
- .scroll {
1005
- flex: 1 1 auto;
1006
- min-height: 0;
1007
- display: flex;
1008
- flex-direction: column;
1009
- gap: 1px;
1010
- overflow-y: auto;
1011
- overscroll-behavior: contain;
1012
- scrollbar-width: thin;
1013
- /* The menu's padding lives here (not on the clipping container) so an item's
1014
- focus outline has room inside the scroll box instead of being clipped at
1015
- the edge; scroll-padding keeps a focused row off the edge when scrolled. */
1016
- padding: var(--menu-padding, 4px);
1017
- scroll-padding-block: var(--menu-padding, 4px);
1018
- /* Soft scroll edges: fade the content into the top / bottom only on the side
1019
- with more to scroll (the --fade-* vars, set from JS, are 0 otherwise). The
1020
- top also clears a hard --gap-top band (fully transparent, ahead of the ramp)
1021
- so a row scrolling up disappears cleanly under a pinned header / filter field
1022
- before the fade begins, instead of bleeding right against it. */
1023
- --fade-top: 0px;
1024
- --fade-bottom: 0px;
1025
- --gap-top: 0px;
1026
- -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%);
1027
- mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
1028
- }
1029
- `,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let r=document.createElement("slot");r.setAttribute("name","header");let a=document.createElement("div");a.className="scroll",a.setAttribute("part","scroll"),a.append(document.createElement("slot")),a.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=a;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(r,a,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&(this.#e=!1,this.cancelCloseTimer())}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#f&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){Ed(this.doc),this.#M(),this.#v();let e=this.triggerAnchor;e&&(Qi.set(e,this),Eg?.observe(e)),this.#x(),queueMicrotask(()=>{this.isConnected&&this.#x()}),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#S();let e=this.triggerAnchor;e&&Qi.get(e)===this&&(Qi.delete(e),Eg?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#M();return}if(e==="role"){this.#v();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&&Xi(this.parentElement)}get#i(){return this.hasAttribute("context")}get#h(){return this.hasAttribute("coord")}get#f(){return!this.hasAttribute("nohover")}get#b(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:ee}get#p(){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&&Xi(e)?e:this.previousElementSibling}get#m(){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.#m;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#c(){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.navigableItems().filter(e=>e instanceof Lt)}navigableItems(){return[...this.querySelectorAll(Ki)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return ga(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=rl(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=4,a=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<a.top+r?n.scrollTop-=a.top+r-o.top:o.bottom>a.bottom-r&&(n.scrollTop+=o.bottom-a.bottom+r)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=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",r?"14px":"0px")}get#s(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#A(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#s}#v(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#v()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(Ki)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#x()}#x(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#A;Ms(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&Ms(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#t)e.has(a)||a[Xt]({source:this,clear:!0});for(let[a,o]of e)a[Xt]({source:this,...o});this.#t=new Set(e.keys())}#S(){for(let e of this.#t)e[Xt]({source:this,clear:!0});this.#t.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.#x(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#A?.value;if(!e||!e.trim())return this.setActive(null);if(this.#s)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-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 a=this.activeItem.querySelector(":scope > a-copy");a&&jo(a),this.#y=this.activeItem}return!0;default:return!1}}#y=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#y;this.#y=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=j.indexOf(this);if(n!==-1){for(let a=j.length-1;a>n;a--){let o=j[a];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}j.length=n+1}let r=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}r&&this.hide()}show(e,n=!1,r){if(this.isSubmenu){let i=this.#c;if(i){let s=j.indexOf(i);if(s!==-1){for(let l=j.length-1;l>s;l--){let c=j[l];c!==this&&c.isOpen&&!c._dismissNotified&&c.emitChange("closed"),c._doHide()}j.length=s+1}}}else if(!j.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=j.length-1;l>=0;l--)if(j[l]!==this&&j[l].contains(i)){s=j[l];break}}if(s){let l=j.indexOf(s);for(let c=j.length-1;c>l;c--){let d=j[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}j.length=l+1}else Yy()}if(j.includes(this)){this.position(e);return}let a=j.length===0;this._doShow(e,!a),j.push(this),a&&jy(this.doc,this.view);let o=this.#A;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.#A||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(e=!0){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let n=j.indexOf(this);if(n===-1){this._shown&&this._doHide();return}for(let r=j.length-1;r>=n;r--){let a=j[r];e&&r>n&&a.isOpen&&!a._dismissNotified&&a.emitChange("closed"),a._doHide()}j.length=n,j.length===0&&Cg()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this.#e=!1,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#T(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){let e=this.parentElement?.closest("a-menu");if(this._shown&&e&&Bn!==null&&Hy(this.surface.getBoundingClientRect()))for(let n=e;n;n=n.parentElement?.closest("a-menu"))!n.isSubmenu||!n.#f||!n._shown||n.surface.matches(":hover")||(n.#e=!0,n.cancelCloseTimer());this.#g(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.#e=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#T(e){if(this.#g(),e||this.#h)return;let n=this.triggerAnchor;if(!n)return;this.#o=this.#I(n);let r=()=>{if(!this._shown){this.#n=void 0;return}let a=this.triggerAnchor;if(!a){this.#n=void 0;return}let o=this.#I(a);this.#E(o)||(this.#o=o,this.#d(a)),this.#n=this.view.requestAnimationFrame(r)};this.#n=this.view.requestAnimationFrame(r)}#d(e){if(this.#a===void 0||this.#r===void 0)return;let n=this.surface.getBoundingClientRect(),r=_t(e).top+this.#a;r=Math.min(r,this.view.innerHeight-n.height-ee),r=Math.max(ee,r),this.surface.style.transform=`translate(${this.#r}px, ${Math.round(r)}px)`,this.updateScrollFade()}#g(){this.#n!==void 0&&(this.view.cancelAnimationFrame(this.#n),this.#n=void 0),this.#o=void 0,this.#r=void 0,this.#a=void 0}#I(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=_t(e);return[n,r,a,o,i,s]}#E(e){let n=this.#o;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=ee,d=ee;if(e){l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let h=l.getBoundingClientRect();c=e[0],c+h.width>i-ee&&(c=i-h.width-ee),c=Math.max(ee,c),d=e[1],d+h.height>s-ee&&(d=d-h.height),d=Math.max(ee,d)}else if(this.isSubmenu){let h=this.triggerAnchor?_t(this.triggerAnchor):null;if(!h)return;l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let f=l.getBoundingClientRect();c=h.right+this.#b,c+f.width>i-ee&&(c=h.left-f.width-this.#b),c=Math.max(ee,c);let b=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),v=parseFloat(b.borderTopWidth)+parseFloat(b.paddingTop)+parseFloat(g.paddingTop);d=h.top-v,d+f.height>s-ee&&(d=s-f.height-ee),d=Math.max(ee,d)}else{let h=this.triggerAnchor?_t(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 f=this.#p;if(f.startsWith("right")||f.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(Ji,s-2*ee)}px`;let b=l.getBoundingClientRect(),g=i-h.right-2*ee,v=h.left-2*ee,x=f.startsWith("left");r&&this._flippedSide!==null?x=this._flippedSide:x&&v<b.width&&g>v?x=!1:!x&&g<b.width&&v>g&&(x=!0),this._flippedSide=x,c=x?h.left-b.width-this.#b:h.right+this.#b,c=Math.max(ee,Math.min(c,i-b.width-ee));let w=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";d=w==="center"?h.top+h.height/2-b.height/2:w==="end"?h.bottom-b.height:h.top,d+b.height>s-ee&&(d=s-b.height-ee),d=Math.max(ee,d)}else{let b=s-h.bottom-2*ee,g=h.top-2*ee,v=f.startsWith("top");l.style.maxHeight="";let x=l.scrollHeight;r&&this._flippedTop!==null?v=this._flippedTop:v&&g<x&&b>g?v=!1:!v&&b<x&&g>b&&(v=!0),this._flippedTop=v;let w=v?g:b;l.style.maxHeight=`${Math.max(Ji,Math.floor(w))}px`;let I=l.getBoundingClientRect(),C=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";c=C==="center"?h.left+h.width/2-I.width/2:C==="end"?h.right-I.width:h.left,c+I.width>i-ee&&(c=i-I.width-ee),c=Math.max(ee,c),d=v?h.top-I.height-this.#b:h.bottom+this.#b,d=Math.max(ee,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.#r=u,this.#a=m-_t(this.triggerAnchor).top)};n?a():requestAnimationFrame(a)}onSurfaceClick=e=>{for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof t&&a!==this)return}let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;a instanceof Element&&(a.matches(Vy)&&(r=!0),(a instanceof Lt||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Lt){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Element){if(a.hasAttribute("data-menu-open"))return;if(a instanceof Lt){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e,!0)}}};closeSystem(e,n=!1){if(!n&&this.closest("[data-menu-open]")){this.requestClose(e);return}(j[0]??this).requestClose(e)}#O(){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.#O();for(let n of this.#l)e.has(n)||this.surface.removeEventListener(n,this.#u);for(let n of e)this.#l.has(n)||this.surface.addEventListener(n,this.#u);this.#l=e}handleKey(e){if(Ye(e))return;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.#s){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Ro(s,Jt(this.doc),e.shiftKey);return}let r=this.#A;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Xi(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 Lt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",Ny),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#B(e){let n=_t(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 r,a;this.#f&&(r=o=>{o.pointerType==="mouse"&&(this.#e=!1,this.scheduleOpen())},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#i){let n=r=>{qy(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#s){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=a=>{if(e.matches("a-input")&&a.composedPath().some(s=>s instanceof Element&&s.getAttribute("slot")==="clear"))return;let o=a.detail===0,i=this.#h?o?this.#B(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:i,viaKeyboard:o,originEvent:a})},r=a=>{if(Ye(a)||this._shown||e.hasAttribute("disabled")||e.hasAttribute("loading")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(_y))return;let i=e.matches(Fy);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#h?this.#B(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),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()},Ly))}scheduleClose(){if(this.cancelOpenTimer(),!!this._shown&&!this.#e&&!this.#w){if(j.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))){this.cancelCloseTimer();return}this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},Ry)}}get#w(){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 zg(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ts)}zg();var ns=class extends z{};function Bg(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",ns)}Bg();var rs=class extends z{};function Lg(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",rs)}Lg();var as=class extends mr{ariaProp="ariaSelected"};function Rg(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",as)}Rg();var os=class extends z{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(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.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.#l()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&r!==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#o(){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.#l();return}this.resizeObserver??=new this.view.ResizeObserver(this.#a),this.resizeObserver.observe(this)}#a=()=>{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)};#l(){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.#o,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#u(r),this.lastSelected=r};#u(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(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||Ye(e))return;let n=this.#o.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.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 a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function Ng(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",os)}Ng();var is=class extends z{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 r=e!=null?this.tabs?.querySelector(`a-tab[value="${Zy(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function Zy(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function _g(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",is)}_g();var $y="closerequest",Gy=200,Ky=`
1030
- :host { display: contents; }
1031
-
1032
- dialog {
1033
- --_dur: ${Gy}ms;
1034
- --_r: var(--dialog-round, var(--dialog-radius, 10px));
1035
-
1036
- position: fixed;
1037
- box-sizing: border-box;
1038
- padding: 0;
1039
- border: var(--dialog-outline, none);
1040
- max-width: calc(100vw - 2 * var(--dialog-margin, 32px));
1041
- max-height: calc(100dvh - 2 * var(--dialog-margin, 32px));
1042
- width: var(--dialog-width, 480px);
1043
- height: var(--dialog-height, fit-content);
1044
- overflow: visible;
1045
- color: var(--dialog-text, inherit);
1046
- background: var(--dialog-bg, #fff);
1047
- border-radius: var(--_r);
1048
- 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));
1049
-
1050
- flex-direction: column;
1051
- }
1052
-
1053
- dialog[open] {
1054
- display: flex;
1055
- }
1056
-
1057
- dialog:focus, dialog:focus-visible { outline: none; }
1058
-
1059
- dialog::backdrop {
1060
- background: var(--dialog-overlay, color-mix(in oklch, black 40%, transparent));
1061
- }
1062
-
1063
- :host { --_enter-from: scale(0.97); }
1064
- :host([position="left"]) { --_enter-from: translateX(-100%); }
1065
- :host([position="right"]) { --_enter-from: translateX(100%); }
1066
- :host([position="top"]) { --_enter-from: translateY(-100%); }
1067
- :host([position="bottom"]) { --_enter-from: translateY(100%); }
1068
-
1069
- @media (prefers-reduced-motion: no-preference) {
1070
- dialog {
1071
- opacity: 0;
1072
- transform: var(--_enter-from);
1073
- transition:
1074
- opacity var(--_dur) ease,
1075
- transform var(--_dur) ease,
1076
- overlay var(--_dur) ease allow-discrete,
1077
- display var(--_dur) ease allow-discrete;
1078
- }
1079
- dialog[open] {
1080
- opacity: 1;
1081
- transform: none;
1082
- }
1083
- @starting-style {
1084
- dialog[open] { opacity: 0; transform: var(--_enter-from); }
1085
- }
1086
-
1087
- dialog::backdrop {
1088
- background: transparent;
1089
- transition:
1090
- background var(--_dur) ease,
1091
- overlay var(--_dur) ease allow-discrete,
1092
- display var(--_dur) ease allow-discrete;
1093
- }
1094
- dialog[open]::backdrop { background: var(--dialog-overlay, color-mix(in oklch, black 40%, transparent)); }
1095
- @starting-style {
1096
- dialog[open]::backdrop { background: transparent; }
1097
- }
1098
- }
1099
-
1100
- :host([position="left"]) dialog,
1101
- :host([position="right"]) dialog {
1102
- width: var(--dialog-width, 380px);
1103
- max-width: calc(100vw - var(--dialog-margin, 32px));
1104
- height: 100dvh;
1105
- max-height: 100dvh;
1106
- border-radius: 0;
1107
- }
1108
- :host([position="left"]) dialog { margin: 0 auto 0 0; }
1109
- :host([position="right"]) dialog { margin: 0 0 0 auto; }
1110
-
1111
- :host([position="top"]) dialog,
1112
- :host([position="bottom"]) dialog {
1113
- width: 100vw;
1114
- max-width: 100vw;
1115
- height: var(--dialog-height, fit-content);
1116
- max-height: calc(100dvh - var(--dialog-margin, 32px));
1117
- border-radius: 0;
1118
- }
1119
- :host([position="top"]) dialog { margin: 0 auto auto auto; }
1120
- :host([position="bottom"]) dialog { margin: auto auto 0 auto; }
1121
-
1122
- :host([position="fullscreen"]) dialog {
1123
- width: 100vw;
1124
- max-width: 100vw;
1125
- height: 100dvh;
1126
- max-height: 100dvh;
1127
- margin: 0;
1128
- border-radius: 0;
1129
- }
1130
-
1131
- :host([round]) dialog { border-radius: var(--_r); }
1132
- :host([round="top"]) dialog { border-radius: var(--_r) var(--_r) 0 0; }
1133
- :host([round="bottom"]) dialog { border-radius: 0 0 var(--_r) var(--_r); }
1134
- :host([round="left"]) dialog { border-radius: var(--_r) 0 0 var(--_r); }
1135
- :host([round="right"]) dialog { border-radius: 0 var(--_r) var(--_r) 0; }
1136
-
1137
- slot[name="header"] {
1138
- display: none;
1139
- flex: 0 0 auto;
1140
- padding: var(--dialog-header-padding, 18px 20px 8px);
1141
- overflow: clip;
1142
- overflow-wrap: anywhere;
1143
- font-size: 17px;
1144
- font-weight: 560;
1145
- line-height: 24px;
1146
- }
1147
- slot[name="header"].has-content { display: block; }
1148
- dialog.has-close slot[name="header"] { padding-inline-end: 52px; }
1149
-
1150
- slot[part="body"] {
1151
- display: block;
1152
- flex: 1 1 auto;
1153
- min-height: 0;
1154
- overflow: auto;
1155
- padding: var(--dialog-body-padding, 8px 20px 12px);
1156
- }
1157
- /* With a close button but no header, the body is the top zone, so it takes the
1158
- \u2715 clearance instead of the header (which is display:none when empty). */
1159
- dialog.has-close slot[name="header"]:not(.has-content) ~ slot[part="body"] {
1160
- padding-inline-end: 52px;
1161
- }
1162
-
1163
- slot[name="footer"] {
1164
- display: none;
1165
- flex: 0 0 auto;
1166
- padding: var(--dialog-footer-padding, 8px 20px 18px);
1167
- }
1168
- slot[name="footer"].has-content {
1169
- display: flex;
1170
- gap: 8px;
1171
- justify-content: flex-end;
1172
- align-items: center;
1173
- flex-wrap: wrap;
1174
- }
1175
-
1176
- slot[name="close"] { display: none; }
1177
- slot[name="close"].has-content {
1178
- display: block;
1179
- position: absolute;
1180
- inset-block-start: 10px;
1181
- inset-inline-end: 10px;
1182
- z-index: 1;
1183
- }
1184
- `,ss=class extends z{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#o=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Ky,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 r=document.createElement("slot");r.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let a of[this.headerSlot,this.footerSlot,this.closeSlot])a.addEventListener("slotchange",()=>{let o=a.assignedNodes().length>0;a.classList.toggle("has-content",o),a===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#p()),this.dialog.append(this.headerSlot,r,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",a=>{a.preventDefault(),this.#l||this.requestClose()}),this.dialog.addEventListener("pointerdown",a=>{this.#o=a.target===this.dialog}),this.dialog.addEventListener("click",a=>{this.#l||this.#o&&a.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#a?this.#h(Kt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener($y,()=>this.requestClose())}connectedCallback(){this.#a?this.#h(Kt(this.getAttribute("state"))):(this.#n||(Kt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#f()),this.#m(),this.#p()}disconnectedCallback(){this.#s(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#a&&this.#h(Kt(this.getAttribute("state"))),this.#m()):e==="name"&&this.#m()}get#a(){return this.hasAttribute("state")}get#l(){return this.hasAttribute("persistent")}get#u(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#u==="open")return;let e=this.#i("open");this.#a||e&&this.#f()}requestClose(){if(this.#u==="closed")return;let e=this.#i("closed");this.#a||e&&this.#b()}#i(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#u}}))}#h(e){e==="open"?this.#f():this.#b()}#f(){if(this.#t=!0,this.dialog.open||!this.isConnected)return;this.dialog.showModal();let e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.dialog.focus()}#b(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#p(){let e=this.headerSlot.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.dialog.setAttribute("aria-label",e):this.dialog.removeAttribute("aria-label")}#m(){let e=!this.#a&&!!this.getAttribute("name");e&&!this.#r?this.#c():!e&&this.#r&&this.#s()}#c(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let r=e.target;r instanceof Element&&(r.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():r.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#s(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function Fg(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",ss)}Fg();var Xy=`
1185
- .container {
1186
- display: flex;
1187
- flex-direction: column;
1188
- box-sizing: border-box;
1189
- width: 100%;
1190
- height: 100%;
1191
- min-width: 0;
1192
- color: inherit;
1193
- text-decoration: none;
1194
- cursor: default;
1195
- border-radius: var(--card-radius, 8px);
1196
- -webkit-user-drag: none;
1197
- }
1198
- :host([media-position="bottom"]) .container { flex-direction: column-reverse; }
1199
- :host([media-position="left"]) .container { flex-direction: row; }
1200
- :host([media-position="right"]) .container { flex-direction: row-reverse; }
1201
-
1202
- :host([href]) .container { user-select: none; }
1203
- :host([href]:not([loading])) .container { cursor: pointer; }
1204
-
1205
- .container:focus-visible {
1206
- outline: none;
1207
- box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px var(--focus-ring);
1208
- }
1209
-
1210
- [part="media"] { display: block; }
1211
- :host([media-position="left"]) [part="media"],
1212
- :host([media-position="right"]) [part="media"] { flex: none; }
1213
-
1214
- .content {
1215
- display: flex;
1216
- flex-direction: column;
1217
- flex: 1 1 auto;
1218
- min-width: 0;
1219
- min-height: 0;
1220
- /* Base type for the content zone, matching the body <a-text> at this size. The
1221
- title / subtitle / body all set their own font, so this changes nothing
1222
- visible \u2014 it defines the em/ch base so the header gap (in ch) resolves against
1223
- the body's type size. */
1224
- font-size: var(--card-content-fs, 15px);
1225
- line-height: var(--card-content-lh, 20px);
1226
- }
1227
-
1228
- .header {
1229
- display: flex;
1230
- align-items: center;
1231
- gap: 1ch;
1232
- padding: var(--card-padding, 12px);
1233
- padding-block-start: calc(var(--card-padding, 12px) - var(--card-header-nudge, 1px));
1234
- padding-block-end: calc(var(--card-padding, 12px) / 2);
1235
- }
1236
- slot[name="icon"] {
1237
- flex: none;
1238
- display: flex;
1239
- align-items: center;
1240
- /* Off by default; secondary cards in light multiply the chip into the deeper
1241
- surface (see --card-icon-blend in the external sheet). */
1242
- mix-blend-mode: var(--card-icon-blend, normal);
1243
- }
1244
- slot[name="header"] {
1245
- display: block;
1246
- flex: 1 1 auto;
1247
- min-width: 0;
1248
- }
1249
- slot[part="body"] {
1250
- display: block;
1251
- flex: 1 1 auto;
1252
- min-width: 0;
1253
- min-height: 0;
1254
- padding: var(--card-padding, 12px);
1255
- }
1256
- slot[name="footer"] {
1257
- display: flex;
1258
- align-items: center;
1259
- gap: 8px;
1260
- flex-wrap: wrap;
1261
- justify-content: flex-start;
1262
- padding: var(--card-padding, 12px);
1263
- }
1264
-
1265
- :host([selected]) .container { box-shadow: inset 0 0 0 2px var(--card-selected-ring, var(--focus-ring)); }
1266
- :host([selected]) .container:focus-visible { box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px var(--focus-ring); }
1267
-
1268
- :host([loading]) .container { pointer-events: none; }
1269
- @media (prefers-reduced-motion: no-preference) {
1270
- :host([loading]) [part="content"] { animation: card-pulse 1.4s ease-in-out infinite; }
1271
- }
1272
- @keyframes card-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
1273
- `,ls=class extends z{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=Xy,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let r=document.createElement("slot");r.name="media",r.setAttribute("part","media");let a=document.createElement("div");a.className="content",a.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"),a.append(o,this.#n,s),this.#e.append(r,a),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#o()}attributeChangedCallback(){this.#o()}#o(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let r of["target","rel","ping"]){let a=this.getAttribute(r);a!=null?this.#e.setAttribute(r,a):this.#e.removeAttribute(r)}}else for(let r of["href","target","rel","ping"])this.#e.removeAttribute(r);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.#a(this.#t)||this.#a(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#a(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function Vg(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",ls)}Vg();var Jy="dismissrequest",Qy="data-banner-dismiss",e1=`
1274
- slot[name="message"], slot:not([name]) { display: contents; }
1275
-
1276
- slot[name="actions"] {
1277
- display: flex;
1278
- align-items: center;
1279
- gap: 4px;
1280
- flex-shrink: 0;
1281
- }
1282
- slot[name="actions"][hidden] { display: none; }
1283
-
1284
- slot[name="close"] {
1285
- position: absolute;
1286
- inset-inline-end: 0;
1287
- inset-block: 0;
1288
- display: grid;
1289
- place-items: center;
1290
- opacity: 0.65;
1291
- transition: opacity 150ms ease;
1292
- }
1293
- slot[name="close"]:hover,
1294
- slot[name="close"]:focus-within {
1295
- opacity: 1;
1296
- }
1297
- `,Hg=Kt,cs=class extends z{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=e1;let r=document.createElement("slot");r.name="message",r.setAttribute("part","message");let a=document.createElement("slot");a.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=()=>{o.hidden=!o.assignedNodes({flatten:!0}).some(l=>{if(l.nodeType===Node.TEXT_NODE)return l.textContent?.trim()!=="";if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return!c.hasAttribute("data-anta-banner-actions-wrapper")||!c.matches(":empty")})};o.hidden=!0,o.addEventListener("slotchange",i);let s=document.createElement("slot");s.name="close",s.setAttribute("part","close"),e.append(n,r,a,o,s),i(),this.addEventListener(Jy,l=>{l.stopPropagation(),this.#l()}),xo(this,Qy,()=>this.#l())}get#n(){return this.hasAttribute("state")}get#o(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#a(Hg(this.getAttribute("state"))):this.#t||(this.#a(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#a(Hg(this.getAttribute("state")))}#a(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{}}#l(){if(this.#o==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#a("closed")}};function jg(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",cs)}jg();var Ug=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],t1="bottom-right",qg=Object.freeze([]),n1=0;function ds(){let t=qg,e=new Set,n=()=>e.forEach(l=>l());function r(l,c={}){let d=c.id??`t${++n1}`,u=t.findIndex(f=>f.id===d),m=u===-1?void 0:t[u],h={id:d,render:l,placement:c.placement??m?.placement??t1,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((f,b)=>b===u?h:f):[...t,h],n(),d}function a(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:r,dismiss:a,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return qg}}}var r1=Ug,us=class extends z{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=a1,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let r of r1){let a=document.createElement("slot");a.name=r,this.#e.append(a)}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}}},a1=`
1298
- :host { display: contents; }
1299
-
1300
- .region {
1301
- position: fixed;
1302
- inset: 0;
1303
- margin: 0;
1304
- padding: 0;
1305
- border: 0;
1306
- background: transparent;
1307
- overflow: visible;
1308
- pointer-events: none;
1309
- width: auto;
1310
- height: auto;
1311
- }
1312
- .region:popover-open { display: block; }
1313
-
1314
- slot {
1315
- position: absolute;
1316
- display: flex;
1317
- flex-direction: column;
1318
- gap: var(--toaster-gap, 12px);
1319
- width: min(var(--toaster-width, 380px), calc(100vw - 2 * var(--toaster-inset, 16px)));
1320
- box-sizing: border-box;
1321
- pointer-events: none;
1322
- }
1323
-
1324
- ::slotted(*) { pointer-events: auto; }
1325
-
1326
- slot[name^="top-"] { top: var(--toaster-inset, 16px); flex-direction: column-reverse; }
1327
- slot[name^="bottom-"] { bottom: var(--toaster-inset, 16px); flex-direction: column; }
1328
- slot[name$="-left"] { left: var(--toaster-inset, 16px); }
1329
- slot[name$="-right"] { right: var(--toaster-inset, 16px); }
1330
- slot[name$="-center"] { left: 50%; transform: translateX(-50%); }
1331
- `;function Yg(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",us)}Yg();var o1=220,Wg=5e3,i1="data-toast-dismiss",hs=class extends z{static observedAttributes=["leaving","rev"];#e;#t;#n;#o;#r;#a;#l=0;#u=0;#i=!1;#h=!1;#f=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(r){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",r)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=s1,this.#t=document.createElement("slot"),e.append(n,this.#t),xo(this,i1,()=>this.dismiss())}connectedCallback(){if(this.#p(),this.addEventListener("pointerenter",this.#g),this.addEventListener("pointerleave",this.#I),this.addEventListener("focusin",this.#E),this.addEventListener("focusout",this.#O),this.hasAttribute("leaving")){this.dismiss();return}this.#s()}disconnectedCallback(){this.#T(),this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.removeEventListener("pointerenter",this.#g),this.removeEventListener("pointerleave",this.#I),this.removeEventListener("focusin",this.#E),this.removeEventListener("focusout",this.#O)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#i&&this.#b():e==="rev"&&this.isConnected&&this.restart()}#b(){this.#a!=null&&(this.view.clearTimeout(this.#a),this.#a=void 0),this.#i=!1,this.#e?.states?.delete("leaving"),this.#s()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#p()}#p(){this.#n!==this.#o&&(this.#o?.parentNode===this&&this.removeChild(this.#o),this.#o=this.#n,this.#n&&this.append(this.#n))}get#m(){let e=this.getAttribute("duration");if(e==null)return Wg;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:Wg}get#c(){return this.#h||this.#f}#s(){this.#l=this.#m,this.#A(),this.#y()}#A(){Number.isFinite(this.#m)?(this.#t.style.animation=`toast-remaining ${this.#m}ms linear forwards`,this.#v(e=>{e.currentTime=0}),(this.#c||this.#i)&&this.#x()):this.#t.style.animation=""}#v(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#x(){this.#v(e=>e.pause())}#S(){this.#v(e=>e.play())}#y(){if(!(this.#r!=null||this.#i||this.#c||!Number.isFinite(this.#m))){if(this.#l<=0){this.dismiss();return}this.#u=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#l),this.#S()}}#T(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#d(){this.#r!=null&&(this.#l-=Date.now()-this.#u,this.#T(),this.#x())}#g=()=>{this.#h=!0,this.#d()};#I=()=>{this.#h=!1,this.#y()};#E=()=>{this.#f=!0,this.#d()};#O=()=>{this.#f=!1,this.#y()};#M(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#B(){if(this.#M())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 o1}restart(){this.#i||(this.#T(),this.#s())}dismiss(){if(this.#i)return;this.#i=!0,this.#T(),this.#x(),this.#e?.states?.add("leaving");let e=this.#B();this.#a=this.view.setTimeout(()=>{this.#a=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},s1=`
1332
- :host { display: block; opacity: 1; translate: 0 0; }
1333
- :host(:state(leaving)) { opacity: 0; }
1334
-
1335
- @starting-style {
1336
- :host { opacity: 0; translate: 0 12px; }
1337
- }
1338
-
1339
- @media (prefers-reduced-motion: no-preference) {
1340
- :host {
1341
- transition:
1342
- opacity var(--toast-dur, 220ms) ease,
1343
- translate var(--toast-dur, 220ms) ease;
1344
- }
1345
- }
1346
-
1347
- slot { display: block; }
1348
-
1349
- @keyframes toast-remaining {
1350
- from { --toast-remaining: 1; }
1351
- to { --toast-remaining: 0; }
1352
- }
1353
- `;function Zg(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",hs)}Zg();var l1=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?nt(r,"--avatar-size",l):l,m=te(o,"--avatar-radius",u),h=F(a,"--avatar-badge-tone-source",m);return p("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:X(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 c1=({value:t,max:e=100,tone:n,size:r,round:a,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,f=e>0?Math.min(e,Math.max(0,m)):0,b=[o,!u&&`${h}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return p("a-progress",{value:u?!1:m,max:e,tone:Q(n),size:r&&r!=="medium"?r:void 0,round:X(a),role:"progressbar","aria-valuenow":u?void 0:f,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":b,class:s,style:te(a,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:tu(c)?c:S("a-progress-label",{children:[!u&&S("a-progress-number",{children:[h,"%"]}),o!=null&&p("a-progress-text",{children:o}),i!=null&&p("a-progress-hint",{children:i})]})})};var Td=({tone:t,value:e,max:n=100,size:r,speed:a,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,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},f=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:Q(t),...c?{value:u}:{},class:i,style:h,...f,...l})};var dt=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>p("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:X(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:te(n,"--tooltip-round",l),...d,children:c});var ps=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=bo(a),m=Q(e),h=F(m,"--text-tone-source",u!=null?{...l,"--line-clamp":u}:l),f=o&&u!=null;return S("a-text",{priority:t,tone:m,size:n,inline:r?"":void 0,truncate:u!=null?String(u):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:h,...d,children:[c,u!=null&&!f&&p(dt,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function d1(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=Mo(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var u1=({display:t,round:e,gap:n,includeRectsFor:r,padding:a,margin:o,observe:i,observeOffscreen:s,throttle:l,fade:c,fadeSize:d,onMeasureChange:u,onContextChange:m,className:h,style:f,children:b,...g})=>{let v=te(e,"--box-round",f);return v=nt(n,"--box-gap",v),v=nt(a,"--box-padding",v),v=nt(o,"--box-margin",v),v=nt(c?d:void 0,"--box-fade-size",v),p("a-box",{display:t==="block"?void 0:t,round:X(e),gap:n!=null?"":void 0,"include-rects-for":r,padding:a!=null?"":void 0,margin:o!=null?"":void 0,observe:d1(i,u,m),"observe-offscreen":s?"":void 0,throttle:l,fade:c?"":void 0,"fade-size":c&&d!=null?br(d):void 0,onmeasurechange:Vn(u),oncontextchange:Vn(m),class:h,style:v,...g,children:b})};function Md(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function $g(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function Gg(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function Kg(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":Md(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var h1=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>p("a-capture",{"wheel-capture":Md(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...$g(t?r:void 0),...Gg(o),...Kg(s),onwheelinput:Vn(a),onpointerinput:Vn(i),onpaninput:Vn(l),class:c,...u,children:d});var p1=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>p("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,onstatechange:n?i=>{let{event:s,detail:l,isOwn:c}=oe(i);c&&l&&n(s,{next:l.next==="maximized",prev:l.prev==="maximized"})}:void 0,class:r,...o,children:a});var Id=({level:t=2,priority:e,tone:n,truncate:r,className:a,style:o,children:i,...s})=>{let l=bo(r),c=Q(n),d=F(c,"--title-tone-source",l!=null?{...o,"--line-clamp":l}:o);return S("a-title",{level:String(t),priority:e,tone:c,truncate:l!=null?String(l):void 0,role:"heading","aria-level":t,class:a,style:d,...s,children:[i,l!=null&&p(dt,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var ve=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return p("a-icon",{shape:t,class:r,style:i,...s,...o})};var ms=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=Q(a),h=F(m,"--tag-tone-source",c),f=r!=null,b=t!=null&&n==null&&r==null&&d==null&&e==null;return S("a-tag",{tone:m,"aria-label":b?`${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(ve,{shape:t}),n!=null&&(f?p("a-tag-label",{children:n}):p("a-tag-value",{children:n})),f&&p("a-tag-value",{children:r}),d,e&&p(ve,{shape:e})]})};var fe=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:h,href:f,target:b,rel:g,download:v,ping:x,type:w,form:I,className:C,style:B,children:L,...D})=>{let T=Q(e),N=d||c,Y=te(m,"--button-round",F(T,"--button-tone-source",B)),$=a!=null&&s==null&&L==null&&o==null,G={role:"button",priority:t,tone:T,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:X(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:N?-1:0,"aria-disabled":N?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":$?a:void 0,class:C,style:Y,onClick:N?void 0:h},O=S(me,{children:[a&&p("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&p("a-button-label",{children:s}),fo(L,"a-button-label"),o&&p("a-icon",{shape:o,"aria-hidden":"true"})]});if(f!=null){let ie={...G,disabled:N||void 0};return p("a",{href:N?void 0:f,"data-anta":"",target:b,rel:g,download:v,ping:x,...ie,...D,children:O})}return p("a-button",{type:w,form:I,...G,...D,children:O})};function fs(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,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":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(oe(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function bs(t){return t.copyNode!=null&&t.copyNode!==!1}var Dd=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...h})=>{let f=e==="none"?void 0:t??"copy",{shownIcon:b,shownTone:g,handleCopied:v}=yo(f,r,a),x=e==="trailing"?{iconTrailing:b}:e==="none"?{}:{icon:b},w=d!=null||u!=null,I=fs({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:v,toast:e==="none",copiedLabel:n});return S(fe,{...x,label:d,tone:e==="none"?r:g,"aria-label":m??(w?void 0:"Copy"),"data-copy-node-button":bs({copyNode:s})?"":void 0,...h,children:[u,p("a-copy",{...I})]})};var qe=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:h,children:f,...b})=>p("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:v,detail:x,isOwn:w}=oe(g);w&&x&&l(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,round:X(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":u==="menu"||u==="listbox"?"vertical":void 0,class:m,style:nt(i,"--menu-padding",te(c,"--menu-round",h)),...b,children:f});var Od={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function m1(t){let e=[],n="",r=()=>{n&&(e.push(Od[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)Od[a]?(r(),e.push(Od[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function f1(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(m1).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Se=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:m,value:h,onSelect:f,href:b,target:g,rel:v,download:x,ping:w,role:I,className:C,style:B,children:L,...D})=>{let T=t,N=s==="checkbox"||s==="radio"||s==="check"||s==="switch",Y=s==="checkbox"||s==="switch"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",$=N?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,G=i&&(s===void 0||s==="check"),O=u==="selected"&&!i?void 0:d,ie=Q(O),de=s==="switch"?{"data-menu-open":""}:{},E=D["aria-keyshortcuts"],U=r?f1(r):void 0,K=r?p("kbd",{"aria-hidden":E??U?"true":void 0,children:r}):null,pe=e!=null&&(n!=null?S("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(b!=null){let ne={"data-anta-menu-item":"",role:I??"menuitem",href:o?void 0:b,target:g,rel:v,download:x===!0?"":x||void 0,ping:w,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":U,tone:ie,style:F(O,"--menu-item-tone-source",B),onClick:f&&!o?ue=>f(ue,{value:h,label:e}):void 0,class:C};return S("a",{...ne,...D,children:[t&&p("a-icon",{shape:t,"aria-hidden":"true"}),pe,L,K,a&&p("a-icon",{shape:a,"aria-hidden":"true"})]})}return S("a-menu-item",{role:I??Y,tabIndex:0,disabled:o?"":void 0,selected:G?"":void 0,"aria-checked":$,tone:ie,style:F(O,"--menu-item-tone-source",B),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":U,onmenuselect:f?ne=>f(ne,{value:h,label:e}):void 0,class:C,...D,...de,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:ie,style:F(O,"--checkbox-tone-source")}):s==="radio"?p("a-radio",{"aria-hidden":"true",selected:!!i,tone:ie,style:F(O,"--radio-tone-source")}):null,T&&p("a-icon",{shape:T,"aria-hidden":"true"}),pe,L,K,s==="switch"&&c==null&&p("a-switch",{"data-menu-item-switch":"","aria-hidden":"true",tabIndex:-1,state:i?"checked":"unchecked",disabled:o?"":void 0,size:"small",tone:ie,style:F(O,"--switch-tone-source",F(O,"--switch-off-tone-source"))}),(()=>{let ne=m?a??"chevron-right":a;return!m&&!a&&s==="check"&&c==null&&(ne=i?"check":"blank"),ne?p("a-icon",{shape:ne,"aria-hidden":"true"}):null})()]})};var Pd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let h=n==="none"?void 0:e,{shownIcon:f,shownTone:b,handleCopied:g}=yo(h,a,o),v=n==="trailing"?{iconTrailing:f}:n==="none"?{}:{icon:f},x=fs({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:r});return S(Se,{label:t,tone:b,...v,"data-menu-open":"","data-copy-node-button":bs({copyNode:l})?"":void 0,...m,children:[u,p("a-copy",{...x})]})};var b1=new Set(["\u2192","/","\u2022","\u25B8"]);function Xg(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function g1(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Jg(t){return t.current?{"aria-current":"page"}:{}}function v1(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=Jg(t);if(Xg(t)){let m={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return p(Dd,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return p(fe,{...u,children:s},i)}function x1(t,e){let{label:n,current:r,onClick:a,...o}=t,i=Jg(t);return Xg(t)?p(Pd,{...o,label:n,onSelect:a,...i},e):p(Se,{...o,label:n,onSelect:a,...i},e)}var y1=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...h})=>{let f=g1(t,a,o),b=b1.has(r),g=b?r:p(ve,{shape:r});return p("a-breadcrumbs",{role:"navigation","aria-label":m??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":b?void 0:"",class:d,style:u,...h,children:f.flatMap((v,x)=>{let w=v.kind==="overflow"?[p(fe,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${x}`),p(qe,{autoWidth:!0,children:v.items.map((I,C)=>x1(I,C))},`menu-${x}`)]:[v1(v.item,e,n,s,l,c,x)];return x<f.length-1&&w.push(p("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${x}`)),w})})};var w1=["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-user","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-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],k1={"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"],"circle-user":["avatar","person","account","contact","profile"],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"],"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 Qg=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",ev=t=>t==="indeterminate"?"indeterminate":t==="checked",E1=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),C1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:h,children:f,tabIndex:b,...g})=>{let v=te(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(r,"--checkbox-off-tone-source",h))),x=g["aria-label"],w=(typeof x=="string"?x:void 0)??d??(typeof f=="string"?f:void 0),I=s?T=>{let{event:N,detail:Y}=oe(T);Y&&s(N,{next:ev(Y.next),prev:ev(Y.prev)})}:void 0,C=l||c?T=>{l?.(T),c?.(T,E1(T.currentTarget))}:void 0,B=t!==void 0?Qg(t):void 0,L=t===void 0&&e!==void 0?Qg(e):void 0,D=d!=null||f!=null;return S("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":w,...g,state:B,"default-state":L,disabled:n?"":void 0,tone:Q(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),tabIndex:n?-1:b??0,onstatechange:I,onchange:C,class:m,style:v,children:[D&&S("a-checkbox-label",{children:[d,f]}),u!=null&&p("a-checkbox-hint",{children:u})]})};var A1=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),S1=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:h,style:f,children:b,tabIndex:g,...v})=>{let x=te(i,"--switch-round",F(r,"--switch-tone-source",F(r,"--switch-off-tone-source",f))),w=v["aria-label"],I=(typeof w=="string"?w:void 0)??u??(typeof b=="string"?b:void 0),C=l?N=>{let{event:Y,detail:$}=oe(N);$&&l(Y,{next:$.next==="checked",prev:$.prev==="checked"})}:void 0,B=c||d?N=>{c?.(N),d?.(N,A1(N.currentTarget))}:void 0,L=t===void 0?void 0:t?"checked":"unchecked",D=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,T=u!=null||b!=null;return S("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":I,...v,state:L,"default-state":D,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:C,onchange:B,class:h,style:x,children:[T&&S("a-switch-label",{children:[u,b]}),m!=null&&p("a-switch-hint",{children:m})]})};var Ln=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return p("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var ea=({label:t,className:e,children:n,...r})=>S("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&p("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var T1=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,indicator:i,indicatorPlacement:s,disabled:l,round:c,open:d,defaultOpen:u,onStateChange:m,className:h,style:f,children:b,...g})=>{let v=d!==void 0,x=typeof i=="string"&&(i==="chevron"||i==="triangle"||i==="plus")?i:void 0,w=i!=null&&typeof i=="object"&&"closed"in i&&"open"in i?i:void 0,I=i!=null&&!x&&!w,C=typeof i=="object"?i:null,B=te(c,"--expander-round",F(n,"--expander-tone-source",f)),L=typeof t=="object"&&t!==null?p("span",{slot:"title",style:{display:"contents"},children:t}):p("a-expander-summary",{slot:"title",children:t});return S("a-expander",{state:v?d?"open":"closed":void 0,"default-state":!v&&u?"open":void 0,level:e!=null?String(e):void 0,tone:Q(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:X(c),disabled:l?"":void 0,indicator:x,"indicator-placement":s&&s!=="start"?s:void 0,onstatechange:m?D=>{let{event:T,detail:N,isOwn:Y}=oe(D);Y&&N&&m(T,{next:N.next==="open",prev:N.prev==="open"})}:void 0,class:h,style:B,...g,children:[L,o!=null&&p("span",{slot:"actions",children:o}),w&&S(me,{children:[p("span",{slot:"indicator","data-when":"closed","aria-hidden":"true",inert:!0,children:w.closed}),p("span",{slot:"indicator","data-when":"open","aria-hidden":"true",inert:!0,children:w.open})]}),I&&p("span",{slot:"indicator","aria-hidden":"true",inert:!0,children:C}),p("a-expander-details",{children:b})]})};var cr=t=>t?"":void 0,M1=t=>typeof t=="string"||typeof t=="number",tv=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??""}},I1={email:"email",tel:"tel",url:"url"},D1={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},O1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Rt=({label:t,hint:e,status:n,statusIcon:r,tone:a,priority:o,size:i,round:s,value:l,defaultValue:c,multiline:d,rows:u,maxRows:m,clearable:h,leading:f,trailing:b,type:g,autoComplete:v,inputMode:x,autoFocus:w,name:I,placeholder:C,truncate:B=!0,disabled:L,readOnly:D,button:T,required:N,dimActions:Y,spellCheck:$,maxLength:G,minLength:O,pattern:ie,min:de,max:E,step:U,role:K,onInput:pe,onChange:ne,onValueChange:ue,onClearClick:J,onClearInput:be,children:Re,className:Oe,style:xe,...Qe})=>{let et=n&&n!=="neutral"?n:void 0,q=r===void 0?et?O1[et]:void 0:r,ye=g==="search",Ue=ye?void 0:g,ut=f??(ye?p(ve,{shape:"search"}):void 0),R=ye?h??!0:h;return S("a-input",{priority:o&&o!=="primary"?o:void 0,size:i&&i!=="medium"?i:void 0,round:X(s),value:l,defaultvalue:c,multiline:cr(d||u!=null),rows:u!=null?String(u):void 0,maxrows:m!=null?String(m):void 0,status:et,tone:Q(a),type:!d&&u==null?Ue:void 0,name:I,placeholder:C,truncate:cr(B),disabled:cr(L),readonly:cr(D),button:cr(T),required:cr(N),"dim-actions":cr(Y),autocomplete:v??(!d&&u==null&&g?I1[g]:void 0),inputmode:x??(!d&&u==null&&g?D1[g]:void 0),autofocus:w?!0:void 0,spellcheck:$!=null?$?"true":"false":void 0,maxlength:G!=null?String(G):void 0,minlength:O!=null?String(O):void 0,pattern:ie,min:de,max:E,step:U,"aria-invalid":n==="critical"?"true":void 0,role:K??(ye?"searchbox":void 0),oninput:pe||ue?_=>{pe?.(_),ue?.(_,tv(_))}:void 0,onchange:ne||ue?_=>{ne?.(_),ue?.(_,tv(_))}:void 0,onclearclick:J?_=>J(oe(_).event):void 0,onclearinput:be?_=>be(oe(_).event):void 0,class:Oe,style:te(s,"--input-round",F(a,"--input-tone-source",xe)),...Qe,children:[t!=null&&(M1(t)?p("span",{slot:"label",children:t}):p("span",{slot:"label",style:{display:"contents"},children:t})),ut!=null&&p("span",{slot:"leading",style:{display:"contents"},children:ut}),R&&p("span",{slot:"clear",style:{display:"contents"},children:p(fe,{priority:"tertiary",size:i,round:!!s,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&p("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[q&&p(ve,{shape:q,"aria-hidden":"true"}),p("span",{children:e})]}),Re]})};var gs=(t,e)=>Number.isFinite(t)?t:e,P1=t=>typeof t=="string"||typeof t=="number",z1=(t,e)=>{let n=gs(t,0);return{min:n,max:Math.max(n,gs(e,100))}},nv=t=>{let e=t?.target??{};return{value:e.value,min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},B1=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:h,round:f,valueDisplay:b="end",valuePrefix:g,valueSuffix:v,markers:x,trackClick:w="drag-only",inverted:I,onInput:C,onChange:B,onValueChange:L,onValueCommit:D,className:T,style:N,children:Y,tabIndex:$,...G})=>{let O=br(u),ie=br(m),de=nt(m,"--anta-slider-thumb-size",nt(u,"--anta-slider-track-size",te(f,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",N))))),{min:E,max:U}=z1(r,a),K=gs(o,1)>0?gs(o,1):1,pe=G["aria-label"],ne=(typeof pe=="string"?pe:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),ue=Array.isArray(e)||Array.isArray(n),J=q=>Array.isArray(q)?`${q[0]} ${q[1]}`:typeof q=="number"?q:void 0,be=b==="inline"&&t==null?"end":b,Re=q=>q.value<=E?"0%":q.value>=U?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(q.value-E)/(U-E)} + var(--anta-slider-thumb-size) / 2)`,Oe=q=>q.value<=E?"start":q.value>=U?"end":void 0,xe=q=>{let ye={};return Object.assign(ye,{"--slider-marker-position":Re(q)}),ye},Qe=C||L?q=>{let ye=nv(q);C?.(q),L?.(q,ye)}:void 0,et=B||D?q=>{let ye=nv(q);B?.(q),D?.(q,ye)}:void 0;return S("a-slider",{value:J(e),defaultvalue:J(n),min:E,max:U,step:K,name:i,disabled:s?"":void 0,tone:Q(l),"thumb-tone":Q(c),size:d&&d!=="medium"?d:void 0,"track-size":O,"thumb-size":ie,"thumb-fill":h?"":void 0,round:X(f),"track-click":w==="jump"?"jump":void 0,inverted:I?"":void 0,"value-display":be==="end"?void 0:be,"value-prefix":g,"value-suffix":v,role:ue?"group":"slider","aria-label":ne,tabIndex:s||ue?-1:$??0,oninput:Qe,onchange:et,class:T,style:de,...G,children:[t!=null&&(P1(t)?p("span",{slot:"label",children:t}):p("span",{slot:"label",style:{display:"contents"},children:t})),x?.map((q,ye)=>{let Ue=Oe(q);return p("span",{slot:"markers",style:xe(q),"data-slider-marker-start":Ue==="start"?"":void 0,"data-slider-marker-end":Ue==="end"?"":void 0,children:q.label},`${q.value}-${ye}`)}),Y]})};function rv(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=rv(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function L1(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=rv(t))&&(r&&(r+=" "),r+=e);return r}var av=L1;var ta=Me.PlainDate.compare,ov=new Map;function $t(t,e){let n=`${t}|${JSON.stringify(e)}`,r=ov.get(n);return r||(r=new Intl.DateTimeFormat(t,e),ov.set(n,r)),r}var uo=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function $e(t){if(!t)return null;try{return Me.PlainDate.from(t)}catch{return null}}function zd(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Rn(t,e,n){return e&&ta(t,e)<0?e:n&&ta(t,n)>0?n:t}function Bd(t,e,n){return e!=null&&ta(t,e)<0||n!=null&&ta(t,n)>0}var R1=t=>Array.from(t).slice(0,2).join("");function iv(t,e=zd(t)){let n=Me.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=$t(t,{weekday:"short",timeZone:"UTC"}),o=$t(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(uo(l));i.push({short:c,narrow:R1(c),long:o.format(uo(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function Ld(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=Me.Now.plainDateISO(),weeks:s=6}=t,l=zd(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,h=u.subtract({days:m}),f=$t(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),b=[];for(let g=0;g<s;g++){let v=[];for(let x=0;x<7;x++){let w=h.add({days:g*7+x});v.push({date:w,iso:w.toString(),day:w.day,weekday:w.dayOfWeek,outside:w.month!==d||w.year!==c,disabled:Bd(w,r,a),today:i!=null&&ta(w,i)===0,selected:o!=null&&ta(w,o)===0,label:f.format(uo(w))})}b.push(v)}return{year:c,month:d,heading:$t(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(uo(e)),weekdays:iv(n,l),weeks:b}}var sv=new Date(Date.UTC(2026,5,15)),Rd={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function N1(t){try{return $t(t,Rd).formatToParts(sv).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function vs(t){try{return $t(t,Rd).formatToParts(sv).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function xs(t,e){return $t(e,Rd).format(uo(t))}function _1(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=$t(e,{month:"long",timeZone:"UTC"}),a=$t(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function ho(t,e,n={}){let r=u=>Bd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=$e(a);return u?r(u):null}let o=N1(e),i=_1(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Me.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=a.replace(/\D/g,"");if(u.length!==8)return null;let m=0,h={};for(let f of o){let b=f==="year"?4:2;h[f]=Number(u.slice(m,m+b)),m+=b}({year:l,month:c,day:d}=h)}else if(s.length===2){let u=o.filter(h=>h!=="year"),m={};u.forEach((h,f)=>m[h]=s[f]),c=m.month,d=m.day,l=Me.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 r(Me.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function lv(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return Me.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function ys(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=lv(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=ho(o,e,n);return s?s.toPlainDateTime(i??Me.PlainTime.from("00:00")):null}function po(t){try{let e=$t(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function Nd(t,e,n=po(e)){let r=xs(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function _d(t,e=po(t)){return`${vs(t)} HH:MM${e?" AM":""}`}var Fd=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:h,"aria-label":f,...b})=>{let g=t!==void 0,v=a||(typeof navigator<"u"?navigator.language:"en-US"),x=$e(n),w=$e(r),I=Me.Now.plainDateISO(),[C,B]=W(()=>$e(e)),L=g?$e(t):C,[D,T]=W(()=>Rn($e(t??e)??I,x,w)),[N,Y]=W(t),$=D;if(t!==N){Y(t);let R=$e(t);R&&($=Rn(R,x,w),T($))}let[G,O]=W(null),[ie,de]=W(!1),E=Ld({anchor:$,locale:v,min:x,max:w,selected:L,today:I}),U=$.toString(),[K,pe]=W(l);l!==K&&(pe(l),l!==void 0&&O({iso:U,n:l}));let ne=x?x.year:I.year-3,ue=w?w.year:I.year+3,J=[];for(let R=ne;R<=ue;R++)J.push(R);let be=Ge(()=>Array.from({length:12},(R,_)=>Me.PlainDate.from({year:2e3,month:_+1,day:1}).toLocaleString(v,{month:"long"})),[v]),Re=(R,_)=>x!=null&&(R<x.year||R===x.year&&_<x.month)||w!=null&&(R>w.year||R===w.year&&_>w.month),Oe=R=>{s||T(_=>Rn(_.add({months:R}),x,w))},xe=(R,_)=>{s||T(y=>Rn(y.with({year:R,month:_}),x,w))},Qe=Ge(()=>{let R=(_,y)=>{let k=y+1,V=_===D.year&&k===D.month;return p(Se,{label:be[y],selected:V,disabled:Re(_,k)||void 0,"data-menu-open":"",onSelect:()=>{xe(_,k),de(!1)},children:V&&p("span",{className:"jump-dot","aria-hidden":"true"})},`${_}-${k}`)};return J.length===1?be.map((_,y)=>R(J[0],y)):J.map(_=>S(Se,{submenu:!0,label:String(_),selected:_===D.year,children:[_===D.year&&p("span",{className:"jump-dot","aria-hidden":"true"}),p(qe,{children:be.map((y,k)=>R(_,k))})]},_))},[be,D.year,D.month,ne,ue,n,r,s]),et=R=>{let{event:_,detail:y}=oe(R);if(!y||(c?.(_,y),y.reason==="user"&&(g||_.defaultPrevented)))return;let k=$e(y.next);g||B(k),T(Rn(k??D,x,w))},q=R=>{let _="nativeEvent"in R?R.nativeEvent:R;d?.(_),u?.(_,{value:_?.target?.value||null,name:o})},ye=R=>{if(s)return;let{detail:_}=oe(R),y=$e(_?.date??null);if(!y)return;let k=Rn(y,x,w);T(k),O(V=>({iso:k.toString(),n:(V?.n??0)+1}))},Ue=s||x!=null&&Me.PlainDate.compare(D.with({day:1}).subtract({days:1}),x)<0,ut=s||w!=null&&Me.PlainDate.compare(D.with({day:1}).add({months:1}),w)>0;return S("div",{className:av("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:h,...b,children:[S("div",{"data-part":"header",children:[p(fe,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:Ue,onClick:()=>Oe(-1)}),p(fe,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${E.heading} \u2014 choose month and year`,disabled:s||Ue&&ut,children:E.heading}),p(qe,{placement:"bottom",open:ie,onStateChange:(R,{next:_})=>de(_),children:Qe}),p(fe,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:ut,onClick:()=>Oe(1)})]}),S("a-calendar",{role:"group","aria-label":f??E.heading,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":G?`${G.iso}#${G.n}`:void 0,onstatechange:et,onchange:q,onnavigate:ye,children:[E.weekdays.map((R,_)=>p("span",{"data-part":"weekday","data-weekend":R.weekend?"":void 0,"aria-hidden":"true",children:R.narrow},`wd${_}`)),E.weeks.flat().map(R=>{let _=R.today&&!R.selected?{priority:"secondary"}:{priority:"tertiary",selected:R.selected,tone:R.selected?"brand":void 0};return S(fe,{..._,size:i,disabled:s||R.disabled,tabIndex:R.iso===U?0:-1,"aria-label":R.label,"aria-hidden":R.outside?"true":void 0,"aria-current":R.today?"date":void 0,"data-part":"day-cell","data-date":R.iso,"data-today":R.today?"":void 0,"data-outside":R.outside?"":void 0,children:[R.day,R.today&&p(dt,{children:"Today"})]},R.iso)})]})]})};var Vd=t=>t?"":void 0,F1=t=>typeof t=="string"||typeof t=="number",cv=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??""}},V1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Hd=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:h,disabled:f,required:b,icon:g,clearable:v,dimActions:x,trailing:w,autoFocus:I,onValueChange:C,onClearInput:B,children:L,className:D,style:T,...N})=>{let Y=n&&n!=="neutral"?n:void 0,$=r===void 0?Y?V1[Y]:void 0:r;return S("a-input-time",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:Y,tone:Q(a),name:h,disabled:Vd(f),required:Vd(b),"dim-actions":Vd(x),autofocus:I?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:C?G=>C(G,cv(G)):void 0,onchange:C?G=>C(G,cv(G)):void 0,onclearinput:B?G=>B(oe(G).event):void 0,class:D,style:te(i,"--input-time-round",F(a,"--input-time-tone-source",T)),...N,children:[t!=null&&(F1(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(ve,{shape:g??"clock"})}),v&&p("span",{slot:"clear",style:{display:"contents"},children:p(fe,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),w!=null&&p("span",{slot:"trailing",style:{display:"contents"},children:w}),e!=null&&S("span",{slot:"hint",style:{display:"contents"},children:[$&&p(ve,{shape:$,"aria-hidden":"true"}),p("span",{children:e})]}),L]})};var H1=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:h,offset:f,clearable:b,icon:g,time:v,hour12:x,onValueChange:w,className:I,style:C,...B})=>{let L=a||(typeof navigator<"u"?navigator.language:"en-US"),D=$e(n),T=$e(r),N=v?x??po(L):!1,Y=Ge(()=>d??(v?_d(L,N):vs(L)),[d,v,L,N]),$=M=>{if(!M)return"";let H=$e(M.slice(0,10));if(!H)return"";if(!v)return xs(H,L);let Pe=M.length>=16&&M[10]==="T",re=H.toPlainDateTime(Me.PlainTime.from(Pe?M.slice(11,16):"00:00"));return Nd(re,L,N)},G=M=>!M||!v?M:M.length<=10?`${M}T00:00`:M.slice(0,16),O=t!==void 0,[ie,de]=W(()=>G(e)),E=O?t:ie,U=E?E.slice(0,10):"",K=!!E&&E.length>=16&&E[10]==="T",pe=K&&parseInt(E.slice(11,13),10)||0,ne=K?E.slice(14,16):"00",[ue,J]=W(()=>$(E)),[be,Re]=W(!1),[Oe,xe]=W(!1),[Qe,et]=W(0),[q,ye]=W(E);E!==q&&(ye(E),J($(E)),xe(!1));let Ue=M=>{O||de(M||void 0),w?.(M,{value:M,name:o})},ut=M=>`${M}T${String(pe).padStart(2,"0")}:${ne}`,R=M=>{xe(!1),M===(E??"")?J($(M)):Ue(M)},_=M=>{let H=M.trim();if(!H)return xe(!1),E?Ue(""):J(""),!0;let Pe=v?ys(H,L,{min:D,max:T}):ho(H,L,{min:D,max:T});if(!Pe)return xe(!0),!1;let re=v?Pe.toString({smallestUnit:"minute"}):Pe.toString();return R(re),!0},y=Ge(()=>{let M=ue.trim();if(!M)return U;let H=v?ys(M,L,{min:D,max:T}):ho(M,L,{min:D,max:T});return H?H.toString().slice(0,10):null},[ue,v,L,U,n,r]),[k,V]=W(U);return y!==null&&y!==k&&V(y),S(me,{children:[p(Rt,{label:l,hint:Oe?`Unrecognized date. Try ${Y}.`:c,status:Oe?"critical":u,size:i,round:m,disabled:s,clearable:b,leading:g===!1?void 0:p(ve,{shape:g??"calendar-days"}),value:ue,placeholder:Y,inputMode:v?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":be?"true":"false",onInput:M=>{J(M.currentTarget.value),Oe&&xe(!1)},onChange:M=>_(M.currentTarget.value),onKeyDown:M=>{Ye(M)||((M.key==="ArrowDown"||M.key==="ArrowUp")&&!s&&(M.preventDefault(),et(H=>H+1)),M.key==="Enter"&&!s&&(M.preventDefault(),_(M.currentTarget.value)&&Re(!1)))},truncate:!0,className:I,style:C,...B}),p(qe,{role:"dialog","aria-label":v?"Choose date and time":"Choose date",open:be,placement:h??"bottom-start",offset:f,autoWidth:!0,inset:8,onStateChange:(M,{next:H})=>Re(H),children:S("div",{"data-menu-open":"",children:[p(Fd,{value:k,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:Qe,onStateChange:(M,{next:H,reason:Pe})=>{if(Pe!=="user")return;let re=H??"";R(v&&re?ut(re):re),v||Re(!1)}}),v&&S("a-input-date-time-container",{children:[p(Hd,{size:i,locale:a,hour12:x,disabled:s,"aria-label":"Time",value:K?`${String(pe).padStart(2,"0")}:${ne}`:"",onValueChange:(M,{value:H})=>{if(("nativeEvent"in M?M.nativeEvent:M)?.type!=="change")return;let re=U||Me.Now.plainDateISO().toString();Ue(H?`${re}T${H}`:re)}}),p(fe,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>Re(!1)})]})]})}),o?p("input",{type:"hidden",name:o,value:E??""}):null]})};var Nn=t=>typeof t=="string"?{value:t,label:t}:t;function na(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var ra=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),aa=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(p("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var j1=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,filter:i=!0,...s}=t,l=n!==void 0,[c,d]=W(r??""),u=l?n:c,[m,h]=W(!1),f=Ge(()=>e.map(Nn),[e]),b=typeof i=="function",g=i!==!1&&!b?na(u):null,v=b?f.filter(C=>i(C,u)):f.filter(C=>ra(C,g)),x=m&&v.length>0,w=C=>{l||d(C),a?.(C)},I=C=>{w(C.value),o?.(C),h(!1)};return S(me,{children:[p(Rt,{...s,value:u,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":x?"true":"false","aria-autocomplete":"list",onFocus:()=>h(!0),onInput:C=>{w(C.currentTarget.value),h(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&h(!1)}}),p(qe,{role:"listbox",open:x,onStateChange:(C,{next:B})=>{h(B)},children:v.map((C,B)=>{let{className:L,style:D,...T}=ht(C,!0);return p(Se,{...T,role:"option",icon:C.icon,label:aa(C.label??C.value,g),hint:C.hint?aa(C.hint,g):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:N=>N.preventDefault(),onSelect:()=>I(C),className:L,style:D},`${C.value}-${B}`)})})]})};var q1=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),U1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneScope:h,size:f,disabled:b,orientation:g,className:v,style:x,...w})=>{let I=e!==void 0,[C,B]=W(n),L=I?e:C,D=new Set;for(let O of t)D.has(O.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(O.value)} \u2014 values must be unique.`),D.add(O.value);let T=Ss(),N=Ss(),Y=b?void 0:t.find(O=>O.value===L)?.value??t.find(O=>!O.disabled)?.value,$=O=>{let{event:ie,detail:de}=oe(O);de&&(r?.(ie,de),!I&&(de.reason==="user"&&ie.defaultPrevented||B(de.next??void 0)))},G=a||o?O=>{a?.(O),o?.(O,q1(O.currentTarget))}:void 0;return S("a-radio-group",{role:"radiogroup","aria-disabled":b?"true":void 0,"aria-labelledby":c?T:void 0,"aria-describedby":d?N:void 0,...w,state:I?e:void 0,"default-state":I?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:Q(m),"tone-scope":h&&h!=="all"?h:void 0,size:f&&f!=="medium"?f:void 0,disabled:b?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:$,onchange:G,onfocusin:i,onfocusout:s,class:v,style:F(m,"--radio-tone-source",F(m,"--radio-off-tone-source",x)),children:[c&&p("a-radio-group-label",{id:T,children:c}),d&&p("a-radio-group-hint",{id:N,children:d}),p("a-radio-list",{children:t.map(O=>{let ie=b||O.disabled,{className:de,style:E,...U}=ht(O);return S("a-radio",{...U,role:"radio",value:O.value,"aria-disabled":ie?"true":void 0,tabIndex:O.value===Y?0:-1,tone:O.tone||void 0,"tone-scope":O.toneScope??(O.tone?h:void 0),size:O.size&&O.size!=="medium"?O.size:void 0,disabled:O.disabled?"":void 0,class:de,style:F(O.tone,"--radio-tone-source",F(O.tone,"--radio-off-tone-source",E)),children:[p("a-radio-label",{children:O.label}),O.hint!=null&&p("a-radio-hint",{children:O.hint})]},O.value)})})]})};function Y1(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((h,f)=>h+f.on,0),m=d.reduce((h,f)=>h+f.total,0);return{node:{...c,submenu:d.map(h=>h.node),selectionState:r(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((h,f)=>h+f.on,0),m=d.reduce((h,f)=>h+f.total,0);return{node:{...c,options:d.map(h=>h.node),selectionState:r(u,m)},on:u,total:m}}let s=Nn(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var W1=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:h,size:f,status:b,statusIcon:g,round:v,disabled:x,tone:w,toneScope:I,filter:C,selectAll:B=!0,selectAllLabel:L="Select all",clearable:D,clearLabel:T="Clear",renderOption:N,renderIndicator:Y,verbose:$,renderSummary:G,renderTrigger:O,renderEmpty:ie,className:de,style:E,...U}=t,K=a==="multiple",pe=b&&b!=="neutral"?`var(--text-2-${b})`:void 0,ne=K?"checkbox":o??"none",ue=ne==="none"?void 0:ne,J=l,be=i!==void 0,[Re,Oe]=W(s),xe=be?i:Re,[Qe,et]=W(!1),[q,ye]=W(""),Ue=`${m??U["aria-label"]??"Select"} options`,ut=A=>typeof A=="object"&&Array.isArray(A.submenu),R=A=>typeof A=="object"&&Array.isArray(A.options),_=(A,le,ae,se)=>{for(let ge of A)if(typeof ge!="string"&&ut(ge))_(ge.submenu,ge.label,ae||!!ge.disabled,se);else if(typeof ge!="string"&&R(ge))_(ge.options,ge.label,ae||!!ge.disabled,se);else{let At=Nn(ge);se.push({opt:At,disabled:ae||!!At.disabled,group:le})}},y=[];_(e,void 0,!1,y);let k=new Set;for(let A of y){let le=String(A.opt.value);k.has(le)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(A.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),k.add(le)}let V=new Map(y.map(A=>[A.opt.value,A.opt])),M=C!==void 0&&C!==!1,H=q.trim(),Pe=M&&typeof C!="function"?na(H):null,re=A=>typeof C=="function"?C(A,H):ra(A,Pe),ur=typeof C=="function"||M&&!!H?y.filter(A=>re(A.opt)):y,oa=M&&!!H,tt=Array.isArray(xe)?xe:xe!=null?[xe]:[],hr=A=>tt.includes(A),Nt=tt.map(A=>V.get(A)).filter(Boolean),pr=y.filter(A=>!A.disabled).map(A=>A.opt.value),ks=K&&pr.length>1&&pr.every(A=>tt.includes(A)),Es=A=>A.label??String(A.value),_n="";if(K){let A=Nt.length>0?G?.(Nt):void 0;if(A!=null&&A!=="")_n=A;else if(ks)_n="All";else if(Nt.length===1)_n=Es(Nt[0]);else if(Nt.length>1){let le=`${Nt.length} selected`;_n=$?`${le}: ${Nt.map(Es).join(", ")}`:le}}else if(xe!=null){let A=V.get(xe);_n=A?Es(A):""}let mv=(A,le)=>{if(K){if(B&&le?.altKey){let ge=[A.value];be||Oe(ge),J?.(ge,{value:A.value,option:A,selected:!0});return}let ae=tt.includes(A.value),se=ae?tt.filter(ge=>ge!==A.value):[...tt,A.value];be||Oe(se),J?.(se,{value:A.value,option:A,selected:!ae})}else be||Oe(A.value),J?.(A.value,{value:A.value,option:A})},ia=K?ur.filter(A=>!A.disabled).map(A=>A.opt.value):[],Yd=ia.filter(A=>tt.includes(A)),mo=ia.length>0&&Yd.length===ia.length,fv=Yd.length>0&&!mo,bv=()=>{let A=tt.filter(ae=>!ia.includes(ae)),le=mo?A:[...A,...ia];be||Oe(le),J?.(le,{all:!0,selected:!mo})},gv=()=>{let A=K?[]:void 0;be||Oe(A),J?.(A,{all:!0,selected:!1})},Cs=(A,le)=>{let{className:ae,style:se,...ge}=ht(A,!0),At={value:A.value,selected:hr(A.value),disabled:le},Gt=N?.(A,At),Fn=Y?.(At),xv=!K&&ne==="none"?{role:"menuitemradio","aria-checked":hr(A.value)?"true":"false"}:void 0,$d=K&&B&&!le?go:void 0,Gd=A.tooltip??$d,yv=A.tooltip==null&&$d!=null;return S(Se,{...ge,selectionIndicator:ue,...xv,indicator:Fn??void 0,label:Gt?void 0:aa(A.label??String(A.value),Pe),hint:Gt?void 0:A.hint?aa(A.hint,Pe):A.hint,icon:Gt?void 0:A.icon,tone:A.tone??w,toneScope:A.toneScope??I,selected:hr(A.value),disabled:le||void 0,"data-menu-open":K?"":void 0,onSelect:wv=>mv(A,wv),className:ae,style:se,children:[Gt,Gd&&p(dt,{...yv?{delay:vo,placement:"left"}:{follow:!0},children:Gd})]},String(A.value))},As=(A,le)=>{let ae=[];return A.forEach((se,ge)=>{if(typeof se!="string"&&ut(se)){let Gt=le||!!se.disabled,Fn=As(se.submenu,Gt);Fn.length&&ae.push(p(Se,{submenu:!0,label:se.label,icon:se.icon,disabled:Gt||void 0,"data-menu-open":K?"":void 0,children:p(qe,{children:Fn})},`sub-${ge}-${se.label}`));return}if(typeof se!="string"&&R(se)){let Gt=le||!!se.disabled,Fn=As(se.options,Gt);Fn.length&&ae.push(p(ea,{label:se.label,children:Fn},`grp-${ge}-${se.label}`));return}let At=Nn(se);typeof C=="function"&&!re(At)||ae.push(Cs(At,le||!!At.disabled))}),ae},vv=()=>{let A=y.filter(ae=>re(ae.opt)),le=[];for(let ae=0;ae<A.length;){let se=A[ae].group;if(se===void 0){le.push(Cs(A[ae].opt,A[ae].disabled)),ae++;continue}let ge=[],At=ae;for(;ae<A.length&&A[ae].group===se;)ge.push(Cs(A[ae].opt,A[ae].disabled)),ae++;le.push(p(ea,{label:se,children:ge},`flat-${At}-${se}`))}return le},Wd=S(me,{children:[O?O({open:Qe,value:xe,selected:Nt,disabled:!!x,icon:d}):S(fe,{disabled:x,size:f,round:v,"aria-label":typeof m=="string"||typeof m=="number"?String(m):void 0,"aria-invalid":b==="critical"?"true":void 0,"aria-haspopup":M?"dialog":"menu","aria-expanded":Qe?"true":"false",...U,children:[(u??d)&&p("a-select-leading",{"aria-hidden":"true",children:u??p(ve,{shape:d})}),p("a-button-label",{"data-placeholder":_n?void 0:"",children:_n||c}),p("a-select-chevron",{open:Qe?"":void 0,"aria-hidden":"true",style:pe?{color:pe}:void 0,children:p(ve,{shape:"chevron-down"})})]}),S(qe,{role:M?"dialog":void 0,"aria-label":M?Ue:void 0,placement:n,offset:r,onStateChange:(A,{next:le})=>{et(le),le||ye("")},children:[M&&p("a-select-header",{slot:"header","data-menu-open":"",children:p(Rt,{"data-menu-search":"",size:"small",value:q,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:A=>ye(A.currentTarget.value)})}),K&&B&&ur.length>0&&S(me,{children:[p(Se,{selectionIndicator:"checkbox",selected:mo,indeterminate:fv,label:L,"data-menu-open":"","data-menu-skip-active":"",onSelect:bv}),p(Ln,{})]}),ur.length===0?ie?.({query:H}):oa?vv():As(e,!1),D&&tt.length>0&&S(me,{children:[p(Ln,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"x",label:T,role:M?"button":void 0,"data-menu-open":"",onSelect:gv})})]})]})]});if(O)return Wd;let Zd=g===void 0?b?{brand:"circle-small-solid",info:"info",success:"circle-check",warning:"warning-triangle",critical:"warning-diamond"}[b]:void 0:g;return S("a-select-field",{size:f,status:b,disabled:x?"":void 0,class:de,style:E,children:[m!=null&&p("a-select-label",{children:m}),Wd,h!=null&&S("a-select-hint",{children:[Zd&&p(ve,{shape:Zd,"aria-hidden":"true"}),h]})]})};var jd=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...jd(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...jd(n.options)):e.push(Nn(n));return e},ws=t=>t==null||t===""||Array.isArray(t)&&t.length===0,dv=(t,e)=>ra(t,na(e)),Z1=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:m,toneScope:h,searchable:f,searchPlaceholder:b="Filter\u2026",clearable:g=!0,clearAllLabel:v="Clear all",renderTrigger:x,className:w,style:I,...C}=t,B=a!==void 0,[L,D]=W(o??{}),T=B?a:L,[N,Y]=W(!1),[$,G]=W({}),[O,ie]=W({});{let y=null,k=$;for(let V of e)V.kind==="text"&&O[V.key]!==T[V.key]&&(y={...y??O,[V.key]:T[V.key]},k={...k,[V.key]:T[V.key]??""});y&&(ie(y),G(k))}let[de,E]=W({}),[U,K]=W(""),pe=e.reduce((y,k)=>y+(ws(T[k.key])?0:1),0),ne=Ge(()=>new Map(e.map(y=>[y.key,y.kind==="single"||y.kind==="multiple"?jd(y.options):[]])),[e]),ue=(y,k)=>{B||D(y),i?.(y,k)},J=(y,k)=>{let V=ws(k),M={...T};V?delete M[y.key]:M[y.key]=k,ue(M,{facet:y.key,kind:y.kind,value:V?void 0:k})},be=()=>ue({},{all:!0}),Re=y=>{let k=ne.get(y.key)??[];if(!y.filter)return k;let V=de[y.key]??"",M=typeof y.filter=="function"?y.filter:dv;return k.filter(H=>M(H,V))},Oe=y=>y.filter?p("a-select-header",{slot:"header","data-menu-open":"",children:p(Rt,{"data-menu-search":"",size:"small",value:de[y.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${y.label}`,"aria-autocomplete":"list",onInput:k=>E(V=>({...V,[y.key]:k.currentTarget.value}))})}):null,xe=(y,k,V="")=>{let{className:M,style:H,...Pe}=ht(k,!0),re=y.kind==="single"?T[y.key]===k.value:(T[y.key]??[]).includes(k.value),dr=y.renderOption?.(k,{value:k.value,selected:re,disabled:!!k.disabled}),ur={...Pe,icon:dr?void 0:k.icon,label:dr?void 0:k.label??String(k.value),hint:dr?void 0:k.hint,tone:k.tone??m,toneScope:k.toneScope??h,disabled:k.disabled,className:M,style:H,"data-menu-open":""};if(y.kind==="single"){let pr=T[y.key];return p(Se,{...ur,selectionIndicator:"check",selected:re,onSelect:()=>J(y,pr===k.value?void 0:k.value),children:dr},`${V}${k.value}`)}let oa=T[y.key]??[],tt=y.selectAll!==!1&&!k.disabled,hr=k.tooltip??(tt?go:void 0),Nt=k.tooltip==null&&tt;return S(Se,{...ur,selectionIndicator:"checkbox",selected:re,onSelect:pr=>tt&&pr?.altKey?J(y,[k.value]):J(y,oa.includes(k.value)?oa.filter(ks=>ks!==k.value):[...oa,k.value]),children:[dr,hr&&p(dt,{...Nt?{delay:vo,placement:"left"}:{follow:!0},children:hr})]},`${V}${k.value}`)},Qe=y=>Re(y).map(k=>xe(y,k)),et=y=>{let k=T[y.key]??[],V=Re(y),M=V.filter(re=>!re.disabled).map(re=>re.value),H=M.length>0&&M.every(re=>k.includes(re)),Pe=M.some(re=>k.includes(re));return S(me,{children:[y.selectAll!==!1&&V.length>0&&S(me,{children:[p(Se,{selectionIndicator:"checkbox",selected:H,indeterminate:Pe&&!H,label:y.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>J(y,H?k.filter(re=>!M.includes(re)):[...new Set([...k,...M])])}),p(Ln,{})]}),V.map(re=>xe(y,re))]})},q=()=>e.filter(k=>k.kind==="single"||k.kind==="multiple").map(k=>{let V=typeof k.filter=="function"?k.filter:dv;return{facet:k,matched:(ne.get(k.key)??[]).filter(M=>V(M,U))}}).filter(k=>k.matched.length>0).map(({facet:k,matched:V})=>p(ea,{label:k.label,children:V.map(M=>xe(k,M,`${k.key}:`))},k.key)),ye=y=>{let k=T[y.key]??"",V=$[y.key]??k,M=()=>{let H=V.trim()===""?void 0:V;H!==(k||void 0)&&J(y,H)};return p("div",{"data-menu-open":"",style:{padding:"4px"},children:p(Rt,{size:"small",value:V,placeholder:y.placeholder,"aria-label":y.label,onInput:H=>G(Pe=>({...Pe,[y.key]:H.currentTarget.value})),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),M())},onBlur:M})})},Ue=y=>p("div",{"data-menu-open":"",children:y.render({value:T[y.key],onChange:k=>J(y,k),close:()=>Y(!1)})}),ut=y=>{let k=y.kind==="single"||y.kind==="multiple",V=!k||!!y.filter,M=y.kind==="single"?Qe(y):y.kind==="multiple"?et(y):y.kind==="text"?ye(y):Ue(y),H=!ws(T[y.key]);return S(qe,{role:V?"dialog":void 0,"aria-label":V?`${y.label} ${k?"options":"editor"}`:void 0,children:[k&&Oe(y),M,g&&H&&S(me,{children:[p(Ln,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"x",label:"Clear",role:V?"button":void 0,"data-menu-open":"",onSelect:()=>J(y,void 0)})})]})]})},R=y=>{let k=T[y.key];if(ws(k))return null;switch(y.kind){case"single":return(ne.get(y.key)??[]).find(M=>M.value===k)?.label??String(k);case"multiple":return String(k.length);case"text":return String(k);case"custom":return y.summary(k)}};return S(me,{children:[x?x({open:N,value:T,count:pe,disabled:!!u}):p(fe,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":f?"dialog":"menu","aria-expanded":N?"true":"false",className:w,style:I,...C,children:pe>0&&p(ms,{size:"small",priority:"primary",tone:"brand",children:String(pe)})}),S(qe,{role:f?"dialog":void 0,"aria-label":f?`${s} options`:void 0,placement:n,offset:r,open:N,onStateChange:(y,{next:k})=>{Y(k),k||K("")},children:[f&&p("a-select-header",{slot:"header","data-menu-open":"",children:p(Rt,{"data-menu-search":"",size:"small",value:U,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:y=>K(y.currentTarget.value)})}),f&&U.trim()?q():e.map(y=>S(Se,{submenu:!0,icon:y.icon,label:y.label,"aria-haspopup":y.kind==="text"||y.kind==="custom"||y.filter?"dialog":"menu",children:[(()=>{let k=R(y);return k!=null?p(ms,{size:"small",tone:"brand",children:p("a-select-faceted-summary",{children:k})}):null})(),ut(y)]},y.key)),g&&S(me,{children:[p(Ln,{slot:"footer"}),p("a-select-footer",{slot:"footer",children:p(Se,{icon:"filter-x",label:v,role:f?"button":void 0,disabled:pe===0,"data-menu-open":"",onSelect:be})})]})]})]})};var qd=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:h,fill:f,noslide:b,round:g,disabled:v,className:x,style:w,id:I,...C})=>{let B=n!==void 0,[L,D]=W(r),T=B?n:L,N=e??[],Y=new Set;for(let E of N)Y.has(E.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(E.value)} \u2014 values must be unique.`),Y.add(E.value);let $=E=>{let{event:U,detail:K}=oe(E);K&&(a?.(U,K),!B&&(U.defaultPrevented||D(K.next??void 0)))},G=o||i?E=>{o?.(E),i?.(E,{value:E.currentTarget?.value??null})}:void 0,O=h==="vertical",ie=T!=null&&N.some(E=>E.value===T)?T:N.find(E=>!v&&!E.disabled)?.value,de=p("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":O?"vertical":void 0,"aria-disabled":v?"true":void 0,state:B?n:void 0,"default-state":B?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:Q(u),size:m&&m!=="medium"?m:void 0,orientation:O?"vertical":void 0,fill:f?"":void 0,noslide:b?"":void 0,round:X(g),disabled:v?"":void 0,onstatechange:$,onchange:G,onfocusin:s,onfocusout:l,class:x,id:I,style:te(g,"--tabs-round",F(u,"--tabs-tone-source",w)),...C,children:N.map(E=>{let U=v||E.disabled,K=E.value===T,{className:pe,style:ne,...ue}=ht(E);return S("a-tab",{...ue,role:"tab",value:E.value,tone:E.tone||void 0,"aria-disabled":U?"true":void 0,tabIndex:E.value===ie?0:-1,disabled:U?"":void 0,round:X(g)??X(E.round),class:pe,style:F(E.tone,"--tabs-tone-source",ne),children:[E.icon&&p("a-icon",{shape:E.icon,"aria-hidden":"true"}),fo(E.label!=null?E.label:E.children,"a-tab-label"),E.iconTrailing&&p("a-icon",{shape:E.iconTrailing,"aria-hidden":"true"}),E.tooltip!=null&&E.tooltip!==""?p(dt,{truncatedOnly:!0,children:E.tooltip}):null]},E.value)})});return S(me,{children:[de,t]})};var uv={incomplete:"circle-large",completed:"check",error:"x"},$1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:h,fill:f,disabled:b,children:g,className:v,style:x,id:w,...I})=>{let C=e!==void 0,[B,L]=W(n),D=C?e:B??t[0]?.value,T=(E,U)=>{r?.(E,U),!(C||E.defaultPrevented)&&L(U.next??void 0)},N=t.map(E=>{let{className:U,style:K,...pe}=ht(E),ne=E.tone||void 0,ue=E.disabled?"neutral":E.state==="error"?"critical":ne||d||"neutral",J=u?.(E,{state:E.state,selected:E.value===D,disabled:!!E.disabled}),be=E.disabled?p(ve,{shape:uv.incomplete}):E.state==="loading"?p(Td,{tone:ue}):p(ve,{shape:uv[E.state]}),Re=J!==void 0?J:E.marker!==void 0?typeof E.marker=="number"?E.marker:p(ve,{shape:E.marker}):be;return{...pe,value:E.value,disabled:E.disabled,"data-step-state":E.state,tone:ue,tooltip:S(me,{children:[E.label,E.hint!=null&&S(me,{children:[" \u2014 ",E.hint]})]}),className:U,style:K,children:S(me,{children:[p("a-step-marker",{"aria-hidden":"true",children:Re}),S("a-step-desc",{children:[p("a-tab-label",{children:E.label}),E.hint!=null&&p("a-step-hint",{children:E.hint})]})]})}}),Y=t.findIndex(E=>E.value===D),$=h==="vertical",G=g!=null&&g!==!1,O=$&&G,ie=(Y>=0?Y:t.length-1)+2,de=O?{...x,"--steps-panel-row":ie}:x;return p("a-steps",{class:v,style:de,id:w,...I,"data-orientation":$?"vertical":void 0,children:p(qd,{options:N,value:D,onStateChange:T,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:h,fill:f,priority:c,noslide:!0,disabled:b,"data-steps":"",children:g})})};var G1=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>p("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var K1=new Set(["top","right","bottom","left"]),X1=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...h})=>{let f=i!==void 0,b=typeof o=="string"&&K1.has(o)?o:void 0;return S("a-dialog",{state:f?i?"open":"closed":void 0,"default-state":!f&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:b??X(o),name:f?void 0:l,onstatechange:c?g=>{let{event:v,detail:x,isOwn:w}=oe(g);w&&x&&c(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,class:d,style:te(b?void 0:o,"--dialog-round",u),...h,children:[r!==!1&&p("span",{slot:"close",style:{display:"contents"},children:p(fe,{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 J1=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:h,rel:f,ping:b,className:g,style:v,children:x,...w})=>{let I=Q(i),C=te(u,"--card-round",F(I,"--card-tone-source",v)),B=l==="small"?5:l==="large"?3:4;return S("a-card",{tone:I,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:X(u),href:m,target:m?h:void 0,rel:m?f:void 0,ping:m?b:void 0,class:g,style:C,...w,children:[a!=null&&p("div",{slot:"media",children:a}),n!=null&&(typeof n=="string"?p("a-card-icon-chip",{slot:"icon",children:p(ve,{shape:n})}):p("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?p(Id,{slot:"header",level:B,tone:I,children:t}):p("div",{slot:"header",children:t})),e!=null&&p(ps,{slot:"header",size:"small",priority:"tertiary",tone:I,children:e}),typeof x=="string"||typeof x=="number"?p(ps,{priority:"secondary",tone:I,size:l,children:x}):x,r!=null&&p("span",{slot:"footer",style:{display:"contents"},children:r})]})};var Ud=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:m,...h})=>{let f=s!=null,b=te(a,"--banner-round",F(n,"--banner-tone-source",u)),g=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 S("a-banner",{state:f?s?"closed":"open":void 0,"default-state":f?void 0:l?"closed":"open",tone:Q(n),align:r==="center"?"center":void 0,round:X(a),role:i,onstatechange:c?v=>{let{detail:x,isOwn:w}=oe(v);w&&x?.next==="closed"&&c()}:void 0,class:d,style:b,...h,children:[g,m,e!=null&&p("span",{"data-anta-banner-actions-wrapper":"",slot:"actions",style:{display:"contents"},children:e}),o!==!1&&p("span",{slot:"close",style:{display:"contents"},children:p(fe,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var Q1=({entry:t,store:e})=>{let n=Ge(()=>t.render(t.id),[t.id,t.rev]),r=typeof Node<"u"&&n instanceof Node,a=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 r?p("a-toast",{...o,content:n}):a?p("a-toast",{...o,children:p(Ud,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):p("a-toast",{...o,children:n})},ew=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??hv(),s=eu(i.subscribe,i.getSnapshot,i.getServerSnapshot);return p("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>p(Q1,{entry:l,store:i},l.id))})},tw,hv=()=>tw??=ds(),pv=ew;Object.defineProperty(pv,"manager",{get:hv,enumerable:!0});export{l1 as Avatar,Ud as Banner,u1 as Box,y1 as Breadcrumbs,fe as Button,Dd as ButtonCopy,Fd as Calendar,h1 as Capture,J1 as Card,C1 as Checkbox,jn as DEFAULT_CONFIG,X1 as Dialog,T1 as Expander,w1 as ICON_SHAPES,k1 as ICON_SYNONYMS,ve as Icon,Rt as Input,j1 as InputAutocomplete,H1 as InputDate,Hd as InputTime,Td as Loader,qe as Menu,ea as MenuGroup,Se as MenuItem,Pd as MenuItemCopy,Ln as MenuSeparator,p1 as Panel,c1 as Progress,U1 as RadioGroup,W1 as Select,Z1 as SelectFaceted,B1 as Slider,$1 as Steps,S1 as Switch,G1 as TabPanel,qd as Tabs,ms as Tag,ps as Text,Id as Title,pv as Toaster,dt as Tooltip,Ns as avatarToSvg,Ld as buildMonth,Rn as clampDate,Ps as colorLightness,Cv as configure,ds as createToaster,vs as dateFormatPattern,_d as dateTimeFormatPattern,zd as firstDayOfWeek,xs as formatDateInput,Nd as formatDateTimeInput,Bs as getInitials,iv as getWeekdays,uu as hasFigure,su as hashSeed,Bd as isOutOfRange,du as maxChroma,lu as mulberry32,wo as oklchString,Y1 as optionsWithSelection,ho as parseDateInput,ys as parseDateTimeInput,$e as parseISODate,lv as parseTimeInput,Rs as resolveAvatar,cu as rngFromSeed,po as usesHour12};
1
+ var hv=typeof HTMLElement<"u"?HTMLElement:class{},V=class extends hv{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};import xo from"react";var sa=xo.createElement,ce=xo.Fragment,zs=xo,tu=!1;function nu(){return tu}function pv(t,e,n=xo,r={}){sa=t,e!==void 0&&(ce=e),zs=n,tu=r.hydratingEvents===!0}function la(t){let e=zs[t];if(typeof e!="function")throw new Error(`Anta: the configured renderer is missing ${t}. Pass its hooks object to configure().`);return e}function K(t){return la("useState")(t)}function Ls(){return la("useId")()}function Be(t,e){return la("useMemo")(t,e)}function ru(t,e){return la("useLayoutEffect")(t,e)}function au(t,e){typeof window<"u"&&zs.useLayoutEffect?.(t,e)}function ou(t,e,n){return la("useSyncExternalStore")(t,e,n)}function m(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,r):sa(t,o)}function I(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?sa(t,o,...r):sa(t,o)}function ca(t){if(typeof Node>"u"||t==null||typeof t!="object")return!1;try{return Node.prototype.isSameNode.call(t,t)}catch{return!1}}function Bt(t){return Array.isArray(t)?t.length>0:t!=null}function hr(t,e){let[n,r]=K(t??e),[a,o]=K(t);return t!==a&&(o(t),t!==void 0&&r(t)),[t!==void 0?t:n,r]}function dt(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function yo(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:m(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:m(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function pr(t){return"nativeEvent"in t?t.nativeEvent:t}function X(t){let e=pr(t);return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function Fn(t){if(t)return e=>{let{event:n,detail:r}=X(e);r!=null&&t(n,r)}}function mr(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}function wo(t){let e=typeof t=="number"?t:t?1:void 0;return e!=null&&e>=1?e:void 0}var mv=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Tab"]);function da(t){let e=pr(t);return e.isComposing||e.keyCode===229}function je(t){return mv.has(t.key)&&(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey&&t.key!=="Tab")}var fv=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),ko=fv?"\u2325+Click to select only this":"Alt+Click to select only this",Eo=700;function ut(t){return t==="open"?"open":"closed"}function Co(t,e,n){t.addEventListener("click",r=>{let a=!1;for(let o of r.composedPath()){let i=o;if(i.nodeType===1){if(i.localName===t.localName){i===t&&(a||i.hasAttribute(e))&&n();return}i.hasAttribute(e)&&(a=!0)}}})}var bv=new Set(["brand","neutral","info","success","warning","critical"]);function ee(t){return t&&t!=="neutral"?t:void 0}function Y(t,e,n){return t!=null&&!bv.has(t)?{...n,[e]:t}:n}function fr(t){return typeof t=="number"?`${t}px`:t||void 0}function et(t,e,n){let r=fr(t);return r?{...n,[e]:r}:n}function te(t,e,n){return et(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function J(t){return t||t===0?"":void 0}var gv=2e3;function Ao(t,e,n){let[r,a]=K("idle"),o=Be(()=>({timer:void 0}),[]);return au(()=>()=>clearTimeout(o.timer),[o]),{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),gv),n?.(c)}}}function Nt(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var Bs=Symbol.for("anta.menu-presence");function iu(t,e=typeof document>"u"?void 0:document){if(!e)return;let n=e[Bs]??=new Set;t?n.add(t):n.clear()}function su(t=typeof document>"u"?void 0:document){return t?[...t[Bs]??[]].some(e=>e.isOpen(t)):!1}function lu(t){let e=t.ownerDocument;return e!=null&&[...e[Bs]??[]].some(n=>n.contains(t))}var Zt=Symbol.for("anta.sync-popup-aria");function Ns(t){return t!=null&&typeof t[Zt]=="function"}var Vn=Symbol.for("anta.sync-text-toggle");function cu(t){return t!=null&&typeof t[Vn]=="function"}function ua(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var ur=class extends V{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")}applyAccessibilityRelations(e,n){ua(this.internals,e,n)}},To=(t,e)=>({VALUE:t,defaultvalue:t===void 0?e:void 0});function hu(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 pu(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 mu=t=>pu(hu(t));function js(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var vv=.4;function xv(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-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 yv(t,e,n){let[r,a,o]=xv(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function fu(t,e){let n=0,r=vv;for(let a=0;a<18;a++){let o=(n+r)/2;yv(t,o,e)?n=o:r=o}return n}var Tt=(t,e=3)=>Math.round(t*10**e)/10**e;function So(t,e,n){let r=Math.min(e,fu(t,n));return`oklch(${Tt(t)} ${Tt(r)} ${Tt((n%360+360)%360,1)})`}function Vs(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 r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var pn={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}},ha={x:[-15,15],y:[-14,4],off:[0,0]},Rs={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)"}},jn={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},Hn=(t,e,n)=>e+(n-e)*t,qs=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function mn(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?qs(t(),e.values):r==="range"?Hn(t(),e?.min??n.range[0],e?.max??n.range[1]):Hn(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function wv(t,e){let n=e?.mode??"off";if(n==="off")return ha.off;if(n==="list"&&e?.values?.length)return qs(t(),e.values);let r=n==="range"?e?.x??ha.x:ha.x,a=n==="range"?e?.y??ha.y:ha.y;return[Hn(t(),r[0],r[1]),Hn(t(),a[0],a[1])]}function _s(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:Vs(n.off)};if(a==="list"&&e?.values?.length){let u=qs(t(),e.values);return{color:u,l:Vs(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=Hn(t(),o[0],o[1]),c=Hn(t(),i[0],i[1]),d=r??Hn(t(),s[0],s[1]);return{color:So(l,c,d),l}}var vr=100,Fs=vr/2,gr=40,Hs=74,kv=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function bu(t){return kv.some(e=>(t[e]?.mode??jn[e].mode)!=="off")}function Us(t,e){let n={...jn,...t},r=mu(e),a=_s(r,n.bgColor,Rs.bgColor),o=gu(a.color),i=_s(r,n.headColor,Rs.headColor,n.harmony?o:void 0),s=_s(r,n.bodyColor,Rs.bodyColor,n.harmony?o:void 0),l=mn(r,n.figureScale,pn.figureScale),c=wv(r,n.figureTranslate),d=mn(r,n.figureAngle,pn.figureAngle),u=mn(r,n.headAngle,pn.headAngle),h=mn(r,n.bodyAngle,pn.bodyAngle),p=mn(r,n.figureGap,pn.figureGap),f=mn(r,n.headRadiusTop,pn.headRadiusTop),b=mn(r,n.headRadiusBottom,pn.headRadiusBottom),x=mn(r,n.bodyBorderRadius,pn.bodyBorderRadius),g=gr/2,y=Hs/2,k=vr/Math.min(1,l),D=f,L=Math.max(f,b),R=Math.min(D,1)*g,B=Math.min(L,1)*g,N=Math.max(0,D-1)*g,A=Math.max(0,L-1)*g;return{figure:bu(t),bg:a.color,bgLightness:a.l,initialsColor:Ev(a.color,a.l),scale:l,translate:c,angle:d,gap:p*(gr+N+A),head:{color:i.color,radiusTop:R,radiusBottom:B,extendTop:N,extendBottom:A,angle:u},body:{color:s.color,radius:x*y,height:k,angle:h}}}function Ev(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?gu(t):0;return e>.5?So(.35,n?.06:0,r):So(.95,n?.04:0,r)}function gu(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var br=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function Ys(t,e={}){let n=br(t.bg),r=e.title?`<title>${br(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${vr}" height="${vr}" fill="${n}"/>`;if(!t.figure){let g=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="${Cv(e.initials.length)}" fill="var(--avatar-initials-color, ${br(t.initialsColor)})">${br(e.initials)}</text>`:"";return uu(r+a+g)}let[o,i]=t.translate,s=`translate(${Tt(o,2)} ${Tt(i,2)}) rotate(${Tt(t.angle,2)} 50 50) translate(50 50) scale(${Tt(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Fs-gr/2-l,u=gr+l+c,h=du(Fs-gr/2,d,gr,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${Tt(t.head.angle,2)} 50 50)"><path d="${h}" fill="${br(t.head.color)}"/></g>`,f=d+u+t.gap,b=du(Fs-Hs/2,f,Hs,t.body.height,t.body.radius,t.body.radius),x=`<g transform="rotate(${Tt(t.body.angle,2)} 50 ${Tt(f,2)})"><path d="${b}" fill="${br(t.body.color)}"/></g>`;return uu(`${r}${a}<g transform="${s}">${x}${p}</g>`)}function du(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>Tt(u,2),d=(u,h,p)=>`A${c(u)} ${c(u)} 0 0 1 ${c(h)} ${c(p)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var uu=t=>`<svg viewBox="0 0 ${vr} ${vr}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,Cv=t=>t>=3?30:t===2?38:46;var Mo=class extends V{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"});this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),e.append(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 jn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:jn}catch{return jn}}#r(){let e=this.getAttribute("name")??void 0,n=this.getAttribute("src");if(n){let s=document.createElement("img");s.setAttribute("part","frame image"),s.src=n,s.alt=e??"",s.loading="lazy",this.#n(s);return}let r=this.getAttribute("seed")??e??"",a=Us(this.#a(),r),o=document.createElement("template");o.innerHTML=Ys(a,{initials:js(e),title:e});let i=o.content.firstElementChild;i&&(i.setAttribute("part","frame"),this.#n(i))}};function vu(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",Mo)}vu();var Io=class extends V{static observedAttributes=["expandable","truncate","collapsible"];#e;#t=!1;#n;#a;#r;#o;#l=!1;#s;constructor(){super(),this.#e=this.attachInternals()}addEventListener(e,n,r){n&&super.addEventListener(e,n,r),e==="textpresentationchange"&&n&&this.#m(!0)}connectedCallback(){this.addEventListener("click",this.#u),this.addEventListener("anta-text-control-ready",this.#f),this.#c()}disconnectedCallback(){this.removeEventListener("click",this.#u),this.removeEventListener("anta-text-control-ready",this.#f),this.#n?.disconnect(),this.#a?.disconnect(),this.#r=void 0,this.#p()}attributeChangedCallback(e,n,r){n!==r&&((e==="truncate"||e==="expandable")&&this.#h(!1),this.isConnected&&this.#c())}get#d(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get isTruncated(){if(!this.hasAttribute("truncate")||this.#t)return!1;let e=this.#i();return!e||e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}#i(){return this.#d?this.querySelector(":scope > a-text-content"):this}#c(){if(!this.#d){this.#n?.disconnect(),this.#a?.disconnect(),this.#r=void 0,this.#e.states.delete("overflowing"),this.#p(),this.#m();return}this.#a??=new MutationObserver(()=>this.#c()),this.#a.observe(this,{childList:!0,subtree:!0,characterData:!0});let e=this.#i();this.#n??=new ResizeObserver(()=>this.#x()),e!==this.#r&&(this.#n.disconnect(),e&&this.#n.observe(e),this.#r=e??void 0);let n=this.querySelector(":scope > a-button"),r=cu(n)?n:void 0;r!==this.#o&&(this.#p(),this.#o=r),this.#b(),this.#m(),this.#x()}#p(){this.#o?.[Vn]({source:this,clear:!0}),this.#o=void 0}#b(){this.#o?.[Vn]({source:this,expanded:this.#t})}#f=e=>{e.target.parentElement===this&&this.#c()};#u=e=>{if(!this.#d||e.defaultPrevented)return;let n=this.querySelector(":scope > a-button");!n||!e.composedPath().includes(n)||n.hasAttribute("disabled")||n.hasAttribute("loading")||this.#t&&!this.hasAttribute("collapsible")||!this.#t&&!this.isTruncated||(this.#h(!this.#t),this.#t||this.#x())};#h(e){this.#t=e,e?this.#e.states.add("expanded"):this.#e.states.delete("expanded"),this.#b(),this.#m()}#x(){this.#t||(this.isTruncated?this.#e.states.add("overflowing"):this.#e.states.delete("overflowing"),this.#m())}#m(e=!1){e&&(this.#s=void 0),!this.#l&&(this.#l=!0,this.view.queueMicrotask(()=>{if(this.#l=!1,!this.isConnected)return;let n={expanded:this.#t,overflowing:this.#e.states.has("overflowing")};this.#s?.expanded===n.expanded&&this.#s.overflowing===n.overflowing||(this.#s={...n},this.dispatchEvent(new this.view.CustomEvent("textpresentationchange",{detail:n})))}))}};function xu(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",Io)}xu();var Ws=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function pa(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=void 0,o=null)},c=()=>{s&&l(),p()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},h=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{h(),a=void 0,o=null},f=()=>{l()},b=function(...x){if(n?.aborted)return;a=this,o=x;let g=d==null;u(),i&&g&&l()};return b.schedule=u,b.cancel=p,b.flush=f,n?.addEventListener("abort",p,{once:!0}),b}function yu(){}function Zs(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=pa(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}function $s(t){return typeof Ws.Buffer<"u"&&Ws.Buffer.isBuffer(t)}function Ks(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Gs(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var wu="[object RegExp]",ku="[object String]",Eu="[object Number]",Cu="[object Boolean]";var Au="[object Symbol]",Tu="[object Date]",Su="[object Map]",Mu="[object Set]",Iu="[object Array]",Du="[object Function]",Pu="[object ArrayBuffer]",Do="[object Object]",Ou="[object Error]",zu="[object DataView]",Lu="[object Uint8Array]",Bu="[object Uint8ClampedArray]",Nu="[object Uint16Array]",Ru="[object Uint32Array]",_u="[object BigUint64Array]",Fu="[object Int8Array]",Vu="[object Int16Array]",Hu="[object Int32Array]",ju="[object BigInt64Array]",qu="[object Float32Array]",Uu="[object Float64Array]";function Xs(t){if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function Yu(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Wu(t,e,n){return ma(t,e,void 0,void 0,void 0,void 0,n)}function ma(t,e,n,r,a,o,i){let s=i(t,e,n,r,a,o);if(s!==void 0)return s;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return fa(t,e,o,i)}return fa(t,e,o,i)}function fa(t,e,n,r){if(Object.is(t,e))return!0;let a=Gs(t),o=Gs(e);if(a==="[object Arguments]"&&(a=Do),o==="[object Arguments]"&&(o=Do),a!==o)return!1;switch(a){case ku:return t.toString()===e.toString();case Eu:return Yu(t.valueOf(),e.valueOf());case Cu:case Tu:case Au:return Object.is(t.valueOf(),e.valueOf());case wu:return t.source===e.source&&t.flags===e.flags;case Du:return t===e}n=n??new Map;let i=n.get(t),s=n.get(e);if(i!=null&&s!=null)return i===e;n.set(t,e),n.set(e,t);try{switch(a){case Su:if(t.size!==e.size)return!1;for(let[l,c]of t.entries())if(!e.has(l)||!ma(c,e.get(l),l,t,e,n,r))return!1;return!0;case Mu:{if(t.size!==e.size)return!1;let l=Array.from(t.values()),c=Array.from(e.values());for(let d=0;d<l.length;d++){let u=l[d],h=c.findIndex(p=>ma(u,p,void 0,t,e,n,r));if(h===-1)return!1;c.splice(h,1)}return!0}case Iu:case Lu:case Bu:case Nu:case Ru:case _u:case Fu:case Vu:case Hu:case ju:case qu:case Uu:if($s(t)!==$s(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!ma(t[l],e[l],l,t,e,n,r))return!1;return!0;case Pu:return t.byteLength!==e.byteLength?!1:fa(new Uint8Array(t),new Uint8Array(e),n,r);case zu:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:fa(new Uint8Array(t),new Uint8Array(e),n,r);case Ou:return t.name===e.name&&t.message===e.message;case Do:{if(!(fa(t.constructor,e.constructor,n,r)||Xs(t)&&Xs(e)))return!1;let l=[...Object.keys(t),...Ks(t)],c=[...Object.keys(e),...Ks(e)];if(l.length!==c.length)return!1;for(let d=0;d<l.length;d++){let u=l[d],h=t[u];if(!Object.hasOwn(e,u))return!1;let p=e[u];if(!ma(h,p,u,t,e,n,r))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function Po(t,e){return Wu(t,e,yu)}var ba={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},Av=new Set(Object.values(ba).flat());function Oo(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of Av)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(ba,i))for(let s of ba[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...ba.scroll,...ba.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var zo=new WeakMap,Tv=140,Sv=/(?:^|\s)(?:dark|light)(?:\s|$)/;function Mv(t){return t.classList.contains("dark")||t.classList.contains("light")}var Js=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#a=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#o=e.matchMedia("(hover: hover)"),this.#l=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#s=[this.#n,this.#a,this.#r,this.#o,this.#l],this.#b=Ov(e.navigator)}view;doc;#e=new Set;#t=new Set;#n;#a;#r;#o;#l;#s;#d;#i;#c;#p=0;#b;subscribeContext(e){this.#e.size===0&&this.#h(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#x(),this.#m())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#i??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#i.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#i?.unobserve(e),this.#t.size===0&&(this.#i?.disconnect(),this.#i=void 0),this.#m())}snapshot(){return{globalMode:Gu(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#b,pointer:this.#a.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#o.matches,reducedMotion:this.#l.matches,devicePixelRatio:this.view.devicePixelRatio}}#f(){this.#c?.removeEventListener("change",this.#u),this.#c=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#c.addEventListener("change",this.#u,{once:!0}),this.#p=this.view.devicePixelRatio}#u=()=>{this.view.devicePixelRatio!==this.#p&&(this.#f(),this.#w())};#h(){for(let n of this.#s)n.addEventListener("change",this.#w);this.#f(),this.view.addEventListener("resize",this.#u,{passive:!0});let e=this.doc.documentElement;e&&(this.#d=new this.view.MutationObserver(this.#g),this.#d.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#x(){for(let e of this.#s)e.removeEventListener("change",this.#w);this.#c?.removeEventListener("change",this.#u),this.#c=void 0,this.view.removeEventListener("resize",this.#u),this.#d?.disconnect(),this.#d=void 0}#m(){this.#e.size>0||this.#t.size>0||zo.get(this.view)===this&&zo.delete(this.view)}#g=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!Mv(a)&&!Sv.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#w=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function Zu(t,e){let n=zo.get(t);return n||(n=new Js(t,e),zo.set(t,n)),n}function Gu(t){return t?.classList.contains("dark")?"dark":"light"}function Iv(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return Gu(t.ownerDocument.documentElement)}var Dv={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},Pv={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function Ov(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(Pv[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(Dv[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function zv(t,e){return t!==void 0&&Object.keys(e).every(n=>Po(t[n],e[n]))}function $u(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!Po(t[n],r))):{...e}}function fn(t){return parseFloat(t)||0}function Lv(t){return{paddingTop:fn(t.paddingTop),paddingRight:fn(t.paddingRight),paddingBottom:fn(t.paddingBottom),paddingLeft:fn(t.paddingLeft),borderTop:fn(t.borderTopWidth),borderRight:fn(t.borderRightWidth),borderBottom:fn(t.borderBottomWidth),borderLeft:fn(t.borderLeftWidth)}}function Ku(t){return t==="normal"?"0px":t}function Bv(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:Ku(t.letterSpacing),wordSpacing:Ku(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function bn(t){return Math.round(t*100)/100}var Lo=class extends V{static observedAttributes=["fade","observe","observe-offscreen","throttle"];#e=this.attachInternals?.();#t;#n;#a;#r;#o;#l=!1;#s;#d=new Set;#i=!1;#c=!1;#p;#b;#f;#u;#h=!1;#x=!1;#m=new Set;#g=!1;#w;#y=!1;#O=!1;connectedCallback(){this.#t=Zu(this.view,this.doc),this.#v()}disconnectedCallback(){this.#R(),this.#B(),this.#A(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#w=void 0}attributeChangedCallback(e,n,r){n!==r&&(e==="fade"&&r===null&&this.#R(),this.#t&&((e==="fade"||e==="observe"||e==="observe-offscreen")&&this.#v(),e==="throttle"&&this.#q(),(e==="observe"||e==="throttle")&&this.#E()))}get measurement(){return this.#V()}get context(){return this.#W()}get isTruncated(){let e=this.#V(!1);return e.clippedX||e.clippedY}contextStoreDidChange(){this.#P(),this.#E()}visibilityDidChange(e){this.#w!==e&&(this.#w=e,this.#v())}#v(){let{fields:e,context:n,content:r,scroll:a}=Oo(this.getAttribute("observe"));(e.size!==this.#d.size||[...e].some(l=>!this.#d.has(l)))&&(this.#y=!0,this.#q()),this.#d=e,this.#i=this.hasAttribute("fade")||r,this.#c=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0,i=this.hasAttribute("observe-offscreen");this.isConnected&&o&&(i||(this.#w??this.hasAttribute("fade")))?this.#S():this.#B(),this.#h&&this.#_(),this.isConnected&&o&&!i?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#L():this.#A(),this.#D()}#D(){let e=this.#h||this.#g;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#k),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#k=()=>{this.#E(),this.#P()};#S(){this.#h||(this.#h=!0,this.#q(),this.#n=new this.view.ResizeObserver(this.#E),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#E),this.#s=this.#V(!1),this.#T(this.#s),this.#C(),this.#y=!0,this.#E())}#_(){this.#i&&!this.#a?(this.#a=new this.view.MutationObserver(this.#E),this.#a.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#E),this.addEventListener("load",this.#E,!0)):!this.#i&&this.#a&&(this.#a.disconnect(),this.#a=void 0,this.removeEventListener("input",this.#E),this.removeEventListener("load",this.#E,!0)),this.#c?this.addEventListener("scroll",this.#E,{passive:!0}):this.removeEventListener("scroll",this.#E),this.#C()}#C(){if(!this.#i||!this.#x||!this.#h){for(let n of this.#m)this.#n?.unobserve(n);this.#m.clear();return}let e=new Set(this.children);for(let n of this.#m)e.has(n)||(this.#n?.unobserve(n),this.#m.delete(n));for(let n of e)this.#m.has(n)||(this.#n?.observe(n),this.#m.add(n))}#B(){this.#h&&(this.#h=!1,this.#m.clear(),this.#n?.disconnect(),this.#n=void 0,this.#a?.disconnect(),this.#a=void 0,this.#o!=null&&this.view.cancelAnimationFrame(this.#o),this.#o=void 0,this.#b?.cancel(),this.#b=void 0,this.removeEventListener("input",this.#E),this.removeEventListener("scroll",this.#E),this.removeEventListener("load",this.#E,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#E))}#L(){this.#g||(this.#g=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#P),this.addEventListener("focusout",this.#F),this.doc.fonts?.addEventListener("loadingdone",this.#P),this.#O=!0,this.#P())}#A(){this.#g&&(this.#g=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#P),this.removeEventListener("focusout",this.#F),this.doc.fonts?.removeEventListener("loadingdone",this.#P))}#F=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#P()};#E=()=>{!this.#h||this.#o!=null||(this.#o=this.view.requestAnimationFrame(()=>{this.#o=void 0,this.#h&&(this.#b?this.#b():this.#$())}))};#P=()=>{!this.#g||this.#l||(this.#l=!0,queueMicrotask(()=>{if(this.#l=!1,!this.#g)return;let e=this.#O;this.#O=!1,this.#Q(e)}))};#M(e){let n=[],r=this.getAttribute("include-rects-for");if(r)try{let a=e??this.getBoundingClientRect();n=Array.from(this.querySelectorAll(r),o=>{let i=o.getBoundingClientRect();return{top:bn(i.top-a.top),right:bn(i.right-a.left),bottom:bn(i.bottom-a.top),left:bn(i.left-a.left),width:bn(i.width),height:bn(i.height)}})}catch(a){if(!(a instanceof this.view.DOMException)||a.name!=="SyntaxError")throw a}return n}#V(e=!0){let n=this.getBoundingClientRect(),r=this.clientWidth,a=this.clientHeight,o=this.scrollWidth,i=this.scrollHeight,s=r>0||a>0,l=s&&o>r+1,c=s&&i>a+1,d=this.view.getComputedStyle(this);this.#x=d.overflowX!=="visible"||d.overflowY!=="visible";let u=l&&d.overflowX!=="visible",h=c&&d.overflowY!=="visible",p=l&&(d.overflowX==="auto"||d.overflowX==="scroll"),f=c&&(d.overflowY==="auto"||d.overflowY==="scroll"),b=Math.round(this.scrollLeft),x=Math.round(this.scrollTop),g=Math.max(0,d.direction==="rtl"?-b:b),y=Math.max(0,x);return{width:bn(n.width),height:bn(n.height),rects:e?this.#M(n):[],clientWidth:r,clientHeight:a,scrollWidth:o,scrollHeight:i,overflowX:l,overflowY:c,clippedX:u,clippedY:h,scrollableX:p,scrollableY:f,scrollLeft:b,scrollTop:x,hiddenStartX:u&&g>1,hiddenEndX:u&&g<o-r-1,hiddenStartY:h&&y>1,hiddenEndY:h&&y<i-a-1}}#W(){let e=(this.#t??Zu(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:Iv(this),focusWithin:this.matches(":focus-within"),font:Bv(n),inset:Lv(n),backgroundColor:n.backgroundColor}}#q(){this.#b?.cancel(),this.#b=void 0;let e=Number(this.getAttribute("throttle"));this.#h&&Number.isFinite(e)&&e>0&&(this.#b=Zs(()=>this.#$(),Math.min(e,2147483647)))}#Z(e){if(this.#d.size===0)return!1;let n=this.#p;if(!n||this.#y)return!0;for(let r of this.#d)if(n[r]!==e[r])return!0;return!1}#$(){let e=this.#V(!1);if(this.#s=e,this.#T(e),this.#C(),!this.#Z(e))return;let n={...e,rects:this.#M()},r=this.#y,a=this.#p;this.#y=!1,this.#p=n;let o={changed:$u(r?void 0:a,n),current:n};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:o}))}#Q(e){let n=this.#W(),r=this.#u;if(this.#u=n,!e&&zv(r,n))return;let a={changed:e?{...n}:$u(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#T(e){this.#I("overflow-x",e.overflowX),this.#I("overflow-y",e.overflowY),this.#I("clipped-x",e.clippedX),this.#I("clipped-y",e.clippedY),this.#I("scrollable-x",e.scrollableX),this.#I("scrollable-y",e.scrollableY),this.#I("hidden-start-x",e.hiddenStartX),this.#I("hidden-end-x",e.hiddenEndX),this.#I("hidden-start-y",e.hiddenStartY),this.#I("hidden-end-y",e.hiddenEndY),this.#N(e)}#N(e){if((e.hiddenStartX||e.hiddenEndX||e.hiddenStartY||e.hiddenEndY)&&this.hasAttribute("fade")){this.#f!==void 0&&this.view.clearTimeout(this.#f),this.#f=void 0,this.#I("fade-mask-active",!0);return}if(!this.hasAttribute("fade")){this.#R();return}if(!(!this.#e?.states?.has("fade-mask-active")||this.#f!==void 0)){if(this.view.matchMedia("(prefers-reduced-motion: reduce)").matches){this.#R();return}this.#f=this.view.setTimeout(()=>this.#R(),Tv)}}#R(){this.#f!==void 0&&this.view.clearTimeout(this.#f),this.#f=void 0,this.#I("fade-mask-active",!1)}#I(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function Xu(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",Lo)}Xu();var oh=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],ht=new WeakMap,pt=new WeakMap,ih={up:1,down:2,left:4,right:8},rl={mouse:1,pen:2,touch:4},Nv='textarea, select, input[type="number"], input[type="range"], a-menu',Ju=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function Bo(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function xr(t,e,n,r=0){return Math.max(r,mr(t.getAttribute(e)?.trim()??null,n))}function sh(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function Rv(t){if(!t.hasAttribute("wheel-capture"))return;let e=Bo(t.getAttribute("wheel-capture"),ih,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:sh(t,"wheel-modifier","none"),delay:xr(t,"wheel-delay",150),tolerance:xr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function _v(t){if(!t.hasAttribute("pointer-capture"))return;let e=Bo(t.getAttribute("pointer-capture"),rl,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:xr(t,"pointer-threshold",0),modifier:sh(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function Fv(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=Bo(t.getAttribute("pan-pointer-types"),rl,4);if(n)return{types:n,axis:e||"both",threshold:xr(t,"pan-threshold",3),directions:Bo(t.getAttribute("pan-directions"),ih,15),inertia:t.hasAttribute("pan-inertia"),tau:xr(t,"pan-time-constant",325,1),minVelocity:xr(t,"pan-min-velocity",.02,.001)}}function Vv(t){let e=t.ownerDocument,n=pt.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},pt.set(e,n),r.addEventListener("blur",Ch),e.addEventListener("visibilitychange",Ah),n}function al(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=ht.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=Rv(t),a=_v(t),o=Fv(t);if(!r&&!a&&!o){ol(t,"disabled");return}n||(n={surface:t,store:Vv(t)},ht.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",tl,{passive:!1}):t.removeEventListener("wheel",tl)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",hh),t.addEventListener("lostpointercapture",mh),t.addEventListener("click",wh,!0),t.addEventListener("dragstart",kh)):lh(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&Un(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&qn(n.momentum,"disabled"),ch(n.store)}function ol(t,e="disconnected"){let n=ht.get(t);if(!n)return;ht.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",tl),lh(t),n.session&&Un(n.session,null,e),n.momentum&&qn(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),ch(r),!r.states.size&&(r.view.removeEventListener("blur",Ch),r.doc.removeEventListener("visibilitychange",Ah),pt.get(r.doc)===r&&pt.delete(r.doc))}function lh(t){t.removeEventListener("pointerdown",hh),t.removeEventListener("lostpointercapture",mh),t.removeEventListener("click",wh,!0),t.removeEventListener("dragstart",kh)}function il(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function ch(t){let e=Array.from(t.states).some(n=>il(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",Qu,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",eh,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",th,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",Qu,!0),t.doc.removeEventListener("pointerout",eh,!0),t.doc.removeEventListener("wheel",th,!0),t.dwell.clear()))}function Qu(t){let e=pt.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!ga(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=ht.get(r),o=a?.wheel;if(!a||!o||!il(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function eh(t){t.pointerType!=="touch"&&t.relatedTarget===null&&pt.get(this)?.dwell.clear()}function th(t){let e=pt.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function dh(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function Qs(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function el(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function ga(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function uh(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function sl(t){return{...uh(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function ll(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function tl(t){let e=ht.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!dh(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!el(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!il(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(Qs(this,t,Nv))return;let l=ga(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...uh(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&qn(e.momentum,"interrupted"),ll(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function No(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function hh(t){let e=ht.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&qn(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=rl[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&dh(t,r.modifier)&&!Qs(this,t,r.interactive?"":Ju),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!Qs(this,t,Ju);if(!a&&!o)return;let i=sl(t),s=No(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...ga(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),ph(e.store),vh(l,t,!0)}function ph(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",nh,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",rh,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",ah,!0)):(t.doc.removeEventListener("pointermove",nh,!0),t.doc.removeEventListener("pointerup",rh,!0),t.doc.removeEventListener("pointercancel",ah,!0)))}function nh(t){let e=pt.get(this)?.sessions.get(t.pointerId);e&&vh(e,t)}function rh(t){let e=pt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t)}function ah(t){let e=pt.get(this)?.sessions.get(t.pointerId);e&&Un(e,t,"pointer-cancel")}function mh(t){let e=ht.get(this)?.session;e?.id===t.pointerId&&e.captured&&Un(e,t,"lost-capture")}function fh(t){t.cancelable&&t.preventDefault()}function bh(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(No(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function gh(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function yr(t,e,n){return{x:t.axis!=="y"&&el(t.directions,e,!0)?e:0,y:t.axis!=="x"&&el(t.directions,n,!1)?n:0}}function vh(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{Un(t,e,"lost-capture");return}t.captured=!0}fh(e)}if(t.current=sl(e),n&&(t.start.pointerEvent=t.current),n||bh(t,e),!(s&&(t.pointerStarted=!0,nl(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,gn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&(nl(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=yr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=gh(t,e.timeStamp),h=yr(r.pan,u.x,u.y);t.panLast=No(e),gn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:h.x,velocityY:h.y})}}function nl(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=No(a),ll(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:xh(t),...ga(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function gn(t,e,n,r){let a=n??t.current;ll(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:xh(t),...ga(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function xh(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function Un(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),ph(r.store),e&&(t.captured&&!n&&fh(e),bh(t,e),t.current=sl(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&nl(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||ht.get(r.surface)!==r||!r.pan){gn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=yr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=gh(t,t.current.timeStamp),i=yr(r.pan,o.x,o.y);gn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(ht.get(r.surface)!==r||!s||r.session){gn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),yh(r.store)}else gn(t,"end",t.current)}function yh(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>Hv(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function Hv(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){qn(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=yr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=yr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&gn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&qn(n)}yh(t)}function qn(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),gn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function wh(t){let e=ht.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function kh(t){ht.get(this)?.session&&t.preventDefault()}function Eh(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))Un(e,null,"blur");for(let e of Array.from(t.momenta))qn(e,"blur")}function Ch(){let t=pt.get(this.document);t&&Eh(t)}function Ah(){let t=pt.get(this);t&&this.hidden&&Eh(t)}var Ro=class extends V{static observedAttributes=oh;connectedCallback(){al(this)}disconnectedCallback(){ol(this)}attributeChangedCallback(e){al(this,e)}};function Th(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",Ro)}Th();var Ih=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],cl=Ih.join(","),Dh=typeof Element>"u",wr=Dh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_o=!Dh&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Fo=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Fo(e.parentNode));return i},jv=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},qv=function(e,n,r){if(Fo(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(cl));return n&&wr.call(e,cl)&&a.unshift(e),a=a.filter(r),a},dl=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!Fo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=dl(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=wr.call(i,cl);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!Fo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&h){var p=dl(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},Ph=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Oh=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||jv(e))&&!Ph(e)?0:e.tabIndex},Uv=function(e,n){var r=Oh(e);return r<0&&n&&!Ph(e)?0:r},Yv=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},zh=function(e){return e.tagName==="INPUT"},Wv=function(e){return zh(e)&&e.type==="hidden"},Zv=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},$v=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Kv=function(e){if(!e.name)return!0;var n=e.form||_o(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=$v(a,e.form);return!o||o===e},Gv=function(e){return zh(e)&&e.type==="radio"},Xv=function(e){return Gv(e)&&!Kv(e)},Jv=function(e){var n,r=e&&_o(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=_o(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},Sh=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},Qv=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=wr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(wr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,h=_o(e);if(u&&!u.shadowRoot&&a(u)===!0)return Sh(e);e.assignedSlot?e=e.assignedSlot:!u&&h!==e.ownerDocument?e=h.host:e=u}e=d}if(Jv(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Sh(e);return!1},ex=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return wr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},Lh=function(e,n){return!(n.disabled||Wv(n)||Qv(n,e)||Zv(n)||ex(n))},Mh=function(e,n){return!(Xv(n)||Oh(n)<0||!Lh(e,n))},tx=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Bh=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=Uv(s,i),c=i?Bh(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(Yv).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},Nh=function(e,n){n=n||{};var r;return n.getShadowRoot?r=dl([e],n.includeContainer,{filter:Mh.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:tx}):r=qv(e,n.includeContainer,Mh.bind(null,n)),Bh(r)};var nx=Ih.concat("iframe:not([inert]):not([inert] *)").join(","),Rh=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return wr.call(e,nx)===!1?!1:Lh(n,e)};var _h={getShadowRoot:!0};function $t(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function ul(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function va(t,e){for(;e;){if(e===t)return!0;e=ul(e)}return!1}function xa(t){return!!t&&"focus"in t&&Rh(t,_h)}function ya(t){return Nh(t,_h)}function Vo(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var Fh=new WeakMap,Ho=class{#e;#t;#n;#a=null;#r=null;#o=!1;#l=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=Fh.get(this.#t)??[],Fh.set(this.#t,this.#e)}get#s(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#o||(this.#o=!0,this.#a=e,this.#r=va(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#i,!0),this.#t.addEventListener("keydown",this.#c))}focusInside(e=this.#r){if(!this.#s)return;(va(this.#n,e)&&xa(e)?e:ya(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#o)return()=>{};let e=$t(this.#t),n=this.#e.at(-1)===this&&va(this.#n,e),r=this.#a,a=r&&!va(this.#n,r)?r:e;this.#o=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#i,!0),this.#t.removeEventListener("keydown",this.#c),this.#a=this.#r=null,()=>{n&&(xa(a)?a.focus({preventScroll:!0}):xa(e)?e.focus({preventScroll:!0}):xa(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#d(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#i=e=>{if(!this.#s||this.#l)return;let n=e.composedPath();if(!this.#d(n)){if(n.includes(this.#n)){this.#r=$t(this.#t);return}this.#l=!0,this.focusInside(),this.#l=!1}};#c=e=>{!this.#s||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#d(e.composedPath())||(e.preventDefault(),Vo(ya(this.#n),$t(this.#t),e.shiftKey,this.#n))}};var hl=t=>t==="maximized"?"maximized":"normal",jo=class extends V{static observedAttributes=["state"];#e;#t;#n;#a="normal";#r=!1;#o=!1;#l;constructor(){super(),this.#n=this.attachInternals();let e=this.attachShadow({mode:"open"}),n=this.ownerDocument;this.#e=n.createElement("slot"),this.#e.setAttribute("part","content"),this.#l=new Ho(this.#e),this.#t=n.createElement("div"),this.#t.setAttribute("part","placeholder"),this.#t.setAttribute("aria-hidden","true"),e.append(this.#t,this.#e),this.#e.addEventListener("toggle",()=>{this.#o&&this.isConnected&&this.#c()}),this.addEventListener("panelmaximizerequest",this.#d),this.addEventListener("panelrestorerequest",this.#d),this.addEventListener("paneltoggle",this.#d)}get#s(){return typeof this.#e.showPopover=="function"&&this.#e.matches(":popover-open")?"maximized":"normal"}connectedCallback(){this.hasAttribute("state")?this.#a=hl(this.getAttribute("state")):this.#r||(this.#a=hl(this.getAttribute("default-state"))),this.#r=!0,queueMicrotask(()=>{this.isConnected&&(this.#o=!0,this.#c())})}disconnectedCallback(){this.#o=!1,this.#b(!1)}attributeChangedCallback(){this.hasAttribute("state")&&(this.#a=hl(this.getAttribute("state")),this.#o&&this.isConnected&&this.#c())}requestMaximize(){this.#i("maximized")}requestRestore(){this.#i("normal")}#d=e=>{e.composedPath().find(r=>r instanceof Element&&r.localName==="a-panel")!==this||e.defaultPrevented||this.#i(e.type==="paneltoggle"?this.#s==="maximized"?"normal":"maximized":e.type==="panelmaximizerequest"?"maximized":"normal")};#i(e){let n=this.#s;e===n||!this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))||this.hasAttribute("state")||(this.#a=e,this.#o&&this.isConnected&&this.#c())}#c(){if(!(this.#s===this.#a&&(this.#a==="maximized"||!this.#e.hasAttribute("popover"))))if(this.#a==="maximized"){if(typeof this.#e.showPopover!="function")return;let e=$t(this.ownerDocument),n=this.ownerDocument.defaultView.getComputedStyle(this),r=n.boxSizing==="border-box",a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),i=Math.max(0,this.offsetWidth-this.clientWidth-Math.round(a)),s=Math.max(0,this.offsetHeight-this.clientHeight-Math.round(o)),l=parseFloat(n.width)-(r?parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+a:0)-i,c=parseFloat(n.height)-(r?parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+o:0)-s;this.#t.style.width=`${Math.max(0,l||0)}px`,this.#t.style.height=`${Math.max(0,c||0)}px`,this.#e.tabIndex=-1,this.#e.setAttribute("popover","manual"),this.#l.activate(e);try{this.#e.showPopover()}catch(d){throw this.#p(),d}if(this.#s!=="maximized"){this.#p();return}this.#n.states.add("maximized"),this.#l.focusInside(e)}else this.#b()}#p(){this.hasAttribute("state")||(this.#a="normal"),this.#b()}#b(e=!0){let n=this.#l.deactivate();this.#s==="maximized"&&this.#e.hidePopover(),this.#e.removeAttribute("popover"),this.#e.removeAttribute("tabindex"),this.#n.states.delete("maximized"),e&&n()}};function Vh(){typeof customElements>"u"||customElements.get("a-panel")||customElements.define("a-panel",jo)}Vh();function qo(t,e){let n=null;t.addEventListener("keydown",r=>{if(r.repeat||!e.keys.includes(r.key))return;let a=e.resolve(r.target);a&&(r.preventDefault(),n=e.blocked?.(a)?null:a)},!0),t.addEventListener("keyup",r=>{if(!e.keys.includes(r.key))return;let a=e.resolve(r.target);if(!a||a!==n){n=null;return}n=null,!e.blocked?.(a)&&e.activate(a)},!0)}function Hh(t){!t||t.hasKeyListenerForAButton||(qo(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",ax,!0),t.hasKeyListenerForAButton=!0)}var Uo=class extends V{static observedAttributes=["aria-label","aria-labelledby","aria-describedby"];internals;popupAriaSource;#e;#t;#n;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){Hh(this.doc),this.parentElement?.localName==="a-text"&&this.dispatchEvent(new Event("anta-text-control-ready",{bubbles:!0})),this.parentElement?.localName==="a-select-field"&&(this.#t=this.parentElement,this.#e=new MutationObserver(()=>this.#a()),this.#e.observe(this.#t,{childList:!0,subtree:!0}),this.#t.addEventListener("click",this.#r),this.#a())}disconnectedCallback(){this.#n&&this[Vn]({source:this.#n,clear:!0}),this.#t&&(this.#e?.disconnect(),this.#t?.removeEventListener("click",this.#r),this.#t=void 0,this.#a())}attributeChangedCallback(){this.#t&&this.#a()}#a(){if(!this.internals)return;let e=this.#t?.querySelector(":scope > a-select-label"),n=this.#t?.querySelector(":scope > a-select-hint"),a=[this.#t?this.querySelector(":scope > a-button-label"):null,n].filter(o=>!!o);try{this.internals.ariaLabelledByElements=e&&!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")?[e]:null,this.internals.ariaDescribedByElements=a.length&&!this.hasAttribute("aria-describedby")?a:null}catch{}}#r=e=>{this.hasAttribute("disabled")||this.hasAttribute("loading")||e.composedPath().some(n=>n instanceof Element&&n.localName==="a-select-label")&&this.focus()};[Vn](e){if(this.internals){if(e.clear){if(this.#n!==e.source)return;this.#n=void 0,this.internals.ariaExpanded=null,this.internals.ariaLabel=null;return}this.#n=e.source,this.internals.ariaExpanded=e.expanded?"true":"false",this.internals.ariaLabel=e.expanded?"Show less":"Show more"}}[Zt](e){if(!(!this.internals||!("ariaControlsElements"in this.internals))){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0;try{this.internals.ariaControlsElements=null}catch{}return}if("controls"in e){this.popupAriaSource=e.source;try{this.internals.ariaControlsElements=e.controls?[e.controls]:null}catch{}}}}};function rx(t){let e=t.getAttribute("form"),n=e===null?t.closest("form"):t.ownerDocument.getElementById(e);return n?.namespaceURI==="http://www.w3.org/1999/xhtml"&&n.localName==="form"?n:null}function ax(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 r=e.getAttribute("type")||"button",a=rx(e);if(a)if(r==="submit"){a.requestSubmit();let o=new FormData(a);a.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 r==="reset"&&a.reset()}function jh(){typeof customElements>"u"||(Hh(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Uo))}jh();async function ox(t,e){try{return await e.navigator.clipboard.writeText(t),!0}catch{return!1}}async function ix(t,e){let n=t.cloneNode(!0);n.querySelectorAll("[data-copy-node-button]").forEach(o=>o.remove());let r=n.outerHTML,a=n.textContent??"";try{return typeof e.ClipboardItem<"u"&&e.navigator.clipboard?.write?(await e.navigator.clipboard.write([new e.ClipboardItem({"text/html":new e.Blob([r],{type:"text/html"}),"text/plain":new e.Blob([a],{type:"text/plain"})})]),!0):(await e.navigator.clipboard.writeText(a),!0)}catch{return!1}}function sx(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function qh(t,e){t.then(e)}function Uh(t){return t.ownerDocument.defaultView?.location.href??""}function lx(t){if(t.hasAttribute("copy-url"))return Uh(t);let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${Uh(t)}
2
+ ${e}`:e}function cx(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Yo(t){if(!t.hasAttribute("copy"))return;let e=t.ownerDocument.defaultView??globalThis;t.dispatchEvent(new e.CustomEvent("copyrequest",{bubbles:!1}))}function Yh(t,e){let n=t.ownerDocument.defaultView??globalThis;if(t.hasAttribute("copy-node")){let r=sx(t);return qh(r?ix(r,n):Promise.resolve(!1),e),!0}return cx(t)?(qh(ox(lx(t),n),e),!0):!1}var $h="a-button, button, [role=button]",Kh="a-menu-item, [role=menuitem]",Gh=`${$h}, ${Kh}`,Wo=Symbol.for("anta.copy-delegation");function pl(t){return t?.querySelector(":scope > a-copy")??null}function ml(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function dx(t){if(t[Wo])return t[Wo];let e=new WeakMap,n=c=>c.target?.closest?.(Gh),r=(c,d)=>{let u=n(c);if(!u||ml(u))return;let h=pl(u);h&&(d?e.set(h,d):e.delete(h),Yo(h))},a=c=>r(c,{x:c.clientX,y:c.clientY}),o=c=>{(c.key==="Enter"||c.key===" ")&&r(c)},i=c=>{let d=n(c);if(!d?.matches($h)||ml(d))return;let u=pl(d);u&&(c.detail?e.set(u,{x:c.clientX,y:c.clientY}):e.delete(u),u.activate())},s=c=>{let d=n(c);!d?.matches(Kh)||ml(d)||pl(d)?.activate()};t.addEventListener("pointerdown",a,!0),t.addEventListener("keydown",o,!0),t.addEventListener("click",i,!0),t.addEventListener("menuselect",s,!0);let l={readers:new Set,origins:e,dispose:()=>{t.removeEventListener("pointerdown",a,!0),t.removeEventListener("keydown",o,!0),t.removeEventListener("click",i,!0),t.removeEventListener("menuselect",s,!0),delete t[Wo]}};return t[Wo]=l,l}var Wh=900,Zh=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("div");e.className="feedback",e.part.add("feedback"),e.setAttribute("popover","manual"),e.setAttribute("role","status");let n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.textContent="\u2713";let r=document.createElement("span");return r.className="label",e.append(n,r),t.content.append(e),t})(),Zo=class extends V{#e;#t;#n;#a;#r;#o;#l=0;#s;#d;#i;#c;connectedCallback(){this.#r=dx(this.doc),this.#o=this.doc,this.#r.readers.add(this),this.#c?.doc===this.doc&&this.#c.origin&&this.#r.origins.set(this,this.#c.origin),this.#c=void 0,this.addEventListener("copydone",this.#p)}activate(){let e=this.#l,n=this.#r?.origins.get(this);this.#r?.origins.delete(this),Yh(this,r=>{this.#s={current:this.isConnected&&e===this.#l,origin:n};try{this.dispatchEvent(new this.view.CustomEvent("copydone",{detail:{ok:r}}))}finally{this.#s=void 0}})}#p=e=>{if(e.target!==this||this.#s?.current===!1||!this.isConnected)return;let n=this.#s?this.#s.origin:this.#r?.origins.get(this);if(this.#s||this.#r?.origins.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let r=this.closest(Gh);r&&this.#f(r,n)};#b(){if(!Zh)return;let e=this.attachShadow({mode:"open"});e.append(Zh.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#f(e,n){this.#e||this.#b();let r=this.#e,a=this.#t;if(!r||!a)return;a.textContent=this.getAttribute("copied-label")??"Copied";let o;if(n)r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.translate="8px 0",o=n.y;else{let l=e.getBoundingClientRect(),c=this.view.getComputedStyle(e).direction==="rtl";r.style.left=`${c?l.right-12:l.left+12}px`,r.style.top=`${l.top}px`,r.style.translate=c?"-100% 0":"0 0",o=l.bottom}if(!this.#i){let l=this.view.getComputedStyle(r),c={opacity:[l.getPropertyValue("--_copy-opacity-from").trim(),l.getPropertyValue("--_copy-opacity-to").trim()],easing:l.getPropertyValue("--_copy-easing").trim(),above:[l.getPropertyValue("--_copy-above-from").trim(),l.getPropertyValue("--_copy-above-to").trim()],below:[l.getPropertyValue("--_copy-below-from").trim(),l.getPropertyValue("--_copy-below-to").trim()]};if(![...c.opacity,...c.above,...c.below,c.easing].every(Boolean))return;this.#i=c}this.#u(),r.showPopover(),r.style.transform=this.#i.above[1];let i=r.getBoundingClientRect().top<0;i&&(r.style.top=`${o}px`);let s=i?this.#i.below:this.#i.above;r.style.transform=s[0],this.#d?(this.#d.effect.setKeyframes({opacity:this.#i.opacity,transform:s}),this.#d.play()):this.#d=r.animate({opacity:this.#i.opacity,transform:s},{duration:Wh,easing:this.#i.easing,fill:"forwards"}),this.#d.currentTime=0,this.#a=this.view,this.#n=this.#a.setTimeout(()=>this.#u(),Wh)}#u(){this.#n!=null&&this.#a?.clearTimeout(this.#n),this.#n=void 0,this.#a=void 0,this.#d?.cancel(),this.#e?.matches(":popover-open")&&this.#e.hidePopover()}adoptedCallback(){this.#d?.cancel(),this.#d=void 0,this.#i=void 0,this.#c=void 0,this.#o=void 0}disconnectedCallback(){this.#l++,this.#u();let e=this.#c={doc:this.#o,origin:this.#r?.origins.get(this)};queueMicrotask(()=>{this.#c===e&&(this.#c=void 0)}),this.#r?.origins.delete(this),this.#r?.readers.delete(this),this.#r?.readers.size===0&&this.#r.dispose(),this.#r=void 0,this.removeEventListener("copydone",this.#p)}};function Xh(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",Zo)}Xh();var fl=t=>t==="checked"||t==="indeterminate"?t:"unchecked",$o=class extends V{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;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.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=fl(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&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=fl(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,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,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))}syncAccessibilityRelations(){ua(this.internals,Array.from(this.querySelectorAll(":scope > a-checkbox-label")),Array.from(this.querySelectorAll(":scope > a-checkbox-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=fl(e),this.paint()}formDisabledCallback(){this.paint()}};function Jh(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",$o)}Jh();var bl=t=>t==="checked"?"checked":"unchecked",Ko=class extends V{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;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.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=bl(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&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=bl(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,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,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))}syncAccessibilityRelations(){ua(this.internals,Array.from(this.querySelectorAll(":scope > a-switch-label")),Array.from(this.querySelectorAll(":scope > a-switch-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=bl(e),this.paint()}formDisabledCallback(){this.paint()}};function Qh(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",Ko)}Qh();var ux='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"]',hx=':disabled,[disabled],[aria-disabled="true"]';function ep(t){return t.hasAttribute("data-expander-ignore")||t.matches(ux)&&!t.matches(hx)}var Go=class extends V{static observedAttributes=["state","disabled"];#e;#t;#n;#a;#r;#o;#l;#s;#d=!1;constructor(){super(),this.#e=this.attachInternals();let e=this.attachShadow({mode:"open",slotAssignment:"manual"}),n=(o,i)=>{let s=this.ownerDocument.createElement(o);return s.setAttribute("part",i),s};this.#t=n("button","summary"),this.#t.type="button",this.#t.setAttribute("aria-expanded","false"),this.#n=n("slot","title");let r=n("span","indicator");r.setAttribute("aria-hidden","true"),r.inert=!0,this.#r=n("slot","indicator-content"),r.append(this.#r),this.#t.append(this.#n,r),this.#t.addEventListener("click",this.#x);let a=n("div","header");this.#a=n("slot","actions"),a.append(this.#t,this.#a),this.#l=n("div","region"),this.#l.inert=!0,this.#o=n("slot","content"),this.#l.append(this.#o),e.append(a,this.#l)}get#i(){return this.hasAttribute("state")}get#c(){return this.#t.getAttribute("aria-expanded")==="true"?"open":"closed"}connectedCallback(){this.#t.disabled=this.hasAttribute("disabled"),this.#i?this.#b(ut(this.getAttribute("state"))):this.#d||this.#b(ut(this.getAttribute("default-state"))),this.#d=!0,this.#s??=new MutationObserver(()=>this.#p()),this.#s.observe(this,{childList:!0}),this.#p()}disconnectedCallback(){this.#s?.disconnect()}attributeChangedCallback(e,n,r){n!==r&&(e==="disabled"?this.#t.disabled=this.hasAttribute("disabled"):e==="state"&&this.#i&&this.#b(ut(r)))}#p(){let e=[...this.children];this.#n.assign(...e.filter(n=>n.localName==="a-expander-summary"||n.localName==="a-expander-title")),this.#a.assign(...e.filter(n=>n.localName==="a-expander-actions")),this.#r.assign(...e.filter(n=>n.localName==="a-expander-indicator")),this.#o.assign(...e.filter(n=>n.localName==="a-expander-details"))}#b(e){let n=e==="open";this.#t.setAttribute("aria-expanded",String(n)),this.#l.inert=!n,this.#e.states.delete(n?"closed":"open"),this.#e.states.add(e)}#f(e){let n=e.composedPath(),r=n.find(a=>a.nodeType===1&&a.localName==="a-expander");return r&&r!==this?!0:n.slice(0,n.indexOf(this.#t)).some(a=>a.nodeType===1&&ep(a))}#u(){let e=this.ownerDocument.activeElement,n=this.#n.assignedElements();for(;e&&e!==this;){if(n.some(r=>r.contains(e))&&ep(e))return!0;e=e.parentElement}return!1}#h(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;let n=e.getRangeAt(0);return this.#n.assignedNodes().some(r=>n.intersectsNode(r))}#x=e=>{if(this.hasAttribute("disabled")||this.#f(e)||e.isTrusted&&e.detail===0&&this.#u()||e.detail!==0&&this.#h())return;let n=this.#i,r=this.#c,a=r==="open"?"closed":"open",o=this.dispatchEvent(new this.view.CustomEvent("statechange",{cancelable:!0,detail:{next:a,prev:r}}));!n&&!this.#i&&o&&this.#b(a)}};function tp(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",Go)}tp();var tt=4,np=16,px=8,rp=300,mx=150,fx=300,bx=120,gl=10,ap=100,gx=500,vx="a-tab-label, a-button-label, a-step-hint";function op(t){return typeof t.isTruncated=="boolean"}var vl="data-anta-text-tooltip",xx=1500,yx=10,wx=Symbol.for("anta.tooltip-coordination");function Yn(t){let e=t;return e[wx]??={currentOpen:null,graceFollows:!1,anchors:new WeakMap,anchorCount:0}}function kx(t){if(!t.hasAttribute("follow"))return!1;let e=Yn(t.ownerDocument);return e.currentOpen?e.currentOpen.hasAttribute("follow"):e.graceTimer!==void 0&&e.graceFollows}function yl(t){t.graceTimer!==void 0&&clearTimeout(t.graceTimer),t.graceTimer=void 0,t.graceFollows=!1}function Ex(t){let e=Yn(t.ownerDocument),n=e.currentOpen;n&&n!==t&&(n.isConnected?n.hide():n.cleanup()),e.currentOpen=t,yl(e)}function ip(t,e,n=!0){let r=Yn(e);r.currentOpen===t&&(r.currentOpen=null,yl(r),n&&(r.graceFollows=t.hasAttribute("follow"),r.graceTimer=setTimeout(()=>{r.graceTimer=void 0,r.graceFollows=!1},fx)))}function sp(t){let e,n;for(let r of t.tooltips)r.hasAttribute(vl)?e=r:n=r;return n??e}function xl(t,e,n){let r=sp(e);for(let o of e.tooltips)o!==r&&o.cleanup();let a=n.defaultView;if(e.frame!==void 0&&a?.cancelAnimationFrame(e.frame),e.frame=void 0,!r||!e.intersecting||!a){r?.cleanup();return}e.frame=a.requestAnimationFrame(()=>{e.frame=void 0;let o=Yn(n).anchors.get(t);o!==e||!o.intersecting||sp(o)!==r||r.setupListeners()})}function Cx(t,e,n){let r=e.defaultView?.IntersectionObserver;!n.observer&&r&&(n.observer=new r(a=>{for(let o of a){let i=n.anchors.get(o.target);i&&(i.intersecting=o.isIntersecting,xl(o.target,i,e))}},{root:null,rootMargin:"0px",threshold:0})),n.observer?.observe(t)}var Xo=class extends V{static observedAttributes=["delay"];container;bubble;anchor=null;#e;#t;#n;#a;listening=!1;shown=!1;touchOpen=!1;lastMouse;debouncedShow;teardown;closeTimer;fading=!1;fadeTimer;docMoveBound=!1;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"});this.#a=this.attachInternals(),this.container=this.doc.createElement("div"),this.container.className="container",this.container.setAttribute("part","container"),this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=this.doc.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#r&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#r&&this.shown&&this.scheduleHide()}),this.container.addEventListener("focusin",()=>{this.#r&&this.cancelHide()}),this.container.addEventListener("focusout",()=>{this.#r&&this.shown&&this.scheduleHide()}),e.append(this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=this.#e=this.doc,r=Yn(n),a=r.anchors.get(e);a||(a={tooltips:new Set,intersecting:!n.defaultView?.IntersectionObserver},r.anchors.set(e,a),r.anchorCount++,Cx(e,n,r)),a.tooltips.add(this),xl(e,a,n)}disconnectedCallback(){this.cleanup();let e=this.#e;if(this.anchor&&e){let n=this.anchor,r=Yn(e),a=r.anchors.get(n);a?.tooltips.delete(this),a&&a.tooltips.size===0?(a.frame!==void 0&&e.defaultView?.cancelAnimationFrame(a.frame),r.anchors.delete(n),r.observer?.unobserve(n),--r.anchorCount===0&&(r.observer?.disconnect(),r.observer=void 0,yl(r))):a&&xl(n,a,e)}this.anchor=null,this.#e=void 0}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=pa(e=>this.show(e),this.#d)}get#r(){return this.hasAttribute("interactive")}get#o(){return this.#r||this.touchOpen?!0:!this.hasAttribute("follow")}get#l(){return this.getAttribute("placement")==="top"}get#s(){return this.getAttribute("placement")==="left"}get#d(){let e=this.getAttribute("delay");if(e==null)return rp;let n=parseInt(e,10);return Number.isFinite(n)?n:rp}get#i(){return this.hasAttribute("truncated-only")}get#c(){return this.hasAttribute(vl)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#c||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(vl))}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.#c&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(op(e))return[e];let r=Array.from(e.querySelectorAll(vx));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>op(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#c?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new this.view.MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()?this.hide():this.position(this.lastMouse))})),this.contentObserver.observe(this.#c?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.#n=this.view,this.positionFrame=this.#n.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,r,a,o){return o?e<tt?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-tt),e=Math.max(tt,e),n+a>i&&(n=i-a-tt),n=Math.max(tt,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=Nt(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#s){let i=e.left-n.width-tt,s=i>=tt?i:e.right+tt,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-tt,e.bottom+tt,n.height,a,this.#l||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#s){let i=e.clientX-n.width-tt,s=i>=tt?i:e.clientX+np;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-tt*2,e.clientY+np,n.height,a,this.#l);this.place(e.clientX-px,o,n.width,n.height,r,a)})};position(e){!this.#o&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Nt(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=gl?1:o>=ap?0:1-(o-gl)/(ap-gl)}show=e=>{if(!this.anchor||su(this.doc)&&!lu(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#i&&!this.isTargetTruncated())return;this.syncAutomaticTextContent(),this.cancelHide();let n=Yn(this.doc).currentOpen;if(n&&n!==this&&n.anchor&&this.anchor.contains(n.anchor))return;Ex(this),this.shown||(this.shown=!0,this.fading=!1,this.#a.states.delete("proximity-hidden"),this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.#t=this.doc,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);let r=this.pendingPosition;r&&(this.positionFrame!==void 0&&this.#n?.cancelAnimationFrame(this.positionFrame),this.positionFrame=void 0,this.pendingPosition=void 0,r())};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(),mx),ip(this,this.#e??this.doc))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1;let e=this.#t;e?.defaultView?.removeEventListener("scroll",this.hide,{capture:!0}),e?.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(e?.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1),this.#t=void 0}cleanup(){this.cancelHide(),this.positionFrame!==void 0&&this.#n?.cancelAnimationFrame(this.positionFrame),this.positionFrame=void 0,this.#n=void 0,this.pendingPosition=void 0,this.lastMouse=void 0,this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),ip(this,this.#e??this.doc,!1),this.touchOpen=!1,this.#a.states.delete("proximity-hidden"),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#o)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.#a.states.add("proximity-hidden"),this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.#a.states.delete("proximity-hidden"),this.bubble.style.opacity=String(n)};scheduleHide=(e=bx)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,!(this.#r&&this.matches(":focus-within"))&&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.#i&&!this.isTargetTruncated()||(kx(this)?(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,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#o||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),n.removeEventListener("scroll",o,!0),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),n.addEventListener("scroll",o,{capture:!0,passive:!0}),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{(e.shadowRoot?.activeElement??this.doc.activeElement)?.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),n.addEventListener("scroll",o,{capture:!0,passive:!0}),r.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},h=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>yx&&u()},p=()=>{u(),f(),this.shown&&this.touchOpen&&this.scheduleHide(xx)},f=()=>{e.removeEventListener("pointermove",h),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d),n.removeEventListener("scroll",b,!0)},b=()=>{u(),f()},x=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",h),e.addEventListener("pointerup",p),e.addEventListener("pointercancel",p),e.addEventListener("contextmenu",d),n.addEventListener("scroll",b,{capture:!0,passive:!0}),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show(),this.shown||(this.touchOpen=!1)},gx))};e.addEventListener("pointerenter",i),e.addEventListener("focusin",s),e.addEventListener("pointerdown",x),this.teardown=()=>{this.debouncedShow?.cancel(),u(),f(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focusin",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",x),n.removeEventListener("pagehide",o),n.removeEventListener("scroll",o,!0),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function lp(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",Xo)}lp();var vn="clearrequest",Jo="clearclick",Qo="clearinput";function ei(t,e){return e.composedPath().find(n=>{let r=n?.localName;return r==="a-input"||r==="a-input-time"})===t}function ti(t,e,n,r){let a,o=()=>{if(!t.isConnected)return;a?.disconnect();let i=!1,s=l=>{for(let c of l){if(c.nodeType===3&&c.textContent?.trim())return!1;if(c.nodeType!==1)continue;let d=c;if(d.localName===n){let u=t.ownerDocument.defaultView??window;a??=new u.MutationObserver(o),a.observe(d,{childList:!0});for(let h of d.childNodes)h.nodeType===3&&a.observe(h,{characterData:!0});if(!s(d.childNodes))return!1}else if(d.localName==="a-button"||d.localName==="button"||d.matches('a[role="button"][data-anta]'))i=!0;else return!1}return!0};r(s(e.assignedNodes())&&i)};return{sync:o,disconnect(){a?.disconnect(),a=void 0}}}var Kt=Symbol.for("anta.input-focus-modality");function ni(t,e){let n=t[Kt];if(!n){n={keyboard:!1,readers:new Set,key:()=>{},pointer:()=>{},refresh:()=>{}};let a=n;a.refresh=()=>{!a.active||a.frame!==void 0||(a.frame=t.defaultView?.requestAnimationFrame(()=>{a.frame=void 0,a.active?.()}))},a.key=()=>{a.keyboard=!0,a.refresh()},a.pointer=()=>{a.keyboard=!1,a.refresh()},t[Kt]=a,t.addEventListener("keydown",a.key,!0),t.addEventListener("pointerdown",a.pointer,!0)}return n.readers.add(e),()=>{n.readers.delete(e),n.active===e&&(n.active=void 0),!n.readers.size&&(n.frame!==void 0&&t.defaultView?.cancelAnimationFrame(n.frame),t.removeEventListener("keydown",n.key,!0),t.removeEventListener("pointerdown",n.pointer,!0),delete t[Kt])}}var ri=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],ai=new Set(ri),Ax={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function oi(t){return Ax[t]}var Tx={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function ii(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Wn(t,e,n,r){let a=Tx[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:ii(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var cp=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],Sx=new Set(["readonly","required"]),dp=typeof navigator<"u"?navigator.userAgent:"",Mx=/AppleWebKit\//.test(dp)&&!/Chrom(?:e|ium)\//.test(dp),up=!Mx&&typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),hp=t=>t?.localName==="input",Zn=t=>t?.localName==="textarea",Ke=t=>t?.localName==="button",pp=Symbol("readDelegatedAria"),mp=Symbol("writeDelegatedAria"),wa=class extends V{static formAssociated=!0;static observedAttributes=[...cp,...ri,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;#e;#t;control;#n;pendingValue;#a;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;#r;#o=!1;constructor(){super();try{this.internals=this.attachInternals?.()}catch(a){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",a)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});this.labelSlot=this.doc.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=this.doc.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=this.doc.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading"),this.#e=this.doc.createElement("slot"),this.#e.name="trailing",this.#e.setAttribute("part","trailing"),this.#t=ti(this,this.#e,"a-input-trailing",a=>{this.internals?.states?.[a?"add":"delete"]("trailing-actions")}),this.#e.addEventListener("slotchange",this.#t.sync);let n=this.doc.createElement("slot");n.name="clear",n.setAttribute("part","clear"),this.field.append(this.leadingSlot,n,this.#e),this.addEventListener(vn,a=>{if(!ei(this,a)||this.control?.disabled||this.hasAttribute("readonly"))return;this.dispatchEvent(new CustomEvent(Jo,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=this.doc.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let r=this.doc.createElement("slot");e.append(this.labelSlot,this.field,r,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(this.#a?.(),this.#a=ni(this.doc,this.syncButtonFocus),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}if(Object.prototype.hasOwnProperty.call(this,"name")){let e=this.name;delete this.name,this.name=e}this.control?this.syncAutoHeight():this.buildControl(),this.ready=!0,this.#t.sync(),this.applyLabelAria(),this.applyDescriptionAria()}disconnectedCallback(){this.#r?.disconnect(),this.#t.disconnect(),this.#a?.(),this.#a=void 0,this.onBlur()}[Zt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(ai.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=Zn(this.control),i=!a&&this.hasAttribute("button"),s=Ke(this.control);a!==o||i!==s?this.buildControl(this.value):Zn(this.control)&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),(e==="readonly"||e==="type")&&this.syncButtonFocus(),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(ai.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(ai.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[pp](e){return this.delegatedAria.get(e)??null}[mp](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Wn(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&(this.applyLabelAria(),this.applyDescriptionAria()),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e){for(let[n,r]of this.delegatedAria)Wn(this,e,n,r);this.applyDescriptionAria()}}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null,i=null;if(hp(n)||Zn(n))try{a=n.selectionStart,o=n.selectionEnd,i=n.selectionDirection}catch{}let s=this.hasAttribute("multiline")||this.hasAttribute("rows"),l=!s&&this.hasAttribute("button"),c=this.doc.createElement(l?"button":s?"textarea":"input");this.#n=void 0,Ke(c)&&(c.type="button",this.#n=this.doc.createElement("span"),this.#n.setAttribute("part","input-label"),c.append(this.#n)),c.setAttribute("part","input"),this.control?this.control.replaceWith(c):this.leadingSlot.after(c),this.control=c,this.internals?.states?.[s?"add":"delete"]("multiline"),this.internals?.states?.[l?"add":"delete"]("button");for(let u of cp)Zn(c)&&u==="type"||this.forward(u,u==="name"?this.name:this.getAttribute(u));this.syncDisabled(),this.syncStatus();for(let[u,h]of this.delegatedAria)Wn(this,c,u,h);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),s&&this.configureTextarea(c);let d=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(c.value=d,this.syncButtonPresentation(),c.addEventListener("input",this.onInput),c.addEventListener("change",this.onChange),c.addEventListener("focus",this.onFocus),c.addEventListener("blur",this.onBlur),r&&(c.focus(),a!=null&&(hp(c)||Zn(c))))try{c.setSelectionRange(a,o??a,i??void 0)}catch{}this.syncFormValue(d),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=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,e.style.setProperty("field-sizing",up?"content":"fixed"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(up)return;let e=this.control;if(!Zn(e)||this.getAttribute("rows")!=null)return;let n=this.field.style.getPropertyValue("--_input-measured-min-height"),r=e.scrollTop;this.field.style.setProperty("--_input-measured-min-height",this.view.getComputedStyle(this.field).height),e.style.height="0px",e.style.height=`${e.scrollHeight}px`,n?this.field.style.setProperty("--_input-measured-min-height",n):this.field.style.removeProperty("--_input-measured-min-height"),e.scrollTop=r};forward(e,n){let r=this.control;r&&(Ke(r)||Zn(r)&&e==="type"||(Sx.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!Ke(e))return;let n=e.value;this.#n&&(this.#n.textContent=n||this.getAttribute("placeholder")||""),this.applyDescriptionAria()}syncFormValue(e){if(Ke(this.control)){this.internals?.setFormValue(null);return}this.internals?.setFormValue(e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};syncButtonFocus=()=>{if(!Ke(this.control))return;let e=this.shadowRoot?.activeElement===this.control&&this.control.matches(":focus-visible");this.internals?.states?.[e?"add":"delete"]("button-focus")};onFocus=()=>{Ke(this.control)&&this.syncButtonFocus();let e=this.doc[Kt];e&&(e.active=Ke(this.control)?this.syncButtonFocus:void 0,Ke(this.control)&&e.refresh());try{this.doc[Kt]?.keyboard?this.internals?.states?.add("kb-focus"):this.internals?.states?.delete("kb-focus")}catch{}};onBlur=()=>{let e=this.doc[Kt];e?.active===this.syncButtonFocus&&(e.active=void 0),Ke(this.control)&&this.internals?.states?.delete("button-focus");try{this.internals?.states?.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria(),this.applyDescriptionAria()};applyLabelAria(){let e=this.control;if(!e||(this.#r?.disconnect(),this.delegatedAria.has("aria-labelledby")))return;if(this.delegatedAria.has("aria-label")){e.ariaLabelledByElements=[];return}let n=this.labelSlot.assignedElements();if(e.ariaLabelledByElements=n,this.#o=n.some(r=>!!r.textContent?.trim()),!(!Ke(e)||!this.isConnected||!n.length)){this.#r??=new this.view.MutationObserver(()=>{let r=this.labelSlot.assignedElements().some(a=>!!a.textContent?.trim());r!==this.#o&&(this.#o=r,this.applyDescriptionAria())});for(let r of n)this.#r.observe(r,{childList:!0,characterData:!0,subtree:!0})}}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-describedby"))return;if(this.delegatedAria.has("aria-description")){e.ariaDescribedByElements=[];return}let n=e.getAttribute("aria-label")?.trim()||(this.delegatedAria.has("aria-labelledby")?e.ariaLabelledByElements?.length:!this.delegatedAria.has("aria-label")&&this.#o),r=Ke(e)&&n&&e.value.trim()?this.#n:null;e.ariaDescribedByElements=[...r?[r]:[],...this.hintSlot.assignedElements()]}applyPopupAria(){let e=this.control;e&&(this.delegatedAria.has("aria-controls")||(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),this.delegatedAria.has("aria-activedescendant")||(e.ariaActiveDescendantElement=this.popupActiveDescendant))}updateFilled(){this.value?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}updateValidity(){let e=this.control;if(!(!this.internals||!e)){if(Ke(e)){this.internals.setValidity({});return}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.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Qo,{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){e==null?this.removeAttribute("name"):this.getAttribute("name")!==String(e)&&this.setAttribute("name",String(e))}formResetCallback(){Ke(this.control)||(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??""}};for(let t of ri)Object.defineProperty(wa.prototype,oi(t),{configurable:!0,enumerable:!0,get(){return this[pp](t)},set(e){this[mp](t,e)}});function fp(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",wa)}fp();function si(t){let e=t;for(let n of["value","defaultValue"]){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];delete e[n],e[n]=r}}var wl=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},li=(t,e)=>{if(t===null||!t.trim())return e;let n=t.trim().split(/\s+/);if(n.length!==1&&n.length!==2)return e;let r=n.map(Number);return r.every(Number.isFinite)?r.length===2?[r[0],r[1]]:r[0]:e},kl=t=>Array.isArray(t)?t.join(" "):String(t),ci=(t,e)=>Array.isArray(t)&&Array.isArray(e)?t[0]===e[0]&&t[1]===e[1]:!Array.isArray(t)&&!Array.isArray(e)&&t===e,di=class extends V{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix","inverted","name","aria-label","aria-labelledby","aria-describedby","aria-description"];internals;#e;#t;#n;#a;#r;#o;#l;#s;#d;#i;#c;#p;#b;#f;#u;#h;#x;#m;#g;#w;#y;#O;#v=0;#D=[0,0];#k=!1;#S=0;#_=!1;#C=!1;#B;#L=[];#A=!0;#F;#E=[];#P=!1;#M;#V=e=>{e.composedPath().includes(this.#e)&&this.#be(e)};#W=e=>this.#ge(e);#q=e=>this.#fe(e);#Z=e=>this.#ve(e);#$=e=>{let n=e.type==="keydown"?this.#Z:e.type==="pointerdown"?this.#V:this.#W;this.removeEventListener(e.type,n),this.addEventListener(e.type,n)};get value(){return Array.isArray(this.#v)?[...this.#v]:this.#v}set value(e){e==null||e===""?this.removeAttribute("value"):this.setAttribute("value",kl(e))}get defaultValue(){return li(this.getAttribute("defaultvalue"),this.#ae())}set defaultValue(e){e==null?this.removeAttribute("defaultvalue"):this.setAttribute("defaultvalue",kl(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"});this.#l=document.createElement("div"),this.#l.className="header",this.#l.part.add("header"),this.#s=document.createElement("slot"),this.#s.name="label",this.#s.part.add("label");let n=document.createElement("span");n.className="inline-separator",n.part.add("value-separator"),n.textContent=":",this.#d=document.createElement("span"),this.#d.className="inline-value",this.#d.part.add("value","inline-value"),this.#i=document.createElement("span"),this.#i.className="value-affix",this.#i.part.add("value-affix"),this.#c=document.createElement("span"),this.#c.className="value-affix",this.#c.part.add("value-affix"),this.#d.append(this.#i,this.#c),this.#p=document.createElement("span"),this.#p.className="end-value",this.#p.part.add("value","end-value"),this.#b=document.createElement("span"),this.#b.className="value-affix",this.#b.part.add("value-affix"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#f.part.add("value-affix"),this.#p.append(this.#b,this.#f),this.#l.append(this.#s,n,this.#d,this.#p),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area",this.#t.part.add("rail-area");let r=document.createElement("div");r.className="rail",r.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill","fill-start"),this.#a=document.createElement("div"),this.#a.className="fill",this.#a.part.add("fill","fill-end"),this.#r=document.createElement("div"),this.#r.className="thumb",this.#r.part.add("thumb","thumb-1"),this.#o=document.createElement("div"),this.#o.className="thumb",this.#o.part.add("thumb","thumb-2"),this.#u=document.createElement("span"),this.#u.className="thumb-value",this.#u.part.add("thumb-value","thumb-value-1"),this.#x=document.createElement("span"),this.#x.className="value-affix",this.#x.part.add("value-affix"),this.#m=document.createElement("span"),this.#m.className="value-affix",this.#m.part.add("value-affix"),this.#u.append(this.#x,this.#m),this.#h=document.createElement("span"),this.#h.className="thumb-value",this.#h.part.add("thumb-value","thumb-value-2"),this.#g=document.createElement("span"),this.#g.className="value-affix",this.#g.part.add("value-affix"),this.#w=document.createElement("span"),this.#w.className="value-affix",this.#w.part.add("value-affix"),this.#h.append(this.#g,this.#w),this.#t.append(r,this.#n,this.#a,this.#r,this.#o,this.#u,this.#h),this.#e.append(this.#t),this.#y=document.createElement("slot"),this.#y.name="markers",this.#y.part.add("markers"),this.#O=document.createElement("slot"),this.#O.part.add("extras");for(let a of[this.#s,this.#y,this.#O])a.addEventListener("slotchange",()=>{this.#de(),a===this.#s&&(this.#A=!0,this.#te())});for(let[a,o]of[this.#r,this.#o].entries())o.addEventListener("focus",()=>{Array.isArray(this.#v)&&(this.#S=a,this.#U())});this.#e.addEventListener("pointerup",this.#q),this.#e.addEventListener("pointercancel",this.#q),this.#e.addEventListener("lostpointercapture",this.#q),this.addEventListener("blur",()=>{delete this.#e.dataset.pointerFocus,this.#H()});for(let a of[this.#r,this.#o]){let o=document.createElement("span");o.hidden=!0,a.append(o),this.#L.push(o)}e.append(this.#l,this.#e,this.#y,this.#O),si(this)}connectedCallback(){this.#A=!0;for(let e of["pointerdown","keydown","pointermove"])this.addEventListener(e,this.#$,!0);this.#_||(this.#K(this.#oe()),this.#_=!0),this.#U(),this.#de()}disconnectedCallback(){this.#re(!1);for(let e of["pointerdown","keydown","pointermove"])this.removeEventListener(e,this.#$,!0);this.removeEventListener("pointerdown",this.#V),this.removeEventListener("keydown",this.#Z),this.removeEventListener("pointermove",this.#W),this.#B=void 0,delete this.#e.dataset.pointerFocus,this.#H()}adoptedCallback(){this.disconnectedCallback()}attributeChangedCallback(e,n,r){this.#_&&(e.startsWith("aria-")&&(this.#A=!0),e==="value"?r===null&&n!==null?(this.#C=!0,this.#B=void 0,this.#le()):this.#Q():e==="defaultvalue"?!this.#Y&&!this.#C&&this.#Q():(e==="min"||e==="max"||e==="step")&&(this.#Y?this.#Q():(this.#K(this.#v),this.#le())),this.#I&&this.#re(!0),this.#U(),e==="value-display"&&this.#de())}#Q(){let e=this.#X(this.#oe()),n=this.#B;n&&ci(n.value,e)?this.#k=n.reversed:this.#le(e),this.#B=void 0,this.#K(e),this.#U()}formResetCallback(){if(this.#re(!1),this.#B=void 0,this.#Y)return;let e=this.#v;this.#K(this.defaultValue),this.#C=!1,this.#U(),ci(this.#v,e)||this.#ue()}formStateRestoreCallback(e){typeof e=="string"&&(this.#Y||(this.#re(!1),this.#B=void 0,this.#K(li(e,this.#ae())),this.#C=!0,this.#U()))}formDisabledCallback(){this.#I&&this.#re(!0),this.#U()}get#T(){return mr(this.getAttribute("min"),0)}get#N(){return Math.max(this.#T,mr(this.getAttribute("max"),100))}get#R(){let e=mr(this.getAttribute("step"),1);return e>0?e:1}get#I(){return this.hasAttribute("disabled")||this.matches(":disabled")}get#Y(){return this.hasAttribute("value")}#ae(){return Array.isArray(this.#v)||Array.isArray(li(this.getAttribute("value"),this.#T))?[this.#T,this.#N]:this.#T}#oe(){return this.#Y?li(this.getAttribute("value"),this.#ae()):this.defaultValue}#ee(e){let n=this.#T,r=this.#N,a=this.#R,o=n+Math.round((Math.min(r,Math.max(n,e))-n)/a)*a,i=Math.max(wl(n),wl(r),wl(a)),s=i<=100?Number(o.toFixed(i)):Number(o.toPrecision(15));return Math.min(r,Math.max(n,s))}#X(e){if(!Array.isArray(e))return this.#ee(e);let n=this.#ee(e[0]),r=this.#ee(e[1]);return n<=r?[n,r]:[r,n]}#K(e){let n=this.#X(e),r=Array.isArray(this.#v);this.#v=n,Array.isArray(n)?(r||(this.#k=!1),this.#D=this.#k?[n[1],n[0]]:[n[0],n[1]]):(this.#D=[n,n],this.#k=!1)}#z(e){let n=this.#N-this.#T;return n>0?(e-this.#T)/n*100:0}#U(){let e=this.#v,n=Array.isArray(e),r=n?e[0]:this.#T,a=n?e[1]:e,o=`${this.#z(r)}%`,i=`${this.#z(a)}%`,[s,l]=n?this.#D:[a,a];this.#r.style.setProperty("--_percent",`${this.#z(s)}%`),this.#o.style.setProperty("--_percent",`${this.#z(l)}%`),this.#r.toggleAttribute("data-last-active",this.#S===0),this.#o.toggleAttribute("data-last-active",this.#S===1),this.#u.style.setProperty("--_percent",`${this.#z(s)}%`),this.#h.style.setProperty("--_percent",`${this.#z(l)}%`),this.#o.hidden=!n;let c=n&&s===l;this.#u.hidden=c&&this.#S!==0,this.#h.hidden=!n||c&&this.#S!==1;let d="calc(var(--slider-track-inset) - var(--anta-slider-thumb-size) / 2)",u="calc(var(--anta-slider-thumb-size) / 2 - var(--slider-track-inset))",h=(p,f,b,x="0px",g="0px")=>{p.style.setProperty("--_fill-start",f),p.style.setProperty("--_fill-end",b),p.style.setProperty("--_fill-start-edge",x),p.style.setProperty("--_fill-end-edge",g)};this.hasAttribute("inverted")?(this.#n.hidden=n?r===this.#T:a===this.#N,h(this.#n,n?"0%":i,n?o:"100%",n||a===this.#T?d:"0px",n?"0px":u),this.#a.hidden=!n||a===this.#N,n&&h(this.#a,i,"100%","0px",u)):(this.#n.hidden=n?r===a:a===this.#T,h(this.#n,n?o:"0%",i,n&&r!==this.#T?"0px":d,n&&a===this.#N?u:"0px"),this.#a.hidden=!0),this.#ie(this.#d,this.#i,this.#c,n?r:a,n?a:void 0),this.#ie(this.#p,this.#b,this.#f,n?r:a,n?a:void 0),this.#ie(this.#u,this.#x,this.#m,s),n&&this.#ie(this.#h,this.#g,this.#w,l),this.#H(),this.#te(),this.#se()}#ie(e,n,r,a,o){let i=this.getAttribute("value-prefix")??"",s=this.getAttribute("value-suffix")??"";if(e.textContent=String(a),n.textContent=i,r.textContent=s,e.prepend(n),e.append(r),o===void 0)return;let l=n.cloneNode(!0),c=r.cloneNode(!0);e.append("\u2013",l,String(o),c)}#G(e){let n=this.getAttribute("value-prefix")??"",r=this.getAttribute("value-suffix")??"";return`${n}${e}${r}`}#H(){let e=this.internals?.states;if(!e)return;let n=(r,a)=>a?e.add(r):e.delete(r);n("dragging",!!this.#M),n("pointer-focus",this.#e.hasAttribute("data-pointer-focus")),n("thumb-1-active",this.#S===0),n("thumb-2-active",this.#S===1);for(let[r,a]of[["has-header",this.#l],["has-markers",this.#y],["has-extras",this.#O],["has-fill",this.#n],["has-fill-end",this.#a],["has-thumb-value",this.#u],["has-thumb-value-end",this.#h]])n(r,!a.hidden);n("range",Array.isArray(this.#v))}#te(){let e=Array.isArray(this.#v),n=this.#I,r=this.#F,a=this.getRootNode(),o=this.#E.some(({id:s,element:l})=>l.id!==s||l.getRootNode()!==a);(this.#A||this.#P||o||!r||r.range!==e||r.disabled!==n||e&&r.reversed!==this.#k)&&(this.#me(e,n),this.#A=!1,this.#F={range:e,reversed:this.#k,disabled:n});let i=this.internals;if(i&&(i.ariaValueMin=e?null:String(this.#T),i.ariaValueMax=e?null:String(this.#N),i.ariaValueNow=e?null:String(this.#v),i.ariaValueText=e?null:this.#G(this.#v)),!!e)for(let[s,l]of[this.#r,this.#o].entries())l.ariaValueMin=String(this.#T),l.ariaValueMax=String(this.#N),l.ariaValueNow=String(this.#D[s]),l.ariaValueText=this.#G(this.#D[s])}#me(e,n){let r=ii(this,this.getAttribute("aria-labelledby")??""),a=r.length?r:this.#s.assignedElements({flatten:!0}),o=r.length?null:this.getAttribute("aria-label"),i=e?ii(this,this.getAttribute("aria-describedby")??""):[];this.#E=[...r,...i].map(c=>({id:c.id,element:c}));let s=[this.getAttribute("aria-labelledby"),e?this.getAttribute("aria-describedby"):null].flatMap(c=>c?.match(/\S+/g)??[]);this.#P=s.length!==this.#E.length;let l=this.internals;l&&(l.role=e?"group":"slider",l.ariaLabelledByElements=o==null&&!this.hasAttribute("aria-labelledby")?a:[],l.ariaDisabled=n?"true":null);for(let[c,d]of[this.#r,this.#o].entries()){if(!e){for(let p of["role","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-disabled","aria-description"])d.removeAttribute(p);d.ariaLabelledByElements=[],d.ariaDescribedByElements=[],d.tabIndex=-1;continue}let u=c===0!==this.#k?"minimum":"maximum",h=this.#L[c];h.textContent=o!=null?`${o} ${u}`:a.length?u:`${u[0].toUpperCase()}${u.slice(1)} value`,d.role="slider",d.tabIndex=n?-1:0,d.ariaLabelledByElements=o!=null?[h]:[...a,h],d.ariaDescribedByElements=i,d.ariaDescription=this.getAttribute("aria-description"),d.ariaDisabled=n?"true":null}}#se(){let e=this.internals;if(!e)return;let n=kl(this.#v);if(this.#I)e.setFormValue(null,n);else if(Array.isArray(this.#v)){let r=new FormData,a=this.getAttribute("name");a&&(r.append(a,String(this.#v[0])),r.append(a,String(this.#v[1]))),e.setFormValue(r,n)}else e.setFormValue(n,n)}#de(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#l.hidden=!e(this.#s)&&this.getAttribute("value-display")==="none",this.#y.hidden=!e(this.#y),this.#O.hidden=!e(this.#O),this.#H()}#J(e){return{value:Array.isArray(e)?[...e]:e,min:this.#T,max:this.#N,step:this.#R,name:this.getAttribute("name")??void 0}}#j(e,n=this.#v){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:this.#J(n)}))}#ne(e,n=0){let r=this.#ee(e),a=[...this.#D];a[n]=r;let o=a[0]===a[1]?this.#k:a[0]>a[1],i=Array.isArray(this.#v)?o?[a[1],a[0]]:a:r;return ci(this.#M?.lastInput??this.#v,i)?!1:(this.#M&&(this.#M.requested=this.#M.lastInput=i),this.#B=this.#Y?{value:i,reversed:o}:void 0,this.#Y||(this.#k=o,this.#K(i),this.#C=!0,this.#U()),this.#j("input",i),i)}#ue(){this.#j("input"),this.#j("change")}#le(e=this.#v){let n=this.#M;n&&(n.startX=n.clientX,n.startValue=Array.isArray(e)?e[this.#k?1-n.thumb:n.thumb]:e,n.lastInput=void 0)}#he(e){let n=this.#t.getBoundingClientRect();if(n.width<=0)return Array.isArray(this.#v)?this.#D[this.#S]:this.#v;let r=this.#pe()?(n.right-e)/n.width:(e-n.left)/n.width;return this.#T+r*(this.#N-this.#T)}#ce(e){if(!Array.isArray(this.#v))return 0;let n=this.#he(e),r=Math.abs(n-this.#D[0]),a=Math.abs(n-this.#D[1]);return r===a?this.#S:r<a?0:1}#pe(){return this.ownerDocument.defaultView?.getComputedStyle(this).direction==="rtl"}#be(e){if(e.defaultPrevented||this.#M||this.#I||e.button!==0||this.#t.getBoundingClientRect().width<=0)return;let r=e.composedPath()[0]===this.#r?0:e.composedPath()[0]===this.#o?1:this.#ce(e.clientX),a=Array.isArray(this.#v)?this.#D[r]:this.#v;this.#M={pointerId:e.pointerId,startX:e.clientX,clientX:e.clientX,startValue:a,startPublicValue:this.value,thumb:r};try{this.#e.setPointerCapture(e.pointerId)}catch{this.#M=void 0;return}this.#e.dataset.dragging="",this.#e.dataset.pointerFocus="",this.#S=r,this.#r.toggleAttribute("data-last-active",r===0),this.#o.toggleAttribute("data-last-active",r===1),(Array.isArray(this.#v)?[this.#r,this.#o][r]:this).focus({preventScroll:!0}),[this.#r,this.#o][r].dataset.active="",this.getAttribute("track-click")==="jump"&&this.#ne(this.#he(e.clientX),r),this.#H(),e.preventDefault()}#ge(e){let n=this.#M;if(!n||n.pointerId!==e.pointerId)return;if(this.#I){this.#re(!0);return}if(e.defaultPrevented)return;n.clientX=e.clientX;let r=this.#t.getBoundingClientRect().width;if(r<=0)return;if(!(e.buttons&1)){this.#fe(e);return}let a=this.getAttribute("track-click")==="jump"?this.#he(e.clientX):n.startValue+(e.clientX-n.startX)*(this.#pe()?-1:1)/r*(this.#N-this.#T);this.#ne(a,n.thumb),e.preventDefault()}#fe(e){this.#M?.pointerId===e.pointerId&&this.#re(!0)}#re(e){let n=this.#M;if(!n)return;this.#M=void 0,delete this.#e.dataset.dragging,delete[this.#r,this.#o][n.thumb].dataset.active,this.#e.hasPointerCapture(n.pointerId)&&this.#e.releasePointerCapture(n.pointerId),this.#H();let r=n.requested;e&&r!==void 0&&!ci(r,n.startPublicValue)&&this.#j("change",r)}#ve(e){let n=e.composedPath()[0],r=Array.isArray(this.#v),a=n===this.#r?0:n===this.#o?1:void 0;if(e.defaultPrevented||!e.composedPath().includes(this)||(r?a===void 0:n!==this)||this.#I||je(e))return;delete this.#e.dataset.pointerFocus,this.#H();let o=Math.max(this.#R,(this.#N-this.#T)/10),i=r?this.#D[a??0]:this.#v,s;switch(e.key){case"ArrowRight":s=i+(this.#pe()?-this.#R:this.#R);break;case"ArrowUp":s=i+this.#R;break;case"ArrowLeft":s=i+(this.#pe()?this.#R:-this.#R);break;case"ArrowDown":s=i-this.#R;break;case"PageUp":s=i+o;break;case"PageDown":s=i-o;break;case"Home":s=this.#T;break;case"End":s=this.#N;break;default:return}e.preventDefault();let l=this.#ne(s,r?a??0:0);l!==!1&&this.#j("change",l)}};function bp(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",di)}bp();var Cl=["aria-label","aria-labelledby","aria-description","aria-describedby","aria-invalid","aria-errormessage"],El=new Set(Cl),yp=Symbol("readDelegatedAria"),wp=Symbol("writeDelegatedAria"),ka=t=>String(t).padStart(2,"0"),gp=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-꓏가-힣豈-﫿︐-﹯!-⦆¢-₩]/u.test(n)?2:1),0),Ix=(t,e)=>e==="pm"?t%12+12:t%12,vp=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},xp=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("slot");e.className="label",e.part.add("label"),e.name="label";let n=document.createElement("div");n.className="field",n.part.add("field");let r=document.createElement("slot");r.name="leading",r.part.add("leading");let a=document.createElement("div");a.className="segments",a.part.add("segments"),a.setAttribute("role","group");let o=document.createElement("slot");o.name="clear",o.part.add("clear");let i=document.createElement("slot");i.name="trailing",i.part.add("trailing"),n.append(r,a,o,i);let s=document.createElement("slot");return s.className="hint",s.part.add("hint"),s.name="hint",t.content.append(e,n,document.createElement("slot"),s),t})(),Ea=class extends V{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","readonly","min","max","required",...Cl];#e;#t;#n;#a;#r;#o;#l;#s;#d=!1;#i=!1;#c=!1;#p=new Map;#b=new Set;#f=!1;#u="";#h=null;#x=null;#m=null;#g=[];#w=[];#y;#O=!1;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(!xp)throw new Error("a-input-time requires a DOM document");e.append(xp.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#g[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#me),this.#a=e.querySelector(".hint"),this.#a.addEventListener("slotchange",this.#de),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#o=e.querySelector("slot[name=trailing]"),this.#l=ti(this,this.#o,"a-input-time-trailing",n=>{this.#e?.states?.[n?"add":"delete"]("trailing-actions")}),this.#o.addEventListener("slotchange",this.#l.sync),this.#t.addEventListener("mousedown",this.#E),this.#t.addEventListener("mouseup",this.#P),this.#r.addEventListener("input",this.#Z),this.#r.addEventListener("keydown",this.#W),this.#r.addEventListener("focusin",this.#M),this.#r.addEventListener("focusout",this.#V),this.#r.addEventListener("paste",this.#q),this.addEventListener(vn,n=>{!ei(this,n)||this.#J||this.hasAttribute("readonly")||this.dispatchEvent(new CustomEvent(Jo,{bubbles:!0,cancelable:!0}))&&this.clear()})}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(this.#s?.(),this.#s=ni(this.doc,this.#j),Object.prototype.hasOwnProperty.call(this,"name")){let e=this.name;delete this.name,this.name=e}if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#v(e)}else!this.#d&&!this.#c&&this.#v(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#d?(this.#te(),this.#se()):(this.#B(),this.#d=!0),this.#l.sync()}disconnectedCallback(){this.#l.disconnect(),this.#s?.(),this.#s=void 0,this.#y=void 0,this.#e?.states?.delete("kb-focus")}#v(e){this.#G(e),this.#u=this.value}attributeChangedCallback(e,n,r){if(El.has(e)){if(this.#b.has(e))return;this.#D(e,r);return}if(this.#d){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#B();return}if(e==="status"){this.#ue(),this.#ce();return}if(e==="disabled"||e==="readonly"){this.#ne(),this.#j();return}if(e==="min"||e==="max"){this.#ce();return}if(e==="required"){this.#le(),this.#ce();return}}}}#D(e,n){n==null?this.#p.delete(e):this.#p.set(e,n),this.hasAttribute(e)&&(this.#b.add(e),super.removeAttribute(e),this.#b.delete(e)),this.#k(e),this.#S()}removeAttribute(e){if(El.has(e)&&!this.#b.has(e)&&!this.hasAttribute(e)){let n=e;this.#p.delete(n)&&(this.#k(n),this.#S());return}super.removeAttribute(e)}toggleAttribute(e,n){if(El.has(e)){let r=e,a=n??!this.#p.has(r);return this.#D(r,a?"":null),a}return super.toggleAttribute(e,n)}[yp](e){return this.#p.get(e)??null}[wp](e,n){this.#D(e,n==null?null:String(n))}#k(e){let n=this.#p.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#g)Wn(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#ue();return}Wn(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#te(),(e==="aria-description"||e==="aria-describedby")&&this.#se()}#S(){this.#f||(this.#f=!0,queueMicrotask(()=>{this.#f=!1;for(let e of this.#p.keys())this.#k(e)}))}get#_(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#C(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#_,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#B(){let e=this.#C,n=this.#_,r=this.#u,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=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=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#L=o,this.#A=i,this.#r.replaceChildren(),this.#g=[],this.#w=[];for(let s of a)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=this.doc.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,gp(this.#L),gp(this.#A));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.#r.append(l),this.#g.push(d)}else{if(!s.value.trim())continue;let l=this.doc.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#r.append(l),this.#w.push(s.value)}this.#G(r);for(let s of this.#p.keys())this.#k(s);this.#S(),this.#te(),this.#se(),this.#le(),this.#ue(),this.#ne(),this.#z({dispatch:!1})}#L="AM";#A="PM";#F(e){return this.#g.find(n=>n.el===e)}#E=e=>{if(e.button!==0)return;let n=this.#F(e.target);if(n){this.#y=this.shadowRoot?.activeElement===n.el?void 0:n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#ee(this.#g[0]))};#P=()=>{this.#y=void 0};#M=e=>{let n=this.#F(e.target);if(!n)return;this.#j();let r=this.#y===n.el;this.#y=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#V=e=>{this.#y===e.target&&this.#P(),queueMicrotask(()=>{this.#j();let n=this.shadowRoot?.activeElement;if(this.isConnected&&this.#g.some(a=>a.el===n))return;let r=this.hasAttribute("readonly");r&&!this.#O||(!r&&this.#oe()&&this.#z(),this.#H("change"))})};#W=e=>{if(this.#P(),je(e))return;let n=this.#F(e.target);if(!n)return;let{el:r}=n,a=e.key;if(!((this.#J||this.hasAttribute("readonly"))&&["ArrowUp","ArrowDown","PageUp","PageDown"].includes(a))){if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#T(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#T(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#U(),this.#X(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#X(n,-1);return}n.kind!=="period"&&this.#w.some(o=>o.includes(a))&&(e.preventDefault(),this.#U(),this.#X(n,1,{numeric:!0}))}};#q=e=>{if(this.#J||this.hasAttribute("readonly"))return;let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#G(n),this.#z(),this.#H("change"))};#Z=e=>{let n=this.#F(e.target);!n||this.#J||this.hasAttribute("readonly")||e.isComposing||(this.#O=!0,n.kind==="period"?this.#Q(e,n):this.#$(n))};#$(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#C,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#h=null:this.#x=null,this.#z({dispatch:!1,preserve:n});return}let i=r.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;a?s===0&&i.length===1?this.#h=null:s===0?(this.#h=12,this.#m="am"):s>12?(this.#h=s-12,this.#m="pm"):(this.#h=s,this.#m==null&&(this.#m="am")):this.#N(e,Math.max(e.min,s)),this.#z({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#X(e,1)}#Q(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#m=null,this.#z({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#L.toLowerCase(),s=this.#A.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#m=l,this.#z({dispatch:!1}),this.#X(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#m=null,this.#z({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#m==="pm"?this.#A:this.#m==="am"?this.#L:""}#T(e,n){if(this.#O=!0,e.kind==="period"){this.#m=this.#m==null?"am":this.#m==="am"?"pm":"am",this.#oe(),this.#z();return}let r=e.kind==="hour"?this.#h:this.#x,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#N(e,o),this.#oe(),this.#z()}#N(e,n){e.kind==="hour"?this.#h=n:this.#x=n,e.kind==="hour"&&this.#C&&this.#m==null&&(this.#m="am")}#R(e){let n=vp(e);return n?n.h*60+n.min:null}get#I(){return this.#R(this.getAttribute("min"))}get#Y(){return this.#R(this.getAttribute("max"))}#ae(){let e=this.#K;return e==null||this.#x==null?null:e*60+this.#x}#oe(){let e=this.#ae();if(e==null)return!1;let n=this.#I,r=this.#Y,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#G(`${ka(Math.floor(a/60))}:${ka(a%60)}`),!0)}#ee(e){e&&(e.el.focus(),e.el.select())}#X(e,n,r={}){let a=this.#g.indexOf(e);for(let o=a+n;o>=0&&o<this.#g.length;o+=n){let i=this.#g[o];if(!r.numeric||i.kind!=="period"){this.#ee(i);return}}}get#K(){return this.#h==null?null:this.#C?this.#m==null?null:Ix(this.#h,this.#m):this.#h}#z({dispatch:e=!0,preserve:n}={}){this.#U(n),this.#u=this.value,this.#e?.setFormValue(this.value),this.#he(),this.#ce(),e&&this.#H("input")}#U(e){for(let n of this.#g)this.#ie(n,e===n.el)}#ie(e,n){let r=e.el;if(e.kind==="period"){let o=this.#m==="pm"?this.#A:this.#m==="am"?this.#L:"";n||(r.value=o),r.placeholder=this.#L;return}let a=e.kind==="hour"?this.#h:this.#x;n||(r.value=a==null?"":ka(a)),r.placeholder="\u2013\u2013"}#G(e){let n=vp(e);if(!n){this.#h=null,this.#x=null,this.#m=null;return}this.#x=n.min,this.#C?(this.#h=(n.h+11)%12+1,this.#m=n.h<12?"am":"pm"):(this.#h=n.h,this.#m=null)}#H(e){e==="change"&&(this.#O=!1),this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#te(){if(!this.#p.has("aria-labelledby")){if(this.#p.has("aria-label")){this.#r.ariaLabelledByElements=[];return}this.#r.ariaLabelledByElements=this.#n.assignedElements()}}#me=()=>{this.#te()};#se(){if(!this.#p.has("aria-describedby")){if(this.#p.has("aria-description")){this.#r.ariaDescribedByElements=[];return}this.#r.ariaDescribedByElements=this.#a.assignedElements()}}#de=()=>{this.#se()};get#J(){return this.hasAttribute("disabled")||this.#i}#j=()=>{let e=this.doc[Kt],n=this.isConnected&&!this.#J&&this.#g.some(a=>a.el===this.shadowRoot?.activeElement);e&&(n&&this.hasAttribute("readonly")?e.active=this.#j:e.active===this.#j&&(e.active=void 0));let r=e?.keyboard;this.#e?.states?.[r&&n?"add":"delete"]("kb-focus")};#ne(){for(let e of this.#g)e.el.disabled=this.#J,e.el.readOnly=this.hasAttribute("readonly")}#ue(){let e=this.getAttribute("status")==="critical",n=this.#p.get("aria-invalid");for(let r of this.#g)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#le(){let e=this.hasAttribute("required");for(let n of this.#g)n.el.setAttribute("aria-required",e?"true":"false")}#he(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#ce(){if(!this.#e)return;let e=this.#g[0]?.el??this,n=this.hasAttribute("required"),r=this.#ae(),a=this.#I,o=this.#Y;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>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.#K;return e==null||this.#x==null?"":`${ka(e)}:${ka(this.#x)}`}set value(e){this.#c=!0;let n=e??"";n!==this.value&&(this.#G(n),this.#d?this.#z({dispatch:!1}):this.#u=this.value)}clear(){this.#h=null,this.#x=null,this.#m=null,this.#z(),this.#H("change"),this.dispatchEvent(new CustomEvent(Qo,{bubbles:!0})),this.#g[0]?.el.focus()}focus(e){this.#g[0]?.el.focus(e)}get name(){return this.getAttribute("name")??""}set name(e){e==null?this.removeAttribute("name"):this.getAttribute("name")!==String(e)&&this.setAttribute("name",String(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.#G(this.getAttribute("defaultvalue")??""),this.#z(),this.#H("change")}formDisabledCallback(e){this.#i=e,this.#ne(),this.#j()}formStateRestoreCallback(e){this.value=e??""}};for(let t of Cl)Object.defineProperty(Ea.prototype,oi(t),{configurable:!0,enumerable:!0,get(){return this[yp](t)},set(e){this[wp](t,e)}});function kp(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",Ea)}kp();var Al=globalThis.Temporal;var Ep=(t,e)=>`Non-positive ${t}: ${e}`,Cp=(t,e)=>`Non-finite ${t}: ${e}`,Ap=t=>`Cannot convert bigint to ${t}`,Tp="Invalid object",Ca=(t,e,n,r)=>$n(t,e)+`; must be between ${n}-${r}`,$n=(t,e)=>`Invalid ${t}: ${e}`;var Tl=1e3,Sl=1e6,Ml=1e9,Il=6e10,Dl=36e11;function mt(t){return t===void 0?Object.create(null):xn(t)}function ui(t,e="number"){if(typeof t=="bigint")throw new TypeError(Ap(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Cp(e,t));return t}function Ce(t,e){return Math.trunc(ui(t,e))||0}function hi(t,e){return Sp(Ce(t,e),e)}function Sp(t,e="number"){if(t<=0)throw new RangeError(Ep(e,t));return t}function Pl(t,e,n){return Math.min(Math.max(t,e),n)}function Kn(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xn(t){if(!Kn(t))throw new TypeError(Tp);return t}function mi(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):xn(t)}var Gt="smallestUnit",Lx={constrain:0,reject:1},Bx={compatible:0,reject:1,earlier:2,later:3},Nx={reject:0,use:1,prefer:2,ignore:3},Rx={auto:0,never:1,critical:2,always:3},_x={auto:0,never:1,critical:2},Fx={auto:0,never:1},Vx={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Mp=[Math.floor,Yp,Math.ceil,Wp,Math.trunc,Zp,qp,Up,$p],Hx={previous:-1,next:1};function Ol(t){let e=t.roundingIncrement;return e===void 0?1:Ce(e,"roundingIncrement")}function zl(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Sa(e)==="auto")return;_(Ta("fractionalSecondDigits",e))}e=St("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function Ll(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=Sa(a),a==="auto")return r?n:null;let o=pi[a];return o===void 0&&(o=be.indexOf(a)),o<0&&_(Fl(t,a,pi)),o}function yn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=Sa(a),i=e[o];return i===void 0&&_(Fl(t,o,e)),i}var Er=Ne(Ll,Gt),Ip=Ne(Ll,"largestUnit"),jx=Ne(Ll,"unit"),Dp=Ne(yn,"overflow",Lx),Pp=Ne(yn,"disambiguation",Bx),qx=Ne(yn,"offset",Nx),Bl=Ne(yn,"calendarName",Rx),Ux=Ne(yn,"timeZoneName",_x),Yx=Ne(yn,"offset",Fx),Cr=Ne(yn,"roundingMode",Vx),Wx=Ne(yn,"direction",Hx);function Nl(t,e,n,r){let a=r?Rt:ft[e+1];if(a){let o=ft[e];a%((t=St("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&_(Ta("roundingIncrement",t))}else t=St("roundingIncrement",t,1,n?10**9:1,1);return t}function kr(t,e,n,r){return e!=null&&St(t,e,n,r,1,bi),e}function Op(t,e){e>t&&_(jp)}function Gn(t,e,n,r=9,a=0,o=4){e=mt(e);let i=Ip(e,a),s=Ol(e),l=Cr(e,o),c=Er(e,a,1);return i=kr("largestUnit",i,a,r),c=kr(Gt,c,a,r),i==null?i=Math.max(n,c):Op(i,c),s=Nl(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function zp(t,e,n){t=mi(t,Gt);let r=Ip(t),a=n(t.relativeTo),o=Ol(t),i=Cr(t,7),s=Er(t);return r===void 0&&s===void 0&&_(Hp),s==null&&(s=0),r==null&&(r=Math.max(s,e)),Op(r,s),o=Nl(o,s,1),o>1&&s>5&&r!==s&&_("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[r,s,o,i,a]}function Aa(t,e=6,n){let r=Ol(t=mi(t,Gt)),a=Cr(t,7),o=Er(t);return o=Vl(Gt,o),o=kr(Gt,o,0,e),r=Nl(r,o,void 0,n),[o,r,a]}function Lp(t,e){let n=e((t=mi(t,"unit")).relativeTo),r=jx(t);return r=Vl("unit",r),[r,n]}function G(t){return t===void 0?0:Dp(xn(t))}function wn(t,e=0){t=mt(t);let n=Pp(t),r=qx(t,e);return[Dp(t),r,n]}function Bp(t){return Pp(mt(t))}function Np(t,e=4){let n=zl(t),r=Cr(t,4),a=Er(t);return[r,..._l(kr(Gt,a,0,e),n)]}function Rp(t){return t=mt(t),[Bl(t),...Np(t)]}function fi(t){return Bl(mt(t))}function Rl(t,e){return Np(mt(t),e)}function _p(t){t=mt(t);let e=Bl(t),n=zl(t),r=Yx(t),a=Cr(t,4),o=Er(t);return[e,Ux(t),r,a,..._l(kr(Gt,o,0,4),n)]}function Fp(t){let e=zl(t=mt(t)),n=Cr(t,4),r=Er(t);return[t.timeZone,n,..._l(kr(Gt,r,0,4),e)]}function _l(t,e){return t!=null?[ft[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function Vp(t){let e=mi(t,"direction"),n=Wx(e,0);return n||_(Ta("direction",n)),n}var Ta=$n;var Oa=t=>`Missing ${t}`,am=t=>"No valid fields: "+t.join(),om="Invalid bag",Fl=(t,e,n)=>$n(t,e)+"; must be "+Object.keys(n).join(),im="Cannot use valueOf",sm="Invalid calling context",ec=t=>"Missing year"+(t?"/era/eraYear":""),Jn="Invalid leap month",lm=t=>$n("Calendar",t),cm=(t,e)=>`Unknown calendar ${t}; might need ${e}`,tc=t=>$n("TimeZone",t),kn="Out-of-bounds date";var Hp="Required smallestUnit or largestUnit",jp="smallestUnit > largestUnit",dm=t=>`Cannot parse: ${t}`,Xt=t=>`Invalid substring: ${t}`;var nc=Pl,Ge=Kn;function _(t){throw new RangeError(t)}function le(t){throw new TypeError(t)}function Yl(t,e,n,r,a){return St(e,((o,i)=>{let s=o[i];return s===void 0&&le(Oa(i)),s})(t,e),n,r,a)}function St(t,e,n,r,a,o){let i=nc(e,n,r);return a&&e!==i&&_(((s,l,c,d,u)=>u?Ca(s,u[l],u[c],u[d]):Ca(s,l,c,d))(t,e,n,r,o)),i}function Tr(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var um=t=>Ai({name:t},1),Ai=(t,e)=>An(n=>({value:n,configurable:1,writable:!e}),t),za=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function An(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function La(t,e){let n={};for(let r of t)n[r]=e;return n}function rc(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function Ft(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function hm(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function Zx(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function Ne(t,...e){return(...n)=>t(...e,...n)}function ac(){}function Kp(t){return t[0].toUpperCase()+t.substring(1)}function Ie(...t){return[].concat(...t).sort()}function Ir(t){return new RegExp(`^${t}$`,"i")}function oc(t){return parseInt(t.padEnd(9,"0"))}function ic(t){return t&&t!=="+"?-1:1}function Ar(t){return t===void 0?0:parseInt(t)}function vi(t,e){return String(e).padStart(t,"0")}var Mt=Ne(vi,2);function Jt(t,e){return Math.sign(t-e)}function nt(t,e){return t<e?-1:t>e?1:0}function pm(t,e){let n=t/e;return t%e<0n?n-1n:n}function sc(t,e){let n=pm(t,e);return[n,t-n*e]}function _t(t,e){return[Math.floor(t/e),Ti(t,e)]}function Ti(t,e){return(t%e+e)%e}function Dr(t,e){return Math.trunc(t/e)||0}function lc(t,e){return t%e||0}function qp(t){return t<0?Math.floor(t):Math.ceil(t)}function mm(t,e=1){return e*(.5+t/5)}function Up(t){return Math.sign(t)*Math.round(Math.abs(t))||0}function Yp(t){return Si(t)?Math.floor(t):Math.round(t)}function Wp(t){return Si(t)?Math.ceil(t):Math.round(t)}function Zp(t){return Si(t)?Math.trunc(t)||0:Math.round(t)}function $p(t){return Si(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)}function Si(t){return Math.abs(t%1)===.5}var cc="iso8601",fm="gregory",$x={bce:-1,ce:0};function bm(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 rt=void 0,gm=0;function Dt(t){return t===rt?"iso8601":t===0?"gregory":t.id}var Kx=/^M(\d{2})(L?)$/;function vm(t){let e=Kx.exec(t);return e||_((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function xm(t,e){return"M"+Mt(t)+(e?"L":"")}function Wl(t,e,n){return t+(e||n&&t>=n?1:0)}var pi={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},bi=Object.keys(pi);var Ba=Tl,Na=Sl,Tn=Ml,Ra=Il,_a=Dl,Rt=864e11,ft=[1,Ba,Na,Tn,Ra,_a,Rt],Gx=BigInt(Ba),Pr=BigInt(Na),Qn=BigInt(Tn),Xx=BigInt(Ra),Jx=BigInt(_a),ge=BigInt(Rt);function ym(t,e){let n=Number(t/ge),r=Number(t%ge);return n*(Rt/e)+(Math.trunc(r/e)+r%e/e)}var qe=bi.slice(0,6),Fa=rc(qe),Mi=["year"],tr=["day"],dc=["day","month","year"],Ii=["offset"],uc=["timeZone"],Or=["era","eraYear"],Qx=["era","eraYear","year"],wm=["month","monthCode"],e0=["day","month","monthCode"],Zl=Ie(qe),t0=Ie(Or,Mi),Va=Ie(wm,Mi),km=Ie(Or,Va),Ha=Ie(["monthCode"],Mi),Em=Ie(Or,Ha),Cm=Ie(tr,["monthCode"]),nr=Ie(tr,Va),rr=Ie(tr,Or,Va),Am=Ie(nr,qe),Tm=Ie(rr,qe),n0=Ie(nr,qe,Ii),r0=Ie(rr,qe,Ii),Sm=Ie(nr,qe,Ii,uc),Mm=Ie(rr,qe,Ii,uc),a0=Ie(tr,Ha),o0=Ie(tr,Or,Ha),Pt=La(qe,0);function ja(t){return Di(t,1),t}var i0={hour:23,minute:59,second:59};function Di(t,e){let n={};for(let r of qe)n[r]=St(r,t[r],0,i0[r]||999,e);return n}function at(t){return pc(t)*Tn+Im(t)}function hc(t){return 1e3*pc(t)+t.millisecond}function pc(t){return 3600*t.hour+60*t.minute+t.second}function Im(t){return t.millisecond*Na+t.microsecond*Ba+t.nanosecond}function mc(t){let[e,n]=_t(t,Rt);return[Dm(n),e]}function Dm(t){let[e,n]=_t(t,Na),[r,a]=_t(n,Ba);return s0(e,r,a)}function s0(t,e=0,n=0){let[r,a]=_t(t,36e5),[o,i]=_t(a,6e4),[s,l]=_t(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Gp(t){let[e,n]=sc(t,Qn);return[Number(e),Number(n)]}function qa(t){return Number(pm(t,Pr))}function Re(t){return Qt(t)+BigInt(at(t))}function Pm(t){return Ua(t)+hc(t)}function Qt(t){return BigInt(Vt(t))*ge}function Ua(t){return 864e5*Vt(t)}function Vt(t){return Ma(t.year,t.month,t.day)}function Ma(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=Ti(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(Dr(t,400)+1)+n}function Ya(t){let[e,n]=sc(t,ge);return{...Om(Number(e)),...Dm(Number(n))}}function Om(t){let e=new Date(864e5*Ti(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var zm=1972;function l0(t){return[t,0]}function $l(t,e){if(!e)return{year:1972,month:t}}function c0(t,e,n){return{year:t,month:e,day:n}}function Lm(t,e){switch(e){case 2:return Pi(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function d0(t){return Pi(t)?366:365}function Pi(t){return t%4==0&&(t%100!=0||t%400==0)}function u0(t,e,n){return t+=Dr(n,12),(e+=lc(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function h0(t,e,n,r){return 12*(n-t)+r-e}function Oi(t){return Ti(Ma(t.year,t.month,t.day)+4,7)||7}function Bm(t){return Ma(t.year,t.month,t.day)-Ma(t.year)+1}function Nm(t){let e=t.year,n=Math.floor((Bm(t)-Oi(t)+10)/7),r=Hl(e);return n<1?n=r=Hl(--e):n>r&&(n=1,r=Hl(++e)),{weekOfYear:n,yearOfWeek:e,De:r}}function Hl(t){let e=Oi({year:t,month:1,day:1});return e===4||e===3&&Pi(t)?53:52}function p0({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Wa(t){return tn(t),ja(t)}function tn(t){return Rm(t,1),t}function Xp(t){return hm(dc,t,Rm(t))}function Rm(t,e){let{year:n}=t,r=Yl(t,"month",1,12,e);return{year:n,month:r,day:Yl(t,"day",1,Lm(n,r),e)}}function ue(t,e){return t?t.de(e):e}function er(t,e,n){return t?t.N(e,n):l0(n)}function Za(t,e){return t===0?p0(e):t&&t.h?.(e)||{}}function ar(t,e,n,r){return t?t.fe(e,n,r):c0(e,n,r)}function Ia(t,e){return t?t.j(e):12}function Da(t,e,n){return t?t.o(e,n):Lm(e,n)}function zi(t,e){let{year:n,month:r}=ue(t,e),[a,o]=er(t,n,r);return xm(a,o)}function fc(t,e){let{year:n}=ue(t,e);return t?t.q(n):Pi(n)}function bc(t,e){let{year:n}=ue(t,e);return Ia(t,n)}function gc(t,e){let{year:n,month:r}=ue(t,e);return Da(t,n,r)}function vc(t,e){let{year:n}=ue(t,e);return t?t.i(n):d0(n)}function _m(t,e){if(!t)return Bm(e);let{year:n}=ue(t,e),r=ar(t,n,1,1);return Vt(e)-Vt(r)+1}function Fm(t,e){return t===rt?Nm(e).weekOfYear:void 0}function Vm(t,e){return t===rt?Nm(e).yearOfWeek:void 0}var be=bi.map(t=>t+"s"),xc=rc(be),Hm=Ie(be),m0=be.slice(0,6),jm=be.slice(6),f0=jm.slice(1),Se=La(be,0),yc=La(m0,0),wc=Ne(Zx,be);function Vl(t,e){return e==null&&_(Oa(t)),e}var _e=Ne(b0,"string");function b0(t,e,n=t){return typeof e!==t&&le(Ta(n,e)),e}function kc(t,e="number"){return Number.isInteger(t)||_(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Sa(t){return typeof t=="symbol"&&le("Cannot convert Symbol to string"),String(t)}function Ec(t){if(!Kn(t))return t;let e=t[Symbol.toPrimitive];if(e!=null){typeof e!="function"&&le();let n=Reflect.apply(e,t,["string"]);return Kn(n)&&le(),n}return Date.prototype[Symbol.toPrimitive].call(t,"string")}function Li(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&le(`Invalid bigint: ${t}`),t)}function $a(t,e){return kc(ui(t,e),e)}function ve(t,e){return Ft(dc,t,Ft(qe,e))}var Cc=BigInt(1e8)*ge,Ac=BigInt(-1e8)*ge,qm=Ac-ge,Um=-3261848;function Bi(t){let e=12*t.year+t.month;return(e<Um||e>3309129)&&_(kn),t}function ot(t,e=1){let n=Qt(t);return(n<(e?qm:Ac)||n>Cc)&&_(kn),t}function or(t){return g0(Re(t)),t}function g0(t){return(t<=qm||t>=Cc+ge)&&_(kn),t}function zt(t){return(t<Ac||t>Cc)&&_(kn),t}function Tc(t,e){return zt(Qt(t)+BigInt(at(t)-e))}function Sr(t,e,n){return Sc(t/e,n)*e}function Sc(t,e){return Mp[e](t)}function v0(t,e,n,r){let a=Mc(t,e,r,n);return Ym(a,Number(n-a.I)/Number(a.O-a.I))}function x0(t,e,n,r){return Sr(Ym(t,Wm(e,t.I,t.O)),n,r)}function Mc(t,e,n,r){let a=Jp(t,e,n);return((o,i,s,l)=>l>0?i<=o&&o<=s:s<=o&&o<=i)(r,a.I,a.O,Math.sign(e))||(a=Jp(t+e,e,n)),a}function Jp(t,e,n){let r=t+e;return{ve:t,qe:r,I:n(t),O:n(r)}}function Ym(t,e){return t.ve+e*(t.qe-t.ve)}function Wm(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=nt(a,0n)===nt(r,0n)?1:-1;return nt(o,i)<=0?o===i?s:mm(nt(2n*o,i),s):Number(a)/Number(r)}function bt(t){return{epochNanoseconds:t}}function gt(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Ht(t,e){return Ft(qe,t,he(t,e))}function he(t,e){return Ft(dc,t,{calendar:e})}function ir(t){return Ft(qe,t)}function Ot(t){return Ft(be,t,{sign:to(t)})}function Zm(t,e,n,r){return gt(e===6?w0(t,r):k0(t,e,n,r),t.timeZone,t.calendar)}function $m(t){let[e,n]=Gm(t);return ym(n-e,_a)}function Km(t){let{timeZone:e,calendar:n}=t;return gt(Mr(e,ve(Me(t),Pt)),e,n)}function Ni(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=to(t)||1,c=wi(r,s)?s&&r<6&&n>=6?C0:A0:E0,[d,u,h]=c(l,t,e,n,r,a,o,i);return h&&r!==7&&(d=((p,f,b,x,g,y)=>{for(let k=x+1;k<=b;k++){if(k===7&&b!==7)continue;let D=wc(k,p);D[be[k]]+=g;let L=nt(f,qi(y,D));if(L&&L!==g)break;p=D}return p})(d,u,n,Math.max(6,r),l,i)),d}function y0(t,e,n){let r=Math.min(Cn(t),6);return En(Fi(en(t),BigInt(e),n),r)}function w0(t,e){let[n,r]=Gm(t);return T0(t.epochNanoseconds,n,r,e)}function k0(t,e,n,r){if(e===0&&n===1)return t.epochNanoseconds;let a=Me(t);return Lr(t.timeZone,Ri(a,zr(e,n),r),a.offsetNanoseconds,2,0,1)}function Ri(t,e,n){let[r,a]=_i(t,e,n),o=ve(Nr(t,a),r);return or(o),o}function _i(t,e,n){return mc(Sr(at(t),e,n))}function E0(t,e,n,r,a,o,i,s){let l=be[a],c=wc(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=Dr(e[l],o)*o,u=Mc(d,o*t,p=>(c[l]=p,qi(s,c)),n),h=x0(u,n,o,i);return c[l]=h,[c,h===u.qe?u.O:u.I,h!==d]}function C0(t,e,n,r,a,o,i,s){let l=Number(Rr(e)),c=zr(a,o),d=Sr(l,c,i),u={...e,...yc},h=Mc(u.days,t,y=>(u.days=y,qi(s,u)),n),p=h.I,f=h.O,b=d-Number(f-p),x=0;b&&Math.sign(b)!==t?n=p+BigInt(d):(x+=t,d=Sr(b,c,i),n=f+BigInt(d));let g=Ui(d);return[{...e,...g,days:e.days+x},n,!!x]}function A0(t,e,n,r,a,o,i){let s=en(e),l=Fi(s,Ka(a,o),i),c=l-s,d=Math.sign(Number(l/ge)-Number(s/ge))===t,u=En(l,Math.min(r,6));return[{...e,...u},n+c,d]}function Gm(t){let{timeZone:e}=t,n=ve(Me(t),Pt),r=ve(Nr(n,1),Pt);return[Mr(e,n),Mr(e,r)]}function T0(t,e,n,r){return Sc(Wm(t<n?t:n-1n,e,n),r)?n:e}function xi(t){return Sr(t,Ra,7)}function Fi(t,e,n){return Xm(t,e,n,t/e%2n)}function Vi(t,e,n){let[r,a]=sc(t,ge),o=r*ge;return o+Xm(a,e,n,(o/e+a/e)%2n)}function Xm(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=mm(nt(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=Sc(Number(r)+i,n);return(a-r+BigInt(s))*e}function zr(t,e){return ft[t]*e}function Ka(t,e){return BigInt(ft[t])*BigInt(e)}var Me=Tr(S0,WeakMap);function S0(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...Ya(e+BigInt(r)),offsetNanoseconds:r}}function Lr(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return Tc(e,n);r!==2&&r!==0||ot(e,0);let s=t.R(e);if(n!==void 0&&r!==3){let l=((c,d,u,h)=>{let p=Re(d);h&&(u=xi(u));for(let f of c){let b=Number(p-f);if(h&&(b=xi(b)),b===u)return f}})(s,e,n,o);if(l!==void 0)return l;r===0&&_("Invalid TimeZone offset")}return i?Re(e):Br(t,e,a,s)}function Br(t,e,n=0,r=t.R(e)){if(r.length===1)return r[0];if(n===1&&_("Ambiguous offset"),r.length)return r[n===3?1:0];let a=Re(e),o=((s,l)=>{let c=s.B(l-ge);return(d=>(d>Rt&&_("Out-of-bounds TimeZone gap"),d))(s.B(l+ge)-c)})(t,a),i=Ya(a+BigInt(o*(n===2?-1:1)));return(r=t.R(i))[n===2?0:r.length-1]}function Mr(t,e){let n=t.R(e);if(n.length)return n[0];let r=Re(e)-ge;return t.C(r,1)}function Ic(t,e,n,r=0){to(n)&&Cn(n)<8&&_("Cannot use small units");let a=ot(Pa(t,e));return Pa(t,nn(t,a,n,r))}function Ga(t,e,n=0){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=Rr(e),s=a;if(_c(e)){let l=Me(t);s=Br(o,ve(nn(r,l,{...e,...yc},n),l))+i}else s+=i;return{...t,epochNanoseconds:zt(s)}}function Xa(t,e,n,r=0){let[a,o]=Hi(e,n);return or(ve(nn(t,e,{...n,...yc,days:n.days+o},r),a))}function Hi(t,e){return M0(t,Rr(e))}function Dc(t,e){return I0(t,(_c(n=e)&&_("Cannot use large units"),Rr(n)));var n}function nn(t,e,n,r=0){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(Rr(n)/ge),a||o)l=yi(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=Nr(l,7*i+s)),ot(l)}function Pa(t,e){return Nr(e,1-ue(t,e).day)}function yi(t,e,n,r,a){let o=ue(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=er(t,i,s);i+=n,s=Kl(t,c,d,t?t.p(i):void 0,a),s=St("month",s,1,Ia(t,i),a)}return r&&({year:i,month:s}=Jm(t,i,s,r)),l=St("day",l,1,Da(t,i,s),a),ar(t,i,s,l)}function Jm(t,e,n,r){return t?t.ae(e,n,r):u0(e,n,r)}function Kl(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&_(Jn),o<0?-o:e)}return Wl(e,0,r)}function M0(t,e){let n=Number(e/ge),r=Number(e%ge),[a,o]=mc(at(t)+r);return[a,n+o]}function I0(t,e){return zt(t+e)}function Nr(t,e){return e?Om(Vt(t)+e):t}function Ja(t,e){return Dt(t)!==Dt(e)&&_("Mismatching Calendars"),t}function Qm(t,e){return t.m!==e.m&&_("Mismatching TimeZones"),t}function ef(t){return t.timeZone.id}function tf(t,e,n,r,a,o,i){return r<6?Qa(e.epochNanoseconds,n.epochNanoseconds,r,a,o,i):((s,l,c,d,u,h,p)=>{let f=c.epochNanoseconds;if(f===l.epochNanoseconds)return Se;let b,x=Qm(l.timeZone,c.timeZone);return b=Pc(x,s,l,c,d),b=Ni(b,f,d,u,h,p,zc(s,x,l),1),b})(t,e,n,r,a,o,i)}function nf(t,e,n,r,a,o,i){return r<=6?Qa(Re(e),Re(n),r,a,o,i):((s,l,c,d,u,h,p)=>{let f=Re(c),b=nt(f,Re(l));if(!b)return Se;let x;return x=cf(s,l,c,b,d),x=Ni(x,f,d,u,h,p,((g,y)=>({ne:Re(y),ke:k=>Re(ve(nn(g,y,k),y))}))(s,l)),x})(t,e,n,r,a,o,i)}function rf(t,e,n,r,a,o,i){let s=Pa(t,e),l=Pa(t,n);return Oc(s,l)?sf(t,ot(s),ot(l),r,a,o,i,8):Se}function af(t,e,n,r,a,o,i,s=6){return r===6?Qa(Qt(e),Qt(n),r,a,o,i):sf(t,e,n,r,a,o,i,s)}function of(t,e,n,r,a,o){let i=Sr(at(e)-at(t),zr(r,a),o);return{...Se,...Ui(i,n)}}function sf(t,e,n,r,a,o,i,s=6){let l=Qt(n);if(!Oc(e,n))return Se;let c;return c=ji(t,e,n,r),a===s&&o===1||(c=Ni(c,l,r,a,o,i,Lc(t,e))),c}function Qa(t,e,n,r,a,o){return{...Se,...En(Fi(e-t,Ka(r,a),o),n)}}function Pc(t,e,n,r,a){return a<6?{...Se,...En(r.epochNanoseconds-n.epochNanoseconds,a)}:((o,i,s)=>{let l=nt(s.epochNanoseconds,i.epochNanoseconds);if(!l)return Se;if(!Oc(Me(i),Me(s)))return{...Se,...En(s.epochNanoseconds-i.epochNanoseconds,5)};let[c,d,u]=D0(o,i,s,l);return{...(h=c,p=d,ji(e,h,p,a)),...Ui(u)};var h,p})(t,n,r)}function lf(t,e,n,r){let a=Re(e),o=Re(n),i=nt(o,a);return i?r<=6?{...Se,...En(o-a,r)}:cf(t,e,n,i,r):Se}function cf(t,e,n,r,a){let o=n,i=at(n)-at(e);return Math.sign(i)===-r&&(o=Nr(n,-r),i+=Rt*r),{...ji(t,e,o,a),...Ui(i)}}function D0(t,e,n,r){let a=Me(e),o=Me(n),i=n.epochNanoseconds,s=0,l=at(o)-at(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;;s++){let d=Nr(o,s*-r),u=Br(t,ve(d,a));if(s===c||nt(i,u)!==-r)return[a,d,Number(i-u)]}}function ji(t,e,n,r){if(r<=7)return((b,x,g)=>{let y=jl(x,g);return b?{...Se,weeks:Dr(y,7),days:lc(y,7)}:{...Se,days:y}})(r===7,e,n);let a=ue(t,e),o=ue(t,n);if(r===8){let{year:b,month:x,day:g}=a,{year:y,month:k,day:D}=o,L=Math.sign(Jt(y,b)||Jt(k,x)||jl(e,n)),R=0,B=0;if(L){R=t?t.ee(b,x,y,k):h0(b,x,y,k);let N=yi(t,e,0,R,0);L*Jt(g,D)>0&&(R-=L,N=yi(t,e,0,R,0)),B=jl(N,n)}return{...Se,months:R,days:B}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,h=c-i,p=d-s,f=u-l;if(h||p){let b=Math.sign(h||p),x=Da(t,c,d),g=0;if(Math.sign(u-l)===-b){let y=x;({year:c,month:d}=Jm(t,c,d,-b)),h=c-i,p=d-s,x=Da(t,c,d),g=b<0?-y:x}if(f=u-Math.min(l,x)+g,h){let[y,k]=er(t,i,s),[D,L]=er(t,c,d),R=t?t.l:void 0;if(p=R!==void 0&&k&&!L&&(R<0?b>0&&D===-R:b<0&&D===y)?0:D-y||Number(L)-Number(k),Math.sign(p)===-b){let B=b<0&&-Ia(t,c);c-=b,h=c-i,p=d-Kl(t,y,k,t?t.p(c):void 0,0)+(B||Ia(t,c))}else if(t){let B=Kl(t,y,k,t.p(c),0);p=t.ee(c,B,c,d)}}}return{...Se,years:h,months:p,days:f}}function Oc(t,e){return Jt(t.year,e.year)||Jt(t.month,e.month)||Jt(t.day,e.day)}function jl(t,e){return Vt(e)-Vt(t)}function df(t,e,n){return eo(t)?((r,a,o)=>{let{calendar:i,timeZone:s}=r,l=Ga(r,a);return[Pc(s,i,r,l,o),l.epochNanoseconds,zc(i,s,r)]})(t,e,n):((r,a,o)=>{let{calendar:i}=r,s=or(ve(r,Pt)),l=Xa(i,s,a);return[lf(i,s,l,o),Re(l),Lc(i,r)]})(t,e,n)}function Qp(t,e){return eo(t)?Ga(t,e).epochNanoseconds:Re(Xa(t.calendar,ve(t,Pt),e))}function qi(t,e){return _c(e)?t.ke(e):t.ne}function zc(t,e,n){let r=Me(n);return{ne:n.epochNanoseconds,ke:a=>Br(e,ve(nn(t,r,a),r))}}function Lc(t,e){return{ne:Qt(e),ke:n=>Qt(nn(t,e,n))}}function eo(t){return"timeZone"in t}function wi(t,e){return t<=6-(e?1:0)}function Bc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=ft[a];r[n[a]]=Dr(t,o),t=lc(t,o)}return r}var P0=2**53;function Nc(t,e,n){let r=Math.max(Cn(e),Cn(n));return r>6&&_("Cannot use large units"),((a,o,i,s)=>Ot(Sn(((l,c,d,u)=>{let h=en(l)+en(c)*BigInt(u?-1:1);return Number.isFinite(Number(h/ge))||_(kn),{...Se,...En(h,d)}})(o,i,s,a))))(t,e,n,r)}function uf(t,e,n){let r=Cn(e),[a,o,i,s,l]=zp(n,r,t);if(!l&&Math.max(r,a)<=6)return Ot(Sn(((p,f,b,x,g)=>{let y=Fi(en(p),Ka(b,x),g);return{...Se,...En(y,f)}})(e,a,o,i,s)));l||_("Missing relativeTo");let c=eo(l);if(!e.sign&&(!c||a<6))return e;let[d,u,h]=df(l,e,a);return Ot(Ni(d,u,a,o,i,s,h,c))}function hf(t){return t.sign===-1?Rc(t):t}function Rc(t){return Ot(vt(t))}function vt(t){let e={};for(let n of be)e[n]=-1*t[n]||0;return e}function to(t,e=be){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&_("Cannot mix duration signs"),n=a)}return n}function Sn(t){for(let n of f0)O0(n,t[n]);let e=en(t);return pf(Number(e/Qn)),t}function O0(t,e){return St(t,e,-4294967295,4294967295,1)}function pf(t){Number.isSafeInteger(t)||_("Out-of-bounds duration")}function en(t){return BigInt(t.days)*ge+Rr(t)}function Rr(t){return BigInt(t.hours)*Jx+BigInt(t.minutes)*Xx+mf(t)}function mf(t){return BigInt(t.seconds)*Qn+BigInt(t.milliseconds)*Pr+BigInt(t.microseconds)*Gx+BigInt(t.nanoseconds)}function En(t,e=6){let n=Number(t/ge),r=Number(t%ge),a=ft[e],o=e<=3?Number(t/BigInt(a)):n*(Rt/a)+Dr(r,a);Number.isFinite(o)||_(kn),e<=3&&Math.abs(o)/(Tn/ft[e])>=P0&&_(kn);let i=Bc(r,e,be);return i[be[e]]=o,i}function Ui(t,e=5){return Bc(t,e,be)}function _c(t){return!!to(t,jm)}function Cn(t){let e=9;for(;e>0&&!t[be[e]];e--);return e}function no(t,e){return nt(t.epochNanoseconds,e.epochNanoseconds)}function ff(t,e,n,r){let a=t(mt(r).relativeTo),o=Math.max(Cn(e),Cn(n));return hm(be,e,n)?0:wi(o,a&&eo(a))?nt(en(e),en(n)):(a||_("Missing relativeTo"),nt(Qp(a,e),Qp(a,n)))}function Fc(t,e){return sr(t,e)||Yi(t,e)}function sr(t,e){return Jt(Vt(t),Vt(e))}function Yi(t,e){return Jt(at(t),at(e))}function bf(t,e){return!no(t,e)}function gf(t,e){return!no(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function vf(t,e){return!Fc(t,e)&&t.calendar===e.calendar}function xf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function yf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function wf(t,e){return!sr(t,e)&&t.calendar===e.calendar}function kf(t,e){return!Yi(t,e)}function ro(t){return t===0?$x:t?t.k:void 0}function Ue(t,e,n=e){return ro(t)?n:e}function Ef(t,e){let n=e||void 0,r=ro(e),{era:a,eraYear:o,year:i}=t;if(i!==void 0&&(i=Ce(i,"year")),o!==void 0&&(o=Ce(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||le("Mismatching era/eraYear"),r||_("Forbidden era/eraYear");let s=bm(a),l=r[s];l===void 0&&_((d=>`Invalid era: ${d}`)(a));let c=n?._?n._(o,s,l):z0(o,l);i!==void 0&&i!==c&&_("Mismatching year/eraYear"),i=c}else i===void 0&&le(ec(r));return i}function ki(t,e,n,r,a){let{month:o,monthCode:i}=t;if(i!==void 0){let s=((l,c,d,u,h=vm(c))=>{let p=l?l.p(d):void 0,[f,b]=h,x=Wl(f,b,p);if(b){let g=l?l.l:void 0;g===void 0&&_(Jn),g>0?(x>g&&_(Jn),p!==x&&(u===1&&_(Jn),x=Wl(f,0,p))):(x!==-g&&_(Jn),p===void 0&&u===1&&_(Jn))}return x})(e,i,n,a,r);o!==void 0&&o!==s&&_("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&le("Missing month/monthCode");return St("month",o,1,Ia(e,n),a)}function Gl(t,e,n,r,a){return Yl(t,"day",1,Da(e,n,r),a)}function z0(t,e){return(e+t)*(Math.sign(e)||1)||0}function _r(t,e){return Di(Ft(qe,{...Pt,...t}),e)}var L0=Ir("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Wi(t){let e=Vc(t);return e===void 0&&_(dm(t)),e}function Vc(t,e){let n=L0.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.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))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&_(Xt(o)),s=(Ar(r[2])*_a+Ar(r[3])*Ra+Ar(r[4])*Tn+oc(r[5]||""))*ic(r[1]),Math.abs(s)>=Rt&&_("Out-of-bounds offset"),s;var s})(n,e)}var xt={era:Sa,month:hi,monthCode(t,e){return _e(Ec(t),e)},day:hi},Hc=La(qe,Ce),Cf=La(be,$a),jc=Object.assign({},xt,Hc),qc={offset(t){return Wi(_e(Ec(t)))},...jc};function we(t,e,n,r,a=!r){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 r&&r.includes(s)&&le(Oa(s))}return a&&!i&&le(am(e)),o}function yt(t,e,n){let r=ro(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||le(ec(r)),t.monthCode===void 0&&t.month===void 0&&le("Missing month/monthCode"),n||t.day!==void 0||le(Oa("day"));let a=Af(t);return[Ef(t,e),a]}function Zi(t,e){let n=e===rt,r=ro(e);t.day===void 0&&le(Oa("day")),n||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||le(ec(r));let a=Af(t);return[t.eraYear!==void 0||t.year!==void 0?Ef(t,e):void 0,a]}function ao(t,e=Pt,n){let r=ve(t,e);return or(r),Ht(r,n)}function rn(t,e,n,r,a){let o=ki(t,e,n,r,a);return he(ot(ar(e,n,o,Gl(t,e,n,o,a))),e)}function $i(t,e,n,r,a){return B0(e,n,ki(t,e,n,r,a))}function Ki(t,e,n,r,a){let o=e===rt,i=n,s,l,c;if(i===void 0&&o&&(i=1972),i!==void 0){o||ot(ar(e,i,1,1));let d=ki(t,e,i,r,a);s=Gl(t,e,i,d,a),[l,c]=er(e,i,d)}else{t.monthCode===void 0&&le("Missing month/monthCode"),[l,c]=r;let d=e?e.re:1972;if(d!==void 0)s=Gl(t,e,d,ki(t,e,d,r,a),a);else{let u=a===0&&e?e.ge?.(l,c,t.day):void 0;s=u!==void 0?u:t.day}}return N0(e,l,c,s,t.day,a)}function B0(t,e,n){return he(Bi(ar(t,e,n,1)),t)}function N0(t,e,n,r,a,o){let i=n;i&&((t&&t.V?.[e])??1/0)<a&&(o===1&&_(Jn),i=0,r=nc(a,1,(t&&t.U)??1/0));let s=t?t.u(e,!!i,r):$l(e,!!i);for(;!s&&o===0&&r>1;)r--,s=t?t.u(e,!!i,r):$l(e,!!i);s||_("Cannot guess year");let{year:l,month:c}=s;return he(ot(ar(t,l,c,r)),t)}function Af(t){if(t.monthCode!==void 0)return vm(t.monthCode)}var jt=Intl.DateTimeFormat;function R0(t,e){e<-864e13&&_(kn);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var _0={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},ql=-388152e4;function Uc(t,e,n){let[r,a,o,i]=Fp(n),s=r!==void 0;return((l,c,d,u,h,p)=>{d=Vi(d,BigInt(h),u);let f=c.B(d);return Xc(Ya(d+BigInt(f)),p)+(l?oo(xi(f)):"Z")})(s,Xe(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Yc(t,e){let n=_p(e);return((r,a,o,i,s,l,c,d,u,h)=>{i=Vi(i,BigInt(u),d);let p=o.B(i);return Xc(Ya(i+BigInt(p)),h)+oo(xi(p),c)+H0(a,l)+Jc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function Wc(t,e){let n=Rp(e);return((r,a,o,i,s,l)=>Xc(Ri(a,s,i),l)+Jc(r,o))(t.calendar,t,...n)}function Zc(t,e){return n=t.calendar,r=t,a=fi(e),Ei(r)+Jc(n,a);var n,r,a}function $c(t,e){return Tf(t.calendar,Sf,t,fi(e))}function Kc(t,e){return Tf(t.calendar,V0,t,fi(e))}function Tf(t,e,n,r){let a=r>1||r===0&&t!==rt;return r===1?t===rt?e(n):Ei(n):a?Ei(n)+If(Dt(t),r===2):e(n)}function Gc(t,e){return((n,r,a,o)=>Mf(_i(n,a,r)[0],o))(t,...Rl(e))}function Gi(t,e){let[n,r,a]=Rl(e,3);return r>1&&Sn(t={...t,...y0(t,r,n)}),F0(t,a)}function F0(t,e){let{sign:n}=t,r=n===-1?vt(t):t,{hours:a,minutes:o}=r,i=mf(r),s=Number(i/Qn),l=Number(i%Qn);pf(s);let c=Qc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+em({Y:Xn(r.years),M:Xn(r.months),W:Xn(r.weeks),D:Xn(r.days)})+(a||o||s||d?"T"+em({H:Xn(a),M:Xn(o),S:Xn(s,d)+c}):"")}function em(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function Xn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Xc(t,e){return Ei(t)+"T"+Mf(t,e)}function Ei(t){return Sf(t)+"-"+Mt(t.day)}function Sf(t){let{year:e}=t;return(e<0||e>9999?Df(e)+vi(6,Math.abs(e)):vi(4,e))+"-"+Mt(t.month)}function V0(t){return Mt(t.month)+"-"+Mt(t.day)}function Mf(t,e){let n=[Mt(t.hour),Mt(t.minute)];return e!==-1&&n.push(Mt(t.second)+((r,a,o,i)=>Qc(r*Na+a*Ba+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function oo(t,e=0){if(e===1)return"";let[n,r]=_t(Math.abs(t),_a),[a,o]=_t(r,Ra),[i,s]=_t(o,Tn);return Df(t)+Mt(n)+":"+Mt(a)+(i||s?":"+Mt(i)+Qc(s):"")}function H0(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Jc(t,e){return e>1||e===0&&t!==rt?If(Dt(t),e===2):""}function If(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var j0=/0+$/;function Qc(t,e){let n=vi(9,t);return n=e===void 0?n.replace(j0,""):n.slice(0,e),n?"."+n:""}function Df(t){return t<0?"-":"+"}var q0=/^(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$/,U0=/[^\w\/:+-]+/;function Pf(t){return Xi(_e(t))}function Xi(t){return Of(t).id}function Of(t){let e=t.toUpperCase(),n=(a=>{let o=Vc(a,1);if(o!==void 0)return{id:oo(o),Z:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(U0.test(a)&&_(tc(a)),q0.test(a)&&_("Forbidden ICU TimeZone"),a.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?Kp(s).replace(/island|noronha|murdo|rivadavia|urville/,Kp):s)).join("/")))(t);return Y0(r)}var Y0=Tr(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=W0(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),W0=Tr(t=>new jt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Xe(t){let e=Of(t);return Z0(e.id,e)}var Z0=Tr((t,e)=>e.kind==="named"?new Jl(t,e.m,e.format):new Xl(t,e.m,e.kind==="fixed"?e.Z:0)),Xl=class{constructor(e,n,r){this.id=e,this.m=n,this.Z=r}B(){return this.Z}R(e){return[Tc(e,this.Z)]}C(){}},Jl=class{constructor(e,n,r){this.id=e,this.m=n,this.oe=((a,o)=>{let i=Tr(a),s=Tr($0),l=86400*o;function c(u){let[h,p]=nm(u,l),f=gi(h),b=gi(p),x=i(f),g=i(b);return x===g?x:d(s(f,b),x,g,u)}function d(u,h,p,f){let b,x;for(;(f===void 0||(b=f<u[0]?h:f>=u[1]?p:void 0)===void 0)&&(x=u[1]-u[0]);){let g=u[0]+Math.floor(x/2);a(g)===p?u[1]=g:u[0]=g+1}return b}return{Ae(u){let h=c(u-86400),p=c(u+86400),f=u-h,b=u-p;if(h===p)return[f];let x=c(f);return x===c(b)?[u-x]:h>p?[f,b]:[]},ze:c,C:function u(h,p){if(p>0&&h>=864e10)return;if(p<0){if(h<=ql)return;let D=tm()+94867200;if(h>D)return u(D,-1)}let f=p>0?Math.max(h,ql):h,[b,x]=nm(f,l),g=l*p,y=p>0?Math.max(h,tm())+94867200:ql,k=()=>p<0?x>y:b<y;for(;k();){let D=gi(b),L=gi(x),R=i(D),B=i(L);if(R!==B){let N=s(D,L);d(N,R,B);let A=N[0];if((Jt(A,h)||1)===p)return A}b+=g,x+=g}}}})((a=>o=>{let i=R0(a,1e3*o);return 86400*Ma((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&bm(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})(r),(a=>{let o=a.split("/").pop();return _0[o]||60})(e))}B(e){return this.oe.ze((n=>Gp(n)[0])(e))*Tn}R(e){let n=86400*Vt(e)+pc(e),r=Im(e);return this.oe.Ae(n).map(a=>zt(BigInt(a)*Qn+BigInt(r)))}C(e,n){let[r,a]=Gp(e),o=this.oe.C(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Qn}};function tm(){return Math.floor(Date.now()/1e3)}function $0(t,e){return[t,e]}function nm(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function gi(t){return nc(t,-1e10,864e10)}function zf(t,e,n){let r=we(n,Ue(e,Sm,Mm),qc,[],0),a=r.timeZone!==void 0,[o,i]=yt(r,e),s=rn(r,e,o,i,0);if(a){let l=_r(r),c=Xe(t(r.timeZone));return{epochNanoseconds:Lr(c,ve(s,l),r.offset),timeZone:c,calendar:e}}return s}function Lf(t,e,n,r){let a=we(n,Ue(e,Sm,Mm),qc,uc,0),o=t(a.timeZone),[i,s]=yt(a,e),[l,c,d]=wn(r),u=rn(a,e,i,s,l),h=_r(a,l),p=Xe(o);return gt(Lr(p,ve(u,h),a.offset,c,d),p,e)}function Bf(t,e,n){let r=we(e,Ue(t,Am,Tm),jc,[],0),[a,o]=yt(r,t),i=G(n);return ao(rn(r,t,a,o,i),_r(r,i),t)}function Nf(t,e,n,r=[]){let a=we(e,Ue(t,nr,rr),xt,r),[o,i]=yt(a,t);return rn(a,t,o,i,G(n))}function Rf(t,e,n,r){let a=we(e,Ue(t,Va,km),xt,r),[o,i]=yt(a,t,1);return $i(a,t,o,i,G(n))}function _f(t,e,n,r){let a=we(n,Ue(t,nr,rr),xt,tr,0);e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972);let[o,i]=Zi(a,t);return Ki(a,t,o,i,G(r))}function Ff(t,e){return _r(we(t,Zl,Hc,[],1),G(e))}function Vf(t){let e=we(t,Hm,Cf);return Ot(Sn({...Se,...e}))}function It(t){_(dm(t))}function Hf(t){let e=Mn(t=_e(Ec(t))),n;return e||It(t),e.F?n=0:e.offset?n=Wi(e.offset):It(t),e.timeZoneId&&Vc(e.timeZoneId,1),Wa(e),bt(Tc(e,n))}function jf(t,e){let n=Mn(_e(t));return n||It(t),n.timeZoneId?Jf(n,e,void 0):(n.F&&It(t),Ql(n,e))}function qf(t,e,n){let r=Mn(_e(t));return r&&r.timeZoneId||It(t),Jf(r,e,n)}function Uf(t,e){let n=Mn(_e(t));return n&&!n.F||It(t),Qf(n,e)}function Yf(t,e){let n=nd(td(_e(t)),void 0,e);return he(n,n.calendar)}function Wf(t,e){let n=rd(_e(t));if(n)return ed(n),he(Bi(tn(n)),e(n.calendarId));let r=nd(td(t),K0,e),{calendar:a}=r;return he(Pa(a,r),a)}function ed(t){t.calendarId!=="iso8601"&&_(Xt(t.calendarId))}function Zf(t,e){let n=ad(_e(t));if(n)return ed(n),he(tn(n),e(n.calendarId));let r=nd(td(t),G0,e),{calendar:a}=r,{year:o,month:i,day:s}=ue(a,r),[l,c]=er(a,o,i),{year:d,month:u}=((h,p,f,b)=>{let x=h?h.u(p,f,b):$l(p,f);return x||_("Cannot guess year"),x})(a,l,c,s);return he(ot(ar(a,d,u,s)),a)}function $f(t){let e=(r=>{let a=eb(r);return a?(io(a[13]),tb(a,1)):void 0})(t=_e(t));if(!e){let r=Mn(t);r&&r.te||It(t),r.F&&_(Xt("Z")),ed(r),e=r}let n;return(n=rd(t))&&Xp(n)&&It(t),(n=ad(t))&&Xp(n)&&It(t),ir(ja(e))}function Kf(t){let e=ry.exec(_e(t));return e||It(t),Ot(Sn((n=>{let r=0,a=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),...Bc(o,2,be)};return r||_(am(be)),ic(n[1])<0&&(i=vt(i)),i;function s(l,c,d){let u=0,h=0;return d&&([u,o]=_t(o,ft[d])),l!==void 0&&(a&&_(Xt(l)),h=(p=>{let f=parseInt(p);return Number.isFinite(f)||_(Xt(p)),f})(l),r=1,c&&(o=oc(c)*(ft[d]/Tn),a=1)),u+h}})(e)))}function Gf(t){let e=Mn(t)||rd(t)||ad(t);if(e)return e.calendarId;let n=eb(t);return n?io(n[13]).calendarId:t}function Xf(t){let e=Mn(t);return e&&(e.timeZoneId||e.F&&"UTC"||e.offset)||t}function td(t){let e=Mn(t);return e&&!e.F||It(t),e}function nd(t,e,n){return e&&t.calendarId==="iso8601"?(tn(t),t.te&&ja(t),Ql(e(t),n)):t.te?Qf(t,n):Ql(t,n)}function K0(t){let e=12*t.year+t.month===Um?20:1;return{...t,day:e}}function G0(t){return{...t,year:1972}}function Jf(t,e,n){let r=Xe(Xi(t.timeZoneId)),a;if(Wa(t),t.te){let i=t.offset?Wi(t.offset):void 0,[,s,l]=wn(n);a=Lr(r,t,i,s,l,!(r.Z||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.F)}else wn(n),a=Mr(r,t);var o;return zt(a),gt(a,r,e(t.calendarId))}function Qf(t,e){return Wa(t),or(t),{...ve(t,t),calendar:e(t.calendarId)}}function Ql(t,e){return tn(t),ot(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function Ci(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var X0="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+Ci(8)+"(Z|([+-])"+Ci(15)+")?)?",J0=Ir("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Q0=Ir("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),ey=Ir(X0+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ty=Ir("T?"+Ci(2)+`(([+-])${Ci(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),ny=new RegExp("\\[(!?)([^\\]]*)\\]","g"),ry=Ir("([+-])?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 Mn(t){let e=ey.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:nb(n),month:parseInt(n[5]),day:parseInt(n[6]),...tb(n,7),...io(n[19]),te:!!n[7],F:a,offset:a?void 0:r}})(e):void 0}function rd(t){let e=J0.exec(t);if(e)return(n=>({year:nb(n),month:parseInt(n[4]),day:1,...io(n[5])}))(e)}function ad(t){let e=Q0.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...io(n[3])}))(e):void 0}function eb(t){let e=ty.exec(t);if(e)return e[6]&&Wi(e[6]),e}function tb(t,e){let n=Ar(t[e+3]);return{...mc(oc(t[e+4]||""))[0],hour:Ar(t[e]),minute:Ar(t[e+2]),second:n===60?59:n}}function nb(t){let e=ic(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&_(Xt(-0)),e*n}function io(t){let e,n,r=[];return t.replace(ny,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&_(Xt(a)):(n&&_(Xt(a)),n=l),""}),r.length>1&&e&&_(Xt(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function Fr(t,e,n){let r=Object.assign(Object.create(null),e);return Ul(r,n,wm),ro(t)&&(Ul(r,n,Qx),t&&t.je&&Ul(r,n,e0,Or)),r}function Ul(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function rb(t,e,n){let r=Ue(t,n0,r0),a=Me(e),{year:o,month:i,day:s}=ue(t,a),l={year:o,monthCode:so(t,o,i),day:s,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},c=we(n,r,qc),d=Fr(t,l,c);return[{...l,...c},d]}function ab(t,e,n){let r=Ue(t,Am,Tm),{year:a,month:o,day:i}=ue(t,e),s={year:a,monthCode:so(t,a,o),day:i,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=we(n,r,jc),c=Fr(t,s,l);return[{...s,...l},c]}function ob(t,e,n){let r=Ue(t,nr,rr),{year:a,month:o,day:i}=ue(t,e);return Fr(t,{year:a,monthCode:so(t,a,o),day:i},we(n,r,xt))}function ib(t,e,n){let r=Ue(t,Va,km),{year:a,month:o}=ue(t,e);return Fr(t,{year:a,monthCode:so(t,a,o)},we(n,r,xt))}function sb(t,e,n){let r=Ue(t,nr,rr),{year:a,month:o,day:i}=ue(t,e);return Fr(t,{monthCode:so(t,a,o),day:i},we(n,r,xt))}function lb(t,e,n,r,a,o,i,s){let{calendar:l,timeZone:c}=t;return gt(Lr(c,ve(rn(n,l,r,a,o),Di(e,o)),e.offset,i,s),c,l)}function cb(t,e,n,r,a,o){return ao(rn(e,n,r,a,o),Di(t,o),n)}function db(t,e){return{...Ft(Zl,t),...we(e,Zl,Hc)}}function ub(t,e){return Ot((n=t,r=e,Sn({...n,...we(r,Hm,Cf)})));var n,r}function so(t,e,n){let[r,a]=er(t,e,n);return xm(r,a)}function hb(t,e,n){let[r,a]=Lp(n,t),o=Cn(e),i=Math.max(r,o),s=a&&eo(a);if(!a&&wi(i,s))return rm(e,r);if(a||_("Missing relativeTo"),!e.sign&&(!s||r<6))return 0;let[l,c,d]=df(a,e,r);return wi(r,s)?rm(l,r):((u,h,p,f)=>{let b=be[p],x=wc(p,u);return v0(u[b],to(u)||1,h,g=>(x[b]=g,qi(f,x)))})(l,c,r,d)}function rm(t,e){return ym(en(t),ft[e])}function pb(t,e,n){return gt(t.epochNanoseconds,e,n)}function mb(t){return bt(t.epochNanoseconds)}function od(t){return Ht(Me(t),t.calendar)}function id(t){return he(Me(t),t.calendar)}function sd(t){return ir(Me(t))}function fb(t,e,n){return gt(zt(Br(e,t,n)),e,t.calendar)}function bb(t,e,n){let r;return r=n?Br(e,ve(t,n)):Mr(e,ve(t,Pt)),gt(r,e,t.calendar)}function gb(t,e,n){return wb(t,Ft(Ue(t,Ha,Em),e),we(xn(n),tr,xt,[]))}function vb(t,e,n){let r=Ue(t,Mi,t0);return wb(t,Ft(Cm,e),we(xn(n),r,xt,[]))}function xb(t,e){let n=we(e,Cm,xt),[r,a]=Zi(n,t);return Ki(n,t,r,a,0)}function yb(t,e){let n=we(e,Ue(t,Ha,Em),xt),[r,a]=yt(n,t,1);return $i(n,t,r,a,0)}function wb(t,e,n){let r=Ue(t,a0,o0),a=Fr(t,e,n);a=we(a,r,xt,[]);let[o,i]=yt(a,t);return rn(a,t,o,i,0)}function kb(t){return bt(zt(BigInt($a(t))*Pr))}function Eb(t){return bt(zt(Li(t)))}function Vr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function Cb(t,e){return t.timeZone!==void 0&&le("Cannot specify TimeZone"),t.timeZone=e,t}function Hr(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===rt||Dt(e.calendar)===r||_("Mismatching Calendars")}function lr(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,h={},p={},f={},b=0,x=0;for(let A of Object.keys(l)){let T=l[A];T===void 0||s.has(A)||(o.has(A)?A==="dateStyle"?d=T:A==="timeStyle"?u=T:h[A]=T:A==="era"?p[A]=T:i.has(A)?A==="dateStyle"||A==="timeStyle"?x=1:b=1:f[A]=T)}let g=d!==void 0,y=u!==void 0,k=g||y,D=Object.keys(h).length>0,L=b||x,R=D||g||y,B=Object.keys(p).length>0;(!c&&L||c&&L&&!R||k&&(D||B||b))&&le("Invalid formatting options");let N={};return k||R||Object.assign(N,r),Object.assign(N,h,p,f),g&&(a?Object.assign(N,a[d]):N.dateStyle=d),y&&(N.timeStyle=u),N}}var Ab={year:"numeric",month:"numeric",day:"numeric"},Tb={hour:"numeric",minute:"numeric",second:"numeric"},ld=Object.assign({},Ab,Tb),cd=["weekday","year","month","day","dateStyle"],lo=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],dd=cd.concat(lo),ay=["weekday","day"].concat(lo),oy=["weekday","year"].concat(lo),Sb=lr(dd,[],[],ld),Mb=lr(dd,[],[],{...ld,timeZoneName:"short"}),Ib=lr(dd,[],["timeZoneName"],ld),Db=lr(cd,lo,["timeZoneName"],Ab),Pb=lr(lo,cd,["timeZoneName","era"],Tb),Ob=lr(["year","month","dateStyle"],ay,["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"}}),zb=lr(["month","day","dateStyle"],oy,["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 Lb(t,e){let{timeZone:n}=t,r=Me(t),{offsetNanoseconds:a}=r,o=e||Pt,i;return i=e?Lr(n,ve(r,o),a,2):Mr(n,ve(r,o)),gt(i,n,t.calendar)}function Ji(t){let e=Qi(),n=t.B(e);return Ya(e+BigInt(n))}function Qi(){return BigInt(Date.now())*Pr}function jr(){return new jt().resolvedOptions().timeZone}var ud="PlainYearMonth",hd="PlainMonthDay",pd="PlainDate",md="PlainDateTime",fd="PlainTime",bd="ZonedDateTime",gd="Instant",vd="Duration";function an(t,e,n,...r){return Object.defineProperties(e,um(t)),Object.defineProperties(e.prototype,za("Temporal."+t)),Object.defineProperties(e.prototype,An(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var on=ac.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:ac;function sn(){le(sm)}function ln(){le(im)}var Bb={era(t){return Za(t.calendar,t).era},eraYear(t){return Za(t.calendar,t).eraYear},year(t){return ue(t.calendar,t).year},month(t){return ue(t.calendar,t).month},monthCode(t){return zi(t.calendar,t)}},es={era(t){return Za(t.calendar,t).era},eraYear(t){return Za(t.calendar,t).eraYear},year(t){return ue(t.calendar,t).year},month(t){return ue(t.calendar,t).month},monthCode(t){return zi(t.calendar,t)},day(t){return ue(t.calendar,t).day}},Nb={monthCode(t){return zi(t.calendar,t)},day(t){return ue(t.calendar,t).day}},Rb={daysInMonth(t){return gc(t.calendar,t)},daysInYear(t){return vc(t.calendar,t)},monthsInYear(t){return bc(t.calendar,t)},inLeapYear(t){return fc(t.calendar,t)}},ts={dayOfWeek(t){return Oi(t)},dayOfYear(t){return _m(t.calendar,t)},weekOfYear(t){return Fm(t.calendar,t)},yearOfWeek(t){return Vm(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return gc(t.calendar,t)},daysInYear(t){return vc(t.calendar,t)},monthsInYear(t){return bc(t.calendar,t)},inLeapYear(t){return fc(t.calendar,t)}};function xd(t,e,n,r){let[a,o,i,s]=Gn(t,r,3,5);return qr(t,Qa(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s))}function yd(t,e,n,r){let a=Ja(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,5);return qr(t,tf(a,e,n,o,i,s,l))}function wd(t,e,n,r){let a=Ja(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6);return qr(t,nf(a,e,n,o,i,s,l))}function kd(t,e,n,r){let a=Ja(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,6,9,6);return qr(t,af(a,e,n,o,i,s,l))}function Ed(t,e,n,r){let a=Ja(e.calendar,n.calendar),[o,i,s,l]=Gn(t,r,9,9,8);return qr(t,rf(a,e,n,o,i,s,l))}function Cd(t,e,n,r){let[a,o,i,s]=Gn(t,r,5,5);return qr(t,of(e,n,a,o,i,s))}function qr(t,e){return Ot(t?vt(e):e)}function _b(t,e,n){let{calendar:r}=t,a=ob(r,t,e),[o,i]=yt(a,r),s=G(n);return rn(a,r,o,i,s)}function Fb(t,e,n){let{calendar:r}=t,[a,o]=ab(r,t,e),[i,s]=yt(o,r),l=G(n);return cb(a,o,r,i,s,l)}function Vb(t,e,n){let{calendar:r}=t,a=ib(r,t,e),[o,i]=yt(a,r,1),s=G(n);return $i(a,r,o,i,s)}function Hb(t,e,n){let{calendar:r}=t,a=sb(r,t,e),[o,i]=Zi(a,r),s=G(n);return Ki(a,r,o,i,s)}function jb(t,e,n){let r=db(t,e),a=G(n);return _r(r,a)}function qb(t,e,n){let{calendar:r}=t,[a,o]=rb(r,t,e),[i,s]=yt(o,r),[l,c,d]=wn(n,2);return lb(t,a,o,i,s,l,c,d)}function On(t){let e=_e(t).toLowerCase();return e===cc?rt:e===fm?gm:void _(cm(t,"temporal-polyfill/full"))}function uo(t=cc){return On(t)}var Yb=new WeakMap,Wb=an(bd,class{constructor(t,e,n=void 0){let r=zt(Li(t)),a=Xe(Pf(e)),o=uo(n);Zb(this,gt(r,a,o))}static from(t,e=void 0){return Je(Ur(t,e))}static compare(t,e){return no(Ur(t),Ur(e))}get calendarId(){return Dt(se(this).calendar)}get timeZoneId(){return se(this).timeZone.id}get epochMilliseconds(){return qa(se(this).epochNanoseconds)}get epochNanoseconds(){return se(this).epochNanoseconds}get offset(){return oo(Me(se(this)).offsetNanoseconds)}get offsetNanoseconds(){return Me(se(this)).offsetNanoseconds}get hoursInDay(){return $m(se(this))}with(t,e=void 0){return Je(qb(se(this),Kr(t),e))}withCalendar(t){return Je({...se(this),calendar:as(t)})}withTimeZone(t){return Je({...se(this),timeZone:Xe(Et(t))})}withPlainTime(t=void 0){return Je(Lb(se(this),Id(t)))}add(t,e=void 0){let n=se(this);return Je(Ga(n,Oe(t),G(e)))}subtract(t,e=void 0){let n=se(this);return Je(Ga(n,vt(Oe(t)),G(e)))}until(t,e=void 0){let n=se(this),r=Ur(t);return Ae(yd(0,n,r,e))}since(t,e=void 0){let n=se(this),r=Ur(t);return Ae(yd(1,n,r,e))}round(t){let e=se(this),[n,r,a]=Aa(t);return Je(Zm(e,n,r,a))}startOfDay(){return Je(Km(se(this)))}equals(t){return gf(se(this),Ur(t))}toInstant(){return cn(mb(se(this)))}toPlainDateTime(){return qt(od(se(this)))}toPlainDate(){return Ut(id(se(this)))}toPlainTime(){return Pn(sd(se(this)))}toLocaleString(t=void 0,e={}){let n=se(this),r=new jt(t,Cb(Mb(e),ef(n)));return Hr(r,n),r.format(qa(n.epochNanoseconds))}toString(t=void 0){return Yc(se(this),t)}toJSON(){return Yc(se(this))}getTimeZoneTransition(t){let e=se(this),n=e.timeZone.C(e.epochNanoseconds,Vp(t));return n!==void 0?Je({...e,epochNanoseconds:n}):null}valueOf(){return ln()}},iy,es,ts,Fa);function Je(t){return Zb(Object.create(Wb.prototype),t)}function se(t){return Yt(t)||sn()}function iy(t){let e=se(t);return{...Me(e),calendar:e.calendar}}function Yt(t){return Yb.get(t)}function Ur(t,e){if(Ge(t)){let n=Yt(t);if(n)return wn(e),n;let r=ho(t);return Lf(Et,r,t,e)}return qf(t,On,e)}function Zb(t,e){return Yb.set(t,e),on(t),t}function Et(t){if(Ge(t)){let e=Yt(t);return e||le(tc(t)),e.timeZone.id}return(e=>Xi(Xf(_e(e))))(t)}var $b=new WeakMap,Kb=an(gd,class{constructor(t){let e=zt(Li(t));Xb(this,bt(e))}static from(t){return cn(Yr(t))}static fromEpochMilliseconds(t){return cn(kb(t))}static fromEpochNanoseconds(t){return cn(Eb(t))}static compare(t,e){return no(Yr(t),Yr(e))}get epochMilliseconds(){return qa(wt(this).epochNanoseconds)}get epochNanoseconds(){return wt(this).epochNanoseconds}add(t){let e=wt(this);return cn(bt(Dc(e.epochNanoseconds,Oe(t))))}subtract(t){let e=wt(this);return cn(bt(Dc(e.epochNanoseconds,vt(Oe(t)))))}until(t,e=void 0){return Ae(xd(0,wt(this),Yr(t),e))}since(t,e=void 0){return Ae(xd(1,wt(this),Yr(t),e))}round(t){let e=wt(this),[n,r,a]=Aa(t,5,1);return cn(bt(Vi(e.epochNanoseconds,Ka(n,r),a)))}equals(t){return bf(wt(this),Yr(t))}toZonedDateTimeISO(t){return Je(pb(wt(this),Xe(Et(t))))}toLocaleString(t=void 0,e={}){let n=wt(this);return new jt(t,Sb(e)).format(qa(n.epochNanoseconds))}toString(t=void 0){return Uc(Et,wt(this),t)}toJSON(){return Uc(Et,wt(this))}valueOf(){return ln()}});function cn(t){return Xb(Object.create(Kb.prototype),t)}function wt(t){return Sd(t)||sn()}function Sd(t){return $b.get(t)}function Yr(t){if(Ge(t)){let e=Sd(t);if(e)return e;let n=Yt(t);if(n)return bt(n.epochNanoseconds)}return Hf(t)}var{toTemporalInstant:Gb}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return cn(bt(BigInt(kc(t))*Pr))}};function Xb(t,e){return $b.set(t,e),on(t),t}var Jb=new WeakMap,Qb=an(hd,class{constructor(t,e,n=void 0,r){let a=Ce(t),o=Ce(e),i=uo(n),s=Ce(r??zm),l=ot(tn({year:s,month:a,day:o}));eg(this,he(l,i))}static from(t,e=void 0){return Td(Ub(t,e))}get calendarId(){return Dt(In(this).calendar)}with(t,e=void 0){return Td(Hb(In(this),Kr(t),e))}equals(t){return wf(In(this),Ub(t))}toPlainDate(t){let e=In(this);return Ut(vb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=In(this),r=new jt(t,Vr(zb(e)));return Hr(r,n,1),r.format(Ua(n))}toString(t=void 0){return Kc(In(this),t)}toJSON(){return Kc(In(this))}valueOf(){return ln()}},In,Nb);function Td(t){return eg(Object.create(Qb.prototype),t)}function In(t){return ns(t)||sn()}function ns(t){return Jb.get(t)}function Ub(t,e){if(Ge(t)){let r=ns(t);if(r)return G(e),r;let a=pg(t);return _f(a===void 0?rt:a,a===void 0,t,e)}let n=Zf(t,On);return G(e),n}function eg(t,e){return Jb.set(t,e),on(t),t}var tg=new WeakMap,ng=an(ud,class{constructor(t,e,n=void 0,r){let a=Ce(t),o=Ce(e),i=uo(n),s=Ce(r??1),l=Bi(tn({year:a,month:o,day:s}));rg(this,he(l,i))}static from(t,e=void 0){return co(Wr(t,e))}static compare(t,e){return sr(Wr(t),Wr(e))}get calendarId(){return Dt(kt(this).calendar)}with(t,e=void 0){return co(Vb(kt(this),Kr(t),e))}add(t,e=void 0){let n=kt(this);return co(he(Ic(n.calendar,n,Oe(t),G(e)),n.calendar))}subtract(t,e=void 0){let n=kt(this);return co(he(Ic(n.calendar,n,vt(Oe(t)),G(e)),n.calendar))}until(t,e=void 0){let n=kt(this),r=Wr(t);return Ae(Ed(0,n,r,e))}since(t,e=void 0){let n=kt(this),r=Wr(t);return Ae(Ed(1,n,r,e))}equals(t){return yf(kt(this),Wr(t))}toPlainDate(t){let e=kt(this);return Ut(gb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=kt(this),r=new jt(t,Vr(Ob(e)));return Hr(r,n,1),r.format(Ua(n))}toString(t=void 0){return $c(kt(this),t)}toJSON(){return $c(kt(this))}valueOf(){return ln()}},kt,Bb,Rb);function co(t){return rg(Object.create(ng.prototype),t)}function kt(t){return rs(t)||sn()}function rs(t){return tg.get(t)}function Wr(t,e){if(Ge(t)){let r=rs(t);if(r)return G(e),r;let a=ho(t);return Rf(a,t,e)}let n=Wf(t,On);return G(e),n}function rg(t,e){return tg.set(t,e),on(t),t}function sy(t){if(!Ge(t))return;let e=Sd(t);return e?[gd,e]:(e=Yt(t),e?[bd,e]:(e=cr(t),e?[md,e]:(e=Gr(t),e?[pd,e]:(e=Md(t),e?[fd,e]:(e=rs(t),e?[ud,e]:(e=ns(t),e?[hd,e]:(e=Dd(t),e?[vd,e]:void 0)))))))}function Kr(t){return(sy(t)||t.calendar!==void 0||t.timeZone!==void 0)&&le(om),t}var ag=new WeakMap,og=an(fd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=ja(An(Ce,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));ig(this,ir(i))}static from(t,e=void 0){return Pn(Dn(t,e))}static compare(t,e){return Yi(Dn(t),Dn(e))}with(t,e=void 0){return Pn(jb(Lt(this),Kr(t),e))}add(t){let e=Lt(this);return Pn(Hi(e,Oe(t))[0])}subtract(t){let e=Lt(this);return Pn(Hi(e,vt(Oe(t)))[0])}until(t,e=void 0){return Ae(Cd(0,Lt(this),Dn(t),e))}since(t,e=void 0){return Ae(Cd(1,Lt(this),Dn(t),e))}round(t){let e=Lt(this),[n,r,a]=Aa(t,5);return Pn(_i(e,zr(n,r),a)[0])}equals(t){return kf(Lt(this),Dn(t))}toLocaleString(t=void 0,e={}){let n=Lt(this);return new jt(t,Vr(Pb(e))).format(hc(n))}toString(t=void 0){return Gc(Lt(this),t)}toJSON(){return Gc(Lt(this))}valueOf(){return ln()}},Lt,Fa);function Pn(t){return ig(Object.create(og.prototype),t)}function Lt(t){return Md(t)||sn()}function Md(t){return ag.get(t)}function Dn(t,e){if(Ge(t)){let r=Md(t);if(r)return G(e),r;let a=cr(t);if(a)return G(e),ir(a);let o=Yt(t);return o?(G(e),sd(o)):Ff(t,e)}let n=$f(t);return G(e),n}function Id(t){return t===void 0?void 0:Dn(t)}function ig(t,e){return ag.set(t,e),on(t),t}var sg=new WeakMap,lg=an(md,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=or(Wa(An(Ce,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=uo(c);cg(this,Ht(d,u))}static from(t,e=void 0){return qt(Zr(t,e))}static compare(t,e){let n=Zr(t),r=Zr(e);return Fc(n,r)}get calendarId(){return Dt(Pe(this).calendar)}with(t,e=void 0){return qt(Fb(Pe(this),Kr(t),e))}withCalendar(t){let e=Pe(this);return qt(Ht(e,as(t)))}withPlainTime(t=void 0){let e=Pe(this);return qt(ao(e,Id(t),e.calendar))}add(t,e=void 0){let n=Pe(this);return qt(Ht(Xa(n.calendar,n,Oe(t),G(e)),n.calendar))}subtract(t,e=void 0){let n=Pe(this);return qt(Ht(Xa(n.calendar,n,vt(Oe(t)),G(e)),n.calendar))}until(t,e=void 0){let n=Pe(this),r=Zr(t);return Ae(wd(0,n,r,e))}since(t,e=void 0){let n=Pe(this),r=Zr(t);return Ae(wd(1,n,r,e))}round(t){let e=Pe(this),[n,r,a]=Aa(t);return qt(Ht(Ri(e,zr(n,r),a),e.calendar))}equals(t){return vf(Pe(this),Zr(t))}toZonedDateTime(t,e=void 0){return Je(fb(Pe(this),Xe(Et(t)),Bp(e)))}toPlainDate(){let t=Pe(this);return Ut(he(t,t.calendar))}toPlainTime(){return Pn(ir(Pe(this)))}toLocaleString(t=void 0,e={}){let n=Pe(this),r=new jt(t,Vr(Ib(e)));return Hr(r,n),r.format(Pm(n))}toString(t=void 0){return Wc(Pe(this),t)}toJSON(){return Wc(Pe(this))}valueOf(){return ln()}},Pe,es,ts,Fa);function qt(t){return cg(Object.create(lg.prototype),t)}function Pe(t){return cr(t)||sn()}function cr(t){return sg.get(t)}function Zr(t,e){if(Ge(t)){let r=cr(t);if(r)return G(e),r;let a=Gr(t);if(a)return G(e),Ht(ve(a,Pt),a.calendar);let o=Yt(t);if(o)return G(e),od(o);let i=ho(t);return Bf(i,t,e)}let n=Uf(t,On);return G(e),n}function cg(t,e){return sg.set(t,e),on(t),t}var dg=new WeakMap,ug=an(pd,class{constructor(t,e,n,r=void 0){let a=ot(tn(An(Ce,{year:t,month:e,day:n}))),o=uo(r);hg(this,he(a,o))}static from(t,e=void 0){return Ut($r(t,e))}static compare(t,e){return sr($r(t),$r(e))}get calendarId(){return Dt(Fe(this).calendar)}with(t,e=void 0){return Ut(_b(Fe(this),Kr(t),e))}withCalendar(t){let e=Fe(this);return Ut(he(e,as(t)))}add(t,e=void 0){let n=Fe(this);return Ut(he(nn(n.calendar,n,Oe(t),G(e)),n.calendar))}subtract(t,e=void 0){let n=Fe(this);return Ut(he(nn(n.calendar,n,vt(Oe(t)),G(e)),n.calendar))}until(t,e=void 0){let n=Fe(this),r=$r(t);return Ae(kd(0,n,r,e))}since(t,e=void 0){let n=Fe(this),r=$r(t);return Ae(kd(1,n,r,e))}equals(t){return xf(Fe(this),$r(t))}toZonedDateTime(t){let e=Ge(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t},n=Fe(this),r=Et(e.timeZone),a=e.plainTime,o=a!==void 0?Dn(a):void 0;return Je(bb(n,Xe(r),o))}toPlainDateTime(t=void 0){let e=Fe(this);return qt(ao(e,Id(t),e.calendar))}toPlainYearMonth(){let t=Fe(this);return co(yb(t.calendar,this))}toPlainMonthDay(){let t=Fe(this);return Td(xb(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=Fe(this),r=new jt(t,Vr(Db(e)));return Hr(r,n),r.format(Ua(n))}toString(t=void 0){return Zc(Fe(this),t)}toJSON(){return Zc(Fe(this))}valueOf(){return ln()}},Fe,es,ts);function Ut(t){return hg(Object.create(ug.prototype),t)}function Fe(t){return Gr(t)||sn()}function Gr(t){return dg.get(t)}function $r(t,e){if(Ge(t)){let r=Gr(t);if(r)return G(e),r;let a=cr(t);if(a)return G(e),he(a,a.calendar);let o=Yt(t);if(o)return G(e),id(o);let i=ho(t);return Nf(i,t,e)}let n=Yf(t,On);return G(e),n}function hg(t,e){return dg.set(t,e),on(t),t}function ho(t){let e=pg(t);return e===void 0?rt:e}function pg(t){let{calendar:e}=t;if(e!==void 0)return as(e)}function as(t){if(Ge(t)){let e=Gr(t)||cr(t)||Yt(t)||ns(t)||rs(t);return e||le(lm(t)),e.calendar}return(e=>On(Gf(_e(e))))(t)}var mg=new WeakMap,fg=an(vd,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=Sn(An($a,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));bg(this,Ot(d))}static from(t){return Ae(Oe(t))}static compare(t,e,n=void 0){return ff(Ad,Oe(t),Oe(e),n)}get sign(){return it(this).sign}get blank(){return!it(this).sign}with(t){return Ae(ub(it(this),t))}negated(){return Ae(Rc(it(this)))}abs(){return Ae(hf(it(this)))}add(t){return Ae(Nc(0,it(this),Oe(t)))}subtract(t){return Ae(Nc(1,it(this),Oe(t)))}round(t){return Ae(uf(Ad,it(this),t))}total(t){return hb(Ad,it(this),t)}toLocaleString(t=void 0,e){let n=it(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):Gi(n,e)}toString(t=void 0){return Gi(it(this),t)}toJSON(){return Gi(it(this))}valueOf(){return ln()}},it,xc);function Ae(t){return bg(Object.create(fg.prototype),t)}function it(t){return Dd(t)||sn()}function Dd(t){return mg.get(t)}function Oe(t){return Ge(t)?Dd(t)||Vf(t):Kf(t)}function Ad(t){if(t!==void 0){if(Ge(t)){let e=Yt(t);if(e)return e;let n=Gr(t);if(n)return n;let r=cr(t);if(r)return he(r,r.calendar);let a=ho(t);return zf(Et,a,t)}return jf(t,On)}}function bg(t,e){return mg.set(t,e),on(t),t}var ly=Object.defineProperties({},{...za("Temporal.Now"),...Ai({timeZoneId(){return jr()},instant(){return cn(bt(Qi()))},zonedDateTimeISO(t=jr()){let e=Xe(Et(t));return Je(gt(Qi(),e))},plainDateTimeISO(t=jr()){let e=Ji(Xe(Et(t)));return qt(Ht(e))},plainDateISO(t=jr()){let e=Ji(Xe(Et(t)));return Ut(he(e))},plainTimeISO(t=jr()){let e=Ji(Xe(Et(t)));return Pn(ir(e))}})}),gg=Object.defineProperties({},{...za("Temporal"),...Ai({PlainYearMonth:ng,PlainMonthDay:Qb,PlainDate:ug,PlainTime:og,PlainDateTime:lg,ZonedDateTime:Wb,Instant:Kb,Duration:fg,Now:ly})});var ke=Al||gg;var d2=Al?Date.prototype.toTemporalInstant:Gb;var os=class extends V{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;seeded=!1;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),si(this)}connectedCallback(){this.seeded||(this.selectedIso=this.#e?this.currentIso():this.getAttribute("defaultvalue")||null,this.seeded=!0),this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,r){if(e==="value"){let a=this.selectedIso;this.selectedIso=this.currentIso(),this.applyFormValue(this.selectedIso),this.seeded&&this.selectedIso!==a&&this.dispatchEvent(new Event("change",{bubbles:!0}));return}e==="data-focus"&&this.focusCell(r)}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 r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(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=e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.key==="PageUp"||e.key==="PageDown");if(je(e)&&!n)return;let r=this.#t;if(r.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??r.find(s=>s.tabIndex===0)??null;if(!a?.dataset.date)return;let o=null;switch(e.key){case"Home":case"End":{let s=r.indexOf(a);if(s<0)return;let l=s-s%7;o=r[e.key==="Home"?l:l+6]?.dataset.date??null;break}default:{let s=ke.PlainDate.from(a.dataset.date),l;switch(e.key){case"ArrowLeft":l=s.subtract({days:1});break;case"ArrowRight":l=s.add({days:1});break;case"ArrowUp":l=s.subtract({days:7});break;case"ArrowDown":l=s.add({days:7});break;case"PageUp":l=s.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":l=s.add({[e.shiftKey?"years":"months"]:1});break;default:return}o=l.toString()}}if(!o)return;e.preventDefault();let i=r.find(s=>s.dataset.date===o);i&&!i.hasAttribute("disabled")&&i.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:o}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){let a=this.#e;a||(this.selectedIso=e,this.applyFormValue(e)),this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),a||this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()}set value(e){e==null?this.removeAttribute("value"):this.setAttribute("value",e)}get defaultValue(){return this.getAttribute("defaultvalue")}set defaultValue(e){e==null?this.removeAttribute("defaultvalue"):this.setAttribute("defaultvalue",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.emitState(e||null,n,"restore")}};function vg(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",os)}vg();var is=class extends ur{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function xg(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",is)}xg();var ss=class extends V{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("state")??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(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.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,r){let a=n??this.uncontrolledValue;e==="state"&&(this.uncontrolledValue=r??n),this.sync(),e==="state"&&this.alive&&this.#e!==a&&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,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}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||je(e))return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function yg(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",ss)}yg();var ls=class extends V{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){Pd(this.doc)}},po="a-menu-item, a[data-anta-menu-item]";function Xr(t){return Jr(t)&&t.localName==="a-menu-item"}function Jr(t){return!!t&&t.nodeType===1&&t.matches(po)}function Pd(t){t.hasKeyListenerForAMenuItem||(qo(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?.(po)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function wg(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",ls)}wg();var ae=4,cs=96,cy=130,dy=130,uy=500,hy='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',py="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",my="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]";function Qr(t){return!!t&&t.nodeType===1}function fy(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(Qr(n)&&n.localName==="dialog"&&n.matches(":modal")||Qr(n)&&n.matches(":popover-open"))return!0}return!1}var by=Symbol.for("anta.menu-coordination");function gy(t){return t[by]??=vy(t)}function vy(t){let e=[],n=!1,r=null,a=null,o=null,i=0;function s(w){o=w.pointerType==="mouse"?w.clientX:null,o!==null&&(i=w.clientY)}function l(w){return o!==null&&o>=w.left&&o<w.right&&i>=w.top&&i<w.bottom}function c(w,O){n||(w.addEventListener("pointerdown",b,!0),w.addEventListener("pointermove",s,{capture:!0,passive:!0}),w.addEventListener("pointerleave",u),w.addEventListener("keydown",y,!0),w.addEventListener("keyup",k,!0),w.addEventListener("contextmenu",x,!0),O.addEventListener("resize",g),r=w,a=O,n=!0)}function d(){n&&(r?.removeEventListener("pointerdown",b,!0),r?.removeEventListener("pointermove",s,!0),r?.removeEventListener("pointerleave",u),r?.removeEventListener("keydown",y,!0),r?.removeEventListener("keyup",k,!0),r?.removeEventListener("contextmenu",x,!0),a?.removeEventListener("resize",g),r=null,a=null,n=!1,o=null)}function u(){o=null}function h(w,O=!1){let S=w.composedPath();for(let H=e.length-1;H>=0;H--){let j=e[H];if(S.includes(j.surface))return H;let C=j.triggerAnchor;if(C&&!(O&&j.hasAttribute("context"))&&S.includes(C))return H}return-1}function p(w){for(let O of e)if(O.contains(w)||O.surface.contains(w))return!0;return!1}iu({isOpen:w=>e.some(O=>!w||O.ownerDocument===w),contains:p},t);function b(w){if(s(w),!e.length)return;let O=h(w,w.button===0);e[O+1]?.requestClose(w)}function x(w){e.length&&h(w)===-1&&D(w)}function g(){e.length&&D()}function y(w){let O=e[e.length-1];O&&O.handleKey(w)}function k(w){let O=e[e.length-1];O&&O.handleKeyUp(w)}function D(w){e[0]?.requestClose(w)}let L=new Map;function R(w,O){let S=t.defaultView?.MutationObserver;if(!S)return;let H=L.get(w);if(!H){let q=new Set,Q=new S(()=>{for(let Z of q)Z()});Q.observe(w,{childList:!0}),H={observer:Q,refresh:q},L.set(w,H)}let{observer:j,refresh:C}=H;return C.add(O),()=>{!C.delete(O)||C.size||(j.disconnect(),L.delete(w))}}let B=new Map,N=new Map,A;function T(w,O){let S=B.get(O);if(S&&S!==w){S.teardownListeners();let j=N.get(O);j!==void 0&&t.defaultView?.cancelAnimationFrame(j),N.delete(O),A?.unobserve(O)}B.set(O,w);let H=t.defaultView?.IntersectionObserver;if(!H){w.setupListeners();return}A??=new H(j=>{for(let C of j){let q=B.get(C.target);if(!q)continue;let Q=t.defaultView;if(!Q)continue;let Z=N.get(C.target);Z!==void 0&&Q.cancelAnimationFrame(Z),N.set(C.target,Q.requestAnimationFrame(()=>{N.delete(C.target),!(B.get(C.target)!==q||!q.isConnected||q.ownerDocument!==t)&&(C.isIntersecting?q.setupListeners():q.listening&&(q.teardownListeners(),q.isOpen&&q.close()))}))}},{root:null,rootMargin:"0px",threshold:0}),A.observe(O)}function W(w,O){if(B.get(O)!==w)return;B.delete(O);let S=N.get(O);S!==void 0&&t.defaultView?.cancelAnimationFrame(S),N.delete(O),A?.unobserve(O),B.size||(A?.disconnect(),A=void 0)}return{stack:e,observe:T,unobserve:W,watchParent:R,bind:c,unbind:d,get mouseX(){return o},mouseInside:l}}var ds=class extends V{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;#e=!1;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#t=new Set;#n;#a=!1;#r;#o;#l;#s=new Set;#d=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"});this.surface=this.doc.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let n=this.doc.createElement("slot");n.setAttribute("name","header"),n.part.add("header");let r=this.doc.createElement("div");r.className="scroll",r.setAttribute("part","scroll"),r.append(this.doc.createElement("slot")),r.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=r;let a=this.doc.createElement("slot");a.setAttribute("name","footer"),a.part.add("footer"),this.surface.append(n,r,a),this.surface.addEventListener("pointerenter",o=>{o.pointerType==="mouse"&&this.isSubmenu&&(this.#e=!1,this.cancelCloseTimer())}),this.surface.addEventListener("pointerleave",o=>{o.pointerType==="mouse"&&this.isSubmenu&&this.#w&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),this.surface.addEventListener("mousedown",o=>{o.button===0&&this.#k&&o.preventDefault()}),e.append(this.surface)}#i;#c;#p;#b;#f;get#u(){return gy(this.#i??this.doc)}#h(){let e=this.#u;for(let n=e.stack.length-1;n>=0;n--){let r=e.stack[n];r.isOpen&&!r._dismissNotified&&r.emitChange("closed"),r._doHide()}e.stack.length=0,e.unbind()}connectedCallback(){this.#i=this.doc,Pd(this.doc),this.#q(),this.#_(),this.#x(),!this.isSubmenu&&this.parentNode&&(this.#p=this.#u.watchParent(this.parentNode,()=>this.#x())),this.#C(),queueMicrotask(()=>{this.isConnected&&this.#C()}),this.hasAttribute("state")&&(this.#b=this.view.requestAnimationFrame(()=>{this.#b=void 0,this.syncState()}))}disconnectedCallback(){this.#p?.(),this.#p=void 0;let e=this.#i?.defaultView;this.#b!==void 0&&e?.cancelAnimationFrame(this.#b),this.#b=void 0,this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#B(),this.#c&&this.#u.unobserve(this,this.#c),this.#c=void 0,this.#i=void 0}#x(){if(!this.isConnected)return;let e=this.triggerAnchor??void 0;e!==this.#c&&(this.#c&&this.#u.unobserve(this,this.#c),this.teardownListeners(),this.listening=!1,this.cancelOpenTimer(),this.cancelCloseTimer(),this.#A=null,this.#c=e,e&&this.#u.observe(this,e),this._shown&&(this.#S?this.startComboObserver():(this.comboObserver?.disconnect(),this.comboObserver=void 0,this.activeItem&&this.setActive(null)),this.#a&&(e?(this.position(),this.#F()):this.#P())),this.#C())}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#q();return}if(e==="role"){this.#_();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&&Jr(this.parentElement)}get#m(){return this.hasAttribute("context")}get#g(){return this.hasAttribute("coord")}get#w(){return!this.hasAttribute("nohover")}get#y(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:ae}get#O(){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&&Jr(e)?e:this.previousElementSibling}get#v(){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.#v;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#D(){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.navigableItems().filter(e=>Xr(e))}navigableItems(){return[...this.querySelectorAll(po)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return ya(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=ul(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=this.view.getComputedStyle(n),a=c=>{let d=Number.parseFloat(c);return Number.isFinite(d)?d*(c.endsWith("%")?n.clientHeight/100:1):0},o=n.getBoundingClientRect(),i=o.top+n.clientTop+a(r.scrollPaddingTop),s=o.top+n.clientTop+n.clientHeight-a(r.scrollPaddingBottom),l=e.getBoundingClientRect();l.top<i?n.scrollTop-=i-l.top:l.bottom>s&&(n.scrollTop+=l.bottom-s)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--_menu-fade-top",n?"16px":"0px"),e.style.setProperty("--_menu-gap-top",n?"3px":"0px"),e.style.setProperty("--_menu-fade-bottom",r?"14px":"0px")}get#k(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#S(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#k}#_(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#_()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(po)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#C()}#C(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#S;Ns(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&Ns(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#t)e.has(a)||a[Zt]({source:this,clear:!0});for(let[a,o]of e)a[Zt]({source:this,...o});this.#t=new Set(e.keys())}#B(){for(let e of this.#t)e[Zt]({source:this,clear:!0});this.#t.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,this.scrollItemIntoView(e)),this.#C(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}#L(){this.#A=null,this.activeItem&&this.setActive(null)}resetActive(){if(this.#k)return this.#L();this.#A=null;let e=this.#S?.value;if(!e||!e.trim())return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems();this.activeItem&&!n.includes(this.activeItem)&&this.#L();let r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-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 a=this.activeItem.querySelector(":scope > a-copy");a&&Yo(a),this.#A=this.activeItem}return!0;default:return!1}}#A=null;handleKeyUp(e){if(da(e)){this.#A=null;return}if(e.key!=="Enter")return;let n=this.#A;this.#A=null,n&&this.focusableItems().includes(n)&&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.isConnected)return;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=this.#u.stack,r=n.indexOf(this);if(r!==-1){for(let o=n.length-1;o>r;o--){let i=n[o];i.isOpen&&!i._dismissNotified&&i.emitChange("closed"),i._doHide()}n.length=r+1}let a=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}a&&this.hide()}show(e,n=!1,r){let a=this.#u.stack;if(this.isSubmenu){let s=this.#D;if(s){let l=a.indexOf(s);if(l!==-1){for(let c=a.length-1;c>l;c--){let d=a[c];d!==this&&d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}a.length=l+1}}}else if(!a.includes(this)){let s=this.triggerAnchor,l;if(s){for(let c=a.length-1;c>=0;c--)if(a[c]!==this&&a[c].contains(s)){l=a[c];break}}if(l){let c=a.indexOf(l);for(let d=a.length-1;d>c;d--){let u=a[d];u.isOpen&&!u._dismissNotified&&u.emitChange("closed"),u._doHide()}a.length=c+1}else this.#h()}if(a.includes(this)){this.position(e);return}let o=a.length===0;this._doShow(e,!o),a.push(this),o&&this.#u.bind(this.doc,this.view);let i=this.#S;i?(i.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(e=>{!this._shown||!this.#S||this.#k&&!e.some(n=>n.type!=="attributes"||Jr(n.target)&&n.target.parentElement===this)||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0,...this.#k?{characterData:!0,attributes:!0,subtree:!0,attributeFilter:["disabled"]}:{}})}hide(e=!0){let n=this.#u.stack,r=n.indexOf(this);if(r===-1){this._shown&&this._doHide();return}for(let a=n.length-1;a>=r;a--){let o=n[a];e&&a>r&&o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}n.length=r,n.length===0&&this.#u.unbind()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this.#e=!1,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#F(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.#L(),this._flippedTop=null,this._flippedSide=null,clearTimeout(this.typeTimer),this.typeTimer=void 0,this.typeBuffer="",this.#f!==void 0&&(this.#i?.defaultView??this.view).cancelAnimationFrame(this.#f),this.#f=void 0;let e=this.parentElement?.closest("a-menu");if(this._shown&&e&&this.#u.mouseX!==null&&this.#u.mouseInside(this.surface.getBoundingClientRect()))for(let n=e;n;n=n.parentElement?.closest("a-menu"))n.holdHoverClose?.();this.#P(),this.#a=!1,this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.#e=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#F(e){if(this.#P(),this.#a=!e&&!this.#g,!this.#a)return;let n=this.triggerAnchor;if(!n)return;this.#r=this.#M(n);let r=()=>{if(!this._shown){this.#n=void 0;return}let a=this.triggerAnchor;if(!a){this.#n=void 0;return}let o=this.#M(a);this.#V(o)||(this.#r=o,this.#E(a)),this.#n=this.view.requestAnimationFrame(r)};this.#n=this.view.requestAnimationFrame(r)}#E(e){if(this.#l===void 0||this.#o===void 0)return;let n=this.surface.getBoundingClientRect(),r=Nt(e).top+this.#l;r=Math.min(r,this.view.innerHeight-n.height-ae),r=Math.max(ae,r),this.surface.style.transform=`translate(${this.#o}px, ${Math.round(r)}px)`,this.updateScrollFade()}#P(){this.#n!==void 0&&((this.#i?.defaultView??this.view).cancelAnimationFrame(this.#n),this.#n=void 0),this.#r=void 0,this.#o=void 0,this.#l=void 0}#M(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=Nt(e);return[n,r,a,o,i,s]}#V(e){let n=this.#r;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=ae,d=ae;if(e){l.style.setProperty("--_menu-max-height",`${Math.max(cs,s-2*ae)}px`);let p=l.getBoundingClientRect();c=e[0],c+p.width>i-ae&&(c=i-p.width-ae),c=Math.max(ae,c),d=e[1],d+p.height>s-ae&&(d=d-p.height),d=Math.max(ae,d)}else if(this.isSubmenu){let p=this.triggerAnchor?Nt(this.triggerAnchor):null;if(!p)return;l.style.setProperty("--_menu-max-height",`${Math.max(cs,s-2*ae)}px`);let f=l.getBoundingClientRect();c=p.right+this.#y,c+f.width>i-ae&&(c=p.left-f.width-this.#y),c=Math.max(ae,c);let b=o.getComputedStyle(l),x=o.getComputedStyle(this.scrollEl),g=parseFloat(b.borderTopWidth)+parseFloat(b.paddingTop)+parseFloat(x.paddingTop);d=p.top-g,d+f.height>s-ae&&(d=s-f.height-ae),d=Math.max(ae,d)}else{let p=this.triggerAnchor?Nt(this.triggerAnchor):null;if(!p)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(p.width)}px`);let f=this.#O;if(f.startsWith("right")||f.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.setProperty("--_menu-max-height",`${Math.max(cs,s-2*ae)}px`);let b=l.getBoundingClientRect(),x=i-p.right-2*ae,g=p.left-2*ae,y=f.startsWith("left");r&&this._flippedSide!==null?y=this._flippedSide:y&&g<b.width&&x>g?y=!1:!y&&x<b.width&&g>x&&(y=!0),this._flippedSide=y,c=y?p.left-b.width-this.#y:p.right+this.#y,c=Math.max(ae,Math.min(c,i-b.width-ae));let k=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";d=k==="center"?p.top+p.height/2-b.height/2:k==="end"?p.bottom-b.height:p.top,d+b.height>s-ae&&(d=s-b.height-ae),d=Math.max(ae,d)}else{let b=s-p.bottom-2*ae,x=p.top-2*ae,g=f.startsWith("top");l.style.removeProperty("--_menu-max-height");let y=l.scrollHeight;r&&this._flippedTop!==null?g=this._flippedTop:g&&x<y&&b>x?g=!1:!g&&b<y&&x>b&&(g=!0),this._flippedTop=g;let k=g?x:b;l.style.setProperty("--_menu-max-height",`${Math.max(cs,Math.floor(k))}px`);let D=l.getBoundingClientRect(),L=f.endsWith("end")?"end":f.endsWith("start")?"start":"center";c=L==="center"?p.left+p.width/2-D.width/2:L==="end"?p.right-D.width:p.left,c+D.width>i-ae&&(c=i-D.width-ae),c=Math.max(ae,c),d=g?p.top-D.height-this.#y:p.bottom+this.#y,d=Math.max(ae,d)}}let u=Math.round(c),h=Math.round(d);l.style.transform=`translate(${u}px, ${h}px)`,this.updateScrollFade(),!e&&!this.#g&&this.triggerAnchor&&(this.#o=u,this.#l=h-Nt(this.triggerAnchor).top)};this.#f!==void 0&&this.view.cancelAnimationFrame(this.#f),this.#f=void 0,n?a():this.#f=this.view.requestAnimationFrame(()=>{this.#f=void 0,a()})}onSurfaceClick=e=>{for(let a of e.composedPath()){if(a===this.surface)break;if(Qr(a)&&a.localName==="a-menu"&&a!==this)return}let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;Qr(a)&&(a.matches(my)&&(r=!0),(Xr(a)||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(Xr(a)){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(Qr(a)){if(a.hasAttribute("data-menu-open"))return;if(Xr(a)){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e,!0)}}};closeSystem(e,n=!1){if(!n&&this.closest("[data-menu-open]")){this.requestClose(e);return}(this.#u.stack[0]??this).requestClose(e)}#W(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#q(){let e=this.#W();for(let n of this.#s)e.has(n)||this.surface.removeEventListener(n,this.#d);for(let n of e)this.#s.has(n)||this.surface.addEventListener(n,this.#d);this.#s=e}handleKey(e){if(da(e)){this.#A=null;return}if(je(e))return;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.#k){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Vo(s,$t(this.doc),e.shiftKey);return}let r=this.#S;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Jr(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||!Xr(e)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",uy),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#Z(e){let n=Nt(e);return[n.left,n.bottom]}setupListeners(){if(this.listening||!this.isConnected)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 r,a;this.#w&&(r=o=>{o.pointerType==="mouse"&&(this.#e=!1,this.scheduleOpen())},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#m){let n=r=>{fy(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#k){let n=()=>this.#L();e.addEventListener("input",n),this.teardown=()=>{e.removeEventListener("input",n),this.listening=!1},this.listening=!0;return}else{let n=a=>{if(e.matches(":disabled, [disabled], [loading]"))return;let o=a.composedPath(),i=o.slice(0,o.indexOf(e));if(e.matches("a-input")&&i.some(d=>Qr(d)&&d.getAttribute("slot")==="clear"))return;let s=e.shadowRoot?.querySelector('[part~="field"]');if(s&&!i.includes(s))return;let l=a.detail===0,c=this.#g?l?this.#Z(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:c,viaKeyboard:l,originEvent:a})},r=a=>{if(je(a)||this._shown||e.matches(":disabled, [disabled], [loading]")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(hy))return;let i=e.matches(py);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#g?this.#Z(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),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()},cy))}scheduleClose(){if(this.cancelOpenTimer(),!!this._shown&&!this.#e&&!this.#$){if(this.#u.stack.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))){this.cancelCloseTimer();return}this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},dy)}}get#$(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}holdHoverClose(){!this.isSubmenu||!this.#w||!this._shown||this.surface.matches(":hover")||(this.#e=!0,this.cancelCloseTimer())}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 kg(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",ds)}kg();var us=class extends V{};function Eg(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",us)}Eg();var hs=class extends V{};function Cg(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",hs)}Cg();var ps=class extends ur{ariaProp="ariaSelected"};function Ag(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",ps)}Ag();var ms=class extends V{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("state")??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(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.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.#l()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r();let a=n??this.uncontrolledValue;e==="state"&&(this.uncontrolledValue=r??n),this.sync(),e==="state"&&this.alive&&this.#e!==a&&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.#l();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)};#l(){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,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#s(r),this.lastSelected=r};#s(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(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||je(e))return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.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 a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function Tg(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",ms)}Tg();var fs=class extends V{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.previousElementSibling,n=0;for(;e;){if(e.localName==="template"&&e.hasAttribute("data-anta-tabs-end"))n++;else if(e.localName==="a-tabs"){if(n===0)break;n--}e=e.previousElementSibling}let r=e;r!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=r,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 r=e!=null?this.tabs?.querySelector(`a-tab[value="${xy(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function xy(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function Sg(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",fs)}Sg();var yy="closerequest",bs=class extends V{static observedAttributes=["state","name"];dialog;headerSlot;bodySlot;footerSlot;#e=0;#t=!1;#n=!1;#a=!1;#r;#o;#l;#s;constructor(){super(),this.#l=this.attachInternals();let e=this.attachShadow({mode:"open"});this.dialog=this.doc.createElement("dialog"),this.dialog.setAttribute("part","dialog"),this.dialog.tabIndex=-1;let n=this.doc.createElement("slot");n.name="close",n.setAttribute("part","close"),this.headerSlot=this.doc.createElement("slot"),this.headerSlot.name="header",this.headerSlot.setAttribute("part","header"),this.bodySlot=this.doc.createElement("slot"),this.bodySlot.setAttribute("part","body"),this.footerSlot=this.doc.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer"),this.headerSlot.addEventListener("slotchange",()=>this.#x()),this.footerSlot.addEventListener("slotchange",()=>this.#h()),this.dialog.append(this.headerSlot,this.bodySlot,this.footerSlot,n),e.append(this.dialog),this.dialog.addEventListener("cancel",r=>{r.preventDefault(),this.#i||this.requestClose()}),this.dialog.addEventListener("pointerdown",r=>{this.#a=r.target===this.dialog}),this.dialog.addEventListener("pointercancel",()=>{this.#a=!1}),this.dialog.addEventListener("click",r=>{let a=this.#a;this.#a=!1,!this.#i&&a&&r.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#a=!1,this.#d?this.#b(ut(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(yy,r=>{r.composedPath().find(a=>a.localName==="a-dialog")===this&&this.requestClose()})}connectedCallback(){this.#x(),this.#d?this.#b(ut(this.getAttribute("state"))):(this.#n||(ut(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#f()),this.#g()}disconnectedCallback(){this.#y(),this.#s?.disconnect(),this.#s=void 0,this.#a=!1,this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#d&&this.#b(ut(this.getAttribute("state"))),this.#g()):e==="name"&&this.#g()}get#d(){return this.hasAttribute("state")}get#i(){return this.hasAttribute("persistent")}get#c(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#c==="open")return;let e=this.#p("open");this.#d||e&&this.#f()}requestClose(){if(this.#c==="closed")return;let e=this.#p("closed");this.#d||e&&this.#u()}#p(e){return this.dispatchEvent(new this.view.CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#c}}))}#b(e){e==="open"?this.#f():this.#u()}#f(){if(this.#t=!0,this.dialog.open||!this.isConnected)return;this.dialog.showModal();let e=Array.from(this.querySelectorAll("[autofocus]")).find(n=>n.closest("a-dialog")===this);e?e.focus({preventScroll:!0}):this.dialog.focus()}#u(){this.#a=!1,this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#h(e=this.headerSlot.assignedNodes().length>0){for(let[n,r]of[["has-header",e],["has-footer",this.footerSlot.assignedNodes().length>0]])r?this.#l.states.add(n):this.#l.states.delete(n)}#x(){if(!this.isConnected)return;let e=this.headerSlot.assignedNodes();if(this.#h(e.length>0),this.#m(e),this.#s?.disconnect(),this.#s=void 0,!!e.length){this.#s=new this.view.MutationObserver(()=>this.#m(e));for(let n of e)this.#s.observe(n,{childList:!0,characterData:!0,subtree:!0})}}#m(e){let n=e.map(r=>r.textContent??"").join(" ").trim();n?this.dialog.setAttribute("aria-label",n):this.dialog.removeAttribute("aria-label")}#g(){let e=this.isConnected&&!this.#d&&!!this.getAttribute("name");e&&!this.#r?this.#w():!e&&this.#r&&this.#y()}#w(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let r=e.target;if(!r||r.nodeType!==1)return;let a=r;a.closest(`[data-dialog-open="${this.view.CSS.escape(n)}"]`)?this.requestOpen():a.closest(`[data-dialog-close="${this.view.CSS.escape(n)}"]`)&&this.requestClose()},this.#o=this.doc,this.#o.addEventListener("click",this.#r)}#y(){this.#r&&(this.#o?.removeEventListener("click",this.#r),this.#o=void 0,this.#r=void 0)}};function Mg(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",bs)}Mg();var gs=class extends V{static observedAttributes=["state"];#e;#t=!1;constructor(){super(),this.#e=this.attachInternals(),this.addEventListener("dismissrequest",e=>{e.composedPath().find(r=>r.nodeType===1&&r.localName==="a-banner")===this&&(e.stopPropagation(),this.#o())}),Co(this,"data-banner-dismiss",()=>this.#o())}get#n(){return this.hasAttribute("state")}get#a(){return this.#e.states.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#r(ut(this.getAttribute("state"))):this.#t||this.#r(this.getAttribute("default-state")==="closed"?"closed":"open"),this.#t=!0}attributeChangedCallback(e,n,r){n!==r&&e==="state"&&this.#n&&this.#r(ut(r))}#r(e){this.#e.states.delete(e==="closed"?"open":"closed"),this.#e.states.add(e)}#o(){if(this.#a==="closed")return;let e=this.#n,n=this.dispatchEvent(new this.view.CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));!e&&!this.#n&&n&&this.#r("closed")}};function Ig(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",gs)}Ig();var Pg=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],wy="bottom-right",Dg=Object.freeze([]),ky=0;function vs(){let t=Dg,e=new Set,n=()=>e.forEach(l=>l());function r(l,c={}){let d=c.id??`t${++ky}`,u=t.findIndex(f=>f.id===d),h=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??h?.placement??wy,duration:"duration"in c?c.duration:h?.duration,politeness:c.politeness??h?.politeness,leaving:!1,rev:h?h.rev+1:0};return t=h?t.map((f,b)=>b===u?p:f):[...t,p],n(),d}function a(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:r,dismiss:a,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return Dg}}}var Ey=Pg,xs=class extends V{#e;#t=!1;#n=[];constructor(){super();let e=this.attachShadow({mode:"open"});this.#e=this.doc.createElement("div"),this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let n of Ey){let r=this.doc.createElement("slot");r.name=n,r.setAttribute("part",`zone ${n}`),this.#e.append(r),this.#n.push(r)}this.#e.addEventListener("slotchange",this.#a),e.append(this.#e)}connectedCallback(){this.#a()}disconnectedCallback(){this.#t=!1}#a=()=>{let e=this.#e;if(typeof e.showPopover!="function")return;let n=this.#n.some(r=>r.assignedElements().length>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}}};function Og(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",xs)}Og();var Cy=220,zg=5e3,Ay="data-toast-dismiss",ys=class extends V{static observedAttributes=["leaving","rev"];#e;#t;#n;#a=[];#r;#o;#l;#s;#d;#i;#c=null;#p=0;#b=0;#f=!1;#u=!1;#h=!1;#x=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",n)}let e=this.attachShadow({mode:"open"});this.#t=this.doc.createElement("slot"),this.#t.setAttribute("part","content"),e.append(this.#t),Co(this,Ay,()=>this.dismiss())}connectedCallback(){if(this.#g(),this.addEventListener("pointerenter",this.#A),this.addEventListener("pointerleave",this.#F),this.addEventListener("focusin",this.#E),this.addEventListener("focusout",this.#P),this.#x=this.matches(":focus-within"),this.#f||this.hasAttribute("leaving")){this.#u=!1,this.#c!=null&&(this.#v(this.#c),this.#c=null),this.dismiss();return}this.#O()}disconnectedCallback(){this.#C(),this.#B(),this.#f&&(this.#c=this.#i?.currentTime??this.#c),this.#i?.cancel(),this.#i=void 0,this.#h=!1,this.#x=!1,this.removeEventListener("pointerenter",this.#A),this.removeEventListener("pointerleave",this.#F),this.removeEventListener("focusin",this.#E),this.removeEventListener("focusout",this.#P)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#f&&this.#m():e==="rev"&&this.isConnected&&this.restart()}#m(){this.#B(),this.#f=!1,this.#u=!1,this.#c=null,this.#e?.states?.delete("leaving"),this.isConnected&&this.restart()}get content(){return this.#n??null}set content(e){this.#n=ca(e)?e:void 0,this.#g()}#g(){if(!(this.#n===this.#r&&!(this.#n?.nodeType===11&&this.#n.hasChildNodes()))){for(let e of this.#a)e.parentNode===this&&this.removeChild(e);this.#r=this.#n,this.#a=this.#n?.nodeType===11?Array.from(this.#n.childNodes):this.#n?[this.#n]:[],this.#n&&this.append(this.#n)}}get#w(){let e=this.getAttribute("duration");if(e==null)return zg;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:zg}get#y(){return this.#h||this.#x}#O(){this.#p=this.#w,this.#v(),this.#_()}#v(e=0){if(!Number.isFinite(this.#w)){this.#i?.cancel(),this.#i=void 0;return}try{if(this.#i)this.#i.effect?.updateTiming({duration:this.#w});else{let n=this.view.getComputedStyle(this.#t);this.#i=this.#t.animate?.({"--toast-remaining":[n.getPropertyValue("--_toast-countdown-from").trim(),n.getPropertyValue("--_toast-countdown-to").trim()]},{duration:this.#w,fill:"forwards"})}this.#i&&(this.#i.currentTime=e),(this.#y||this.#f)&&this.#k()}catch{}}#D(e){try{this.#i&&e(this.#i)}catch{}}#k(){this.#D(e=>e.pause())}#S(){this.#D(e=>e.play())}#_(){if(!(this.#o!=null||this.#f||this.#y||!Number.isFinite(this.#w))){if(this.#p<=0){this.dismiss();return}this.#b=Date.now(),this.#s=this.view,this.#o=this.#s.setTimeout(()=>{this.#o=void 0,this.#s=void 0,this.dismiss()},this.#p),this.#S()}}#C(){this.#o!=null&&(this.#s?.clearTimeout(this.#o),this.#o=void 0,this.#s=void 0)}#B(){this.#l!=null&&(this.#d?.clearTimeout(this.#l),this.#l=void 0,this.#d=void 0)}#L(){this.#o!=null&&(this.#p-=Date.now()-this.#b,this.#C(),this.#k())}#A=()=>{this.#h=!0,this.#L()};#F=()=>{this.#h=!1,this.#_()};#E=()=>{this.#x=!0,this.#L()};#P=e=>{ca(e.relatedTarget)&&this.contains(e.relatedTarget)||(this.#x=!1,this.#_())};#M(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#V(){if(this.#M())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 Cy}restart(){this.#f||!this.isConnected||(this.#C(),this.#O())}dismiss(){if(this.#l!=null||this.#u||(this.#f=!0,this.#C(),this.#k(),this.#e?.states?.add("leaving"),!this.isConnected))return;let e=this.#V();this.#d=this.view,this.#l=this.#d.setTimeout(()=>{this.#l=void 0,this.#d=void 0,this.#u=!0,this.dispatchEvent(new this.view.CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}};function Lg(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",ys)}Lg();var Ty=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?et(r,"--avatar-size",l):l,h=te(o,"--avatar-radius",u),p=Y(a,"--avatar-badge-tone-source",h);return m("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:J(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:p,...c})};var Sy=({value:t,max:e=100,tone:n,size:r,round:a,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,h=typeof t=="number"&&Number.isFinite(t)?t:0,p=Number.isFinite(e)&&e>0,f=p?Math.min(100,Math.max(0,h/e*100)):0,b=Math.round(f),x=p?Math.min(e,Math.max(0,h)):0,g=[o,!u&&`${b}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0),y=u?l:{"--progress-value":h,"--progress-max":p?e:0,...l};return m("a-progress",{value:u?!1:h,max:e,tone:ee(n),size:r&&r!=="medium"?r:void 0,round:J(a),role:"progressbar","aria-valuenow":u?void 0:x,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:p?e:100,"aria-label":g,class:s,style:te(a,"--progress-round",Y(n,"--progress-tone-source",y)),...d,children:Bt(c)?c:I("a-progress-label",{children:[!u&&m("a-progress-number",{children:`${b}%`}),o!=null&&m("a-progress-text",{children:o}),i!=null&&m("a-progress-hint",{children:i})]})})};var Od=({tone:t,value:e,max:n=100,size:r,speed:a,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,h=u!=null?u/d*100:void 0,p={...s,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...h!=null?{"--loader-value":`${h}%`}:{}},f=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 m("a-loader",{tone:ee(t),...c?{value:u}:{},class:i,style:p,...f,...l})};function ie(t){if(!nu()||typeof window>"u")return t;let[e,n]=K(!1);return ru(()=>n(!0),[]),e?t:{}}var st=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>m("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:J(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:te(n,"--tooltip-round",l),...d,children:c});function My({attributes:t,children:e,expandableInert:n}){let[r,a]=K({expanded:!1,overflowing:!1}),o=Be(()=>s=>{let{detail:l,isOwn:c}=X(s);!c||!l||a(d=>d.expanded===l.expanded&&d.overflowing===l.overflowing?d:l)},[]),i=ie({ontextpresentationchange:o});return I("a-text",{...t,"expandable-inert":n?"":void 0,...i,children:[m("a-button",{role:"button",tabIndex:0,priority:"quaternary",paddingless:""}),m("a-text-content",{inert:!!(n&&r.overflowing&&!r.expanded),children:e})]})}var ws=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,expandableInert:s,className:l,style:c,children:d,...u})=>{let h=wo(a),p=ee(e),f=Y(p,"--text-tone-source",h!=null&&h>1?{...c,"--line-clamp":h}:c),b=o&&h!=null,x={priority:t,tone:p,size:n,inline:r?"":void 0,truncate:h!=null?String(h):void 0,expandable:b?"":void 0,collapsible:b&&i?"":void 0,class:l,style:f,...u};return b?m(My,{attributes:x,expandableInert:s,children:d}):I("a-text",{...x,children:[d,h!=null&&!b&&m(st,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function Iy(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=Oo(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var Dy=({display:t,round:e,gap:n,includeRectsFor:r,padding:a,margin:o,observe:i,observeOffscreen:s,throttle:l,fade:c,fadeSize:d,onMeasureChange:u,onContextChange:h,className:p,style:f,children:b,...x})=>{let g=te(e,"--box-round",f);return g=et(n,"--box-gap",g),g=et(a,"--box-padding",g),g=et(o,"--box-margin",g),g=et(c?d:void 0,"--box-fade-size",g),m("a-box",{display:t==="block"?void 0:t,round:J(e),gap:n!=null?"":void 0,"include-rects-for":r,padding:a!=null?"":void 0,margin:o!=null?"":void 0,observe:Iy(i,u,h),"observe-offscreen":s?"":void 0,throttle:l,fade:c?"":void 0,"fade-size":c&&d!=null?fr(d):void 0,onmeasurechange:Fn(u),oncontextchange:Fn(h),class:p,style:g,...x,children:b})};function zd(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function Bg(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function Ng(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function Rg(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":zd(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var Py=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>m("a-capture",{"wheel-capture":zd(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...Bg(t?r:void 0),...Ng(o),...Rg(s),onwheelinput:Fn(a),onpointerinput:Fn(i),onpaninput:Fn(l),class:c,...u,children:d});var Oy=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>{let i=ie({onstatechange:n?s=>{let{event:l,detail:c,isOwn:d}=X(s);d&&c&&n(l,{next:c.next==="maximized",prev:c.prev==="maximized"})}:void 0});return m("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,...i,class:r,...o,children:a})};var Ld=({level:t=2,priority:e,tone:n,font:r,truncate:a,className:o,style:i,children:s,...l})=>{let c=wo(a),d=ee(n),u=Y(d,"--title-tone-source",c!=null?{...i,"--line-clamp":c}:i);return I("a-title",{level:String(t),priority:e,tone:d,font:r,truncate:c!=null?String(c):void 0,role:"heading","aria-level":t,class:o,style:u,...l,children:[s,c!=null&&m(st,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var pe=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return m("a-icon",{shape:t,class:r,style:i,...s,...o})};var ks=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let h=ee(a),p=Y(h,"--tag-tone-source",c),f=r!=null,b=t!=null&&n==null&&r==null&&d==null&&e==null;return I("a-tag",{tone:h,"aria-label":b?`${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:p,...u,children:[t&&m(pe,{shape:t}),n!=null&&(f?m("a-tag-label",{children:n}):m("a-tag-value",{children:n})),f&&m("a-tag-value",{children:r}),d,e&&m(pe,{shape:e})]})};var me=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:h,onClick:p,href:f,target:b,rel:x,download:g,ping:y,type:k,form:D,className:L,style:R,children:B,...N})=>{let A=ee(e),T=d||c,W=te(h,"--button-round",Y(A,"--button-tone-source",R)),w=a!=null&&s==null&&B==null&&o==null,O={role:"button",priority:t,tone:A,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:J(h),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:T?-1:0,"aria-disabled":T?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":w?a:void 0,"data-anta-icon-only":w?"":void 0,class:L,style:W,onClick:T?void 0:p},S=I(ce,{children:[a&&m("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&m("a-button-label",{children:s}),yo(B,"a-button-label"),o&&m("a-icon",{shape:o,"aria-hidden":"true"})]});if(f!=null){let H={...O,disabled:T||void 0};return m("a",{href:T?void 0:f,"data-anta":"",target:b,rel:x,download:g,ping:y,...H,...N,children:S})}return m("a-button",{type:k,form:D,...O,...N,children:S})};function zy(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,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":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>{let d=X(c);d.isOwn&&i(d.detail?.ok??!1)}:void 0,oncopyrequest:o?c=>{X(c).isOwn&&o()}:void 0}}function Es(t){let{oncopydone:e,oncopyrequest:n,...r}=zy(t);return{...r,...ie({oncopydone:e,oncopyrequest:n})}}function Cs(t){return t.copyNode!=null&&t.copyNode!==!1}var Bd=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":h,...p})=>{let f=e==="none"?void 0:t??"copy",{shownIcon:b,shownTone:x,handleCopied:g}=Ao(f,r,a),y=e==="trailing"?{iconTrailing:b}:e==="none"?{}:{icon:b},k=d!=null||u!=null,D=Es({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:g,toast:e==="none",copiedLabel:n});return I(me,{...y,label:d,tone:e==="none"?r:x,"aria-label":h??(k?void 0:"Copy"),"data-anta-icon-only":!k&&b!=null?"":void 0,"data-copy-node-button":Cs({copyNode:s})?"":void 0,...p,children:[u,m("a-copy",{...D})]})};var Ve=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,onactivedescendant:c,round:d,stopPropagation:u,role:h="menu",className:p,style:f,children:b,...x})=>{let g=ie({onstatechange:l?y=>{let{event:k,detail:D,isOwn:L}=X(y);L&&D&&l(k,{next:D.next==="open",prev:D.prev==="open"})}:void 0,onactivedescendant:c});return m("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",...g,round:J(d),"stop-propagation":u===void 0||u===!1?void 0:u===!0?"":Array.isArray(u)?u.join(" "):u,role:h,"aria-orientation":h==="menu"||h==="listbox"?"vertical":void 0,class:p,style:et(i,"--menu-padding",te(d,"--menu-round",f)),...x,children:b})};var Nd={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function Ly(t){let e=[],n="",r=()=>{n&&(e.push(Nd[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)Nd[a]?(r(),e.push(Nd[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function By(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(Ly).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var xe=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:h,value:p,onSelect:f,href:b,target:x,rel:g,download:y,ping:k,role:D,className:L,style:R,children:B,...N})=>{let A=t,T=s==="checkbox"||s==="radio"||s==="check"||s==="switch",W=s==="checkbox"||s==="switch"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",w=T?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,O=i&&(s===void 0||s==="check"),S=u==="selected"&&!i?void 0:d,H=ee(S),j=s==="switch"?{"data-menu-open":""}:{},C=N["aria-keyshortcuts"],q=r?By(r):void 0,Q=r?m("kbd",{"aria-hidden":C??q?"true":void 0,children:r}):null,Z=e!=null&&(n!=null?I("a-menu-item-text",{children:[m("a-menu-item-label",{children:e}),m("a-menu-item-hint",{children:n})]}):m("a-menu-item-label",{children:e}));if(b!=null){let ne={"data-anta-menu-item":"",role:D??"menuitem",href:o?void 0:b,target:x,rel:g,download:y===!0?"":y||void 0,ping:k,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":q,tone:H,style:Y(S,"--menu-item-tone-source",R),onClick:f&&!o?fe=>f(fe,{value:p,label:e}):void 0,class:L};return I("a",{...ne,...N,children:[t&&m("a-icon",{shape:t,"aria-hidden":"true"}),Z,B,Q,a&&m("a-icon",{shape:a,"aria-hidden":"true"})]})}return I("a-menu-item",{role:D??W,tabIndex:0,disabled:o?"":void 0,selected:O?"":void 0,"aria-checked":w,tone:H,style:Y(S,"--menu-item-tone-source",R),submenu:h?"":void 0,"aria-haspopup":h?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":q,onmenuselect:f?ne=>f(ne,{value:p,label:e}):void 0,class:L,...N,...j,children:[c!=null?m("span",{"aria-hidden":"true","data-indicator":"",children:c}):s==="checkbox"?m("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:H,style:Y(S,"--checkbox-tone-source")}):s==="radio"?m("a-radio",{"aria-hidden":"true",selected:!!i,tone:H,style:Y(S,"--radio-tone-source")}):null,A&&m("a-icon",{shape:A,"aria-hidden":"true"}),Z,B,Q,s==="switch"&&c==null&&m("a-switch",{"data-menu-item-switch":"","aria-hidden":"true",tabIndex:-1,state:i?"checked":"unchecked",disabled:o?"":void 0,size:"small",tone:H,style:Y(S,"--switch-tone-source",Y(S,"--switch-off-tone-source"))}),(()=>{let ne=h?a??"chevron-right":a;return!h&&!a&&s==="check"&&c==null&&(ne=i?"check":"blank"),ne?m("a-icon",{shape:ne,"aria-hidden":"true"}):null})()]})};var Rd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...h})=>{let p=n==="none"?void 0:e,{shownIcon:f,shownTone:b,handleCopied:x}=Ao(p,a,o),g=n==="trailing"?{iconTrailing:f}:n==="none"?{}:{icon:f},y=Es({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:x,toast:n==="none",copiedLabel:r});return I(xe,{label:t,tone:b,...g,"data-menu-open":"","data-copy-node-button":Cs({copyNode:l})?"":void 0,...h,children:[u,m("a-copy",{...y})]})};var Ny=new Set(["\u2192","/","\u2022","\u25B8"]);function _g(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function Ry(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Fg(t){return t.current?{"aria-current":"page"}:{}}function _y(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=Fg(t);if(_g(t)){let h={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return m(Bd,{...h,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return m(me,{...u,children:s},i)}function Fy(t,e){let{label:n,current:r,onClick:a,...o}=t,i=Fg(t);return _g(t)?m(Rd,{...o,label:n,onSelect:a,...i},e):m(xe,{...o,label:n,onSelect:a,...i},e)}var Vy=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":h,...p})=>{let f=Ry(t,a,o),b=Ny.has(r),x=b?r:m(pe,{shape:r});return m("a-breadcrumbs",{role:"navigation","aria-label":h??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":b?void 0:"",class:d,style:u,...p,children:f.flatMap((g,y)=>{let k=g.kind==="overflow"?[m(me,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${y}`),m(Ve,{autoWidth:!0,children:g.items.map((D,L)=>Fy(D,L))},`menu-${y}`)]:[_y(g.item,e,n,s,l,c,y)];return y<f.length-1&&k.push(m("a-breadcrumb-separator",{"aria-hidden":"true",children:x},`separator-${y}`)),k})})};var Hy=["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-user","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-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],jy={"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"],"circle-user":["avatar","person","account","contact","profile"],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"],"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 Vg=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",Hg=t=>t==="indeterminate"?"indeterminate":t==="checked",qy=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Uy=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:h,style:p,children:f,tabIndex:b,...x})=>{let g=te(i,"--checkbox-round",Y(r,"--checkbox-tone-source",Y(r,"--checkbox-off-tone-source",p))),y=x["aria-label"],k=(typeof y=="string"?y:void 0)??d??(typeof f=="string"?f:void 0),D=s?A=>{let{event:T,detail:W}=X(A);W&&s(T,{next:Hg(W.next),prev:Hg(W.prev)})}:void 0,L=l||c?A=>{l?.(A),c?.(A,qy(A.currentTarget))}:void 0,R=t!==void 0?Vg(t):void 0,B=t===void 0&&e!==void 0?Vg(e):void 0,N=d!=null||f!=null;return I("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":k,...x,state:R,"default-state":B,disabled:n?"":void 0,tone:ee(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:J(i),tabIndex:n?-1:b??0,onstatechange:D,onchange:L,class:h,style:g,children:[N&&I("a-checkbox-label",{children:[d,f]}),u!=null&&m("a-checkbox-hint",{children:u})]})};var Yy=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Wy=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:h,className:p,style:f,children:b,tabIndex:x,...g})=>{let y=te(i,"--switch-round",Y(r,"--switch-tone-source",Y(r,"--switch-off-tone-source",f))),k=g["aria-label"],D=(typeof k=="string"?k:void 0)??u??(typeof b=="string"?b:void 0),L=l?T=>{let{event:W,detail:w}=X(T);w&&l(W,{next:w.next==="checked",prev:w.prev==="checked"})}:void 0,R=c||d?T=>{c?.(T),d?.(T,Yy(T.currentTarget))}:void 0,B=t===void 0?void 0:t?"checked":"unchecked",N=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,A=u!=null||b!=null;return I("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":D,...g,state:B,"default-state":N,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:J(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:x??0,onstatechange:L,onchange:R,class:p,style:y,children:[A&&I("a-switch-label",{children:[u,b]}),h!=null&&m("a-switch-hint",{children:h})]})};var zn=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return m("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var ea=({label:t,className:e,children:n,...r})=>I("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&m("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var Zy=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,indicator:i,indicatorPlacement:s,disabled:l,round:c,open:d,defaultOpen:u,onStateChange:h,className:p,style:f,children:b,...x})=>{let g=d!==void 0,y=ie({onstatechange:h?w=>{let{event:O,detail:S,isOwn:H}=X(w);H&&S&&h(O,{next:S.next==="open",prev:S.prev==="open"})}:void 0}),k=Bt(o)&&typeof o!="boolean"&&(typeof o!="string"||!!o.trim()),D=i==null?"chevron":typeof i=="string"&&(i==="chevron"||i==="triangle"||i==="plus")?i:void 0,L=i!=null&&typeof i=="object"&&"closed"in i&&"open"in i?i:void 0,R=i!=null&&!D&&!L,N=L?[m("a-expander-indicator",{"data-when":"closed","aria-hidden":"true",inert:!0,children:L.closed},"indicator-closed"),m("a-expander-indicator",{"data-when":"open","aria-hidden":"true",inert:!0,children:L.open},"indicator-open")]:[m("a-expander-indicator",{shape:D,"aria-hidden":"true",inert:!0,children:R?typeof i=="object"?i:null:null},"indicator")],A=te(c,"--expander-round",Y(n,"--expander-tone-source",f)),T=typeof t=="object"&&t!==null?m("a-expander-title",{children:t},"title"):m("a-expander-summary",{level:e!=null?String(e):void 0,children:t},"title"),W=k?m("a-expander-actions",{children:o},"actions"):null;return I("a-expander",{state:g?d?"open":"closed":void 0,"default-state":!g&&u?"open":void 0,tone:ee(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:J(c),disabled:l?"":void 0,...y,class:p,style:A,...x,children:[s==="end"?[T,W,...N]:[...N,T,W],m("a-expander-details",{children:b})]})};var dr=t=>t?"":void 0,jg=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.name||void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},$y={email:"email",tel:"tel",url:"url"},Ky={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},Gy={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Ct=({label:t,hint:e,status:n,statusIcon:r,tone:a,priority:o,size:i,round:s,value:l,defaultValue:c,multiline:d,rows:u,maxRows:h,clearable:p,leading:f,trailing:b,type:x,autoComplete:g,inputMode:y,autoFocus:k,name:D,placeholder:L,truncate:R=!0,disabled:B,readOnly:N,button:A,required:T,dimActions:W,spellCheck:w,maxLength:O,minLength:S,pattern:H,min:j,max:C,step:q,role:Q,onInput:Z,onChange:ne,onValueChange:fe,onClearClick:oe,onClearInput:ye,children:He,className:Ee,style:de,...We})=>{let At=ie({oninput:Z||fe?v=>{Z?.(v),fe?.(v,jg(v))}:void 0,onchange:ne||fe?v=>{ne?.(v),fe?.(v,jg(v))}:void 0,onclearclick:oe?v=>oe(X(v).event):void 0,onclearinput:ye?v=>ye(X(v).event):void 0}),Ze=n&&n!=="neutral"?n:void 0,Qe=r===void 0?Ze?Gy[Ze]:void 0:r,ze=x==="search",Te=ze?void 0:x,De=f??(ze?m(pe,{shape:"search"}):void 0),M=ze?p??!0:p;return I("a-input",{priority:o&&o!=="primary"?o:void 0,size:i&&i!=="medium"?i:void 0,round:J(s),value:l,defaultvalue:c,multiline:dr(d||u!=null),rows:u!=null?String(u):void 0,maxrows:h!=null?String(h):void 0,status:Ze,tone:ee(a),type:!d&&u==null?Te:void 0,name:D,placeholder:L,truncate:dr(R),disabled:dr(B),readonly:dr(N),button:dr(A),required:dr(T),"dim-actions":dr(W),autocomplete:g??(!d&&u==null&&x?$y[x]:void 0),inputmode:y??(!d&&u==null&&x?Ky[x]:void 0),autofocus:k?!0:void 0,spellcheck:w!=null?w?"true":"false":void 0,maxlength:O!=null?String(O):void 0,minlength:S!=null?String(S):void 0,pattern:H,min:j,max:C,step:q,"aria-invalid":n==="critical"?"true":void 0,role:Q??(ze?"searchbox":void 0),...At,class:Ee,style:te(s,"--input-round",Y(a,"--input-tone-source",de)),...We,children:[t!=null&&m("a-input-label",{slot:"label",children:t}),De!=null&&m("a-input-leading",{slot:"leading",children:De}),M&&m("a-input-clear",{slot:"clear",children:m(me,{priority:"tertiary",size:i,round:!!s,icon:"x","aria-label":"Clear","data-custom-event":vn})}),b!=null&&m("a-input-trailing",{slot:"trailing",children:b}),e!=null&&I("a-input-hint",{slot:"hint",children:[Qe&&m(pe,{shape:Qe,"aria-hidden":"true"}),m("span",{children:e})]}),He]})};var As=(t,e)=>Number.isFinite(t)?t:e,Xy=(t,e)=>{let n=As(t,0);return{min:n,max:Math.max(n,As(e,100))}},qg=t=>{let e=pr(t);if(e.target&&e.currentTarget&&e.target!==e.currentTarget)return;let n=e.detail;if(!(!n||typeof n.min!="number"||typeof n.max!="number"||typeof n.step!="number"))return{...n,value:Array.isArray(n.value)?[...n.value]:n.value}},Jy=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:h,thumbFill:p,round:f,valueDisplay:b="end",valuePrefix:x,valueSuffix:g,markers:y,trackClick:k="drag-only",inverted:D,onInput:L,onChange:R,onValueChange:B,onValueCommit:N,onKeyDown:A,onPointerDown:T,onPointerMove:W,className:w,style:O,children:S,tabIndex:H,...j})=>{let C=fr(u),q=fr(h),Q=et(h,"--anta-slider-thumb-size",et(u,"--anta-slider-track-size",te(f,"--slider-round",Y(c,"--slider-thumb-tone-source",Y(l,"--slider-tone-source",O))))),{min:Z,max:ne}=Xy(r,a),fe=As(o,1)>0?As(o,1):1,oe=j["aria-label"],ye=(typeof oe=="string"?oe:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),He=e!=null,Ee=Array.isArray(He?e:n),de=M=>Array.isArray(M)?`${M[0]} ${M[1]}`:typeof M=="number"?String(M):void 0,We=b==="inline"&&t==null?"end":b,At=M=>M.value<=Z?"0%":M.value>=ne?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(M.value-Z)/(ne-Z)} + var(--anta-slider-thumb-size) / 2)`,Ze=M=>M.value<=Z?"start":M.value>=ne?"end":void 0,Qe=M=>{let v={};return Object.assign(v,{"--slider-marker-position":At(M)}),v},De=ie({oninput:L||B?M=>{let v=qg(M);L?.(M),v&&B?.(M,v)}:void 0,onchange:R||N?M=>{let v=qg(M);R?.(M),v&&N?.(M,v)}:void 0,onkeydown:A,onpointerdown:T,onpointermove:W});return I("a-slider",{...To(de(e),de(n)),min:Z,max:ne,step:fe,name:i,disabled:s?"":void 0,tone:ee(l),"thumb-tone":c||void 0,size:d&&d!=="medium"?d:void 0,"track-size":C,"thumb-size":q,"thumb-fill":p?"":void 0,round:J(f),"track-click":k==="jump"?"jump":void 0,inverted:D?"":void 0,"value-display":We==="end"?void 0:We,"value-prefix":x,"value-suffix":g,role:Ee?"group":"slider","aria-label":ye,tabIndex:s||Ee?-1:H??0,...De,class:w,style:Q,...j,children:[t!=null&&m("span",{slot:"label",children:t}),y?.map((M,v)=>{let E=Ze(M);return m("span",{slot:"markers",style:Qe(M),"data-slider-marker-start":E==="start"?"":void 0,"data-slider-marker-end":E==="end"?"":void 0,children:M.label},`${M.value}-${v}`)}),S]})};function Ug(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=Ug(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Qy(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=Ug(t))&&(r&&(r+=" "),r+=e);return r}var Yg=Qy;var ta=ke.PlainDate.compare,Wg=new Map;function Wt(t,e){let n=`${t}|${JSON.stringify(e)}`,r=Wg.get(n);return r||(r=new Intl.DateTimeFormat(t,e),Wg.set(n,r)),r}var mo=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ye(t){if(!t)return null;try{return ke.PlainDate.from(t)}catch{return null}}function _d(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Ln(t,e,n){return e&&ta(t,e)<0?e:n&&ta(t,n)>0?n:t}function Fd(t,e,n){return e!=null&&ta(t,e)<0||n!=null&&ta(t,n)>0}var e1=t=>Array.from(t).slice(0,2).join("");function Zg(t,e=_d(t)){let n=ke.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=Wt(t,{weekday:"short",timeZone:"UTC"}),o=Wt(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(mo(l));i.push({short:c,narrow:e1(c),long:o.format(mo(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function Vd(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=ke.Now.plainDateISO(),weeks:s=6}=t,l=_d(n),c=e.year,d=e.month,u=e.with({day:1}),h=(u.dayOfWeek-l+7)%7,p=u.subtract({days:h}),f=Wt(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),b=[];for(let x=0;x<s;x++){let g=[];for(let y=0;y<7;y++){let k=p.add({days:x*7+y});g.push({date:k,iso:k.toString(),day:k.day,weekday:k.dayOfWeek,outside:k.month!==d||k.year!==c,disabled:Fd(k,r,a),today:i!=null&&ta(k,i)===0,selected:o!=null&&ta(k,o)===0,label:f.format(mo(k))})}b.push(g)}return{year:c,month:d,heading:Wt(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(mo(e)),weekdays:Zg(n,l),weeks:b}}var $g=new Date(Date.UTC(2026,5,15)),Hd={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function t1(t){try{return Wt(t,Hd).formatToParts($g).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function Ts(t){try{return Wt(t,Hd).formatToParts($g).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function Ss(t,e){return Wt(e,Hd).format(mo(t))}function n1(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=Wt(e,{month:"long",timeZone:"UTC"}),a=Wt(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function fo(t,e,n={}){let r=u=>Fd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=Ye(a);return u?r(u):null}let o=t1(e),i=n1(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=ke.Now.plainDateISO().year;else if(s.length>=2){let[u,h]=s;u>31?[l,d]=[u,h]:h>31?[l,d]=[h,u]:[d,l]=[u,h]}else return null;else if(s.length===1){let u=a.replace(/\D/g,"");if(u.length!==8)return null;let h=0,p={};for(let f of o){let b=f==="year"?4:2;p[f]=Number(u.slice(h,h+b)),h+=b}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),h={};u.forEach((p,f)=>h[p]=s[f]),c=h.month,d=h.day,l=ke.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((h,p)=>u[h]=s[p]),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 r(ke.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function Kg(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return ke.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function Ms(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=Kg(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=fo(o,e,n);return s?s.toPlainDateTime(i??ke.PlainTime.from("00:00")):null}function bo(t){try{let e=Wt(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function jd(t,e,n=bo(e)){let r=Ss(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function qd(t,e=bo(t)){return`${Ts(t)} HH:MM${e?" AM":""}`}var Ud=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:h,style:p,"aria-label":f,...b})=>{let x=t!==void 0,g=a||(typeof navigator<"u"?navigator.language:"en-US"),y=Ye(n),k=Ye(r),D=ke.Now.plainDateISO(),[L,R]=K(()=>Ye(t??e)),B=x?Ye(t):L,[N,A]=K(()=>Ln(Ye(t??e)??D,y,k)),[T,W]=K(t),w=N;if(t!==T){W(t);let M=Ye(t);x&&R(M),M&&(w=Ln(M,y,k),A(w))}let[O,S]=K(null),[H,j]=K(!1),C=Vd({anchor:w,locale:g,min:y,max:k,selected:B,today:D}),q=w.toString(),[Q,Z]=K(l);l!==Q&&(Z(l),l!==void 0&&S({iso:q,n:l}));let ne=y?y.year:Math.min(w.year-3,k?.year??1/0),fe=k?k.year:Math.max(w.year+3,y?.year??-1/0),oe=[];for(let M=ne;M<=fe;M++)oe.push(M);let ye=Be(()=>Array.from({length:12},(M,v)=>ke.PlainDate.from({year:2e3,month:v+1,day:1}).toLocaleString(g,{month:"long"})),[g]),He=(M,v)=>y!=null&&(M<y.year||M===y.year&&v<y.month)||k!=null&&(M>k.year||M===k.year&&v>k.month),Ee=M=>{s||A(v=>Ln(v.add({months:M}),y,k))},de=(M,v)=>{s||A(E=>Ln(E.with({year:M,month:v}),y,k))},We=Be(()=>{let M=(v,E)=>{let F=E+1,z=v===w.year&&F===w.month;return m(xe,{label:ye[E],selected:z,disabled:He(v,F)||void 0,"data-menu-open":"",onSelect:()=>{de(v,F),j(!1)},children:z&&m("span",{className:"jump-dot","aria-hidden":"true"})},`${v}-${F}`)};return oe.length===1?ye.map((v,E)=>M(oe[0],E)):oe.map(v=>I(xe,{submenu:!0,label:String(v),selected:v===w.year,children:[v===w.year&&m("span",{className:"jump-dot","aria-hidden":"true"}),m(Ve,{children:ye.map((E,F)=>M(v,F))})]},v))},[ye,w.year,w.month,ne,fe,n,r,s]),At=M=>{let{event:v,detail:E}=X(M);if(!E||(c?.(v,E),E.reason==="user"&&(x||v.defaultPrevented)))return;let F=Ye(E.next);x||R(F),A(Ln(F??N,y,k))},Ze=M=>{let v="nativeEvent"in M?M.nativeEvent:M;d?.(v),u?.(v,{value:v?.target?.value||null,name:o})},Qe=M=>{if(s)return;let{detail:v}=X(M),E=Ye(v?.date??null);if(!E)return;let F=Ln(E,y,k);A(F),S(z=>({iso:F.toString(),n:(z?.n??0)+1}))},ze=s||y!=null&&ke.PlainDate.compare(N.with({day:1}).subtract({days:1}),y)<0,Te=s||k!=null&&ke.PlainDate.compare(N.with({day:1}).add({months:1}),k)>0,De=ie({onstatechange:At,onchange:Ze,onnavigate:Qe});return I("div",{className:Yg("anta-calendar",h),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...b,children:[I("div",{"data-part":"header",children:[m(me,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:ze,onClick:()=>Ee(-1)}),m(me,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${C.heading} \u2014 choose month and year`,disabled:s||ze&&Te,children:C.heading}),m(Ve,{placement:"bottom",open:H,onStateChange:(M,{next:v})=>j(v),children:We}),m(me,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:Te,onClick:()=>Ee(1)})]}),I("a-calendar",{role:"group","aria-label":f??C.heading,name:o,...To(t,e),disabled:s?"":void 0,"data-focus":O?`${O.iso}#${O.n}`:void 0,...De,children:[C.weekdays.map((M,v)=>m("span",{"data-part":"weekday","data-weekend":M.weekend?"":void 0,"aria-hidden":"true",children:M.narrow},`wd${v}`)),C.weeks.flat().map(M=>{let v=M.today&&!M.selected?{priority:"secondary"}:{priority:"tertiary",selected:M.selected,tone:M.selected?"brand":void 0};return I(me,{...v,size:i,disabled:s||M.disabled,tabIndex:M.iso===q?0:-1,"aria-label":M.label,"aria-hidden":M.outside?"true":void 0,"aria-current":M.today?"date":void 0,"data-part":"day-cell","data-date":M.iso,"data-today":M.today?"":void 0,"data-outside":M.outside?"":void 0,children:[M.day,M.today&&m(st,{children:"Today"})]},M.iso)})]})]})};var Is=t=>t?"":void 0,Gg=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.name||void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},r1={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Yd=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:h,name:p,disabled:f,readOnly:b,required:x,icon:g,clearable:y,dimActions:k,trailing:D,autoFocus:L,onValueChange:R,onClearClick:B,onClearInput:N,children:A,className:T,style:W,...w})=>{let O=ie({oninput:R?j=>R(j,Gg(j)):void 0,onchange:R?j=>R(j,Gg(j)):void 0,onclearclick:B?j=>B(X(j).event):void 0,onclearinput:N?j=>N(X(j).event):void 0}),S=n&&n!=="neutral"?n:void 0,H=r===void 0?S?r1[S]:void 0:r;return I("a-input-time",{size:o&&o!=="medium"?o:void 0,round:J(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:h,status:S,tone:ee(a),name:p,disabled:Is(f),readonly:Is(b),required:Is(x),"dim-actions":Is(k),autofocus:L?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,...O,class:T,style:te(i,"--input-time-round",Y(a,"--input-time-tone-source",W)),...w,children:[t!=null&&m("a-input-time-label",{slot:"label",children:t}),g!==!1&&m("a-input-time-leading",{slot:"leading",children:m(pe,{shape:g??"clock"})}),y&&m("a-input-time-clear",{slot:"clear",children:m(me,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":vn})}),D!=null&&m("a-input-time-trailing",{slot:"trailing",children:D}),e!=null&&I("a-input-time-hint",{slot:"hint",children:[H&&m(pe,{shape:H,"aria-hidden":"true"}),m("span",{children:e})]}),A]})};var a1=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:h,placement:p,offset:f,clearable:b,icon:x,time:g,hour12:y,onValueChange:k,className:D,style:L,...R})=>{let B=a||(typeof navigator<"u"?navigator.language:"en-US"),N=Ye(n),A=Ye(r),T=g?y??bo(B):!1,W=Be(()=>d??(g?qd(B,T):Ts(B)),[d,g,B,T]),w=z=>{if(!z)return"";let U=Ye(z.slice(0,10));if(!U)return"";if(!g)return Ss(U,B);let Le=z.length>=16&&z[10]==="T",re=U.toPlainDateTime(ke.PlainTime.from(Le?z.slice(11,16):"00:00"));return jd(re,B,T)},O=z=>!z||!g?z:z.length<=10?`${z}T00:00`:z.slice(0,16),S=t!==void 0,[H,j]=K(()=>O(e)),C=S?t:H,q=C?C.slice(0,10):"",Q=!!C&&C.length>=16&&C[10]==="T",Z=Q&&parseInt(C.slice(11,13),10)||0,ne=Q?C.slice(14,16):"00",[fe,oe]=K(()=>w(C)),[ye,He]=K(!1),[Ee,de]=K(!1),[We,At]=K(0),[Ze,Qe]=K(C);C!==Ze&&(Qe(C),oe(w(C)),de(!1));let ze=z=>{S||j(z||void 0),k?.(z,{value:z,name:o})},Te=z=>`${z}T${String(Z).padStart(2,"0")}:${ne}`,De=z=>{de(!1),z===(C??"")?oe(w(z)):ze(z)},M=z=>{let U=z.trim();if(!U)return de(!1),C?ze(""):oe(""),!0;let Le=g?Ms(U,B,{min:N,max:A}):fo(U,B,{min:N,max:A});if(!Le)return de(!0),!1;let re=g?Le.toString({smallestUnit:"minute"}):Le.toString();return De(re),!0},v=Be(()=>{let z=fe.trim();if(!z)return q;let U=g?Ms(z,B,{min:N,max:A}):fo(z,B,{min:N,max:A});return U?U.toString().slice(0,10):null},[fe,g,B,q,n,r]),[E,F]=K(q);return v!==null&&v!==E&&F(v),I(ce,{children:[m(Ct,{label:l,hint:Ee?`Unrecognized date. Try ${W}.`:c,status:Ee?"critical":u,size:i,round:h,disabled:s,clearable:b,leading:x===!1?void 0:m(pe,{shape:x??"calendar-days"}),value:fe,placeholder:W,inputMode:g?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":ye?"true":"false",onInput:z=>{oe(z.currentTarget.value),Ee&&de(!1)},onChange:z=>M(z.currentTarget.value),onKeyDown:z=>{je(z)||((z.key==="ArrowDown"||z.key==="ArrowUp")&&!s&&(z.preventDefault(),At(U=>U+1)),z.key==="Enter"&&!s&&(z.preventDefault(),M(z.currentTarget.value)&&He(!1)))},truncate:!0,className:D,style:L,...R}),m(Ve,{role:"dialog","aria-label":g?"Choose date and time":"Choose date",open:ye,placement:p??"bottom-start",offset:f,autoWidth:!0,inset:8,onStateChange:(z,{next:U})=>He(U),children:I("div",{"data-menu-open":"",children:[m(Ud,{value:E,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:We,onStateChange:(z,{next:U,reason:Le})=>{if(Le!=="user")return;let re=U??"";De(g&&re?Te(re):re),g||He(!1)}}),g&&I("a-input-date-time-container",{children:[m(Yd,{size:i,locale:a,hour12:y,disabled:s,"aria-label":"Time",value:Q?`${String(Z).padStart(2,"0")}:${ne}`:"",onValueChange:(z,{value:U})=>{if(pr(z)?.type!=="change")return;let re=q||ke.Now.plainDateISO().toString();ze(U?`${re}T${U}`:re)}}),m(me,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>He(!1)})]})]})}),o?m("input",{type:"hidden",name:o,value:C??""}):null]})};var Bn=t=>typeof t=="string"?{value:t,label:t}:t;function na(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var ra=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),aa=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(m("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var o1=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,onFocus:i,onBlur:s,onInput:l,onKeyDown:c,filter:d=!0,...u}=t,h=n!==void 0,[p,f]=hr(n,r??""),b=p??"",[{open:x},g]=K({open:!1,focused:!1}),y=T=>g(W=>({...W,open:T})),k=Be(()=>e.map(Bn),[e]),D=typeof d=="function",L=d!==!1&&!D?na(b):null,R=D?k.filter(T=>d(T,b)):k.filter(T=>ra(T,L)),B=x&&R.length>0,N=T=>{h||f(T),a?.(T)},A=T=>{N(T.value),o?.(T),y(!1)};return I(ce,{children:[m(Ct,{...u,value:b,defaultValue:r,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":B?"true":"false","aria-autocomplete":"list",onFocus:T=>{i?.(T),g({open:!0,focused:!0})},onBlur:T=>{s?.(T),g({open:!1,focused:!1})},onInput:T=>{let W=T.currentTarget.value;l?.(T),N(W),g(w=>({...w,open:w.focused}))},onKeyDown:T=>{c?.(T),T.key==="Enter"&&!T.defaultPrevented&&!da(T)&&y(!1)}}),m(Ve,{role:"listbox",open:B,onStateChange:(T,{next:W})=>{y(W)},children:R.map((T,W)=>{let{className:w,style:O,...S}=dt(T,!0);return m(xe,{...S,role:"option",tabIndex:-1,icon:T.icon,label:aa(T.label??T.value,L),hint:T.hint?aa(T.hint,L):T.hint,tone:T.tone,disabled:T.disabled,value:T.value,onMouseDown:H=>H.preventDefault(),onSelect:()=>A(T),className:w,style:O},`${T.value}-${W}`)})})]})};var i1=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),s1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:h,toneScope:p,size:f,disabled:b,orientation:x,className:g,style:y,...k})=>{let D=e!==void 0,[L,R]=hr(e,n),B=new Set;for(let S of t)B.has(S.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(S.value)} \u2014 values must be unique.`),B.add(S.value);let N=Ls(),A=Ls(),T=b?void 0:t.find(S=>S.value===L)?.value??t.find(S=>!S.disabled)?.value,O=ie({onstatechange:S=>{let{event:H,detail:j}=X(S);j&&(r?.(H,j),!D&&(j.reason==="user"&&H.defaultPrevented||R(j.next??void 0)))},onchange:a||o?S=>{a?.(S),o?.(S,i1(S.currentTarget))}:void 0,onfocusin:i,onfocusout:s});return I("a-radio-group",{role:"radiogroup","aria-disabled":b?"true":void 0,"aria-labelledby":c?N:void 0,"aria-describedby":d?A:void 0,...k,state:D?e:void 0,"default-state":D?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:ee(h),"tone-scope":p&&p!=="all"?p:void 0,size:f&&f!=="medium"?f:void 0,disabled:b?"":void 0,orientation:x&&x!=="vertical"?x:void 0,...O,class:g,style:Y(h,"--radio-tone-source",Y(h,"--radio-off-tone-source",y)),children:[c&&m("a-radio-group-label",{id:N,children:c}),d&&m("a-radio-group-hint",{id:A,children:d}),m("a-radio-list",{children:t.map(S=>{let H=b||S.disabled,{className:j,style:C,...q}=dt(S);return I("a-radio",{...q,role:"radio",value:S.value,"aria-disabled":H?"true":void 0,tabIndex:S.value===T?0:-1,tone:S.tone||void 0,"tone-scope":S.toneScope??(S.tone?p:void 0),size:S.size&&S.size!=="medium"?S.size:void 0,disabled:S.disabled?"":void 0,class:j,style:Y(S.tone,"--radio-tone-source",Y(S.tone,"--radio-off-tone-source",C)),children:[m("a-radio-label",{children:S.label}),S.hint!=null&&m("a-radio-hint",{children:S.hint})]},S.value)})})]})};function Xg(t,e){let n=[],r=[],a=(i,s,l=!1)=>{let c=[];return i.forEach((d,u)=>{if(typeof d!="string"&&Array.isArray(d.submenu)){let h=d,p=l||!!h.disabled,f=a(h.submenu,h.label,p);f.length&&c.push({kind:"submenu",source:h,disabled:p,children:f,key:`sub-${u}-${h.label}`})}else if(typeof d!="string"&&Array.isArray(d.options)){let h=d,p=l||!!h.disabled,f=a(h.options,h.label,p);f.length&&c.push({kind:"group",source:h,disabled:p,children:f,key:`grp-${u}-${h.label}`})}else{let h=Bn(d),p={kind:"option",opt:h,disabled:l||!!h.disabled,group:s};n.push(p),(!e||e(h))&&(r.push(p),c.push(p))}}),c};return{tree:a(t),allLeaves:n,visibleLeaves:r}}function l1(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((p,f)=>p+f.on,0),h=d.reduce((p,f)=>p+f.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:r(u,h)},on:u,total:h}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((p,f)=>p+f.on,0),h=d.reduce((p,f)=>p+f.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:r(u,h)},on:u,total:h}}let s=Bn(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var c1=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,dimActions:h=!0,label:p,hint:f,size:b,status:x,statusIcon:g,round:y,disabled:k,tone:D,toneScope:L,filter:R,selectAll:B=!0,selectAllLabel:N="Select all",clearable:A,clearLabel:T="Clear",renderOption:W,renderIndicator:w,verbose:O,renderSummary:S,renderTrigger:H,renderEmpty:j,className:C,style:q,...Q}=t,Z=a==="multiple",ne=Z?"checkbox":o??"none",fe=ne==="none"?void 0:ne,oe=l,ye=i!==void 0,[He,Ee]=K(s??(Z?[]:null)),de=ye?i:He,[We,At]=K(!1),[Ze,Qe]=K(""),ze=`${p??Q["aria-label"]??"Select"} options`,Te=R!==void 0&&R!==!1,De=Ze.trim(),M=Te&&typeof R!="function"?na(De):null,v=typeof R=="function"||Te&&!!De,E=P=>typeof R=="function"?R(P,De):ra(P,M),{tree:F,allLeaves:z,visibleLeaves:U}=Xg(e,v?E:void 0),Le=Te&&!!De,re=new Set;for(let P of z){let $=String(P.opt.value);re.has($)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(P.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),re.add($)}let dn=new Map(z.map(P=>[P.opt.value,P.opt])),lt=Array.isArray(de)?de:de!=null?[de]:[],Nn=P=>lt.includes(P),ct=lt.map(P=>dn.get(P)).filter(Boolean),oa=z.filter(P=>!P.disabled).map(P=>P.opt.value),Ps=Z&&oa.length>1&&oa.every(P=>lt.includes(P)),Rn=P=>P.label??String(P.value),un="";if(Z){let P=ct.length>0?S?.(ct):void 0;if(P!=null&&P!=="")un=P;else if(Ps)un="All";else if(ct.length===1)un=Rn(ct[0]);else if(ct.length>1){let $=`${ct.length} selected`;un=O?`${$}: ${ct.map(Rn).join(", ")}`:$}}else if(de!=null){let P=dn.get(de);un=P?Rn(P):""}let rv=(P,$)=>{if(Z){if(B&&$?.altKey){let hn=[P.value];ye||Ee(hn),oe?.(hn,{value:P.value,option:P,selected:!0});return}let $e=lt.includes(P.value),_n=$e?lt.filter(hn=>hn!==P.value):[...lt,P.value];ye||Ee(_n),oe?.(_n,{value:P.value,option:P,selected:!$e})}else ye||Ee(P.value),oe?.(P.value,{value:P.value,option:P})},ia=Z?U.filter(P=>!P.disabled).map(P=>P.opt.value):[],Kd=ia.filter(P=>lt.includes(P)),go=ia.length>0&&Kd.length===ia.length,av=Kd.length>0&&!go,ov=()=>{let P=lt.filter($e=>!ia.includes($e)),$=go?P:[...P,...ia];ye||Ee($),oe?.($,{all:!0,selected:!go})},iv=()=>{let P=Z?[]:null;ye||Ee(P),oe?.(P,{all:!0,selected:!1})},Os=(P,$)=>{let{className:$e,style:_n,...hn}=dt(P,!0),Jd={value:P.value,selected:Nn(P.value),disabled:$},vo=W?.(P,Jd),lv=w?.(Jd),cv=!Z&&ne==="none"?{role:"menuitemradio","aria-checked":Nn(P.value)?"true":"false"}:void 0,Qd=Z&&B&&!$?ko:void 0,eu=P.tooltip??Qd,dv=P.tooltip==null&&Qd!=null;return I(xe,{...hn,selectionIndicator:fe,...cv,indicator:lv??void 0,label:vo?void 0:aa(P.label??String(P.value),M),hint:vo?void 0:P.hint?aa(P.hint,M):P.hint,icon:vo?void 0:P.icon,tone:P.tone??D,toneScope:P.toneScope??L,selected:Nn(P.value),disabled:$||void 0,"data-menu-open":Z?"":void 0,onSelect:uv=>rv(P,uv),className:$e,style:_n,children:[vo,eu&&m(st,{...dv?{delay:Eo,placement:"left"}:{follow:!0},children:eu})]},String(P.value))},Gd=P=>P.map($=>{if($.kind==="option")return Os($.opt,$.disabled);let $e=Gd($.children);return $.kind==="group"?m(ea,{label:$.source.label,children:$e},$.key):m(xe,{submenu:!0,label:$.source.label,icon:$.source.icon,disabled:$.disabled||void 0,"data-menu-open":Z?"":void 0,children:m(Ve,{children:$e})},$.key)}),sv=()=>{let P=[];for(let $=0;$<U.length;){let $e=U[$].group;if($e===void 0){P.push(Os(U[$].opt,U[$].disabled)),$++;continue}let _n=[],hn=$;for(;$<U.length&&U[$].group===$e;)_n.push(Os(U[$].opt,U[$].disabled)),$++;P.push(m(ea,{label:$e,children:_n},`flat-${hn}-${$e}`))}return P},Xd=u??(d?m(pe,{shape:d}):void 0);return I(ce,{children:[H?H({open:We,value:de,selected:ct,disabled:!!k,icon:d}):m(Ct,{button:!0,dimActions:h,label:p,hint:f,value:un,placeholder:c,leading:Xd!=null?m("a-select-leading",{"aria-hidden":"true",children:Xd}):void 0,disabled:k,size:b,status:x,statusIcon:g,round:y,className:C,style:q,"aria-haspopup":Te?"dialog":"menu","aria-expanded":We?"true":"false",trailing:m("a-select-chevron",{open:We?"":void 0,"aria-hidden":"true",children:m(pe,{shape:"chevron-down"})}),...Q}),I(Ve,{role:Te?"dialog":void 0,"aria-label":Te?ze:void 0,placement:n,offset:r,onStateChange:(P,{next:$})=>{At($),$||Qe("")},children:[Te&&m("a-select-header",{slot:"header","data-menu-open":"",children:m(Ct,{"data-menu-search":"",size:"small",value:Ze,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:P=>Qe(P.currentTarget.value)})}),Z&&B&&U.length>0&&I(ce,{children:[m(xe,{selectionIndicator:"checkbox",selected:go,indeterminate:av,label:N,"data-menu-open":"","data-menu-skip-active":"",onSelect:ov}),m(zn,{})]}),U.length===0?j?.({query:De}):Le?sv():Gd(F),A&&lt.length>0&&I(ce,{children:[m(zn,{slot:"footer"}),m("a-select-footer",{slot:"footer",children:m(xe,{icon:"x",label:T,role:Te?"button":void 0,"data-menu-open":"",onSelect:iv})})]})]})]})};var Wd=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...Wd(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...Wd(n.options)):e.push(Bn(n));return e},Ds=t=>t==null||t===""||Array.isArray(t)&&t.length===0,Qg=t=>{let e=na(t);return n=>ra(n,e)},Jg=(t,e,n)=>typeof t=="function"?r=>t(r,e):n??Qg(e),d1=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:h,toneScope:p,searchable:f,searchPlaceholder:b="Filter\u2026",clearable:x=!0,clearAllLabel:g="Clear all",renderTrigger:y,className:k,style:D,...L}=t,R=a!==void 0,[B,N]=K(o??{}),A=R?a:B,[T,W]=K(!1),[w,O]=K({}),[S,H]=K({});{let v=null,E=w;for(let F of e)F.kind==="text"&&S[F.key]!==A[F.key]&&(v={...v??S,[F.key]:A[F.key]},E={...E,[F.key]:A[F.key]??""});v&&(H(v),O(E))}let[j,C]=K({}),[q,Q]=K(""),Z=e.reduce((v,E)=>v+(Ds(A[E.key])?0:1),0),ne=Be(()=>new Map(e.map(v=>[v.key,v.kind==="single"||v.kind==="multiple"?Wd(v.options):[]])),[e]),fe=(v,E)=>{R||N(v),i?.(v,E)},oe=(v,E)=>{let F=Ds(E),z={...A};F?delete z[v.key]:z[v.key]=E,fe(z,{facet:v.key,kind:v.kind,value:F?void 0:E})},ye=()=>fe({},{all:!0}),He=v=>{let E=ne.get(v.key)??[],F=v.filter;if(!F)return E;let z=j[v.key]??"";return typeof F!="function"&&!z.trim()?E:E.filter(Jg(F,z))},Ee=v=>v.filter?m("a-select-header",{slot:"header","data-menu-open":"",children:m(Ct,{"data-menu-search":"",size:"small",value:j[v.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${v.label}`,"aria-autocomplete":"list",onInput:E=>{let F=E.currentTarget.value;C(z=>({...z,[v.key]:F}))}})}):null,de=(v,E,F="")=>{let{className:z,style:U,...Le}=dt(E,!0),re=v.kind==="single"?A[v.key]===E.value:(A[v.key]??[]).includes(E.value),dn=v.renderOption?.(E,{value:E.value,selected:re,disabled:!!E.disabled}),lt={...Le,icon:dn?void 0:E.icon,label:dn?void 0:E.label??String(E.value),hint:dn?void 0:E.hint,tone:E.tone??h,toneScope:E.toneScope??p,disabled:E.disabled,className:z,style:U,"data-menu-open":""};if(v.kind==="single"){let Rn=A[v.key];return m(xe,{...lt,selectionIndicator:"check",selected:re,onSelect:()=>oe(v,Rn===E.value?void 0:E.value),children:dn},`${F}${E.value}`)}let Nn=A[v.key]??[],ct=v.selectAll!==!1&&!E.disabled,oa=E.tooltip??(ct?ko:void 0),Ps=E.tooltip==null&&ct;return I(xe,{...lt,selectionIndicator:"checkbox",selected:re,onSelect:Rn=>ct&&Rn?.altKey?oe(v,[E.value]):oe(v,Nn.includes(E.value)?Nn.filter(un=>un!==E.value):[...Nn,E.value]),children:[dn,oa&&m(st,{...Ps?{delay:Eo,placement:"left"}:{follow:!0},children:oa})]},`${F}${E.value}`)},We=v=>He(v).map(E=>de(v,E)),At=v=>{let E=A[v.key]??[],F=He(v),z=F.filter(re=>!re.disabled).map(re=>re.value),U=z.length>0&&z.every(re=>E.includes(re)),Le=z.some(re=>E.includes(re));return I(ce,{children:[v.selectAll!==!1&&F.length>0&&I(ce,{children:[m(xe,{selectionIndicator:"checkbox",selected:U,indeterminate:Le&&!U,label:v.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>oe(v,U?E.filter(re=>!z.includes(re)):[...new Set([...E,...z])])}),m(zn,{})]}),F.map(re=>de(v,re))]})},Ze=()=>{let v=Qg(q);return e.filter(F=>F.kind==="single"||F.kind==="multiple").map(F=>{let z=(ne.get(F.key)??[]).filter(Jg(F.filter,q,v));return{facet:F,matched:z}}).filter(F=>F.matched.length>0).map(({facet:F,matched:z})=>m(ea,{label:F.label,children:z.map(U=>de(F,U,`${F.key}:`))},F.key))},Qe=v=>{let E=A[v.key]??"",F=w[v.key]??E,z=()=>{let U=F.trim()===""?void 0:F;U!==(E||void 0)&&oe(v,U)};return m("a-select-faceted-text",{"data-menu-open":"",children:m(Ct,{size:"small",value:F,placeholder:v.placeholder,"aria-label":v.label,onInput:U=>{let Le=U.currentTarget.value;O(re=>({...re,[v.key]:Le}))},onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),z())},onBlur:z})})},ze=v=>m("div",{"data-menu-open":"",children:v.render({value:A[v.key],onChange:E=>oe(v,E),close:()=>W(!1)})}),Te=v=>{let E=v.kind==="single"||v.kind==="multiple",F=!E||!!v.filter,z=v.kind==="single"?We(v):v.kind==="multiple"?At(v):v.kind==="text"?Qe(v):ze(v),U=!Ds(A[v.key]);return I(Ve,{role:F?"dialog":void 0,"aria-label":F?`${v.label} ${E?"options":"editor"}`:void 0,children:[E&&Ee(v),z,x&&U&&I(ce,{children:[m(zn,{slot:"footer"}),m("a-select-footer",{slot:"footer",children:m(xe,{icon:"x",label:"Clear",role:F?"button":void 0,"data-menu-open":"",onSelect:()=>oe(v,void 0)})})]})]})},De=v=>{let E=A[v.key];if(Ds(E))return null;switch(v.kind){case"single":return(ne.get(v.key)??[]).find(z=>z.value===E)?.label??String(E);case"multiple":return String(E.length);case"text":return String(E);case"custom":return v.summary(E)}};return I(ce,{children:[y?y({open:T,value:A,count:Z,disabled:!!u}):m(me,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":f?"dialog":"menu","aria-expanded":T?"true":"false",className:k,style:D,...L,children:Z>0&&m(ks,{size:"small",priority:"primary",tone:"brand",children:String(Z)})}),I(Ve,{role:f?"dialog":void 0,"aria-label":f?`${s} options`:void 0,placement:n,offset:r,open:T,onStateChange:(v,{next:E})=>{W(E),E||Q("")},children:[f&&m("a-select-header",{slot:"header","data-menu-open":"",children:m(Ct,{"data-menu-search":"",size:"small",value:q,placeholder:b,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:v=>Q(v.currentTarget.value)})}),f&&q.trim()?Ze():e.map(v=>I(xe,{submenu:!0,icon:v.icon,label:v.label,"aria-haspopup":v.kind==="text"||v.kind==="custom"||v.filter?"dialog":"menu",children:[(()=>{let E=De(v);return E!=null?m(ks,{size:"small",tone:"brand",children:m("a-select-faceted-summary",{children:E})}):null})(),Te(v)]},v.key)),x&&I(ce,{children:[m(zn,{slot:"footer"}),m("a-select-footer",{slot:"footer",children:m(xe,{icon:"filter-x",label:g,role:f?"button":void 0,disabled:Z===0,"data-menu-open":"",onSelect:ye})})]})]})]})};var Zd=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:h,orientation:p,fill:f,noslide:b,round:x,disabled:g,className:y,style:k,id:D,...L})=>{let R=n!==void 0,[B,N]=hr(n,r),A=e??[],T=new Set;for(let C of A)T.has(C.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(C.value)} \u2014 values must be unique.`),T.add(C.value);let O=ie({onstatechange:C=>{let{event:q,detail:Q}=X(C);Q&&(a?.(q,Q),!R&&(q.defaultPrevented||N(Q.next??void 0)))},onchange:o||i?C=>{o?.(C),i?.(C,{value:C.currentTarget?.value??null})}:void 0,onfocusin:s,onfocusout:l}),S=p==="vertical",H=B!=null&&A.some(C=>C.value===B)?B:A.find(C=>!g&&!C.disabled)?.value,j=m("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":S?"vertical":void 0,"aria-disabled":g?"true":void 0,state:R?n:void 0,"default-state":R?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:ee(u),size:h&&h!=="medium"?h:void 0,orientation:S?"vertical":void 0,fill:f?"":void 0,noslide:b?"":void 0,round:J(x),disabled:g?"":void 0,...O,class:y,id:D,style:te(x,"--tabs-round",Y(u,"--tabs-tone-source",k)),...L,children:A.map(C=>{let q=g||C.disabled,Q=C.value===B,{className:Z,style:ne,...fe}=dt(C);return I("a-tab",{...fe,role:"tab",value:C.value,tone:C.tone||void 0,"aria-disabled":q?"true":void 0,tabIndex:C.value===H?0:-1,disabled:q?"":void 0,round:J(x)??J(C.round),class:Z,style:Y(C.tone,"--tabs-tone-source",ne),children:[C.icon&&m("a-icon",{shape:C.icon,"aria-hidden":"true"}),yo(C.label!=null?C.label:C.children,"a-tab-label"),C.iconTrailing&&m("a-icon",{shape:C.iconTrailing,"aria-hidden":"true"}),C.tooltip!=null&&C.tooltip!==""?m(st,{truncatedOnly:!0,children:C.tooltip}):null]},C.value)})});return I(ce,{children:[j,t,m("template",{"data-anta-tabs-end":""})]})};var ev={incomplete:"circle-large",completed:"check",error:"x"},u1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:h,orientation:p,fill:f,disabled:b,children:x,className:g,style:y,id:k,...D})=>{let L=e!==void 0,[R,B]=K(n),N=L?e:R??t[0]?.value,A=(w,O)=>{r?.(w,O),!(L||w.defaultPrevented)&&B(O.next??void 0)},T=t.map(w=>{let{className:O,style:S,...H}=dt(w),j=w.tone||void 0,C=w.disabled?"neutral":w.state==="error"?"critical":j||d||"neutral",q=u?.(w,{state:w.state,selected:w.value===N,disabled:!!w.disabled}),Q=w.disabled?m(pe,{shape:ev.incomplete}):w.state==="loading"?m(Od,{tone:C}):m(pe,{shape:ev[w.state]}),Z=q!==void 0?q:w.marker!==void 0?typeof w.marker=="number"?w.marker:m(pe,{shape:w.marker}):Q;return{...H,value:w.value,disabled:w.disabled,"data-step-state":w.state,tone:C,tooltip:I(ce,{children:[w.label,w.hint!=null&&I(ce,{children:[" \u2014 ",w.hint]})]}),className:O,style:S,children:I(ce,{children:[m("a-step-marker",{"aria-hidden":"true",children:Z}),I("a-step-desc",{children:[m("a-tab-label",{children:w.label}),w.hint!=null&&m("a-step-hint",{children:w.hint})]})]})}});return m("a-steps",{class:g,style:y,id:k,...D,"data-orientation":p==="vertical"?"vertical":void 0,children:m(Zd,{options:T,value:N,onStateChange:A,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:h,orientation:p,fill:f,priority:c,noslide:!0,disabled:b,"data-steps":"",children:x})})};var h1=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>m("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var p1=new Set(["top","right","bottom","left"]),m1=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:h,...p})=>{let f=i!==void 0,b=typeof o=="string"&&p1.has(o)?o:void 0,x=ie({onstatechange:c?g=>{let{event:y,detail:k,isOwn:D}=X(g);D&&k&&c(y,{next:k.next==="open",prev:k.prev==="open"})}:void 0});return I("a-dialog",{state:f?i?"open":"closed":void 0,"default-state":!f&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:b??J(o),name:f?void 0:l,...x,class:d,style:te(b?void 0:o,"--dialog-round",u),...p,children:[r!==!1&&m("a-dialog-close",{slot:"close",children:m(me,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&m("div",{slot:"header",children:t}),h,e!=null&&m("a-dialog-footer",{slot:"footer",children:e})]})};var f1=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:h,target:p,rel:f,ping:b,className:x,style:g,children:y,tabIndex:k,...D})=>{let L=ee(i),R=te(u,"--card-round",Y(L,"--card-tone-source",g)),B=l==="small"?5:l==="large"?3:4,N=h!=null,A={},T={};for(let[C,q]of Object.entries(D))C.startsWith("aria-")?A[C]=q:T[C]=q;let W=C=>(typeof C=="string"||typeof C=="number")&&String(C).replace(/\s+/g," ").trim()||void 0,w=W(t)??W(y),O=C=>typeof C!="boolean"&&Bt(C),S=A["aria-busy"],H=A["aria-label"],j=I(ce,{children:[O(a)&&m("a-card-media",{children:a}),I("a-card-content",{children:[(O(t)||O(e)||O(n))&&I("a-card-header",{children:[O(n)&&m("a-card-icon",{children:typeof n=="string"?m("a-card-icon-chip",{children:m(pe,{shape:n})}):n}),(O(t)||O(e))&&I("a-card-title",{children:[typeof t=="string"||typeof t=="number"?m(Ld,{level:B,tone:L,font:"sans-serif",children:t}):t,O(e)&&m(ws,{size:"small",priority:"tertiary",tone:L,children:e})]})]}),O(y)&&m("a-card-body",{children:typeof y=="string"||typeof y=="number"?m(ws,{priority:"secondary",tone:L,size:l,children:y}):y}),O(r)&&m("a-card-footer",{children:r})]})]});return m("a-card",{tone:L,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:J(u),class:x,style:R,tabIndex:N?void 0:k,...T,...N?{}:A,"aria-busy":N?void 0:S??(d?"true":void 0),children:N?m("a",{"data-anta-card-link":"",href:d?void 0:h,target:d?void 0:p,rel:d?void 0:f,ping:d?void 0:b,tabIndex:k,...A,"aria-label":H??(d?void 0:w),"aria-busy":S??(d?"true":void 0),children:m("a-card-layout",{children:j})}):j})};var $d=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:h,...p})=>{let f=s!=null,b=ie({onstatechange:c?D=>{let{detail:L,isOwn:R}=X(D);R&&L?.next==="closed"&&c()}:void 0}),x=te(a,"--banner-round",Y(n,"--banner-tone-source",u)),g=Bt(t)&&typeof t!="boolean"&&(typeof t!="string"||!!t.trim()),y=Bt(e)&&typeof e!="boolean"&&(typeof e!="string"||!!e.trim()),k=g?typeof t=="string"||typeof t=="number"?m("a-banner-message",{children:t}):m("a-banner-content",{children:t}):null;return I("a-banner",{state:f?s?"closed":"open":void 0,"default-state":f?void 0:l?"closed":"open",tone:ee(n),align:r==="center"?"center":void 0,round:J(a),role:i,...b,class:d,style:x,...p,children:[k,Bt(h)&&typeof h!="boolean"&&m("a-banner-content",{children:h}),y&&m("a-banner-actions",{children:e}),o!==!1&&m("a-banner-close",{children:m(me,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var b1=({entry:t,store:e})=>{let n=Be(()=>t.render(t.id),[t.id,t.rev]),r=ca(n),a=typeof n=="string"||typeof n=="number",o=ie({ondismiss:s=>{X(s).isOwn&&e.remove(t.id)}}),i={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,...o};return r?m("a-toast",{...i,content:n}):a?m("a-toast",{...i,children:m($d,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):m("a-toast",{...i,children:n})},g1=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??tv(),s=ou(i.subscribe,i.getSnapshot,i.getServerSnapshot);return m("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>m(b1,{entry:l,store:i},l.id))})},v1,tv=()=>v1??=vs(),nv=g1;Object.defineProperty(nv,"manager",{get:tv,enumerable:!0});export{Ty as Avatar,$d as Banner,Dy as Box,Vy as Breadcrumbs,me as Button,Bd as ButtonCopy,Ud as Calendar,Py as Capture,f1 as Card,Uy as Checkbox,jn as DEFAULT_CONFIG,m1 as Dialog,Zy as Expander,Hy as ICON_SHAPES,jy as ICON_SYNONYMS,pe as Icon,Ct as Input,o1 as InputAutocomplete,a1 as InputDate,Yd as InputTime,Od as Loader,Ve as Menu,ea as MenuGroup,xe as MenuItem,Rd as MenuItemCopy,zn as MenuSeparator,Oy as Panel,Sy as Progress,s1 as RadioGroup,c1 as Select,d1 as SelectFaceted,Jy as Slider,u1 as Steps,Wy as Switch,h1 as TabPanel,Zd as Tabs,ks as Tag,ws as Text,Ld as Title,nv as Toaster,st as Tooltip,Ys as avatarToSvg,Vd as buildMonth,Ln as clampDate,Vs as colorLightness,pv as configure,vs as createToaster,Ts as dateFormatPattern,qd as dateTimeFormatPattern,_d as firstDayOfWeek,Ss as formatDateInput,jd as formatDateTimeInput,js as getInitials,Zg as getWeekdays,bu as hasFigure,hu as hashSeed,Fd as isOutOfRange,fu as maxChroma,pu as mulberry32,So as oklchString,l1 as optionsWithSelection,fo as parseDateInput,Ms as parseDateTimeInput,Ye as parseISODate,Kg as parseTimeInput,Us as resolveAvatar,mu as rngFromSeed,bo as usesHour12};
1354
3
  /*! Bundled license information:
1355
4
 
1356
5
  tabbable/dist/index.esm.js: