@hollware/admin 0.10.0 → 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/client/_headers +4 -0
  2. package/dist/client/admin/assets/Account-OgCmRh3p.js +1 -0
  3. package/dist/client/admin/assets/Activity-DnrBfUzH.js +1 -0
  4. package/dist/client/admin/assets/{Callback-Dd2wMBlz.js → Callback-Bd_E2MOu.js} +1 -1
  5. package/dist/client/admin/assets/Checkbox-CpedbrFs.js +1 -0
  6. package/dist/client/admin/assets/Collection-C_M05-IT.js +55 -0
  7. package/dist/client/admin/assets/Collections-CIQEDb4n.js +1 -0
  8. package/dist/client/admin/assets/{CommandPalette-CuiA12JU.js → CommandPalette-CaudxyDO.js} +1 -1
  9. package/dist/client/admin/assets/{columns-Cj8eM0qD.js → DataTable-C8PKpqDk.js} +2 -2
  10. package/dist/client/admin/assets/{Drawer-C-hDTnMm.js → Drawer-QZ2e5Qu-.js} +1 -1
  11. package/dist/client/admin/assets/Entries-sKXmTRAY.js +1 -0
  12. package/dist/client/admin/assets/{Entry-D79SZHg4.js → Entry-IEK4600_.js} +11 -5
  13. package/dist/client/admin/assets/FormField-CJVUVtJp.js +1 -0
  14. package/dist/client/admin/assets/{Home-CF2H9PD1.js → Home-x722ZbaS.js} +1 -1
  15. package/dist/client/admin/assets/InputNumber-vGsLft_d.js +1 -0
  16. package/dist/client/admin/assets/{InputTags-vGbxuKpC.js → InputTags-uNIV-i75.js} +1 -1
  17. package/dist/client/admin/assets/Label-CLk3TC5c.js +1 -0
  18. package/dist/client/admin/assets/{Modal-CHkapwWL.js → Modal-xlafxc7H.js} +1 -1
  19. package/dist/client/admin/assets/{NewEntry-nYIALrke.js → NewEntry-7yN63Li5.js} +2 -2
  20. package/dist/client/admin/assets/{Page-DmKZE2KT.js → Page-Df9k6j3N.js} +1 -1
  21. package/dist/client/admin/assets/People-DFve2iFx.js +1 -0
  22. package/dist/client/admin/assets/{Reviews-OSta1XxW.js → Reviews-DcdEUKKq.js} +1 -1
  23. package/dist/client/admin/assets/{RovingFocusItem-BDpWJACo.js → RovingFocusItem-CBC6orXI.js} +1 -1
  24. package/dist/client/admin/assets/Select-BEIL7CCt.js +1 -0
  25. package/dist/client/admin/assets/Site-uqRpNNzC.js +1 -0
  26. package/dist/client/admin/assets/{Slideover-C3OsTcOD.js → Slideover-DHJp1Wu-.js} +1 -1
  27. package/dist/client/admin/assets/StructureDialogs-C8A5_Uip.js +1 -0
  28. package/dist/client/admin/assets/{Toast-B5vXvO3R.js → Toast-CLwIR0jw.js} +1 -1
  29. package/dist/client/admin/assets/Tokens-CR-FpiFx.js +1 -0
  30. package/dist/client/admin/assets/{VerdictList-D_NZ0OYy.js → VerdictList-CdJJwTAW.js} +1 -1
  31. package/dist/client/admin/assets/{VisuallyHiddenInput-CljPtaJu.js → VisuallyHiddenInput-BcwRP4QN.js} +1 -1
  32. package/dist/client/admin/assets/activity-CZNjJw1n.js +1 -0
  33. package/dist/client/admin/assets/audit-EPBIwE5q.js +1 -0
  34. package/dist/client/admin/assets/{bulk-report-DJ9HZ9wj.js → bulk-report-DtFEguVY.js} +1 -1
  35. package/dist/client/admin/assets/columns-C2eOHLOF.js +1 -0
  36. package/dist/client/admin/assets/index-CETy3pwO.css +2 -0
  37. package/dist/client/admin/assets/{index-y3aDwEoE.js → index-CU4FewUB.js} +3 -3
  38. package/dist/client/admin/assets/{me-Bv56H6vV.js → me-BI4DxQI4.js} +1 -1
  39. package/dist/client/admin/assets/{presets-DJm-7Lm5.js → presets-DKXSNivp.js} +1 -1
  40. package/dist/client/admin/assets/session-DxiGrAK0.js +1 -0
  41. package/dist/client/admin/assets/{virtualizer-Cbz_mmfW.js → virtualizer-T_z5T3jP.js} +1 -1
  42. package/dist/client/admin/index.html +4 -4
  43. package/package.json +2 -2
  44. package/dist/client/admin/assets/Checkbox-Cyt4RO0O.js +0 -1
  45. package/dist/client/admin/assets/Collection-CHIpkgQG.js +0 -1
  46. package/dist/client/admin/assets/Collections-Dp7Kise2.js +0 -1
  47. package/dist/client/admin/assets/Entries-Y9VLTF7I.js +0 -1
  48. package/dist/client/admin/assets/FormField-UakqhMeR.js +0 -1
  49. package/dist/client/admin/assets/InputNumber-CUV4YGiS.js +0 -1
  50. package/dist/client/admin/assets/People-BPTILLjC.js +0 -1
  51. package/dist/client/admin/assets/Select-Cw7U6_Cu.js +0 -1
  52. package/dist/client/admin/assets/Site-BTtlUaLP.js +0 -1
  53. package/dist/client/admin/assets/Tokens-DI3fOtE3.js +0 -1
  54. package/dist/client/admin/assets/index-DgBlmql9.css +0 -2
  55. package/dist/client/admin/assets/session-9fRFbks9.js +0 -1
  56. package/dist/client/admin/assets/src-D89rdOFw.js +0 -55
