@magicx-eng/ai-autocomplete-react 0.67.2 → 0.67.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var jt=Object.defineProperty;var Za=Object.getOwnPropertyDescriptor;var Xa=Object.getOwnPropertyNames;var Ja=Object.prototype.hasOwnProperty;var ei=(e,a)=>{for(var t in a)jt(e,t,{get:a[t],enumerable:!0})},ti=(e,a,t,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Xa(a))!Ja.call(e,o)&&o!==t&&jt(e,o,{get:()=>a[o],enumerable:!(n=Za(a,o))||n.enumerable});return e};var ai=e=>ti(jt({},"__esModule",{value:!0}),e);var Oi={};ei(Oi,{AIAutocomplete:()=>Wa,AIAutocompleteDropdown:()=>Kt,DATE_RANGE_META_END:()=>d.DATE_RANGE_META_END,DATE_RANGE_META_START:()=>d.DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT:()=>d.DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY:()=>d.LOCATION_META_KEY,PRODUCT_PATH_PREFIX:()=>d.PRODUCT_PATH_PREFIX,TIME_META_KEY:()=>d.TIME_META_KEY,WEEKDAY_LABELS:()=>d.WEEKDAY_LABELS,buildSubmitResult:()=>d.buildSubmitResult,cellDay:()=>d.cellDay,cellIso:()=>d.cellIso,dateCellMarks:()=>d.dateCellMarks,focusesInputOnSelect:()=>d.focusesInputOnSelect,formatDate:()=>d.formatDate,formatDateRange:()=>d.formatDateRange,formatOptionCount:()=>d.formatOptionCount,formatPlace:()=>d.formatPlace,formatTime:()=>d.formatTime,isTouchPrimary:()=>d.isTouchPrimary,isoDate:()=>d.isoDate,monthLabel:()=>d.monthLabel,optionCountLabel:()=>d.optionCountLabel,optionHasImage:()=>d.optionHasImage,optionImageSources:()=>d.optionImageSources,optionImageSrc:()=>d.optionImageSrc,optionLabel:()=>d.optionLabel,optionsShowLeadingVisuals:()=>d.optionsShowLeadingVisuals,parseDate:()=>d.parseDate,parseLooseDate:()=>d.parseLooseDate,parseLooseDateRange:()=>d.parseLooseDateRange,parseTime:()=>d.parseTime,productFromMatchedItem:()=>d.productFromMatchedItem,productImageSources:()=>d.productImageSources,productsFromCustomFields:()=>d.productsFromCustomFields,sanitizeOptionIconSvg:()=>d.sanitizeOptionIconSvg,selectedRangeFor:()=>d.selectedRangeFor,useAIAutocomplete:()=>_t,visibleDateRange:()=>d.visibleDateRange,withSkippedParams:()=>d.withSkippedParams});module.exports=ai(Oi);var d=require("@magicx-eng/ai-autocomplete-vanilla");var Q=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-67791514")){let e=document.createElement("style");e.id="ac-style-67791514",e.textContent=`.aia-container-KKjFU {
1
+ "use strict";var jt=Object.defineProperty;var Za=Object.getOwnPropertyDescriptor;var Xa=Object.getOwnPropertyNames;var Ja=Object.prototype.hasOwnProperty;var ei=(e,a)=>{for(var t in a)jt(e,t,{get:a[t],enumerable:!0})},ti=(e,a,t,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Xa(a))!Ja.call(e,o)&&o!==t&&jt(e,o,{get:()=>a[o],enumerable:!(n=Za(a,o))||n.enumerable});return e};var ai=e=>ti(jt({},"__esModule",{value:!0}),e);var Oi={};ei(Oi,{AIAutocomplete:()=>Wa,AIAutocompleteDropdown:()=>Kt,DATE_RANGE_META_END:()=>d.DATE_RANGE_META_END,DATE_RANGE_META_START:()=>d.DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT:()=>d.DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY:()=>d.LOCATION_META_KEY,PRODUCT_PATH_PREFIX:()=>d.PRODUCT_PATH_PREFIX,TIME_META_KEY:()=>d.TIME_META_KEY,WEEKDAY_LABELS:()=>d.WEEKDAY_LABELS,buildSubmitResult:()=>d.buildSubmitResult,cellDay:()=>d.cellDay,cellIso:()=>d.cellIso,dateCellMarks:()=>d.dateCellMarks,focusesInputOnSelect:()=>d.focusesInputOnSelect,formatDate:()=>d.formatDate,formatDateRange:()=>d.formatDateRange,formatOptionCount:()=>d.formatOptionCount,formatPlace:()=>d.formatPlace,formatTime:()=>d.formatTime,isTouchPrimary:()=>d.isTouchPrimary,isoDate:()=>d.isoDate,monthLabel:()=>d.monthLabel,optionCountLabel:()=>d.optionCountLabel,optionHasImage:()=>d.optionHasImage,optionImageSources:()=>d.optionImageSources,optionImageSrc:()=>d.optionImageSrc,optionLabel:()=>d.optionLabel,optionsShowLeadingVisuals:()=>d.optionsShowLeadingVisuals,parseDate:()=>d.parseDate,parseLooseDate:()=>d.parseLooseDate,parseLooseDateRange:()=>d.parseLooseDateRange,parseTime:()=>d.parseTime,productFromMatchedItem:()=>d.productFromMatchedItem,productImageSources:()=>d.productImageSources,productsFromCustomFields:()=>d.productsFromCustomFields,sanitizeOptionIconSvg:()=>d.sanitizeOptionIconSvg,selectedRangeFor:()=>d.selectedRangeFor,useAIAutocomplete:()=>_t,visibleDateRange:()=>d.visibleDateRange,withSkippedParams:()=>d.withSkippedParams});module.exports=ai(Oi);var d=require("@magicx-eng/ai-autocomplete-vanilla");var Q=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-16d653d7")){let e=document.createElement("style");e.id="ac-style-16d653d7",e.textContent=`.aia-container-KKjFU {
2
2
  position: relative;
3
3
  /* Inherits the host page's font by default. Consumers can pin a specific
4
4
  font on the library via \`--aia-font-family: 'Custom Font'\` without
@@ -463,7 +463,7 @@
463
463
  transition: none;
464
464
  }
465
465
  }
466
- `,document.head.appendChild(e)}var wt={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};var M=require("@magicx-eng/ai-autocomplete-vanilla"),te=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
466
+ `,document.head.appendChild(e)}var wt={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};var M=require("@magicx-eng/ai-autocomplete-vanilla"),te=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-a59da7e4")){let e=document.createElement("style");e.id="ac-style-a59da7e4",e.textContent=`/*
467
467
  * Built-in appearance defaults \u2014 zero specificity via :where().
468
468
  * Consumer CSS always wins without !important.
469
469
  *
@@ -1334,7 +1334,7 @@
1334
1334
  padding-inline: 8px;
1335
1335
  font-size: var(--aia-skip-font-size, 13.5px);
1336
1336
  }
1337
- `,document.head.appendChild(e)}if(typeof document<"u"&&!document.getElementById("ac-style-3819c762")){let e=document.createElement("style");e.id="ac-style-3819c762",e.textContent=`.aia-dropdown-yz2KC {
1337
+ `,document.head.appendChild(e)}if(typeof document<"u"&&!document.getElementById("ac-style-7265c9a6")){let e=document.createElement("style");e.id="ac-style-7265c9a6",e.textContent=`.aia-dropdown-yz2KC {
1338
1338
  position: absolute;
1339
1339
  left: 0;
1340
1340
  right: 0;
@@ -1837,7 +1837,7 @@
1837
1837
  opacity: 1;
1838
1838
  }
1839
1839
  }
1840
- `,document.head.appendChild(e)}var Re={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBar:"aia-skeletonBar-O3xIx",multiDone:"aia-multiDone-y12U7",seeAllRow:"aia-seeAllRow-icrau",seeAll:"aia-seeAll-0Zbgc",seeAllSpin:"aia-seeAllSpin-jlsZP",multiActionsLoadingOut:"aia-multiActionsLoadingOut-lSdMh",multiActionsFadeIn:"aia-multiActionsFadeIn-zbGTG",seeAllLoadingOut:"aia-seeAllLoadingOut-THnrl",seeAllFadeIn:"aia-seeAllFadeIn-1GWpl"};var ae=require("@magicx-eng/ai-autocomplete-vanilla"),ua=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-f687bd03")){let e=document.createElement("style");e.id="ac-style-f687bd03",e.textContent=`/* --- Datepicker (replaces the options grid for date suggestions) ---
1840
+ `,document.head.appendChild(e)}var Re={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBar:"aia-skeletonBar-O3xIx",multiDone:"aia-multiDone-y12U7",seeAllRow:"aia-seeAllRow-icrau",seeAll:"aia-seeAll-0Zbgc",seeAllSpin:"aia-seeAllSpin-jlsZP",multiActionsLoadingOut:"aia-multiActionsLoadingOut-lSdMh",multiActionsFadeIn:"aia-multiActionsFadeIn-zbGTG",seeAllLoadingOut:"aia-seeAllLoadingOut-THnrl",seeAllFadeIn:"aia-seeAllFadeIn-1GWpl"};var ae=require("@magicx-eng/ai-autocomplete-vanilla"),ua=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-6f248982")){let e=document.createElement("style");e.id="ac-style-6f248982",e.textContent=`/* --- Datepicker (replaces the options grid for date suggestions) ---
1841
1841
 
1842
1842
  One of three hand-maintained copies (vanilla styles.css, this file, Angular's
1843
1843
  date-grid.component.css). Only the class-naming layer differs \u2014 the
@@ -2034,7 +2034,7 @@
2034
2034
  opacity: 0.8;
2035
2035
  background: rgba(var(--aia-streak-rgb, 255, 255, 255), 0.06);
2036
2036
  }
2037
- `,document.head.appendChild(e)}var ee={datepicker:"aia-datepicker-6RrTs",header:"aia-header-z4LRk",month:"aia-month-urB2T",nav:"aia-nav-ap4AN",weekdays:"aia-weekdays-3EA3q",grid:"aia-grid-mQCgw",weekday:"aia-weekday-3lF4B",cell:"aia-cell-59k0y",number:"aia-number-aoT01",day:"aia-day-cB3u9",blank:"aia-blank-ivgRC",past:"aia-past-CEZsj",highlighted:"aia-highlighted-YIdtK",today:"aia-today-iI3ME",inRange:"aia-inRange-r9S2q",selected:"aia-selected-28KDn",reference:"aia-reference-Q5bXf",pressed:"aia-pressed-bEyyN"};var ve=require("react/jsx-runtime"),ii=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ma({options:e,activeIndex:a,listboxId:t,view:n,selection:o,onSelect:l,onHighlight:s,onUnhighlight:p,onPreviousMonth:v,onNextMonth:x}){let k=(0,ae.isoDate)(new Date),g=(0,ae.visibleDateRange)({pendingStart:o.rangeStart,highlightedIso:(0,ae.cellIso)(e[a]),selected:o.selectedRange,floor:o.floor});return(0,ve.jsxs)("div",{className:ee.datepicker,"data-aia-datepicker":"",children:[(0,ve.jsxs)("div",{className:ee.header,children:[(0,ve.jsx)("button",{type:"button",tabIndex:-1,className:ee.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:m=>m.preventDefault(),onClick:v,children:"\u2039"}),(0,ve.jsx)("span",{className:ee.month,"data-aia-date-month":"","aria-live":"polite",children:(0,ae.monthLabel)(n)}),(0,ve.jsx)("button",{type:"button",tabIndex:-1,className:ee.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:m=>m.preventDefault(),onClick:x,children:"\u203A"})]}),(0,ve.jsx)("div",{className:ee.weekdays,"aria-hidden":"true",children:ae.WEEKDAY_LABELS.map((m,h)=>(0,ve.jsx)("span",{className:ee.weekday,children:m},ii[h]))}),(0,ve.jsx)("div",{className:ee.grid,"data-aia-date-grid":"",children:e.map((m,h)=>(0,ve.jsx)(oi,{option:m,id:`${t}-option-${h}`,index:h,isHighlighted:h===a&&m.is_tappable,isToday:(0,ae.cellIso)(m)===k,isPast:(0,ae.isDimmedDay)((0,ae.cellIso)(m),k,o.floor),marks:(0,ae.dateCellMarks)((0,ae.cellIso)(m),{selectedIso:o.selectedIso,range:g,references:o.references}),onSelect:l,onHighlight:s,onUnhighlight:p},(0,ae.cellIso)(m)??`pad-${h}`))})]})}function oi({option:e,id:a,index:t,isHighlighted:n,isToday:o,isPast:l,marks:s,onSelect:p,onHighlight:v,onUnhighlight:x}){let[k,g]=(0,ua.useState)(!1),m=(0,ae.cellDay)(e);if(m==null)return(0,ve.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${ee.cell} ${ee.blank}`});let h=()=>{g(!0),p(e),setTimeout(()=>g(!1),170)},S=[ee.cell,ee.day,l?ee.past:"",n?ee.highlighted:"",o?ee.today:"",s.inRange?ee.inRange:"",s.selected?ee.selected:"",s.reference?ee.reference:"",k?ee.pressed:""].filter(Boolean).join(" ");return(0,ve.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":n,"aria-label":e.text,tabIndex:0,className:S,onClick:h,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),h())},onMouseEnter:()=>v(t),onMouseLeave:x?()=>x(t):void 0,children:(0,ve.jsx)("span",{className:ee.number,children:m})})}var dt=require("@magicx-eng/ai-autocomplete-vanilla"),Ht=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
2037
+ `,document.head.appendChild(e)}var ee={datepicker:"aia-datepicker-6RrTs",header:"aia-header-z4LRk",month:"aia-month-urB2T",nav:"aia-nav-ap4AN",weekdays:"aia-weekdays-3EA3q",grid:"aia-grid-mQCgw",weekday:"aia-weekday-3lF4B",cell:"aia-cell-59k0y",number:"aia-number-aoT01",day:"aia-day-cB3u9",blank:"aia-blank-ivgRC",past:"aia-past-CEZsj",highlighted:"aia-highlighted-YIdtK",today:"aia-today-iI3ME",inRange:"aia-inRange-r9S2q",selected:"aia-selected-28KDn",reference:"aia-reference-Q5bXf",pressed:"aia-pressed-bEyyN"};var ve=require("react/jsx-runtime"),ii=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ma({options:e,activeIndex:a,listboxId:t,view:n,selection:o,onSelect:l,onHighlight:s,onUnhighlight:p,onPreviousMonth:v,onNextMonth:x}){let k=(0,ae.isoDate)(new Date),g=(0,ae.visibleDateRange)({pendingStart:o.rangeStart,highlightedIso:(0,ae.cellIso)(e[a]),selected:o.selectedRange,floor:o.floor});return(0,ve.jsxs)("div",{className:ee.datepicker,"data-aia-datepicker":"",children:[(0,ve.jsxs)("div",{className:ee.header,children:[(0,ve.jsx)("button",{type:"button",tabIndex:-1,className:ee.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:m=>m.preventDefault(),onClick:v,children:"\u2039"}),(0,ve.jsx)("span",{className:ee.month,"data-aia-date-month":"","aria-live":"polite",children:(0,ae.monthLabel)(n)}),(0,ve.jsx)("button",{type:"button",tabIndex:-1,className:ee.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:m=>m.preventDefault(),onClick:x,children:"\u203A"})]}),(0,ve.jsx)("div",{className:ee.weekdays,"aria-hidden":"true",children:ae.WEEKDAY_LABELS.map((m,h)=>(0,ve.jsx)("span",{className:ee.weekday,children:m},ii[h]))}),(0,ve.jsx)("div",{className:ee.grid,"data-aia-date-grid":"",children:e.map((m,h)=>(0,ve.jsx)(oi,{option:m,id:`${t}-option-${h}`,index:h,isHighlighted:h===a&&m.is_tappable,isToday:(0,ae.cellIso)(m)===k,isPast:(0,ae.isDimmedDay)((0,ae.cellIso)(m),k,o.floor),marks:(0,ae.dateCellMarks)((0,ae.cellIso)(m),{selectedIso:o.selectedIso,range:g,references:o.references}),onSelect:l,onHighlight:s,onUnhighlight:p},(0,ae.cellIso)(m)??`pad-${h}`))})]})}function oi({option:e,id:a,index:t,isHighlighted:n,isToday:o,isPast:l,marks:s,onSelect:p,onHighlight:v,onUnhighlight:x}){let[k,g]=(0,ua.useState)(!1),m=(0,ae.cellDay)(e);if(m==null)return(0,ve.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${ee.cell} ${ee.blank}`});let h=()=>{g(!0),p(e),setTimeout(()=>g(!1),170)},S=[ee.cell,ee.day,l?ee.past:"",n?ee.highlighted:"",o?ee.today:"",s.inRange?ee.inRange:"",s.selected?ee.selected:"",s.reference?ee.reference:"",k?ee.pressed:""].filter(Boolean).join(" ");return(0,ve.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":n,"aria-label":e.text,tabIndex:0,className:S,onClick:h,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),h())},onMouseEnter:()=>v(t),onMouseLeave:x?()=>x(t):void 0,children:(0,ve.jsx)("span",{className:ee.number,children:m})})}var dt=require("@magicx-eng/ai-autocomplete-vanilla"),Ht=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-8f881ad8")){let e=document.createElement("style");e.id="ac-style-8f881ad8",e.textContent=`.aia-cluster {
2038
2038
  display: flex;
2039
2039
  flex-wrap: wrap;
2040
2040
  gap: var(--aia-cluster-gap, 0.5rem);
@@ -2074,7 +2074,7 @@
2074
2074
  .aia-cluster[data-justify="around"] {
2075
2075
  justify-content: space-around;
2076
2076
  }
2077
- `,document.head.appendChild(e)}var $t=require("react/jsx-runtime");function Et({gap:e,align:a="center",justify:t="start",noWrap:n=!1,inline:o=!1,className:l,children:s,...p}){let v=e?{"--aia-cluster-gap":e}:void 0,x={className:l?`aia-cluster ${l}`:"aia-cluster","data-align":a,"data-justify":t,"data-nowrap":n||void 0,"data-inline":o||void 0,style:v,...p};return o?(0,$t.jsx)("span",{...x,children:s}):(0,$t.jsx)("div",{...x,children:s})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own 8px horizontal inset so it stays clear of the
2077
+ `,document.head.appendChild(e)}var $t=require("react/jsx-runtime");function Et({gap:e,align:a="center",justify:t="start",noWrap:n=!1,inline:o=!1,className:l,children:s,...p}){let v=e?{"--aia-cluster-gap":e}:void 0,x={className:l?`aia-cluster ${l}`:"aia-cluster","data-align":a,"data-justify":t,"data-nowrap":n||void 0,"data-inline":o||void 0,style:v,...p};return o?(0,$t.jsx)("span",{...x,children:s}):(0,$t.jsx)("div",{...x,children:s})}if(typeof document<"u"&&!document.getElementById("ac-style-f45d7ffa")){let e=document.createElement("style");e.id="ac-style-f45d7ffa",e.textContent=`/* The footer adds its own 8px horizontal inset so it stays clear of the
2078
2078
  dropdown's rounded edges. The top inset (--aia-footer-gap) adds breathing
2079
2079
  room above the hint/branding row so the footer doesn't butt against the last
2080
2080
  option row \u2014 additive to the dropdown's 8px section gap. */
