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.
54 lines (53 loc) • 1.78 kB
JavaScript
import { at as e, ft as t, it as n, ut as r } from "./getters-DPoFra9X.js";
import { cloneElement as i, createElement as a, forwardRef as o, isValidElement as s, useContext as c } from "react";
//#region node_modules/classnames/index.js
var l = /* @__PURE__ */ r(((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;
})();
})), u = /* @__PURE__ */ t(e(), 1);
function d(e) {
return { PluginComponents: ((c(n) || {})[e]?.add || []).map((e) => e.component) };
}
//#endregion
//#region src/components/PluginHook.jsx
var f = o(({ classes: e = {}, targetName: t, ...n }, r) => {
let { PluginComponents: o } = d(t);
return o ? o.map((e, t) => s(e) ? i(e, {
...n,
ref: r
}) : /* @__PURE__ */ a(e, {
ref: r,
...n,
key: t
})) : null;
});
f.displayName = "PluginHook", f.propTypes = {
classes: u.default.object,
targetName: u.default.string.isRequired
};
//#endregion
export { d as n, l as r, f as t };
//# sourceMappingURL=PluginHook-CDvgJE4t.js.map