{"version":3,"sources":["webpack:///./node_modules/postscribe/dist/postscribe.js"],"names":["factory","modules","installedModules","__webpack_require__","moduleId","exports","module","id","loaded","call","m","c","p","obj","_postscribe","_postscribe2","__esModule","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","postscribe","_writeStream","_writeStream2","utils","newObj","_interopRequireWildcard","doNothing","OPTIONS","afterAsync","afterDequeue","afterStreamStart","afterWrite","autoFix","beforeEnqueue","beforeWriteToken","tok","beforeWrite","str","done","error","e","Error","msg","releaseAsync","nextId","queue","active","nextStream","args","shift","options","last","stream","runStream","apply","undefined","el","html","name","streams","doc","ownerDocument","stash","close","open","write","writeln","_write","_len","Array","_key","join","_len2","_key2","oldOnError","win","onerror","url","line","isFunction","defaults","test","window","document","getElementById","substr","jquery","cancel","abort","push","WriteStream","_prescribe","_prescribe2","_classCallCheck","instance","Constructor","TypeError","getData","attr","val","getAttribute","existy","String","setData","value","setAttribute","removeAttribute","root","this","defaultView","parentWindow","parser","actuals","proxyHistory","proxyRoot","createElement","nodeName","scriptStack","writeQueue","_writeQueue","deferredRemote","arg","_callFunction","_writeImpl","fn","type","toString","_onScriptStart","_onScriptDone","append","script","style","tokens","readToken","isScript","isStyle","_writeStaticTokens","_handleScriptToken","_handleStyleToken","chunk","_buildChunk","actual","proxy","innerHTML","_walkChunk","raw","len","tokenRaw","attrs","tagName","replace","unary","node","stack","isElement","nodeType","parentIsProxyOf","parentNode","appendChild","unshift","toArray","childNodes","_this","remainder","clear","src","SRC","_writeScriptToken","TYPE","_writeStyleToken","_buildStyle","_insertCursor","content","styleSheet","sheet","cssText","createTextNode","eachKey","which","cursor","replaceChild","outerWrites","_buildScript","asyncRelease","_shouldRelease","_scriptLoadHandler","text","cleanup","onload","onreadystatechange","success","failure","err","reattachEventListener","evt","handler","_onload","slice","_onerror","readyState","hasAttribute","_HtmlParser","_HtmlParser2","supports","streamReaders","_fixedReadTokenFactory","_fixedReadTokenFactory2","_utils","detect","comment","endTag","atomicTag","startTag","chars","HtmlParser","fix","fixedTokenOptions","_readToken","_readTokenImpl","_peekToken","_peekTokenImpl","prepend","token","peekToken","readTokens","handlers","rest","tokenToString","escapeAttributes","escapedAttrs","escapeQuotes","browserHasFlaw","tagSoup","selfClose","work","_typeof","Symbol","iterator","constructor","index","indexOf","_tokens","CommentToken","CharsToken","start","match","RegExp","AtomicTagToken","booleanAttrs","REGEXES","EndTagToken","fillAttr","_ret","v","StartTagToken","TagToken","Token","html5Unary","formatTag","defaultValue","_","prefix","readTokenImpl","lastTagNameEq","toUpperCase","containsTagName","newStack","prepareNextToken","selfCloseFix","CLOSESELF","closeLast","tagSoupFix","pop","tmp","correct","EMPTY","thing","each","arr","isTag","tag","toLowerCase","x","_defaults","ret","array"],"mappings":";;;;;;;;;;AASA,IAAiDA,IASxC,WACT,OAAgB,SAAUC,GAEhB,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCC,QAAS,GACTE,GAAIH,EACJI,QAAQ,GAUT,OANAP,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,QAAS,EAGTF,EAAOD,QAcf,OATAF,EAAoBO,EAAIT,EAGxBE,EAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAI,GAGjBT,EAAoB,GAvCrB,CA0CN,CAEJ,SAASG,EAAQD,EAASF,GAE/B,aAEA,IAIgCU,EAJ5BC,EAAcX,EAAoB,GAElCY,GAE4BF,EAFUC,IAEWD,EAAIG,WAAaH,EAAM,CAAE,QAAWA,GAEzFP,EAAOD,QAAUU,EAAsB,SAIlC,SAAST,EAAQD,EAASF,GAE/B,aAEAE,EAAQW,YAAa,EAErB,IAAIC,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAI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SAAQrP,GAAsB,aAAbA,EAAI0F,MAAoC,cAAb1F,EAAI0F,QAA2B,YAAa1F,MAAeA,EAAIkH,QAAQoI,cAAczC,QAAQwC,IAvH3I3R,EAAQwG,OAASA,EACjBxG,EAAQkF,WAyBR,SAAoB2M,GAClB,MAAO,mBAAsBA,GAzB/B7R,EAAQwR,KAAOA,EACfxR,EAAQoL,QAAUA,EAClBpL,EAAQmF,SA+DR,SAAkB9B,EAASyO,GAOzB,OANAzO,EAAUA,GAAW,GACrB+H,EAAQ0G,GAAW,SAAU1Q,EAAKkF,GAC3BE,EAAOnD,EAAQjC,MAClBiC,EAAQjC,GAAOkF,MAGZjD,GArETrD,EAAQmK,QA8ER,SAAiB3J,GACf,IACE,OAAOgE,MAAMnD,UAAUmL,MAAMpM,KAAKI,GAClC,MAAOmC,GACP,IAAIoN,GACEgC,EAAM,GACVP,EAAKhR,GAAK,SAAU8F,GAClByL,EAAInM,KAAKU,MAEJ,CACL0J,EAAG+B,IAIP,GAAoE,iBAA/C,IAAThC,EAAuB,YAAcjB,EAAQiB,IAAqB,OAAOA,EAAKC,EAV/E,IACL+B,GAlFV/R,EAAQsD,KAqGR,SAAc0O,GACZ,OAAOA,EAAMA,EAAM9Q,OAAS,IArG9BlB,EAAQ0R,MAAQA,EAChB1R,EAAQyI,SAwHR,SAAkBnG,GAChB,OAAOoP,EAAMpP,EAAK,WAxHpBtC,EAAQ0I,QAiIR,SAAiBpG,GACf,OAAOoP,EAAMpP,EAAK,cArhEnBrC,EAAOD,QAAUL","file":"2.main.min.js","sourcesContent":["/**\n * @file postscribe\n * @description Asynchronously write javascript, even with document.write.\n * @version v2.0.8\n * @see {@link https://krux.github.io/postscribe}\n * @license MIT\n * @author Derek Brans\n * @copyright 2016 Krux Digital, Inc\n */\n(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[\"postscribe\"] = factory();\n\telse\n\t\troot[\"postscribe\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _postscribe = __webpack_require__(1);\n\t\n\tvar _postscribe2 = _interopRequireDefault(_postscribe);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tmodule.exports = _postscribe2['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\texports['default'] = postscribe;\n\t\n\tvar _writeStream = __webpack_require__(2);\n\t\n\tvar _writeStream2 = _interopRequireDefault(_writeStream);\n\t\n\tvar _utils = __webpack_require__(4);\n\t\n\tvar utils = _interopRequireWildcard(_utils);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\t/**\n\t * A function that intentionally does nothing.\n\t */\n\tfunction doNothing() {}\n\t\n\t/**\n\t * Available options and defaults.\n\t *\n\t * @type {Object}\n\t */\n\tvar OPTIONS = {\n\t /**\n\t * Called when an async script has loaded.\n\t */\n\t afterAsync: doNothing,\n\t\n\t /**\n\t * Called immediately before removing from the write queue.\n\t */\n\t afterDequeue: doNothing,\n\t\n\t /**\n\t * Called sync after a stream's first thread release.\n\t */\n\t afterStreamStart: doNothing,\n\t\n\t /**\n\t * Called after writing buffered document.write calls.\n\t */\n\t afterWrite: doNothing,\n\t\n\t /**\n\t * Allows disabling the autoFix feature of prescribe\n\t */\n\t autoFix: true,\n\t\n\t /**\n\t * Called immediately before adding to the write queue.\n\t */\n\t beforeEnqueue: doNothing,\n\t\n\t /**\n\t * Called before writing a token.\n\t *\n\t * @param {Object} tok The token\n\t */\n\t beforeWriteToken: function beforeWriteToken(tok) {\n\t return tok;\n\t },\n\t\n\t /**\n\t * Called before writing buffered document.write calls.\n\t *\n\t * @param {String} str The string\n\t */\n\t beforeWrite: function beforeWrite(str) {\n\t return str;\n\t },\n\t\n\t /**\n\t * Called when evaluation is finished.\n\t */\n\t done: doNothing,\n\t\n\t /**\n\t * Called when a write results in an error.\n\t *\n\t * @param {Error} e The error\n\t */\n\t error: function error(e) {\n\t throw new Error(e.msg);\n\t },\n\t\n\t\n\t /**\n\t * Whether to let scripts w/ async attribute set fall out of the queue.\n\t */\n\t releaseAsync: false\n\t};\n\t\n\tvar nextId = 0;\n\tvar queue = [];\n\tvar active = null;\n\t\n\tfunction nextStream() {\n\t var args = queue.shift();\n\t if (args) {\n\t var options = utils.last(args);\n\t\n\t options.afterDequeue();\n\t args.stream = runStream.apply(undefined, args);\n\t options.afterStreamStart();\n\t }\n\t}\n\t\n\tfunction runStream(el, html, options) {\n\t active = new _writeStream2['default'](el, options);\n\t\n\t // Identify this stream.\n\t active.id = nextId++;\n\t active.name = options.name || active.id;\n\t postscribe.streams[active.name] = active;\n\t\n\t // Override document.write.\n\t var doc = el.ownerDocument;\n\t\n\t var stash = {\n\t close: doc.close,\n\t open: doc.open,\n\t write: doc.write,\n\t writeln: doc.writeln\n\t };\n\t\n\t function _write(str) {\n\t str = options.beforeWrite(str);\n\t active.write(str);\n\t options.afterWrite(str);\n\t }\n\t\n\t _extends(doc, {\n\t close: doNothing,\n\t open: doNothing,\n\t write: function write() {\n\t for (var _len = arguments.length, str = Array(_len), _key = 0; _key < _len; _key++) {\n\t str[_key] = arguments[_key];\n\t }\n\t\n\t return _write(str.join(''));\n\t },\n\t writeln: function writeln() {\n\t for (var _len2 = arguments.length, str = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t str[_key2] = arguments[_key2];\n\t }\n\t\n\t return _write(str.join('') + '\\n');\n\t }\n\t });\n\t\n\t // Override window.onerror\n\t var oldOnError = active.win.onerror || doNothing;\n\t\n\t // This works together with the try/catch around WriteStream::insertScript\n\t // In modern browsers, exceptions in tag scripts go directly to top level\n\t active.win.onerror = function (msg, url, line) {\n\t options.error({ msg: msg + ' - ' + url + ': ' + line });\n\t oldOnError.apply(active.win, [msg, url, line]);\n\t };\n\t\n\t // Write to the stream\n\t active.write(html, function () {\n\t // restore document.write\n\t _extends(doc, stash);\n\t\n\t // restore window.onerror\n\t active.win.onerror = oldOnError;\n\t\n\t options.done();\n\t active = null;\n\t nextStream();\n\t });\n\t\n\t return active;\n\t}\n\t\n\tfunction postscribe(el, html, options) {\n\t if (utils.isFunction(options)) {\n\t options = { done: options };\n\t } else if (options === 'clear') {\n\t queue = [];\n\t active = null;\n\t nextId = 0;\n\t return;\n\t }\n\t\n\t options = utils.defaults(options, OPTIONS);\n\t\n\t // id selector\n\t if (/^#/.test(el)) {\n\t el = window.document.getElementById(el.substr(1));\n\t } else {\n\t el = el.jquery ? el[0] : el;\n\t }\n\t\n\t var args = [el, html, options];\n\t\n\t el.postscribe = {\n\t cancel: function cancel() {\n\t if (args.stream) {\n\t args.stream.abort();\n\t } else {\n\t args[1] = doNothing;\n\t }\n\t }\n\t };\n\t\n\t options.beforeEnqueue(args);\n\t queue.push(args);\n\t\n\t if (!active) {\n\t nextStream();\n\t }\n\t\n\t return el.postscribe;\n\t}\n\t\n\t_extends(postscribe, {\n\t // Streams by name.\n\t streams: {},\n\t // Queue of streams.\n\t queue: queue,\n\t // Expose internal classes.\n\t WriteStream: _writeStream2['default']\n\t});\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _prescribe = __webpack_require__(3);\n\t\n\tvar _prescribe2 = _interopRequireDefault(_prescribe);\n\t\n\tvar _utils = __webpack_require__(4);\n\t\n\tvar utils = _interopRequireWildcard(_utils);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * Turn on to debug how each chunk affected the DOM.\n\t * @type {boolean}\n\t */\n\tvar DEBUG_CHUNK = false;\n\t\n\t/**\n\t * Prefix for data attributes on DOM elements.\n\t * @type {string}\n\t */\n\tvar BASEATTR = 'data-ps-';\n\t\n\t/**\n\t * ID for the style proxy\n\t * @type {string}\n\t */\n\tvar PROXY_STYLE = 'ps-style';\n\t\n\t/**\n\t * ID for the script proxy\n\t * @type {string}\n\t */\n\tvar PROXY_SCRIPT = 'ps-script';\n\t\n\t/**\n\t * Get data attributes\n\t *\n\t * @param {Object} el The DOM element.\n\t * @param {String} name The attribute name.\n\t * @returns {String}\n\t */\n\tfunction getData(el, name) {\n\t var attr = BASEATTR + name;\n\t\n\t var val = el.getAttribute(attr);\n\t\n\t // IE 8 returns a number if it's a number\n\t return !utils.existy(val) ? val : String(val);\n\t}\n\t\n\t/**\n\t * Set data attributes\n\t *\n\t * @param {Object} el The DOM element.\n\t * @param {String} name The attribute name.\n\t * @param {null|*} value The attribute value.\n\t */\n\tfunction setData(el, name) {\n\t var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\t\n\t var attr = BASEATTR + name;\n\t\n\t if (utils.existy(value) && value !== '') {\n\t el.setAttribute(attr, value);\n\t } else {\n\t el.removeAttribute(attr);\n\t }\n\t}\n\t\n\t/**\n\t * Stream static html to an element, where \"static html\" denotes \"html\n\t * without scripts\".\n\t *\n\t * This class maintains a *history of writes devoid of any attributes* or\n\t * \"proxy history\".\n\t *\n\t * Injecting the proxy history into a temporary div has no side-effects,\n\t * other than to create proxy elements for previously written elements.\n\t *\n\t * Given the `staticHtml` of a new write, a `tempDiv`'s innerHTML is set to\n\t * `proxy_history + staticHtml`.\n\t * The *structure* of `tempDiv`'s contents, (i.e., the placement of new nodes\n\t * beside or inside of proxy elements), reflects the DOM structure that would\n\t * have resulted if all writes had been squashed into a single write.\n\t *\n\t * For each descendent `node` of `tempDiv` whose parentNode is a *proxy*,\n\t * `node` is appended to the corresponding *real* element within the DOM.\n\t *\n\t * Proxy elements are mapped to *actual* elements in the DOM by injecting a\n\t * `data-id` attribute into each start tag in `staticHtml`.\n\t *\n\t */\n\t\n\tvar WriteStream = function () {\n\t /**\n\t * Constructor.\n\t *\n\t * @param {Object} root The root element\n\t * @param {?Object} options The options\n\t */\n\t function WriteStream(root) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t _classCallCheck(this, WriteStream);\n\t\n\t this.root = root;\n\t this.options = options;\n\t this.doc = root.ownerDocument;\n\t this.win = this.doc.defaultView || this.doc.parentWindow;\n\t this.parser = new _prescribe2['default']('', { autoFix: options.autoFix });\n\t\n\t // Actual elements by id.\n\t this.actuals = [root];\n\t\n\t // Embodies the \"structure\" of what's been written so far,\n\t // devoid of attributes.\n\t this.proxyHistory = '';\n\t\n\t // Create a proxy of the root element.\n\t this.proxyRoot = this.doc.createElement(root.nodeName);\n\t\n\t this.scriptStack = [];\n\t this.writeQueue = [];\n\t\n\t setData(this.proxyRoot, 'proxyof', 0);\n\t }\n\t\n\t /**\n\t * Writes the given strings.\n\t *\n\t * @param {...String} str The strings to write\n\t */\n\t\n\t\n\t WriteStream.prototype.write = function write() {\n\t var _writeQueue;\n\t\n\t (_writeQueue = this.writeQueue).push.apply(_writeQueue, arguments);\n\t\n\t // Process writes\n\t // When new script gets pushed or pending this will stop\n\t // because new writeQueue gets pushed\n\t while (!this.deferredRemote && this.writeQueue.length) {\n\t var arg = this.writeQueue.shift();\n\t\n\t if (utils.isFunction(arg)) {\n\t this._callFunction(arg);\n\t } else {\n\t this._writeImpl(arg);\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Calls the given function.\n\t *\n\t * @param {Function} fn The function to call\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._callFunction = function _callFunction(fn) {\n\t var tok = { type: 'function', value: fn.name || fn.toString() };\n\t this._onScriptStart(tok);\n\t fn.call(this.win, this.doc);\n\t this._onScriptDone(tok);\n\t };\n\t\n\t /**\n\t * The write implementation\n\t *\n\t * @param {String} html The HTML to write.\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._writeImpl = function _writeImpl(html) {\n\t this.parser.append(html);\n\t\n\t var tok = void 0;\n\t var script = void 0;\n\t var style = void 0;\n\t var tokens = [];\n\t\n\t // stop if we see a script token\n\t while ((tok = this.parser.readToken()) && !(script = utils.isScript(tok)) && !(style = utils.isStyle(tok))) {\n\t tok = this.options.beforeWriteToken(tok);\n\t\n\t if (tok) {\n\t tokens.push(tok);\n\t }\n\t }\n\t\n\t if (tokens.length > 0) {\n\t this._writeStaticTokens(tokens);\n\t }\n\t\n\t if (script) {\n\t this._handleScriptToken(tok);\n\t }\n\t\n\t if (style) {\n\t this._handleStyleToken(tok);\n\t }\n\t };\n\t\n\t /**\n\t * Write contiguous non-script tokens (a chunk)\n\t *\n\t * @param {Array} tokens The tokens\n\t * @returns {{tokens, raw, actual, proxy}|null}\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._writeStaticTokens = function _writeStaticTokens(tokens) {\n\t var chunk = this._buildChunk(tokens);\n\t\n\t if (!chunk.actual) {\n\t // e.g., no tokens, or a noscript that got ignored\n\t return null;\n\t }\n\t\n\t chunk.html = this.proxyHistory + chunk.actual;\n\t this.proxyHistory += chunk.proxy;\n\t this.proxyRoot.innerHTML = chunk.html;\n\t\n\t if (DEBUG_CHUNK) {\n\t chunk.proxyInnerHTML = this.proxyRoot.innerHTML;\n\t }\n\t\n\t this._walkChunk();\n\t\n\t if (DEBUG_CHUNK) {\n\t chunk.actualInnerHTML = this.root.innerHTML;\n\t }\n\t\n\t return chunk;\n\t };\n\t\n\t /**\n\t * Build a chunk.\n\t *\n\t * @param {Array} tokens The tokens to use.\n\t * @returns {{tokens: *, raw: string, actual: string, proxy: string}}\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._buildChunk = function _buildChunk(tokens) {\n\t var nextId = this.actuals.length;\n\t\n\t // The raw html of this chunk.\n\t var raw = [];\n\t\n\t // The html to create the nodes in the tokens (with id's injected).\n\t var actual = [];\n\t\n\t // Html that can later be used to proxy the nodes in the tokens.\n\t var proxy = [];\n\t\n\t var len = tokens.length;\n\t for (var i = 0; i < len; i++) {\n\t var tok = tokens[i];\n\t var tokenRaw = tok.toString();\n\t\n\t raw.push(tokenRaw);\n\t\n\t if (tok.attrs) {\n\t // tok.attrs <==> startTag or atomicTag or cursor\n\t // Ignore noscript tags. They are atomic, so we don't have to worry about children.\n\t if (!/^noscript$/i.test(tok.tagName)) {\n\t var id = nextId++;\n\t\n\t // Actual: inject id attribute: replace '>' at end of start tag with id attribute + '>'\n\t actual.push(tokenRaw.replace(/(\\/?>)/, ' ' + BASEATTR + 'id=' + id + ' $1'));\n\t\n\t // Don't proxy scripts: they have no bearing on DOM structure.\n\t if (tok.attrs.id !== PROXY_SCRIPT && tok.attrs.id !== PROXY_STYLE) {\n\t // Proxy: strip all attributes and inject proxyof attribute\n\t proxy.push(\n\t // ignore atomic tags (e.g., style): they have no \"structural\" effect\n\t tok.type === 'atomicTag' ? '' : '<' + tok.tagName + ' ' + BASEATTR + 'proxyof=' + id + (tok.unary ? ' />' : '>'));\n\t }\n\t }\n\t } else {\n\t // Visit any other type of token\n\t // Actual: append.\n\t actual.push(tokenRaw);\n\t\n\t // Proxy: append endTags. Ignore everything else.\n\t proxy.push(tok.type === 'endTag' ? tokenRaw : '');\n\t }\n\t }\n\t\n\t return {\n\t tokens: tokens,\n\t raw: raw.join(''),\n\t actual: actual.join(''),\n\t proxy: proxy.join('')\n\t };\n\t };\n\t\n\t /**\n\t * Walk the chunks.\n\t *\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._walkChunk = function _walkChunk() {\n\t var node = void 0;\n\t var stack = [this.proxyRoot];\n\t\n\t // use shift/unshift so that children are walked in document order\n\t while (utils.existy(node = stack.shift())) {\n\t var isElement = node.nodeType === 1;\n\t var isProxy = isElement && getData(node, 'proxyof');\n\t\n\t // Ignore proxies\n\t if (!isProxy) {\n\t if (isElement) {\n\t // New actual element: register it and remove the the id attr.\n\t this.actuals[getData(node, 'id')] = node;\n\t setData(node, 'id');\n\t }\n\t\n\t // Is node's parent a proxy?\n\t var parentIsProxyOf = node.parentNode && getData(node.parentNode, 'proxyof');\n\t if (parentIsProxyOf) {\n\t // Move node under actual parent.\n\t this.actuals[parentIsProxyOf].appendChild(node);\n\t }\n\t }\n\t\n\t // prepend childNodes to stack\n\t stack.unshift.apply(stack, utils.toArray(node.childNodes));\n\t }\n\t };\n\t\n\t /**\n\t * Handles Script tokens\n\t *\n\t * @param {Object} tok The token\n\t */\n\t\n\t\n\t WriteStream.prototype._handleScriptToken = function _handleScriptToken(tok) {\n\t var _this = this;\n\t\n\t var remainder = this.parser.clear();\n\t\n\t if (remainder) {\n\t // Write remainder immediately behind this script.\n\t this.writeQueue.unshift(remainder);\n\t }\n\t\n\t tok.src = tok.attrs.src || tok.attrs.SRC;\n\t\n\t tok = this.options.beforeWriteToken(tok);\n\t if (!tok) {\n\t // User has removed this token\n\t return;\n\t }\n\t\n\t if (tok.src && this.scriptStack.length) {\n\t // Defer this script until scriptStack is empty.\n\t // Assumption 1: This script will not start executing until\n\t // scriptStack is empty.\n\t this.deferredRemote = tok;\n\t } else {\n\t this._onScriptStart(tok);\n\t }\n\t\n\t // Put the script node in the DOM.\n\t this._writeScriptToken(tok, function () {\n\t _this._onScriptDone(tok);\n\t });\n\t };\n\t\n\t /**\n\t * Handles style tokens\n\t *\n\t * @param {Object} tok The token\n\t */\n\t\n\t\n\t WriteStream.prototype._handleStyleToken = function _handleStyleToken(tok) {\n\t var remainder = this.parser.clear();\n\t\n\t if (remainder) {\n\t // Write remainder immediately behind this style.\n\t this.writeQueue.unshift(remainder);\n\t }\n\t\n\t tok.type = tok.attrs.type || tok.attrs.TYPE || 'text/css';\n\t\n\t tok = this.options.beforeWriteToken(tok);\n\t\n\t if (tok) {\n\t // Put the style node in the DOM.\n\t this._writeStyleToken(tok);\n\t }\n\t\n\t if (remainder) {\n\t this.write();\n\t }\n\t };\n\t\n\t /**\n\t * Build a style and insert it into the DOM.\n\t *\n\t * @param {Object} tok The token\n\t */\n\t\n\t\n\t WriteStream.prototype._writeStyleToken = function _writeStyleToken(tok) {\n\t var el = this._buildStyle(tok);\n\t\n\t this._insertCursor(el, PROXY_STYLE);\n\t\n\t // Set content\n\t if (tok.content) {\n\t if (el.styleSheet && !el.sheet) {\n\t el.styleSheet.cssText = tok.content;\n\t } else {\n\t el.appendChild(this.doc.createTextNode(tok.content));\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Build a style element from an atomic style token.\n\t *\n\t * @param {Object} tok The token\n\t * @returns {Element}\n\t */\n\t\n\t\n\t WriteStream.prototype._buildStyle = function _buildStyle(tok) {\n\t var el = this.doc.createElement(tok.tagName);\n\t\n\t el.setAttribute('type', tok.type);\n\t\n\t // Set attributes\n\t utils.eachKey(tok.attrs, function (name, value) {\n\t el.setAttribute(name, value);\n\t });\n\t\n\t return el;\n\t };\n\t\n\t /**\n\t * Append a span to the stream. That span will act as a cursor\n\t * (i.e. insertion point) for the element.\n\t *\n\t * @param {Object} el The element\n\t * @param {string} which The type of proxy element\n\t */\n\t\n\t\n\t WriteStream.prototype._insertCursor = function _insertCursor(el, which) {\n\t this._writeImpl('');\n\t\n\t var cursor = this.doc.getElementById(which);\n\t\n\t if (cursor) {\n\t cursor.parentNode.replaceChild(el, cursor);\n\t }\n\t };\n\t\n\t /**\n\t * Called when a script is started.\n\t *\n\t * @param {Object} tok The token\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._onScriptStart = function _onScriptStart(tok) {\n\t tok.outerWrites = this.writeQueue;\n\t this.writeQueue = [];\n\t this.scriptStack.unshift(tok);\n\t };\n\t\n\t /**\n\t * Called when a script is done.\n\t *\n\t * @param {Object} tok The token\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._onScriptDone = function _onScriptDone(tok) {\n\t // Pop script and check nesting.\n\t if (tok !== this.scriptStack[0]) {\n\t this.options.error({ msg: 'Bad script nesting or script finished twice' });\n\t return;\n\t }\n\t\n\t this.scriptStack.shift();\n\t\n\t // Append outer writes to queue and process them.\n\t this.write.apply(this, tok.outerWrites);\n\t\n\t // Check for pending remote\n\t\n\t // Assumption 2: if remote_script1 writes remote_script2 then\n\t // the we notice remote_script1 finishes before remote_script2 starts.\n\t // I think this is equivalent to assumption 1\n\t if (!this.scriptStack.length && this.deferredRemote) {\n\t this._onScriptStart(this.deferredRemote);\n\t this.deferredRemote = null;\n\t }\n\t };\n\t\n\t /**\n\t * Build a script and insert it into the DOM.\n\t * Done is called once script has executed.\n\t *\n\t * @param {Object} tok The token\n\t * @param {Function} done The callback when complete\n\t */\n\t\n\t\n\t WriteStream.prototype._writeScriptToken = function _writeScriptToken(tok, done) {\n\t var el = this._buildScript(tok);\n\t var asyncRelease = this._shouldRelease(el);\n\t var afterAsync = this.options.afterAsync;\n\t\n\t if (tok.src) {\n\t // Fix for attribute \"SRC\" (capitalized). IE does not recognize it.\n\t el.src = tok.src;\n\t this._scriptLoadHandler(el, !asyncRelease ? function () {\n\t done();\n\t afterAsync();\n\t } : afterAsync);\n\t }\n\t\n\t try {\n\t this._insertCursor(el, PROXY_SCRIPT);\n\t if (!el.src || asyncRelease) {\n\t done();\n\t }\n\t } catch (e) {\n\t this.options.error(e);\n\t done();\n\t }\n\t };\n\t\n\t /**\n\t * Build a script element from an atomic script token.\n\t *\n\t * @param {Object} tok The token\n\t * @returns {Element}\n\t */\n\t\n\t\n\t WriteStream.prototype._buildScript = function _buildScript(tok) {\n\t var el = this.doc.createElement(tok.tagName);\n\t\n\t // Set attributes\n\t utils.eachKey(tok.attrs, function (name, value) {\n\t el.setAttribute(name, value);\n\t });\n\t\n\t // Set content\n\t if (tok.content) {\n\t el.text = tok.content;\n\t }\n\t\n\t return el;\n\t };\n\t\n\t /**\n\t * Setup the script load handler on an element.\n\t *\n\t * @param {Object} el The element\n\t * @param {Function} done The callback\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._scriptLoadHandler = function _scriptLoadHandler(el, done) {\n\t function cleanup() {\n\t el = el.onload = el.onreadystatechange = el.onerror = null;\n\t }\n\t\n\t var error = this.options.error;\n\t\n\t function success() {\n\t cleanup();\n\t if (done != null) {\n\t done();\n\t }\n\t done = null;\n\t }\n\t\n\t function failure(err) {\n\t cleanup();\n\t error(err);\n\t if (done != null) {\n\t done();\n\t }\n\t done = null;\n\t }\n\t\n\t function reattachEventListener(el, evt) {\n\t var handler = el['on' + evt];\n\t if (handler != null) {\n\t el['_on' + evt] = handler;\n\t }\n\t }\n\t\n\t reattachEventListener(el, 'load');\n\t reattachEventListener(el, 'error');\n\t\n\t _extends(el, {\n\t onload: function onload() {\n\t if (el._onload) {\n\t try {\n\t el._onload.apply(this, Array.prototype.slice.call(arguments, 0));\n\t } catch (err) {\n\t failure({ msg: 'onload handler failed ' + err + ' @ ' + el.src });\n\t }\n\t }\n\t success();\n\t },\n\t onerror: function onerror() {\n\t if (el._onerror) {\n\t try {\n\t el._onerror.apply(this, Array.prototype.slice.call(arguments, 0));\n\t } catch (err) {\n\t failure({ msg: 'onerror handler failed ' + err + ' @ ' + el.src });\n\t return;\n\t }\n\t }\n\t failure({ msg: 'remote script failed ' + el.src });\n\t },\n\t onreadystatechange: function onreadystatechange() {\n\t if (/^(loaded|complete)$/.test(el.readyState)) {\n\t success();\n\t }\n\t }\n\t });\n\t };\n\t\n\t /**\n\t * Determines whether to release.\n\t *\n\t * @param {Object} el The element\n\t * @returns {boolean}\n\t * @private\n\t */\n\t\n\t\n\t WriteStream.prototype._shouldRelease = function _shouldRelease(el) {\n\t var isScript = /^script$/i.test(el.nodeName);\n\t return !isScript || !!(this.options.releaseAsync && el.src && el.hasAttribute('async'));\n\t };\n\t\n\t return WriteStream;\n\t}();\n\t\n\texports['default'] = WriteStream;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\n\t * @file prescribe\n\t * @description Tiny, forgiving HTML parser\n\t * @version vundefined\n\t * @see {@link https://github.com/krux/prescribe/}\n\t * @license MIT\n\t * @author Derek Brans\n\t * @copyright 2016 Krux Digital, Inc\n\t */\n\t(function webpackUniversalModuleDefinition(root, factory) {\n\t\tif(true)\n\t\t\tmodule.exports = factory();\n\t\telse if(typeof define === 'function' && define.amd)\n\t\t\tdefine([], factory);\n\t\telse if(typeof exports === 'object')\n\t\t\texports[\"Prescribe\"] = factory();\n\t\telse\n\t\t\troot[\"Prescribe\"] = factory();\n\t})(this, function() {\n\treturn /******/ (function(modules) { // webpackBootstrap\n\t/******/ \t// The module cache\n\t/******/ \tvar installedModules = {};\n\t\n\t/******/ \t// The require function\n\t/******/ \tfunction __webpack_require__(moduleId) {\n\t\n\t/******/ \t\t// Check if module is in cache\n\t/******/ \t\tif(installedModules[moduleId])\n\t/******/ \t\t\treturn installedModules[moduleId].exports;\n\t\n\t/******/ \t\t// Create a new module (and put it into the cache)\n\t/******/ \t\tvar module = installedModules[moduleId] = {\n\t/******/ \t\t\texports: {},\n\t/******/ \t\t\tid: moduleId,\n\t/******/ \t\t\tloaded: false\n\t/******/ \t\t};\n\t\n\t/******/ \t\t// Execute the module function\n\t/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\n\t/******/ \t\t// Flag the module as loaded\n\t/******/ \t\tmodule.loaded = true;\n\t\n\t/******/ \t\t// Return the exports of the module\n\t/******/ \t\treturn module.exports;\n\t/******/ \t}\n\t\n\t\n\t/******/ \t// expose the modules object (__webpack_modules__)\n\t/******/ \t__webpack_require__.m = modules;\n\t\n\t/******/ \t// expose the module cache\n\t/******/ \t__webpack_require__.c = installedModules;\n\t\n\t/******/ \t// __webpack_public_path__\n\t/******/ \t__webpack_require__.p = \"\";\n\t\n\t/******/ \t// Load entry module and return exports\n\t/******/ \treturn __webpack_require__(0);\n\t/******/ })\n\t/************************************************************************/\n\t/******/ ([\n\t/* 0 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\tvar _HtmlParser = __webpack_require__(1);\n\t\n\t\tvar _HtmlParser2 = _interopRequireDefault(_HtmlParser);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\t\tmodule.exports = _HtmlParser2['default'];\n\t\n\t/***/ },\n\t/* 1 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\texports.__esModule = true;\n\t\n\t\tvar _supports = __webpack_require__(2);\n\t\n\t\tvar supports = _interopRequireWildcard(_supports);\n\t\n\t\tvar _streamReaders = __webpack_require__(3);\n\t\n\t\tvar streamReaders = _interopRequireWildcard(_streamReaders);\n\t\n\t\tvar _fixedReadTokenFactory = __webpack_require__(6);\n\t\n\t\tvar _fixedReadTokenFactory2 = _interopRequireDefault(_fixedReadTokenFactory);\n\t\n\t\tvar _utils = __webpack_require__(5);\n\t\n\t\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\t\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\t\n\t\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t\t/**\n\t\t * Detection regular expressions.\n\t\t *\n\t\t * Order of detection matters: detection of one can only\n\t\t * succeed if detection of previous didn't\n\t\n\t\t * @type {Object}\n\t\t */\n\t\tvar detect = {\n\t\t comment: /^');\n\t\t if (index >= 0) {\n\t\t return new _tokens.CommentToken(stream.substr(4, index - 1), index + 3);\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * Reads non-tag characters.\n\t\t *\n\t\t * @param {string} stream The input stream\n\t\t * @returns {CharsToken}\n\t\t */\n\t\tfunction chars(stream) {\n\t\t var index = stream.indexOf('<');\n\t\t return new _tokens.CharsToken(index >= 0 ? index : stream.length);\n\t\t}\n\t\n\t\t/**\n\t\t * Reads start tag token.\n\t\t *\n\t\t * @param {string} stream The input stream\n\t\t * @returns {StartTagToken}\n\t\t */\n\t\tfunction startTag(stream) {\n\t\t var endTagIndex = stream.indexOf('>');\n\t\t if (endTagIndex !== -1) {\n\t\t var match = stream.match(REGEXES.startTag);\n\t\t if (match) {\n\t\t var _ret = function () {\n\t\t var attrs = {};\n\t\t var booleanAttrs = {};\n\t\t var rest = match[2];\n\t\n\t\t match[2].replace(REGEXES.attr, function (match, name) {\n\t\t if (!(arguments[2] || arguments[3] || arguments[4] || arguments[5])) {\n\t\t attrs[name] = '';\n\t\t } else if (arguments[5]) {\n\t\t attrs[arguments[5]] = '';\n\t\t booleanAttrs[arguments[5]] = true;\n\t\t } else {\n\t\t attrs[name] = arguments[2] || arguments[3] || arguments[4] || REGEXES.fillAttr.test(name) && name || '';\n\t\t }\n\t\n\t\t rest = rest.replace(match, '');\n\t\t });\n\t\n\t\t return {\n\t\t v: new _tokens.StartTagToken(match[1], match[0].length, attrs, booleanAttrs, !!match[3], rest.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, ''))\n\t\t };\n\t\t }();\n\t\n\t\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t\t }\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * Reads atomic tag token.\n\t\t *\n\t\t * @param {string} stream The input stream\n\t\t * @returns {AtomicTagToken}\n\t\t */\n\t\tfunction atomicTag(stream) {\n\t\t var start = startTag(stream);\n\t\t if (start) {\n\t\t var rest = stream.slice(start.length);\n\t\t // for optimization, we check first just for the end tag\n\t\t if (rest.match(new RegExp('<\\/\\\\s*' + start.tagName + '\\\\s*>', 'i'))) {\n\t\t // capturing the content is inefficient, so we do it inside the if\n\t\t var match = rest.match(new RegExp('([\\\\s\\\\S]*?)<\\/\\\\s*' + start.tagName + '\\\\s*>', 'i'));\n\t\t if (match) {\n\t\t return new _tokens.AtomicTagToken(start.tagName, match[0].length + start.length, start.attrs, start.booleanAttrs, match[1]);\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * Reads an end tag token.\n\t\t *\n\t\t * @param {string} stream The input stream\n\t\t * @returns {EndTagToken}\n\t\t */\n\t\tfunction endTag(stream) {\n\t\t var match = stream.match(REGEXES.endTag);\n\t\t if (match) {\n\t\t return new _tokens.EndTagToken(match[1], match[0].length);\n\t\t }\n\t\t}\n\t\n\t/***/ },\n\t/* 4 */\n\t/***/ function(module, exports, __webpack_require__) {\n\t\n\t\t'use strict';\n\t\n\t\texports.__esModule = true;\n\t\texports.EndTagToken = exports.AtomicTagToken = exports.StartTagToken = exports.TagToken = exports.CharsToken = exports.CommentToken = exports.Token = undefined;\n\t\n\t\tvar _utils = __webpack_require__(5);\n\t\n\t\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t\t/**\n\t\t * Token is a base class for all token types parsed. Note we don't actually\n\t\t * use intheritance due to IE8's non-existent ES5 support.\n\t\t */\n\t\tvar Token =\n\t\t/**\n\t\t * Constructor.\n\t\t *\n\t\t * @param {string} type The type of the Token.\n\t\t * @param {Number} length The length of the Token text.\n\t\t */\n\t\texports.Token = function Token(type, length) {\n\t\t _classCallCheck(this, Token);\n\t\n\t\t this.type = type;\n\t\t this.length = length;\n\t\t this.text = '';\n\t\t};\n\t\n\t\t/**\n\t\t * CommentToken represents comment tags.\n\t\t */\n\t\n\t\n\t\tvar CommentToken = exports.CommentToken = function () {\n\t\t /**\n\t\t * Constructor.\n\t\t *\n\t\t * @param {string} content The content of the comment\n\t\t * @param {Number} length The length of the Token text.\n\t\t */\n\t\t function CommentToken(content, length) {\n\t\t _classCallCheck(this, CommentToken);\n\t\n\t\t this.type = 'comment';\n\t\t this.length = length || (content ? content.length : 0);\n\t\t this.text = '';\n\t\t this.content = content;\n\t\t }\n\t\n\t\t CommentToken.prototype.toString = function toString() {\n\t\t return '