pixalynx/esp32-usb-ducky

This code defines digital and analog ICs, connectors, and components with specified pinouts, footprints, and 3D models for PCB rendering, including voltage regulators, USB connectors, microSD sockets, and push-button switches.

Version
1.2.6
License
unset
Stars
0

dist/index.cjs

'use strict';

var jsxRuntime = require('react/jsx-runtime');
var react = require('react');

/**
 * Espressif ESP32-S3-WROOM-1-N16R8 (JLCPCB C2913202, 16MB flash / 8MB PSRAM).
 * Chosen over a plain ESP32 because only the S3/S2 series has a native USB
 * device controller — required to enumerate as a USB HID keyboard for
 * "rubber ducky" style keystroke injection. Per Espressif's datasheet,
 * GPIO19/GPIO20 are the fixed native-USB D-/D+ pins and GPIO0 is the BOOT
 * strapping pin; these were cross-checked against the datasheet and match
 * the pin numbers below (imported from JLCPCB/EasyEDA data).
 *
 * microSD: native 4-bit SDMMC (slot routed through the S3 GPIO matrix, so
 * any free GPIO works; GPIO19/20 stay reserved for USB and no strapping or
 * flash/PSRAM pins are used):
 *
 *   SDMMC 4-bit mapping (v1.2.6+; chosen so the module's pin order along its
 *   bottom edge — IO21, IO14, IO13, IO12, IO11, IO10 — matches the microSD
 *   contact order DAT2, DAT3, CMD, CLK, DAT0, DAT1, which lets all six lines
 *   route on the top layer without crossing or changing layers):
 *     D2   = GPIO21   (SD_D2)
 *     D3   = GPIO14   (SD_D3)
 *     CMD  = GPIO13   (SD_CMD)
 *     CLK  = GPIO12   (SD_CLK, 22R series R13)
 *     D0   = GPIO11   (SD_D0)
 *     D1   = GPIO10   (SD_D1)
 *   Boards built before v1.2.6 used CMD=11, D0=13, D1=14, D3=10.
 *
 * Firmware intent (ESP-IDF, documentation only — no firmware lives here):
 *   4-bit width, 20 MHz for bring-up, then SDMMC_FREQ_HIGHSPEED (40 MHz):
 *     sdmmc_host_t host = SDMMC_HOST_DEFAULT();
 *     host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
 *     sdmmc_slot_config_t slot = SDMMC_SLOT_CONFIG_DEFAULT();
 *     slot.width = 4;
 *     slot.clk = GPIO_NUM_12; slot.cmd = GPIO_NUM_13;
 *     slot.d0 = GPIO_NUM_11;  slot.d1 = GPIO_NUM_10;
 *     slot.d2 = GPIO_NUM_21;  slot.d3 = GPIO_NUM_14;
 */
