Removing cruft.

This commit is contained in:
Elf M. Sternberg 2025-01-20 16:03:38 -08:00
parent 141a7c0461
commit 97dde3bdfe
13 changed files with 0 additions and 2075 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

View File

@ -1,23 +0,0 @@
html, body {
overflow: hidden;
padding: 0;
margin: 0;
}
#fridgemagnets {
width: 100vw;
height: 100vh;
}
#fridge {
overflow: hidden;
width: 100vw;
background: url('pingbg.png') repeat;
}
#footer {
background-color: #32cd32;
width: 100vw;
height: 18ex;
}

View File

@ -1,939 +0,0 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i7 = decorators.length - 1, decorator; i7 >= 0; i7--)
if (decorator = decorators[i7])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp(target, key, result);
return result;
};
// 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(t5, e5, o6) {
if (this._$cssResult$ = true, o6 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t5, this.t = e5;
}
get styleSheet() {
let t5 = this.o;
const s3 = this.t;
if (e && void 0 === t5) {
const e5 = void 0 !== s3 && 1 === s3.length;
e5 && (t5 = o.get(s3)), void 0 === t5 && ((this.o = t5 = new CSSStyleSheet()).replaceSync(this.cssText), e5 && o.set(s3, t5));
}
return t5;
}
toString() {
return this.cssText;
}
};
var r = (t5) => new n("string" == typeof t5 ? t5 : t5 + "", void 0, s);
var i = (t5, ...e5) => {
const o6 = 1 === t5.length ? t5[0] : e5.reduce((e6, s3, o7) => e6 + ((t6) => {
if (true === t6._$cssResult$) return t6.cssText;
if ("number" == typeof t6) return t6;
throw Error("Value passed to 'css' function must be a 'css' function result: " + t6 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(s3) + t5[o7 + 1], t5[0]);
return new n(o6, t5, s);
};
var S = (s3, o6) => {
if (e) s3.adoptedStyleSheets = o6.map((t5) => t5 instanceof CSSStyleSheet ? t5 : t5.styleSheet);
else for (const e5 of o6) {
const o7 = document.createElement("style"), n6 = t.litNonce;
void 0 !== n6 && o7.setAttribute("nonce", n6), o7.textContent = e5.cssText, s3.appendChild(o7);
}
};
var c = e ? (t5) => t5 : (t5) => t5 instanceof CSSStyleSheet ? ((t6) => {
let e5 = "";
for (const s3 of t6.cssRules) e5 += s3.cssText;
return r(e5);
})(t5) : t5;
// 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 = (t5, s3) => t5;
var u = { toAttribute(t5, s3) {
switch (s3) {
case Boolean:
t5 = t5 ? l : null;
break;
case Object:
case Array:
t5 = null == t5 ? t5 : JSON.stringify(t5);
}
return t5;
}, fromAttribute(t5, s3) {
let i7 = t5;
switch (s3) {
case Boolean:
i7 = null !== t5;
break;
case Number:
i7 = null === t5 ? null : Number(t5);
break;
case Object:
case Array:
try {
i7 = JSON.parse(t5);
} catch (t6) {
i7 = null;
}
}
return i7;
} };
var f = (t5, s3) => !i2(t5, s3);
var y = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f };
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
var b = class extends HTMLElement {
static addInitializer(t5) {
this._$Ei(), (this.l ??= []).push(t5);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(t5, s3 = y) {
if (s3.state && (s3.attribute = false), this._$Ei(), this.elementProperties.set(t5, s3), !s3.noAccessor) {
const i7 = Symbol(), r6 = this.getPropertyDescriptor(t5, i7, s3);
void 0 !== r6 && e2(this.prototype, t5, r6);
}
}
static getPropertyDescriptor(t5, s3, i7) {
const { get: e5, set: h3 } = r2(this.prototype, t5) ?? { get() {
return this[s3];
}, set(t6) {
this[s3] = t6;
} };
return { get() {
return e5?.call(this);
}, set(s4) {
const r6 = e5?.call(this);
h3.call(this, s4), this.requestUpdate(t5, r6, i7);
}, configurable: true, enumerable: true };
}
static getPropertyOptions(t5) {
return this.elementProperties.get(t5) ?? y;
}
static _$Ei() {
if (this.hasOwnProperty(d("elementProperties"))) return;
const t5 = n2(this);
t5.finalize(), void 0 !== t5.l && (this.l = [...t5.l]), this.elementProperties = new Map(t5.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(d("finalized"))) return;
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
const t6 = this.properties, s3 = [...h(t6), ...o2(t6)];
for (const i7 of s3) this.createProperty(i7, t6[i7]);
}
const t5 = this[Symbol.metadata];
if (null !== t5) {
const s3 = litPropertyMetadata.get(t5);
if (void 0 !== s3) for (const [t6, i7] of s3) this.elementProperties.set(t6, i7);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t6, s3] of this.elementProperties) {
const i7 = this._$Eu(t6, s3);
void 0 !== i7 && this._$Eh.set(i7, t6);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(s3) {
const i7 = [];
if (Array.isArray(s3)) {
const e5 = new Set(s3.flat(1 / 0).reverse());
for (const s4 of e5) i7.unshift(c(s4));
} else void 0 !== s3 && i7.push(c(s3));
return i7;
}
static _$Eu(t5, s3) {
const i7 = s3.attribute;
return false === i7 ? void 0 : "string" == typeof i7 ? i7 : "string" == typeof t5 ? t5.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
}
_$Ev() {
this._$ES = new Promise((t5) => this.enableUpdating = t5), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t5) => t5(this));
}
addController(t5) {
(this._$EO ??= /* @__PURE__ */ new Set()).add(t5), void 0 !== this.renderRoot && this.isConnected && t5.hostConnected?.();
}
removeController(t5) {
this._$EO?.delete(t5);
}
_$E_() {
const t5 = /* @__PURE__ */ new Map(), s3 = this.constructor.elementProperties;
for (const i7 of s3.keys()) this.hasOwnProperty(i7) && (t5.set(i7, this[i7]), delete this[i7]);
t5.size > 0 && (this._$Ep = t5);
}
createRenderRoot() {
const t5 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return S(t5, this.constructor.elementStyles), t5;
}
connectedCallback() {
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t5) => t5.hostConnected?.());
}
enableUpdating(t5) {
}
disconnectedCallback() {
this._$EO?.forEach((t5) => t5.hostDisconnected?.());
}
attributeChangedCallback(t5, s3, i7) {
this._$AK(t5, i7);
}
_$EC(t5, s3) {
const i7 = this.constructor.elementProperties.get(t5), e5 = this.constructor._$Eu(t5, i7);
if (void 0 !== e5 && true === i7.reflect) {
const r6 = (void 0 !== i7.converter?.toAttribute ? i7.converter : u).toAttribute(s3, i7.type);
this._$Em = t5, null == r6 ? this.removeAttribute(e5) : this.setAttribute(e5, r6), this._$Em = null;
}
}
_$AK(t5, s3) {
const i7 = this.constructor, e5 = i7._$Eh.get(t5);
if (void 0 !== e5 && this._$Em !== e5) {
const t6 = i7.getPropertyOptions(e5), r6 = "function" == typeof t6.converter ? { fromAttribute: t6.converter } : void 0 !== t6.converter?.fromAttribute ? t6.converter : u;
this._$Em = e5, this[e5] = r6.fromAttribute(s3, t6.type), this._$Em = null;
}
}
requestUpdate(t5, s3, i7) {
if (void 0 !== t5) {
if (i7 ??= this.constructor.getPropertyOptions(t5), !(i7.hasChanged ?? f)(this[t5], s3)) return;
this.P(t5, s3, i7);
}
false === this.isUpdatePending && (this._$ES = this._$ET());
}
P(t5, s3, i7) {
this._$AL.has(t5) || this._$AL.set(t5, s3), true === i7.reflect && this._$Em !== t5 && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t5);
}
async _$ET() {
this.isUpdatePending = true;
try {
await this._$ES;
} catch (t6) {
Promise.reject(t6);
}
const t5 = this.scheduleUpdate();
return null != t5 && await t5, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
for (const [t7, s4] of this._$Ep) this[t7] = s4;
this._$Ep = void 0;
}
const t6 = this.constructor.elementProperties;
if (t6.size > 0) for (const [s4, i7] of t6) true !== i7.wrapped || this._$AL.has(s4) || void 0 === this[s4] || this.P(s4, this[s4], i7);
}
let t5 = false;
const s3 = this._$AL;
try {
t5 = this.shouldUpdate(s3), t5 ? (this.willUpdate(s3), this._$EO?.forEach((t6) => t6.hostUpdate?.()), this.update(s3)) : this._$EU();
} catch (s4) {
throw t5 = false, this._$EU(), s4;
}
t5 && this._$AE(s3);
}
willUpdate(t5) {
}
_$AE(t5) {
this._$EO?.forEach((t6) => t6.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t5)), this.updated(t5);
}
_$EU() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(t5) {
return true;
}
update(t5) {
this._$Ej &&= this._$Ej.forEach((t6) => this._$EC(t6, this[t6])), this._$EU();
}
updated(t5) {
}
firstUpdated(t5) {
}
};
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d("elementProperties")] = /* @__PURE__ */ new Map(), b[d("finalized")] = /* @__PURE__ */ new Map(), p?.({ ReactiveElement: b }), (a.reactiveElementVersions ??= []).push("2.0.4");
// node_modules/lit-html/lit-html.js
var t2 = globalThis;
var i3 = t2.trustedTypes;
var s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t5) => t5 }) : void 0;
var e3 = "$lit$";
var h2 = `lit$${Math.random().toFixed(9).slice(2)}$`;
var o3 = "?" + h2;
var n3 = `<${o3}>`;
var r3 = document;
var l2 = () => r3.createComment("");
var c3 = (t5) => null === t5 || "object" != typeof t5 && "function" != typeof t5;
var a2 = Array.isArray;
var u2 = (t5) => a2(t5) || "function" == typeof t5?.[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 = (t5) => (i7, ...s3) => ({ _$litType$: t5, strings: i7, values: s3 });
var x = y2(1);
var b2 = y2(2);
var w = y2(3);
var T = Symbol.for("lit-noChange");
var E = Symbol.for("lit-nothing");
var A = /* @__PURE__ */ new WeakMap();
var C = r3.createTreeWalker(r3, 129);
function P(t5, i7) {
if (!a2(t5) || !t5.hasOwnProperty("raw")) throw Error("invalid template strings array");
return void 0 !== s2 ? s2.createHTML(i7) : i7;
}
var V = (t5, i7) => {
const s3 = t5.length - 1, o6 = [];
let r6, l3 = 2 === i7 ? "<svg>" : 3 === i7 ? "<math>" : "", c4 = f2;
for (let i8 = 0; i8 < s3; i8++) {
const s4 = t5[i8];
let a3, u3, d3 = -1, y3 = 0;
for (; y3 < s4.length && (c4.lastIndex = y3, u3 = c4.exec(s4), null !== u3); ) y3 = c4.lastIndex, c4 === f2 ? "!--" === u3[1] ? c4 = v : void 0 !== u3[1] ? c4 = _ : void 0 !== u3[2] ? ($.test(u3[2]) && (r6 = RegExp("</" + u3[2], "g")), c4 = m) : void 0 !== u3[3] && (c4 = m) : c4 === m ? ">" === u3[0] ? (c4 = r6 ?? f2, d3 = -1) : void 0 === u3[1] ? d3 = -2 : (d3 = c4.lastIndex - u3[2].length, a3 = u3[1], c4 = void 0 === u3[3] ? m : '"' === u3[3] ? g : p2) : c4 === g || c4 === p2 ? c4 = m : c4 === v || c4 === _ ? c4 = f2 : (c4 = m, r6 = void 0);
const x2 = c4 === m && t5[i8 + 1].startsWith("/>") ? " " : "";
l3 += c4 === f2 ? s4 + n3 : d3 >= 0 ? (o6.push(a3), s4.slice(0, d3) + e3 + s4.slice(d3) + h2 + x2) : s4 + h2 + (-2 === d3 ? i8 : x2);
}
return [P(t5, l3 + (t5[s3] || "<?>") + (2 === i7 ? "</svg>" : 3 === i7 ? "</math>" : "")), o6];
};
var N = class _N {
constructor({ strings: t5, _$litType$: s3 }, n6) {
let r6;
this.parts = [];
let c4 = 0, a3 = 0;
const u3 = t5.length - 1, d3 = this.parts, [f3, v2] = V(t5, s3);
if (this.el = _N.createElement(f3, n6), C.currentNode = this.el.content, 2 === s3 || 3 === s3) {
const t6 = this.el.content.firstChild;
t6.replaceWith(...t6.childNodes);
}
for (; null !== (r6 = C.nextNode()) && d3.length < u3; ) {
if (1 === r6.nodeType) {
if (r6.hasAttributes()) for (const t6 of r6.getAttributeNames()) if (t6.endsWith(e3)) {
const i7 = v2[a3++], s4 = r6.getAttribute(t6).split(h2), e5 = /([.?@])?(.*)/.exec(i7);
d3.push({ type: 1, index: c4, name: e5[2], strings: s4, ctor: "." === e5[1] ? H : "?" === e5[1] ? I : "@" === e5[1] ? L : k }), r6.removeAttribute(t6);
} else t6.startsWith(h2) && (d3.push({ type: 6, index: c4 }), r6.removeAttribute(t6));
if ($.test(r6.tagName)) {
const t6 = r6.textContent.split(h2), s4 = t6.length - 1;
if (s4 > 0) {
r6.textContent = i3 ? i3.emptyScript : "";
for (let i7 = 0; i7 < s4; i7++) r6.append(t6[i7], l2()), C.nextNode(), d3.push({ type: 2, index: ++c4 });
r6.append(t6[s4], l2());
}
}
} else if (8 === r6.nodeType) if (r6.data === o3) d3.push({ type: 2, index: c4 });
else {
let t6 = -1;
for (; -1 !== (t6 = r6.data.indexOf(h2, t6 + 1)); ) d3.push({ type: 7, index: c4 }), t6 += h2.length - 1;
}
c4++;
}
}
static createElement(t5, i7) {
const s3 = r3.createElement("template");
return s3.innerHTML = t5, s3;
}
};
function S2(t5, i7, s3 = t5, e5) {
if (i7 === T) return i7;
let h3 = void 0 !== e5 ? s3._$Co?.[e5] : s3._$Cl;
const o6 = c3(i7) ? void 0 : i7._$litDirective$;
return h3?.constructor !== o6 && (h3?._$AO?.(false), void 0 === o6 ? h3 = void 0 : (h3 = new o6(t5), h3._$AT(t5, s3, e5)), void 0 !== e5 ? (s3._$Co ??= [])[e5] = h3 : s3._$Cl = h3), void 0 !== h3 && (i7 = S2(t5, h3._$AS(t5, i7.values), h3, e5)), i7;
}
var M = class {
constructor(t5, i7) {
this._$AV = [], this._$AN = void 0, this._$AD = t5, this._$AM = i7;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(t5) {
const { el: { content: i7 }, parts: s3 } = this._$AD, e5 = (t5?.creationScope ?? r3).importNode(i7, true);
C.currentNode = e5;
let h3 = C.nextNode(), o6 = 0, n6 = 0, l3 = s3[0];
for (; void 0 !== l3; ) {
if (o6 === l3.index) {
let i8;
2 === l3.type ? i8 = new R(h3, h3.nextSibling, this, t5) : 1 === l3.type ? i8 = new l3.ctor(h3, l3.name, l3.strings, this, t5) : 6 === l3.type && (i8 = new z(h3, this, t5)), this._$AV.push(i8), l3 = s3[++n6];
}
o6 !== l3?.index && (h3 = C.nextNode(), o6++);
}
return C.currentNode = r3, e5;
}
p(t5) {
let i7 = 0;
for (const s3 of this._$AV) void 0 !== s3 && (void 0 !== s3.strings ? (s3._$AI(t5, s3, i7), i7 += s3.strings.length - 2) : s3._$AI(t5[i7])), i7++;
}
};
var R = class _R {
get _$AU() {
return this._$AM?._$AU ?? this._$Cv;
}
constructor(t5, i7, s3, e5) {
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t5, this._$AB = i7, this._$AM = s3, this.options = e5, this._$Cv = e5?.isConnected ?? true;
}
get parentNode() {
let t5 = this._$AA.parentNode;
const i7 = this._$AM;
return void 0 !== i7 && 11 === t5?.nodeType && (t5 = i7.parentNode), t5;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t5, i7 = this) {
t5 = S2(this, t5, i7), c3(t5) ? t5 === E || null == t5 || "" === t5 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t5 !== this._$AH && t5 !== T && this._(t5) : void 0 !== t5._$litType$ ? this.$(t5) : void 0 !== t5.nodeType ? this.T(t5) : u2(t5) ? this.k(t5) : this._(t5);
}
O(t5) {
return this._$AA.parentNode.insertBefore(t5, this._$AB);
}
T(t5) {
this._$AH !== t5 && (this._$AR(), this._$AH = this.O(t5));
}
_(t5) {
this._$AH !== E && c3(this._$AH) ? this._$AA.nextSibling.data = t5 : this.T(r3.createTextNode(t5)), this._$AH = t5;
}
$(t5) {
const { values: i7, _$litType$: s3 } = t5, e5 = "number" == typeof s3 ? this._$AC(t5) : (void 0 === s3.el && (s3.el = N.createElement(P(s3.h, s3.h[0]), this.options)), s3);
if (this._$AH?._$AD === e5) this._$AH.p(i7);
else {
const t6 = new M(e5, this), s4 = t6.u(this.options);
t6.p(i7), this.T(s4), this._$AH = t6;
}
}
_$AC(t5) {
let i7 = A.get(t5.strings);
return void 0 === i7 && A.set(t5.strings, i7 = new N(t5)), i7;
}
k(t5) {
a2(this._$AH) || (this._$AH = [], this._$AR());
const i7 = this._$AH;
let s3, e5 = 0;
for (const h3 of t5) e5 === i7.length ? i7.push(s3 = new _R(this.O(l2()), this.O(l2()), this, this.options)) : s3 = i7[e5], s3._$AI(h3), e5++;
e5 < i7.length && (this._$AR(s3 && s3._$AB.nextSibling, e5), i7.length = e5);
}
_$AR(t5 = this._$AA.nextSibling, i7) {
for (this._$AP?.(false, true, i7); t5 && t5 !== this._$AB; ) {
const i8 = t5.nextSibling;
t5.remove(), t5 = i8;
}
}
setConnected(t5) {
void 0 === this._$AM && (this._$Cv = t5, this._$AP?.(t5));
}
};
var k = class {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t5, i7, s3, e5, h3) {
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t5, this.name = i7, this._$AM = e5, this.options = h3, s3.length > 2 || "" !== s3[0] || "" !== s3[1] ? (this._$AH = Array(s3.length - 1).fill(new String()), this.strings = s3) : this._$AH = E;
}
_$AI(t5, i7 = this, s3, e5) {
const h3 = this.strings;
let o6 = false;
if (void 0 === h3) t5 = S2(this, t5, i7, 0), o6 = !c3(t5) || t5 !== this._$AH && t5 !== T, o6 && (this._$AH = t5);
else {
const e6 = t5;
let n6, r6;
for (t5 = h3[0], n6 = 0; n6 < h3.length - 1; n6++) r6 = S2(this, e6[s3 + n6], i7, n6), r6 === T && (r6 = this._$AH[n6]), o6 ||= !c3(r6) || r6 !== this._$AH[n6], r6 === E ? t5 = E : t5 !== E && (t5 += (r6 ?? "") + h3[n6 + 1]), this._$AH[n6] = r6;
}
o6 && !e5 && this.j(t5);
}
j(t5) {
t5 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t5 ?? "");
}
};
var H = class extends k {
constructor() {
super(...arguments), this.type = 3;
}
j(t5) {
this.element[this.name] = t5 === E ? void 0 : t5;
}
};
var I = class extends k {
constructor() {
super(...arguments), this.type = 4;
}
j(t5) {
this.element.toggleAttribute(this.name, !!t5 && t5 !== E);
}
};
var L = class extends k {
constructor(t5, i7, s3, e5, h3) {
super(t5, i7, s3, e5, h3), this.type = 5;
}
_$AI(t5, i7 = this) {
if ((t5 = S2(this, t5, i7, 0) ?? E) === T) return;
const s3 = this._$AH, e5 = t5 === E && s3 !== E || t5.capture !== s3.capture || t5.once !== s3.once || t5.passive !== s3.passive, h3 = t5 !== E && (s3 === E || e5);
e5 && this.element.removeEventListener(this.name, this, s3), h3 && this.element.addEventListener(this.name, this, t5), this._$AH = t5;
}
handleEvent(t5) {
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t5) : this._$AH.handleEvent(t5);
}
};
var z = class {
constructor(t5, i7, s3) {
this.element = t5, this.type = 6, this._$AN = void 0, this._$AM = i7, this.options = s3;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t5) {
S2(this, t5);
}
};
var j = t2.litHtmlPolyfillSupport;
j?.(N, R), (t2.litHtmlVersions ??= []).push("3.2.1");
var B = (t5, i7, s3) => {
const e5 = s3?.renderBefore ?? i7;
let h3 = e5._$litPart$;
if (void 0 === h3) {
const t6 = s3?.renderBefore ?? null;
e5._$litPart$ = h3 = new R(i7.insertBefore(l2(), t6), t6, void 0, s3 ?? {});
}
return h3._$AI(t5), h3;
};
// node_modules/lit-element/lit-element.js
var r4 = class extends b {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
const t5 = super.createRenderRoot();
return this.renderOptions.renderBefore ??= t5.firstChild, t5;
}
update(t5) {
const s3 = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t5), this._$Do = B(s3, this.renderRoot, this.renderOptions);
}
connectedCallback() {
super.connectedCallback(), this._$Do?.setConnected(true);
}
disconnectedCallback() {
super.disconnectedCallback(), this._$Do?.setConnected(false);
}
render() {
return T;
}
};
r4._$litElement$ = true, r4["finalized"] = true, globalThis.litElementHydrateSupport?.({ LitElement: r4 });
var i4 = globalThis.litElementPolyfillSupport;
i4?.({ LitElement: r4 });
(globalThis.litElementVersions ??= []).push("4.1.1");
// node_modules/@lit/reactive-element/decorators/custom-element.js
var t3 = (t5) => (e5, o6) => {
void 0 !== o6 ? o6.addInitializer(() => {
customElements.define(t5, e5);
}) : customElements.define(t5, e5);
};
// node_modules/@lit/reactive-element/decorators/property.js
var o4 = { attribute: true, type: String, converter: u, reflect: false, hasChanged: f };
var r5 = (t5 = o4, e5, r6) => {
const { kind: n6, metadata: i7 } = r6;
let s3 = globalThis.litPropertyMetadata.get(i7);
if (void 0 === s3 && globalThis.litPropertyMetadata.set(i7, s3 = /* @__PURE__ */ new Map()), s3.set(r6.name, t5), "accessor" === n6) {
const { name: o6 } = r6;
return { set(r7) {
const n7 = e5.get.call(this);
e5.set.call(this, r7), this.requestUpdate(o6, n7, t5);
}, init(e6) {
return void 0 !== e6 && this.P(o6, void 0, t5), e6;
} };
}
if ("setter" === n6) {
const { name: o6 } = r6;
return function(r7) {
const n7 = this[o6];
e5.call(this, r7), this.requestUpdate(o6, n7, t5);
};
}
throw Error("Unsupported decorator location: " + n6);
};
function n4(t5) {
return (e5, o6) => "object" == typeof o6 ? r5(t5, e5, o6) : ((t6, e6, o7) => {
const r6 = e6.hasOwnProperty(o7);
return e6.constructor.createProperty(o7, r6 ? { ...t6, wrapped: true } : t6), r6 ? Object.getOwnPropertyDescriptor(e6, o7) : void 0;
})(t5, e5, o6);
}
// node_modules/lit-html/directive.js
var t4 = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 };
var e4 = (t5) => (...e5) => ({ _$litDirective$: t5, values: e5 });
var i5 = class {
constructor(t5) {
}
get _$AU() {
return this._$AM._$AU;
}
_$AT(t5, e5, i7) {
this._$Ct = t5, this._$AM = e5, this._$Ci = i7;
}
_$AS(t5, e5) {
return this.update(t5, e5);
}
update(t5, e5) {
return this.render(...e5);
}
};
// node_modules/lit-html/directives/style-map.js
var n5 = "important";
var i6 = " !" + n5;
var o5 = e4(class extends i5 {
constructor(t5) {
if (super(t5), t5.type !== t4.ATTRIBUTE || "style" !== t5.name || t5.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
}
render(t5) {
return Object.keys(t5).reduce((e5, r6) => {
const s3 = t5[r6];
return null == s3 ? e5 : e5 + `${r6 = r6.includes("-") ? r6 : r6.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s3};`;
}, "");
}
update(e5, [r6]) {
const { style: s3 } = e5.element;
if (void 0 === this.ft) return this.ft = new Set(Object.keys(r6)), this.render(r6);
for (const t5 of this.ft) null == r6[t5] && (this.ft.delete(t5), t5.includes("-") ? s3.removeProperty(t5) : s3[t5] = null);
for (const t5 in r6) {
const e6 = r6[t5];
if (null != e6) {
this.ft.add(t5);
const r7 = "string" == typeof e6 && e6.endsWith(i6);
t5.includes("-") || r7 ? s3.setProperty(t5, r7 ? e6.slice(0, -11) : e6, r7 ? n5 : "") : s3[t5] = e6;
}
}
return T;
}
});
// src/lit-events.ts
var LitDragStart = class _LitDragStart extends Event {
// container: HTMLElement;
constructor(source) {
super(_LitDragStart.eventName, { bubbles: true, composed: true });
this.offsetX = 0;
this.offsetY = 0;
this.offsetX = source.translateX;
this.offsetY = source.translateY;
this.node = source.host;
}
static {
this.eventName = "lit-drag-start";
}
};
var LitDragging = class _LitDragging extends Event {
// container: HTMLElement;
constructor(source) {
super(_LitDragging.eventName, { bubbles: true, composed: true });
this.offsetX = 0;
this.offsetY = 0;
this.offsetX = source.translateX;
this.offsetY = source.translateY;
this.node = source.host;
}
static {
this.eventName = "lit-dragging";
}
};
var LitDragEnd = class _LitDragEnd extends Event {
// container: HTMLElement;
constructor(source) {
super(_LitDragEnd.eventName, { bubbles: true, composed: true });
this.offsetX = 0;
this.offsetY = 0;
this.offsetX = source.initialX;
this.offsetY = source.initialY;
this.node = source.host;
}
static {
this.eventName = "lit-drag-end";
}
};
// src/lit-draggable.ts
var defaultOptions = {
preventSelect: true
};
var LitDraggable = class {
constructor(host, options = defaultOptions) {
this.translateX = 0;
this.translateY = 0;
this.initialX = 0;
this.initialY = 0;
this.handleOffsetX = 0;
this.handleOffsetY = 0;
this.dragging = false;
this.pointers = /* @__PURE__ */ new Set();
(this.host = host).addController(this);
this.options = options;
this.dragStart = this.dragStart.bind(this);
this.drag = this.drag.bind(this);
this.dragEnd = this.dragEnd.bind(this);
}
// TODO: Make this work with a handle, which will be a `ref` object.
hostConnected() {
console.log(this.host);
this.host.addEventListener("pointerdown", this.dragStart);
}
hostDisconnected() {
this.host.removeEventListener("pointerdown", this.dragStart);
}
dragStart(ev) {
if (ev.button === 2) {
return;
}
document.addEventListener("pointerup", this.dragEnd);
document.addEventListener("pointermove", this.drag);
const event_target = ev.composedPath()[0];
if (!(event_target === this.host || this.host.shadowRoot?.contains(event_target))) {
console.log("HUH?");
return;
}
this.pointers.add(ev.pointerId);
this.dragging = true;
if (this.options.preventSelect) {
this.currentSelect = document.body.style.userSelect;
document.body.style.userSelect = "none";
}
const hostRect = this.host.getBoundingClientRect();
this.initialX = ev.clientX;
this.initialY = ev.clientY;
this.handleOffsetX = this.initialX - hostRect.left;
this.handleOffsetY = this.initialY - hostRect.top;
this.host.dataset.litDrag = "true";
this.host.dispatchEvent(new LitDragStart(this));
}
drag(ev) {
if (!this.dragging || !this.pointers.has(ev.pointerId)) {
return;
}
this.host.dataset.litDragging = "true";
ev.preventDefault();
this.translateX = ev.clientX - this.initialX;
this.translateY = ev.clientY - this.initialY;
this.host.dispatchEvent(new LitDragging(this));
this.host.style.setProperty("transform", `translate3d(${+this.translateX}px, ${+this.translateY}px, 0)`);
}
dragEnd(ev) {
document.removeEventListener("pointerup", this.dragEnd);
document.removeEventListener("pointermove", this.drag);
if (!this.dragging || !this.pointers.has(ev.pointerId)) {
return;
}
this.pointers.delete(ev.pointerId);
this.dragging = false;
delete this.host.dataset.litDrag;
delete this.host.dataset.litDragging;
if (this.currentSelect) {
document.body.style.userSelect = this.currentSelect;
this.currentSelect = void 0;
}
this.initialX = ev.clientX - this.handleOffsetX;
this.initialY = ev.clientY - this.handleOffsetY;
this.host.dispatchEvent(new LitDragEnd(this));
this.host.style.removeProperty("transform");
}
};
// src/fridge-tile.ts
var FridgeTile = class extends r4 {
constructor() {
super();
this.word = "";
this.rotation = Math.random() * 30 - 15;
this.dragHandle = new LitDraggable(this);
this.onDragEnd = this.onDragEnd.bind(this);
this.addEventListener("lit-drag-end", this.onDragEnd);
}
static get styles() {
return i`
:host {
display: block;
position: absolute;
}
:host([data-dragging="idle"]) {
cursor: grab;
}
:host([data-dragging="dragging"]) {
cursor: grabbing;
}
.word {
font-family: Georgia, Palatino, "Palatino Linotype", Times, "Times New Roman", serif;
box-shadow: 0 0 0.375rem 0.125rem #aaa;
text-align: center;
user-select: none;
cursor: pointer;
color: #444;
font-size: 0.9375rem;
padding: 0.1875rem 0.25rem 0.25rem 0.25rem;
position: relative;
background: white;
z-index: 100;
}
.word.dragging {
font-size: 1.1875rem;
}
`;
}
onDragEnd(ev) {
this.style.setProperty("top", `${+ev.offsetY}px`);
this.style.setProperty("left", `${+ev.offsetX}px`);
}
render() {
const styles = {
width: `${this.word.length}ch`,
transform: `rotate(${this.rotation}deg)`
};
return x`<div part="word" style="${o5(styles)}" class="word">${this.word}</div>`;
}
};
__decorateClass([
n4({ type: String })
], FridgeTile.prototype, "word", 2);
FridgeTile = __decorateClass([
t3("fridge-tile")
], FridgeTile);
// src/fridge-magnets.ts
var FridgeMagnets = class extends r4 {
static get styles() {
return i`
:host {
display: block;
}
#fridgemagnets {
width: 100%;
height: 100%;
display: grid;
grid-template-rows: 100fr 18ex;
}
#fridge {
overflow: hidden;
position: relative;
width: 100%;
background: url("./dist/pingbg.png") repeat;
}
#footer {
background-color: #32cd32;
width: 100%;
height: 18ex;
}
`;
}
render() {
return x` <div id="fridgemagnets">
<div id="fridge">
<fridge-tile word="Magnificent"></fridge-tile>
</div>
<div id="footer">Footer</div>
</div>`;
}
};
FridgeMagnets = __decorateClass([
t3("fridge-magnets")
], FridgeMagnets);
/*! Bundled license information:
@lit/reactive-element/css-tag.js:
(**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/reactive-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/lit-html.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-element/lit-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/is-server.js:
(**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/custom-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/property.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/directive.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/directives/style-map.js:
(**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
*/
//# sourceMappingURL=index.js.map

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

View File

@ -1,23 +0,0 @@
html, body {
overflow: hidden;
padding: 0;
margin: 0;
}
#fridgemagnets {
width: 100vw;
height: 100vh;
}
#fridge {
overflow: hidden;
width: 100vw;
background: url('pingbg.png') repeat;
}
#footer {
background-color: #32cd32;
width: 100vw;
height: 18ex;
}

