@magicx-eng/ai-autocomplete-react 0.58.0 → 0.59.1
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/README.md +1 -0
- package/REFERENCE.md +3 -0
- package/dist/index.d.mts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +86 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildSubmitResult as
|
|
1
|
+
import{buildSubmitResult as ps,cellDay as hs,cellIso as us,DATE_RANGE_META_END as ms,DATE_RANGE_META_START as gs,DEFAULT_OPTION_COUNT_UNIT as fs,dateCellMarks as bs,formatDate as ws,formatDateRange as vs,formatOptionCount as xs,formatPlace as ys,formatTime as ks,isoDate as Cs,LOCATION_META_KEY as Ss,monthLabel as Ts,optionCountLabel as Ps,optionHasImage as Is,optionImageSources as Es,optionImageSrc as As,optionLabel as Rs,optionsShowLeadingVisuals as Os,PRODUCT_PATH_PREFIX as Ls,parseDate as zs,parseLooseDate as Ds,parseLooseDateRange as Ms,parseTime as Ns,productFromMatchedItem as Fs,productImageSources as Hs,productsFromCustomFields as Bs,sanitizeOptionIconSvg as Ws,selectedRangeFor as Gs,TIME_META_KEY as Ks,visibleDateRange as qs,WEEKDAY_LABELS as _s,withSkippedParams as Vs}from"@magicx-eng/ai-autocomplete-vanilla";import{forwardRef as jo,useCallback as ka,useEffect as Fa,useImperativeHandle as $o,useLayoutEffect as Zo,useRef as ia}from"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 {
|
|
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
|
|
@@ -406,7 +406,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
406
406
|
transition: none;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
`,document.head.appendChild(e)}var
|
|
409
|
+
`,document.head.appendChild(e)}var Ve={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"};import{attachScrollArrow as oo,attachViewportFit as no,containScroll as ro,dateFloorFor as so,destroyPanelMorph as lo,findMultiSelectDone as co,fitMultiSelectDone as po,hasSkippablePill as ho,isCalendarFormat as uo,labelTraditionalAutocomplete as mo,panelMorphKey as go,queryLive as fo,settlePanelMorph as bo,syncPanelHug as wo,uiStringsFor as vo}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Qe,useLayoutEffect as La,useRef as Je,useState as xo}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
|
|
410
410
|
* Built-in appearance defaults \u2014 zero specificity via :where().
|
|
411
411
|
* Consumer CSS always wins without !important.
|
|
412
412
|
*
|
|
@@ -653,6 +653,11 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
653
653
|
--aia-done-bg: #e4e8f0;
|
|
654
654
|
--aia-done-bg-hover: #d8dde8;
|
|
655
655
|
--aia-done-color: #2a3150;
|
|
656
|
+
/* The opt-in "See all results" button (\`seeAllResults\`): a solid
|
|
657
|
+
near-black button under white text. */
|
|
658
|
+
--aia-see-all-bg: #2b2b2b;
|
|
659
|
+
--aia-see-all-bg-hover: #3d3d3d;
|
|
660
|
+
--aia-see-all-color: #ffffff;
|
|
656
661
|
|
|
657
662
|
--aia-footer-hint-color: var(--aia-primitive-neutral-500);
|
|
658
663
|
--aia-footer-brand-color: var(--aia-primitive-neutral-700);
|
|
@@ -719,6 +724,11 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
719
724
|
--aia-done-bg: var(--aia-confirm-bg);
|
|
720
725
|
--aia-done-bg-hover: var(--aia-confirm-bg-hover);
|
|
721
726
|
--aia-done-color: var(--aia-confirm-color);
|
|
727
|
+
/* A black pill vanishes on the dark surface, so "See all results" takes the
|
|
728
|
+
dark theme's confirm colors too. */
|
|
729
|
+
--aia-see-all-bg: var(--aia-confirm-bg);
|
|
730
|
+
--aia-see-all-bg-hover: var(--aia-confirm-bg-hover);
|
|
731
|
+
--aia-see-all-color: var(--aia-confirm-color);
|
|
722
732
|
|
|
723
733
|
--aia-footer-hint-color: var(--aia-primitive-neutral-700);
|
|
724
734
|
--aia-footer-brand-color: var(--aia-primitive-neutral-500);
|
|
@@ -1572,6 +1582,45 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
1572
1582
|
background: var(--aia-multi-done-bg-hover, var(--aia-done-bg-hover, #d8dde8));
|
|
1573
1583
|
}
|
|
1574
1584
|
|
|
1585
|
+
/* With a "See all results" button in the same panel, that button is the
|
|
1586
|
+
filled one: Done drops its fill so the panel does not end on two solid
|
|
1587
|
+
bars (vanilla's styles.css explains the two tokens). */
|
|
1588
|
+
.aia-dropdown-yz2KC:has([data-aia-see-all]) .aia-multiDone-y12U7:not(:hover) {
|
|
1589
|
+
background: var(--aia-multi-done-bg-beside-see-all, transparent);
|
|
1590
|
+
color: var(--aia-multi-done-color-beside-see-all, var(--aia-option-color-selected, #2a3150));
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/* --- See all results (opt-in: \`seeAllResults\`) ---
|
|
1594
|
+
A button under the products that submits the query: near-black in light
|
|
1595
|
+
mode, the confirm gray in dark (appearance.css sets both). The same box as
|
|
1596
|
+
the multi-select Done above it. Declarations match vanilla's styles.css
|
|
1597
|
+
(seeAllResultsParity.test.ts). */
|
|
1598
|
+
.aia-seeAllRow-icrau {
|
|
1599
|
+
padding: 4px 0 0;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.aia-seeAll-0Zbgc {
|
|
1603
|
+
display: block;
|
|
1604
|
+
width: 100%;
|
|
1605
|
+
min-height: var(--aia-see-all-height, 48px);
|
|
1606
|
+
padding: 0 16px;
|
|
1607
|
+
border: none;
|
|
1608
|
+
border-radius: var(--aia-see-all-radius, 12px);
|
|
1609
|
+
background: var(--aia-see-all-bg, #2b2b2b);
|
|
1610
|
+
color: var(--aia-see-all-color, #ffffff);
|
|
1611
|
+
font-family: inherit;
|
|
1612
|
+
font-size: var(--aia-see-all-font-size, 16px);
|
|
1613
|
+
font-weight: 700;
|
|
1614
|
+
line-height: 20px;
|
|
1615
|
+
text-align: center;
|
|
1616
|
+
cursor: pointer;
|
|
1617
|
+
transition: background-color 150ms ease-out;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
.aia-seeAll-0Zbgc:hover {
|
|
1621
|
+
background: var(--aia-see-all-bg-hover, #3d3d3d);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1575
1624
|
/* The open panel's leaving ghost (panelMorph.ts) is a frozen copy of the
|
|
1576
1625
|
last step: the rows' own entrance must not replay in it while it fades. */
|
|
1577
1626
|
.aia-dropdown-yz2KC .magicx-aia-panel-ghost,
|
|
@@ -1638,7 +1687,29 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
1638
1687
|
animation: aia-multiActionsFadeIn-zbGTG 160ms ease-out;
|
|
1639
1688
|
}
|
|
1640
1689
|
|
|
1690
|
+
/* "See all results" leaves and returns with the options the same way. */
|
|
1691
|
+
.aia-dropdown-yz2KC[data-aia-loading] [data-aia-see-all] {
|
|
1692
|
+
pointer-events: none;
|
|
1693
|
+
animation: aia-seeAllLoadingOut-THnrl 160ms ease-in forwards;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
.aia-dropdown-yz2KC:not([data-aia-loading]) [data-aia-see-all] {
|
|
1697
|
+
animation: aia-seeAllFadeIn-1GWpl 160ms ease-out;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1641
1700
|
/* Ends and starts a hair above zero: iOS cancels a tap on an element at 0. */
|
|
1701
|
+
@keyframes aia-seeAllLoadingOut-THnrl {
|
|
1702
|
+
to {
|
|
1703
|
+
opacity: 0.01;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
@keyframes aia-seeAllFadeIn-1GWpl {
|
|
1708
|
+
from {
|
|
1709
|
+
opacity: 0.01;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1642
1713
|
@keyframes aia-multiActionsLoadingOut-lSdMh {
|
|
1643
1714
|
to {
|
|
1644
1715
|
opacity: 0.01;
|
|
@@ -1653,7 +1724,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
1653
1724
|
opacity: 1;
|
|
1654
1725
|
}
|
|
1655
1726
|
}
|
|
1656
|
-
`,document.head.appendChild(e)}var
|
|
1727
|
+
`,document.head.appendChild(e)}var se={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",multiActionsLoadingOut:"aia-multiActionsLoadingOut-lSdMh",multiActionsFadeIn:"aia-multiActionsFadeIn-zbGTG",seeAllLoadingOut:"aia-seeAllLoadingOut-THnrl",seeAllFadeIn:"aia-seeAllFadeIn-1GWpl"};import{cellDay as Gt,cellIso as da,dateCellMarks as Kt,isDimmedDay as qt,isoDate as _t,monthLabel as Vt,visibleDateRange as Ut,WEEKDAY_LABELS as Qt}from"@magicx-eng/ai-autocomplete-vanilla";import{useState as Yt}from"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) ---
|
|
1657
1728
|
|
|
1658
1729
|
One of three hand-maintained copies (vanilla styles.css, this file, Angular's
|
|
1659
1730
|
date-grid.component.css). Only the class-naming layer differs \u2014 the
|
|
@@ -1850,7 +1921,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
1850
1921
|
opacity: 0.8;
|
|
1851
1922
|
background: rgba(var(--aia-streak-rgb, 255, 255, 255), 0.06);
|
|
1852
1923
|
}
|
|
1853
|
-
`,document.head.appendChild(e)}var
|
|
1924
|
+
`,document.head.appendChild(e)}var K={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"};import{jsx as be,jsxs as Qa}from"react/jsx-runtime";var jt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Ya({options:e,activeIndex:n,listboxId:a,view:t,selection:o,onSelect:s,onHighlight:r,onUnhighlight:l,onPreviousMonth:w,onNextMonth:v}){let y=_t(new Date),f=Ut({pendingStart:o.rangeStart,highlightedIso:da(e[n]),selected:o.selectedRange,floor:o.floor});return Qa("div",{className:K.datepicker,"data-aia-datepicker":"",children:[Qa("div",{className:K.header,children:[be("button",{type:"button",tabIndex:-1,className:K.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:h=>h.preventDefault(),onClick:w,children:"\u2039"}),be("span",{className:K.month,"data-aia-date-month":"","aria-live":"polite",children:Vt(t)}),be("button",{type:"button",tabIndex:-1,className:K.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:h=>h.preventDefault(),onClick:v,children:"\u203A"})]}),be("div",{className:K.weekdays,"aria-hidden":"true",children:Qt.map((h,c)=>be("span",{className:K.weekday,children:h},jt[c]))}),be("div",{className:K.grid,"data-aia-date-grid":"",children:e.map((h,c)=>be($t,{option:h,id:`${a}-option-${c}`,index:c,isHighlighted:c===n&&h.is_tappable,isToday:da(h)===y,isPast:qt(da(h),y,o.floor),marks:Kt(da(h),{selectedIso:o.selectedIso,range:f,references:o.references}),onSelect:s,onHighlight:r,onUnhighlight:l},da(h)??`pad-${c}`))})]})}function $t({option:e,id:n,index:a,isHighlighted:t,isToday:o,isPast:s,marks:r,onSelect:l,onHighlight:w,onUnhighlight:v}){let[y,f]=Yt(!1),h=Gt(e);if(h==null)return be("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${K.cell} ${K.blank}`});let c=()=>{f(!0),l(e),setTimeout(()=>f(!1),170)},x=[K.cell,K.day,s?K.past:"",t?K.highlighted:"",o?K.today:"",r.inRange?K.inRange:"",r.selected?K.selected:"",r.reference?K.reference:"",y?K.pressed:""].filter(Boolean).join(" ");return be("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":t,"aria-label":e.text,tabIndex:0,className:x,onClick:c,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),c())},onMouseEnter:()=>w(a),onMouseLeave:v?()=>v(a):void 0,children:be("span",{className:K.number,children:h})})}import{ATTRIBUTION_URL as Zt,buildAttributionUrl as Xt,getFooterHint as Jt,uiStringsFor as ei}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as ai,useState as ti}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
|
|
1854
1925
|
display: flex;
|
|
1855
1926
|
flex-wrap: wrap;
|
|
1856
1927
|
gap: var(--aia-cluster-gap, 0.5rem);
|
|
@@ -1890,7 +1961,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
1890
1961
|
.aia-cluster[data-justify="around"] {
|
|
1891
1962
|
justify-content: space-around;
|
|
1892
1963
|
}
|
|
1893
|
-
`,document.head.appendChild(e)}import{jsx as
|
|
1964
|
+
`,document.head.appendChild(e)}import{jsx as ja}from"react/jsx-runtime";function ca({gap:e,align:n="center",justify:a="start",noWrap:t=!1,inline:o=!1,className:s,children:r,...l}){let w=e?{"--aia-cluster-gap":e}:void 0,v={className:s?`aia-cluster ${s}`:"aia-cluster","data-align":n,"data-justify":a,"data-nowrap":t||void 0,"data-inline":o||void 0,style:w,...l};return o?ja("span",{...v,children:r}):ja("div",{...v,children:r})}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
|
|
1894
1965
|
dropdown's rounded edges. The top inset (--aia-footer-gap) adds breathing
|
|
1895
1966
|
room above the hint/branding row so the footer doesn't butt against the last
|
|
1896
1967
|
option row \u2014 additive to the dropdown's 8px section gap. */
|
|
@@ -2037,7 +2108,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2037
2108
|
justify-content: flex-end;
|
|
2038
2109
|
}
|
|
2039
2110
|
}
|
|
2040
|
-
`,document.head.appendChild(e)}var
|
|
2111
|
+
`,document.head.appendChild(e)}var Ae={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"};import{jsx as pa,jsxs as Sa}from"react/jsx-runtime";function $a({isOptionHighlighted:e=!1,isInputEmpty:n=!1,strings:a=ei()}){let{key:t,hint:o}=Jt(e,n,a),[s,r]=ti(Zt);return ai(()=>{r(Xt())},[]),pa("footer",{className:Ae.footer,"data-aia-footer":"",children:Sa(ca,{justify:"between",noWrap:!0,className:Ae.row,children:[Sa(ca,{gap:"5px",className:Ae.hintGroup,children:[pa("kbd",{className:Ae.key,children:t}),pa("span",{className:Ae.hint,children:o})]}),Sa("a",{className:Ae.brandLink,href:s,target:"_blank",rel:"noopener noreferrer",children:[pa("span",{className:Ae.brand,children:"AI"}),pa("span",{className:Ae.badge,children:"Autocomplete"})]})]})})}import{useEffect as Za,useLayoutEffect as ii,useRef as le}from"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
|
|
2041
2112
|
Angular copy). The three are kept identical by
|
|
2042
2113
|
packages/vanilla/tests/render/locationFieldParity.test.ts. */
|
|
2043
2114
|
.aia-location-6-fsr {
|
|
@@ -2171,7 +2242,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2171
2242
|
.aia-loadingBar-OLCr4:nth-child(3) {
|
|
2172
2243
|
width: 60%;
|
|
2173
2244
|
}
|
|
2174
|
-
`,document.head.appendChild(e)}var V={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"};import{jsx as ne,jsxs as
|
|
2245
|
+
`,document.head.appendChild(e)}var V={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"};import{jsx as ne,jsxs as Fe}from"react/jsx-runtime";var oi=0;function ha(e){return e.getRootNode().activeElement??null}function et(e){return e.getRootNode().getSelection?.()??document.getSelection()}function Xa(e){if(!e.isContentEditable)return null;let n=et(e);if(!n||n.rangeCount===0)return null;let a=n.getRangeAt(0);return e.contains(a.startContainer)?a.cloneRange():null}function Ja(e,n){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let a=et(e);if(!a)return;let t=n;(!t||!t.startContainer.isConnected||!e.contains(t.startContainer))&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1)),a.removeAllRanges(),a.addRange(t)}var ni=Fe("svg",{className:V.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[ne("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),ne("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),ri=Fe("svg",{className:V.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[ne("circle",{cx:"11",cy:"11",r:"7"}),ne("path",{d:"m20 20-3.5-3.5"})]});function at({view:e,searchLabel:n,noResultsLabel:a,useTypedLabel:t,widgetFocused:o,reediting:s=!1,visible:r=!0,interactive:l=!0,onQuery:w,onMove:v,onCommit:y,onFocusChange:f}){let h=le(null),c=le(null),x=le(null),I=le(null),q=le(null),D=le(!1),O=le(!1),te=le(!1),T=le(!1),z=le(o);z.current=o;let _=le(f);_.current=f;let F=d=>{T.current=d,f(d)},Q=()=>{let d=h.current;return d!=null&&ha(d)===d},E=()=>{let d=c.current;if(!d)return;let S=ha(d);S instanceof HTMLElement&&S!==h.current&&S!==document.body&&!d.contains(S)&&(I.current=S,q.current=Xa(S))},J=d=>{let S=c.current;!S||!(d instanceof HTMLElement)||d===I.current||d===document.body||S.contains(d)||(I.current=d,q.current=Xa(d))},W=le(null);W.current===null&&(W.current=`aia-location-${++oi}`);let H=`${W.current}-row-`;Za(()=>{let d=h.current;d&&d.value!==e.query&&ha(d)!==d&&(d.value=e.query)},[e.query]),Za(()=>{o&&(s&&!te.current&&(O.current=!1),te.current=s);let d=h.current;if(d){if(!r&&Q()){O.current=!0,Y();return}if(!o){setTimeout(()=>{if(z.current)return;let S=I.current;S&&ha(S)===S||(O.current=!1)},0);return}if(!(!s||O.current||!l||Q())){if(E(),F(!0),d.focus({preventScroll:!0}),!Q()){O.current=!0,F(!1);return}d.value&&d.select()}}}),ii(()=>()=>{if(!T.current)return;let d=h.current,S=I.current;S?.isConnected&&d&&ha(d)===d&&(D.current=!0,Ja(S,q.current),D.current=!1),T.current=!1,_.current(!1)},[]);let Y=(d=!1)=>{d&&(O.current=!0);let S=I.current;S?.isConnected&&Q()&&(D.current=!0,Ja(S,q.current),D.current=!1),F(!1)},re=e.query.trim(),C=e.highlighted>=0&&e.highlighted<e.places.length?`${H}${e.highlighted}`:void 0,B=null;return e.places.length>0?B=e.places.map((d,S)=>Fe("div",{id:`${H}${S}`,role:"option","aria-selected":S===e.highlighted,className:S===e.highlighted?`${V.row} ${V.highlighted}`:V.row,"data-aia-location-row":"","data-aia-index":S,onClick:()=>{l&&(Y(!0),y(S))},children:[ne("span",{className:V.pin,children:ni}),Fe("span",{className:V.text,children:[ne("span",{className:V.name,children:d.name}),d.secondary&&ne("span",{className:V.secondary,children:d.secondary})]})]},d.id)):e.status==="loading"?B=Fe("div",{className:V.loading,"data-aia-location-loading":"",children:[ne("span",{className:V.loadingBar}),ne("span",{className:V.loadingBar}),ne("span",{className:V.loadingBar})]}):re&&(B=Fe("div",{className:V.note,"data-aia-location-note":"",children:[e.status==="done"&&ne("span",{className:V.empty,children:a}),ne("span",{children:t})]})),Fe("div",{ref:c,className:V.location,"data-aia-location":"",onMouseDown:d=>{!(d.target instanceof Node)||!x.current?.contains(d.target)||(d.stopPropagation(),E(),F(!0))},children:[Fe("label",{ref:x,className:V.field,children:[ri,ne("input",{ref:h,type:"text",className:V.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:n,"aria-label":n,"aria-activedescendant":C,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:r?0:-1,onChange:d=>w(d.target.value),onFocus:d=>{J(d.relatedTarget),F(!0)},onBlur:()=>{D.current||(O.current=!0,F(!1))},onKeyDown:d=>{if(!d.nativeEvent.isComposing)switch(d.key){case"ArrowDown":case"ArrowUp":d.preventDefault(),v(d.key==="ArrowDown"?1:-1);return;case"Enter":if(d.preventDefault(),!l)return;Y(!0),y();return;case"Escape":d.preventDefault(),d.stopPropagation(),O.current=!0,Y();return;case"Backspace":if(d.currentTarget.value!=="")return;d.preventDefault(),O.current=!0,Y();return}}})]}),ne("div",{className:V.results,"data-aia-location-results":"","aria-live":"polite",children:B})]})}import{isSmartSuggestion as ci,isTraditionalAutocompleteSuggestion as pi}from"@magicx-eng/ai-autocomplete-vanilla";import{SMART_SUGGESTION_SPARKLE_SVG as si}from"@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,
|
|
2175
2246
|
no outline. ~28px via 6px padding + 14px text + the 1px border (border-box).
|
|
2176
2247
|
The border is kept as a 1px transparent line so the box stays the same size
|
|
2177
2248
|
as it was when the outline was dashed. */
|
|
@@ -2329,7 +2400,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2329
2400
|
opacity: 0;
|
|
2330
2401
|
}
|
|
2331
2402
|
}
|
|
2332
|
-
`,document.head.appendChild(e)}var
|
|
2403
|
+
`,document.head.appendChild(e)}var we={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"};import{Fragment as li,jsx as Ta,jsxs as di}from"react/jsx-runtime";var Pa={selected:1,first:.7,next:.4,last:.2};function tt({label:e,state:n,active:a,rounded:t,loading:o,smartSuggestion:s,completionHeader:r,onClick:l}){let w=[we.pill,t?we.rounded:"",o?we.skeleton:""].filter(Boolean).join(" ");return Ta("button",{type:"button","data-aia-pill":"","data-aia-pill-active":a?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":s?r?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:w,style:{"--aia-pill-opacity":Pa[n]},onMouseDown:v=>v.preventDefault(),onClick:o?void 0:l,disabled:o,children:s?di(li,{children:[Ta("span",{className:`${we.smartText} magicx-aia-smart-suggestion-text`,children:e}),Ta("span",{className:`${we.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:si}})]}):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 {
|
|
2333
2404
|
position: relative;
|
|
2334
2405
|
z-index: 1;
|
|
2335
2406
|
pointer-events: auto;
|
|
@@ -2339,7 +2410,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2339
2410
|
align-items: center;
|
|
2340
2411
|
vertical-align: middle;
|
|
2341
2412
|
}
|
|
2342
|
-
`,document.head.appendChild(e)}var
|
|
2413
|
+
`,document.head.appendChild(e)}var Ia={list:"aia-list-qvLqO"};import{jsx as fa}from"react/jsx-runtime";var hi=[125,69];function it(e){return e===0?"first":e===1?"next":"last"}function ba({pills:e,activePillIndex:n,onSelectPill:a,activeSelected:t,rounded:o,loading:s}){return s&&e.length===0?fa("span",{className:Ia.list,"data-aia-pill-list-loading":"",children:hi.map((r,l)=>fa("span",{"data-aia-pill-skeleton":"",className:`${we.pill} ${o?we.rounded:""} ${we.skeleton}`,style:{width:r,"--aia-pill-opacity":Pa[it(l)]}},`skel-${r}`))}):fa("span",{className:Ia.list,"data-aia-pill-list-loading":s?"":void 0,children:e.map((r,l)=>{let w=!!t&&l===n;return fa(tt,{label:r.text,state:w?"selected":it(l),selected:w,active:l===n,rounded:o,loading:s,smartSuggestion:ci(r),completionHeader:pi(r),onClick:()=>a(l)},`${r.parameter}-${r.text}`)})})}import{attachProductRowWheel as ui,productImageSources as mi,productImageSrc as gi,productInitial as fi,productPhotoFill as bi,uiStringsFor as wi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Ea,useRef as wa,useState as va}from"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
|
|
2343
2414
|
(packages/vanilla/src/styles.css). Same tokens, same defaults, so a consumer
|
|
2344
2415
|
theming one package sees the same result in the other.
|
|
2345
2416
|
|
|
@@ -2932,7 +3003,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2932
3003
|
opacity: 0.01;
|
|
2933
3004
|
}
|
|
2934
3005
|
}
|
|
2935
|
-
`,document.head.appendChild(e)}var U={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"};import{jsx as
|
|
3006
|
+
`,document.head.appendChild(e)}var U={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"};import{jsx as ee,jsxs as Xe}from"react/jsx-runtime";function ot({products:e,listboxId:n,onSelect:a,onAddToCart:t,onFocusChange:o,focusable:s=!0,loading:r=!1,layout:l="row",imageFallback:w="image",strings:v=wi()}){let y=e.length>0,f=wa(null);if(Ea(()=>{let c=f.current;if(!(!y||!c))return ui(c)},[y]),!y)return null;let h=`${n}-products-label`;return Xe("section",{className:U.section,"data-aia-products":"","data-aia-loading":r?"":void 0,"data-aia-products-layout":l,role:"group","aria-labelledby":h,children:[ee("div",{className:U.label,id:h,"data-aia-products-label":"",children:v.products}),ee("div",{ref:f,className:U.row,"data-aia-products-row":"",children:e.map((c,x)=>ee(vi,{product:c,id:`${n}-product-${x}`,onSelect:a,onAddToCart:t,onFocusChange:o,focusable:s,imageFallback:w,soldOut:v.soldOut,addToCart:v.addToCart},c.id))})]})}function vi({product:e,id:n,onSelect:a,onAddToCart:t,onFocusChange:o,focusable:s,imageFallback:r,soldOut:l,addToCart:w}){let v=!!t&&e.available!==!1,[y,f]=va(null),h=x=>{x.relatedTarget?.closest("[data-aia-dropdown]")||o?.(!1)},c=x=>{x.metaKey||x.ctrlKey||x.shiftKey||x.altKey||x.button!==0||(x.preventDefault(),a(e))};return Xe("a",{id:n,className:U.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":v?"":void 0,role:"option","aria-selected":!1,style:y?{"--aia-product-photo-fill-x":String(y.x),"--aia-product-photo-fill-y":String(y.y)}:void 0,href:e.url,tabIndex:s?0:-1,onClick:c,onKeyDown:x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),a(e))},onFocus:()=>o?.(!0),onBlur:h,children:[ee(ki,{sources:mi(e.imageUrl),title:e.title,fallback:r,onPhotoFill:f},gi(e.imageUrl)??""),Xe("span",{className:U.body,children:[e.vendor?ee("span",{className:U.vendor,children:e.vendor}):null,ee("span",{className:U.title,children:e.title}),e.price?Xe("span",{className:U.price,children:[e.price,e.compareAtPrice?ee("s",{className:U.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?ee("span",{className:U.badge,children:l}):null]}),v&&t?ee(yi,{product:e,label:`${w}: ${e.title}`,focusable:s,onAddToCart:t,onFocus:()=>o?.(!0),onBlur:h},xi(e)):null]})}function xi(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(n=>n??"").join("\0")}function yi({product:e,label:n,focusable:a,onAddToCart:t,onFocus:o,onBlur:s}){let[r,l]=va(null),w=wa(null),v=wa(e);v.current=e;let y=wa(!0);Ea(()=>(y.current=!0,()=>{y.current=!1}),[]);let f=c=>{w.current=c,y.current&&l(c)},h=c=>{if(c.preventDefault(),c.stopPropagation(),w.current==="adding")return;f("adding");let x;try{x=Promise.resolve(t(v.current))}catch(I){x=Promise.reject(I)}x.then(()=>f("added"),()=>f(null))};return ee("span",{className:U.cart,"data-aia-product-cart":"","data-aia-cart-state":r??void 0,"aria-busy":r==="adding"?!0:void 0,role:"button","aria-label":n,tabIndex:a?0:-1,onClick:h,onKeyDown:c=>{c.key!=="Enter"&&c.key!==" "||h(c)},onFocus:c=>{c.stopPropagation(),o()},onBlur:c=>{c.stopPropagation(),s(c)},children:Xe("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[ee("path",{className:U.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"}),ee("path",{className:U.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),ee("path",{className:U.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),ee("path",{className:U.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),ee("circle",{className:U.cartGlyph,cx:"9",cy:"20",r:"1.3"}),ee("circle",{className:U.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function ki({sources:e,title:n,fallback:a,onPhotoFill:t}){let[o,s]=va(0),r=e[o],l=!!r,[w,v]=va(null),y=!l&&a==="initial";return Ea(()=>()=>t(null),[t]),Xe("span",{className:U.media,"aria-hidden":"true","data-aia-product-placeholder":!l&&!y?"":void 0,"data-aia-product-initial":y?"":void 0,"data-aia-image-loaded":l&&w===r?"":void 0,children:[l?ee("img",{className:U.image,src:r,alt:"",loading:"lazy",decoding:"async",onLoad:f=>{v(r),t(bi(f.currentTarget.naturalWidth,f.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&t(null),s(f=>f+1)}}):null,y?fi(n):null]})}import{isOptionsGridMobileViewport as Ni,measureOptionsGrid as Fi,needsOptionsGridMeasurement as Hi,OPTIONS_GRID_MOBILE_QUERY as Bi,optionEnterDelayMs as Wi,optionsShowLeadingVisuals as Gi,planOptionsGrid as dt,releasePanelHug as Ki,sameOptionRows as qi,syncPanelHug as _i}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Vi,useLayoutEffect as ct,useRef as pt,useState as ut}from"react";import{optionsGridTemplateColumns as Ci}from"@magicx-eng/ai-autocomplete-vanilla";import{useLayoutEffect as Si,useRef as Ti}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
|
|
2936
3007
|
display: grid;
|
|
2937
3008
|
grid-template-columns: repeat(
|
|
2938
3009
|
auto-fit,
|
|
@@ -2976,7 +3047,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
2976
3047
|
:where([data-aia-options-style="classic"]) .aia-grid[data-scroll] {
|
|
2977
3048
|
max-height: var(--aia-grid-max-height, 120px);
|
|
2978
3049
|
}
|
|
2979
|
-
`,document.head.appendChild(e)}import{jsx as
|
|
3050
|
+
`,document.head.appendChild(e)}import{jsx as Pi}from"react/jsx-runtime";function nt({min:e="16rem",max:n,gap:a,scroll:t=!1,maxHeight:o,scrollResetKey:s,cols:r,template:l,innerRef:w,className:v,children:y,...f}){let h=Ti(null);Si(()=>{if(s===void 0)return;let x=h.current;x&&(x.scrollTop=0)},[s]);let c={"--aia-grid-min":e};return n&&(c["--aia-grid-max"]=n),a&&(c["--aia-grid-gap"]=a),o&&(c["--aia-grid-max-height"]=o),r&&(c.gridTemplateColumns=Ci(r)),l&&(c.gridTemplateColumns=l),Pi("div",{ref:x=>{h.current=x,w?.(x)},className:v?`aia-grid ${v}`:"aia-grid","data-scroll":t||void 0,style:c,...f,children:y})}import{formatOptionCount as Ii,highlightParts as Ei,isMultiSelectToggleTap as Ai,OPTION_ENTER_DELAY_VAR as Ri,optionImageSources as rt,optionLabel as st,sanitizeOptionIconSvg as Oi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Li,useMemo as zi,useRef as Di,useState as ua}from"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 {
|
|
2980
3051
|
position: relative;
|
|
2981
3052
|
/* Clip, not visible: the entrance rise below runs on the inner content,
|
|
2982
3053
|
and a transformed box extends its scroll container's scrollable area.
|
|
@@ -3496,7 +3567,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
3496
3567
|
border-radius: 6px;
|
|
3497
3568
|
font-size: 11px;
|
|
3498
3569
|
}
|
|
3499
|
-
`,document.head.appendChild(e)}var
|
|
3570
|
+
`,document.head.appendChild(e)}var Z={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",pressCompress:"aia-pressCompress-ICV3q",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"};import{Fragment as Mi,jsx as ce,jsxs as Aa}from"react/jsx-runtime";function lt({option:e,isHighlighted:n,checked:a,onSelect:t,onHighlight:o,onUnhighlight:s,id:r,loading:l,showIcon:w=!0,showImage:v=!0,showCount:y=!0,scrollHint:f,enterDelayMs:h=0}){let[c]=ua(h),[x,I]=ua(!1),q=v?rt(e.image_url):[],D=q[0]??null,[O,te]=ua([]),T=q.find(C=>!O.includes(C))??null,z=v?(e.imageCollage??[]).map(C=>rt(C)[0]).filter(C=>C!==void 0):[],[_,F]=ua(!1),[Q,E]=ua(null),J=zi(()=>!D&&w&&e.icon_svg?Oi(e.icon_svg):null,[D,w,e.icon_svg]),W=y?Ii(e.item_count):null,H=Di(void 0);Li(()=>()=>clearTimeout(H.current),[]);let Y=C=>{if(l||!e.is_tappable||x&&a===void 0)return;I(!0);let B=C?.currentTarget;a!==void 0&&B!==void 0&&C!==void 0&&!Ai(B,B.querySelector("[data-aia-checkbox]"),C)?t(e,{commit:!0}):t(e),clearTimeout(H.current),H.current=setTimeout(()=>I(!1),170)},re=[Z.item,n&&!l?Z.highlighted:"",e.liveMatch&&!l?Z.liveMatch:"",e.is_tappable?Z.tappable:Z.nonTappable,x?Z.pressed:"",f?Z.scrollHint:""].filter(Boolean).join(" ");return ce("div",{id:r,role:"option","data-aia-option":"","data-aia-loading":l?"":void 0,"data-aia-icon":J&&e.icon?e.icon:void 0,"data-aia-image":D?"":void 0,"data-aia-item-count":W!==null?e.item_count:void 0,"aria-selected":a??n,className:re,style:{[Ri]:`${c}ms`},tabIndex:l||!e.is_tappable?-1:0,onClick:Y,onKeyDown:C=>{!l&&e.is_tappable&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),Y())},onMouseEnter:!l&&e.is_tappable?o:void 0,onMouseLeave:s,children:Aa("span",{className:Z.content,children:[a!==void 0&&e.is_tappable&&ce("span",{className:Z.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":a,children:a?"\u2713":""}),D&&z.length>1&&ce("span",{className:`${Z.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-collage":z.length,"data-aia-image-loaded":_?"":void 0,children:z.map(C=>ce("img",{src:C,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,onLoad:()=>F(!0),onError:B=>{B.currentTarget.hidden=!0}},C))}),D&&z.length<=1&&ce("span",{className:`${Z.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":T!==null&&Q===T?"":void 0,children:ce("img",{src:T??D,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:T===null,onLoad:()=>E(T),onError:()=>{T!==null&&te(C=>[...C,T])}})}),J&&ce("span",{className:`${Z.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:J}}),Aa("span",{className:Z.text,children:[e.matchedText?Ei(st(e),e.matchedText).map((C,B)=>C.bold?ce("strong",{className:`${Z.match} magicx-aia-option-match`,children:C.text},B):C.text):st(e),e.parameterLabel&&Aa(Mi,{children:[" ",ce("span",{className:`${Z.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&ce("span",{className:Z.tag,children:e.tag}),W!==null&&ce("span",{className:`${Z.count} magicx-aia-option-count`,children:W})]})})}import{jsx as ht}from"react/jsx-runtime";function Ui(){let[e,n]=ut(Ni);return Vi(()=>{if(typeof window>"u"||!window.matchMedia)return;let a=window.matchMedia(Bi),t=()=>n(a.matches);return t(),a.addEventListener("change",t),()=>a.removeEventListener("change",t)},[]),e}function mt({options:e,activeIndex:n,picked:a,onSelect:t,onHighlight:o,onUnhighlight:s,listboxId:r,loading:l,groupKey:w="",optionsPosition:v="below",showIcons:y=!0,showImages:f=!0,showCounts:h=!0}){let c=Ui(),x=pt(null),[I,q]=ut(null),D=pt(null);ct(()=>{if(l&&qi(D.current,e))return;D.current=l?null:e;let T=x.current,z=T&&!l&&Hi(e.length,c),_=T?.closest("[data-aia-dropdown]");z&&_&&Ki(_);let F=z?Fi(T):null;q(F?dt(e.length,c,F.rowWidths,F.gridWidth):null)},[e,c,l]);let O=I??dt(e.length,c,null,null);ct(()=>{let T=x.current?.closest("[data-aia-dropdown]");T&&_i(T)},[O.template,c]);let te=Gi(e,y,f);return ht(nt,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:w,template:O.template,maxHeight:O.maxHeight,innerRef:T=>{x.current=T},"data-aia-group":w,children:e.map((T,z)=>ht(lt,{option:T,isHighlighted:z===n,checked:a?a.includes(T.text):void 0,onSelect:t,onHighlight:()=>o(z),onUnhighlight:s?()=>s(z):void 0,id:`${r}-option-${z}`,loading:l,showIcon:y&&te,showImage:f&&te,showCount:h,scrollHint:!l&&O.scrollHintIndices.includes(z),enterDelayMs:l?0:Wi(z,O.cols,e.length,v)},`${w}\0${T.parameter??""}\0${T.text}`))})}import{formatTime as Qi,TIME_WHEEL_COLUMNS as Yi,TIME_WHEEL_ROW_HEIGHT as ji,timeWheelIndex as gt,timeWheelIndexFromScroll as $i,timeWheelRows as Zi,withTimeWheelIndex as ft}from"@magicx-eng/ai-autocomplete-vanilla";import{Fragment as Xi,useEffect as Ji,useLayoutEffect as eo,useRef as xa}from"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) ---
|
|
3500
3571
|
|
|
3501
3572
|
One of three hand-maintained copies (vanilla styles.css, this file, Angular's
|
|
3502
3573
|
time-wheel.component.css). Only the class-naming layer differs \u2014 the
|
|
@@ -3618,7 +3689,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
3618
3689
|
.aia-done-llNY5:hover {
|
|
3619
3690
|
background: var(--aia-time-done-bg-hover, var(--aia-done-bg-hover, #d8dde8));
|
|
3620
3691
|
}
|
|
3621
|
-
`,document.head.appendChild(e)}var
|
|
3692
|
+
`,document.head.appendChild(e)}var pe={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"};import{jsx as Ue,jsxs as Ra}from"react/jsx-runtime";var ao=120;function bt({view:e,label:n,doneLabel:a,interactive:t=!0,onTimeChange:o,onTimeCommit:s}){return Ra("div",{className:pe.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":n,onMouseDown:r=>r.preventDefault(),children:[Ue("span",{className:pe.value,"data-aia-time-value":"","aria-live":"polite",children:Qi(e.minutes)}),Ra("div",{className:pe.columns,"aria-hidden":"true",children:[Ue("div",{className:pe.band}),Yi.map(r=>Ra(Xi,{children:[r==="minute"&&Ue("span",{className:pe.separator,children:":"}),Ue(to,{column:r,minutes:e.minutes,interactive:t,onTimeChange:o})]},r))]}),Ue("button",{type:"button",tabIndex:-1,className:pe.done,"data-aia-time-done":"",onClick:()=>{t&&s()},children:a})]})}function to({column:e,minutes:n,interactive:a,onTimeChange:t}){let o=xa(null),s=xa(null),r=xa(null),l=xa({minutes:n,interactive:a,onTimeChange:t});l.current={minutes:n,interactive:a,onTimeChange:t};let w=gt(e,n);eo(()=>{let f=o.current;if(!f||r.current)return;let h=w*ji;Math.abs(f.scrollTop-h)<1||(s.current=h,f.scrollTop=h)},[w]),Ji(()=>()=>{r.current&&clearTimeout(r.current)},[]);let v=()=>{r.current=null;let f=o.current,h=l.current;if(!f||!h.interactive)return;let c=$i(e,f.scrollTop);c!==gt(e,h.minutes)&&h.onTimeChange(ft(e,h.minutes,c))},y=()=>{let f=o.current;if(f){if(s.current!=null&&Math.abs(f.scrollTop-s.current)<1){s.current=null;return}s.current=null,r.current&&clearTimeout(r.current),r.current=setTimeout(v,ao)}};return Ue("div",{ref:o,className:pe.column,"data-aia-time-column":e,onScroll:y,children:Zi(e).map((f,h)=>Ue("div",{className:h===w?`${pe.row} ${pe.selected}`:pe.row,"data-aia-time-row":"","data-aia-index":h,onClick:()=>{l.current.interactive&&t(ft(e,l.current.minutes,h))},children:f.label},f.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
|
|
3622
3693
|
display: flex;
|
|
3623
3694
|
flex-direction: column;
|
|
3624
3695
|
gap: var(--aia-stack-space, 0.5rem);
|
|
@@ -3633,7 +3704,7 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
3633
3704
|
align-items: end;
|
|
3634
3705
|
}
|
|
3635
3706
|
/* data-align="stretch" is the flex default \u2014 no rule needed. */
|
|
3636
|
-
`,document.head.appendChild(e)}import{jsx as
|
|
3707
|
+
`,document.head.appendChild(e)}import{jsx as io}from"react/jsx-runtime";function wt({space:e,align:n="stretch",className:a,children:t,...o}){let s=e?{"--aia-stack-space":e}:void 0;return io("div",{className:a?`aia-stack ${a}`:"aia-stack","data-align":n,style:s,...o,children:t})}import{jsx as X,jsxs as Oa}from"react/jsx-runtime";var yo=typeof window>"u"?Qe:La,ko=[159,119,164],Co=()=>{},vt=()=>{},So=e=>{},To=()=>{},Po=e=>{},Io=e=>{},Eo=e=>{},Ao=e=>{};function Ro(e){let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[a,t]=xo(n);if(Qe(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>t(o.matches);return o.addEventListener("change",s),()=>o.removeEventListener("change",s)},[e]),e!==void 0)return e==="auto"?a?"dark":"light":e}function Oo(e,n){let a=Je(null);Qe(()=>{let t=e.current,o=n.current;if(!t||!o)return;let s=fo(t,".aia-grid[data-scroll]");if(a.current&&a.current.grid!==s&&(a.current.controller.destroy(),a.current=null),s&&!a.current){a.current={grid:s,controller:oo({dropdown:t,grid:s,button:o})};return}a.current?.controller.update()}),Qe(()=>()=>{a.current?.controller.destroy(),a.current=null},[])}function Lo(e,n){let a=Je(n);a.current=n;let t=Je(null);La(()=>{let o=e.current;if(o){if(!t.current){t.current=no({dropdown:o,isOpen:()=>a.current});return}t.current.update()}}),Qe(()=>()=>{t.current?.destroy(),t.current=null},[])}function za({suggestions:e,activeIndex:n,onSelect:a,onHighlight:t,onUnhighlight:o,isOpen:s,id:r,className:l,pills:w,onPillClick:v,showPills:y=!0,onSkip:f,showSkipButton:h=!0,showOptionIcons:c=!0,showOptionImages:x=!0,showOptionCounts:I=!0,skipDisabled:q=!1,activeSelected:D=!1,isLoading:O=!1,skeletonExiting:te=!1,isInputEmpty:T=!1,language:z,products:_,onProductSelect:F,onProductAddToCart:Q,onProductFocusChange:E,productsLayout:J="row",productImageFallback:W="image",formatType:H="options",dateView:Y=null,selectedDateIso:re=null,selectedDateRange:C=null,dateRangeStart:B=null,dateReferences:d,onPreviousMonth:S,onNextMonth:He,timeView:ve=null,multiSelectView:b=null,onMultiSelectCommit:Be,onSeeAllResults:xe,fullWidth:Re=!1,onTimeChange:Oe,onTimeCommit:Le,locationView:m=null,isReediting:k=!1,onLocationQuery:P,onLocationMove:A,onLocationCommit:L,onLocationFocusChange:j,isFocused:de=!1,optionsPosition:ie="below",mode:ze}){let ye=Ro(ze),We=ye!==void 0,$=Je(null),ke=Je(null);Oo($,ke),Qe(()=>{if($.current)return ro($.current)},[]);let Ge=e[0]?.options??[],na=!!(w&&w.length>0&&v),ue=!!(_&&_.length>0),Ye=H==="time"&&ve!=null,De=H==="location"&&m!=null,g=s&&(Ge.length>0||y&&na||O||ue||Ye||De);Lo($,g),yo(()=>{let R=$.current;R&&(po(R,co(R)),wo(R))});let Ce={suggestions:e,activeIndex:n,pills:w,showPills:y,showSkipButton:h,showOptionIcons:c,showOptionImages:x,showOptionCounts:I,skipDisabled:q,activeSelected:D,isLoading:O,skeletonExiting:te,isInputEmpty:T,products:_,formatType:H,dateView:Y,selectedDateIso:re,selectedDateRange:C,dateRangeStart:B,dateReferences:d,timeView:ve,multiSelectView:b,locationView:m,isReediting:k,showsSeeAll:!!xe},Ke=Je(Ce);g&&(Ke.current=Ce);let i=g?Ce:Ke.current,u=vo(z),Se=i.suggestions[0],Te=Se?.options??[],me=i.activeIndex>=0&&!!Te[i.activeIndex]?.is_tappable,Pe=mo(i.pills??[],u.keepTyping),Me=!!(Pe.length>0&&v),ge=i.showPills&&Me,ra=i.showPills&&!Me&&i.isLoading,Ie=ge||ra,fe=Me&&ho(Pe)&&i.showSkipButton&&!i.isInputEmpty&&!!f,Ne=Pe[0]?.text,qe=uo(i.formatType)&&i.dateView!=null,je=Te.length>0&&!qe,Ee=Te.length>0&&qe&&!i.isLoading,_e=i.formatType==="time"&&i.timeView!=null&&!i.isLoading,p=i.formatType==="location"&&i.locationView!=null&&!i.isLoading,G=i.isLoading&&!je&&!Ee&&!_e&&!p,M=i.products??[],$e=go(ge?Pe:[]);return La(()=>{$.current&&bo($.current,$e,{visible:g,anchorBottom:ie==="above"})},[$e,g,ie,i.suggestions,i.pills,i.isLoading,i.skeletonExiting,i.isInputEmpty,i.products,i.formatType,i.dateView,i.selectedDateIso,i.selectedDateRange,i.dateRangeStart,i.dateReferences,i.timeView,i.multiSelectView,i.locationView,i.showPills,i.showSkipButton,i.showOptionIcons,i.showOptionImages,i.showOptionCounts,i.showsSeeAll,J,z]),Qe(()=>{let R=$.current;return()=>{R&&lo(R)}},[]),Oa("div",{ref:$,id:r,role:"listbox","aria-multiselectable":!!i.multiSelectView,"data-aia-dropdown":"","data-options-position":ie,"data-mode":ye,"data-aia-loading":i.isLoading?"":void 0,"data-aia-skeleton-exiting":i.skeletonExiting?"":void 0,"data-aia-has-products":M.length>0?"":void 0,"data-aia-full-width":Re?"":void 0,className:`${We?"magicx-aia ":""}${se.dropdown} ${g?se.visible:""} ${l??""}`,onMouseDown:R=>R.preventDefault(),children:[Oa(wt,{space:"8px",children:[(Ie||fe)&&Oa(ca,{noWrap:!0,className:se.pillBar,"data-aia-pillbar":"",children:[Ie&&X("span",{className:se.pillScroll,"data-aia-pill-scroll":"",children:X(ba,{pills:Pe,activePillIndex:0,activeSelected:i.activeSelected,onSelectPill:v??(()=>{}),rounded:!0,loading:i.isLoading})}),fe&&X("button",{type:"button",tabIndex:-1,className:se.skip,"data-aia-skip":"",disabled:i.isLoading||i.skipDisabled,"aria-label":Ne?`${u.skipLabel} ${Ne}`:u.skipLabel,onClick:f,children:u.skip})]}),je&&X(mt,{options:Te,activeIndex:i.activeIndex,onSelect:a,onHighlight:t,onUnhighlight:o,listboxId:r,loading:i.isLoading,groupKey:Se?`${Se.parameter} ${Se.text}`:"",optionsPosition:ie,showIcons:i.showOptionIcons,showImages:i.showOptionImages,showCounts:i.showOptionCounts,picked:i.multiSelectView?.picked}),i.multiSelectView&&X("div",{"data-aia-multi-actions":"",onClick:R=>{R.target.closest("[data-aia-multi-done]")&&!i.skipDisabled&&!i.isLoading&&Be?.()},children:X("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:se.multiDone,ref:R=>{R&&(R.disabled=!0,R.offsetHeight,R.disabled=i.skipDisabled||i.isLoading)},children:u.done})}),Ee&&i.dateView&&X(Ya,{options:Te,activeIndex:i.activeIndex,listboxId:r,view:i.dateView,selection:{selectedIso:i.selectedDateIso??null,selectedRange:i.selectedDateRange??null,rangeStart:i.dateRangeStart??null,floor:so(i.formatType,i.dateRangeStart),references:i.dateReferences??[]},onSelect:a,onHighlight:t,onUnhighlight:o,onPreviousMonth:S??vt,onNextMonth:He??vt}),_e&&i.timeView&&X(bt,{view:i.timeView,label:u.timeLabel,doneLabel:u.done,interactive:!i.skipDisabled,onTimeChange:Oe??So,onTimeCommit:Le??To}),p&&i.locationView&&X(at,{view:i.locationView,searchLabel:u.locationSearch,noResultsLabel:u.locationNoResults,useTypedLabel:u.locationUseTyped,widgetFocused:de&&g,reediting:i.isReediting,visible:g,interactive:!i.skipDisabled,onQuery:P??Po,onMove:A??Io,onCommit:L??Eo,onFocusChange:j??Ao}),G&&X("div",{className:se.skeletonBars,"data-aia-skeleton-bars":"",children:ko.map(R=>X("span",{className:se.skeletonBar,style:{width:R}},`bar-${R}`))}),X(ot,{products:M,listboxId:r,onSelect:F??Co,onAddToCart:Q,onFocusChange:E,focusable:g&&!i.isLoading,loading:i.isLoading,layout:J,imageFallback:W,strings:u}),i.showsSeeAll&&X("div",{className:se.seeAllRow,"data-aia-see-all":"",onClick:R=>{R.target.closest("[data-aia-see-all-button]")&&(R.stopPropagation(),!i.isLoading&&xe?.())},children:X("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-see-all-button":"",className:se.seeAll,ref:R=>{R&&(R.disabled=!0,R.offsetHeight,R.disabled=i.isLoading)},children:u.seeAllResults})}),X($a,{isOptionHighlighted:me,isInputEmpty:i.isInputEmpty,strings:u})]}),X("button",{ref:ke,type:"button",tabIndex:-1,className:se.scrollArrow,"data-aia-scroll-arrow":"","aria-label":u.scrollArrow,"aria-hidden":"true",children:X("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:X("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}import{buildSubmitResult as Xo,ModeController as Jo,setCursorOffset as en,uiStringsFor as an,watchEditorHeight as tn}from"@magicx-eng/ai-autocomplete-vanilla";import{uiStringsFor as zo}from"@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 {
|
|
3637
3708
|
flex-shrink: 0;
|
|
3638
3709
|
width: 32px;
|
|
3639
3710
|
height: 32px;
|
|
@@ -3704,5 +3775,5 @@ import{buildSubmitResult as ls,cellDay as ds,cellIso as cs,DATE_RANGE_META_END a
|
|
|
3704
3775
|
transition: none;
|
|
3705
3776
|
}
|
|
3706
3777
|
}
|
|
3707
|
-
`,document.head.appendChild(e)}var va={submitButton:"aia-submitButton-otz7H"};import{jsx as Lt}from"react/jsx-runtime";function xa({disabled:e,ready:o,onClick:t,label:a=Oo().submit}){return Lt("button",{type:"button","data-aia-submit":"",className:va.submitButton,disabled:e,"data-aia-ready":o?"":void 0,onClick:i=>{i.stopPropagation(),t()},"aria-label":a,children:Lt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":a,children:Lt("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Ro,dateSelectionFor as Lo,editingSuggestion as zo,identifiedParamLabel as Do,withoutTraditionalAutocomplete as Mo}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as Ta,useEffect as Je,useMemo as No,useRef as J,useState as Fo}from"react";import{useRef as ya}from"react";function ka(e){let o=ya(e);o.current=e;let t=Object.keys(e??{}).sort().join("\0"),a=ya({key:"",overrides:void 0});if(a.current.key!==t){let i={};for(let s of Object.keys(e??{})){let r=(l,b,w)=>{let y=o.current?.[s];return y?y(l,b,w):[]};i[s]=r}a.current={key:t,overrides:e?i:void 0}}return{overrides:a.current.overrides,key:t}}import{useRef as Ca}from"react";function Sa(e){let o=Ca(e);o.current=e;let t=Ca(null);t.current===null&&(t.current={fetch:(i,s)=>{let r=o.current;return r?r.fetch(i,s):Promise.reject(new Error("products config removed"))},transform:i=>o.current?.transform(i)??[],get limit(){return o.current?.limit}});let a=e!==void 0;return{config:a?t.current:void 0,enabled:a}}var Pa={text:"",completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,skeletonPicked:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,dateReferences:[],dateFloor:null,timeView:null,multiSelectView:null,dropdownMultiSelect:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,placeholderText:"",leadInText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null,timeDraft:null};function zt({onSubmit:e,onResult:o,onError:t,optionOverrides:a,maskCompletedText:i,apiConfig:s,additionalContext:r,language:l,currency:b,productId:w,visitorId:y,columns:m=2,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:v,prependPlaceholder:E,allOption:K,showNonTappableOptions:D,locationSearch:R,showOptionIcons:ee,showOptionImages:P,showOptionCounts:z,showSkipButton:q,showProducts:N,productImageFallback:Q="image",onFocus:A,onBlur:$,value:W,completedParams:F,onChange:Y,onParamsChange:re,products:S,mapProducts:H,onProductSelect:d,onProductAddToCart:T,source:Me,setCursor:ke}){let g=J(null),[Ne,Ee]=Fo(null),Ae=J(e);Ae.current=e;let Ce=J(o);Ce.current=o;let Oe=J(t);Oe.current=t;let u=J(Y);u.current=Y;let C=J(re);C.current=re;let I=J(A);I.current=A;let O=J($);O.current=$;let L=J(ke);L.current=ke;let _=J(d);_.current=d;let se=J(T);se.current=T;let le=J(y);le.current=y;let Re=J(()=>{let p=le.current;return typeof p=="function"?p():p}).current,te=Sa(S),de=J(H);de.current=H;let Ve=J((p,B)=>{let k=de.current;return k?k(p,B):p}).current,Fe=H?Ve:void 0,He=ka(a);Je(()=>{if(typeof document>"u")return;let p=new Ro(document.createElement("div"),{renderMode:"headless",apiConfig:s,additionalContext:r,language:l,currency:b,productId:w,visitorId:Re,optionOverrides:He.overrides,maskCompletedText:i,columns:m,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:v,prependPlaceholder:E,allOption:K,showNonTappableOptions:D,locationSearch:R,showProducts:N,source:Me,value:W,completedParams:F,onSubmit:(...k)=>Ae.current?.(...k),onResult:(...k)=>Ce.current?.(...k),onError:(...k)=>Oe.current?.(...k),onChange:(...k)=>u.current?.(...k),onParamsChange:(...k)=>C.current?.(...k),onFocus:()=>I.current?.(),onBlur:()=>O.current?.(),onProductSelect:k=>_.current?.(k),onProductAddToCart:k=>se.current?.(k),setCursor:k=>L.current?.(k),products:te.config,mapProducts:Fe});g.current=p,Ee(p.getState());let B=p.subscribe(k=>Ee(k));return()=>{B(),p.destroy(),g.current===p&&(g.current=null)}},[]),Je(()=>{W!==void 0&&g.current?.setValue(W)},[W]),Je(()=>{F!==void 0&&g.current?.setCompletedParams(F)},[F]);let Le=JSON.stringify(s??null),Be;try{Be=JSON.stringify(r??null)}catch{Be="[unstringifiable]"}Je(()=>{g.current?.update({apiConfig:s,additionalContext:r,language:l,currency:b,productId:w,optionOverrides:He.overrides,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:v,prependPlaceholder:E,allOption:K,showNonTappableOptions:D,locationSearch:R,showProducts:N})},[Le,Be,l,b?.code,b?.rate,b?.country,w,He.key,h,c,v,E,K,D,R,N]);let ie=J(!1);Je(()=>{if(!ie.current){ie.current=!0;return}g.current?.update({products:te.config})},[te.enabled]),Je(()=>{g.current?.update({mapProducts:Fe})},[Fe]);let pe=J(null);pe.current===null&&(pe.current={handleTextChange:p=>g.current?.handleTextChange(p),handleKeyDown:p=>{let B="nativeEvent"in p?p.nativeEvent:p;g.current?.handleKeyDown(B)},setFocused:p=>g.current?.setFocused(p),startEditingParam:p=>g.current?.startEditingParam(p),removeParam:p=>g.current?.removeParam(p)??!1,exitEditMode:()=>g.current?.exitEditMode(),handleCaretAfterInput:p=>g.current?.handleCaretAfterInput(p),handleCaretMove:p=>g.current?.handleCaretMove(p),replaceEditingRange:p=>g.current?.replaceEditingRange(p)??!1,setActivePill:p=>g.current?.setActivePill(p),skipActivePill:()=>g.current?.skipActivePill(),removeLastParam:()=>g.current?.removeLastParam(),clearNewParamId:()=>g.current?.clearNewParamId(),reset:()=>g.current?.reset(),refreshProducts:()=>g.current?.refreshProducts(),prepareSubmit:()=>g.current?.prepareSubmit(),getState:()=>g.current?.getState()??Pa,recordSubmit:p=>g.current?.recordSubmit(p),selectOption:(p,B)=>g.current?.selectOption(p,B),selectProduct:p=>g.current?.selectProduct(p),addProductToCart:p=>{let B=g.current;return!B||!se.current?Promise.resolve():B.addProductToCart(p)},setActiveDropdownIndex:p=>g.current?.setActiveDropdownIndex(p),clearHighlight:p=>g.current?.clearHighlight(p),showPreviousMonth:()=>g.current?.showPreviousMonth(),showNextMonth:()=>g.current?.showNextMonth(),setTime:p=>g.current?.setTime(p),commitTime:()=>g.current?.commitTime(),toggleMultiSelectOption:p=>g.current?.toggleMultiSelectOption(p),commitMultiSelect:()=>g.current?.commitMultiSelect(),setLocationQuery:p=>g.current?.setLocationQuery(p),moveLocationHighlight:p=>g.current?.moveLocationHighlight(p),commitLocation:p=>g.current?.commitLocation(p),setLocationFieldFocused:p=>g.current?.setLocationFieldFocused(p),handleFocus:()=>g.current?.setFocused(!0),handleBlur:()=>g.current?.setFocused(!1)});let x=pe.current,n=Ta(p=>{let B=p.target.value,vt=B.length>0&&!p.nativeEvent?.isComposing&&B[0]!==B[0].toUpperCase()?B[0].toUpperCase()+B.slice(1):B;g.current?.handleTextChange(vt)},[]),Z=Ta(p=>{g.current?.handleKeyDown(p.nativeEvent)},[]),fe=g.current,f=Ne??Pa,Ue=W!==void 0?W:f.text,he=F!==void 0?F:f.completedParams,be=f.actionableSuggestions,We=be[0],Qe=No(()=>Mo(be),[be]),Se=fe?.listboxId??"",Ye=f.activeDropdownIndex>=0&&fe?`${Se}-option-${f.activeDropdownIndex}`:void 0,Te=f.editingParam,we=f.editingIdentified,ze=Te?zo(Te):we?{parameter:we.parameter,text:Do(we.parameter),required:!0,options:[]}:null,Ge=f.dropdownSuggestion??ze??We,je=ze?[ze]:be,Pe=Lo(f),$e=!fe||f.dropdownLoading;return{completedParams:he,multiSelectView:f.multiSelectView,toggleMultiSelectOption:x.toggleMultiSelectOption,commitMultiSelect:x.commitMultiSelect,skippedParams:f.skippedParams,identifiedParams:f.identifiedParams,suggestionPills:Qe,setActivePill:x.setActivePill,skipActivePill:x.skipActivePill,removeLastParam:x.removeLastParam,segments:f.segments,newParamId:f.newParamId,clearNewParamId:x.clearNewParamId,suggestions:f.suggestions,activeIndex:f.activeDropdownIndex,isReady:f.isReady,isLoading:$e,isFocused:f.isFocused,isDropdownOpen:f.isDropdownOpen,isActivePillSelected:f.isActivePillSelected,placeholderText:f.placeholderText,listboxId:Se,error:f.error,products:f.products,customFields:f.customFields,selectProduct:x.selectProduct,addProductToCart:x.addProductToCart,handleTextChange:x.handleTextChange,handleKeyDown:x.handleKeyDown,setFocused:x.setFocused,editingParam:Te,editingIdentified:we,editingAnchor:f.editingAnchor,caretOffset:f.caretOffset,startEditingParam:x.startEditingParam,removeParam:x.removeParam,exitEditMode:x.exitEditMode,handleCaretAfterInput:x.handleCaretAfterInput,handleCaretMove:x.handleCaretMove,replaceEditingRange:x.replaceEditingRange,inputProps:{value:Ue,placeholder:f.placeholderText||void 0,onChange:n,onKeyDown:Z,onFocus:x.handleFocus,onBlur:x.handleBlur,role:"combobox","aria-expanded":f.isDropdownOpen,"aria-activedescendant":Ye,"aria-autocomplete":"list","aria-controls":Se},reset:x.reset,refreshProducts:x.refreshProducts,prepareSubmit:x.prepareSubmit,getState:x.getState,recordSubmit:x.recordSubmit,dropdownProps:{suggestions:Ge?[{...Ge,options:f.dropdownOptions}]:[],activeIndex:f.activeDropdownIndex,onSelect:x.selectOption,onHighlight:x.setActiveDropdownIndex,onUnhighlight:x.clearHighlight,isOpen:f.isDropdownOpen,id:Se,pills:je,activeSelected:f.isActivePillSelected,onPillClick:x.setActivePill,onSkip:x.skipActivePill,showSkipButton:(q??!0)&&!Te&&!we,showOptionIcons:ee??!0,showOptionImages:P??!0,showOptionCounts:z??!0,skipDisabled:f.inSelectionAnimation,isLoading:$e,skeletonExiting:f.skeletonExiting,isInputEmpty:Ue.trim().length===0,language:l,products:f.products,productImageFallback:Q,onProductSelect:x.selectProduct,onProductAddToCart:T?x.addProductToCart:void 0,onProductFocusChange:x.setFocused,formatType:f.activeFormatType,dateView:f.dateView,selectedDateIso:Pe.selectedIso,selectedDateRange:Pe.selectedRange,dateRangeStart:Pe.rangeStart,dateReferences:Pe.references,onPreviousMonth:x.showPreviousMonth,onNextMonth:x.showNextMonth,timeView:f.timeView,multiSelectView:f.dropdownMultiSelect,onMultiSelectCommit:x.commitMultiSelect,onTimeChange:x.setTime,onTimeCommit:x.commitTime,locationView:f.locationView,isReediting:f.editingParam!=null,onLocationQuery:x.setLocationQuery,onLocationMove:x.moveLocationHighlight,onLocationCommit:x.commitLocation,onLocationFocusChange:x.setLocationFieldFocused,isFocused:f.isFocused||f.locationFieldFocused,optionsPosition:c??"below"}}}import{attachChipRemove as Ho,cancelStartingHint as Bo,chipIdFromTap as Wo,extractPlainText as Ia,getCursorOffset as Ea,keepCaretOnChip as Go,plainTextLength as Ko,renderEditableContent as qo,setCursorOffset as Aa,startingHintOptions as _o}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as ge,useEffect as et,useLayoutEffect as Dt,useRef as tt}from"react";var wt;function Vo(){if(wt!==void 0)return wt;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),wt=e.contentEditable==="plaintext-only",wt}function Oa(e){let{segments:o,showChipIcons:t=!0,showChipImages:a=!0,showChipRemove:i=!1,removeParam:s,newParamId:r,editingParam:l,editingIdentified:b,editingAnchor:w,caretOffset:y,placeholderText:m,hintSuggestions:h,isFocused:c,isDropdownOpen:v,listboxId:E,activeDescendantId:K,autoFocus:D,handleTextChange:R,handleKeyDown:ee,handleCaretAfterInput:P,handleCaretMove:z,startEditingParam:q,replaceEditingRange:N,setFocused:Q}=e,A=tt(null),$=tt(!1),W=tt(""),F=tt(""),Y=tt(null),re=tt(0);Y.current=y,et(()=>{if(!D)return;let u=A.current;if(!u)return;document.activeElement===u?Q(!0):u.focus();let C=u.ownerDocument??document,I=C.getSelection(),O=I&&I.rangeCount>0&&u.contains(I.anchorNode);if(I&&!O){let L=C.createRange();L.selectNodeContents(u),L.collapse(!0),I.removeAllRanges(),I.addRange(L)}},[D,Q]),et(()=>{let u=A.current;if(!u)return;let C=u.ownerDocument??document,I=()=>{let O=C.getSelection();if(!O||O.rangeCount===0||!O.anchorNode||!u.contains(O.anchorNode))return;let L=O.anchorNode,_=L.nodeType===Node.ELEMENT_NODE?L:L.parentElement,le=(O.isCollapsed?_?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,Re=l?.id??b?.id??null;if(le&&le!==Re){q(le);return}performance.now()-re.current<50||z(Ea(u))};return C.addEventListener("selectionchange",I),()=>C.removeEventListener("selectionchange",I)},[l,b,q,z]),et(()=>{let u=A.current;if(!u)return;let C=I=>{let O=Wo(u,I.target);O&&(q(O),Go(u,O))};return u.addEventListener("click",C),()=>u.removeEventListener("click",C)},[q]),et(()=>{let u=A.current;if(!(!u||!s||!i))return Ho(u,s)},[s,i]),Dt(()=>{let u=A.current;u&&qo({input:u,segments:o,newParamId:r,editingParamId:l?.id??null,placeholderText:m??"",isFocused:c,showChipIcons:t,showChipImages:a,showChipRemove:i,hintOptions:_o(h??[])})},[o,r,l,m,h,c,t,a,i]),et(()=>{let u=A.current;return()=>{u&&Bo(u)}},[]),Dt(()=>{let u=W.current,C=r??"";if(W.current=C,!C||C===u)return;let I=A.current;if(!I)return;I.focus();let O=Y.current??Ko(I);Aa(I,O)},[r]),Dt(()=>{let u=F.current,C=l?.id??"";if(F.current=C,!C||C===u||w==null)return;let I=A.current;I&&Aa(I,w)},[l,w]);let S=ge(()=>{if($.current)return;let u=A.current;if(!u)return;let C=Ia(u),O=C.length>0&&C[0]!==C[0].toUpperCase()?C[0].toUpperCase()+C.slice(1):C;R(O)},[R]),H=ge(()=>{re.current=performance.now(),S();let u=A.current;u&&P(Ea(u))},[S,P]);et(()=>{let u=A.current;if(!u)return;let C=I=>{let O=I,L=O.inputType;if(L==="insertParagraph"||L==="insertLineBreak"||L==="insertFromDrop"){I.preventDefault();return}if(L.startsWith("insert")||L.startsWith("delete")){let _=L.startsWith("delete")?"":O.data??"";N(_)&&I.preventDefault()}};return u.addEventListener("beforeinput",C),()=>u.removeEventListener("beforeinput",C)},[N]);let d=ge(()=>{$.current=!0,A.current?.setAttribute("data-aia-composing","true")},[]),T=ge(()=>{$.current=!1,A.current?.removeAttribute("data-aia-composing"),S()},[S]),Me=ge(u=>{u.preventDefault();let C=A.current;if(!C)return;let I=(u.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!I)return;let O=C.ownerDocument??document,L=O.getSelection();if(!L||L.rangeCount===0)return;let _=L.getRangeAt(0);if(!C.contains(_.startContainer))return;_.deleteContents();let se=O.createTextNode(I);_.insertNode(se),_.setStartAfter(se),_.collapse(!0),L.removeAllRanges(),L.addRange(_),S()},[S]),ke=ge(u=>ee(u),[ee]),g=ge(()=>Q(!0),[Q]),Ne=ge(()=>Q(!1),[Q]),Ee=ge(()=>A.current?.focus(),[]),Ae=ge(()=>A.current?.blur(),[]),Ce=ge(()=>{let u=A.current;return u?Ia(u):""},[]),Oe=Vo()?"plaintext-only":"true";return{inputRef:A,editorProps:{ref:A,contentEditable:Oe,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":E,"aria-expanded":v,"aria-activedescendant":K,spellCheck:!0,enterKeyHint:"send",onInput:H,onKeyDown:ke,onCompositionStart:d,onCompositionEnd:T,onPaste:Me,onFocus:g,onBlur:Ne},getPlainText:Ce,focus:Ee,blur:Ae}}import{jsx as it,jsxs as Ft}from"react/jsx-runtime";function en(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var tn=Uo(function({onSubmit:o,onResult:t,onError:a,optionOverrides:i,maskCompletedText:s,className:r,apiConfig:l,additionalContext:b,language:w,currency:y,productId:m,visitorId:h,columns:c,pillPlacement:v="dropdown",mode:E="auto",optionsPosition:K="below",animations:D=!0,optionsStyle:R="floating",dropdownTrigger:ee,closeDropdownOnBlur:P,prependPlaceholder:z,allOption:q,showNonTappableOptions:N,locationSearch:Q,showOptionIcons:A=!0,showChipIcons:$=!0,showChipImages:W=!0,showChipRemove:F=!1,showOptionImages:Y=!0,showOptionCounts:re=!0,showSkipButton:S,showProducts:H,productsLayout:d,productImageFallback:T,autoFocus:Me=!0,onFocus:ke,onBlur:g,value:Ne,completedParams:Ee,onChange:Ae,onParamsChange:Ce,products:Oe,mapProducts:u,onProductSelect:C,onProductAddToCart:I,submitButton:O,resetOnSubmit:L=!0},_){let se=at(null),le=at(null),Re=at(null),te=at(()=>{}),de=at(null),Ve=at(null);Nt(()=>{let M=se.current;if(M)return de.current?de.current.setMode(E):de.current=new $o(M,E),()=>{de.current?.destroy(),de.current=null}},[E]);let Fe=Mt(M=>{let oe=Ve.current?.current;oe&&(oe.focus(),Zo(oe,M))},[]),{completedParams:He,suggestionPills:Le,setActivePill:Be,skipActivePill:ie,segments:pe,newParamId:x,clearNewParamId:n,placeholderText:Z,isFocused:fe,isDropdownOpen:f,isActivePillSelected:Ue,isLoading:he,isReady:be,activeIndex:We,listboxId:Qe,handleTextChange:Se,handleKeyDown:Ye,setFocused:Te,editingParam:we,editingIdentified:ze,editingAnchor:Ge,caretOffset:je,startEditingParam:Pe,removeParam:$e,handleCaretAfterInput:p,handleCaretMove:B,replaceEditingRange:k,dropdownProps:vt,reset:pt,refreshProducts:Ht,prepareSubmit:Bt,getState:Wt,recordSubmit:Gt}=zt({onSubmit:M=>te.current(M),onResult:t,onError:a,optionOverrides:i,maskCompletedText:s,apiConfig:l,additionalContext:b,language:w,currency:y,productId:m,visitorId:h,columns:c,dropdownTrigger:ee,optionsPosition:K,closeDropdownOnBlur:P,prependPlaceholder:z,allOption:q,showNonTappableOptions:N,locationSearch:Q,showOptionIcons:A,showOptionImages:Y,showOptionCounts:re,showSkipButton:S,showProducts:H,onFocus:ke,onBlur:g,value:Ne,completedParams:Ee,onChange:Ae,onParamsChange:Ce,products:Oe,mapProducts:u,onProductSelect:C,onProductAddToCart:I,source:"full-sdk",setCursor:Fe});Nt(()=>{if(!x)return;let M=window.setTimeout(()=>n(),650);return()=>window.clearTimeout(M)},[x,n]);let Ra=We>=0?`${Qe}-option-${We}`:void 0,{inputRef:xt,editorProps:La,focus:ht,blur:Kt,getPlainText:qt}=Oa({segments:pe,newParamId:x,editingParam:we,editingIdentified:ze,editingAnchor:Ge,caretOffset:je,placeholderText:Z,hintSuggestions:v==="inline"?[]:Le,isFocused:fe,showChipIcons:$,showChipImages:W,showChipRemove:F,removeParam:$e,isDropdownOpen:f,listboxId:Qe,activeDescendantId:Ra,autoFocus:Me,handleTextChange:Se,handleKeyDown:Ye,handleCaretAfterInput:p,handleCaretMove:B,startEditingParam:Pe,replaceEditingRange:k,setFocused:Te});Ve.current=xt,Yo(()=>{let M=le.current,oe=xt.current;if(!M||!oe)return;let nt=()=>{let Vt=M.firstElementChild;if(!Vt)return;let Na=Vt.getBoundingClientRect(),Fa=oe.getBoundingClientRect();Na.top>=Fa.bottom-2?M.setAttribute("data-aia-pill-wrapped",""):M.removeAttribute("data-aia-pill-wrapped")};nt();let _t=new ResizeObserver(nt);return _t.observe(oe),()=>_t.disconnect()},[pe,Le.length,he,xt]),Nt(()=>{let M=Re.current;if(M)return Jo(M)},[]),Qo(_,()=>({focus:ht,blur:Kt,reset:pt,refreshProducts:Ht,setMode:M=>de.current?.setMode(M),skipActivePill:ie}),[ht,Kt,pt,Ht,ie]);let ot=!!pe.length||He.length>0,yt=Mt(M=>{if(!ot)return;M&&Bt();let oe=Wt(),nt=jo(qt(),oe.completedParams,oe.skippedParams,{identifiedParams:oe.identifiedParams,isReady:oe.isReady,customFields:oe.customFields});M&&Gt(nt),o(nt),L&&pt()},[Gt,L,ot,Bt,Wt,o,pt,qt]);te.current=()=>yt(!1);let za=Mt(M=>{M.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||ht()},[ht]),Da=v==="inline",Ma=v==="dropdown";return Ft("div",{ref:se,className:`magicx-aia ${Ke.container} ${r??""}`,"data-pill-placement":v,"data-options-position":K,"data-animations":D?"on":"off","data-aia-options-style":R,"data-mode":en(E),children:[it(Rt,{...vt,showPills:Ma,productsLayout:d,productImageFallback:T}),Ft("div",{className:Ke.inputWrapper,"data-aia-input-wrapper":"",onClick:za,children:[Ft("div",{ref:Re,className:Ke.editorArea,"data-aia-editor":"",children:[it("div",{...La,className:Ke.input,"data-aia-input":""}),Da&&(he||Le.length>0)&&it("span",{ref:le,className:Ke.pillListContainer,"data-aia-pill-list-container":"",children:it(mt,{pills:Le,activePillIndex:0,activeSelected:Ue,onSelectPill:Be,loading:he})})]}),O===null?null:O===void 0?it(xa,{disabled:!ot,ready:ot&&be,onClick:()=>yt(!0),label:Xo(w).submit}):it("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:Ke.submitSlot,onClick:M=>{ot&&(M.stopPropagation(),yt(!0))},children:O})]})]})});export{tn as AIAutocomplete,Rt as AIAutocompleteDropdown,ps as DATE_RANGE_META_END,hs as DATE_RANGE_META_START,us as DEFAULT_OPTION_COUNT_UNIT,ys as LOCATION_META_KEY,As as PRODUCT_PATH_PREFIX,Bs as TIME_META_KEY,Gs as WEEKDAY_LABELS,ls as buildSubmitResult,ds as cellDay,cs as cellIso,ms as dateCellMarks,gs as formatDate,fs as formatDateRange,bs as formatOptionCount,ws as formatPlace,vs as formatTime,xs as isoDate,ks as monthLabel,Cs as optionCountLabel,Ss as optionHasImage,Ts as optionImageSources,Ps as optionImageSrc,Is as optionLabel,Es as optionsShowLeadingVisuals,Os as parseDate,Rs as parseLooseDate,Ls as parseLooseDateRange,zs as parseTime,Ds as productFromMatchedItem,Ms as productImageSources,Ns as productsFromCustomFields,Fs as sanitizeOptionIconSvg,Hs as selectedRangeFor,zt as useAIAutocomplete,Ws as visibleDateRange,Ks as withSkippedParams};
|
|
3778
|
+
`,document.head.appendChild(e)}var xt={submitButton:"aia-submitButton-otz7H"};import{jsx as Da}from"react/jsx-runtime";function yt({disabled:e,ready:n,onClick:a,label:t=zo().submit}){return Da("button",{type:"button","data-aia-submit":"",className:xt.submitButton,disabled:e,"data-aia-ready":n?"":void 0,onClick:o=>{o.stopPropagation(),a()},"aria-label":t,children:Da("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":t,children:Da("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Do,dateSelectionFor as Mo,editingSuggestion as No,identifiedParamLabel as Fo,withoutTraditionalAutocomplete as Ho}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as Pt,useEffect as ea,useMemo as Bo,useRef as ae,useState as Wo}from"react";import{useRef as kt}from"react";function Ct(e){let n=kt(e);n.current=e;let a=Object.keys(e??{}).sort().join("\0"),t=kt({key:"",overrides:void 0});if(t.current.key!==a){let o={};for(let s of Object.keys(e??{})){let r=(l,w,v)=>{let y=n.current?.[s];return y?y(l,w,v):[]};o[s]=r}t.current={key:a,overrides:e?o:void 0}}return{overrides:t.current.overrides,key:a}}import{useRef as St}from"react";function Tt(e){let n=St(e);n.current=e;let a=St(null);a.current===null&&(a.current={fetch:(o,s)=>{let r=n.current;return r?r.fetch(o,s):Promise.reject(new Error("products config removed"))},transform:o=>n.current?.transform(o)??[],get limit(){return n.current?.limit}});let t=e!==void 0;return{config:t?a.current:void 0,enabled:t}}var It={text:"",completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,skeletonPicked:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,dateReferences:[],dateFloor:null,timeView:null,multiSelectView:null,dropdownMultiSelect:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,placeholderText:"",leadInText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null,timeDraft:null};function Ma({onSubmit:e,onResult:n,onError:a,optionOverrides:t,maskCompletedText:o,apiConfig:s,additionalContext:r,language:l,currency:w,productId:v,visitorId:y,columns:f=2,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:x,prependPlaceholder:I,allOption:q,showNonTappableOptions:D,locationSearch:O,showOptionIcons:te,showOptionImages:T,showOptionCounts:z,showSkipButton:_,showProducts:F,productImageFallback:Q="image",onFocus:E,onBlur:J,value:W,completedParams:H,onChange:Y,onParamsChange:re,products:C,mapProducts:B,onProductSelect:d,onProductAddToCart:S,source:He,setCursor:ve}){let b=ae(null),[Be,xe]=Wo(null),Re=ae(e);Re.current=e;let Oe=ae(n);Oe.current=n;let Le=ae(a);Le.current=a;let m=ae(Y);m.current=Y;let k=ae(re);k.current=re;let P=ae(E);P.current=E;let A=ae(J);A.current=J;let L=ae(ve);L.current=ve;let j=ae(d);j.current=d;let de=ae(S);de.current=S;let ie=ae(y);ie.current=y;let ze=ae(()=>{let p=ie.current;return typeof p=="function"?p():p}).current,ye=Tt(C),We=ae(B);We.current=B;let $=ae((p,G)=>{let M=We.current;return M?M(p,G):p}).current,ke=B?$:void 0,Ge=Ct(t);ea(()=>{if(typeof document>"u")return;let p=new Do(document.createElement("div"),{renderMode:"headless",apiConfig:s,additionalContext:r,language:l,currency:w,productId:v,visitorId:ze,optionOverrides:Ge.overrides,maskCompletedText:o,columns:f,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:x,prependPlaceholder:I,allOption:q,showNonTappableOptions:D,locationSearch:O,showProducts:F,source:He,value:W,completedParams:H,onSubmit:(...M)=>Re.current?.(...M),onResult:(...M)=>Oe.current?.(...M),onError:(...M)=>Le.current?.(...M),onChange:(...M)=>m.current?.(...M),onParamsChange:(...M)=>k.current?.(...M),onFocus:()=>P.current?.(),onBlur:()=>A.current?.(),onProductSelect:M=>j.current?.(M),onProductAddToCart:M=>de.current?.(M),setCursor:M=>L.current?.(M),products:ye.config,mapProducts:ke});b.current=p,xe(p.getState());let G=p.subscribe(M=>xe(M));return()=>{G(),p.destroy(),b.current===p&&(b.current=null)}},[]),ea(()=>{W!==void 0&&b.current?.setValue(W)},[W]),ea(()=>{H!==void 0&&b.current?.setCompletedParams(H)},[H]);let na=JSON.stringify(s??null),ue;try{ue=JSON.stringify(r??null)}catch{ue="[unstringifiable]"}ea(()=>{b.current?.update({apiConfig:s,additionalContext:r,language:l,currency:w,productId:v,optionOverrides:Ge.overrides,dropdownTrigger:h,optionsPosition:c,closeDropdownOnBlur:x,prependPlaceholder:I,allOption:q,showNonTappableOptions:D,locationSearch:O,showProducts:F})},[na,ue,l,w?.code,w?.rate,w?.country,v,Ge.key,h,c,x,I,q,D,O,F]);let Ye=ae(!1);ea(()=>{if(!Ye.current){Ye.current=!0;return}b.current?.update({products:ye.config})},[ye.enabled]),ea(()=>{b.current?.update({mapProducts:ke})},[ke]);let De=ae(null);De.current===null&&(De.current={handleTextChange:p=>b.current?.handleTextChange(p),handleKeyDown:p=>{let G="nativeEvent"in p?p.nativeEvent:p;b.current?.handleKeyDown(G)},setFocused:p=>b.current?.setFocused(p),startEditingParam:p=>b.current?.startEditingParam(p),removeParam:p=>b.current?.removeParam(p)??!1,exitEditMode:()=>b.current?.exitEditMode(),handleCaretAfterInput:p=>b.current?.handleCaretAfterInput(p),handleCaretMove:p=>b.current?.handleCaretMove(p),replaceEditingRange:p=>b.current?.replaceEditingRange(p)??!1,setActivePill:p=>b.current?.setActivePill(p),skipActivePill:()=>b.current?.skipActivePill(),removeLastParam:()=>b.current?.removeLastParam(),clearNewParamId:()=>b.current?.clearNewParamId(),reset:()=>b.current?.reset(),refreshProducts:()=>b.current?.refreshProducts(),prepareSubmit:()=>b.current?.prepareSubmit(),getState:()=>b.current?.getState()??It,recordSubmit:p=>b.current?.recordSubmit(p),selectOption:(p,G)=>b.current?.selectOption(p,G),selectProduct:p=>b.current?.selectProduct(p),addProductToCart:p=>{let G=b.current;return!G||!de.current?Promise.resolve():G.addProductToCart(p)},setActiveDropdownIndex:p=>b.current?.setActiveDropdownIndex(p),clearHighlight:p=>b.current?.clearHighlight(p),showPreviousMonth:()=>b.current?.showPreviousMonth(),showNextMonth:()=>b.current?.showNextMonth(),setTime:p=>b.current?.setTime(p),commitTime:()=>b.current?.commitTime(),toggleMultiSelectOption:p=>b.current?.toggleMultiSelectOption(p),commitMultiSelect:()=>b.current?.commitMultiSelect(),setLocationQuery:p=>b.current?.setLocationQuery(p),moveLocationHighlight:p=>b.current?.moveLocationHighlight(p),commitLocation:p=>b.current?.commitLocation(p),setLocationFieldFocused:p=>b.current?.setLocationFieldFocused(p),handleFocus:()=>b.current?.setFocused(!0),handleBlur:()=>b.current?.setFocused(!1)});let g=De.current,Ce=Pt(p=>{let G=p.target.value,$e=G.length>0&&!p.nativeEvent?.isComposing&&G[0]!==G[0].toUpperCase()?G[0].toUpperCase()+G.slice(1):G;b.current?.handleTextChange($e)},[]),Ke=Pt(p=>{b.current?.handleKeyDown(p.nativeEvent)},[]),i=b.current,u=Be??It,Se=W!==void 0?W:u.text,Te=H!==void 0?H:u.completedParams,me=u.actionableSuggestions,Pe=me[0],Me=Bo(()=>Ho(me),[me]),ge=i?.listboxId??"",ra=u.activeDropdownIndex>=0&&i?`${ge}-option-${u.activeDropdownIndex}`:void 0,Ie=u.editingParam,fe=u.editingIdentified,Ne=Ie?No(Ie):fe?{parameter:fe.parameter,text:Fo(fe.parameter),required:!0,options:[]}:null,qe=u.dropdownSuggestion??Ne??Pe,je=Ne?[Ne]:me,Ee=Mo(u),_e=!i||u.dropdownLoading;return{completedParams:Te,multiSelectView:u.multiSelectView,toggleMultiSelectOption:g.toggleMultiSelectOption,commitMultiSelect:g.commitMultiSelect,skippedParams:u.skippedParams,identifiedParams:u.identifiedParams,suggestionPills:Me,setActivePill:g.setActivePill,skipActivePill:g.skipActivePill,removeLastParam:g.removeLastParam,segments:u.segments,newParamId:u.newParamId,clearNewParamId:g.clearNewParamId,suggestions:u.suggestions,activeIndex:u.activeDropdownIndex,isReady:u.isReady,isLoading:_e,isFocused:u.isFocused,isDropdownOpen:u.isDropdownOpen,isActivePillSelected:u.isActivePillSelected,placeholderText:u.placeholderText,listboxId:ge,error:u.error,products:u.products,customFields:u.customFields,selectProduct:g.selectProduct,addProductToCart:g.addProductToCart,handleTextChange:g.handleTextChange,handleKeyDown:g.handleKeyDown,setFocused:g.setFocused,editingParam:Ie,editingIdentified:fe,editingAnchor:u.editingAnchor,caretOffset:u.caretOffset,startEditingParam:g.startEditingParam,removeParam:g.removeParam,exitEditMode:g.exitEditMode,handleCaretAfterInput:g.handleCaretAfterInput,handleCaretMove:g.handleCaretMove,replaceEditingRange:g.replaceEditingRange,inputProps:{value:Se,placeholder:u.placeholderText||void 0,onChange:Ce,onKeyDown:Ke,onFocus:g.handleFocus,onBlur:g.handleBlur,role:"combobox","aria-expanded":u.isDropdownOpen,"aria-activedescendant":ra,"aria-autocomplete":"list","aria-controls":ge},reset:g.reset,refreshProducts:g.refreshProducts,prepareSubmit:g.prepareSubmit,getState:g.getState,recordSubmit:g.recordSubmit,dropdownProps:{suggestions:qe?[{...qe,options:u.dropdownOptions}]:[],activeIndex:u.activeDropdownIndex,onSelect:g.selectOption,onHighlight:g.setActiveDropdownIndex,onUnhighlight:g.clearHighlight,isOpen:u.isDropdownOpen,id:ge,pills:je,activeSelected:u.isActivePillSelected,onPillClick:g.setActivePill,onSkip:g.skipActivePill,showSkipButton:(_??!0)&&!Ie&&!fe,showOptionIcons:te??!0,showOptionImages:T??!0,showOptionCounts:z??!0,skipDisabled:u.inSelectionAnimation,isLoading:_e,skeletonExiting:u.skeletonExiting,isInputEmpty:Se.trim().length===0,language:l,products:u.products,productImageFallback:Q,onProductSelect:g.selectProduct,onProductAddToCart:S?g.addProductToCart:void 0,onProductFocusChange:g.setFocused,formatType:u.activeFormatType,dateView:u.dateView,selectedDateIso:Ee.selectedIso,selectedDateRange:Ee.selectedRange,dateRangeStart:Ee.rangeStart,dateReferences:Ee.references,onPreviousMonth:g.showPreviousMonth,onNextMonth:g.showNextMonth,timeView:u.timeView,multiSelectView:u.dropdownMultiSelect,onMultiSelectCommit:g.commitMultiSelect,onTimeChange:g.setTime,onTimeCommit:g.commitTime,locationView:u.locationView,isReediting:u.editingParam!=null,onLocationQuery:g.setLocationQuery,onLocationMove:g.moveLocationHighlight,onLocationCommit:g.commitLocation,onLocationFocusChange:g.setLocationFieldFocused,isFocused:u.isFocused||u.locationFieldFocused,optionsPosition:c??"below"}}}import{attachChipRemove as Go,cancelStartingHint as Ko,chipIdFromTap as qo,extractPlainText as Et,getCursorOffset as At,keepCaretOnChip as _o,plainTextLength as Vo,renderEditableContent as Uo,setCursorOffset as Rt,startingHintOptions as Qo}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as he,useEffect as aa,useLayoutEffect as Na,useRef as ta}from"react";var ya;function Yo(){if(ya!==void 0)return ya;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),ya=e.contentEditable==="plaintext-only",ya}function Ot(e){let{segments:n,showChipIcons:a=!0,showChipImages:t=!0,showChipRemove:o=!1,removeParam:s,newParamId:r,editingParam:l,editingIdentified:w,editingAnchor:v,caretOffset:y,placeholderText:f,hintSuggestions:h,isFocused:c,isDropdownOpen:x,listboxId:I,activeDescendantId:q,autoFocus:D,handleTextChange:O,handleKeyDown:te,handleCaretAfterInput:T,handleCaretMove:z,startEditingParam:_,replaceEditingRange:F,setFocused:Q}=e,E=ta(null),J=ta(!1),W=ta(""),H=ta(""),Y=ta(null),re=ta(0);Y.current=y,aa(()=>{if(!D)return;let m=E.current;if(!m)return;document.activeElement===m?Q(!0):m.focus();let k=m.ownerDocument??document,P=k.getSelection(),A=P&&P.rangeCount>0&&m.contains(P.anchorNode);if(P&&!A){let L=k.createRange();L.selectNodeContents(m),L.collapse(!0),P.removeAllRanges(),P.addRange(L)}},[D,Q]),aa(()=>{let m=E.current;if(!m)return;let k=m.ownerDocument??document,P=()=>{let A=k.getSelection();if(!A||A.rangeCount===0||!A.anchorNode||!m.contains(A.anchorNode))return;let L=A.anchorNode,j=L.nodeType===Node.ELEMENT_NODE?L:L.parentElement,ie=(A.isCollapsed?j?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,ze=l?.id??w?.id??null;if(ie&&ie!==ze){_(ie);return}performance.now()-re.current<50||z(At(m))};return k.addEventListener("selectionchange",P),()=>k.removeEventListener("selectionchange",P)},[l,w,_,z]),aa(()=>{let m=E.current;if(!m)return;let k=P=>{let A=qo(m,P.target);A&&(_(A),_o(m,A))};return m.addEventListener("click",k),()=>m.removeEventListener("click",k)},[_]),aa(()=>{let m=E.current;if(!(!m||!s||!o))return Go(m,s)},[s,o]),Na(()=>{let m=E.current;m&&Uo({input:m,segments:n,newParamId:r,editingParamId:l?.id??null,placeholderText:f??"",isFocused:c,showChipIcons:a,showChipImages:t,showChipRemove:o,hintOptions:Qo(h??[])})},[n,r,l,f,h,c,a,t,o]),aa(()=>{let m=E.current;return()=>{m&&Ko(m)}},[]),Na(()=>{let m=W.current,k=r??"";if(W.current=k,!k||k===m)return;let P=E.current;if(!P)return;P.focus();let A=Y.current??Vo(P);Rt(P,A)},[r]),Na(()=>{let m=H.current,k=l?.id??"";if(H.current=k,!k||k===m||v==null)return;let P=E.current;P&&Rt(P,v)},[l,v]);let C=he(()=>{if(J.current)return;let m=E.current;if(!m)return;let k=Et(m),A=k.length>0&&k[0]!==k[0].toUpperCase()?k[0].toUpperCase()+k.slice(1):k;O(A)},[O]),B=he(()=>{re.current=performance.now(),C();let m=E.current;m&&T(At(m))},[C,T]);aa(()=>{let m=E.current;if(!m)return;let k=P=>{let A=P,L=A.inputType;if(L==="insertParagraph"||L==="insertLineBreak"||L==="insertFromDrop"){P.preventDefault();return}if(L.startsWith("insert")||L.startsWith("delete")){let j=L.startsWith("delete")?"":A.data??"";F(j)&&P.preventDefault()}};return m.addEventListener("beforeinput",k),()=>m.removeEventListener("beforeinput",k)},[F]);let d=he(()=>{J.current=!0,E.current?.setAttribute("data-aia-composing","true")},[]),S=he(()=>{J.current=!1,E.current?.removeAttribute("data-aia-composing"),C()},[C]),He=he(m=>{m.preventDefault();let k=E.current;if(!k)return;let P=(m.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!P)return;let A=k.ownerDocument??document,L=A.getSelection();if(!L||L.rangeCount===0)return;let j=L.getRangeAt(0);if(!k.contains(j.startContainer))return;j.deleteContents();let de=A.createTextNode(P);j.insertNode(de),j.setStartAfter(de),j.collapse(!0),L.removeAllRanges(),L.addRange(j),C()},[C]),ve=he(m=>te(m),[te]),b=he(()=>Q(!0),[Q]),Be=he(()=>Q(!1),[Q]),xe=he(()=>E.current?.focus(),[]),Re=he(()=>E.current?.blur(),[]),Oe=he(()=>{let m=E.current;return m?Et(m):""},[]),Le=Yo()?"plaintext-only":"true";return{inputRef:E,editorProps:{ref:E,contentEditable:Le,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":I,"aria-expanded":x,"aria-activedescendant":q,spellCheck:!0,enterKeyHint:"send",onInput:B,onKeyDown:ve,onCompositionStart:d,onCompositionEnd:S,onPaste:He,onFocus:b,onBlur:Be},getPlainText:Oe,focus:xe,blur:Re}}import{jsx as oa,jsxs as Ha}from"react/jsx-runtime";function on(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var nn=jo(function({onSubmit:n,onResult:a,onError:t,optionOverrides:o,maskCompletedText:s,className:r,apiConfig:l,additionalContext:w,language:v,currency:y,productId:f,visitorId:h,columns:c,pillPlacement:x="dropdown",mode:I="auto",optionsPosition:q="below",animations:D=!0,optionsStyle:O="floating",dropdownTrigger:te,closeDropdownOnBlur:T,prependPlaceholder:z,allOption:_,showNonTappableOptions:F,locationSearch:Q,showOptionIcons:E=!0,showChipIcons:J=!0,showChipImages:W=!0,showChipRemove:H=!1,showOptionImages:Y=!0,showOptionCounts:re=!0,showSkipButton:C,showProducts:B,productsLayout:d,productImageFallback:S,autoFocus:He=!0,onFocus:ve,onBlur:b,value:Be,completedParams:xe,onChange:Re,onParamsChange:Oe,products:Le,mapProducts:m,onProductSelect:k,onProductAddToCart:P,submitButton:A,resetOnSubmit:L=!0,seeAllResults:j=!1},de){let ie=ia(null),ze=ia(null),ye=ia(null),We=ia(()=>{}),$=ia(null),ke=ia(null);Fa(()=>{let N=ie.current;if(N)return $.current?$.current.setMode(I):$.current=new Jo(N,I),()=>{$.current?.destroy(),$.current=null}},[I]);let Ge=ka(N=>{let oe=ke.current?.current;oe&&(oe.focus(),en(oe,N))},[]),{completedParams:na,suggestionPills:ue,setActivePill:Ye,skipActivePill:De,segments:g,newParamId:Ce,clearNewParamId:Ke,placeholderText:i,isFocused:u,isDropdownOpen:Se,isActivePillSelected:Te,isLoading:me,isReady:Pe,activeIndex:Me,listboxId:ge,handleTextChange:ra,handleKeyDown:Ie,setFocused:fe,editingParam:Ne,editingIdentified:qe,editingAnchor:je,caretOffset:Ee,startEditingParam:_e,removeParam:p,handleCaretAfterInput:G,handleCaretMove:M,replaceEditingRange:$e,dropdownProps:R,reset:ma,refreshProducts:Ba,prepareSubmit:Wa,getState:Ga,recordSubmit:Ka}=Ma({onSubmit:N=>We.current(N),onResult:a,onError:t,optionOverrides:o,maskCompletedText:s,apiConfig:l,additionalContext:w,language:v,currency:y,productId:f,visitorId:h,columns:c,dropdownTrigger:te,optionsPosition:q,closeDropdownOnBlur:T,prependPlaceholder:z,allOption:_,showNonTappableOptions:F,locationSearch:Q,showOptionIcons:E,showOptionImages:Y,showOptionCounts:re,showSkipButton:C,showProducts:B,onFocus:ve,onBlur:b,value:Be,completedParams:xe,onChange:Re,onParamsChange:Oe,products:Le,mapProducts:m,onProductSelect:k,onProductAddToCart:P,source:"full-sdk",setCursor:Ge});Fa(()=>{if(!Ce)return;let N=window.setTimeout(()=>Ke(),650);return()=>window.clearTimeout(N)},[Ce,Ke]);let Lt=Me>=0?`${ge}-option-${Me}`:void 0,{inputRef:Ca,editorProps:zt,focus:ga,blur:qa,getPlainText:_a}=Ot({segments:g,newParamId:Ce,editingParam:Ne,editingIdentified:qe,editingAnchor:je,caretOffset:Ee,placeholderText:i,hintSuggestions:x==="inline"?[]:ue,isFocused:u,showChipIcons:J,showChipImages:W,showChipRemove:H,removeParam:p,isDropdownOpen:Se,listboxId:ge,activeDescendantId:Lt,autoFocus:He,handleTextChange:ra,handleKeyDown:Ie,handleCaretAfterInput:G,handleCaretMove:M,startEditingParam:_e,replaceEditingRange:$e,setFocused:fe});ke.current=Ca,Zo(()=>{let N=ze.current,oe=Ca.current;if(!N||!oe)return;let la=()=>{let Ua=N.firstElementChild;if(!Ua)return;let Bt=Ua.getBoundingClientRect(),Wt=oe.getBoundingClientRect();Bt.top>=Wt.bottom-2?N.setAttribute("data-aia-pill-wrapped",""):N.removeAttribute("data-aia-pill-wrapped")};la();let Va=new ResizeObserver(la);return Va.observe(oe),()=>Va.disconnect()},[g,ue.length,me,Ca]),Fa(()=>{let N=ye.current;if(N)return tn(N)},[]),$o(de,()=>({focus:ga,blur:qa,reset:ma,refreshProducts:Ba,setMode:N=>$.current?.setMode(N),skipActivePill:De}),[ga,qa,ma,Ba,De]);let Ze=!!g.length||na.length>0,sa=ka(N=>{if(!Ze)return;N&&Wa();let oe=Ga(),la=Xo(_a(),oe.completedParams,oe.skippedParams,{identifiedParams:oe.identifiedParams,isReady:oe.isReady,customFields:oe.customFields});N&&Ka(la),n(la),L&&ma()},[Ka,L,Ze,Wa,Ga,n,ma,_a]);We.current=()=>sa(!1);let Dt=j&&!R.isInputEmpty&&Ze,Mt=ka(()=>sa(!0),[sa]),Nt=ka(N=>{N.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||ga()},[ga]),Ft=x==="inline",Ht=x==="dropdown";return Ha("div",{ref:ie,className:`magicx-aia ${Ve.container} ${r??""}`,"data-pill-placement":x,"data-options-position":q,"data-animations":D?"on":"off","data-aia-options-style":O,"data-mode":on(I),children:[oa(za,{...R,showPills:Ht,productsLayout:d,productImageFallback:S,onSeeAllResults:Dt?Mt:void 0,fullWidth:j}),Ha("div",{className:Ve.inputWrapper,"data-aia-input-wrapper":"",onClick:Nt,children:[Ha("div",{ref:ye,className:Ve.editorArea,"data-aia-editor":"",children:[oa("div",{...zt,className:Ve.input,"data-aia-input":""}),Ft&&(me||ue.length>0)&&oa("span",{ref:ze,className:Ve.pillListContainer,"data-aia-pill-list-container":"",children:oa(ba,{pills:ue,activePillIndex:0,activeSelected:Te,onSelectPill:Ye,loading:me})})]}),A===null?null:A===void 0?oa(yt,{disabled:!Ze,ready:Ze&&Pe,onClick:()=>sa(!0),label:an(v).submit}):oa("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:Ve.submitSlot,onClick:N=>{Ze&&(N.stopPropagation(),sa(!0))},children:A})]})]})});export{nn as AIAutocomplete,za as AIAutocompleteDropdown,ms as DATE_RANGE_META_END,gs as DATE_RANGE_META_START,fs as DEFAULT_OPTION_COUNT_UNIT,Ss as LOCATION_META_KEY,Ls as PRODUCT_PATH_PREFIX,Ks as TIME_META_KEY,_s as WEEKDAY_LABELS,ps as buildSubmitResult,hs as cellDay,us as cellIso,bs as dateCellMarks,ws as formatDate,vs as formatDateRange,xs as formatOptionCount,ys as formatPlace,ks as formatTime,Cs as isoDate,Ts as monthLabel,Ps as optionCountLabel,Is as optionHasImage,Es as optionImageSources,As as optionImageSrc,Rs as optionLabel,Os as optionsShowLeadingVisuals,zs as parseDate,Ds as parseLooseDate,Ms as parseLooseDateRange,Ns as parseTime,Fs as productFromMatchedItem,Hs as productImageSources,Bs as productsFromCustomFields,Ws as sanitizeOptionIconSvg,Gs as selectedRangeFor,Ma as useAIAutocomplete,qs as visibleDateRange,Vs as withSkippedParams};
|
|
3708
3779
|
//# sourceMappingURL=index.mjs.map
|