gzhr-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,108 @@
1
+ import { l as c } from "./vendor-JYnb-2AB.mjs";
2
+ import { ref as i, onUnmounted as g } from "vue";
3
+ function f(e) {
4
+ return (t) => e.forEach((r) => {
5
+ t.use(r);
6
+ });
7
+ }
8
+ const h = (e) => (e.install = (n) => {
9
+ const t = (e == null ? void 0 : e.name) || "UnnamedComponent";
10
+ n.component(t, e);
11
+ }, e);
12
+ function m(e) {
13
+ let n = Array.isArray(e) ? [] : {};
14
+ if (e && typeof e == "object")
15
+ for (let t in e)
16
+ e[t] && typeof e[t] == "object" ? n[t] = m(e[t]) : n[t] = e[t];
17
+ return n;
18
+ }
19
+ function I(e, n = "ParentOID", t = "OID", r = "children") {
20
+ const s = /* @__PURE__ */ new Map(), o = [];
21
+ return e.forEach((a) => {
22
+ s.set(a[t], a);
23
+ }), e.forEach((a) => {
24
+ const l = a[n];
25
+ if (u(l))
26
+ o.push(a);
27
+ else {
28
+ const p = s.get(l);
29
+ p && (p[r] ?? (p[r] = []), p[r].push(a));
30
+ }
31
+ }), o;
32
+ }
33
+ function u(e) {
34
+ return e === "00000000-0000-0000-0000-000000000000" || c(e);
35
+ }
36
+ function b(e) {
37
+ return /^(#([0-9a-fA-F]{3}){1,2}|rgba?\(\d+%?,\s*\d+%?,\s*\d+%?(,\s*[0-9.]+)?\)|hsla?\(\d+%?,\s*\d+%?,\s*\d+%?(,\s*[0-9.]+)?\))$/.test(e);
38
+ }
39
+ function _(e) {
40
+ return e === "png" || e === "jpg" || e === "gif" || e === "jpeg" || e === "bmp" || e === "webp" ? !1 : e === "mp3" || e === "mpeg" || e === "mp4" || e === "ogg" || e === "wav" || e === "webm" ? "/Images/img_fileType/VIDEO.png" : e === "pdf" ? "/Images/img_fileType/PDF.png" : e === "doc" || e === "docx" ? "/Images/img_fileType/WORD.png" : e === "xls" || e === "xlsx" ? "/Images/img_fileType/ECEL.png" : e === "ppt" || e === "pptx" ? "/Images/img_fileType/PPT.png" : e === "zip" || e === "rar" ? "/Images/img_fileType/ZIP.png" : e === "txt" ? "/Images/img_fileType/TET.png" : e === "csv" ? "/Images/img_fileType/CSV.png" : e === "dwg" ? "/Images/img_fileType/PUB.png" : e === "xmind" ? "/Images/img_fileType/XMIND.png" : e === "md" ? "/Images/img_fileType/MD.png" : [
41
+ "3dm",
42
+ "3ds",
43
+ "3mf",
44
+ "amf",
45
+ "bim",
46
+ "brep",
47
+ "dae",
48
+ "fbx",
49
+ "fcstd",
50
+ "gltf",
51
+ "ifc",
52
+ "iges",
53
+ "step",
54
+ "stl",
55
+ "obj",
56
+ "off",
57
+ "ply",
58
+ "wrl"
59
+ ].includes(e) ? "/Images/img_fileType/3D.png" : "/Images/img_fileType/none.png";
60
+ }
61
+ function v(e) {
62
+ const n = document.body, t = document.createElement("div");
63
+ t.style.position = "fixed", t.style.top = "0", t.style.left = "0", t.style.width = "100%", t.style.height = "100%", t.style.backgroundColor = "rgba(0, 0, 0, 0.5)", t.style.display = "flex", t.style.justifyContent = "center", t.style.alignItems = "center", t.style.zIndex = "99999";
64
+ const r = document.createElement("video");
65
+ e.substr(0, 4).toLowerCase() == "http" ? r.src = window.location.origin + "/" + e : r.src = e, r.controls = !0, r.style.maxWidth = "100%", r.style.maxHeight = "100%";
66
+ const s = document.createElement("button");
67
+ s.innerHTML = "×", s.style.position = "absolute", s.style.top = "-20px", s.style.right = "-20px", s.style.fontSize = "2rem", s.style.padding = "0.5rem", s.style.backgroundColor = "rgba(0, 0, 0, 0.5)", s.style.border = "none", s.style.color = "white", s.style.borderBottomLeftRadius = "100%", s.style.width = "80px", s.style.height = "80px", s.style.cursor = "pointer", s.addEventListener("click", function() {
68
+ t.remove(), r.pause();
69
+ }), t.addEventListener("click", function(o) {
70
+ o.target === t && (t.remove(), r.pause());
71
+ }), t.appendChild(r), t.appendChild(s), n.appendChild(t), r.play();
72
+ }
73
+ function C(e) {
74
+ const n = {
75
+ urlLink: window.location.origin + e
76
+ }, t = document.createElement("form");
77
+ t.action = localStorage.H7_CAD || `http://${location.hostname}:805`, t.target = "_blank", t.method = "post", t.name = "look", t.style.display = "none";
78
+ for (const r in n) {
79
+ const s = document.createElement("textarea");
80
+ s.name = r, s.value = n[r], t.appendChild(s);
81
+ }
82
+ document.body.appendChild(t), t.submit();
83
+ }
84
+ const T = (e, n) => {
85
+ const t = i(0), r = i(0), s = () => {
86
+ t.value = e.clientWidth, r.value = e.clientHeight, n && typeof n == "function" && n({ clientWidth: t.value, clientHeight: r.value });
87
+ }, o = new ResizeObserver(s);
88
+ return s(), o.observe(e), g(() => {
89
+ o.disconnect();
90
+ }), { clientWidth: t, clientHeight: r };
91
+ }, w = (e, n) => {
92
+ const t = e.__vccOpts || e;
93
+ for (const [r, s] of n)
94
+ t[r] = s;
95
+ return t;
96
+ };
97
+ export {
98
+ w as _,
99
+ C as a,
100
+ I as b,
101
+ m as d,
102
+ _ as g,
103
+ b as i,
104
+ f as m,
105
+ v as p,
106
+ T as u,
107
+ h as w
108
+ };