const pinLabels$6 = {
    pin1: ["GND1"],
    pin2: ["3V3"],
    pin3: ["EN"],
    pin4: ["IO4", "LED_GPIO"],
    pin5: ["IO5"],
    pin6: ["IO6"],
    pin7: ["IO7"],
    pin8: ["IO15"],
    pin9: ["IO16"],
    pin10: ["IO17"],
    pin11: ["IO18"],
    pin12: ["IO8"],
    pin13: ["IO19", "USB_D_NEG"],
    pin14: ["IO20", "USB_D_POS"],
    pin15: ["IO3"],
    pin16: ["IO46"],
    pin17: ["IO9"],
    pin18: ["IO10", "SD_D1"],
    pin19: ["IO11", "SD_D0"],
    pin20: ["IO12", "SD_CLK"],
    pin21: ["IO13", "SD_CMD"],
    pin22: ["IO14", "SD_D3"],
    pin23: ["IO21", "SD_D2"],
    pin24: ["IO47"],
    pin25: ["IO48"],
    pin26: ["IO45"],
    pin27: ["IO0", "BOOT"],
    pin28: ["IO35"],
    pin29: ["IO36"],
    pin30: ["IO37"],
    pin31: ["IO38"],
    pin32: ["IO39"],
    pin33: ["IO40"],
    pin34: ["IO41"],
    pin35: ["IO42"],
    pin36: ["RXD0"],
    pin37: ["TXD0"],
    pin38: ["IO2"],
    pin39: ["IO1"],
    pin40: ["GND2"],
    pin41: ["GND3"]
};
const pinAttributes$4 = {
    pin1: { requiresGround: true },
    pin40: { requiresGround: true },
    pin41: { requiresGround: true },
    pin2: { requiresPower: true },
    pin3: { mustBeConnected: true },
    pin27: { mustBeConnected: true }
};
const ESP32_S3_WROOM_1_N16R8 = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$6, pinAttributes: pinAttributes$4, 
        // GND1 (pin1), GND2 (pin40) and the centre thermal pad GND3 (pin41) are
        // bonded together inside the module. Declaring that lets the centre pad
        // join the GND net through the ground pour + the stitching vias placed
        // around it in index.circuit.tsx
        // instead of a routed trace (the autorouter draws a straight diagonal
        // from the pad centre when asked to route it, crossing other traces).
        internallyConnectedPins: [["pin1", "pin40", "pin41"]], supplierPartNumbers: {
            "jlcpcb": [
                "C2913202"
            ]
        }, manufacturerPartNumber: "ESP32-S3-WROOM-1-N16R8", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-8.750046mm", pcbY: "9.0449527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "-8.750046mm", pcbY: "7.7749527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin3"], pcbX: "-8.750046mm", pcbY: "6.5049527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin4"], pcbX: "-8.750046mm", pcbY: "5.2349527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin5"], pcbX: "-8.750046mm", pcbY: "3.9649527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin6"], pcbX: "-8.750046mm", pcbY: "2.6949527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin7"], pcbX: "-8.750046mm", pcbY: "1.4249527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin8"], pcbX: "-8.750046mm", pcbY: "0.1549527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin9"], pcbX: "-8.750046mm", pcbY: "-1.1150473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin10"], pcbX: "-8.750046mm", pcbY: "-2.3850473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin11"], pcbX: "-8.750046mm", pcbY: "-3.6550473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin12"], pcbX: "-8.750046mm", pcbY: "-4.9250473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin13"], pcbX: "-8.750046mm", pcbY: "-6.1950473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin14"], pcbX: "-8.750046mm", pcbY: "-7.4650473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin15"], pcbX: "-6.985mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin16"], pcbX: "-5.715mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin17"], pcbX: "-4.445mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin18"], pcbX: "-3.175mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin19"], pcbX: "-1.905mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin20"], pcbX: "-0.635mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin21"], pcbX: "0.635mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin22"], pcbX: "1.905mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin23"], pcbX: "3.175mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin24"], pcbX: "4.445mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin25"], pcbX: "5.715mm", pcbY: "-8.7449533mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin26"], pcbX: "6.985mm", pcbY: "-8.7149813mm", width: "0.8999982mm", height: "1.499997mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin27"], pcbX: "8.750046mm", pcbY: "-7.4650473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin28"], pcbX: "8.750046mm", pcbY: "-6.1950473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin29"], pcbX: "8.750046mm", pcbY: "-4.9250473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin30"], pcbX: "8.750046mm", pcbY: "-3.6550473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin31"], pcbX: "8.750046mm", pcbY: "-2.3850473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin32"], pcbX: "8.750046mm", pcbY: "-1.1150473mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin33"], pcbX: "8.750046mm", pcbY: "0.1549527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin34"], pcbX: "8.750046mm", pcbY: "1.4249527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin35"], pcbX: "8.750046mm", pcbY: "2.6949527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin36"], pcbX: "8.750046mm", pcbY: "3.9649527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin37"], pcbX: "8.750046mm", pcbY: "5.2349527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin38"], pcbX: "8.750046mm", pcbY: "6.5049527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin39"], pcbX: "8.750046mm", pcbY: "7.7749527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin40"], pcbX: "8.750046mm", pcbY: "9.0449527mm", width: "1.499997mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-0.100076mm", pcbY: "-0.0751713mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-1.500124mm", pcbY: "-0.0751713mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-2.900172mm", pcbY: "-0.0751713mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-2.900172mm", pcbY: "2.7249247mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-1.500124mm", pcbY: "2.7249247mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-0.100076mm", pcbY: "2.7249247mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-0.100076mm", pcbY: "1.3248767mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-2.900172mm", pcbY: "1.3248767mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin41"], pcbX: "-1.500124mm", pcbY: "1.3248767mm", width: "0.8999982mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 7.297165999999947, "y": 10.505351100000212 }, { "x": 7.297165999999947, "y": 15.38994890000015 }, { "x": 5.061966000000098, "y": 15.38994890000015 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 5.265165999999795, "y": 10.505351100000212 }, { "x": 5.265165999999795, "y": 15.38994890000015 }, { "x": 2.4129999999998972, "y": 15.38994890000015 }, { "x": 2.4129999999998972, "y": 13.230948900000158 }, { "x": -0.1270000000000664, "y": 13.230948900000158 }, { "x": -0.1270000000000664, "y": 15.38994890000015 }, { "x": -2.66700000000003, "y": 15.38994890000015 }, { "x": -2.66700000000003, "y": 13.230948900000158 }, { "x": -4.953000000000088, "y": 13.230948900000158 }, { "x": -4.953000000000088, "y": 15.38994890000015 }, { "x": -7.239000000000033, "y": 15.38994890000015 }, { "x": -7.239000000000033, "y": 11.706948900000157 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -9.000007400000186, "y": 10.505351100000212 }, { "x": 9.016999999999939, "y": 10.505351100000212 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 9.016999999999939, "y": 9.726104500000133 }, { "x": 9.016999999999939, "y": 16.53294890000018 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 7.666151799999966, "y": -8.994051099999865 }, { "x": 9.016999999999939, "y": -8.994051099999865 }, { "x": 9.016999999999939, "y": -8.14619909999999 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -9.000007400000186, "y": -8.14619909999999 }, { "x": -9.000007400000186, "y": -8.994051099999865 }, { "x": -7.66615180000008, "y": -8.994051099999865 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -9.000007400000186, "y": 16.544963100000018 }, { "x": -9.000007400000186, "y": 9.726104500000133 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 9.000007400000072, "y": 16.544963100000018 }, { "x": -9.000007400000186, "y": 16.544963100000018 }] }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "-0mm", pcbY: "17.5633527mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": -7.239000000000033, "y": 15.516948900000102 }, { "x": -7.2555862000001525, "y": 15.5158567000002 }, { "x": -7.2718675999999505, "y": 15.51263090000009 }, { "x": -7.287590200000068, "y": 15.507271500000115 }, { "x": -7.302500000000009, "y": 15.499930900000095 }, { "x": -7.316317600000048, "y": 15.490710700000136 }, { "x": -7.328814400000056, "y": 15.479763300000059 }, { "x": -7.339761800000019, "y": 15.467266500000164 }, { "x": -7.348982000000092, "y": 15.453448900000126 }, { "x": -7.356322599999999, "y": 15.438539100000071 }, { "x": -7.361682000000087, "y": 15.422816500000181 }, { "x": -7.364907800000083, "y": 15.406535100000042 }, { "x": -7.366000000000099, "y": 15.38994890000015 }, { "x": -7.366000000000099, "y": 11.706948900000043 }, { "x": -7.364907800000083, "y": 11.69036270000015 }, { "x": -7.361682000000087, "y": 11.674081300000012 }, { "x": -7.356322599999999, "y": 11.658358700000122 }, { "x": -7.348982000000092, "y": 11.643448900000067 }, { "x": -7.339761800000019, "y": 11.629631300000142 }, { "x": -7.328814400000056, "y": 11.617134500000134 }, { "x": -7.316317600000048, "y": 11.606187100000056 }, { "x": -7.302500000000009, "y": 11.596966900000098 }, { "x": -7.287590200000068, "y": 11.589626300000077 }, { "x": -7.2718675999999505, "y": 11.584266900000102 }, { "x": -7.2555862000001525, "y": 11.581041099999993 }, { "x": -7.239000000000033, "y": 11.57994890000009 }, { "x": -7.222413799999913, "y": 11.581041099999993 }, { "x": -7.206132400000229, "y": 11.584266900000102 }, { "x": -7.190409799999998, "y": 11.589626300000077 }, { "x": -7.175500000000056, "y": 11.596966900000098 }, { "x": -7.161682400000018, "y": 11.606187100000056 }, { "x": -7.14918560000001, "y": 11.617134500000134 }, { "x": -7.13823820000016, "y": 11.629631300000142 }, { "x": -7.129017999999974, "y": 11.643448900000067 }, { "x": -7.121677400000067, "y": 11.658358700000122 }, { "x": -7.116317999999978, "y": 11.674081300000012 }, { "x": -7.113092199999983, "y": 11.69036270000015 }, { "x": -7.11200000000008, "y": 11.706948900000043 }, { "x": -7.11200000000008, "y": 15.262948900000083 }, { "x": -5.080000000000041, "y": 15.262948900000083 }, { "x": -5.080000000000041, "y": 13.230948900000044 }, { "x": -5.078907800000138, "y": 13.214362700000152 }, { "x": -5.075682000000143, "y": 13.198081300000013 }, { "x": -5.070322600000054, "y": 13.182358700000123 }, { "x": -5.062982000000034, "y": 13.167448900000068 }, { "x": -5.053761799999961, "y": 13.153631300000143 }, { "x": -5.0428143999999975, "y": 13.141134500000135 }, { "x": -5.030317600000103, "y": 13.130187100000057 }, { "x": -5.016500000000065, "y": 13.120966900000099 }, { "x": -5.00159020000001, "y": 13.113626300000078 }, { "x": -4.985867599999892, "y": 13.108266900000103 }, { "x": -4.969586200000208, "y": 13.105041099999994 }, { "x": -4.953000000000088, "y": 13.103948900000091 }, { "x": -2.66700000000003, "y": 13.103948900000091 }, { "x": -2.6504137999999102, "y": 13.105041099999994 }, { "x": -2.634132400000226, "y": 13.108266900000103 }, { "x": -2.618409799999995, "y": 13.113626300000078 }, { "x": -2.6035000000000537, "y": 13.120966900000099 }, { "x": -2.589682400000015, "y": 13.130187100000057 }, { "x": -2.577185600000007, "y": 13.141134500000135 }, { "x": -2.566238200000157, "y": 13.153631300000143 }, { "x": -2.557017999999971, "y": 13.167448900000068 }, { "x": -2.549677400000064, "y": 13.182358700000123 }, { "x": -2.5443179999999757, "y": 13.198081300000013 }, { "x": -2.54109219999998, "y": 13.214362700000152 }, { "x": -2.5400000000000773, "y": 13.230948900000044 }, { "x": -2.5400000000000773, "y": 15.262948900000083 }, { "x": -0.2540000000000191, "y": 15.262948900000083 }, { "x": -0.2540000000000191, "y": 13.230948900000044 }, { "x": -0.25290780000011637, "y": 13.214362700000152 }, { "x": -0.24968200000012075, "y": 13.198081300000013 }, { "x": -0.24432260000003225, "y": 13.182358700000123 }, { "x": -0.23698200000012548, "y": 13.167448900000068 }, { "x": -0.22776179999993929, "y": 13.153631300000143 }, { "x": -0.21681440000008934, "y": 13.141134500000135 }, { "x": -0.20431760000008126, "y": 13.130187100000057 }, { "x": -0.19050000000004275, "y": 13.120966900000099 }, { "x": -0.1755902000001015, "y": 13.113626300000078 }, { "x": -0.15986759999987044, "y": 13.108266900000103 }, { "x": -0.14358620000018618, "y": 13.105041099999994 }, { "x": -0.1270000000000664, "y": 13.103948900000091 }, { "x": 2.4129999999998972, "y": 13.103948900000091 }, { "x": 2.429586200000017, "y": 13.105041099999994 }, { "x": 2.445867599999815, "y": 13.108266900000103 }, { "x": 2.4615901999999323, "y": 13.113626300000078 }, { "x": 2.4764999999998736, "y": 13.120966900000099 }, { "x": 2.490317599999912, "y": 13.130187100000057 }, { "x": 2.50281439999992, "y": 13.141134500000135 }, { "x": 2.51376179999977, "y": 13.153631300000143 }, { "x": 2.52298200000007, "y": 13.167448900000068 }, { "x": 2.5303225999999768, "y": 13.182358700000123 }, { "x": 2.5356820000000653, "y": 13.198081300000013 }, { "x": 2.538907799999947, "y": 13.214362700000152 }, { "x": 2.53999999999985, "y": 13.230948900000044 }, { "x": 2.53999999999985, "y": 15.262948900000083 }, { "x": 5.06196599999987, "y": 15.262948900000083 }, { "x": 5.138166000000069, "y": 15.262948900000083 }, { "x": 5.138166000000069, "y": 10.505351100000098 }, { "x": 5.139258199999972, "y": 10.488764900000092 }, { "x": 5.142483999999854, "y": 10.472483500000067 }, { "x": 5.1478433999999424, "y": 10.456760900000177 }, { "x": 5.155183999999849, "y": 10.441851100000122 }, { "x": 5.164404200000149, "y": 10.428033500000083 }, { "x": 5.175351599999999, "y": 10.415536700000189 }, { "x": 5.187848400000007, "y": 10.404589300000112 }, { "x": 5.201666000000046, "y": 10.395369100000153 }, { "x": 5.216575799999987, "y": 10.388028500000132 }, { "x": 5.232298399999877, "y": 10.382669100000044 }, { "x": 5.248579799999902, "y": 10.379443300000162 }, { "x": 5.265166000000022, "y": 10.378351100000032 }, { "x": 5.281752199999914, "y": 10.379443300000162 }, { "x": 5.29803359999994, "y": 10.382669100000044 }, { "x": 5.313756200000057, "y": 10.388028500000132 }, { "x": 5.328665999999998, "y": 10.395369100000153 }, { "x": 5.3424835999998095, "y": 10.404589300000112 }, { "x": 5.354980400000045, "y": 10.415536700000189 }, { "x": 5.365927799999895, "y": 10.428033500000083 }, { "x": 5.37514799999974, "y": 10.441851100000122 }, { "x": 5.382488599999874, "y": 10.456760900000177 }, { "x": 5.387847999999963, "y": 10.472483500000067 }, { "x": 5.391073800000072, "y": 10.488764900000092 }, { "x": 5.392165999999975, "y": 10.505351100000098 }, { "x": 5.392165999999975, "y": 15.262948900000083 }, { "x": 7.170165999999995, "y": 15.262948900000083 }, { "x": 7.170165999999995, "y": 10.505351100000098 }, { "x": 7.171258199999897, "y": 10.488764900000092 }, { "x": 7.174484000000007, "y": 10.472483500000067 }, { "x": 7.179843400000095, "y": 10.456760900000177 }, { "x": 7.187184000000002, "y": 10.441851100000122 }, { "x": 7.1964042000000745, "y": 10.428033500000083 }, { "x": 7.2073515999999245, "y": 10.415536700000189 }, { "x": 7.2198483999999326, "y": 10.404589300000112 }, { "x": 7.233665999999971, "y": 10.395369100000153 }, { "x": 7.248575799999912, "y": 10.388028500000132 }, { "x": 7.26429840000003, "y": 10.382669100000044 }, { "x": 7.280579800000055, "y": 10.379443300000162 }, { "x": 7.297165999999947, "y": 10.378351100000032 }, { "x": 7.31375219999984, "y": 10.379443300000162 }, { "x": 7.3300336000000925, "y": 10.382669100000044 }, { "x": 7.3457561999999825, "y": 10.388028500000132 }, { "x": 7.360665999999924, "y": 10.395369100000153 }, { "x": 7.374483599999735, "y": 10.404589300000112 }, { "x": 7.38698039999997, "y": 10.415536700000189 }, { "x": 7.39792779999982, "y": 10.428033500000083 }, { "x": 7.407147999999893, "y": 10.441851100000122 }, { "x": 7.414488600000027, "y": 10.456760900000177 }, { "x": 7.4198480000001155, "y": 10.472483500000067 }, { "x": 7.423073799999997, "y": 10.488764900000092 }, { "x": 7.4241659999999, "y": 10.505351100000098 }, { "x": 7.4241659999999, "y": 15.38994890000015 }, { "x": 7.423073799999997, "y": 15.406535100000042 }, { "x": 7.4198480000001155, "y": 15.422816500000181 }, { "x": 7.414488600000027, "y": 15.438539100000071 }, { "x": 7.407147999999893, "y": 15.453448900000126 }, { "x": 7.39792779999982, "y": 15.467266500000164 }, { "x": 7.38698039999997, "y": 15.479763300000059 }, { "x": 7.374483599999735, "y": 15.490710700000136 }, { "x": 7.360665999999924, "y": 15.499930900000095 }, { "x": 7.3457561999999825, "y": 15.507271500000115 }, { "x": 7.3300336000000925, "y": 15.51263090000009 }, { "x": 7.31375219999984, "y": 15.5158567000002 }, { "x": 7.297165999999947, "y": 15.516948900000102 }, { "x": 5.265166000000022, "y": 15.516948900000102 }, { "x": 5.06196599999987, "y": 15.516948900000102 }, { "x": 2.4129999999998972, "y": 15.516948900000102 }, { "x": 2.3964137999997774, "y": 15.5158567000002 }, { "x": 2.380132400000207, "y": 15.51263090000009 }, { "x": 2.364409799999862, "y": 15.507271500000115 }, { "x": 2.349499999999921, "y": 15.499930900000095 }, { "x": 2.3356823999998824, "y": 15.490710700000136 }, { "x": 2.3231855999998743, "y": 15.479763300000059 }, { "x": 2.3122382000000243, "y": 15.467266500000164 }, { "x": 2.303017999999952, "y": 15.453448900000126 }, { "x": 2.295677400000045, "y": 15.438539100000071 }, { "x": 2.2903179999999566, "y": 15.422816500000181 }, { "x": 2.2870921999998473, "y": 15.406535100000042 }, { "x": 2.2859999999999445, "y": 15.38994890000015 }, { "x": 2.2859999999999445, "y": 13.35794890000011 }, { "x": 0, "y": 13.35794890000011 }, { "x": 0, "y": 15.38994890000015 }, { "x": -0.001092200000016419, "y": 15.406535100000042 }, { "x": -0.0043180000000120344, "y": 15.422816500000181 }, { "x": -0.009677400000100533, "y": 15.438539100000071 }, { "x": -0.017018000000007305, "y": 15.453448900000126 }, { "x": -0.026238200000079814, "y": 15.467266500000164 }, { "x": -0.03718560000004345, "y": 15.479763300000059 }, { "x": -0.04968240000005153, "y": 15.490710700000136 }, { "x": -0.06350000000009004, "y": 15.499930900000095 }, { "x": -0.07840980000003128, "y": 15.507271500000115 }, { "x": -0.09413240000014866, "y": 15.51263090000009 }, { "x": -0.1104137999999466, "y": 15.5158567000002 }, { "x": -0.1270000000000664, "y": 15.516948900000102 }, { "x": -2.66700000000003, "y": 15.516948900000102 }, { "x": -2.68358620000015, "y": 15.5158567000002 }, { "x": -2.6998675999999477, "y": 15.51263090000009 }, { "x": -2.715590200000065, "y": 15.507271500000115 }, { "x": -2.7305000000000064, "y": 15.499930900000095 }, { "x": -2.744317600000045, "y": 15.490710700000136 }, { "x": -2.756814400000053, "y": 15.479763300000059 }, { "x": -2.7677618000000166, "y": 15.467266500000164 }, { "x": -2.776982000000089, "y": 15.453448900000126 }, { "x": -2.784322599999996, "y": 15.438539100000071 }, { "x": -2.7896820000000844, "y": 15.422816500000181 }, { "x": -2.79290780000008, "y": 15.406535100000042 }, { "x": -2.7940000000000964, "y": 15.38994890000015 }, { "x": -2.7940000000000964, "y": 13.35794890000011 }, { "x": -4.826000000000022, "y": 13.35794890000011 }, { "x": -4.826000000000022, "y": 15.38994890000015 }, { "x": -4.827092200000038, "y": 15.406535100000042 }, { "x": -4.830318000000034, "y": 15.422816500000181 }, { "x": -4.835677400000122, "y": 15.438539100000071 }, { "x": -4.843018000000029, "y": 15.453448900000126 }, { "x": -4.852238200000102, "y": 15.467266500000164 }, { "x": -4.863185600000065, "y": 15.479763300000059 }, { "x": -4.87568239999996, "y": 15.490710700000136 }, { "x": -4.889499999999998, "y": 15.499930900000095 }, { "x": -4.904409800000053, "y": 15.507271500000115 }, { "x": -4.9201324000001705, "y": 15.51263090000009 }, { "x": -4.936413799999855, "y": 15.5158567000002 }, { "x": -4.953000000000088, "y": 15.516948900000102 }, { "x": -7.239000000000033, "y": 15.516948900000102 }], strokeWidth: "0.254mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -9.7496000000001, "y": 16.813352699999996 }, { "x": 9.749599999999987, "y": 16.813352699999996 }, { "x": 9.749599999999987, "y": -9.74704729999985 }, { "x": -9.7496000000001, "y": -9.74704729999985 }, { "x": -9.7496000000001, "y": 16.813352699999996 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2913202.obj?uuid=ff306e3ed51d4ebc94ebabcd1b4d8906",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2913202.step?uuid=ff306e3ed51d4ebc94ebabcd1b4d8906",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: 0, y: -3.8004924000000644, z: -0.01 },
        }, ...props }));
};

