text: !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@polymer/polymer/polymer-element.js"),require("@lrnwebcomponents/haxcms-elements/lib/core/HAXCMSThemeWiring.js"),require("@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js"),require("mobx"),require("@polymer/polymer/lib/utils/render-status.js"),require("@lrnwebcomponents/simple-colors/simple-colors.js"),require("@lrnwebcomponents/simple-blog/lib/simple-blog-listing.js"),require("@lrnwebcomponents/simple-blog/lib/simple-blog-post.js"),require("@polymer/iron-pages/iron-pages.js")):"function"==typeof define&&define.amd?define(["exports","@polymer/polymer/polymer-element.js","@lrnwebcomponents/haxcms-elements/lib/core/HAXCMSThemeWiring.js","@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-store.js","mobx","@polymer/polymer/lib/utils/render-status.js","@lrnwebcomponents/simple-colors/simple-colors.js","@lrnwebcomponents/simple-blog/lib/simple-blog-listing.js","@lrnwebcomponents/simple-blog/lib/simple-blog-post.js","@polymer/iron-pages/iron-pages.js"],n):n((e=e||self).SimpleBlog={},e.polymerElement_js,e.HAXCMSThemeWiring_js,e.haxcmsSiteStore_js,e.mobx,e.renderStatus_js)}(this,function(e,n,t,o,i,r){"use strict";function l(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,n,t){return n&&l(e.prototype,n),t&&l(e,t),e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,n){return(c=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function p(e,n){return!n||"object"!=typeof n&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function u(e,n,t){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,n,t){var o=function(e,n){for(;!Object.prototype.hasOwnProperty.call(e,n)&&null!==(e=a(e)););return e}(e,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(t):i.value}})(e,n,t||e)}function b(){var e,n,t=(e=['\n      <style>\n        html,\n        body {\n          background-color: #fafafa;\n        }\n      </style>\n\n      <style>\n        :host {\n          display: block;\n          font-family: "Roboto", "Noto", sans-serif;\n          -webkit-font-smoothing: antialiased;\n          font-size: 14px;\n          background-color: #fafafa;\n          font-family: "Open Sans", "MundoSans", helvetica neue, Arial,\n            Helvetica, sans-serif;\n          margin: 0;\n          padding: 0;\n          text-rendering: optimizeLegibility;\n          -webkit-font-smoothing: antialiased;\n          -moz-font-feature-settings: "liga=1, dlig=1";\n          -ms-font-feature-settings: "liga", "dlig";\n          -webkit-font-feature-settings: "liga", "dlig";\n          -o-font-feature-settings: "liga", "dlig";\n          font-feature-settings: "liga", "dlig";\n        }\n        #backbutton {\n          position: fixed;\n          top: 0px;\n          left: 0px;\n          padding: 2px;\n          width: 40px;\n          height: 40px;\n          margin: 8px;\n          z-index: 1000;\n          color: black;\n          background-color: rgba(250, 250, 250, 0.5);\n          opacity: 0.5;\n          border-radius: 50%;\n          transition: all 0.6s linear;\n        }\n        #backbutton:focus,\n        #backbutton:hover {\n          opacity: 1;\n          color: white;\n          background-color: var(--haxcms-color, black);\n        }\n        iron-pages,\n        iron-pages section {\n          width: 100vw;\n          height: 100vh;\n        }\n        simple-blog-post {\n          transition: all 0.6s ease-in-out;\n          visibility: hidden;\n        }\n        :host([selected-page="0"]) simple-blog-post {\n          visibility: visible;\n          opacity: 0;\n          visibility: hidden;\n        }\n        :host([selected-page="1"]) simple-blog-post {\n          visibility: visible;\n          opacity: 1;\n        }\n        a,\n        a:active,\n        a:hover,\n        a:focus {\n          color: inherit;\n        }\n      </style>\n      <iron-pages selected="[[selectedPage]]">\n        <section>\n          <simple-blog-header></simple-blog-header>\n          <simple-blog-listing></simple-blog-listing>\n        </section>\n        <section>\n          <paper-icon-button\n            id="backbutton"\n            icon="icons:arrow-back"\n            on-click="_goBack"\n          ></paper-icon-button>\n          <paper-tooltip\n            for="backbutton"\n            position="right"\n            offset="14"\n            animation-delay="100"\n            >Back to listing\n          </paper-tooltip>\n          <simple-blog-post edit-mode="[[editMode]]"\n            ><slot></slot\n          ></simple-blog-post>\n          <simple-blog-footer id="footer"></simple-blog-footer>\n        </section>\n      </iron-pages>\n    '],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return b=function(){return t},t}var m=function(e){function l(){var e;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),e=p(this,a(l).call(this)),import("@lrnwebcomponents/simple-blog/lib/simple-blog-header.js"),import("@polymer/paper-icon-button/paper-icon-button.js"),import("@lrnwebcomponents/simple-blog/lib/simple-blog-footer.js"),e.__disposer=[],i.autorun(function(n){e.activeId=i.toJS(o.store.activeId),e.__disposer.push(n)}),i.autorun(function(n){e._locationChanged(o.store.location),e.__disposer.push(n)}),e}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&c(e,n)}(l,t.HAXCMSTheme(n.PolymerElement)),s(l,null,[{key:"tag",get:function(){return"simple-blog"}},{key:"template",get:function(){return n.html(b())}},{key:"properties",get:function(){var e=u(a(l),"properties",this);return e.selectedPage={type:Number,reflectToAttribute:!0,value:0},e}}]),s(l,[{key:"connectedCallback",value:function(){var e=this;u(a(l.prototype),"connectedCallback",this).call(this),r.afterNextRender(this,function(){e.contentContainer=e.shadowRoot.querySelector("simple-blog-post").$.contentcontainer})}},{key:"disconnectedCallback",value:function(){for(var e in u(a(l.prototype),"disconnectedCallback",this).call(this),this.__disposer)this.__disposer[e].dispose()}},{key:"_locationChanged",value:function(e){if(e&&void 0!==e.route){var n=e.route.name;"home"===n||"404"===n?this.selectedPage=0:(window.scrollTo({top:0,left:0}),this.selectedPage=1)}}},{key:"_goBack",value:function(e){var n=this,t=o.store.activeId;window.history.pushState(null,null,o.store.location.baseUrl),window.dispatchEvent(new PopStateEvent("popstate")),t?setTimeout(function(){var e=n.shadowRoot.querySelector("simple-blog-listing").shadowRoot.querySelector('simple-blog-overview[item-id="'+t+'"]');e&&(e.scrollIntoView(!0),e.focus())},100):window.scrollTo({top:0,left:0});var i=new CustomEvent("json-outline-schema-active-item-changed",{bubbles:!0,cancelable:!0,detail:{}});this.dispatchEvent(i),this.selectedPage=0}}]),l}();window.customElements.define(m.tag,m),e.SimpleBlog=m,Object.defineProperty(e,"__esModule",{value:!0})});
  //# sourceMappingURL=simple-blog.umd.js.map
  