View File

@ -1 +0,0 @@
{"fullyTracked":true,"platform":"linux","arch":"x64","nodeVersion":"v21.7.3","command":"${NODE_RUNNER} build.mjs","extraArgs":[],"clean":true,"files":{"/home/elf/projects/fridgemagnets/package-lock.json":"d409c4caa75a369b0756c4a20afd229a1674727732ed0cb941fefa7c8654e8fd","/home/elf/projects/fridgemagnets/src/fridge-magnets.ts":"77c7985b22e6f2e312cc93d0f29874879f5f4588b379466b7b341c0cf6fe5672","/home/elf/projects/fridgemagnets/src/fridge-tile.ts":"a5d4d0c88404be2ef2b4a344c5ea9158c4f61550e4d0cb34385743499288bb8f","/home/elf/projects/fridgemagnets/src/index.ts":"af58cf7ef5b2c7248a9da8ed4a62f738d3a956d2e381763ce509ec73d76c253e","/home/elf/projects/fridgemagnets/src/lit-draggable.ts":"e8e573b657e0150a90cbba225c2f76c1c381f236c734527e99fcf7162a739b4c","/home/elf/projects/fridgemagnets/src/lit-events.ts":"68f685e47fa10d7f1c5945179904b58910c6ea4f89fdd599291f7fa3b2e0942e","/home/elf/projects/fridgemagnets/src/sat.ts":"ffed6dde0015ee7921976eec091d4d2310f7721b5424450e15eeef639cd96d51","/home/elf/projects/fridgemagnets/src/styles.css":"9f8ce850cf0cc61e861a6be7f1258cb96420c2f3e9de650e8cd9b112e846bd12","/home/elf/projects/fridgemagnets/src/types.ts":"c53748e2e8ce078819195c0e840f61acb20283082ff28e2923c20e8a8c8f1d0b","/home/elf/projects/fridgemagnets/src/wordlist.ts":"933b256ab705c637723c783dee2dd51a27cd98400a8216a655ac26a8629cfe5c","/home/elf/projects/package-lock.json":"4a146336c9879a2419c2630a53f3ce56e1cc9a1d1917481a2887d1f87d6d6b20"},"output":["dist/**","!.git/","!.hg/","!.svn/","!.wireit/","!.yarn/","!CVS/","!node_modules/"],"dependencies":{},"env":{"NODE_RUNNER":"node"}}

View File

@ -1 +0,0 @@
{"/home/elf/projects/fridgemagnets/dist/index.js":{"t":"f","m":1732067209462.9365,"s":36632},"/home/elf/projects/fridgemagnets/dist/index.js.map":{"t":"f","m":1732067209462.9365,"s":264336},"/home/elf/projects/fridgemagnets/dist/pingbg.png":{"t":"f","m":1732067209364.9382,"s":360700},"/home/elf/projects/fridgemagnets/dist/styles.css":{"t":"f","m":1732067209360.9382,"s":306}}

View File