114 lines
3.4 KiB
JavaScript
114 lines
3.4 KiB
JavaScript
//#region ../../node_modules/.pnpm/[email protected][email protected]/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
var e = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), t = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), r = (e) => {
|
|
let t = n(e);
|
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
}, i = {
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
width: 24,
|
|
height: 24,
|
|
viewBox: "0 0 24 24",
|
|
fill: "none",
|
|
stroke: "currentColor",
|
|
strokeWidth: 2,
|
|
strokeLinecap: "round",
|
|
strokeLinejoin: "round"
|
|
}, a = (e) => {
|
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
return !1;
|
|
}, o = globalThis.__WWV_HOST__.React.forwardRef(({ color: t = "currentColor", size: n = 24, strokeWidth: r = 2, absoluteStrokeWidth: o, className: s = "", children: c, iconNode: l, ...u }, d) => globalThis.__WWV_HOST__.React.createElement("svg", {
|
|
ref: d,
|
|
...i,
|
|
width: n,
|
|
height: n,
|
|
stroke: t,
|
|
strokeWidth: o ? Number(r) * 24 / Number(n) : r,
|
|
className: e("lucide", s),
|
|
...!c && !a(u) && { "aria-hidden": "true" },
|
|
...u
|
|
}, [...l.map(([e, t]) => globalThis.__WWV_HOST__.React.createElement(e, t)), ...Array.isArray(c) ? c : [c]])), s = (n, i) => {
|
|
let a = globalThis.__WWV_HOST__.React.forwardRef(({ className: a, ...s }, c) => globalThis.__WWV_HOST__.React.createElement(o, {
|
|
ref: c,
|
|
iconNode: i,
|
|
className: e(`lucide-${t(r(n))}`, `lucide-${n}`, a),
|
|
...s
|
|
}));
|
|
return a.displayName = r(n), a;
|
|
}, c = s("lamp", [
|
|
["path", {
|
|
d: "M12 12v6",
|
|
key: "3ahymv"
|
|
}],
|
|
["path", {
|
|
d: "M4.077 10.615A1 1 0 0 0 5 12h14a1 1 0 0 0 .923-1.385l-3.077-7.384A2 2 0 0 0 15 2H9a2 2 0 0 0-1.846 1.23Z",
|
|
key: "1l7kg2"
|
|
}],
|
|
["path", {
|
|
d: "M8 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1z",
|
|
key: "1mmzpi"
|
|
}]
|
|
]), l = s("lightbulb", [
|
|
["path", {
|
|
d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
|
|
key: "1gvzjb"
|
|
}],
|
|
["path", {
|
|
d: "M9 18h6",
|
|
key: "x1upvd"
|
|
}],
|
|
["path", {
|
|
d: "M10 22h4",
|
|
key: "ceow96"
|
|
}]
|
|
]), u = class {
|
|
context = null;
|
|
iconUrls = {};
|
|
defaultLayerColor = "#3b82f6";
|
|
clusterDistance = 50;
|
|
maxEntities = 5e3;
|
|
iconScale = 1;
|
|
async initialize(e) {
|
|
this.context = e;
|
|
}
|
|
destroy() {
|
|
this.context = null;
|
|
}
|
|
async fetch(e) {
|
|
return [];
|
|
}
|
|
getPollingInterval() {
|
|
return 0;
|
|
}
|
|
getLayerConfig() {
|
|
return {
|
|
color: this.defaultLayerColor,
|
|
clusterEnabled: !0,
|
|
clusterDistance: this.clusterDistance,
|
|
maxEntities: this.maxEntities
|
|
};
|
|
}
|
|
getEntityColor(e) {
|
|
return this.defaultLayerColor;
|
|
}
|
|
getEntityIcon(e) {
|
|
return this.icon;
|
|
}
|
|
renderEntity(e) {
|
|
let t = this.getEntityColor(e), n = this.getEntityIcon(e), r = `${n?.displayName || n?.name || "default"}-${t}`;
|
|
return this.iconUrls[r] || (this.iconUrls[r] = globalThis.__WWV_HOST__.WWVPluginSDK.createSvgIconUrl(n, { color: t })), {
|
|
type: "billboard",
|
|
iconUrl: this.iconUrls[r],
|
|
color: t,
|
|
iconScale: this.iconScale
|
|
};
|
|
}
|
|
}, d = class extends u {
|
|
constructor(...e) {
|
|
super(...e), this.id = "lighthouses", this.name = "Lighthouses", this.description = "Lighthouses worldwide from OSM", this.icon = c, this.category = "maritime", this.version = "1.0.1", this.defaultLayerColor = "#facc15";
|
|
}
|
|
getEntityIcon(e) {
|
|
return l;
|
|
}
|
|
};
|
|
//#endregion
|
|
export { d as LighthousesPlugin };
|