@mlightcad/cad-simple-viewer 1.0.16 → 1.0.18
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.
- package/dist/index.js +339 -309
- package/dist/index.umd.cjs +19 -19
- package/dist/libredwg-parser-worker.js +339 -339
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +6 -0
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +12 -6
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +8 -4
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +68 -41
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AcCmEventManager as te, AcGePoint2d as V, AcGeBox2d as ue, AcCmColor as lr, AcGeBox3d as
|
|
1
|
+
import { AcDbLayout as Ws, AcCmEventManager as te, AcGePoint2d as V, AcGeBox2d as ue, AcCmColor as lr, AcGeBox3d as Xs, AcDbDatabase as fo, AcDbFileType as rn, AcGeMathUtil as vt, AcGeVector3d as Kt, AcGeGeometryUtil as go, AcGeVector2d as jn, acdbHostApplicationServices as $s, AcDbViewport as Ys, AcDbRasterImage as qs, AcDbRay as Zs, AcDbXline as Qs, AcDbHatch as Wn, AcGePolyline2d as Js, AcDbLine as Ks, AcDbTextStyleTableRecord as ei, AcDbMText as ti, AcGiMTextAttachmentPoint as mo, AcGePoint3d as Xn, AcGeLoop2d as ni, AcGeCircArc2d as ri, AcGeLine2d as si, AcDbArc as ii, AcGeLine3d as dt, AcDbDatabaseConverter as yo, createWorkerApi as vo, AcDbLinetypeTableRecord as bo, AcDbDimStyleTableRecord as xo, AcDbLayerTableRecord as So, AcDbViewportTableRecord as wo, AcDbBlockTableRecord as _o, AcDbBatchProcessing as To, AcDbRasterImageDef as Co, AcDbCircle as Io, AcDbEllipse as ko, AcDbSpline as Er, AcDbPoint as Eo, AcDbTrace as Mo, AcDbPolyline as Mr, AcGeEllipseArc2d as Ao, AcGeSpline3d as Ar, AcDbTable as Bo, AcDbText as Lo, AcDbLeader as Oo, AcDbAlignedDimension as Do, AcDb3PointAngularDimension as Ro, AcDbOrdinateDimension as Uo, AcDbRadialDimension as Fo, AcDbDiametricDimension as Po, AcDbBlockReference as Go, AcDbDxfConverter as No, AcDbDatabaseConverterManager as Br } from "@mlightcad/data-model";
|
|
2
2
|
import { find as zo, findIndex as Vo, defaults as Ho } from "lodash-es";
|
|
3
3
|
import * as g from "three";
|
|
4
|
-
import { BufferGeometry as sn, ExtrudeGeometry as
|
|
4
|
+
import { BufferGeometry as sn, ExtrudeGeometry as jo, BufferAttribute as Wo, ShapePath as Xo } from "three";
|
|
5
5
|
import { mergeGeometries as $o } from "three/examples/jsm/utils/BufferGeometryUtils.js";
|
|
6
6
|
import { OrbitControls as Yo } from "three/examples/jsm/controls/OrbitControls";
|
|
7
7
|
import qo from "three/examples/jsm/libs/stats.module";
|
|
@@ -27,6 +27,8 @@ class Zo {
|
|
|
27
27
|
this._view.setLayerVisibility(r.layer.name, !r.layer.isOff);
|
|
28
28
|
}), t.database.events.headerSysVarChanged.addEventListener((r) => {
|
|
29
29
|
r.name == "pdmode" && this._view.rerenderPoints(r.database.pdmode);
|
|
30
|
+
}), t.database.events.dictObjetSet.addEventListener((r) => {
|
|
31
|
+
r.object instanceof Ws && this._view.addLayout(r.object);
|
|
30
32
|
}), e.selectionSet.events.selectionAdded.addEventListener((r) => {
|
|
31
33
|
e.highlight(r.ids);
|
|
32
34
|
}), e.selectionSet.events.selectionRemoved.addEventListener((r) => {
|
|
@@ -1029,7 +1031,7 @@ class ca {
|
|
|
1029
1031
|
unhover: new te()
|
|
1030
1032
|
}, this._canvas = e;
|
|
1031
1033
|
const t = e.getBoundingClientRect();
|
|
1032
|
-
this._bbox = new
|
|
1034
|
+
this._bbox = new Xs(), this._width = t.width, this._height = t.height, this._curPos = new V(), this._curScreenPos = new V(), this._selectionSet = new aa(), this._editor = new oa(this), this._canvas.addEventListener("mousemove", (r) => this.onMouseMove(r)), this._canvas.addEventListener("mousedown", (r) => {
|
|
1033
1035
|
r.button === 1 && this._editor.setCursor(Lt.Grab);
|
|
1034
1036
|
}), this._canvas.addEventListener("mouseup", (r) => {
|
|
1035
1037
|
r.button === 1 && this._editor.restoreCursor();
|
|
@@ -1189,7 +1191,7 @@ class la {
|
|
|
1189
1191
|
* The document is initialized with an "Untitled" title and read-only mode enabled.
|
|
1190
1192
|
*/
|
|
1191
1193
|
constructor() {
|
|
1192
|
-
this._fileName = "", this._docTitle = "", this._isReadOnly = !0, this._database = new
|
|
1194
|
+
this._fileName = "", this._docTitle = "", this._isReadOnly = !0, this._database = new fo(), this.docTitle = "Untitled";
|
|
1193
1195
|
}
|
|
1194
1196
|
/**
|
|
1195
1197
|
* Opens a CAD document from a URI.
|
|
@@ -1779,7 +1781,7 @@ class _a {
|
|
|
1779
1781
|
return `${e}_${t}`;
|
|
1780
1782
|
}
|
|
1781
1783
|
}
|
|
1782
|
-
class
|
|
1784
|
+
class oi {
|
|
1783
1785
|
constructor() {
|
|
1784
1786
|
this.unsupportedChars = {}, this.cache = new _a();
|
|
1785
1787
|
}
|
|
@@ -1792,7 +1794,7 @@ class ii {
|
|
|
1792
1794
|
this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
|
|
1793
1795
|
}
|
|
1794
1796
|
}
|
|
1795
|
-
class
|
|
1797
|
+
class ai extends g.Shape {
|
|
1796
1798
|
/**
|
|
1797
1799
|
* Creates a new instance of BaseTextShape
|
|
1798
1800
|
* @param char - The character this shape represents */
|
|
@@ -1824,7 +1826,7 @@ function Ia(n) {
|
|
|
1824
1826
|
const s = () => {
|
|
1825
1827
|
n.removeEventListener("success", i), n.removeEventListener("error", o);
|
|
1826
1828
|
}, i = () => {
|
|
1827
|
-
t(
|
|
1829
|
+
t(je(n.result)), s();
|
|
1828
1830
|
}, o = () => {
|
|
1829
1831
|
r(n.error), s();
|
|
1830
1832
|
};
|
|
@@ -1855,7 +1857,7 @@ let qn = {
|
|
|
1855
1857
|
if (e === "store")
|
|
1856
1858
|
return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
|
|
1857
1859
|
}
|
|
1858
|
-
return
|
|
1860
|
+
return je(n[e]);
|
|
1859
1861
|
},
|
|
1860
1862
|
set(n, e, t) {
|
|
1861
1863
|
return n[e] = t, !0;
|
|
@@ -1864,20 +1866,20 @@ let qn = {
|
|
|
1864
1866
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
|
1865
1867
|
}
|
|
1866
1868
|
};
|
|
1867
|
-
function
|
|
1869
|
+
function ci(n) {
|
|
1868
1870
|
qn = n(qn);
|
|
1869
1871
|
}
|
|
1870
1872
|
function Ea(n) {
|
|
1871
1873
|
return Ca().includes(n) ? function(...e) {
|
|
1872
|
-
return n.apply(Zn(this), e),
|
|
1874
|
+
return n.apply(Zn(this), e), je(this.request);
|
|
1873
1875
|
} : function(...e) {
|
|
1874
|
-
return
|
|
1876
|
+
return je(n.apply(Zn(this), e));
|
|
1875
1877
|
};
|
|
1876
1878
|
}
|
|
1877
1879
|
function Ma(n) {
|
|
1878
1880
|
return typeof n == "function" ? Ea(n) : (n instanceof IDBTransaction && ka(n), $n(n, Ta()) ? new Proxy(n, qn) : n);
|
|
1879
1881
|
}
|
|
1880
|
-
function
|
|
1882
|
+
function je(n) {
|
|
1881
1883
|
if (n instanceof IDBRequest)
|
|
1882
1884
|
return Ia(n);
|
|
1883
1885
|
if (wn.has(n))
|
|
@@ -1887,9 +1889,9 @@ function We(n) {
|
|
|
1887
1889
|
}
|
|
1888
1890
|
const Zn = (n) => mn.get(n);
|
|
1889
1891
|
function Aa(n, e, { blocked: t, upgrade: r, blocking: s, terminated: i } = {}) {
|
|
1890
|
-
const o = indexedDB.open(n, e), a =
|
|
1892
|
+
const o = indexedDB.open(n, e), a = je(o);
|
|
1891
1893
|
return r && o.addEventListener("upgradeneeded", (c) => {
|
|
1892
|
-
r(
|
|
1894
|
+
r(je(o.result), c.oldVersion, c.newVersion, je(o.transaction), c);
|
|
1893
1895
|
}), t && o.addEventListener("blocked", (c) => t(
|
|
1894
1896
|
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
1895
1897
|
c.oldVersion,
|
|
@@ -1922,18 +1924,18 @@ function Rr(n, e) {
|
|
|
1922
1924
|
};
|
|
1923
1925
|
return _n.set(e, i), i;
|
|
1924
1926
|
}
|
|
1925
|
-
|
|
1927
|
+
ci((n) => ({
|
|
1926
1928
|
...n,
|
|
1927
1929
|
get: (e, t, r) => Rr(e, t) || n.get(e, t, r),
|
|
1928
1930
|
has: (e, t) => !!Rr(e, t) || n.has(e, t)
|
|
1929
1931
|
}));
|
|
1930
|
-
const Oa = ["continue", "continuePrimaryKey", "advance"], Ur = {}, Qn = /* @__PURE__ */ new WeakMap(),
|
|
1932
|
+
const Oa = ["continue", "continuePrimaryKey", "advance"], Ur = {}, Qn = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap(), Da = {
|
|
1931
1933
|
get(n, e) {
|
|
1932
1934
|
if (!Oa.includes(e))
|
|
1933
1935
|
return n[e];
|
|
1934
1936
|
let t = Ur[e];
|
|
1935
1937
|
return t || (t = Ur[e] = function(...r) {
|
|
1936
|
-
Qn.set(this,
|
|
1938
|
+
Qn.set(this, li.get(this)[e](...r));
|
|
1937
1939
|
}), t;
|
|
1938
1940
|
}
|
|
1939
1941
|
};
|
|
@@ -1943,13 +1945,13 @@ async function* Ra(...n) {
|
|
|
1943
1945
|
return;
|
|
1944
1946
|
e = e;
|
|
1945
1947
|
const t = new Proxy(e, Da);
|
|
1946
|
-
for (
|
|
1948
|
+
for (li.set(t, e), mn.set(t, Zn(e)); e; )
|
|
1947
1949
|
yield t, e = await (Qn.get(t) || e.continue()), Qn.delete(t);
|
|
1948
1950
|
}
|
|
1949
1951
|
function Fr(n, e) {
|
|
1950
1952
|
return e === Symbol.asyncIterator && $n(n, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && $n(n, [IDBIndex, IDBObjectStore]);
|
|
1951
1953
|
}
|
|
1952
|
-
|
|
1954
|
+
ci((n) => ({
|
|
1953
1955
|
...n,
|
|
1954
1956
|
get(e, t, r) {
|
|
1955
1957
|
return Fr(e, t) ? Ra : n.get(e, t, r);
|
|
@@ -2089,8 +2091,8 @@ const nt = {
|
|
|
2089
2091
|
};
|
|
2090
2092
|
Kn.DATABASE_NAME = "mlightcad", Kn.DATABASE_VERSION = Jn[Jn.length - 1].version;
|
|
2091
2093
|
let Tn = Kn;
|
|
2092
|
-
const Ua = (n) => n.substring(n.lastIndexOf(".") + 1),
|
|
2093
|
-
const e =
|
|
2094
|
+
const Ua = (n) => n.substring(n.lastIndexOf(".") + 1), hi = (n) => n.split("/").pop(), Pr = (n) => {
|
|
2095
|
+
const e = hi(n);
|
|
2094
2096
|
if (e) {
|
|
2095
2097
|
const t = e.lastIndexOf(".");
|
|
2096
2098
|
return t === -1 ? e : e.substring(0, t);
|
|
@@ -2489,7 +2491,7 @@ function Nr(n) {
|
|
|
2489
2491
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
2490
2492
|
i += h.count * t;
|
|
2491
2493
|
}
|
|
2492
|
-
const o = new e(i), a = new
|
|
2494
|
+
const o = new e(i), a = new Wo(o, t, r);
|
|
2493
2495
|
let c = 0;
|
|
2494
2496
|
for (let l = 0; l < n.length; ++l) {
|
|
2495
2497
|
const h = n[l];
|
|
@@ -2567,7 +2569,7 @@ function Va(n, e = 1e-4) {
|
|
|
2567
2569
|
}
|
|
2568
2570
|
return v.setIndex(h), v;
|
|
2569
2571
|
}
|
|
2570
|
-
class Ha extends
|
|
2572
|
+
class Ha extends jo {
|
|
2571
2573
|
constructor(e, t = {}) {
|
|
2572
2574
|
const r = t.font;
|
|
2573
2575
|
if (r === void 0)
|
|
@@ -2579,7 +2581,7 @@ class Ha extends Wo {
|
|
|
2579
2581
|
this.type = "TextGeometry";
|
|
2580
2582
|
}
|
|
2581
2583
|
}
|
|
2582
|
-
const
|
|
2584
|
+
const ui = class {
|
|
2583
2585
|
/**
|
|
2584
2586
|
* Dummy replacement for `computeVertexNormals` that does nothing.
|
|
2585
2587
|
*/
|
|
@@ -2625,10 +2627,10 @@ const hi = class {
|
|
|
2625
2627
|
}
|
|
2626
2628
|
}
|
|
2627
2629
|
};
|
|
2628
|
-
|
|
2629
|
-
let
|
|
2630
|
+
ui.originalComputeVertexNormals = sn.prototype.computeVertexNormals;
|
|
2631
|
+
let ja = ui;
|
|
2630
2632
|
const Ge = new g.Vector2();
|
|
2631
|
-
class zr extends
|
|
2633
|
+
class zr extends ai {
|
|
2632
2634
|
constructor(e, t, r) {
|
|
2633
2635
|
super(e), this.isFound = !1, this.fontSize = t, this.font = r, this.width = this.getCharWidth(e, t, r);
|
|
2634
2636
|
}
|
|
@@ -2639,7 +2641,7 @@ class zr extends oi {
|
|
|
2639
2641
|
*/
|
|
2640
2642
|
toGeometry() {
|
|
2641
2643
|
let e = this.font.cache.getGeometry(this.char, this.fontSize);
|
|
2642
|
-
return e == null && (e =
|
|
2644
|
+
return e == null && (e = ja.runWithoutNormals(() => {
|
|
2643
2645
|
const t = new Ha(this.char, {
|
|
2644
2646
|
font: this.font.font,
|
|
2645
2647
|
depth: 0,
|
|
@@ -2696,14 +2698,14 @@ String.prototype.codePointAt || function() {
|
|
|
2696
2698
|
writable: !0
|
|
2697
2699
|
}) : String.prototype.codePointAt = e;
|
|
2698
2700
|
}();
|
|
2699
|
-
var ur = 0,
|
|
2701
|
+
var ur = 0, di = -3;
|
|
2700
2702
|
function Ct() {
|
|
2701
2703
|
this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
|
|
2702
2704
|
}
|
|
2703
|
-
function
|
|
2705
|
+
function Wa(n, e) {
|
|
2704
2706
|
this.source = n, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new Ct(), this.dtree = new Ct();
|
|
2705
2707
|
}
|
|
2706
|
-
var
|
|
2708
|
+
var pi = new Ct(), fi = new Ct(), dr = new Uint8Array(30), pr = new Uint16Array(30), gi = new Uint8Array(30), mi = new Uint16Array(30), Xa = new Uint8Array([
|
|
2707
2709
|
16,
|
|
2708
2710
|
17,
|
|
2709
2711
|
18,
|
|
@@ -2724,7 +2726,7 @@ var di = new Ct(), pi = new Ct(), dr = new Uint8Array(30), pr = new Uint16Array(
|
|
|
2724
2726
|
1,
|
|
2725
2727
|
15
|
|
2726
2728
|
]), Vr = new Ct(), ve = new Uint8Array(320);
|
|
2727
|
-
function
|
|
2729
|
+
function yi(n, e, t, r) {
|
|
2728
2730
|
var s, i;
|
|
2729
2731
|
for (s = 0; s < t; ++s)
|
|
2730
2732
|
n[s] = 0;
|
|
@@ -2815,7 +2817,7 @@ function qa(n, e, t) {
|
|
|
2815
2817
|
}
|
|
2816
2818
|
Cn(e, ve, 0, r), Cn(t, ve, r, s);
|
|
2817
2819
|
}
|
|
2818
|
-
function
|
|
2820
|
+
function jr(n, e, t) {
|
|
2819
2821
|
for (; ; ) {
|
|
2820
2822
|
var r = er(n, e);
|
|
2821
2823
|
if (r === 256)
|
|
@@ -2824,7 +2826,7 @@ function Wr(n, e, t) {
|
|
|
2824
2826
|
n.dest[n.destLen++] = r;
|
|
2825
2827
|
else {
|
|
2826
2828
|
var s, i, o, a;
|
|
2827
|
-
for (r -= 257, s = _e(n, dr[r], pr[r]), i = er(n, t), o = n.destLen - _e(n,
|
|
2829
|
+
for (r -= 257, s = _e(n, dr[r], pr[r]), i = er(n, t), o = n.destLen - _e(n, gi[i], mi[i]), a = o; a < o + s; ++a)
|
|
2828
2830
|
n.dest[n.destLen++] = n.dest[a];
|
|
2829
2831
|
}
|
|
2830
2832
|
}
|
|
@@ -2833,35 +2835,35 @@ function Za(n) {
|
|
|
2833
2835
|
for (var e, t, r; n.bitcount > 8; )
|
|
2834
2836
|
n.sourceIndex--, n.bitcount -= 8;
|
|
2835
2837
|
if (e = n.source[n.sourceIndex + 1], e = 256 * e + n.source[n.sourceIndex], t = n.source[n.sourceIndex + 3], t = 256 * t + n.source[n.sourceIndex + 2], e !== (~t & 65535))
|
|
2836
|
-
return
|
|
2838
|
+
return di;
|
|
2837
2839
|
for (n.sourceIndex += 4, r = e; r; --r)
|
|
2838
2840
|
n.dest[n.destLen++] = n.source[n.sourceIndex++];
|
|
2839
2841
|
return n.bitcount = 0, ur;
|
|
2840
2842
|
}
|
|
2841
2843
|
function Qa(n, e) {
|
|
2842
|
-
var t = new
|
|
2844
|
+
var t = new Wa(n, e), r, s, i;
|
|
2843
2845
|
do {
|
|
2844
2846
|
switch (r = Ya(t), s = _e(t, 2, 0), s) {
|
|
2845
2847
|
case 0:
|
|
2846
2848
|
i = Za(t);
|
|
2847
2849
|
break;
|
|
2848
2850
|
case 1:
|
|
2849
|
-
i =
|
|
2851
|
+
i = jr(t, pi, fi);
|
|
2850
2852
|
break;
|
|
2851
2853
|
case 2:
|
|
2852
|
-
qa(t, t.ltree, t.dtree), i =
|
|
2854
|
+
qa(t, t.ltree, t.dtree), i = jr(t, t.ltree, t.dtree);
|
|
2853
2855
|
break;
|
|
2854
2856
|
default:
|
|
2855
|
-
i =
|
|
2857
|
+
i = di;
|
|
2856
2858
|
}
|
|
2857
2859
|
if (i !== ur)
|
|
2858
2860
|
throw new Error("Data error");
|
|
2859
2861
|
} while (!r);
|
|
2860
2862
|
return t.destLen < t.dest.length ? typeof t.dest.slice == "function" ? t.dest.slice(0, t.destLen) : t.dest.subarray(0, t.destLen) : t.dest;
|
|
2861
2863
|
}
|
|
2862
|
-
$a(
|
|
2863
|
-
|
|
2864
|
-
|
|
2864
|
+
$a(pi, fi);
|
|
2865
|
+
yi(dr, pr, 4, 3);
|
|
2866
|
+
yi(gi, mi, 2, 1);
|
|
2865
2867
|
dr[28] = 0;
|
|
2866
2868
|
pr[28] = 258;
|
|
2867
2869
|
var Ja = Qa;
|
|
@@ -2908,24 +2910,24 @@ Pe.prototype.addQuad = function(n, e, t, r, s, i) {
|
|
|
2908
2910
|
var o = n + 0.6666666666666666 * (t - n), a = e + 2 / 3 * (r - e), c = o + 1 / 3 * (s - n), l = a + 1 / 3 * (i - e);
|
|
2909
2911
|
this.addBezier(n, e, o, a, c, l, s, i);
|
|
2910
2912
|
};
|
|
2911
|
-
function
|
|
2913
|
+
function W() {
|
|
2912
2914
|
this.commands = [], this.fill = "black", this.stroke = null, this.strokeWidth = 1;
|
|
2913
2915
|
}
|
|
2914
|
-
|
|
2916
|
+
W.prototype.moveTo = function(n, e) {
|
|
2915
2917
|
this.commands.push({
|
|
2916
2918
|
type: "M",
|
|
2917
2919
|
x: n,
|
|
2918
2920
|
y: e
|
|
2919
2921
|
});
|
|
2920
2922
|
};
|
|
2921
|
-
|
|
2923
|
+
W.prototype.lineTo = function(n, e) {
|
|
2922
2924
|
this.commands.push({
|
|
2923
2925
|
type: "L",
|
|
2924
2926
|
x: n,
|
|
2925
2927
|
y: e
|
|
2926
2928
|
});
|
|
2927
2929
|
};
|
|
2928
|
-
|
|
2930
|
+
W.prototype.curveTo = W.prototype.bezierCurveTo = function(n, e, t, r, s, i) {
|
|
2929
2931
|
this.commands.push({
|
|
2930
2932
|
type: "C",
|
|
2931
2933
|
x1: n,
|
|
@@ -2936,7 +2938,7 @@ j.prototype.curveTo = j.prototype.bezierCurveTo = function(n, e, t, r, s, i) {
|
|
|
2936
2938
|
y: i
|
|
2937
2939
|
});
|
|
2938
2940
|
};
|
|
2939
|
-
|
|
2941
|
+
W.prototype.quadTo = W.prototype.quadraticCurveTo = function(n, e, t, r) {
|
|
2940
2942
|
this.commands.push({
|
|
2941
2943
|
type: "Q",
|
|
2942
2944
|
x1: n,
|
|
@@ -2945,12 +2947,12 @@ j.prototype.quadTo = j.prototype.quadraticCurveTo = function(n, e, t, r) {
|
|
|
2945
2947
|
y: r
|
|
2946
2948
|
});
|
|
2947
2949
|
};
|
|
2948
|
-
|
|
2950
|
+
W.prototype.close = W.prototype.closePath = function() {
|
|
2949
2951
|
this.commands.push({
|
|
2950
2952
|
type: "Z"
|
|
2951
2953
|
});
|
|
2952
2954
|
};
|
|
2953
|
-
|
|
2955
|
+
W.prototype.extend = function(n) {
|
|
2954
2956
|
if (n.commands)
|
|
2955
2957
|
n = n.commands;
|
|
2956
2958
|
else if (n instanceof Pe) {
|
|
@@ -2960,7 +2962,7 @@ j.prototype.extend = function(n) {
|
|
|
2960
2962
|
}
|
|
2961
2963
|
Array.prototype.push.apply(this.commands, n);
|
|
2962
2964
|
};
|
|
2963
|
-
|
|
2965
|
+
W.prototype.getBoundingBox = function() {
|
|
2964
2966
|
for (var n = new Pe(), e = 0, t = 0, r = 0, s = 0, i = 0; i < this.commands.length; i++) {
|
|
2965
2967
|
var o = this.commands[i];
|
|
2966
2968
|
switch (o.type) {
|
|
@@ -2985,7 +2987,7 @@ j.prototype.getBoundingBox = function() {
|
|
|
2985
2987
|
}
|
|
2986
2988
|
return n.isEmpty() && n.addPoint(0, 0), n;
|
|
2987
2989
|
};
|
|
2988
|
-
|
|
2990
|
+
W.prototype.draw = function(n) {
|
|
2989
2991
|
n.beginPath();
|
|
2990
2992
|
for (var e = 0; e < this.commands.length; e += 1) {
|
|
2991
2993
|
var t = this.commands[e];
|
|
@@ -2993,7 +2995,7 @@ j.prototype.draw = function(n) {
|
|
|
2993
2995
|
}
|
|
2994
2996
|
this.fill && (n.fillStyle = this.fill, n.fill()), this.stroke && (n.strokeStyle = this.stroke, n.lineWidth = this.strokeWidth, n.stroke());
|
|
2995
2997
|
};
|
|
2996
|
-
|
|
2998
|
+
W.prototype.toPathData = function(n) {
|
|
2997
2999
|
n = n !== void 0 ? n : 2;
|
|
2998
3000
|
function e(o) {
|
|
2999
3001
|
return Math.round(o) === o ? "" + Math.round(o) : o.toFixed(n);
|
|
@@ -3011,21 +3013,21 @@ j.prototype.toPathData = function(n) {
|
|
|
3011
3013
|
}
|
|
3012
3014
|
return r;
|
|
3013
3015
|
};
|
|
3014
|
-
|
|
3016
|
+
W.prototype.toSVG = function(n) {
|
|
3015
3017
|
var e = '<path d="';
|
|
3016
3018
|
return e += this.toPathData(n), e += '"', this.fill && this.fill !== "black" && (this.fill === null ? e += ' fill="none"' : e += ' fill="' + this.fill + '"'), this.stroke && (e += ' stroke="' + this.stroke + '" stroke-width="' + this.strokeWidth + '"'), e += "/>", e;
|
|
3017
3019
|
};
|
|
3018
|
-
|
|
3020
|
+
W.prototype.toDOMElement = function(n) {
|
|
3019
3021
|
var e = this.toPathData(n), t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3020
3022
|
return t.setAttribute("d", e), t;
|
|
3021
3023
|
};
|
|
3022
|
-
function
|
|
3024
|
+
function vi(n) {
|
|
3023
3025
|
throw new Error(n);
|
|
3024
3026
|
}
|
|
3025
|
-
function
|
|
3026
|
-
n ||
|
|
3027
|
+
function Wr(n, e) {
|
|
3028
|
+
n || vi(e);
|
|
3027
3029
|
}
|
|
3028
|
-
var A = { fail:
|
|
3030
|
+
var A = { fail: vi, argument: Wr, assert: Wr }, Xr = 32768, $r = 2147483648, ct = {}, C = {}, B = {};
|
|
3029
3031
|
function me(n) {
|
|
3030
3032
|
return function() {
|
|
3031
3033
|
return n;
|
|
@@ -3529,7 +3531,7 @@ function rc(n, e) {
|
|
|
3529
3531
|
function fr(n, e) {
|
|
3530
3532
|
return n.getUint32(e, !1);
|
|
3531
3533
|
}
|
|
3532
|
-
function
|
|
3534
|
+
function bi(n, e) {
|
|
3533
3535
|
var t = n.getInt16(e, !1), r = n.getUint16(e + 2, !1);
|
|
3534
3536
|
return t + r / 65535;
|
|
3535
3537
|
}
|
|
@@ -3595,7 +3597,7 @@ b.prototype.parseULong = function() {
|
|
|
3595
3597
|
};
|
|
3596
3598
|
b.prototype.parseOffset32 = b.prototype.parseULong;
|
|
3597
3599
|
b.prototype.parseFixed = function() {
|
|
3598
|
-
var n =
|
|
3600
|
+
var n = bi(this.data, this.offset + this.relativeOffset);
|
|
3599
3601
|
return this.relativeOffset += 4, n;
|
|
3600
3602
|
};
|
|
3601
3603
|
b.prototype.parseString = function(n) {
|
|
@@ -3857,7 +3859,7 @@ var M = {
|
|
|
3857
3859
|
getCard16: hn,
|
|
3858
3860
|
getShort: rc,
|
|
3859
3861
|
getULong: fr,
|
|
3860
|
-
getFixed:
|
|
3862
|
+
getFixed: bi,
|
|
3861
3863
|
getTag: sc,
|
|
3862
3864
|
getOffset: ic,
|
|
3863
3865
|
getBytes: oc,
|
|
@@ -3980,7 +3982,7 @@ function fc(n) {
|
|
|
3980
3982
|
}
|
|
3981
3983
|
return i;
|
|
3982
3984
|
}
|
|
3983
|
-
var
|
|
3985
|
+
var xi = { parse: uc, make: fc }, en = [
|
|
3984
3986
|
".notdef",
|
|
3985
3987
|
"space",
|
|
3986
3988
|
"exclam",
|
|
@@ -5141,10 +5143,10 @@ var bi = { parse: uc, make: fc }, en = [
|
|
|
5141
5143
|
"ccaron",
|
|
5142
5144
|
"dcroat"
|
|
5143
5145
|
];
|
|
5144
|
-
function
|
|
5146
|
+
function Si(n) {
|
|
5145
5147
|
this.font = n;
|
|
5146
5148
|
}
|
|
5147
|
-
|
|
5149
|
+
Si.prototype.charToGlyphIndex = function(n) {
|
|
5148
5150
|
var e = n.codePointAt(0), t = this.font.glyphs;
|
|
5149
5151
|
if (t) {
|
|
5150
5152
|
for (var r = 0; r < t.length; r += 1)
|
|
@@ -5154,10 +5156,10 @@ xi.prototype.charToGlyphIndex = function(n) {
|
|
|
5154
5156
|
}
|
|
5155
5157
|
return null;
|
|
5156
5158
|
};
|
|
5157
|
-
function
|
|
5159
|
+
function wi(n) {
|
|
5158
5160
|
this.cmap = n;
|
|
5159
5161
|
}
|
|
5160
|
-
|
|
5162
|
+
wi.prototype.charToGlyphIndex = function(n) {
|
|
5161
5163
|
return this.cmap.glyphIndexMap[n.codePointAt(0)] || 0;
|
|
5162
5164
|
};
|
|
5163
5165
|
function un(n, e) {
|
|
@@ -5221,7 +5223,7 @@ function xc(n, e, t, r, s) {
|
|
|
5221
5223
|
}
|
|
5222
5224
|
var Ne = { line: xc };
|
|
5223
5225
|
function Sc(n, e) {
|
|
5224
|
-
var t = e || new
|
|
5226
|
+
var t = e || new W();
|
|
5225
5227
|
return {
|
|
5226
5228
|
configurable: !0,
|
|
5227
5229
|
get: function() {
|
|
@@ -5256,7 +5258,7 @@ oe.prototype.getPath = function(n, e, t, r, s) {
|
|
|
5256
5258
|
var l = 1 / (this.path.unitsPerEm || 1e3) * t;
|
|
5257
5259
|
a === void 0 && (a = l), c === void 0 && (c = l);
|
|
5258
5260
|
}
|
|
5259
|
-
for (var h = new
|
|
5261
|
+
for (var h = new W(), d = 0; d < i.length; d += 1) {
|
|
5260
5262
|
var u = i[d];
|
|
5261
5263
|
u.type === "M" ? h.moveTo(n + u.x * a, e + -u.y * c) : u.type === "L" ? h.lineTo(n + u.x * a, e + -u.y * c) : u.type === "Q" ? h.quadraticCurveTo(
|
|
5262
5264
|
n + u.x1 * a,
|
|
@@ -5320,7 +5322,7 @@ oe.prototype.drawMetrics = function(n, e, t, r) {
|
|
|
5320
5322
|
var i = this.xMin || 0, o = this.yMin || 0, a = this.xMax || 0, c = this.yMax || 0, l = this.advanceWidth || 0;
|
|
5321
5323
|
n.strokeStyle = "blue", Ne.line(n, e + i * s, -1e4, e + i * s, 1e4), Ne.line(n, e + a * s, -1e4, e + a * s, 1e4), Ne.line(n, -1e4, t + -o * s, 1e4, t + -o * s), Ne.line(n, -1e4, t + -c * s, 1e4, t + -c * s), n.strokeStyle = "green", Ne.line(n, e + l * s, -1e4, e + l * s, 1e4);
|
|
5322
5324
|
};
|
|
5323
|
-
function
|
|
5325
|
+
function jt(n, e, t) {
|
|
5324
5326
|
Object.defineProperty(n, e, {
|
|
5325
5327
|
get: function() {
|
|
5326
5328
|
return n.path, n[t];
|
|
@@ -5365,7 +5367,7 @@ function _c(n, e, t, r, s, i) {
|
|
|
5365
5367
|
t(o, r, s);
|
|
5366
5368
|
var a = i(n.glyphs, o);
|
|
5367
5369
|
return a.unitsPerEm = n.unitsPerEm, a;
|
|
5368
|
-
},
|
|
5370
|
+
}, jt(o, "xMin", "_xMin"), jt(o, "xMax", "_xMax"), jt(o, "yMin", "_yMin"), jt(o, "yMax", "_yMax"), o;
|
|
5369
5371
|
};
|
|
5370
5372
|
}
|
|
5371
5373
|
function Tc(n, e, t, r) {
|
|
@@ -5378,14 +5380,14 @@ function Tc(n, e, t, r) {
|
|
|
5378
5380
|
};
|
|
5379
5381
|
}
|
|
5380
5382
|
var Ce = { GlyphSet: mr, glyphLoader: wc, ttfGlyphLoader: _c, cffGlyphLoader: Tc };
|
|
5381
|
-
function
|
|
5383
|
+
function _i(n, e) {
|
|
5382
5384
|
if (n === e)
|
|
5383
5385
|
return !0;
|
|
5384
5386
|
if (Array.isArray(n) && Array.isArray(e)) {
|
|
5385
5387
|
if (n.length !== e.length)
|
|
5386
5388
|
return !1;
|
|
5387
5389
|
for (var t = 0; t < n.length; t += 1)
|
|
5388
|
-
if (!
|
|
5390
|
+
if (!_i(n[t], e[t]))
|
|
5389
5391
|
return !1;
|
|
5390
5392
|
return !0;
|
|
5391
5393
|
} else
|
|
@@ -5466,7 +5468,7 @@ function Mc(n) {
|
|
|
5466
5468
|
}
|
|
5467
5469
|
return e;
|
|
5468
5470
|
}
|
|
5469
|
-
function
|
|
5471
|
+
function Ti(n, e, t) {
|
|
5470
5472
|
e = e !== void 0 ? e : 0;
|
|
5471
5473
|
var r = new M.Parser(n, e), s = [], i = [];
|
|
5472
5474
|
for (t = t !== void 0 ? t : n.length; r.relativeOffset < t; ) {
|
|
@@ -5478,7 +5480,7 @@ function _i(n, e, t) {
|
|
|
5478
5480
|
function _t(n, e) {
|
|
5479
5481
|
return e <= 390 ? e = en[e] : e = n[e - 391], e;
|
|
5480
5482
|
}
|
|
5481
|
-
function
|
|
5483
|
+
function Ci(n, e, t) {
|
|
5482
5484
|
for (var r = {}, s, i = 0; i < e.length; i += 1) {
|
|
5483
5485
|
var o = e[i];
|
|
5484
5486
|
if (Array.isArray(o.type)) {
|
|
@@ -5496,7 +5498,7 @@ function Ac(n, e) {
|
|
|
5496
5498
|
var t = {};
|
|
5497
5499
|
return t.formatMajor = M.getCard8(n, e), t.formatMinor = M.getCard8(n, e + 1), t.size = M.getCard8(n, e + 2), t.offsetSize = M.getCard8(n, e + 3), t.startOffset = e, t.endOffset = e + 4, t;
|
|
5498
5500
|
}
|
|
5499
|
-
var
|
|
5501
|
+
var Ii = [
|
|
5500
5502
|
{ name: "version", op: 0, type: "SID" },
|
|
5501
5503
|
{ name: "notice", op: 1, type: "SID" },
|
|
5502
5504
|
{ name: "copyright", op: 1200, type: "SID" },
|
|
@@ -5532,18 +5534,18 @@ var Ci = [
|
|
|
5532
5534
|
{ name: "fdArray", op: 1236, type: "offset" },
|
|
5533
5535
|
{ name: "fdSelect", op: 1237, type: "offset" },
|
|
5534
5536
|
{ name: "fontName", op: 1238, type: "SID" }
|
|
5535
|
-
],
|
|
5537
|
+
], ki = [
|
|
5536
5538
|
{ name: "subrs", op: 19, type: "offset", value: 0 },
|
|
5537
5539
|
{ name: "defaultWidthX", op: 20, type: "number", value: 0 },
|
|
5538
5540
|
{ name: "nominalWidthX", op: 21, type: "number", value: 0 }
|
|
5539
5541
|
];
|
|
5540
5542
|
function Bc(n, e) {
|
|
5541
|
-
var t =
|
|
5542
|
-
return
|
|
5543
|
+
var t = Ti(n, 0, n.byteLength);
|
|
5544
|
+
return Ci(t, Ii, e);
|
|
5543
5545
|
}
|
|
5544
|
-
function
|
|
5545
|
-
var s =
|
|
5546
|
-
return
|
|
5546
|
+
function Ei(n, e, t, r) {
|
|
5547
|
+
var s = Ti(n, e, t);
|
|
5548
|
+
return Ci(s, ki, r);
|
|
5547
5549
|
}
|
|
5548
5550
|
function Zr(n, e, t, r) {
|
|
5549
5551
|
for (var s = [], i = 0; i < t.length; i += 1) {
|
|
@@ -5551,7 +5553,7 @@ function Zr(n, e, t, r) {
|
|
|
5551
5553
|
a._subrs = [], a._subrsBias = 0, a._defaultWidthX = 0, a._nominalWidthX = 0;
|
|
5552
5554
|
var c = a.private[0], l = a.private[1];
|
|
5553
5555
|
if (c !== 0 && l !== 0) {
|
|
5554
|
-
var h =
|
|
5556
|
+
var h = Ei(n, l + e, c, r);
|
|
5555
5557
|
if (a._defaultWidthX = h.defaultWidthX, a._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
|
|
5556
5558
|
var d = l + h.subrs, u = Ae(n, d + e);
|
|
5557
5559
|
a._subrs = u.objects, a._subrsBias = sr(a._subrs);
|
|
@@ -5601,7 +5603,7 @@ function Oc(n, e, t) {
|
|
|
5601
5603
|
return new un(s, t);
|
|
5602
5604
|
}
|
|
5603
5605
|
function Qr(n, e, t) {
|
|
5604
|
-
var r, s, i, o, a = new
|
|
5606
|
+
var r, s, i, o, a = new W(), c = [], l = 0, h = !1, d = !1, u = 0, p = 0, f, m, y, v;
|
|
5605
5607
|
if (n.isCIDFont) {
|
|
5606
5608
|
var S = n.tables.cff.topDict._fdSelect[e.index], x = n.tables.cff.topDict._fdArray[S];
|
|
5607
5609
|
f = x._subrs, m = x._subrsBias, y = x._defaultWidthX, v = x._nominalWidthX;
|
|
@@ -5768,7 +5770,7 @@ function Rc(n, e, t, r) {
|
|
|
5768
5770
|
var p = Ae(n, d), f = Zr(n, e, p.objects, a.objects);
|
|
5769
5771
|
h._fdArray = f, u += e, h._fdSelect = Dc(n, u, t.numGlyphs, f.length);
|
|
5770
5772
|
}
|
|
5771
|
-
var m = e + h.private[1], y =
|
|
5773
|
+
var m = e + h.private[1], y = Ei(n, m, h.private[0], a.objects);
|
|
5772
5774
|
if (t.defaultWidthX = y.defaultWidthX, t.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
|
|
5773
5775
|
var v = m + y.subrs, S = Ae(n, v);
|
|
5774
5776
|
t.subrs = S.objects, t.subrsBias = sr(t.subrs);
|
|
@@ -5788,7 +5790,7 @@ function Rc(n, e, t, r) {
|
|
|
5788
5790
|
t.glyphs.push(w, Ce.cffGlyphLoader(t, w, Qr, L));
|
|
5789
5791
|
}
|
|
5790
5792
|
}
|
|
5791
|
-
function
|
|
5793
|
+
function Mi(n, e) {
|
|
5792
5794
|
var t, r = en.indexOf(n);
|
|
5793
5795
|
return r >= 0 && (t = r), r = e.indexOf(n), r >= 0 ? t = r + en.length : (t = en.length + e.length, e.push(n)), t;
|
|
5794
5796
|
}
|
|
@@ -5809,10 +5811,10 @@ function Fc(n) {
|
|
|
5809
5811
|
e.names.push({ name: "name_" + t, type: "NAME", value: n[t] });
|
|
5810
5812
|
return e;
|
|
5811
5813
|
}
|
|
5812
|
-
function
|
|
5814
|
+
function Ai(n, e, t) {
|
|
5813
5815
|
for (var r = {}, s = 0; s < n.length; s += 1) {
|
|
5814
5816
|
var i = n[s], o = e[i.name];
|
|
5815
|
-
o !== void 0 && !
|
|
5817
|
+
o !== void 0 && !_i(o, i.value) && (i.type === "SID" && (o = Mi(o, t)), r[i.op] = { name: i.name, type: i.type, value: o });
|
|
5816
5818
|
}
|
|
5817
5819
|
return r;
|
|
5818
5820
|
}
|
|
@@ -5820,7 +5822,7 @@ function Jr(n, e) {
|
|
|
5820
5822
|
var t = new k.Record("Top DICT", [
|
|
5821
5823
|
{ name: "dict", type: "DICT", value: {} }
|
|
5822
5824
|
]);
|
|
5823
|
-
return t.dict =
|
|
5825
|
+
return t.dict = Ai(Ii, n, e), t;
|
|
5824
5826
|
}
|
|
5825
5827
|
function Kr(n) {
|
|
5826
5828
|
var e = new k.Record("Top DICT INDEX", [
|
|
@@ -5846,7 +5848,7 @@ function Nc(n, e) {
|
|
|
5846
5848
|
for (var t = new k.Record("Charsets", [
|
|
5847
5849
|
{ name: "format", type: "Card8", value: 0 }
|
|
5848
5850
|
]), r = 0; r < n.length; r += 1) {
|
|
5849
|
-
var s = n[r], i =
|
|
5851
|
+
var s = n[r], i = Mi(s, e);
|
|
5850
5852
|
t.fields.push({ name: "glyph_" + r, type: "SID", value: i });
|
|
5851
5853
|
}
|
|
5852
5854
|
return t;
|
|
@@ -5892,9 +5894,9 @@ function Hc(n, e) {
|
|
|
5892
5894
|
var t = new k.Record("Private DICT", [
|
|
5893
5895
|
{ name: "dict", type: "DICT", value: {} }
|
|
5894
5896
|
]);
|
|
5895
|
-
return t.dict =
|
|
5897
|
+
return t.dict = Ai(ki, n, e), t;
|
|
5896
5898
|
}
|
|
5897
|
-
function
|
|
5899
|
+
function jc(n, e) {
|
|
5898
5900
|
for (var t = new k.Table("CFF ", [
|
|
5899
5901
|
{ name: "header", type: "RECORD" },
|
|
5900
5902
|
{ name: "nameIndex", type: "RECORD" },
|
|
@@ -5924,8 +5926,8 @@ function Wc(n, e) {
|
|
|
5924
5926
|
var d = t.header.sizeOf() + t.nameIndex.sizeOf() + t.topDictIndex.sizeOf() + t.stringIndex.sizeOf() + t.globalSubrIndex.sizeOf();
|
|
5925
5927
|
return s.charset = d, s.encoding = 0, s.charStrings = s.charset + t.charsets.sizeOf(), s.private[1] = s.charStrings + t.charStringsIndex.sizeOf(), h = Jr(s, l), t.topDictIndex = Kr(h), t;
|
|
5926
5928
|
}
|
|
5927
|
-
var
|
|
5928
|
-
function
|
|
5929
|
+
var Bi = { parse: Rc, make: jc };
|
|
5930
|
+
function Wc(n, e) {
|
|
5929
5931
|
var t = {}, r = new M.Parser(n, e);
|
|
5930
5932
|
return t.version = r.parseVersion(), t.fontRevision = Math.round(r.parseFixed() * 1e3) / 1e3, t.checkSumAdjustment = r.parseULong(), t.magicNumber = r.parseULong(), A.argument(t.magicNumber === 1594834165, "Font header has wrong magic number."), t.flags = r.parseUShort(), t.unitsPerEm = r.parseUShort(), t.created = r.parseLongDateTime(), t.modified = r.parseLongDateTime(), t.xMin = r.parseShort(), t.yMin = r.parseShort(), t.xMax = r.parseShort(), t.yMax = r.parseShort(), t.macStyle = r.parseUShort(), t.lowestRecPPEM = r.parseUShort(), t.fontDirectionHint = r.parseShort(), t.indexToLocFormat = r.parseShort(), t.glyphDataFormat = r.parseShort(), t;
|
|
5931
5933
|
}
|
|
@@ -5951,7 +5953,7 @@ function Xc(n) {
|
|
|
5951
5953
|
{ name: "glyphDataFormat", type: "SHORT", value: 0 }
|
|
5952
5954
|
], n);
|
|
5953
5955
|
}
|
|
5954
|
-
var
|
|
5956
|
+
var Li = { parse: Wc, make: Xc };
|
|
5955
5957
|
function $c(n, e) {
|
|
5956
5958
|
var t = {}, r = new M.Parser(n, e);
|
|
5957
5959
|
return t.version = r.parseVersion(), t.ascender = r.parseShort(), t.descender = r.parseShort(), t.lineGap = r.parseShort(), t.advanceWidthMax = r.parseUShort(), t.minLeftSideBearing = r.parseShort(), t.minRightSideBearing = r.parseShort(), t.xMaxExtent = r.parseShort(), t.caretSlopeRise = r.parseShort(), t.caretSlopeRun = r.parseShort(), t.caretOffset = r.parseShort(), r.relativeOffset += 8, t.metricDataFormat = r.parseShort(), t.numberOfHMetrics = r.parseUShort(), t;
|
|
@@ -5977,7 +5979,7 @@ function Yc(n) {
|
|
|
5977
5979
|
{ name: "numberOfHMetrics", type: "USHORT", value: 0 }
|
|
5978
5980
|
], n);
|
|
5979
5981
|
}
|
|
5980
|
-
var
|
|
5982
|
+
var Oi = { parse: $c, make: Yc };
|
|
5981
5983
|
function qc(n, e, t, r, s) {
|
|
5982
5984
|
for (var i, o, a = new M.Parser(n, e), c = 0; c < r; c += 1) {
|
|
5983
5985
|
c < t && (i = a.parseUShort(), o = a.parseShort());
|
|
@@ -6003,7 +6005,7 @@ function Jc(n) {
|
|
|
6003
6005
|
}
|
|
6004
6006
|
return e;
|
|
6005
6007
|
}
|
|
6006
|
-
var
|
|
6008
|
+
var Di = { parse: Qc, make: Jc };
|
|
6007
6009
|
function Kc(n) {
|
|
6008
6010
|
for (var e = new k.Table("ltag", [
|
|
6009
6011
|
{ name: "version", type: "ULONG", value: 1 },
|
|
@@ -6025,7 +6027,7 @@ function el(n, e) {
|
|
|
6025
6027
|
}
|
|
6026
6028
|
return i;
|
|
6027
6029
|
}
|
|
6028
|
-
var
|
|
6030
|
+
var Ri = { make: Kc, parse: el };
|
|
6029
6031
|
function tl(n, e) {
|
|
6030
6032
|
var t = {}, r = new M.Parser(n, e);
|
|
6031
6033
|
return t.version = r.parseVersion(), t.numGlyphs = r.parseUShort(), t.version === 1 && (t.maxPoints = r.parseUShort(), t.maxContours = r.parseUShort(), t.maxCompositePoints = r.parseUShort(), t.maxCompositeContours = r.parseUShort(), t.maxZones = r.parseUShort(), t.maxTwilightPoints = r.parseUShort(), t.maxStorage = r.parseUShort(), t.maxFunctionDefs = r.parseUShort(), t.maxInstructionDefs = r.parseUShort(), t.maxStackElements = r.parseUShort(), t.maxSizeOfInstructions = r.parseUShort(), t.maxComponentElements = r.parseUShort(), t.maxComponentDepth = r.parseUShort()), t;
|
|
@@ -6036,7 +6038,7 @@ function nl(n) {
|
|
|
6036
6038
|
{ name: "numGlyphs", type: "USHORT", value: n }
|
|
6037
6039
|
]);
|
|
6038
6040
|
}
|
|
6039
|
-
var
|
|
6041
|
+
var Ui = { parse: tl, make: nl }, Fi = [
|
|
6040
6042
|
"copyright",
|
|
6041
6043
|
// 0
|
|
6042
6044
|
"fontFamily",
|
|
@@ -6083,7 +6085,7 @@ var Ri = { parse: tl, make: nl }, Ui = [
|
|
|
6083
6085
|
// 21
|
|
6084
6086
|
"wwsSubfamily"
|
|
6085
6087
|
// 22
|
|
6086
|
-
],
|
|
6088
|
+
], Pi = {
|
|
6087
6089
|
0: "en",
|
|
6088
6090
|
1: "fr",
|
|
6089
6091
|
2: "de",
|
|
@@ -6442,7 +6444,7 @@ var Ri = { parse: tl, make: nl }, Ui = [
|
|
|
6442
6444
|
// langAzerbaijanRoman → smRoman
|
|
6443
6445
|
151: 0
|
|
6444
6446
|
// langNynorsk → smRoman
|
|
6445
|
-
},
|
|
6447
|
+
}, Gi = {
|
|
6446
6448
|
1078: "af",
|
|
6447
6449
|
1052: "sq",
|
|
6448
6450
|
1156: "gsw",
|
|
@@ -6665,9 +6667,9 @@ function sl(n, e, t) {
|
|
|
6665
6667
|
return t[e];
|
|
6666
6668
|
break;
|
|
6667
6669
|
case 1:
|
|
6668
|
-
return Fi[e];
|
|
6669
|
-
case 3:
|
|
6670
6670
|
return Pi[e];
|
|
6671
|
+
case 3:
|
|
6672
|
+
return Gi[e];
|
|
6671
6673
|
}
|
|
6672
6674
|
}
|
|
6673
6675
|
var ir = "utf-16", il = {
|
|
@@ -6761,7 +6763,7 @@ var ir = "utf-16", il = {
|
|
|
6761
6763
|
146: "x-mac-gaelic"
|
|
6762
6764
|
// langIrishGaelicScript
|
|
6763
6765
|
};
|
|
6764
|
-
function
|
|
6766
|
+
function Ni(n, e, t) {
|
|
6765
6767
|
switch (n) {
|
|
6766
6768
|
case 0:
|
|
6767
6769
|
return ir;
|
|
@@ -6775,7 +6777,7 @@ function Gi(n, e, t) {
|
|
|
6775
6777
|
}
|
|
6776
6778
|
function al(n, e, t) {
|
|
6777
6779
|
for (var r = {}, s = new M.Parser(n, e), i = s.parseUShort(), o = s.parseUShort(), a = s.offset + s.parseUShort(), c = 0; c < o; c++) {
|
|
6778
|
-
var l = s.parseUShort(), h = s.parseUShort(), d = s.parseUShort(), u = s.parseUShort(), p =
|
|
6780
|
+
var l = s.parseUShort(), h = s.parseUShort(), d = s.parseUShort(), u = s.parseUShort(), p = Fi[u] || u, f = s.parseUShort(), m = s.parseUShort(), y = sl(l, d, t), v = Ni(l, h, d);
|
|
6779
6781
|
if (v !== void 0 && y !== void 0) {
|
|
6780
6782
|
var S = void 0;
|
|
6781
6783
|
if (v === ir ? S = ct.UTF16(n, a + m, f) : S = ct.MACSTRING(n, a + m, f, v), S) {
|
|
@@ -6824,18 +6826,18 @@ function ts(n, e) {
|
|
|
6824
6826
|
return t;
|
|
6825
6827
|
}
|
|
6826
6828
|
function ll(n, e) {
|
|
6827
|
-
var t, r = [], s = {}, i = In(
|
|
6829
|
+
var t, r = [], s = {}, i = In(Fi);
|
|
6828
6830
|
for (var o in n) {
|
|
6829
6831
|
var a = i[o];
|
|
6830
6832
|
if (a === void 0 && (a = o), t = parseInt(a), isNaN(t))
|
|
6831
6833
|
throw new Error('Name table entry "' + o + '" does not exist, see nameTableNames for complete list.');
|
|
6832
6834
|
s[t] = n[o], r.push(t);
|
|
6833
6835
|
}
|
|
6834
|
-
for (var c = In(
|
|
6836
|
+
for (var c = In(Pi), l = In(Gi), h = [], d = [], u = 0; u < r.length; u++) {
|
|
6835
6837
|
t = r[u];
|
|
6836
6838
|
var p = s[t];
|
|
6837
6839
|
for (var f in p) {
|
|
6838
|
-
var m = p[f], y = 1, v = c[f], S = rl[v], x =
|
|
6840
|
+
var m = p[f], y = 1, v = c[f], S = rl[v], x = Ni(y, S, v), _ = C.MACSTRING(m, x);
|
|
6839
6841
|
_ === void 0 && (y = 0, v = e.indexOf(f), v < 0 && (v = e.length, e.push(f)), S = 4, _ = C.UTF16(m));
|
|
6840
6842
|
var w = ts(_, d);
|
|
6841
6843
|
h.push(es(
|
|
@@ -6871,7 +6873,7 @@ function ll(n, e) {
|
|
|
6871
6873
|
O.fields.push({ name: "record_" + G, type: "RECORD", value: h[G] });
|
|
6872
6874
|
return O.fields.push({ name: "strings", type: "LITERAL", value: d }), O;
|
|
6873
6875
|
}
|
|
6874
|
-
var
|
|
6876
|
+
var zi = { parse: al, make: ll }, or = [
|
|
6875
6877
|
{ begin: 0, end: 127 },
|
|
6876
6878
|
// Basic Latin
|
|
6877
6879
|
{ begin: 128, end: 255 },
|
|
@@ -7223,7 +7225,7 @@ function fl() {
|
|
|
7223
7225
|
{ name: "maxMemType1", type: "ULONG", value: 0 }
|
|
7224
7226
|
]);
|
|
7225
7227
|
}
|
|
7226
|
-
var
|
|
7228
|
+
var Vi = { parse: pl, make: fl }, de = new Array(9);
|
|
7227
7229
|
de[1] = function() {
|
|
7228
7230
|
var n = this.offset + this.relativeOffset, e = this.parseUShort();
|
|
7229
7231
|
if (e === 1)
|
|
@@ -7469,7 +7471,7 @@ function ml(n) {
|
|
|
7469
7471
|
{ name: "lookups", type: "TABLE", value: new k.LookupList(n.lookups, ht) }
|
|
7470
7472
|
]);
|
|
7471
7473
|
}
|
|
7472
|
-
var
|
|
7474
|
+
var Hi = { parse: gl, make: ml };
|
|
7473
7475
|
function yl(n, e) {
|
|
7474
7476
|
var t = new M.Parser(n, e), r = t.parseULong();
|
|
7475
7477
|
A.argument(r === 1, "Unsupported META table version."), t.parseULong(), t.parseULong();
|
|
@@ -7492,7 +7494,7 @@ function vl(n) {
|
|
|
7492
7494
|
}
|
|
7493
7495
|
return s.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), s;
|
|
7494
7496
|
}
|
|
7495
|
-
var
|
|
7497
|
+
var ji = { parse: yl, make: vl };
|
|
7496
7498
|
function ns(n) {
|
|
7497
7499
|
return Math.log(n) / Math.log(2) | 0;
|
|
7498
7500
|
}
|
|
@@ -7584,7 +7586,7 @@ function xl(n) {
|
|
|
7584
7586
|
minRightSideBearing: Math.min.apply(null, a)
|
|
7585
7587
|
};
|
|
7586
7588
|
x.ascender = n.ascender, x.descender = n.descender;
|
|
7587
|
-
var _ =
|
|
7589
|
+
var _ = Li.make({
|
|
7588
7590
|
flags: 3,
|
|
7589
7591
|
// 00000011 (baseline for font at y=0; left sidebearing point at x=0)
|
|
7590
7592
|
unitsPerEm: n.unitsPerEm,
|
|
@@ -7594,7 +7596,7 @@ function xl(n) {
|
|
|
7594
7596
|
yMax: x.yMax,
|
|
7595
7597
|
lowestRecPPEM: 3,
|
|
7596
7598
|
createdTimestamp: n.createdTimestamp
|
|
7597
|
-
}), w =
|
|
7599
|
+
}), w = Oi.make({
|
|
7598
7600
|
ascender: x.ascender,
|
|
7599
7601
|
descender: x.descender,
|
|
7600
7602
|
advanceWidthMax: x.advanceWidthMax,
|
|
@@ -7602,7 +7604,7 @@ function xl(n) {
|
|
|
7602
7604
|
minRightSideBearing: x.minRightSideBearing,
|
|
7603
7605
|
xMaxExtent: x.maxLeftSideBearing + (x.xMax - x.xMin),
|
|
7604
7606
|
numberOfHMetrics: n.glyphs.length
|
|
7605
|
-
}), L =
|
|
7607
|
+
}), L = Ui.make(n.glyphs.length), T = ar.make(Object.assign({
|
|
7606
7608
|
xAvgCharWidth: Math.round(x.advanceWidthAvg),
|
|
7607
7609
|
usFirstCharIndex: c,
|
|
7608
7610
|
usLastCharIndex: l,
|
|
@@ -7627,13 +7629,13 @@ function xl(n) {
|
|
|
7627
7629
|
// Use space as the default character, if available.
|
|
7628
7630
|
usBreakChar: n.hasChar(" ") ? 32 : 0
|
|
7629
7631
|
// Use space as the break character, if available.
|
|
7630
|
-
}, n.tables.os2)), I =
|
|
7632
|
+
}, n.tables.os2)), I = Di.make(n.glyphs), O = xi.make(n.glyphs), G = n.getEnglishName("fontFamily"), Q = n.getEnglishName("fontSubfamily"), ee = G + " " + Q, Y = n.getEnglishName("postScriptName");
|
|
7631
7633
|
Y || (Y = G.replace(/\s/g, "") + "-" + Q);
|
|
7632
7634
|
var U = {};
|
|
7633
7635
|
for (var N in n.names)
|
|
7634
7636
|
U[N] = n.names[N];
|
|
7635
7637
|
U.uniqueID || (U.uniqueID = { en: n.getEnglishName("manufacturer") + ":" + ee }), U.postScriptName || (U.postScriptName = { en: Y }), U.preferredFamily || (U.preferredFamily = n.names.fontFamily), U.preferredSubfamily || (U.preferredSubfamily = n.names.fontSubfamily);
|
|
7636
|
-
var F = [], H =
|
|
7638
|
+
var F = [], H = zi.make(U, F), q = F.length > 0 ? Ri.make(F) : void 0, X = Vi.make(), J = Bi.make(n.glyphs, {
|
|
7637
7639
|
version: n.getEnglishName("version"),
|
|
7638
7640
|
fullName: ee,
|
|
7639
7641
|
familyName: G,
|
|
@@ -7641,11 +7643,11 @@ function xl(n) {
|
|
|
7641
7643
|
postScriptName: Y,
|
|
7642
7644
|
unitsPerEm: n.unitsPerEm,
|
|
7643
7645
|
fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
|
|
7644
|
-
}), R = n.metas && Object.keys(n.metas).length > 0 ?
|
|
7645
|
-
q && Z.push(q), n.tables.gsub && Z.push(
|
|
7646
|
-
for (var xn = Wi(Z),
|
|
7646
|
+
}), R = n.metas && Object.keys(n.metas).length > 0 ? ji.make(n.metas) : void 0, Z = [_, w, L, T, H, O, X, J, I];
|
|
7647
|
+
q && Z.push(q), n.tables.gsub && Z.push(Hi.make(n.tables.gsub)), R && Z.push(R);
|
|
7648
|
+
for (var xn = Wi(Z), uo = xn.encode(), po = yr(uo), Sn = xn.fields, kr = !1, Nt = 0; Nt < Sn.length; Nt += 1)
|
|
7647
7649
|
if (Sn[Nt].name === "head table") {
|
|
7648
|
-
Sn[Nt].value.checkSumAdjustment = 2981146554 -
|
|
7650
|
+
Sn[Nt].value.checkSumAdjustment = 2981146554 - po, kr = !0;
|
|
7649
7651
|
break;
|
|
7650
7652
|
}
|
|
7651
7653
|
if (!kr)
|
|
@@ -8118,7 +8120,7 @@ function as(n, e, t, r, s) {
|
|
|
8118
8120
|
var i;
|
|
8119
8121
|
return (e & r) > 0 ? (i = n.parseByte(), e & s || (i = -i), i = t + i) : (e & s) > 0 ? i = t : i = t + n.parseShort(), i;
|
|
8120
8122
|
}
|
|
8121
|
-
function
|
|
8123
|
+
function Xi(n, e, t) {
|
|
8122
8124
|
var r = new M.Parser(e, t);
|
|
8123
8125
|
n.numberOfContours = r.parseShort(), n._xMin = r.parseShort(), n._yMin = r.parseShort(), n._xMax = r.parseShort(), n._yMax = r.parseShort();
|
|
8124
8126
|
var s, i;
|
|
@@ -8190,8 +8192,8 @@ function Cl(n) {
|
|
|
8190
8192
|
}
|
|
8191
8193
|
return A.argument(t.length === 0, "There are still points left in the current contour."), e;
|
|
8192
8194
|
}
|
|
8193
|
-
function
|
|
8194
|
-
var e = new
|
|
8195
|
+
function $i(n) {
|
|
8196
|
+
var e = new W();
|
|
8195
8197
|
if (!n)
|
|
8196
8198
|
return e;
|
|
8197
8199
|
for (var t = Cl(n), r = 0; r < t.length; ++r) {
|
|
@@ -8215,7 +8217,7 @@ function Xi(n) {
|
|
|
8215
8217
|
}
|
|
8216
8218
|
return e;
|
|
8217
8219
|
}
|
|
8218
|
-
function
|
|
8220
|
+
function Yi(n, e) {
|
|
8219
8221
|
if (e.isComposite)
|
|
8220
8222
|
for (var t = 0; t < e.components.length; t += 1) {
|
|
8221
8223
|
var r = e.components[t], s = n.get(r.glyphIndex);
|
|
@@ -8239,12 +8241,12 @@ function $i(n, e) {
|
|
|
8239
8241
|
e.points = e.points.concat(i);
|
|
8240
8242
|
}
|
|
8241
8243
|
}
|
|
8242
|
-
return
|
|
8244
|
+
return $i(e.points);
|
|
8243
8245
|
}
|
|
8244
8246
|
function Il(n, e, t, r) {
|
|
8245
8247
|
for (var s = new Ce.GlyphSet(r), i = 0; i < t.length - 1; i += 1) {
|
|
8246
8248
|
var o = t[i], a = t[i + 1];
|
|
8247
|
-
o !== a ? s.push(i, Ce.ttfGlyphLoader(r, i,
|
|
8249
|
+
o !== a ? s.push(i, Ce.ttfGlyphLoader(r, i, Xi, n, e + o, Yi)) : s.push(i, Ce.glyphLoader(r, i));
|
|
8248
8250
|
}
|
|
8249
8251
|
return s;
|
|
8250
8252
|
}
|
|
@@ -8252,22 +8254,22 @@ function kl(n, e, t, r) {
|
|
|
8252
8254
|
var s = new Ce.GlyphSet(r);
|
|
8253
8255
|
return r._push = function(i) {
|
|
8254
8256
|
var o = t[i], a = t[i + 1];
|
|
8255
|
-
o !== a ? s.push(i, Ce.ttfGlyphLoader(r, i,
|
|
8257
|
+
o !== a ? s.push(i, Ce.ttfGlyphLoader(r, i, Xi, n, e + o, Yi)) : s.push(i, Ce.glyphLoader(r, i));
|
|
8256
8258
|
}, s;
|
|
8257
8259
|
}
|
|
8258
8260
|
function El(n, e, t, r, s) {
|
|
8259
8261
|
return s.lowMemory ? kl(n, e, t, r) : Il(n, e, t, r);
|
|
8260
8262
|
}
|
|
8261
|
-
var
|
|
8262
|
-
function
|
|
8263
|
+
var qi = { getPath: $i, parse: El }, Zi, We, Qi, cr;
|
|
8264
|
+
function Ji(n) {
|
|
8263
8265
|
this.font = n, this.getCommands = function(e) {
|
|
8264
|
-
return
|
|
8266
|
+
return qi.getPath(e).commands;
|
|
8265
8267
|
}, this._fpgmState = this._prepState = void 0, this._errorState = 0;
|
|
8266
8268
|
}
|
|
8267
8269
|
function Ml(n) {
|
|
8268
8270
|
return n;
|
|
8269
8271
|
}
|
|
8270
|
-
function
|
|
8272
|
+
function Ki(n) {
|
|
8271
8273
|
return Math.sign(n) * Math.round(Math.abs(n));
|
|
8272
8274
|
}
|
|
8273
8275
|
function Al(n) {
|
|
@@ -8282,7 +8284,7 @@ function Ll(n) {
|
|
|
8282
8284
|
function Ol(n) {
|
|
8283
8285
|
return Math.sign(n) * Math.floor(Math.abs(n));
|
|
8284
8286
|
}
|
|
8285
|
-
var
|
|
8287
|
+
var eo = function(n) {
|
|
8286
8288
|
var e = this.srPeriod, t = this.srPhase, r = this.srThreshold, s = 1;
|
|
8287
8289
|
return n < 0 && (n = -n, s = -1), n += r - t, n = Math.trunc(n / e) * e, n += t, n < 0 ? t * s : n * s;
|
|
8288
8290
|
}, Te = {
|
|
@@ -8471,10 +8473,10 @@ function Be(n, e) {
|
|
|
8471
8473
|
case "glyf":
|
|
8472
8474
|
this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
|
|
8473
8475
|
case "prep":
|
|
8474
|
-
this.fv = this.pv = this.dpv = Te, this.round =
|
|
8476
|
+
this.fv = this.pv = this.dpv = Te, this.round = Ki;
|
|
8475
8477
|
}
|
|
8476
8478
|
}
|
|
8477
|
-
|
|
8479
|
+
Ji.prototype.exec = function(n, e) {
|
|
8478
8480
|
if (typeof e != "number")
|
|
8479
8481
|
throw new Error("Point size is not a number!");
|
|
8480
8482
|
if (!(this._errorState > 2)) {
|
|
@@ -8484,7 +8486,7 @@ Qi.prototype.exec = function(n, e) {
|
|
|
8484
8486
|
if (!s) {
|
|
8485
8487
|
Be.prototype = Dl, s = this._fpgmState = new Be("fpgm", t.tables.fpgm), s.funcs = [], s.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), s.step = -1);
|
|
8486
8488
|
try {
|
|
8487
|
-
|
|
8489
|
+
We(s);
|
|
8488
8490
|
} catch (l) {
|
|
8489
8491
|
console.log("Hinting error in FPGM:" + l), this._errorState = 3;
|
|
8490
8492
|
return;
|
|
@@ -8499,21 +8501,21 @@ Qi.prototype.exec = function(n, e) {
|
|
|
8499
8501
|
r.cvt = [];
|
|
8500
8502
|
exports.DEBUG && (console.log("---EXEC PREP---"), r.step = -1);
|
|
8501
8503
|
try {
|
|
8502
|
-
|
|
8504
|
+
We(r);
|
|
8503
8505
|
} catch (l) {
|
|
8504
8506
|
this._errorState < 2 && console.log("Hinting error in PREP:" + l), this._errorState = 2;
|
|
8505
8507
|
}
|
|
8506
8508
|
}
|
|
8507
8509
|
if (!(this._errorState > 1))
|
|
8508
8510
|
try {
|
|
8509
|
-
return
|
|
8511
|
+
return Qi(n, r);
|
|
8510
8512
|
} catch (l) {
|
|
8511
8513
|
this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
|
|
8512
8514
|
return;
|
|
8513
8515
|
}
|
|
8514
8516
|
}
|
|
8515
8517
|
};
|
|
8516
|
-
|
|
8518
|
+
Qi = function(n, e) {
|
|
8517
8519
|
var t = e.ppem / e.font.unitsPerEm, r = t, s = n.components, i, o, a;
|
|
8518
8520
|
if (Be.prototype = e, !s)
|
|
8519
8521
|
a = new Be("glyf", n.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), a.step = -1), cr(n, a, t, r), o = a.gZone;
|
|
@@ -8535,7 +8537,7 @@ Zi = function(n, e) {
|
|
|
8535
8537
|
n.instructions && !a.inhibitGridFit && (a = new Be("glyf", n.instructions), a.gZone = a.z0 = a.z1 = a.z2 = o, a.contours = i, o.push(
|
|
8536
8538
|
new ke(0, 0),
|
|
8537
8539
|
new ke(Math.round(n.advanceWidth * t), 0)
|
|
8538
|
-
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), a.step = -1),
|
|
8540
|
+
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), a.step = -1), We(a), o.length -= 2);
|
|
8539
8541
|
}
|
|
8540
8542
|
return o;
|
|
8541
8543
|
};
|
|
@@ -8558,19 +8560,19 @@ cr = function(n, e, t, r) {
|
|
|
8558
8560
|
if (o.push(
|
|
8559
8561
|
new ke(0, 0),
|
|
8560
8562
|
new ke(Math.round(n.advanceWidth * t), 0)
|
|
8561
|
-
),
|
|
8563
|
+
), We(e), o.length -= 2, exports.DEBUG) {
|
|
8562
8564
|
console.log("FINISHED GLYPH", e.stack);
|
|
8563
8565
|
for (var f = 0; f < i; f++)
|
|
8564
8566
|
console.log(f, o[f].x, o[f].y);
|
|
8565
8567
|
}
|
|
8566
8568
|
}
|
|
8567
8569
|
};
|
|
8568
|
-
|
|
8570
|
+
We = function(n) {
|
|
8569
8571
|
var e = n.prog;
|
|
8570
8572
|
if (e) {
|
|
8571
8573
|
var t = e.length, r;
|
|
8572
8574
|
for (n.ip = 0; n.ip < t; n.ip++) {
|
|
8573
|
-
if (exports.DEBUG && n.step++, r =
|
|
8575
|
+
if (exports.DEBUG && n.step++, r = Zi[e[n.ip]], !r)
|
|
8574
8576
|
throw new Error(
|
|
8575
8577
|
"unknown instruction: 0x" + Number(e[n.ip]).toString(16)
|
|
8576
8578
|
);
|
|
@@ -8582,7 +8584,7 @@ function yn(n) {
|
|
|
8582
8584
|
for (var e = n.tZone = new Array(n.gZone.length), t = 0; t < e.length; t++)
|
|
8583
8585
|
e[t] = new ke(0, 0);
|
|
8584
8586
|
}
|
|
8585
|
-
function
|
|
8587
|
+
function to(n, e) {
|
|
8586
8588
|
var t = n.prog, r = n.ip, s = 1, i;
|
|
8587
8589
|
do
|
|
8588
8590
|
if (i = t[++r], i === 88)
|
|
@@ -8657,7 +8659,7 @@ function Vl(n) {
|
|
|
8657
8659
|
function Hl(n) {
|
|
8658
8660
|
n.rp2 = n.stack.pop(), exports.DEBUG && console.log(n.step, "SRP2[]", n.rp2);
|
|
8659
8661
|
}
|
|
8660
|
-
function
|
|
8662
|
+
function jl(n) {
|
|
8661
8663
|
var e = n.stack.pop();
|
|
8662
8664
|
switch (exports.DEBUG && console.log(n.step, "SZP0[]", e), n.zp0 = e, e) {
|
|
8663
8665
|
case 0:
|
|
@@ -8670,7 +8672,7 @@ function Wl(n) {
|
|
|
8670
8672
|
throw new Error("Invalid zone pointer");
|
|
8671
8673
|
}
|
|
8672
8674
|
}
|
|
8673
|
-
function
|
|
8675
|
+
function Wl(n) {
|
|
8674
8676
|
var e = n.stack.pop();
|
|
8675
8677
|
switch (exports.DEBUG && console.log(n.step, "SZP1[]", e), n.zp1 = e, e) {
|
|
8676
8678
|
case 0:
|
|
@@ -8713,7 +8715,7 @@ function Yl(n) {
|
|
|
8713
8715
|
n.loop = n.stack.pop(), exports.DEBUG && console.log(n.step, "SLOOP[]", n.loop);
|
|
8714
8716
|
}
|
|
8715
8717
|
function ql(n) {
|
|
8716
|
-
exports.DEBUG && console.log(n.step, "RTG[]"), n.round =
|
|
8718
|
+
exports.DEBUG && console.log(n.step, "RTG[]"), n.round = Ki;
|
|
8717
8719
|
}
|
|
8718
8720
|
function Zl(n) {
|
|
8719
8721
|
exports.DEBUG && console.log(n.step, "RTHG[]"), n.round = Bl;
|
|
@@ -8723,7 +8725,7 @@ function Ql(n) {
|
|
|
8723
8725
|
exports.DEBUG && console.log(n.step, "SMD[]", e), n.minDis = e / 64;
|
|
8724
8726
|
}
|
|
8725
8727
|
function Jl(n) {
|
|
8726
|
-
exports.DEBUG && console.log(n.step, "ELSE[]"),
|
|
8728
|
+
exports.DEBUG && console.log(n.step, "ELSE[]"), to(n, !1);
|
|
8727
8729
|
}
|
|
8728
8730
|
function Kl(n) {
|
|
8729
8731
|
var e = n.stack.pop();
|
|
@@ -8757,7 +8759,7 @@ function ih(n) {
|
|
|
8757
8759
|
var s = n.ip, i = n.prog;
|
|
8758
8760
|
n.prog = n.funcs[t];
|
|
8759
8761
|
for (var o = 0; o < r; o++)
|
|
8760
|
-
|
|
8762
|
+
We(n), exports.DEBUG && console.log(
|
|
8761
8763
|
++n.step,
|
|
8762
8764
|
o + 1 < r ? "next loopcall" : "done loopcall",
|
|
8763
8765
|
o
|
|
@@ -8768,7 +8770,7 @@ function oh(n) {
|
|
|
8768
8770
|
var e = n.stack.pop();
|
|
8769
8771
|
exports.DEBUG && console.log(n.step, "CALL[]", e);
|
|
8770
8772
|
var t = n.ip, r = n.prog;
|
|
8771
|
-
n.prog = n.funcs[e],
|
|
8773
|
+
n.prog = n.funcs[e], We(n), n.ip = t, n.prog = r, exports.DEBUG && console.log(++n.step, "returning from", e);
|
|
8772
8774
|
}
|
|
8773
8775
|
function ah(n) {
|
|
8774
8776
|
var e = n.stack, t = e.pop();
|
|
@@ -8976,7 +8978,7 @@ function Mh(n) {
|
|
|
8976
8978
|
}
|
|
8977
8979
|
function Ah(n) {
|
|
8978
8980
|
var e = n.stack.pop();
|
|
8979
|
-
exports.DEBUG && console.log(n.step, "IF[]", e), e || (
|
|
8981
|
+
exports.DEBUG && console.log(n.step, "IF[]", e), e || (to(n, !0), exports.DEBUG && console.log(n.step, "EIF[]"));
|
|
8980
8982
|
}
|
|
8981
8983
|
function Bh(n) {
|
|
8982
8984
|
exports.DEBUG && console.log(n.step, "EIF[]");
|
|
@@ -9042,15 +9044,15 @@ function Hh(n) {
|
|
|
9042
9044
|
var e = n.stack, t = e.pop();
|
|
9043
9045
|
exports.DEBUG && console.log(n.step, "FLOOR[]", t), e.push(Math.floor(t / 64) * 64);
|
|
9044
9046
|
}
|
|
9045
|
-
function
|
|
9047
|
+
function jh(n) {
|
|
9046
9048
|
var e = n.stack, t = e.pop();
|
|
9047
9049
|
exports.DEBUG && console.log(n.step, "CEILING[]", t), e.push(Math.ceil(t / 64) * 64);
|
|
9048
9050
|
}
|
|
9049
|
-
function
|
|
9051
|
+
function Wt(n, e) {
|
|
9050
9052
|
var t = e.stack, r = t.pop();
|
|
9051
9053
|
exports.DEBUG && console.log(e.step, "ROUND[]"), t.push(e.round(r / 64) * 64);
|
|
9052
9054
|
}
|
|
9053
|
-
function
|
|
9055
|
+
function Wh(n) {
|
|
9054
9056
|
var e = n.stack, t = e.pop(), r = e.pop();
|
|
9055
9057
|
exports.DEBUG && console.log(n.step, "WCVTF[]", t, r), n.cvt[r] = t * n.ppem / n.font.unitsPerEm;
|
|
9056
9058
|
}
|
|
@@ -9069,7 +9071,7 @@ function Bn(n, e) {
|
|
|
9069
9071
|
}
|
|
9070
9072
|
function Xh(n) {
|
|
9071
9073
|
var e = n.stack.pop();
|
|
9072
|
-
exports.DEBUG && console.log(n.step, "SROUND[]", e), n.round =
|
|
9074
|
+
exports.DEBUG && console.log(n.step, "SROUND[]", e), n.round = eo;
|
|
9073
9075
|
var t;
|
|
9074
9076
|
switch (e & 192) {
|
|
9075
9077
|
case 0:
|
|
@@ -9104,7 +9106,7 @@ function Xh(n) {
|
|
|
9104
9106
|
}
|
|
9105
9107
|
function $h(n) {
|
|
9106
9108
|
var e = n.stack.pop();
|
|
9107
|
-
exports.DEBUG && console.log(n.step, "S45ROUND[]", e), n.round =
|
|
9109
|
+
exports.DEBUG && console.log(n.step, "S45ROUND[]", e), n.round = eo;
|
|
9108
9110
|
var t;
|
|
9109
9111
|
switch (e & 192) {
|
|
9110
9112
|
case 0:
|
|
@@ -9219,7 +9221,7 @@ function E(n, e, t, r, s, i) {
|
|
|
9219
9221
|
")"
|
|
9220
9222
|
), i.rp1 = i.rp0, i.rp2 = c, e && (i.rp0 = c);
|
|
9221
9223
|
}
|
|
9222
|
-
|
|
9224
|
+
Zi = [
|
|
9223
9225
|
/* 0x00 */
|
|
9224
9226
|
cs.bind(void 0, Ie),
|
|
9225
9227
|
/* 0x01 */
|
|
@@ -9259,9 +9261,9 @@ qi = [
|
|
|
9259
9261
|
/* 0x12 */
|
|
9260
9262
|
Hl,
|
|
9261
9263
|
/* 0x13 */
|
|
9262
|
-
Wl,
|
|
9263
|
-
/* 0x14 */
|
|
9264
9264
|
jl,
|
|
9265
|
+
/* 0x14 */
|
|
9266
|
+
Wl,
|
|
9265
9267
|
/* 0x15 */
|
|
9266
9268
|
Xl,
|
|
9267
9269
|
/* 0x16 */
|
|
@@ -9436,15 +9438,15 @@ qi = [
|
|
|
9436
9438
|
/* 0x66 */
|
|
9437
9439
|
Hh,
|
|
9438
9440
|
/* 0x67 */
|
|
9439
|
-
|
|
9441
|
+
jh,
|
|
9440
9442
|
/* 0x68 */
|
|
9441
|
-
|
|
9443
|
+
Wt.bind(void 0, 0),
|
|
9442
9444
|
/* 0x69 */
|
|
9443
|
-
|
|
9445
|
+
Wt.bind(void 0, 1),
|
|
9444
9446
|
/* 0x6A */
|
|
9445
|
-
|
|
9447
|
+
Wt.bind(void 0, 2),
|
|
9446
9448
|
/* 0x6B */
|
|
9447
|
-
|
|
9449
|
+
Wt.bind(void 0, 3),
|
|
9448
9450
|
/* 0x6C */
|
|
9449
9451
|
void 0,
|
|
9450
9452
|
// TODO NROUND[ab]
|
|
@@ -9458,7 +9460,7 @@ qi = [
|
|
|
9458
9460
|
void 0,
|
|
9459
9461
|
// TODO NROUND[ab]
|
|
9460
9462
|
/* 0x70 */
|
|
9461
|
-
|
|
9463
|
+
Wh,
|
|
9462
9464
|
/* 0x71 */
|
|
9463
9465
|
An.bind(void 0, 2),
|
|
9464
9466
|
/* 0x72 */
|
|
@@ -10010,7 +10012,7 @@ P.prototype.tokenize = function(n) {
|
|
|
10010
10012
|
function Re(n) {
|
|
10011
10013
|
return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(n);
|
|
10012
10014
|
}
|
|
10013
|
-
function
|
|
10015
|
+
function no(n) {
|
|
10014
10016
|
return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(n);
|
|
10015
10017
|
}
|
|
10016
10018
|
function Fe(n) {
|
|
@@ -10386,7 +10388,7 @@ function xr(n, e, t) {
|
|
|
10386
10388
|
}
|
|
10387
10389
|
function wu(n) {
|
|
10388
10390
|
for (var e = [].concat(n.backtrack), t = e.length - 1; t >= 0; t--) {
|
|
10389
|
-
var r = e[t], s =
|
|
10391
|
+
var r = e[t], s = no(r), i = Fe(r);
|
|
10390
10392
|
if (!s && !i)
|
|
10391
10393
|
return !0;
|
|
10392
10394
|
if (s)
|
|
@@ -10395,7 +10397,7 @@ function wu(n) {
|
|
|
10395
10397
|
return !1;
|
|
10396
10398
|
}
|
|
10397
10399
|
function _u(n) {
|
|
10398
|
-
if (
|
|
10400
|
+
if (no(n.current))
|
|
10399
10401
|
return !1;
|
|
10400
10402
|
for (var e = 0; e < n.lookahead.length; e++) {
|
|
10401
10403
|
var t = n.lookahead[e], r = Fe(t);
|
|
@@ -10662,12 +10664,12 @@ function D(n) {
|
|
|
10662
10664
|
usWidthClass: n.widthClass || this.usWidthClasses.MEDIUM,
|
|
10663
10665
|
fsSelection: n.fsSelection || this.fsSelectionValues.REGULAR
|
|
10664
10666
|
}, n.tables.os2)
|
|
10665
|
-
})), this.supported = !0, this.glyphs = new Ce.GlyphSet(this, n.glyphs || []), this.encoding = new
|
|
10667
|
+
})), this.supported = !0, this.glyphs = new Ce.GlyphSet(this, n.glyphs || []), this.encoding = new Si(this), this.position = new Dt(this), this.substitution = new se(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
|
|
10666
10668
|
get: function() {
|
|
10667
10669
|
if (this._hinting)
|
|
10668
10670
|
return this._hinting;
|
|
10669
10671
|
if (this.outlinesFormat === "truetype")
|
|
10670
|
-
return this._hinting = new
|
|
10672
|
+
return this._hinting = new Ji(this);
|
|
10671
10673
|
}
|
|
10672
10674
|
});
|
|
10673
10675
|
}
|
|
@@ -10746,7 +10748,7 @@ D.prototype.forEachGlyph = function(n, e, t, r, s, i) {
|
|
|
10746
10748
|
return e;
|
|
10747
10749
|
};
|
|
10748
10750
|
D.prototype.getPath = function(n, e, t, r, s) {
|
|
10749
|
-
var i = new
|
|
10751
|
+
var i = new W();
|
|
10750
10752
|
return this.forEachGlyph(n, e, t, r, s, function(o, a, c, l) {
|
|
10751
10753
|
var h = o.getPath(a, c, l, s, this);
|
|
10752
10754
|
i.extend(h);
|
|
@@ -10861,7 +10863,7 @@ D.prototype.usWeightClasses = {
|
|
|
10861
10863
|
EXTRA_BOLD: 800,
|
|
10862
10864
|
BLACK: 900
|
|
10863
10865
|
};
|
|
10864
|
-
function
|
|
10866
|
+
function ro(n, e) {
|
|
10865
10867
|
var t = JSON.stringify(n), r = 256;
|
|
10866
10868
|
for (var s in e) {
|
|
10867
10869
|
var i = parseInt(s);
|
|
@@ -10874,7 +10876,7 @@ function no(n, e) {
|
|
|
10874
10876
|
return e[r] = n, r;
|
|
10875
10877
|
}
|
|
10876
10878
|
function Ru(n, e, t) {
|
|
10877
|
-
var r =
|
|
10879
|
+
var r = ro(e.name, t);
|
|
10878
10880
|
return [
|
|
10879
10881
|
{ name: "tag_" + n, type: "TAG", value: e.tag },
|
|
10880
10882
|
{ name: "minValue_" + n, type: "FIXED", value: e.minValue << 16 },
|
|
@@ -10889,7 +10891,7 @@ function Uu(n, e, t) {
|
|
|
10889
10891
|
return r.tag = s.parseTag(), r.minValue = s.parseFixed(), r.defaultValue = s.parseFixed(), r.maxValue = s.parseFixed(), s.skip("uShort", 1), r.name = t[s.parseUShort()] || {}, r;
|
|
10890
10892
|
}
|
|
10891
10893
|
function Fu(n, e, t, r) {
|
|
10892
|
-
for (var s =
|
|
10894
|
+
for (var s = ro(e.name, r), i = [
|
|
10893
10895
|
{ name: "nameID_" + n, type: "USHORT", value: s },
|
|
10894
10896
|
{ name: "flags_" + n, type: "USHORT", value: 0 }
|
|
10895
10897
|
], o = 0; o < t.length; ++o) {
|
|
@@ -10953,12 +10955,12 @@ var zu = { make: Gu, parse: Nu }, Vu = function() {
|
|
|
10953
10955
|
return { pointindex: this.parseShort() };
|
|
10954
10956
|
if (n === 3)
|
|
10955
10957
|
return { coordinate: this.parseShort() };
|
|
10956
|
-
}, Wu = function() {
|
|
10957
|
-
return this.parseList(b.pointer(Hu));
|
|
10958
10958
|
}, ju = function() {
|
|
10959
|
+
return this.parseList(b.pointer(Hu));
|
|
10960
|
+
}, Wu = function() {
|
|
10959
10961
|
return {
|
|
10960
10962
|
coverage: this.parsePointer(b.coverage),
|
|
10961
|
-
ligGlyphs: this.parseList(b.pointer(
|
|
10963
|
+
ligGlyphs: this.parseList(b.pointer(ju))
|
|
10962
10964
|
};
|
|
10963
10965
|
}, Xu = function() {
|
|
10964
10966
|
return this.parseUShort(), this.parseList(b.pointer(b.coverage));
|
|
@@ -10974,7 +10976,7 @@ function $u(n, e) {
|
|
|
10974
10976
|
version: r,
|
|
10975
10977
|
classDef: t.parsePointer(b.classDef),
|
|
10976
10978
|
attachList: t.parsePointer(Vu),
|
|
10977
|
-
ligCaretList: t.parsePointer(
|
|
10979
|
+
ligCaretList: t.parsePointer(Wu),
|
|
10978
10980
|
markAttachClassDef: t.parsePointer(b.classDef)
|
|
10979
10981
|
};
|
|
10980
10982
|
return r >= 1.2 && (s.markGlyphSets = t.parsePointer(Xu)), s;
|
|
@@ -11181,7 +11183,7 @@ function od(n, e) {
|
|
|
11181
11183
|
var T = a[L], I = void 0;
|
|
11182
11184
|
switch (T.tag) {
|
|
11183
11185
|
case "cmap":
|
|
11184
|
-
I = z(i, T), s.tables.cmap =
|
|
11186
|
+
I = z(i, T), s.tables.cmap = xi.parse(I.data, I.offset), s.encoding = new wi(s.tables.cmap);
|
|
11185
11187
|
break;
|
|
11186
11188
|
case "cvt ":
|
|
11187
11189
|
I = z(i, T), w = new M.Parser(I.data, I.offset), s.tables.cvt = w.parseShortList(T.length / 2);
|
|
@@ -11193,19 +11195,19 @@ function od(n, e) {
|
|
|
11193
11195
|
I = z(i, T), w = new M.Parser(I.data, I.offset), s.tables.fpgm = w.parseByteList(T.length);
|
|
11194
11196
|
break;
|
|
11195
11197
|
case "head":
|
|
11196
|
-
I = z(i, T), s.tables.head =
|
|
11198
|
+
I = z(i, T), s.tables.head = Li.parse(I.data, I.offset), s.unitsPerEm = s.tables.head.unitsPerEm, t = s.tables.head.indexToLocFormat;
|
|
11197
11199
|
break;
|
|
11198
11200
|
case "hhea":
|
|
11199
|
-
I = z(i, T), s.tables.hhea =
|
|
11201
|
+
I = z(i, T), s.tables.hhea = Oi.parse(I.data, I.offset), s.ascender = s.tables.hhea.ascender, s.descender = s.tables.hhea.descender, s.numberOfHMetrics = s.tables.hhea.numberOfHMetrics;
|
|
11200
11202
|
break;
|
|
11201
11203
|
case "hmtx":
|
|
11202
11204
|
y = T;
|
|
11203
11205
|
break;
|
|
11204
11206
|
case "ltag":
|
|
11205
|
-
I = z(i, T), r =
|
|
11207
|
+
I = z(i, T), r = Ri.parse(I.data, I.offset);
|
|
11206
11208
|
break;
|
|
11207
11209
|
case "maxp":
|
|
11208
|
-
I = z(i, T), s.tables.maxp =
|
|
11210
|
+
I = z(i, T), s.tables.maxp = Ui.parse(I.data, I.offset), s.numGlyphs = s.tables.maxp.numGlyphs;
|
|
11209
11211
|
break;
|
|
11210
11212
|
case "name":
|
|
11211
11213
|
x = T;
|
|
@@ -11214,7 +11216,7 @@ function od(n, e) {
|
|
|
11214
11216
|
I = z(i, T), s.tables.os2 = ar.parse(I.data, I.offset);
|
|
11215
11217
|
break;
|
|
11216
11218
|
case "post":
|
|
11217
|
-
I = z(i, T), s.tables.post =
|
|
11219
|
+
I = z(i, T), s.tables.post = Vi.parse(I.data, I.offset), s.glyphNames = new gr(s.tables.post);
|
|
11218
11220
|
break;
|
|
11219
11221
|
case "prep":
|
|
11220
11222
|
I = z(i, T), w = new M.Parser(I.data, I.offset), s.tables.prep = w.parseByteList(T.length);
|
|
@@ -11246,16 +11248,16 @@ function od(n, e) {
|
|
|
11246
11248
|
}
|
|
11247
11249
|
}
|
|
11248
11250
|
var O = z(i, x);
|
|
11249
|
-
if (s.tables.name =
|
|
11251
|
+
if (s.tables.name = zi.parse(O.data, O.offset, r), s.names = s.tables.name, u && S) {
|
|
11250
11252
|
var G = t === 0, Q = z(i, S), ee = sd.parse(Q.data, Q.offset, s.numGlyphs, G), Y = z(i, u);
|
|
11251
|
-
s.glyphs =
|
|
11253
|
+
s.glyphs = qi.parse(Y.data, Y.offset, ee, s, e);
|
|
11252
11254
|
} else if (h) {
|
|
11253
11255
|
var U = z(i, h);
|
|
11254
|
-
|
|
11256
|
+
Bi.parse(U.data, U.offset, s, e);
|
|
11255
11257
|
} else
|
|
11256
11258
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
11257
11259
|
var N = z(i, y);
|
|
11258
|
-
if (
|
|
11260
|
+
if (Di.parse(s, N.data, N.offset, s.numberOfHMetrics, s.numGlyphs, s.glyphs, e), bc(s, e), v) {
|
|
11259
11261
|
var F = z(i, v);
|
|
11260
11262
|
s.kerningPairs = nd.parse(F.data, F.offset);
|
|
11261
11263
|
} else
|
|
@@ -11270,7 +11272,7 @@ function od(n, e) {
|
|
|
11270
11272
|
}
|
|
11271
11273
|
if (m) {
|
|
11272
11274
|
var X = z(i, m);
|
|
11273
|
-
s.tables.gsub =
|
|
11275
|
+
s.tables.gsub = Hi.parse(X.data, X.offset);
|
|
11274
11276
|
}
|
|
11275
11277
|
if (d) {
|
|
11276
11278
|
var J = z(i, d);
|
|
@@ -11278,7 +11280,7 @@ function od(n, e) {
|
|
|
11278
11280
|
}
|
|
11279
11281
|
if (_) {
|
|
11280
11282
|
var R = z(i, _);
|
|
11281
|
-
s.tables.meta =
|
|
11283
|
+
s.tables.meta = ji.parse(R.data, R.offset), s.metas = s.tables.meta;
|
|
11282
11284
|
}
|
|
11283
11285
|
return s;
|
|
11284
11286
|
}
|
|
@@ -11320,7 +11322,7 @@ function ad(n) {
|
|
|
11320
11322
|
};
|
|
11321
11323
|
})(od(n));
|
|
11322
11324
|
}
|
|
11323
|
-
class ks extends
|
|
11325
|
+
class ks extends oi {
|
|
11324
11326
|
/**
|
|
11325
11327
|
* Creates a new instance of MeshFont.
|
|
11326
11328
|
* @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
|
|
@@ -11757,7 +11759,7 @@ class dd {
|
|
|
11757
11759
|
}
|
|
11758
11760
|
}
|
|
11759
11761
|
}
|
|
11760
|
-
let
|
|
11762
|
+
let j = class so {
|
|
11761
11763
|
/**
|
|
11762
11764
|
* Creates a new Point instance.
|
|
11763
11765
|
* @param x - The x-coordinate (defaults to 0)
|
|
@@ -11795,7 +11797,7 @@ let W = class ro {
|
|
|
11795
11797
|
* @returns A new Point instance with the same x and y values
|
|
11796
11798
|
*/
|
|
11797
11799
|
clone() {
|
|
11798
|
-
return new
|
|
11800
|
+
return new so(this.x, this.y);
|
|
11799
11801
|
}
|
|
11800
11802
|
/**
|
|
11801
11803
|
* Adds another point's coordinates to this point.
|
|
@@ -11900,18 +11902,18 @@ class Mt {
|
|
|
11900
11902
|
}
|
|
11901
11903
|
const s = 4 * Math.atan(Math.abs(this.bulge));
|
|
11902
11904
|
this.radius = r / (2 * Math.sin(s / 2));
|
|
11903
|
-
const i = this.start.clone().add(t.clone().divide(2)), o = new
|
|
11905
|
+
const i = this.start.clone().add(t.clone().divide(2)), o = new j(-t.y, t.x);
|
|
11904
11906
|
o.normalize(), o.multiply(Math.abs(this.radius * Math.cos(s / 2))), this.center = i.clone(), this.isClockwise ? this.center.subtract(o) : this.center.add(o), this.startAngle = Math.atan2(this.start.y - this.center.y, this.start.x - this.center.x), this.endAngle = Math.atan2(this.end.y - this.center.y, this.end.x - this.center.x), this.isClockwise ? this.endAngle >= this.startAngle && (this.endAngle -= 2 * Math.PI) : this.endAngle <= this.startAngle && (this.endAngle += 2 * Math.PI);
|
|
11905
11907
|
} else if (e.center && e.radius !== void 0 && e.startOctant !== void 0 && e.octantCount !== void 0 && e.isClockwise !== void 0) {
|
|
11906
11908
|
this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant * Es;
|
|
11907
11909
|
const t = (e.octantCount === 0 ? 8 : e.octantCount) * Es;
|
|
11908
11910
|
this.endAngle = this.startAngle + (this.isClockwise ? -t : t), this.start = this.center.clone().add(
|
|
11909
|
-
new
|
|
11911
|
+
new j(
|
|
11910
11912
|
this.radius * Math.cos(this.startAngle),
|
|
11911
11913
|
this.radius * Math.sin(this.startAngle)
|
|
11912
11914
|
)
|
|
11913
11915
|
), this.end = this.center.clone().add(
|
|
11914
|
-
new
|
|
11916
|
+
new j(this.radius * Math.cos(this.endAngle), this.radius * Math.sin(this.endAngle))
|
|
11915
11917
|
);
|
|
11916
11918
|
} else
|
|
11917
11919
|
throw new Error("Invalid arc parameters");
|
|
@@ -11928,12 +11930,12 @@ class Mt {
|
|
|
11928
11930
|
for (let i = 1; i < s; i++) {
|
|
11929
11931
|
const o = i / s, a = this.isClockwise ? this.startAngle - o * r : this.startAngle + o * r;
|
|
11930
11932
|
t.push(
|
|
11931
|
-
this.center.clone().add(new
|
|
11933
|
+
this.center.clone().add(new j(this.radius * Math.cos(a), this.radius * Math.sin(a)))
|
|
11932
11934
|
);
|
|
11933
11935
|
}
|
|
11934
11936
|
return t.push(
|
|
11935
11937
|
this.end ? this.end.clone() : this.center.clone().add(
|
|
11936
|
-
new
|
|
11938
|
+
new j(
|
|
11937
11939
|
this.radius * Math.cos(this.endAngle),
|
|
11938
11940
|
this.radius * Math.sin(this.endAngle)
|
|
11939
11941
|
)
|
|
@@ -11941,7 +11943,7 @@ class Mt {
|
|
|
11941
11943
|
), t;
|
|
11942
11944
|
}
|
|
11943
11945
|
}
|
|
11944
|
-
let Dn = class
|
|
11946
|
+
let Dn = class io {
|
|
11945
11947
|
constructor(e, t = []) {
|
|
11946
11948
|
this.lastPoint = e, this.polylines = t;
|
|
11947
11949
|
}
|
|
@@ -11965,7 +11967,7 @@ let Dn = class so {
|
|
|
11965
11967
|
*/
|
|
11966
11968
|
offset(e, t = !0) {
|
|
11967
11969
|
var r, s;
|
|
11968
|
-
return t ? new
|
|
11970
|
+
return t ? new io(
|
|
11969
11971
|
(r = this.lastPoint) == null ? void 0 : r.clone().add(e),
|
|
11970
11972
|
this.polylines.map((i) => i.map((o) => o.clone().add(e)))
|
|
11971
11973
|
) : ((s = this.lastPoint) == null || s.add(e), this.polylines.forEach((i) => i.forEach((o) => o.add(e))), this);
|
|
@@ -12045,7 +12047,7 @@ let fd = class {
|
|
|
12045
12047
|
*/
|
|
12046
12048
|
parseShape(n, e) {
|
|
12047
12049
|
const t = {
|
|
12048
|
-
currentPoint: new
|
|
12050
|
+
currentPoint: new j(),
|
|
12049
12051
|
polylines: [],
|
|
12050
12052
|
currentPolyline: [],
|
|
12051
12053
|
sp: [],
|
|
@@ -12131,7 +12133,7 @@ let fd = class {
|
|
|
12131
12133
|
* @returns Returns the vector for the given direction code
|
|
12132
12134
|
*/
|
|
12133
12135
|
getVectorForDirection(n) {
|
|
12134
|
-
const e = new
|
|
12136
|
+
const e = new j();
|
|
12135
12137
|
switch (n) {
|
|
12136
12138
|
case 0:
|
|
12137
12139
|
e.x = 1;
|
|
@@ -12202,13 +12204,13 @@ let fd = class {
|
|
|
12202
12204
|
}
|
|
12203
12205
|
handleXYDisplacement(n, e, t) {
|
|
12204
12206
|
let r = e;
|
|
12205
|
-
const s = new
|
|
12207
|
+
const s = new j();
|
|
12206
12208
|
return s.x = ne.byteToSByte(n[++r]), s.y = ne.byteToSByte(n[++r]), t.currentPoint.add(s.multiply(t.scale)), t.isPenDown && t.currentPolyline.push(t.currentPoint.clone()), r;
|
|
12207
12209
|
}
|
|
12208
12210
|
handleMultipleXYDisplacements(n, e, t) {
|
|
12209
12211
|
let r = e;
|
|
12210
12212
|
for (; ; ) {
|
|
12211
|
-
const s = new
|
|
12213
|
+
const s = new j();
|
|
12212
12214
|
if (s.x = ne.byteToSByte(n[++r]), s.y = ne.byteToSByte(n[++r]), s.x === 0 && s.y === 0)
|
|
12213
12215
|
break;
|
|
12214
12216
|
t.currentPoint.add(s.multiply(t.scale)), t.isPenDown && t.currentPolyline.push(t.currentPoint.clone());
|
|
@@ -12220,7 +12222,7 @@ let fd = class {
|
|
|
12220
12222
|
let s = e;
|
|
12221
12223
|
const i = n[++s] * t.scale, o = ne.byteToSByte(n[++s]), a = (o & 112) >> 4;
|
|
12222
12224
|
let c = o & 7;
|
|
12223
|
-
const l = o < 0, h = Math.PI / 4 * a, d = t.currentPoint.clone().subtract(new
|
|
12225
|
+
const l = o < 0, h = Math.PI / 4 * a, d = t.currentPoint.clone().subtract(new j(Math.cos(h) * i, Math.sin(h) * i)), u = Mt.fromOctant(d, i, a, c, l);
|
|
12224
12226
|
if (t.isPenDown) {
|
|
12225
12227
|
const p = u.tessellate();
|
|
12226
12228
|
t.currentPolyline.pop(), t.currentPolyline.push(...p.slice());
|
|
@@ -12237,29 +12239,29 @@ let fd = class {
|
|
|
12237
12239
|
l < 0 && (f = -f, p = -p, m = -1);
|
|
12238
12240
|
let y = u * h, v = y + p;
|
|
12239
12241
|
y += u * s / 256 * m, v += u * i / 256 * m;
|
|
12240
|
-
const S = t.currentPoint.clone().subtract(new
|
|
12241
|
-
if (t.currentPoint = S.clone().add(new
|
|
12242
|
+
const S = t.currentPoint.clone().subtract(new j(c * Math.cos(y), c * Math.sin(y)));
|
|
12243
|
+
if (t.currentPoint = S.clone().add(new j(c * Math.cos(v), c * Math.sin(v))), t.isPenDown) {
|
|
12242
12244
|
let x = y;
|
|
12243
12245
|
const _ = [];
|
|
12244
12246
|
if (_.push(
|
|
12245
|
-
S.clone().add(new
|
|
12247
|
+
S.clone().add(new j(c * Math.cos(x), c * Math.sin(x)))
|
|
12246
12248
|
), f > 0)
|
|
12247
12249
|
for (; x + f < v; )
|
|
12248
12250
|
x += f, _.push(
|
|
12249
|
-
S.clone().add(new
|
|
12251
|
+
S.clone().add(new j(c * Math.cos(x), c * Math.sin(x)))
|
|
12250
12252
|
);
|
|
12251
12253
|
else
|
|
12252
12254
|
for (; x + f > v; )
|
|
12253
12255
|
x += f, _.push(
|
|
12254
|
-
S.clone().add(new
|
|
12256
|
+
S.clone().add(new j(c * Math.cos(x), c * Math.sin(x)))
|
|
12255
12257
|
);
|
|
12256
|
-
_.push(S.clone().add(new
|
|
12258
|
+
_.push(S.clone().add(new j(c * Math.cos(v), c * Math.sin(v)))), t.currentPolyline.push(..._);
|
|
12257
12259
|
}
|
|
12258
12260
|
return r;
|
|
12259
12261
|
}
|
|
12260
12262
|
handleBulgeArc(n, e, t) {
|
|
12261
12263
|
let r = e;
|
|
12262
|
-
const s = new
|
|
12264
|
+
const s = new j();
|
|
12263
12265
|
s.x = ne.byteToSByte(n[++r]), s.y = ne.byteToSByte(n[++r]);
|
|
12264
12266
|
const i = ne.byteToSByte(n[++r]);
|
|
12265
12267
|
return t.currentPoint = this.handleArcSegment(
|
|
@@ -12274,7 +12276,7 @@ let fd = class {
|
|
|
12274
12276
|
handleMultipleBulgeArcs(n, e, t) {
|
|
12275
12277
|
let r = e;
|
|
12276
12278
|
for (; ; ) {
|
|
12277
|
-
const s = new
|
|
12279
|
+
const s = new j();
|
|
12278
12280
|
if (s.x = ne.byteToSByte(n[++r]), s.y = ne.byteToSByte(n[++r]), s.x === 0 && s.y === 0)
|
|
12279
12281
|
break;
|
|
12280
12282
|
const i = ne.byteToSByte(n[++r]);
|
|
@@ -12430,7 +12432,7 @@ class gd {
|
|
|
12430
12432
|
this.shapeParser.release();
|
|
12431
12433
|
}
|
|
12432
12434
|
}
|
|
12433
|
-
class wr extends
|
|
12435
|
+
class wr extends ai {
|
|
12434
12436
|
/**
|
|
12435
12437
|
* Creates a new instance of ShxTextShape
|
|
12436
12438
|
* @param char - The character this shape represents
|
|
@@ -12468,7 +12470,7 @@ class wr extends oi {
|
|
|
12468
12470
|
return e;
|
|
12469
12471
|
}
|
|
12470
12472
|
}
|
|
12471
|
-
class As extends
|
|
12473
|
+
class As extends oi {
|
|
12472
12474
|
constructor(e) {
|
|
12473
12475
|
super(), this.type = "shx", this.font = new gd(e), this.data = this.font.fontData;
|
|
12474
12476
|
}
|
|
@@ -12495,7 +12497,7 @@ class As extends ii {
|
|
|
12495
12497
|
s += t, this.addUnsupportedChar(o);
|
|
12496
12498
|
continue;
|
|
12497
12499
|
}
|
|
12498
|
-
r.push(a.offset(new
|
|
12500
|
+
r.push(a.offset(new j(s, 0))), s += a.width;
|
|
12499
12501
|
}
|
|
12500
12502
|
return r;
|
|
12501
12503
|
}
|
|
@@ -12727,7 +12729,7 @@ class he {
|
|
|
12727
12729
|
* @param url - The URL of the font file to load
|
|
12728
12730
|
*/
|
|
12729
12731
|
async loadFont(e) {
|
|
12730
|
-
const t =
|
|
12732
|
+
const t = hi(e);
|
|
12731
12733
|
if (!t)
|
|
12732
12734
|
throw new Error(`Invalid font url: ${e}`);
|
|
12733
12735
|
const r = Pr(e).toLowerCase(), s = await Tn.instance.get(r);
|
|
@@ -14577,7 +14579,7 @@ class Cd {
|
|
|
14577
14579
|
return this.pointsSameX(e, t) ? this.pointsSameY(e, t) ? 0 : e[1] < t[1] ? -1 : 1 : e[0] < t[0] ? -1 : 1;
|
|
14578
14580
|
}
|
|
14579
14581
|
}
|
|
14580
|
-
class
|
|
14582
|
+
class oo extends Cd {
|
|
14581
14583
|
constructor(e = 1e-10) {
|
|
14582
14584
|
super(), this.epsilon = e;
|
|
14583
14585
|
}
|
|
@@ -14973,7 +14975,7 @@ class kd {
|
|
|
14973
14975
|
this.push("done", null);
|
|
14974
14976
|
}
|
|
14975
14977
|
}
|
|
14976
|
-
class
|
|
14978
|
+
class ao {
|
|
14977
14979
|
constructor(e) {
|
|
14978
14980
|
this.log = null, this.geo = e;
|
|
14979
14981
|
}
|
|
@@ -15060,7 +15062,7 @@ class oo {
|
|
|
15060
15062
|
return this.polygon(o);
|
|
15061
15063
|
}
|
|
15062
15064
|
}
|
|
15063
|
-
new
|
|
15065
|
+
new ao(new oo());
|
|
15064
15066
|
class dn extends g.Object3D {
|
|
15065
15067
|
/**
|
|
15066
15068
|
* Flatten the hierarchy of the specified object so that all children are moved to be direct
|
|
@@ -17045,7 +17047,7 @@ class Od extends g.Group {
|
|
|
17045
17047
|
return t;
|
|
17046
17048
|
}
|
|
17047
17049
|
}
|
|
17048
|
-
class
|
|
17050
|
+
class co extends dn {
|
|
17049
17051
|
constructor(e) {
|
|
17050
17052
|
super(), this._styleManager = e;
|
|
17051
17053
|
}
|
|
@@ -17059,7 +17061,7 @@ class ao extends dn {
|
|
|
17059
17061
|
return this._styleManager = e._styleManager, super.copy(e, t);
|
|
17060
17062
|
}
|
|
17061
17063
|
}
|
|
17062
|
-
class ge extends
|
|
17064
|
+
class ge extends co {
|
|
17063
17065
|
constructor(e) {
|
|
17064
17066
|
super(e), this._objectId = "", this._ownerId = "", this._layerName = "", this._box = new g.Box3();
|
|
17065
17067
|
}
|
|
@@ -17505,7 +17507,7 @@ class zd extends ge {
|
|
|
17505
17507
|
try {
|
|
17506
17508
|
p.forEach((y, v) => {
|
|
17507
17509
|
m = Math.min(e[y][0].relativeEps(), 1e-6);
|
|
17508
|
-
const S = new
|
|
17510
|
+
const S = new ao(new oo(m));
|
|
17509
17511
|
if (v === 0)
|
|
17510
17512
|
f = S.segments({
|
|
17511
17513
|
regions: [a(e[y])],
|
|
@@ -17553,7 +17555,7 @@ class zd extends ge {
|
|
|
17553
17555
|
const c = [];
|
|
17554
17556
|
for (let l = i + 1; l < r; l++) {
|
|
17555
17557
|
const h = e[t[l]];
|
|
17556
|
-
|
|
17558
|
+
go.isPolygonIntersect(
|
|
17557
17559
|
o,
|
|
17558
17560
|
h
|
|
17559
17561
|
) && (a = !0, c.push(t[l]));
|
|
@@ -18012,12 +18014,12 @@ const nn = class xt {
|
|
|
18012
18014
|
}
|
|
18013
18015
|
};
|
|
18014
18016
|
nn.CameraZoomUniform = { value: 1 }, nn.ViewportScaleUniform = { value: 1 }, nn.MaxFragmentUniforms = 1024;
|
|
18015
|
-
let
|
|
18016
|
-
class
|
|
18017
|
+
let jd = nn;
|
|
18018
|
+
class Wd {
|
|
18017
18019
|
constructor(e) {
|
|
18018
18020
|
this.events = {
|
|
18019
18021
|
fontNotFound: new te()
|
|
18020
|
-
}, this._renderer = e, this._styleManager = new
|
|
18022
|
+
}, this._renderer = e, this._styleManager = new jd(), he.instance.events.fontNotFound.addEventListener((t) => {
|
|
18021
18023
|
this.events.fontNotFound.dispatch(t);
|
|
18022
18024
|
});
|
|
18023
18025
|
}
|
|
@@ -18109,7 +18111,7 @@ class jd {
|
|
|
18109
18111
|
* Create one empty drawable object
|
|
18110
18112
|
*/
|
|
18111
18113
|
createObject() {
|
|
18112
|
-
return new
|
|
18114
|
+
return new co(this._styleManager);
|
|
18113
18115
|
}
|
|
18114
18116
|
/**
|
|
18115
18117
|
* Create one empty entity
|
|
@@ -18281,7 +18283,7 @@ class Xd {
|
|
|
18281
18283
|
);
|
|
18282
18284
|
}
|
|
18283
18285
|
}
|
|
18284
|
-
class
|
|
18286
|
+
class lo {
|
|
18285
18287
|
/**
|
|
18286
18288
|
* Construct one instance of this class
|
|
18287
18289
|
* @param renderer Input renderer
|
|
@@ -18386,9 +18388,9 @@ class co {
|
|
|
18386
18388
|
), this._raycaster.params.Line.threshold = t, this._raycaster.params.Points.threshold = t, this._raycaster;
|
|
18387
18389
|
}
|
|
18388
18390
|
zoomTo(e, t = 1.1) {
|
|
18389
|
-
const r = new
|
|
18391
|
+
const r = new jn();
|
|
18390
18392
|
e.getSize(r);
|
|
18391
|
-
const s = new
|
|
18393
|
+
const s = new jn();
|
|
18392
18394
|
e.getCenter(s);
|
|
18393
18395
|
const i = new g.Vector3(s.x, s.y, 0);
|
|
18394
18396
|
this._camera.position.set(s.x, s.y, this._camera.position.z), this._camera.lookAt(i), this._camera.setRotationFromEuler(new g.Euler(0, 0, 0));
|
|
@@ -18420,7 +18422,7 @@ class co {
|
|
|
18420
18422
|
}, e.update(), e;
|
|
18421
18423
|
}
|
|
18422
18424
|
}
|
|
18423
|
-
class fn extends
|
|
18425
|
+
class fn extends lo {
|
|
18424
18426
|
/**
|
|
18425
18427
|
* Calcuate the bounding box of this viewport in client window coordinate system
|
|
18426
18428
|
*/
|
|
@@ -18478,7 +18480,7 @@ class fn extends co {
|
|
|
18478
18480
|
}
|
|
18479
18481
|
}
|
|
18480
18482
|
}
|
|
18481
|
-
const $d = (n) => new
|
|
18483
|
+
const $d = (n) => new Xs(n.min, n.max), Yd = (n) => new ue(
|
|
18482
18484
|
n.min,
|
|
18483
18485
|
n.max
|
|
18484
18486
|
), qd = (n) => new g.Box3(
|
|
@@ -18667,7 +18669,7 @@ class sp extends tp {
|
|
|
18667
18669
|
this.axes.geometry.dispose(), this.axes.material.dispose(), this.xText.geometry.dispose(), this.xText.material.dispose(), this.yText.geometry.dispose(), this.yText.material.dispose(), this.hasZAxis && ((e = this.zText) == null || e.geometry.dispose(), (t = this.zText) == null || t.material.dispose());
|
|
18668
18670
|
}
|
|
18669
18671
|
}
|
|
18670
|
-
class ip extends
|
|
18672
|
+
class ip extends lo {
|
|
18671
18673
|
/**
|
|
18672
18674
|
* Construct one instance of this class.
|
|
18673
18675
|
*
|
|
@@ -18875,11 +18877,11 @@ class op {
|
|
|
18875
18877
|
(t = this.activeLayoutView) == null || t.render(e);
|
|
18876
18878
|
}
|
|
18877
18879
|
}
|
|
18878
|
-
function
|
|
18880
|
+
function ho(n, e, t = 0, r = n.length - 1, s = ap) {
|
|
18879
18881
|
for (; r > t; ) {
|
|
18880
18882
|
if (r - t > 600) {
|
|
18881
18883
|
const c = r - t + 1, l = e - t + 1, h = Math.log(c), d = 0.5 * Math.exp(2 * h / 3), u = 0.5 * Math.sqrt(h * d * (c - d) / c) * (l - c / 2 < 0 ? -1 : 1), p = Math.max(t, Math.floor(e - l * d / c + u)), f = Math.min(r, Math.floor(e + (c - l) * d / c + u));
|
|
18882
|
-
|
|
18884
|
+
ho(n, e, p, f, s);
|
|
18883
18885
|
}
|
|
18884
18886
|
const i = n[e];
|
|
18885
18887
|
let o = t, a = r;
|
|
@@ -19140,7 +19142,7 @@ function Ns(n, e, t, r, s) {
|
|
|
19140
19142
|
for (; i.length; ) {
|
|
19141
19143
|
if (t = i.pop(), e = i.pop(), t - e <= r) continue;
|
|
19142
19144
|
const o = e + Math.ceil((t - e) / r / 2) * r;
|
|
19143
|
-
|
|
19145
|
+
ho(n, o, e, t, s), i.push(e, o, o, t);
|
|
19144
19146
|
}
|
|
19145
19147
|
}
|
|
19146
19148
|
class fp {
|
|
@@ -19719,7 +19721,7 @@ class yp extends ca {
|
|
|
19719
19721
|
alpha: !0,
|
|
19720
19722
|
canvas: e.canvas
|
|
19721
19723
|
});
|
|
19722
|
-
t.canvas == null && (t.canvas = r.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), r.setSize(this.width, this.height), this._renderer = new
|
|
19724
|
+
t.canvas == null && (t.canvas = r.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), r.setPixelRatio(Math.min(window.devicePixelRatio, 2)), r.setSize(this.width, this.height), this._renderer = new Wd(r);
|
|
19723
19725
|
const s = Tt.instance.fontMapping;
|
|
19724
19726
|
this._renderer.setFontMapping(s), this._renderer.events.fontNotFound.addEventListener((i) => {
|
|
19725
19727
|
Ue.emit("font-not-found", {
|
|
@@ -19732,9 +19734,9 @@ class yp extends ca {
|
|
|
19732
19734
|
this.mode == De.SELECTION && this.select();
|
|
19733
19735
|
}), document.addEventListener("keydown", (i) => {
|
|
19734
19736
|
i.code === "Escape" && this.selectionSet.clear();
|
|
19735
|
-
}),
|
|
19737
|
+
}), $s().layoutManager.events.layoutSwitched.addEventListener(
|
|
19736
19738
|
(i) => {
|
|
19737
|
-
this.activeLayoutBtrId = i.
|
|
19739
|
+
this.activeLayoutBtrId = i.layout.blockTableRecordId;
|
|
19738
19740
|
}
|
|
19739
19741
|
), this._missedImages = /* @__PURE__ */ new Map(), this._layoutViewManager = new op(), this.initialize(), this.onWindowResize(), this.animate(), this._isDirty = !0;
|
|
19740
19742
|
}
|
|
@@ -19935,27 +19937,34 @@ class yp extends ca {
|
|
|
19935
19937
|
* @inheritdoc
|
|
19936
19938
|
*/
|
|
19937
19939
|
addEntity(e) {
|
|
19938
|
-
|
|
19939
|
-
|
|
19940
|
-
|
|
19941
|
-
|
|
19942
|
-
|
|
19943
|
-
|
|
19944
|
-
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
|
|
19948
|
-
|
|
19949
|
-
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
this.
|
|
19953
|
-
|
|
19954
|
-
|
|
19940
|
+
let t = [];
|
|
19941
|
+
Array.isArray(e) ? t = e : t.push(e);
|
|
19942
|
+
for (let r = 0; r < t.length; ++r) {
|
|
19943
|
+
const s = t[r];
|
|
19944
|
+
let i = s.draw(
|
|
19945
|
+
this._renderer
|
|
19946
|
+
);
|
|
19947
|
+
if (i) {
|
|
19948
|
+
i.objectId = s.objectId, i.ownerId = s.ownerId, i.layerName = s.layer, i.visible = s.visibility;
|
|
19949
|
+
const o = !(s instanceof Zs || s instanceof Qs);
|
|
19950
|
+
this._scene.addEntity(i, o), this._isDirty = !0, i.dispose(), i = null;
|
|
19951
|
+
}
|
|
19952
|
+
if (s instanceof Ys) {
|
|
19953
|
+
if (s.number > 1) {
|
|
19954
|
+
const o = this._layoutViewManager.getAt(s.ownerId);
|
|
19955
|
+
if (o) {
|
|
19956
|
+
const a = new fn(
|
|
19957
|
+
o,
|
|
19958
|
+
s.toGiViewport(),
|
|
19959
|
+
this._renderer
|
|
19960
|
+
);
|
|
19961
|
+
o.addViewport(a);
|
|
19962
|
+
}
|
|
19963
|
+
}
|
|
19964
|
+
} else if (s instanceof qs) {
|
|
19965
|
+
const o = s.imageFileName;
|
|
19966
|
+
o && this._missedImages.set(s.objectId, o);
|
|
19955
19967
|
}
|
|
19956
|
-
} else if (e instanceof Ys) {
|
|
19957
|
-
const s = e.imageFileName;
|
|
19958
|
-
s && this._missedImages.set(e.objectId, s);
|
|
19959
19968
|
}
|
|
19960
19969
|
}
|
|
19961
19970
|
/**
|
|
@@ -19969,10 +19978,21 @@ class yp extends ca {
|
|
|
19969
19978
|
* @inheritdoc
|
|
19970
19979
|
*/
|
|
19971
19980
|
updateEntity(e) {
|
|
19972
|
-
|
|
19973
|
-
|
|
19981
|
+
let t = [];
|
|
19982
|
+
Array.isArray(e) ? t = e : t.push(e);
|
|
19983
|
+
for (let r = 0; r < t.length; ++r) {
|
|
19984
|
+
const s = t[r], i = s.draw(this._renderer);
|
|
19985
|
+
i && (i.objectId = s.objectId, i.ownerId = s.ownerId, i.layerName = s.layer, i.visible = s.visibility, this._scene.update(i));
|
|
19986
|
+
}
|
|
19987
|
+
this._isDirty = !0, setTimeout(() => {
|
|
19974
19988
|
this._isDirty = !0;
|
|
19975
|
-
}, 100)
|
|
19989
|
+
}, 100);
|
|
19990
|
+
}
|
|
19991
|
+
/**
|
|
19992
|
+
* @inheritdoc
|
|
19993
|
+
*/
|
|
19994
|
+
addLayout(e) {
|
|
19995
|
+
this._scene.addEmptyLayout(e.blockTableRecordId), this.createLayoutViewIfNeeded(e.blockTableRecordId);
|
|
19976
19996
|
}
|
|
19977
19997
|
/**
|
|
19978
19998
|
* @inheritdoc
|
|
@@ -20078,7 +20098,7 @@ class it {
|
|
|
20078
20098
|
createExampleDoc1(e) {
|
|
20079
20099
|
for (let s = 0; s < 2; ++s)
|
|
20080
20100
|
for (let i = 0; i < 2; ++i) {
|
|
20081
|
-
const o = new
|
|
20101
|
+
const o = new Wn(), a = new Js();
|
|
20082
20102
|
a.addVertexAt(0, { x: i * 100, y: s * 100, bulge: 1 }), a.addVertexAt(1, { x: i * 100 + 100, y: s * 100, bulge: 1 }), a.closed = !0, o.add(a), e.tables.blockTable.modelSpace.appendEntity(o);
|
|
20083
20103
|
}
|
|
20084
20104
|
}
|
|
@@ -20108,7 +20128,7 @@ class it {
|
|
|
20108
20128
|
const t = e.tables.blockTable.modelSpace;
|
|
20109
20129
|
t.appendEntity(this.createArc()), this.createLines().forEach((s) => {
|
|
20110
20130
|
e.tables.blockTable.modelSpace.appendEntity(
|
|
20111
|
-
new
|
|
20131
|
+
new Ks(s.startPoint, s.endPoint)
|
|
20112
20132
|
);
|
|
20113
20133
|
}), t.appendEntity(this.createHatch()), e.tables.textStyleTable.add(this.createTextStyle()), t.appendEntity(this.createMText());
|
|
20114
20134
|
}
|
|
@@ -20126,16 +20146,16 @@ class it {
|
|
|
20126
20146
|
textGenerationFlag: 0,
|
|
20127
20147
|
widthFactor: 0.667
|
|
20128
20148
|
};
|
|
20129
|
-
return new
|
|
20149
|
+
return new ei(e);
|
|
20130
20150
|
}
|
|
20131
20151
|
createMText() {
|
|
20132
|
-
const e = new
|
|
20133
|
-
return e.attachmentPoint =
|
|
20152
|
+
const e = new ti();
|
|
20153
|
+
return e.attachmentPoint = mo.MiddleLeft, e.color = new lr().setColorName("red"), e.layer = "0", e.location = new Xn(9850, 86773, 0), e.contents = "{\\W0.667;\\T1.1;智慧8081}", e.height = 200, e.width = 1e3, e.styleName = "Standard", e;
|
|
20134
20154
|
}
|
|
20135
20155
|
createHatch() {
|
|
20136
|
-
const e = this.createLines(), t = new
|
|
20156
|
+
const e = this.createLines(), t = new Wn(), r = new ni();
|
|
20137
20157
|
return r.add(
|
|
20138
|
-
new
|
|
20158
|
+
new ri(
|
|
20139
20159
|
{ x: 20241.23355899991, y: 174118.6312674369 },
|
|
20140
20160
|
89258.30757455899,
|
|
20141
20161
|
vt.degToRad(262.2471115358437),
|
|
@@ -20143,11 +20163,11 @@ class it {
|
|
|
20143
20163
|
!1
|
|
20144
20164
|
)
|
|
20145
20165
|
), e.forEach((s) => {
|
|
20146
|
-
r.add(new
|
|
20166
|
+
r.add(new si(s.startPoint, s.endPoint));
|
|
20147
20167
|
}), t.add(r), t;
|
|
20148
20168
|
}
|
|
20149
20169
|
createArc() {
|
|
20150
|
-
return new
|
|
20170
|
+
return new ii(
|
|
20151
20171
|
{ x: 20241.23355899991, y: 174118.6312674369, z: 0 },
|
|
20152
20172
|
89258.30757455899,
|
|
20153
20173
|
vt.degToRad(262.2471115358437),
|
|
@@ -20307,7 +20327,7 @@ class ce {
|
|
|
20307
20327
|
width: window.innerWidth,
|
|
20308
20328
|
height: window.innerHeight - 30
|
|
20309
20329
|
}), s = new yp({ canvas: e, calculateSizeCallback: r });
|
|
20310
|
-
this._context = new Zo(s, t), this._fontLoader = new vp(s.renderer),
|
|
20330
|
+
this._context = new Zo(s, t), this._fontLoader = new vp(s.renderer), $s().workingDatabase = t.database, this.registerCommands();
|
|
20311
20331
|
}
|
|
20312
20332
|
/**
|
|
20313
20333
|
* Creates the singleton instance with an optional canvas element.
|
|
@@ -20641,7 +20661,7 @@ class Hs {
|
|
|
20641
20661
|
return e.type == "ARC" ? this.convertArc(e) : e.type == "CIRCLE" ? this.convertCirle(e) : e.type == "DIMENSION" ? this.convertDimension(e) : e.type == "ELLIPSE" ? this.convertEllipse(e) : e.type == "HATCH" ? this.convertHatch(e) : e.type == "IMAGE" ? this.convertImage(e) : e.type == "LEADER" ? this.convertLeader(e) : e.type == "LINE" ? this.convertLine(e) : e.type == "LWPOLYLINE" ? this.convertLWPolyline(e) : e.type == "MTEXT" ? this.convertMText(e) : e.type == "POINT" ? this.convertPoint(e) : e.type == "POLYLINE" ? this.convertPolyline(e) : e.type == "RAY" ? this.convertRay(e) : e.type == "SPLINE" ? this.convertSpline(e) : e.type == "ACAD_TABLE" ? this.convertTable(e) : e.type == "TEXT" ? this.convertText(e) : e.type == "SOLID" ? this.convertSolid(e) : e.type == "VIEWPORT" ? this.convertViewport(e) : e.type == "XLINE" ? this.convertXline(e) : e.type == "INSERT" ? this.convertBlockReference(e) : null;
|
|
20642
20662
|
}
|
|
20643
20663
|
convertArc(e) {
|
|
20644
|
-
return new
|
|
20664
|
+
return new ii(
|
|
20645
20665
|
e.center,
|
|
20646
20666
|
e.radius,
|
|
20647
20667
|
e.startAngle,
|
|
@@ -20665,7 +20685,7 @@ class Hs {
|
|
|
20665
20685
|
}
|
|
20666
20686
|
convertLine(e) {
|
|
20667
20687
|
const t = e.startPoint, r = e.endPoint;
|
|
20668
|
-
return new
|
|
20688
|
+
return new Ks(
|
|
20669
20689
|
new Xn(t.x, t.y, t.z),
|
|
20670
20690
|
new Xn(r.x, r.y, r.z)
|
|
20671
20691
|
);
|
|
@@ -20721,7 +20741,7 @@ class Hs {
|
|
|
20721
20741
|
}
|
|
20722
20742
|
convertHatch(e) {
|
|
20723
20743
|
var t;
|
|
20724
|
-
const r = new
|
|
20744
|
+
const r = new Wn();
|
|
20725
20745
|
return (t = e.definitionLines) == null || t.forEach((s) => {
|
|
20726
20746
|
r.definitionLines.push({
|
|
20727
20747
|
angle: s.angle,
|
|
@@ -20731,7 +20751,7 @@ class Hs {
|
|
|
20731
20751
|
});
|
|
20732
20752
|
}), r.hatchStyle = e.hatchStyle, r.patternName = e.patternName, r.patternType = e.patternType, r.patternAngle = e.patternAngle == null ? 0 : e.patternAngle, r.patternScale = e.patternScale == null ? 0 : e.patternScale, e.boundaryPaths.forEach((s) => {
|
|
20733
20753
|
if (s.boundaryPathTypeFlag & 2) {
|
|
20734
|
-
const i = s, o = new
|
|
20754
|
+
const i = s, o = new Js();
|
|
20735
20755
|
o.closed = i.isClosed, i.vertices.forEach((a, c) => {
|
|
20736
20756
|
o.addVertexAt(c, {
|
|
20737
20757
|
x: a.x,
|
|
@@ -20740,15 +20760,15 @@ class Hs {
|
|
|
20740
20760
|
});
|
|
20741
20761
|
}), r.add(o);
|
|
20742
20762
|
} else {
|
|
20743
|
-
const i = s, o = new
|
|
20763
|
+
const i = s, o = new ni();
|
|
20744
20764
|
i.edges.forEach((a) => {
|
|
20745
20765
|
if (a.type == 1) {
|
|
20746
20766
|
const c = a;
|
|
20747
|
-
o.add(new
|
|
20767
|
+
o.add(new si(c.start, c.end));
|
|
20748
20768
|
} else if (a.type == 2) {
|
|
20749
20769
|
const c = a;
|
|
20750
20770
|
o.add(
|
|
20751
|
-
new
|
|
20771
|
+
new ri(
|
|
20752
20772
|
c.center,
|
|
20753
20773
|
c.radius,
|
|
20754
20774
|
c.startAngle,
|
|
@@ -20758,7 +20778,7 @@ class Hs {
|
|
|
20758
20778
|
);
|
|
20759
20779
|
} else if (a.type == 3) {
|
|
20760
20780
|
const c = a;
|
|
20761
|
-
new
|
|
20781
|
+
new jn().subVectors(c.end, c.center);
|
|
20762
20782
|
const l = Math.sqrt(
|
|
20763
20783
|
Math.pow(c.end.x, 2) + Math.pow(c.end.y, 2)
|
|
20764
20784
|
), h = l * c.lengthOfMinorAxis;
|
|
@@ -20826,7 +20846,7 @@ class Hs {
|
|
|
20826
20846
|
return t.textString = e.text, t.styleName = e.styleName, t.height = e.textHeight, t.position.copy(e.startPoint), t.rotation = e.rotation, t.oblique = e.obliqueAngle ?? 0, t.thickness = e.thickness, t.horizontalMode = e.halign, t.verticalMode = e.valign, t.widthFactor = e.xScale ?? 1, t;
|
|
20827
20847
|
}
|
|
20828
20848
|
convertMText(e) {
|
|
20829
|
-
const t = new
|
|
20849
|
+
const t = new ti();
|
|
20830
20850
|
return t.contents = e.text, e.styleName != null && (t.styleName = e.styleName), t.height = e.textHeight, t.width = e.rectWidth, t.rotation = e.rotation || 0, t.location = e.insertionPoint, t.attachmentPoint = e.attachmentPoint, e.direction && (t.direction = new Kt(e.direction)), t.drawingDirection = e.drawingDirection, t;
|
|
20831
20851
|
}
|
|
20832
20852
|
convertLeader(e) {
|
|
@@ -20884,7 +20904,7 @@ class Hs {
|
|
|
20884
20904
|
) * e.imageSize.y, t.rotation = Math.atan2(e.uPixel.y, e.uPixel.x);
|
|
20885
20905
|
}
|
|
20886
20906
|
convertImage(e) {
|
|
20887
|
-
const t = new
|
|
20907
|
+
const t = new qs();
|
|
20888
20908
|
return this.processImage(e, t), t;
|
|
20889
20909
|
}
|
|
20890
20910
|
// private convertWipeout(wipeout: WipeoutEntity) {
|
|
@@ -20893,15 +20913,15 @@ class Hs {
|
|
|
20893
20913
|
// return dbWipeout
|
|
20894
20914
|
// }
|
|
20895
20915
|
convertViewport(e) {
|
|
20896
|
-
const t = new
|
|
20916
|
+
const t = new Ys();
|
|
20897
20917
|
return t.number = e.viewportId, t.centerPoint.copy(e.viewportCenter), t.height = e.height, t.width = e.width, t.viewCenter.copy(e.displayCenter), t.viewHeight = e.viewHeight, t;
|
|
20898
20918
|
}
|
|
20899
20919
|
convertRay(e) {
|
|
20900
|
-
const t = new
|
|
20920
|
+
const t = new Zs();
|
|
20901
20921
|
return t.basePoint.copy(e.firstPoint), t.unitDir.copy(e.unitDirection), t;
|
|
20902
20922
|
}
|
|
20903
20923
|
convertXline(e) {
|
|
20904
|
-
const t = new
|
|
20924
|
+
const t = new Qs();
|
|
20905
20925
|
return t.basePoint.copy(e.firstPoint), t.unitDir.copy(e.unitDirection), t;
|
|
20906
20926
|
}
|
|
20907
20927
|
convertBlockReference(e) {
|
|
@@ -20915,13 +20935,13 @@ class Hs {
|
|
|
20915
20935
|
t.layer = e.layer, t.objectId = e.handle.toString(), t.ownerId = e.ownerBlockRecordSoftId.toString(), e.lineType != null && (t.lineType = e.lineType), e.lineweight != null && (t.lineWeight = e.lineweight), e.lineTypeScale != null && (t.linetypeScale = e.lineTypeScale), e.color != null && (t.color.color = e.color), e.colorIndex != null && (t.color.colorIndex = e.colorIndex), e.colorName != null && (t.color.colorName = e.colorName), e.isVisible != null && (t.visibility = e.isVisible), e.transparency != null && (t.transparency = e.transparency);
|
|
20916
20936
|
}
|
|
20917
20937
|
}
|
|
20918
|
-
class bp extends
|
|
20938
|
+
class bp extends yo {
|
|
20919
20939
|
constructor(e = {}) {
|
|
20920
20940
|
super(e), e.useWorker = !0, e.parserWorkerUrl || (e.parserWorkerUrl = "/assets/libredwg-parser-worker.js");
|
|
20921
20941
|
}
|
|
20922
20942
|
async parse(e) {
|
|
20923
20943
|
if (this.config.useWorker && this.config.parserWorkerUrl)
|
|
20924
|
-
return (await
|
|
20944
|
+
return (await vo({ workerUrl: this.config.parserWorkerUrl }).execute(e)).data;
|
|
20925
20945
|
throw new Error("dwg converter can run in web worker only!");
|
|
20926
20946
|
}
|
|
20927
20947
|
/**
|
|
@@ -20978,13 +20998,13 @@ class bp extends mo {
|
|
|
20978
20998
|
standardFlag: r.standardFlag,
|
|
20979
20999
|
totalPatternLength: r.totalPatternLength,
|
|
20980
21000
|
pattern: r.pattern
|
|
20981
|
-
}, i = new
|
|
21001
|
+
}, i = new bo(s);
|
|
20982
21002
|
this.processCommonTableEntryAttrs(r, i), i.name = r.name, t.tables.linetypeTable.add(i);
|
|
20983
21003
|
});
|
|
20984
21004
|
}
|
|
20985
21005
|
processTextStyles(e, t) {
|
|
20986
21006
|
e.tables.STYLE.entries.forEach((r) => {
|
|
20987
|
-
const s = new
|
|
21007
|
+
const s = new ei(r);
|
|
20988
21008
|
this.processCommonTableEntryAttrs(r, s), t.tables.textStyleTable.add(s);
|
|
20989
21009
|
});
|
|
20990
21010
|
}
|
|
@@ -21064,7 +21084,7 @@ class bp extends mo {
|
|
|
21064
21084
|
// TODO: Set correct value
|
|
21065
21085
|
dimlwd: r.DIMLWD,
|
|
21066
21086
|
dimlwe: r.DIMLWE
|
|
21067
|
-
}, i = new
|
|
21087
|
+
}, i = new xo(s);
|
|
21068
21088
|
this.processCommonTableEntryAttrs(r, i), t.tables.dimStyleTable.add(i);
|
|
21069
21089
|
});
|
|
21070
21090
|
}
|
|
@@ -21072,7 +21092,7 @@ class bp extends mo {
|
|
|
21072
21092
|
e.tables.LAYER.entries.forEach((r) => {
|
|
21073
21093
|
const s = new lr();
|
|
21074
21094
|
s.colorIndex = r.colorIndex;
|
|
21075
|
-
const i = new
|
|
21095
|
+
const i = new So({
|
|
21076
21096
|
name: r.name,
|
|
21077
21097
|
standardFlags: r.standardFlag,
|
|
21078
21098
|
linetype: r.lineType,
|
|
@@ -21086,24 +21106,25 @@ class bp extends mo {
|
|
|
21086
21106
|
}
|
|
21087
21107
|
processViewports(e, t) {
|
|
21088
21108
|
e.tables.VPORT.entries.forEach((r) => {
|
|
21089
|
-
const s = new
|
|
21109
|
+
const s = new wo();
|
|
21090
21110
|
this.processCommonTableEntryAttrs(r, s), r.circleSides && (s.circleSides = r.circleSides), s.standardFlag = r.standardFlag, s.center.copy(r.center), s.lowerLeftCorner.copy(r.lowerLeftCorner), s.upperRightCorner.copy(r.upperRightCorner), r.snapBasePoint && s.snapBase.copy(r.snapBasePoint), r.snapRotationAngle && (s.snapAngle = r.snapRotationAngle), r.snapSpacing && s.snapIncrements.copy(r.snapSpacing), r.majorGridLines && (s.gridMajor = r.majorGridLines), r.gridSpacing && s.gridIncrements.copy(r.gridSpacing), r.backgroundObjectId && (s.backgroundObjectId = r.backgroundObjectId), s.gsView.center.copy(r.center), s.gsView.viewDirectionFromTarget.copy(r.viewDirectionFromTarget), s.gsView.viewTarget.copy(r.viewTarget), r.lensLength && (s.gsView.lensLength = r.lensLength), r.frontClippingPlane && (s.gsView.frontClippingPlane = r.frontClippingPlane), r.backClippingPlane && (s.gsView.backClippingPlane = r.backClippingPlane), r.viewHeight && (s.gsView.viewHeight = r.viewHeight), r.viewTwistAngle && (s.gsView.viewTwistAngle = r.viewTwistAngle), r.frozenLayers && (s.gsView.frozenLayers = r.frozenLayers), r.styleSheet && (s.gsView.styleSheet = r.styleSheet), r.renderMode && (s.gsView.renderMode = r.renderMode), r.viewMode && (s.gsView.viewMode = r.viewMode), r.ucsIconSetting && (s.gsView.ucsIconSetting = r.ucsIconSetting), r.ucsOrigin && s.gsView.ucsOrigin.copy(r.ucsOrigin), r.ucsXAxis && s.gsView.ucsXAxis.copy(r.ucsXAxis), r.ucsYAxis && s.gsView.ucsYAxis.copy(r.ucsYAxis), r.orthographicType && (s.gsView.orthographicType = r.orthographicType), r.shadePlotSetting && (s.gsView.shadePlotSetting = r.shadePlotSetting), r.shadePlotObjectId && (s.gsView.shadePlotObjectId = r.shadePlotObjectId), r.visualStyleObjectId && (s.gsView.visualStyleObjectId = r.visualStyleObjectId), r.isDefaultLightingOn && (s.gsView.isDefaultLightingOn = r.isDefaultLightingOn), r.defaultLightingType && (s.gsView.defaultLightingType = r.defaultLightingType), r.brightness && (s.gsView.brightness = r.brightness), r.contrast && (s.gsView.contrast = r.contrast), r.ambientColor && (s.gsView.ambientColor = r.ambientColor), t.tables.viewportTable.add(s);
|
|
21091
21111
|
});
|
|
21092
21112
|
}
|
|
21093
21113
|
processBlockTables(e, t) {
|
|
21094
21114
|
e.tables.BLOCK_RECORD.entries.forEach((r) => {
|
|
21095
21115
|
let s = t.tables.blockTable.getAt(r.name);
|
|
21096
|
-
s || (s = new
|
|
21116
|
+
s || (s = new _o(), s.objectId = r.handle.toString(), s.name = r.name, s.ownerId = r.ownerHandle.toString(), s.origin.copy(r.basePoint), s.layoutId = r.layout.toString(), t.tables.blockTable.add(s)), !s.isModelSapce && !s.isPaperSapce && r.entities && r.entities.length > 0 && this.processEntitiesInBlock(r.entities, s);
|
|
21097
21117
|
});
|
|
21098
21118
|
}
|
|
21099
21119
|
processBlocks(e, t) {
|
|
21100
21120
|
}
|
|
21101
21121
|
async processEntitiesInBlock(e, t) {
|
|
21102
|
-
const r = new Hs(), s = e.length;
|
|
21103
|
-
for (let
|
|
21104
|
-
const
|
|
21105
|
-
|
|
21122
|
+
const r = new Hs(), s = e.length, i = [];
|
|
21123
|
+
for (let o = 0; o < s; o++) {
|
|
21124
|
+
const a = e[o], c = r.convert(a);
|
|
21125
|
+
c && i.push(c);
|
|
21106
21126
|
}
|
|
21127
|
+
t.appendEntity(i);
|
|
21107
21128
|
}
|
|
21108
21129
|
/**
|
|
21109
21130
|
* Breaks up the work into smaller chunks that are executed asynchronously. This is often referred to
|
|
@@ -21111,19 +21132,20 @@ class bp extends mo {
|
|
|
21111
21132
|
* smaller pieces and executed in small intervals to allow the UI to remain responsive.
|
|
21112
21133
|
*/
|
|
21113
21134
|
async processEntities(e, t, r, s, i) {
|
|
21114
|
-
const o = new Hs(), a = e.entities, c = a.length, l = new
|
|
21135
|
+
const o = new Hs(), a = e.entities, c = a.length, l = new To(
|
|
21115
21136
|
c,
|
|
21116
21137
|
100 - s.value,
|
|
21117
21138
|
r
|
|
21118
21139
|
), h = t.tables.blockTable.modelSpace;
|
|
21119
21140
|
await l.processChunk(async (d, u) => {
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
m
|
|
21141
|
+
const p = [];
|
|
21142
|
+
for (let f = d; f < u; f++) {
|
|
21143
|
+
const m = a[f], y = o.convert(m);
|
|
21144
|
+
y && p.push(y);
|
|
21123
21145
|
}
|
|
21124
|
-
if (i) {
|
|
21125
|
-
let
|
|
21126
|
-
|
|
21146
|
+
if (h.appendEntity(p), i) {
|
|
21147
|
+
let f = s.value + u / c * (100 - s.value);
|
|
21148
|
+
f > 100 && (f = 100), await i(f, "ENTITY", "IN-PROGRESS");
|
|
21127
21149
|
}
|
|
21128
21150
|
});
|
|
21129
21151
|
}
|
|
@@ -21140,8 +21162,16 @@ class bp extends mo {
|
|
|
21140
21162
|
processLayouts(e, t) {
|
|
21141
21163
|
const r = t.dictionaries.layouts;
|
|
21142
21164
|
e.objects.LAYOUT.forEach((s) => {
|
|
21143
|
-
const i = new
|
|
21144
|
-
i.layoutName = s.layoutName, i.tabOrder = s.tabOrder
|
|
21165
|
+
const i = new Ws();
|
|
21166
|
+
i.layoutName = s.layoutName, i.tabOrder = s.tabOrder;
|
|
21167
|
+
const o = t.tables.blockTable.newIterator();
|
|
21168
|
+
i.objectId = s.handle.toString();
|
|
21169
|
+
for (const a of o)
|
|
21170
|
+
if (a.layoutId === i.objectId) {
|
|
21171
|
+
i.blockTableRecordId = a.objectId;
|
|
21172
|
+
break;
|
|
21173
|
+
}
|
|
21174
|
+
i.limits.min.copy(s.minLimit), i.limits.max.copy(s.maxLimit), i.extents.min.copy(s.minExtent), i.extents.max.copy(s.maxExtent), this.processCommonObjectAttrs(s, i), r.setAt(i.layoutName, i);
|
|
21145
21175
|
});
|
|
21146
21176
|
}
|
|
21147
21177
|
processImageDefs(e, t) {
|
|
@@ -21182,7 +21212,7 @@ const xp = {
|
|
|
21182
21212
|
isShowToolbar: !0,
|
|
21183
21213
|
isShowStats: !1,
|
|
21184
21214
|
fontMapping: {}
|
|
21185
|
-
},
|
|
21215
|
+
}, js = "settings";
|
|
21186
21216
|
class Tt {
|
|
21187
21217
|
constructor() {
|
|
21188
21218
|
this.events = {
|
|
@@ -21217,7 +21247,7 @@ class Tt {
|
|
|
21217
21247
|
*/
|
|
21218
21248
|
set(e, t) {
|
|
21219
21249
|
const r = this.settings;
|
|
21220
|
-
r[e] = t, localStorage.setItem(
|
|
21250
|
+
r[e] = t, localStorage.setItem(js, JSON.stringify(r)), this.events.modified.dispatch({
|
|
21221
21251
|
key: e,
|
|
21222
21252
|
value: t
|
|
21223
21253
|
});
|
|
@@ -21372,7 +21402,7 @@ class Tt {
|
|
|
21372
21402
|
* @returns The current settings object
|
|
21373
21403
|
*/
|
|
21374
21404
|
get settings() {
|
|
21375
|
-
const e = localStorage.getItem(
|
|
21405
|
+
const e = localStorage.getItem(js), t = e == null ? {} : JSON.parse(e);
|
|
21376
21406
|
return Ho(t, xp);
|
|
21377
21407
|
}
|
|
21378
21408
|
}
|