const pinLabels$5 = {
    pin1: ["OUT"],
    pin2: ["NC1"],
    pin3: ["GND"],
    pin4: ["EN"],
    pin5: ["NC2"],
    pin6: ["IN"],
    pin7: ["EP"]
};
const pinAttributes$3 = {
    pin2: { doNotConnect: true },
    pin3: { requiresGround: true },
    pin5: { doNotConnect: true },
    pin6: { requiresPower: true }
};
/**
 * TI TLV75733PDRVR, 1A 3.3V LDO in the 2x2mm WSON-6 (DRV) package with an
 * exposed thermal pad (JEDEC RθJA 100.2 °C/W vs 231.1 °C/W for the SOT-23
 * DBV part it replaces). TI: the thermal pad is internally connected to GND
 * and should go to a large ground area. Like the ESP32 centre pad, the pad
 * (pin7) is declared bonded to GND (pin3) and is never routed: the GND pour
 * joins it to two tented GND vias placed just past the package ends
 * (board-level, in index.circuit.tsx).
 */
const TLV75733PDRVR = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$5, pinAttributes: pinAttributes$3, internallyConnectedPins: [["pin3", "pin7"]], supplierPartNumbers: {
            "jlcpcb": [
                "C2868428"
            ]
        }, manufacturerPartNumber: "TLV75733PDRVR", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-0.999998mm", pcbY: "0.649986mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "-0.999998mm", pcbY: "-0mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin3"], pcbX: "-0.999998mm", pcbY: "-0.649986mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin4"], pcbX: "0.999998mm", pcbY: "-0.649986mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin5"], pcbX: "0.999998mm", pcbY: "-0mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin6"], pcbX: "0.999998mm", pcbY: "0.649986mm", width: "0.499999mm", height: "0.350012mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin7"], pcbX: "-0mm", pcbY: "-0mm", width: "0.999998mm", height: "1.5999968mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.0001250000000255, "y": 1.0999723999998423 }, { "x": 0.999998000000005, "y": 1.0999723999998423 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.0001250000000255, "y": -1.0999978000002102 }, { "x": 0.999998000000005, "y": -1.0999978000002102 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.0160762000000432, "y": -1.0561574000001883 }, { "x": -1.0160762000000432, "y": -1.0999978000002102 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 0.999998000000005, "y": 1.0999723999998423 }, { "x": 0.999998000000005, "y": 1.0561319999998204 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 0.999998000000005, "y": -1.0561574000001883 }, { "x": 0.999998000000005, "y": -1.0999978000002102 }] }), jsxRuntime.jsx("silkscreencircle", { pcbX: "-1.5240762mm", pcbY: "1.0159746mm", radius: "0.124968mm" }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.206756mm", pcbY: "2.137666mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -1.9045560000001842, "y": 1.3876659999999674 }, { "x": 1.491043999999988, "y": 1.3876659999999674 }, { "x": 1.491043999999988, "y": -1.3475340000001097 }, { "x": -1.9045560000001842, "y": -1.3475340000001097 }, { "x": -1.9045560000001842, "y": 1.3876659999999674 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2868428.obj?uuid=c6fbdaaba2704b53a2adebf311c69daf",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2868428.step?uuid=c6fbdaaba2704b53a2adebf311c69daf",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: 0.000063500000123895, y: 0.000025400000140507473, z: 0 },
        }, ...props }));
};

/**
 * USBLC6-2SC6 low-capacitance USB ESD protection array, SOT-23-6.
 * JLCPCB C2687116 is the UMW (Youtai Semiconductor) pin-compatible
 * second source of the ST part; the pinout and package are identical. Footprint is the exact EasyEDA land pattern (6 pads,
 * 0.95mm pitch, 2 rows at +/-1.149mm) — verified against the manufacturer
 * package, so JLCPCB's part lands correctly. I/O pin names follow ST's
 * datasheet: I/O1 is bonded to both pin1 and pin6, I/O2 to both pin3 and
 * pin4, so either pin of a pair works (or both, as a straight-through pair).
 */
const pinLabels$4 = {
    pin1: ["IO1"],
    pin2: ["GND"],
    pin3: ["IO2"],
    pin4: ["IO2_B"],
    pin5: ["VBUS"],
    pin6: ["IO1_B"]
};
const pinAttributes$2 = {
    pin2: { requiresGround: true },
    pin5: { requiresPower: true }
};
const USBLC6_2SC6 = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$4, pinAttributes: pinAttributes$2, supplierPartNumbers: {
            "jlcpcb": [
                "C2687116"
            ]
        }, manufacturerPartNumber: "USBLC6-2SC6", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "-0.94996mm", pcbY: "-1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "0mm", pcbY: "-1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin3"], pcbX: "0.94996mm", pcbY: "-1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin4"], pcbX: "0.94996mm", pcbY: "1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin5"], pcbX: "0mm", pcbY: "1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin6"], pcbX: "-0.94996mm", pcbY: "1.149096mm", width: "0.532003mm", height: "1.072007mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 1.5391891999998961, "y": -0.8892031999998835 }, { "x": 1.5391891999998961, "y": 0.8892031999999972 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -1.5391892000000098, "y": -0.8892031999998835 }, { "x": -1.5391892000000098, "y": 0.8892031999999972 }] }), jsxRuntime.jsx("silkscreencircle", { pcbX: "-1.668272mm", pcbY: "-1.301496mm", radius: "0.150114mm" }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "-0.1524mm", pcbY: "2.6764mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -2.078800000000001, "y": 1.9264000000000578 }, { "x": 1.7739999999998872, "y": 1.9264000000000578 }, { "x": 1.7739999999998872, "y": -2.0279999999999063 }, { "x": -2.078800000000001, "y": -2.0279999999999063 }, { "x": -2.078800000000001, "y": 1.9264000000000578 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2687116.obj?uuid=229b69761e2c45dba6a83d8866dec72d",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2687116.step?uuid=229b69761e2c45dba6a83d8866dec72d",
            pcbRotationOffset: 90,
            modelOriginPosition: { x: -12700000070253736e-21, y: 0.000012700000070253736, z: -0.048939 },
        }, ...props }));
};

/**
 * TF-01A push-push microSD socket (JLCPCB C91145). JLCPCB/EasyEDA only
 * resolved VDD/VSS/CD; pins 1/2/3/5/7/8 follow the standard SD Association
 * 8-contact microSD pinout (SPI-mode names in parens) — DAT2, CS(CD/DAT3),
 * MOSI(CMD), CLK, MISO(DAT0), DAT1 — this ordering was verified against the
 * standard microSD mapping and is correct. DAT1/DAT2 are unused in 1-bit SPI
 * mode and left unconnected. pin9 is the mechanical card-detect switch
 * (separate from the electrical DAT3/CD line); left unconnected since this
 * design doesn't do card-insertion detection. pins 10-13 are the shell's
 * ground/shield legs.
 */
