/*
  xsns_62_esp32_mi.h - MI-BLE-sensors via ESP32 support for Tasmota

  Copyright (C) 2021  Christian Baars and Theo Arends

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/
#ifdef USE_MI_ESP32

#pragma once

#include <NimBLEDevice.h>

/*********************************************************************************************\
 * structs and types
\*********************************************************************************************/
#pragma pack(1)  // byte-aligned structures to read the sensor data

struct frame_crtl_t{
  uint16_t reserved1:1;
  uint16_t reserved2:1;
  uint16_t reserved3:1;
  uint16_t isEncrypted:1;
  uint16_t includesMAC:1;
  uint16_t includesCapability:1;
  uint16_t includesObj:1;
  uint16_t MESH:1;
  uint16_t registered:1;
  uint16_t solicited:1;
  uint16_t AuthMode:2;
  uint16_t version:4;
};

struct mi_payload_t{
  uint16_t type;
  uint8_t size;
  union {
    struct{ //0d
      int16_t temp;
      uint16_t hum;
    }HT;
    uint8_t bat; //0a
    int16_t temp; //04
    uint16_t hum; //06
    uint32_t lux; //07
    uint8_t moist; //08
    uint16_t fert; //09
    uint8_t leak; //14
    uint32_t NMT; //17
    uint8_t door; //19
    uint16_t objID; //0x0002
    struct{ //01
      uint8_t num;
      uint8_t value;
      uint8_t type;
    }Btn;
  };
  uint8_t padding[12]; //for decryption
};

struct mi_beacon_t{
  frame_crtl_t frame;
  uint16_t productID;
  uint8_t counter;
  uint8_t MAC[6];
  uint8_t capability;
  mi_payload_t payload;
};


struct cg_packet_t {
  uint16_t frameID;
  uint8_t MAC[6];
  uint16_t mode;
  union {
    struct {
    int16_t temp;  // -9 - 59 °C
    uint16_t hum;
    };
    uint8_t bat;
  };
};

struct encPacket_t{
  // the packet is longer, but this part is enough to decrypt
  uint16_t PID;
  uint8_t frameCnt;
  uint8_t MAC[6];
  uint8_t payload[16]; // only a pointer to the address, size is variable
};

struct berryAdvPacket_t{
  uint8_t MAC[6];
  uint8_t addressType;
  uint8_t RSSI;
  uint8_t length;      // length of payload
#ifdef CONFIG_BT_NIMBLE_EXT_ADV
  uint8_t payload[255];
#else
  uint8_t payload[62]; // legacy advertisement plus scan response
#endif
};


union mi_bindKey_t{
  struct{
    uint8_t key[16];
    uint8_t MAC[6];
    };
  uint8_t buf[22];
};

struct ATCPacket_t{ //and PVVX
  uint8_t MAC[6];
  union {
    struct{
      uint16_t temp; //sadly this is in wrong endianess
      uint8_t hum;
      uint8_t batPer;
      uint16_t batMV;
      uint8_t frameCnt;
    } A; //ATC
    struct{
      int16_t temp;
      uint16_t hum; // x 0.01 %
      uint16_t batMV;
      uint8_t batPer;
      uint8_t frameCnt;
      struct {
        uint8_t reed:1;
        uint8_t TRGval:1;
        uint8_t TRGcrtl:1;
        uint8_t tempTrig:1;
        uint8_t humTrig:1;
        uint8_t spare:3;
      };
    }P; //PVVX
  };
};

// Xiaomi Mi Body Composition Scale (MIBCS/MIBFS), service data of UUID 0x181B, 13 bytes, little endian
struct MiScalePacket_t {
  uint8_t flagsA;     // bit0: unit lb, bit2: "part"/partial result
  uint8_t flagsB;     // bit1: impedance stable, bit5: weight stable, bit6: unit jin, bit7: finished (user stepped off)
  uint16_t year;
  uint8_t month;
  uint8_t day;
  uint8_t hour;
  uint8_t minute;
  uint8_t second;
  uint16_t impedance; // ohms; 0xFFFE = measuring, 0xFFFD = failed
  uint16_t weight;    // raw; /200 for kg, /100 for lb and jin; 0xFFF0 = overload
} __attribute__((packed));

union BTHome_info_t{
  struct{
    uint8_t encrypted:1;
    uint8_t reserved:1;
    uint8_t triggered:1;
    uint8_t reserved2:2;
    uint8_t version:2;
  };
  char byte_value;
};

struct BLERingBufferItem_t{
  uint16_t returnCharUUID;
  uint16_t handle;
  uint32_t type;
  uint8_t length;
};

#pragma pack(0)


