mirador
Version:
An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
55 lines (54 loc) • 2 kB
JavaScript
import { at as e, ft as t, it as n, p as r, ut as i } from "./getters-B4oepJRC.js";
import { Ut as a } from "./canvases-CeUwRIFA.js";
import { cloneElement as o, createElement as s, forwardRef as c, isValidElement as l, useContext as u } from "react";
//#region node_modules/classnames/index.js
var d = /* @__PURE__ */ i(((e, t) => {
(function() {
var e = {}.hasOwnProperty;
function n() {
for (var e = "", t = 0; t < arguments.length; t++) {
var n = arguments[t];
n && (e = i(e, r(n)));
}
return e;
}
function r(t) {
if (typeof t == "string" || typeof t == "number") return t;
if (typeof t != "object") return "";
if (Array.isArray(t)) return n.apply(null, t);
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) return t.toString();
var r = "";
for (var a in t) e.call(t, a) && t[a] && (r = i(r, a));
return r;
}
function i(e, t) {
return t ? e ? e + " " + t : e + t : e;
}
t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
return n;
}) : window.classNames = n;
})();
})), f = /* @__PURE__ */ t(a(), 1), p = (e) => (0, f.default)([e]).map((e) => [r.createGenerateClassNameOptions.productionPrefix, e].join("-")).join(" "), m = /* @__PURE__ */ t(e(), 1);
function h(e) {
return { PluginComponents: ((u(n) || {})[e]?.add || []).map((e) => e.component) };
}
//#endregion
//#region src/components/PluginHook.jsx
var g = c(({ classes: e = {}, targetName: t, ...n }, r) => {
let { PluginComponents: i } = h(t);
return i ? i.map((e, t) => l(e) ? o(e, {
...n,
ref: r
}) : /* @__PURE__ */ s(e, {
ref: r,
...n,
key: t
})) : null;
});
g.displayName = "PluginHook", g.propTypes = {
classes: m.default.object,
targetName: m.default.string.isRequired
};
//#endregion
export { d as i, h as n, p as r, g as t };
//# sourceMappingURL=PluginHook-CsLe05K9.js.map