@@ -1 +1 @@
1
- import{$r as e,A as t,Ei as n,En as r,Gn as i,Gt as a,Ht as o,Kn as s,Kr as c,N as l,Qr as u,Qt as d,R as f,Si as p,Tn as m,U as h,Ur as g,Ut as _,Vt as v,W as y,Wt as b,Yr as ee,Yt as x,Zr as S,Zt as C,_ as te,a as ne,cr as re,dt as ie,en as ae,ft as oe,g as se,i as ce,jt as w,lr as le,lt as ue,n as de,o as T,or as fe,pr as pe,r as me,s as he,t as ge,v as _e,vr as E,wn as D,y as O,zn as k}from"./Button-CLo6xV_j.js";import{i as ve,z as ye}from"./Presence-CNRQpqMN.js";import{n as be,t as xe}from"./Input-ziwF3Rrc.js";import{a as Se,c as Ce,i as we,l as Te,n as Ee,o as A,r as De,s as Oe,t as ke}from"./virtualizer-Cbz_mmfW.js";var Ae=ae({__name:`ListboxGroupLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(t){let n=t,r=A({id:``});return(t,i)=>(k(),_(e(O),m(n,{id:e(r).id}),{default:E(()=>[s(t.$slots,`default`)]),_:3},16,[`id`]))}});function j(e){return Array.isArray?Array.isArray(e):B(e)===`[object Array]`}function M(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function N(e){return e==null?``:M(e)}function P(e){return typeof e==`string`}function F(e){return typeof e==`number`}function je(e){return e===!0||e===!1||L(e)&&B(e)==`[object Boolean]`}function I(e){return typeof e==`object`}function L(e){return I(e)&&e!==null}function R(e){return e!=null}function z(e){return!e.trim().length}function B(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`Incorrect 'index' type`,V=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Ne=e=>`Invalid value for key ${e}`,Pe=e=>`Pattern length exceeds max of ${e}.`,H=e=>`Missing ${e} property in key`,U=e=>`Property 'weight' in key '${e}' must be a positive integer`,Fe=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,W=Object.prototype.hasOwnProperty,Ie=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=G(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function G(e){let t=null,n=null,r=null,i=1,a=null;if(P(e)||j(e))r=e,t=K(e),n=q(e);else{if(!W.call(e,`name`))throw Error(H(`name`));let o=e.name;if(r=o,W.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(U(q(o)));t=K(o),n=q(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function K(e){return j(e)?e:e.split(`.`)}function q(e){return j(e)?e.join(`.`):e}function Le(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(R(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!R(s))return;if(a===t.length-1&&(P(s)||F(s)||je(s)||typeof s==`bigint`))n.push(o===void 0?N(s):{v:N(s),i:o});else if(j(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,P(t)?t.split(`.`):t,0),r?n:n[0]}var Re={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ze={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Be={location:0,threshold:.6,distance:100},Ve={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:Le,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},J=Object.freeze({...ze,...Re,...Be,...Ve});function He(e){return e>=9&&e<=13||e===32||e===160}function Ue(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)He(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var Y=class{constructor({getFn:e=J.getFn,fieldNormWeight:t=J.fieldNormWeight}={}){this.norm=Ue(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(P(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(V);if(P(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(V);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!R(e)||z(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(R(i)){if(j(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(R(n)){if(P(n)){if(!z(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(R(n.v)){let t=P(n.v)?n.v:N(n.v);if(!z(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(P(i)&&!z(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function We(e,t,{getFn:n=J.getFn,fieldNormWeight:r=J.fieldNormWeight}={}){let i=new Y({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(G)),i.setSources(t),i.create(),i}function Ge(e,{getFn:t=J.getFn,fieldNormWeight:n=J.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new Y({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Ke(e=[],t=J.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function qe(e,t,n,{location:r=J.location,distance:i=J.distance,threshold:a=J.threshold,findAllMatches:o=J.findAllMatches,minMatchCharLength:s=J.minMatchCharLength,includeMatches:c=J.includeMatches,ignoreLocation:l=J.ignoreLocation}={}){if(t.length>32)throw Error(Pe(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,ee=0,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,ee=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+ee);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=Ke(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function Je(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function Ye(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var Xe={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},Ze=RegExp(`[`+Object.keys(Xe).join(``)+`]`,`g`),X=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(Ze,e=>Xe[e]):e=>e,Qe=class{constructor(e,{location:t=J.location,threshold:n=J.threshold,distance:r=J.distance,includeMatches:i=J.includeMatches,findAllMatches:a=J.findAllMatches,minMatchCharLength:o=J.minMatchCharLength,isCaseSensitive:s=J.isCaseSensitive,ignoreDiacritics:c=J.ignoreDiacritics,ignoreLocation:l=J.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?X(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Je(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?X(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=qe(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=Ye(u)),p}},$e=new Set([`fuzzy`,`include`]);function et(e){return e.startsWith(`inverse`)}var tt=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new Qe(e,{location:t.location??J.location,threshold:t.threshold??J.threshold,distance:t.distance??J.distance,includeMatches:t.includeMatches??J.includeMatches,findAllMatches:t.findAllMatches??J.findAllMatches,minMatchCharLength:t.minMatchCharLength??J.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??J.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??J.ignoreDiacritics,ignoreLocation:t.ignoreLocation??J.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],nt=tt.length,rt=`\0`,it=`|`;function at(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function ot(e,t){let n=e.match(t);return n?n[1]:null}function st(e,t={}){return e.replace(/\\\|/g,rt).split(it).map(e=>{let n=at(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<nt;){let e=tt[o],n=ot(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<nt;){let e=tt[o],n=ot(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var ct=class{constructor(e,{isCaseSensitive:t=J.isCaseSensitive,ignoreDiacritics:n=J.ignoreDiacritics,includeMatches:r=J.includeMatches,minMatchCharLength:i=J.minMatchCharLength,ignoreLocation:a=J.ignoreLocation,findAllMatches:o=J.findAllMatches,location:s=J.location,threshold:c=J.threshold,distance:l=J.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?X(e):e,this.pattern=e,this.query=st(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?X(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,et(r.type)&&(c=!0),n&&($e.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=Ye(o)),e}}return{isMatch:!1,score:1}}},lt=[];function ut(...e){lt.push(...e)}function Z(e,t){for(let n=0,r=lt.length;n<r;n+=1){let r=lt[n];if(r.condition(e,t))return new r(e,t)}return new Qe(e,t)}var Q={AND:`$and`,OR:`$or`},dt={PATH:`$path`,PATTERN:`$val`},ft=e=>!!(e[Q.AND]||e[Q.OR]),pt=e=>!!e[dt.PATH],mt=e=>!j(e)&&I(e)&&!ft(e),ht=e=>({[Q.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function gt(e,t,{auto:n=!0}={}){let r=e=>{if(P(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Z(e,t)),r}let i=Object.keys(e),a=pt(e);if(!a&&i.length>1&&!ft(e))return r(ht(e));if(mt(e)){let r=a?e[dt.PATH]:i[0],o=a?e[dt.PATTERN]:e[r];if(!P(o))throw Error(Ne(r));let s={keyId:q(r),pattern:o};return n&&(s.searcher=Z(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];j(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return ft(e)||(e=ht(e)),r(e)}function _t(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function vt(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){e.forEach(e=>{e.score=_t(e.matches,{ignoreFieldNorm:t})})}var yt=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function bt(e){let t=[];return e.matches.forEach(e=>{if(!R(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function xt(e,t,{includeMatches:n=J.includeMatches,includeScore:r=J.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=bt(e)),r&&(a.score=e.score),a})}var St=/[\p{L}\p{M}\p{N}_]+/gu,Ct=new WeakSet;function wt(e){Ct.has(e)||(Ct.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Tt(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||wt(e),t=>t.match(e)||[]):e=>e.match(St)||[]}function Et({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Tt(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=X(n)),r(n)}}}var Dt=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Et({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new Qe(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=Ye(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Ot(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function kt(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0)Ot(e,a,i,r);else if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)Ot(e,t.v,i,r);else Ot(e,n.v,i,r)}}}function At(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)kt(r,i,t,n);return r}function jt(e,t,n,r){kt(e,t,n,r)}function Mt(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function Nt(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)Mt(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var $=class{constructor(e,t,n){this.options={...J,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Ie(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=Z(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Y))throw Error(Me);if(this._myIndex=t||We(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Et({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=At(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!R(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Et({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});jt(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&Nt(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(V);this._invertedIndex&&Nt(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(P(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return F(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&F(n)&&n>0&&P(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new yt(n,u);P(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=P(e)?P(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),vt(d,{ignoreFieldNorm:s}),a&&d.sort(P(e)?u:l),F(n)&&n>-1&&(d=d.slice(0,n));return xt(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!R(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=_t(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=gt(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===Q.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(R(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!R(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=_t(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!R(t))return[];let r=[];if(j(t))t.forEach(({v:t,i,n:a})=>{if(!R(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};$.version=`7.5.0`,$.createIndex=We,$.parseIndex=Ge,$.config=J,$.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(Fe);return Z(e,{...J,...n}).searchIn(t)},$.parseQuery=gt,ut(ct),ut(Dt),$.use=function(...e){e.forEach(e=>ut(e))};var Pt=$;function Ft(e,t,n){let r=()=>new Pt(S(t)??[],S(n)?.fuseOptions),i=c(r());return pe(()=>S(n)?.fuseOptions,()=>{i.value=r()},{deep:!0}),pe(()=>S(t),e=>{i.value.setCollection(e),u(i)},{deep:!0}),{fuse:i,results:v(()=>{let r=S(n);if(r?.matchAllWhenSearchEmpty&&!S(e))return S(t).map((e,t)=>({item:e,refIndex:t}));let a=r?.resultLimit;return i.value.search(S(e),a?{limit:a}:void 0)})}}var It={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Lt(e){return e.replace(/[&<>"']/g,e=>It[e])}function Rt(e,t){let n=``,r=0,i=!1,a=Array.from(e);for(let e=a.length-1;e>=0;e--){let o=a[e];if(o===`>`)i=!0;else if(o===`<`){i=!1,n=o+n;continue}if(i||r++,r<=t)n=o+n;else{n=`...`+n;break}}return n}function zt(e,t,n,r,i){let a=i&&t.match(/[\p{L}\p{M}\p{N}_]+/gu)||[],o=a.length>0?Math.min(...a.map(e=>e.length)):t.length;function s(e,t=[]){e||=``;let n=``,r=0;t.forEach(t=>{if(t.length===2&&t[0]===t[1])return;let i=t[1]+1,a=i-t[0]>=o;n+=[Lt(e.substring(r,t[0])),a&&`<mark>`,Lt(e.substring(t[0],i)),a&&`</mark>`].filter(Boolean).join(``),r=i}),n+=Lt(e.substring(r));let i=n.indexOf(`<mark>`);return i!==-1&&(n=Rt(n,Array.from(n.slice(i)).length)),n}if(e.matches?.length){for(let t of e.matches)if(!(n&&t.key!==n)&&!r?.includes(t.key))return s(t.value,t.indices)}}var Bt={slots:{root:`flex flex-col min-h-0 min-w-0 divide-y divide-default`,input:``,close:``,back:`p-0`,content:`relative overflow-hidden flex flex-col`,footer:`p-1`,viewport:`relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,item:`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75`,itemLeadingIcon:`shrink-0`,itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex items-center`,itemTrailingIcon:`shrink-0`,itemTrailingHighlightedIcon:`shrink-0 text-dimmed hidden group-data-highlighted:inline-flex`,itemTrailingKbds:`hidden lg:inline-flex items-center shrink-0`,itemTrailingKbdsSize:``,itemWrapper:`flex-1 flex flex-col text-start min-w-0`,itemLabel:`truncate space-x-1 text-dimmed`,itemLabelBase:`text-highlighted [&>mark]:text-primary [&>mark]:bg-primary/15`,itemLabelPrefix:`text-default`,itemLabelSuffix:`text-dimmed [&>mark]:text-primary [&>mark]:bg-primary/15`,itemDescription:`truncate text-muted [&>mark]:text-primary [&>mark]:bg-primary/15`},variants:{virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}},size:{xs:{input:`[&>input]:h-10`,empty:`py-3 text-xs`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},sm:{input:`[&>input]:h-11`,empty:`py-4 text-xs`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},md:{input:`[&>input]:h-12`,empty:`py-6 text-sm`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},lg:{input:`[&>input]:h-13`,empty:`py-7 text-sm`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-2`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},xl:{input:`[&>input]:h-14`,empty:`py-8 text-base`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailing:`gap-2`,itemTrailingIcon:`size-6`,itemTrailingHighlightedIcon:`size-6`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`lg`}},active:{true:{item:`text-highlighted before:bg-elevated`,itemLeadingIcon:`text-default`},false:{item:[`text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`]}},loading:{true:{itemLeadingIcon:`animate-spin`}}},defaultVariants:{size:`md`}},Vt=[`innerHTML`],Ht=[`innerHTML`],Ut=[`innerHTML`],Wt=Object.assign({inheritAttrs:!1},{__name:`CommandPalette`,props:D({as:{type:null,required:!1},size:{type:null,required:!1},icon:{type:[String,Boolean],required:!1,skipCheck:!0},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1},input:{type:[Boolean,Object],required:!1,default:!0},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},preserveGroupOrder:{type:Boolean,required:!1,default:!1},searchDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},loop:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1},by:{type:[String,Function],required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:D([`update:modelValue`,`highlight`,`entryFocus`,`leave`,`update:open`],[`update:searchTerm`]),setup(c,{emit:u}){let S=c,ae=u,D=re(),O=_e(`commandPalette`,S),A=fe(c,`searchTerm`,{type:String,default:``}),{t:j}=t(),M=y(),N=te(ue(O,`as`,`disabled`,`multiple`,`modelValue`,`defaultValue`,`highlightOnHover`,`loop`,`by`),ae),P=ee(()=>O.virtualize?h(typeof O.virtualize==`boolean`?{}:O.virtualize,{estimateSize:ke(Fe.value,`md`,O.descriptionKey,!!D[`item-description`])}):!1),[F,je]=ve({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),I=v(()=>se({extend:Bt,...M.ui?.commandPalette||{}})({size:O.size,virtualize:!!O.virtualize})),L=v(()=>h({},O.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[O.labelKey,O.descriptionKey,`suffix`]},resultLimit:12,matchAllWhenSearchEmpty:!0})),R=g([]),z=v(()=>R.value[R.value.length-1]?.placeholder||O.placeholder||j(`commandPalette.placeholder`)),B=v(()=>R.value?.length?[R.value[R.value.length-1]]:O.groups),Me=v(()=>B.value?.filter(e=>e.id?!e.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(e=>e.items?.map(t=>({...t,group:e.id}))||[])||[]),V=ie(A,()=>O.searchDelay),{results:Ne}=Ft(V,Me,L),Pe=oe(Ne,16,!0);function H(e,t){let n=t;return e?.postFilter&&typeof e.postFilter==`function`&&(n=e.postFilter(V.value,n)),{...e,items:n.slice(0,L.value.resultLimit).map(e=>({...e,labelHtml:e.labelHtml??zt(e,V.value,O.labelKey,void 0,L.value.fuseOptions?.useTokenSearch),suffixHtml:e.suffixHtml??zt(e,V.value,`suffix`,[O.labelKey],L.value.fuseOptions?.useTokenSearch),descriptionHtml:e.descriptionHtml??zt(e,V.value,O.descriptionKey,[O.labelKey,`suffix`],L.value.fuseOptions?.useTokenSearch)}))}}let U=v(()=>{let e=B.value,t=Pe.value.reduce((e,t)=>{let{item:n,matches:r}=t;return n.group&&(e[n.group]||=[],e[n.group]?.push({...n,matches:r})),e},{});if(O.preserveGroupOrder){let n=[];for(let r of e||[]){if(!r.items?.length)continue;let e=r.ignoreFilter?r.items:t[r.id];if(!e?.length)continue;let i=H(r,e);i.items?.length&&n.push(i)}return n}let n=[...Object.entries(t).map(([t,n])=>{let r=e?.find(e=>e.id===t);if(!r)return;let i=H(r,n);return i.items?.length?i:void 0}).filter(e=>!!e)];for(let t of e||[]){if(!t.ignoreFilter||!t.items?.length)continue;let r=H(t,t.items);if(!r.items?.length)continue;let i=e.indexOf(t),a=new Set;for(let t=0;t<i;t++)a.add(e[t].id);let o=-1;for(let e=0;e<n.length;e++)a.has(n[e].id)&&(o=e);n.splice(o+1,0,r)}return n}),Fe=v(()=>U.value.flatMap(e=>e.items||[])),W=le(`rootRef`);pe(U,()=>{r(()=>{let e=W.value;(e?.$el)?.contains(document.activeElement)?e?.highlightFirstItem():e?.highlightSelected(void 0,!1)})});function Ie(e){e.children?.length&&(R.value.push({id:`history-${R.value.length}`,label:e.label,slot:e.slot,placeholder:e.placeholder,items:e.children}),A.value=``,W.value?.highlightFirstItem())}function G(){R.value.length&&(R.value.pop(),A.value=``,W.value?.highlightFirstItem())}function K(){A.value||G()}function q(e,t){t.children?.length?(e.preventDefault(),Ie(t)):t.onSelect?.(e)}return(t,r)=>(k(),a(w,null,[d(e(F),null,{default:E(({item:r,index:c,group:u})=>[d(de,m(e(he)(r),{custom:``}),{default:E(({active:h,...g})=>[d(e(we),{value:e(O).valueKey?e(l)(r,e(O).valueKey):e(f)(r,[`matches`,`group`,`onSelect`,`labelHtml`,`suffixHtml`,`descriptionHtml`,`children`]),disabled:r.disabled,"as-child":``,onSelect:e=>q(e,r)},{default:E(()=>[d(me,m(g,{"data-slot":`item`,class:I.value.item({class:[e(O).ui?.item,r.ui?.item,r.class],active:h||r.active})}),{default:E(()=>[s(t.$slots,r.slot||u?.slot||`item`,{item:r,index:c,ui:I.value},()=>[s(t.$slots,r.slot?`${r.slot}-leading`:u?.slot?`${u.slot}-leading`:`item-leading`,{item:r,index:c,ui:I.value},()=>[r.loading?(k(),_(T,{key:0,name:e(O).loadingIcon||e(M).ui.icons.loading,"data-slot":`itemLeadingIcon`,class:p(I.value.itemLeadingIcon({class:[e(O).ui?.itemLeadingIcon,r.ui?.itemLeadingIcon],loading:!0}))},null,8,[`name`,`class`])):r.icon?(k(),_(T,{key:1,name:r.icon,"data-slot":`itemLeadingIcon`,class:p(I.value.itemLeadingIcon({class:[e(O).ui?.itemLeadingIcon,r.ui?.itemLeadingIcon],active:h||r.active}))},null,8,[`name`,`class`])):r.avatar?(k(),_(ce,m({key:2,size:r.ui?.itemLeadingAvatarSize||e(O).ui?.itemLeadingAvatarSize||I.value.itemLeadingAvatarSize()},r.avatar,{"data-slot":`itemLeadingAvatar`,class:I.value.itemLeadingAvatar({class:[e(O).ui?.itemLeadingAvatar,r.ui?.itemLeadingAvatar],active:h||r.active})}),null,16,[`size`,`class`])):r.chip?(k(),_(ne,m({key:3,size:r.ui?.itemLeadingChipSize||e(O).ui?.itemLeadingChipSize||I.value.itemLeadingChipSize(),inset:``,standalone:``},r.chip,{"data-slot":`itemLeadingChip`,class:I.value.itemLeadingChip({class:[e(O).ui?.itemLeadingChip,r.ui?.itemLeadingChip],active:h||r.active})}),null,16,[`size`,`class`])):b(``,!0)]),r.prefix||r.labelHtml||e(l)(r,e(O).labelKey)||r.suffixHtml||r.suffix||D[r.slot?`${r.slot}-label`:u?.slot?`${u.slot}-label`:`item-label`]||e(l)(r,e(O).descriptionKey)||D[r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`]?(k(),a(`span`,{key:0,"data-slot":`itemWrapper`,class:p(I.value.itemWrapper({class:[e(O).ui?.itemWrapper,r.ui?.itemWrapper]}))},[o(`span`,{"data-slot":`itemLabel`,class:p(I.value.itemLabel({class:[e(O).ui?.itemLabel,r.ui?.itemLabel],active:h||r.active}))},[s(t.$slots,r.slot?`${r.slot}-label`:u?.slot?`${u.slot}-label`:`item-label`,{item:r,index:c,ui:I.value},()=>[r.prefix?(k(),a(`span`,{key:0,"data-slot":`itemLabelPrefix`,class:p(I.value.itemLabelPrefix({class:[e(O).ui?.itemLabelPrefix,r.ui?.itemLabelPrefix]}))},n(r.prefix),3)):b(``,!0),r.labelHtml?(k(),a(`span`,{key:1,"data-slot":`itemLabelBase`,class:p(I.value.itemLabelBase({class:[e(O).ui?.itemLabelBase,r.ui?.itemLabelBase],active:h||r.active})),innerHTML:r.labelHtml},null,10,Vt)):(k(),a(`span`,{key:2,"data-slot":`itemLabelBase`,class:p(I.value.itemLabelBase({class:[e(O).ui?.itemLabelBase,r.ui?.itemLabelBase],active:h||r.active}))},n(e(l)(r,e(O).labelKey)),3)),r.suffixHtml?(k(),a(`span`,{key:3,"data-slot":`itemLabelSuffix`,class:p(I.value.itemLabelSuffix({class:[e(O).ui?.itemLabelSuffix,r.ui?.itemLabelSuffix],active:h||r.active})),innerHTML:r.suffixHtml},null,10,Ht)):r.suffix?(k(),a(`span`,{key:4,"data-slot":`itemLabelSuffix`,class:p(I.value.itemLabelSuffix({class:[e(O).ui?.itemLabelSuffix,r.ui?.itemLabelSuffix],active:h||r.active}))},n(r.suffix),3)):b(``,!0)])],2),r.descriptionHtml?(k(),a(`span`,{key:0,"data-slot":`itemDescription`,class:p(I.value.itemDescription({class:[e(O).ui?.itemDescription,r.ui?.itemDescription]})),innerHTML:r.descriptionHtml},null,10,Ut)):e(l)(r,e(O).descriptionKey)||D[r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`]?(k(),a(`span`,{key:1,"data-slot":`itemDescription`,class:p(I.value.itemDescription({class:[e(O).ui?.itemDescription,r.ui?.itemDescription]}))},[s(t.$slots,r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`,{item:r,index:c,ui:I.value},()=>[C(n(e(l)(r,e(O).descriptionKey)),1)])],2)):b(``,!0)],2)):b(``,!0),o(`span`,{"data-slot":`itemTrailing`,class:p(I.value.itemTrailing({class:[e(O).ui?.itemTrailing,r.ui?.itemTrailing]}))},[s(t.$slots,r.slot?`${r.slot}-trailing`:u?.slot?`${u.slot}-trailing`:`item-trailing`,{item:r,index:c,ui:I.value},()=>[r.children&&r.children.length>0?(k(),_(T,{key:0,name:e(O).childrenIcon||e(M).ui.icons.chevronRight,"data-slot":`itemTrailingIcon`,class:p(I.value.itemTrailingIcon({class:[e(O).ui?.itemTrailingIcon,r.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])):r.kbds?.length?(k(),a(`span`,{key:1,"data-slot":`itemTrailingKbds`,class:p(I.value.itemTrailingKbds({class:[e(O).ui?.itemTrailingKbds,r.ui?.itemTrailingKbds]}))},[(k(!0),a(w,null,i(r.kbds,(t,n)=>(k(),_(be,m({key:n,size:r.ui?.itemTrailingKbdsSize||e(O).ui?.itemTrailingKbdsSize||I.value.itemTrailingKbdsSize()},{ref_for:!0},typeof t==`string`?{value:t}:t),null,16,[`size`]))),128))],2)):u?.highlightedIcon?(k(),_(T,{key:2,name:u.highlightedIcon,"data-slot":`itemTrailingHighlightedIcon`,class:p(I.value.itemTrailingHighlightedIcon({class:[e(O).ui?.itemTrailingHighlightedIcon,r.ui?.itemTrailingHighlightedIcon]}))},null,8,[`name`,`class`])):b(``,!0)]),r.children?.length?b(``,!0):(k(),_(e(De),{key:0,"as-child":``},{default:E(()=>[d(T,{name:e(O).selectedIcon||e(M).ui.icons.check,"data-slot":`itemTrailingIcon`,class:p(I.value.itemTrailingIcon({class:[e(O).ui?.itemTrailingIcon,r.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024))],2)])]),_:2},1040,[`class`])]),_:2},1032,[`value`,`disabled`,`onSelect`])]),_:2},1040)]),_:3}),d(e(Te),m({ref_key:`rootRef`,ref:W,"data-slot":`root`},{...e(N),...t.$attrs},{"selection-behavior":e(O).selectionBehavior,class:I.value.root({class:[e(O).ui?.root,e(O).class]})}),{default:E(()=>[e(O).input?(k(),_(e(Oe),{key:0,modelValue:A.value,"onUpdate:modelValue":r[1]||=e=>A.value=e,"as-child":``},{default:E(()=>[d(xe,m({variant:`none`,size:e(O).size,placeholder:z.value,autofocus:e(O).autofocus,loading:e(O).loading,"loading-icon":e(O).loadingIcon,"trailing-icon":e(O).trailingIcon,icon:e(O).icon===!1?void 0:e(O).icon??e(M).ui.icons.search},typeof e(O).input==`object`?e(O).input:{},{"data-slot":`input`,class:I.value.input({class:e(O).ui?.input}),onKeydown:ye(K,[`backspace`])}),x({_:2},[R.value?.length&&(e(O).back||D.back)?{name:`leading`,fn:E(()=>[s(t.$slots,`back`,{ui:I.value},()=>[d(ge,m({size:e(O).size,icon:e(O).backIcon||e(M).ui.icons.arrowLeft,color:`neutral`,variant:`link`,"aria-label":e(j)(`commandPalette.back`)},typeof e(O).back==`object`?e(O).back:{},{"data-slot":`back`,class:I.value.back({class:e(O).ui?.back}),onClick:G}),null,16,[`size`,`icon`,`aria-label`,`class`])])]),key:`0`}:void 0,e(O).close||D.close?{name:`trailing`,fn:E(()=>[s(t.$slots,`close`,{ui:I.value},()=>[e(O).close?(k(),_(ge,m({key:0,size:e(O).size,icon:e(O).closeIcon||e(M).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":e(j)(`commandPalette.close`)},typeof e(O).close==`object`?e(O).close:{},{"data-slot":`close`,class:I.value.close({class:e(O).ui?.close}),onClick:r[0]||=e=>ae(`update:open`,!1)}),null,16,[`size`,`icon`,`aria-label`,`class`])):b(``,!0)])]),key:`1`}:void 0]),1040,[`size`,`placeholder`,`autofocus`,`loading`,`loading-icon`,`trailing-icon`,`icon`,`class`])]),_:3},8,[`modelValue`])):b(``,!0),d(e(Ce),{"data-slot":`content`,"aria-label":e(j)(`commandPalette.results`),class:p(I.value.content({class:e(O).ui?.content}))},{default:E(()=>[U.value?.length?(k(),a(`div`,{key:0,role:`presentation`,"data-slot":`viewport`,class:p(I.value.viewport({class:e(O).ui?.viewport}))},[e(O).virtualize?(k(),_(e(Ee),m({key:0,options:Fe.value,"text-content":t=>e(l)(t,e(O).labelKey)},P.value),{default:E(({option:t,virtualItem:n})=>[d(e(je),{item:t,index:n.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`])):(k(!0),a(w,{key:1},i(U.value,r=>(k(),_(e(Se),{key:`group-${r.id}`,"data-slot":`group`,class:p(I.value.group({class:e(O).ui?.group}))},{default:E(()=>[e(l)(r,e(O).labelKey)||D[r.slot?`${r.slot}-group-label`:`group-label`]?(k(),_(e(Ae),{key:0,"data-slot":`label`,class:p(I.value.label({class:e(O).ui?.label}))},{default:E(()=>[s(t.$slots,r.slot?`${r.slot}-group-label`:`group-label`,{group:r,label:e(l)(r,e(O).labelKey),ui:I.value},()=>[C(n(e(l)(r,e(O).labelKey)),1)])]),_:2},1032,[`class`])):b(``,!0),(k(!0),a(w,null,i(r.items,(t,n)=>(k(),_(e(je),{key:`group-${r.id}-${n}`,item:t,index:n,group:r},null,8,[`item`,`index`,`group`]))),128))]),_:2},1032,[`class`]))),128))],2)):(k(),a(`div`,{key:1,"data-slot":`empty`,class:p(I.value.empty({class:e(O).ui?.empty}))},[s(t.$slots,`empty`,{searchTerm:A.value},()=>[C(n(A.value?e(j)(`commandPalette.noMatch`,{searchTerm:A.value}):e(j)(`commandPalette.noData`)),1)])],2))]),_:3},8,[`aria-label`,`class`]),D.footer?(k(),a(`div`,{key:1,"data-slot":`footer`,class:p(I.value.footer({class:e(O).ui?.footer}))},[s(t.$slots,`footer`,{ui:I.value})],2)):b(``,!0)]),_:3},16,[`selection-behavior`,`class`])],64))}});export{Wt as default};
1
+ import{$r as e,A as t,Ei as n,En as r,Gn as i,Gt as a,Ht as o,Kn as s,Kr as c,N as l,Qr as u,Qt as d,R as f,Si as p,Tn as m,U as h,Ur as g,Ut as _,Vt as v,W as y,Wt as b,Yr as ee,Yt as x,Zr as S,Zt as C,_ as te,a as ne,cr as re,dt as ie,en as ae,ft as oe,g as se,i as ce,jt as w,lr as le,lt as ue,n as de,o as T,or as fe,pr as pe,r as me,s as he,t as ge,v as _e,vr as E,wn as D,y as O,zn as k}from"./Button-CLo6xV_j.js";import{i as ve,z as ye}from"./Presence-CNRQpqMN.js";import{n as be,t as xe}from"./Input-ziwF3Rrc.js";import{a as Se,c as Ce,i as we,l as Te,n as Ee,o as A,r as De,s as Oe,t as ke}from"./virtualizer-T_z5T3jP.js";var Ae=ae({__name:`ListboxGroupLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(t){let n=t,r=A({id:``});return(t,i)=>(k(),_(e(O),m(n,{id:e(r).id}),{default:E(()=>[s(t.$slots,`default`)]),_:3},16,[`id`]))}});function j(e){return Array.isArray?Array.isArray(e):B(e)===`[object Array]`}function M(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function N(e){return e==null?``:M(e)}function P(e){return typeof e==`string`}function F(e){return typeof e==`number`}function je(e){return e===!0||e===!1||L(e)&&B(e)==`[object Boolean]`}function I(e){return typeof e==`object`}function L(e){return I(e)&&e!==null}function R(e){return e!=null}function z(e){return!e.trim().length}function B(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`Incorrect 'index' type`,V=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Ne=e=>`Invalid value for key ${e}`,Pe=e=>`Pattern length exceeds max of ${e}.`,H=e=>`Missing ${e} property in key`,U=e=>`Property 'weight' in key '${e}' must be a positive integer`,Fe=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,W=Object.prototype.hasOwnProperty,Ie=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=G(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function G(e){let t=null,n=null,r=null,i=1,a=null;if(P(e)||j(e))r=e,t=K(e),n=q(e);else{if(!W.call(e,`name`))throw Error(H(`name`));let o=e.name;if(r=o,W.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(U(q(o)));t=K(o),n=q(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function K(e){return j(e)?e:e.split(`.`)}function q(e){return j(e)?e.join(`.`):e}function Le(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(R(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!R(s))return;if(a===t.length-1&&(P(s)||F(s)||je(s)||typeof s==`bigint`))n.push(o===void 0?N(s):{v:N(s),i:o});else if(j(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,P(t)?t.split(`.`):t,0),r?n:n[0]}var Re={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ze={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Be={location:0,threshold:.6,distance:100},Ve={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:Le,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},J=Object.freeze({...ze,...Re,...Be,...Ve});function He(e){return e>=9&&e<=13||e===32||e===160}function Ue(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)He(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var Y=class{constructor({getFn:e=J.getFn,fieldNormWeight:t=J.fieldNormWeight}={}){this.norm=Ue(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(P(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(V);if(P(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(V);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!R(e)||z(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(R(i)){if(j(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(R(n)){if(P(n)){if(!z(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(R(n.v)){let t=P(n.v)?n.v:N(n.v);if(!z(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(P(i)&&!z(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function We(e,t,{getFn:n=J.getFn,fieldNormWeight:r=J.fieldNormWeight}={}){let i=new Y({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(G)),i.setSources(t),i.create(),i}function Ge(e,{getFn:t=J.getFn,fieldNormWeight:n=J.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new Y({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Ke(e=[],t=J.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function qe(e,t,n,{location:r=J.location,distance:i=J.distance,threshold:a=J.threshold,findAllMatches:o=J.findAllMatches,minMatchCharLength:s=J.minMatchCharLength,includeMatches:c=J.includeMatches,ignoreLocation:l=J.ignoreLocation}={}){if(t.length>32)throw Error(Pe(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,ee=0,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,ee=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+ee);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=Ke(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function Je(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function Ye(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var Xe={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},Ze=RegExp(`[`+Object.keys(Xe).join(``)+`]`,`g`),X=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(Ze,e=>Xe[e]):e=>e,Qe=class{constructor(e,{location:t=J.location,threshold:n=J.threshold,distance:r=J.distance,includeMatches:i=J.includeMatches,findAllMatches:a=J.findAllMatches,minMatchCharLength:o=J.minMatchCharLength,isCaseSensitive:s=J.isCaseSensitive,ignoreDiacritics:c=J.ignoreDiacritics,ignoreLocation:l=J.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?X(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Je(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?X(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=qe(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=Ye(u)),p}},$e=new Set([`fuzzy`,`include`]);function et(e){return e.startsWith(`inverse`)}var tt=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new Qe(e,{location:t.location??J.location,threshold:t.threshold??J.threshold,distance:t.distance??J.distance,includeMatches:t.includeMatches??J.includeMatches,findAllMatches:t.findAllMatches??J.findAllMatches,minMatchCharLength:t.minMatchCharLength??J.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??J.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??J.ignoreDiacritics,ignoreLocation:t.ignoreLocation??J.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],nt=tt.length,rt=`\0`,it=`|`;function at(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function ot(e,t){let n=e.match(t);return n?n[1]:null}function st(e,t={}){return e.replace(/\\\|/g,rt).split(it).map(e=>{let n=at(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<nt;){let e=tt[o],n=ot(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<nt;){let e=tt[o],n=ot(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var ct=class{constructor(e,{isCaseSensitive:t=J.isCaseSensitive,ignoreDiacritics:n=J.ignoreDiacritics,includeMatches:r=J.includeMatches,minMatchCharLength:i=J.minMatchCharLength,ignoreLocation:a=J.ignoreLocation,findAllMatches:o=J.findAllMatches,location:s=J.location,threshold:c=J.threshold,distance:l=J.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?X(e):e,this.pattern=e,this.query=st(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?X(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,et(r.type)&&(c=!0),n&&($e.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=Ye(o)),e}}return{isMatch:!1,score:1}}},lt=[];function ut(...e){lt.push(...e)}function Z(e,t){for(let n=0,r=lt.length;n<r;n+=1){let r=lt[n];if(r.condition(e,t))return new r(e,t)}return new Qe(e,t)}var Q={AND:`$and`,OR:`$or`},dt={PATH:`$path`,PATTERN:`$val`},ft=e=>!!(e[Q.AND]||e[Q.OR]),pt=e=>!!e[dt.PATH],mt=e=>!j(e)&&I(e)&&!ft(e),ht=e=>({[Q.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function gt(e,t,{auto:n=!0}={}){let r=e=>{if(P(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Z(e,t)),r}let i=Object.keys(e),a=pt(e);if(!a&&i.length>1&&!ft(e))return r(ht(e));if(mt(e)){let r=a?e[dt.PATH]:i[0],o=a?e[dt.PATTERN]:e[r];if(!P(o))throw Error(Ne(r));let s={keyId:q(r),pattern:o};return n&&(s.searcher=Z(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];j(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return ft(e)||(e=ht(e)),r(e)}function _t(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function vt(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){e.forEach(e=>{e.score=_t(e.matches,{ignoreFieldNorm:t})})}var yt=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function bt(e){let t=[];return e.matches.forEach(e=>{if(!R(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function xt(e,t,{includeMatches:n=J.includeMatches,includeScore:r=J.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=bt(e)),r&&(a.score=e.score),a})}var St=/[\p{L}\p{M}\p{N}_]+/gu,Ct=new WeakSet;function wt(e){Ct.has(e)||(Ct.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Tt(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||wt(e),t=>t.match(e)||[]):e=>e.match(St)||[]}function Et({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Tt(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=X(n)),r(n)}}}var Dt=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Et({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new Qe(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=Ye(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Ot(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function kt(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0)Ot(e,a,i,r);else if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)Ot(e,t.v,i,r);else Ot(e,n.v,i,r)}}}function At(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)kt(r,i,t,n);return r}function jt(e,t,n,r){kt(e,t,n,r)}function Mt(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function Nt(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)Mt(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var $=class{constructor(e,t,n){this.options={...J,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Ie(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=Z(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Y))throw Error(Me);if(this._myIndex=t||We(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Et({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=At(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!R(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Et({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});jt(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&Nt(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(V);this._invertedIndex&&Nt(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(P(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return F(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&F(n)&&n>0&&P(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new yt(n,u);P(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=P(e)?P(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),vt(d,{ignoreFieldNorm:s}),a&&d.sort(P(e)?u:l),F(n)&&n>-1&&(d=d.slice(0,n));return xt(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!R(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=_t(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=gt(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===Q.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(R(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!R(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=_t(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!R(t))return[];let r=[];if(j(t))t.forEach(({v:t,i,n:a})=>{if(!R(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};$.version=`7.5.0`,$.createIndex=We,$.parseIndex=Ge,$.config=J,$.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(Fe);return Z(e,{...J,...n}).searchIn(t)},$.parseQuery=gt,ut(ct),ut(Dt),$.use=function(...e){e.forEach(e=>ut(e))};var Pt=$;function Ft(e,t,n){let r=()=>new Pt(S(t)??[],S(n)?.fuseOptions),i=c(r());return pe(()=>S(n)?.fuseOptions,()=>{i.value=r()},{deep:!0}),pe(()=>S(t),e=>{i.value.setCollection(e),u(i)},{deep:!0}),{fuse:i,results:v(()=>{let r=S(n);if(r?.matchAllWhenSearchEmpty&&!S(e))return S(t).map((e,t)=>({item:e,refIndex:t}));let a=r?.resultLimit;return i.value.search(S(e),a?{limit:a}:void 0)})}}var It={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Lt(e){return e.replace(/[&<>"']/g,e=>It[e])}function Rt(e,t){let n=``,r=0,i=!1,a=Array.from(e);for(let e=a.length-1;e>=0;e--){let o=a[e];if(o===`>`)i=!0;else if(o===`<`){i=!1,n=o+n;continue}if(i||r++,r<=t)n=o+n;else{n=`...`+n;break}}return n}function zt(e,t,n,r,i){let a=i&&t.match(/[\p{L}\p{M}\p{N}_]+/gu)||[],o=a.length>0?Math.min(...a.map(e=>e.length)):t.length;function s(e,t=[]){e||=``;let n=``,r=0;t.forEach(t=>{if(t.length===2&&t[0]===t[1])return;let i=t[1]+1,a=i-t[0]>=o;n+=[Lt(e.substring(r,t[0])),a&&`<mark>`,Lt(e.substring(t[0],i)),a&&`</mark>`].filter(Boolean).join(``),r=i}),n+=Lt(e.substring(r));let i=n.indexOf(`<mark>`);return i!==-1&&(n=Rt(n,Array.from(n.slice(i)).length)),n}if(e.matches?.length){for(let t of e.matches)if(!(n&&t.key!==n)&&!r?.includes(t.key))return s(t.value,t.indices)}}var Bt={slots:{root:`flex flex-col min-h-0 min-w-0 divide-y divide-default`,input:``,close:``,back:`p-0`,content:`relative overflow-hidden flex flex-col`,footer:`p-1`,viewport:`relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,item:`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75`,itemLeadingIcon:`shrink-0`,itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex items-center`,itemTrailingIcon:`shrink-0`,itemTrailingHighlightedIcon:`shrink-0 text-dimmed hidden group-data-highlighted:inline-flex`,itemTrailingKbds:`hidden lg:inline-flex items-center shrink-0`,itemTrailingKbdsSize:``,itemWrapper:`flex-1 flex flex-col text-start min-w-0`,itemLabel:`truncate space-x-1 text-dimmed`,itemLabelBase:`text-highlighted [&>mark]:text-primary [&>mark]:bg-primary/15`,itemLabelPrefix:`text-default`,itemLabelSuffix:`text-dimmed [&>mark]:text-primary [&>mark]:bg-primary/15`,itemDescription:`truncate text-muted [&>mark]:text-primary [&>mark]:bg-primary/15`},variants:{virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}},size:{xs:{input:`[&>input]:h-10`,empty:`py-3 text-xs`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},sm:{input:`[&>input]:h-11`,empty:`py-4 text-xs`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},md:{input:`[&>input]:h-12`,empty:`py-6 text-sm`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},lg:{input:`[&>input]:h-13`,empty:`py-7 text-sm`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-2`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},xl:{input:`[&>input]:h-14`,empty:`py-8 text-base`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailing:`gap-2`,itemTrailingIcon:`size-6`,itemTrailingHighlightedIcon:`size-6`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`lg`}},active:{true:{item:`text-highlighted before:bg-elevated`,itemLeadingIcon:`text-default`},false:{item:[`text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`]}},loading:{true:{itemLeadingIcon:`animate-spin`}}},defaultVariants:{size:`md`}},Vt=[`innerHTML`],Ht=[`innerHTML`],Ut=[`innerHTML`],Wt=Object.assign({inheritAttrs:!1},{__name:`CommandPalette`,props:D({as:{type:null,required:!1},size:{type:null,required:!1},icon:{type:[String,Boolean],required:!1,skipCheck:!0},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1},input:{type:[Boolean,Object],required:!1,default:!0},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},preserveGroupOrder:{type:Boolean,required:!1,default:!1},searchDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},loop:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1},by:{type:[String,Function],required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:D([`update:modelValue`,`highlight`,`entryFocus`,`leave`,`update:open`],[`update:searchTerm`]),setup(c,{emit:u}){let S=c,ae=u,D=re(),O=_e(`commandPalette`,S),A=fe(c,`searchTerm`,{type:String,default:``}),{t:j}=t(),M=y(),N=te(ue(O,`as`,`disabled`,`multiple`,`modelValue`,`defaultValue`,`highlightOnHover`,`loop`,`by`),ae),P=ee(()=>O.virtualize?h(typeof O.virtualize==`boolean`?{}:O.virtualize,{estimateSize:ke(Fe.value,`md`,O.descriptionKey,!!D[`item-description`])}):!1),[F,je]=ve({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),I=v(()=>se({extend:Bt,...M.ui?.commandPalette||{}})({size:O.size,virtualize:!!O.virtualize})),L=v(()=>h({},O.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[O.labelKey,O.descriptionKey,`suffix`]},resultLimit:12,matchAllWhenSearchEmpty:!0})),R=g([]),z=v(()=>R.value[R.value.length-1]?.placeholder||O.placeholder||j(`commandPalette.placeholder`)),B=v(()=>R.value?.length?[R.value[R.value.length-1]]:O.groups),Me=v(()=>B.value?.filter(e=>e.id?!e.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(e=>e.items?.map(t=>({...t,group:e.id}))||[])||[]),V=ie(A,()=>O.searchDelay),{results:Ne}=Ft(V,Me,L),Pe=oe(Ne,16,!0);function H(e,t){let n=t;return e?.postFilter&&typeof e.postFilter==`function`&&(n=e.postFilter(V.value,n)),{...e,items:n.slice(0,L.value.resultLimit).map(e=>({...e,labelHtml:e.labelHtml??zt(e,V.value,O.labelKey,void 0,L.value.fuseOptions?.useTokenSearch),suffixHtml:e.suffixHtml??zt(e,V.value,`suffix`,[O.labelKey],L.value.fuseOptions?.useTokenSearch),descriptionHtml:e.descriptionHtml??zt(e,V.value,O.descriptionKey,[O.labelKey,`suffix`],L.value.fuseOptions?.useTokenSearch)}))}}let U=v(()=>{let e=B.value,t=Pe.value.reduce((e,t)=>{let{item:n,matches:r}=t;return n.group&&(e[n.group]||=[],e[n.group]?.push({...n,matches:r})),e},{});if(O.preserveGroupOrder){let n=[];for(let r of e||[]){if(!r.items?.length)continue;let e=r.ignoreFilter?r.items:t[r.id];if(!e?.length)continue;let i=H(r,e);i.items?.length&&n.push(i)}return n}let n=[...Object.entries(t).map(([t,n])=>{let r=e?.find(e=>e.id===t);if(!r)return;let i=H(r,n);return i.items?.length?i:void 0}).filter(e=>!!e)];for(let t of e||[]){if(!t.ignoreFilter||!t.items?.length)continue;let r=H(t,t.items);if(!r.items?.length)continue;let i=e.indexOf(t),a=new Set;for(let t=0;t<i;t++)a.add(e[t].id);let o=-1;for(let e=0;e<n.length;e++)a.has(n[e].id)&&(o=e);n.splice(o+1,0,r)}return n}),Fe=v(()=>U.value.flatMap(e=>e.items||[])),W=le(`rootRef`);pe(U,()=>{r(()=>{let e=W.value;(e?.$el)?.contains(document.activeElement)?e?.highlightFirstItem():e?.highlightSelected(void 0,!1)})});function Ie(e){e.children?.length&&(R.value.push({id:`history-${R.value.length}`,label:e.label,slot:e.slot,placeholder:e.placeholder,items:e.children}),A.value=``,W.value?.highlightFirstItem())}function G(){R.value.length&&(R.value.pop(),A.value=``,W.value?.highlightFirstItem())}function K(){A.value||G()}function q(e,t){t.children?.length?(e.preventDefault(),Ie(t)):t.onSelect?.(e)}return(t,r)=>(k(),a(w,null,[d(e(F),null,{default:E(({item:r,index:c,group:u})=>[d(de,m(e(he)(r),{custom:``}),{default:E(({active:h,...g})=>[d(e(we),{value:e(O).valueKey?e(l)(r,e(O).valueKey):e(f)(r,[`matches`,`group`,`onSelect`,`labelHtml`,`suffixHtml`,`descriptionHtml`,`children`]),disabled:r.disabled,"as-child":``,onSelect:e=>q(e,r)},{default:E(()=>[d(me,m(g,{"data-slot":`item`,class:I.value.item({class:[e(O).ui?.item,r.ui?.item,r.class],active:h||r.active})}),{default:E(()=>[s(t.$slots,r.slot||u?.slot||`item`,{item:r,index:c,ui:I.value},()=>[s(t.$slots,r.slot?`${r.slot}-leading`:u?.slot?`${u.slot}-leading`:`item-leading`,{item:r,index:c,ui:I.value},()=>[r.loading?(k(),_(T,{key:0,name:e(O).loadingIcon||e(M).ui.icons.loading,"data-slot":`itemLeadingIcon`,class:p(I.value.itemLeadingIcon({class:[e(O).ui?.itemLeadingIcon,r.ui?.itemLeadingIcon],loading:!0}))},null,8,[`name`,`class`])):r.icon?(k(),_(T,{key:1,name:r.icon,"data-slot":`itemLeadingIcon`,class:p(I.value.itemLeadingIcon({class:[e(O).ui?.itemLeadingIcon,r.ui?.itemLeadingIcon],active:h||r.active}))},null,8,[`name`,`class`])):r.avatar?(k(),_(ce,m({key:2,size:r.ui?.itemLeadingAvatarSize||e(O).ui?.itemLeadingAvatarSize||I.value.itemLeadingAvatarSize()},r.avatar,{"data-slot":`itemLeadingAvatar`,class:I.value.itemLeadingAvatar({class:[e(O).ui?.itemLeadingAvatar,r.ui?.itemLeadingAvatar],active:h||r.active})}),null,16,[`size`,`class`])):r.chip?(k(),_(ne,m({key:3,size:r.ui?.itemLeadingChipSize||e(O).ui?.itemLeadingChipSize||I.value.itemLeadingChipSize(),inset:``,standalone:``},r.chip,{"data-slot":`itemLeadingChip`,class:I.value.itemLeadingChip({class:[e(O).ui?.itemLeadingChip,r.ui?.itemLeadingChip],active:h||r.active})}),null,16,[`size`,`class`])):b(``,!0)]),r.prefix||r.labelHtml||e(l)(r,e(O).labelKey)||r.suffixHtml||r.suffix||D[r.slot?`${r.slot}-label`:u?.slot?`${u.slot}-label`:`item-label`]||e(l)(r,e(O).descriptionKey)||D[r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`]?(k(),a(`span`,{key:0,"data-slot":`itemWrapper`,class:p(I.value.itemWrapper({class:[e(O).ui?.itemWrapper,r.ui?.itemWrapper]}))},[o(`span`,{"data-slot":`itemLabel`,class:p(I.value.itemLabel({class:[e(O).ui?.itemLabel,r.ui?.itemLabel],active:h||r.active}))},[s(t.$slots,r.slot?`${r.slot}-label`:u?.slot?`${u.slot}-label`:`item-label`,{item:r,index:c,ui:I.value},()=>[r.prefix?(k(),a(`span`,{key:0,"data-slot":`itemLabelPrefix`,class:p(I.value.itemLabelPrefix({class:[e(O).ui?.itemLabelPrefix,r.ui?.itemLabelPrefix]}))},n(r.prefix),3)):b(``,!0),r.labelHtml?(k(),a(`span`,{key:1,"data-slot":`itemLabelBase`,class:p(I.value.itemLabelBase({class:[e(O).ui?.itemLabelBase,r.ui?.itemLabelBase],active:h||r.active})),innerHTML:r.labelHtml},null,10,Vt)):(k(),a(`span`,{key:2,"data-slot":`itemLabelBase`,class:p(I.value.itemLabelBase({class:[e(O).ui?.itemLabelBase,r.ui?.itemLabelBase],active:h||r.active}))},n(e(l)(r,e(O).labelKey)),3)),r.suffixHtml?(k(),a(`span`,{key:3,"data-slot":`itemLabelSuffix`,class:p(I.value.itemLabelSuffix({class:[e(O).ui?.itemLabelSuffix,r.ui?.itemLabelSuffix],active:h||r.active})),innerHTML:r.suffixHtml},null,10,Ht)):r.suffix?(k(),a(`span`,{key:4,"data-slot":`itemLabelSuffix`,class:p(I.value.itemLabelSuffix({class:[e(O).ui?.itemLabelSuffix,r.ui?.itemLabelSuffix],active:h||r.active}))},n(r.suffix),3)):b(``,!0)])],2),r.descriptionHtml?(k(),a(`span`,{key:0,"data-slot":`itemDescription`,class:p(I.value.itemDescription({class:[e(O).ui?.itemDescription,r.ui?.itemDescription]})),innerHTML:r.descriptionHtml},null,10,Ut)):e(l)(r,e(O).descriptionKey)||D[r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`]?(k(),a(`span`,{key:1,"data-slot":`itemDescription`,class:p(I.value.itemDescription({class:[e(O).ui?.itemDescription,r.ui?.itemDescription]}))},[s(t.$slots,r.slot?`${r.slot}-description`:u?.slot?`${u.slot}-description`:`item-description`,{item:r,index:c,ui:I.value},()=>[C(n(e(l)(r,e(O).descriptionKey)),1)])],2)):b(``,!0)],2)):b(``,!0),o(`span`,{"data-slot":`itemTrailing`,class:p(I.value.itemTrailing({class:[e(O).ui?.itemTrailing,r.ui?.itemTrailing]}))},[s(t.$slots,r.slot?`${r.slot}-trailing`:u?.slot?`${u.slot}-trailing`:`item-trailing`,{item:r,index:c,ui:I.value},()=>[r.children&&r.children.length>0?(k(),_(T,{key:0,name:e(O).childrenIcon||e(M).ui.icons.chevronRight,"data-slot":`itemTrailingIcon`,class:p(I.value.itemTrailingIcon({class:[e(O).ui?.itemTrailingIcon,r.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])):r.kbds?.length?(k(),a(`span`,{key:1,"data-slot":`itemTrailingKbds`,class:p(I.value.itemTrailingKbds({class:[e(O).ui?.itemTrailingKbds,r.ui?.itemTrailingKbds]}))},[(k(!0),a(w,null,i(r.kbds,(t,n)=>(k(),_(be,m({key:n,size:r.ui?.itemTrailingKbdsSize||e(O).ui?.itemTrailingKbdsSize||I.value.itemTrailingKbdsSize()},{ref_for:!0},typeof t==`string`?{value:t}:t),null,16,[`size`]))),128))],2)):u?.highlightedIcon?(k(),_(T,{key:2,name:u.highlightedIcon,"data-slot":`itemTrailingHighlightedIcon`,class:p(I.value.itemTrailingHighlightedIcon({class:[e(O).ui?.itemTrailingHighlightedIcon,r.ui?.itemTrailingHighlightedIcon]}))},null,8,[`name`,`class`])):b(``,!0)]),r.children?.length?b(``,!0):(k(),_(e(De),{key:0,"as-child":``},{default:E(()=>[d(T,{name:e(O).selectedIcon||e(M).ui.icons.check,"data-slot":`itemTrailingIcon`,class:p(I.value.itemTrailingIcon({class:[e(O).ui?.itemTrailingIcon,r.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024))],2)])]),_:2},1040,[`class`])]),_:2},1032,[`value`,`disabled`,`onSelect`])]),_:2},1040)]),_:3}),d(e(Te),m({ref_key:`rootRef`,ref:W,"data-slot":`root`},{...e(N),...t.$attrs},{"selection-behavior":e(O).selectionBehavior,class:I.value.root({class:[e(O).ui?.root,e(O).class]})}),{default:E(()=>[e(O).input?(k(),_(e(Oe),{key:0,modelValue:A.value,"onUpdate:modelValue":r[1]||=e=>A.value=e,"as-child":``},{default:E(()=>[d(xe,m({variant:`none`,size:e(O).size,placeholder:z.value,autofocus:e(O).autofocus,loading:e(O).loading,"loading-icon":e(O).loadingIcon,"trailing-icon":e(O).trailingIcon,icon:e(O).icon===!1?void 0:e(O).icon??e(M).ui.icons.search},typeof e(O).input==`object`?e(O).input:{},{"data-slot":`input`,class:I.value.input({class:e(O).ui?.input}),onKeydown:ye(K,[`backspace`])}),x({_:2},[R.value?.length&&(e(O).back||D.back)?{name:`leading`,fn:E(()=>[s(t.$slots,`back`,{ui:I.value},()=>[d(ge,m({size:e(O).size,icon:e(O).backIcon||e(M).ui.icons.arrowLeft,color:`neutral`,variant:`link`,"aria-label":e(j)(`commandPalette.back`)},typeof e(O).back==`object`?e(O).back:{},{"data-slot":`back`,class:I.value.back({class:e(O).ui?.back}),onClick:G}),null,16,[`size`,`icon`,`aria-label`,`class`])])]),key:`0`}:void 0,e(O).close||D.close?{name:`trailing`,fn:E(()=>[s(t.$slots,`close`,{ui:I.value},()=>[e(O).close?(k(),_(ge,m({key:0,size:e(O).size,icon:e(O).closeIcon||e(M).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":e(j)(`commandPalette.close`)},typeof e(O).close==`object`?e(O).close:{},{"data-slot":`close`,class:I.value.close({class:e(O).ui?.close}),onClick:r[0]||=e=>ae(`update:open`,!1)}),null,16,[`size`,`icon`,`aria-label`,`class`])):b(``,!0)])]),key:`1`}:void 0]),1040,[`size`,`placeholder`,`autofocus`,`loading`,`loading-icon`,`trailing-icon`,`icon`,`class`])]),_:3},8,[`modelValue`])):b(``,!0),d(e(Ce),{"data-slot":`content`,"aria-label":e(j)(`commandPalette.results`),class:p(I.value.content({class:e(O).ui?.content}))},{default:E(()=>[U.value?.length?(k(),a(`div`,{key:0,role:`presentation`,"data-slot":`viewport`,class:p(I.value.viewport({class:e(O).ui?.viewport}))},[e(O).virtualize?(k(),_(e(Ee),m({key:0,options:Fe.value,"text-content":t=>e(l)(t,e(O).labelKey)},P.value),{default:E(({option:t,virtualItem:n})=>[d(e(je),{item:t,index:n.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`])):(k(!0),a(w,{key:1},i(U.value,r=>(k(),_(e(Se),{key:`group-${r.id}`,"data-slot":`group`,class:p(I.value.group({class:e(O).ui?.group}))},{default:E(()=>[e(l)(r,e(O).labelKey)||D[r.slot?`${r.slot}-group-label`:`group-label`]?(k(),_(e(Ae),{key:0,"data-slot":`label`,class:p(I.value.label({class:e(O).ui?.label}))},{default:E(()=>[s(t.$slots,r.slot?`${r.slot}-group-label`:`group-label`,{group:r,label:e(l)(r,e(O).labelKey),ui:I.value},()=>[C(n(e(l)(r,e(O).labelKey)),1)])]),_:2},1032,[`class`])):b(``,!0),(k(!0),a(w,null,i(r.items,(t,n)=>(k(),_(e(je),{key:`group-${r.id}-${n}`,item:t,index:n,group:r},null,8,[`item`,`index`,`group`]))),128))]),_:2},1032,[`class`]))),128))],2)):(k(),a(`div`,{key:1,"data-slot":`empty`,class:p(I.value.empty({class:e(O).ui?.empty}))},[s(t.$slots,`empty`,{searchTerm:A.value},()=>[C(n(A.value?e(j)(`commandPalette.noMatch`,{searchTerm:A.value}):e(j)(`commandPalette.noData`)),1)])],2))]),_:3},8,[`aria-label`,`class`]),D.footer?(k(),a(`div`,{key:1,"data-slot":`footer`,class:p(I.value.footer({class:e(O).ui?.footer}))},[s(t.$slots,`footer`,{ui:I.value})],2)):b(``,!0)]),_:3},16,[`selection-behavior`,`class`])],64))}});export{Wt as default};