struct MI32connectionContextBerry_t{
  NimBLEUUID serviceUUID;
  NimBLEUUID charUUID;
  uint16_t returnCharUUID;
  uint16_t handle;
  uint16_t itvl_min;
  uint16_t itvl_max;
  uint8_t * buffer;
  // Reverse-role client (peripheral side). Singleton owned by NimBLEServer
  // (do NOT pass to NimBLEDevice::deleteClient). Use only for server-side
  // ACNS-style queries toward the connected central. Set in
  // MI32ServerCallbacks::onConnect, cleared (not freed) in onDisconnect.
  NimBLEClient * serverPeer = nullptr;
  uint8_t MAC[6];
  uint8_t operation;
  uint8_t addrType;
  int error;
  int32_t arg1;
  uint32_t pin;
  bool hasArg1;
  bool oneOp;
  bool response;
};

struct {
  // uint32_t period;             // set manually in addition to TELE-period, is set to TELE-period after start
  TaskHandle_t ScanTask = nullptr;
  TaskHandle_t ConnTask = nullptr;
  MI32connectionContextBerry_t *conCtx = nullptr;
  uint16_t connID;
  union {
    struct {
      uint32_t init:1;
      uint32_t connected:1;
      uint32_t autoScan:1;
      // uint32_t canScan:1;
      uint32_t runningScan:1;
      uint32_t updateScan:1;
      uint32_t deleteScanTask:1;
      uint32_t IRKinCfg:1;


      uint32_t canConnect:1;
      uint32_t willConnect:1;

      uint32_t shallTriggerTele:1;
      uint32_t triggeredTele:1;
      uint32_t shallShowStatusInfo:1; // react to amount of found sensors via RULES
      uint32_t didGetConfig:1;

      uint32_t triggerBerryAdvCB:1;
      uint32_t triggerBerryConnCB:1;
      uint32_t triggerNextJob:1;
      uint32_t readyForNextJob:1;
      uint32_t discoverAttributes:1;

      uint32_t deleteConnectionTask:1; // request server-task teardown (renamed from deleteServerTask)
    };
    uint32_t all = 0;
  } mode;
  struct {
    uint8_t sensor;             // points to to the number 0...255
  } state;
  struct {
    uint32_t allwaysAggregate:1; // always show all known values of one sensor in brdigemode
    uint32_t noSummary:1;        // no sensor values at TELE-period
    uint32_t directBridgeMode:1; // send every received BLE-packet as a MQTT-message in real-time
    uint32_t activeScan:1;
    uint32_t ignoreBogusBattery:1;
    uint32_t handleEveryDevice:1;
  } option;
#ifdef USE_MI_EXT_GUI
  uint32_t widgetSlot = 0;
#ifdef USE_ENERGY_SENSOR
  uint8_t energy_history[24];
#endif //USE_ENERGY_SENSOR
#endif //USE_MI_EXT_GUI

  void *beConnCB;
  void *beAdvCB;
  uint8_t *beAdvBuf;
  uint16_t queueDrops = 0;
  uint8_t role = 0; // bitfield of MI32Role values (concurrently active roles)
} MI32;

struct mi_sensor_t{
  uint8_t type; //Flora = 1; MI-HT_V1=2; LYWSD02=3; LYWSD03=4; CGG1=5; CGD1=6
  uint8_t lastCnt; //device generated counter of the packet
  uint8_t shallSendMQTT;
  uint8_t MAC[6];
  uint16_t PID;
  uint8_t *key = nullptr;
  char *name = nullptr;
  union {
    struct {
      uint32_t needsKey:1;
      uint32_t temp:1;
      uint32_t hum:1;
      uint32_t tempHum:1; //every hum sensor has temp too, easier to use Tasmota dew point functions
      uint32_t lux:1;
      uint32_t moist:1;
      uint32_t fert:1;
      uint32_t bat:1;
      uint32_t NMT:1;
      uint32_t motion:1;
      uint32_t Btn:1;
      uint32_t knob:1;
      uint32_t door:1;
      uint32_t leak:1;
      uint32_t payload:1;
      uint32_t weight:1;    // body composition scale
      uint32_t impedance:1; // body composition scale
    };
    uint32_t raw = 0;
  } feature;
  union {
    struct {
      uint32_t temp:1;
      uint32_t hum:1;
      uint32_t tempHum:1; //can be combined from the sensor
      uint32_t lux:1;
      uint32_t moist:1;
      uint32_t fert:1;
      uint32_t bat:1;
      uint32_t NMT:1;
      uint32_t motion:1;
      uint32_t noMotion:1;
      uint32_t Btn:1;
      uint32_t knob:1;
      uint32_t longpress:1; //needs no extra feature bit, because knob is sufficient
      uint32_t door:1;
      uint32_t leak:1;
      uint32_t payload:1;
      uint32_t weight:1;          // stable weight available
      uint32_t impedance:1;       // stable impedance available
      uint32_t impedanceFailed:1; // session ended without a usable impedance
    };
    uint32_t raw = 0;
  } eventType;
  union{
    struct{
      uint8_t hasWrongKey:1;
      uint8_t isUnbounded:1;
    };
    uint8_t raw = 0;
  } status;

