New project: a single-page web calculator for fire show budgeting. The page must calculate one unknown variable from all known ones using the formula S = Pz + Tz + (Lz * Nl) + Rom + Rop + Rot + Rok + (Na * Z). Royalties are fixed percentages calculated from the net amount after material costs (Base = S - Pz - Tz - Lz*Nl). The UI must be built with gnexus-ui-kit (added as a git submodule). The page is a plain static HTML+JS app (no build system). Artists are stored in a local JSON file (names only). The calculator should show how much each assigned artist receives (salary + any assigned royalties). State must be persisted to localStorage, plus export/import as JSON.
https://git.gnexus.space/root/gnexus-ui-kit).Rom/Rop/Rot/Rok are percentages of Base = S - Pz - Tz - Lz*Nl.Z) and a director (gets Rop), etc.localStorage + JSON export/import.{ "name": "..." }.Single static page. No bundler. Use vanilla JS.
.gitmodules (via git submodule add) — link gnexus-ui-kit.index.html — main page, loads UI kit assets from submodule path, app CSS/JS.css/styles.css — minimal custom styles on top of UI kit.js/app.js — all calculator logic.data/artists.json — embedded artist list.S, Pz, Tz, Lz, Nl, Z. Na and royalty fields (Rom, Rop, Rot, Rok) are read-only / computed.
Na auto-updates from the artist roster table (count of rows with "Artist" role checked).Base.data/artists.json).Rop), Technician (Rot), Commissioner (Rok), Organizer (Rom).S, total material costs, total artist salaries, total royalties.Definitions:
Materials = Pz + Tz + Lz * NlBase = S - MaterialsRom = 0.10 * BaseRop = 0.05 * BaseRot = 0.05 * BaseRok = 0.10 * BaseTotalRoyalties = Rom + Rop + Rot + Rok = 0.30 * BaseArtistSalaries = Na * ZIdentity: S = Materials + TotalRoyalties + ArtistSalaries => S = Materials + 0.30 * (S - Materials) + Na * Z => 0.70 * S = 0.70 * Materials + Na * Z => S = Materials + (Na * Z) / 0.70
Solving for each variable (when all others are known):
S = Materials + (Na * Z) / 0.70Z = (0.70 * (S - Materials)) / Na (if Na > 0)Na = (0.70 * (S - Materials)) / Z (displayed as decimal guidance)Pz = S - (Tz + Lz*Nl) - (Na*Z)/0.70Tz = S - (Pz + Lz*Nl) - (Na*Z)/0.70Lz = (S - Pz - Tz - (Na*Z)/0.70) / Nl (if Nl > 0)Nl = (S - Pz - Tz - (Na*Z)/0.70) / Lz (if Lz > 0)Validation / guardrails:
Roster payout per person:
Z.Rom) checked and only one such person: add Rom. If multiple organizers, split equally (or assign full to each? To be safe, split equally; UI can note this).Rop, Rot, Rok if multiple persons share the same role.localStorage key mardis_calc_state.localStorage if present..json file containing the serialized state..json file via <input type="file">, validate structure, replace current state.index.html in a browser.Pz=100, Tz=50, Lz=30, Nl=2, Na=2, leave S empty. S should auto-calculate to 100 + 50 + 60 + (2*Z)/0.70 depending on Z.ArtistSalaries + TotalRoyalties.localStorage.gnexus-ui-kit submodule path and exact CSS/JS files to include are unknown until the submodule is fetched; may need minor path adjustments in index.html after adding it.