@@ -2222,7 +2222,7 @@
2222
2222
  justify-content: flex-end;
2223
2223
  }
2224
2224
  }
2225
- `,document.head.appendChild(e)}var et={footer:"aia-footer-qQQ7x",row:"aia-row-BgZ6Q",hintGroup:"aia-hintGroup-ZzbPf",brandLink:"aia-brandLink-r4f3R",key:"aia-key-Bz1H-",hint:"aia-hint-GKEOH",brand:"aia-brand-Al-lR",badge:"aia-badge-Fk9vg"};var _e=require("react/jsx-runtime");function ga({isOptionHighlighted:e=!1,isInputEmpty:a=!1,strings:t=(0,dt.uiStringsFor)()}){let{key:n,hint:o}=(0,dt.getFooterHint)(e,a,t),[l,s]=(0,Ht.useState)(dt.ATTRIBUTION_URL);return(0,Ht.useEffect)(()=>{s((0,dt.buildAttributionUrl)())},[]),(0,_e.jsx)("footer",{className:et.footer,"data-aia-footer":"",children:(0,_e.jsxs)(Et,{justify:"between",noWrap:!0,className:et.row,children:[(0,_e.jsxs)(Et,{gap:"5px",className:et.hintGroup,children:[(0,_e.jsx)("kbd",{className:et.key,children:n}),(0,_e.jsx)("span",{className:et.hint,children:o})]}),(0,_e.jsx)("a",{className:et.brandLink,href:l,target:"_blank",rel:"noopener noreferrer",children:(0,_e.jsx)("span",{className:et.badge,children:(0,_e.jsx)("span",{className:et.brand,children:"Powered by Intent-1"})})})]})})}var se=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-2feec02e")){let e=document.createElement("style");e.id="ac-style-2feec02e",e.textContent=`/* Location search \u2014 React copy of the vanilla rules in styles.css (and of the
2225
+ `,document.head.appendChild(e)}var et={footer:"aia-footer-qQQ7x",row:"aia-row-BgZ6Q",hintGroup:"aia-hintGroup-ZzbPf",brandLink:"aia-brandLink-r4f3R",key:"aia-key-Bz1H-",hint:"aia-hint-GKEOH",brand:"aia-brand-Al-lR",badge:"aia-badge-Fk9vg"};var _e=require("react/jsx-runtime");function ga({isOptionHighlighted:e=!1,isInputEmpty:a=!1,strings:t=(0,dt.uiStringsFor)()}){let{key:n,hint:o}=(0,dt.getFooterHint)(e,a,t),[l,s]=(0,Ht.useState)(dt.ATTRIBUTION_URL);return(0,Ht.useEffect)(()=>{s((0,dt.buildAttributionUrl)())},[]),(0,_e.jsx)("footer",{className:et.footer,"data-aia-footer":"",children:(0,_e.jsxs)(Et,{justify:"between",noWrap:!0,className:et.row,children:[(0,_e.jsxs)(Et,{gap:"5px",className:et.hintGroup,children:[(0,_e.jsx)("kbd",{className:et.key,children:n}),(0,_e.jsx)("span",{className:et.hint,children:o})]}),(0,_e.jsx)("a",{className:et.brandLink,href:l,target:"_blank",rel:"noopener noreferrer",children:(0,_e.jsx)("span",{className:et.badge,children:(0,_e.jsx)("span",{className:et.brand,children:"Powered by Intent-1"})})})]})})}var se=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-6cbc3cf2")){let e=document.createElement("style");e.id="ac-style-6cbc3cf2",e.textContent=`/* Location search \u2014 React copy of the vanilla rules in styles.css (and of the
2226
2226
  Angular copy). The three are kept identical by
2227
2227
  packages/vanilla/tests/render/locationFieldParity.test.ts. */
