1import { o as l, c, a, G as O, y as k, i as p, f as g, e as n, u as o, C as P, t as i, d as A, b as x, T as D, F as N, r as T, N as z, Z as L, a7 as G, S as K, g as w, J as M } from "./app-BQglH-tG.js"; 2import { M as S } from "./LiveChat-Cv9P2dP9.js"; 3import { u as U } from "./LoaderIcon-BOkmnW5w.js"; 4import { a as Z } from "./MinusIcon-CxLG0C3a.js"; 5import { r as q } from "./UserAvatar-Boyff1w9.js"; 6import { a as H } from "./index-B6o3v9Fz.js"; 7import { G as I, j as J, y as R } from "./popover-Blq397Xu.js"; 8function Q(h, v) { 9 return l(), c("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true", "data-slot": "icon" }, [a("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32
90 0 1 12 3Z" })]); 10} 11const W = { class: "inline-flex h-full" }, X = { class: "sr-only" }, Y = { key: 0, class: "ml-2 flex items-center" }, ee = { class: "inline-flex items-center rounded-full bg-primary-600 px-1.5 py-0.5 text-xs font-medium text-white" }, te = { key: 0, class: "relative -ml-px block" }, re = { class: "sr-only" }, se = { class: "p-4" }, oe = ["for"], ue = { __name: "FilterDropdown", props: { inputs: { type: Array, required: true } }, emits: ["filtersChanged"], setup(h, { emit: v }) { 12 const u = h, b = v, { trigger: C, popper: F } = U({ placement: "bottom-end", strategy: "absolute" }); 13 let s = u.inputs.reduce((e, t) => { 14 if (t.type === "switch") e[t.key] = route().params[t.key] === "1"; 15 else if (t.type === "range") { 16 const r = route().params[t.key]; 17 e[t.key] = { from: r ? r.from : null, to: r ? r.to : null }; 18 } else e[t.key] = route().params[t.key] || null; 19 return e; 20 }, {}); 21 const d = O(Object.keys(s).filter((e) => { 22 const t = s[e]; 23 return typeof t == "boolean" ? t : t !== null && typeof t == "object" && k.isEmpty(t.from) && k.isEmpty(t.to) ? false : !_.isEmpty(t); 24 }).length), m = () => { 25 M(() => { 26 d.value = Object.keys(s).filter((e) => s[e]).length, b("filtersChanged", s); 27 }); 28 }, V = () => { 29 d.value = 0, s = u.inputs.reduce((e, t) => (t.type === "range" ? e[t.key] = { from: null, to: null } : e[t.key] = null, e), {}), b("filtersChanged", s); 30 }, $ = H(() => m(), 500), f = w(() => d.value > 0), j = w(() => u.inputs.filter((e) => Object.prototype.hasOwnProperty.call(e, "visible") ? e.visible : true)), B = (e) => { 31 switch (e.type) { 32 case "single": 33 case "multiple": 34 case "tags": 35 return { id: e.key, options: e.options, mode: e.type, classes: S, searchable: true, ...typeof e.o
35ptions == "function" && { filterResults: false, resolveOnLoad: true, delay: 300 } }; 36 default: 37 return { id: e.key, type: e.type, placeholder: e.placeholder, options: e.options }; 38 } 39 }, E = (e) => e.type === "switch" ? { click: () => { 40 s[e.key] = !s[e.key], m(); 41 } } : {}; 42 return (e, t) => (l(), p(o(R), { class: "relative" }, { default: g(() => [a("div", W, [n(o(I), { ref_key: "popoverButton", ref: C, as: "button", class: P(["relative -ml-px inline-flex items-center border border-gray-300 bg-white px-3 py-1.5 text-sm font-medium text-gray-600 hover:bg-gray-50 focus:z-10 focus-visible:outline-none", f.value ? "rounded-md rounded-r-none" : "rounded-md"]) }, { default: g(() => [a("span", X, i(e.$t("Table filters")), 1), n(o(Q), { class: "-ml-1 mr-2 h-4 w-4 flex-shrink-0" }), A(" " + i(e.$t("Filters")) + " ", 1), f.value ? (l(), c("div", Y, [a("span", ee, i(d.value), 1)])) : x("", true), n(o(Z), { class: "-mr-1 ml-2 h-4 w-4 flex-shrink-0" })]), _: 1 }, 8, ["class"]), f.value ? (l(), c("div", te, [a("button", { type: "button", class: "relative inline-flex h-full items-center rounded-r-md bg-gray-100 px-3 py-2.5 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10", onClick: t[0] || (t[0] = (r) => V()) }, [a("span", re, i(e.$t("Clear filters")), 1), n(o(q), { class: "h-4 w-4 flex-shrink-0 text-gray-600" })])])) : x("", true)]), (l(), p(D, { to: "body" }, [n(o(J), { ref_key: "popoverPanel", ref: F, class: "right-0 z-50 w-64 rounded border bg-white shadow-lg" }, { default: g(() => [a("div", se, [(l(true), c(N, null, T(j.value, (r) => (l(), c("div", { key: r.key, class: "w-100 mb-3" }, [a("label", { for: r.label, class: "mb-1 block text-sm font-medium text-gray-700" }, i(r.label), 9, oe), (l(), p(z(r.component), L({ ref_for: true }, B(r), { modelValue: o(s)[r.key], "onUpdate:modelValue": (y) => o(s)[r.key] = y, class: "block border-gray-300 focus:border-primary-500 focus:ring-primary-500 sm:text-sm", autocomplete: "off" }, G(E(r)), { onKeydown: [t[1] || (t[1] = K((y) => m(), ["enter"])), (y) => r.type !== "tags" && o($)()], onChange: m }), null, 16, ["modelValue", "onUpdate:modelValue", "onKeydown"]))]))), 128))])]), _: 1 }, 512)]))]), _: 1 })); 43} }; 44export { 45 ue as _, 46 Q as r 47};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.