-
Notifications
You must be signed in to change notification settings - Fork 34
/
app.js.map
1 lines (1 loc) · 75.8 KB
/
app.js.map
1
{"version":3,"file":"app.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,ICAlF,MAAM,EAA+BI,O,aCsD9B,SAASC,EAAWC,EAAYC,EAAQd,EAAKe,GAChD,IAA2HnB,EAAvHoB,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIF,EAAkB,OAATC,EAAgBA,EAAOb,OAAOkB,yBAAyBN,EAAQd,GAAOe,EACrH,GAAuB,iBAAZM,SAAoD,mBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAAST,EAAYC,EAAQd,EAAKe,QACpH,IAAK,IAAIQ,EAAIV,EAAWK,OAAS,EAAGK,GAAK,EAAGA,KAAS3B,EAAIiB,EAAWU,MAAIJ,GAAKH,EAAI,EAAIpB,EAAEuB,GAAKH,EAAI,EAAIpB,EAAEkB,EAAQd,EAAKmB,GAAKvB,EAAEkB,EAAQd,KAASmB,GAChJ,OAAOH,EAAI,GAAKG,GAAKjB,OAAOC,eAAeW,EAAQd,EAAKmB,GAAIA,EAWzD,SAASK,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,I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eqC,KAAK5F,MAAM2D,QAAQJ,KdTpBqG,EcS0BV,EAAQW,GdTZ9H,EAAI,aAAawB,cAAiBqG,McU7E,MAAMF,QAAyBlG,EAAoBxD,EAAM2D,QAAQJ,MACjE,OAAO,OAAP,wBAAYvD,GAAK,CAAEwD,SAAUkG,EAAiBlG,cAG1B,KAAAgD,cAAgB,CAACxG,EAAO2D,IAAa,OAAD,wBACrD3D,GAAK,CACR2D,QAAAA,IAGmB,KAAAsE,aAAe,CAACjI,EAAO8D,KAC1C9D,EAAM2D,QAAQG,OAASA,EAChB9D,GAGW,KAAA8J,YAAc,CAAC9J,EAAO2D,KACxCwB,SAASC,SAAS4B,KAAO,YAAYrD,EAAQJ,QAGzB,KAAAwG,cAAgB/J,GAAU,OAAD,wBAC1CA,GAAK,CACRuJ,UAAU,IAGa,KAAAS,SAAYhK,Id3CX+B,EAAI,ac4CZ/B,EAAM2D,QAAQJ,QAC9B4B,SAASC,SAAS4B,KAAO,KAClB,OAAP,wBAAYhH,GAAK,CAAEuJ,UAAU,KAGF,KAAAU,aAAejK,GAAU,OAAD,wBAChDA,GAAK,CACRuJ,UAAU,KA1DK,IAAhB,IAAAhJ,IAAG,c,2BAYgB,IAAnB,IAAAA,IAAG,iB,iCAamB,IAAtB,IAAAA,IAAG,oB,oCAMkB,IAArB,IAAAA,IAAG,mB,oCAKiB,IAApB,IAAAA,IAAG,kB,mCAKgB,IAAnB,IAAAA,IAAG,iB,kCAIkB,IAArB,IAAAA,IAAG,mB,oCAKqB,IAAxB,IAAAA,IAAG,sB,+BAMyB,IAA5B,IAAAA,IAAG,0B,oCAMS,IAAI+I,GAAmB5C,MAAM,UChH5C,OAAO,KAAK,CAACwD,KAAUC,KACrB,QAAQ,KAAKD,GAAS,QAASC,MAGjC,SAAS,aAAa,KACpB,UAAU/E,SAAS4B,SAGrB,QAAQ,c","sources":["webpack://apprun-realworld-example-app/webpack/bootstrap","webpack://apprun-realworld-example-app/webpack/runtime/compat get default export","webpack://apprun-realworld-example-app/webpack/runtime/define property getters","webpack://apprun-realworld-example-app/webpack/runtime/hasOwnProperty shorthand","webpack://apprun-realworld-example-app/external var \"apprun\"","webpack://apprun-realworld-example-app/./node_modules/tslib/tslib.es6.js","webpack://apprun-realworld-example-app/./src/components/header.tsx","webpack://apprun-realworld-example-app/./src/fetch.ts","webpack://apprun-realworld-example-app/./src/api.ts","webpack://apprun-realworld-example-app/./src/components/article-list.tsx","webpack://apprun-realworld-example-app/./src/components/page-list.tsx","webpack://apprun-realworld-example-app/./src/components/home.tsx","webpack://apprun-realworld-example-app/./src/components/error-list.tsx","webpack://apprun-realworld-example-app/./src/components/signin.tsx","webpack://apprun-realworld-example-app/./src/components/register.tsx","webpack://apprun-realworld-example-app/./src/components/profile.tsx","webpack://apprun-realworld-example-app/./src/components/modal.tsx","webpack://apprun-realworld-example-app/./src/components/settings.tsx","webpack://apprun-realworld-example-app/./src/components/editor.tsx","webpack://apprun-realworld-example-app/external var \"marked\"","webpack://apprun-realworld-example-app/./src/components/comment-list.tsx","webpack://apprun-realworld-example-app/./src/components/article-meta.tsx","webpack://apprun-realworld-example-app/./src/components/article.tsx","webpack://apprun-realworld-example-app/./src/main.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = apprun;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import app, { Component, on } from 'apprun';\n\nclass HeaderComponent extends Component {\n state = {};\n view = (state) => {\n const user = state.user;\n return (\n <ul class=\"nav navbar-nav pull-xs-right\">\n <li class=\"nav-item\">\n <a class=\"nav-link active\" href=\"#/\">\n Home\n </a>\n </li>\n {user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#/editor\">\n <i class=\"ion-compose\"></i> New Post\n </a>\n </li>\n )}\n {user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#/settings\">\n <i class=\"ion-gear-a\"></i> Settings\n </a>\n </li>\n )}\n {!user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#/login\">\n Sign In\n </a>\n </li>\n )}\n {!user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#/register\">\n Sign Up\n </a>\n </li>\n )}\n {user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href={`#/profile/${user.username}`}>\n {user.username}\n </a>\n </li>\n )}\n {user && (\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"#/logout\">\n Sign Out\n </a>\n </li>\n )}\n </ul>\n );\n };\n\n @on('/set-user') setUser = (state, user) => ({ ...state, user });\n}\n\nexport default new HeaderComponent().start('header');\n","declare let defaultBasePath;\n\nlet access_token: string =\n (window && window.localStorage && window.localStorage.getItem('jwt')) || '';\nexport function getToken() {\n return access_token;\n}\n\nexport function setToken(token: string) {\n access_token = token;\n if (!window.localStorage) {return;}\n if (token) {window.localStorage.setItem('jwt', token);} else {window.localStorage.removeItem('jwt');}\n}\n\nexport async function fetchAsync(\n method: 'GET' | 'POST' | 'DELETE' | 'PUT',\n url: string,\n body?\n) {\n const headers = { 'Content-Type': 'application/json; charset=utf-8' };\n if (access_token) {headers['Authorization'] = `Token ${access_token}`;}\n const response = await window['fetch'](`${defaultBasePath}${url}`, {\n method,\n headers,\n body: body && JSON.stringify(body)\n });\n if (response.status === 401) {\n setToken(null);\n throw new Error('401');\n }\n const result = await response.json();\n if (!response.ok) {throw result;}\n return result;\n}\n\nexport function get<T>(url: string): Promise<T> {\n return fetchAsync('GET', url);\n}\n\nexport function post<T>(url: string, body?): Promise<T> {\n return fetchAsync('POST', url, body);\n}\n\nexport function del(url: string) {\n return fetchAsync('DELETE', url);\n}\n\nexport function put(url: string, body?) {\n return fetchAsync('PUT', url, body);\n}\nexport function toQueryString(obj) {\n const parts = [];\n for (const i in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\n parts.push(encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]));\n }\n }\n return parts.join('&');\n}\n\nexport function serializeObject<T>(form) {\n const obj = {};\n if (typeof form === 'object' && form.nodeName === 'FORM') {\n for (let i = 0; i < form.elements.length; i++) {\n const field = form.elements[i];\n if (\n field.name &&\n field.type !== 'file' &&\n field.type !== 'reset' &&\n field.type !== 'submit' &&\n field.type !== 'button'\n ) {\n if (field.type === 'select-multiple') {\n obj[field.name] = '';\n let tempvalue = '';\n for (let j = 0; j < form.elements[i].options.length; j++) {\n if (field.options[j].selected) {tempvalue += field.options[j].value + ';';}\n }\n if (tempvalue.charAt(tempvalue.length - 1) === ';') {obj[field.name] = tempvalue.substring(0, tempvalue.length - 1);}\n } else if ((field.type !== 'checkbox' && field.type !=='radio') || field.checked) {\n obj[field.name] = field.value;\n }\n }\n }\n }\n return obj as T;\n}\n","import app from 'apprun';\r\n\r\n// Conduit API\r\nwindow['defaultBasePath'] = 'https://api.realworld.io/api';\r\n\r\nimport { toQueryString, serializeObject, getToken, setToken, get, post, del, put } from './fetch';\r\nexport { toQueryString, serializeObject };\r\nimport { IUser, IProfile, IArticle, IComment } from './models';\r\n\r\nexport interface IAuthResponse {\r\n user: IUser;\r\n}\r\n\r\nexport interface ITags {\r\n tags: Array<string>;\r\n}\r\n\r\nexport interface IFeed {\r\n articles: Array<IArticle>;\r\n articlesCount: number;\r\n}\r\n\r\nexport interface IArticlesRequest {\r\n tag?: string;\r\n author?: string;\r\n favorited?: string;\r\n limit: number;\r\n offset: number;\r\n}\r\n\r\nexport interface INewArticle {\r\n title: string;\r\n description: string;\r\n body: string;\r\n tagList: Array<string>;\r\n}\r\n\r\nexport interface IArticlesResponse {\r\n article: IArticle;\r\n}\r\n\r\nexport interface ICommentsResponse {\r\n comments: Array<IComment>;\r\n}\r\n\r\nexport interface IProfileResponse {\r\n profile: IProfile;\r\n}\r\n\r\nexport const tags = {\r\n all: () => get<ITags>('/tags')\r\n};\r\n\r\nexport const auth = {\r\n current: () => (getToken() ? get<IAuthResponse>('/user') : null),\r\n signIn: (user: { email: string; password: string }) =>\r\n post<IAuthResponse>('/users/login', { user }),\r\n register: (user: { username: string; email: string; password: string }) =>\r\n post<IAuthResponse>('/users', { user }),\r\n save: user => put('/user', { user }),\r\n authorized: (): boolean => (app['user'] ? true : app.run('#/login') && false) // app.run returns true if found event handlers\r\n};\r\n\r\nexport const articles = {\r\n search: (request: IArticlesRequest) => get<IFeed>(`/articles?${toQueryString(request)}`),\r\n feed: (request: { limit: number; offset: number }) =>\r\n get<IFeed>(`/articles/feed?${toQueryString(request)}`),\r\n get: (slug: string) => get<IArticlesResponse>(`/articles/${slug}`),\r\n delete: (slug: string) => del(`/articles/${slug}`),\r\n favorite: (slug: string) => post(`/articles/${slug}/favorite`),\r\n unfavorite: (slug: string) => del(`/articles/${slug}/favorite`),\r\n update: (article: IArticle) => put(`/articles/${article.slug}`, { article }),\r\n create: (article: INewArticle) => post<IArticlesResponse>('/articles', { article })\r\n};\r\n\r\nexport const comments = {\r\n create: (slug: string, comment: { body: string }) =>\r\n post(`/articles/${slug}/comments`, { comment }),\r\n delete: (slug: string, commentId: string) => del(`/articles/${slug}/comments/${commentId}`),\r\n forArticle: (slug: string) => get<ICommentsResponse>(`/articles/${slug}/comments`)\r\n};\r\n\r\nexport const profile = {\r\n get: (username: string) => get<IProfileResponse>(`/profiles/${username}`),\r\n follow: (username: string) => post<IProfileResponse>(`/profiles/${username}/follow`),\r\n unfollow: (username: string) => del(`/profiles/${username}/follow`)\r\n};\r\n\r\napp.on('/get-user', async () => {\r\n try {\r\n const current = await auth.current();\r\n app.run('/set-user', current?.user);\r\n } catch {\r\n setToken(null);\r\n document.location.reload();\r\n }\r\n});\r\n\r\napp.on('/set-user', (user) => {\r\n app['user'] = user;\r\n setToken(user ? user.token : null);\r\n});\r\n\r\napp.on('/toggle-follow', async (author: IProfile, component) => {\r\n if (!auth.authorized()) {return;}\r\n const result = author.following\r\n ? await profile.unfollow(author.username)\r\n : await profile.follow(author.username);\r\n component.run('update-follow', result.profile);\r\n});\r\n\r\napp.on('/toggle-fav-article', async (article: IArticle, component) => {\r\n if (!auth.authorized()) {return;}\r\n const result = article.favorited\r\n ? await articles.unfavorite(article.slug)\r\n : await articles.favorite(article.slug);\r\n component.run('update-article', result.article);\r\n});\r\n","import app from 'apprun';\nimport { IArticle } from '../models';\n\nfunction Article(props) {\n const article = props.article as IArticle;\n const favClass = article.favorited ? 'btn-primary' : 'btn-outline-primary';\n return (\n <div class=\"article-preview\">\n <div class=\"article-meta\">\n <a href={article.author.image}>\n <img src={article.author.image} />\n </a>\n <div class=\"info\">\n <a href={`#/profile/${article.author.username}`} class=\"author\">\n {article.author.username}\n </a>\n <span class=\"date\">{new Date(article.updatedAt).toLocaleString()}</span>\n </div>\n <button\n class={`btn btn-sm pull-xs-right ${favClass}`}\n $onclick={['/toggle-fav-article', article, props.component]}>\n <i class=\"ion-heart\"></i> {article.favoritesCount}\n </button>\n </div>\n <a href={`#/article/${article.slug}`} class=\"preview-link\">\n <h1>{article.title}</h1>\n <p>{article.description}</p>\n <span>Read more...</span>\n <ul class=\"tag-list\">\n {article.tagList.map(tag => (\n <li class=\"tag-default tag-pill tag-outline\">\n <a href={`#/tag/${tag}`}>{tag} </a>\n </li>\n ))}\n </ul>\n </a>\n </div>\n );\n}\n\nexport default function ({ articles, component }: { articles: Array<IArticle>; component }) {\n return articles.length ? (\n articles.map(article => <Article article={article} component={component}></Article>)\n ) : (\n <div class=\"article-preview\">No articles are here... yet.</div>\n );\n}\n","import app from 'apprun';\n\nexport default function ({ max, selected, link }) {\n const pages = new Array(max).fill(0);\n return (\n <nav>\n <ul class=\"pagination\">\n {pages.map((page, idx) => (\n <li class={`page-item ${idx + 1 === selected ? 'active' : ''}`}>\n <a href={`${link}/${idx + 1}`} class=\"page-link\">\n {idx + 1}\n </a>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n","import app, { Component, on } from 'apprun';\nimport { auth, tags, articles } from '../api';\nimport { IArticle } from '../models';\nimport Articles from './article-list';\nimport Pages from './page-list';\n\nconst PAGE_SIZE = 10;\nconst Tag = ({ tag }) => (\n <a href={`#/tag/${tag}/1`} class=\"tag-pill tag-default\">\n {tag}\n </a>\n);\n\ndeclare interface IState {\n type: '' | 'feed' | 'tag';\n articles: Array<IArticle>;\n tags: Array<string>;\n max: number;\n page: number;\n}\n\nclass HomeComponent extends Component {\n state: IState = {\n type: '',\n articles: [],\n tags: [],\n max: 1,\n page: 1\n };\n\n view = (state) => {\n const tag = state.type === 'tag' && state.tag ? `/${state.tag}` : '';\n return (\n <div class=\"home-page\">\n <div class=\"banner\">\n <div class=\"container\">\n <h1 class=\"logo-font\">conduit</h1>\n <p>A place to share your knowledge.</p>\n </div>\n </div>\n <div class=\"container page\">\n <div class=\"row\">\n <div class=\"col-md-9\">\n <div class=\"feed-toggle\">\n <ul class=\"nav nav-pills outline-active\">\n <li class=\"nav-item\">\n <a\n class={`nav-link ${app['user'] ? '' : 'disabled'} ${\n state.type === 'feed' ? 'active' : ''\n }`}\n href=\"#/feed\">\n Your Feed\n </a>\n </li>\n <li class=\"nav-item\">\n <a class={`nav-link ${state.type === '' ? 'active' : ''}`} href=\"#/\">\n Global Feed\n </a>\n </li>\n {state.tag ? (\n <li class=\"nav-item\">\n <a\n class={`nav-link ${state.type === 'tag' ? 'active' : ''}`}\n href={`#/tag/${state.tag}`}>\n #{state.tag}\n </a>\n </li>\n ) : (\n ''\n )}\n </ul>\n </div>\n <Articles articles={state.articles} component={this} />\n <Pages\n max={Math.floor(state.max / PAGE_SIZE)}\n selected={state.page}\n link={`#/${state.type}${tag}`}\n />\n </div>\n <div class=\"col-md-3\">\n <div class=\"sidebar\">\n <p>Popular Tags</p>\n <div class=\"tag-list\">\n {state.tags.map(tag => (\n <Tag tag={tag} />\n ))}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n updateState = async (state, type: '' | 'feed' | 'tag', page, tag?: string) => {\n try {\n const tagList = state.tags.length ? { tags: state.tags } : await tags.all();\n page = parseInt(page) || 1;\n tag = tag || state.tag;\n const limit = PAGE_SIZE;\n const offset = (page - 1) * PAGE_SIZE;\n let feed;\n switch (type) {\n case 'feed':\n if (!auth.authorized()) {return { ...state, articles: [], max: 0 };}\n feed = await articles.feed({ limit, offset });\n break;\n case 'tag':\n feed = await articles.search({ tag, limit, offset });\n break;\n default:\n feed = await articles.search({ limit, offset });\n break;\n }\n page = Math.min(page, Math.floor(feed.articlesCount / PAGE_SIZE) + 1);\n return {\n ...state,\n tags: tagList.tags,\n type,\n page,\n tag,\n articles: feed.articles,\n max: feed.articlesCount\n };\n } catch ({ errors }) {\n return { ...state, errors, articles: [], max: 0 };\n }\n };\n\n @on('#/') root = async (state, page) => await this.updateState(state, '', page);\n\n @on('#/feed') feed = async (state, page) => await this.updateState(state, 'feed', page);\n\n @on('#/tag') tag = async (state, tag, page) => await this.updateState(state, 'tag', page, tag);\n\n @on('update-article') updateArticle = (state, article) => {\n state.articles = state.articles.map((a) => {\n return a.slug === article.slug ? article : a;\n });\n return state;\n };\n}\n\nexport default new HomeComponent().mount('my-app');\n","import app from 'apprun';\n\nexport default function ({ errors }) {\n return (\n <ul class=\"error-messages\">\n {Object.keys(errors).map(key => (\n <li>{`${key} ${errors[key]}`}</li>\n ))}\n </ul>\n );\n}\n","import app, { Component, on } from 'apprun';\nimport { auth, serializeObject } from '../api';\n\nimport Errors from './error-list';\n\nclass SigninComponent extends Component {\n state = {};\n\n view = (state) => {\n if (!state || state instanceof Promise) {return;}\n return (\n <div class=\"auth-page\">\n <div class=\"container page\">\n <div class=\"row\">\n <div class=\"col-md-6 offset-md-3 col-xs-12\">\n <h1 class=\"text-xs-center\">Sign In</h1>\n <p class=\"text-xs-center\">\n <a href=\"#/register\">Need an account?</a>\n </p>\n\n {state.errors && <Errors errors={state.errors} />}\n\n <form $onsubmit='sign-in'>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"text\"\n placeholder=\"Email\"\n name=\"email\"\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n />\n </fieldset>\n <button class=\"btn btn-lg btn-primary pull-xs-right\">Sign In</button>\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n @on('#/login') login = state => !auth.current() ? { ...state, messages: [], returnTo: document.location.hash } : location.href = '#/';\n @on('#/logout') logout = () => {\n app.run('/set-user', null);\n document.location.hash = '#/';\n };\n\n @on('sign-in') signIn = async (state, e) => {\n try {\n e.preventDefault();\n const session = await auth.signIn(serializeObject(e.target));\n app.run('/set-user', session.user);\n const returnTo: string = (state.returnTo || '').replace(/#\\/login\\/?/, '');\n if (!returnTo) {document.location.hash = '#/feed';} else {\n app.run('route', returnTo);\n history.pushState(null, null, returnTo);\n }\n } catch ({ errors }) {\n return { ...state, errors };\n }\n };\n}\n\nexport default new SigninComponent().mount('my-app');\n","import app, { Component, on } from 'apprun';\nimport { auth, serializeObject } from '../api';\nimport Errors from './error-list';\n\nclass RegisterComponent extends Component {\n state = {};\n\n view = (state) => {\n if (!state || state instanceof Promise) {return;}\n return (\n <div class=\"auth-page\">\n <div class=\"container page\">\n <div class=\"row\">\n <div class=\"col-md-6 offset-md-3 col-xs-12\">\n <h1 class=\"text-xs-center\">Sign Up</h1>\n <p class=\"text-xs-center\">\n <a href=\"#/login\">Have an account?</a>\n </p>\n\n {state.errors && <Errors errors={state.errors} />}\n\n <form $onsubmit='register'>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"text\"\n placeholder=\"Your Name\"\n name=\"username\"\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"text\"\n placeholder=\"Email\"\n name=\"email\"\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n />\n </fieldset>\n <button class=\"btn btn-lg btn-primary pull-xs-right\">Sign up</button>\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n @on('#/register') register = (state, messages) => !auth.current() ? { ...state, messages } : location.href = '#/';\n\n @on('register') submitRegistration = async (state, e) => {\n try {\n e.preventDefault();\n const session = await auth.register(serializeObject(e.target));\n app.run('/set-user', session.user);\n app.run('route', '#/');\n } catch ({ errors }) {\n return { ...state, errors };\n }\n };\n}\n\nexport default new RegisterComponent().mount('my-app');\n","import app, { Component, on } from 'apprun';\nimport { IProfile } from '../models';\nimport { articles, profile , auth } from '../api';\nimport Articles from './article-list';\nimport Pages from './page-list';\n\nconst PAGE_SIZE = 10;\n\nclass ProfileComponent extends Component {\n state = {\n name: '',\n type: 'articles',\n articles: [],\n page: 1\n };\n\n view = (state) => {\n const profile = state.profile as IProfile;\n if (!profile) {return;}\n return (\n <div class=\"profile-page\">\n <div class=\"user-info\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-12 col-md-10 offset-md-1\">\n <img src={profile.image} class=\"user-img\" />\n <h4>{profile.username}</h4>\n <p>{profile.bio}</p>\n <button\n class=\"btn btn-sm btn-outline-secondary action-btn\"\n $onclick={['/toggle-follow', profile, this]}>\n {profile.following ? (\n <span>\n <i class=\"ion-minus-round\"></i> Unfollow {profile.username}\n </span>\n ) : (\n <span>\n <i class=\"ion-plus-round\"></i> Follow {profile.username}\n </span>\n )}\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-xs-12 col-md-10 offset-md-1\">\n <div class=\"articles-toggle\">\n <ul class=\"nav nav-pills outline-active\">\n <li class=\"nav-item\">\n <a\n class={`nav-link ${state.type === 'articles' ? 'active' : ''}`}\n href={`#/profile/${profile.username}/articles/1`}>\n My Articles\n </a>\n </li>\n <li class=\"nav-item\">\n <a\n class={`nav-link ${state.type === 'favorites' ? 'active' : ''}`}\n href={`#/profile/${profile.username}/favorites/1`}>\n Favorited Articles\n </a>\n </li>\n </ul>\n </div>\n <Articles articles={state.articles} component={this} />\n <Pages\n max={Math.floor(state.max / PAGE_SIZE)}\n selected={state.page}\n link={`#/profile/${state.profile.username}/${state.type}`}\n />\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n updateState = async (state, name, type, page) => {\n name = decodeURIComponent(name || state.name);\n type = type || state.type;\n page = parseInt(page) || state.page;\n let newState = state;\n if (name !== state.name) {\n const profileResult = await profile.get(name);\n newState = { ...newState, profile: profileResult.profile };\n }\n if (name !== state.name || type !== state.type || page !== state.page) {\n const limit = PAGE_SIZE;\n const offset = (page - 1) * limit;\n const articleResult =\n type === 'favorites'\n ? await articles.search({ favorited: name, offset, limit })\n : await articles.search({ author: name, offset, limit });\n newState = {\n ...newState,\n name,\n type,\n page,\n articles: articleResult.articles,\n max: articleResult.articlesCount\n };\n }\n return newState;\n };\n\n @on('#/profile') root = (state, name, type, page) => auth.authorized() ? this.updateState(state, name, type, page) : null;\n\n @on('update-article') updateArticle = (state, article) => {\n state.articles = state.articles.map((a) => {\n return a.slug === article.slug ? article : a;\n });\n return state;\n };\n\n @on('update-follow') updateFollow = (state, profile) => ({ ...state, profile });\n}\n\nexport default new ProfileComponent().mount('my-app');\n","import app from 'apprun';\n\nexport default function ({ title, body, ok, cancel, onOK, onCancel }) {\n return (\n <div class=\"modal-open\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">\n {title}\n <button\n type=\"button\"\n class=\"close\"\n data-dismiss=\"modal\"\n aria-label=\"Close\"\n $onclick={onCancel}>\n <span aria-hidden=\"true\">×</span>\n </button>\n </h5>\n </div>\n <div class=\"modal-body\">\n <p>{body}</p>\n </div>\n <div class=\"modal-footer\">\n {cancel && (\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n data-dismiss=\"modal\"\n $onclick={onCancel}>\n {cancel}\n </button>\n )}\n \n <button type=\"button\" class=\"btn btn-primary\" $onclick={onOK}>\n {ok}\n </button>\n </div>\n </div>\n </div>\n <div class=\"modal-backdrop show\" $onclick={onCancel}></div>\n </div>\n );\n}\n","import app, { Component, on } from 'apprun';\nimport { serializeObject, auth } from '../api';\nimport Errors from './error-list';\nimport Modal from './modal';\n\nclass SettingsComponent extends Component {\n state = {};\n\n view = (state) => {\n const user = state.user;\n if (!user) {return;}\n return (\n <div class=\"settings-page\">\n {state.showModal ? (\n <Modal\n title=\"Confirmation\"\n body=\"Your settings has been updated successfully.\"\n ok=\"OK\"\n cancel=\"Cancel\"\n onOK={'ok'}\n onCancel={'cancel'}\n />\n ) : (\n ''\n )}\n <div class=\"container page\">\n <div class=\"row\">\n <div class=\"col-md-6 offset-md-3 col-xs-12\">\n {state.errors && <Errors errors={state.errors} />}\n <h1 class=\"text-xs-center\">Your Settings</h1>\n <form $onsubmit='submit-settings'>\n <fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control\"\n type=\"text\"\n placeholder=\"URL of profile picture\"\n name=\"image\"\n value={user.image}\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"text\"\n placeholder=\"Your Name\"\n name=\"username\"\n value={user.username}\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <textarea\n class=\"form-control form-control-lg\"\n rows=\"8\"\n placeholder=\"Short bio about you\"\n name=\"bio\">\n {user.bio}\n </textarea>\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"text\"\n placeholder=\"Email\"\n name=\"email\"\n value={user.email}\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n class=\"form-control form-control-lg\"\n type=\"password\"\n placeholder=\"Password\"\n name=\"password\"\n value={user.password}\n />\n </fieldset>\n <button class=\"btn btn-lg btn-primary pull-xs-right\">Update Settings</button>\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n @on('#/settings') settings = () => {\n if (!auth.authorized()) {return;}\n return { user: app['user'] };\n };\n\n @on('submit-settings') submitSettings = async (state, e) => {\n try {\n e.preventDefault();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const user = serializeObject<any>(e.target);\n const result = await auth.save(user);\n app.run('/set-user', result.user);\n return { user: result.user, showModal: true };\n } catch ({ errors }) {\n return { ...state, errors };\n }\n };\n\n @on('ok, cancel') ok = (state) => {\n return { ...state, showModal: false };\n };\n}\n\nexport default new SettingsComponent().mount('my-app');\n","import app, { Component, on } from 'apprun';\nimport { serializeObject, articles, auth } from '../api';\nimport Errors from './error-list';\n\nclass EditorComponent extends Component {\n state = {};\n\n view = (state) => {\n if (!app['user'] || !state.article) {return;}\n const article = state.article;\n return (\n <div class=\"editor-page\">\n <div class=\"container page\">\n <div class=\"row\">\n <div class=\"col-md-10 offset-md-1 col-xs-12\">\n {state.errors && <Errors errors={state.errors} />}\n <form $onsubmit='submit-article'>\n {article.slug && <input type=\"hidden\" name=\"slug\" value={article.slug} />}\n <fieldset>\n <fieldset class=\"form-group\">\n <input\n type=\"text\"\n class=\"form-control form-control-lg\"\n placeholder=\"Article Title\"\n name=\"title\"\n value={article.title}\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"What's this article about?\"\n name=\"description\"\n value={article.description}\n />\n </fieldset>\n <fieldset class=\"form-group\">\n <textarea\n class=\"form-control\"\n rows=\"8\"\n placeholder=\"Write your article (in markdown)\"\n name=\"body\">\n {article.body}\n </textarea>\n </fieldset>\n <fieldset class=\"form-group\">\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"Enter tags\"\n name=\"tags\"\n value={article.tagList.join(', ')}\n />\n <div class=\"tag-list\"></div>\n </fieldset>\n <button class=\"btn btn-lg pull-xs-right btn-primary\" type=\"submit\">\n Publish Article\n </button>\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n </div>\n );\n };\n\n @on('#/editor') root = async (state, slug) => {\n if (!auth.authorized()) {return;}\n let article;\n if (slug) {\n const result = await articles.get(slug);\n article = result.article;\n }\n article = article || { title: '', description: '', body: '', tagList: [] };\n return { article };\n };\n\n @on('submit-article') submitArticle = async (state, e) => {\n try {\n e.preventDefault();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const article = serializeObject<any>(e.target);\n article.tagList = article.tags.split(',');\n const result = article.slug ? await articles.update(article) : await articles.create(article);\n document.location.hash = `#/article/${result.article.slug}`;\n } catch ({ errors }) {\n return { ...state, errors };\n }\n };\n}\n\nexport default new EditorComponent().mount('my-app');\n","const __WEBPACK_NAMESPACE_OBJECT__ = marked;","import app from 'apprun';\nimport { IComment, IProfile } from '../models';\nimport { marked } from 'marked';\n\nfunction Comment({ comment }: { comment: IComment }) {\n return (\n <div class=\"card\">\n <div class=\"card-block\">\n <p class=\"card-text\">\n <p>{`_html:${marked(comment.body)}`}</p>\n </p>\n </div>\n <div class=\"card-footer\">\n <a class=\"comment-author\">\n <img src={comment.author.image} class=\"comment-author-img\" />\n </a>\n \n <a class=\"comment-author\" href={`#/profile/${comment.author.username}`}>\n {comment.author.username}\n </a>\n <span class=\"date-posted\">{new Date(comment.createdAt).toLocaleString()}</span>\n {app['user'] && app['user'].username === comment.author.username && (\n <span class=\"mod-options\">\n <i class=\"ion-trash-a\" $onclick={['/delete-comment', comment]}></i>\n </span>\n )}\n </div>\n </div>\n );\n}\n\nexport default function ({ comments }: { comments: Array<IComment> }) {\n const user = app['user'] as IProfile;\n return (\n <div class=\"row\">\n <div class=\"col-xs-12 col-md-8 offset-md-2\">\n {!user ? (\n <p>\n <a href={`#/login/${document.location.hash}`}>Sign in</a> or \n <a href=\"#/register\">sign up</a> to add comments on this article.\n </p>\n ) : (\n <form class=\"card comment-form\" $onsubmit='/new-comment'>\n <div class=\"card-block\">\n <textarea\n class=\"form-control\"\n placeholder=\"Write a comment...\"\n rows=\"3\"\n name=\"comment\"></textarea>\n </div>\n <div class=\"card-footer\">\n {user.image ? (\n <img src={user.image} class=\"comment-author-img\" />\n ) : (\n <span>@{user.username}</span>\n )}\n <button class=\"btn btn-sm btn-primary\" type=\"submit\">\n Post Comment\n </button>\n </div>\n </form>\n )}\n {comments.map(comment => (\n <Comment comment={comment} />\n ))}\n </div>\n </div>\n );\n}\n","import app from 'apprun';\nimport { IArticle } from '../models';\n\nexport default function ArticleMeta({ article, component }: { article: IArticle; component }) {\n const favClass = article.favorited ? 'btn-primary' : 'btn-outline-primary';\n const followClass = article.author.following ? 'btn-secondary' : 'btn-outline-secondary';\n return (\n <div class=\"article-meta\">\n <a href={article.author.image}>\n <img src={article.author.image} />\n </a>\n <div class=\"info\">\n <a href={`#/profile/${article.author.username}`} class=\"author\">\n {article.author.username}\n </a>\n <span class=\"date\">{new Date(article.updatedAt).toLocaleString()}</span>\n </div>\n\n {app['user'] && app['user'].username === article.author.username ? (\n <span>\n <button\n class=\"btn btn-sm btn-outline-secondary\"\n $onclick={['edit-article', article]}>\n <i class=\"ion-edit\"></i> Edit Article\n </button>\n \n <button\n class=\"btn btn-sm btn-outline-danger\"\n $onclick={['delete-article', article]}>\n <i class=\"ion-trash-o\"></i> Delete Article\n </button>\n </span>\n ) : (\n <span>\n <button\n class={`btn btn-sm ${followClass}`}\n $onclick={['/toggle-follow', article.author, component]}>\n {article.author.following ? (\n <span>\n <i class=\"ion-minus-round\"></i> Unfollow {article.author.username}\n </span>\n ) : (\n <span>\n <i class=\"ion-plus-round\"></i> Follow {article.author.username}\n </span>\n )}\n </button>{' '}\n \n <button\n class={`btn btn-sm ${favClass}`}\n $onclick={['/toggle-fav-article', article, component]}>\n <i class=\"ion-heart\"></i>\n Favorite Post <span class=\"counter\">({article.favoritesCount})</span>\n </button>\n </span>\n )}\n </div>\n );\n}\n","import app, { Component, on } from 'apprun';\nimport { articles, comments } from '../api';\nimport { IArticle } from '../models';\nimport Comments from './comment-list';\nimport ArticleMeta from './article-meta';\nimport Modal from './modal';\nimport { marked } from 'marked';\n\nclass ArticleComponent extends Component {\n state = {\n article: null,\n comments: []\n };\n\n view = (state) => {\n const article = state.article as IArticle;\n if (!article) {return;}\n return (\n <div class=\"article-page\">\n {state.deleting && (\n <Modal\n title=\"Delete Article\"\n body=\"Are you sure you want to delete this article?\"\n ok=\"Delete\"\n cancel=\"No\"\n onOK='ok-delete-article'\n onCancel='cancel-delete-article'\n />\n )}\n\n <div class=\"banner\">\n <div class=\"container\">\n <h1>{article.title}</h1>\n <ArticleMeta article={article} component={this} />\n </div>\n </div>\n\n <div class=\"container page\">\n <div class=\"row article-content\">\n <div class=\"col-md-12\">\n <p>{`_html:${marked(article.body)}`}</p>\n <div class=\"tag-list\">\n <br />\n {article.tagList.map(tag => (\n <li class=\"tag-default tag-pill tag-outline\">\n <a href={`#/tag/${tag}`}>{tag} </a>\n </li>\n ))}\n </div>\n </div>\n </div>\n <hr />\n <div class=\"article-actions\">\n <ArticleMeta article={article} component={this} />\n </div>\n <Comments comments={state.comments} />\n </div>\n </div>\n );\n };\n\n @on('#/article') root = async (state, slug) => {\n let article = state.article as IArticle;\n let _comments = state.comments;\n if (!article || article.slug !== slug) {\n const result = await articles.get(slug);\n article = result.article;\n const commentsResponse = await comments.forArticle(article.slug);\n _comments = commentsResponse.comments;\n }\n return { ...state, article, comments: _comments };\n };\n\n @on('/new-comment') newComment = async (state, e) => {\n try {\n e.preventDefault();\n const comment = e.target['comment'].value;\n if (!comment) {return;}\n await comments.create(state.article.slug, { body: comment });\n const commentsResponse = await comments.forArticle(state.article.slug);\n return { ...state, comments: commentsResponse.comments };\n } catch ({ errors }) {\n return { ...state, errors };\n }\n };\n\n @on('/delete-comment') deleteComment = async (state, comment) => {\n await comments.delete(this.state.article.slug, comment.id);\n const commentsResponse = await comments.forArticle(state.article.slug);\n return { ...state, comments: commentsResponse.comments };\n };\n\n @on('update-article') updateArticle = (state, article) => ({\n ...state,\n article\n });\n\n @on('update-follow') updateFollow = (state, author) => {\n state.article.author = author;\n return state;\n };\n\n @on('edit-article') editArticle = (state, article) => {\n document.location.hash = `#/editor/${article.slug}`;\n };\n\n @on('delete-article') deleteArticle = state => ({\n ...state,\n deleting: true\n });\n\n @on('ok-delete-article') okDelete = (state) => {\n articles.delete(state.article.slug);\n document.location.hash = '#/';\n return { ...state, deleting: false };\n };\n\n @on('cancel-delete-article') cancelDelete = state => ({\n ...state,\n deleting: false\n });\n}\n\nexport default new ArticleComponent().mount('my-app');\n","import app from 'apprun';\n\nimport './components/header';\nimport './components/home';\nimport './components/signin';\nimport './components/register';\nimport './components/profile';\nimport './components/settings';\nimport './components/editor';\nimport './components/article';\n\napp.on('#', (route, ...p) => {\n app.run(`#/${route || ''}`, ...p);\n});\n\napp.once('/set-user', () => {\n app.route(location.hash);\n});\n\napp.run('/get-user');"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","apprun","__decorate","decorators","target","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","create","HeaderComponent","Component","state","view","user","class","href","username","setUser","on","start","access_token","window","localStorage","getItem","setToken","token","setItem","removeItem","fetchAsync","method","url","body","headers","response","defaultBasePath","JSON","stringify","status","Error","json","ok","post","del","put","toQueryString","parts","push","encodeURIComponent","join","serializeObject","form","nodeName","elements","field","name","type","tempvalue","j","options","selected","charAt","substring","checked","auth","articles","request","slug","comments","Article","props","article","favClass","favorited","author","image","src","Date","updatedAt","toLocaleString","component","favoritesCount","title","description","tagList","map","tag","max","link","pages","Array","fill","page","idx","current","document","location","reload","following","profile","run","Tag","HomeComponent","tags","this","Math","floor","updateState","parseInt","limit","offset","feed","min","articlesCount","errors","root","updateArticle","keys","mount","SigninComponent","placeholder","login","messages","returnTo","hash","logout","signIn","preventDefault","session","replace","history","pushState","RegisterComponent","register","submitRegistration","ProfileComponent","bio","decodeURIComponent","newState","profileResult","articleResult","updateFollow","cancel","onOK","onCancel","role","SettingsComponent","showModal","rows","email","password","settings","submitSettings","EditorComponent","submitArticle","split","marked","Comment","comment","createdAt","ArticleMeta","followClass","ArticleComponent","deleting","_comments","newComment","commentsResponse","deleteComment","commentId","id","editArticle","deleteArticle","okDelete","cancelDelete","route","p"],"sourceRoot":""}