var Ee = Object.defineProperty;
var Se = (o, e, t) => e in o ? Ee(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
var p = (o, e, t) => Se(o, typeof e != "symbol" ? e + "" : e, t);
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const N = globalThis, te = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), oe = /* @__PURE__ */ new WeakMap();
let fe = class {
constructor(e, t, i) {
if (this._$cssResult$ = !0, i !== ie) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = e, this.t = t;
}
get styleSheet() {
let e = this.o;
const t = this.t;
if (te && e === void 0) {
const i = t !== void 0 && t.length === 1;
i && (e = oe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && oe.set(t, e));
}
return e;
}
toString() {
return this.cssText;
}
};
const Ce = (o) => new fe(typeof o == "string" ? o : o + "", void 0, ie), f = (o, ...e) => {
const t = o.length === 1 ? o[0] : e.reduce((i, r, n) => i + ((s) => {
if (s._$cssResult$ === !0) return s.cssText;
if (typeof s == "number") return s;
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(r) + o[n + 1], o[0]);
return new fe(t, o, ie);
}, Me = (o, e) => {
if (te) o.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
else for (const t of e) {
const i = document.createElement("style"), r = N.litNonce;
r !== void 0 && i.setAttribute("nonce", r), i.textContent = t.cssText, o.appendChild(i);
}
}, se = te ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((e) => {
let t = "";
for (const i of e.cssRules) t += i.cssText;
return Ce(t);
})(o) : o;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const { is: Te, defineProperty: ze, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Ue, getOwnPropertySymbols: Oe, getPrototypeOf: He } = Object, y = globalThis, ne = y.trustedTypes, Re = ne ? ne.emptyScript : "", j = y.reactiveElementPolyfillSupport, T = (o, e) => o, F = { toAttribute(o, e) {
switch (e) {
case Boolean:
o = o ? Re : null;
break;
case Object:
case Array:
o = o == null ? o : JSON.stringify(o);
}
return o;
}, fromAttribute(o, e) {
let t = o;
switch (e) {
case Boolean:
t = o !== null;
break;
case Number:
t = o === null ? null : Number(o);
break;
case Object:
case Array:
try {
t = JSON.parse(o);
} catch {
t = null;
}
}
return t;
} }, ve = (o, e) => !Te(o, e), ae = { attribute: !0, type: String, converter: F, reflect: !1, useDefault: !1, hasChanged: ve };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
let E = class extends HTMLElement {
static addInitializer(e) {
this._$Ei(), (this.l ?? (this.l = [])).push(e);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(e, t = ae) {
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
const i = Symbol(), r = this.getPropertyDescriptor(e, i, t);
r !== void 0 && ze(this.prototype, e, r);
}
}
static getPropertyDescriptor(e, t, i) {
const { get: r, set: n } = Pe(this.prototype, e) ?? { get() {
return this[t];
}, set(s) {
this[t] = s;
} };
return { get: r, set(s) {
const l = r == null ? void 0 : r.call(this);
n == null || n.call(this, s), this.requestUpdate(e, l, i);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(e) {
return this.elementProperties.get(e) ?? ae;
}
static _$Ei() {
if (this.hasOwnProperty(T("elementProperties"))) return;
const e = He(this);
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(T("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
const t = this.properties, i = [...Ue(t), ...Oe(t)];
for (const r of i) this.createProperty(r, t[r]);
}
const e = this[Symbol.metadata];
if (e !== null) {
const t = litPropertyMetadata.get(e);
if (t !== void 0) for (const [i, r] of t) this.elementProperties.set(i, r);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t, i] of this.elementProperties) {
const r = this._$Eu(t, i);
r !== void 0 && this._$Eh.set(r, t);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(e) {
const t = [];
if (Array.isArray(e)) {
const i = new Set(e.flat(1 / 0).reverse());
for (const r of i) t.unshift(se(r));
} else e !== void 0 && t.push(se(e));
return t;
}
static _$Eu(e, t) {
const i = t.attribute;
return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
}
_$Ev() {
var e;
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
}
addController(e) {
var t;
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
}
removeController(e) {
var t;
(t = this._$EO) == null || t.delete(e);
}
_$E_() {
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
for (const i of t.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]);
e.size > 0 && (this._$Ep = e);
}
createRenderRoot() {
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return Me(e, this.constructor.elementStyles), e;
}
connectedCallback() {
var e;
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
var i;
return (i = t.hostConnected) == null ? void 0 : i.call(t);
});
}
enableUpdating(e) {
}
disconnectedCallback() {
var e;
(e = this._$EO) == null || e.forEach((t) => {
var i;
return (i = t.hostDisconnected) == null ? void 0 : i.call(t);
});
}
attributeChangedCallback(e, t, i) {
this._$AK(e, i);
}
_$ET(e, t) {
var n;
const i = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, i);
if (r !== void 0 && i.reflect === !0) {
const s = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : F).toAttribute(t, i.type);
this._$Em = e, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$Em = null;
}
}
_$AK(e, t) {
var n, s;
const i = this.constructor, r = i._$Eh.get(e);
if (r !== void 0 && this._$Em !== r) {
const l = i.getPropertyOptions(r), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : F;
this._$Em = r;
const d = a.fromAttribute(t, l.type);
this[r] = d ?? ((s = this._$Ej) == null ? void 0 : s.get(r)) ?? d, this._$Em = null;
}
}
requestUpdate(e, t, i, r = !1, n) {
var s;
if (e !== void 0) {
const l = this.constructor;
if (r === !1 && (n = this[e]), i ?? (i = l.getPropertyOptions(e)), !((i.hasChanged ?? ve)(n, t) || i.useDefault && i.reflect && n === ((s = this._$Ej) == null ? void 0 : s.get(e)) && !this.hasAttribute(l._$Eu(e, i)))) return;
this.C(e, t, i);
}
this.isUpdatePending === !1 && (this._$ES = this._$EP());
}
C(e, t, { useDefault: i, reflect: r, wrapped: n }, s) {
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, s ?? t ?? this[e]), n !== !0 || s !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
}
async _$EP() {
this.isUpdatePending = !0;
try {
await this._$ES;
} catch (t) {
Promise.reject(t);
}
const e = this.scheduleUpdate();
return e != null && await e, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var i;
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
for (const [n, s] of this._$Ep) this[n] = s;
this._$Ep = void 0;
}
const r = this.constructor.elementProperties;
if (r.size > 0) for (const [n, s] of r) {
const { wrapped: l } = s, a = this[n];
l !== !0 || this._$AL.has(n) || a === void 0 || this.C(n, void 0, s, a);
}
}
let e = !1;
const t = this._$AL;
try {
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (i = this._$EO) == null || i.forEach((r) => {
var n;
return (n = r.hostUpdate) == null ? void 0 : n.call(r);
}), this.update(t)) : this._$EM();
} catch (r) {
throw e = !1, this._$EM(), r;
}
e && this._$AE(t);
}
willUpdate(e) {
}
_$AE(e) {
var t;
(t = this._$EO) == null || t.forEach((i) => {
var r;
return (r = i.hostUpdated) == null ? void 0 : r.call(i);
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
}
_$EM() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(e) {
return !0;
}
update(e) {
this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
}
updated(e) {
}
firstUpdated(e) {
}
};
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), j == null || j({ ReactiveElement: E }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.1.2");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const z = globalThis, le = (o) => o, B = z.trustedTypes, ce = B ? B.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, be = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, xe = "?" + x, Ne = `<${xe}>`, k = document, P = () => k.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", re = Array.isArray, Be = (o) => re(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", L = `[
\f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, de = /-->/g, he = />/g, $ = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, ue = /"/g, ye = /^(?:script|style|textarea|title)$/i, $e = (o) => (e, ...t) => ({ _$litType$: o, strings: e, values: t }), c = $e(1), w = $e(2), S = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), me = /* @__PURE__ */ new WeakMap(), _ = k.createTreeWalker(k, 129);
function we(o, e) {
if (!re(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
return ce !== void 0 ? ce.createHTML(e) : e;
}
const De = (o, e) => {
const t = o.length - 1, i = [];
let r, n = e === 2 ? "" : e === 3 ? "" : "")), i];
};
class O {
constructor({ strings: e, _$litType$: t }, i) {
let r;
this.parts = [];
let n = 0, s = 0;
const l = e.length - 1, a = this.parts, [d, u] = De(e, t);
if (this.el = O.createElement(d, i), _.currentNode = this.el.content, t === 2 || t === 3) {
const h = this.el.content.firstChild;
h.replaceWith(...h.childNodes);
}
for (; (r = _.nextNode()) !== null && a.length < l; ) {
if (r.nodeType === 1) {
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(be)) {
const v = u[s++], b = r.getAttribute(h).split(x), R = /([.?@])?(.*)/.exec(v);
a.push({ type: 1, index: n, name: R[2], strings: b, ctor: R[1] === "." ? Le : R[1] === "?" ? Ie : R[1] === "@" ? Ve : D }), r.removeAttribute(h);
} else h.startsWith(x) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
if (ye.test(r.tagName)) {
const h = r.textContent.split(x), v = h.length - 1;
if (v > 0) {
r.textContent = B ? B.emptyScript : "";
for (let b = 0; b < v; b++) r.append(h[b], P()), _.nextNode(), a.push({ type: 2, index: ++n });
r.append(h[v], P());
}
}
} else if (r.nodeType === 8) if (r.data === xe) a.push({ type: 2, index: n });
else {
let h = -1;
for (; (h = r.data.indexOf(x, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += x.length - 1;
}
n++;
}
}
static createElement(e, t) {
const i = k.createElement("template");
return i.innerHTML = e, i;
}
}
function C(o, e, t = o, i) {
var s, l;
if (e === S) return e;
let r = i !== void 0 ? (s = t._$Co) == null ? void 0 : s[i] : t._$Cl;
const n = U(e) ? void 0 : e._$litDirective$;
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(o), r._$AT(o, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = r : t._$Cl = r), r !== void 0 && (e = C(o, r._$AS(o, e.values), r, i)), e;
}
class je {
constructor(e, t) {
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(e) {
const { el: { content: t }, parts: i } = this._$AD, r = ((e == null ? void 0 : e.creationScope) ?? k).importNode(t, !0);
_.currentNode = r;
let n = _.nextNode(), s = 0, l = 0, a = i[0];
for (; a !== void 0; ) {
if (s === a.index) {
let d;
a.type === 2 ? d = new H(n, n.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, e) : a.type === 6 && (d = new Fe(n, this, e)), this._$AV.push(d), a = i[++l];
}
s !== (a == null ? void 0 : a.index) && (n = _.nextNode(), s++);
}
return _.currentNode = k, r;
}
p(e) {
let t = 0;
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
}
}
class H {
get _$AU() {
var e;
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
}
constructor(e, t, i, r) {
this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
}
get parentNode() {
let e = this._$AA.parentNode;
const t = this._$AM;
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(e, t = this) {
e = C(this, e, t), U(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Be(e) ? this.k(e) : this._(e);
}
O(e) {
return this._$AA.parentNode.insertBefore(e, this._$AB);
}
T(e) {
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
}
_(e) {
this._$AH !== m && U(this._$AH) ? this._$AA.nextSibling.data = e : this.T(k.createTextNode(e)), this._$AH = e;
}
$(e) {
var n;
const { values: t, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = O.createElement(we(i.h, i.h[0]), this.options)), i);
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(t);
else {
const s = new je(r, this), l = s.u(this.options);
s.p(t), this.T(l), this._$AH = s;
}
}
_$AC(e) {
let t = me.get(e.strings);
return t === void 0 && me.set(e.strings, t = new O(e)), t;
}
k(e) {
re(this._$AH) || (this._$AH = [], this._$AR());
const t = this._$AH;
let i, r = 0;
for (const n of e) r === t.length ? t.push(i = new H(this.O(P()), this.O(P()), this, this.options)) : i = t[r], i._$AI(n), r++;
r < t.length && (this._$AR(i && i._$AB.nextSibling, r), t.length = r);
}
_$AR(e = this._$AA.nextSibling, t) {
var i;
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
const r = le(e).nextSibling;
le(e).remove(), e = r;
}
}
setConnected(e) {
var t;
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
}
}
class D {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(e, t, i, r, n) {
this.type = 1, this._$AH = m, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = m;
}
_$AI(e, t = this, i, r) {
const n = this.strings;
let s = !1;
if (n === void 0) e = C(this, e, t, 0), s = !U(e) || e !== this._$AH && e !== S, s && (this._$AH = e);
else {
const l = e;
let a, d;
for (e = n[0], a = 0; a < n.length - 1; a++) d = C(this, l[i + a], t, a), d === S && (d = this._$AH[a]), s || (s = !U(d) || d !== this._$AH[a]), d === m ? e = m : e !== m && (e += (d ?? "") + n[a + 1]), this._$AH[a] = d;
}
s && !r && this.j(e);
}
j(e) {
e === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
}
}
class Le extends D {
constructor() {
super(...arguments), this.type = 3;
}
j(e) {
this.element[this.name] = e === m ? void 0 : e;
}
}
class Ie extends D {
constructor() {
super(...arguments), this.type = 4;
}
j(e) {
this.element.toggleAttribute(this.name, !!e && e !== m);
}
}
class Ve extends D {
constructor(e, t, i, r, n) {
super(e, t, i, r, n), this.type = 5;
}
_$AI(e, t = this) {
if ((e = C(this, e, t, 0) ?? m) === S) return;
const i = this._$AH, r = e === m && i !== m || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== m && (i === m || r);
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$AH = e;
}
handleEvent(e) {
var t;
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
}
}
class Fe {
constructor(e, t, i) {
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(e) {
C(this, e);
}
}
const I = z.litHtmlPolyfillSupport;
I == null || I(O, H), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.3.2");
const We = (o, e, t) => {
const i = (t == null ? void 0 : t.renderBefore) ?? e;
let r = i._$litPart$;
if (r === void 0) {
const n = (t == null ? void 0 : t.renderBefore) ?? null;
i._$litPart$ = r = new H(e.insertBefore(P(), n), n, void 0, t ?? {});
}
return r._$AI(o), r;
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const A = globalThis;
class g extends E {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
var t;
const e = super.createRenderRoot();
return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
}
update(e) {
const t = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = We(t, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var e;
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
}
disconnectedCallback() {
var e;
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
}
render() {
return S;
}
}
var ge;
g._$litElement$ = !0, g.finalized = !0, (ge = A.litElementHydrateSupport) == null || ge.call(A, { LitElement: g });
const V = A.litElementPolyfillSupport;
V == null || V({ LitElement: g });
(A.litElementVersions ?? (A.litElementVersions = [])).push("4.2.2");
class W extends g {
render() {
return c`
${this.imageUrl ? c`` : ""}
${this.text}
${this.hasAttachment ? c`` : ""}Hello from luumiCORE!
`; } } p(ke, "styles", f` :host { display: block; padding: 16px; color: var(--luumicore-text-color, black); border: 1px solid var(--luumicore-primary, blue); } `); customElements.define("luumicore-element", ke); export { ke as LuumicoreElement };