2228
2228
  .aia-location-6-fsr {
@@ -2356,7 +2356,7 @@
2356
2356
  .aia-loadingBar-OLCr4:nth-child(3) {
2357
2357
  width: 60%;
2358
2358
  }
2359
- `,document.head.appendChild(e)}var ie={location:"aia-location-6-fsr",field:"aia-field-xEzwi",icon:"aia-icon-czx6C",input:"aia-input-Yi9V-",results:"aia-results-C3O0V",row:"aia-row-Q9y8g",highlighted:"aia-highlighted-RJjPx",pin:"aia-pin-OjabL",text:"aia-text-Xs84O",name:"aia-name-Z-WJR",secondary:"aia-secondary-4sCT1",note:"aia-note-xCSvY",empty:"aia-empty-SYBzi",loading:"aia-loading-Ih1gi",loadingBar:"aia-loadingBar-OLCr4"};var U=require("react/jsx-runtime"),ni=0;function Rt(e){return e.getRootNode().activeElement??null}function wa(e){return e.getRootNode().getSelection?.()??document.getSelection()}function fa(e){if(!e.isContentEditable)return null;let a=wa(e);if(!a||a.rangeCount===0)return null;let t=a.getRangeAt(0);return e.contains(t.startContainer)?t.cloneRange():null}function ba(e,a){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let t=wa(e);if(!t)return;let n=a;(!n||!n.startContainer.isConnected||!e.contains(n.startContainer))&&(n=document.createRange(),n.selectNodeContents(e),n.collapse(!1)),t.removeAllRanges(),t.addRange(n)}var ri=(0,U.jsxs)("svg",{className:ie.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,U.jsx)("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),(0,U.jsx)("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),si=(0,U.jsxs)("svg",{className:ie.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,U.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,U.jsx)("path",{d:"m20 20-3.5-3.5"})]});function va({view:e,searchLabel:a,noResultsLabel:t,useTypedLabel:n,widgetFocused:o,reediting:l=!1,visible:s=!0,interactive:p=!0,onQuery:v,onMove:x,onCommit:k,onFocusChange:g}){let m=(0,se.useRef)(null),h=(0,se.useRef)(null),S=(0,se.useRef)(null),C=(0,se.useRef)(null),I=(0,se.useRef)(null),F=(0,se.useRef)(!1),N=(0,se.useRef)(!1),re=(0,se.useRef)(!1),K=(0,se.useRef)(!1),R=(0,se.useRef)(o);R.current=o;let H=(0,se.useRef)(g);H.current=g;let _=i=>{K.current=i,g(i)},ne=()=>{let i=m.current;return i!=null&&Rt(i)===i},fe=()=>{let i=h.current;if(!i)return;let y=Rt(i);y instanceof HTMLElement&&y!==m.current&&y!==document.body&&!i.contains(y)&&(C.current=y,I.current=fa(y))},pe=i=>{let y=h.current;!y||!(i instanceof HTMLElement)||i===C.current||i===document.body||y.contains(i)||(C.current=i,I.current=fa(i))},$=(0,se.useRef)(null);$.current===null&&($.current=`aia-location-${++ni}`);let E=`${$.current}-row-`;(0,se.useEffect)(()=>{let i=m.current;i&&i.value!==e.query&&Rt(i)!==i&&(i.value=e.query)},[e.query]),(0,se.useEffect)(()=>{o&&(l&&!re.current&&(N.current=!1),re.current=l);let i=m.current;if(i){if(!s&&ne()){N.current=!0,Z();return}if(!o){setTimeout(()=>{if(R.current)return;let y=C.current;y&&Rt(y)===y||(N.current=!1)},0);return}if(!(!l||N.current||!p||ne())){if(fe(),_(!0),i.focus({preventScroll:!0}),!ne()){N.current=!0,_(!1);return}i.value&&i.select()}}}),(0,se.useLayoutEffect)(()=>()=>{if(!K.current)return;let i=m.current,y=C.current;y?.isConnected&&i&&Rt(i)===i&&(F.current=!0,ba(y,I.current),F.current=!1),K.current=!1,H.current(!1)},[]);let Z=(i=!1)=>{i&&(N.current=!0);let y=C.current;y?.isConnected&&ne()&&(F.current=!0,ba(y,I.current),F.current=!1),_(!1)},Se=e.query.trim(),Ce=e.highlighted>=0&&e.highlighted<e.places.length?`${E}${e.highlighted}`:void 0,he=null;return e.places.length>0?he=e.places.map((i,y)=>(0,U.jsxs)("div",{id:`${E}${y}`,role:"option","aria-selected":y===e.highlighted,className:y===e.highlighted?`${ie.row} ${ie.highlighted}`:ie.row,"data-aia-location-row":"","data-aia-index":y,onClick:()=>{p&&(Z(!0),k(y))},children:[(0,U.jsx)("span",{className:ie.pin,children:ri}),(0,U.jsxs)("span",{className:ie.text,children:[(0,U.jsx)("span",{className:ie.name,children:i.name}),i.secondary&&(0,U.jsx)("span",{className:ie.secondary,children:i.secondary})]})]},i.id)):e.status==="loading"?he=(0,U.jsxs)("div",{className:ie.loading,"data-aia-location-loading":"",children:[(0,U.jsx)("span",{className:ie.loadingBar}),(0,U.jsx)("span",{className:ie.loadingBar}),(0,U.jsx)("span",{className:ie.loadingBar})]}):Se&&(he=(0,U.jsxs)("div",{className:ie.note,"data-aia-location-note":"",children:[e.status==="done"&&(0,U.jsx)("span",{className:ie.empty,children:t}),(0,U.jsx)("span",{children:n})]})),(0,U.jsxs)("div",{ref:h,className:ie.location,"data-aia-location":"",onMouseDown:i=>{!(i.target instanceof Node)||!S.current?.contains(i.target)||(i.stopPropagation(),fe(),_(!0))},children:[(0,U.jsxs)("label",{ref:S,className:ie.field,children:[si,(0,U.jsx)("input",{ref:m,type:"text",className:ie.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:a,"aria-label":a,"aria-activedescendant":Ce,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:s?0:-1,onChange:i=>v(i.target.value),onFocus:i=>{pe(i.relatedTarget),_(!0)},onBlur:()=>{F.current||(N.current=!0,_(!1))},onKeyDown:i=>{if(!i.nativeEvent.isComposing)switch(i.key){case"ArrowDown":case"ArrowUp":i.preventDefault(),x(i.key==="ArrowDown"?1:-1);return;case"Enter":if(i.preventDefault(),!p)return;Z(!0),k();return;case"Escape":i.preventDefault(),i.stopPropagation(),N.current=!0,Z();return;case"Backspace":if(i.currentTarget.value!=="")return;i.preventDefault(),N.current=!0,Z();return}}})]}),(0,U.jsx)("div",{className:ie.results,"data-aia-location-results":"","aria-live":"polite",children:he})]})}var Bt=require("@magicx-eng/ai-autocomplete-vanilla");var xa=require("@magicx-eng/ai-autocomplete-vanilla");if(typeof document<"u"&&!document.getElementById("ac-style-199d0432")){let e=document.createElement("style");e.id="ac-style-199d0432",e.textContent=`/* ParamPill (Figma "ParamPill") \u2014 unfilled suggestion pill: transparent fill,
2359
+ `,document.head.appendChild(e)}var ie={location:"aia-location-6-fsr",field:"aia-field-xEzwi",icon:"aia-icon-czx6C",input:"aia-input-Yi9V-",results:"aia-results-C3O0V",row:"aia-row-Q9y8g",highlighted:"aia-highlighted-RJjPx",pin:"aia-pin-OjabL",text:"aia-text-Xs84O",name:"aia-name-Z-WJR",secondary:"aia-secondary-4sCT1",note:"aia-note-xCSvY",empty:"aia-empty-SYBzi",loading:"aia-loading-Ih1gi",loadingBar:"aia-loadingBar-OLCr4"};var U=require("react/jsx-runtime"),ni=0;function Rt(e){return e.getRootNode().activeElement??null}function wa(e){return e.getRootNode().getSelection?.()??document.getSelection()}function fa(e){if(!e.isContentEditable)return null;let a=wa(e);if(!a||a.rangeCount===0)return null;let t=a.getRangeAt(0);return e.contains(t.startContainer)?t.cloneRange():null}function ba(e,a){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let t=wa(e);if(!t)return;let n=a;(!n||!n.startContainer.isConnected||!e.contains(n.startContainer))&&(n=document.createRange(),n.selectNodeContents(e),n.collapse(!1)),t.removeAllRanges(),t.addRange(n)}var ri=(0,U.jsxs)("svg",{className:ie.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,U.jsx)("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),(0,U.jsx)("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),si=(0,U.jsxs)("svg",{className:ie.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,U.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,U.jsx)("path",{d:"m20 20-3.5-3.5"})]});function va({view:e,searchLabel:a,noResultsLabel:t,useTypedLabel:n,widgetFocused:o,reediting:l=!1,visible:s=!0,interactive:p=!0,onQuery:v,onMove:x,onCommit:k,onFocusChange:g}){let m=(0,se.useRef)(null),h=(0,se.useRef)(null),S=(0,se.useRef)(null),C=(0,se.useRef)(null),I=(0,se.useRef)(null),F=(0,se.useRef)(!1),N=(0,se.useRef)(!1),re=(0,se.useRef)(!1),K=(0,se.useRef)(!1),R=(0,se.useRef)(o);R.current=o;let H=(0,se.useRef)(g);H.current=g;let _=i=>{K.current=i,g(i)},ne=()=>{let i=m.current;return i!=null&&Rt(i)===i},fe=()=>{let i=h.current;if(!i)return;let y=Rt(i);y instanceof HTMLElement&&y!==m.current&&y!==document.body&&!i.contains(y)&&(C.current=y,I.current=fa(y))},pe=i=>{let y=h.current;!y||!(i instanceof HTMLElement)||i===C.current||i===document.body||y.contains(i)||(C.current=i,I.current=fa(i))},$=(0,se.useRef)(null);$.current===null&&($.current=`aia-location-${++ni}`);let E=`${$.current}-row-`;(0,se.useEffect)(()=>{let i=m.current;i&&i.value!==e.query&&Rt(i)!==i&&(i.value=e.query)},[e.query]),(0,se.useEffect)(()=>{o&&(l&&!re.current&&(N.current=!1),re.current=l);let i=m.current;if(i){if(!s&&ne()){N.current=!0,Z();return}if(!o){setTimeout(()=>{if(R.current)return;let y=C.current;y&&Rt(y)===y||(N.current=!1)},0);return}if(!(!l||N.current||!p||ne())){if(fe(),_(!0),i.focus({preventScroll:!0}),!ne()){N.current=!0,_(!1);return}i.value&&i.select()}}}),(0,se.useLayoutEffect)(()=>()=>{if(!K.current)return;let i=m.current,y=C.current;y?.isConnected&&i&&Rt(i)===i&&(F.current=!0,ba(y,I.current),F.current=!1),K.current=!1,H.current(!1)},[]);let Z=(i=!1)=>{i&&(N.current=!0);let y=C.current;y?.isConnected&&ne()&&(F.current=!0,ba(y,I.current),F.current=!1),_(!1)},Se=e.query.trim(),Ce=e.highlighted>=0&&e.highlighted<e.places.length?`${E}${e.highlighted}`:void 0,he=null;return e.places.length>0?he=e.places.map((i,y)=>(0,U.jsxs)("div",{id:`${E}${y}`,role:"option","aria-selected":y===e.highlighted,className:y===e.highlighted?`${ie.row} ${ie.highlighted}`:ie.row,"data-aia-location-row":"","data-aia-index":y,onClick:()=>{p&&(Z(!0),k(y))},children:[(0,U.jsx)("span",{className:ie.pin,children:ri}),(0,U.jsxs)("span",{className:ie.text,children:[(0,U.jsx)("span",{className:ie.name,children:i.name}),i.secondary&&(0,U.jsx)("span",{className:ie.secondary,children:i.secondary})]})]},i.id)):e.status==="loading"?he=(0,U.jsxs)("div",{className:ie.loading,"data-aia-location-loading":"",children:[(0,U.jsx)("span",{className:ie.loadingBar}),(0,U.jsx)("span",{className:ie.loadingBar}),(0,U.jsx)("span",{className:ie.loadingBar})]}):Se&&(he=(0,U.jsxs)("div",{className:ie.note,"data-aia-location-note":"",children:[e.status==="done"&&(0,U.jsx)("span",{className:ie.empty,children:t}),(0,U.jsx)("span",{children:n})]})),(0,U.jsxs)("div",{ref:h,className:ie.location,"data-aia-location":"",onMouseDown:i=>{!(i.target instanceof Node)||!S.current?.contains(i.target)||(i.stopPropagation(),fe(),_(!0))},children:[(0,U.jsxs)("label",{ref:S,className:ie.field,children:[si,(0,U.jsx)("input",{ref:m,type:"text",className:ie.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:a,"aria-label":a,"aria-activedescendant":Ce,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:s?0:-1,onChange:i=>v(i.target.value),onFocus:i=>{pe(i.relatedTarget),_(!0)},onBlur:()=>{F.current||(N.current=!0,_(!1))},onKeyDown:i=>{if(!i.nativeEvent.isComposing)switch(i.key){case"ArrowDown":case"ArrowUp":i.preventDefault(),x(i.key==="ArrowDown"?1:-1);return;case"Enter":if(i.preventDefault(),!p)return;Z(!0),k();return;case"Escape":i.preventDefault(),i.stopPropagation(),N.current=!0,Z();return;case"Backspace":if(i.currentTarget.value!=="")return;i.preventDefault(),N.current=!0,Z();return}}})]}),(0,U.jsx)("div",{className:ie.results,"data-aia-location-results":"","aria-live":"polite",children:he})]})}var Bt=require("@magicx-eng/ai-autocomplete-vanilla");var xa=require("@magicx-eng/ai-autocomplete-vanilla");if(typeof document<"u"&&!document.getElementById("ac-style-dd56ca0c")){let e=document.createElement("style");e.id="ac-style-dd56ca0c",e.textContent=`/* ParamPill (Figma "ParamPill") \u2014 unfilled suggestion pill: transparent fill,
2360
2360
  no outline. ~28px via 6px padding + 14px text + the 1px border (border-box).
2361
2361
  The border is kept as a 1px transparent line so the box stays the same size
2362
2362
  as it was when the outline was dashed. */
@@ -2514,7 +2514,7 @@
2514
2514
  opacity: 0;
2515
2515
  }
2516
2516
  }
