{"version":3,"sources":["webpack:///./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js"],"names":["extendStatics","__extends","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__","this","constructor","prototype","create","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","TextTemplateLoader","loadTemplate","loader","entry","text","_a","loadText","address","template","createTemplateFromMarkup","ensureOriginOnExports","moduleExports","moduleId","key","exportedValue","target","__useDefault","default","set","WebpackLoader","_super","_this","moduleRegistry","loaderPlugins","modulesBeingLoaded","Map","useTemplateLoader","addPlugin","fetch","getOrCreateTemplateRegistryEntry","templateIsLoaded","templateLoader","eachModule","callback","registry","__webpack_require__","c","getOwnPropertyNames","some","exports","_import","defaultHMR","addressParts","loaderPlugin","plugin_1","asyncModuleId","split","splice","Error","m","module","hot","hmrContext","accept","handleModuleChange","map","id","source","normalizeSync","relativeTo","normalize","loadAllModules","ids","all","loadModule","existing","beingLoaded","get","delete","url","applyPluginToUrl","toString","pluginName","implementation","Loader"],"mappings":"8FAAA,8KACQA,EADR,oCAAIC,GACID,EAAgBE,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIC,KAAKD,EAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,KAClE,SAAUF,EAAGC,GAEhB,SAASG,IAAOC,KAAKC,YAAcN,EADnCN,EAAcM,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaL,OAAOY,OAAOP,IAAMG,EAAGG,UAAYN,EAAEM,UAAW,IAAIH,KAGnFK,EAAwC,SAAUC,EAASC,EAAYC,EAAGC,GAC1E,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GA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AAIkB,EACJ,OAAOI,EAAYtB,MAAM,SAAUiD,GAC/B,OAAQA,EAAGpB,OACP,KAAK,EAAG,MAAO,CAAC,EAAa7B,KAAK4G,WAAWK,GAAK,IAClD,KAAK,EAED,OADA/F,EAAS+B,EAAGnB,kBACUpC,OAASwB,EAAO,aAAcxB,OAASwB,EAAOpB,eAAe,YAExE,CAAC,EAAcoB,EAAOiG,YAE1B,CAAC,EAAcjG,WAW1C6C,EAAc7D,UAAUgH,iBAAmB,SAAUD,EAAKG,GACtD,OAAOA,EAAa,IAAMH,GAO9BlD,EAAc7D,UAAUqE,UAAY,SAAU6C,EAAYC,GACtDrH,KAAKmE,cAAciD,GAAcC,GAE9BtD,EA9NuB,CA+NhC,KAEF,IAASuD,OAASvD,G","file":"vendor.aurelia-loader-webpack~6926fbb5.820c7368f24044ac32f8.chunk.js","sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Origin } from 'aurelia-metadata';\nimport { Loader } from 'aurelia-loader';\nimport { DOM, PLATFORM } from 'aurelia-pal';\n/**\n* An implementation of the TemplateLoader interface implemented with text-based loading.\n*/\nvar TextTemplateLoader = /** @class */ (function () {\n function TextTemplateLoader() {\n }\n /**\n * Loads a template.\n * @param loader The loader that is requesting the template load.\n * @param entry The TemplateRegistryEntry to load and populate with a template.\n * @return A promise which resolves when the TemplateRegistryEntry is loaded with a template.\n */\n TextTemplateLoader.prototype.loadTemplate = function (loader, entry) {\n return __awaiter(this, void 0, void 0, function () {\n var text;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, loader.loadText(entry.address)];\n case 1:\n text = _a.sent();\n entry.template = DOM.createTemplateFromMarkup(text);\n return [2 /*return*/];\n }\n });\n });\n };\n return TextTemplateLoader;\n}());\nexport { TextTemplateLoader };\nexport function ensureOriginOnExports(moduleExports, moduleId) {\n var target = moduleExports;\n var key;\n var exportedValue;\n if (target.__useDefault) {\n target = target.default;\n }\n Origin.set(target, new Origin(moduleId, 'default'));\n if (typeof target === 'object') {\n for (key in target) {\n exportedValue = target[key];\n if (typeof exportedValue === 'function') {\n Origin.set(exportedValue, new Origin(moduleId, key));\n }\n }\n }\n return moduleExports;\n}\n/**\n* A default implementation of the Loader abstraction which works with webpack (extended common-js style).\n*/\nvar WebpackLoader = /** @class */ (function (_super) {\n __extends(WebpackLoader, _super);\n function WebpackLoader() {\n var _this = _super.call(this) || this;\n _this.moduleRegistry = Object.create(null);\n _this.loaderPlugins = Object.create(null);\n _this.modulesBeingLoaded = new Map();\n _this.useTemplateLoader(new TextTemplateLoader());\n _this.addPlugin('template-registry-entry', {\n fetch: function (moduleId) { return __awaiter(_this, void 0, void 0, function () {\n var HmrContext, entry;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // HMR:\n if (module.hot) {\n if (!this.hmrContext) {\n HmrContext = require('aurelia-hot-module-reload').HmrContext;\n this.hmrContext = new HmrContext(this);\n }\n module.hot.accept(moduleId, function () { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.hmrContext.handleViewChange(moduleId)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); });\n }\n entry = this.getOrCreateTemplateRegistryEntry(moduleId);\n if (!!entry.templateIsLoaded) return [3 /*break*/, 2];\n return [4 /*yield*/, this.templateLoader.loadTemplate(this, entry)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/, entry];\n }\n });\n }); }\n });\n PLATFORM.eachModule = function (callback) {\n var registry = __webpack_require__.c;\n var cachedModuleIds = Object.getOwnPropertyNames(registry);\n cachedModuleIds\n // Note: we use .some here like a .forEach that can be \"break\"ed out of.\n // It will stop iterating only when a truthy value is returned.\n // Even though the docs say \"true\" explicitly, loader-default also goes by truthy\n // and this is to keep it consistent with that.\n .some(function (moduleId) {\n var moduleExports = registry[moduleId].exports;\n if (typeof moduleExports === 'object') {\n return callback(moduleId, moduleExports);\n }\n return false;\n });\n };\n return _this;\n }\n WebpackLoader.prototype._import = function (address, defaultHMR) {\n if (defaultHMR === void 0) { defaultHMR = true; }\n return __awaiter(this, void 0, void 0, function () {\n var addressParts, moduleId, loaderPlugin, plugin_1, asyncModuleId, callback;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n addressParts = address.split('!');\n moduleId = addressParts.splice(addressParts.length - 1, 1)[0];\n loaderPlugin = addressParts.length === 1 ? addressParts[0] : null;\n if (!loaderPlugin) return [3 /*break*/, 2];\n plugin_1 = this.loaderPlugins[loaderPlugin];\n if (!plugin_1) {\n throw new Error(\"Plugin \" + loaderPlugin + \" is not registered in the loader.\");\n }\n if (module.hot && plugin_1.hot) {\n module.hot.accept(moduleId, function () { return plugin_1.hot(moduleId); });\n }\n return [4 /*yield*/, plugin_1.fetch(moduleId)];\n case 1: return [2 /*return*/, _a.sent()];\n case 2:\n if (__webpack_require__.m[moduleId]) {\n if (defaultHMR && module.hot && this.hmrContext) {\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\n }\n return [2 /*return*/, __webpack_require__(moduleId)];\n }\n asyncModuleId = \"async!\" + moduleId;\n if (!__webpack_require__.m[asyncModuleId]) return [3 /*break*/, 4];\n if (defaultHMR && module.hot && this.hmrContext) {\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\n module.hot.accept(asyncModuleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\n }\n callback = __webpack_require__(asyncModuleId);\n return [4 /*yield*/, new Promise(callback)];\n case 3: return [2 /*return*/, _a.sent()];\n case 4: throw new Error(\"Unable to find module with ID: \" + moduleId);\n }\n });\n });\n };\n /**\n * Maps a module id to a source.\n * @param id The module id.\n * @param source The source to map the module to.\n */\n WebpackLoader.prototype.map = function (id, source) { };\n /**\n * Normalizes a module id.\n * @param moduleId The module id to normalize.\n * @param relativeTo What the module id should be normalized relative to.\n * @return The normalized module id.\n */\n WebpackLoader.prototype.normalizeSync = function (moduleId, relativeTo) {\n return moduleId;\n };\n /**\n * Normalizes a module id.\n * @param moduleId The module id to normalize.\n * @param relativeTo What the module id should be normalized relative to.\n * @return The normalized module id.\n */\n WebpackLoader.prototype.normalize = function (moduleId, relativeTo) {\n return Promise.resolve(moduleId);\n };\n /**\n * Instructs the loader to use a specific TemplateLoader instance for loading templates\n * @param templateLoader The instance of TemplateLoader to use for loading templates.\n */\n WebpackLoader.prototype.useTemplateLoader = function (templateLoader) {\n this.templateLoader = templateLoader;\n };\n /**\n * Loads a collection of modules.\n * @param ids The set of module ids to load.\n * @return A Promise for an array of loaded modules.\n */\n WebpackLoader.prototype.loadAllModules = function (ids) {\n var _this = this;\n return Promise.all(ids.map(function (id) { return _this.loadModule(id); }));\n };\n /**\n * Loads a module.\n * @param moduleId The module ID to load.\n * @return A Promise for the loaded module.\n */\n WebpackLoader.prototype.loadModule = function (moduleId, defaultHMR) {\n if (defaultHMR === void 0) { defaultHMR = true; }\n return __awaiter(this, void 0, void 0, function () {\n var existing, beingLoaded, moduleExports;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n existing = this.moduleRegistry[moduleId];\n if (existing) {\n return [2 /*return*/, existing];\n }\n beingLoaded = this.modulesBeingLoaded.get(moduleId);\n if (beingLoaded) {\n return [2 /*return*/, beingLoaded];\n }\n beingLoaded = this._import(moduleId, defaultHMR);\n this.modulesBeingLoaded.set(moduleId, beingLoaded);\n return [4 /*yield*/, beingLoaded];\n case 1:\n moduleExports = _a.sent();\n this.moduleRegistry[moduleId] = ensureOriginOnExports(moduleExports, moduleId);\n this.modulesBeingLoaded.delete(moduleId);\n return [2 /*return*/, moduleExports];\n }\n });\n });\n };\n /**\n * Loads a template.\n * @param url The url of the template to load.\n * @return A Promise for a TemplateRegistryEntry containing the template.\n */\n WebpackLoader.prototype.loadTemplate = function (url) {\n return this.loadModule(this.applyPluginToUrl(url, 'template-registry-entry'), false);\n };\n /**\n * Loads a text-based resource.\n * @param url The url of the text file to load.\n * @return A Promise for text content.\n */\n WebpackLoader.prototype.loadText = function (url) {\n return __awaiter(this, void 0, void 0, function () {\n var result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.loadModule(url, false)];\n case 1:\n result = _a.sent();\n if (result instanceof Array && result[0] instanceof Array && result.hasOwnProperty('toString')) {\n // we're dealing with a file loaded using the css-loader:\n return [2 /*return*/, result.toString()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n /**\n * Alters a module id so that it includes a plugin loader.\n * @param url The url of the module to load.\n * @param pluginName The plugin to apply to the module id.\n * @return The plugin-based module id.\n */\n WebpackLoader.prototype.applyPluginToUrl = function (url, pluginName) {\n return pluginName + \"!\" + url;\n };\n /**\n * Registers a plugin with the loader.\n * @param pluginName The name of the plugin.\n * @param implementation The plugin implementation.\n */\n WebpackLoader.prototype.addPlugin = function (pluginName, implementation) {\n this.loaderPlugins[pluginName] = implementation;\n };\n return WebpackLoader;\n}(Loader));\nexport { WebpackLoader };\nPLATFORM.Loader = WebpackLoader;\n"],"sourceRoot":""}