{"version":3,"sources":["webpack://@averoachmea/static.[name]/webpack/universalModuleDefinition","webpack://@averoachmea/static.[name]/webpack/bootstrap","webpack://@averoachmea/static.[name]/./src/libs/core/renderer.ts","webpack://@averoachmea/static.[name]/./src/libs/core/index.ts","webpack://@averoachmea/static.[name]/./src/libs/core/attr.decorator.ts","webpack://@averoachmea/static.[name]/./src/libs/core/child.decorator.ts","webpack://@averoachmea/static.[name]/./src/libs/core/component.decorator.ts","webpack://@averoachmea/static.[name]/./node_modules/mustache/mustache.js","webpack://@averoachmea/static.[name]/./src/libs/core/directive.decorator.ts","webpack://@averoachmea/static.[name]/./src/libs/core/host-event.decorator.ts","webpack://@averoachmea/static.[name]/./src/libs/core/output-event.decorator.ts","webpack://@averoachmea/static.[name]/./src/libs/core/services/index.ts","webpack://@averoachmea/static.[name]/./src/libs/core/services/cookie/index.ts","webpack://@averoachmea/static.[name]/./src/libs/core/services/cookie/cookie.service.ts","webpack://@averoachmea/static.[name]/./src/directives/audio/aa-audio.directive.ts","webpack://@averoachmea/static.[name]/./src/directives/calamiteiten-banner/aa-calamiteiten-banner.directive.ts","webpack://@averoachmea/static.[name]/./src/directives/hero/aa-hero.directive.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","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","register","HOST_ELEMENT_KEY","CLASS_UNIQUE_IDENTIFIER","INST_DIRECTIVE_REGISTER","EVENT_LISTENER_BINDINGS","BEFORE_CONNECTED_CALLBACK","CONNECTED_CALLBACK","DISCONNECTED_CALLBACK","setupDirective","element","Cls","args","_i","arguments","length","DirectiveCls","inst","registerRecord","find","reg","cls","undefined","instances","push","this","apply","createComponent","registerType","Error","document","createElement","selector","__spread","registerNewDirective","filter","observer","console","error","MutationObserver","mutations","forEach","mutation","addedNodes","addedDomCheck","removedNodes","removedDomCheck","observe","body","documentElement","subtree","childList","addEventListener","performLookup","x","nodeType","Node","ELEMENT_NODE","matches","querySelectorAll","instElm","removedNode","containsInstance","contains","verifyAaSelector","indexOf","setupPrototype","connectedCallback","_this","event","boundEvent","_boundFn","fn","disconnectedCallback","removeEventListener","__exportStar","renderer_1","Attribute","nameOptions","target","propertyKey","options","replace","toLowerCase","__assign","json","normalizeOptions","String","CACHING_PROP_KEY","beforeConnectedCallback","defaultValue","writable","raw","parsed","getAttribute","JSON","parse","e","warn","substring","number","parseFloat","set","hostElm","stringify","setAttribute","removeAttribute","configurable","Attr","Child","querySelector","Children","mustache_1","DomComponent","config","template","innerHTML","render","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","global","nodeName","mustache","objectToString","toString","isArray","Array","isFunction","escapeRegExp","string","hasProperty","obj","propName","primitiveHasOwnProperty","primitive","regExpTest","RegExp","test","nonSpaceRe","isWhitespace","re","testRegExp","entityMap","&","<",">","\"","'","/","`","=","whiteRe","spaceRe","equalsRe","curlyRe","tagRe","Scanner","tail","pos","Context","view","parentContext","cache",".","parent","Writer","eos","scan","match","index","scanUntil","search","lookup","intermediateValue","names","context","lookupHit","split","clearCache","tags","cacheKey","join","tokens","openingTagRe","closingTagRe","closingCurlyRe","sections","spaces","hasTag","nonSpace","indentation","tagIndex","stripSpace","pop","compileTags","tagsToCompile","start","type","chr","token","openSection","scanner","valueLength","charAt","nestedTokens","collector","numTokens","nestTokens","lastToken","squashedTokens","squashTokens","parseTemplate","partials","renderTokens","originalTemplate","symbol","buffer","renderSection","renderInverted","renderPartial","unescapedValue","escapedValue","rawValue","self","j","slice","indentPartial","partial","filteredIndentation","partialByNl","indentedValue","escape","version","defaultWriter","TypeError","typeStr","to_html","send","result","DomDirective","HostElement","HostEvent","descriptor","OutputEvent","eventOptions","normalizedEventName","bubbles","cancelable","emit","data","evt","createEvent","initCustomEvent","dispatchEvent","cookie_1","CookieService","encodeURIComponent","regExp","getCookieRegExp","exec","cookie","decodeURIComponent","expires","path","domain","secure","cookieString","Date","getTime","toUTCString","delete","escapedName","core_1","AudioDirective","connected","generateHTML","setup","setAudioEventListeners","isPlaying","theCurrentTime","playPauseButtonElement","togglePlayPause","audioElement","updateProgress","totalTime","textContent","AudioDirective_1","formatTime","duration","resetPlayer","getBarPercentage","className","rect","parentElement","getBoundingClientRect","barPercentage","clientX","width","currentTime","updateDotLocation","Math","floor","current","percentage","location","bar","getElementById","style","left","time","min","sec","load","classList","remove","paused","add","play","pause","buttonAudio","controlsAudio","progressBar","progressBarDot","id","appendChild","smallCurrentTime","smallTotalTime","src","audioUrl","host","__decorate","HTMLElement","HTMLAudioElement","CalamiteitenBannerDirective","cookieIdValue","cookieModifiedDate","bannerId","bannerModifiedDate","closeButton","handleButtonCloseClick","HeroDirective","getElementsByClassName","heroHeading","heroLink","tempHeading","checkWindowSize","innerWidth","generateHTMLAnchorElement","resetHeading","anchorElement","href","title","addHTMLAnchorElementToHeading","append","removeChild","HTMLAnchorElement"],"mappings":";;;;;;CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,qBAAAD,KAEAD,EAAA,uBAAAA,EAAA,2BAAiEA,EAAA,4CAAAC,KARjE,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAT,YAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAj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C,UAAUG,IAAI,gBACjCpS,KAAKqU,cAAcpC,UAAUG,IAAI,cACjCpS,KAAKqU,cAAcpC,UAAUG,IAAI,uBACjCpS,KAAKqU,cAAchE,YAAcrQ,KAAK8T,YAAYzD,YAClDrQ,KAAKwU,8BAA8BxU,KAAKqU,gBAG1CT,EAAAxV,UAAAoW,8BAAA,SAA8BH,GAC5BrU,KAAK8T,YAAYnO,UAAY,GAC7B3F,KAAK8T,YAAYW,OAAOJ,IAG1BT,EAAAxV,UAAAgW,aAAA,WACEpU,KAAK8T,YAAYnO,UAAY3F,KAAKgU,YAC9BhU,KAAK8T,YAAYxR,SAAStC,KAAKqU,gBACjCrU,KAAK8T,YAAYY,YAAY1U,KAAKqU,gBA9CtCnB,GADC1D,EAAAhC,8BACsB2F,yCAGvBD,GADC1D,EAAApK,MAAM,oCACsB+N,gDAG7BD,GADC1D,EAAApK,MAAM,iCACmBuP,mDAbff,EAAaV,GAHzB1D,EAAAjC,cACChN,SAAU,aAECqT,GAAb,GAAa5X,EAAA4X","file":"shared/directives.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"shared/directives\"] = factory();\n\telse\n\t\troot[\"@averoachmea/static\"] = root[\"@averoachmea/static\"] || {}, root[\"@averoachmea/static\"][\"shared/directives\"] = factory();\n})(window, function() {\nreturn "," \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 = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 57);\n","// tslint:disable:no-document-query-selectors\n\nexport interface EventListenerItem {\n fn: Function;\n event: string;\n _boundFn?: Function;\n}\n\ninterface RegisterItem {\n selector: string;\n cls: any;\n instances?: any[];\n}\n\n/**\n * The local register which is used to keep track\n * of all registered DOMComponent and DOMDirective\n * classes.\n */\nexport const register: RegisterItem[] = [];\n\n/**\n * Instance of MutationObserver watching for DOM node changes.\n */\nexport let observer: MutationObserver;\n\n/**\n * Local property on which a reference of the DOM HostElement is stored.\n */\nexport const HOST_ELEMENT_KEY = '__hostElmBinding';\n\n/**\n * Local property on which a unique ID for the Class is stored.\n */\nexport const CLASS_UNIQUE_IDENTIFIER = '__id';\n\n/**\n * Property on which registered directives are stored.\n */\nexport const INST_DIRECTIVE_REGISTER = '__aaDirectives';\n\n/**\n * Holds an array of event listeners which should be added and removed\n * during connection and disconnection.\n */\nexport const EVENT_LISTENER_BINDINGS = '__eventListeners';\n\n/**\n * Method name for 'before' connection chain. This callback\n * is ran before any rendering takes place and should be used to setup\n * properties and other 'required' stuff.\n */\nexport const BEFORE_CONNECTED_CALLBACK = 'beforeConnected';\n\n/**\n * Method name for connection chain. This callback runs right\n * after everything is rendered.\n */\nexport const CONNECTED_CALLBACK = 'connected';\n\n/**\n * Method name for disconnection chain\n */\nexport const DISCONNECTED_CALLBACK = 'disconnected';\n\n/**\n * Implement the {@link OnConnect} interface and its methods in your Component or Directive class\n * to specify code which should be executed when the Component or Directive has been\n * 'connected' successfully.\n *\n * This can, for example, be usefull when setting up additional event listeners.\n */\nexport interface OnConnect {\n connected(): void;\n}\n\n/**\n * Implemesnting the {@link OnDisconnect} interface and its belonging methods allows to\n * define code which should be executed just before the element is removed from the DOM.\n */\nexport interface OnDisconnect {\n disconnected(): void;\n}\n\n/**\n * AaElement interface which includes our (optional) INT_DIRECTIVE_REGISTER property\n * which is used to hold a registry of active directives.\n */\nexport interface AaElement extends Element {\n [INST_DIRECTIVE_REGISTER]?: any;\n}\n\n/**\n * Creates a new instance of the given Directive class and 'connects' it to the\n * provided element.\n *\n * This takes care of the actual setup procedure. The provided element will be checked\n * to see if there's already an instance of the given directive class connected. If\n * this is not the case a new instance of the Directive class will be created and\n * applied to the element.\n *\n * A new inheritance for the element is created, allowing the directive class to\n * access the DOM element in its constructor.\n *\n * After the instance is created the 'connected' callback is executed, which allows\n * further initialization to take place.\n *\n * @param element element to connect directive class to\n * @param Cls directive class to create new instance from\n * @param args provided optional arguments\n */\nexport const setupDirective = (element: AaElement, Cls: any, ...args: any[]) => {\n if (element[INST_DIRECTIVE_REGISTER] && element[INST_DIRECTIVE_REGISTER][Cls[CLASS_UNIQUE_IDENTIFIER]]) {\n // Return when directive has already been registered\n return;\n }\n\n // Inherit given Directive class so we can add the DOM element before any\n // constructing happens. This allows us to have access to the DOM element\n // in our class' 'constructor'.\n function DirectiveCls(this: any) {\n this[HOST_ELEMENT_KEY] = function () { return element; };\n Cls.apply(this, args);\n }\n DirectiveCls.prototype = Object.create(Cls.prototype);\n\n // Create new instance\n const inst = new (DirectiveCls as any)();\n\n // Register as directive on element\n element[INST_DIRECTIVE_REGISTER] = element[INST_DIRECTIVE_REGISTER] || {};\n element[INST_DIRECTIVE_REGISTER][Cls[CLASS_UNIQUE_IDENTIFIER]] = inst;\n\n // Add instance to register and return\n const registerRecord = register.find((reg) => reg.cls === Cls);\n if (registerRecord !== undefined) {\n registerRecord.instances = registerRecord.instances || [];\n registerRecord.instances.push(inst);\n }\n\n // Runs before connection callback.\n if (inst[BEFORE_CONNECTED_CALLBACK]) {\n inst[BEFORE_CONNECTED_CALLBACK]();\n }\n\n // Fire connectedCallback which takes care of element registration\n if (inst[CONNECTED_CALLBACK]) {\n inst[CONNECTED_CALLBACK]();\n }\n\n return inst;\n};\n\n/**\n * Helper method to render a new HTMLelement element based on the given\n * DomComponent class.\n *\n * This can be used to render new Components in the DOM using a reference\n * to the actual Component's class. A matching selector for the given reference\n * is looked-up in the 'register' and used when creating the new HTMLElement.\n *\n * Optionally additional arguments can be provided. These arguments will be applied\n * to the Component's constructor and can be usefull when passing along data.\n *\n * The returned element already has its Directive instance connected to it.\n *\n * In the example below the 'Alphabet' component will create new instances of\n * the 'Character' component and apply them to the 'chars' wrapper div.\n *\n * ```typescript\n * @example\n * // Your component class\n * @DomComponent({\n * selector: 'aa-character',\n * template: `I'm {{char}}`\n * })\n * class Character {\n * constructor(char: string) {}\n * }\n *\n * // Somewhere else\n * @DomComponent({\n * selector: 'aa-alphabet',\n * template: `
`\n * })\n * class Alphabet implements OnConnect {\n * @Child('.chars')\n * private readonly charWrapper: HTMLElement;\n *\n * connected() {\n * const chars = ['a', 'b', 'c'];\n * chars.forEach((char) => {\n * this.charWrapper.appendChild( createComponent(Alphabet, char) );\n * });\n * }\n * }\n * ```\n *\n * @param cls component class\n * @param args provided optional arguments\n */\nexport const createComponent = (cls: any, ...args: any[]): HTMLElement => {\n const registerType = register.find((reg) => reg.cls === cls);\n\n if (!registerType) {\n throw new Error(`No DomComponent registered for ${cls.name}. Make sure to decorate your Component Classes with \"@DomComponent\".`);\n }\n\n const element: HTMLUnknownElement = document.createElement(registerType.selector);\n\n setupDirective(element, cls, ...args);\n\n return element;\n};\n\n/**\n * Registers new Directives and sets up the DOM observer, if not already done.\n * The observer watches for new and removed nodes in the DOM's .\n *\n * @param selector selector name for Directive\n * @param cls the Directive Class\n */\nexport const registerNewDirective = (selector: string, cls: any) => {\n // Check if selector doesn't already exist\n const found = register.filter((s) => s.selector === selector);\n if (found.length > 0) {\n throw new Error('Directive with selector already registered');\n }\n\n // Sets the selector as 'unique identifier' on the class\n cls[CLASS_UNIQUE_IDENTIFIER] = selector;\n\n // Add selector and cls to registration\n register.push({\n selector,\n cls,\n });\n\n // Setup observer to whatch for new and removed elements in the DOM's body\n if (!observer) {\n // Check if a MutationObserver implementation is found.\n if ('MutationObserver' in window === false) {\n console.error('No MutationObserver implementation found. Please include the MutationObserver polyfill.');\n return;\n }\n observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.addedNodes.length > 0) {\n addedDomCheck(mutation.addedNodes);\n }\n if (mutation.removedNodes.length > 0) {\n removedDomCheck(mutation.removedNodes);\n }\n });\n });\n observer.observe(document.body || document.documentElement, { subtree: true, childList: true });\n\n // Execute domcheck at initial DOMContentLoaded event\n document.addEventListener('DOMContentLoaded', () => addedDomCheck());\n }\n};\n\n/**\n * Checks the given addedNodes for new elements which have matching selectors in the 'register'.\n *\n * New directive instance will be created for any matching DOM element. The returned instance is saved\n * in the register for later reference.\n *\n * @param addedNodes NodeList\n */\nexport const addedDomCheck = (addedNodes: NodeList | null = null) => {\n let performLookup = (addedNodes === null);\n\n if (addedNodes) {\n for (let x = 0; x < addedNodes.length; x++) {\n // We're only interested in new Nodes of type ELEMENT_NODE.\n if (addedNodes[x].nodeType === Node.ELEMENT_NODE) {\n performLookup = true;\n }\n }\n }\n\n if (performLookup || addedNodes === null) {\n // Go through all lookup elements and setup directives\n register.forEach((s) => {\n const matches = document.querySelectorAll(s.selector);\n s.instances = s.instances || [];\n for (let x = 0; x < matches.length; x++) {\n setupDirective(matches[x], s.cls);\n }\n });\n }\n};\n\n/**\n * Gracefully disconnects directive instances on the removed nodes and their children.\n *\n * The local registry is used to check whether the node contains any of the active registered\n * 'instances'. If so it gracefully disconnects the directive by calling the disconnected callback\n * and removing it from the registry.\n *\n * @param removedNodes\n */\nexport const removedDomCheck = (removedNodes: NodeList) => {\n for (let x = 0; x < removedNodes.length; x++) {\n if (removedNodes[x].nodeType === Node.ELEMENT_NODE) {\n register.forEach((reg) => {\n if (reg.instances) {\n // Go through instances, search for nodes which should be disconnected and clean them up\n reg.instances = reg.instances.filter((inst) => {\n const instElm: Node = inst[HOST_ELEMENT_KEY]();\n const removedNode = removedNodes[x];\n const containsInstance = (typeof removedNode['contains'] === 'function') ? removedNode.contains(instElm) : false;\n if (containsInstance && inst[DISCONNECTED_CALLBACK]) {\n inst[DISCONNECTED_CALLBACK]();\n }\n return !containsInstance;\n });\n }\n });\n }\n }\n};\n\n/**\n * Verifies the given selector to make sure it starts with aa-.\n *\n * @param selector\n * @throws {Error} when selector doesn't start with aa-\n */\nexport function verifyAaSelector(selector: string) {\n if (selector.indexOf('aa-') !== 0) {\n throw new Error(`Your selector should start with 'aa-'. (eg: aa-${selector})`);\n }\n}\n\n/**\n * Prepares class prototypes to add support for our @HostEvent decorator.\n * Takes and returns an Object.prototype.\n *\n * This supports both our Component and Directive directives.\n */\nexport function setupPrototype(cls: any) {\n // Extend connectedCallback (if any)\n const connectedCallback = cls.prototype[BEFORE_CONNECTED_CALLBACK] || function () { };\n cls.prototype[BEFORE_CONNECTED_CALLBACK] = function () {\n // Array of EventListener[]\n cls.prototype[EVENT_LISTENER_BINDINGS] = cls.prototype[EVENT_LISTENER_BINDINGS] || [];\n\n // Bind all event listeners\n cls.prototype[EVENT_LISTENER_BINDINGS].forEach((event: EventListenerItem) => {\n const boundEvent = event._boundFn = event.fn.bind(this);\n const hostInst = this[HOST_ELEMENT_KEY]();\n hostInst.addEventListener(event.event, boundEvent);\n });\n\n // Call callback\n connectedCallback.call(this);\n };\n\n // Extend disconnection callback\n const disconnectedCallback = cls.prototype[DISCONNECTED_CALLBACK] || function () { };\n cls.prototype[DISCONNECTED_CALLBACK] = function () {\n // Remove all event listeners\n cls.prototype[EVENT_LISTENER_BINDINGS].forEach((event: EventListenerItem) => {\n const hostInst = this[HOST_ELEMENT_KEY]();\n hostInst.removeEventListener(event.event, event._boundFn);\n });\n\n // Call disconnection callback\n disconnectedCallback.call(this);\n };\n\n return cls;\n}\n","export * from './attr.decorator';\nexport * from './child.decorator';\nexport * from './component.decorator';\nexport * from './directive.decorator';\nexport * from './host-event.decorator';\nexport * from './output-event.decorator';\nexport * from './renderer';\nexport * from './services';\n","import { BEFORE_CONNECTED_CALLBACK, HOST_ELEMENT_KEY } from './renderer';\n\n/**\n * The {@link Attribute} decorator can be used to bind the Component or Directive's\n * DOM element with a local property. This allows you to easily read or set the value\n * of the bound element's attribute.\n *\n * Say you're interested in data which has been placed as an attribute\n * (`interesting-data=\"5\"`) on a Component's DOM element. We can easily get access\n * to this attribute by using the {@link Attribute} decorator in our component.\n *\n * ```typescript\n * @DomComponent({\n * selector: 'aa-number',\n * })\n * class NumberComponent {\n * // The property name will be used to retrieve the matching\n * // attribute (interestingData becoming interesting-data).\n * @Attribute()\n * private readonly interestingData: string;\n *\n * // You can also manually specify the name of the attribute by\n * // providing it as an argument.\n * @Attribute('interesting-data')\n * private readonly otherWayOfGettingIt: string;\n * }\n * ```\n *\n * The {@link Attr} decorator works in two ways. It sets up a binding between\n * the property and the element's attribute, which therefore also allows you to\n * easily set an attribute on the Directive's or Component's DOM Element.\n *\n * In the following example we're adding the `novalidate` attribute\n * to each element which has the `aa-no-validate` directive connected to it.\n *\n * ```typescript\n * @DomDirective({\n * selector: 'aa-no-validate',\n * })\n * export class Mask {\n * @Attribute()\n * readonly novalidate = 'novalidate';\n * }\n * ```\n *\n * A full overview of all available options:\n * ```typescript\n * @Attribute({\n * // Name is automatically converted from camelCase to dash-seperated\n * // When no name is provided it will use the property's name\n * name: 'testCase',\n *\n * // When set to true (false by default) it will return a parsed version\n * // of the attribute's data. New data will be 'stringified' before setting.\n * json: false,\n *\n * // Indicates whether the incoming value should be parsed into a number\n * number: false,\n * })\n * ```\n *\n * @param name\n */\nexport const Attribute = (nameOptions?: Partial | string): PropertyDecorator => {\n return function (target: any, propertyKey: string | symbol) {\n let inputOptions: AttrOptions;\n\n // Check the type of inputOptions and create an inputOptions object\n if (typeof (nameOptions) === 'string') {\n inputOptions = {\n name: nameOptions,\n };\n } else {\n inputOptions = {\n ...nameOptions,\n name: String((nameOptions === undefined || (nameOptions && !nameOptions.name)) ? propertyKey : nameOptions.name),\n };\n }\n\n // Normalize input options\n const options = normalizeOptions(inputOptions);\n\n // Caching property key\n const CACHING_PROP_KEY = `__${String(propertyKey)}JsonCache__`;\n\n // Execute everything during 'beforeConnected' lifecycle\n const beforeConnectedCallback = target[BEFORE_CONNECTED_CALLBACK] || function () { };\n target[BEFORE_CONNECTED_CALLBACK] = function () {\n // Grab \"default value\"\n const defaultValue = this[propertyKey];\n\n if (options.json) {\n // Create new 'caching' property. This property will be used to store the actual value\n // and can be used for caching purposes when using JSON parser.\n Object.defineProperty(this, CACHING_PROP_KEY, {\n writable: true,\n enumerable: false,\n value: { raw: null, parsed: null },\n });\n }\n\n // Replace property by a getter/setter which syncs with the element's attribute\n Object.defineProperty(this, propertyKey, {\n get: function () {\n const hostElm: HTMLElement = this[HOST_ELEMENT_KEY]();\n let value: string | null | number = hostElm.getAttribute(options.name);\n\n // Parse as JSON when enabled. Note that this uses the CACHING_PROP\n // to retrieve a parsed version when value didn't change\n if (options.json) {\n // If raw value equals caching property raw value we return the\n // cached parsed value\n if (this[CACHING_PROP_KEY].raw === value) {\n value = this[CACHING_PROP_KEY].parsed;\n } else {\n try {\n // Save raw, parse and save parsed\n this[CACHING_PROP_KEY].raw = value;\n value = JSON.parse(value || '');\n this[CACHING_PROP_KEY].parsed = value;\n } catch (e) {\n console.warn(`@Attribute(): Expected valid JSON, got invalid JSON: '${String(value).substring(0, 255)} ...'`);\n }\n }\n } else if (options.number && value) {\n value = parseFloat(value);\n }\n\n // Set default value on falsey values (except 0)\n if (!value && value !== 0) {\n value = defaultValue;\n }\n\n return value;\n },\n set: function (value) {\n const hostElm: HTMLElement = this[HOST_ELEMENT_KEY]();\n\n if (value !== undefined && value !== null) {\n // If JSON is enabled stringify input before saving\n if (options.json) {\n try {\n value = JSON.stringify(value);\n } catch (e) {\n console.warn(`@Attribute(): Expected valid JSON, got invalid JSON: '${String(value).substring(0, 255)} ...'`);\n }\n }\n\n // Only set when current value does not match new value\n const currentValue = hostElm.getAttribute(options.name);\n if (currentValue !== value) {\n hostElm.setAttribute(options.name, value);\n }\n } else {\n hostElm.removeAttribute(options.name);\n }\n },\n configurable: true,\n });\n\n // Force the execution of our newly defined 'setter' to make sure property\n // values are reflected into the DOM\n this[propertyKey] = this[propertyKey];\n\n // Continue with chain\n beforeConnectedCallback.call(this);\n };\n };\n};\n\n/**\n * @deprecated Version 0 used to have Attr() as the Attribute decorator. This doesn't work\n * because native JS already has an Attr interface, therefore we've renamed this to Attribute()\n *\n * @param args\n */\nexport const Attr = (...args: any[]) => {\n console.warn('[deprecated]: Attr() is decorated, please consider moving over to Attribute()');\n return Attribute(...args);\n};\n\nexport interface AttrOptions {\n name: string;\n json?: boolean;\n number?: boolean;\n}\n\n/**\n * Creates an options object with default fallback valeus from the\n * provided options object or name (string).\n *\n * @param nameOptions options object or name in string form\n */\nfunction normalizeOptions(nameOptions: AttrOptions): AttrOptions {\n // Replace camelCase to dash-seperated\n nameOptions.name = nameOptions.name.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase();\n\n return {\n json: false,\n ...nameOptions,\n };\n}\n","import { HOST_ELEMENT_KEY } from './renderer';\n\n/**\n * Adding to {@link Child} decorator to a property allows you quickly\n * retrieve elements within the Directive or Component. The decorator\n * takes a CSS selector as it's first string, which should match the element\n * you're looking for.\n *\n * In the example below we're assigning the Component's `
`\n * element to our `letterWrapper` property.\n *\n * ```typescript\n * @DomComponent({\n * selector: 'aa-alphabet',\n * template: `
`\n * })\n * class Alphabet implements OnConnect {\n * @Child('.letters')\n * private readonly letterWrapper: HTMLElement;\n * }\n * ```\n *\n * This allows us to know get access to the element by referencing the property:\n * ```typescript\n * setLetter(letter: string) {\n * this.letterWrapper.innerText = letter;\n * }\n * ```\n * *\n * @param selector\n */\nexport const Child = (selector: string): PropertyDecorator => {\n return function (target: any, propertyKey: string | symbol) {\n Object.defineProperty(target, propertyKey, {\n configurable: false,\n get: function () {\n const hostElm = this[HOST_ELEMENT_KEY]();\n return hostElm.querySelector.apply(hostElm, [selector]);\n },\n });\n };\n};\n\n/**\n * Practically the same as {@see Child}, but returns a list of elements instead\n * of one.\n *\n * @param selector\n */\nexport const Children = (selector: string): PropertyDecorator => {\n return function (target: any, propertyKey: string | symbol) {\n Object.defineProperty(target, propertyKey, {\n configurable: false,\n get: function () {\n const hostElm = this[HOST_ELEMENT_KEY]();\n return hostElm.querySelectorAll.apply(hostElm, [selector]);\n },\n });\n };\n};\n","import { render } from 'mustache';\nimport { CONNECTED_CALLBACK, HOST_ELEMENT_KEY, registerNewDirective, setupPrototype, verifyAaSelector } from './renderer';\n\nexport interface DomComponentConfig {\n selector: string;\n template?: string;\n}\n\n/**\n * Components are reusable instances assigned to a DOM element. Components\n * can be used to render custom Elements to the DOM.\n *\n * Take a look at the following example of a Component which will go through\n * each letter in the alphabet:\n *\n * ```typescript\n * // Define the Alphabet class as a Component\n * @DomComponent({\n * selector: 'aa-alphabet',\n * template: `
`\n * })\n * class Alphabet implements OnConnect {\n * // The {@link @Child} decorator searches in the component for a matching element.\n * @Child('.letters')\n * private readonly letterWrapper: HTMLElement;\n *\n * private readonly letters: String[] = ['a', 'b', 'c'];\n *\n * // Go through each letter and replace the content of '.letters' with a letter\n * // of the alphabet.\n * connected() {\n * const index = 0;\n * setInterval(() => {\n * this.letterWrapper.innerText = this.letters[index];\n * index = (index == letters.length - 1) ? 0 : index + 1;\n * }, 2500);\n * }\n * }\n * ```\n *\n * Using the {@link @DomComponent} decorator we're assigning a new instance of the\n * Alphabet class to each occurence of `` in the DOM. During this 'connection' phase\n * the Elements `innerHTML` will be replaced by the provided template. The template string has Mustache\n * support. This allows for easy binding of instance properties to the component's HTML.\n *\n * Note that there's only support for template property binding during the 'connection' phase.\n * There's no such thing as one- or two-way binding.\n *\n * Implementing the {@link OnConnect} interface and defining the {@link connected()} method allows\n * us to execute additional code after the Component instance has been created.\n *\n * @param config\n */\nexport const DomComponent = (config: DomComponentConfig) => (cls: any) => {\n verifyAaSelector(config.selector);\n cls = setupPrototype(cls);\n\n // Prepand connectedCallback with template rendering\n const connectedCallback = cls.prototype[CONNECTED_CALLBACK] || function () { };\n cls.prototype[CONNECTED_CALLBACK] = function () {\n // Render component\n if (config.template) {\n const hostElm = this[HOST_ELEMENT_KEY]();\n hostElm.innerHTML = render((config.template as string), this);\n }\n\n // Call original connectedCallback\n connectedCallback.call(this);\n };\n\n // Register new elements\n registerNewDirective(config.selector, cls);\n\n return cls;\n};\n","/*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n/*global define: false Mustache: true*/\n\n(function defineMustache (global, factory) {\n if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') {\n factory(exports); // CommonJS\n } else if (typeof define === 'function' && define.amd) {\n define(['exports'], factory); // AMD\n } else {\n global.Mustache = {};\n factory(global.Mustache); // script, wsh, asp\n }\n}(this, function mustacheFactory (mustache) {\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill (object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction (object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp (string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n /**\n * Safe way of detecting whether or not the given thing is a primitive and\n * whether it has the given property\n */\n function primitiveHasOwnProperty (primitive, propName) {\n return (\n primitive != null\n && typeof primitive !== 'object'\n && primitive.hasOwnProperty\n && primitive.hasOwnProperty(propName)\n );\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n function testRegExp (re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n function isWhitespace (string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/',\n '`': '`',\n '=': '='\n };\n\n function escapeHtml (string) {\n return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n *\n * Tokens for partials also contain two more elements: 1) a string value of\n * indendation prior to that tag and 2) the index of that tag on that line -\n * eg a value of 2 indicates the partial is the third tag on this line.\n */\n function parseTemplate (template, tags) {\n if (!template)\n return [];\n\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n var indentation = ''; // Tracks indentation for tags that use it\n var tagIndex = 0; // Stores a count of number of tags encountered on a line\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace () {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n } else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n function compileTags (tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n if (!nonSpace)\n indentation += chr;\n } else {\n nonSpace = true;\n }\n\n tokens.push([ 'text', chr, start, start + 1 ]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n') {\n stripSpace();\n indentation = '';\n tagIndex = 0;\n }\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n } else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n } else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n if (type == '>') {\n token = [ type, value, start, scanner.pos, indentation, tagIndex ];\n } else {\n token = [ type, value, start, scanner.pos ];\n }\n tagIndex++;\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n } else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n } else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n } else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n stripSpace();\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens (tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n } else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens (tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner (string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos () {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan (re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil (re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push (view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup (name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n } else {\n var context = this, intermediateValue, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n intermediateValue = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n *\n * In the case where dot notation is used, we consider the lookup\n * to be successful even if the last \"object\" in the path is\n * not actually an object but a primitive (e.g., a string, or an\n * integer), because it is sometimes useful to access a property\n * of an autoboxed primitive, such as the length of a string.\n **/\n while (intermediateValue != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = (\n hasProperty(intermediateValue, names[index])\n || primitiveHasOwnProperty(intermediateValue, names[index])\n );\n\n intermediateValue = intermediateValue[names[index++]];\n }\n } else {\n intermediateValue = context.view[name];\n\n /**\n * Only checking against `hasProperty`, which always returns `false` if\n * `context.view` is not an object. Deliberately omitting the check\n * against `primitiveHasOwnProperty` if dot notation is not used.\n *\n * Consider this example:\n * ```\n * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n * ```\n *\n * If we were to check also against `primitiveHasOwnProperty`, as we do\n * in the dot notation case, then render call would return:\n *\n * \"The length of a football field is 9.\"\n *\n * rather than the expected:\n *\n * \"The length of a football field is 100 yards.\"\n **/\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit) {\n value = intermediateValue;\n break;\n }\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer () {\n this.cache = {};\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache () {\n this.cache = {};\n };\n\n /**\n * Parses and caches the given `template` according to the given `tags` or\n * `mustache.tags` if `tags` is omitted, and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse (template, tags) {\n var cache = this.cache;\n var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n var tokens = cache[cacheKey];\n\n if (tokens == null)\n tokens = cache[cacheKey] = parseTemplate(template, tags);\n\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n *\n * If the optional `tags` argument is given here it must be an array with two\n * string values: the opening and closing tags used in the template (e.g.\n * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n */\n Writer.prototype.render = function render (template, view, partials, tags) {\n var tokens = this.parse(template, tags);\n var context = (view instanceof Context) ? view : new Context(view);\n return this.renderTokens(tokens, context, partials, template, tags);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, tags) {\n var buffer = '';\n\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, tags);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate) {\n var self = this;\n var buffer = '';\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender (template) {\n return self.render(template, context, partials);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);\n }\n } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);\n } else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n } else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate);\n };\n\n Writer.prototype.indentPartial = function indentPartial (partial, indentation) {\n var filteredIndentation = indentation.replace(/[^ \\t]/g, '');\n var partialByNl = partial.split('\\n');\n for (var i = 0; i < partialByNl.length; i++) {\n if (partialByNl[i].length) {\n partialByNl[i] = filteredIndentation + partialByNl[i];\n }\n }\n return partialByNl.join('\\n');\n };\n\n Writer.prototype.renderPartial = function renderPartial (token, context, partials, tags) {\n if (!partials) return;\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null) {\n var tagIndex = token[5];\n var indentation = token[4];\n var indentedValue = value;\n if (tagIndex == 0 && indentation) {\n indentedValue = this.indentPartial(value, indentation);\n }\n return this.renderTokens(this.parse(indentedValue, tags), context, partials, value);\n }\n };\n\n Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return mustache.escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue (token) {\n return token[1];\n };\n\n mustache.name = 'mustache.js';\n mustache.version = '3.0.2';\n mustache.tags = [ '{{', '}}' ];\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache () {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse (template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view` and `partials` using the\n * default writer. If the optional `tags` argument is given here it must be an\n * array with two string values: the opening and closing tags used in the\n * template (e.g. [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n */\n mustache.render = function render (template, view, partials, tags) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' +\n 'but \"' + typeStr(template) + '\" was given as the first ' +\n 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials, tags);\n };\n\n // This is here for backwards compatibility with 0.4.x.,\n /*eslint-disable */ // eslint wants camel cased function name\n mustache.to_html = function to_html (template, view, partials, send) {\n /*eslint-enable*/\n\n var result = mustache.render(template, view, partials);\n\n if (isFunction(send)) {\n send(result);\n } else {\n return result;\n }\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n return mustache;\n}));\n","import { HOST_ELEMENT_KEY, registerNewDirective, setupPrototype, verifyAaSelector as verifyAaSelector } from './renderer';\n\nexport interface DomDirectiveConfig {\n selector: string;\n}\n\n/**\n * Directives allow you to add functionallity to existing DOM elements, like\n * a form or input element. Directives will connect themselves to these elements.\n * In contrast with Components Directives do not have support for templating.\n *\n * Take a look at the following example of a Directive which can be used to focus\n * on an existing `` field:\n *\n * ```typescript\n * // Define the InputFocus class as a Directive\n * // which allows us to add it as an attribute to our input field (aa-input-focus)\n * @DomDirective({\n * selector: 'aa-input-focus'\n * })\n * class InputFocus implements OnConnect {\n * // The {@link @HostElement} binds the connected element to the given property.\n * @HostElement\n * private readonly inputElm: HTMLInputElement;\n *\n * // Focus when connected\n * connected() {\n * this.inputElm.focus();\n * }\n * }\n * ```\n *\n * Using the {@link @HostElement} decorator we're retrieving a reference to the bound\n * DOM element, which in our case is the `` element.\n *\n * Implementing the {@link OnConnect} interface and defining the {@link connected} method allows\n * us to specify the code which should execute after the directive has been connected. In our\n * case we want to put focus on the directive's element.\n *\n * @param config\n */\nexport const DomDirective = (config: DomDirectiveConfig) => (cls: any) => {\n verifyAaSelector(config.selector);\n cls = setupPrototype(cls);\n\n // Register new elements\n registerNewDirective(`[${config.selector}]`, cls);\n\n return cls;\n};\n\nexport const HostElement = () => {\n return function (target: any, propertyKey: string | symbol): any {\n return {\n enumerable: false,\n configurable: false,\n get: function () {\n return this[HOST_ELEMENT_KEY]();\n },\n };\n };\n};\n","import { EVENT_LISTENER_BINDINGS } from './renderer';\n\n/**\n * Using the {@link HostEvent} decorator you can easily define a class method to\n * an {@see Event} on the Component or Directive's DOM element.\n *\n * In the example below we're creating a Directive which should log the value of\n * an input element on every `change` event:\n *\n * ```typescript\n * @DomDirective({\n * selector: 'aa-log-value'\n * })\n * class LogValueDirective {\n * @HostElement\n * private readonly inputElm: HTMLInputElement;\n *\n * @HostEvent('change')\n * onChange(e: Event) {\n * console.log(\"My value is: \" + this.inputElm.value);\n * }\n * }\n * ```\n *\n * @param event\n */\nexport const HostEvent = (event: string): MethodDecorator => {\n return function (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): void {\n target[EVENT_LISTENER_BINDINGS] = target[EVENT_LISTENER_BINDINGS] ? target[EVENT_LISTENER_BINDINGS] : [];\n target[EVENT_LISTENER_BINDINGS].push({\n event: event,\n fn: descriptor.value,\n });\n };\n};\n","import { BEFORE_CONNECTED_CALLBACK, HOST_ELEMENT_KEY } from './renderer';\n\n/**\n * The {@link OutputEvent} decorator is a shortcut for dispatching Custom Events\n * on the component or directive. Note that this is just an implementation of\n * the browser's native DOM Events.\n *\n * When no arguments are provided it will use the property's name as event name.\n * You can change this behavior by providing a string as the first argument:\n * ```typescript\n * @OutputEvent('EventName')\n * ```\n *\n * Alternatively an options object can be provided as first argument:\n * ```typescript\n * @OutputEvent({\n * name: 'EventName', // default => [propertyKey]\n * bubbles: true, // default => true\n * cancelable: true, // default => true\n * });\n * ```\n *\n * In the example below we're creating a new 'EventEmitter' property which we'll\n * use to notify surrounding elements about our vote. A click on the component\n * is in this case considered to be a vote.\n *\n * ```typescript\n * @DomComponent({\n * selector: 'aa-vote',\n * template: `Click to vote on {{identifier}}!`\n * })\n * class VoterComponent {\n * @Attribute('data-vote-id')\n * private identifier: string;\n *\n * @OutputEvent('VOTE')\n * private readonly voted: EventEmitter\n *\n * @HostEvent('click')\n * onClick(e: Event) {\n * this.voted.emit(this.identifier);\n * }\n * }\n * ```\n *\n * Surrounding our `aa-voter` we have a `aa-vote-collector` component. This component listens\n * for vote events, dispatched by `aa-vote`, and collects them under a local data property.\n *\n * ```typescript\n * @DomComponent({\n * selector: 'aa-vote-collector',\n * template: `\n *
\n * \n * \n *
`\n * });\n * class VoteCollectorComponent {\n * private voteData = {};\n *\n * @HostEvent('VOTE')\n * onVote(e: CustomEvent) {\n * const voteId = e.detail;\n * this.voteData[voteId] = (this.voteData[voteId]) ? 1 : this.voteData[voteId] + 1;\n * }\n * }\n * ```\n *\n * @param event\n * @param userOptions\n */\nexport const OutputEvent = (eventOptions?: string | Partial): PropertyDecorator => {\n return function (target: any, propertyKey: string | symbol) {\n // Use the first argument when it's a string, otherwise check if the name option\n // has been provided and fall-back to the propertyKey.\n const normalizedEventName = (typeof eventOptions === 'string')\n ? eventOptions : (eventOptions && eventOptions.name)\n ? eventOptions.name : String(propertyKey);\n\n // Normalize options\n const options: EventOptions = {\n name: normalizedEventName,\n bubbles: true,\n cancelable: true,\n ...(eventOptions && typeof eventOptions !== 'string') ? eventOptions : {},\n };\n\n // Adds the 'emit' method during the 'BeforeConnection' chain\n const beforeConnectedCallback = target[BEFORE_CONNECTED_CALLBACK] || function () { };\n target[BEFORE_CONNECTED_CALLBACK] = function () {\n const hostElm: HTMLElement = this[HOST_ELEMENT_KEY]();\n\n // Define a property with a 'emit' method which dispatches\n // a new customevent on the host element\n Object.defineProperty(this, propertyKey, {\n value: {\n emit: function (data: any) {\n const evt = document.createEvent('CustomEvent');\n\n evt.initCustomEvent(\n options.name,\n options.bubbles,\n options.cancelable,\n data,\n );\n hostElm.dispatchEvent(evt);\n },\n },\n writable: false,\n configurable: false,\n enumerable: false,\n });\n\n beforeConnectedCallback.call(this);\n };\n };\n};\n\nexport interface EventOptions {\n name: string;\n bubbles: boolean;\n cancelable: boolean;\n}\n\nexport interface EventEmitter {\n emit(data?: T): void;\n}\n","export { CookieService } from \"./cookie\";\n","export * from './cookie.service';\n","export class CookieService {\n /**\n * @param name Cookie name\n * @returns any\n */\n static get(name: string): string {\n name = encodeURIComponent(name);\n\n const regExp: RegExp = this.getCookieRegExp(name);\n\n if (!regExp) {\n return '';\n }\n\n const result: RegExpExecArray | null = regExp.exec(document.cookie);\n\n if (!result) {\n return '';\n }\n\n return Array.isArray(result) && result.length > 1 ? decodeURIComponent(result[1]) : '';\n }\n\n /**\n * @param name Cookie name\n * @param value Cookie value\n * @param expires Number of days until the cookies expires or an actual `Date`\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Secure flag\n */\n static set(\n name: string,\n value: string,\n expires?: number | Date,\n path?: string,\n domain?: string,\n secure?: boolean,\n ) {\n let cookieString: string =\n encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';\n\n if (expires) {\n if (typeof expires === 'number') {\n const dateExpires: Date = new Date(\n new Date().getTime() + expires * 1000 * 60 * 60 * 24,\n );\n cookieString += 'expires=' + dateExpires.toUTCString() + ';';\n } else {\n cookieString += 'expires=' + expires.toUTCString() + ';';\n }\n }\n\n if (path) {\n cookieString += 'path=' + path + ';';\n }\n\n if (domain) {\n cookieString += 'domain=' + domain + ';';\n }\n\n if (secure) {\n cookieString += 'secure;';\n }\n\n document.cookie = cookieString;\n }\n\n /**\n * @param name Cookie name\n * @param path Cookie path\n * @param domain Cookie domain\n */\n static delete(name: string, path?: string, domain?: string): void {\n this.set(name, '', -1, path, domain);\n }\n\n /**\n * @param name Cookie name\n * @returns RegExp\n */\n static getCookieRegExp(name: string) {\n const escapedName: string = name.replace(\n /([\\[\\]\\{\\}\\(\\)\\|\\=\\;\\+\\?\\,\\.\\*\\^\\$])/gi,\n '\\\\$1',\n );\n\n return new RegExp(\n '(?:^' + escapedName + '|;\\\\s*' + escapedName + ')=(.*?)(?:;|$)',\n 'g',\n );\n }\n}\n","import { Attribute, Child, DomDirective, HostElement } from './../../libs/core';\n\n/**\n * Generates html-elements of a audio-player in the DOM with a play/pause functionality\n *\n * @example\n * ```html\n *
\n * ```\n *\n */\n@DomDirective({\n selector: 'aa-audio',\n})\nexport class AudioDirective {\n /**\n * Reference to the HTMLElement this directive is applied on.\n *\n * @property {HTMLElement}\n */\n @HostElement()\n private readonly host: HTMLElement;\n\n @Child('.audioplayer__btn')\n private readonly playPauseButtonElement: HTMLElement;\n @Child('audio')\n private readonly audioElement: HTMLAudioElement;\n @Child('.audioplayer__current-time')\n private readonly currentTime: HTMLElement;\n @Child('.audioplayer__total-time')\n private readonly totalTime: HTMLElement;\n\n @Attribute('data-audio-url')\n private audioUrl: string | null;\n\n private isPlaying: boolean;\n private theCurrentTime: number;\n\n\n connected(): void {\n this.generateHTML();\n this.setup();\n this.setAudioEventListeners();\n }\n\n private setup(): void {\n this.isPlaying = false;\n this.theCurrentTime = 0;\n }\n\n private setAudioEventListeners(): void {\n\n this.playPauseButtonElement.addEventListener('click', () =>\n this.togglePlayPause(),\n );\n this.audioElement.addEventListener('timeupdate', () =>\n this.updateProgress(),\n );\n this.audioElement.addEventListener(\n 'loadedmetadata',\n () =>\n (this.totalTime.textContent = AudioDirective.formatTime(\n this.audioElement.duration,\n )),\n );\n this.audioElement.addEventListener('ended', () => this.resetPlayer());\n}\n\n getBarPercentage(e: any, className: string): number {\n const bar = e.target.className === className ? e.target : e.target.parentElement;\n const rect = bar.getBoundingClientRect();\n const clientPos = e.clientX - rect.x;\n const barPercentage = clientPos / rect.width;\n this.audioElement.currentTime = this.audioElement.duration * barPercentage;\n this.updateDotLocation( Math.floor(barPercentage * 100));\n return barPercentage;\n }\n\n private updateProgress(): void {\n const current = this.audioElement.currentTime;\n this.currentTime.textContent = AudioDirective.formatTime(current);\n const duration = this.audioElement.duration;\n const currentTime = this.audioElement.currentTime;\n const percentage = Math.floor((currentTime / duration) * 100);\n this.updateDotLocation(percentage);\n }\n\n private updateDotLocation(location: number): void{\n const bar = document.getElementById('progress-bar-dot');\n if(bar){\n bar.style.left = location+'%';\n }\n }\n\n private static formatTime(time: number): string {\n const min = Math.floor(time / 60);\n const sec = Math.floor(time % 60);\n return min + ':' + (sec < 10 ? '0' + sec : sec);\n }\n\n resetPlayer(): void {\n this.audioElement.load();\n this.playPauseButtonElement.classList.remove('audioplayer__btn--pause');\n }\n\n togglePlayPause(): void {\n if (this.audioElement.paused) {\n this.playPauseButtonElement.classList.add('audioplayer__btn--pause');\n this.audioElement.play();\n } else {\n this.playPauseButtonElement.classList.remove('audioplayer__btn--pause');\n this.audioElement.pause();\n }\n }\n\n // Creates the HTML with the supporting attributes of the audio-player\n private generateHTML(): void {\n const buttonAudio = document.createElement('div');\n buttonAudio.classList.add('audioplayer__btn');\n\n const controlsAudio = document.createElement('div');\n controlsAudio.classList.add('audioplayer__controls');\n\n const progressBar = document.createElement('div');\n progressBar.classList.add('audioplayer__progress-bar');\n progressBar.addEventListener('click', (e) => {this.getBarPercentage(e, 'audioplayer__progress-bar')});\n\n const progressBarDot = document.createElement('div');\n progressBarDot.classList.add('audioplayer__progress-bar-dot');\n progressBarDot.addEventListener('click', (e) => {this.getBarPercentage(e, 'audioplayer__progress-bar')});\n progressBarDot.id = 'progress-bar-dot'\n progressBar.appendChild(progressBarDot);\n\n const smallCurrentTime = document.createElement('small');\n smallCurrentTime.classList.add('audioplayer__current-time');\n smallCurrentTime.innerHTML = '0:00';\n const smallTotalTime = document.createElement('small');\n smallTotalTime.classList.add('audioplayer__total-time');\n smallTotalTime.innerHTML = '0:00';\n controlsAudio.appendChild(smallCurrentTime);\n controlsAudio.appendChild(progressBar);\n controlsAudio.appendChild(smallTotalTime);\n\n // audio element\n const audioElement = document.createElement('audio');\n audioElement.setAttribute('crossorigin', '');\n audioElement.src = '' + this.audioUrl;\n audioElement.setAttribute('type', 'mp3');\n audioElement.setAttribute('preload', 'auto');\n\n this.host.appendChild(buttonAudio);\n this.host.appendChild(controlsAudio);\n this.host.appendChild(audioElement);\n }\n}\n","import { Attribute, Child, DomDirective, HostElement, CookieService } from './../../libs/core';\n\nconst BANNER_ID = 'calamiteiten-banner-id';\nconst MODIFIED_DATE = 'calamiteiten-banner-modified';\nconst IS_VISIBLE = 'is-visible';\nconst COOKIE_EXPIRE_TIME = 1; // number in days\n\n/**\n *\n * @example\n * ```html\n * \n * ```\n *\n */\n@DomDirective({\n selector: 'aa-calamiteiten-banner',\n})\nexport class CalamiteitenBannerDirective {\n /**\n * Reference to the HTMLElement this directive is applied on.\n *\n * @property {HTMLElement}\n */\n @HostElement()\n private readonly host: HTMLElement;\n\n @Child('.js-calamiteiten-banner-close')\n private readonly closeButton: HTMLElement;\n\n @Attribute('data-id')\n private bannerId: string;\n\n @Attribute('data-modified-date')\n private bannerModifiedDate: string;\n\n /**\n * Executed when directive is connected to the DOM element.\n */\n connected(): void {\n const cookieIdValue = CookieService.get(BANNER_ID);\n const cookieModifiedDate = CookieService.get(MODIFIED_DATE);\n\n if (\n cookieIdValue !== this.bannerId ||\n cookieModifiedDate !== this.bannerModifiedDate\n ) {\n this.host.classList.add(IS_VISIBLE);\n\n if (this.closeButton) {\n this.closeButton.addEventListener('click', () =>\n this.handleButtonCloseClick(),\n );\n }\n }\n }\n\n private handleButtonCloseClick() {\n if (!this.bannerId && !this.bannerModifiedDate) {\n return;\n } else {\n CookieService.set(BANNER_ID, this.bannerId, COOKIE_EXPIRE_TIME, '/');\n CookieService.set(\n MODIFIED_DATE,\n this.bannerModifiedDate,\n COOKIE_EXPIRE_TIME,\n '/',\n );\n this.host.classList.remove(IS_VISIBLE);\n }\n }\n}\n","import { Child, DomDirective, HostElement } from '@averoachmea/static/core';\n\n/**\n * Searches for elements with the aa-hero attribute and adds functionallity to it\n *\n * @example\n * ```html\n *
\n * \n *
\n *
\n *
\n *
Robijn heading title
\n *
\n * Text\n *
\n *
\n *
\n * \n * \n * \n *
\n *
\n * \n * \n * \n *
\n * \n * \n * \n * \n * \n * \n * \n *
\n *
\n *
\n *
\n * ```\n *\n */\n@DomDirective({\n selector: 'aa-hero',\n})\nexport class HeroDirective {\n /**\n * Reference to the HTMLElement this directive is applied on.\n *\n * @property {HTMLElement}\n */\n @HostElement()\n private readonly host: HTMLElement;\n\n @Child('.aa-hero-heading')\n public readonly heroHeading: HTMLElement;\n\n @Child('.aa-hero-link')\n public readonly heroLink: HTMLAnchorElement;\n\n public tempHeading: string;\n public anchorElement: HTMLAnchorElement;\n\n connected(): void {\n if (!document.getElementsByClassName('sc-edit').length && this.heroHeading && this.heroLink) {\n this.tempHeading = this.heroHeading.innerHTML;\n this.checkWindowSize();\n window.addEventListener('resize', () => this.checkWindowSize());\n }\n }\n\n checkWindowSize() {\n if (window.innerWidth < 576) {\n this.generateHTMLAnchorElement();\n } else {\n this.resetHeading();\n }\n }\n\n generateHTMLAnchorElement() {\n this.anchorElement = document.createElement('a');\n this.anchorElement.href = this.heroLink.href;\n this.anchorElement.title = this.heroHeading.textContent || '';\n this.anchorElement.classList.add('hero-heading');\n this.anchorElement.classList.add('hero__link');\n this.anchorElement.classList.add('u-text-no-underline');\n this.anchorElement.textContent = this.heroHeading.textContent;\n this.addHTMLAnchorElementToHeading(this.anchorElement);\n }\n\n addHTMLAnchorElementToHeading(anchorElement: HTMLAnchorElement) {\n this.heroHeading.innerHTML = '';\n this.heroHeading.append(anchorElement);\n }\n\n resetHeading() {\n this.heroHeading.innerHTML = this.tempHeading;\n if (this.heroHeading.contains(this.anchorElement)) {\n this.heroHeading.removeChild(this.anchorElement);\n }\n }\n}\n"],"sourceRoot":""}