{"version":3,"sources":["DataContext.js","components/Header/Header.js","components/Tile/Tile.js","components/Grid/Grid.js","components/Footer/Footer.js","components/Site/Site.js","App.js","serviceWorker.js","index.js"],"names":["DataContext","createContext","Header","data","useContext","React","createElement","className","about","name","title","social","map","index","key","href","target","rel","data-social","src","img","alt","Tile","_ref","heading","subHeading","image","split","tag","uuidv4","propsTypes","PropTypes","string","isRequired","Grid","work","tile","Object","assign","tiles","array","jsonVersion","require","Footer","version","Site","concat","bio","paragraph","quote","author","App","_useState","useState","_useState2","_slicedToArray","setData","useEffect","api","axios","get","then","response","catch","error","console","log","Provider","value","Boolean","window","location","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister","message"],"mappings":"u0BAEaA,EAAcC,wBAAc,IC0B1BC,EAzBA,WAAM,IAEXC,EAASC,qBAAWJ,GAApBG,KAER,OACEE,IAAAC,cAAA,OAAKC,UAAU,oBACbF,IAAAC,cAAA,OAAKC,UAAU,MACbF,IAAAC,cAAA,MAAIC,UAAU,WAAWJ,EAAKK,MAAMC,MACpCJ,IAAAC,cAAA,MAAIC,UAAU,WAAWJ,EAAKK,MAAME,QAEtCL,IAAAC,cAAA,MAAIC,UAAU,aACXJ,EAAKQ,QAAUR,EAAKQ,OAAOC,IAC1B,SAACD,EAAQE,GAAK,OACZR,IAAAC,cAAA,MAAIQ,IAAKD,GACPR,IAAAC,cAAA,KAAGS,KAAMJ,EAAOI,KAAMC,OAAO,SAASC,IAAI,sBAAsBC,cAAaP,EAAOF,MAClFJ,IAAAC,cAAA,OAAKa,IAAKR,EAAOS,IAAKC,IAAKV,EAAOF,sCCX5Ca,EAAO,SAAHC,GAAA,IAAMR,EAAIQ,EAAJR,KAAMS,EAAOD,EAAPC,QAASC,EAAUF,EAAVE,WAAYC,EAAKH,EAALG,MAAK,OAC9CrB,IAAAC,cAAA,UACED,IAAAC,cAAA,KACES,KAAMA,EACNE,IAAI,sBACJD,OAAO,UAEPX,IAAAC,cAAA,UACED,IAAAC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AKC,UAAU,yBACZJ,EAAKK,MAAMuC,IAAInC,IAAI,SAACoC,EAAWnC,GAAK,OACnCR,IAAAC,cAAA,KAAGQ,IAAKD,GAAQmC,KAElB3C,IAAAC,cAAA,kBACED,IAAAC,cAAA,cAASH,EAAKK,MAAMyC,OACpB5C,IAAAC,cAAA,YAAM,WAAUH,EAAKK,MAAM0C,UAG/B7C,IAAAC,cAACJ,EAAM,MACPG,IAAAC,cAAC4B,EAAI,MACL7B,IAAAC,cAACqC,EAAM,QCDEQ,SAvBH,WAAM,IAAAC,EAEQC,qBAAUC,EAAAC,YAAAH,EAAA,GAA3BjD,EAAImD,EAAA,GAAEE,EAAOF,EAAA,GAapB,OAJAG,oBAAU,WAPQ,IAACC,IAQP,oBAPVC,IACGC,IAAIF,GACJG,KAAK,SAAAC,GAAQ,OAAIN,EAAQM,EAAS3D,QAClC4D,MAAM,SAAAC,GAAK,OAAIC,QAAQC,IAAIF,MAK7B,IAEI7D,EAEHE,IAAAC,cAACN,EAAYmE,SAAQ,CAACC,MAAO,CAAEjE,OAAMqD,YACnCnD,IAAAC,cAACuC,EAAI,OAEL,OCdYwB,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,2DCZNC,IAASC,OAAOtE,IAAAC,cAAC6C,EAAG,MAAKyB,SAASC,eAAe,SD6H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBnB,KAAK,SAAAoB,GACJA,EAAaC,eAEdnB,MAAM,SAAAC,GACLC,QAAQD,MAAMA,EAAMmB","file":"static/js/main.fb70a753.chunk.js","sourcesContent":["import { createContext } from 'react';\n\nexport const DataContext = createContext({});","import React, { useContext } from 'react'\nimport { DataContext } from '../../DataContext';\n\nconst Header = () => {\n\n  const { data } = useContext(DataContext);\n\n  return (\n    <div className=\"container whoami\">\n      <div className=\"me\">\n        <h2 className=\"h2 name\">{data.about.name}</h2>\n        <h3 className=\"h3 role\">{data.about.title}</h3>\n      </div>\n      <ul className=\"social cf\">\n        {data.social && data.social.map(\n          (social, index) => (\n            <li key={index}>\n              <a href={social.href} target=\"_blank\" rel=\"noopener noreferrer\" data-social={social.name}>\n                <img src={social.img} alt={social.name} />\n              </a>\n            </li>\n          )\n        )}\n      </ul>\n    </div>\n  )\n}\n\nexport default Header","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nconst tags = (tags) =>\n  tags.split(\",\").map((tag) => <span key={uuidv4()}>{tag}</span>);\n\nconst Tile = ({ href, heading, subHeading, image }) => (\n  <li>\n    <a\n      href={href}\n      rel=\"noopener noreferrer\"\n      target=\"_blank\"\n    >\n      <h3>\n        <div>{heading}</div>\n        <section>{!!subHeading && tags(subHeading)}</section>\n      </h3>\n    </a>\n    <img src={image} alt={heading} />\n  </li>\n);\n\nTile.propsTypes = {\n  href: PropTypes.string.isRequired,\n  heading: PropTypes.string.isRequired,\n  subHeading: PropTypes.string.isRequired,\n  image: PropTypes.string.isRequired,\n};\n\nexport default Tile;\n","import React, { useContext } from 'react'\nimport PropTypes from 'prop-types'\nimport Tile from '../Tile/Tile'\nimport { DataContext } from '../../DataContext';\n\nconst Grid = () => {\n\n  const { data } = useContext(DataContext);\n\n  return (\n    <div className=\"container\">\n      <div className=\"me\">\n        <h3 className=\"h3 role grid-title\">Projects</h3>\n      </div>\n      <ul className=\"folio cf\">\n        {data.work && data.work.map(\n          (tile, index) => <Tile {...tile} key={index} />)\n        }\n      </ul>\n    </div>\n  )\n}\n\nGrid.propsTypes = {\n  tiles: PropTypes.array.isRequired,\n}\n\nexport default Grid","import React from \"react\"\n\nconst jsonVersion = require('../../../package.json');\n\nconst Footer = () => {\n\n  return (\n    <footer className=\"cf\">\n      <img src=\"img/ipaintcode-reverse.svg\" alt=\"iPAINTCODE\" />\n      <span>2023 © iPAINTCODE, LLC</span>\n      <span className=\"version\">v{jsonVersion.version}</span>\n    </footer>\n  )\n}\n\nexport default Footer","import React, { useContext } from 'react'\nimport Header from '../Header/Header'\nimport Grid from '../Grid/Grid'\nimport Footer from '../Footer/Footer'\nimport { DataContext } from '../../DataContext'\n\nconst jsonVersion = require('../../../package.json');\n\nconst Site = () => {\n\n  const { data } = useContext(DataContext);\n\n  return (\n    <div className=\"container\">\n      <header className=\"hero-container\" version={`v${jsonVersion.version}`}>\n        <h1 className=\"branding\">\n          <img src=\"/img/ipaintcode.svg\" alt=\"iPAINTCODE\" />\n        </h1>\n      </header>\n      <div className=\"container p-container\">\n        {data.about.bio.map((paragraph, index) =>\n          <p key={index}>{paragraph}</p>\n        )}\n        <blockquote>\n          <strong>{data.about.quote}</strong>\n          <cite> &mdash; {data.about.author}</cite>\n        </blockquote>\n      </div>\n      <Header />\n      <Grid />\n      <Footer />\n    </div>\n  )\n}\n\nexport default Site\n","import React, { useEffect, useState } from 'react'\nimport axios from 'axios'\nimport Site from './components/Site/Site'\nimport { DataContext } from './DataContext'\nimport './App.css'\n\nconst App = () => {\n\n  const [data, setData] = useState()\n\n  const fetchData = (api) => {\n    axios\n      .get(api)\n      .then(response => setData(response.data))\n      .catch(error => console.log(error));\n  }\n\n  useEffect(() => {\n    fetchData('./ipaintcode.json')\n  }, [])\n\n  return data\n    ? (\n      <DataContext.Provider value={{ data, setData }}>\n        <Site />\n      </DataContext.Provider>\n    ) : null\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(<App />, document.getElementById('root'));\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":""}