@tscircuit/cli 0.1.1673 → 0.1.1674

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/cli/main.js CHANGED
@@ -15006,6 +15006,7 @@ var require_ignore = __commonJS((exports2, module2) => {
15006
15006
  var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
15007
15007
  var RETURN_FALSE = () => false;
15008
15008
  var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY);
15009
+ var negateRange = (range) => range.startsWith("!") || range.startsWith("\\^") ? `^${range.slice(range[0] === "!" ? 1 : 2)}` : range;
15009
15010
  var cleanRangeBackSlash = (slashes) => {
15010
15011
  const { length } = slashes;
15011
15012
  return slashes.slice(0, length - length % 2);
@@ -15043,7 +15044,7 @@ var require_ignore = __commonJS((exports2, module2) => {
15043
15044
  () => "\\/"
15044
15045
  ],
15045
15046
  [
15046
- /^\^*\\\*\\\*\\\//,
15047
+ /^\^*(?:\\\*\\\*\\\/)+/,
15047
15048
  () => "^(?:.*\\/)?"
15048
15049
  ],
15049
15050
  [
@@ -15073,7 +15074,7 @@ var require_ignore = __commonJS((exports2, module2) => {
15073
15074
  ],
15074
15075
  [
15075
15076
  /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
15076
- (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
15077
+ (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${negateRange(sanitizeRange(range))}${endEscape}]` : "[]" : "[]"
15077
15078
  ],
15078
15079
  [
15079
15080
  /(?:[^*])$/,
@@ -19069,7 +19070,7 @@ var require_fast_uri = __commonJS((exports2, module2) => {
19069
19070
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
19070
19071
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
19071
19072
  try {
19072
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
19073
+ parsed.host = new URL("http://" + parsed.host).hostname;
19073
19074
  } catch (e) {
19074
19075
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
19075
19076
  }
@@ -35296,7 +35297,7 @@ var __create3, __defProp3, __getOwnPropDesc2, __getOwnPropNames3, __getProtoOf3,
35296
35297
  }, e = (t) => {
35297
35298
  let o = t.primitives ?? [...Object.values(t.paths ?? {}), ...Object.values(t.texts ?? {}), ...Object.values(t.circles ?? {}), ...Object.values(t.rects ?? {})], i = t.ports ?? Object.entries(t.refblocks).flatMap(([a, y]) => [{ ...y, labels: [a] }]), l = t.center ?? { x: t.bounds.centerX, y: t.bounds.centerY };
35298
35299
  return i.length === 2 && (l = { x: (i[0].x + i[1].x) / 2, y: (i[0].y + i[1].y) / 2 }), new _r({ ...t, primitives: o, ports: i, center: l });
35299
- }, w, If, o5, Ct, dp, Bf, bp, qf, a5, Nt, _p, Df, gp, Gf, m5, It, up, Uf, vp, Wf, h5, Bt, wp, Hf, Ap, Zf, g5, qt, Pp, Qf, Sp, Kf, A5, Dt, Rp, tc, Fp, A, rc, T5, Gt, Tp, oc, Ep, Yp, ic, k5, Ut, Xp, lc, Lp, Vp, pc, N5, Wt, jp, ac, kp, yc, D5, Ht, zp, xc, Op, j, mc, Z5, Zt, Jp, nc, $p, fc, eg, Qt, Mp, cc, Kt, hc, lg, te, Cp, dc, Np, gr, ur, vr, Ip, Bp, _c, qp, ee, Dp, gc, re, Gp, k, vc, Tg, Up, Wp, wc, Hp, Ac, Lg, Zp, Qp, Pc, Kp, Sc, zg, ta, ea, Rc, ra, z2, Tc, Cg, oe, oa, Ec, ia, Yc, qg, ie, la, Xc, pa, Lc, Wg, le, aa, Vc, ya, jc, Kg, pe, xa, kc, sa, zc, ou, ma, na, Oc, fa, ut, $c, yu, ca, ha, Mc, da, Cc, nu, ba, _a, Nc, ae, ga, Ic, gu, ua, va, Bc, wa, O, Dc, Pu, ye, Aa, Gc, Pa, Sa, J, Wc, Lu, xe, Ra, Hc, Fa, Ta, Zc, $u, se, Ea, Qc, Ya, Kc, Iu, me, Xa, th, La, Va, eh, Hu, ne, ja, rh, ka, P, ih, e3, fe, za, lh, Oa, Ja, ph, y3, ce, $a, ah, Ma, Ca, yh, h3, he, Na, xh, Ia, sh, g3, de, Ba, mh, qa, $2, fh, P3, be, _e, ch, Da, Ga, Ua, hh, j3, ge, ue, dh, Wa, M, _h, $3, ve, Ha, gh, Za, Qa, Ka, uh, W3, we, ty, vh, ey, St = 0.6, wr = 0.3, wh, ry, Rt = 0.6, Ar = 0.3, Ah, oy, Ft = 0.6, Pr = 0.3, Ph, iy, Tt = 0.6, Sr = 0.3, Sh, ly, S, py, ay, yy, xy, sy, my, ny, Th, Eh, Ae, fy, Yh, Et, Rr, Fr, Vh, cy, hy, R, zh, j7, Pe, dy, Oh, by, Jh, J7, Se, _y, $h, gy, Mh, N7, Re, uy, Ch, vy, Nh, D7, Fe, wy, Ih, Ay, Bh, H7, Te, Py, qh, Sy, Dh, t8, Ee, Ry, Gh, Fy, F, Ty, Ey, Yy, Xy7, Ly, Vy, C, Hh, jy, Zh, ky2, Qh, zy, Kh, Oy, td, Jy, ed, $y, rd, My, od, Cy, Ny, N, Iy, By, qy, Dy, I, Tr, Er, Yr, Gy, Xr, Lr, Vr, Uy, jr, kr, zr, Wy, Hy, B, Or, Jr, $r, Zy, Mr, Cr, Nr, Qy, Ir, Br, qr, Ky2, tx, q, Dr, Gr, Ur, ex, Wr, Hr, Zr, rx, Qr, Kr, to, ox, ix, D, eo, ro, oo, lx, io, lo, po, px, ao, yo, xo, ax, Ye, sd, Uv, Xe, yx, md, Le, so, mo, no, xx, Ve, sx, T, fd, x6, je, mx, cd, nx, hd, f6, ke, fx, dd, cx, bd, b6, ze, hx, _d, dx, gd, v6, Oe, bx, ud, _x, vd, S6, Je, gx, wd, ux, Ad, E6, $e, vx, Pd, wx, Ax, Rd, Fd, Me, Px, Td, Yt, Ed, Yd, Sx, Rx, Fx, Vd, jd, Ce, Tx, Ne, Ex, E, Yx, Xx, Lx, Vx, jx, kx, Xt, zx, Ox, Jx, G, $x, Mx, fo, co, ho, Cx, Nx, Ie, bo, _o, Ix, Bx, qx, Be, Dx, Gx, go, uo, Ux, Wx, Cd, Hx, qe, Zx, Nd, vt, De, Qx, Kx, vo, U, wo, Ao, Po, ts, So, Ro, Fo, es, To, Eo, Yo, rs, os5, qd, is, Ge, ls, Dd, wt, Xo, Lo, Vo, Ue, jo, ko, zo, ps, as, ys, Ud, xs, We, ss, Wd, He, ms, ns, Oo, Jo, fs43, cs, Zd, hs, Ze, $o, Qe, Mo, ds, Co, bs, _s, Kd, gs, Ke, us, t2, t0, No, Lt, e0, vs, ws, r2, As, r0, Io, o2, o0, Ps, Ss, Bo, qo, Rs, Fs, l2, Ts, i0, Do, p2, l0, Es, Ys, Go, Uo, Xs, Ls, y2, Vs, p0, Wo, x2, a0, js, ks, Ho, Zo, zs, Os, m2, Js, n2, W, $s, Ms, Cs, g, c2, MP, y0, Qo, h2, Ns, Is, d2, QP, x0, Ko, b2, Bs, _2, rS, s0, ti, g2, qs, u2, pS, m0, ei, v2, Ds, w2, sS, n0, ri, A2, Gs, Us, H, Ws, Hs, Zs, Qs, Z, Ks, tm, em, rm, F2, om, f0, oi, T2, c0, im, lm, ii, li, pm, am, Y2, ym, h0, pi, X2, d0, xm, sm, ai, yi, mm, nm, b0, fm, V2, cm, hm, dm, k2, bm, _0, xi, z22, g0, _m, gm, si, mi, um, u, J2, hR, u0, ni, $22, vm, wm, M2, FR, v0, fi, C2, Am, N2, XR, w0, ci, I2, Pm, B2, kR, A0, hi, q2, Sm, D2, $R, P0, di, G2, Rm, Fm, W2, Tm, S0, Em, R0, H2, Ym, Xm, Q2, Lm, F0, Vm, Q, bi, _i, gi, jm, ui, vi, wi, km, Ai, Pi, Si, zm, K, t9, sF, T0, Ri, e9, Om, r9, cF, E0, Fi, o9, Jm, $m, i9, vF, Y0, Ti, l9, Mm, Cm, a9, RF, X0, Nm, y9, L0, Im, Ei, Yi, Xi, Li, Bm, qm, s9, Dm, V0, Gm, m9, j0, Um, k0, f9, Wm, z0, Hm, c9, X, Vi, ji, ki, Zm, h9, Qm, O0, Km, d9, tn, zi, Oi, Ji, en, $i, Mi, Ci, rn, Ni, Ii, Bi, on2, tt, _9, pT, ln, g9, u9, pn, v9, sT, an, w9, A9, yn, P9, cT, xn, S9, R9, sn, F9, _T, mn, T9, nn, fn, Y9, cn, J0, $0, X9, M0, qi, L9, V9, hn, et, k9, YT, C0, dn, z9, bn, O9, jT, N0, _n, J9, gn, $9, JT, I0, un, M9, vn, C9, NT, B0, wn, N9, An, q0, B9, Pn, D0, Di, q9, rt, Gi, Ui, Wi, Sn, D9, KT, G0, Hi, G9, U0, Zi, Qi, Ki, Rn, tl, el, rl, Fn, Tn, En, ot, ol, il, ll, Yn, pl, al, yl, Xn, xl, sl, ml, Ln, nl, W0, Vn, H9, jn, kn, it, zn, On, Jn, $n, lt, Mn, Cn, Nn, In, pt, Bn, qn, Dn, Gn, at, Un, Wn, Hn, Zn, yt, Qn, Kn, t1, e1, xt, r1, o1, i1, l1, p1, st, fl, cl, hl, a1, dl, bl, _l, y1, gl, ul, vl, x1, s1, mt, wl, Al, Pl, m1, Sl, Rl, Fl, n1, Tl, El, Yl, f1, Vt, nt, Xl, Ll, Vl, c1, jl, kl, zl, h1, Ol, Jl, $l, d1, jt, ft, Ml, Cl, Nl, b1, Il, Bl, ql, _1, Dl, Gl, Ul, g1, ct, u1, v1, w1, A1, Wl, H0, P1, S1, sb, mb, Z0, R1, nb, kt, fb, cb, F1, T1, ht, Y1, E1, X1, L1, j1, V1, k1, z1, At5, Hl, Zl, Ql, Q0, Kl, tp, ep, O1, rp, op, ip, J1, lp, K0, $1, M1, _b, gb, C1, N1, vb, I1, tr, B1, wb, er, pp, Ab, Pb, q1, D1, Rb, G1, rr, ap, Fb, or, U1, W1, Tb, H1, Z1, Q1, K1, tf, Xb, yp, ir, ef, Lb, lr, rf, of, jb, lf, pr, pf, kb, ar, xp, zb, Ob, af, yf, $b, xf, yr, sf, xr, mf, nf, Cb, Nb, sr, ff, Ib, zt, Bb, qb, cf, hf, dt, Ub, df, Wb, bf, Hb, _f, Zb, gf, sp, mr, uf, vf, t_, e_, nr, wf, r_, Ot, o_, i_, Af, Pf, Sf, a_, y_, fr, Rf, x_, Jt, s_, m_, Ff, Tf, Ef, c_, Yf, cr, Xf, h_, hr, mp, d_, b_, Lf, Vf, YC, calculateElbowBends = (p12, p22, overshootAmount) => {
35300
+ }, w, If, o5, Ct, dp, Bf, bp, qf, a5, Nt, _p, Df, gp, Gf, m5, It, up, Uf, vp, Wf, h5, Bt, wp, Hf, Ap, Zf, g5, qt, Pp, Qf, Sp, Kf, A5, Dt, Rp, tc, Fp, A, rc, T5, Gt, Tp, oc, Ep, Yp, ic, k5, Ut, Xp, lc, Lp, Vp, pc, N5, Wt, jp, ac, kp, yc, D5, Ht, zp, xc, Op, j, mc, Z5, Zt, Jp, nc, $p, fc, eg, Qt, Mp, cc, Kt, hc, lg, te, Cp, dc, Np, gr, ur, vr, Ip, Bp, _c, qp, ee, Dp, gc, re, Gp, k, vc, Tg, Up, Wp, wc, Hp, Ac, Lg, Zp, Qp, Pc, Kp, Sc, zg, ta, ea, Rc, ra, z2, Tc, Cg, oe, oa, Ec, ia, Yc, qg, ie, la, Xc, pa, Lc, Wg, le, aa, Vc, ya, jc, Kg, pe, xa, kc, sa, zc, ou, ma, na, Oc, fa, ut, $c, yu, ca, ha, Mc, da, Cc, nu, ba, _a, Nc, ae, ga, Ic, gu, ua, va, Bc, wa, O, Dc, Pu, ye, Aa, Gc, Pa, Sa, J, Wc, Lu, xe, Ra, Hc, Fa, Ta, Zc, $u, se, Ea, Qc, Ya, Kc, Iu, me, Xa, th, La, Va, eh, Hu, ne, ja, rh, ka, P, ih, e3, fe, za, lh, Oa, Ja, ph, y3, ce, $a, ah, Ma, Ca, yh, h3, he, Na, xh, Ia, sh, g3, de, Ba, mh, qa, $2, fh, P3, be, _e, ch, Da, Ga, Ua, hh, j3, ge, ue, dh, Wa, M, _h, $3, ve, Ha, gh, Za, Qa, Ka, uh, W3, we, ty, vh, ey, St = 0.6, wr = 0.3, wh, ry, Rt = 0.6, Ar = 0.3, Ah, oy, Ft = 0.6, Pr = 0.3, Ph, iy, Tt = 0.6, Sr = 0.3, Sh, ly, S, py, ay, yy, xy, sy, my, ny, Th, Eh, Ae, fy, Yh, Et, Rr, Fr, Vh, cy, hy, R, zh, j7, Pe, dy, Oh, by, Jh, J7, Se, _y, $h, gy, Mh, N7, Re, uy, Ch, vy, Nh, D7, Fe, wy, Ih, Ay, Bh, H7, Te, Py, qh, Sy, Dh, t8, Ee, Ry, Gh, Fy, F, Ty, Ey, Yy, Xy7, Ly, Vy, C, Hh, jy, Zh, ky2, Qh, zy, Kh, Oy, td, Jy, ed, $y, rd, My, od, Cy, Ny, N, Iy, By, qy, Dy, I, Tr, Er, Yr, Gy, Xr, Lr, Vr, Uy, jr, kr, zr, Wy, Hy, B, Or, Jr, $r, Zy, Mr, Cr, Nr, Qy, Ir, Br, qr, Ky2, tx, q, Dr, Gr, Ur, ex, Wr, Hr, Zr, rx, Qr, Kr, to, ox, ix, D, eo, ro, oo, lx, io, lo, po, px, ao, yo, xo, ax, Ye, sd, Uv, Xe, yx, md, Le, so, mo, no, xx, Ve, sx, T, fd, x6, je, mx, cd, nx, hd, f6, ke, fx, dd, cx, bd, b6, ze, hx, _d, dx, gd, v6, Oe, bx, ud, _x, vd, S6, Je, gx, wd, ux, Ad, E6, $e, vx, Pd, wx, Ax, Rd, Fd, Me, Px, Td, Yt, Ed, Yd, Sx, Rx, Fx, Vd, jd, Ce, Tx, Ne, Ex, E, Yx, Xx, Lx, Vx, jx, kx, Xt, zx, Ox, Jx, G, $x, Mx, fo, co, ho, Cx, Nx, Ie, bo, _o, Ix, Bx, qx, Be, Dx, Gx, go, uo, Ux, Wx, Cd, Hx, qe, Zx, Nd, vt, De, Qx, Kx, vo, U, wo, Ao, Po, ts, So, Ro, Fo, es, To, Eo, Yo, rs, os5, qd, is, Ge, ls, Dd, wt, Xo, Lo, Vo, Ue, jo, ko, zo, ps, as, ys, Ud, xs, We, ss, Wd, He, ms, ns, Oo, Jo, fs43, cs, Zd, hs, Ze, $o, Qe, Mo, ds, Co, bs, _s, Kd, gs, Ke, us, t2, t0, No, Lt, e0, vs, ws, r2, As, r0, Io, o2, o0, Ps, Ss, Bo, qo, Rs, Fs, l2, Ts, i0, Do, p2, l0, Es, Ys, Go, Uo, Xs, Ls, y2, Vs, p0, Wo, x2, a0, js, ks, Ho, Zo, zs, Os, m2, Js, n2, W, $s, Ms, Cs, g, c2, MP, y0, Qo, h2, Ns, Is, d2, QP, x0, Ko, b2, Bs, _2, rS, s0, ti, g2, qs, u2, pS, m0, ei, v2, Ds, w2, sS, n0, ri, A2, Gs, Us, H, Ws, Hs, Zs, Qs, Z, Ks, tm, em, rm, F2, om, f0, oi, T2, c0, im, lm, ii, li, pm, am, Y2, ym, h0, pi, X2, d0, xm, sm, ai, yi, mm, nm, b0, fm, V2, cm, hm, dm, k2, bm, _0, xi, z22, g0, _m, gm, si, mi, um, u, J2, hR, u0, ni, $22, vm, wm, M2, FR, v0, fi, C2, Am, N2, XR, w0, ci, I2, Pm, B2, kR, A0, hi, q2, Sm, D2, $R, P0, di, G2, Rm, Fm, W2, Tm, S0, Em, R0, H2, Ym, Xm, Q2, Lm, F0, Vm, Q, bi, _i, gi, jm, ui, vi, wi, km, Ai, Pi, Si, zm, K2, t9, sF, T0, Ri, e9, Om, r9, cF, E0, Fi, o9, Jm, $m, i9, vF, Y0, Ti, l9, Mm, Cm, a9, RF, X0, Nm, y9, L0, Im, Ei, Yi, Xi, Li, Bm, qm, s9, Dm, V0, Gm, m9, j0, Um, k0, f9, Wm, z0, Hm, c9, X, Vi, ji, ki, Zm, h9, Qm, O0, Km, d9, tn, zi, Oi, Ji, en, $i, Mi, Ci, rn, Ni, Ii, Bi, on2, tt, _9, pT, ln, g9, u9, pn, v9, sT, an, w9, A9, yn, P9, cT, xn, S9, R9, sn, F9, _T, mn, T9, nn, fn, Y9, cn, J0, $0, X9, M0, qi, L9, V9, hn, et, k9, YT, C0, dn, z9, bn, O9, jT, N0, _n, J9, gn, $9, JT, I0, un, M9, vn, C9, NT, B0, wn, N9, An, q0, B9, Pn, D0, Di, q9, rt, Gi, Ui, Wi, Sn, D9, KT, G0, Hi, G9, U0, Zi, Qi, Ki, Rn, tl, el, rl, Fn, Tn, En, ot, ol, il, ll, Yn, pl, al, yl, Xn, xl, sl, ml, Ln, nl, W0, Vn, H9, jn, kn, it, zn, On, Jn, $n, lt, Mn, Cn, Nn, In, pt, Bn, qn, Dn, Gn, at, Un, Wn, Hn, Zn, yt, Qn, Kn, t1, e1, xt, r1, o1, i1, l1, p1, st, fl, cl, hl, a1, dl, bl, _l, y1, gl, ul, vl, x1, s1, mt, wl, Al, Pl, m1, Sl, Rl, Fl, n1, Tl, El, Yl, f1, Vt, nt, Xl, Ll, Vl, c1, jl, kl, zl, h1, Ol, Jl, $l, d1, jt, ft, Ml, Cl, Nl, b1, Il, Bl, ql, _1, Dl, Gl, Ul, g1, ct, u1, v1, w1, A1, Wl, H0, P1, S1, sb, mb, Z0, R1, nb, kt, fb, cb, F1, T1, ht, Y1, E1, X1, L1, j1, V1, k1, z1, At5, Hl, Zl, Ql, Q0, Kl, tp, ep, O1, rp, op, ip, J1, lp, K0, $1, M1, _b, gb, C1, N1, vb, I1, tr, B1, wb, er, pp, Ab, Pb, q1, D1, Rb, G1, rr, ap, Fb, or, U1, W1, Tb, H1, Z1, Q1, K1, tf, Xb, yp, ir, ef, Lb, lr, rf, of, jb, lf, pr, pf, kb, ar, xp, zb, Ob, af, yf, $b, xf, yr, sf, xr, mf, nf, Cb, Nb, sr, ff, Ib, zt, Bb, qb, cf, hf, dt, Ub, df, Wb, bf, Hb, _f, Zb, gf, sp, mr, uf, vf, t_, e_, nr, wf, r_, Ot, o_, i_, Af, Pf, Sf, a_, y_, fr, Rf, x_, Jt, s_, m_, Ff, Tf, Ef, c_, Yf, cr, Xf, h_, hr, mp, d_, b_, Lf, Vf, YC, calculateElbowBends = (p12, p22, overshootAmount) => {
35300
35301
  const result = [{
35301
35302
  x: p12.x,
35302
35303
  y: p12.y
@@ -39246,13 +39247,13 @@ var init_chunk_4ISXDEM5 = __esm(() => {
39246
39247
  Si.y -= 0.21;
39247
39248
  Si.x = 0.34;
39248
39249
  zm = Ai;
39249
- K = { paths: { path1: { type: "path", points: [{ x: -0.42, y: 0 }, { x: -0.3, y: 0 }], color: "primary", fill: false }, "path1-2-1": { type: "path", points: [{ x: -0.3, y: 0 }, { x: -0.25, y: 0.1 }, { x: -0.15, y: -0.1 }, { x: -0.05, y: 0.1 }, { x: 0.05, y: -0.1 }, { x: 0.15, y: 0.1 }, { x: 0.25, y: -0.1 }, { x: 0.3, y: 0 }], color: "primary", fill: false }, path2: { type: "path", points: [{ x: 0.3, y: 0 }, { x: 0.42, y: 0 }], color: "primary", fill: false }, path3: { type: "path", points: [{ x: 0, y: -0.17 }, { x: 0, y: -0.4 }], color: "primary", fill: false }, path15: { type: "path", points: [{ x: 0, y: -0.12 }, { x: 0.05, y: -0.2 }, { x: -0.05, y: -0.2 }, { x: 0, y: -0.12 }], color: "primary", fill: true } }, texts: { top1: { type: "text", text: "{REF}", x: 0.3, y: 0.25 }, bottom1: { type: "text", text: "{VAL}", x: 0.3, y: -0.25 } }, refblocks: { left: { x: -0.42, y: 0 }, right: { x: 0.42, y: 0 }, bottom: { x: 0, y: -0.4 } }, bounds: { minX: -0.42, maxX: 0.42, minY: -0.2, maxY: 0.2, width: 0.84, height: 0.4, centerX: 0, centerY: 0 }, circles: {} };
39250
- ({ paths: t9, texts: sF, bounds: T0, refblocks: Ri, circles: e9 } = K);
39250
+ K2 = { paths: { path1: { type: "path", points: [{ x: -0.42, y: 0 }, { x: -0.3, y: 0 }], color: "primary", fill: false }, "path1-2-1": { type: "path", points: [{ x: -0.3, y: 0 }, { x: -0.25, y: 0.1 }, { x: -0.15, y: -0.1 }, { x: -0.05, y: 0.1 }, { x: 0.05, y: -0.1 }, { x: 0.15, y: 0.1 }, { x: 0.25, y: -0.1 }, { x: 0.3, y: 0 }], color: "primary", fill: false }, path2: { type: "path", points: [{ x: 0.3, y: 0 }, { x: 0.42, y: 0 }], color: "primary", fill: false }, path3: { type: "path", points: [{ x: 0, y: -0.17 }, { x: 0, y: -0.4 }], color: "primary", fill: false }, path15: { type: "path", points: [{ x: 0, y: -0.12 }, { x: 0.05, y: -0.2 }, { x: -0.05, y: -0.2 }, { x: 0, y: -0.12 }], color: "primary", fill: true } }, texts: { top1: { type: "text", text: "{REF}", x: 0.3, y: 0.25 }, bottom1: { type: "text", text: "{VAL}", x: 0.3, y: -0.25 } }, refblocks: { left: { x: -0.42, y: 0 }, right: { x: 0.42, y: 0 }, bottom: { x: 0, y: -0.4 } }, bounds: { minX: -0.42, maxX: 0.42, minY: -0.2, maxY: 0.2, width: 0.84, height: 0.4, centerX: 0, centerY: 0 }, circles: {} };
39251
+ ({ paths: t9, texts: sF, bounds: T0, refblocks: Ri, circles: e9 } = K2);
39251
39252
  Om = e({ primitives: [...Object.values(t9), ...Object.values(e9), { type: "text", text: "{REF}", x: -0.15, y: 0.2394553499999995 }, { type: "text", text: "{VAL}", x: 0.15, y: 0.2394553499999995 }], ports: [{ ...Ri.left, labels: ["1"] }, { ...Ri.right, labels: ["3"] }, { ...Ri.bottom, labels: ["2"] }], size: { width: T0.width, height: T0.height }, center: { x: T0.centerX, y: T0.centerY } }).rotateRightFacingSymbol("down").labelPort("left", ["1"]).labelPort("right", ["2"]).labelPort("bottom", ["3"]).changeTextAnchor("{REF}", "middle_left").changeTextAnchor("{VAL}", "middle_left").build();
39252
- ({ paths: r9, texts: cF, bounds: E0, refblocks: Fi, circles: o9 } = K);
39253
+ ({ paths: r9, texts: cF, bounds: E0, refblocks: Fi, circles: o9 } = K2);
39253
39254
  Jm = e({ primitives: [...Object.values(r9), ...Object.values(o9), { type: "text", text: "{REF}", x: -0.3, y: -0.3894553499999995 }, { type: "text", text: "{VAL}", x: -0.3, y: 0.3194553499999995 }], ports: [{ ...Fi.left, labels: ["1"] }, { ...Fi.right, labels: ["3"] }, { ...Fi.bottom, labels: ["2"] }], size: { width: E0.width, height: E0.height }, center: { x: E0.centerX, y: E0.centerY } }).rotateRightFacingSymbol("left").labelPort("left", ["1"]).labelPort("right", ["2"]).labelPort("bottom", ["3"]).changeTextAnchor("{REF}", "middle_bottom").changeTextAnchor("{VAL}", "middle_top").build();
39254
- $m = e(K).labelPort("left", ["1"]).labelPort("right", ["3"]).labelPort("bottom", ["2"]).changeTextAnchor("{REF}", "middle_bottom").changeTextAnchor("{VAL}", "middle_top").build();
39255
- ({ paths: i9, texts: vF, bounds: Y0, refblocks: Ti, circles: l9 } = K);
39255
+ $m = e(K2).labelPort("left", ["1"]).labelPort("right", ["3"]).labelPort("bottom", ["2"]).changeTextAnchor("{REF}", "middle_bottom").changeTextAnchor("{VAL}", "middle_top").build();
39256
+ ({ paths: i9, texts: vF, bounds: Y0, refblocks: Ti, circles: l9 } = K2);
39256
39257
  Mm = e({ primitives: [...Object.values(i9), ...Object.values(l9), { type: "text", text: "{REF}", x: 0.3, y: -0.2894553499999995 }, { type: "text", text: "{VAL}", x: -0.3, y: -0.2894553499999995 }], ports: [{ ...Ti.left, labels: ["1"] }, { ...Ti.right, labels: ["3"] }, { ...Ti.bottom, labels: ["2"] }], size: { width: Y0.width, height: Y0.height }, center: { x: Y0.centerX, y: Y0.centerY } }).rotateRightFacingSymbol("up").labelPort("left", ["1"]).labelPort("right", ["2"]).labelPort("bottom", ["3"]).changeTextAnchor("{REF}", "middle_left").changeTextAnchor("{VAL}", "middle_left").build();
39257
39258
  Cm = { paths: { path11: { type: "path", points: [{ x: -0.54, y: 0.03 }, { x: -0.3, y: 0.03 }], color: "primary", fill: false }, path12: { type: "path", points: [{ x: 0.29, y: 0.03 }, { x: 0.54, y: 0.03 }], color: "primary", fill: false } }, texts: { top1: { type: "text", text: "{REF}", x: -0.16, y: 0.4 }, bottom1: { type: "text", text: "{VAL}", x: 0, y: -0.4 }, left1: { type: "text", text: "COS φ", x: -0.15, y: 0.01 } }, refblocks: { left1: { x: -0.54, y: 0.03 }, right1: { x: 0.54, y: 0.03 } }, bounds: { minX: -0.57, maxX: 0.57, minY: -0.4, maxY: 0.4, width: 1.14, height: 0.79, centerX: 0, centerY: 0 }, circles: { path1: { type: "circle", x: 0, y: 0.04, radius: 0.29, color: "primary", fill: false } } };
39258
39259
  ({ paths: a9, texts: RF, bounds: X0, refblocks: Nm, circles: y9 } = Cm);
@@ -48142,14 +48143,14 @@ function calculateVerticalEdgeLabels(edge, pinout_labels, {
48142
48143
  styleScale
48143
48144
  }, label_positions) {
48144
48145
  const x_coords = pinout_labels.map((l) => l.pcb_port.x);
48145
- const counts = {};
48146
+ const counts2 = {};
48146
48147
  for (const x3 of x_coords) {
48147
48148
  const rounded = x3.toFixed(1);
48148
- counts[rounded] = (counts[rounded] || 0) + 1;
48149
+ counts2[rounded] = (counts2[rounded] || 0) + 1;
48149
48150
  }
48150
48151
  let edge_ports;
48151
- if (Object.keys(counts).length > 1 && pinout_labels.length > 2) {
48152
- const sorted_x_groups = Object.entries(counts).sort((a, b) => b[1] - a[1]);
48152
+ if (Object.keys(counts2).length > 1 && pinout_labels.length > 2) {
48153
+ const sorted_x_groups = Object.entries(counts2).sort((a, b) => b[1] - a[1]);
48153
48154
  const primary_x = parseFloat(sorted_x_groups[0][0]);
48154
48155
  const primary_pins = pinout_labels.filter((l) => Math.abs(l.pcb_port.x - primary_x) < 0.2);
48155
48156
  const other_pins = pinout_labels.filter((l) => Math.abs(l.pcb_port.x - primary_x) >= 0.2);
@@ -48255,15 +48256,15 @@ function calculateVerticalEdgeLabels(edge, pinout_labels, {
48255
48256
  stagger_rank = geometric_middle_index - dist_from_middle;
48256
48257
  }
48257
48258
  const stagger_offset = stagger_offset_base + stagger_rank * (STAGGER_OFFSET_STEP * styleScale * pxPerMm);
48258
- const sign2 = edge === "left" ? -1 : 1;
48259
+ const sign = edge === "left" ? -1 : 1;
48259
48260
  const is_main_group_pin = main_group_indices.includes(i);
48260
48261
  const y_pos = is_all_main_group ? edge_ports[i].y : main_group_indices.length > 0 && is_main_group_pin ? edge_ports[i].y : current_y;
48261
48262
  const elbow_end = {
48262
- x: board_edge_x + sign2 * stagger_offset,
48263
+ x: board_edge_x + sign * stagger_offset,
48263
48264
  y: y_pos
48264
48265
  };
48265
48266
  const label_pos = {
48266
- x: board_edge_x + sign2 * aligned_label_offset,
48267
+ x: board_edge_x + sign * aligned_label_offset,
48267
48268
  y: y_pos
48268
48269
  };
48269
48270
  label_positions.set(pcb_port.pcb_port_id, {
@@ -62106,8 +62107,8 @@ var require_lodash2 = __commonJS((exports2, module2) => {
62106
62107
  }
62107
62108
  value = toNumber4(value);
62108
62109
  if (value === INFINITY || value === -INFINITY) {
62109
- var sign2 = value < 0 ? -1 : 1;
62110
- return sign2 * MAX_INTEGER;
62110
+ var sign = value < 0 ? -1 : 1;
62111
+ return sign * MAX_INTEGER;
62111
62112
  }
62112
62113
  return value === value ? value : 0;
62113
62114
  }
@@ -62287,8 +62288,8 @@ var require_lodash3 = __commonJS((exports2, module2) => {
62287
62288
  }
62288
62289
  value = toNumber4(value);
62289
62290
  if (value === INFINITY || value === -INFINITY) {
62290
- var sign2 = value < 0 ? -1 : 1;
62291
- return sign2 * MAX_INTEGER;
62291
+ var sign = value < 0 ? -1 : 1;
62292
+ return sign * MAX_INTEGER;
62292
62293
  }
62293
62294
  return value === value ? value : 0;
62294
62295
  }
@@ -62336,14 +62337,14 @@ var require_normalize_coord = __commonJS((exports2, module2) => {
62336
62337
  return NaN;
62337
62338
  }
62338
62339
  var numberString = "" + number;
62339
- var sign2 = "+";
62340
+ var sign = "+";
62340
62341
  if (numberString[0] === "-" || numberString[0] === "+") {
62341
- sign2 = numberString[0];
62342
+ sign = numberString[0];
62342
62343
  numberString = numberString.slice(1);
62343
62344
  }
62344
62345
  var hasDecimal = numberString.indexOf(".") !== -1;
62345
62346
  if (hasDecimal || format == null || format.zero == null) {
62346
- return Number(sign2 + numberString);
62347
+ return Number(sign + numberString);
62347
62348
  } else {
62348
62349
  if (format.places == null || format.places.length !== 2) {
62349
62350
  return NaN;
@@ -62363,7 +62364,7 @@ var require_normalize_coord = __commonJS((exports2, module2) => {
62363
62364
  }
62364
62365
  var before = numberString.slice(0, leading);
62365
62366
  var after = numberString.slice(leading, leading + trailing);
62366
- return Number(sign2 + before + "." + after);
62367
+ return Number(sign + before + "." + after);
62367
62368
  };
62368
62369
  module2.exports = normalizeCoord;
62369
62370
  });
@@ -65926,8 +65927,8 @@ var require_lodash4 = __commonJS((exports2, module2) => {
65926
65927
  }
65927
65928
  value = toNumber4(value);
65928
65929
  if (value === INFINITY || value === -INFINITY) {
65929
- var sign2 = value < 0 ? -1 : 1;
65930
- return sign2 * MAX_INTEGER;
65930
+ var sign = value < 0 ? -1 : 1;
65931
+ return sign * MAX_INTEGER;
65931
65932
  }
65932
65933
  return value === value ? value : 0;
65933
65934
  }
@@ -66609,7 +66610,7 @@ var require__operate = __commonJS((exports2, module2) => {
66609
66610
  return number >= epsilon ? number : 0;
66610
66611
  };
66611
66612
  var arcCenterFromRadius = function(start, end, mode, epsilon, radius) {
66612
- var sign2 = mode === "ccw" ? 1 : -1;
66613
+ var sign = mode === "ccw" ? 1 : -1;
66613
66614
  var xAve = (start[0] + end[0]) / 2;
66614
66615
  var yAve = (start[1] + end[1]) / 2;
66615
66616
  var deltaX = end[0] - start[1];
@@ -66617,8 +66618,8 @@ var require__operate = __commonJS((exports2, module2) => {
66617
66618
  var distance49 = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
66618
66619
  var halfDistance = distance49 / 2;
66619
66620
  var squareDifference = Math.sqrt(Math.pow(radius, 2) - Math.pow(halfDistance, 2));
66620
- var xOffset = -sign2 * deltaY * squareDifference / distance49;
66621
- var yOffset = sign2 * deltaX * squareDifference / distance49;
66621
+ var xOffset = -sign * deltaY * squareDifference / distance49;
66622
+ var yOffset = sign * deltaX * squareDifference / distance49;
66622
66623
  return [
66623
66624
  [
66624
66625
  roundToZero(xAve + xOffset, epsilon),
@@ -72170,9 +72171,9 @@ function computeArcFromBulge(startX, startY, endX, endY, bulge) {
72170
72171
  const midY = (startY + endY) / 2;
72171
72172
  const perpX = -chordY / chordLength;
72172
72173
  const perpY = chordX / chordLength;
72173
- const sign2 = bulge > 0 ? -1 : 1;
72174
- const centerX = midX + sign2 * perpX * distToCenter;
72175
- const centerY = midY + sign2 * perpY * distToCenter;
72174
+ const sign = bulge > 0 ? -1 : 1;
72175
+ const centerX = midX + sign * perpX * distToCenter;
72176
+ const centerY = midY + sign * perpY * distToCenter;
72176
72177
  return { centerX, centerY, radius };
72177
72178
  }
72178
72179
  function drawArcFromBulge(ctx, realStartX, realStartY, realEndX, realEndY, bulge, realToCanvasMat) {
@@ -75117,10 +75118,10 @@ function computeArcFromBulge2(startX, startY, endX, endY, bulge) {
75117
75118
  const midY = (startY + endY) / 2;
75118
75119
  const perpX = -chordY / chordLength;
75119
75120
  const perpY = chordX / chordLength;
75120
- const sign2 = bulge > 0 ? -1 : 1;
75121
+ const sign = bulge > 0 ? -1 : 1;
75121
75122
  return {
75122
- centerX: midX + sign2 * perpX * distToCenter,
75123
- centerY: midY + sign2 * perpY * distToCenter,
75123
+ centerX: midX + sign * perpX * distToCenter,
75124
+ centerY: midY + sign * perpY * distToCenter,
75124
75125
  radius
75125
75126
  };
75126
75127
  }
@@ -118347,7 +118348,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
118347
118348
  // lib/getVersion.ts
118348
118349
  import { createRequire as createRequire2 } from "node:module";
118349
118350
  // package.json
118350
- var version = "0.1.1672";
118351
+ var version = "0.1.1673";
118351
118352
  var package_default = {
118352
118353
  name: "@tscircuit/cli",
118353
118354
  version,
@@ -118363,7 +118364,7 @@ var package_default = {
118363
118364
  "@tscircuit/circuit-json-placement-analysis": "^0.0.6",
118364
118365
  "@tscircuit/circuit-json-routing-analysis": "^0.0.6",
118365
118366
  "@tscircuit/circuit-json-schematic-placement-analysis": "github:tscircuit/circuit-json-schematic-placement-analysis#b6d5fe675adc26a2fc988aa081e6fb51e6bf696a",
118366
- "@tscircuit/eval": "^0.0.1004",
118367
+ "@tscircuit/eval": "^0.0.1008",
118367
118368
  "@tscircuit/fake-snippets": "^0.0.182",
118368
118369
  "@tscircuit/file-server": "^0.0.32",
118369
118370
  "@tscircuit/footprinter": "^0.0.374",
@@ -118429,7 +118430,7 @@ var package_default = {
118429
118430
  semver: "^7.6.3",
118430
118431
  stepts: "^0.0.3",
118431
118432
  tempy: "^3.1.0",
118432
- tscircuit: "0.0.2046-libonly",
118433
+ tscircuit: "0.0.2084-libonly",
118433
118434
  tsx: "^4.7.1",
118434
118435
  "typed-ky": "^0.0.4",
118435
118436
  zod: "^3.23.8"
@@ -123266,14 +123267,18 @@ import { cju as cju2 } from "@tscircuit/circuit-json-util";
123266
123267
  import { compose as compose6, translate as translate6, scale as scale4 } from "transformation-matrix";
123267
123268
 
123268
123269
  // node_modules/earcut/src/earcut.js
123270
+ var steiners = new Set;
123271
+ var filteredOut = false;
123269
123272
  function earcut(data, holeIndices, dim = 2) {
123270
123273
  const hasHoles = holeIndices && holeIndices.length;
123271
123274
  const outerLen = hasHoles ? holeIndices[0] * dim : data.length;
123275
+ if (steiners.size)
123276
+ steiners.clear();
123272
123277
  let outerNode = linkedList(data, 0, outerLen, dim, true);
123273
123278
  const triangles = [];
123274
123279
  if (!outerNode || outerNode.next === outerNode.prev)
123275
123280
  return triangles;
123276
- let minX, minY, invSize;
123281
+ let minX = 0, minY = 0, invSize = 0;
123277
123282
  if (hasHoles)
123278
123283
  outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
123279
123284
  if (data.length > 80 * dim) {
@@ -123296,11 +123301,11 @@ function earcut(data, holeIndices, dim = 2) {
123296
123301
  invSize = Math.max(maxX - minX, maxY - minY);
123297
123302
  invSize = invSize !== 0 ? 32767 / invSize : 0;
123298
123303
  }
123299
- earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
123304
+ earcutLinked(outerNode, triangles, minX, minY, invSize);
123300
123305
  return triangles;
123301
123306
  }
123302
123307
  function linkedList(data, start, end, dim, clockwise) {
123303
- let last;
123308
+ let last = null;
123304
123309
  if (clockwise === signedArea(data, start, end, dim) > 0) {
123305
123310
  for (let i = start;i < end; i += dim)
123306
123311
  last = insertNode(i / dim | 0, data[i], data[i + 1], last);
@@ -123314,93 +123319,79 @@ function linkedList(data, start, end, dim, clockwise) {
123314
123319
  }
123315
123320
  return last;
123316
123321
  }
123317
- function filterPoints(start, end) {
123318
- if (!start)
123319
- return start;
123320
- if (!end)
123321
- end = start;
123322
+ function filterPoints(start, end = start) {
123323
+ const full = end === start;
123322
123324
  let p = start, again;
123323
123325
  do {
123324
123326
  again = false;
123325
- if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
123327
+ if (p !== p.next && (steiners.size === 0 || !steiners.has(p)) && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
123328
+ if (full || p === end)
123329
+ end = p.prev;
123330
+ filteredOut = true;
123326
123331
  removeNode(p);
123327
- p = end = p.prev;
123328
- if (p === p.next)
123329
- break;
123332
+ p = p.prev;
123330
123333
  again = true;
123331
- } else {
123334
+ } else if (full || p !== end) {
123332
123335
  p = p.next;
123336
+ again = !full;
123333
123337
  }
123334
123338
  } while (again || p !== end);
123335
123339
  return end;
123336
123340
  }
123337
- function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
123338
- if (!ear)
123339
- return;
123340
- if (!pass && invSize)
123341
+ function earcutLinked(ear, triangles, minX, minY, invSize) {
123342
+ if (invSize)
123341
123343
  indexCurve(ear, minX, minY, invSize);
123342
- let stop2 = ear;
123344
+ let stop2 = ear, cured = false;
123343
123345
  while (ear.prev !== ear.next) {
123344
123346
  const prev = ear.prev;
123345
123347
  const next = ear.next;
123346
- if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
123348
+ if (area(prev, ear, next) < 0 && (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear))) {
123347
123349
  triangles.push(prev.i, ear.i, next.i);
123348
123350
  removeNode(ear);
123349
- ear = next.next;
123350
- stop2 = next.next;
123351
+ ear = next;
123352
+ stop2 = next;
123351
123353
  continue;
123352
123354
  }
123353
123355
  ear = next;
123354
123356
  if (ear === stop2) {
123355
- if (!pass) {
123356
- earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
123357
- } else if (pass === 1) {
123358
- ear = cureLocalIntersections(filterPoints(ear), triangles);
123359
- earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
123360
- } else if (pass === 2) {
123361
- splitEarcut(ear, triangles, dim, minX, minY, invSize);
123357
+ filteredOut = false;
123358
+ ear = filterPoints(ear);
123359
+ if (filteredOut) {
123360
+ stop2 = ear;
123361
+ continue;
123362
123362
  }
123363
+ if (!cured) {
123364
+ ear = cureLocalIntersections(ear, triangles);
123365
+ stop2 = ear;
123366
+ cured = true;
123367
+ continue;
123368
+ }
123369
+ splitEarcut(ear, triangles, minX, minY, invSize);
123363
123370
  break;
123364
123371
  }
123365
123372
  }
123366
123373
  }
123367
123374
  function isEar(ear) {
123368
- const a = ear.prev, b = ear, c = ear.next;
123369
- if (area(a, b, c) >= 0)
123370
- return false;
123371
- const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
123372
- const x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy);
123375
+ const a = ear.prev, b = ear, c = ear.next, ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y, x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy);
123373
123376
  let p = c.next;
123374
123377
  while (p !== a) {
123375
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
123378
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && !(ax === p.x && ay === p.y) && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
123376
123379
  return false;
123377
123380
  p = p.next;
123378
123381
  }
123379
123382
  return true;
123380
123383
  }
123381
123384
  function isEarHashed(ear, minX, minY, invSize) {
123382
- const a = ear.prev, b = ear, c = ear.next;
123383
- if (area(a, b, c) >= 0)
123384
- return false;
123385
- const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
123386
- const x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy);
123387
- const minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
123388
- let { prevZ: p, nextZ: n } = ear;
123389
- while (p && p.z >= minZ && n && n.z <= maxZ) {
123390
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
123391
- return false;
123392
- p = p.prevZ;
123393
- if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0)
123394
- return false;
123395
- n = n.nextZ;
123396
- }
123385
+ const a = ear.prev, b = ear, c = ear.next, ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y, x0 = Math.min(ax, bx, cx), y0 = Math.min(ay, by, cy), x1 = Math.max(ax, bx, cx), y1 = Math.max(ay, by, cy), minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
123386
+ let p = ear.prevZ;
123397
123387
  while (p && p.z >= minZ) {
123398
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
123388
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== c && !(ax === p.x && ay === p.y) && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
123399
123389
  return false;
123400
123390
  p = p.prevZ;
123401
123391
  }
123392
+ let n = ear.nextZ;
123402
123393
  while (n && n.z <= maxZ) {
123403
- if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0)
123394
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== c && !(ax === n.x && ay === n.y) && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0)
123404
123395
  return false;
123405
123396
  n = n.nextZ;
123406
123397
  }
@@ -123408,19 +123399,21 @@ function isEarHashed(ear, minX, minY, invSize) {
123408
123399
  }
123409
123400
  function cureLocalIntersections(start, triangles) {
123410
123401
  let p = start;
123402
+ let cured = false;
123411
123403
  do {
123412
123404
  const a = p.prev, b = p.next.next;
123413
- if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
123405
+ if (intersects(a, p, p.next, b, false) && locallyInside(a, b) && locallyInside(b, a)) {
123414
123406
  triangles.push(a.i, p.i, b.i);
123415
123407
  removeNode(p);
123416
123408
  removeNode(p.next);
123417
123409
  p = start = b;
123410
+ cured = true;
123418
123411
  }
123419
123412
  p = p.next;
123420
123413
  } while (p !== start);
123421
- return filterPoints(p);
123414
+ return cured ? filterPoints(p) : p;
123422
123415
  }
123423
- function splitEarcut(start, triangles, dim, minX, minY, invSize) {
123416
+ function splitEarcut(start, triangles, minX, minY, invSize) {
123424
123417
  let a = start;
123425
123418
  do {
123426
123419
  let b = a.next.next;
@@ -123429,8 +123422,8 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
123429
123422
  let c = splitPolygon(a, b);
123430
123423
  a = filterPoints(a, a.next);
123431
123424
  c = filterPoints(c, c.next);
123432
- earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
123433
- earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
123425
+ earcutLinked(a, triangles, minX, minY, invSize);
123426
+ earcutLinked(c, triangles, minX, minY, invSize);
123434
123427
  return;
123435
123428
  }
123436
123429
  b = b.next;
@@ -123438,6 +123431,7 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
123438
123431
  a = a.next;
123439
123432
  } while (a !== start);
123440
123433
  }
123434
+ var indexActive = false;
123441
123435
  function eliminateHoles(data, holeIndices, outerNode, dim) {
123442
123436
  const queue = [];
123443
123437
  for (let i = 0, len = holeIndices.length;i < len; i++) {
@@ -123445,26 +123439,21 @@ function eliminateHoles(data, holeIndices, outerNode, dim) {
123445
123439
  const end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
123446
123440
  const list = linkedList(data, start, end, dim, false);
123447
123441
  if (list === list.next)
123448
- list.steiner = true;
123442
+ steiners.add(list);
123449
123443
  queue.push(getLeftmost(list));
123450
123444
  }
123451
123445
  queue.sort(compareXYSlope);
123446
+ buildBlockIndex(data.length / dim, holeIndices.length);
123447
+ indexSegment(outerNode, outerNode);
123448
+ indexActive = true;
123452
123449
  for (let i = 0;i < queue.length; i++) {
123453
123450
  outerNode = eliminateHole(queue[i], outerNode);
123454
123451
  }
123455
- return outerNode;
123452
+ indexActive = false;
123453
+ return filterPoints(outerNode);
123456
123454
  }
123457
123455
  function compareXYSlope(a, b) {
123458
- let result = a.x - b.x;
123459
- if (result === 0) {
123460
- result = a.y - b.y;
123461
- if (result === 0) {
123462
- const aSlope = (a.next.y - a.y) / (a.next.x - a.x);
123463
- const bSlope = (b.next.y - b.y) / (b.next.x - b.x);
123464
- result = aSlope - bSlope;
123465
- }
123466
- }
123467
- return result;
123456
+ return a.x - b.x || a.y - b.y || (a.next.y - a.y) / (a.next.x - a.x) - (b.next.y - b.y) / (b.next.x - b.x);
123468
123457
  }
123469
123458
  function eliminateHole(hole, outerNode) {
123470
123459
  const bridge = findHoleBridge(hole, outerNode);
@@ -123472,9 +123461,83 @@ function eliminateHole(hole, outerNode) {
123472
123461
  return outerNode;
123473
123462
  }
123474
123463
  const bridgeReverse = splitPolygon(bridge, hole);
123464
+ const bridge2 = bridgeReverse.next;
123465
+ indexSegment(bridge, bridge2.next);
123475
123466
  filterPoints(bridgeReverse, bridgeReverse.next);
123476
123467
  return filterPoints(bridge, bridge.next);
123477
123468
  }
123469
+ var K = 16;
123470
+ var blockBBox = new Float64Array(0);
123471
+ var numBlocks = 0;
123472
+ var blockHead = [];
123473
+ var blockStop = [];
123474
+ function buildBlockIndex(maxNodes, numHoles) {
123475
+ const maxBlocks = Math.ceil((maxNodes + 2 * numHoles) / K) + numHoles + 2;
123476
+ if (blockBBox.length < maxBlocks * 4)
123477
+ blockBBox = new Float64Array(maxBlocks * 4);
123478
+ numBlocks = 0;
123479
+ }
123480
+ function indexSegment(head, stop2) {
123481
+ let p = head;
123482
+ do {
123483
+ const b = numBlocks++;
123484
+ blockHead[b] = p;
123485
+ let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
123486
+ let k = 0;
123487
+ do {
123488
+ const c = p.next;
123489
+ p.z = b;
123490
+ if (p.x < minX)
123491
+ minX = p.x;
123492
+ if (p.x > maxX)
123493
+ maxX = p.x;
123494
+ if (p.y < minY)
123495
+ minY = p.y;
123496
+ if (p.y > maxY)
123497
+ maxY = p.y;
123498
+ if (c.x < minX)
123499
+ minX = c.x;
123500
+ if (c.x > maxX)
123501
+ maxX = c.x;
123502
+ if (c.y < minY)
123503
+ minY = c.y;
123504
+ if (c.y > maxY)
123505
+ maxY = c.y;
123506
+ p = c;
123507
+ } while (++k < K && p !== stop2);
123508
+ blockStop[b] = p;
123509
+ const g = b * 4;
123510
+ blockBBox[g] = minX;
123511
+ blockBBox[g + 1] = minY;
123512
+ blockBBox[g + 2] = maxX;
123513
+ blockBBox[g + 3] = maxY;
123514
+ } while (p !== stop2);
123515
+ }
123516
+ function growBlock(head, tail) {
123517
+ const g = head.z * 4;
123518
+ if (tail.x < blockBBox[g])
123519
+ blockBBox[g] = tail.x;
123520
+ if (tail.y < blockBBox[g + 1])
123521
+ blockBBox[g + 1] = tail.y;
123522
+ if (tail.x > blockBBox[g + 2])
123523
+ blockBBox[g + 2] = tail.x;
123524
+ if (tail.y > blockBBox[g + 3])
123525
+ blockBBox[g + 3] = tail.y;
123526
+ }
123527
+ function liveBlockStop(b) {
123528
+ let stop2 = blockStop[b];
123529
+ while (stop2.prev.next !== stop2)
123530
+ stop2 = stop2.next;
123531
+ blockStop[b] = stop2;
123532
+ return stop2;
123533
+ }
123534
+ function liveBlockHead(b) {
123535
+ let head = blockHead[b];
123536
+ while (head.prev.next !== head)
123537
+ head = head.next;
123538
+ blockHead[b] = head;
123539
+ return head;
123540
+ }
123478
123541
  function findHoleBridge(hole, outerNode) {
123479
123542
  let p = outerNode;
123480
123543
  const hx = hole.x;
@@ -123483,98 +123546,121 @@ function findHoleBridge(hole, outerNode) {
123483
123546
  let m;
123484
123547
  if (equals(hole, p))
123485
123548
  return p;
123486
- do {
123487
- if (equals(hole, p.next))
123488
- return p.next;
123489
- else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
123490
- const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
123491
- if (x <= hx && x > qx) {
123492
- qx = x;
123493
- m = p.x < p.next.x ? p : p.next;
123494
- if (x === hx)
123495
- return m;
123549
+ for (let b = 0, g = 0;b < numBlocks; b++, g += 4) {
123550
+ if (hy < blockBBox[g + 1] || hy > blockBBox[g + 3] || blockBBox[g] > hx || blockBBox[g + 2] <= qx)
123551
+ continue;
123552
+ const stop2 = liveBlockStop(b);
123553
+ p = liveBlockHead(b);
123554
+ do {
123555
+ if (p.prev.next === p) {
123556
+ if (equals(hole, p.next))
123557
+ return p.next;
123558
+ else if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
123559
+ const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
123560
+ if (x <= hx && x > qx) {
123561
+ qx = x;
123562
+ m = p.x < p.next.x ? p : p.next;
123563
+ if (x === hx)
123564
+ return m;
123565
+ }
123566
+ }
123496
123567
  }
123497
- }
123498
- p = p.next;
123499
- } while (p !== outerNode);
123568
+ p = p.next;
123569
+ } while (p !== stop2);
123570
+ }
123500
123571
  if (!m)
123501
123572
  return null;
123502
- const stop2 = m;
123503
123573
  const mx = m.x;
123504
123574
  const my = m.y;
123575
+ const tminY = Math.min(hy, my);
123576
+ const tmaxY = Math.max(hy, my);
123505
123577
  let tanMin = Infinity;
123506
- p = m;
123507
- do {
123508
- if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
123509
- const tan = Math.abs(hy - p.y) / (hx - p.x);
123510
- if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {
123511
- m = p;
123512
- tanMin = tan;
123578
+ for (let b = 0, g = 0;b < numBlocks; b++, g += 4) {
123579
+ if (blockBBox[g + 2] < mx || blockBBox[g] > hx || blockBBox[g + 3] < tminY || blockBBox[g + 1] > tmaxY)
123580
+ continue;
123581
+ const stop2 = liveBlockStop(b);
123582
+ p = liveBlockHead(b);
123583
+ do {
123584
+ if (p.prev.next === p && hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
123585
+ const tan = Math.abs(hy - p.y) / (hx - p.x);
123586
+ if ((locallyInside(p, hole) || p.y === hy && p.next.y === hy && p.next.x > hx) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {
123587
+ m = p;
123588
+ tanMin = tan;
123589
+ }
123513
123590
  }
123514
- }
123515
- p = p.next;
123516
- } while (p !== stop2);
123591
+ p = p.next;
123592
+ } while (p !== stop2);
123593
+ }
123517
123594
  return m;
123518
123595
  }
123519
123596
  function sectorContainsSector(m, p) {
123520
123597
  return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
123521
123598
  }
123599
+ var sortArr = [];
123600
+ var sortBuf = [];
123601
+ var zArr = new Uint32Array(0);
123602
+ var zBuf = new Uint32Array(0);
123603
+ var counts = new Uint32Array(256);
123522
123604
  function indexCurve(start, minX, minY, invSize) {
123523
123605
  let p = start;
123606
+ let n = 0;
123524
123607
  do {
123525
- if (p.z === 0)
123526
- p.z = zOrder(p.x, p.y, minX, minY, invSize);
123527
- p.prevZ = p.prev;
123528
- p.nextZ = p.next;
123608
+ p.z = zOrder(p.x, p.y, minX, minY, invSize);
123609
+ sortArr[n++] = p;
123529
123610
  p = p.next;
123530
123611
  } while (p !== start);
123531
- p.prevZ.nextZ = null;
123532
- p.prevZ = null;
123533
- sortLinked(p);
123534
- }
123535
- function sortLinked(list) {
123536
- let numMerges;
123537
- let inSize = 1;
123538
- do {
123539
- let p = list;
123540
- let e;
123541
- list = null;
123542
- let tail = null;
123543
- numMerges = 0;
123544
- while (p) {
123545
- numMerges++;
123546
- let q = p;
123547
- let pSize = 0;
123548
- for (let i = 0;i < inSize; i++) {
123549
- pSize++;
123550
- q = q.nextZ;
123551
- if (!q)
123552
- break;
123553
- }
123554
- let qSize = inSize;
123555
- while (pSize > 0 || qSize > 0 && q) {
123556
- if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
123557
- e = p;
123558
- p = p.nextZ;
123559
- pSize--;
123560
- } else {
123561
- e = q;
123562
- q = q.nextZ;
123563
- qSize--;
123564
- }
123565
- if (tail)
123566
- tail.nextZ = e;
123567
- else
123568
- list = e;
123569
- e.prevZ = tail;
123570
- tail = e;
123612
+ sortNodes(n);
123613
+ let prev = null;
123614
+ for (let i = 0;i < n; i++) {
123615
+ const node = sortArr[i];
123616
+ node.prevZ = prev;
123617
+ if (prev)
123618
+ prev.nextZ = node;
123619
+ prev = node;
123620
+ }
123621
+ prev.nextZ = null;
123622
+ }
123623
+ function sortNodes(n) {
123624
+ if (n <= 32) {
123625
+ for (let i = 1;i < n; i++) {
123626
+ const node = sortArr[i], z2 = node.z;
123627
+ let j = i - 1;
123628
+ while (j >= 0 && sortArr[j].z > z2) {
123629
+ sortArr[j + 1] = sortArr[j];
123630
+ j--;
123571
123631
  }
123572
- p = q;
123632
+ sortArr[j + 1] = node;
123573
123633
  }
123574
- tail.nextZ = null;
123575
- inSize *= 2;
123576
- } while (numMerges > 1);
123577
- return list;
123634
+ return;
123635
+ }
123636
+ if (zArr.length < n) {
123637
+ zArr = new Uint32Array(n);
123638
+ zBuf = new Uint32Array(n);
123639
+ sortBuf = new Array(n);
123640
+ }
123641
+ for (let i = 0;i < n; i++)
123642
+ zArr[i] = sortArr[i].z;
123643
+ radixPass(n, sortArr, zArr, sortBuf, zBuf, 0);
123644
+ radixPass(n, sortBuf, zBuf, sortArr, zArr, 8);
123645
+ radixPass(n, sortArr, zArr, sortBuf, zBuf, 16);
123646
+ radixPass(n, sortBuf, zBuf, sortArr, zArr, 24);
123647
+ }
123648
+ function radixPass(n, src, srcZ, dst, dstZ, shift) {
123649
+ counts.fill(0);
123650
+ for (let i = 0;i < n; i++)
123651
+ counts[srcZ[i] >>> shift & 255]++;
123652
+ let sum = 0;
123653
+ for (let b = 0;b < 256; b++) {
123654
+ const c = counts[b];
123655
+ counts[b] = sum;
123656
+ sum += c;
123657
+ }
123658
+ for (let i = 0;i < n; i++) {
123659
+ const z2 = srcZ[i];
123660
+ const pos = counts[z2 >>> shift & 255]++;
123661
+ dst[pos] = src[i];
123662
+ dstZ[pos] = z2;
123663
+ }
123578
123664
  }
123579
123665
  function zOrder(x, y, minX, minY, invSize) {
123580
123666
  x = (x - minX) * invSize | 0;
@@ -123601,11 +123687,9 @@ function getLeftmost(start) {
123601
123687
  function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
123602
123688
  return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && (ax - px) * (by - py) >= (bx - px) * (ay - py) && (bx - px) * (cy - py) >= (cx - px) * (by - py);
123603
123689
  }
123604
- function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
123605
- return !(ax === px && ay === py) && pointInTriangle(ax, ay, bx, by, cx, cy, px, py);
123606
- }
123607
123690
  function isValidDiagonal(a, b) {
123608
- return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
123691
+ const zeroLength = equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0;
123692
+ return a.next.i !== b.i && (zeroLength || locallyInside(a, b) && locallyInside(b, a) && (area(a.prev, a, b.prev) !== 0 || area(a, b.prev, b) !== 0)) && !intersectsPolygon(a, b) && (zeroLength || middleInside(a, b));
123609
123693
  }
123610
123694
  function area(p, q, r) {
123611
123695
  return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
@@ -123613,13 +123697,15 @@ function area(p, q, r) {
123613
123697
  function equals(p1, p2) {
123614
123698
  return p1.x === p2.x && p1.y === p2.y;
123615
123699
  }
123616
- function intersects(p1, q1, p2, q2) {
123617
- const o1 = sign(area(p1, q1, p2));
123618
- const o2 = sign(area(p1, q1, q2));
123619
- const o3 = sign(area(p2, q2, p1));
123620
- const o4 = sign(area(p2, q2, q1));
123621
- if (o1 !== o2 && o3 !== o4)
123700
+ function intersects(p1, q1, p2, q2, includeBoundary = true) {
123701
+ const o1 = area(p1, q1, p2);
123702
+ const o2 = area(p1, q1, q2);
123703
+ const o3 = area(p2, q2, p1);
123704
+ const o4 = area(p2, q2, q1);
123705
+ if ((o1 > 0 && o2 < 0 || o1 < 0 && o2 > 0) && (o3 > 0 && o4 < 0 || o3 < 0 && o4 > 0))
123622
123706
  return true;
123707
+ if (!includeBoundary)
123708
+ return false;
123623
123709
  if (o1 === 0 && onSegment(p1, p2, q1))
123624
123710
  return true;
123625
123711
  if (o2 === 0 && onSegment(p1, q2, q1))
@@ -123633,15 +123719,21 @@ function intersects(p1, q1, p2, q2) {
123633
123719
  function onSegment(p, q, r) {
123634
123720
  return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
123635
123721
  }
123636
- function sign(num) {
123637
- return num > 0 ? 1 : num < 0 ? -1 : 0;
123638
- }
123639
123722
  function intersectsPolygon(a, b) {
123723
+ const minX = Math.min(a.x, b.x);
123724
+ const maxX = Math.max(a.x, b.x);
123725
+ const minY = Math.min(a.y, b.y);
123726
+ const maxY = Math.max(a.y, b.y);
123640
123727
  let p = a;
123641
123728
  do {
123642
- if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b))
123729
+ const n = p.next;
123730
+ if (p.x > maxX && n.x > maxX || p.x < minX && n.x < minX || p.y > maxY && n.y > maxY || p.y < minY && n.y < minY) {
123731
+ p = n;
123732
+ continue;
123733
+ }
123734
+ if (p.i !== a.i && n.i !== a.i && p.i !== b.i && n.i !== b.i && intersects(p, n, a, b))
123643
123735
  return true;
123644
- p = p.next;
123736
+ p = n;
123645
123737
  } while (p !== a);
123646
123738
  return false;
123647
123739
  }
@@ -123654,9 +123746,10 @@ function middleInside(a, b) {
123654
123746
  const px = (a.x + b.x) / 2;
123655
123747
  const py = (a.y + b.y) / 2;
123656
123748
  do {
123657
- if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)
123749
+ const n = p.next;
123750
+ if (p.y > py !== n.y > py && px < (n.x - p.x) * (py - p.y) / (n.y - p.y) + p.x)
123658
123751
  inside = !inside;
123659
- p = p.next;
123752
+ p = n;
123660
123753
  } while (p !== a);
123661
123754
  return inside;
123662
123755
  }
@@ -123692,6 +123785,8 @@ function removeNode(p) {
123692
123785
  p.prevZ.nextZ = p.nextZ;
123693
123786
  if (p.nextZ)
123694
123787
  p.nextZ.prevZ = p.prevZ;
123788
+ if (indexActive)
123789
+ growBlock(p.prev, p.next);
123695
123790
  }
123696
123791
  function createNode(i, x, y) {
123697
123792
  return {
@@ -123702,8 +123797,7 @@ function createNode(i, x, y) {
123702
123797
  next: null,
123703
123798
  z: 0,
123704
123799
  prevZ: null,
123705
- nextZ: null,
123706
- steiner: false
123800
+ nextZ: null
123707
123801
  };
123708
123802
  }
123709
123803
  function signedArea(data, start, end, dim) {
@@ -130456,12 +130550,12 @@ var filterDiagnosticsByDrcCategory = ({
130456
130550
  ignoredByCategory
130457
130551
  };
130458
130552
  };
130459
- var formatIgnoredDrcCounts = (counts) => [
130460
- ["netlist", counts.netlist],
130461
- ["pin_specification", counts.pin_specification],
130462
- ["placement", counts.placement],
130463
- ["routing", counts.routing],
130464
- ["unknown", counts.unknown]
130553
+ var formatIgnoredDrcCounts = (counts2) => [
130554
+ ["netlist", counts2.netlist],
130555
+ ["pin_specification", counts2.pin_specification],
130556
+ ["placement", counts2.placement],
130557
+ ["routing", counts2.routing],
130558
+ ["unknown", counts2.unknown]
130465
130559
  ].filter(([, count]) => count > 0).map(([category, count]) => `${category}: ${count}`).join(", ");
130466
130560
 
130467
130561
  // cli/build/build-file.ts
@@ -137680,11 +137774,11 @@ var buildClusters = (components, issues) => {
137680
137774
  return clusters.sort((a, b) => b.severity - a.severity);
137681
137775
  };
137682
137776
  var buildCountsByType = (issues) => {
137683
- const counts = {};
137777
+ const counts2 = {};
137684
137778
  for (const issue of issues) {
137685
- counts[issue.type] = (counts[issue.type] ?? 0) + 1;
137779
+ counts2[issue.type] = (counts2[issue.type] ?? 0) + 1;
137686
137780
  }
137687
- return counts;
137781
+ return counts2;
137688
137782
  };
137689
137783
  var buildComponentStatuses = (components, boardBounds, issues) => components.map((component) => {
137690
137784
  const componentIssues = issues.filter((issue) => issue.componentA === component.name || issue.componentB === component.name);
@@ -162854,7 +162948,7 @@ function Z2(t50, e32, n3, o3) {
162854
162948
  }
162855
162949
  var q3 = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "639", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" };
162856
162950
  var J3 = /^#[a-fA-F0-9]{6}$/;
162857
- var K2 = /^#[a-fA-F0-9]{8}$/;
162951
+ var K3 = /^#[a-fA-F0-9]{8}$/;
162858
162952
  var Q3 = /^#[a-fA-F0-9]{3}$/;
162859
162953
  var tt2 = /^#[a-fA-F0-9]{4}$/;
162860
162954
  var et2 = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
@@ -162872,7 +162966,7 @@ function st2(t50) {
162872
162966
  }(t50);
162873
162967
  if (e32.match(J3))
162874
162968
  return { red: parseInt("" + e32[1] + e32[2], 16), green: parseInt("" + e32[3] + e32[4], 16), blue: parseInt("" + e32[5] + e32[6], 16) };
162875
- if (e32.match(K2)) {
162969
+ if (e32.match(K3)) {
162876
162970
  var n3 = parseFloat((parseInt("" + e32[7] + e32[8], 16) / 255).toFixed(2));
162877
162971
  return { red: parseInt("" + e32[1] + e32[2], 16), green: parseInt("" + e32[3] + e32[4], 16), blue: parseInt("" + e32[5] + e32[6], 16), alpha: n3 };
162878
162972
  }
@@ -233487,24 +233581,24 @@ function parse2(formula) {
233487
233581
  }
233488
233582
  let idx = 0;
233489
233583
  let a3 = 0;
233490
- let sign2 = readSign();
233584
+ let sign = readSign();
233491
233585
  let number = readNumber();
233492
233586
  if (idx < formula.length && formula.charAt(idx) === "n") {
233493
233587
  idx++;
233494
- a3 = sign2 * (number !== null && number !== undefined ? number : 1);
233588
+ a3 = sign * (number !== null && number !== undefined ? number : 1);
233495
233589
  skipWhitespace();
233496
233590
  if (idx < formula.length) {
233497
- sign2 = readSign();
233591
+ sign = readSign();
233498
233592
  skipWhitespace();
233499
233593
  number = readNumber();
233500
233594
  } else {
233501
- sign2 = number = 0;
233595
+ sign = number = 0;
233502
233596
  }
233503
233597
  }
233504
233598
  if (number === null || idx < formula.length) {
233505
233599
  throw new Error(`n-th rule couldn't be parsed ('${formula}')`);
233506
233600
  }
233507
- return [a3, sign2 * number];
233601
+ return [a3, sign * number];
233508
233602
  function readSign() {
233509
233603
  if (formula.charAt(idx) === "-") {
233510
233604
  idx++;
@@ -238200,9 +238294,9 @@ var Edge = class {
238200
238294
  let largeArcFlag;
238201
238295
  let sweepFlag = arc2.counterClockwise ? "1" : "0";
238202
238296
  if (Flatten.Utils.EQ(arc2.sweep, 2 * Math.PI)) {
238203
- let sign2 = arc2.counterClockwise ? 1 : -1;
238204
- let halfArc1 = new Flatten.Arc(arc2.pc, arc2.r, arc2.startAngle, arc2.startAngle + sign2 * Math.PI, arc2.counterClockwise);
238205
- let halfArc2 = new Flatten.Arc(arc2.pc, arc2.r, arc2.startAngle + sign2 * Math.PI, arc2.endAngle, arc2.counterClockwise);
238297
+ let sign = arc2.counterClockwise ? 1 : -1;
238298
+ let halfArc1 = new Flatten.Arc(arc2.pc, arc2.r, arc2.startAngle, arc2.startAngle + sign * Math.PI, arc2.counterClockwise);
238299
+ let halfArc2 = new Flatten.Arc(arc2.pc, arc2.r, arc2.startAngle + sign * Math.PI, arc2.endAngle, arc2.counterClockwise);
238206
238300
  largeArcFlag = "0";
238207
238301
  return ` A${halfArc1.r},${halfArc1.r} 0 ${largeArcFlag},${sweepFlag} ${halfArc1.end.x},${halfArc1.end.y}
238208
238302
  A${halfArc2.r},${halfArc2.r} 0 ${largeArcFlag},${sweepFlag} ${halfArc2.end.x},${halfArc2.end.y}`;
@@ -247445,10 +247539,10 @@ var wlFeatureVec = (adjMatrix, K22, opts = {}) => {
247445
247539
  }
247446
247540
  let colors = (opts.nodeInitialColors ?? Array.from({ length: n3 }, () => "_")).slice();
247447
247541
  const getCounts = (cols) => {
247448
- const counts = {};
247542
+ const counts2 = {};
247449
247543
  for (const c3 of cols)
247450
- counts[c3] = (counts[c3] ?? 0) + 1;
247451
- return counts;
247544
+ counts2[c3] = (counts2[c3] ?? 0) + 1;
247545
+ return counts2;
247452
247546
  };
247453
247547
  const countsArr = [];
247454
247548
  countsArr.push(getCounts(colors));
@@ -248192,11 +248286,11 @@ var SchematicPartitionProcessor = class {
248192
248286
  this.unexploredPins = this.wipPartitions.flatMap((part) => part.pins.map((p3) => ({ ...p3, partitionId: part.partitionId })));
248193
248287
  this.boxSingletonKeys = this.initializeBoxSingletonKeys();
248194
248288
  this.pinConnectionCount = (() => {
248195
- const counts = {};
248289
+ const counts2 = {};
248196
248290
  for (const pin of this.initialGraph.pins) {
248197
- counts[`${pin.boxId}:${pin.pinId}`] = this.getNeighbors(pin).length;
248291
+ counts2[`${pin.boxId}:${pin.pinId}`] = this.getNeighbors(pin).length;
248198
248292
  }
248199
- return counts;
248293
+ return counts2;
248200
248294
  })();
248201
248295
  const netCounts = {};
248202
248296
  for (const p3 of this.initialGraph.pins) {
@@ -250362,19 +250456,19 @@ var getRestrictedCenterLines = (params2) => {
250362
250456
  let entry = chipFacingMap.get(chip.chipId);
250363
250457
  if (!entry) {
250364
250458
  entry = { center: chip.center };
250365
- const counts = { xPos: 0, xNeg: 0, yPos: 0, yNeg: 0 };
250459
+ const counts2 = { xPos: 0, xNeg: 0, yPos: 0, yNeg: 0 };
250366
250460
  for (const cp2 of chip.pins) {
250367
250461
  const cpFacing = cp2._facingDirection ?? getPinDirection2(cp2, chip);
250368
250462
  if (cpFacing === "x+")
250369
- counts.xPos++;
250463
+ counts2.xPos++;
250370
250464
  if (cpFacing === "x-")
250371
- counts.xNeg++;
250465
+ counts2.xNeg++;
250372
250466
  if (cpFacing === "y+")
250373
- counts.yPos++;
250467
+ counts2.yPos++;
250374
250468
  if (cpFacing === "y-")
250375
- counts.yNeg++;
250469
+ counts2.yNeg++;
250376
250470
  }
250377
- entry.counts = counts;
250471
+ entry.counts = counts2;
250378
250472
  chipFacingMap.set(chip.chipId, entry);
250379
250473
  }
250380
250474
  if (facing === "x+")
@@ -250389,8 +250483,8 @@ var getRestrictedCenterLines = (params2) => {
250389
250483
  for (const [chipId, faces] of chipFacingMap) {
250390
250484
  const axes = /* @__PURE__ */ new Set;
250391
250485
  const rcl = { axes };
250392
- const counts = faces.counts;
250393
- const anySideHasMultiplePins = !!(counts && (counts.xPos > 1 || counts.xNeg > 1 || counts.yPos > 1 || counts.yNeg > 1));
250486
+ const counts2 = faces.counts;
250487
+ const anySideHasMultiplePins = !!(counts2 && (counts2.xPos > 1 || counts2.xNeg > 1 || counts2.yPos > 1 || counts2.yNeg > 1));
250394
250488
  const skipCenterRestriction = !anySideHasMultiplePins && chipsOfFacingPins.has(chipId);
250395
250489
  if (!skipCenterRestriction) {
250396
250490
  if (faces.hasXPos && faces.hasXNeg) {
@@ -293697,7 +293791,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
293697
293791
  if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env2))) {
293698
293792
  return 3;
293699
293793
  }
293700
- if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env2)) || env2.CI_NAME === "codeship") {
293794
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env2)) || env2.CI_NAME === "codeship") {
293701
293795
  return 1;
293702
293796
  }
293703
293797
  return min;
@@ -312615,21 +312709,26 @@ var Config = Object.freeze({
312615
312709
  ...FuzzyOptions,
312616
312710
  ...AdvancedOptions
312617
312711
  });
312712
+ function isWordSeparator(code) {
312713
+ return code >= 9 && code <= 13 || code === 32 || code === 160;
312714
+ }
312618
312715
  function norm(weight = 1, mantissa = 3) {
312619
312716
  const cache = /* @__PURE__ */ new Map;
312620
312717
  const m4 = Math.pow(10, mantissa);
312621
312718
  return {
312622
312719
  get(value) {
312623
- let numTokens = 1;
312624
- let inSpace = false;
312720
+ let numTokens = 0;
312721
+ let inWord = false;
312625
312722
  for (let i4 = 0;i4 < value.length; i4++)
312626
- if (value.charCodeAt(i4) === 32) {
312627
- if (!inSpace) {
312723
+ if (!isWordSeparator(value.charCodeAt(i4))) {
312724
+ if (!inWord) {
312628
312725
  numTokens++;
312629
- inSpace = true;
312726
+ inWord = true;
312630
312727
  }
312631
312728
  } else
312632
- inSpace = false;
312729
+ inWord = false;
312730
+ if (numTokens === 0)
312731
+ numTokens = 1;
312633
312732
  if (cache.has(numTokens))
312634
312733
  return cache.get(numTokens);
312635
312734
  const n3 = Math.round(m4 / Math.pow(numTokens, 0.5 * weight)) / m4;
@@ -313020,6 +313119,11 @@ var BitapSearch = class {
313020
313119
  text = isCaseSensitive ? text : text.toLowerCase();
313021
313120
  text = ignoreDiacritics ? stripDiacritics(text) : text;
313022
313121
  if (this.pattern === text) {
313122
+ if (text.length < this.options.minMatchCharLength)
313123
+ return {
313124
+ isMatch: false,
313125
+ score: 1
313126
+ };
313023
313127
  const result2 = {
313024
313128
  isMatch: true,
313025
313129
  score: 0
@@ -313447,33 +313551,31 @@ function computeScore(results, { ignoreFieldNorm = Config.ignoreFieldNorm }) {
313447
313551
  });
313448
313552
  }
313449
313553
  var MaxHeap = class {
313450
- constructor(limit) {
313554
+ constructor(limit, comparator) {
313451
313555
  this.limit = limit;
313452
313556
  this.heap = [];
313557
+ this.comparator = comparator;
313453
313558
  }
313454
313559
  get size() {
313455
313560
  return this.heap.length;
313456
313561
  }
313457
- shouldInsert(score) {
313458
- return this.size < this.limit || score < this.heap[0].score;
313459
- }
313460
313562
  insert(item) {
313461
313563
  if (this.size < this.limit) {
313462
313564
  this.heap.push(item);
313463
313565
  this._bubbleUp(this.size - 1);
313464
- } else if (item.score < this.heap[0].score) {
313566
+ } else if (this.comparator(item, this.heap[0]) < 0) {
313465
313567
  this.heap[0] = item;
313466
313568
  this._sinkDown(0);
313467
313569
  }
313468
313570
  }
313469
- extractSorted(sortFn) {
313470
- return this.heap.sort(sortFn);
313571
+ extractSorted() {
313572
+ return this.heap.sort(this.comparator);
313471
313573
  }
313472
313574
  _bubbleUp(i4) {
313473
313575
  const heap = this.heap;
313474
313576
  while (i4 > 0) {
313475
313577
  const parent = i4 - 1 >> 1;
313476
- if (heap[i4].score <= heap[parent].score)
313578
+ if (this.comparator(heap[i4], heap[parent]) <= 0)
313477
313579
  break;
313478
313580
  const tmp = heap[i4];
313479
313581
  heap[i4] = heap[parent];
@@ -313489,9 +313591,9 @@ var MaxHeap = class {
313489
313591
  i4 = largest;
313490
313592
  const left = 2 * i4 + 1;
313491
313593
  const right = 2 * i4 + 2;
313492
- if (left < len && heap[left].score > heap[largest].score)
313594
+ if (left < len && this.comparator(heap[left], heap[largest]) > 0)
313493
313595
  largest = left;
313494
- if (right < len && heap[right].score > heap[largest].score)
313596
+ if (right < len && this.comparator(heap[right], heap[largest]) > 0)
313495
313597
  largest = right;
313496
313598
  if (largest !== i4) {
313497
313599
  const tmp = heap[i4];
@@ -313848,6 +313950,9 @@ var Fuse2 = class {
313848
313950
  getIndex() {
313849
313951
  return this._myIndex;
313850
313952
  }
313953
+ _normalizedKeys() {
313954
+ return this._myIndex.keys.map((key) => this._keyStore.get(key.id) || key);
313955
+ }
313851
313956
  search(query, options) {
313852
313957
  const { limit = -1 } = options || {};
313853
313958
  const { includeMatches, includeScore, shouldSort, sortFn, ignoreFieldNorm } = this.options;
@@ -313860,10 +313965,12 @@ var Fuse2 = class {
313860
313965
  docs = docs.slice(0, limit);
313861
313966
  return docs;
313862
313967
  }
313863
- const useHeap = isNumber2(limit) && limit > 0 && isString2(query);
313968
+ const useHeap = shouldSort && isNumber2(limit) && limit > 0 && isString2(query);
313969
+ const comparator = sortFn;
313970
+ const stable = (a3, b3) => comparator(a3, b3) || a3.idx - b3.idx;
313864
313971
  let results;
313865
313972
  if (useHeap) {
313866
- const heap = new MaxHeap(limit);
313973
+ const heap = new MaxHeap(limit, stable);
313867
313974
  if (isString2(this._docs[0]))
313868
313975
  this._searchStringList(query, {
313869
313976
  heap,
@@ -313874,12 +313981,12 @@ var Fuse2 = class {
313874
313981
  heap,
313875
313982
  ignoreFieldNorm
313876
313983
  });
313877
- results = heap.extractSorted(sortFn);
313984
+ results = heap.extractSorted();
313878
313985
  } else {
313879
313986
  results = isString2(query) ? isString2(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
313880
313987
  computeScore(results, { ignoreFieldNorm });
313881
313988
  if (shouldSort)
313882
- results.sort(sortFn);
313989
+ results.sort(isString2(query) ? stable : comparator);
313883
313990
  if (isNumber2(limit) && limit > -1)
313884
313991
  results = results.slice(0, limit);
313885
313992
  }
@@ -313918,8 +314025,7 @@ var Fuse2 = class {
313918
314025
  };
313919
314026
  if (heap) {
313920
314027
  result.score = computeScoreSingle(result.matches, { ignoreFieldNorm });
313921
- if (heap.shouldInsert(result.score))
313922
- heap.insert(result);
314028
+ heap.insert(result);
313923
314029
  } else
313924
314030
  results.push(result);
313925
314031
  }
@@ -313929,13 +314035,14 @@ var Fuse2 = class {
313929
314035
  }
313930
314036
  _searchLogical(query) {
313931
314037
  const expression = parse3(query, this.options);
314038
+ const keys = this._normalizedKeys();
313932
314039
  const evaluate = (node, item, idx) => {
313933
314040
  if (!("children" in node)) {
313934
314041
  const { keyId, searcher } = node;
313935
314042
  let matches;
313936
314043
  if (keyId === null) {
313937
314044
  matches = [];
313938
- this._myIndex.keys.forEach((key, keyIndex) => {
314045
+ keys.forEach((key, keyIndex) => {
313939
314046
  matches.push(...this._findMatches({
313940
314047
  key,
313941
314048
  value: item[keyIndex],
@@ -313994,7 +314101,8 @@ var Fuse2 = class {
313994
314101
  _searchObjectList(query, { heap, ignoreFieldNorm } = {}) {
313995
314102
  const searcher = this._getSearcher(query);
313996
314103
  const requireAllTokens = this.options.useTokenSearch && this.options.tokenMatch === "all";
313997
- const { keys, records } = this._myIndex;
314104
+ const { records } = this._myIndex;
314105
+ const keys = this._normalizedKeys();
313998
314106
  const results = heap ? null : [];
313999
314107
  records.forEach(({ $: item, i: idx }) => {
314000
314108
  if (!isDefined(item))
@@ -314025,8 +314133,7 @@ var Fuse2 = class {
314025
314133
  };
314026
314134
  if (heap) {
314027
314135
  result.score = computeScoreSingle(result.matches, { ignoreFieldNorm });
314028
- if (heap.shouldInsert(result.score))
314029
- heap.insert(result);
314136
+ heap.insert(result);
314030
314137
  } else
314031
314138
  results.push(result);
314032
314139
  }
@@ -314102,7 +314209,7 @@ var Fuse2 = class {
314102
314209
  return coverage.size === termCount;
314103
314210
  }
314104
314211
  };
314105
- Fuse2.version = "7.4.2";
314212
+ Fuse2.version = "7.5.0";
314106
314213
  Fuse2.createIndex = createIndex;
314107
314214
  Fuse2.parseIndex = parseIndex;
314108
314215
  Fuse2.config = Config;