{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./Usc.Web/scripts/bundles/honourroll/_honourroll.js","webpack:///./Usc.Web/scripts/bundles/honourroll/honourroll.controller.js"],"names":["installedModules","__webpack_require__","moduleId","module","i","l","exports","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","angular","controller","$uibModal","this","isVisible","id","elm","document","getElementById","date","Date","dataset","currentYear","getFullYear","filterStr","toLowerCase","indexOf","filter","type","val","search","undefined","length","detail","open","template","windowClass","resolve","item","rendered","then","querySelector","$uibModalInstance","$sce","$filter","contentService","extend","image","award","ok","close","resp","content","trustAsHtml","citation","summary"],"mappings":"KACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,EAAGF,EACHG,EAAG,GACHC,QAAS,EACV,EAGAC,EAAQL,GAAUM,KAAKL,EAAOG,QAASH,EAAQA,EAAOG,QAASL,CAAmB,EAGlFE,EAAOE,EAAI,GAGJF,IAhB4BG,OAiBpC,CAIAL,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASL,EAASM,EAAMC,GAC3CZ,EAAoBa,EAAER,EAASM,CAAI,GACtCG,OAAOC,eAAeV,EAASM,EAAM,CAAEK,WAAY,GAAMC,IAAKL,CAAO,CAAC,CAExE,EAGAZ,EAAoBkB,EAAI,SAASb,GACX,aAAlB,OAAOc,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeV,EAASc,OAAOC,YAAa,CAAEC,MAAO,QAAS,CAAC,EAEvEP,OAAOC,eAAeV,EAAS,aAAc,CAAEgB,MAAO,EAAK,CAAC,CAC7D,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,CAAK,G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OACdlB,KAAKW,UAAYO,QAEQ,EAArBlB,KAAKiB,OAAOE,QACZnB,KAAKW,UAAYX,KAAKiB,OAAOL,YAAY,EACzCZ,KAAKS,YAAcS,QAEnBlB,KAAKW,UAAYO,MAG7B,EAEAlB,KAAKoB,OAASlB,IAEYH,EAAUsB,KAAK,CACjCC;;;;;;;;;;;;oBACAxB,WAAY,mCACZyB,YAAa,iBACbC,QAAS,CACLC,KAAMA,IAAMrB,SAASC,eAAeH,CAAE,EAAEM,QACxCN,GAAIA,IAAMA,CACd,CACJ,CAAC,EAEawB,SAASC,KAAK,KACPvB,SAASwB,cAAc,6BAA6B,CACzE,CAAC,CACL,CACJ,EAE+E,EAyC/E/B,QAAQlC,OAAO,QAAQ,EAAEmC,WAAW,0BAA2B,CAAC,oBAAqB,OAAQ,UAAW,iBAAkB,OAAQ,KAjClI,SAAiC+B,EAAmBC,EAAMC,EAASC,EAAgBP,EAAMvB,GAErFL,QAAQoC,OAAOjC,KAAM,CACjBkC,MAAOT,EAAKS,MACZ9D,KAAMqD,EAAKrD,KACX+D,MAAOV,EAAKU,MACZ7B,KAAMyB,EAAQ,MAAM,EAAE,IAAIxB,KAAKkB,EAAKnB,IAAI,EAAG,WAAW,EAEtD8B,GAAIA,KACAP,EAAkBQ,MAAM,CAC5B,CACJ,CAAC,EAaDL,EAAetD,IAVD,CACV,WAAc,iBACd,aAAgB,CAAC,YACjB,OAAU,CAAC,WAAY,WACvB,KAAQ,GACR,MAAS,CACL,GAAMwB,CACV,CACJ,CAEwB,EACnByB,KAAKW,IACEA,EAAK,KACLtC,KAAKuC,QAAUT,EAAKU,YAAYF,EAAK,GAAGG,QAAQ,EAChDzC,KAAK0C,QAAUJ,EAAK,GAAGI,QAE/B,CAAC,CACT,EAEgK,C","file":"honourroll-bundle-8d1b1e0a3003307730a0.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 59);\n","import './honourroll.controller.js';\r\n\r\nimport 'Sass/views/honour-roll.scss'","\r\n(function () {\r\n 'use strict';\r\n\r\n function ctrl($uibModal) {\r\n\r\n const modalTemplate = `\r\n
\r\n

\r\n
\r\n
\r\n \r\n

{{ ::modal.award }} ({{ modal.date }})

\r\n

\r\n
\r\n
\r\n
\r\n \r\n
`;\r\n\r\n this.isVisible = id => {\r\n const elm = document.getElementById(id);\r\n const date = new Date(elm.dataset.date);\r\n return this.currentYear === date.getFullYear() && !this.filterStr || elm.dataset.name.toLowerCase().indexOf(this.filterStr) !== -1;\r\n }\r\n\r\n this.filter = (type, val) => {\r\n if (type === 'year') {\r\n this.currentYear = val;\r\n this.search = undefined;\r\n this.filterStr = undefined;\r\n } else {\r\n if (this.search.length > 2) {\r\n this.filterStr = this.search.toLowerCase();\r\n this.currentYear = undefined;\r\n } else {\r\n this.filterStr = undefined;\r\n }\r\n }\r\n }\r\n\r\n this.detail = id => {\r\n\r\n const modalInstance = $uibModal.open({\r\n template: modalTemplate,\r\n controller: 'honoraryModalController as modal',\r\n windowClass: 'honorary-modal',\r\n resolve: {\r\n item: () => document.getElementById(id).dataset,\r\n id: () => id\r\n }\r\n });\r\n\r\n modalInstance.rendered.then(() => {\r\n const modalElm = document.querySelector('.honorary-modal .modal-body');\r\n });\r\n }\r\n }\r\n\r\n angular.module('Uscapp').controller('honourRollController', ['$uibModal', ctrl]);\r\n\r\n /**\r\n * item properties will be incorrectly cased\r\n * @param {any} $uibModalInstance\r\n * @param {any} $sce\r\n * @param {any} item\r\n */\r\n function honoraryModalController($uibModalInstance, $sce, $filter, contentService, item, id) {\r\n\r\n angular.extend(this, {\r\n image: item.image,\r\n name: item.name,\r\n award: item.award,\r\n date: $filter('date')(new Date(item.date), 'MMMM yyyy'),\r\n\r\n ok: () => {\r\n $uibModalInstance.close();\r\n }\r\n });\r\n\r\n // use the id to fetch the citation and summary, as these are potentially large strings x 100 or so honoraries\r\n const query = {\r\n \"searchType\": 'SearchSearcher',\r\n \"contentTypes\": ['honorary'],\r\n \"fields\": ['citation', 'summary'],\r\n \"html\": true,\r\n \"query\": {\r\n \"id\": id\r\n }\r\n };\r\n\r\n contentService.get(query)\r\n .then(resp => {\r\n if (resp[0]) {\r\n this.content = $sce.trustAsHtml(resp[0].citation);\r\n this.summary = resp[0].summary;\r\n }\r\n });\r\n }\r\n\r\n angular.module('Uscapp').controller('honoraryModalController', ['$uibModalInstance', '$sce', '$filter', 'contentService', 'item', 'id', honoraryModalController]);\r\n}());"],"sourceRoot":""}