2517
- `,document.head.appendChild(e)}var Ve={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",loadingOut:"aia-loadingOut-Aj9xO"};var ct=require("react/jsx-runtime"),Zt={selected:1,first:.7,next:.4,last:.2};function ya({label:e,state:a,active:t,rounded:n,loading:o,smartSuggestion:l,completionHeader:s,onClick:p}){let v=[Ve.pill,n?Ve.rounded:"",o?Ve.skeleton:""].filter(Boolean).join(" ");return(0,ct.jsx)("button",{type:"button","data-aia-pill":"","data-aia-pill-active":t?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":l?s?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:v,style:{"--aia-pill-opacity":Zt[a]},onMouseDown:x=>x.preventDefault(),onClick:o?void 0:p,disabled:o,children:l?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("span",{className:`${Ve.smartText} magicx-aia-smart-suggestion-text`,children:e}),(0,ct.jsx)("span",{className:`${Ve.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:xa.SMART_SUGGESTION_SPARKLE_SVG}})]}):e})}if(typeof document<"u"&&!document.getElementById("ac-style-0fcb7940")){let e=document.createElement("style");e.id="ac-style-0fcb7940",e.textContent=`.aia-list-qvLqO {
2517
+ `,document.head.appendChild(e)}var Ve={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",loadingOut:"aia-loadingOut-Aj9xO"};var ct=require("react/jsx-runtime"),Zt={selected:1,first:.7,next:.4,last:.2};function ya({label:e,state:a,active:t,rounded:n,loading:o,smartSuggestion:l,completionHeader:s,onClick:p}){let v=[Ve.pill,n?Ve.rounded:"",o?Ve.skeleton:""].filter(Boolean).join(" ");return(0,ct.jsx)("button",{type:"button","data-aia-pill":"","data-aia-pill-active":t?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":l?s?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:v,style:{"--aia-pill-opacity":Zt[a]},onMouseDown:x=>x.preventDefault(),onClick:o?void 0:p,disabled:o,children:l?(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("span",{className:`${Ve.smartText} magicx-aia-smart-suggestion-text`,children:e}),(0,ct.jsx)("span",{className:`${Ve.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:xa.SMART_SUGGESTION_SPARKLE_SVG}})]}):e})}if(typeof document<"u"&&!document.getElementById("ac-style-1ea52c62")){let e=document.createElement("style");e.id="ac-style-1ea52c62",e.textContent=`.aia-list-qvLqO {
2518
2518
  position: relative;
2519
2519
  z-index: 1;
2520
2520
  pointer-events: auto;
@@ -2524,7 +2524,7 @@
2524
2524
  align-items: center;
2525
2525
  vertical-align: middle;
2526
2526
  }
2527
- `,document.head.appendChild(e)}var Xt={list:"aia-list-qvLqO"};var zt=require("react/jsx-runtime"),li=[125,69];function ka(e){return e===0?"first":e===1?"next":"last"}function Wt({pills:e,activePillIndex:a,onSelectPill:t,activeSelected:n,rounded:o,loading:l}){return l&&e.length===0?(0,zt.jsx)("span",{className:Xt.list,"data-aia-pill-list-loading":"",children:li.map((s,p)=>(0,zt.jsx)("span",{"data-aia-pill-skeleton":"",className:`${Ve.pill} ${o?Ve.rounded:""} ${Ve.skeleton}`,style:{width:s,"--aia-pill-opacity":Zt[ka(p)]}},`skel-${s}`))}):(0,zt.jsx)("span",{className:Xt.list,"data-aia-pill-list-loading":l?"":void 0,children:e.map((s,p)=>{let v=!!n&&p===a;return(0,zt.jsx)(ya,{label:s.text,state:v?"selected":ka(p),selected:v,active:p===a,rounded:o,loading:l,smartSuggestion:(0,Bt.isSmartSuggestion)(s),completionHeader:(0,Bt.isTraditionalAutocompleteSuggestion)(s),onClick:()=>t(p)},`${s.parameter}-${s.text}`)})})}var ze=require("@magicx-eng/ai-autocomplete-vanilla"),xe=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-fef1688d")){let e=document.createElement("style");e.id="ac-style-fef1688d",e.textContent=`/* Product strip \u2014 the React counterpart of the vanilla core's strip rules
2527
+ `,document.head.appendChild(e)}var Xt={list:"aia-list-qvLqO"};var zt=require("react/jsx-runtime"),li=[125,69];function ka(e){return e===0?"first":e===1?"next":"last"}function Wt({pills:e,activePillIndex:a,onSelectPill:t,activeSelected:n,rounded:o,loading:l}){return l&&e.length===0?(0,zt.jsx)("span",{className:Xt.list,"data-aia-pill-list-loading":"",children:li.map((s,p)=>(0,zt.jsx)("span",{"data-aia-pill-skeleton":"",className:`${Ve.pill} ${o?Ve.rounded:""} ${Ve.skeleton}`,style:{width:s,"--aia-pill-opacity":Zt[ka(p)]}},`skel-${s}`))}):(0,zt.jsx)("span",{className:Xt.list,"data-aia-pill-list-loading":l?"":void 0,children:e.map((s,p)=>{let v=!!n&&p===a;return(0,zt.jsx)(ya,{label:s.text,state:v?"selected":ka(p),selected:v,active:p===a,rounded:o,loading:l,smartSuggestion:(0,Bt.isSmartSuggestion)(s),completionHeader:(0,Bt.isTraditionalAutocompleteSuggestion)(s),onClick:()=>t(p)},`${s.parameter}-${s.text}`)})})}var ze=require("@magicx-eng/ai-autocomplete-vanilla"),xe=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-4ec71cc0")){let e=document.createElement("style");e.id="ac-style-4ec71cc0",e.textContent=`/* Product strip \u2014 the React counterpart of the vanilla core's strip rules
2528
2528
  (packages/vanilla/src/styles.css). Same tokens, same defaults, so a consumer
2529
2529
  theming one package sees the same result in the other.
2530
2530
 
@@ -3151,7 +3151,7 @@
3151
3151
  opacity: 0.01;
3152
3152
  }
3153
3153
  }
3154
- `,document.head.appendChild(e)}var oe={section:"aia-section-Hugfg",label:"aia-label-nuc93",row:"aia-row-WDVBX",card:"aia-card-JBGYT",media:"aia-media-RrbGe",image:"aia-image-5pNL7",body:"aia-body-ly032",vendor:"aia-vendor-Gvu7G",title:"aia-title-gCNmq",price:"aia-price-gULcE",compareAt:"aia-compareAt-ewE54",badge:"aia-badge-j9Hcd",cart:"aia-cart-kSlqU",cartCheck:"aia-cartCheck-YTTQ6",cartGlyph:"aia-cartGlyph-cmqAk",cartSpinner:"aia-cartSpinner-442rc","magicx-aia-product-cart-spin":"aia-magicx-aia-product-cart-spin-x8mgr",stripLoadingOut:"aia-stripLoadingOut-0jOOQ",stripFadeIn:"aia-stripFadeIn-0p9qx"};var q=require("react/jsx-runtime");function Sa({products:e,listboxId:a,onSelect:t,busyProductId:n=null,onAddToCart:o,onFocusChange:l,focusable:s=!0,loading:p=!1,layout:v="row",imageFallback:x="image",showVendor:k=!0,strings:g=(0,ze.uiStringsFor)()}){let m=e.length>0,h=(0,xe.useRef)(null);if((0,xe.useEffect)(()=>{let C=h.current;if(!(!m||!C))return(0,ze.attachProductRowWheel)(C)},[m]),!m)return null;let S=`${a}-products-label`;return(0,q.jsxs)("section",{className:oe.section,"data-aia-products":"","data-aia-loading":p?"":void 0,"data-aia-products-layout":v,role:"group","aria-labelledby":S,children:[(0,q.jsx)("div",{className:oe.label,id:S,"data-aia-products-label":"",children:g.products}),(0,q.jsx)("div",{ref:h,className:oe.row,"data-aia-products-row":"",children:e.map((C,I)=>(0,q.jsx)(di,{product:C,id:`${a}-product-${I}`,onSelect:t,busy:C.id===n,onAddToCart:o,onFocusChange:l,focusable:s,imageFallback:x,showVendor:k,soldOut:g.soldOut,addToCart:g.addToCart},C.id))})]})}function di({product:e,id:a,onSelect:t,busy:n,onAddToCart:o,onFocusChange:l,focusable:s,imageFallback:p,showVendor:v,soldOut:x,addToCart:k}){let g=!!o&&e.available!==!1,[m,h]=(0,xe.useState)(null),S=I=>{I.relatedTarget?.closest("[data-aia-dropdown]")||l?.(!1)},C=I=>{I.metaKey||I.ctrlKey||I.shiftKey||I.altKey||I.button!==0||(I.preventDefault(),t(e))};return(0,q.jsxs)("a",{id:a,className:oe.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":g?"":void 0,"data-aia-product-state":n?"busy":void 0,"aria-busy":n?!0:void 0,role:"option","aria-selected":!1,style:m?{"--aia-product-photo-fill-x":String(m.x),"--aia-product-photo-fill-y":String(m.y)}:void 0,href:e.url,tabIndex:s?0:-1,onClick:C,onKeyDown:I=>{I.key!=="Enter"&&I.key!==" "||(I.preventDefault(),t(e))},onFocus:()=>l?.(!0),onBlur:S,children:[(0,q.jsx)(hi,{sources:(0,ze.productImageSources)(e.imageUrl),title:e.title,fallback:p,onPhotoFill:h},(0,ze.productImageSrc)(e.imageUrl)??""),(0,q.jsxs)("span",{className:oe.body,children:[v&&e.vendor?(0,q.jsx)("span",{className:oe.vendor,children:e.vendor}):null,(0,q.jsx)("span",{className:oe.title,children:e.title}),e.price?(0,q.jsxs)("span",{className:oe.price,children:[e.price,e.compareAtPrice?(0,q.jsx)("s",{className:oe.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?(0,q.jsx)("span",{className:oe.badge,children:x}):null]}),g&&o?(0,q.jsx)(pi,{product:e,label:`${k}: ${e.title}`,focusable:s,onAddToCart:o,onFocus:()=>l?.(!0),onBlur:S},ci(e)):null]})}function ci(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(a=>a??"").join("\0")}function pi({product:e,label:a,focusable:t,onAddToCart:n,onFocus:o,onBlur:l}){let[s,p]=(0,xe.useState)(null),v=(0,xe.useRef)(null),x=(0,xe.useRef)(e);x.current=e;let k=(0,xe.useRef)(!0);(0,xe.useEffect)(()=>(k.current=!0,()=>{k.current=!1}),[]);let g=h=>{v.current=h,k.current&&p(h)},m=h=>{if(h.preventDefault(),h.stopPropagation(),v.current==="adding")return;g("adding");let S;try{S=Promise.resolve(n(x.current))}catch(C){S=Promise.reject(C)}S.then(()=>g("added"),()=>g(null))};return(0,q.jsx)("span",{className:oe.cart,"data-aia-product-cart":"","data-aia-cart-state":s??void 0,"aria-busy":s==="adding"?!0:void 0,role:"button","aria-label":a,tabIndex:t?0:-1,onClick:m,onKeyDown:h=>{h.key!=="Enter"&&h.key!==" "||m(h)},onFocus:h=>{h.stopPropagation(),o()},onBlur:h=>{h.stopPropagation(),l(h)},children:(0,q.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[(0,q.jsx)("path",{className:oe.cartGlyph,d:"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6"}),(0,q.jsx)("path",{className:oe.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),(0,q.jsx)("path",{className:oe.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),(0,q.jsx)("path",{className:oe.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),(0,q.jsx)("circle",{className:oe.cartGlyph,cx:"9",cy:"20",r:"1.3"}),(0,q.jsx)("circle",{className:oe.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function hi({sources:e,title:a,fallback:t,onPhotoFill:n}){let[o,l]=(0,xe.useState)(0),s=e[o],p=!!s,[v,x]=(0,xe.useState)(null),k=!p&&t==="initial";return(0,xe.useEffect)(()=>()=>n(null),[n]),(0,q.jsxs)("span",{className:oe.media,"data-aia-product-media":"","aria-hidden":"true","data-aia-product-placeholder":!p&&!k?"":void 0,"data-aia-product-initial":k?"":void 0,"data-aia-image-loaded":p&&v===s?"":void 0,children:[p?(0,q.jsx)("img",{className:oe.image,src:s,alt:"",loading:"lazy",decoding:"async",onLoad:g=>{x(s),n((0,ze.productPhotoFill)(g.currentTarget.naturalWidth,g.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&n(null),l(g=>g+1)}}):null,k?(0,ze.productInitial)(a):null]})}var W=require("@magicx-eng/ai-autocomplete-vanilla"),Le=require("react");var Ca=require("@magicx-eng/ai-autocomplete-vanilla"),Gt=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
3154
+ `,document.head.appendChild(e)}var oe={section:"aia-section-Hugfg",label:"aia-label-nuc93",row:"aia-row-WDVBX",card:"aia-card-JBGYT",media:"aia-media-RrbGe",image:"aia-image-5pNL7",body:"aia-body-ly032",vendor:"aia-vendor-Gvu7G",title:"aia-title-gCNmq",price:"aia-price-gULcE",compareAt:"aia-compareAt-ewE54",badge:"aia-badge-j9Hcd",cart:"aia-cart-kSlqU",cartCheck:"aia-cartCheck-YTTQ6",cartGlyph:"aia-cartGlyph-cmqAk",cartSpinner:"aia-cartSpinner-442rc","magicx-aia-product-cart-spin":"aia-magicx-aia-product-cart-spin-x8mgr",stripLoadingOut:"aia-stripLoadingOut-0jOOQ",stripFadeIn:"aia-stripFadeIn-0p9qx"};var q=require("react/jsx-runtime");function Sa({products:e,listboxId:a,onSelect:t,busyProductId:n=null,onAddToCart:o,onFocusChange:l,focusable:s=!0,loading:p=!1,layout:v="row",imageFallback:x="image",showVendor:k=!0,strings:g=(0,ze.uiStringsFor)()}){let m=e.length>0,h=(0,xe.useRef)(null);if((0,xe.useEffect)(()=>{let C=h.current;if(!(!m||!C))return(0,ze.attachProductRowWheel)(C)},[m]),!m)return null;let S=`${a}-products-label`;return(0,q.jsxs)("section",{className:oe.section,"data-aia-products":"","data-aia-loading":p?"":void 0,"data-aia-products-layout":v,role:"group","aria-labelledby":S,children:[(0,q.jsx)("div",{className:oe.label,id:S,"data-aia-products-label":"",children:g.products}),(0,q.jsx)("div",{ref:h,className:oe.row,"data-aia-products-row":"",children:e.map((C,I)=>(0,q.jsx)(di,{product:C,id:`${a}-product-${I}`,onSelect:t,busy:C.id===n,onAddToCart:o,onFocusChange:l,focusable:s,imageFallback:x,showVendor:k,soldOut:g.soldOut,addToCart:g.addToCart},C.id))})]})}function di({product:e,id:a,onSelect:t,busy:n,onAddToCart:o,onFocusChange:l,focusable:s,imageFallback:p,showVendor:v,soldOut:x,addToCart:k}){let g=!!o&&e.available!==!1,[m,h]=(0,xe.useState)(null),S=I=>{I.relatedTarget?.closest("[data-aia-dropdown]")||l?.(!1)},C=I=>{I.metaKey||I.ctrlKey||I.shiftKey||I.altKey||I.button!==0||(I.preventDefault(),t(e))};return(0,q.jsxs)("a",{id:a,className:oe.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":g?"":void 0,"data-aia-product-state":n?"busy":void 0,"aria-busy":n?!0:void 0,role:"option","aria-selected":!1,style:m?{"--aia-product-photo-fill-x":String(m.x),"--aia-product-photo-fill-y":String(m.y)}:void 0,href:e.url,tabIndex:s?0:-1,onClick:C,onKeyDown:I=>{I.key!=="Enter"&&I.key!==" "||(I.preventDefault(),t(e))},onFocus:()=>l?.(!0),onBlur:S,children:[(0,q.jsx)(hi,{sources:(0,ze.productImageSources)(e.imageUrl),title:e.title,fallback:p,onPhotoFill:h},(0,ze.productImageSrc)(e.imageUrl)??""),(0,q.jsxs)("span",{className:oe.body,children:[v&&e.vendor?(0,q.jsx)("span",{className:oe.vendor,children:e.vendor}):null,(0,q.jsx)("span",{className:oe.title,children:e.title}),e.price?(0,q.jsxs)("span",{className:oe.price,children:[e.price,e.compareAtPrice?(0,q.jsx)("s",{className:oe.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?(0,q.jsx)("span",{className:oe.badge,children:x}):null]}),g&&o?(0,q.jsx)(pi,{product:e,label:`${k}: ${e.title}`,focusable:s,onAddToCart:o,onFocus:()=>l?.(!0),onBlur:S},ci(e)):null]})}function ci(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(a=>a??"").join("\0")}function pi({product:e,label:a,focusable:t,onAddToCart:n,onFocus:o,onBlur:l}){let[s,p]=(0,xe.useState)(null),v=(0,xe.useRef)(null),x=(0,xe.useRef)(e);x.current=e;let k=(0,xe.useRef)(!0);(0,xe.useEffect)(()=>(k.current=!0,()=>{k.current=!1}),[]);let g=h=>{v.current=h,k.current&&p(h)},m=h=>{if(h.preventDefault(),h.stopPropagation(),v.current==="adding")return;g("adding");let S;try{S=Promise.resolve(n(x.current))}catch(C){S=Promise.reject(C)}S.then(()=>g("added"),()=>g(null))};return(0,q.jsx)("span",{className:oe.cart,"data-aia-product-cart":"","data-aia-cart-state":s??void 0,"aria-busy":s==="adding"?!0:void 0,role:"button","aria-label":a,tabIndex:t?0:-1,onClick:m,onKeyDown:h=>{h.key!=="Enter"&&h.key!==" "||m(h)},onFocus:h=>{h.stopPropagation(),o()},onBlur:h=>{h.stopPropagation(),l(h)},children:(0,q.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[(0,q.jsx)("path",{className:oe.cartGlyph,d:"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6"}),(0,q.jsx)("path",{className:oe.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),(0,q.jsx)("path",{className:oe.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),(0,q.jsx)("path",{className:oe.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),(0,q.jsx)("circle",{className:oe.cartGlyph,cx:"9",cy:"20",r:"1.3"}),(0,q.jsx)("circle",{className:oe.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function hi({sources:e,title:a,fallback:t,onPhotoFill:n}){let[o,l]=(0,xe.useState)(0),s=e[o],p=!!s,[v,x]=(0,xe.useState)(null),k=!p&&t==="initial";return(0,xe.useEffect)(()=>()=>n(null),[n]),(0,q.jsxs)("span",{className:oe.media,"data-aia-product-media":"","aria-hidden":"true","data-aia-product-placeholder":!p&&!k?"":void 0,"data-aia-product-initial":k?"":void 0,"data-aia-image-loaded":p&&v===s?"":void 0,children:[p?(0,q.jsx)("img",{className:oe.image,src:s,alt:"",loading:"lazy",decoding:"async",onLoad:g=>{x(s),n((0,ze.productPhotoFill)(g.currentTarget.naturalWidth,g.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&n(null),l(g=>g+1)}}):null,k?(0,ze.productInitial)(a):null]})}var W=require("@magicx-eng/ai-autocomplete-vanilla"),Le=require("react");var Ca=require("@magicx-eng/ai-autocomplete-vanilla"),Gt=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-238f77c4")){let e=document.createElement("style");e.id="ac-style-238f77c4",e.textContent=`.aia-grid {
3155
3155
  display: grid;
3156
3156
  grid-template-columns: repeat(
3157
3157
  auto-fit,
@@ -3195,7 +3195,7 @@
3195
3195
  :where([data-aia-options-style="classic"]) .aia-grid[data-scroll] {
3196
3196
  max-height: var(--aia-grid-max-height, 120px);
3197
3197
  }
3198
- `,document.head.appendChild(e)}var Pa=require("react/jsx-runtime");function Ta({min:e="16rem",max:a,gap:t,scroll:n=!1,maxHeight:o,scrollResetKey:l,cols:s,template:p,innerRef:v,className:x,children:k,...g}){let m=(0,Gt.useRef)(null);(0,Gt.useLayoutEffect)(()=>{if(l===void 0)return;let S=m.current;S&&(S.scrollTop=0)},[l]);let h={"--aia-grid-min":e};return a&&(h["--aia-grid-max"]=a),t&&(h["--aia-grid-gap"]=t),o&&(h["--aia-grid-max-height"]=o),s&&(h.gridTemplateColumns=(0,Ca.optionsGridTemplateColumns)(s)),p&&(h.gridTemplateColumns=p),(0,Pa.jsx)("div",{ref:S=>{m.current=S,v?.(S)},className:x?`aia-grid ${x}`:"aia-grid","data-scroll":n||void 0,style:h,...g,children:k})}var ce=require("@magicx-eng/ai-autocomplete-vanilla"),ye=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-82820da7")){let e=document.createElement("style");e.id="ac-style-82820da7",e.textContent=`.aia-item-d4vpD {
3198
+ `,document.head.appendChild(e)}var Pa=require("react/jsx-runtime");function Ta({min:e="16rem",max:a,gap:t,scroll:n=!1,maxHeight:o,scrollResetKey:l,cols:s,template:p,innerRef:v,className:x,children:k,...g}){let m=(0,Gt.useRef)(null);(0,Gt.useLayoutEffect)(()=>{if(l===void 0)return;let S=m.current;S&&(S.scrollTop=0)},[l]);let h={"--aia-grid-min":e};return a&&(h["--aia-grid-max"]=a),t&&(h["--aia-grid-gap"]=t),o&&(h["--aia-grid-max-height"]=o),s&&(h.gridTemplateColumns=(0,Ca.optionsGridTemplateColumns)(s)),p&&(h.gridTemplateColumns=p),(0,Pa.jsx)("div",{ref:S=>{m.current=S,v?.(S)},className:x?`aia-grid ${x}`:"aia-grid","data-scroll":n||void 0,style:h,...g,children:k})}var ce=require("@magicx-eng/ai-autocomplete-vanilla"),ye=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-182585c2")){let e=document.createElement("style");e.id="ac-style-182585c2",e.textContent=`.aia-item-d4vpD {
3199
3199
  position: relative;
3200
3200
  /* Clip, not visible: the entrance rise below runs on the inner content,
3201
3201
  and a transformed box extends its scroll container's scrollable area.
@@ -3758,7 +3758,7 @@
3758
3758
  height: 18px;
3759
3759
  border-radius: 6px;
3760
3760
  }
3761
- `,document.head.appendChild(e)}var le={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg",checkPop:"aia-checkPop-CCWRW"};var de=require("react/jsx-runtime"),ui=2e3,mi=170;function Ia({option:e,isHighlighted:a,checked:t,onSelect:n,onHighlight:o,onUnhighlight:l,id:s,loading:p,showIcon:v=!0,showImage:x=!0,showCount:k=!0,scrollHint:g,enterDelayMs:m=0}){let[h]=(0,ye.useState)(m),[S,C]=(0,ye.useState)(!1),I=x?(0,ce.optionImageSources)(e.image_url):[],F=I[0]??null,[N,re]=(0,ye.useState)([]),K=I.find(i=>!N.includes(i))??null,R=x?(e.imageCollage??[]).map(i=>(0,ce.optionImageSources)(i)[0]).filter(i=>i!==void 0):[],[H,_]=(0,ye.useState)(!1),[ne,fe]=(0,ye.useState)(null),pe=(0,ye.useMemo)(()=>!F&&v&&e.icon_svg?(0,ce.sanitizeOptionIconSvg)(e.icon_svg):null,[F,v,e.icon_svg]),$=k?(0,ce.formatOptionCount)(e.item_count):null,E=(0,ye.useRef)(void 0),Z=(0,ye.useRef)(null),Se=(0,ye.useRef)(Number.NEGATIVE_INFINITY);(0,ye.useEffect)(()=>()=>clearTimeout(E.current),[]);let Ce=i=>{if(p||!e.is_tappable)return;let y=i?.currentTarget,ue=t!==void 0&&y!==void 0&&i!==void 0&&!(0,ce.isMultiSelectToggleTap)(y,y.querySelector("[data-aia-checkbox]"),i),me=t!==void 0&&!ue;if(!me){let we=performance.now();if(we-Se.current<mi)return;Se.current=we}ue?n(e,{commit:!0}):n(e),!me&&(C(!0),clearTimeout(E.current),E.current=setTimeout(()=>{C(!1),(0,ce.clearPanelMorphPressLook)(Z.current?.closest("[data-aia-dropdown]"))},ui))},he=[le.item,a&&!p?le.highlighted:"",e.liveMatch&&!p?le.liveMatch:"",e.is_tappable?le.tappable:le.nonTappable,S?le.pressed:"",g?le.scrollHint:""].filter(Boolean).join(" ");return(0,de.jsx)("div",{ref:Z,id:s,role:"option","data-aia-option":"","data-aia-loading":p?"":void 0,"data-aia-icon":pe&&e.icon?e.icon:void 0,"data-aia-image":F?"":void 0,"data-aia-item-count":$!==null?e.item_count:void 0,"aria-selected":t??a,className:he,style:{[ce.OPTION_ENTER_DELAY_VAR]:`${h}ms`},tabIndex:p||!e.is_tappable?-1:0,onClick:Ce,onKeyDown:i=>{!p&&e.is_tappable&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),Ce())},onMouseEnter:!p&&e.is_tappable?o:void 0,onMouseLeave:l,children:(0,de.jsxs)("span",{className:le.content,children:[t!==void 0&&e.is_tappable&&(0,de.jsx)("span",{className:le.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":t}),F&&R.length>1&&(0,de.jsx)("span",{className:`${le.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-collage":R.length,"data-aia-image-loaded":H?"":void 0,children:R.map(i=>(0,de.jsx)("img",{src:i,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,onLoad:()=>_(!0),onError:y=>{y.currentTarget.hidden=!0}},i))}),F&&R.length<=1&&(0,de.jsx)("span",{className:`${le.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":K!==null&&ne===K?"":void 0,children:(0,de.jsx)("img",{src:K??F,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:K===null,onLoad:()=>fe(K),onError:()=>{K!==null&&re(i=>[...i,K])}})}),pe&&(0,de.jsx)("span",{className:`${le.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:pe}}),(0,de.jsxs)("span",{className:le.text,children:[e.matchedText?(0,ce.highlightParts)((0,ce.optionLabel)(e),e.matchedText).map((i,y)=>i.bold?(0,de.jsx)("strong",{className:`${le.match} magicx-aia-option-match`,"data-aia-match-partial":i.partial?"":void 0,children:i.text},y):i.text):(0,ce.optionLabel)(e),e.parameterLabel&&(0,de.jsxs)(de.Fragment,{children:[" ",(0,de.jsx)("span",{className:`${le.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&(0,de.jsx)("span",{className:le.tag,children:e.tag}),$!==null&&(0,de.jsx)("span",{className:`${le.count} magicx-aia-option-count`,children:$})]})})}var Jt=require("react/jsx-runtime");function gi(){let[e,a]=(0,Le.useState)(W.isOptionsGridMobileViewport);return(0,Le.useEffect)(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia(W.OPTIONS_GRID_MOBILE_QUERY),n=()=>a(t.matches);return n(),t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[]),e}function Aa({options:e,activeIndex:a,picked:t,onSelect:n,onHighlight:o,onUnhighlight:l,listboxId:s,loading:p,groupKey:v="",optionsPosition:x="below",showIcons:k=!0,showImages:g=!0,showCounts:m=!0}){let h=gi(),S=(0,Le.useRef)(null),[C,I]=(0,Le.useState)(null),F=(0,Le.useRef)(null);(0,Le.useLayoutEffect)(()=>{if(p&&(0,W.sameOptionRows)(F.current,e))return;F.current=p?null:e;let R=S.current,H=R&&!p&&(0,W.needsOptionsGridMeasurement)(e.length,h),_=R?.closest("[data-aia-dropdown]");H&&_&&(0,W.releasePanelHug)(_);let ne=H?(0,W.measureOptionsGrid)(R):null;I(ne?(0,W.planOptionsGrid)(e.length,h,ne.rowWidths,ne.gridWidth):null)},[e,h,p]);let N=C??(0,W.planOptionsGrid)(e.length,h,null,null);(0,Le.useLayoutEffect)(()=>{let R=S.current?.closest("[data-aia-dropdown]");R&&(0,W.syncPanelHug)(R)},[N.template,h]);let re=p?-1:a;(0,Le.useLayoutEffect)(()=>{S.current&&(0,W.syncHighlightScroll)(S.current,re)},[re]);let K=(0,W.optionsShowLeadingVisuals)(e,k,g);return(0,Jt.jsx)(Ta,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:v,template:N.template,maxHeight:N.maxHeight,innerRef:R=>{S.current=R},"data-aia-group":v,children:e.map((R,H)=>(0,Jt.jsx)(Ia,{option:R,isHighlighted:H===a,checked:t?t.includes(R.text):void 0,onSelect:n,onHighlight:_=>{(0,W.pointerMayHighlight)(S.current,H,_)&&o(H)},onUnhighlight:l?_=>{(0,W.pointerMayHighlight)(S.current,-1,_)&&l(H)}:void 0,id:`${s}-option-${H}`,loading:p,showIcon:k&&K,showImage:g&&K,showCount:m,scrollHint:!p&&N.scrollHintIndices.includes(H),enterDelayMs:p?0:(0,W.optionEnterDelayMs)(H,N.cols,e.length,x)},`${v}\0${R.parameter??""}\0${R.text}`))})}var ge=require("@magicx-eng/ai-autocomplete-vanilla"),We=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-52a922cb")){let e=document.createElement("style");e.id="ac-style-52a922cb",e.textContent=`/* --- Time wheel (replaces the options grid for time suggestions) ---
3761
+ `,document.head.appendChild(e)}var le={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg",checkPop:"aia-checkPop-CCWRW"};var de=require("react/jsx-runtime"),ui=2e3,mi=170;function Ia({option:e,isHighlighted:a,checked:t,onSelect:n,onHighlight:o,onUnhighlight:l,id:s,loading:p,showIcon:v=!0,showImage:x=!0,showCount:k=!0,scrollHint:g,enterDelayMs:m=0}){let[h]=(0,ye.useState)(m),[S,C]=(0,ye.useState)(!1),I=x?(0,ce.optionImageSources)(e.image_url):[],F=I[0]??null,[N,re]=(0,ye.useState)([]),K=I.find(i=>!N.includes(i))??null,R=x?(e.imageCollage??[]).map(i=>(0,ce.optionImageSources)(i)[0]).filter(i=>i!==void 0):[],[H,_]=(0,ye.useState)(!1),[ne,fe]=(0,ye.useState)(null),pe=(0,ye.useMemo)(()=>!F&&v&&e.icon_svg?(0,ce.sanitizeOptionIconSvg)(e.icon_svg):null,[F,v,e.icon_svg]),$=k?(0,ce.formatOptionCount)(e.item_count):null,E=(0,ye.useRef)(void 0),Z=(0,ye.useRef)(null),Se=(0,ye.useRef)(Number.NEGATIVE_INFINITY);(0,ye.useEffect)(()=>()=>clearTimeout(E.current),[]);let Ce=i=>{if(p||!e.is_tappable)return;let y=i?.currentTarget,ue=t!==void 0&&y!==void 0&&i!==void 0&&!(0,ce.isMultiSelectToggleTap)(y,y.querySelector("[data-aia-checkbox]"),i),me=t!==void 0&&!ue;if(!me){let we=performance.now();if(we-Se.current<mi)return;Se.current=we}ue?n(e,{commit:!0}):n(e),!me&&(C(!0),clearTimeout(E.current),E.current=setTimeout(()=>{C(!1),(0,ce.clearPanelMorphPressLook)(Z.current?.closest("[data-aia-dropdown]"))},ui))},he=[le.item,a&&!p?le.highlighted:"",e.liveMatch&&!p?le.liveMatch:"",e.is_tappable?le.tappable:le.nonTappable,S?le.pressed:"",g?le.scrollHint:""].filter(Boolean).join(" ");return(0,de.jsx)("div",{ref:Z,id:s,role:"option","data-aia-option":"","data-aia-loading":p?"":void 0,"data-aia-icon":pe&&e.icon?e.icon:void 0,"data-aia-image":F?"":void 0,"data-aia-item-count":$!==null?e.item_count:void 0,"aria-selected":t??a,className:he,style:{[ce.OPTION_ENTER_DELAY_VAR]:`${h}ms`},tabIndex:p||!e.is_tappable?-1:0,onClick:Ce,onKeyDown:i=>{!p&&e.is_tappable&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),Ce())},onMouseEnter:!p&&e.is_tappable?o:void 0,onMouseLeave:l,children:(0,de.jsxs)("span",{className:le.content,children:[t!==void 0&&e.is_tappable&&(0,de.jsx)("span",{className:le.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":t}),F&&R.length>1&&(0,de.jsx)("span",{className:`${le.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-collage":R.length,"data-aia-image-loaded":H?"":void 0,children:R.map(i=>(0,de.jsx)("img",{src:i,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,onLoad:()=>_(!0),onError:y=>{y.currentTarget.hidden=!0}},i))}),F&&R.length<=1&&(0,de.jsx)("span",{className:`${le.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":K!==null&&ne===K?"":void 0,children:(0,de.jsx)("img",{src:K??F,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:K===null,onLoad:()=>fe(K),onError:()=>{K!==null&&re(i=>[...i,K])}})}),pe&&(0,de.jsx)("span",{className:`${le.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:pe}}),(0,de.jsxs)("span",{className:le.text,children:[e.matchedText?(0,ce.highlightParts)((0,ce.optionLabel)(e),e.matchedText).map((i,y)=>i.bold?(0,de.jsx)("strong",{className:`${le.match} magicx-aia-option-match`,"data-aia-match-partial":i.partial?"":void 0,children:i.text},y):i.text):(0,ce.optionLabel)(e),e.parameterLabel&&(0,de.jsxs)(de.Fragment,{children:[" ",(0,de.jsx)("span",{className:`${le.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&(0,de.jsx)("span",{className:le.tag,children:e.tag}),$!==null&&(0,de.jsx)("span",{className:`${le.count} magicx-aia-option-count`,children:$})]})})}var Jt=require("react/jsx-runtime");function gi(){let[e,a]=(0,Le.useState)(W.isOptionsGridMobileViewport);return(0,Le.useEffect)(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia(W.OPTIONS_GRID_MOBILE_QUERY),n=()=>a(t.matches);return n(),t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[]),e}function Aa({options:e,activeIndex:a,picked:t,onSelect:n,onHighlight:o,onUnhighlight:l,listboxId:s,loading:p,groupKey:v="",optionsPosition:x="below",showIcons:k=!0,showImages:g=!0,showCounts:m=!0}){let h=gi(),S=(0,Le.useRef)(null),[C,I]=(0,Le.useState)(null),F=(0,Le.useRef)(null);(0,Le.useLayoutEffect)(()=>{if(p&&(0,W.sameOptionRows)(F.current,e))return;F.current=p?null:e;let R=S.current,H=R&&!p&&(0,W.needsOptionsGridMeasurement)(e.length,h),_=R?.closest("[data-aia-dropdown]");H&&_&&(0,W.releasePanelHug)(_);let ne=H?(0,W.measureOptionsGrid)(R):null;I(ne?(0,W.planOptionsGrid)(e.length,h,ne.rowWidths,ne.gridWidth):null)},[e,h,p]);let N=C??(0,W.planOptionsGrid)(e.length,h,null,null);(0,Le.useLayoutEffect)(()=>{let R=S.current?.closest("[data-aia-dropdown]");R&&(0,W.syncPanelHug)(R)},[N.template,h]);let re=p?-1:a;(0,Le.useLayoutEffect)(()=>{S.current&&(0,W.syncHighlightScroll)(S.current,re)},[re]);let K=(0,W.optionsShowLeadingVisuals)(e,k,g);return(0,Jt.jsx)(Ta,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:v,template:N.template,maxHeight:N.maxHeight,innerRef:R=>{S.current=R},"data-aia-group":v,children:e.map((R,H)=>(0,Jt.jsx)(Ia,{option:R,isHighlighted:H===a,checked:t?t.includes(R.text):void 0,onSelect:n,onHighlight:_=>{(0,W.pointerMayHighlight)(S.current,H,_)&&o(H)},onUnhighlight:l?_=>{(0,W.pointerMayHighlight)(S.current,-1,_)&&l(H)}:void 0,id:`${s}-option-${H}`,loading:p,showIcon:k&&K,showImage:g&&K,showCount:m,scrollHint:!p&&N.scrollHintIndices.includes(H),enterDelayMs:p?0:(0,W.optionEnterDelayMs)(H,N.cols,e.length,x)},`${v}\0${R.parameter??""}\0${R.text}`))})}var ge=require("@magicx-eng/ai-autocomplete-vanilla"),We=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-0d5bb290")){let e=document.createElement("style");e.id="ac-style-0d5bb290",e.textContent=`/* --- Time wheel (replaces the options grid for time suggestions) ---
3762
3762
 
3763
3763
  One of three hand-maintained copies (vanilla styles.css, this file, Angular's
3764
3764
  time-wheel.component.css). Only the class-naming layer differs \u2014 the
@@ -3880,7 +3880,7 @@
3880
3880
  .aia-done-llNY5:hover {
3881
3881
  background: var(--aia-time-done-bg-hover, var(--aia-done-bg-hover, #d8dde8));
3882
3882
  }
3883
- `,document.head.appendChild(e)}var Be={timeWheel:"aia-timeWheel-KdR4A",value:"aia-value--wqvm",columns:"aia-columns-TaD-f",band:"aia-band-pVy-f",column:"aia-column-lwtdd",row:"aia-row-A3pAx",selected:"aia-selected-xgOWY",separator:"aia-separator-kX9WO",done:"aia-done-llNY5"};var Oe=require("react/jsx-runtime"),fi=120;function Ea({view:e,label:a,doneLabel:t,interactive:n=!0,onTimeChange:o,onTimeCommit:l}){return(0,Oe.jsxs)("div",{className:Be.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":a,onMouseDown:s=>s.preventDefault(),children:[(0,Oe.jsx)("span",{className:Be.value,"data-aia-time-value":"","aria-live":"polite",children:(0,ge.formatTime)(e.minutes)}),(0,Oe.jsxs)("div",{className:Be.columns,"aria-hidden":"true",children:[(0,Oe.jsx)("div",{className:Be.band}),ge.TIME_WHEEL_COLUMNS.map(s=>(0,Oe.jsxs)(We.Fragment,{children:[s==="minute"&&(0,Oe.jsx)("span",{className:Be.separator,children:":"}),(0,Oe.jsx)(bi,{column:s,minutes:e.minutes,interactive:n,onTimeChange:o})]},s))]}),(0,Oe.jsx)("button",{type:"button",tabIndex:-1,className:Be.done,"data-aia-time-done":"",onClick:()=>{n&&l()},children:t})]})}function bi({column:e,minutes:a,interactive:t,onTimeChange:n}){let o=(0,We.useRef)(null),l=(0,We.useRef)(null),s=(0,We.useRef)(null),p=(0,We.useRef)({minutes:a,interactive:t,onTimeChange:n});p.current={minutes:a,interactive:t,onTimeChange:n};let v=(0,ge.timeWheelIndex)(e,a);(0,We.useLayoutEffect)(()=>{let g=o.current;if(!g||s.current)return;let m=v*ge.TIME_WHEEL_ROW_HEIGHT;Math.abs(g.scrollTop-m)<1||(l.current=m,g.scrollTop=m)},[v]),(0,We.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let x=()=>{s.current=null;let g=o.current,m=p.current;if(!g||!m.interactive)return;let h=(0,ge.timeWheelIndexFromScroll)(e,g.scrollTop);h!==(0,ge.timeWheelIndex)(e,m.minutes)&&m.onTimeChange((0,ge.withTimeWheelIndex)(e,m.minutes,h))},k=()=>{let g=o.current;if(g){if(l.current!=null&&Math.abs(g.scrollTop-l.current)<1){l.current=null;return}l.current=null,s.current&&clearTimeout(s.current),s.current=setTimeout(x,fi)}};return(0,Oe.jsx)("div",{ref:o,className:Be.column,"data-aia-time-column":e,onScroll:k,children:(0,ge.timeWheelRows)(e).map((g,m)=>(0,Oe.jsx)("div",{className:m===v?`${Be.row} ${Be.selected}`:Be.row,"data-aia-time-row":"","data-aia-index":m,onClick:()=>{p.current.interactive&&n((0,ge.withTimeWheelIndex)(e,p.current.minutes,m))},children:g.label},g.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
3883
+ `,document.head.appendChild(e)}var Be={timeWheel:"aia-timeWheel-KdR4A",value:"aia-value--wqvm",columns:"aia-columns-TaD-f",band:"aia-band-pVy-f",column:"aia-column-lwtdd",row:"aia-row-A3pAx",selected:"aia-selected-xgOWY",separator:"aia-separator-kX9WO",done:"aia-done-llNY5"};var Oe=require("react/jsx-runtime"),fi=120;function Ea({view:e,label:a,doneLabel:t,interactive:n=!0,onTimeChange:o,onTimeCommit:l}){return(0,Oe.jsxs)("div",{className:Be.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":a,onMouseDown:s=>s.preventDefault(),children:[(0,Oe.jsx)("span",{className:Be.value,"data-aia-time-value":"","aria-live":"polite",children:(0,ge.formatTime)(e.minutes)}),(0,Oe.jsxs)("div",{className:Be.columns,"aria-hidden":"true",children:[(0,Oe.jsx)("div",{className:Be.band}),ge.TIME_WHEEL_COLUMNS.map(s=>(0,Oe.jsxs)(We.Fragment,{children:[s==="minute"&&(0,Oe.jsx)("span",{className:Be.separator,children:":"}),(0,Oe.jsx)(bi,{column:s,minutes:e.minutes,interactive:n,onTimeChange:o})]},s))]}),(0,Oe.jsx)("button",{type:"button",tabIndex:-1,className:Be.done,"data-aia-time-done":"",onClick:()=>{n&&l()},children:t})]})}function bi({column:e,minutes:a,interactive:t,onTimeChange:n}){let o=(0,We.useRef)(null),l=(0,We.useRef)(null),s=(0,We.useRef)(null),p=(0,We.useRef)({minutes:a,interactive:t,onTimeChange:n});p.current={minutes:a,interactive:t,onTimeChange:n};let v=(0,ge.timeWheelIndex)(e,a);(0,We.useLayoutEffect)(()=>{let g=o.current;if(!g||s.current)return;let m=v*ge.TIME_WHEEL_ROW_HEIGHT;Math.abs(g.scrollTop-m)<1||(l.current=m,g.scrollTop=m)},[v]),(0,We.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let x=()=>{s.current=null;let g=o.current,m=p.current;if(!g||!m.interactive)return;let h=(0,ge.timeWheelIndexFromScroll)(e,g.scrollTop);h!==(0,ge.timeWheelIndex)(e,m.minutes)&&m.onTimeChange((0,ge.withTimeWheelIndex)(e,m.minutes,h))},k=()=>{let g=o.current;if(g){if(l.current!=null&&Math.abs(g.scrollTop-l.current)<1){l.current=null;return}l.current=null,s.current&&clearTimeout(s.current),s.current=setTimeout(x,fi)}};return(0,Oe.jsx)("div",{ref:o,className:Be.column,"data-aia-time-column":e,onScroll:k,children:(0,ge.timeWheelRows)(e).map((g,m)=>(0,Oe.jsx)("div",{className:m===v?`${Be.row} ${Be.selected}`:Be.row,"data-aia-time-row":"","data-aia-index":m,onClick:()=>{p.current.interactive&&n((0,ge.withTimeWheelIndex)(e,p.current.minutes,m))},children:g.label},g.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-df577469")){let e=document.createElement("style");e.id="ac-style-df577469",e.textContent=`.aia-stack {
3884
3884
  display: flex;
3885
3885
  flex-direction: column;
3886
3886
  gap: var(--aia-stack-space, 0.5rem);
@@ -3895,7 +3895,7 @@
3895
3895
  align-items: end;
3896
3896
  }
3897
3897
  /* data-align="stretch" is the flex default \u2014 no rule needed. */
3898
- `,document.head.appendChild(e)}var za=require("react/jsx-runtime");function Ra({space:e,align:a="stretch",className:t,children:n,...o}){let l=e?{"--aia-stack-space":e}:void 0;return(0,za.jsx)("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":a,style:l,...o,children:n})}var j=require("react/jsx-runtime"),wi=typeof window>"u"?te.useEffect:te.useLayoutEffect,vi=[159,119,164],xi=()=>{},La=()=>{},yi=e=>{},ki=()=>{},Si=e=>{},Ci=e=>{},Ti=e=>{},Pi=e=>{};function Ii(e){let a=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,n]=(0,te.useState)(a);if((0,te.useEffect)(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>n(o.matches);return o.addEventListener("change",l),()=>o.removeEventListener("change",l)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function Ai(e,a){let t=(0,te.useRef)(null);(0,te.useEffect)(()=>{let n=e.current,o=a.current;if(!n||!o)return;let l=(0,M.queryLive)(n,".aia-grid[data-scroll]");if(t.current&&t.current.grid!==l&&(t.current.controller.destroy(),t.current=null),l&&!t.current){t.current={grid:l,controller:(0,M.attachScrollArrow)({dropdown:n,grid:l,button:o})};return}t.current?.controller.update()}),(0,te.useEffect)(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function Ei(e,a){let t=(0,te.useRef)(a);t.current=a;let n=(0,te.useRef)(null);(0,te.useLayoutEffect)(()=>{let o=e.current;if(o){if(!n.current){n.current=(0,M.attachViewportFit)({dropdown:o,isOpen:()=>t.current});return}n.current.update()}}),(0,te.useEffect)(()=>()=>{n.current?.destroy(),n.current=null},[])}function Kt({suggestions:e,activeIndex:a,onSelect:t,onHighlight:n,onUnhighlight:o,isOpen:l,id:s,className:p,pills:v,onPillClick:x,showPills:k=!0,onSkip:g,showSkipButton:m=!0,showOptionIcons:h=!0,showOptionImages:S=!0,showOptionCounts:C=!0,skipDisabled:I=!1,activeSelected:F=!1,isLoading:N=!1,skeletonExiting:re=!1,isInputEmpty:K=!1,language:R,products:H,onProductSelect:_,onProductAddToCart:ne,onProductFocusChange:fe,productsLayout:pe="row",productImageFallback:$="image",showProductVendor:E=!0,formatType:Z="options",dateView:Se=null,selectedDateIso:Ce=null,selectedDateRange:he=null,dateRangeStart:i=null,dateReferences:y,onPreviousMonth:ue,onNextMonth:me,timeView:we=null,multiSelectView:pt=null,onMultiSelectCommit:Ue,onSeeAllResults:Qe,seeAllBusy:Me=!1,busyProductId:ht=null,fullWidth:tt=!1,onTimeChange:u,onTimeCommit:ut,locationView:Ye=null,isReediting:at=!1,onLocationQuery:b,onLocationMove:T,onLocationCommit:z,onLocationFocusChange:D,isFocused:B=!1,optionsPosition:X="below",mode:Ie}){let Te=Ii(Ie),je=Te!==void 0,be=(0,te.useRef)(null),$e=(0,te.useRef)(null);Ai(be,$e),(0,te.useEffect)(()=>{if(be.current)return(0,M.containScroll)(be.current)},[]);let Ne=e[0]?.options??[],mt=!!(v&&v.length>0&&x),Ae=!!(H&&H.length>0),it=Z==="time"&&we!=null,vt=Z==="location"&&Ye!=null,Pe=l&&(Ne.length>0||k&&mt||N||Ae||it||vt);Ei(be,Pe),wi(()=>{let A=be.current;A&&((0,M.fitMultiSelectDone)(A,(0,M.findMultiSelectDone)(A)),(0,M.syncPanelHug)(A))});let Ee={suggestions:e,activeIndex:a,pills:v,showPills:k,showSkipButton:m,showOptionIcons:h,showOptionImages:S,showOptionCounts:C,skipDisabled:I,activeSelected:F,isLoading:N,skeletonExiting:re,isInputEmpty:K,products:H,formatType:Z,dateView:Se,selectedDateIso:Ce,selectedDateRange:he,dateRangeStart:i,dateReferences:y,timeView:we,multiSelectView:pt,locationView:Ye,isReediting:at,showsSeeAll:!!Qe},ot=(0,te.useRef)(Ee);Pe&&(ot.current=Ee);let r=Pe?Ee:ot.current,Y=(0,M.uiStringsFor)(R),Fe=r.suggestions[0],Ke=Fe?.options??[],gt=r.activeIndex>=0&&!!Ke[r.activeIndex]?.is_tappable,qe=(0,M.labelTraditionalAutocomplete)(r.pills??[],Y.keepTyping),Ze=!!(qe.length>0&&x),w=r.showPills&&Ze,xt=r.showPills&&!Ze&&r.isLoading,nt=w||xt,rt=Ze&&(0,M.hasSkippablePill)(qe)&&r.showSkipButton&&!r.isInputEmpty&&!!g,f=qe[0]?.text,st=(0,M.isCalendarFormat)(r.formatType)&&r.dateView!=null,yt=Ke.length>0&&!st,Xe=Ke.length>0&&st&&!r.isLoading,kt=r.formatType==="time"&&r.timeView!=null&&!r.isLoading,St=r.formatType==="location"&&r.locationView!=null&&!r.isLoading,lt=r.isLoading&&!yt&&!Xe&&!kt&&!St,Ct=r.products??[],Je=(0,M.panelMorphKey)(w?qe:[]);return(0,te.useLayoutEffect)(()=>{be.current&&(0,M.settlePanelMorph)(be.current,Je,{visible:Pe,anchorBottom:X==="above"})},[Je,Pe,X,r.suggestions,r.pills,r.isLoading,r.skeletonExiting,r.isInputEmpty,r.products,r.formatType,r.dateView,r.selectedDateIso,r.selectedDateRange,r.dateRangeStart,r.dateReferences,r.timeView,r.multiSelectView,r.locationView,r.showPills,r.showSkipButton,r.showOptionIcons,r.showOptionImages,r.showOptionCounts,r.showsSeeAll,pe,R]),(0,te.useEffect)(()=>{let A=be.current;return()=>{A&&(0,M.destroyPanelMorph)(A)}},[]),(0,j.jsxs)("div",{ref:be,id:s,role:"listbox","aria-multiselectable":!!r.multiSelectView,"data-aia-dropdown":"","data-options-position":X,"data-mode":Te,"data-aia-loading":r.isLoading?"":void 0,"data-aia-skeleton-exiting":r.skeletonExiting?"":void 0,"data-aia-has-products":Ct.length>0?"":void 0,"data-aia-full-width":tt?"":void 0,className:`${je?"magicx-aia ":""}${Re.dropdown} ${Pe?Re.visible:""} ${p??""}`,onMouseDown:A=>A.preventDefault(),children:[(0,j.jsxs)(Ra,{space:"8px",children:[(nt||rt)&&(0,j.jsxs)(Et,{noWrap:!0,className:Re.pillBar,"data-aia-pillbar":"",children:[nt&&(0,j.jsx)("span",{className:Re.pillScroll,"data-aia-pill-scroll":"",children:(0,j.jsx)(Wt,{pills:qe,activePillIndex:0,activeSelected:r.activeSelected,onSelectPill:x??(()=>{}),rounded:!0,loading:r.isLoading})}),rt&&(0,j.jsx)("button",{type:"button",tabIndex:-1,className:Re.skip,"data-aia-skip":"",disabled:r.isLoading||r.skipDisabled,"aria-label":f?`${Y.skipLabel} ${f}`:Y.skipLabel,onClick:g,children:Y.skip})]}),yt&&(0,j.jsx)(Aa,{options:Ke,activeIndex:r.activeIndex,onSelect:t,onHighlight:n,onUnhighlight:o,listboxId:s,loading:r.isLoading,groupKey:Fe?`${Fe.parameter} ${Fe.text}`:"",optionsPosition:X,showIcons:r.showOptionIcons,showImages:r.showOptionImages,showCounts:r.showOptionCounts,picked:r.multiSelectView?.picked}),r.multiSelectView&&(0,j.jsx)("div",{"data-aia-multi-actions":"",onClick:A=>{A.target.closest("[data-aia-multi-done]")&&!r.skipDisabled&&!r.isLoading&&Ue?.()},children:(0,j.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:Re.multiDone,ref:A=>{A&&(A.disabled=!0,A.offsetHeight,A.disabled=r.skipDisabled||r.isLoading)},children:Y.done})}),Xe&&r.dateView&&(0,j.jsx)(ma,{options:Ke,activeIndex:r.activeIndex,listboxId:s,view:r.dateView,selection:{selectedIso:r.selectedDateIso??null,selectedRange:r.selectedDateRange??null,rangeStart:r.dateRangeStart??null,floor:(0,M.dateFloorFor)(r.formatType,r.dateRangeStart),references:r.dateReferences??[]},onSelect:t,onHighlight:n,onUnhighlight:o,onPreviousMonth:ue??La,onNextMonth:me??La}),kt&&r.timeView&&(0,j.jsx)(Ea,{view:r.timeView,label:Y.timeLabel,doneLabel:Y.done,interactive:!r.skipDisabled,onTimeChange:u??yi,onTimeCommit:ut??ki}),St&&r.locationView&&(0,j.jsx)(va,{view:r.locationView,searchLabel:Y.locationSearch,noResultsLabel:Y.locationNoResults,useTypedLabel:Y.locationUseTyped,widgetFocused:B&&Pe,reediting:r.isReediting,visible:Pe,interactive:!r.skipDisabled,onQuery:b??Si,onMove:T??Ci,onCommit:z??Ti,onFocusChange:D??Pi}),lt&&(0,j.jsx)("div",{className:Re.skeletonBars,"data-aia-skeleton-bars":"",children:vi.map(A=>(0,j.jsx)("span",{className:Re.skeletonBar,style:{width:A}},`bar-${A}`))}),(0,j.jsx)(Sa,{products:Ct,listboxId:s,onSelect:_??xi,busyProductId:ht,onAddToCart:ne,onFocusChange:fe,focusable:Pe&&!r.isLoading,loading:r.isLoading,layout:pe,imageFallback:$,showVendor:E,strings:Y}),r.showsSeeAll&&(0,j.jsx)("div",{className:Re.seeAllRow,"data-aia-see-all":"",onClick:A=>{A.target.closest("[data-aia-see-all-button]")&&(A.stopPropagation(),!(r.isLoading||Me)&&Qe?.())},children:(0,j.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-see-all-button":"","data-aia-see-all-state":Me?"busy":void 0,"aria-busy":Me?!0:void 0,className:Re.seeAll,ref:A=>{A&&(A.disabled=!0,A.offsetHeight,A.disabled=r.isLoading)},children:Y.seeAllResults})}),(0,j.jsx)(ga,{isOptionHighlighted:gt,isInputEmpty:r.isInputEmpty,strings:Y})]}),(0,j.jsx)("button",{ref:$e,type:"button",tabIndex:-1,className:Re.scrollArrow,"data-aia-scroll-arrow":"","aria-label":Y.scrollArrow,"aria-hidden":"true",children:(0,j.jsx)("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,j.jsx)("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}var De=require("@magicx-eng/ai-autocomplete-vanilla");var Da=require("@magicx-eng/ai-autocomplete-vanilla");if(typeof document<"u"&&!document.getElementById("ac-style-fdee06e6")){let e=document.createElement("style");e.id="ac-style-fdee06e6",e.textContent=`.aia-submitButton-otz7H {
3898
+ `,document.head.appendChild(e)}var za=require("react/jsx-runtime");function Ra({space:e,align:a="stretch",className:t,children:n,...o}){let l=e?{"--aia-stack-space":e}:void 0;return(0,za.jsx)("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":a,style:l,...o,children:n})}var j=require("react/jsx-runtime"),wi=typeof window>"u"?te.useEffect:te.useLayoutEffect,vi=[159,119,164],xi=()=>{},La=()=>{},yi=e=>{},ki=()=>{},Si=e=>{},Ci=e=>{},Ti=e=>{},Pi=e=>{};function Ii(e){let a=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,n]=(0,te.useState)(a);if((0,te.useEffect)(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>n(o.matches);return o.addEventListener("change",l),()=>o.removeEventListener("change",l)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function Ai(e,a){let t=(0,te.useRef)(null);(0,te.useEffect)(()=>{let n=e.current,o=a.current;if(!n||!o)return;let l=(0,M.queryLive)(n,".aia-grid[data-scroll]");if(t.current&&t.current.grid!==l&&(t.current.controller.destroy(),t.current=null),l&&!t.current){t.current={grid:l,controller:(0,M.attachScrollArrow)({dropdown:n,grid:l,button:o})};return}t.current?.controller.update()}),(0,te.useEffect)(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function Ei(e,a){let t=(0,te.useRef)(a);t.current=a;let n=(0,te.useRef)(null);(0,te.useLayoutEffect)(()=>{let o=e.current;if(o){if(!n.current){n.current=(0,M.attachViewportFit)({dropdown:o,isOpen:()=>t.current});return}n.current.update()}}),(0,te.useEffect)(()=>()=>{n.current?.destroy(),n.current=null},[])}function Kt({suggestions:e,activeIndex:a,onSelect:t,onHighlight:n,onUnhighlight:o,isOpen:l,id:s,className:p,pills:v,onPillClick:x,showPills:k=!0,onSkip:g,showSkipButton:m=!0,showOptionIcons:h=!0,showOptionImages:S=!0,showOptionCounts:C=!0,skipDisabled:I=!1,activeSelected:F=!1,isLoading:N=!1,skeletonExiting:re=!1,isInputEmpty:K=!1,language:R,products:H,onProductSelect:_,onProductAddToCart:ne,onProductFocusChange:fe,productsLayout:pe="row",productImageFallback:$="image",showProductVendor:E=!0,formatType:Z="options",dateView:Se=null,selectedDateIso:Ce=null,selectedDateRange:he=null,dateRangeStart:i=null,dateReferences:y,onPreviousMonth:ue,onNextMonth:me,timeView:we=null,multiSelectView:pt=null,onMultiSelectCommit:Ue,onSeeAllResults:Qe,seeAllBusy:Me=!1,busyProductId:ht=null,fullWidth:tt=!1,onTimeChange:u,onTimeCommit:ut,locationView:Ye=null,isReediting:at=!1,onLocationQuery:b,onLocationMove:T,onLocationCommit:z,onLocationFocusChange:D,isFocused:B=!1,optionsPosition:X="below",mode:Ie}){let Te=Ii(Ie),je=Te!==void 0,be=(0,te.useRef)(null),$e=(0,te.useRef)(null);Ai(be,$e),(0,te.useEffect)(()=>{if(be.current)return(0,M.containScroll)(be.current)},[]);let Ne=e[0]?.options??[],mt=!!(v&&v.length>0&&x),Ae=!!(H&&H.length>0),it=Z==="time"&&we!=null,vt=Z==="location"&&Ye!=null,Pe=l&&(Ne.length>0||k&&mt||N||Ae||it||vt);Ei(be,Pe),wi(()=>{let A=be.current;A&&((0,M.fitMultiSelectDone)(A,(0,M.findMultiSelectDone)(A)),(0,M.syncPanelHug)(A))});let Ee={suggestions:e,activeIndex:a,pills:v,showPills:k,showSkipButton:m,showOptionIcons:h,showOptionImages:S,showOptionCounts:C,skipDisabled:I,activeSelected:F,isLoading:N,skeletonExiting:re,isInputEmpty:K,products:H,formatType:Z,dateView:Se,selectedDateIso:Ce,selectedDateRange:he,dateRangeStart:i,dateReferences:y,timeView:we,multiSelectView:pt,locationView:Ye,isReediting:at,showsSeeAll:!!Qe},ot=(0,te.useRef)(Ee);Pe&&(ot.current=Ee);let r=Pe?Ee:ot.current,Y=(0,M.uiStringsFor)(R),Fe=r.suggestions[0],Ke=Fe?.options??[],gt=r.activeIndex>=0&&!!Ke[r.activeIndex]?.is_tappable,qe=(0,M.labelTraditionalAutocomplete)(r.pills??[],Y.keepTyping),Ze=!!(qe.length>0&&x),w=r.showPills&&Ze,xt=r.showPills&&!Ze&&r.isLoading,nt=w||xt,rt=Ze&&(0,M.hasSkippablePill)(qe)&&r.showSkipButton&&!r.isInputEmpty&&!!g,f=qe[0]?.text,st=(0,M.isCalendarFormat)(r.formatType)&&r.dateView!=null,yt=Ke.length>0&&!st,Xe=Ke.length>0&&st&&!r.isLoading,kt=r.formatType==="time"&&r.timeView!=null&&!r.isLoading,St=r.formatType==="location"&&r.locationView!=null&&!r.isLoading,lt=r.isLoading&&!yt&&!Xe&&!kt&&!St,Ct=r.products??[],Je=(0,M.panelMorphKey)(w?qe:[]);return(0,te.useLayoutEffect)(()=>{be.current&&(0,M.settlePanelMorph)(be.current,Je,{visible:Pe,anchorBottom:X==="above"})},[Je,Pe,X,r.suggestions,r.pills,r.isLoading,r.skeletonExiting,r.isInputEmpty,r.products,r.formatType,r.dateView,r.selectedDateIso,r.selectedDateRange,r.dateRangeStart,r.dateReferences,r.timeView,r.multiSelectView,r.locationView,r.showPills,r.showSkipButton,r.showOptionIcons,r.showOptionImages,r.showOptionCounts,r.showsSeeAll,pe,R]),(0,te.useEffect)(()=>{let A=be.current;return()=>{A&&(0,M.destroyPanelMorph)(A)}},[]),(0,j.jsxs)("div",{ref:be,id:s,role:"listbox","aria-multiselectable":!!r.multiSelectView,"data-aia-dropdown":"","data-options-position":X,"data-mode":Te,"data-aia-loading":r.isLoading?"":void 0,"data-aia-skeleton-exiting":r.skeletonExiting?"":void 0,"data-aia-has-products":Ct.length>0?"":void 0,"data-aia-full-width":tt?"":void 0,className:`${je?"magicx-aia ":""}${Re.dropdown} ${Pe?Re.visible:""} ${p??""}`,onMouseDown:A=>A.preventDefault(),children:[(0,j.jsxs)(Ra,{space:"8px",children:[(nt||rt)&&(0,j.jsxs)(Et,{noWrap:!0,className:Re.pillBar,"data-aia-pillbar":"",children:[nt&&(0,j.jsx)("span",{className:Re.pillScroll,"data-aia-pill-scroll":"",children:(0,j.jsx)(Wt,{pills:qe,activePillIndex:0,activeSelected:r.activeSelected,onSelectPill:x??(()=>{}),rounded:!0,loading:r.isLoading})}),rt&&(0,j.jsx)("button",{type:"button",tabIndex:-1,className:Re.skip,"data-aia-skip":"",disabled:r.isLoading||r.skipDisabled,"aria-label":f?`${Y.skipLabel} ${f}`:Y.skipLabel,onClick:g,children:Y.skip})]}),yt&&(0,j.jsx)(Aa,{options:Ke,activeIndex:r.activeIndex,onSelect:t,onHighlight:n,onUnhighlight:o,listboxId:s,loading:r.isLoading,groupKey:Fe?`${Fe.parameter} ${Fe.text}`:"",optionsPosition:X,showIcons:r.showOptionIcons,showImages:r.showOptionImages,showCounts:r.showOptionCounts,picked:r.multiSelectView?.picked}),r.multiSelectView&&(0,j.jsx)("div",{"data-aia-multi-actions":"",onClick:A=>{A.target.closest("[data-aia-multi-done]")&&!r.skipDisabled&&!r.isLoading&&Ue?.()},children:(0,j.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:Re.multiDone,ref:A=>{A&&(A.disabled=!0,A.offsetHeight,A.disabled=r.skipDisabled||r.isLoading)},children:Y.done})}),Xe&&r.dateView&&(0,j.jsx)(ma,{options:Ke,activeIndex:r.activeIndex,listboxId:s,view:r.dateView,selection:{selectedIso:r.selectedDateIso??null,selectedRange:r.selectedDateRange??null,rangeStart:r.dateRangeStart??null,floor:(0,M.dateFloorFor)(r.formatType,r.dateRangeStart),references:r.dateReferences??[]},onSelect:t,onHighlight:n,onUnhighlight:o,onPreviousMonth:ue??La,onNextMonth:me??La}),kt&&r.timeView&&(0,j.jsx)(Ea,{view:r.timeView,label:Y.timeLabel,doneLabel:Y.done,interactive:!r.skipDisabled,onTimeChange:u??yi,onTimeCommit:ut??ki}),St&&r.locationView&&(0,j.jsx)(va,{view:r.locationView,searchLabel:Y.locationSearch,noResultsLabel:Y.locationNoResults,useTypedLabel:Y.locationUseTyped,widgetFocused:B&&Pe,reediting:r.isReediting,visible:Pe,interactive:!r.skipDisabled,onQuery:b??Si,onMove:T??Ci,onCommit:z??Ti,onFocusChange:D??Pi}),lt&&(0,j.jsx)("div",{className:Re.skeletonBars,"data-aia-skeleton-bars":"",children:vi.map(A=>(0,j.jsx)("span",{className:Re.skeletonBar,style:{width:A}},`bar-${A}`))}),(0,j.jsx)(Sa,{products:Ct,listboxId:s,onSelect:_??xi,busyProductId:ht,onAddToCart:ne,onFocusChange:fe,focusable:Pe&&!r.isLoading,loading:r.isLoading,layout:pe,imageFallback:$,showVendor:E,strings:Y}),r.showsSeeAll&&(0,j.jsx)("div",{className:Re.seeAllRow,"data-aia-see-all":"",onClick:A=>{A.target.closest("[data-aia-see-all-button]")&&(A.stopPropagation(),!(r.isLoading||Me)&&Qe?.())},children:(0,j.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-see-all-button":"","data-aia-see-all-state":Me?"busy":void 0,"aria-busy":Me?!0:void 0,className:Re.seeAll,ref:A=>{A&&(A.disabled=!0,A.offsetHeight,A.disabled=r.isLoading)},children:Y.seeAllResults})}),(0,j.jsx)(ga,{isOptionHighlighted:gt,isInputEmpty:r.isInputEmpty,strings:Y})]}),(0,j.jsx)("button",{ref:$e,type:"button",tabIndex:-1,className:Re.scrollArrow,"data-aia-scroll-arrow":"","aria-label":Y.scrollArrow,"aria-hidden":"true",children:(0,j.jsx)("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,j.jsx)("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}var De=require("@magicx-eng/ai-autocomplete-vanilla");var Da=require("@magicx-eng/ai-autocomplete-vanilla");if(typeof document<"u"&&!document.getElementById("ac-style-5cd72098")){let e=document.createElement("style");e.id="ac-style-5cd72098",e.textContent=`.aia-submitButton-otz7H {
3899
3899
  flex-shrink: 0;
3900
3900
  width: 32px;
3901
3901
  height: 32px;