/* Portfolio — shared helpers. Loaded first; everything else reads these off window.
   Each <script type="text/babel"> has its own scope, so cross-file sharing goes via window. */
const ASSET = window.HU_ASSET_BASE || "../../assets";
const smBreaks = (str) => str.split("\n").flatMap((seg, i) => {
  const span = React.createElement("span", { key: "s" + i, className: "st-seg" }, seg);
  return i === 0 ? [span] : [React.createElement("br", { key: "b" + i, className: "sm-br" }), span];
});
const workById = (id) => window.HU_DATA.works.find((w) => w.id === id);
Object.assign(window, { HU_ASSET: ASSET, HU_smBreaks: smBreaks, HU_workById: workById });