  int RSSI = 0;
  uint32_t lastTime = 0;
  uint32_t lux;
  uint8_t lux_history[24];
  float temp; //Flora, MJ_HT_V1, LYWSD0x, CGx
  uint8_t temp_history[24];
  union {
    struct {
      uint8_t moisture;
      uint16_t fertility;
      char firmware[6]; // actually only for FLORA but hopefully we can add for more devices
    }; // Flora
    struct {
      float hum;
      uint8_t hum_history[24];
    };
    struct { // MIBCS / MIBFS body composition scale
      float weight;             // in the unit the scale reports (see weightUnit)
      uint16_t impedance;       // ohms, 0 = not measured
      uint8_t weightUnit;       // 0 = kg, 1 = lb, 2 = jin
      uint8_t scaleState;       // session bookkeeping, see MI32_SCALE_* flags
      uint32_t scaleLastSeen;   // uptime of last packet, for session timeout
      uint8_t weight_history[24];
    };
    struct {
      uint16_t events; //"alarms" since boot
      uint32_t NMT;    // no motion time in seconds for the MJYD2S and NLIGHT
    };
    struct {
      uint8_t Btn;     // number starting with 0
      uint8_t BtnType; // 0 -single, 1 - double, 2 - hold
      uint8_t leak; // the leak sensor is the only non-RC device so far with a button fuctionality, so we handle it here
      int8_t dimmer;
      uint8_t pressed; // dimmer knob pressed while rotating
      uint8_t longpress; // dimmer knob pressed without rotating
    };
    uint8_t door;

  };
  union {
      uint8_t bat; // many values seem to be hard-coded garbage (LYWSD0x, GCD1)
  };
  struct {
    uint8_t * payload = nullptr;
    uint8_t payload_len;
  };
};

/*********************************************************************************************\
 * constants
\*********************************************************************************************/

#define D_CMND_MI32 "MI32"

const char kMI32_Commands[] PROGMEM = D_CMND_MI32 "|Key|Name|Cfg|Option";

void (*const MI32_Commands[])(void) PROGMEM = {&CmndMi32Key, &CmndMi32Name,&CmndMi32Cfg, &CmndMi32Option };

#define UNKNOWN_MI  0
#define FLORA       1
#define MJ_HT_V1    2
#define LYWSD02     3
#define LYWSD03MMC  4
#define CGG1        5
#define CGD1        6
#define NLIGHT      7
#define MJYD2S      8
#define YLYK01      9
#define MHOC401     10
#define MHOC303     11
#define ATC         12
#define MCCGQ02     13
#define SJWS01L     14
#define PVVX        15
#define YLKG08      16
#define YLAI003     17
#define BTHOME      18
#define MIBCS       19

#define MI32_TYPES    19 //count this manually

const uint16_t kMI32DeviceID[MI32_TYPES]={ 0x0098, // Flora
                                  0x01aa, // MJ_HT_V1
                                  0x045b, // LYWSD02
                                  0x055b, // LYWSD03
                                  0x0347, // CGG1
                                  0x0576, // CGD1
                                  0x03dd, // NLIGHT
                                  0x07f6, // MJYD2S
                                  0x0153, // YLYK01, old name yee-rc
                                  0x0387, // MHO-C401
                                  0x06d3, // MHO-C303
                                  0x0a1c, // ATC -> this is a fake ID
                                  0x098b, // MCCGQ02
                                  0x0863, // SJWS01L
                                  0x944a, // PVVX -> this is a fake ID
                                  0x03b6, // YLKG08 and YLKG07 - version w/wo mains
                                  0x07bf, // YLAI003
                                  0xb770, // BTHome -> fake ID
                                  0x181b, // MIBCS/MIBFS body composition scale -> fake ID (service UUID)
                                  };

const char kMI32DeviceType[] PROGMEM = {"Flora|MJ_HT_V1|LYWSD02|LYWSD03|CGG1|CGD1|NLIGHT|MJYD2S|YLYK01|MHOC401|MHOC303|ATC|MCCGQ02|SJWS01L|PVVX|YLKG08|YLAI003|BTHOME|MIBCS"};

const char kMI32_ScaleUnit[] PROGMEM = "kg|lb|jin";

// scaleState flags
#define MI32_SCALE_WEIGHT_SENT     0x01
#define MI32_SCALE_IMPEDANCE_SENT  0x02
#define MI32_SCALE_FAILED_SENT     0x04
#define MI32_SCALE_FINISHED        0x08
#define MI32_SCALE_SESSION_TIMEOUT 10 // seconds of silence that end a weighing session

const char kMI32_ButtonMsg[] PROGMEM = "Single|Double|Hold"; //mapping: in Tasmota: 1,2,3 ; for HomeKit and Xiaomi 0,1,2
/*********************************************************************************************\
 * enumerations
\*********************************************************************************************/

enum MI32_Commands {          // commands useable in console or rules
  CMND_MI32_KEY,              // add bind key to a mac for packet decryption
  CMND_MI32_CFG,              // save config file as JSON with all sensors w/o keys to mi32cfg
  CMND_MI32_OPTION            // change driver options at runtime
  };