const pinLabels$3 = {
    pin1: ["DAT2"],
    pin2: ["CS"],
    pin3: ["MOSI"],
    pin4: ["VDD"],
    pin5: ["SCK"],
    pin6: ["VSS"],
    pin7: ["MISO"],
    pin8: ["DAT1"],
    pin9: ["CD"],
    pin10: ["GND1"],
    pin11: ["GND4"],
    pin12: ["GND3"],
    pin13: ["GND2"]
};
const pinAttributes$1 = {
    pin4: { requiresPower: true },
    pin6: { requiresGround: true },
    pin10: { requiresGround: true },
    pin11: { requiresGround: true },
    pin12: { requiresGround: true },
    pin13: { requiresGround: true }
};
const TF_01A = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$3, pinAttributes: pinAttributes$1, supplierPartNumbers: {
            "jlcpcb": [
                "C91145"
            ]
        }, manufacturerPartNumber: "TF-01A", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("hole", { pcbX: "-4.9499393mm", pcbY: "-5.39108015mm", diameter: "0.999998mm" }), jsxRuntime.jsx("hole", { pcbX: "3.0500447mm", pcbY: "-5.39108015mm", diameter: "0.999998mm" }), jsxRuntime.jsx("smtpad", { portHints: ["pin1"], pcbX: "2.2400133mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin2"], pcbX: "1.1399647mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin3"], pcbX: "0.0399161mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin4"], pcbX: "-1.0601325mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin5"], pcbX: "-2.1599525mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin6"], pcbX: "-3.2600011mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin7"], pcbX: "-4.3600497mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin8"], pcbX: "-5.4598697mm", pcbY: "5.45108765mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin9"], pcbX: "-6.5599691mm", pcbY: "5.45068125mm", width: "0.5999988mm", height: "1.2999974mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin10"], pcbX: "-7.7599667mm", pcbY: "4.60069565mm", width: "1.1999976mm", height: "1.3999972mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin13"], pcbX: "6.9200141mm", pcbY: "4.60069565mm", width: "1.1999976mm", height: "1.3999972mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin12"], pcbX: "7.7599667mm", pcbY: "-5.10108835mm", width: "1.1999976mm", height: "1.999996mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin11"], pcbX: "-7.7599667mm", pcbY: "-5.10108835mm", width: "1.1999976mm", height: "1.999996mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -7.365987300000029, "y": 3.581139650000182 }, { "x": -7.365987300000029, "y": -3.927989349999848 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 7.366012699999828, "y": -3.991514749999851 }, { "x": 7.366012699999828, "y": 3.501485250000087 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -7.365987300000029, "y": -6.340963949999946 }, { "x": -7.365987300000029, "y": -9.401054349999981 }, { "x": 7.366012699999828, "y": -9.401028949999954 }, { "x": 7.366012699999828, "y": -6.491027149999923 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -7.365987300000029, "y": -8.915685749999966 }, { "x": -7.365987300000029, "y": -8.691022750000116 }, { "x": 1.000010699999848, "y": -8.691022750000116 }, { "x": 3.9370126999999684, "y": -9.388100349999945 }] }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "0.0000127mm", pcbY: "7.11097965mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": -6.999998699999992, "y": -9.490995750000025 }, { "x": -6.999998699999992, "y": 2.0090066500000603 }, { "x": -6.999998699999992, "y": -9.490995750000025 }], strokeWidth: "0.254mm" }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": 7.000024100000019, "y": -9.490995750000025 }, { "x": 7.000024100000019, "y": 2.0090066500000603 }, { "x": 6.0000007000001006, "y": 2.0090066500000603 }, { "x": 6.0000007000001006, "y": -9.490995750000025 }, { "x": 7.000024100000019, "y": -9.490995750000025 }], strokeWidth: "0.254mm" }), jsxRuntime.jsx("fabricationnotepath", { route: [{ "x": -5.999975300000074, "y": 2.0090066500000603 }, { "x": 6.0000007000001006, "y": 2.0090066500000603 }, { "x": 6.0000007000001006, "y": 1.0090086500000552 }, { "x": -5.999975300000074, "y": 1.0090086500000552 }, { "x": -5.999975300000074, "y": 2.0090066500000603 }], strokeWidth: "0.254mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -8.606587300000115, "y": 6.360979650000104 }, { "x": 8.606612699999914, "y": 6.360979650000104 }, { "x": 8.606612699999914, "y": -9.73462035 }, { "x": -8.606587300000115, "y": -9.73462035 }, { "x": -8.606587300000115, "y": 6.360979650000104 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C91145.obj?uuid=5685a23adc9a4e3e9b914abe5ae03aae",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C91145.step?uuid=5685a23adc9a4e3e9b914abe5ae03aae",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: -0.0022224999997728645, y: 5.101310850000045, z: -0.14733820000000009 },
        }, ...props }));
};

const pinLabels$2 = {
    pin1: ["A"],
    pin2: ["B"],
    pin3: ["C"],
    pin4: ["D"]
};
const TS_1187A_B_A_B = (props) => {
    const { name = "SW1", ...restProps } = props;
    return (jsxRuntime.jsx("pushbutton", { name: name, pinLabels: pinLabels$2, 
        // Per the XKB TS-1187A datasheet, A(pin1)-B(pin2) are one internal
        // terminal (top row of the footprint) and C(pin3)-D(pin4) the other
        // (bottom row); pressing the button joins A/B to C/D.
        internallyConnectedPins: [["pin1", "pin2"], ["pin3", "pin4"]], supplierPartNumbers: {
            "jlcpcb": [
                "C318884"
            ]
        }, manufacturerPartNumber: "TS-1187A-B-A-B", footprint: "smdpushbutton4_px6mm_py3.7mm_pw1mm_ph0.75mm", cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C318884.obj?uuid=91b67c1735f643ffb2e7226c23dd3492",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C318884.step?uuid=91b67c1735f643ffb2e7226c23dd3492",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: 0.000012700000070253736, y: 0.0004999999999999449, z: -0.05 },
        }, ...restProps }));
};

const pinLabels$1 = {
    pin25: ["SHELL1"],
    pin26: ["SHELL2"],
    pin27: ["A1", "GND1"],
    pin28: ["A2", "SSTXP1"],
    pin29: ["A3", "SSTXN1"],
    pin30: ["A4", "VBUS1"],
    pin31: ["B12", "GND2"],
    pin32: ["B11", "SSRXP1"],
    pin33: ["B10", "SSRXN1"],
    pin34: ["B9", "VBUS2"],
    pin35: ["A5", "CC1"],
    pin36: ["A6", "DP1"],
    pin37: ["A7", "DN1"],
    pin38: ["A12", "GND3"]
};
const pinAttributes = {
    pin30: { requiresPower: true },
    pin34: { requiresPower: true },
    pin27: { requiresGround: true },
    pin31: { requiresGround: true },
    pin38: { requiresGround: true },
    pin25: { requiresGround: true },
    pin26: { requiresGround: true },
};
const U261_121N_4BS2S = (props) => {
    return (jsxRuntime.jsx("chip", { pinLabels: pinLabels$1, pinAttributes: pinAttributes, supplierPartNumbers: {
            "jlcpcb": [
                "C2879827"
            ]
        }, manufacturerPartNumber: "U261-121N-4BS2S", footprint: jsxRuntime.jsxs("footprint", { children: [jsxRuntime.jsx("platedhole", { portHints: ["pin25"], pcbX: "-4.275074mm", pcbY: "6.12498775mm", holeWidth: "0.5000244mm", holeHeight: "1.700022mm", outerWidth: "1.1999976mm", outerHeight: "2.3999952mm", shape: "pill" }), jsxRuntime.jsx("platedhole", { portHints: ["pin26"], pcbX: "4.27482mm", pcbY: "6.12498775mm", holeWidth: "0.5000244mm", holeHeight: "1.700022mm", outerWidth: "1.1999976mm", outerHeight: "2.3999952mm", shape: "pill" }), jsxRuntime.jsx("smtpad", { portHints: ["pin27"], pcbX: "2.749804mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin28"], pcbX: "2.249932mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin29"], pcbX: "1.749806mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin30"], pcbX: "1.249934mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin31"], pcbX: "0.749808mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin32"], pcbX: "0.249936mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin33"], pcbX: "-0.25019mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin34"], pcbX: "-0.750062mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin35"], pcbX: "-1.250188mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin36"], pcbX: "-1.75006mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin37"], pcbX: "-2.250186mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin38"], pcbX: "-2.750058mm", pcbY: "6.47499975mm", width: "0.2999994mm", height: "0.8999982mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin25"], pcbX: "-3.999992mm", pcbY: "5.47500175mm", width: "1.4299946mm", height: "0.999998mm", shape: "rect" }), jsxRuntime.jsx("smtpad", { portHints: ["pin26"], pcbX: "3.999992mm", pcbY: "5.47500175mm", width: "1.4299946mm", height: "0.999998mm", shape: "rect" }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -4.31901599999992, "y": 5.194839750000028 }, { "x": -4.235170599999947, "y": -7.005085050000048 }, { "x": 4.294809800000053, "y": -7.005085050000048 }, { "x": 4.316983999999934, "y": 5.194839750000028 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": 2.96458640000003, "y": 7.144975549999913 }, { "x": 3.6769040000001496, "y": 7.144975549999913 }] }), jsxRuntime.jsx("silkscreenpath", { route: [{ "x": -3.6772595999999567, "y": 7.144975549999913 }, { "x": -2.9649673999999777, "y": 7.144975549999913 }] }), jsxRuntime.jsx("silkscreencircle", { pcbX: "2.579878mm", pcbY: "7.29491175mm", radius: "0.127mm" }), jsxRuntime.jsx("silkscreentext", { text: "{NAME}", pcbX: "0.006604mm", pcbY: "8.41479975mm", anchorAlignment: "center", fontSize: "1mm" }), jsxRuntime.jsx("courtyardoutline", { outline: [{ "x": -5.145595999999955, "y": 7.664799749999929 }, { "x": 5.158804000000032, "y": 7.664799749999929 }, { "x": 5.158804000000032, "y": -7.262400250000155 }, { "x": -5.145595999999955, "y": -7.262400250000155 }, { "x": -5.145595999999955, "y": 7.664799749999929 }] })] }), cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2879827.obj?uuid=f20717cda2a24fedb1b3a085e3246fc0",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2879827.step?uuid=f20717cda2a24fedb1b3a085e3246fc0",
            pcbRotationOffset: 0,
            // The importer's origin (y -4.01, z -0.2) rendered the plug 6.135mm
            // along its axis off the footprint and 0.05mm low. Measured from the
            // OBJ: the mounting flange's underside is at z=-0.25 and the two shell
            // pegs are centred at y=2.30, 0.175mm from the land-pattern bounds
            // centre the body is anchored to. This origin puts the flange on the
            // board top and the pegs in their slots; the 10mm plug body then
            // overhangs the board edge as the datasheet's recommended layout shows.
            modelOriginPosition: { x: 0.00013970000009067007, y: 2.125, z: -0.25 },
        }, ...props }));
};

const pinLabels = {
    pin1: ["cathode", "neg"],
    pin2: ["anode", "pos"]
};
const XL_1608UBC_04 = (props) => {
    const { name = "LED1", ...restProps } = props;
    return (jsxRuntime.jsx("led", { name: name, pinLabels: pinLabels, supplierPartNumbers: {
            "jlcpcb": [
                "C965807"
            ]
        }, manufacturerPartNumber: "XL-1608UBC-04", footprint: "smdpads2_p1.498mm_pw0.8mm_ph0.8mm", cadModel: {
            objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C965807.obj?uuid=bfb81b195f37496bb30ade8d51870f96",
            stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C965807.step?uuid=bfb81b195f37496bb30ade8d51870f96",
            pcbRotationOffset: 0,
            modelOriginPosition: { x: -12700000070253736e-21, y: -5080000005364127e-20, z: -0.01 },
        }, ...restProps }));
};

