{"version":3,"sources":["Footer.jsx","inconvenient_knights.js","legendary_knights.js","KnightsOfLegend.jsx","QuestingKnights.jsx","App.js","serviceWorker.js","index.js"],"names":["Footer","className","href","titles","maleNames","femaleNames","neutralNames","familyNames","inconvenientQuests","randomElement","array","Math","floor","random","length","createInconvenientKnight","title","firstName","concat","getKnightlyName","familyName","quest","names","famousQuests","eccentricities","generateKnights","a","i","push","name","famous_quest","eccentricity","KnightsOfLegend","useState","knights","newKnights","onClick","map","knight","index","key","QuestingKnights","App","Boolean","window","location","hostname","match","ReactDOM","render","StrictMode","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","console","message"],"mappings":"0OAEaA,G,WAAS,WACpB,OACE,yBAAKC,UAAU,UACb,0CACW,uBAAGC,KAAK,yCAAR,YADX,cAEU,uBAAGA,KAAK,qCAAR,WAEV,8BACE,uBAAGA,KAAK,+CAAR,gC,OCVFC,EAAS,CACb,MACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,aAAc,QAAS,QAAS,WAAY,SAC5C,YAAa,SAAU,gBAGnBC,EAAY,CAChB,cAAe,SAAU,WAAY,UAAW,SAAU,MAAO,UACjE,OAAQ,WAAY,UAAW,WAAY,SAGvCC,EAAc,CAClB,SAAU,WAAY,UAAW,SAAU,WAAY,QAGnDC,EAAe,CACnB,gBAAiB,UAGbC,EAAc,CAClB,aAAc,WAAY,aAAc,gBAAiB,cACzD,eAAgB,gBAAiB,WAAY,cAAe,eAC5D,cAAe,WAAY,iBAAkB,gBAC7C,kBAAmB,cAAe,eAAgB,gBAAiB,YACnE,eAGIC,EAAqB,CACzB,oCACA,qDACA,oDACA,sDACA,oCACA,+CACA,mDACA,mDACA,wDACA,wDACA,mDACA,wDACA,yDACA,mDACA,0DACA,oDACA,wDACA,oDACA,wDACA,0CAGWC,EAAgB,SAAAC,GAAK,OAAIA,EAAMC,KAAKC,MAAMD,KAAKE,SAAWH,EAAMI,UAahEC,EAA2B,W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IAAKD,GAC3B,uBAAGtC,UAAU,QAAQqC,EAAOT,MAC5B,uBAAG5B,UAAU,QAAQqC,EAAOR,cAC5B,uBAAG7B,UAAU,QAAQqC,EAAOP,qBCzBpCN,EAAkB,WAEtB,IADA,IAAIC,EAAI,GACCC,EAAI,EAAGA,EAAI,EAAGA,IACrBD,EAAEE,KAAKb,KAET,OAAOW,GAGIe,EAAkB,WAAO,IAAD,EACLR,mBAASR,KADJ,mBAC5BS,EAD4B,KACnBC,EADmB,KAGnC,OACE,yBAAKlC,UAAU,mBACb,4BAAQA,UAAU,cAChB,8DAEF,yBAAKA,UAAU,QACb,0BAAMA,UAAU,SAASmC,QAAS,kBAAMD,EAAWV,KAAnD,uBAGCS,EAAQG,KAAI,SAACC,EAAQC,GACpB,OACE,yBAAKtC,UAAU,SAASuC,IAAKD,GAC3B,uBAAGtC,UAAU,QACVqC,EAAOtB,MADV,IACkBsB,EAAOrB,UADzB,IACqCqB,EAAOlB,YAE5C,uBAAGnB,UAAU,QAAQqC,EAAOjB,cCL3BqB,MAlBf,WAME,OACE,yBAAKzC,UAAU,OACb,4BAAQA,UAAU,cAChB,wCAEF,kBAAC,EAAD,MACA,kBAAC,EAAD,MACA,kBAAC,EAAD,QCPc0C,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCZNC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,EAAD,OAEFC,SAASC,eAAe,SDyHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBC,MAAK,SAAAC,GACJA,EAAaC,gBAEdC,OAAM,SAAAC,GACLC,QAAQD,MAAMA,EAAME,c","file":"static/js/main.c5273566.chunk.js","sourcesContent":["import React from \"react\";\n\nexport const Footer = () => {\n return (\n
\n \n Table by Skerples |\n Tool by Cassie\n \n \n \n This tool is open-source\n \n \n
\n );\n};\n","const titles = [\n \"Sir\",\n \"Sir\",\n \"Sir\",\n \"Sir\",\n \"Sir\",\n \"Sir\",\n \"Sir\",\n \"Lady\",\n \"Lady\",\n \"Lady\",\n \"Lady\",\n \"Lady\",\n \"Lady\",\n \"Lady\",\n \"The Knight\", \"Baron\", \"Dread\", \"Defender\", \"Legate\",\n \"Protector\", \"Herald\", \"Warrior-Lord\"\n];\n\nconst maleNames = [\n \"Kensingknot\", \"Alhoon\", \"Geoffrey\", \"Rexwell\", \"Oswald\", \"Guy\", \"Eckhart\",\n \"Koss\", \"Cantrell\", \"Huberis\", \"Hamilbil\", \"Roald\"\n];\n\nconst femaleNames = [\n \"Alicia\", \"Scoborth\", \"Matilda\", \"Frigia\", \"Geromina\", \"Joan\"\n]\n\nconst neutralNames = [\n \"Hedgewalloper\", \"Scoots\"\n];\n\nconst familyNames = [\n \"of Barwell\", \"the Dour\", \"of Blution\", \"the Merciless\", \"of Treckett\",\n \"Truthspeaker\", \"of Lursingion\", \"the Pure\", \"the Ascetic\", \"Dragonslayer\",\n \"of Scarburl\", \"the Blue\", \"of Blood Royal\", \"the Foreigner\",\n \"of Necker's End\", \"the Skeptic\", \"of Rose Hill\", \"of Anderwells\", \"the Brave\",\n \"the Scourge\"\n];\n\nconst inconvenientQuests = [\n \"Guards a passage, bridge, or gate\",\n \"Collects a legal but highly unfair tax on commerce\",\n \"Accompanies travellers (and bores them with tales\",\n \"Interrogates people, searching for ancestral crimes\",\n \"Attacks impous or rude travellers\",\n \"Enforces archaic weaponry and sumptuary laws\",\n \"Warns people away from a lucrative treasure site\",\n \"Flees from or destroys anything less than chaste\",\n \"Tries to convince people of the evil nature of wealth\",\n \"Cooks hearty but deeply suspicious meals for the poor\",\n \"Requires wizards to justify every spell and item\",\n \"Commands travellers to pay a visit to a nearby castle\",\n \"Kills anything that looks even remotely like a monster\",\n \"Insists people provide maps and full itineraries\",\n \"Accompanies travellers (and sing endlessly jolly songs)\",\n \"Examines all printed material for heretical ideas\",\n \"Interprets dreams, seeking hints of future calamities\",\n \"Howls unbelievable curses at sinners and heathens\",\n \"Wants to die nobly and pointlessly for a worthy cause\",\n \"Cursed to ask a riddle. Answer or die.\"\n];\n\nexport const randomElement = array => array[Math.floor(Math.random() * array.length)];\n\nconst getKnightlyName = (title) => {\n switch (title) {\n case \"Sir\":\n return randomElement(maleNames.concat(neutralNames))\n case \"Lady\":\n return randomElement(femaleNames.concat(neutralNames))\n default:\n return randomElement(maleNames.concat(neutralNames).concat(femaleNames))\n }\n}\n\nexport const createInconvenientKnight = () => {\n const title = randomElement(titles)\n const firstName = getKnightlyName(title)\n const familyName = randomElement(familyNames)\n const quest = randomElement(inconvenientQuests)\n\n return { title, firstName, familyName, quest }\n}","import { randomElement } from './inconvenient_knights';\n\nconst names = [\n \"Sir Gilbert Meller\", \"Lady June Weaver\", \"Sir Malfang of Gurpt\",\n \"Lady Trentwell\", \"The Bronze Knight\", \"Sir Frank the Giantslayer\",\n \"Lady Sybil Grey\", \"Sir Walter of Boswell\", \"Lady Judith the Just\",\n \"The Knight of Long Lake\", \"Sir Giles Roquefort\", \"Lady Bell of Orby\",\n \"Sir Edwin the Bold\", \"Lady Turbellina\", \"The Briarworth Knight\",\n \"Sir Laurentian\", \"The Indigo Rider\", \"Sir Gershwin the Red\",\n \"The Lady of the Meadows\", \"The Obsidian Knight\"\n];\n\nconst famousQuests = [\n \"Seeks the Holy Chalice of Immortality\",\n \"Charts a route to the far side of the world\",\n \"Must slay the Black Dragon Tyranoceptus\",\n \"Reclaim the Lost Land of the Urgonzoli\",\n \"Any non-knight in armour must die\",\n \"Only fights larger and larger creatures\",\n \"Seeks the True Icon of the Four Martyrs\",\n \"Prepares a feast that will summon an angel\",\n \"Duels everyone to gain more combat skills\",\n \"Drags people into lake, drowns them\",\n \"Atones for a vile, unspeakable sin\",\n \"Seeks the Five Stones of Svendelbart\",\n \"Vengeance on the beast that claimed an eye\",\n \"Guards the relics of the King of Sibylan\",\n \"Seeks a cure for a poisoned lord\",\n \"Compelled to burn, salt, and scour the earth\",\n \"Slays any beast that isn't arguably a horse\",\n \"Seeks the Precarious Tower of Wisdom\",\n \"Wreaks terrible revenge on all murderers\",\n \"Inscrutable acts of shocking violence\"\n]\n\nconst eccentricities = [\n \"Old and forgetful\", \"Armoured in books\", \"Inconveniently honourable\",\n \"Swarms of squires\", \"Silent, slowly regenerates\", \"Remarkably small and stout\",\n \"Sings hymns\", \"Obsessed with appearance\", \"Bedecked with weapons\",\n \"Aquatic. Constantly dripping\", \"Morbid and prone to fits\",\n \"Accompanied by hunting dogs\", \"Rides a giant squirrel\", \"Wields an enormous hammer\",\n \"Maniacal fixation on goal\", \"Wields a flaming sword\", \"Terrible sense of direction\",\n \"Reanimated corpse in armour\", \"Stalks by night\"\n]\n\n\nexport const createLegendaryKnight = () => {\n const name = randomElement(names)\n const famous_quest = randomElement(famousQuests)\n const eccentricity = randomElement(eccentricities)\n\n return { name, famous_quest, eccentricity }\n}","import React, { useState } from \"react\";\nimport { createLegendaryKnight } from \"./legendary_knights\";\n\nconst generateKnights = () => {\n let a = [];\n for (let i = 0; i < 5; i++) {\n a.push(createLegendaryKnight());\n }\n return a;\n};\n\nexport const KnightsOfLegend = () => {\n const [knights, newKnights] = useState(generateKnights());\n\n return (\n
\n
\n

Knights of Legend

\n
\n
\n newKnights(generateKnights)}>\n These are terrible!\n \n {knights.map((knight, index) => {\n return (\n
\n

{knight.name}

\n

{knight.famous_quest}

\n

{knight.eccentricity}

\n
\n );\n })}\n
\n
\n );\n};\n","import React, { useState } from \"react\";\nimport { createInconvenientKnight } from \"./inconvenient_knights\";\n\nconst generateKnights = () => {\n let a = [];\n for (let i = 0; i < 5; i++) {\n a.push(createInconvenientKnight());\n }\n return a;\n};\n\nexport const QuestingKnights = () => {\n const [knights, newKnights] = useState(generateKnights());\n\n return (\n
\n
\n

Questing Knights of the Realm

\n
\n
\n newKnights(generateKnights)}>\n These are terrible!\n \n {knights.map((knight, index) => {\n return (\n
\n

\n {knight.title} {knight.firstName} {knight.familyName}\n

\n

{knight.quest}

\n
\n );\n })}\n
\n
\n );\n};\n","import React from 'react';\nimport './App.css';\nimport { Footer } from './Footer';\nimport { KnightsOfLegend } from './KnightsOfLegend';\nimport { QuestingKnights } from './QuestingKnights';\n\nfunction App() {\n // const names = []\n // for (let i = 0; i < 10; i++) {\n // names.push(randomElement(base) + randomElement(suffix))\n // }\n\n return (\n
\n
\n

Knights

\n
\n \n \n
\n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}