eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parse\", function() { return parse; });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n\nvar document;\nvar offset;\nvar output;\nvar stack;\nvar tokenizer = /<!--\\s+(\\/)?wp:([a-z][a-z0-9_-]*\\/)?([a-z][a-z0-9_-]*)\\s+({(?:[^}]+|}+(?=})|(?!}\\s+-->)[^])*?}\\s+)?(\\/)?-->/g;\n\nfunction Block(blockName, attrs, innerBlocks, innerHTML, innerContent) {\n return {\n blockName: blockName,\n attrs: attrs,\n innerBlocks: innerBlocks,\n innerHTML: innerHTML,\n innerContent: innerContent\n };\n}\n\nfunction Freeform(innerHTML) {\n return Block(null, {}, [], innerHTML, [innerHTML]);\n}\n\nfunction Frame(block, tokenStart, tokenLength, prevOffset, leadingHtmlStart) {\n return {\n block: block,\n tokenStart: tokenStart,\n tokenLength: tokenLength,\n prevOffset: prevOffset || tokenStart + tokenLength,\n leadingHtmlStart: leadingHtmlStart\n };\n}\n\nvar parse = function parse(doc) {\n document = doc;\n offset = 0;\n output = [];\n stack = [];\n tokenizer.lastIndex = 0;\n\n do {// twiddle our thumbs\n } while (proceed());\n\n return output;\n};\n\nfunction proceed() {\n var next = nextToken();\n\n var _next = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(next,5),\ntokenType=_next[0],\nblockName=_next[1],\nattrs=_next[2],\nstartOffset=_next[3],\ntokenLength=_next[4];\n\nvarstackDepth=stack.length;// we may have some HTML soup before the next block\n\n var leadingHtmlStart = startOffset > offset ? offset : null;\n\n switch (tokenType) {\n case 'no-more-tokens':\n // if not in a block then flush output\n if (0 === stackDepth) {\n addFreeform();\n return false;\n } // Otherwise we have a problem\n // This is an error\n // we have options\n // - treat it all as freeform text\n // - assume an implicit closer (easiest when not nesting)\n // for the easy case we'll assume an implicit closer\n\n\n if (1 === stackDepth) {\n addBlockFromStack();\n return false;\n } // for the nested case where it's more difficult we'll\n // have to assume that multiple closers are missing\n // and so we'll collapse the whole stack piecewise\n\n\n while (0 < stack.length) {\n addBlockFromStack();\n }\n\n return false;\n\n case 'void-block':\n // easy case is if we stumbled upon a void block\n // in the top-level of the document\n if (0 === stackDepth) {\n if (null !== leadingHtmlStart) {\n output.push(Freeform(document.substr(leadingHtmlStart, startOffset - leadingHtmlStart)));\n }\n\n output.push(Block(blockName, attrs, [], '', []));\n offset = startOffset + tokenLength;\n return true;\n } // otherwise we found an inner block\n\n\n addInnerBlock(Block(blockName, attrs, [], '', []), startOffset, tokenLength);\n offset = startOffset + tokenLength;\n return true;\n\n case 'block-opener':\n // track all newly-opened blocks on the stack\n stack.push(Frame(Block(blockName, attrs, [], '', []), startOffset, tokenLength, startOffset + tokenLength, leadingHtmlStart));\n offset = startOffset + tokenLength;\n return true;\n\n case 'block-closer':\n // if we're missing an opener we're in trouble\n // This is an error\n if (0 === stackDepth) {\n // we have options\n // - assume an implicit opener\n // - assume _this_ is the opener\n // - give up and close out the document\n addFreeform();\n return false;\n } // if we're not nesting then this is easy - close the block\n\n\n if (1 === stackDepth) {\n addBlockFromStack(startOffset);\n