// Schematic sections on a compact grid.
const SEC = {
    Usb: { x: 0, y: 16 },
    Mcu: { x: 0, y: 2 },
    BootReset: { x: 10, y: 2 },
    Power: { x: -10, y: -8 },
    Indicator: { x: 20, y: -8 },
    MicroSd: { x: 0, y: -20 },
    Test: { x: 22, y: 8 },
};
// Board outline is a plain 26 x 82.25mm stick. The USB-C male plug (J1) is a
// board-edge part: its SMD contacts and shell pegs sit on the PCB and the
// 11.25mm plug body overhangs the TOP edge to insert straight into a host.
// XKB's recommended PCB layout puts the board edge at the outer end of the
// shell-peg pads, which is also where JLCPCB's EasyEDA footprint starts its
// board cutout: y = 33.25 here, 0.22mm past the slot copper (JLCPCB's routed
// edge minimum is 0.2mm). v1.2.5 ran the board 2.25mm further under the plug.
// The ESP32 module lives at the BOTTOM with its printed antenna right at the
// bottom edge, as far from the USB metal as the board allows.
//   top edge (USB-C plug)   y = +33.25
//   bottom edge (antenna)   y = -49
const EDGE_TOP = 33.25;
const EDGE_BOTTOM = -49;
const BOARD_OUTLINE = [
    { x: -13, y: EDGE_BOTTOM },
    { x: 13, y: EDGE_BOTTOM },
    { x: 13, y: EDGE_TOP },
    { x: -13, y: EDGE_TOP },
];
const EDGE_FENCE = { pcbY: (EDGE_TOP + EDGE_BOTTOM) / 2, height: EDGE_TOP - EDGE_BOTTOM };
// The board's centre is pcbY + outlineOffsetY and every outline point is
// shifted by the same offset, so the outline is written relative to its own
// centre. That keeps the edges where they are while the board box DRC and
// the placement checker derive (centre +/- height/2) matches the outline.
const BOARD_CENTER_Y = (EDGE_TOP + EDGE_BOTTOM) / 2;
const BOARD_OUTLINE_REL = BOARD_OUTLINE.map((p) => ({ x: p.x, y: p.y - BOARD_CENTER_Y }));
// U1 is placed antenna-down (pcbRotation=180) at the bottom. Its printed
// antenna (the module's own meander) sits flush at the bottom board edge
// with no copper around or under it — the proper spot for RF, well clear of
// the USB shell up top. The keepout spans the FULL board width (26mm) so the
// GND pours can't fill the strips beside the antenna down to the board edge
// (Espressif's module guidelines want the sides of the antenna clear, not just
// the area under it).
const ANTENNA_KEEPOUT = { pcbX: 0, pcbY: -45.65, width: 26.2, height: 6.6 };
// JLCPCB part for every passive, pinned so the BOM cannot drift when the
// parts engine picks differently in a later tscircuit release.
const JLC = {
    R_0_0402: { jlcpcb: ["C17168"] },
    R_22_0402: { jlcpcb: ["C25092"] },
    R_330_0402: { jlcpcb: ["C25104"] },
    R_5K1_0402: { jlcpcb: ["C25905"] },
    R_10K_0402: { jlcpcb: ["C25744"] },
    C_100N_0402: { jlcpcb: ["C1525"] },
    C_1U_0402: { jlcpcb: ["C52923"] },
    C_10U_0805: { jlcpcb: ["C15850"] },
    C_22U_0805: { jlcpcb: ["C45783"] },
};
// A <trace pcbPath> point is an offset from the from-pad component's pcbX/pcbY
// (not its land-pattern centre), rotated with that component. frame()
// converts board coordinates. Only the few non-critical links left on pcbPath
// use it; the router may still adjust those.
const frame = (c, rot = 0) => (p) => {
    const dx = p.x - c.x;
    const dy = p.y - c.y;
    if (rot === 90)
        return { x: dy, y: -dx };
    if (rot === 180)
        return { x: -dx, y: -dy };
    if (rot === 270)
        return { x: -dy, y: dx };
    return { x: dx, y: dy };
};
// Board position of pin1/pin2 of a 2-pad passive (0402 offset 0.51mm, 0805
// 0.9125mm) placed at c with the given pcbRotation.
const pin = (c, rot, offset, which) => {
    const d = which === 1 ? -offset : offset;
    const f = rot === 0 ? { x: d, y: 0 } : rot === 90 ? { x: 0, y: d } : rot === 180 ? { x: -d, y: 0 } : { x: 0, y: -d };
    return { x: c.x + f.x, y: c.y + f.y };
};
// "via" changes layer at the previous point.
const savedRoute = (width, pts, startLayer = "top") => {
    let layer = startLayer;
    let last = pts[0];
    const out = [];
    for (const p of pts) {
        if (p === "via") {
            const to = layer === "top" ? "bottom" : "top";
            out.push({ route_type: "via", x: last.x, y: last.y, from_layer: layer, to_layer: to });
            layer = to;
            continue;
        }
        out.push({ route_type: "wire", x: p.x, y: p.y, width, layer });
        last = p;
    }
    return out;
};
const mid = (a, b) => ({ x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 });
// Exact PCB port positions of imported footprints (from circuit.json).
const PORT = {
    SD1_DAT2: { x: -5.45108765, y: -4.759986699999999 },
    SD1_CS: { x: -5.45108765, y: -5.8600353 },
    SD1_MOSI: { x: -5.45108765, y: -6.9600839 },
    SD1_VDD: { x: -5.45108765, y: -8.0601325 },
    SD1_SCK: { x: -5.45108765, y: -9.1599525 },
    SD1_MISO: { x: -5.45108765, y: -11.360049700000001 },
    SD1_DAT1: { x: -5.45108765, y: -12.459869699999999 },
    J1_A5: { x: 1.2501879999999992, y: 31.47500025 },
    J1_A6: { x: 1.750059999999999, y: 31.47500025 },
    J1_A7: { x: 2.250185999999999, y: 31.47500025 },
    U3_IO1: { x: 3.55004, y: 26.650904 },
    U3_IO2: { x: 5.44996, y: 26.650904 },
    U3_IO1_B: { x: 3.55004, y: 28.949096 },
    U3_IO2_B: { x: 5.44996, y: 28.949096 },
    U1_IO0: { x: -8.750046, y: -24.5349527 },
    U1_IO4: { x: 8.750046, y: -37.2349527 },
    U1_3V3: { x: 8.750046, y: -39.7749527 },
    U1_IO19: { x: 8.750046, y: -25.8049527 },
    U1_IO20: { x: 8.750046, y: -24.5349527 },
    U1_TOP_ROW_Y: -23.2550467,
    SW1_A: { x: 4, y: 8.85 },
    SW1_B: { x: 10, y: 8.85 },
    TP5: { x: -11, y: -24.54 },
};
// ---------------------------------------------------------------- USB ----
const u2 = frame({ x: 0, y: 15.5 }, 90);
const R3_C = { x: 10.85, y: -24.5 };
const R4_C = { x: 11.85, y: -24.5 };
const R11_C = { x: 1.4, y: 29 };
const C9_C = { x: 1.3, y: 27.8 };
const R21_C = { x: 1.3, y: 26.6 };
const USB_PATHS = [
    // plug -> ESD top row, both on top, 0.5mm apart
    { connection: ".U3 > .IO1_B", route: savedRoute(0.2, [PORT.U3_IO1_B, { x: PORT.U3_IO1_B.x, y: 29.8 }, { x: PORT.J1_A6.x, y: 29.8 }, PORT.J1_A6]) },
    { connection: ".U3 > .IO2_B", route: savedRoute(0.2, [PORT.U3_IO2_B, { x: PORT.U3_IO2_B.x, y: 30.3 }, { x: PORT.J1_A7.x, y: 30.3 }, PORT.J1_A7]) },
    // ESD bottom row -> right-edge lane (x=11.4 / 11.8) -> R3 / R4
    {
        connection: ".U3 > .IO1",
        route: savedRoute(0.2, [PORT.U3_IO1, { x: PORT.U3_IO1.x, y: 25.6 }, { x: 11.4, y: 20.8 }, { x: 11.4, y: -23 }, { x: 10.85, y: -23.55 }, pin(R3_C, 270, 0.51, 1)]),
    },
    {
        connection: ".U3 > .IO2",
        route: savedRoute(0.2, [PORT.U3_IO2, { x: PORT.U3_IO2.x, y: 24.907 }, { x: 11.8, y: 21.024 }, { x: 11.8, y: -23 }, { x: 11.85, y: -23.55 }, pin(R4_C, 270, 0.51, 1)]),
    },
    // R3 / R4 -> module, without crossing over each other
    { connection: ".R3 > .pin2", route: savedRoute(0.2, [pin(R3_C, 270, 0.51, 2), PORT.U1_IO20]) },
    { connection: ".R4 > .pin2", route: savedRoute(0.2, [pin(R4_C, 270, 0.51, 2), { x: 11.35, y: PORT.U1_IO19.y }, PORT.U1_IO19]) },
    // CC -> R11
    { connection: ".R11 > .pin1", route: savedRoute(0.2, [pin(R11_C, 0, 0.51, 1), { x: 0.89, y: 29.6 }, { x: PORT.J1_A5.x, y: 30 }, PORT.J1_A5]) },
    // VBUS_ESD (the USBLC6 VBUS pin, its decoupler C9 and the 0R link R21): the
    // VBUS pin sits between the two channels, so it leaves on top under the
    // package, between the two pin rows.
    { connection: ".R21 > .pin2", route: savedRoute(0.3, [pin(R21_C, 0, 0.51, 2), pin(C9_C, 180, 0.51, 1)]) },
    { connection: ".U3 > .VBUS", route: savedRoute(0.3, [{ x: 4.5, y: 28.949096 }, { x: 4.5, y: 27.8 }, pin(C9_C, 180, 0.51, 1)]) },
];
// ------------------------------------------------------------ microSD ----
// The socket's contacts face WEST (x = -5.451) and the module's SDMMC pins
// sit in a row along its top edge. Every line leaves its contact westward,
// runs south in its own lane, turns east and drops into its series resistor
// right above the module pin. Lane order (west -> east) follows the contact
// order, and the GPIO map follows the lane order, so nothing crosses and no
// line changes layer; the bottom GND pour stays unbroken underneath. CLK has
// 1mm to its neighbours (0.5mm elsewhere) so ground pour runs beside it.
const SD_RES_Y = -20.8;
const SD_LANES = [
    { name: "SD_D2", cardNet: "SDC_D2", pad: "SD1.DAT2", sel: ".SD1 > .DAT2", at: PORT.SD1_DAT2, laneX: -11.9, turnY: -19.9, res: "R18", resX: -3.17, mcu: "U1.SD_D2", mcuX: -3.175 },
    { name: "SD_D3", cardNet: "SDC_D3", pad: "SD1.CS", sel: ".SD1 > .CS", at: PORT.SD1_CS, laneX: -11.4, turnY: -19.4, res: "R14", resX: -1.9, mcu: "U1.SD_D3", mcuX: -1.905 },
    { name: "SD_CMD", cardNet: "SDC_CMD", pad: "SD1.MOSI", sel: ".SD1 > .MOSI", at: PORT.SD1_MOSI, laneX: -10.9, turnY: -18.9, res: "R15", resX: -0.63, mcu: "U1.SD_CMD", mcuX: -0.635 },
    { name: "SD_CLK", cardNet: "", pad: "SD1.SCK", sel: ".SD1 > .SCK", at: PORT.SD1_SCK, laneX: -9.9, turnY: -17.9, res: "R13", resX: 0.64, mcu: "U1.SD_CLK", mcuX: 0.635 },
    { name: "SD_D0", cardNet: "SDC_D0", pad: "SD1.MISO", sel: ".SD1 > .MISO", at: PORT.SD1_MISO, laneX: -8.9, turnY: -16.9, res: "R16", resX: 1.91, mcu: "U1.SD_D0", mcuX: 1.905 },
    { name: "SD_D1", cardNet: "SDC_D1", pad: "SD1.DAT1", sel: ".SD1 > .DAT1", at: PORT.SD1_DAT1, laneX: -8.4, turnY: -16.4, res: "R17", resX: 3.18, mcu: "U1.SD_D1", mcuX: 3.175 },
];
// 10k pull-ups sit in the pockets between the contact escapes, 0.5mm west of
// the socket, with pin2 on a 1mm stub to their contact. Their 3V3 is its own
// small net (V3V3_SD, joined to the main 3V3 by the 0R link R19 beside the
// regulator's output cap) so it can be locked: each pull-up's pin1 drops
// through a via and runs on the BOTTOM layer east under the socket body
// (never under an SD lane) to a spine at x=-3 that ends at the bottom-side
// 3V3 test pad TP1, in the free area below the last contact. R9 sits right
// above TP1. C7 decouples the card's VDD contact and is fed through R7.
const SD_PULLUP_X = -7.35;
const SD_V3_VIA_X = -8.65;
const V3_SPINE_X = -3;
const TP_3V3 = { x: -7.35, y: -15.2 };
const SD_PULLUPS = [
    { name: "R10", y: -5.31, net: "SDC_D2", pad: "SD1.DAT2", at: PORT.SD1_DAT2, sch: { x: -10, y: 4 } },
    { name: "R6", y: -6.41, net: "SDC_D3", pad: "SD1.CS", at: PORT.SD1_CS, sch: { x: 6, y: 3 } },
    { name: "R7", y: -7.51, net: "SDC_CMD", pad: "SD1.MOSI", at: PORT.SD1_MOSI, sch: { x: 10, y: 7 } },
    { name: "R8", y: -10.81, net: "SDC_D0", pad: "SD1.MISO", at: PORT.SD1_MISO, sch: { x: 10, y: 4 } },
    { name: "R9", y: -13, net: "SDC_D1", pad: "SD1.DAT1", at: PORT.SD1_DAT1, sch: { x: -10, y: 7 } },
];
const pullupPin = (p, which) => pin({ x: SD_PULLUP_X, y: p.y }, 0, 0.51, which);
const C7_C = { x: SD_PULLUP_X, y: -8.61 };
const R19_C = { x: -3, y: 11.6 };
const SD_PATHS = [
    // pull-up stubs first (they start at a pad not yet joined), then the lanes
    ...SD_PULLUPS.map((p) => ({
        connection: `.${p.name} > .pin2`,
        route: savedRoute(0.2, [pullupPin(p, 2), mid(pullupPin(p, 2), p.at), p.at]),
    })),
    ...SD_LANES.map((l) => ({
        connection: l.sel,
        route: savedRoute(0.2, [
            l.at,
            { x: l.laneX, y: l.at.y },
            { x: l.laneX, y: l.turnY },
            { x: l.resX, y: l.turnY },
            pin({ x: l.resX, y: SD_RES_Y }, 270, 0.51, 1),
        ]),
    })),
    ...SD_LANES.map((l) => ({
        connection: `.${l.res} > .pin2`,
        route: savedRoute(0.2, [pin({ x: l.resX, y: SD_RES_Y }, 270, 0.51, 2), { x: l.mcuX, y: PORT.U1_TOP_ROW_Y }]),
    })),
    // V3V3_SD: card VDD -> C7 -> R7 -> bottom spine -> TP1, other pull-ups -> TP1, link R19 -> TP1
    { connection: ".SD1 > .VDD", route: savedRoute(0.3, [PORT.SD1_VDD, mid(PORT.SD1_VDD, pin(C7_C, 180, 0.51, 1)), pin(C7_C, 180, 0.51, 1)]) },
    { connection: ".C7 > .pin1", route: savedRoute(0.3, [pin(C7_C, 180, 0.51, 1), { x: SD_PULLUP_X, y: -8.06 }, pullupPin({ y: -7.51 }, 1)]) },
    ...SD_PULLUPS.filter((p) => p.name !== "R9").map((p) => ({
        connection: `.${p.name} > .pin1`,
        route: savedRoute(p.name === "R7" ? 0.4 : 0.3, [
            pullupPin(p, 1),
            { x: SD_V3_VIA_X, y: p.y },
            "via",
            { x: V3_SPINE_X, y: p.y },
            { x: V3_SPINE_X, y: TP_3V3.y },
            TP_3V3,
        ]),
    })),
    { connection: ".R9 > .pin1", route: savedRoute(0.3, [pullupPin({ y: -13 }, 1), { x: -7.86, y: -14 }, "via", TP_3V3]) },
    {
        connection: ".R19 > .pin2",
        route: savedRoute(0.5, [pin(R19_C, 180, 0.51, 2), { x: -4.25, y: 11.6 }, "via", { x: V3_SPINE_X, y: 10.35 }, { x: V3_SPINE_X, y: TP_3V3.y }, TP_3V3]),
    },
];
// -------------------------------------------- BOOT, LED and module 3V3 ----
// These run from the buttons/regulator end of the board to the module
// without passing under the SD lanes or the USB pair: BOOT on the bottom
// layer east of the SD lanes and in under the module to a via beside IO0;
// the module's 3V3 (its own net V3V3_MCU behind the 0R link R20) on the bottom
// at x=6.4 through the bulk cap C8 to a via beside the 3V3 pad. The status
// LED sits on the right edge beside IO4, so its line never crosses the board.
const R2_C = { x: 4, y: 10 };
const R20_C = { x: 5.2, y: 11.4 };
const C8_C = { x: 7, y: -18.5 };
const C3_C = { x: 11.3, y: -34.5 };
const C4_C = { x: 11.3, y: -39.5 };
const R5_C = { x: 10.3, y: -29 };
const LED1_C = { x: 11.6, y: -29.5 };
const LED1_ANODE = { x: LED1_C.x, y: LED1_C.y + 0.749 };
const BOOT_PATHS = [
    { connection: ".SW1 > .B", route: savedRoute(0.25, [PORT.SW1_B, PORT.SW1_A]) },
    { connection: ".R2 > .pin2", route: savedRoute(0.2, [pin(R2_C, 0, 0.51, 2), PORT.SW1_A]) },
    { connection: ".TP5 > .pin1", route: savedRoute(0.2, [PORT.TP5, PORT.U1_IO0]) },
    {
        connection: ".SW1 > .A",
        route: savedRoute(0.2, [PORT.SW1_A, { x: 2.9, y: 8.85 }, "via", { x: 2.9, y: -0.4 }, { x: 4, y: -1.5 }, { x: 4, y: -24.6 }, { x: -7.3, y: -24.6 }, "via", PORT.U1_IO0]),
    },
];
const LED_PATHS = [
    { connection: ".U1 > .IO4", route: savedRoute(0.2, [PORT.U1_IO4, { x: 9.9, y: PORT.U1_IO4.y }, { x: 9.9, y: pin(R5_C, 90, 0.51, 1).y }, pin(R5_C, 90, 0.51, 1)]) },
    { connection: ".R5 > .pin2", route: savedRoute(0.2, [pin(R5_C, 90, 0.51, 2), LED1_ANODE]) },
];
const V3_MCU_PATHS = [
    {
        connection: ".R20 > .pin2",
        route: savedRoute(0.5, [pin(R20_C, 0, 0.51, 2), { x: 6.5, y: 11.4 }, "via", { x: 6.4, y: 11 }, { x: 6.4, y: -17 }, { x: 7.9125, y: -17 }, "via", pin(C8_C, 180, 0.9125, 1)]),
    },
    {
        connection: ".C8 > .pin1",
        route: savedRoute(0.5, [pin(C8_C, 180, 0.9125, 1), { x: 7.9125, y: -19.7 }, "via", { x: 6.4, y: -19.7 }, { x: 6.4, y: -38.9 }, { x: 7.3, y: PORT.U1_3V3.y }, "via", PORT.U1_3V3]),
    },
    { connection: ".C3 > .pin1", route: savedRoute(0.3, [pin(C3_C, 90, 0.9125, 1), { x: 11.9, y: -36 }, { x: 11.9, y: -39.5 }, pin(C4_C, 90, 0.51, 1)]) },
    { connection: ".C4 > .pin1", route: savedRoute(0.3, [pin(C4_C, 90, 0.51, 1), PORT.U1_3V3]) },
];
const LOCKED_PATHS = [...USB_PATHS, ...SD_PATHS, ...BOOT_PATHS, ...LED_PATHS, ...V3_MCU_PATHS];
// GND stitching vias for the module's centre pad (between and around its nine
// paste squares) and the regulator's thermal pad (just past the package ends).
// Board vias, not footprint plated holes: the Gerber export puts paste on every
// plated hole, tented or not, which would print solder onto the mask.
const GND_STITCH_VIAS = [
    { x: 0.800124, y: -34.0248767, d: 0.5 },
    { x: 2.200124, y: -34.0248767, d: 0.5 },
    { x: 0.800124, y: -32.6248767, d: 0.5 },
    { x: 2.200124, y: -32.6248767, d: 0.5 },
    { x: 1.500124, y: -35.7248767, d: 0.6 },
    { x: 1.500124, y: -30.9248767, d: 0.6 },
    { x: -0.899876, y: -33.3248767, d: 0.6 },
    { x: 3.900124, y: -33.3248767, d: 0.6 },
    { x: -1.55, y: 15.5, d: 0.6 },
    { x: 1.55, y: 15.5, d: 0.6 },
];
// --------------------------------------------------------- test pads ----
const TEST_PADS = [
    { name: "TP2", label: "5V", at: { x: -2.6, y: 21 }, to: "net.VBUS", labelAt: { x: -2.6, y: 22.1 } },
    { name: "TP3", label: "GND", at: { x: -4.6, y: 21 }, to: "net.GND", labelAt: { x: -4.6, y: 22.1 } },
    { name: "TP4", label: "EN", at: { x: -1, y: 11.6 }, to: "U1.EN", labelAt: { x: 0.35, y: 11.6 } },
    { name: "TP5", label: "IO0", at: PORT.TP5, to: "net.BOOT", labelAt: { x: -11, y: -23.5 } },
    { name: "TP6", label: "RX", at: { x: -11, y: -35.97 }, to: "U1.RXD0", labelAt: { x: -12.35, y: -35.97 } },
    { name: "TP7", label: "TX", at: { x: -11, y: -37.24 }, to: "U1.TXD0", labelAt: { x: -12.35, y: -37.24 } },
    { name: "TP8", label: "GND", at: { x: -11, y: -38.51 }, to: "net.GND", labelAt: { x: -12.3, y: -38.51 } },
];
var index_circuit = () => (jsxRuntime.jsxs("board", { width: "26mm", height: "82.25mm", layers: 2, thickness: "1.6mm", outline: BOARD_OUTLINE_REL, outlineOffsetY: BOARD_CENTER_Y, title: "ESP32-S3 USB-C Stick", 
    // Vias: 0.3mm hole / 0.6mm pad = 0.15mm annular ring (v1.2.5 used 0.5mm
    // pads, JLCPCB's bare minimum ring).
    pcbStyle: { viaHoleDiameter: "0.3mm", viaPadDiameter: "0.6mm" }, children: [jsxRuntime.jsx("net", { name: "GND", isGroundNet: true }), jsxRuntime.jsx("net", { name: "VBUS", isPowerNet: true }), jsxRuntime.jsx("net", { name: "V3V3", isPowerNet: true }), jsxRuntime.jsx("net", { name: "V3V3_SD", isPowerNet: true, routingPhaseIndex: 0 }), jsxRuntime.jsx("net", { name: "V3V3_MCU", isPowerNet: true, routingPhaseIndex: 0 }), jsxRuntime.jsx("net", { name: "VBUS_ESD", isPowerNet: true, routingPhaseIndex: 0 }), jsxRuntime.jsx("net", { name: "BOOT", routingPhaseIndex: 0 }), SD_LANES.filter((l) => l.cardNet).map((l) => (jsxRuntime.jsx(react.Fragment, { children: jsxRuntime.jsx("net", { name: l.cardNet, routingPhaseIndex: 0 }) }, l.cardNet))), jsxRuntime.jsx("schematicsection", { name: "Usb", displayName: "USB-C Plug & ESD" }), jsxRuntime.jsx("schematicsection", { name: "Mcu", displayName: "ESP32-S3-WROOM-1" }), jsxRuntime.jsx("schematicsection", { name: "BootReset", displayName: "Boot / Reset" }), jsxRuntime.jsx("schematicsection", { name: "Power", displayName: "5V -> 3.3V Regulation" }), jsxRuntime.jsx("schematicsection", { name: "Indicator", displayName: "Status LED" }), jsxRuntime.jsx("schematicsection", { name: "MicroSd", displayName: "MicroSD (4-bit SDMMC)" }), jsxRuntime.jsx("schematicsection", { name: "Test", displayName: "Test Pads" }), jsxRuntime.jsx("autoroutingphase", { phaseIndex: 0, pcbTracePaths: LOCKED_PATHS }), jsxRuntime.jsx(U261_121N_4BS2S, { name: "J1", pcbX: 0, pcbY: 37.95, pcbRotation: 180, schX: SEC.Usb.x, schY: SEC.Usb.y, schSectionName: "Usb" }), jsxRuntime.jsx("resistor", { name: "R11", resistance: "5.1k", footprint: "0402", supplierPartNumbers: JLC.R_5K1_0402, pcbX: R11_C.x, pcbY: R11_C.y, schSectionName: "Usb", schX: SEC.Usb.x - 5, schY: SEC.Usb.y - 2 }), jsxRuntime.jsx(USBLC6_2SC6, { name: "U3", pcbX: 4.5, pcbY: 27.8, schSectionName: "Usb", schX: SEC.Usb.x + 6, schY: SEC.Usb.y - 3 }), jsxRuntime.jsx("resistor", { name: "R3", resistance: "22", footprint: "0402", supplierPartNumbers: JLC.R_22_0402, pcbX: R3_C.x, pcbY: R3_C.y, pcbRotation: 270, schSectionName: "Usb", schX: SEC.Usb.x + 3, schY: SEC.Usb.y - 6 }), jsxRuntime.jsx("resistor", { name: "R4", resistance: "22", footprint: "0402", supplierPartNumbers: JLC.R_22_0402, pcbX: R4_C.x, pcbY: R4_C.y, pcbRotation: 270, schSectionName: "Usb", schX: SEC.Usb.x - 3, schY: SEC.Usb.y - 6 }), jsxRuntime.jsx("trace", { from: "J1.VBUS1", to: "net.VBUS", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "J1.VBUS2", to: "net.VBUS", thickness: "0.3mm" }), jsxRuntime.jsx("trace", { from: "J1.GND1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.GND2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.GND3", to: "J1.SHELL1", thickness: "0.3mm", pcbPath: [] }), jsxRuntime.jsx("trace", { from: "J1.SHELL1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "J1.SHELL2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "R11.pin1", to: "J1.CC1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R11.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { name: "USB_DP_conn", from: "U3.IO1_B", to: "J1.DP1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { name: "USB_DN_conn", from: "U3.IO2_B", to: "J1.DN1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { name: "USB_DP_pair", from: "U3.IO1", to: "R3.pin1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { name: "USB_DN_pair", from: "U3.IO2", to: "R4.pin1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R3.pin2", to: "U1.USB_D_POS", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R4.pin2", to: "U1.USB_D_NEG", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "U3.GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U3.VBUS", to: "net.VBUS_ESD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("resistor", { name: "R21", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: R21_C.x, pcbY: R21_C.y, schSectionName: "Usb", schX: SEC.Usb.x + 9, schY: SEC.Usb.y - 6 }), jsxRuntime.jsx("trace", { from: "R21.pin1", to: "net.VBUS", thickness: "0.3mm" }), jsxRuntime.jsx("trace", { from: "R21.pin2", to: "net.VBUS_ESD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("capacitor", { name: "C9", capacitance: "100nF", footprint: "0402", supplierPartNumbers: JLC.C_100N_0402, 
            // its link to U3.VBUS runs ~3.8mm (1mm default)
            maxDecouplingTraceLength: "5mm", pcbX: C9_C.x, pcbY: C9_C.y, pcbRotation: 180, schOrientation: "vertical", schSectionName: "Usb", schX: SEC.Usb.x + 6, schY: SEC.Usb.y - 6 }), jsxRuntime.jsx("trace", { from: "C9.pin1", to: "net.VBUS_ESD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C9.pin2", to: "net.GND" }), jsxRuntime.jsx(TLV75733PDRVR, { name: "U2", pcbX: 0, pcbY: 15.5, pcbRotation: 90, schSectionName: "Power", schX: SEC.Power.x, schY: SEC.Power.y - 0.68 }), jsxRuntime.jsx("capacitor", { name: "C1", capacitance: "10uF", footprint: "0805", supplierPartNumbers: JLC.C_10U_0805, schOrientation: "vertical", pcbX: -3.5, pcbY: 17.4, pcbRotation: 180, schSectionName: "Power", schX: SEC.Power.x - 4, schY: SEC.Power.y }), jsxRuntime.jsx("capacitor", { name: "C2", capacitance: "22uF", footprint: "0805", supplierPartNumbers: JLC.C_22U_0805, schOrientation: "vertical", pcbX: -3.5, pcbY: 13.6, pcbRotation: 180, schSectionName: "Power", schX: SEC.Power.x + 4, schY: SEC.Power.y }), jsxRuntime.jsx("trace", { from: "net.VBUS", to: "U2.IN", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "U2.EN", to: "U2.IN", thickness: "0.3mm", pcbPath: [{ x: 0.65, y: 17.05 }, { x: -0.65, y: 17.05 }].map(u2) }), jsxRuntime.jsx("trace", { from: "U2.GND", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U2.OUT", to: "net.V3V3", thickness: "0.3mm" }), jsxRuntime.jsx("trace", { from: "C1.pin1", to: "net.VBUS", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "C1.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "C2.pin1", to: "net.V3V3", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "C2.pin2", to: "net.GND" }), jsxRuntime.jsx("resistor", { name: "R19", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: R19_C.x, pcbY: R19_C.y, pcbRotation: 180, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 9, schY: SEC.MicroSd.y + 3 }), jsxRuntime.jsx("trace", { from: "R19.pin1", to: "net.V3V3", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "R19.pin2", to: "net.V3V3_SD", thickness: "0.5mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("resistor", { name: "R20", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: R20_C.x, pcbY: R20_C.y, schSectionName: "Mcu", schX: SEC.Mcu.x - 8, schY: SEC.Mcu.y - 1 }), jsxRuntime.jsx("trace", { from: "R20.pin1", to: "net.V3V3", thickness: "0.4mm" }), jsxRuntime.jsx("trace", { from: "R20.pin2", to: "net.V3V3_MCU", thickness: "0.5mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C8.pin1", to: "net.V3V3_MCU", thickness: "0.5mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("resistor", { name: "R1", resistance: "10k", footprint: "0402", supplierPartNumbers: JLC.R_10K_0402, pcbX: -1, pcbY: 10, pcbRotation: 180, schSectionName: "BootReset", schX: SEC.BootReset.x, schY: SEC.BootReset.y + 4.58 }), jsxRuntime.jsx("capacitor", { name: "C5", capacitance: "1uF", footprint: "0402", supplierPartNumbers: JLC.C_1U_0402, schOrientation: "vertical", pcbX: -4, pcbY: 10, schSectionName: "BootReset", schX: SEC.BootReset.x + 4, schY: SEC.BootReset.y + 4 }), jsxRuntime.jsx(TS_1187A_B_A_B, { name: "SW2", pcbX: -7, pcbY: 7, schSectionName: "BootReset", schX: SEC.BootReset.x, schY: SEC.BootReset.y }), jsxRuntime.jsx("trace", { from: "U1.EN", to: "R1.pin2" }), jsxRuntime.jsx("trace", { from: "U1.EN", to: "C5.pin1" }), jsxRuntime.jsx("trace", { from: "U1.EN", to: "SW2.pin1" }), jsxRuntime.jsx("trace", { from: "R1.pin1", to: "net.V3V3" }), jsxRuntime.jsx("trace", { from: "C5.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SW2.pin3", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SW2.pin2", to: "SW2.pin1" }), jsxRuntime.jsx("trace", { from: "SW2.pin4", to: "SW2.pin3" }), jsxRuntime.jsx("resistor", { name: "R2", resistance: "10k", footprint: "0402", supplierPartNumbers: JLC.R_10K_0402, pcbX: R2_C.x, pcbY: R2_C.y, schSectionName: "BootReset", schX: SEC.BootReset.x, schY: SEC.BootReset.y - 8 }), jsxRuntime.jsx(TS_1187A_B_A_B, { name: "SW1", pcbX: 7, pcbY: 7, schSectionName: "BootReset", schX: SEC.BootReset.x, schY: SEC.BootReset.y - 12 }), jsxRuntime.jsx("trace", { from: "SW1.pin1", to: "net.BOOT", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "SW1.pin2", to: "net.BOOT", thickness: "0.25mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R2.pin2", to: "net.BOOT", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "U1.BOOT", to: "net.BOOT", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R2.pin1", to: "net.V3V3" }), jsxRuntime.jsx("trace", { from: "SW1.pin3", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SW1.pin4", to: "SW1.pin3" }), jsxRuntime.jsx("resistor", { name: "R5", resistance: "330", footprint: "0402", supplierPartNumbers: JLC.R_330_0402, schOrientation: "vertical", pcbX: R5_C.x, pcbY: R5_C.y, pcbRotation: 90, schSectionName: "Indicator", schX: SEC.Indicator.x, schY: SEC.Indicator.y }), jsxRuntime.jsx(XL_1608UBC_04, { name: "LED1", schRotation: 90, pcbX: LED1_C.x, pcbY: LED1_C.y, pcbRotation: 90, schSectionName: "Indicator", schX: SEC.Indicator.x, schY: SEC.Indicator.y - 3 }), jsxRuntime.jsx("trace", { from: "U1.LED_GPIO", to: "R5.pin1", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "R5.pin2", to: "LED1.anode", thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "LED1.cathode", to: "net.GND" }), jsxRuntime.jsx(TF_01A, { name: "SD1", pcbX: 0, pcbY: -7, pcbRotation: 90, schHeight: 1.4, schSectionName: "MicroSd", schX: SEC.MicroSd.x, schY: SEC.MicroSd.y + 2.82 }), SD_PULLUPS.map((p) => (jsxRuntime.jsx("resistor", { name: p.name, resistance: "10k", footprint: "0402", supplierPartNumbers: JLC.R_10K_0402, pcbX: SD_PULLUP_X, pcbY: p.y, schSectionName: "MicroSd", schX: SEC.MicroSd.x + p.sch.x, schY: SEC.MicroSd.y + p.sch.y }, p.name))), jsxRuntime.jsx("capacitor", { name: "C7", capacitance: "100nF", footprint: "0402", supplierPartNumbers: JLC.C_100N_0402, 
            // locked 1.5mm links to the VDD contact and R7 (1mm default)
            maxDecouplingTraceLength: "3mm", schOrientation: "vertical", pcbX: C7_C.x, pcbY: C7_C.y, pcbRotation: 180, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 3, schY: SEC.MicroSd.y + 3 }), jsxRuntime.jsx("capacitor", { name: "C8", capacitance: "10uF", footprint: "0805", supplierPartNumbers: JLC.C_10U_0805, 
            // it sits on the locked module 3V3 feed (R20 -> C8 -> U1.3V3, ~50mm)
            maxDecouplingTraceLength: "60mm", schOrientation: "vertical", pcbX: C8_C.x, pcbY: C8_C.y, pcbRotation: 180, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 6, schY: SEC.MicroSd.y + 3 }), jsxRuntime.jsx("resistor", { name: "R18", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: -3.17, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 14, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("resistor", { name: "R14", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: -1.9, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x + 6, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("resistor", { name: "R15", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: -0.63, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x + 2, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("resistor", { name: "R13", resistance: "22", footprint: "0402", supplierPartNumbers: JLC.R_22_0402, pcbX: 0.64, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 2, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("resistor", { name: "R16", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: 1.91, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 6, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("resistor", { name: "R17", resistance: "0", footprint: "0402", supplierPartNumbers: JLC.R_0_0402, pcbX: 3.18, pcbY: SD_RES_Y, pcbRotation: 270, schSectionName: "MicroSd", schX: SEC.MicroSd.x - 10, schY: SEC.MicroSd.y - 3 }), jsxRuntime.jsx("trace", { from: "SD1.VDD", to: "net.V3V3_SD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C7.pin1", to: "net.V3V3_SD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "TP1.pin1", to: "net.V3V3_SD", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C7.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "C8.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SD1.VSS", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SD1.GND1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SD1.GND2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SD1.GND3", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "SD1.GND4", to: "net.GND" }), SD_LANES.map((l) => l.cardNet ? (jsxRuntime.jsxs(react.Fragment, { children: [jsxRuntime.jsx("trace", { from: l.pad, to: `net.${l.cardNet}`, thickness: "0.2mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: `${l.res}.pin1`, to: `net.${l.cardNet}`, thickness: "0.2mm", routingPhaseIndex: 0 })] }, l.name)) : (jsxRuntime.jsx("trace", { name: `${l.name}_lane`, from: l.pad, to: `${l.res}.pin1`, thickness: "0.2mm", routingPhaseIndex: 0 }, l.name))), SD_LANES.map((l) => (jsxRuntime.jsx("trace", { from: `${l.res}.pin2`, to: l.mcu, thickness: "0.2mm", routingPhaseIndex: 0 }, `${l.name}_mcu`))), SD_PULLUPS.map((p) => (jsxRuntime.jsx("trace", { from: `${p.name}.pin2`, to: `net.${p.net}`, thickness: "0.2mm", routingPhaseIndex: 0 }, `${p.name}_stub`))), SD_PULLUPS.map((p) => (jsxRuntime.jsx("trace", { from: `${p.name}.pin1`, to: "net.V3V3_SD", thickness: p.name === "R7" ? "0.4mm" : "0.3mm", routingPhaseIndex: 0 }, `${p.name}_3v3`))), jsxRuntime.jsx(ESP32_S3_WROOM_1_N16R8, { name: "U1", pcbX: 0, pcbY: -32, pcbRotation: 180, schHeight: 4.2, schSectionName: "Mcu", schX: SEC.Mcu.x, schY: SEC.Mcu.y }), jsxRuntime.jsx("trace", { from: "U1.3V3", to: "net.V3V3_MCU", thickness: "0.5mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C3.pin1", to: "net.V3V3_MCU", thickness: "0.3mm", routingPhaseIndex: 0 }), jsxRuntime.jsx("trace", { from: "C4.pin1", to: "net.V3V3_MCU", thickness: "0.3mm", routingPhaseIndex: 0 }), GND_STITCH_VIAS.map((v) => (jsxRuntime.jsx(react.Fragment, { children: jsxRuntime.jsx("via", { pcbX: v.x, pcbY: v.y, fromLayer: "top", toLayer: "bottom", holeDiameter: "0.3mm", outerDiameter: `${v.d}mm`, connectsTo: "net.GND", tented: "both_sides" }) }, `gnd_via_${v.x}_${v.y}`))), jsxRuntime.jsx("trace", { from: "U1.GND1", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "U1.GND2", to: "net.GND" }), jsxRuntime.jsx("capacitor", { name: "C3", capacitance: "10uF", footprint: "0805", supplierPartNumbers: JLC.C_10U_0805, 
            // locked ~5mm link to C4 (1mm default)
            maxDecouplingTraceLength: "10mm", schOrientation: "vertical", pcbX: C3_C.x, pcbY: C3_C.y, pcbRotation: 90, schSectionName: "Mcu", schX: SEC.Mcu.x - 5, schY: SEC.Mcu.y - 3 }), jsxRuntime.jsx("capacitor", { name: "C4", capacitance: "100nF", footprint: "0402", supplierPartNumbers: JLC.C_100N_0402, 
            // locked ~2.6mm link to the 3V3 pad (1mm default)
            maxDecouplingTraceLength: "5mm", schOrientation: "vertical", pcbX: C4_C.x, pcbY: C4_C.y, pcbRotation: 90, schSectionName: "Mcu", schX: SEC.Mcu.x - 5, schY: SEC.Mcu.y - 5 }), jsxRuntime.jsx("trace", { from: "C3.pin2", to: "net.GND" }), jsxRuntime.jsx("trace", { from: "C4.pin2", to: "net.GND" }), jsxRuntime.jsx("testpoint", { name: "TP1", footprintVariant: "pad", padShape: "circle", padDiameter: "1.5mm", layer: "bottom", pcbX: TP_3V3.x, pcbY: TP_3V3.y, doNotPlace: true, schSectionName: "Test", schX: SEC.Test.x, schY: SEC.Test.y + 4 }), jsxRuntime.jsx("silkscreentext", { text: "3V3", layer: "bottom", pcbX: TP_3V3.x, pcbY: TP_3V3.y - 1.2, fontSize: "0.5mm", anchorAlignment: "center" }), TEST_PADS.map((tp, i) => (jsxRuntime.jsx("testpoint", { name: tp.name, footprintVariant: "pad", padShape: "circle", padDiameter: "1mm", pcbX: tp.at.x, pcbY: tp.at.y, doNotPlace: true, schSectionName: "Test", schX: SEC.Test.x, schY: SEC.Test.y + 2.5 - i * 1.5 }, tp.name))), TEST_PADS.map((tp) => (jsxRuntime.jsx("trace", { from: `${tp.name}.pin1`, to: tp.to, ...(tp.name === "TP5" ? { thickness: "0.2mm", routingPhaseIndex: 0 } : {}) }, `${tp.name}_net`))), TEST_PADS.map((tp) => (jsxRuntime.jsx(react.Fragment, { children: jsxRuntime.jsx("silkscreentext", { text: tp.label, pcbX: tp.labelAt.x, pcbY: tp.labelAt.y, fontSize: "0.5mm", anchorAlignment: "center" }) }, `${tp.name}_label`))), jsxRuntime.jsx("keepout", { shape: "rect", layer: "top", pcbX: 12.7, pcbY: EDGE_FENCE.pcbY, width: 0.6, height: EDGE_FENCE.height }), jsxRuntime.jsx("keepout", { shape: "rect", layer: "bottom", pcbX: 12.7, pcbY: EDGE_FENCE.pcbY, width: 0.6, height: EDGE_FENCE.height }), jsxRuntime.jsx("keepout", { shape: "rect", layer: "top", pcbX: -12.75, pcbY: EDGE_FENCE.pcbY, width: 0.5, height: EDGE_FENCE.height }), jsxRuntime.jsx("keepout", { shape: "rect", layer: "bottom", pcbX: -12.75, pcbY: EDGE_FENCE.pcbY, width: 0.5, height: EDGE_FENCE.height }), jsxRuntime.jsx("keepout", { shape: "rect", layer: "top", ...ANTENNA_KEEPOUT }), jsxRuntime.jsx("keepout", { shape: "rect", layer: "bottom", ...ANTENNA_KEEPOUT }), jsxRuntime.jsx("copperpour", { name: "U2_out_pour", connectsTo: "net.V3V3", layer: "top", outline: [
                { x: -3.7, y: 12.4 },
                { x: -0.3, y: 12.4 },
                { x: -0.3, y: 14.85 },
                { x: -3.7, y: 14.85 },
            ] }), jsxRuntime.jsx("copperpour", { connectsTo: "net.GND", layer: "top", clearance: "0.2mm", boardEdgeMargin: "1mm" }), jsxRuntime.jsx("copperpour", { connectsTo: "net.GND", layer: "bottom", clearance: "0.2mm", boardEdgeMargin: "1mm" })] }));

module.exports = index_circuit;