/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __accessCheck = (obj, member, msg) => { if (!member.has(obj)) throw TypeError("Cannot " + msg); }; var __privateGet = (obj, member, getter) => { __accessCheck(obj, member, "read from private field"); return getter ? getter.call(obj) : member.get(obj); }; var __privateAdd = (obj, member, value) => { if (member.has(obj)) throw TypeError("Cannot add the same private member more than once"); member instanceof WeakSet ? member.add(obj) : member.set(obj, value); }; var __privateSet = (obj, member, value, setter) => { __accessCheck(obj, member, "write to private field"); setter ? setter.call(obj, value) : member.set(obj, value); return value; }; var __privateWrapper = (obj, member, setter, getter) => ({ set _(value) { __privateSet(obj, member, value, setter); }, get _() { return __privateGet(obj, member, getter); } }); var __privateMethod = (obj, member, method) => { __accessCheck(obj, member, "access private method"); return method; }; // main.ts var main_exports = {}; __export(main_exports, { BaseView: () => BaseView, VIEW_TYPE: () => VIEW_TYPE, default: () => Crafty }); module.exports = __toCommonJS(main_exports); // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js var t = globalThis; var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype; var s = Symbol(); var o = /* @__PURE__ */ new WeakMap(); var n = class { constructor(t7, e11, o10) { if (this._$cssResult$ = true, o10 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t7, this.t = e11; } get styleSheet() { let t7 = this.o; const s5 = this.t; if (e && void 0 === t7) { const e11 = void 0 !== s5 && 1 === s5.length; e11 && (t7 = o.get(s5)), void 0 === t7 && ((this.o = t7 = new CSSStyleSheet()).replaceSync(this.cssText), e11 && o.set(s5, t7)); } return t7; } toString() { return this.cssText; } }; var r = (t7) => new n("string" == typeof t7 ? t7 : t7 + "", void 0, s); var i = (t7, ...e11) => { const o10 = 1 === t7.length ? t7[0] : e11.reduce((e12, s5, o11) => e12 + ((t8) => { if (true === t8._$cssResult$) return t8.cssText; if ("number" == typeof t8) return t8; throw Error("Value passed to 'css' function must be a 'css' function result: " + t8 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); })(s5) + t7[o11 + 1], t7[0]); return new n(o10, t7, s); }; var S = (s5, o10) => { if (e) s5.adoptedStyleSheets = o10.map((t7) => t7 instanceof CSSStyleSheet ? t7 : t7.styleSheet); else for (const e11 of o10) { const o11 = document.createElement("style"), n7 = t.litNonce; void 0 !== n7 && o11.setAttribute("nonce", n7), o11.textContent = e11.cssText, s5.appendChild(o11); } }; var c = e ? (t7) => t7 : (t7) => t7 instanceof CSSStyleSheet ? ((t8) => { let e11 = ""; for (const s5 of t8.cssRules) e11 += s5.cssText; return r(e11); })(t7) : t7; // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js var { is: i2, defineProperty: e2, getOwnPropertyDescriptor: r2, getOwnPropertyNames: h, getOwnPropertySymbols: o2, getPrototypeOf: n2 } = Object; var a = globalThis; var c2 = a.trustedTypes; var l = c2 ? c2.emptyScript : ""; var p = a.reactiveElementPolyfillSupport; var d = (t7, s5) => t7; var u = { toAttribute(t7, s5) { switch (s5) { case Boolean: t7 = t7 ? l : null; break; case Object: case Array: t7 = null == t7 ? t7 : JSON.stringify(t7); } return t7; }, fromAttribute(t7, s5) { let i6 = t7; switch (s5) { case Boolean: i6 = null !== t7; break; case Number: i6 = null === t7 ? null : Number(t7); break; case Object: case Array: try { i6 = JSON.parse(t7); } catch (t8) { i6 = null; } } return i6; } }; var f = (t7, s5) => !i2(t7, s5); var y = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; var _a, _b; (_a = Symbol.metadata) != null ? _a : Symbol.metadata = Symbol("metadata"), (_b = a.litPropertyMetadata) != null ? _b : a.litPropertyMetadata = /* @__PURE__ */ new WeakMap(); var b = class extends HTMLElement { static addInitializer(t7) { var _a6; this._$Ei(), ((_a6 = this.l) != null ? _a6 : this.l = []).push(t7); } static get observedAttributes() { return this.finalize(), this._$Eh && [...this._$Eh.keys()]; } static createProperty(t7, s5 = y) { if (s5.state && (s5.attribute = false), this._$Ei(), this.elementProperties.set(t7, s5), !s5.noAccessor) { const i6 = Symbol(), r8 = this.getPropertyDescriptor(t7, i6, s5); void 0 !== r8 && e2(this.prototype, t7, r8); } } static getPropertyDescriptor(t7, s5, i6) { var _a6; const { get: e11, set: h3 } = (_a6 = r2(this.prototype, t7)) != null ? _a6 : { get() { return this[s5]; }, set(t8) { this[s5] = t8; } }; return { get() { return e11 == null ? void 0 : e11.call(this); }, set(s6) { const r8 = e11 == null ? void 0 : e11.call(this); h3.call(this, s6), this.requestUpdate(t7, r8, i6); }, configurable: true, enumerable: true }; } static getPropertyOptions(t7) { var _a6; return (_a6 = this.elementProperties.get(t7)) != null ? _a6 : y; } static _$Ei() { if (this.hasOwnProperty(d("elementProperties"))) return; const t7 = n2(this); t7.finalize(), void 0 !== t7.l && (this.l = [...t7.l]), this.elementProperties = new Map(t7.elementProperties); } static finalize() { if (this.hasOwnProperty(d("finalized"))) return; if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) { const t8 = this.properties, s5 = [...h(t8), ...o2(t8)]; for (const i6 of s5) this.createProperty(i6, t8[i6]); } const t7 = this[Symbol.metadata]; if (null !== t7) { const s5 = litPropertyMetadata.get(t7); if (void 0 !== s5) for (const [t8, i6] of s5) this.elementProperties.set(t8, i6); } this._$Eh = /* @__PURE__ */ new Map(); for (const [t8, s5] of this.elementProperties) { const i6 = this._$Eu(t8, s5); void 0 !== i6 && this._$Eh.set(i6, t8); } this.elementStyles = this.finalizeStyles(this.styles); } static finalizeStyles(s5) { const i6 = []; if (Array.isArray(s5)) { const e11 = new Set(s5.flat(1 / 0).reverse()); for (const s6 of e11) i6.unshift(c(s6)); } else void 0 !== s5 && i6.push(c(s5)); return i6; } static _$Eu(t7, s5) { const i6 = s5.attribute; return false === i6 ? void 0 : "string" == typeof i6 ? i6 : "string" == typeof t7 ? t7.toLowerCase() : void 0; } constructor() { super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev(); } _$Ev() { var _a6; this._$ES = new Promise((t7) => this.enableUpdating = t7), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (_a6 = this.constructor.l) == null ? void 0 : _a6.forEach((t7) => t7(this)); } addController(t7) { var _a6, _b3; ((_a6 = this._$EO) != null ? _a6 : this._$EO = /* @__PURE__ */ new Set()).add(t7), void 0 !== this.renderRoot && this.isConnected && ((_b3 = t7.hostConnected) == null ? void 0 : _b3.call(t7)); } removeController(t7) { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.delete(t7); } _$E_() { const t7 = /* @__PURE__ */ new Map(), s5 = this.constructor.elementProperties; for (const i6 of s5.keys()) this.hasOwnProperty(i6) && (t7.set(i6, this[i6]), delete this[i6]); t7.size > 0 && (this._$Ep = t7); } createRenderRoot() { var _a6; const t7 = (_a6 = this.shadowRoot) != null ? _a6 : this.attachShadow(this.constructor.shadowRootOptions); return S(t7, this.constructor.elementStyles), t7; } connectedCallback() { var _a6, _b3; (_a6 = this.renderRoot) != null ? _a6 : this.renderRoot = this.createRenderRoot(), this.enableUpdating(true), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t7) => { var _a7; return (_a7 = t7.hostConnected) == null ? void 0 : _a7.call(t7); }); } enableUpdating(t7) { } disconnectedCallback() { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.forEach((t7) => { var _a7; return (_a7 = t7.hostDisconnected) == null ? void 0 : _a7.call(t7); }); } attributeChangedCallback(t7, s5, i6) { this._$AK(t7, i6); } _$EC(t7, s5) { var _a6; const i6 = this.constructor.elementProperties.get(t7), e11 = this.constructor._$Eu(t7, i6); if (void 0 !== e11 && true === i6.reflect) { const r8 = (void 0 !== ((_a6 = i6.converter) == null ? void 0 : _a6.toAttribute) ? i6.converter : u).toAttribute(s5, i6.type); this._$Em = t7, null == r8 ? this.removeAttribute(e11) : this.setAttribute(e11, r8), this._$Em = null; } } _$AK(t7, s5) { var _a6; const i6 = this.constructor, e11 = i6._$Eh.get(t7); if (void 0 !== e11 && this._$Em !== e11) { const t8 = i6.getPropertyOptions(e11), r8 = "function" == typeof t8.converter ? { fromAttribute: t8.converter } : void 0 !== ((_a6 = t8.converter) == null ? void 0 : _a6.fromAttribute) ? t8.converter : u; this._$Em = e11, this[e11] = r8.fromAttribute(s5, t8.type), this._$Em = null; } } requestUpdate(t7, s5, i6) { var _a6; if (void 0 !== t7) { if (i6 != null ? i6 : i6 = this.constructor.getPropertyOptions(t7), !((_a6 = i6.hasChanged) != null ? _a6 : f)(this[t7], s5)) return; this.P(t7, s5, i6); } false === this.isUpdatePending && (this._$ES = this._$ET()); } P(t7, s5, i6) { var _a6; this._$AL.has(t7) || this._$AL.set(t7, s5), true === i6.reflect && this._$Em !== t7 && ((_a6 = this._$Ej) != null ? _a6 : this._$Ej = /* @__PURE__ */ new Set()).add(t7); } async _$ET() { this.isUpdatePending = true; try { await this._$ES; } catch (t8) { Promise.reject(t8); } const t7 = this.scheduleUpdate(); return null != t7 && await t7, !this.isUpdatePending; } scheduleUpdate() { return this.performUpdate(); } performUpdate() { var _a6, _b3; if (!this.isUpdatePending) return; if (!this.hasUpdated) { if ((_a6 = this.renderRoot) != null ? _a6 : this.renderRoot = this.createRenderRoot(), this._$Ep) { for (const [t9, s6] of this._$Ep) this[t9] = s6; this._$Ep = void 0; } const t8 = this.constructor.elementProperties; if (t8.size > 0) for (const [s6, i6] of t8) true !== i6.wrapped || this._$AL.has(s6) || void 0 === this[s6] || this.P(s6, this[s6], i6); } let t7 = false; const s5 = this._$AL; try { t7 = this.shouldUpdate(s5), t7 ? (this.willUpdate(s5), (_b3 = this._$EO) == null ? void 0 : _b3.forEach((t8) => { var _a7; return (_a7 = t8.hostUpdate) == null ? void 0 : _a7.call(t8); }), this.update(s5)) : this._$EU(); } catch (s6) { throw t7 = false, this._$EU(), s6; } t7 && this._$AE(s5); } willUpdate(t7) { } _$AE(t7) { var _a6; (_a6 = this._$EO) == null ? void 0 : _a6.forEach((t8) => { var _a7; return (_a7 = t8.hostUpdated) == null ? void 0 : _a7.call(t8); }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t7)), this.updated(t7); } _$EU() { this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false; } get updateComplete() { return this.getUpdateComplete(); } getUpdateComplete() { return this._$ES; } shouldUpdate(t7) { return true; } update(t7) { this._$Ej && (this._$Ej = this._$Ej.forEach((t8) => this._$EC(t8, this[t8]))), this._$EU(); } updated(t7) { } firstUpdated(t7) { } }; var _a2; b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d("elementProperties")] = /* @__PURE__ */ new Map(), b[d("finalized")] = /* @__PURE__ */ new Map(), p == null ? void 0 : p({ ReactiveElement: b }), ((_a2 = a.reactiveElementVersions) != null ? _a2 : a.reactiveElementVersions = []).push("2.0.4"); // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js var t2 = globalThis; var i3 = t2.trustedTypes; var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t7) => t7 }) : void 0; var e3 = "$lit$"; var h2 = `lit$${(Math.random() + "").slice(9)}$`; var o3 = "?" + h2; var n3 = `<${o3}>`; var r3 = document; var l2 = () => r3.createComment(""); var c3 = (t7) => null === t7 || "object" != typeof t7 && "function" != typeof t7; var a2 = Array.isArray; var u2 = (t7) => a2(t7) || "function" == typeof (t7 == null ? void 0 : t7[Symbol.iterator]); var d2 = "[ \n\f\r]"; var f2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g; var v = /-->/g; var _ = />/g; var m = RegExp(`>|${d2}(?:([^\\s"'>=/]+)(${d2}*=${d2}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"); var p2 = /'/g; var g = /"/g; var $ = /^(?:script|style|textarea|title)$/i; var y2 = (t7) => (i6, ...s5) => ({ _$litType$: t7, strings: i6, values: s5 }); var x = y2(1); var b2 = y2(2); var w = Symbol.for("lit-noChange"); var T = Symbol.for("lit-nothing"); var A = /* @__PURE__ */ new WeakMap(); var E = r3.createTreeWalker(r3, 129); function C(t7, i6) { if (!Array.isArray(t7) || !t7.hasOwnProperty("raw")) throw Error("invalid template strings array"); return void 0 !== s2 ? s2.createHTML(i6) : i6; } var P = (t7, i6) => { const s5 = t7.length - 1, o10 = []; let r8, l5 = 2 === i6 ? "" : "", c4 = f2; for (let i7 = 0; i7 < s5; i7++) { const s6 = t7[i7]; let a4, u5, d3 = -1, y3 = 0; for (; y3 < s6.length && (c4.lastIndex = y3, u5 = c4.exec(s6), null !== u5); ) y3 = c4.lastIndex, c4 === f2 ? "!--" === u5[1] ? c4 = v : void 0 !== u5[1] ? c4 = _ : void 0 !== u5[2] ? ($.test(u5[2]) && (r8 = RegExp("" === u5[0] ? (c4 = r8 != null ? r8 : f2, d3 = -1) : void 0 === u5[1] ? d3 = -2 : (d3 = c4.lastIndex - u5[2].length, a4 = u5[1], c4 = void 0 === u5[3] ? m : '"' === u5[3] ? g : p2) : c4 === g || c4 === p2 ? c4 = m : c4 === v || c4 === _ ? c4 = f2 : (c4 = m, r8 = void 0); const x2 = c4 === m && t7[i7 + 1].startsWith("/>") ? " " : ""; l5 += c4 === f2 ? s6 + n3 : d3 >= 0 ? (o10.push(a4), s6.slice(0, d3) + e3 + s6.slice(d3) + h2 + x2) : s6 + h2 + (-2 === d3 ? i7 : x2); } return [C(t7, l5 + (t7[s5] || "") + (2 === i6 ? "" : "")), o10]; }; var V = class { constructor({ strings: t7, _$litType$: s5 }, n7) { let r8; this.parts = []; let c4 = 0, a4 = 0; const u5 = t7.length - 1, d3 = this.parts, [f4, v2] = P(t7, s5); if (this.el = V.createElement(f4, n7), E.currentNode = this.el.content, 2 === s5) { const t8 = this.el.content.firstChild; t8.replaceWith(...t8.childNodes); } for (; null !== (r8 = E.nextNode()) && d3.length < u5; ) { if (1 === r8.nodeType) { if (r8.hasAttributes()) for (const t8 of r8.getAttributeNames()) if (t8.endsWith(e3)) { const i6 = v2[a4++], s6 = r8.getAttribute(t8).split(h2), e11 = /([.?@])?(.*)/.exec(i6); d3.push({ type: 1, index: c4, name: e11[2], strings: s6, ctor: "." === e11[1] ? k : "?" === e11[1] ? H : "@" === e11[1] ? I : R }), r8.removeAttribute(t8); } else t8.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r8.removeAttribute(t8)); if ($.test(r8.tagName)) { const t8 = r8.textContent.split(h2), s6 = t8.length - 1; if (s6 > 0) { r8.textContent = i3 ? i3.emptyScript : ""; for (let i6 = 0; i6 < s6; i6++) r8.append(t8[i6], l2()), E.nextNode(), d3.push({ type: 2, index: ++c4 }); r8.append(t8[s6], l2()); } } } else if (8 === r8.nodeType) if (r8.data === o3) d3.push({ type: 2, index: c4 }); else { let t8 = -1; for (; -1 !== (t8 = r8.data.indexOf(h2, t8 + 1)); ) d3.push({ type: 7, index: c4 }), t8 += h2.length - 1; } c4++; } } static createElement(t7, i6) { const s5 = r3.createElement("template"); return s5.innerHTML = t7, s5; } }; function N(t7, i6, s5 = t7, e11) { var _a6, _b2, _c; if (i6 === w) return i6; let h3 = void 0 !== e11 ? (_a6 = s5._$Co) == null ? void 0 : _a6[e11] : s5._$Cl; const o10 = c3(i6) ? void 0 : i6._$litDirective$; return (h3 == null ? void 0 : h3.constructor) !== o10 && ((_b2 = h3 == null ? void 0 : h3._$AO) == null ? void 0 : _b2.call(h3, false), void 0 === o10 ? h3 = void 0 : (h3 = new o10(t7), h3._$AT(t7, s5, e11)), void 0 !== e11 ? ((_c = s5._$Co) != null ? _c : s5._$Co = [])[e11] = h3 : s5._$Cl = h3), void 0 !== h3 && (i6 = N(t7, h3._$AS(t7, i6.values), h3, e11)), i6; } var S2 = class { constructor(t7, i6) { this._$AV = [], this._$AN = void 0, this._$AD = t7, this._$AM = i6; } get parentNode() { return this._$AM.parentNode; } get _$AU() { return this._$AM._$AU; } u(t7) { var _a6; const { el: { content: i6 }, parts: s5 } = this._$AD, e11 = ((_a6 = t7 == null ? void 0 : t7.creationScope) != null ? _a6 : r3).importNode(i6, true); E.currentNode = e11; let h3 = E.nextNode(), o10 = 0, n7 = 0, l5 = s5[0]; for (; void 0 !== l5; ) { if (o10 === l5.index) { let i7; 2 === l5.type ? i7 = new M(h3, h3.nextSibling, this, t7) : 1 === l5.type ? i7 = new l5.ctor(h3, l5.name, l5.strings, this, t7) : 6 === l5.type && (i7 = new L(h3, this, t7)), this._$AV.push(i7), l5 = s5[++n7]; } o10 !== (l5 == null ? void 0 : l5.index) && (h3 = E.nextNode(), o10++); } return E.currentNode = r3, e11; } p(t7) { let i6 = 0; for (const s5 of this._$AV) void 0 !== s5 && (void 0 !== s5.strings ? (s5._$AI(t7, s5, i6), i6 += s5.strings.length - 2) : s5._$AI(t7[i6])), i6++; } }; var M = class { get _$AU() { var _a6, _b2; return (_b2 = (_a6 = this._$AM) == null ? void 0 : _a6._$AU) != null ? _b2 : this._$Cv; } constructor(t7, i6, s5, e11) { var _a6; this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t7, this._$AB = i6, this._$AM = s5, this.options = e11, this._$Cv = (_a6 = e11 == null ? void 0 : e11.isConnected) != null ? _a6 : true; } get parentNode() { let t7 = this._$AA.parentNode; const i6 = this._$AM; return void 0 !== i6 && 11 === (t7 == null ? void 0 : t7.nodeType) && (t7 = i6.parentNode), t7; } get startNode() { return this._$AA; } get endNode() { return this._$AB; } _$AI(t7, i6 = this) { t7 = N(this, t7, i6), c3(t7) ? t7 === T || null == t7 || "" === t7 ? (this._$AH !== T && this._$AR(), this._$AH = T) : t7 !== this._$AH && t7 !== w && this._(t7) : void 0 !== t7._$litType$ ? this.$(t7) : void 0 !== t7.nodeType ? this.T(t7) : u2(t7) ? this.k(t7) : this._(t7); } S(t7) { return this._$AA.parentNode.insertBefore(t7, this._$AB); } T(t7) { this._$AH !== t7 && (this._$AR(), this._$AH = this.S(t7)); } _(t7) { this._$AH !== T && c3(this._$AH) ? this._$AA.nextSibling.data = t7 : this.T(r3.createTextNode(t7)), this._$AH = t7; } $(t7) { var _a6; const { values: i6, _$litType$: s5 } = t7, e11 = "number" == typeof s5 ? this._$AC(t7) : (void 0 === s5.el && (s5.el = V.createElement(C(s5.h, s5.h[0]), this.options)), s5); if (((_a6 = this._$AH) == null ? void 0 : _a6._$AD) === e11) this._$AH.p(i6); else { const t8 = new S2(e11, this), s6 = t8.u(this.options); t8.p(i6), this.T(s6), this._$AH = t8; } } _$AC(t7) { let i6 = A.get(t7.strings); return void 0 === i6 && A.set(t7.strings, i6 = new V(t7)), i6; } k(t7) { a2(this._$AH) || (this._$AH = [], this._$AR()); const i6 = this._$AH; let s5, e11 = 0; for (const h3 of t7) e11 === i6.length ? i6.push(s5 = new M(this.S(l2()), this.S(l2()), this, this.options)) : s5 = i6[e11], s5._$AI(h3), e11++; e11 < i6.length && (this._$AR(s5 && s5._$AB.nextSibling, e11), i6.length = e11); } _$AR(t7 = this._$AA.nextSibling, i6) { var _a6; for ((_a6 = this._$AP) == null ? void 0 : _a6.call(this, false, true, i6); t7 && t7 !== this._$AB; ) { const i7 = t7.nextSibling; t7.remove(), t7 = i7; } } setConnected(t7) { var _a6; void 0 === this._$AM && (this._$Cv = t7, (_a6 = this._$AP) == null ? void 0 : _a6.call(this, t7)); } }; var R = class { get tagName() { return this.element.tagName; } get _$AU() { return this._$AM._$AU; } constructor(t7, i6, s5, e11, h3) { this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t7, this.name = i6, this._$AM = e11, this.options = h3, s5.length > 2 || "" !== s5[0] || "" !== s5[1] ? (this._$AH = Array(s5.length - 1).fill(new String()), this.strings = s5) : this._$AH = T; } _$AI(t7, i6 = this, s5, e11) { const h3 = this.strings; let o10 = false; if (void 0 === h3) t7 = N(this, t7, i6, 0), o10 = !c3(t7) || t7 !== this._$AH && t7 !== w, o10 && (this._$AH = t7); else { const e12 = t7; let n7, r8; for (t7 = h3[0], n7 = 0; n7 < h3.length - 1; n7++) r8 = N(this, e12[s5 + n7], i6, n7), r8 === w && (r8 = this._$AH[n7]), o10 || (o10 = !c3(r8) || r8 !== this._$AH[n7]), r8 === T ? t7 = T : t7 !== T && (t7 += (r8 != null ? r8 : "") + h3[n7 + 1]), this._$AH[n7] = r8; } o10 && !e11 && this.j(t7); } j(t7) { t7 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t7 != null ? t7 : ""); } }; var k = class extends R { constructor() { super(...arguments), this.type = 3; } j(t7) { this.element[this.name] = t7 === T ? void 0 : t7; } }; var H = class extends R { constructor() { super(...arguments), this.type = 4; } j(t7) { this.element.toggleAttribute(this.name, !!t7 && t7 !== T); } }; var I = class extends R { constructor(t7, i6, s5, e11, h3) { super(t7, i6, s5, e11, h3), this.type = 5; } _$AI(t7, i6 = this) { var _a6; if ((t7 = (_a6 = N(this, t7, i6, 0)) != null ? _a6 : T) === w) return; const s5 = this._$AH, e11 = t7 === T && s5 !== T || t7.capture !== s5.capture || t7.once !== s5.once || t7.passive !== s5.passive, h3 = t7 !== T && (s5 === T || e11); e11 && this.element.removeEventListener(this.name, this, s5), h3 && this.element.addEventListener(this.name, this, t7), this._$AH = t7; } handleEvent(t7) { var _a6, _b2; "function" == typeof this._$AH ? this._$AH.call((_b2 = (_a6 = this.options) == null ? void 0 : _a6.host) != null ? _b2 : this.element, t7) : this._$AH.handleEvent(t7); } }; var L = class { constructor(t7, i6, s5) { this.element = t7, this.type = 6, this._$AN = void 0, this._$AM = i6, this.options = s5; } get _$AU() { return this._$AM._$AU; } _$AI(t7) { N(this, t7); } }; var z = { P: e3, A: h2, C: o3, M: 1, L: P, R: S2, D: u2, V: N, I: M, H: R, N: H, U: I, B: k, F: L }; var Z = t2.litHtmlPolyfillSupport; var _a3; Z == null ? void 0 : Z(V, M), ((_a3 = t2.litHtmlVersions) != null ? _a3 : t2.litHtmlVersions = []).push("3.1.2"); var j = (t7, i6, s5) => { var _a6, _b2; const e11 = (_a6 = s5 == null ? void 0 : s5.renderBefore) != null ? _a6 : i6; let h3 = e11._$litPart$; if (void 0 === h3) { const t8 = (_b2 = s5 == null ? void 0 : s5.renderBefore) != null ? _b2 : null; e11._$litPart$ = h3 = new M(i6.insertBefore(l2(), t8), t8, void 0, s5 != null ? s5 : {}); } return h3._$AI(t7), h3; }; // node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js var s3 = class extends b { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { var _a6, _b2; const t7 = super.createRenderRoot(); return (_b2 = (_a6 = this.renderOptions).renderBefore) != null ? _b2 : _a6.renderBefore = t7.firstChild, t7; } update(t7) { const i6 = this.render(); this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t7), this._$Do = j(i6, this.renderRoot, this.renderOptions); } connectedCallback() { var _a6; super.connectedCallback(), (_a6 = this._$Do) == null ? void 0 : _a6.setConnected(true); } disconnectedCallback() { var _a6; super.disconnectedCallback(), (_a6 = this._$Do) == null ? void 0 : _a6.setConnected(false); } render() { return w; } }; var _a4; s3._$litElement$ = true, s3["finalized", "finalized"] = true, (_a4 = globalThis.litElementHydrateSupport) == null ? void 0 : _a4.call(globalThis, { LitElement: s3 }); var r4 = globalThis.litElementPolyfillSupport; r4 == null ? void 0 : r4({ LitElement: s3 }); var _a5; ((_a5 = globalThis.litElementVersions) != null ? _a5 : globalThis.litElementVersions = []).push("4.0.4"); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js var spinner_styles_default = i` :host { --track-width: 2px; --track-color: rgb(128 128 128 / 25%); --indicator-color: var(--sl-color-primary-600); --speed: 2s; display: inline-flex; width: 1em; height: 1em; flex: none; } .spinner { flex: 1 1 auto; height: 100%; width: 100%; } .spinner__track, .spinner__indicator { fill: none; stroke-width: var(--track-width); r: calc(0.5em - var(--track-width) / 2); cx: 0.5em; cy: 0.5em; transform-origin: 50% 50%; } .spinner__track { stroke: var(--track-color); transform-origin: 0% 0%; } .spinner__indicator { stroke: var(--indicator-color); stroke-linecap: round; stroke-dasharray: 150% 75%; animation: spin var(--speed) linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); stroke-dasharray: 0.05em, 3em; } 50% { transform: rotate(450deg); stroke-dasharray: 1.375em, 1.375em; } 100% { transform: rotate(1080deg); stroke-dasharray: 0.05em, 3em; } } `; // node_modules/.pnpm/@shoelace-style+localize@3.1.2/node_modules/@shoelace-style/localize/dist/index.js var connectedElements = /* @__PURE__ */ new Set(); var documentElementObserver = new MutationObserver(update); var translations = /* @__PURE__ */ new Map(); var documentDirection = document.documentElement.dir || "ltr"; var documentLanguage = document.documentElement.lang || navigator.language; var fallback; documentElementObserver.observe(document.documentElement, { attributes: true, attributeFilter: ["dir", "lang"] }); function registerTranslation(...translation2) { translation2.map((t7) => { const code = t7.$code.toLowerCase(); if (translations.has(code)) { translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t7)); } else { translations.set(code, t7); } if (!fallback) { fallback = t7; } }); update(); } function update() { documentDirection = document.documentElement.dir || "ltr"; documentLanguage = document.documentElement.lang || navigator.language; [...connectedElements.keys()].map((el) => { if (typeof el.requestUpdate === "function") { el.requestUpdate(); } }); } var LocalizeController = class { constructor(host) { this.host = host; this.host.addController(this); } hostConnected() { connectedElements.add(this.host); } hostDisconnected() { connectedElements.delete(this.host); } dir() { return `${this.host.dir || documentDirection}`.toLowerCase(); } lang() { return `${this.host.lang || documentLanguage}`.toLowerCase(); } getTranslationData(lang) { var _a6, _b2; const locale = new Intl.Locale(lang.replace(/_/g, "-")); const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase(); const region = (_b2 = (_a6 = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a6 === void 0 ? void 0 : _a6.toLowerCase()) !== null && _b2 !== void 0 ? _b2 : ""; const primary = translations.get(`${language}-${region}`); const secondary = translations.get(language); return { locale, language, region, primary, secondary }; } exists(key, options) { var _a6; const { primary, secondary } = this.getTranslationData((_a6 = options.lang) !== null && _a6 !== void 0 ? _a6 : this.lang()); options = Object.assign({ includeFallback: false }, options); if (primary && primary[key] || secondary && secondary[key] || options.includeFallback && fallback && fallback[key]) { return true; } return false; } term(key, ...args) { const { primary, secondary } = this.getTranslationData(this.lang()); let term; if (primary && primary[key]) { term = primary[key]; } else if (secondary && secondary[key]) { term = secondary[key]; } else if (fallback && fallback[key]) { term = fallback[key]; } else { console.error(`No translation found for: ${String(key)}`); return String(key); } if (typeof term === "function") { return term(...args); } return term; } date(dateToFormat, options) { dateToFormat = new Date(dateToFormat); return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat); } number(numberToFormat, options) { numberToFormat = Number(numberToFormat); return isNaN(numberToFormat) ? "" : new Intl.NumberFormat(this.lang(), options).format(numberToFormat); } relativeTime(value, unit, options) { return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit); } }; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js var translation = { $code: "en", $name: "English", $dir: "ltr", carousel: "Carousel", clearEntry: "Clear entry", close: "Close", copied: "Copied", copy: "Copy", currentValue: "Current value", error: "Error", goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`, hidePassword: "Hide password", loading: "Loading", nextSlide: "Next slide", numOptionsSelected: (num) => { if (num === 0) return "No options selected"; if (num === 1) return "1 option selected"; return `${num} options selected`; }, previousSlide: "Previous slide", progress: "Progress", remove: "Remove", resize: "Resize", scrollToEnd: "Scroll to end", scrollToStart: "Scroll to start", selectAColorFromTheScreen: "Select a color from the screen", showPassword: "Show password", slideNum: (slide) => `Slide ${slide}`, toggleColorFormat: "Toggle color format" }; registerTranslation(translation); var en_default = translation; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLV3FVBR.js var LocalizeController2 = class extends LocalizeController { }; registerTranslation(en_default); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUVJKY7S.js var component_styles_default = i` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IFDWM6P4.js var __defProp2 = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp2 = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a4, b3) => { for (var prop in b3 || (b3 = {})) if (__hasOwnProp2.call(b3, prop)) __defNormalProp(a4, prop, b3[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b3)) { if (__propIsEnum.call(b3, prop)) __defNormalProp(a4, prop, b3[prop]); } return a4; }; var __spreadProps = (a4, b3) => __defProps(a4, __getOwnPropDescs(b3)); var __decorateClass = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc2(target, key) : target; for (var i6 = decorators.length - 1, decorator; i6 >= 0; i6--) if (decorator = decorators[i6]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) __defProp2(target, key, result); return result; }; // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js var o4 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f }; var r5 = (t7 = o4, e11, r8) => { const { kind: n7, metadata: i6 } = r8; let s5 = globalThis.litPropertyMetadata.get(i6); if (void 0 === s5 && globalThis.litPropertyMetadata.set(i6, s5 = /* @__PURE__ */ new Map()), s5.set(r8.name, t7), "accessor" === n7) { const { name: o10 } = r8; return { set(r9) { const n8 = e11.get.call(this); e11.set.call(this, r9), this.requestUpdate(o10, n8, t7); }, init(e12) { return void 0 !== e12 && this.P(o10, void 0, t7), e12; } }; } if ("setter" === n7) { const { name: o10 } = r8; return function(r9) { const n8 = this[o10]; e11.call(this, r9), this.requestUpdate(o10, n8, t7); }; } throw Error("Unsupported decorator location: " + n7); }; function n4(t7) { return (e11, o10) => "object" == typeof o10 ? r5(t7, e11, o10) : ((t8, e12, o11) => { const r8 = e12.hasOwnProperty(o11); return e12.constructor.createProperty(o11, r8 ? { ...t8, wrapped: true } : t8), r8 ? Object.getOwnPropertyDescriptor(e12, o11) : void 0; })(t7, e11, o10); } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js function r6(r8) { return n4({ ...r8, state: true, attribute: false }); } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/event-options.js function t3(t7) { return (n7, o10) => { const c4 = "function" == typeof n7 ? n7 : n7[o10]; Object.assign(c4, t7); }; } // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/base.js var e4 = (e11, t7, c4) => (c4.configurable = true, c4.enumerable = true, Reflect.decorate && "object" != typeof t7 && Object.defineProperty(e11, t7, c4), c4); // node_modules/.pnpm/@lit+reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js function e5(e11, r8) { return (n7, s5, i6) => { const o10 = (t7) => { var _a6, _b2; return (_b2 = (_a6 = t7.renderRoot) == null ? void 0 : _a6.querySelector(e11)) != null ? _b2 : null; }; if (r8) { const { get: e12, set: r9 } = "object" == typeof s5 ? n7 : i6 != null ? i6 : (() => { const t7 = Symbol(); return { get() { return this[t7]; }, set(e13) { this[t7] = e13; } }; })(); return e4(n7, s5, { get() { let t7 = e12.call(this); return void 0 === t7 && (t7 = o10(this), (null !== t7 || this.hasUpdated) && r9.call(this, t7)), t7; } }); } return e4(n7, s5, { get() { return o10(this); } }); }; } // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SFSTXCXC.js var ShoelaceElement = class extends s3 { constructor() { super(); Object.entries(this.constructor.dependencies).forEach(([name, component]) => { this.constructor.define(name, component); }); } emit(name, options) { const event = new CustomEvent(name, __spreadValues({ bubbles: true, cancelable: false, composed: true, detail: {} }, options)); this.dispatchEvent(event); return event; } /* eslint-enable */ static define(name, elementConstructor = this, options = {}) { const currentlyRegisteredConstructor = customElements.get(name); if (!currentlyRegisteredConstructor) { customElements.define(name, class extends elementConstructor { }, options); return; } let newVersion = " (unknown version)"; let existingVersion = newVersion; if ("version" in elementConstructor && elementConstructor.version) { newVersion = " v" + elementConstructor.version; } if ("version" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) { existingVersion = " v" + currentlyRegisteredConstructor.version; } if (newVersion && existingVersion && newVersion === existingVersion) { return; } console.warn( `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.` ); } }; ShoelaceElement.version = "2.15.0"; ShoelaceElement.dependencies = {}; __decorateClass([ n4() ], ShoelaceElement.prototype, "dir", 2); __decorateClass([ n4() ], ShoelaceElement.prototype, "lang", 2); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RADK4UXU.js var SlSpinner = class extends ShoelaceElement { constructor() { super(...arguments); this.localize = new LocalizeController2(this); } render() { return x` `; } }; SlSpinner.styles = [component_styles_default, spinner_styles_default]; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.KWPBDQ6I.js var formCollections = /* @__PURE__ */ new WeakMap(); var reportValidityOverloads = /* @__PURE__ */ new WeakMap(); var checkValidityOverloads = /* @__PURE__ */ new WeakMap(); var userInteractedControls = /* @__PURE__ */ new WeakSet(); var interactions = /* @__PURE__ */ new WeakMap(); var FormControlController = class { constructor(host, options) { this.handleFormData = (event) => { const disabled = this.options.disabled(this.host); const name = this.options.name(this.host); const value = this.options.value(this.host); const isButton = this.host.tagName.toLowerCase() === "sl-button"; if (this.host.isConnected && !disabled && !isButton && typeof name === "string" && name.length > 0 && typeof value !== "undefined") { if (Array.isArray(value)) { value.forEach((val) => { event.formData.append(name, val.toString()); }); } else { event.formData.append(name, value.toString()); } } }; this.handleFormSubmit = (event) => { var _a6; const disabled = this.options.disabled(this.host); const reportValidity = this.options.reportValidity; if (this.form && !this.form.noValidate) { (_a6 = formCollections.get(this.form)) == null ? void 0 : _a6.forEach((control) => { this.setUserInteracted(control, true); }); } if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) { event.preventDefault(); event.stopImmediatePropagation(); } }; this.handleFormReset = () => { this.options.setValue(this.host, this.options.defaultValue(this.host)); this.setUserInteracted(this.host, false); interactions.set(this.host, []); }; this.handleInteraction = (event) => { const emittedEvents = interactions.get(this.host); if (!emittedEvents.includes(event.type)) { emittedEvents.push(event.type); } if (emittedEvents.length === this.options.assumeInteractionOn.length) { this.setUserInteracted(this.host, true); } }; this.checkFormValidity = () => { if (this.form && !this.form.noValidate) { const elements = this.form.querySelectorAll("*"); for (const element of elements) { if (typeof element.checkValidity === "function") { if (!element.checkValidity()) { return false; } } } } return true; }; this.reportFormValidity = () => { if (this.form && !this.form.noValidate) { const elements = this.form.querySelectorAll("*"); for (const element of elements) { if (typeof element.reportValidity === "function") { if (!element.reportValidity()) { return false; } } } } return true; }; (this.host = host).addController(this); this.options = __spreadValues({ form: (input) => { const formId = input.form; if (formId) { const root = input.getRootNode(); const form = root.querySelector(`#${formId}`); if (form) { return form; } } return input.closest("form"); }, name: (input) => input.name, value: (input) => input.value, defaultValue: (input) => input.defaultValue, disabled: (input) => { var _a6; return (_a6 = input.disabled) != null ? _a6 : false; }, reportValidity: (input) => typeof input.reportValidity === "function" ? input.reportValidity() : true, checkValidity: (input) => typeof input.checkValidity === "function" ? input.checkValidity() : true, setValue: (input, value) => input.value = value, assumeInteractionOn: ["sl-input"] }, options); } hostConnected() { const form = this.options.form(this.host); if (form) { this.attachForm(form); } interactions.set(this.host, []); this.options.assumeInteractionOn.forEach((event) => { this.host.addEventListener(event, this.handleInteraction); }); } hostDisconnected() { this.detachForm(); interactions.delete(this.host); this.options.assumeInteractionOn.forEach((event) => { this.host.removeEventListener(event, this.handleInteraction); }); } hostUpdated() { const form = this.options.form(this.host); if (!form) { this.detachForm(); } if (form && this.form !== form) { this.detachForm(); this.attachForm(form); } if (this.host.hasUpdated) { this.setValidity(this.host.validity.valid); } } attachForm(form) { if (form) { this.form = form; if (formCollections.has(this.form)) { formCollections.get(this.form).add(this.host); } else { formCollections.set(this.form, /* @__PURE__ */ new Set([this.host])); } this.form.addEventListener("formdata", this.handleFormData); this.form.addEventListener("submit", this.handleFormSubmit); this.form.addEventListener("reset", this.handleFormReset); if (!reportValidityOverloads.has(this.form)) { reportValidityOverloads.set(this.form, this.form.reportValidity); this.form.reportValidity = () => this.reportFormValidity(); } if (!checkValidityOverloads.has(this.form)) { checkValidityOverloads.set(this.form, this.form.checkValidity); this.form.checkValidity = () => this.checkFormValidity(); } } else { this.form = void 0; } } detachForm() { if (!this.form) return; const formCollection = formCollections.get(this.form); if (!formCollection) { return; } formCollection.delete(this.host); if (formCollection.size <= 0) { this.form.removeEventListener("formdata", this.handleFormData); this.form.removeEventListener("submit", this.handleFormSubmit); this.form.removeEventListener("reset", this.handleFormReset); if (reportValidityOverloads.has(this.form)) { this.form.reportValidity = reportValidityOverloads.get(this.form); reportValidityOverloads.delete(this.form); } if (checkValidityOverloads.has(this.form)) { this.form.checkValidity = checkValidityOverloads.get(this.form); checkValidityOverloads.delete(this.form); } this.form = void 0; } } setUserInteracted(el, hasInteracted) { if (hasInteracted) { userInteractedControls.add(el); } else { userInteractedControls.delete(el); } el.requestUpdate(); } doAction(type, submitter) { if (this.form) { const button = document.createElement("button"); button.type = type; button.style.position = "absolute"; button.style.width = "0"; button.style.height = "0"; button.style.clipPath = "inset(50%)"; button.style.overflow = "hidden"; button.style.whiteSpace = "nowrap"; if (submitter) { button.name = submitter.name; button.value = submitter.value; ["formaction", "formenctype", "formmethod", "formnovalidate", "formtarget"].forEach((attr) => { if (submitter.hasAttribute(attr)) { button.setAttribute(attr, submitter.getAttribute(attr)); } }); } this.form.append(button); button.click(); button.remove(); } } /** Returns the associated `
` element, if one exists. */ getForm() { var _a6; return (_a6 = this.form) != null ? _a6 : null; } /** Resets the form, restoring all the control to their default value */ reset(submitter) { this.doAction("reset", submitter); } /** Submits the form, triggering validation and form data injection. */ submit(submitter) { this.doAction("submit", submitter); } /** * Synchronously sets the form control's validity. Call this when you know the future validity but need to update * the host element immediately, i.e. before Lit updates the component in the next update. */ setValidity(isValid) { const host = this.host; const hasInteracted = Boolean(userInteractedControls.has(host)); const required = Boolean(host.required); host.toggleAttribute("data-required", required); host.toggleAttribute("data-optional", !required); host.toggleAttribute("data-invalid", !isValid); host.toggleAttribute("data-valid", isValid); host.toggleAttribute("data-user-invalid", !isValid && hasInteracted); host.toggleAttribute("data-user-valid", isValid && hasInteracted); } /** * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything * that affects constraint validation changes so the component receives the correct validity states. */ updateValidity() { const host = this.host; this.setValidity(host.validity.valid); } /** * Dispatches a non-bubbling, cancelable custom event of type `sl-invalid`. * If the `sl-invalid` event will be cancelled then the original `invalid` * event (which may have been passed as argument) will also be cancelled. * If no original `invalid` event has been passed then the `sl-invalid` * event will be cancelled before being dispatched. */ emitInvalidEvent(originalInvalidEvent) { const slInvalidEvent = new CustomEvent("sl-invalid", { bubbles: false, composed: false, cancelable: true, detail: {} }); if (!originalInvalidEvent) { slInvalidEvent.preventDefault(); } if (!this.host.dispatchEvent(slInvalidEvent)) { originalInvalidEvent == null ? void 0 : originalInvalidEvent.preventDefault(); } } }; var validValidityState = Object.freeze({ badInput: false, customError: false, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false, stepMismatch: false, tooLong: false, tooShort: false, typeMismatch: false, valid: true, valueMissing: false }); var valueMissingValidityState = Object.freeze(__spreadProps(__spreadValues({}, validValidityState), { valid: false, valueMissing: true })); var customErrorValidityState = Object.freeze(__spreadProps(__spreadValues({}, validValidityState), { valid: false, customError: true })); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HLDU3ZPH.js var button_styles_default = i` :host { display: inline-block; position: relative; width: auto; cursor: pointer; } .button { display: inline-flex; align-items: stretch; justify-content: center; width: 100%; border-style: solid; border-width: var(--sl-input-border-width); font-family: var(--sl-input-font-family); font-weight: var(--sl-font-weight-semibold); text-decoration: none; user-select: none; -webkit-user-select: none; white-space: nowrap; vertical-align: middle; padding: 0; transition: var(--sl-transition-x-fast) background-color, var(--sl-transition-x-fast) color, var(--sl-transition-x-fast) border, var(--sl-transition-x-fast) box-shadow; cursor: inherit; } .button::-moz-focus-inner { border: 0; } .button:focus { outline: none; } .button:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .button--disabled { opacity: 0.5; cursor: not-allowed; } /* When disabled, prevent mouse events from bubbling up from children */ .button--disabled * { pointer-events: none; } .button__prefix, .button__suffix { flex: 0 0 auto; display: flex; align-items: center; pointer-events: none; } .button__label { display: inline-block; } .button__label::slotted(sl-icon) { vertical-align: -2px; } /* * Standard buttons */ /* Default */ .button--standard.button--default { background-color: var(--sl-color-neutral-0); border-color: var(--sl-color-neutral-300); color: var(--sl-color-neutral-700); } .button--standard.button--default:hover:not(.button--disabled) { background-color: var(--sl-color-primary-50); border-color: var(--sl-color-primary-300); color: var(--sl-color-primary-700); } .button--standard.button--default:active:not(.button--disabled) { background-color: var(--sl-color-primary-100); border-color: var(--sl-color-primary-400); color: var(--sl-color-primary-700); } /* Primary */ .button--standard.button--primary { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--standard.button--primary:hover:not(.button--disabled) { background-color: var(--sl-color-primary-500); border-color: var(--sl-color-primary-500); color: var(--sl-color-neutral-0); } .button--standard.button--primary:active:not(.button--disabled) { background-color: var(--sl-color-primary-600); border-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } /* Success */ .button--standard.button--success { background-color: var(--sl-color-success-600); border-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } .button--standard.button--success:hover:not(.button--disabled) { background-color: var(--sl-color-success-500); border-color: var(--sl-color-success-500); color: var(--sl-color-neutral-0); } .button--standard.button--success:active:not(.button--disabled) { background-color: var(--sl-color-success-600); border-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } /* Neutral */ .button--standard.button--neutral { background-color: var(--sl-color-neutral-600); border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } .button--standard.button--neutral:hover:not(.button--disabled) { background-color: var(--sl-color-neutral-500); border-color: var(--sl-color-neutral-500); color: var(--sl-color-neutral-0); } .button--standard.button--neutral:active:not(.button--disabled) { background-color: var(--sl-color-neutral-600); border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } /* Warning */ .button--standard.button--warning { background-color: var(--sl-color-warning-600); border-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } .button--standard.button--warning:hover:not(.button--disabled) { background-color: var(--sl-color-warning-500); border-color: var(--sl-color-warning-500); color: var(--sl-color-neutral-0); } .button--standard.button--warning:active:not(.button--disabled) { background-color: var(--sl-color-warning-600); border-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } /* Danger */ .button--standard.button--danger { background-color: var(--sl-color-danger-600); border-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } .button--standard.button--danger:hover:not(.button--disabled) { background-color: var(--sl-color-danger-500); border-color: var(--sl-color-danger-500); color: var(--sl-color-neutral-0); } .button--standard.button--danger:active:not(.button--disabled) { background-color: var(--sl-color-danger-600); border-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } /* * Outline buttons */ .button--outline { background: none; border: solid 1px; } /* Default */ .button--outline.button--default { border-color: var(--sl-color-neutral-300); color: var(--sl-color-neutral-700); } .button--outline.button--default:hover:not(.button--disabled), .button--outline.button--default.button--checked:not(.button--disabled) { border-color: var(--sl-color-primary-600); background-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--outline.button--default:active:not(.button--disabled) { border-color: var(--sl-color-primary-700); background-color: var(--sl-color-primary-700); color: var(--sl-color-neutral-0); } /* Primary */ .button--outline.button--primary { border-color: var(--sl-color-primary-600); color: var(--sl-color-primary-600); } .button--outline.button--primary:hover:not(.button--disabled), .button--outline.button--primary.button--checked:not(.button--disabled) { background-color: var(--sl-color-primary-600); color: var(--sl-color-neutral-0); } .button--outline.button--primary:active:not(.button--disabled) { border-color: var(--sl-color-primary-700); background-color: var(--sl-color-primary-700); color: var(--sl-color-neutral-0); } /* Success */ .button--outline.button--success { border-color: var(--sl-color-success-600); color: var(--sl-color-success-600); } .button--outline.button--success:hover:not(.button--disabled), .button--outline.button--success.button--checked:not(.button--disabled) { background-color: var(--sl-color-success-600); color: var(--sl-color-neutral-0); } .button--outline.button--success:active:not(.button--disabled) { border-color: var(--sl-color-success-700); background-color: var(--sl-color-success-700); color: var(--sl-color-neutral-0); } /* Neutral */ .button--outline.button--neutral { border-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-600); } .button--outline.button--neutral:hover:not(.button--disabled), .button--outline.button--neutral.button--checked:not(.button--disabled) { background-color: var(--sl-color-neutral-600); color: var(--sl-color-neutral-0); } .button--outline.button--neutral:active:not(.button--disabled) { border-color: var(--sl-color-neutral-700); background-color: var(--sl-color-neutral-700); color: var(--sl-color-neutral-0); } /* Warning */ .button--outline.button--warning { border-color: var(--sl-color-warning-600); color: var(--sl-color-warning-600); } .button--outline.button--warning:hover:not(.button--disabled), .button--outline.button--warning.button--checked:not(.button--disabled) { background-color: var(--sl-color-warning-600); color: var(--sl-color-neutral-0); } .button--outline.button--warning:active:not(.button--disabled) { border-color: var(--sl-color-warning-700); background-color: var(--sl-color-warning-700); color: var(--sl-color-neutral-0); } /* Danger */ .button--outline.button--danger { border-color: var(--sl-color-danger-600); color: var(--sl-color-danger-600); } .button--outline.button--danger:hover:not(.button--disabled), .button--outline.button--danger.button--checked:not(.button--disabled) { background-color: var(--sl-color-danger-600); color: var(--sl-color-neutral-0); } .button--outline.button--danger:active:not(.button--disabled) { border-color: var(--sl-color-danger-700); background-color: var(--sl-color-danger-700); color: var(--sl-color-neutral-0); } @media (forced-colors: active) { .button.button--outline.button--checked:not(.button--disabled) { outline: solid 2px transparent; } } /* * Text buttons */ .button--text { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-600); } .button--text:hover:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-500); } .button--text:focus-visible:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-500); } .button--text:active:not(.button--disabled) { background-color: transparent; border-color: transparent; color: var(--sl-color-primary-700); } /* * Size modifiers */ .button--small { height: auto; min-height: var(--sl-input-height-small); font-size: var(--sl-button-font-size-small); line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-small); } .button--medium { height: auto; min-height: var(--sl-input-height-medium); font-size: var(--sl-button-font-size-medium); line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-medium); } .button--large { height: auto; min-height: var(--sl-input-height-large); font-size: var(--sl-button-font-size-large); line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2); border-radius: var(--sl-input-border-radius-large); } /* * Pill modifier */ .button--pill.button--small { border-radius: var(--sl-input-height-small); } .button--pill.button--medium { border-radius: var(--sl-input-height-medium); } .button--pill.button--large { border-radius: var(--sl-input-height-large); } /* * Circle modifier */ .button--circle { padding-left: 0; padding-right: 0; } .button--circle.button--small { width: var(--sl-input-height-small); border-radius: 50%; } .button--circle.button--medium { width: var(--sl-input-height-medium); border-radius: 50%; } .button--circle.button--large { width: var(--sl-input-height-large); border-radius: 50%; } .button--circle .button__prefix, .button--circle .button__suffix, .button--circle .button__caret { display: none; } /* * Caret modifier */ .button--caret .button__suffix { display: none; } .button--caret .button__caret { height: auto; } /* * Loading modifier */ .button--loading { position: relative; cursor: wait; } .button--loading .button__prefix, .button--loading .button__label, .button--loading .button__suffix, .button--loading .button__caret { visibility: hidden; } .button--loading sl-spinner { --indicator-color: currentColor; position: absolute; font-size: 1em; height: 1em; width: 1em; top: calc(50% - 0.5em); left: calc(50% - 0.5em); } /* * Badges */ .button ::slotted(sl-badge) { position: absolute; top: 0; right: 0; translate: 50% -50%; pointer-events: none; } .button--rtl ::slotted(sl-badge) { right: auto; left: 0; translate: -50% -50%; } /* * Button spacing */ .button--has-label.button--small .button__label { padding: 0 var(--sl-spacing-small); } .button--has-label.button--medium .button__label { padding: 0 var(--sl-spacing-medium); } .button--has-label.button--large .button__label { padding: 0 var(--sl-spacing-large); } .button--has-prefix.button--small { padding-inline-start: var(--sl-spacing-x-small); } .button--has-prefix.button--small .button__label { padding-inline-start: var(--sl-spacing-x-small); } .button--has-prefix.button--medium { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--medium .button__label { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--large { padding-inline-start: var(--sl-spacing-small); } .button--has-prefix.button--large .button__label { padding-inline-start: var(--sl-spacing-small); } .button--has-suffix.button--small, .button--caret.button--small { padding-inline-end: var(--sl-spacing-x-small); } .button--has-suffix.button--small .button__label, .button--caret.button--small .button__label { padding-inline-end: var(--sl-spacing-x-small); } .button--has-suffix.button--medium, .button--caret.button--medium { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--medium .button__label, .button--caret.button--medium .button__label { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--large, .button--caret.button--large { padding-inline-end: var(--sl-spacing-small); } .button--has-suffix.button--large .button__label, .button--caret.button--large .button__label { padding-inline-end: var(--sl-spacing-small); } /* * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.). * This means buttons aren't always direct descendants of the button group, thus we can't target them with the * ::slotted selector. To work around this, the button group component does some magic to add these special classes to * buttons and we style them here instead. */ :host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button { border-start-end-radius: 0; border-end-end-radius: 0; } :host([data-sl-button-group__button--inner]) .button { border-radius: 0; } :host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button { border-start-start-radius: 0; border-end-start-radius: 0; } /* All except the first */ :host([data-sl-button-group__button]:not([data-sl-button-group__button--first])) { margin-inline-start: calc(-1 * var(--sl-input-border-width)); } /* Add a visual separator between solid buttons */ :host( [data-sl-button-group__button]:not( [data-sl-button-group__button--first], [data-sl-button-group__button--radio], [variant='default'] ):not(:hover) ) .button:after { content: ''; position: absolute; top: 0; inset-inline-start: 0; bottom: 0; border-left: solid 1px rgb(128 128 128 / 33%); mix-blend-mode: multiply; } /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */ :host([data-sl-button-group__button--hover]) { z-index: 1; } /* Focus and checked are always on top */ :host([data-sl-button-group__button--focus]), :host([data-sl-button-group__button[checked]]) { z-index: 2; } `; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NYIIDP5N.js var HasSlotController = class { constructor(host, ...slotNames) { this.slotNames = []; this.handleSlotChange = (event) => { const slot = event.target; if (this.slotNames.includes("[default]") && !slot.name || slot.name && this.slotNames.includes(slot.name)) { this.host.requestUpdate(); } }; (this.host = host).addController(this); this.slotNames = slotNames; } hasDefaultSlot() { return [...this.host.childNodes].some((node) => { if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== "") { return true; } if (node.nodeType === node.ELEMENT_NODE) { const el = node; const tagName = el.tagName.toLowerCase(); if (tagName === "sl-visually-hidden") { return false; } if (!el.hasAttribute("slot")) { return true; } } return false; }); } hasNamedSlot(name) { return this.host.querySelector(`:scope > [slot="${name}"]`) !== null; } test(slotName) { return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName); } hostConnected() { this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange); } hostDisconnected() { this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange); } }; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3Y6SB6QS.js var basePath = ""; function setBasePath(path) { basePath = path; } function getBasePath(subpath = "") { if (!basePath) { const scripts = [...document.getElementsByTagName("script")]; const configScript = scripts.find((script) => script.hasAttribute("data-shoelace")); if (configScript) { setBasePath(configScript.getAttribute("data-shoelace")); } else { const fallbackScript = scripts.find((s5) => { return /shoelace(\.min)?\.js($|\?)/.test(s5.src) || /shoelace-autoloader(\.min)?\.js($|\?)/.test(s5.src); }); let path = ""; if (fallbackScript) { path = fallbackScript.getAttribute("src"); } setBasePath(path.split("/").slice(0, -1).join("/")); } } return basePath.replace(/\/$/, "") + (subpath ? `/${subpath.replace(/^\//, "")}` : ``); } // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P7ZG6EMR.js var library = { name: "default", resolver: (name) => getBasePath(`assets/icons/${name}.svg`) }; var library_default_default = library; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3TFKS637.js var icons = { caret: ` `, check: ` `, "chevron-down": ` `, "chevron-left": ` `, "chevron-right": ` `, copy: ` `, eye: ` `, "eye-slash": ` `, eyedropper: ` `, "grip-vertical": ` `, indeterminate: ` `, "person-fill": ` `, "play-fill": ` `, "pause-fill": ` `, radio: ` `, "star-fill": ` `, "x-lg": ` `, "x-circle-fill": ` ` }; var systemLibrary = { name: "system", resolver: (name) => { if (name in icons) { return `data:image/svg+xml,${encodeURIComponent(icons[name])}`; } return ""; } }; var library_system_default = systemLibrary; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.ZL53POKZ.js var registry = [library_default_default, library_system_default]; var watchedIcons = []; function watchIcon(icon) { watchedIcons.push(icon); } function unwatchIcon(icon) { watchedIcons = watchedIcons.filter((el) => el !== icon); } function getIconLibrary(name) { return registry.find((lib) => lib.name === name); } // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.QLXRCYS4.js var icon_styles_default = i` :host { display: inline-block; width: 1em; height: 1em; box-sizing: content-box !important; } svg { display: block; height: 100%; width: 100%; } `; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.2FB5TK5H.js function watch(propertyName, options) { const resolvedOptions = __spreadValues({ waitUntilFirstUpdate: false }, options); return (proto, decoratedFnName) => { const { update: update2 } = proto; const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName]; proto.update = function(changedProps) { watchedProperties.forEach((property) => { const key = property; if (changedProps.has(key)) { const oldValue = changedProps.get(key); const newValue = this[key]; if (oldValue !== newValue) { if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) { this[decoratedFnName](oldValue, newValue); } } } }); update2.call(this, changedProps); }; }; } // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directive-helpers.js var { I: t4 } = z; var e6 = (o10, t7) => void 0 === t7 ? void 0 !== (o10 == null ? void 0 : o10._$litType$) : (o10 == null ? void 0 : o10._$litType$) === t7; var f3 = (o10) => void 0 === o10.strings; var u3 = {}; var m2 = (o10, t7 = u3) => o10._$AH = t7; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.H33C3MRM.js var CACHEABLE_ERROR = Symbol(); var RETRYABLE_ERROR = Symbol(); var parser; var iconCache = /* @__PURE__ */ new Map(); var SlIcon = class extends ShoelaceElement { constructor() { super(...arguments); this.initialRender = false; this.svg = null; this.label = ""; this.library = "default"; } /** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */ async resolveIcon(url, library2) { var _a6; let fileData; if (library2 == null ? void 0 : library2.spriteSheet) { this.svg = x` `; await this.updateComplete; const svg = this.shadowRoot.querySelector("[part='svg']"); if (typeof library2.mutator === "function") { library2.mutator(svg); } return this.svg; } try { fileData = await fetch(url, { mode: "cors" }); if (!fileData.ok) return fileData.status === 410 ? CACHEABLE_ERROR : RETRYABLE_ERROR; } catch (e11) { return RETRYABLE_ERROR; } try { const div = document.createElement("div"); div.innerHTML = await fileData.text(); const svg = div.firstElementChild; if (((_a6 = svg == null ? void 0 : svg.tagName) == null ? void 0 : _a6.toLowerCase()) !== "svg") return CACHEABLE_ERROR; if (!parser) parser = new DOMParser(); const doc = parser.parseFromString(svg.outerHTML, "text/html"); const svgEl = doc.body.querySelector("svg"); if (!svgEl) return CACHEABLE_ERROR; svgEl.part.add("svg"); return document.adoptNode(svgEl); } catch (e11) { return CACHEABLE_ERROR; } } connectedCallback() { super.connectedCallback(); watchIcon(this); } firstUpdated() { this.initialRender = true; this.setIcon(); } disconnectedCallback() { super.disconnectedCallback(); unwatchIcon(this); } getIconSource() { const library2 = getIconLibrary(this.library); if (this.name && library2) { return { url: library2.resolver(this.name), fromLibrary: true }; } return { url: this.src, fromLibrary: false }; } handleLabelChange() { const hasLabel = typeof this.label === "string" && this.label.length > 0; if (hasLabel) { this.setAttribute("role", "img"); this.setAttribute("aria-label", this.label); this.removeAttribute("aria-hidden"); } else { this.removeAttribute("role"); this.removeAttribute("aria-label"); this.setAttribute("aria-hidden", "true"); } } async setIcon() { var _a6; const { url, fromLibrary } = this.getIconSource(); const library2 = fromLibrary ? getIconLibrary(this.library) : void 0; if (!url) { this.svg = null; return; } let iconResolver = iconCache.get(url); if (!iconResolver) { iconResolver = this.resolveIcon(url, library2); iconCache.set(url, iconResolver); } if (!this.initialRender) { return; } const svg = await iconResolver; if (svg === RETRYABLE_ERROR) { iconCache.delete(url); } if (url !== this.getIconSource().url) { return; } if (e6(svg)) { this.svg = svg; return; } switch (svg) { case RETRYABLE_ERROR: case CACHEABLE_ERROR: this.svg = null; this.emit("sl-error"); break; default: this.svg = svg.cloneNode(true); (_a6 = library2 == null ? void 0 : library2.mutator) == null ? void 0 : _a6.call(library2, this.svg); this.emit("sl-load"); } } render() { return this.svg; } }; SlIcon.styles = [component_styles_default, icon_styles_default]; __decorateClass([ r6() ], SlIcon.prototype, "svg", 2); __decorateClass([ n4({ reflect: true }) ], SlIcon.prototype, "name", 2); __decorateClass([ n4() ], SlIcon.prototype, "src", 2); __decorateClass([ n4() ], SlIcon.prototype, "label", 2); __decorateClass([ n4({ reflect: true }) ], SlIcon.prototype, "library", 2); __decorateClass([ watch("label") ], SlIcon.prototype, "handleLabelChange", 1); __decorateClass([ watch(["name", "src", "library"]) ], SlIcon.prototype, "setIcon", 1); // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directive.js var t5 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }; var e7 = (t7) => (...e11) => ({ _$litDirective$: t7, values: e11 }); var i4 = class { constructor(t7) { } get _$AU() { return this._$AM._$AU; } _$AT(t7, e11, i6) { this._$Ct = t7, this._$AM = e11, this._$Ci = i6; } _$AS(t7, e11) { return this.update(t7, e11); } update(t7, e11) { return this.render(...e11); } }; // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js var e8 = e7(class extends i4 { constructor(t7) { var _a6; if (super(t7), t7.type !== t5.ATTRIBUTE || "class" !== t7.name || ((_a6 = t7.strings) == null ? void 0 : _a6.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); } render(t7) { return " " + Object.keys(t7).filter((s5) => t7[s5]).join(" ") + " "; } update(s5, [i6]) { var _a6, _b2; if (void 0 === this.st) { this.st = /* @__PURE__ */ new Set(), void 0 !== s5.strings && (this.nt = new Set(s5.strings.join(" ").split(/\s/).filter((t7) => "" !== t7))); for (const t7 in i6) i6[t7] && !((_a6 = this.nt) == null ? void 0 : _a6.has(t7)) && this.st.add(t7); return this.render(i6); } const r8 = s5.element.classList; for (const t7 of this.st) t7 in i6 || (r8.remove(t7), this.st.delete(t7)); for (const t7 in i6) { const s6 = !!i6[t7]; s6 === this.st.has(t7) || ((_b2 = this.nt) == null ? void 0 : _b2.has(t7)) || (s6 ? (r8.add(t7), this.st.add(t7)) : (r8.remove(t7), this.st.delete(t7))); } return w; } }); // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/static.js var e9 = Symbol.for(""); var o5 = (t7) => { if ((t7 == null ? void 0 : t7.r) === e9) return t7 == null ? void 0 : t7._$litStatic$; }; var s4 = (t7, ...r8) => ({ _$litStatic$: r8.reduce((r9, e11, o10) => r9 + ((t8) => { if (void 0 !== t8._$litStatic$) return t8._$litStatic$; throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t8}. Use 'unsafeStatic' to pass non-literal values, but take care to ensure page security.`); })(e11) + t7[o10 + 1], t7[0]), r: e9 }); var a3 = /* @__PURE__ */ new Map(); var l3 = (t7) => (r8, ...e11) => { const i6 = e11.length; let s5, l5; const n7 = [], u5 = []; let c4, $2 = 0, f4 = false; for (; $2 < i6; ) { for (c4 = r8[$2]; $2 < i6 && void 0 !== (l5 = e11[$2], s5 = o5(l5)); ) c4 += s5 + r8[++$2], f4 = true; $2 !== i6 && u5.push(l5), n7.push(c4), $2++; } if ($2 === i6 && n7.push(r8[i6]), f4) { const t8 = n7.join("$$lit$$"); void 0 === (r8 = a3.get(t8)) && (n7.raw = n7, a3.set(t8, r8 = n7)), e11 = u5; } return t7(r8, ...e11); }; var n5 = l3(x); var u4 = l3(b2); // node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js var o6 = (o10) => o10 != null ? o10 : T; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5SUGJ4EB.js var SlButton = class extends ShoelaceElement { constructor() { super(...arguments); this.formControlController = new FormControlController(this, { assumeInteractionOn: ["click"] }); this.hasSlotController = new HasSlotController(this, "[default]", "prefix", "suffix"); this.localize = new LocalizeController2(this); this.hasFocus = false; this.invalid = false; this.title = ""; this.variant = "default"; this.size = "medium"; this.caret = false; this.disabled = false; this.loading = false; this.outline = false; this.pill = false; this.circle = false; this.type = "button"; this.name = ""; this.value = ""; this.href = ""; this.rel = "noreferrer noopener"; } /** Gets the validity state object */ get validity() { if (this.isButton()) { return this.button.validity; } return validValidityState; } /** Gets the validation message */ get validationMessage() { if (this.isButton()) { return this.button.validationMessage; } return ""; } firstUpdated() { if (this.isButton()) { this.formControlController.updateValidity(); } } handleBlur() { this.hasFocus = false; this.emit("sl-blur"); } handleFocus() { this.hasFocus = true; this.emit("sl-focus"); } handleClick() { if (this.type === "submit") { this.formControlController.submit(this); } if (this.type === "reset") { this.formControlController.reset(this); } } handleInvalid(event) { this.formControlController.setValidity(false); this.formControlController.emitInvalidEvent(event); } isButton() { return this.href ? false : true; } isLink() { return this.href ? true : false; } handleDisabledChange() { if (this.isButton()) { this.formControlController.setValidity(this.disabled); } } /** Simulates a click on the button. */ click() { this.button.click(); } /** Sets focus on the button. */ focus(options) { this.button.focus(options); } /** Removes focus from the button. */ blur() { this.button.blur(); } /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */ checkValidity() { if (this.isButton()) { return this.button.checkValidity(); } return true; } /** Gets the associated form, if one exists. */ getForm() { return this.formControlController.getForm(); } /** Checks for validity and shows the browser's validation message if the control is invalid. */ reportValidity() { if (this.isButton()) { return this.button.reportValidity(); } return true; } /** Sets a custom validation message. Pass an empty string to restore validity. */ setCustomValidity(message) { if (this.isButton()) { this.button.setCustomValidity(message); this.formControlController.updateValidity(); } } render() { const isLink = this.isLink(); const tag = isLink ? s4`a` : s4`button`; return n5` <${tag} part="base" class=${e8({ button: true, "button--default": this.variant === "default", "button--primary": this.variant === "primary", "button--success": this.variant === "success", "button--neutral": this.variant === "neutral", "button--warning": this.variant === "warning", "button--danger": this.variant === "danger", "button--text": this.variant === "text", "button--small": this.size === "small", "button--medium": this.size === "medium", "button--large": this.size === "large", "button--caret": this.caret, "button--circle": this.circle, "button--disabled": this.disabled, "button--focused": this.hasFocus, "button--loading": this.loading, "button--standard": !this.outline, "button--outline": this.outline, "button--pill": this.pill, "button--rtl": this.localize.dir() === "rtl", "button--has-label": this.hasSlotController.test("[default]"), "button--has-prefix": this.hasSlotController.test("prefix"), "button--has-suffix": this.hasSlotController.test("suffix") })} ?disabled=${o6(isLink ? void 0 : this.disabled)} type=${o6(isLink ? void 0 : this.type)} title=${this.title} name=${o6(isLink ? void 0 : this.name)} value=${o6(isLink ? void 0 : this.value)} href=${o6(isLink ? this.href : void 0)} target=${o6(isLink ? this.target : void 0)} download=${o6(isLink ? this.download : void 0)} rel=${o6(isLink ? this.rel : void 0)} role=${o6(isLink ? void 0 : "button")} aria-disabled=${this.disabled ? "true" : "false"} tabindex=${this.disabled ? "-1" : "0"} @blur=${this.handleBlur} @focus=${this.handleFocus} @invalid=${this.isButton() ? this.handleInvalid : null} @click=${this.handleClick} > ${this.caret ? n5` ` : ""} ${this.loading ? n5`` : ""} `; } }; SlButton.styles = [component_styles_default, button_styles_default]; SlButton.dependencies = { "sl-icon": SlIcon, "sl-spinner": SlSpinner }; __decorateClass([ e5(".button") ], SlButton.prototype, "button", 2); __decorateClass([ r6() ], SlButton.prototype, "hasFocus", 2); __decorateClass([ r6() ], SlButton.prototype, "invalid", 2); __decorateClass([ n4() ], SlButton.prototype, "title", 2); __decorateClass([ n4({ reflect: true }) ], SlButton.prototype, "variant", 2); __decorateClass([ n4({ reflect: true }) ], SlButton.prototype, "size", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "caret", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "disabled", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "loading", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "outline", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "pill", 2); __decorateClass([ n4({ type: Boolean, reflect: true }) ], SlButton.prototype, "circle", 2); __decorateClass([ n4() ], SlButton.prototype, "type", 2); __decorateClass([ n4() ], SlButton.prototype, "name", 2); __decorateClass([ n4() ], SlButton.prototype, "value", 2); __decorateClass([ n4() ], SlButton.prototype, "href", 2); __decorateClass([ n4() ], SlButton.prototype, "target", 2); __decorateClass([ n4() ], SlButton.prototype, "rel", 2); __decorateClass([ n4() ], SlButton.prototype, "download", 2); __decorateClass([ n4() ], SlButton.prototype, "form", 2); __decorateClass([ n4({ attribute: "formaction" }) ], SlButton.prototype, "formAction", 2); __decorateClass([ n4({ attribute: "formenctype" }) ], SlButton.prototype, "formEnctype", 2); __decorateClass([ n4({ attribute: "formmethod" }) ], SlButton.prototype, "formMethod", 2); __decorateClass([ n4({ attribute: "formnovalidate", type: Boolean }) ], SlButton.prototype, "formNoValidate", 2); __decorateClass([ n4({ attribute: "formtarget" }) ], SlButton.prototype, "formTarget", 2); __decorateClass([ watch("disabled", { waitUntilFirstUpdate: true }) ], SlButton.prototype, "handleDisabledChange", 1); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7XIC3PQE.js SlButton.define("sl-button"); // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXP7GVU3.js var dropdown_styles_default = i` :host { display: inline-block; } .dropdown::part(popup) { z-index: var(--sl-z-index-dropdown); } .dropdown[data-current-placement^='top']::part(popup) { transform-origin: bottom; } .dropdown[data-current-placement^='bottom']::part(popup) { transform-origin: top; } .dropdown[data-current-placement^='left']::part(popup) { transform-origin: right; } .dropdown[data-current-placement^='right']::part(popup) { transform-origin: left; } .dropdown__trigger { display: block; } .dropdown__panel { font-family: var(--sl-font-sans); font-size: var(--sl-font-size-medium); font-weight: var(--sl-font-weight-normal); box-shadow: var(--sl-shadow-large); border-radius: var(--sl-border-radius-medium); pointer-events: none; } .dropdown--open .dropdown__panel { display: block; pointer-events: all; } /* When users slot a menu, make sure it conforms to the popup's auto-size */ ::slotted(sl-menu) { max-width: var(--auto-size-available-width) !important; max-height: var(--auto-size-available-height) !important; } `; // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LXDTFLWU.js var computedStyleMap = /* @__PURE__ */ new WeakMap(); function getCachedComputedStyle(el) { let computedStyle = computedStyleMap.get(el); if (!computedStyle) { computedStyle = window.getComputedStyle(el, null); computedStyleMap.set(el, computedStyle); } return computedStyle; } function isVisible(el) { if (typeof el.checkVisibility === "function") { return el.checkVisibility({ checkOpacity: false, checkVisibilityCSS: true }); } const computedStyle = getCachedComputedStyle(el); return computedStyle.visibility !== "hidden" && computedStyle.display !== "none"; } function isOverflowingAndTabbable(el) { const computedStyle = getCachedComputedStyle(el); const { overflowY, overflowX } = computedStyle; if (overflowY === "scroll" || overflowX === "scroll") { return true; } if (overflowY !== "auto" || overflowX !== "auto") { return false; } const isOverflowingY = el.scrollHeight > el.clientHeight; if (isOverflowingY && overflowY === "auto") { return true; } const isOverflowingX = el.scrollWidth > el.clientWidth; if (isOverflowingX && overflowX === "auto") { return true; } return false; } function isTabbable(el) { const tag = el.tagName.toLowerCase(); const tabindex = Number(el.getAttribute("tabindex")); const hasTabindex = el.hasAttribute("tabindex"); if (hasTabindex && (isNaN(tabindex) || tabindex <= -1)) { return false; } if (el.hasAttribute("disabled")) { return false; } if (el.closest("[inert]")) { return false; } if (tag === "input" && el.getAttribute("type") === "radio" && !el.hasAttribute("checked")) { return false; } if (!isVisible(el)) { return false; } if ((tag === "audio" || tag === "video") && el.hasAttribute("controls")) { return true; } if (el.hasAttribute("tabindex")) { return true; } if (el.hasAttribute("contenteditable") && el.getAttribute("contenteditable") !== "false") { return true; } const isNativelyTabbable = [ "button", "input", "select", "textarea", "a", "audio", "video", "summary", "iframe" ].includes(tag); if (isNativelyTabbable) { return true; } return isOverflowingAndTabbable(el); } function getTabbableBoundary(root) { var _a6, _b2; const tabbableElements = getTabbableElements(root); const start = (_a6 = tabbableElements[0]) != null ? _a6 : null; const end = (_b2 = tabbableElements[tabbableElements.length - 1]) != null ? _b2 : null; return { start, end }; } function getSlottedChildrenOutsideRootElement(slotElement, root) { var _a6; return ((_a6 = slotElement.getRootNode({ composed: true })) == null ? void 0 : _a6.host) !== root; } function getTabbableElements(root) { const walkedEls = /* @__PURE__ */ new WeakMap(); const tabbableElements = []; function walk(el) { if (el instanceof Element) { if (el.hasAttribute("inert") || el.closest("[inert]")) { return; } if (walkedEls.has(el)) { return; } walkedEls.set(el, true); if (!tabbableElements.includes(el) && isTabbable(el)) { tabbableElements.push(el); } if (el instanceof HTMLSlotElement && getSlottedChildrenOutsideRootElement(el, root)) { el.assignedElements({ flatten: true }).forEach((assignedEl) => { walk(assignedEl); }); } if (el.shadowRoot !== null && el.shadowRoot.mode === "open") { walk(el.shadowRoot); } } for (const e11 of el.children) { walk(e11); } } walk(root); return tabbableElements.sort((a4, b3) => { const aTabindex = Number(a4.getAttribute("tabindex")) || 0; const bTabindex = Number(b3.getAttribute("tabindex")) || 0; return bTabindex - aTabindex; }); } // node_modules/.pnpm/@shoelace-style+shoelace@2.15.0_@types+react@18.3.1/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3KSWVBQ5.js var popup_styles_default = i` :host { --arrow-color: var(--sl-color-neutral-1000); --arrow-size: 6px; /* * These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant * 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating. */ --arrow-size-diagonal: calc(var(--arrow-size) * 0.7071); --arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size)); display: contents; } .popup { position: absolute; isolation: isolate; max-width: var(--auto-size-available-width, none); max-height: var(--auto-size-available-height, none); } .popup--fixed { position: fixed; } .popup:not(.popup--active) { display: none; } .popup__arrow { position: absolute; width: calc(var(--arrow-size-diagonal) * 2); height: calc(var(--arrow-size-diagonal) * 2); rotate: 45deg; background: var(--arrow-color); z-index: -1; } /* Hover bridge */ .popup-hover-bridge:not(.popup-hover-bridge--visible) { display: none; } .popup-hover-bridge { position: fixed; z-index: calc(var(--sl-z-index-dropdown) - 1); top: 0; right: 0; bottom: 0; left: 0; clip-path: polygon( var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0), var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0), var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0), var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0) ); } `; // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs var min = Math.min; var max = Math.max; var round = Math.round; var floor = Math.floor; var createCoords = (v2) => ({ x: v2, y: v2 }); var oppositeSideMap = { left: "right", right: "left", bottom: "top", top: "bottom" }; var oppositeAlignmentMap = { start: "end", end: "start" }; function clamp(start, value, end) { return max(start, min(value, end)); } function evaluate(value, param) { return typeof value === "function" ? value(param) : value; } function getSide(placement) { return placement.split("-")[0]; } function getAlignment(placement) { return placement.split("-")[1]; } function getOppositeAxis(axis) { return axis === "x" ? "y" : "x"; } function getAxisLength(axis) { return axis === "y" ? "height" : "width"; } function getSideAxis(placement) { return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x"; } function getAlignmentAxis(placement) { return getOppositeAxis(getSideAxis(placement)); } function getAlignmentSides(placement, rects, rtl) { if (rtl === void 0) { rtl = false; } const alignment = getAlignment(placement); const alignmentAxis = getAlignmentAxis(placement); const length = getAxisLength(alignmentAxis); let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; if (rects.reference[length] > rects.floating[length]) { mainAlignmentSide = getOppositePlacement(mainAlignmentSide); } return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; } function getExpandedPlacements(placement) { const oppositePlacement = getOppositePlacement(placement); return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; } function getOppositeAlignmentPlacement(placement) { return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]); } function getSideList(side, isStart, rtl) { const lr = ["left", "right"]; const rl = ["right", "left"]; const tb = ["top", "bottom"]; const bt = ["bottom", "top"]; switch (side) { case "top": case "bottom": if (rtl) return isStart ? rl : lr; return isStart ? lr : rl; case "left": case "right": return isStart ? tb : bt; default: return []; } } function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { const alignment = getAlignment(placement); let list = getSideList(getSide(placement), direction === "start", rtl); if (alignment) { list = list.map((side) => side + "-" + alignment); if (flipAlignment) { list = list.concat(list.map(getOppositeAlignmentPlacement)); } } return list; } function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]); } function expandPaddingObject(padding) { return { top: 0, right: 0, bottom: 0, left: 0, ...padding }; } function getPaddingObject(padding) { return typeof padding !== "number" ? expandPaddingObject(padding) : { top: padding, right: padding, bottom: padding, left: padding }; } function rectToClientRect(rect) { return { ...rect, top: rect.y, left: rect.x, right: rect.x + rect.width, bottom: rect.y + rect.height }; } // node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs function computeCoordsFromPlacement(_ref, placement, rtl) { let { reference, floating } = _ref; const sideAxis = getSideAxis(placement); const alignmentAxis = getAlignmentAxis(placement); const alignLength = getAxisLength(alignmentAxis); const side = getSide(placement); const isVertical = sideAxis === "y"; const commonX = reference.x + reference.width / 2 - floating.width / 2; const commonY = reference.y + reference.height / 2 - floating.height / 2; const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; let coords; switch (side) { case "top": coords = { x: commonX, y: reference.y - floating.height }; break; case "bottom": coords = { x: commonX, y: reference.y + reference.height }; break; case "right": coords = { x: reference.x + reference.width, y: commonY }; break; case "left": coords = { x: reference.x - floating.width, y: commonY }; break; default: coords = { x: reference.x, y: reference.y }; } switch (getAlignment(placement)) { case "start": coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); break; case "end": coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); break; } return coords; } var computePosition = async (reference, floating, config) => { const { placement = "bottom", strategy = "absolute", middleware = [], platform: platform2 } = config; const validMiddleware = middleware.filter(Boolean); const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating)); let rects = await platform2.getElementRects({ reference, floating, strategy }); let { x: x2, y: y3 } = computeCoordsFromPlacement(rects, placement, rtl); let statefulPlacement = placement; let middlewareData = {}; let resetCount = 0; for (let i6 = 0; i6 < validMiddleware.length; i6++) { const { name, fn } = validMiddleware[i6]; const { x: nextX, y: nextY, data, reset } = await fn({ x: x2, y: y3, initialPlacement: placement, placement: statefulPlacement, strategy, middlewareData, rects, platform: platform2, elements: { reference, floating } }); x2 = nextX != null ? nextX : x2; y3 = nextY != null ? nextY : y3; middlewareData = { ...middlewareData, [name]: { ...middlewareData[name], ...data } }; if (reset && resetCount <= 50) { resetCount++; if (typeof reset === "object") { if (reset.placement) { statefulPlacement = reset.placement; } if (reset.rects) { rects = reset.rects === true ? await platform2.getElementRects({ reference, floating, strategy }) : reset.rects; } ({ x: x2, y: y3 } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); } i6 = -1; } } return { x: x2, y: y3, placement: statefulPlacement, strategy, middlewareData }; }; async function detectOverflow(state, options) { var _await$platform$isEle; if (options === void 0) { options = {}; } const { x: x2, y: y3, platform: platform2, rects, elements, strategy } = state; const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state); const paddingObject = getPaddingObject(padding); const altContext = elementContext === "floating" ? "reference" : "floating"; const element = elements[altBoundary ? altContext : elementContext]; const clippingClientRect = rectToClientRect(await platform2.getClippingRect({ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)), boundary, rootBoundary, strategy })); const rect = elementContext === "floating" ? { ...rects.floating, x: x2, y: y3 } : rects.reference; const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating)); const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || { x: 1, y: 1 } : { x: 1, y: 1 }; const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({ elements, rect, offsetParent, strategy }) : rect); return { top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x }; } var arrow = (options) => ({ name: "arrow", options, async fn(state) { const { x: x2, y: y3, placement, rects, platform: platform2, elements, middlewareData } = state; const { element, padding = 0 } = evaluate(options, state) || {}; if (element == null) { return {}; } const paddingObject = getPaddingObject(padding); const coords = { x: x2, y: y3 }; const axis = getAlignmentAxis(placement); const length = getAxisLength(axis); const arrowDimensions = await platform2.getDimensions(element); const isYAxis = axis === "y"; const minProp = isYAxis ? "top" : "left"; const maxProp = isYAxis ? "bottom" : "right"; const clientProp = isYAxis ? "clientHeight" : "clientWidth"; const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; const startDiff = coords[axis] - rects.reference[axis]; const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element)); let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) { clientSize = elements.floating[clientProp] || rects.floating[length]; } const centerToReference = endDiff / 2 - startDiff / 2; const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; const minPadding = min(paddingObject[minProp], largestPossiblePadding); const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); const min$1 = minPadding; const max2 = clientSize - arrowDimensions[length] - maxPadding; const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; const offset2 = clamp(min$1, center, max2); const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0; return { [axis]: coords[axis] + alignmentOffset, data: { [axis]: offset2, centerOffset: center - offset2 - alignmentOffset, ...shouldAddOffset && { alignmentOffset } }, reset: shouldAddOffset }; } }); var flip = function(options) { if (options === void 0) { options = {}; } return { name: "flip", options, async fn(state) { var _middlewareData$arrow, _middlewareData$flip; const { placement, middlewareData, rects, initialPlacement, platform: platform2, elements } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state); if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } const side = getSide(placement); const isBasePlacement = getSide(initialPlacement) === initialPlacement; const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") { fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); } const placements2 = [initialPlacement, ...fallbackPlacements]; const overflow = await detectOverflow(state, detectOverflowOptions); const overflows = []; let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; if (checkMainAxis) { overflows.push(overflow[side]); } if (checkCrossAxis) { const sides2 = getAlignmentSides(placement, rects, rtl); overflows.push(overflow[sides2[0]], overflow[sides2[1]]); } overflowsData = [...overflowsData, { placement, overflows }]; if (!overflows.every((side2) => side2 <= 0)) { var _middlewareData$flip2, _overflowsData$filter; const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; const nextPlacement = placements2[nextIndex]; if (nextPlacement) { return { data: { index: nextIndex, overflows: overflowsData }, reset: { placement: nextPlacement } }; } let resetPlacement = (_overflowsData$filter = overflowsData.filter((d3) => d3.overflows[0] <= 0).sort((a4, b3) => a4.overflows[1] - b3.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; if (!resetPlacement) { switch (fallbackStrategy) { case "bestFit": { var _overflowsData$map$so; const placement2 = (_overflowsData$map$so = overflowsData.map((d3) => [d3.placement, d3.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a4, b3) => a4[1] - b3[1])[0]) == null ? void 0 : _overflowsData$map$so[0]; if (placement2) { resetPlacement = placement2; } break; } case "initialPlacement": resetPlacement = initialPlacement; break; } } if (placement !== resetPlacement) { return { reset: { placement: resetPlacement } }; } } return {}; } }; }; async function convertValueToCoords(state, options) { const { placement, platform: platform2, elements } = state; const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)); const side = getSide(placement); const alignment = getAlignment(placement); const isVertical = getSideAxis(placement) === "y"; const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1; const crossAxisMulti = rtl && isVertical ? -1 : 1; const rawValue = evaluate(options, state); let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? { mainAxis: rawValue, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...rawValue }; if (alignment && typeof alignmentAxis === "number") { crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; } return isVertical ? { x: crossAxis * crossAxisMulti, y: mainAxis * mainAxisMulti } : { x: mainAxis * mainAxisMulti, y: crossAxis * crossAxisMulti }; } var offset = function(options) { if (options === void 0) { options = 0; } return { name: "offset", options, async fn(state) { var _middlewareData$offse, _middlewareData$arrow; const { x: x2, y: y3, placement, middlewareData } = state; const diffCoords = await convertValueToCoords(state, options); if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { return {}; } return { x: x2 + diffCoords.x, y: y3 + diffCoords.y, data: { ...diffCoords, placement } }; } }; }; var shift = function(options) { if (options === void 0) { options = {}; } return { name: "shift", options, async fn(state) { const { x: x2, y: y3, placement } = state; const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => { let { x: x3, y: y4 } = _ref; return { x: x3, y: y4 }; } }, ...detectOverflowOptions } = evaluate(options, state); const coords = { x: x2, y: y3 }; const overflow = await detectOverflow(state, detectOverflowOptions); const crossAxis = getSideAxis(getSide(placement)); const mainAxis = getOppositeAxis(crossAxis); let mainAxisCoord = coords[mainAxis]; let crossAxisCoord = coords[crossAxis]; if (checkMainAxis) { const minSide = mainAxis === "y" ? "top" : "left"; const maxSide = mainAxis === "y" ? "bottom" : "right"; const min2 = mainAxisCoord + overflow[minSide]; const max2 = mainAxisCoord - overflow[maxSide]; mainAxisCoord = clamp(min2, mainAxisCoord, max2); } if (checkCrossAxis) { const minSide = crossAxis === "y" ? "top" : "left"; const maxSide = crossAxis === "y" ? "bottom" : "right"; const min2 = crossAxisCoord + overflow[minSide]; const max2 = crossAxisCoord - overflow[maxSide]; crossAxisCoord = clamp(min2, crossAxisCoord, max2); } const limitedCoords = limiter.fn({ ...state, [mainAxis]: mainAxisCoord, [crossAxis]: crossAxisCoord }); return { ...limitedCoords, data: { x: limitedCoords.x - x2, y: limitedCoords.y - y3 } }; } }; }; var size = function(options) { if (options === void 0) { options = {}; } return { name: "size", options, async fn(state) { const { placement, rects, platform: platform2, elements } = state; const { apply = () => { }, ...detectOverflowOptions } = evaluate(options, state); const overflow = await detectOverflow(state, detectOverflowOptions); const side = getSide(placement); const alignment = getAlignment(placement); const isYAxis = getSideAxis(placement) === "y"; const { width, height } = rects.floating; let heightSide; let widthSide; if (side === "top" || side === "bottom") { heightSide = side; widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right"; } else { widthSide = side; heightSide = alignment === "end" ? "top" : "bottom"; } const overflowAvailableHeight = height - overflow[heightSide]; const overflowAvailableWidth = width - overflow[widthSide]; const noShift = !state.middlewareData.shift; let availableHeight = overflowAvailableHeight; let availableWidth = overflowAvailableWidth; if (isYAxis) { const maximumClippingWidth = width - overflow.left - overflow.right; availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth; } else { const maximumClippingHeight = height - overflow.top - overflow.bottom; availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight; } if (noShift && !alignment) { const xMin = max(overflow.left, 0); const xMax = max(overflow.right, 0); const yMin = max(overflow.top, 0); const yMax = max(overflow.bottom, 0); if (isYAxis) { availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)); } else { availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom)); } } await apply({ ...state, availableWidth, availableHeight }); const nextDimensions = await platform2.getDimensions(elements.floating); if (width !== nextDimensions.width || height !== nextDimensions.height) { return { reset: { rects: true } }; } return {}; } }; }; // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs function getNodeName(node) { if (isNode(node)) { return (node.nodeName || "").toLowerCase(); } return "#document"; } function getWindow(node) { var _node$ownerDocument; return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; } function getDocumentElement(node) { var _ref; return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; } function isNode(value) { return value instanceof Node || value instanceof getWindow(value).Node; } function isElement(value) { return value instanceof Element || value instanceof getWindow(value).Element; } function isHTMLElement(value) { return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; } function isShadowRoot(value) { if (typeof ShadowRoot === "undefined") { return false; } return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; } function isOverflowElement(element) { const { overflow, overflowX, overflowY, display } = getComputedStyle2(element); return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display); } function isTableElement(element) { return ["table", "td", "th"].includes(getNodeName(element)); } function isContainingBlock(element) { const webkit = isWebKit(); const css = getComputedStyle2(element); return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value)); } function getContainingBlock(element) { let currentNode = getParentNode(element); while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { if (isContainingBlock(currentNode)) { return currentNode; } else { currentNode = getParentNode(currentNode); } } return null; } function isWebKit() { if (typeof CSS === "undefined" || !CSS.supports) return false; return CSS.supports("-webkit-backdrop-filter", "none"); } function isLastTraversableNode(node) { return ["html", "body", "#document"].includes(getNodeName(node)); } function getComputedStyle2(element) { return getWindow(element).getComputedStyle(element); } function getNodeScroll(element) { if (isElement(element)) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } return { scrollLeft: element.pageXOffset, scrollTop: element.pageYOffset }; } function getParentNode(node) { if (getNodeName(node) === "html") { return node; } const result = ( // Step into the shadow DOM of the parent of a slotted node. node.assignedSlot || // DOM Element detected. node.parentNode || // ShadowRoot detected. isShadowRoot(node) && node.host || // Fallback. getDocumentElement(node) ); return isShadowRoot(result) ? result.host : result; } function getNearestOverflowAncestor(node) { const parentNode = getParentNode(node); if (isLastTraversableNode(parentNode)) { return node.ownerDocument ? node.ownerDocument.body : node.body; } if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { return parentNode; } return getNearestOverflowAncestor(parentNode); } function getOverflowAncestors(node, list, traverseIframes) { var _node$ownerDocument2; if (list === void 0) { list = []; } if (traverseIframes === void 0) { traverseIframes = true; } const scrollableAncestor = getNearestOverflowAncestor(node); const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); const win = getWindow(scrollableAncestor); if (isBody) { return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); } return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); } // node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs function getCssDimensions(element) { const css = getComputedStyle2(element); let width = parseFloat(css.width) || 0; let height = parseFloat(css.height) || 0; const hasOffset = isHTMLElement(element); const offsetWidth = hasOffset ? element.offsetWidth : width; const offsetHeight = hasOffset ? element.offsetHeight : height; const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; if (shouldFallback) { width = offsetWidth; height = offsetHeight; } return { width, height, $: shouldFallback }; } function unwrapElement(element) { return !isElement(element) ? element.contextElement : element; } function getScale(element) { const domElement = unwrapElement(element); if (!isHTMLElement(domElement)) { return createCoords(1); } const rect = domElement.getBoundingClientRect(); const { width, height, $: $2 } = getCssDimensions(domElement); let x2 = ($2 ? round(rect.width) : rect.width) / width; let y3 = ($2 ? round(rect.height) : rect.height) / height; if (!x2 || !Number.isFinite(x2)) { x2 = 1; } if (!y3 || !Number.isFinite(y3)) { y3 = 1; } return { x: x2, y: y3 }; } var noOffsets = /* @__PURE__ */ createCoords(0); function getVisualOffsets(element) { const win = getWindow(element); if (!isWebKit() || !win.visualViewport) { return noOffsets; } return { x: win.visualViewport.offsetLeft, y: win.visualViewport.offsetTop }; } function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { if (isFixed === void 0) { isFixed = false; } if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { return false; } return isFixed; } function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { if (includeScale === void 0) { includeScale = false; } if (isFixedStrategy === void 0) { isFixedStrategy = false; } const clientRect = element.getBoundingClientRect(); const domElement = unwrapElement(element); let scale = createCoords(1); if (includeScale) { if (offsetParent) { if (isElement(offsetParent)) { scale = getScale(offsetParent); } } else { scale = getScale(element); } } const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); let x2 = (clientRect.left + visualOffsets.x) / scale.x; let y3 = (clientRect.top + visualOffsets.y) / scale.y; let width = clientRect.width / scale.x; let height = clientRect.height / scale.y; if (domElement) { const win = getWindow(domElement); const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent; let currentWin = win; let currentIFrame = currentWin.frameElement; while (currentIFrame && offsetParent && offsetWin !== currentWin) { const iframeScale = getScale(currentIFrame); const iframeRect = currentIFrame.getBoundingClientRect(); const css = getComputedStyle2(currentIFrame); const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; x2 *= iframeScale.x; y3 *= iframeScale.y; width *= iframeScale.x; height *= iframeScale.y; x2 += left; y3 += top; currentWin = getWindow(currentIFrame); currentIFrame = currentWin.frameElement; } } return rectToClientRect({ width, height, x: x2, y: y3 }); } var topLayerSelectors = [":popover-open", ":modal"]; function isTopLayer(floating) { return topLayerSelectors.some((selector) => { try { return floating.matches(selector); } catch (e11) { return false; } }); } function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { let { elements, rect, offsetParent, strategy } = _ref; const isFixed = strategy === "fixed"; const documentElement = getDocumentElement(offsetParent); const topLayer = elements ? isTopLayer(elements.floating) : false; if (offsetParent === documentElement || topLayer && isFixed) { return rect; } let scroll = { scrollLeft: 0, scrollTop: 0 }; let scale = createCoords(1); const offsets = createCoords(0); const isOffsetParentAnElement = isHTMLElement(offsetParent); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { const offsetRect = getBoundingClientRect(offsetParent); scale = getScale(offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } } return { width: rect.width * scale.x, height: rect.height * scale.y, x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y }; } function getClientRects(element) { return Array.from(element.getClientRects()); } function getWindowScrollBarX(element) { return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; } function getDocumentRect(element) { const html = getDocumentElement(element); const scroll = getNodeScroll(element); const body = element.ownerDocument.body; const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); let x2 = -scroll.scrollLeft + getWindowScrollBarX(element); const y3 = -scroll.scrollTop; if (getComputedStyle2(body).direction === "rtl") { x2 += max(html.clientWidth, body.clientWidth) - width; } return { width, height, x: x2, y: y3 }; } function getViewportRect(element, strategy) { const win = getWindow(element); const html = getDocumentElement(element); const visualViewport = win.visualViewport; let width = html.clientWidth; let height = html.clientHeight; let x2 = 0; let y3 = 0; if (visualViewport) { width = visualViewport.width; height = visualViewport.height; const visualViewportBased = isWebKit(); if (!visualViewportBased || visualViewportBased && strategy === "fixed") { x2 = visualViewport.offsetLeft; y3 = visualViewport.offsetTop; } } return { width, height, x: x2, y: y3 }; } function getInnerBoundingClientRect(element, strategy) { const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); const top = clientRect.top + element.clientTop; const left = clientRect.left + element.clientLeft; const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); const width = element.clientWidth * scale.x; const height = element.clientHeight * scale.y; const x2 = left * scale.x; const y3 = top * scale.y; return { width, height, x: x2, y: y3 }; } function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { let rect; if (clippingAncestor === "viewport") { rect = getViewportRect(element, strategy); } else if (clippingAncestor === "document") { rect = getDocumentRect(getDocumentElement(element)); } else if (isElement(clippingAncestor)) { rect = getInnerBoundingClientRect(clippingAncestor, strategy); } else { const visualOffsets = getVisualOffsets(element); rect = { ...clippingAncestor, x: clippingAncestor.x - visualOffsets.x, y: clippingAncestor.y - visualOffsets.y }; } return rectToClientRect(rect); } function hasFixedPositionAncestor(element, stopNode) { const parentNode = getParentNode(element); if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { return false; } return getComputedStyle2(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode); } function getClippingElementAncestors(element, cache) { const cachedResult = cache.get(element); if (cachedResult) { return cachedResult; } let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body"); let currentContainingBlockComputedStyle = null; const elementIsFixed = getComputedStyle2(element).position === "fixed"; let currentNode = elementIsFixed ? getParentNode(element) : element; while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { const computedStyle = getComputedStyle2(currentNode); const currentNodeIsContaining = isContainingBlock(currentNode); if (!currentNodeIsContaining && computedStyle.position === "fixed") { currentContainingBlockComputedStyle = null; } const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); if (shouldDropCurrentNode) { result = result.filter((ancestor) => ancestor !== currentNode); } else { currentContainingBlockComputedStyle = computedStyle; } currentNode = getParentNode(currentNode); } cache.set(element, result); return result; } function getClippingRect(_ref) { let { element, boundary, rootBoundary, strategy } = _ref; const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary); const clippingAncestors = [...elementClippingAncestors, rootBoundary]; const firstClippingAncestor = clippingAncestors[0]; const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); accRect.top = max(rect.top, accRect.top); accRect.right = min(rect.right, accRect.right); accRect.bottom = min(rect.bottom, accRect.bottom); accRect.left = max(rect.left, accRect.left); return accRect; }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); return { width: clippingRect.right - clippingRect.left, height: clippingRect.bottom - clippingRect.top, x: clippingRect.left, y: clippingRect.top }; } function getDimensions(element) { const { width, height } = getCssDimensions(element); return { width, height }; } function getRectRelativeToOffsetParent(element, offsetParent, strategy) { const isOffsetParentAnElement = isHTMLElement(offsetParent); const documentElement = getDocumentElement(offsetParent); const isFixed = strategy === "fixed"; const rect = getBoundingClientRect(element, true, isFixed, offsetParent); let scroll = { scrollLeft: 0, scrollTop: 0 }; const offsets = createCoords(0); if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isOffsetParentAnElement) { const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); offsets.x = offsetRect.x + offsetParent.clientLeft; offsets.y = offsetRect.y + offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX(documentElement); } } const x2 = rect.left + scroll.scrollLeft - offsets.x; const y3 = rect.top + scroll.scrollTop - offsets.y; return { x: x2, y: y3, width: rect.width, height: rect.height }; } function getTrueOffsetParent(element, polyfill) { if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") { return null; } if (polyfill) { return polyfill(element); } return element.offsetParent; } function getOffsetParent(element, polyfill) { const window2 = getWindow(element); if (!isHTMLElement(element) || isTopLayer(element)) { return window2; } let offsetParent = getTrueOffsetParent(element, polyfill); while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { offsetParent = getTrueOffsetParent(offsetParent, polyfill); } if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static" && !isContainingBlock(offsetParent))) { return window2; } return offsetParent || getContainingBlock(element) || window2; } var getElementRects = async function(data) { const getOffsetParentFn = this.getOffsetParent || getOffsetParent; const getDimensionsFn = this.getDimensions; return { reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), floating: { x: 0, y: 0, ...await getDimensionsFn(data.floating) } }; }; function isRTL(element) { return getComputedStyle2(element).direction === "rtl"; } var platform = { convertOffsetParentRelativeRectToViewportRelativeRect, getDocumentElement, getClippingRect, getOffsetParent, getElementRects, getClientRects, getDimensions, getScale, isElement, isRTL }; function observeMove(element, onMove) { let io = null; let timeoutId; const root = getDocumentElement(element); function cleanup() { var _io; clearTimeout(timeoutId); (_io = io) == null || _io.disconnect(); io = null; } function refresh(skip, threshold) { if (skip === void 0) { skip = false; } if (threshold === void 0) { threshold = 1; } cleanup(); const { left, top, width, height } = element.getBoundingClientRect(); if (!skip) { onMove(); } if (!width || !height) { return; } const insetTop = floor(top); const insetRight = floor(root.clientWidth - (left + width)); const insetBottom = floor(root.clientHeight - (top + height)); const insetLeft = floor(left); const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; const options = { rootMargin, threshold: max(0, min(1, threshold)) || 1 }; let isFirstUpdate = true; function handleObserve(entries) { const ratio = entries[0].intersectionRatio; if (ratio !== threshold) { if (!isFirstUpdate) { return refresh(); } if (!ratio) { timeoutId = setTimeout(() => { refresh(false, 1e-7); }, 100); } else { refresh(false, ratio); } } isFirstUpdate = false; } try { io = new IntersectionObserver(handleObserve, { ...options, // Handle