import { createElement as e, forwardRef as t, useEffect as n, useState as r } from "react";
const i = Object.freeze({
	left: 0,
	top: 0,
	width: 16,
	height: 16
}), a = Object.freeze({
	rotate: 0,
	vFlip: !1,
	hFlip: !1
}), o = Object.freeze({
	...i,
	...a
}), s = Object.freeze({
	...o,
	body: "",
	hidden: !1
});
function c(e, t) {
	let n = {};
	!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
	let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
	return r && (n.rotate = r), n;
}
function l(e, t) {
	let n = c(e, t);
	for (let r in s) r in a ? r in e && !(r in n) && (n[r] = a[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
	return n;
}
function u(e, t) {
	let n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
	function a(e) {
		if (n[e]) return i[e] = [];
		if (!(e in i)) {
			i[e] = null;
			let t = r[e] && r[e].parent, n = t && a(t);
			n && (i[e] = [t].concat(n));
		}
		return i[e];
	}
	return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
}
function d(e, t, n) {
	let r = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), a = {};
	function o(e) {
		a = l(r[e] || i[e], a);
	}
	return o(t), n.forEach(o), l(e, a);
}
function f(e, t) {
	let n = [];
	if (typeof e != "object" || typeof e.icons != "object") return n;
	e.not_found instanceof Array && e.not_found.forEach((e) => {
		t(e, null), n.push(e);
	});
	let r = u(e);
	for (let i in r) {
		let a = r[i];
		a && (t(i, d(e, i, a)), n.push(i));
	}
	return n;
}
const p = {
	provider: "",
	aliases: {},
	not_found: {},
	...i
};
function m(e, t) {
	for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
	return !0;
}
function h(e) {
	if (typeof e != "object" || !e) return null;
	let t = e;
	if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !m(e, p)) return null;
	let n = t.icons;
	for (let e in n) {
		let t = n[e];
		if (!e || typeof t.body != "string" || !m(t, s)) return null;
	}
	let r = t.aliases || /* @__PURE__ */ Object.create(null);
	for (let e in r) {
		let t = r[e], i = t.parent;
		if (!e || typeof i != "string" || !n[i] && !r[i] || !m(t, s)) return null;
	}
	return t;
}
const g = /^[a-z0-9]+(-[a-z0-9]+)*$/, _ = (e, t, n, r = "") => {
	let i = e.split(":");
	if (e.slice(0, 1) === "@") {
		if (i.length < 2 || i.length > 3) return null;
		r = i.shift().slice(1);
	}
	if (i.length > 3 || !i.length) return null;
	if (i.length > 1) {
		let e = i.pop(), n = i.pop(), a = {
			provider: i.length > 0 ? i[0] : r,
			prefix: n,
			name: e
		};
		return t && !v(a) ? null : a;
	}
	let a = i[0], o = a.split("-");
	if (o.length > 1) {
		let e = {
			provider: r,
			prefix: o.shift(),
			name: o.join("-")
		};
		return t && !v(e) ? null : e;
	}
	if (n && r === "") {
		let e = {
			provider: r,
			prefix: "",
			name: a
		};
		return t && !v(e, n) ? null : e;
	}
	return null;
}, v = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1, y = /* @__PURE__ */ Object.create(null);
function b(e, t) {
	return {
		provider: e,
		prefix: t,
		icons: /* @__PURE__ */ Object.create(null),
		missing: /* @__PURE__ */ new Set()
	};
}
function x(e, t) {
	let n = y[e] || (y[e] = /* @__PURE__ */ Object.create(null));
	return n[t] || (n[t] = b(e, t));
}
function S(e, t) {
	return h(t) ? f(t, (t, n) => {
		n ? e.icons[t] = n : e.missing.add(t);
	}) : [];
}
function C(e, t, n) {
	try {
		if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
	} catch {}
	return !1;
}
let w = !1;
function T(e) {
	return typeof e == "boolean" && (w = e), w;
}
function E(e) {
	let t = typeof e == "string" ? _(e, !0, w) : e;
	if (t) {
		let e = x(t.provider, t.prefix), n = t.name;
		return e.icons[n] || (e.missing.has(n) ? null : void 0);
	}
}
function ee(e, t) {
	let n = _(e, !0, w);
	if (!n) return !1;
	let r = x(n.provider, n.prefix);
	return t ? C(r, n.name, t) : (r.missing.add(n.name), !0);
}
function te(e, t) {
	if (typeof e != "object") return !1;
	if (typeof t != "string" && (t = e.provider || ""), w && !t && !e.prefix) {
		let t = !1;
		return h(e) && (e.prefix = "", f(e, (e, n) => {
			ee(e, n) && (t = !0);
		})), t;
	}
	let n = e.prefix;
	if (!v({
		prefix: n,
		name: "a"
	})) return !1;
	let r = x(t, n);
	return !!S(r, e);
}
const D = Object.freeze({
	width: null,
	height: null
}), O = Object.freeze({
	...D,
	...a
}), ne = /(-?[0-9.]*[0-9]+[0-9.]*)/g, re = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
function k(e, t, n) {
	if (t === 1) return e;
	if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
	if (typeof e != "string") return e;
	let r = e.split(ne);
	if (r === null || !r.length) return e;
	let i = [], a = r.shift(), o = re.test(a);
	for (;;) {
		if (o) {
			let e = parseFloat(a);
			isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
		} else i.push(a);
		if (a = r.shift(), a === void 0) return i.join("");
		o = !o;
	}
}
function ie(e, t = "defs") {
	let n = "", r = e.indexOf("<" + t);
	for (; r >= 0;) {
		let i = e.indexOf(">", r), a = e.indexOf("</" + t);
		if (i === -1 || a === -1) break;
		let o = e.indexOf(">", a);
		if (o === -1) break;
		n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
	}
	return {
		defs: n,
		content: e
	};
}
function ae(e, t) {
	return e ? "<defs>" + e + "</defs>" + t : t;
}
function oe(e, t, n) {
	let r = ie(e);
	return ae(r.defs, t + r.content + n);
}
const se = (e) => e === "unset" || e === "undefined" || e === "none";
function ce(e, t) {
	let n = {
		...o,
		...e
	}, r = {
		...O,
		...t
	}, i = {
		left: n.left,
		top: n.top,
		width: n.width,
		height: n.height
	}, a = n.body;
	[n, r].forEach((e) => {
		let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
		n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
		let s;
		switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
			case 1:
				s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
				break;
			case 2:
				t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
				break;
			case 3:
				s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
				break;
		}
		o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = oe(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
	});
	let s = r.width, c = r.height, l = i.width, u = i.height, d, f;
	s === null ? (f = c === null ? "1em" : c === "auto" ? u : c, d = k(f, l / u)) : (d = s === "auto" ? l : s, f = c === null ? k(d, u / l) : c === "auto" ? u : c);
	let p = {}, m = (e, t) => {
		se(t) || (p[e] = t.toString());
	};
	m("width", d), m("height", f);
	let h = [
		i.left,
		i.top,
		l,
		u
	];
	return p.viewBox = h.join(" "), {
		attributes: p,
		viewBox: h,
		body: a
	};
}
const le = /\sid="(\S+)"/g, ue = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
let de = 0;
function fe(e, t = ue) {
	let n = [], r;
	for (; r = le.exec(e);) n.push(r[1]);
	if (!n.length) return e;
	let i = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
	return n.forEach((n) => {
		let r = typeof t == "function" ? t(n) : t + (de++).toString(), a = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
		e = e.replace(RegExp("([#;\"])(" + a + ")([\")]|\\.[a-z])", "g"), "$1" + r + i + "$3");
	}), e = e.replace(new RegExp(i, "g"), ""), e;
}
const A = /* @__PURE__ */ Object.create(null);
function pe(e, t) {
	A[e] = t;
}
function j(e) {
	return A[e] || A[""];
}
function M(e) {
	let t;
	if (typeof e.resources == "string") t = [e.resources];
	else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
	let n = {
		resources: t,
		path: e.path || "/",
		maxURL: e.maxURL || 500,
		rotate: e.rotate || 750,
		timeout: e.timeout || 5e3,
		random: e.random === !0,
		index: e.index || 0,
		dataAfterTimeout: e.dataAfterTimeout !== !1
	};
	return n;
}
const N = /* @__PURE__ */ Object.create(null), P = ["https://api.simplesvg.com", "https://api.unisvg.com"], F = [];
for (; P.length > 0;) P.length === 1 || Math.random() > .5 ? F.push(P.shift()) : F.push(P.pop());
N[""] = M({ resources: ["https://api.iconify.design"].concat(F) });
function me(e, t) {
	let n = M(t);
	return n === null ? !1 : (N[e] = n, !0);
}
function I(e) {
	return N[e];
}
const he = () => {
	let e;
	try {
		if (e = fetch, typeof e == "function") return e;
	} catch {}
};
let L = he();
function R(e, t) {
	let n = I(e);
	if (!n) return 0;
	let r;
	if (!n.maxURL) r = 0;
	else {
		let e = 0;
		n.resources.forEach((t) => {
			let n = t;
			e = Math.max(e, n.length);
		});
		let i = t + ".json?icons=";
		r = n.maxURL - e - n.path.length - i.length;
	}
	return r;
}
function ge(e) {
	return e === 404;
}
const _e = (e, t, n) => {
	let r = [], i = R(e, t), a = "icons", o = {
		type: a,
		provider: e,
		prefix: t,
		icons: []
	}, s = 0;
	return n.forEach((n, c) => {
		s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
			type: a,
			provider: e,
			prefix: t,
			icons: []
		}, s = n.length), o.icons.push(n);
	}), r.push(o), r;
};
function ve(e) {
	if (typeof e == "string") {
		let t = I(e);
		if (t) return t.path;
	}
	return "/";
}
const ye = (e, t, n) => {
	if (!L) {
		n("abort", 424);
		return;
	}
	let r = ve(t.provider);
	switch (t.type) {
		case "icons": {
			let e = t.prefix, n = t.icons, i = n.join(","), a = new URLSearchParams({ icons: i });
			r += e + ".json?" + a.toString();
			break;
		}
		case "custom": {
			let e = t.uri;
			r += e.slice(0, 1) === "/" ? e.slice(1) : e;
			break;
		}
		default:
			n("abort", 400);
			return;
	}
	let i = 503;
	L(e + r).then((e) => {
		let t = e.status;
		if (t !== 200) {
			setTimeout(() => {
				n(ge(t) ? "abort" : "next", t);
			});
			return;
		}
		return i = 501, e.json();
	}).then((e) => {
		if (typeof e != "object" || !e) {
			setTimeout(() => {
				e === 404 ? n("abort", e) : n("next", i);
			});
			return;
		}
		setTimeout(() => {
			n("success", e);
		});
	}).catch(() => {
		n("next", i);
	});
}, be = {
	prepare: _e,
	send: ye
};
function xe(e) {
	let t = {
		loaded: [],
		missing: [],
		pending: []
	}, n = /* @__PURE__ */ Object.create(null);
	e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
	let r = {
		provider: "",
		prefix: "",
		name: ""
	};
	return e.forEach((e) => {
		if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
		r = e;
		let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = /* @__PURE__ */ Object.create(null)), c = s[a] || (s[a] = x(i, a)), l;
		l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
		let u = {
			provider: i,
			prefix: a,
			name: o
		};
		l.push(u);
	}), t;
}
function z(e, t) {
	e.forEach((e) => {
		let n = e.loaderCallbacks;
		n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
	});
}
function Se(e) {
	e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
		e.pendingCallbacksFlag = !1;
		let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
		if (!t.length) return;
		let n = !1, r = e.provider, i = e.prefix;
		t.forEach((t) => {
			let a = t.icons, o = a.pending.length;
			a.pending = a.pending.filter((t) => {
				if (t.prefix !== i) return !0;
				let o = t.name;
				if (e.icons[o]) a.loaded.push({
					provider: r,
					prefix: i,
					name: o
				});
				else if (e.missing.has(o)) a.missing.push({
					provider: r,
					prefix: i,
					name: o
				});
				else return n = !0, !0;
				return !1;
			}), a.pending.length !== o && (n || z([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
		});
	}));
}
let Ce = 0;
function we(e, t, n) {
	let r = Ce++, i = z.bind(null, n, r);
	if (!t.pending.length) return i;
	let a = {
		id: r,
		icons: t,
		callback: e,
		abort: i
	};
	return n.forEach((e) => {
		(e.loaderCallbacks ||= []).push(a);
	}), i;
}
function Te(e, t = !0, n = !1) {
	let r = [];
	return e.forEach((e) => {
		let i = typeof e == "string" ? _(e, t, n) : e;
		i && r.push(i);
	}), r;
}
var Ee = {
	resources: [],
	index: 0,
	timeout: 2e3,
	rotate: 750,
	random: !1,
	dataAfterTimeout: !1
};
function De(e, t, n, r) {
	let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
	if (e.random) {
		let t = e.resources.slice(0);
		for (o = []; t.length > 1;) {
			let e = Math.floor(Math.random() * t.length);
			o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
		}
		o = o.concat(t);
	} else o = e.resources.slice(a).concat(e.resources.slice(0, a));
	let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
	typeof r == "function" && p.push(r);
	function m() {
		d &&= (clearTimeout(d), null);
	}
	function h() {
		c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
			e.status === "pending" && (e.status = "aborted");
		}), f = [];
	}
	function g(e, t) {
		t && (p = []), typeof e == "function" && p.push(e);
	}
	function _() {
		return {
			startTime: s,
			payload: t,
			status: c,
			queriesSent: l,
			queriesPending: f.length,
			subscribe: g,
			abort: h
		};
	}
	function v() {
		c = "failed", p.forEach((e) => {
			e(void 0, u);
		});
	}
	function y() {
		f.forEach((e) => {
			e.status === "pending" && (e.status = "aborted");
		}), f = [];
	}
	function b(t, n, r) {
		let i = n !== "success";
		switch (f = f.filter((e) => e !== t), c) {
			case "pending": break;
			case "failed":
				if (i || !e.dataAfterTimeout) return;
				break;
			default: return;
		}
		if (n === "abort") {
			u = r, v();
			return;
		}
		if (i) {
			u = r, f.length || (o.length ? x() : v());
			return;
		}
		if (m(), y(), !e.random) {
			let n = e.resources.indexOf(t.resource);
			n !== -1 && n !== e.index && (e.index = n);
		}
		c = "completed", p.forEach((e) => {
			e(r);
		});
	}
	function x() {
		if (c !== "pending") return;
		m();
		let r = o.shift();
		if (r === void 0) {
			if (f.length) {
				d = setTimeout(() => {
					m(), c === "pending" && (y(), v());
				}, e.timeout);
				return;
			}
			v();
			return;
		}
		let i = {
			status: "pending",
			resource: r,
			callback: (e, t) => {
				b(i, e, t);
			}
		};
		f.push(i), l++, d = setTimeout(x, e.rotate), n(r, t, i.callback);
	}
	return setTimeout(x), _;
}
function B(e) {
	let t = {
		...Ee,
		...e
	}, n = [];
	function r() {
		n = n.filter((e) => e().status === "pending");
	}
	function i(e, i, a) {
		let o = De(t, e, i, (e, t) => {
			r(), a && a(e, t);
		});
		return n.push(o), o;
	}
	function a(e) {
		return n.find((t) => e(t)) || null;
	}
	let o = {
		query: i,
		find: a,
		setIndex: (e) => {
			t.index = e;
		},
		getIndex: () => t.index,
		cleanup: r
	};
	return o;
}
function V() {}
const H = /* @__PURE__ */ Object.create(null);
function Oe(e) {
	if (!H[e]) {
		let t = I(e);
		if (!t) return;
		let n = B(t), r = {
			config: t,
			redundancy: n
		};
		H[e] = r;
	}
	return H[e];
}
function ke(e, t, n) {
	let r, i;
	if (typeof e == "string") {
		let t = j(e);
		if (!t) return n(void 0, 424), V;
		i = t.send;
		let a = Oe(e);
		a && (r = a.redundancy);
	} else {
		let t = M(e);
		if (t) {
			r = B(t);
			let n = e.resources ? e.resources[0] : "", a = j(n);
			a && (i = a.send);
		}
	}
	return !r || !i ? (n(void 0, 424), V) : r.query(t, i, n)().abort;
}
function U() {}
function Ae(e) {
	e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
		e.iconsLoaderFlag = !1, Se(e);
	}));
}
function je(e) {
	let t = [], n = [];
	return e.forEach((e) => {
		(e.match(g) ? t : n).push(e);
	}), {
		valid: t,
		invalid: n
	};
}
function W(e, t, n) {
	function r() {
		let n = e.pendingIcons;
		t.forEach((t) => {
			n && n.delete(t), e.icons[t] || e.missing.add(t);
		});
	}
	if (n && typeof n == "object") try {
		let t = S(e, n);
		if (!t.length) {
			r();
			return;
		}
	} catch (e) {
		console.error(e);
	}
	r(), Ae(e);
}
function G(e, t) {
	e instanceof Promise ? e.then((e) => {
		t(e);
	}).catch(() => {
		t(null);
	}) : t(e);
}
function Me(e, t) {
	e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
		e.iconsQueueFlag = !1;
		let { provider: t, prefix: n } = e, r = e.iconsToLoad;
		if (delete e.iconsToLoad, !r || !r.length) return;
		let i = e.loadIcon;
		if (e.loadIcons && (r.length > 1 || !i)) {
			G(e.loadIcons(r, n, t), (t) => {
				W(e, r, t);
			});
			return;
		}
		if (i) {
			r.forEach((r) => {
				let a = i(r, n, t);
				G(a, (t) => {
					let i = t ? {
						prefix: n,
						icons: { [r]: t }
					} : null;
					W(e, [r], i);
				});
			});
			return;
		}
		let { valid: a, invalid: o } = je(r);
		if (o.length && W(e, o, null), !a.length) return;
		let s = n.match(g) ? j(t) : null;
		if (!s) {
			W(e, a, null);
			return;
		}
		let c = s.prepare(t, n, a);
		c.forEach((n) => {
			ke(t, n, (t) => {
				W(e, n.icons, t);
			});
		});
	}));
}
const Ne = (e, t) => {
	let n = Te(e, !0, T()), r = xe(n);
	if (!r.pending.length) {
		let e = !0;
		return t && setTimeout(() => {
			e && t(r.loaded, r.missing, r.pending, U);
		}), () => {
			e = !1;
		};
	}
	let i = /* @__PURE__ */ Object.create(null), a = [], o, s;
	return r.pending.forEach((e) => {
		let { provider: t, prefix: n } = e;
		if (n === s && t === o) return;
		o = t, s = n, a.push(x(t, n));
		let r = i[t] || (i[t] = /* @__PURE__ */ Object.create(null));
		r[n] || (r[n] = []);
	}), r.pending.forEach((e) => {
		let { provider: t, prefix: n, name: r } = e, a = x(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
		o.has(r) || (o.add(r), i[t][n].push(r));
	}), a.forEach((e) => {
		let t = i[e.provider][e.prefix];
		t.length && Me(e, t);
	}), t ? we(t, r, a) : U;
};
function Pe(e, t) {
	let n = { ...e };
	for (let e in t) {
		let r = t[e], i = typeof r;
		e in D ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
	}
	return n;
}
const Fe = /[\s,]+/;
function Ie(e, t) {
	t.split(Fe).forEach((t) => {
		let n = t.trim();
		switch (n) {
			case "horizontal":
				e.hFlip = !0;
				break;
			case "vertical":
				e.vFlip = !0;
				break;
		}
	});
}
function Le(e, t = 0) {
	let n = e.replace(/^-?[0-9.]*/, "");
	function r(e) {
		for (; e < 0;) e += 4;
		return e % 4;
	}
	if (n === "") {
		let t = parseInt(e);
		return isNaN(t) ? 0 : r(t);
	} else if (n !== e) {
		let t = 0;
		switch (n) {
			case "%":
				t = 25;
				break;
			case "deg": t = 90;
		}
		if (t) {
			let i = parseFloat(e.slice(0, e.length - n.length));
			return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
		}
	}
	return t;
}
function Re(e, t) {
	let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
	for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
	return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
}
function ze(e) {
	return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
}
function Be(e) {
	return "data:image/svg+xml," + ze(e);
}
function Ve(e) {
	return "url(\"" + Be(e) + "\")";
}
let K;
function He() {
	try {
		K = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
	} catch {
		K = null;
	}
}
function Ue(e) {
	return K === void 0 && He(), K ? K.createHTML(e) : e;
}
const q = {
	...O,
	inline: !1
}, We = {
	xmlns: "http://www.w3.org/2000/svg",
	xmlnsXlink: "http://www.w3.org/1999/xlink",
	"aria-hidden": !0,
	role: "img"
}, Ge = { display: "inline-block" }, J = { backgroundColor: "currentColor" }, Y = { backgroundColor: "transparent" }, X = {
	Image: "var(--svg)",
	Repeat: "no-repeat",
	Size: "100% 100%"
}, Z = {
	WebkitMask: J,
	mask: J,
	background: Y
};
for (let e in Z) {
	let t = Z[e];
	for (let n in X) t[e + n] = X[n];
}
const Ke = {
	...q,
	inline: !0
};
function Q(e) {
	return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
}
const qe = (t, n, r) => {
	let i = n.inline ? Ke : q, a = Pe(i, n), o = n.mode || "svg", s = {}, c = n.style || {}, l = { ...o === "svg" ? We : {} };
	if (r) {
		let e = _(r, !1, !0);
		if (e) {
			let t = ["iconify"], n = ["provider", "prefix"];
			for (let r of n) e[r] && t.push("iconify--" + e[r]);
			l.className = t.join(" ");
		}
	}
	for (let e in n) {
		let t = n[e];
		if (t === void 0) continue;
		switch (e) {
			case "icon":
			case "style":
			case "children":
			case "onLoad":
			case "mode":
			case "ssr": break;
			case "_ref":
				l.ref = t;
				break;
			case "className":
				l[e] = (l[e] ? l[e] + " " : "") + t;
				break;
			case "inline":
			case "hFlip":
			case "vFlip":
				a[e] = t === !0 || t === "true" || t === 1;
				break;
			case "flip":
				typeof t == "string" && Ie(a, t);
				break;
			case "color":
				s.color = t;
				break;
			case "rotate":
				typeof t == "string" ? a[e] = Le(t) : typeof t == "number" && (a[e] = t);
				break;
			case "ariaHidden":
			case "aria-hidden":
				t !== !0 && t !== "true" && delete l["aria-hidden"];
				break;
			default: i[e] === void 0 && (l[e] = t);
		}
	}
	let u = ce(t, a), d = u.attributes;
	if (a.inline && (s.verticalAlign = "-0.125em"), o === "svg") {
		l.style = {
			...s,
			...c
		}, Object.assign(l, d);
		let t = 0, r = n.id;
		return typeof r == "string" && (r = r.replace(/-/g, "_")), l.dangerouslySetInnerHTML = { __html: Ue(fe(u.body, r ? () => r + "ID" + t++ : "iconifyReact")) }, e("svg", l);
	}
	let { body: f, width: p, height: m } = t, h = o === "mask" || (o === "bg" ? !1 : f.indexOf("currentColor") !== -1), g = Re(f, {
		...d,
		width: p + "",
		height: m + ""
	});
	return l.style = {
		...s,
		"--svg": Ve(g),
		width: Q(d.width),
		height: Q(d.height),
		...Ge,
		...h ? J : Y,
		...c
	}, e("span", l);
};
if (T(!0), pe("", be), typeof document < "u" && typeof window < "u") {
	let e = window;
	if (e.IconifyPreload !== void 0) {
		let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
		typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
			try {
				(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !te(e)) && console.error(n);
			} catch {
				console.error(n);
			}
		});
	}
	if (e.IconifyProviders !== void 0) {
		let t = e.IconifyProviders;
		if (typeof t == "object" && t) for (let e in t) {
			let n = "IconifyProviders[" + e + "] is invalid.";
			try {
				let r = t[e];
				if (typeof r != "object" || !r || r.resources === void 0) continue;
				me(e, r) || console.error(n);
			} catch {
				console.error(n);
			}
		}
	}
}
function $(t) {
	let [i, a] = r(!!t.ssr), [s, c] = r({});
	function l(e) {
		if (e) {
			let e = t.icon;
			if (typeof e == "object") return {
				name: "",
				data: e
			};
			let n = E(e);
			if (n) return {
				name: e,
				data: n
			};
		}
		return { name: "" };
	}
	let [u, d] = r(l(!!t.ssr));
	function f() {
		let e = s.callback;
		e && (e(), c({}));
	}
	function p(e) {
		if (JSON.stringify(u) !== JSON.stringify(e)) return f(), d(e), !0;
	}
	function m() {
		var e;
		let n = t.icon;
		if (typeof n == "object") {
			p({
				name: "",
				data: n
			});
			return;
		}
		let r = E(n);
		if (p({
			name: n,
			data: r
		})) if (r === void 0) {
			let e = Ne([n], m);
			c({ callback: e });
		} else r && ((e = t.onLoad) == null || e.call(t, n));
	}
	n(() => (a(!0), f), []), n(() => {
		i && m();
	}, [t.icon, i]);
	let { name: h, data: g } = u;
	return g ? qe({
		...o,
		...g
	}, t, h) : t.children ? t.children : t.fallback ? t.fallback : e("span", {});
}
const Je = t((e, t) => $({
	...e,
	_ref: t
})), Ye = t((e, t) => $({
	inline: !0,
	...e,
	_ref: t
}));
export { Je as b, Ye as c };

//# sourceMappingURL=iconify.BzZOJCu5.js.map