enum MI32_TASK {
  MI32_TASK_SCAN = 0,
};

enum BLE_CLIENT_OP {
BLE_OP_READ = 1,
BLE_OP_WRITE,
BLE_OP_SUBSCRIBE,
BLE_OP_UNSUBSCRIBE,
BLE_OP_DISCONNECT,
BLE_OP_GET_NOTIFICATION = 103,
};

enum BLE_SERVER_OP {
//commands
BLE_OP_SET_ADV = 201,
BLE_OP_SET_SCAN_RESP,
BLE_OP_SET_CHARACTERISTIC = 211,
//response
BLE_OP_ON_READ = 221,
BLE_OP_ON_WRITE,
BLE_OP_ON_UNSUBSCRIBE,
BLE_OP_ON_SUBSCRIBE_TO_NOTIFICATIONS,
BLE_OP_ON_SUBSCRIBE_TO_INDICATIONS,
BLE_OP_ON_SUBSCRIBE_TO_NOTIFICATIONS_AND_INDICATIONS,
BLE_OP_ON_CONNECT,
BLE_OP_ON_DISCONNECT,
BLE_OP_ON_STATUS,
BLE_OP_ON_AUTHENTICATED
};

enum MI32_ConnErrorMsg {
  MI32_CONN_NO_ERROR = 0,
  MI32_CONN_NO_CONNECT,
  MI32_CONN_DID_DISCCONNECT,
  MI32_CONN_NO_SERVICE,
  MI32_CONN_NO_CHARACTERISTIC,
  MI32_CONN_CAN_NOT_READ,
  MI32_CONN_CAN_NOT_NOTIFY,
  MI32_CONN_CAN_NOT_WRITE,
  MI32_CONN_DID_NOT_WRITE,
  MI32_CONN_NOTIFY_TIMEOUT
};

// MI32.role bit layout (concurrently-active roles, not mutually exclusive)
enum MI32Role : uint8_t {
  MI32_ROLE_NONE       = 0x00,
  MI32_ROLE_SCAN       = 0x01,
  MI32_ROLE_CLIENT     = 0x02,
  MI32_ROLE_SERVER     = 0x04,
  MI32_ROLE_ADVERTISER = 0x08,
};

/*********************************************************************************************\
 * extended web gui
\*********************************************************************************************/

#ifdef USE_WEBSERVER
#ifdef USE_MI_EXT_GUI
const char HTTP_BTN_MENU_MI32[] PROGMEM = "<p></p><form action='m32' method='get'><button>Dashboard</button></form>";

  const char HTTP_MI32_BOOTSTRAP[] PROGMEM =
    "wl(_=>fetch('/m32?wi=0').then(r=>r.text()).then(t=>{"
    "d=document;" // this is global now
    "x=d.createElement('div');"
    "x.innerHTML=t;" // was global already
    "x.querySelectorAll('style').forEach(n=>d.head.appendChild(n.cloneNode(1)));"
    "x.querySelectorAll('script').forEach(n=>{s=d.createElement('script');s.textContent=n.textContent;d.body.appendChild(s)});"
    "eb('m').innerHTML=(x.querySelector('body')||x).innerHTML;"
    "}));";

const char HTTP_MI32_WIDGET[] PROGMEM =
  "<div class='box' id='box%u' style='opacity:%u.5;'>MAC:%s RSSI:%d %s<br>"
  "<small>&zwnj;%s</small>"
  "<h2 style='margin-top:0em;'>%s"
  "{ci}" // circle animation
  "</h2>";

#ifdef USE_MI_ESP32_ENERGY
const char HTTP_MI32_POWER_WIDGET[] PROGMEM =
  "<div class='box' id='box%u'>"
   "<h2 style='margin-top:0em;'>Energy"
  "</h2>"
  "<p>" D_VOLTAGE ": %s " D_UNIT_VOLT "</p>"
  "<p>" D_CURRENT ": %s " D_UNIT_AMPERE "</p>";
#endif //USE_MI_ESP32_ENERGY

