text: (this.webpackJsonpfoundations_app=this.webpackJsonpfoundations_app||[]).push([[6],{109:function(e,t,n){},110:function(e,t,n){var o={"./pwa-action-sheet.entry.js":[196,90],"./pwa-camera-modal-instance.entry.js":[197,91],"./pwa-camera-modal.entry.js":[198,92],"./pwa-camera.entry.js":[199,93],"./pwa-toast.entry.js":[200,94]};function a(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(o)},a.id=110,e.exports=a},111:function(e,t,n){"use strict";n.r(t);var o=n(1),a=n.n(o),r=n(40),i=n.n(r),s=n(18),l=n(3),c=n(64),u=n(14),d=n(9),m=(n(86),n(62),function(e){var t=e.doEdit,n=e.doDelete,o=e.doc,r=o.data();return a.a.createElement(l.m,{className:"theBody"},a.a.createElement(l.j,null,a.a.createElement(l.n,{class:"ion-text-wrap"},a.a.createElement(l.v,{className:"item-title"},a.a.createElement("div",null,r.title)),a.a.createElement(l.v,{className:"item-prompt"},a.a.createElement("div",null,r.prompt)),a.a.createElement(l.v,{className:"item-sub-title"},a.a.createElement("div",null,r.content)),a.a.createElement(l.v,{className:"item-loc"},a.a.createElement("div",null,r.location)),a.a.createElement(l.v,{className:"item-sub-title"},a.a.createElement("div",null,r.date)))),a.a.createElement(l.l,null,a.a.createElement(l.k,{onClick:function(){t(o.id)}},a.a.createElement(l.i,{slot:"icon-only",icon:u.p})),a.a.createElement(l.k,{onClick:function(){n(o.id)}},a.a.createElement(l.i,{slot:"icon-only",icon:u.p}))))}),h=n(35),p=n.n(h),f=n(46),y=function(e){var t=e.doEdit,n=Object(f.a)(p.a.firestore().collection("data").orderBy("date","desc"),{snapshotListenOptions:{includeMetadataChanges:!0}}),o=Object(d.a)(n,3),r=o[0],i=o[1],s=(o[2],function(){document.getElementById("list")});return a.a.createElement(l.p,{id:"list"},r&&r.docs.map((function(e){return!i&&a.a.createElement(m,{doc:e,doEdit:function(e){s(),t(e)},doDelete:function(e){var t;s(),t=e,p.a.firestore().collection("data").doc(t).delete()},key:e.id})})))},w=function(){var e=Object(o.useState)(null),t=Object(d.a)(e,2),n=(t[0],t[1]);return a.a.createElement(l.q,null,a.a.createElement(l.h,null,a.a.createElement(l.y,null,a.a.createElement(l.x,null,"Writer's Unblock"))),a.a.createElement(l.g,null,a.a.createElement(y,{doEdit:n})))},b=(n(97),n(98),n(16)),j=n(2),g=n.n(j),v=n(54),E=n(5),k=n(69);function _(e){e.prompt="",e.title="",e.content="",e.date="",e.location="",e.clear=""}var O=function(e){var t=Object(o.useState)({prompt:"",title:"",content:"",date:"",location:""}),n=Object(d.a)(t,2),r=n[0],i=n[1],s=Object(f.b)(p.a.firestore().doc("data/"+e.title),{snapshotListenOptions:{includeMetadataChanges:!0}}),c=Object(d.a)(s,3),u=c[0],m=c[1];c[2];Object(o.useEffect)((function(){!m&&e.prompt&&e.title&&(null===u||void 0===u?void 0:u.exists)&&i(u.data().name)}),[m,e.title,u]);var h=function(){var e=Object(E.a)(g.a.mark((function e(){var t,n,o;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=k.a.Geolocation,e.next=3,t.getCurrentPosition();case 3:return n=e.sent,o="Latitiude: "+n.coords.latitude+" Longitude: "+n.coords.longitude,e.abrupt("return",i(Object(v.a)({},r,{location:o})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var t=Object(E.a)(g.a.mark((function t(){var n;return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=p.a.firestore().collection("data"),!e.title){t.next=9;break}return t.next=4,n.doc(e.title).set({prompt:r.prompt,title:r.title,content:r.content,date:(new Date).toLocaleDateString(),location:r.location?r.location:""},{merge:!0});case 4:_(r),i(r),e.clear(),t.next=14;break;case 9:return t.next=11,n.add({prompt:r.prompt,title:r.title,content:r.content,date:(new Date).toLocaleDateString(),location:r.location?r.location:""});case 11:_(r),i(r),e.clear();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),w=function(e){var t;e.preventDefault(),t=r,console.log(t.title,t.content,t.date,t.location,t.prompt),i(Object(v.a)({},r,Object(b.a)({},e.target.name,e.target.value)))};return a.a.createElement(l.d,{className:"thebody"},a.a.createElement(l.e,null,a.a.createElement(l.j,null,a.a.createElement("p",{id:"theP",contentEditable:"true"})),a.a.createElement(l.j,null,a.a.createElement(l.c,{className:"item-prompt2",onClick:function(){var e=["The world crumbles with each step that she takes. Splicers surround the compound as she begins her escape - her freedom to...","A bear treads down the mounten with each step he feels his consciousness tearing away. His momma told him to be brave but she could never prepare him for the white wolf.","To extrapolate fear from doubt is to make a man feared by doubt itself. These were the words that...","Dr. Dan looked upon his disciples. He knew not how to control them, but he knew how to punish them. With the raise of his fist any command could be done out of fear of what would come otherwise.","Dormamu, I've come to bargain. Today, I bring you...","She pondered the thought of losing her younger brother to the fog. It all happened so fast. Her hometown is now deserted, once a bustling community of racist elders. In a state of mind where emotions get you hurt, she wants nothing more than to...","This was unlike anything he had ever seen... Subway... it was... crowded! People lined up for two blocks to get a taste of what was cooking. He had to know what it was. But as he looked upon it after two hours of waiting...","This world was not meant for us. It facilitates us out of necessessity. If it had its way, we would have never made it past the water evolution. But here we are, chillin' in a hottub, five feet apart because we are...","The tendrils appeared first. Then came the horrendous wings, horn-tipped. As they rose they expanded to their full length, and the face was like nothing I could describe; so horrible you could see the flowers wilting in the reflection, but so beautiful you could not look away...","The report slammed upon her desk with a thud. Thick and full of irrelevant judgement. For she was not destined for this, but something...","Where does one go when they sleep?","If we are alone in this universe then I might be alright. But if I am alone on this earth, no one is safe...","Grandma stopped being able to walk before her mind went too. But this elixir might just be able to save her. I fear by doing so I might kill another part of her though. I guess this might be a risk I'll have to take. Unless...","The election process went swimmingly. You now own 90% of company X. You are now worth more than your parents could ever dream of. What will you do first?","The roses and the daisies spoke softly as I sauntered on the hill. But what they spoke of illicited a new kind of happiness not found in any buddhist's home. I will follow their call of action to...","We stopped off the highway in some rinkydink town filled with nothing but dust and dry air. We were hungry, perfect for us was a diner just a minute from the road. It looked empty save for one car. This was 'The Stop,' but with a name like that, how could it ever meet the needs of...","The plan is simple: get in, raise the alarms, rain hell, take the money, bring justice upon those who have wronged us, and get out. How could it have ever gone so wrong?","What a funny looking mushroom...","Have you ever been to Iceland? I heard there are beautiful mountains and wonderous dragons stalking the skies. Oh did I say dragons? Well, you'll have to come and see for yourself.","The feeling of the road can never be beaten. The asphault gripped at me like a lover after a month away. The petrol seeped into the vents and filled my lungs with joyous reprise. The finish line was near. And so was..."],t=Math.floor(Math.random()*e.length);r.prompt=e[t],document.getElementById("theP").innerHTML=e[t]}},"Get your prompt")),a.a.createElement(l.j,null,a.a.createElement(l.w,{value:r.title,placeholder:"Title",name:"title",onIonChange:w})),a.a.createElement(l.j,null,a.a.createElement(l.w,{"auto-grow":"true",value:r.content,placeholder:"Content",name:"content",onIonChange:w})),a.a.createElement(l.c,{onClick:y},"Upload"),a.a.createElement(l.c,{onClick:h},"Location")))},I=function(){var e=Object(o.useState)(null),t=Object(d.a)(e,2),n=t[0],r=t[1];return a.a.createElement(l.q,null,a.a.createElement(l.h,null,a.a.createElement(l.y,null,a.a.createElement(l.x,null,"Writer's Unblock"))),a.a.createElement(l.g,null,a.a.createElement(l.d,null,a.a.createElement(l.f,null,a.a.createElement("h3",null,"New Entry:"),a.a.createElement(O,{title:n,clear:function(){return r({prompt:"",title:"",content:"",date:"",location:"",clear:"",initialValue:""})}})),a.a.createElement(l.e,null))))},x=(n(99),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(68));n.n(x).a.initializeApp({apiKey:"AIzaSyCNJfzZGEH_MHJ6JZQfYHi7Iio9lwZaV18",authDomain:"gimm300writersblock.firebaseapp.com",databaseURL:"https://gimm300writersblock.firebaseio.com",projectId:"gimm300writersblock",storageBucket:"gimm300writersblock.appspot.com",messagingSenderId:"872027736389",appId:"1:872027736389:web:5b910bc44c56d7a020162c",measurementId:"G-FPRBG2VTD3"});var T=function(){return a.a.createElement(l.b,null,a.a.createElement(c.a,null,a.a.createElement(l.u,null,a.a.createElement(l.r,null,a.a.createElement(s.c,{path:"/tab1",component:w,exact:!0}),a.a.createElement(s.c,{path:"/tab2",component:I,exact:!0}),a.a.createElement(s.c,{path:"/",render:function(){return a.a.createElement(s.b,{to:"/tab1"})},exact:!0})),a.a.createElement(l.s,{slot:"bottom"},a.a.createElement(l.t,{tab:"tab1",href:"/tab1"},a.a.createElement(l.i,{icon:u.m}),a.a.createElement(l.n,null,"Feed")),a.a.createElement(l.t,{tab:"tab2",href:"/tab2"},a.a.createElement(l.i,{icon:u.j}),a.a.createElement(l.n,null,"Write!"))))))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var D=n(71);Object(D.a)(window),i.a.render(a.a.createElement(T,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))},62:function(e,t,n){},73:function(e,t,n){e.exports=n(111)},79:function(e,t,n){var o={"./ion-action-sheet-ios.entry.js":[112,65],"./ion-action-sheet-md.entry.js":[113,66],"./ion-alert-ios.entry.js":[114,58],"./ion-alert-md.entry.js":[115,59],"./ion-app_8-ios.entry.js":[116,52],"./ion-app_8-md.entry.js":[117,53],"./ion-avatar_3-ios.entry.js":[118,8],"./ion-avatar_3-md.entry.js":[119,9],"./ion-back-button-ios.entry.js":[120,10],"./ion-back-button-md.entry.js":[121,11],"./ion-backdrop-ios.entry.js":[122,12],"./ion-backdrop-md.entry.js":[123,13],"./ion-button_2-ios.entry.js":[124,67],"./ion-button_2-md.entry.js":[125,68],"./ion-card_5-ios.entry.js":[126,14],"./ion-card_5-md.entry.js":[127,15],"./ion-checkbox-ios.entry.js":[128,16],"./ion-checkbox-md.entry.js":[129,17],"./ion-chip-ios.entry.js":[130,18],"./ion-chip-md.entry.js":[131,19],"./ion-col_3.entry.js":[132,20],"./ion-datetime_3-ios.entry.js":[133,56],"./ion-datetime_3-md.entry.js":[134,57],"./ion-fab_3-ios.entry.js":[135,69],"./ion-fab_3-md.entry.js":[136,70],"./ion-img.entry.js":[137,21],"./ion-infinite-scroll_2-ios.entry.js":[138,22],"./ion-infinite-scroll_2-md.entry.js":[139,23],"./ion-input-ios.entry.js":[140,24],"./ion-input-md.entry.js":[141,25],"./ion-item-option_3-ios.entry.js":[142,71],"./ion-item-option_3-md.entry.js":[143,72],"./ion-item_8-ios.entry.js":[144,73],"./ion-item_8-md.entry.js":[145,74],"./ion-loading-ios.entry.js":[146,26],"./ion-loading-md.entry.js":[147,27],"./ion-menu_3-ios.entry.js":[148,75],"./ion-menu_3-md.entry.js":[149,76],"./ion-modal-ios.entry.js":[150,54],"./ion-modal-md.entry.js":[151,55],"./ion-nav_2.entry.js":[152,64],"./ion-popover-ios.entry.js":[153,28],"./ion-popover-md.entry.js":[154,29],"./ion-progress-bar-ios.entry.js":[155,30],"./ion-progress-bar-md.entry.js":[156,31],"./ion-radio_2-ios.entry.js":[157,32],"./ion-radio_2-md.entry.js":[158,33],"./ion-range-ios.entry.js":[159,77],"./ion-range-md.entry.js":[160,78],"./ion-refresher_2-ios.entry.js":[161,60],"./ion-refresher_2-md.entry.js":[162,61],"./ion-reorder_2-ios.entry.js":[163,34],"./ion-reorder_2-md.entry.js":[164,35],"./ion-ripple-effect.entry.js":[165,36],"./ion-route_4.entry.js":[166,79],"./ion-searchbar-ios.entry.js":[167,80],"./ion-searchbar-md.entry.js":[168,81],"./ion-segment_2-ios.entry.js":[169,82],"./ion-segment_2-md.entry.js":[170,83],"./ion-select_3-ios.entry.js":[171,84],"./ion-select_3-md.entry.js":[172,85],"./ion-slide_2-ios.entry.js":[173,86],"./ion-slide_2-md.entry.js":[174,87],"./ion-spinner.entry.js":[175,37],"./ion-split-pane-ios.entry.js":[176,38],"./ion-split-pane-md.entry.js":[177,39],"./ion-tab-bar_2-ios.entry.js":[178,40],"./ion-tab-bar_2-md.entry.js":[179,41],"./ion-tab_2.entry.js":[180,42],"./ion-text.entry.js":[181,43],"./ion-textarea-ios.entry.js":[182,44],"./ion-textarea-md.entry.js":[183,45],"./ion-toast-ios.entry.js":[184,62],"./ion-toast-md.entry.js":[185,63],"./ion-toggle-ios.entry.js":[186,46],"./ion-toggle-md.entry.js":[187,47],"./ion-virtual-scroll.entry.js":[188,48]};function a(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(o)},a.id=79,e.exports=a},81:function(e,t,n){var o={"./ion-icon.entry.js":[192,98]};function a(e){if(!n.o(o,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(o)},a.id=81,e.exports=a},86:function(e,t,n){},97:function(e,t){},98:function(e,t,n){}},[[73,7,49]]]);
  //# sourceMappingURL=main.568a0172.chunk.js.map