@magicx-eng/ai-autocomplete-react 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,57 +1,8 @@
|
|
|
1
|
-
import{forwardRef as
|
|
1
|
+
import{forwardRef as bt,useCallback as ht,useEffect as yt,useImperativeHandle as St,useRef as Ve}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-cc65f4cc")){let e=document.createElement("style");e.id="ac-style-cc65f4cc",e.textContent=`.AIAutocomplete-module_container_KKjFU {
|
|
2
2
|
position: relative;
|
|
3
3
|
font-family: "IBM Plex Sans", sans-serif;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.AIAutocomplete-module_checkmark_CVE0Z {
|
|
7
|
-
position: absolute;
|
|
8
|
-
bottom: -130px;
|
|
9
|
-
left: 50%;
|
|
10
|
-
transform: translateX(-50%) translateY(8px) scale(0.8);
|
|
11
|
-
opacity: 0;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
z-index: 10;
|
|
14
|
-
animation: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.AIAutocomplete-module_checkmarkVisible_DWYbI {
|
|
18
|
-
animation: AIAutocomplete-module_checkmarkFadeInOut_U1Oof 3s ease forwards;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@keyframes AIAutocomplete-module_checkmarkFadeInOut_U1Oof {
|
|
22
|
-
0% {
|
|
23
|
-
opacity: 0;
|
|
24
|
-
transform: translateX(-50%) translateY(8px) scale(0.8);
|
|
25
|
-
}
|
|
26
|
-
10% {
|
|
27
|
-
opacity: 1;
|
|
28
|
-
transform: translateX(-50%) translateY(0) scale(1);
|
|
29
|
-
}
|
|
30
|
-
80% {
|
|
31
|
-
opacity: 1;
|
|
32
|
-
transform: translateX(-50%) translateY(0) scale(1);
|
|
33
|
-
}
|
|
34
|
-
100% {
|
|
35
|
-
opacity: 0;
|
|
36
|
-
transform: translateX(-50%) translateY(-8px) scale(0.8);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.AIAutocomplete-module_checkmarkPath_BJRUs {
|
|
41
|
-
stroke-dasharray: 30;
|
|
42
|
-
stroke-dashoffset: 30;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.AIAutocomplete-module_checkmarkVisible_DWYbI .AIAutocomplete-module_checkmarkPath_BJRUs {
|
|
46
|
-
animation: AIAutocomplete-module_drawCheck_je-B3 0.4s ease forwards 0.1s;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@keyframes AIAutocomplete-module_drawCheck_je-B3 {
|
|
50
|
-
to {
|
|
51
|
-
stroke-dashoffset: 0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
6
|
.AIAutocomplete-module_inputWrapper_FLq1b {
|
|
56
7
|
min-height: 60px;
|
|
57
8
|
padding: 24px;
|
|
@@ -135,7 +86,7 @@ import{forwardRef as dt,useCallback as gt,useEffect as ft,useImperativeHandle as
|
|
|
135
86
|
.AIAutocomplete-module_submitButton_sl1Mi:hover {
|
|
136
87
|
opacity: 0.85;
|
|
137
88
|
}
|
|
138
|
-
`,document.head.appendChild(e)}var
|
|
89
|
+
`,document.head.appendChild(e)}var F={container:"AIAutocomplete-module_container_KKjFU",inputWrapper:"AIAutocomplete-module_inputWrapper_FLq1b",editorArea:"AIAutocomplete-module_editorArea_7rBWq",sizerContent:"AIAutocomplete-module_sizerContent_DQgmV",sizerText:"AIAutocomplete-module_sizerText_iZIMK",placeholderText:"AIAutocomplete-module_placeholderText_K3ayy",textarea:"AIAutocomplete-module_textarea_eyn6A",submitButton:"AIAutocomplete-module_submitButton_sl1Mi"};if(typeof document<"u"&&!document.getElementById("ac-style-2eef895d")){let e=document.createElement("style");e.id="ac-style-2eef895d",e.textContent=`.AIAutocompleteDropdown-module_dropdown_yz2KC {
|
|
139
90
|
position: absolute;
|
|
140
91
|
left: 0;
|
|
141
92
|
right: 0;
|
|
@@ -154,7 +105,7 @@ import{forwardRef as dt,useCallback as gt,useEffect as ft,useImperativeHandle as
|
|
|
154
105
|
opacity: 1;
|
|
155
106
|
pointer-events: auto;
|
|
156
107
|
}
|
|
157
|
-
`,document.head.appendChild(e)}var
|
|
108
|
+
`,document.head.appendChild(e)}var Se={dropdown:"AIAutocompleteDropdown-module_dropdown_yz2KC",visible:"AIAutocompleteDropdown-module_visible_QCoXj"};if(typeof document<"u"&&!document.getElementById("ac-style-d91f2b06")){let e=document.createElement("style");e.id="ac-style-d91f2b06",e.textContent=`.SuggestionGrid-module_grid_jvaPb {
|
|
158
109
|
display: grid;
|
|
159
110
|
grid-template-columns: 1fr 1fr;
|
|
160
111
|
gap: 12px 18px;
|
|
@@ -177,7 +128,7 @@ import{forwardRef as dt,useCallback as gt,useEffect as ft,useImperativeHandle as
|
|
|
177
128
|
background: rgba(255, 255, 255, 0.3);
|
|
178
129
|
border-radius: 3px;
|
|
179
130
|
}
|
|
180
|
-
`,document.head.appendChild(e)}var
|
|
131
|
+
`,document.head.appendChild(e)}var ke={grid:"SuggestionGrid-module_grid_jvaPb"};if(typeof document<"u"&&!document.getElementById("ac-style-f6bdc634")){let e=document.createElement("style");e.id="ac-style-f6bdc634",e.textContent=`.SuggestionItem-module_item_d4vpD {
|
|
181
132
|
display: flex;
|
|
182
133
|
align-items: center;
|
|
183
134
|
font-family: "IBM Plex Sans", sans-serif;
|
|
@@ -218,7 +169,7 @@ import{forwardRef as dt,useCallback as gt,useEffect as ft,useImperativeHandle as
|
|
|
218
169
|
margin-left: 6px;
|
|
219
170
|
opacity: 0.5;
|
|
220
171
|
}
|
|
221
|
-
`,document.head.appendChild(e)}var X={item:"SuggestionItem-module_item_d4vpD",fadeIn:"SuggestionItem-module_fadeIn_I8u35",tappable:"SuggestionItem-module_tappable_70KcX",nonTappable:"SuggestionItem-module_nonTappable_xSZM-",highlighted:"SuggestionItem-module_highlighted_Hb0SU",tag:"SuggestionItem-module_tag_e3Fwe"};import{jsx as
|
|
172
|
+
`,document.head.appendChild(e)}var X={item:"SuggestionItem-module_item_d4vpD",fadeIn:"SuggestionItem-module_fadeIn_I8u35",tappable:"SuggestionItem-module_tappable_70KcX",nonTappable:"SuggestionItem-module_nonTappable_xSZM-",highlighted:"SuggestionItem-module_highlighted_Hb0SU",tag:"SuggestionItem-module_tag_e3Fwe"};import{jsx as rt,jsxs as it}from"react/jsx-runtime";function Me({option:e,isHighlighted:r,onSelect:t,onHighlight:o,id:n}){let i=[X.item,r?X.highlighted:"",e.is_tappable?X.tappable:X.nonTappable].filter(Boolean).join(" ");return it("div",{id:n,role:"option","aria-selected":r,className:i,tabIndex:e.is_tappable?0:-1,onClick:()=>e.is_tappable&&t(e),onKeyDown:s=>{e.is_tappable&&(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(e))},onMouseEnter:o,children:[e.icon?`${e.icon} ${e.text}`:e.text,e.tag&&rt("span",{className:X.tag,children:e.tag})]})}import{jsx as Te}from"react/jsx-runtime";function Ee({options:e,activeIndex:r,onSelect:t,onHighlight:o,listboxId:n}){return Te("div",{className:ke.grid,children:e.map((i,s)=>Te(Me,{option:i,isHighlighted:s===r,onSelect:t,onHighlight:()=>o(s),id:`${n}-option-${s}`},i.text))})}import{jsx as Le}from"react/jsx-runtime";function xe({suggestions:e,activeIndex:r,onSelect:t,onHighlight:o,isOpen:n,id:i,className:s}){let d=e[0]?.options??[],c=n&&d.length>0;return Le("div",{id:i,role:"listbox",className:`${Se.dropdown} ${c?Se.visible:""} ${s??""}`,onMouseDown:u=>u.preventDefault(),children:d.length>0&&Le(Ee,{options:d,activeIndex:r,onSelect:t,onHighlight:o,listboxId:i})})}if(typeof document<"u"&&!document.getElementById("ac-style-b745b4fb")){let e=document.createElement("style");e.id="ac-style-b745b4fb",e.textContent=`.PillList-module_list_qvLqO {
|
|
222
173
|
position: relative;
|
|
223
174
|
z-index: 1;
|
|
224
175
|
pointer-events: auto;
|
|
@@ -260,5 +211,5 @@ import{forwardRef as dt,useCallback as gt,useEffect as ft,useImperativeHandle as
|
|
|
260
211
|
opacity: 0;
|
|
261
212
|
}
|
|
262
213
|
}
|
|
263
|
-
`,document.head.appendChild(e)}var re={list:"PillList-module_list_qvLqO",pill:"PillList-module_pill_osSyz",fadeIn:"PillList-module_fadeIn_Aezob",active:"PillList-module_active_Oll--"};import{jsx as Le}from"react/jsx-runtime";function nt(e){return e===0?.4:e===1?.3:.15}function Ue({pills:e,activePillIndex:r,onSelectPill:t}){return Le("span",{className:re.list,children:e.map((o,n)=>Le("button",{type:"button",className:`${re.pill} ${n===r?re.active:""}`,style:{opacity:nt(n)},onClick:()=>t(n),children:o.text},`${o.type}-${o.text}`))})}import{useCallback as J,useMemo as ae,useRef as E,useState as se}from"react";function ie(e,r){if(!e)return[];let t=r.trimStart();if(!t)return e;let o=t.toLowerCase();return e.filter(n=>!n.is_tappable||n.text.toLowerCase().includes(o))}function ee(e,r){if(!e)return null;let t=r.trim();if(!t)return null;let o=t.toLowerCase();return e.find(n=>n.is_tappable&&n.text.toLowerCase()===o)??null}function De(e,r){let t=[],o=0;for(let i of r){let s=e.indexOf(i.text,o);s!==-1&&(s>o&&t.push({type:"text",value:e.slice(o,s)}),t.push({type:"completed",value:i.text,param:i}),o=s+i.text.length)}let n=e.slice(o);return n&&t.push({type:"text",value:n}),t}function je(e,r){let t=[],o=[],n=0;for(let i of r){let s=e.indexOf(i.text,n);s===-1?o.push(i):(t.push(i),n=s+i.text.length)}return{valid:t,invalid:o}}import{useCallback as st,useEffect as Ke,useRef as Z,useState as Ae}from"react";var rt="0.1.11";function it(){return crypto.randomUUID()}function at(e,r){return{placeholder:e.placeholder,type:e.type,...r&&{text:e.text},kind:e.kind}}async function ze(e,r,t){let o=t?.apiConfig,n=o?.apiKey??"",i=o?.authScheme??"Bearer",s=!t?.maskCompletedText,f=r.find(c=>c.type==="contact"&&c.metadata?.contact_account_count)?.metadata?.contact_account_count,m=typeof f=="number"?f:void 0,g={data:{raw_query:e,completed_params:r.map(c=>at(c,s)),...m!=null&&{contact_account_count:m}},meta:{request_id:it(),request_at:new Date().toISOString(),language:typeof navigator<"u"?navigator.language:"en-US",client_version:rt}},l={"Content-Type":"application/json",...o?.appIdentifier&&{"X-App-Identifier":o.appIdentifier},...o?.headers};n&&(l.Authorization=i==="Basic"?`Basic ${btoa(n)}`:`Bearer ${n}`);let h=await fetch(o?.endpoint??"/ac/suggest",{method:"POST",headers:l,body:JSON.stringify(g),signal:t?.signal});if(!h.ok)throw new Error(`API error: ${h.status} ${h.statusText}`);return h.json()}function Y(e,r){let t=e,o={},n=[];for(let i of r){let s=(o[i.type]??0)+1;o[i.type]=s;let m=`{{${i.type.toUpperCase().replace(/\s+/g,"_")}_${s}}}`,g=t.indexOf(i.text);g!==-1&&(t=t.slice(0,g)+m+t.slice(g+i.text.length)),n.push({...i,placeholder:m})}return{rawQuery:t,completedParams:n}}function Fe(e,r){return r?e.map(t=>{let o=r[t.type];if(!o)return t;let n=o("");if(n.length===0)return t;let i=new Set(n.map(f=>f.text)),s=(t.options??[]).filter(f=>!i.has(f.text));return{...t,options:[...n,...s]}}):e}var lt=100,ct=300,ut=2;function Be({textRef:e,suggestionsRef:r,filterBaseRef:t,maskCompletedTextRef:o,apiConfigRef:n,optionOverridesRef:i,onErrorRef:s,setCompletedParams:f,setSuggestions:m,setActiveDropdownIndex:g}){let[l,h]=Ae(!1),[c,y]=Ae(null),[I,b]=Ae(!1),P=Z(0),M=Z(null),d=Z(""),u=st(async(a,p)=>{M.current?.abort();let S=new AbortController;M.current=S;let C=++P.current,k=e.current.length;r.current.some(v=>v.type!=="placeholder")||h(!0),y(null);try{let v=await ze(a,p,{maskCompletedText:o.current,signal:S.signal,apiConfig:n.current});if(C!==P.current)return;let U=Fe(v.data.suggestions??[],i.current);b(v.data.is_ready??!1),d.current=a;let N=v.data.input??[],R=N[N.length-1],T=e.current;if(R?.state==="in_progress"){let z=T.toLowerCase().lastIndexOf(R.text.toLowerCase());z!==-1?t.current=z:t.current=k}else t.current=k;let D=U.filter(z=>z.type!=="placeholder")[0];if(D){let z=T.slice(t.current),w=ee(D.options,z);w&&(f(F=>[...F,{id:crypto.randomUUID(),placeholder:"",type:D.type,text:w.text,kind:w.kind,suggestionType:D.type,suggestionPlaceholder:D.text,options:D.options??[],metadata:w.metadata}]),U=U.filter(F=>F!==D))}m(U),h(!1),g(-1)}catch(v){if(C===P.current){let U=v instanceof Error?v:new Error(String(v));y(U),h(!1),s.current?.(U)}}},[e,r,t,o,n,i,s,f,m,g]);return Ke(()=>(u("",[]),()=>{M.current?.abort()}),[u]),{doFetch:u,isLoading:l,error:c,isReady:I,lastRawQueryRef:d}}function Ne({text:e,completedParams:r,doFetch:t,filterBaseRef:o,skipNextFetchRef:n,suggestionsRef:i,lastRawQueryRef:s}){let f=Z(null),m=Z(null),g=Z(!0);Ke(()=>{f.current&&clearTimeout(f.current),m.current&&clearTimeout(m.current);let l=h=>{if(n.current)return n.current=!1,!1;if(!e&&r.length===0)return g.current?(t("",[]),!0):(g.current=!0,!1);let c=e.slice(o.current),b=i.current.filter(k=>k.type!=="placeholder")[0],M=(b?ie(b.options,c):[]).filter(k=>k.is_tappable),d=b?ee(b.options,c)!==null:!1,u=c.trim().length>0;if(M.length>0&&!d&&u)return!1;let{rawQuery:a,completedParams:p}=Y(e,r),S=a.length<s.current.length,C=Math.abs(a.length-s.current.length);return S||C>=h?(t(a,p),!0):!1};return f.current=setTimeout(()=>{l(ut)&&m.current&&clearTimeout(m.current)},lt),m.current=setTimeout(()=>l(1),ct),()=>{f.current&&clearTimeout(f.current),m.current&&clearTimeout(m.current)}},[e,r,t,o,n,i,s])}import{useCallback as $e}from"react";function qe({activeDropdownIndex:e,setActiveDropdownIndex:r,filteredOptions:t,selectOption:o,onSubmitRef:n,text:i,completedParams:s,isDropdownOpen:f,hasPlaceholder:m,placeholderText:g,suggestions:l,filterBaseRef:h,columns:c,setText:y,setCompletedParams:I,setSuggestions:b}){let P=$e(()=>{let d=t.map((a,p)=>a.is_tappable?p:-1).filter(a=>a!==-1),u=Array.from({length:c},()=>[]);for(let a of d)u[a%c].push(a);return u.flat()},[t,c]);return{handleKeyDown:$e(d=>{let u=P();switch(d.key){case"ArrowDown":{if(d.preventDefault(),u.length===0)return;let a=u.indexOf(e),p=a<u.length-1?a+1:0;r(u[p]);break}case"ArrowUp":{if(d.preventDefault(),u.length===0)return;let a=u.indexOf(e),p=a>0?a-1:u.length-1;r(u[p]);break}case"ArrowRight":{if(e<0)break;if(e%c<c-1){let p=e+1;p<t.length&&t[p]?.is_tappable&&(d.preventDefault(),r(p))}break}case"ArrowLeft":{if(e<0)break;if(e%c>0){let a=e-1;a>=0&&t[a]?.is_tappable&&(d.preventDefault(),r(a))}break}case"Enter":{if(d.preventDefault(),e>=0&&t[e]?.is_tappable)o(t[e]);else if(n.current){let{rawQuery:a,completedParams:p}=Y(i,s),S={query:i.trim(),raw_query:a,completed_params:p};n.current(S)}break}case"Tab":{if(e>=0&&t[e]?.is_tappable)d.preventDefault(),o(t[e]);else if(f){let a=t.find(p=>p.is_tappable);a&&(d.preventDefault(),o(a))}else if(!i&&m){d.preventDefault();let a=l.find(p=>p.type==="placeholder");a?(y(g),h.current=g.length,I(p=>[...p,{id:crypto.randomUUID(),placeholder:"",type:a.type,text:g,kind:null,suggestionType:a.type,suggestionPlaceholder:a.text,options:a.options??[]}]),b(p=>p.filter(S=>S!==a))):(y(g),h.current=g.length)}break}case"Escape":r(-1);break}},[e,c,s,t,h,P,m,f,n,g,o,r,I,b,y,l,i]),getTappableIndices:P}}import{useCallback as Se}from"react";function Qe({completedParams:e,suggestions:r,setCompletedParams:t,setSuggestions:o,setActiveDropdownIndex:n,filterBaseRef:i,pillTappedRef:s}){let f=Se(l=>{let h=r.filter(b=>b.type!=="placeholder");if(l<0||l>=h.length)return;let c=h[l],y=h.filter((b,P)=>P!==l),I=r.filter(b=>b.type==="placeholder");o([...I,c,...y]),s.current=!0,n(-1)},[r,o,n,s]),m=Se(()=>{if(e.length===0)return;let l=e[e.length-1],h={type:l.suggestionType,text:l.suggestionPlaceholder,required:!0,options:l.options};t(c=>c.slice(0,-1)),o(c=>[h,...c]),n(-1)},[e,t,o,n]),g=Se(l=>{let h={type:l.suggestionType,text:l.suggestionPlaceholder,required:!0,options:l.options};return{apply:c=>{c(y=>{let I=0;for(let b of e){let P=y.indexOf(b.text,I);if(P!==-1){if(b.id===l.id){let M=y.slice(0,P),d=y.slice(P+l.text.length),u=(M+d).replace(/ {2,}/g," ");return i.current=Math.min(i.current,u.length),u}I=P+b.text.length}}return y}),t(y=>y.filter(I=>I.id!==l.id)),o(y=>[h,...y]),n(-1),s.current=!0}}},[e,t,o,n,i,s]);return{setActivePill:f,removeLastParam:m,reEditParam:g}}var pt=0;function mt(){let e=E(null);return e.current===null&&(e.current=`:ac-${++pt}:`),e.current}function _e({onSubmit:e,onError:r,optionOverrides:t,maskCompletedText:o,placeholder:n,apiConfig:i,columns:s=2,eagerSuggestions:f=!0,value:m,completedParams:g,onChange:l,onParamsChange:h}){let c=m!==void 0,y=g!==void 0,[I,b]=se(""),[P,M]=se([]),[d,u]=se([]),[a,p]=se(-1),S=c?m:I,C=y?g:P,k=E(e);k.current=e;let q=E(l);q.current=l;let v=E(h);v.current=h;let U=E(m);U.current=m;let N=E(g);N.current=g;let R=J(A=>{if(typeof A=="function")if(c){let x=A(U.current??"");q.current?.(x)}else b(x=>{let $=A(x);return q.current?.($),$});else c||b(A),q.current?.(A)},[c]),T=J(A=>{if(typeof A=="function")if(y){let x=A(N.current??[]);v.current?.(x)}else M(x=>{let $=A(x);return v.current?.($),$});else y||M(A),v.current?.(A)},[y]),W=E(r);W.current=r;let D=E(t);D.current=t;let z=E(o);z.current=o;let w=E(i);w.current=i;let F=E(S);F.current=S;let le=E(d);le.current=d;let K=E(0),te=E(!1),Pe=E(!1),ce=mt(),{doFetch:ue,isLoading:ve,error:Ve,isReady:He,lastRawQueryRef:pe}=Be({textRef:F,suggestionsRef:le,filterBaseRef:K,maskCompletedTextRef:z,apiConfigRef:w,optionOverridesRef:D,onErrorRef:W,setCompletedParams:T,setSuggestions:u,setActiveDropdownIndex:p});Ne({text:S,completedParams:C,doFetch:ue,filterBaseRef:K,skipNextFetchRef:Pe,suggestionsRef:le,lastRawQueryRef:pe});let We=ae(()=>De(S,C),[S,C]);K.current=Math.min(K.current,S.length);let me=S.slice(K.current),de=ae(()=>d.filter(x=>x.type==="placeholder").map(x=>x.text).join(" ")||n||"",[d,n]),oe=ae(()=>d.filter(A=>A.type!=="placeholder"),[d]),_=oe[0],Ie=_?t?.[_.type]:void 0,Ce=_?Ie?Ie(me.trim()):_.options??[]:[],ge=ae(()=>ie(Ce,me),[Ce,me]),ke=de.length>0,fe=!ve&&ge.length>0&&(!!S||te.current||!ke),we=J(A=>{if(!_)return;let x={id:crypto.randomUUID(),placeholder:"",type:_.type,text:A.text,kind:A.kind,suggestionType:_.type,suggestionPlaceholder:_.text,options:_.options??[],metadata:A.metadata},$=K.current,L=F.current.slice(0,$);if(L.length>0&&!L.endsWith(" ")){let O=L.split(/\s+/).pop()??"";O&&A.text.toLowerCase().startsWith(O.toLowerCase())&&(L=L.slice(0,L.length-O.length))}let he=L.length>0&&L[L.length-1]!==" ",G=L+(he?" ":"")+A.text+" ";R(G),K.current=G.length,T(O=>[...O,x]),te.current=!1,p(-1);let Q=oe.length-1;f&&Q>0?(u(O=>O.filter(V=>V!==_)),Pe.current=!0):u(O=>O.filter(V=>V.type==="placeholder"))},[_,oe,f,R,T]),Ge=J(A=>{let x=A.target.value,L=x.length>0&&!A.nativeEvent?.isComposing&&x[0]!==x[0].toUpperCase()?x[0].toUpperCase()+x.slice(1):x;R(L),te.current=!1,p(-1);let{valid:he,invalid:G}=je(L,C);if(G.length>0){T(()=>he);for(let Q of G)u(O=>[{type:Q.suggestionType,text:Q.suggestionPlaceholder,required:!0,options:Q.options},...O])}if(_&&G.length===0){let Q=L.slice(K.current),O=ee(_.options,Q);O&&(T(V=>[...V,{id:crypto.randomUUID(),placeholder:"",type:_.type,text:O.text,kind:O.kind,suggestionType:_.type,suggestionPlaceholder:_.text,options:_.options??[],metadata:O.metadata}]),u(V=>V.filter(et=>et!==_)))}},[C,_,R,T]),{handleKeyDown:Xe}=qe({activeDropdownIndex:a,setActiveDropdownIndex:p,filteredOptions:ge,selectOption:we,onSubmitRef:k,text:S,completedParams:C,isDropdownOpen:fe,hasPlaceholder:ke,placeholderText:de,suggestions:d,filterBaseRef:K,columns:s,setText:R,setCompletedParams:T,setSuggestions:u}),ne=Qe({completedParams:C,suggestions:d,setCompletedParams:T,setSuggestions:u,setActiveDropdownIndex:p,filterBaseRef:K,pillTappedRef:te}),Ye=J(A=>{ne.reEditParam(A).apply(R)},[ne,R]),Ze=J(()=>{R(""),T(()=>[]),u([]),p(-1),K.current=0,pe.current="",ue("",[])},[ue,R,T,pe]),Je=a>=0?`${ce}-option-${a}`:void 0;return{completedParams:C,suggestionPills:oe,setActivePill:ne.setActivePill,removeLastParam:ne.removeLastParam,reEditParam:Ye,segments:We,suggestions:d,activeIndex:a,isReady:He,isLoading:ve,error:Ve,inputProps:{value:S,placeholder:de||void 0,onChange:Ge,onKeyDown:Xe,role:"combobox","aria-expanded":fe,"aria-activedescendant":Je,"aria-autocomplete":"list","aria-controls":ce},reset:Ze,dropdownProps:{suggestions:_?[{..._,options:ge}]:[],activeIndex:a,onSelect:we,onHighlight:p,isOpen:fe,id:ce}}}import{jsx as B,jsxs as H}from"react/jsx-runtime";var yt=dt(function({onSubmit:r,onError:t,optionOverrides:o,maskCompletedText:n,placeholder:i,className:s,apiConfig:f,columns:m,eagerSuggestions:g,value:l,completedParams:h,onChange:c,onParamsChange:y},I){let b=xe(null),[P,M]=bt(!1),d=xe(()=>{}),u=xe(void 0);ft(()=>(b.current?.focus(),()=>clearTimeout(u.current)),[]);let{completedParams:a,suggestionPills:p,setActivePill:S,segments:C,inputProps:k,dropdownProps:q,reset:v}=_e({onSubmit:w=>d.current(w),onError:t,optionOverrides:o,maskCompletedText:n,placeholder:i,apiConfig:f,columns:m,eagerSuggestions:g,value:l,completedParams:h,onChange:c,onParamsChange:y});ht(I,()=>({focus:()=>b.current?.focus(),reset:v}),[v]);let U=()=>{b.current?.focus()},N=!!k.value||a.length>0,R=gt(()=>{if(!N)return;let{rawQuery:w,completedParams:F}=Y(k.value,a);r({query:k.value.trim(),raw_query:w,completed_params:F}),v(),M(!0),clearTimeout(u.current),u.current=setTimeout(()=>M(!1),3e3)},[N,k.value,a,r,v]);d.current=R;let{onChange:T,placeholder:W,...D}=k,z=!k.value;return H("div",{className:`${j.container} ${s??""}`,children:[B("div",{className:`${j.checkmark} ${P?j.checkmarkVisible:""}`,children:H("svg",{width:"72",height:"72",viewBox:"0 0 24 24",fill:"none",role:"img","aria-label":"Success",children:[B("circle",{cx:"12",cy:"12",r:"12",fill:"#34C759"}),B("path",{d:"M7 12.5l3.5 3.5L17 9",stroke:"#000",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:j.checkmarkPath})]})}),B(ye,{...q}),H("div",{className:j.inputWrapper,onClick:U,children:[H("div",{className:j.editorArea,children:[H("div",{className:j.sizerContent,"aria-hidden":"true",children:[z&&W?H("span",{className:j.placeholderText,children:[W," "]}):H("span",{className:j.sizerText,children:[C.map((w,F)=>B("span",{children:w.value},`${F}-${w.type}`)),C.length===0&&"\xA0"]})," ",B(Ue,{pills:p,activePillIndex:0,onSelectPill:S})]}),B("textarea",{ref:b,className:j.textarea,rows:1,onChange:T,...D})]}),B("button",{type:"button",className:j.submitButton,disabled:!N,onClick:w=>{w.stopPropagation(),R()},"aria-label":"Submit",children:B("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":"Submit",children:B("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})});export{yt as AIAutocomplete,ye as AIAutocompleteDropdown,_e as useAIAutocomplete};
|
|
214
|
+
`,document.head.appendChild(e)}var se={list:"PillList-module_list_qvLqO",pill:"PillList-module_pill_osSyz",fadeIn:"PillList-module_fadeIn_Aezob",active:"PillList-module_active_Oll--"};import{jsx as Ue}from"react/jsx-runtime";function at(e){return e===0?.4:e===1?.3:.15}function De({pills:e,activePillIndex:r,onSelectPill:t}){return Ue("span",{className:se.list,children:e.map((o,n)=>Ue("button",{type:"button",className:`${se.pill} ${n===r?se.active:""}`,style:{opacity:at(n)},onClick:()=>t(n),children:o.text},`${o.type}-${o.text}`))})}import{useCallback as ee,useMemo as ce,useRef as O,useState as ue}from"react";function Z(e,r,t){let o=e.slice(r);if(t||r===0||e[r-1]===" ")return o;let n=o.indexOf(" ");return n===-1?"":o.slice(n+1)}function le(e,r){if(!e)return[];let t=r.trimStart();if(!t)return e;let o=t.toLowerCase();return e.filter(n=>!n.is_tappable||n.text.toLowerCase().includes(o))}function ie(e,r){if(!e)return null;let t=r.trim();if(!t)return null;let o=t.toLowerCase();return e.find(n=>n.is_tappable&&n.text.toLowerCase()===o)??null}function Ke(e,r){let t=[],o=0;for(let i of r){let s=e.indexOf(i.text,o);s!==-1&&(s>o&&t.push({type:"text",value:e.slice(o,s)}),t.push({type:"completed",value:i.text,param:i}),o=s+i.text.length)}let n=e.slice(o);return n&&t.push({type:"text",value:n}),t}function je(e,r){let t=[],o=[],n=0;for(let i of r){let s=e.indexOf(i.text,n);s===-1?o.push(i):(t.push(i),n=s+i.text.length)}return{valid:t,invalid:o}}import{useCallback as ut,useEffect as Ne,useRef as Y,useState as Ae}from"react";var st="0.1.13",ze=!1;function lt(){return crypto.randomUUID()}function ct(e,r){return{placeholder:e.placeholder,type:e.type,...r&&{text:e.text},kind:e.kind}}async function Fe(e,r,t){let o=t?.apiConfig,n=o?.apiKey??"";!n&&!ze&&(ze=!0,console.warn("[AIAutocomplete] No apiKey in apiConfig. Requests will be sent without an Authorization header."));let i=o?.authScheme??"Bearer",s=!t?.maskCompletedText,b=r.find(m=>m.type==="contact"&&m.metadata?.contact_account_count)?.metadata?.contact_account_count,d=typeof b=="number"?b:void 0,c={data:{raw_query:e,completed_params:r.map(m=>ct(m,s)),...d!=null&&{contact_account_count:d}},meta:{request_id:lt(),request_at:new Date().toISOString(),language:typeof navigator<"u"?navigator.language:"en-US",client_version:st}},u={"Content-Type":"application/json",...o?.appIdentifier&&{"X-App-Identifier":o.appIdentifier},...o?.headers};n&&(u.Authorization=i==="Basic"?`Basic ${btoa(n)}`:`Bearer ${n}`);let h=await fetch(o?.endpoint??"/ac/suggest",{method:"POST",headers:u,body:JSON.stringify(c),signal:t?.signal});if(!h.ok)throw new Error(`API error: ${h.status} ${h.statusText}`);return h.json()}function J(e,r){let t=e,o={},n=[];for(let i of r){let s=(o[i.type]??0)+1;o[i.type]=s;let d=`{{${i.type.toUpperCase().replace(/\s+/g,"_")}_${s}}}`,c=t.indexOf(i.text);c!==-1&&(t=t.slice(0,c)+d+t.slice(c+i.text.length)),n.push({...i,placeholder:d})}return{rawQuery:t,completedParams:n}}function qe(e,r){return r?e.map(t=>{let o=r[t.type];if(!o)return t;let n=o("");if(n.length===0)return t;let i=new Set(n.map(b=>b.text)),s=(t.options??[]).filter(b=>!i.has(b.text));return{...t,options:[...n,...s]}}):e}var pt=100,dt=300,mt=2;function Qe({textRef:e,suggestionsRef:r,filterBaseRef:t,filterInProgressRef:o,maskCompletedTextRef:n,apiConfigRef:i,optionOverridesRef:s,onErrorRef:b,setCompletedParams:d,setSuggestions:c,setActiveDropdownIndex:u}){let[h,m]=Ae(!1),[g,A]=Ae(null),[S,_]=Ae(!1),I=Y(0),x=Y(null),C=Y(""),f=ut(async(p,a)=>{x.current?.abort();let l=new AbortController;x.current=l;let U=++I.current,R=e.current.length;r.current.some(M=>M.type!=="placeholder")||m(!0),A(null);try{let M=await Fe(p,a,{maskCompletedText:n.current,signal:l.signal,apiConfig:i.current});if(U!==I.current)return;let D=qe(M.data.suggestions??[],s.current);_(M.data.is_ready??!1),C.current=p;let T=M.data.input??[],k=T[T.length-1],E=e.current;if(k?.state==="in_progress"){o.current=!0;let z=E.toLowerCase().lastIndexOf(k.text.toLowerCase());z!==-1?t.current=z:t.current=R}else o.current=!1,t.current=R;let j=D.filter(z=>z.type!=="placeholder")[0];if(j){let z=Z(E,t.current,o.current),N=ie(j.options,z);N&&(d(B=>[...B,{id:crypto.randomUUID(),placeholder:"",type:j.type,text:N.text,kind:N.kind,suggestionType:j.type,suggestionPlaceholder:j.text,options:j.options??[],metadata:N.metadata}]),D=D.filter(B=>B!==j))}c(D),m(!1),u(-1)}catch(M){if(U===I.current){let D=M instanceof Error?M:new Error(String(M));A(D),m(!1),b.current?.(D)}}},[e,r,t,o,n,i,s,b,d,c,u]);return Ne(()=>(f("",[]),()=>{x.current?.abort()}),[f]),{doFetch:f,isLoading:h,error:g,isReady:S,lastRawQueryRef:C}}function $e({text:e,completedParams:r,doFetch:t,filterBaseRef:o,filterInProgressRef:n,skipNextFetchRef:i,suggestionsRef:s,lastRawQueryRef:b}){let d=Y(null),c=Y(null),u=Y(!0);Ne(()=>{d.current&&clearTimeout(d.current),c.current&&clearTimeout(c.current);let h=m=>{if(i.current)return i.current=!1,!1;if(!e&&r.length===0)return u.current?(t("",[]),!0):(u.current=!0,!1);let g=Z(e,o.current,n.current),_=s.current.filter(R=>R.type!=="placeholder")[0],x=(_?le(_.options,g):[]).filter(R=>R.is_tappable),C=_?ie(_.options,g)!==null:!1,f=g.trim().length>0;if(x.length>0&&!C&&f)return!1;let{rawQuery:p,completedParams:a}=J(e,r),l=p.length<b.current.length,U=Math.abs(p.length-b.current.length);return l||U>=m?(t(p,a),!0):!1};return d.current=setTimeout(()=>{h(mt)&&c.current&&clearTimeout(c.current)},pt),c.current=setTimeout(()=>h(1),dt),()=>{d.current&&clearTimeout(d.current),c.current&&clearTimeout(c.current)}},[e,r,t,o,n,i,s,b])}import{useCallback as Be}from"react";function He({activeDropdownIndex:e,setActiveDropdownIndex:r,filteredOptions:t,selectOption:o,onSubmitRef:n,text:i,completedParams:s,isDropdownOpen:b,hasPlaceholder:d,placeholderText:c,suggestions:u,actionableSuggestions:h,setActivePill:m,filterBaseRef:g,columns:A,setText:S,setCompletedParams:_,setSuggestions:I}){let x=Be(()=>{let f=t.map((a,l)=>a.is_tappable?l:-1).filter(a=>a!==-1),p=Array.from({length:A},()=>[]);for(let a of f)p[a%A].push(a);return p.flat()},[t,A]);return{handleKeyDown:Be(f=>{let p=x();switch(f.key){case"ArrowDown":{if(f.preventDefault(),p.length===0)return;let a=p.indexOf(e),l=a<p.length-1?a+1:0;r(p[l]);break}case"ArrowUp":{if(f.preventDefault(),p.length===0)return;let a=p.indexOf(e),l=a>0?a-1:p.length-1;r(p[l]);break}case"ArrowRight":{if(e<0){h.length>1&&(f.preventDefault(),m(1));break}if(e%A<A-1){let l=e+1;l<t.length&&t[l]?.is_tappable&&(f.preventDefault(),r(l))}break}case"ArrowLeft":{if(e<0)break;if(e%A>0){let a=e-1;a>=0&&t[a]?.is_tappable&&(f.preventDefault(),r(a))}break}case"Enter":{if(f.preventDefault(),e>=0&&t[e]?.is_tappable)o(t[e]);else if(n.current){let{rawQuery:a,completedParams:l}=J(i,s),U={query:i.trim(),raw_query:a,completed_params:l};n.current(U)}break}case"Tab":{if(e>=0&&t[e]?.is_tappable)f.preventDefault(),o(t[e]);else if(b){let a=t.find(l=>l.is_tappable);a&&(f.preventDefault(),o(a))}else if(!i&&d){f.preventDefault();let a=u.find(l=>l.type==="placeholder");a?(S(c),g.current=c.length,_(l=>[...l,{id:crypto.randomUUID(),placeholder:"",type:a.type,text:c,kind:null,suggestionType:a.type,suggestionPlaceholder:a.text,options:a.options??[]}]),I(l=>l.filter(U=>U!==a))):(S(c),g.current=c.length)}break}case"Escape":r(-1);break}},[h,e,A,s,t,g,x,d,b,n,c,o,r,m,_,I,S,u,i]),getTappableIndices:x}}import{useCallback as _e}from"react";function We({completedParams:e,suggestions:r,setCompletedParams:t,setSuggestions:o,setActiveDropdownIndex:n,filterBaseRef:i,pillTappedRef:s}){let b=_e(u=>{let h=r.filter(S=>S.type!=="placeholder");if(u<0||u>=h.length)return;let m=h[u],g=h.filter((S,_)=>_!==u),A=r.filter(S=>S.type==="placeholder");o([...A,m,...g]),s.current=!0,n(-1)},[r,o,n,s]),d=_e(()=>{if(e.length===0)return;let u=e[e.length-1],h={type:u.suggestionType,text:u.suggestionPlaceholder,required:!0,options:u.options};t(m=>m.slice(0,-1)),o(m=>[h,...m]),n(-1)},[e,t,o,n]),c=_e(u=>{let h={type:u.suggestionType,text:u.suggestionPlaceholder,required:!0,options:u.options};return{apply:m=>{m(g=>{let A=0;for(let S of e){let _=g.indexOf(S.text,A);if(_!==-1){if(S.id===u.id){let I=g.slice(0,_),x=g.slice(_+u.text.length),C=(I+x).replace(/ {2,}/g," ");return i.current=Math.min(i.current,C.length),C}A=_+S.text.length}}return g}),t(g=>g.filter(A=>A.id!==u.id)),o(g=>[h,...g]),n(-1),s.current=!0}}},[e,t,o,n,i,s]);return{setActivePill:b,removeLastParam:d,reEditParam:c}}var gt=0;function ft(){let e=O(null);return e.current===null&&(e.current=`:ac-${++gt}:`),e.current}function ve({onSubmit:e,onError:r,optionOverrides:t,maskCompletedText:o,placeholder:n,apiConfig:i,columns:s=2,eagerSuggestions:b=!0,value:d,completedParams:c,onChange:u,onParamsChange:h}){let m=d!==void 0,g=c!==void 0,[A,S]=ue(""),[_,I]=ue([]),[x,C]=ue([]),[f,p]=ue(-1),a=m?d:A,l=g?c:_,U=O(e);U.current=e;let R=O(u);R.current=u;let q=O(h);q.current=h;let M=O(d);M.current=d;let D=O(c);D.current=c;let T=ee(y=>{if(typeof y=="function")if(m){let P=y(M.current??"");R.current?.(P)}else S(P=>{let Q=y(P);return R.current?.(Q),Q});else m||S(y),R.current?.(y)},[m]),k=ee(y=>{if(typeof y=="function")if(g){let P=y(D.current??[]);q.current?.(P)}else I(P=>{let Q=y(P);return q.current?.(Q),Q});else g||I(y),q.current?.(y)},[g]),E=O(r);E.current=r;let $=O(t);$.current=t;let j=O(o);j.current=o;let z=O(i);z.current=i;let N=O(a);N.current=a;let B=O(x);B.current=x;let K=O(0),oe=O(!1),ae=O(!1),Pe=O(!1),pe=ft(),{doFetch:de,isLoading:Ce,error:Ge,isReady:Xe,lastRawQueryRef:me}=Qe({textRef:N,suggestionsRef:B,filterBaseRef:K,filterInProgressRef:oe,maskCompletedTextRef:j,apiConfigRef:z,optionOverridesRef:$,onErrorRef:E,setCompletedParams:k,setSuggestions:C,setActiveDropdownIndex:p});$e({text:a,completedParams:l,doFetch:de,filterBaseRef:K,filterInProgressRef:oe,skipNextFetchRef:Pe,suggestionsRef:B,lastRawQueryRef:me});let Ze=ce(()=>Ke(a,l),[a,l]);K.current=Math.min(K.current,a.length);let ge=Z(a,K.current,oe.current),fe=ce(()=>x.filter(P=>P.type==="placeholder").map(P=>P.text).join(" ")||n||"",[x,n]),ne=ce(()=>x.filter(y=>y.type!=="placeholder"),[x]),v=ne[0],Ie=v?t?.[v.type]:void 0,we=v?Ie?Ie(ge.trim()):v.options??[]:[],be=ce(()=>le(we,ge),[we,ge]),Oe=fe.length>0,he=!Ce&&be.length>0&&(!!a||ae.current||!Oe),Re=ee(y=>{if(!v)return;let P={id:crypto.randomUUID(),placeholder:"",type:v.type,text:y.text,kind:y.kind,suggestionType:v.type,suggestionPlaceholder:v.text,options:v.options??[],metadata:y.metadata},Q=K.current,L=N.current.slice(0,Q);if(L.length>0&&!L.endsWith(" ")){let w=L.split(/\s+/).pop()??"";w&&y.text.toLowerCase().startsWith(w.toLowerCase())&&(L=L.slice(0,L.length-w.length))}let ye=L.length>0&&L[L.length-1]!==" ",G=L+(ye?" ":"")+y.text+" ";T(G),K.current=G.length,k(w=>[...w,P]),ae.current=!1,p(-1);let H=ne.length-1;b&&H>0?(C(w=>w.filter(W=>W!==v)),Pe.current=!0):C(w=>w.filter(W=>W.type==="placeholder"))},[v,ne,b,T,k]),Je=ee(y=>{let P=y.target.value,L=P.length>0&&!y.nativeEvent?.isComposing&&P[0]!==P[0].toUpperCase()?P[0].toUpperCase()+P.slice(1):P;T(L),ae.current=!1,p(-1);let{valid:ye,invalid:G}=je(L,l);if(G.length>0){k(()=>ye);for(let H of G)C(w=>[{type:H.suggestionType,text:H.suggestionPlaceholder,required:!0,options:H.options},...w])}if(v&&G.length===0){let H=Z(L,K.current,oe.current),w=ie(v.options,H);w&&(k(W=>[...W,{id:crypto.randomUUID(),placeholder:"",type:v.type,text:w.text,kind:w.kind,suggestionType:v.type,suggestionPlaceholder:v.text,options:v.options??[],metadata:w.metadata}]),C(W=>W.filter(nt=>nt!==v)))}},[l,v,T,k]),re=We({completedParams:l,suggestions:x,setCompletedParams:k,setSuggestions:C,setActiveDropdownIndex:p,filterBaseRef:K,pillTappedRef:ae}),Ye=ee(y=>{re.reEditParam(y).apply(T)},[re,T]),{handleKeyDown:et}=He({activeDropdownIndex:f,setActiveDropdownIndex:p,filteredOptions:be,selectOption:Re,onSubmitRef:U,text:a,completedParams:l,isDropdownOpen:he,hasPlaceholder:Oe,placeholderText:fe,suggestions:x,actionableSuggestions:ne,setActivePill:re.setActivePill,filterBaseRef:K,columns:s,setText:T,setCompletedParams:k,setSuggestions:C}),tt=ee(()=>{T(""),k(()=>[]),C([]),p(-1),K.current=0,oe.current=!1,me.current="",de("",[])},[de,T,k,me]),ot=f>=0?`${pe}-option-${f}`:void 0;return{completedParams:l,suggestionPills:ne,setActivePill:re.setActivePill,removeLastParam:re.removeLastParam,reEditParam:Ye,segments:Ze,suggestions:x,activeIndex:f,isReady:Xe,isLoading:Ce,error:Ge,inputProps:{value:a,placeholder:fe||void 0,onChange:Je,onKeyDown:et,role:"combobox","aria-expanded":he,"aria-activedescendant":ot,"aria-autocomplete":"list","aria-controls":pe},reset:tt,dropdownProps:{suggestions:v?[{...v,options:be}]:[],activeIndex:f,onSelect:Re,onHighlight:p,isOpen:he,id:pe}}}import{jsx as V,jsxs as te}from"react/jsx-runtime";var xt=bt(function({onSubmit:r,onError:t,optionOverrides:o,maskCompletedText:n,placeholder:i,className:s,apiConfig:b,columns:d,eagerSuggestions:c,value:u,completedParams:h,onChange:m,onParamsChange:g},A){let S=Ve(null),_=Ve(()=>{});yt(()=>{S.current?.focus()},[]);let{completedParams:I,suggestionPills:x,setActivePill:C,segments:f,inputProps:p,dropdownProps:a,reset:l}=ve({onSubmit:E=>_.current(E),onError:t,optionOverrides:o,maskCompletedText:n,placeholder:i,apiConfig:b,columns:d,eagerSuggestions:c,value:u,completedParams:h,onChange:m,onParamsChange:g});St(A,()=>({focus:()=>S.current?.focus(),reset:l}),[l]);let U=()=>{S.current?.focus()},R=!!p.value||I.length>0,q=ht(()=>{if(!R)return;let{rawQuery:E,completedParams:$}=J(p.value,I);r({query:p.value.trim(),raw_query:E,completed_params:$}),l()},[R,p.value,I,r,l]);_.current=q;let{onChange:M,placeholder:D,...T}=p,k=!p.value;return te("div",{className:`${F.container} ${s??""}`,children:[V(xe,{...a}),te("div",{className:F.inputWrapper,onClick:U,children:[te("div",{className:F.editorArea,children:[te("div",{className:F.sizerContent,"aria-hidden":"true",children:[k&&D?te("span",{className:F.placeholderText,children:[D," "]}):te("span",{className:F.sizerText,children:[f.map((E,$)=>V("span",{children:E.value},`${$}-${E.type}`)),f.length===0&&"\xA0"]})," ",V(De,{pills:x,activePillIndex:0,onSelectPill:C})]}),V("textarea",{ref:S,className:F.textarea,rows:1,onChange:M,...T})]}),V("button",{type:"button",className:F.submitButton,disabled:!R,onClick:E=>{E.stopPropagation(),q()},"aria-label":"Submit",children:V("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":"Submit",children:V("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})});export{xt as AIAutocomplete,xe as AIAutocompleteDropdown,ve as useAIAutocomplete};
|
|
264
215
|
//# sourceMappingURL=index.mjs.map
|