/*
STATIC_PAGE MI32_STATIC_PAGE
    <style>
      body {
        display: flex;
        flex-direction: column;
      }
      code {
        word-break: break-all;
      }
      .parent {
        display: grid;
        grid-template-columns: repeat(auto-fill,350px);
        grid-template-rows: repeat(auto-fill,220px);
        grid-auto-rows: 220px;
        grid-auto-columns: 350px;
        gap: 1rem;
        justify-content: center;
      }
      svg { 
        float: inline-end; 
      }
      svg text {
        font-size: 0.95em;
        fill: currentColor;
      }
      .box {
        padding: 10px;
        border-radius: 0.8rem;
        background-color: rgba(221,221,221,0.2);
        overflow-y: auto;
      }
      .box svg {
        max-width: 100%;
      }
      .box.w1 { grid-column: span 1; }
      .box.w2 { grid-column: span 2; }
      .box.w3 { grid-column: span 3; }
      .box.h1 { grid-row: span 1; }
      .box.h2 { grid-row: span 2; }
      .box.h3 { grid-row: span 3; }
      @media (width < 720px) {
        .box.w2, .box.w3 { grid-column: span 1; }
        .box.h3 { grid-row: span 2; }
      }
    </style>

    <script>
    let sz=[], u=Date.now();  // sizes, count-up timestamp
    //global vars from tasmota header script for local reuse:
    // x,lt,to,tp,pc
    // d = document from the bootstrap script
    // we also have:
    // eb=s=>document.getElementById(s);
    // qs=s=>document.querySelector(s);
    // wl=f=>window.addEventListener('load',f);

    function pulse(s) { // size
      sz.push(s);
      if (sz.length > 60) sz.shift();
      lt = "(0,200,0):" + sz.join(",");
      pc = `{l,250,20,${lt}}`;
      eb('pulse').innerHTML = "AJAX: " + render(pc);
    }

    function setUp() {
      setInterval(cU, 1000); // countUp
      update();
    }

    function cU() {
      let n = Date.now(), s = Math.floor((n - u) / 1000); // now, elapsed seconds
      if (s > 0) {
        u += s * 1000;
        d.querySelectorAll('.Ti').forEach(e => e.textContent = +e.textContent + s);
      }
      x = eb('clock');
      if (x) x.innerHTML = Date().slice(4,24);
    }

    function updateMetrics(m) {
      let fk = +(m[3] / 1024).toFixed(1); // freeKB
      let tk = +(m[4] / 1024).toFixed(1); // totalKB
      let fp = +(m[7] / 1024).toFixed(0); // freePSRAM
      let tp = +(m[6] / 1024).toFixed(0); // totalPSRAM
      let fh = +(m[5]); // fragHeap

      eb('r').innerHTML = 'RSSI: ' + m[0] + ' dBm';
      eb('mo').innerHTML = 'Mode: ' + ['Low Rate','802.11b','802.11g','HT20 (11n)','HT40 (11n)','HE20 (11ax)'][m[2]] + ' / Channel: ' + m[1];
      eb('heap_gauge').innerHTML = render(`{g,50,50,${fk},0,${tk},255,102,102,0,255,255,153,40,0,200,0,80,kB}`);
      eb('psram_gauge').innerHTML = render(`{g,50,50,${fp},0,${tp},255,102,102,0,255,255,153,100,0,200,0,250,kB}`);
      eb('heap').innerHTML = 'Heap free: ' + fk + '/' + tk + ' kB<br>(frag. ' + fh + '%)';
      eb('psram').innerHTML = 'PSRAM free: ' + fp + '/' + tp + ' kB';
      eb('ut').innerHTML = 'Uptime: ' + m[8] + ' sec';
      eb('ro').innerHTML = 'BLE role: ' + ['none','observer','peripheral','central'][m[9]];
      eb('sd').innerHTML = 'MI32 sensors: ' + m[10];
    }

    function update() {
      if (d.hidden) {
        d.addEventListener('visibilitychange', update, {once:true});
        return;
      }
      fetch('/m32?wi=1').then(r => r.text()).then(html => {
        x = html.length;   // number of characters ≈ bytes
        pulse(x);                // pass size instead of true/false
        if (!html) {
          return;
        }
        let parts = html.trim().split(/[\n\r,]+/);
        if (parts.length === 11 && parts.every(p => /^-?\d+$/.test(p))) {
          updateMetrics(parts.map(Number));
          return;
        }

        let ciSVG =
          "<svg height='24' width='24' >" // style='float:right;'
          + "<circle cx='11' cy='11' r='0' fill='#90ee90' opacity='0'>"
          + "<animate attributeName='r' from='11' to='0' dur='9s' repeatCount='1'/>"
          + "<animate attributeName='opacity' from='1' to='0' dur='9s' repeatCount='1'/>"
          + "</circle></svg>";

        let replaced = html
          .replace(/{ci}/g, ciSVG)
          .replace(/\{[lLhHgG],[^}]+\}/g, match => {
            try { return render(match); }
            catch (e) {
              console.warn("DSL render error:", e);
              return "<small>graph unavailable</small>";
            }
          });

        x = d.createElement('div');
        x.innerHTML = replaced.trim();

        lt = Array.from(x.getElementsByTagName('script'));
        lt.forEach(el => el.remove());

        while (tp = x.firstElementChild) {
          to = eb(tp.id);  // old element
          if (to) to.parentNode.replaceChild(tp, to);
          else eb('pr').appendChild(tp);
        }

        lt.forEach(el => {
          let sc = d.createElement('script');
          sc.textContent = el.textContent;
          d.body.appendChild(sc).remove();
        });
      }).catch(e => {
        // console.warn("update error:", e);
      }).then(_ => setTimeout(update, 200));
    }

    setTimeout(setUp, 500);

    // Dispatcher for compact DSL only: {type,w,h,(r,g,b):v1,v2…[|…]}
    // Uppercase ⇒ WITH grid; lowercase ⇒ WITHOUT grid
    function render(payload) {
      let s = String(payload).trim();
      if (!s.startsWith("{") || !s.endsWith("}")) return "";
      let inner = s.slice(1, -1);

       // First char = type
      let typeChar = inner[0];
      let showGrid = typeChar === typeChar.toUpperCase();
      let type     = typeChar.toLowerCase();

      // Handle line/histogram with series syntax
      if ("lh".includes(type)) {
        let m = inner.match(/^([lLhH]),(\d+),(\d+),(.+)$/);
        if (!m) return "";

        let [, , wStr, hStr, sStr] = m;
        let w = +wStr;  // width
        let h = +hStr;  // height

        // Extract xl: parameter if present
        let xl = null;  // xLabels - custom X-axis labels
        let seg = sStr.split("|");
        for (let i = 0; i < seg.length; i++) {
          if (seg[i].startsWith("xl:")) {
            xl = seg[i].substring(3).split(",");
            seg.splice(i, 1);  // remove xl: segment from array
            break;
          }
        }

        let sl = seg.map(seg => {  // sl = seriesList
          let mm = seg.match(/^\((\d+),(\d+),(\d+)\):(.*)$/);
          if (!mm) return null;
          return {
            rgb:    [+mm[1], +mm[2], +mm[3]],
            values: mm[4].split(",").map(v => Number(v.trim()))
          };
        }).filter(Boolean);

        switch (type) {
          case "l":
            return renderLG(sl, w, h, showGrid, xl);
            break;
          case "h":
            if (sl.length === 1)
              return renderH(sl[0].values, sl[0].rgb, w, h, showGrid, xl);
            break;
        }
      }

      // Handle gauge DSL separately
      // Gauge DSL: {g,w,h,val,min,max,r1,g1,b1,threshold1,r2,g2,b2,threshold2,...,unit}
      // Example: {g,200,140,75,0,100,0,200,0,0,200,160,0,40,200,0,0,75,%}
      // Stops: RGB triplet + threshold value, repeating. Unit string at end.
      if (type === "g") {
        let p = inner.split(',');
        let w = +p[1], h = +p[2], val = +p[3], min = +p[4], max = +p[5];
        let stops = [];
        for (let i = 6; i < p.length - 1; i += 4) {
          stops.push({ 
            value: +p[i+3], 
            color: `rgb(${p[i]},${p[i+1]},${p[i+2]})` 
          });
        }
        let unit = p[p.length - 1];
        let showValue = (typeChar === "G");
        return renderG(val, min, max, w, h, stops, unit, showValue);
      }

      return "";
    }

    function buildGrid(w, h, mv, dL, yt = 4, cX = null) { // maxVal, dataLength, yTicks, customXLabels
      let ln = [], lb = [], xl = []; // lines, labels, xLabels
      let nm = Math.ceil(mv / 10) * 10; // niceMax
      let ti = nm / yt; // tickInterval
      if (ti <= 5) ti = 5;
      else if (ti <= 10) ti = 10;
      else if (ti <= 25) ti = 25;
      else ti = Math.ceil(ti / 50) * 50;
      nm = Math.ceil(mv / ti) * ti;
      let at = Math.ceil(nm / ti); // actualTicks
      for (let i = 0; i <= at; i++) {
        let v = i * ti;
        let y = h - (v * h / nm);
        ln.push(`<line x1="0" y1="${y}" x2="${w}" y2="${y}" stroke="#ddd" stroke-width="1"/>`);
        if (i < at) lb.push(`<text x="-5" y="${y+4}" text-anchor="end">${v}</text>`);
      }
      if (cX && cX.length > 0) { // X-axis labels - use custom if provided, otherwise default numeric
        let xs = cX.length - 1; // xSteps
        for (let i = 0; i < cX.length; i++) {
          let x = xs > 0 ? i * (w / xs) : w / 2;
          xl.push(`<text x="${x}" y="${h+20}" text-anchor="middle">${cX[i]}</text>`);
        }
      } else {
        let xs = 4; // xSteps
        for (let i = 0; i <= xs; i++) {
          let x = i * (w / xs);
          let xi = Math.round(i * (dL - 1) / xs);
          xl.push(`<text x="${x}" y="${h+20}" text-anchor="middle">${xi}</text>`);
        }
      }
      return { lines: ln.join(""), labels: lb.join(""), xl: xl.join("") };
    }

    function renderG(v, mn, mx, w, h, st, u = "", sv = true) { // value, min, max, stops, unit, showValue
      let cl = x => Math.max(mn, Math.min(mx, x)); // clamp
      let vl = cl(v); // val
      let sp = mx - mn || 1; // span
      let t = (vl - mn) / sp;
      let cx = w / 2, cy = h / 2;
      let ro = Math.min(w, h) * 0.45; // rOuter
      let ri = ro * 0.75; // rInner
      let so = ro * 0.06, si = ro * 0.35; // swOuter, swInner
      let gd = 2; // gapDeg
      let sd = -135 + gd, ed = 135 - gd, swd = ed - sd; // startDeg, endDeg, sweepDeg

      function polar(cx, cy, r, d) { // deg
        let rd = (d - 90) * Math.PI / 180; // rad
        return { x: cx + r * Math.cos(rd), y: cy + r * Math.sin(rd) };
      }
      function arcPath(cx, cy, r, a0, a1) {
        let la = Math.abs(a1 - a0) > 180 ? 1 : 0; // largeArc
        let sw = a1 > a0 ? 1 : 0; // sweep
        let p0 = polar(cx, cy, r, a0);
        let p1 = polar(cx, cy, r, a1);
        return `M ${p0.x},${p0.y} A ${r},${r} 0 ${la} ${sw} ${p1.x},${p1.y}`;
      }
      function colorFor(v) {
        if (!st.length) return "rgb(120,120,120)";
        let c = st[0].color;
        for (let i = 0; i < st.length; i++) {
          if (v >= st[i].value) c = st[i].color;
          else break;
        }
        return c;
      }
      let os = ""; // outerSegs
      for (let i = 0; i < st.length; i++) {
        let fr = (st[i].value - mn) / sp; // from
        let to = (i + 1 < st.length) ? (st[i+1].value - mn) / sp : 1;
        let a0 = sd + swd * fr, a1 = sd + swd * to;
        if (a1 <= a0) continue;
        os += `<path d="${arcPath(cx, cy, ro, a0, a1)}" stroke="${st[i].color}" stroke-width="${so}" fill="none"/>`;
      }
      let bt = `<path d="${arcPath(cx, cy, ri, sd, ed)}" stroke="rgba(120,120,120,0.25)" stroke-width="${si}" fill="none"/>`; // bgTrack
      let pc = colorFor(vl); // progColor
      let pe = sd + swd * t; // progEnd
      let ia = t > 0 ? `<path d="${arcPath(cx, cy, ri, sd, pe)}" stroke="${pc}" stroke-width="${si}" fill="none"/>` : ""; // innerArc
      let tx = ""; // text
      if (sv) {
        let fs = Math.round(Math.min(w, h) * 0.18); // fontSize
        tx = `<text x="${cx}" y="${cy}" text-anchor="middle" dominant-baseline="middle" font-size="${fs}" fill="${pc}" font-weight="600">${vl}${u}</text>`;
      }
      return `<svg width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">${os}${bt}${ia}${tx}</svg>`.trim();
    }

    function renderLG(sl, w, h, sg = true, customXL = null) { // showGrid, customXLabels
      let mv = Math.max(...sl.flatMap(s => s.values), 1); // maxVal
      let gd = sg ? buildGrid(w, h, mv, sl[0].values.length, 4, customXL) : { lines: "", labels: "", xl: "" }; // grid
      let clipId = `clip_${Math.random().toString(36).slice(2)}`; // Clip path to hide vertical edges at x=0 and x=w
      let clip = `<clipPath id="${clipId}"><rect x="0" y="0" width="${w}" height="${h}"/></clipPath>`;
      let df = [], ly = []; // defs, layers
      sl.forEach((s, i) => {
        let gi = `g${i}_${Math.random().toString(36).slice(2)}`; // gradId
        df.push(`<linearGradient id="${gi}" x1="0" y1="0" x2="0" y2="${h}" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="rgba(${s.rgb[0]},${s.rgb[1]},${s.rgb[2]},0.35)"/><stop offset="100%" stop-color="rgba(${s.rgb[0]},${s.rgb[1]},${s.rgb[2]},0)"/></linearGradient>`);
        let pt = s.values.map((v, j) => { // points
          let x = s.values.length > 1 ? (j * w) / (s.values.length - 1) : 0;
          let y = v <= 0 ? h : h - (v / mv) * h;
          return `${x},${y}`;
        }).join(" ");
        ly.push(`<polyline points="-20,${h} ${pt} ${w+20},${h}" fill="url(#${gi})" stroke="rgb(${s.rgb[0]},${s.rgb[1]},${s.rgb[2]})" stroke-width="2" clip-path="url(#${clipId})"/>`);
      });
      return `<svg width="${w}" height="${h+30}" viewBox="-50 0 ${w+100} ${h+40}">${gd.lines}${gd.labels}${gd.xl}<defs>${clip}${df.join("")}</defs>${ly.join("")}</svg>`.trim();
    }

    function renderH(vs, rgb, w, h, sg = true, cX = null) { // values, showGrid, customXLabels
      let mv = Math.max(...vs, 1); // maxVal
      let sc = mv > h ? h / mv : 1; // scale
      let gp = 2; // gap
      let tg = (vs.length - 1) * gp; // totalGaps
      let bw = (w - tg) / vs.length; // barW
      let gi = "hg_" + (Math.random()*1e9|0); // gradId
      let df = `<linearGradient id="${gi}" x1="0%" y1="0%" x2="0%" y2="${h}" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="rgba(${rgb[0]},${rgb[1]},${rgb[2]},1)"/><stop offset="100%" stop-color="rgba(${rgb[0]},${rgb[1]},${rgb[2]},0.1)"/></linearGradient>`; // defs
      let rs = ''; // rects
      vs.forEach((v, i) => {
        let bh = Math.min(v * sc, h); // barH
        let y = h - bh;
        let x = i * (bw + gp);
        rs += `<rect x="${x}" y="${y}" width="${bw}" height="${bh}" fill="url(#${gi})"/>`;
      });
      if (!sg) return `<svg width="${w}" height="${h}"><defs>${df}</defs>${rs}</svg>`;
      let gd = buildGrid(w, h, mv, vs.length, 4, cX); // grid
      return `<svg width="${w}" height="${h+30}" viewBox="-50 0 ${w+100} ${h+40}">${gd.lines}${gd.labels}${gd.xl}<defs>${df}</defs>${rs}</svg>`.trim();
    }
    </script>

    <div>
      <div class="parent" id="pr">
        <div class="box h2" id="info">
          <h2 id="clock"></h2>
          <p id="ut"></p>
          <p id="ro"></p>
          <p id="sd"></p><br>

          <p id="r"></p>
          <p id="mo"></p>
          <p id="pulse"></p><br>

          <div id="heap_gauge"></div>
          <p id="heap"></p>
          <div id="psram_gauge"></div>
          <p id="psram"></p>
        </div>
      </div>
    </div>
END_STATIC_PAGE
*/


