Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/chunks/chunk.MB643KRE.js

54 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

2024-01-30 10:59:28 -05:00
import {
e,
i,
t
} from "./chunk.UP75L23G.js";
import {
f,
m
} from "./chunk.2L6GHXIJ.js";
import {
T,
w
} from "./chunk.CXZZ2LVK.js";
// node_modules/lit-html/directives/live.js
var l = e(class extends i {
constructor(r) {
if (super(r), r.type !== t.PROPERTY && r.type !== t.ATTRIBUTE && r.type !== t.BOOLEAN_ATTRIBUTE)
throw Error("The `live` directive is not allowed on child or event bindings");
if (!f(r))
throw Error("`live` bindings can only contain a single expression");
}
render(r) {
return r;
}
update(i2, [t2]) {
if (t2 === w || t2 === T)
return t2;
const o = i2.element, l2 = i2.name;
if (i2.type === t.PROPERTY) {
if (t2 === o[l2])
return w;
} else if (i2.type === t.BOOLEAN_ATTRIBUTE) {
if (!!t2 === o.hasAttribute(l2))
return w;
} else if (i2.type === t.ATTRIBUTE && o.getAttribute(l2) === t2 + "")
return w;
return m(i2), t2;
}
});
export {
l
};
/*! Bundled license information:
lit-html/directives/live.js:
(**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
*/