const char MI32_STATIC_PAGE[] PROGMEM = {
/* AUTO-GENERATED (BEGIN) */
  0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc5, 0x3a, 0x6b, 0x93, 0xdb, 0x36,
0x92, 0xdf, 0xf3, 0x2b, 0x18, 0xc6, 0x8e, 0x88, 0x11, 0x45, 0x91, 0x9a, 0x19, 0xc7, 0x96, 0x04,
0xcd, 0xd9, 0x8e, 0xd7, 0xf6, 0xd5, 0x38, 0x97, 0x8a, 0xed, 0x5d, 0x57, 0x8d, 0x95, 0x0c, 0x45,
0x42, 0x24, 0x63, 0xbe, 0x8e, 0x80, 0x24, 0x2a, 0x32, 0xff, 0xfb, 0x75, 0x03, 0x20, 0x45, 0x8d,
0x1f, 0xe7, 0xbb, 0xdd, 0xaa, 0xad, 0xf2, 0x90, 0x40, 0x77, 0xa3, 0xd1, 0xe8, 0x37, 0x28, 0xcf,
0xb9, 0xd8, 0xa7, 0x6c, 0xb1, 0x2a, 0xc2, 0xfd, 0x21, 0x4c, 0x78, 0x99, 0xfa, 0xfb, 0xe9, 0x3a,
0x65, 0xf5, 0x0c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x8d, 0x5d, 0xb4, 0xde, 0x1c,
0xae, 0x8f, 0xde, 0x5b, 0xf1, 0xd6, 0x69, 0xdb, 0x3a, 0xf7, 0x49, 0x91, 0xdb, 0xf6, 0x4b, 0xdb,
0xbb, 0x7f, 0x47, 0xf8, 0x7d, 0x5e, 0xe0, 0x2e, 0xca, 0x60, 0xae, 0x7e, 0xb4, 0x9f, 0x87, 0xc9,
0x56, 0x3e, 0x20, 0x8b, 0xf8, 0x9c, 0x53, 0xf5, 0x31, 0x1c, 0xfd, 0xb6, 0xac, 0xfa, 0x70, 0x13,
0xff, 0xc3, 0x43, 0x0c, 0xc9, 0x06, 0x30, 0x49, 0xbe, 0x2e, 0x16, 0xf3, 0x78, 0x82, 0x63, 0xf9,
0xf3, 0x33, 0xb8, 0x42, 0x3c, 0x59, 0xcc, 0x4b, 0x04, 0x6c, 0x80, 0xe7, 0xb8, 0xd4, 0x93, 0xaa,
0xe8, 0x4d, 0x78, 0xa8, 0x26, 0xab, 0xaa, 0xc5, 0xf6, 0x90, 0x59, 0x9f, 0x52, 0xfe, 0x88, 0x75,
0x24, 0x46, 0x29, 0x00, 0x7a, 0xfc, 0xb1, 0x15, 0x50, 0x52, 0xec, 0xb2, 0x05, 0x2b, 0x5a, 0x4d,
0xd7, 0xfb, 0xb1, 0xf4, 0x84, 0x50, 0xc2, 0x15, 0xa5, 0x82, 0xf6, 0x9e, 0xff, 0x03, 0xd2, 0x55,
0x50, 0x4a, 0x73, 0x23, 0x00, 0x00
  /* AUTO-GENERATED (END) */
};
constexpr unsigned int MI32_STATIC_PAGE_len = sizeof(MI32_STATIC_PAGE);


#endif //USE_MI_EXT_GUI
#endif // USE_WEBSERVER

#endif //USE_MI_ESP32
