x-postpress
Advanced tools
Comparing version 1.2.3 to 1.2.5
@@ -40,3 +40,3 @@ /** | ||
var precacheConfig = [["index.html","b03310b0134b6318494098315230132b"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","91b97e7c02bfefb41ad3909380572828"]]; | ||
var precacheConfig = [["index.html","b03310b0134b6318494098315230132b"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","f77b795177f5ef847ae0f77d2879a746"]]; | ||
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); | ||
@@ -43,0 +43,0 @@ |
@@ -1,1 +0,1 @@ | ||
define(["exports"],function(_exports){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.removeNodesFromTemplate=removeNodesFromTemplate;_exports.insertNodeIntoTemplate=insertNodeIntoTemplate;_exports.templateFactory$1=_exports.templateFactory=templateFactory;_exports.createMarker=_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=_exports.Template$1=_exports.Template=_exports.boundAttributeSuffix=_exports.markerRegex=_exports.nodeMarker=_exports.marker=_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=_exports.TemplateInstance$1=_exports.TemplateInstance=_exports.templateCaches$1=_exports.templateCaches=_exports.render$1=_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=_exports.render$2=_exports.render=_exports.parts$1=_exports.parts=_exports.EventPart$1=_exports.EventPart=_exports.PropertyPart$1=_exports.PropertyPart=_exports.PropertyCommitter$1=_exports.PropertyCommitter=_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=_exports.NodePart$1=_exports.NodePart=_exports.AttributePart$1=_exports.AttributePart=_exports.AttributeCommitter$1=_exports.AttributeCommitter=_exports.isPrimitive$1=_exports.isPrimitive=_exports.noChange$1=_exports.noChange=_exports.removeNodes$1=_exports.removeNodes=_exports.reparentNodes$1=_exports.reparentNodes=_exports.isCEPolyfill=_exports.isDirective$1=_exports.isDirective=_exports.directive$1=_exports.directive=_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=_exports.until=_exports.unsafeHTML=_exports.LitElement=_exports.svg$2=_exports.svg$1=_exports.svg=_exports.html$2=_exports.html$1=_exports.html=_exports.UpdatingElement$1=_exports.UpdatingElement=_exports.notEqual$1=_exports.notEqual=_exports.eventOptions$1=_exports.eventOptions=_exports.queryAll$1=_exports.queryAll=_exports.query$1=_exports.query=_exports.property$1=_exports.property=_exports.customElement$1=_exports.customElement=_exports.$misc=_exports.$xPostpress$1=_exports.$loading=_exports.$articles=_exports.$article=_exports.$litHtml=_exports.$template=_exports.$templateResult=_exports.$templateInstance=_exports.$templateFactory=_exports.$shadyRender=_exports.$render=_exports.$parts=_exports.$part=_exports.$modifyTemplate=_exports.$dom=_exports.$directive=_exports.$defaultTemplateProcessor=_exports.$until=_exports.$unsafeHtml=_exports.$litElement=_exports.$updatingElement=_exports.$decorators=void 0;_exports.getLink=_exports.formatDate=_exports.$xPostpressDefault=_exports.$loadingDefault=_exports.$articlesDefault=_exports.$articleDefault=_exports.lastAttributeNameRegex=_exports.createMarker$1=void 0;function _templateObject4_4b2a46300dee11e9931f27a1f1491b24(){var data=babelHelpers.taggedTemplateLiteral(["\n ","\n ","\n "]);_templateObject4_4b2a46300dee11e9931f27a1f1491b24=function _templateObject4_4b2a46300dee11e9931f27a1f1491b24(){return data};return data}function _templateObject3_4b2a46300dee11e9931f27a1f1491b24(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n a,\n a:link,\n a:visited {\n color: var(--a-color, #000);\n text-decoration: var(--a-text-decoration, none);\n }\n\n a:hover {\n text-decoration: var(--a-hover-text-decoration, underline);\n }\n\n article {\n clear: var(--article-clear, inherit);\n margin-bottom: var(--article-margin-bottom, 1rem);\n margin-left: var(--article-margin-left, auto);\n margin-right: var(--article-margin-right, auto);\n margin-top: var(--article-margin-top, 0);\n width: var(--article-width, 80%);\n }\n\n h2 {\n color: var(--h2-color, #333);\n font-size: var(--h2-font-size, smaller);\n }\n\n hr {\n clear: var(--hr-clear, both);\n display: var(--hr-display, block);\n }\n\n img {\n display: var(--img-display, inherit);\n float: var(--img-float, inherit);\n height: var(--img-height, auto);\n max-height: var(--img-max-height, inherit);\n max-width: var(--img-max-width, 100%);\n padding-bottom: var(--img-padding-bottom, inherit);\n padding-left: var(--img-padding-left, inherit);\n padding-right: var(--img-padding-right, inherit);\n padding-top: var(--img-padding-top, inherit);\n width: var(--img-width, auto);\n }\n\n p {\n clear: var(--p-clear, inherit);\n }\n </style>\n"]);_templateObject3_4b2a46300dee11e9931f27a1f1491b24=function _templateObject3_4b2a46300dee11e9931f27a1f1491b24(){return data};return data}function _templateObject2_4b2a46300dee11e9931f27a1f1491b24(){var data=babelHelpers.taggedTemplateLiteral(["\n <article>\n <h1><a href=\"","\">Loading...</a></h1>\n </article>\n"]);_templateObject2_4b2a46300dee11e9931f27a1f1491b24=function _templateObject2_4b2a46300dee11e9931f27a1f1491b24(){return data};return data}function _templateObject_4b2a46300dee11e9931f27a1f1491b24(){var data=babelHelpers.taggedTemplateLiteral(["\n <article>\n <h1>","</h1>\n <h2>","</h2>\n <p>","</p>\n <hr />\n </article>\n"]);_templateObject_4b2a46300dee11e9931f27a1f1491b24=function _templateObject_4b2a46300dee11e9931f27a1f1491b24(){return data};return data}var customElement=function customElement(tagName){return function(clazz){window.customElements.define(tagName,clazz);return clazz}};_exports.customElement$1=_exports.customElement=customElement;var property=function property(options){return function(proto,name){proto.constructor.createProperty(name,options)}};_exports.property$1=_exports.property=property;var query=_query(function(target,selector){return target.querySelector(selector)});_exports.query$1=_exports.query=query;var queryAll=_query(function(target,selector){return target.querySelectorAll(selector)});_exports.queryAll$1=_exports.queryAll=queryAll;function _query(queryFn){return function(selector){return function(proto,propName){Object.defineProperty(proto,propName,{get:function get(){return queryFn(this.renderRoot,selector)},enumerable:!0,configurable:!0})}}}var eventOptions=function eventOptions(options){return function(proto,name){Object.assign(proto[name],options)}};_exports.eventOptions$1=_exports.eventOptions=eventOptions;var decorators={customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions};_exports.$decorators=decorators;var fromBooleanAttribute=function fromBooleanAttribute(value){return null!==value},toBooleanAttribute=function toBooleanAttribute(value){return value?"":null},notEqual=function notEqual(value,old){return old!==value&&(old===old||value===value)};_exports.notEqual$1=_exports.notEqual=notEqual;var defaultPropertyDeclaration={attribute:!0,type:String,reflect:!1,hasChanged:notEqual},microtaskPromise=new Promise(function(resolve){return resolve(!0)}),STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=1<<2,STATE_IS_REFLECTING=1<<3,UpdatingElement=function(_HTMLElement){babelHelpers.inherits(UpdatingElement,_HTMLElement);function UpdatingElement(){var _this;babelHelpers.classCallCheck(this,UpdatingElement);_this=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(UpdatingElement).call(this));_this._updateState=0;_this._instanceProperties=void 0;_this._updatePromise=microtaskPromise;_this._changedProperties=new Map;_this._reflectingProperties=void 0;_this.initialize();return _this}babelHelpers.createClass(UpdatingElement,[{key:"initialize",value:function initialize(){this.renderRoot=this.createRenderRoot();this._saveInstanceProperties()}},{key:"_saveInstanceProperties",value:function _saveInstanceProperties(){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _iterator=this.constructor._classProperties[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _step$value=babelHelpers.slicedToArray(_step.value,1),p=_step$value[0];if(this.hasOwnProperty(p)){var value=this[p];delete this[p];if(!this._instanceProperties){this._instanceProperties=new Map}this._instanceProperties.set(p,value)}}}catch(err){_didIteratorError=!0;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&null!=_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}},{key:"_applyInstanceProperties",value:function _applyInstanceProperties(){var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _iterator2=this._instanceProperties[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var _step2$value=babelHelpers.slicedToArray(_step2.value,2),p=_step2$value[0],v=_step2$value[1];this[p]=v}}catch(err){_didIteratorError2=!0;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&null!=_iterator2.return){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}this._instanceProperties=void 0}},{key:"createRenderRoot",value:function createRenderRoot(){return this.attachShadow({mode:"open"})}},{key:"connectedCallback",value:function connectedCallback(){if(this._updateState&STATE_HAS_UPDATED){if(window.ShadyCSS!==void 0){window.ShadyCSS.styleElement(this)}}else{this.requestUpdate()}}},{key:"disconnectedCallback",value:function disconnectedCallback(){}},{key:"attributeChangedCallback",value:function attributeChangedCallback(name,old,value){if(old!==value){this._attributeToProperty(name,value)}}},{key:"_propertyToAttribute",value:function _propertyToAttribute(name,value){var options=2<arguments.length&&arguments[2]!==void 0?arguments[2]:defaultPropertyDeclaration,ctor=this.constructor,attrValue=ctor._propertyValueToAttribute(value,options);if(attrValue!==void 0){var attr=ctor._attributeNameForProperty(name,options);if(attr!==void 0){this._updateState=this._updateState|STATE_IS_REFLECTING;if(null===attrValue){this.removeAttribute(attr)}else{this.setAttribute(attr,attrValue)}this._updateState=this._updateState&~STATE_IS_REFLECTING}}}},{key:"_attributeToProperty",value:function _attributeToProperty(name,value){if(!(this._updateState&STATE_IS_REFLECTING)){var ctor=this.constructor,propName=ctor._attributeToPropertyMap.get(name);if(propName!==void 0){var options=ctor._classProperties.get(propName);this[propName]=ctor._propertyValueFromAttribute(value,options)}}}},{key:"requestUpdate",value:function requestUpdate(name,oldValue){if(name!==void 0){var options=this.constructor._classProperties.get(name)||defaultPropertyDeclaration;return this._requestPropertyUpdate(name,oldValue,options)}return this._invalidate()}},{key:"_requestPropertyUpdate",value:function _requestPropertyUpdate(name,oldValue,options){if(!this.constructor._valueHasChanged(this[name],oldValue,options.hasChanged)){return this.updateComplete}if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}if(!0===options.reflect){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}return this._invalidate()}},{key:"_invalidate",value:function(){var _invalidate2=babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee(){var resolver,previousValidatePromise;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(this._hasRequestedUpdate){_context.next=8;break}this._updateState=this._updateState|STATE_UPDATE_REQUESTED;previousValidatePromise=this._updatePromise;this._updatePromise=new Promise(function(r){return resolver=r});_context.next=6;return previousValidatePromise;case 6:this._validate();resolver(!this._hasRequestedUpdate);case 8:return _context.abrupt("return",this.updateComplete);case 9:case"end":return _context.stop();}}},_callee,this)}));function _invalidate(){return _invalidate2.apply(this,arguments)}return _invalidate}()},{key:"_validate",value:function _validate(){if(this._instanceProperties){this._applyInstanceProperties()}if(this.shouldUpdate(this._changedProperties)){var changedProperties=this._changedProperties;this.update(changedProperties);this._markUpdated();if(!(this._updateState&STATE_HAS_UPDATED)){this._updateState=this._updateState|STATE_HAS_UPDATED;this.firstUpdated(changedProperties)}this.updated(changedProperties)}else{this._markUpdated()}}},{key:"_markUpdated",value:function _markUpdated(){this._changedProperties=new Map;this._updateState=this._updateState&~STATE_UPDATE_REQUESTED}},{key:"shouldUpdate",value:function shouldUpdate(_changedProperties){return!0}},{key:"update",value:function update(_changedProperties){if(this._reflectingProperties!==void 0&&0<this._reflectingProperties.size){var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _iterator3=this._reflectingProperties[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var _step3$value=babelHelpers.slicedToArray(_step3.value,2),k=_step3$value[0],v=_step3$value[1];this._propertyToAttribute(k,this[k],v)}}catch(err){_didIteratorError3=!0;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&null!=_iterator3.return){_iterator3.return()}}finally{if(_didIteratorError3){throw _iteratorError3}}}this._reflectingProperties=void 0}}},{key:"updated",value:function updated(_changedProperties){}},{key:"firstUpdated",value:function firstUpdated(_changedProperties){}},{key:"_hasRequestedUpdate",get:function get(){return this._updateState&STATE_UPDATE_REQUESTED}},{key:"updateComplete",get:function get(){return this._updatePromise}}],[{key:"createProperty",value:function createProperty(name){var _this2=this,options=1<arguments.length&&arguments[1]!==void 0?arguments[1]:defaultPropertyDeclaration;if(!this.hasOwnProperty("_classProperties")){this._classProperties=new Map;var superProperties=Object.getPrototypeOf(this)._classProperties;if(superProperties!==void 0){superProperties.forEach(function(v,k){return _this2._classProperties.set(k,v)})}}this._classProperties.set(name,options);if(this.prototype.hasOwnProperty(name)){return}var key="symbol"===babelHelpers.typeof(name)?Symbol():"__".concat(name);Object.defineProperty(this.prototype,name,{get:function get(){return this[key]},set:function set(value){var oldValue=this[name];this[key]=value;this._requestPropertyUpdate(name,oldValue,options)},configurable:!0,enumerable:!0})}},{key:"_finalize",value:function _finalize(){if(this.hasOwnProperty("_finalized")&&this._finalized){return}var superCtor=Object.getPrototypeOf(this);if("function"===typeof superCtor._finalize){superCtor._finalize()}this._finalized=!0;this._attributeToPropertyMap=new Map;var props=this.properties,propKeys=[].concat(babelHelpers.toConsumableArray(Object.getOwnPropertyNames(props)),babelHelpers.toConsumableArray("function"===typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(props):[])),_iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _iterator4=propKeys[Symbol.iterator](),_step4,p;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0){p=_step4.value;this.createProperty(p,props[p])}}catch(err){_didIteratorError4=!0;_iteratorError4=err}finally{try{if(!_iteratorNormalCompletion4&&null!=_iterator4.return){_iterator4.return()}}finally{if(_didIteratorError4){throw _iteratorError4}}}}},{key:"_attributeNameForProperty",value:function _attributeNameForProperty(name,options){var attribute=options!==void 0&&options.attribute;return!1===attribute?void 0:"string"===typeof attribute?attribute:"string"===typeof name?name.toLowerCase():void 0}},{key:"_valueHasChanged",value:function _valueHasChanged(value,old){var hasChanged=2<arguments.length&&arguments[2]!==void 0?arguments[2]:notEqual;return hasChanged(value,old)}},{key:"_propertyValueFromAttribute",value:function _propertyValueFromAttribute(value,options){var type=options&&options.type;if(type===void 0){return value}var fromAttribute=type===Boolean?fromBooleanAttribute:"function"===typeof type?type:type.fromAttribute;return fromAttribute?fromAttribute(value):value}},{key:"_propertyValueToAttribute",value:function _propertyValueToAttribute(value,options){if(options===void 0||options.reflect===void 0){return}var toAttribute=options.type===Boolean?toBooleanAttribute:options.type&&options.type.toAttribute||String;return toAttribute(value)}},{key:"observedAttributes",get:function get(){this._finalize();var attributes=[],_iteratorNormalCompletion5=!0,_didIteratorError5=!1,_iteratorError5=void 0;try{for(var _iterator5=this._classProperties[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=!0){var _step5$value=babelHelpers.slicedToArray(_step5.value,2),p=_step5$value[0],v=_step5$value[1],attr=this._attributeNameForProperty(p,v);if(attr!==void 0){this._attributeToPropertyMap.set(attr,p);attributes.push(attr)}}}catch(err){_didIteratorError5=!0;_iteratorError5=err}finally{try{if(!_iteratorNormalCompletion5&&null!=_iterator5.return){_iterator5.return()}}finally{if(_didIteratorError5){throw _iteratorError5}}}return attributes}}]);return UpdatingElement}(babelHelpers.wrapNativeSuper(HTMLElement));_exports.UpdatingElement$1=_exports.UpdatingElement=UpdatingElement;UpdatingElement._attributeToPropertyMap=new Map;UpdatingElement._finalized=!0;UpdatingElement._classProperties=new Map;UpdatingElement.properties={};var updatingElement={notEqual:notEqual,UpdatingElement:UpdatingElement};_exports.$updatingElement=updatingElement;var directives=new WeakMap,directive=function directive(f){return function(){var d=f.apply(void 0,arguments);directives.set(d,!0);return d}};_exports.directive$1=_exports.directive=directive;var isDirective=function isDirective(o){return"function"===typeof o&&directives.has(o)};_exports.isDirective$1=_exports.isDirective=isDirective;var directive$1={directive:directive,isDirective:isDirective};_exports.$directive=directive$1;var isCEPolyfill=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0;_exports.isCEPolyfill=isCEPolyfill;var reparentNodes=function reparentNodes(container,start){var end=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,before=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null,node=start;while(node!==end){var n=node.nextSibling;container.insertBefore(node,before);node=n}};_exports.reparentNodes$1=_exports.reparentNodes=reparentNodes;var removeNodes=function removeNodes(container,startNode){var endNode=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,node=startNode;while(node!==endNode){var n=node.nextSibling;container.removeChild(node);node=n}};_exports.removeNodes$1=_exports.removeNodes=removeNodes;var dom={isCEPolyfill:isCEPolyfill,reparentNodes:reparentNodes,removeNodes:removeNodes};_exports.$dom=dom;var noChange={};_exports.noChange$1=_exports.noChange=noChange;var part={noChange:noChange};_exports.$part=part;var marker="{{lit-".concat((Math.random()+"").slice(2),"}}");_exports.marker=marker;var nodeMarker="<!--".concat(marker,"-->");_exports.nodeMarker=nodeMarker;var markerRegex=new RegExp("".concat(marker,"|").concat(nodeMarker));_exports.markerRegex=markerRegex;var boundAttributeSuffix="$lit$";_exports.boundAttributeSuffix=boundAttributeSuffix;var Template=function Template(result,element){var _this3=this;babelHelpers.classCallCheck(this,Template);this.parts=[];this.element=element;var index=-1,partIndex=0,nodesToRemove=[],_prepareTemplate=function _prepareTemplate(template){var content=template.content,walker=document.createTreeWalker(content,133,null,!1),previousNode,currentNode;while(walker.nextNode()){index++;previousNode=currentNode;var node=currentNode=walker.currentNode;if(1===node.nodeType){if(node.hasAttributes()){for(var attributes=node.attributes,count=0,i=0;i<attributes.length;i++){if(0<=attributes[i].value.indexOf(marker)){count++}}while(0<count--){var stringForPart=result.strings[partIndex],name=lastAttributeNameRegex.exec(stringForPart)[2],attributeLookupName=name.toLowerCase()+boundAttributeSuffix,attributeValue=node.getAttribute(attributeLookupName),strings=attributeValue.split(markerRegex);_this3.parts.push({type:"attribute",index:index,name:name,strings:strings});node.removeAttribute(attributeLookupName);partIndex+=strings.length-1}}if("TEMPLATE"===node.tagName){_prepareTemplate(node)}}else if(3===node.nodeType){var nodeValue=node.nodeValue;if(0>nodeValue.indexOf(marker)){continue}var parent=node.parentNode,_strings=nodeValue.split(markerRegex),lastIndex=_strings.length-1;partIndex+=lastIndex;for(var _i=0;_i<lastIndex;_i++){parent.insertBefore(""===_strings[_i]?createMarker():document.createTextNode(_strings[_i]),node);_this3.parts.push({type:"node",index:index++})}parent.insertBefore(""===_strings[lastIndex]?createMarker():document.createTextNode(_strings[lastIndex]),node);nodesToRemove.push(node)}else if(8===node.nodeType){if(node.nodeValue===marker){var _parent=node.parentNode,previousSibling=node.previousSibling;if(null===previousSibling||previousSibling!==previousNode||previousSibling.nodeType!==Node.TEXT_NODE){_parent.insertBefore(createMarker(),node)}else{index--}_this3.parts.push({type:"node",index:index++});nodesToRemove.push(node);if(null===node.nextSibling){_parent.insertBefore(createMarker(),node)}else{index--}currentNode=previousNode;partIndex++}else{var _i2=-1;while(-1!==(_i2=node.nodeValue.indexOf(marker,_i2+1))){_this3.parts.push({type:"node",index:-1})}}}}};_prepareTemplate(element);for(var _i3=0,n;_i3<nodesToRemove.length;_i3++){n=nodesToRemove[_i3];n.parentNode.removeChild(n)}};_exports.Template$1=_exports.Template=Template;var isTemplatePartActive=function isTemplatePartActive(part){return-1!==part.index};_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=isTemplatePartActive;var createMarker=function createMarker(){return document.createComment("")};_exports.createMarker$1=_exports.createMarker=createMarker;var lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;_exports.lastAttributeNameRegex=lastAttributeNameRegex;var template={marker:marker,nodeMarker:nodeMarker,markerRegex:markerRegex,boundAttributeSuffix:boundAttributeSuffix,Template:Template,isTemplatePartActive:isTemplatePartActive,createMarker:createMarker,lastAttributeNameRegex:lastAttributeNameRegex};_exports.$template=template;var TemplateInstance=function(){function TemplateInstance(template,processor,options){babelHelpers.classCallCheck(this,TemplateInstance);this._parts=[];this.template=template;this.processor=processor;this.options=options}babelHelpers.createClass(TemplateInstance,[{key:"update",value:function update(values){var i=0,_iteratorNormalCompletion6=!0,_didIteratorError6=!1,_iteratorError6=void 0;try{for(var _iterator6=this._parts[Symbol.iterator](),_step6,_part;!(_iteratorNormalCompletion6=(_step6=_iterator6.next()).done);_iteratorNormalCompletion6=!0){_part=_step6.value;if(_part!==void 0){_part.setValue(values[i])}i++}}catch(err){_didIteratorError6=!0;_iteratorError6=err}finally{try{if(!_iteratorNormalCompletion6&&null!=_iterator6.return){_iterator6.return()}}finally{if(_didIteratorError6){throw _iteratorError6}}}var _iteratorNormalCompletion7=!0,_didIteratorError7=!1,_iteratorError7=void 0;try{for(var _iterator7=this._parts[Symbol.iterator](),_step7,_part2;!(_iteratorNormalCompletion7=(_step7=_iterator7.next()).done);_iteratorNormalCompletion7=!0){_part2=_step7.value;if(_part2!==void 0){_part2.commit()}}}catch(err){_didIteratorError7=!0;_iteratorError7=err}finally{try{if(!_iteratorNormalCompletion7&&null!=_iterator7.return){_iterator7.return()}}finally{if(_didIteratorError7){throw _iteratorError7}}}}},{key:"_clone",value:function _clone(){var _this4=this,fragment=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),parts=this.template.parts,partIndex=0,nodeIndex=0,_prepareInstance=function _prepareInstance(fragment){var walker=document.createTreeWalker(fragment,133,null,!1),node=walker.nextNode();while(partIndex<parts.length&&null!==node){var _part3=parts[partIndex];if(!isTemplatePartActive(_part3)){_this4._parts.push(void 0);partIndex++}else if(nodeIndex===_part3.index){if("node"===_part3.type){var _part4=_this4.processor.handleTextExpression(_this4.options);_part4.insertAfterNode(node);_this4._parts.push(_part4)}else{var _this4$_parts;(_this4$_parts=_this4._parts).push.apply(_this4$_parts,babelHelpers.toConsumableArray(_this4.processor.handleAttributeExpressions(node,_part3.name,_part3.strings,_this4.options)))}partIndex++}else{nodeIndex++;if("TEMPLATE"===node.nodeName){_prepareInstance(node.content)}node=walker.nextNode()}}};_prepareInstance(fragment);if(isCEPolyfill){document.adoptNode(fragment);customElements.upgrade(fragment)}return fragment}}]);return TemplateInstance}();_exports.TemplateInstance$1=_exports.TemplateInstance=TemplateInstance;var templateInstance={TemplateInstance:TemplateInstance};_exports.$templateInstance=templateInstance;var TemplateResult=function(){function TemplateResult(strings,values,type,processor){babelHelpers.classCallCheck(this,TemplateResult);this.strings=strings;this.values=values;this.type=type;this.processor=processor}babelHelpers.createClass(TemplateResult,[{key:"getHTML",value:function getHTML(){for(var endIndex=this.strings.length-1,html="",i=0;i<endIndex;i++){var s=this.strings[i],addedMarker=!1;html+=s.replace(lastAttributeNameRegex,function(_match,whitespace,name,value){addedMarker=!0;return whitespace+name+boundAttributeSuffix+value+marker});if(!addedMarker){html+=nodeMarker}}return html+this.strings[endIndex]}},{key:"getTemplateElement",value:function getTemplateElement(){var template=document.createElement("template");template.innerHTML=this.getHTML();return template}}]);return TemplateResult}();_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=TemplateResult;var SVGTemplateResult=function(_TemplateResult){babelHelpers.inherits(SVGTemplateResult,_TemplateResult);function SVGTemplateResult(){babelHelpers.classCallCheck(this,SVGTemplateResult);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(SVGTemplateResult).apply(this,arguments))}babelHelpers.createClass(SVGTemplateResult,[{key:"getHTML",value:function getHTML(){return"<svg>".concat(babelHelpers.get(babelHelpers.getPrototypeOf(SVGTemplateResult.prototype),"getHTML",this).call(this),"</svg>")}},{key:"getTemplateElement",value:function getTemplateElement(){var template=babelHelpers.get(babelHelpers.getPrototypeOf(SVGTemplateResult.prototype),"getTemplateElement",this).call(this),content=template.content,svgElement=content.firstChild;content.removeChild(svgElement);reparentNodes(content,svgElement.firstChild);return template}}]);return SVGTemplateResult}(TemplateResult);_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=SVGTemplateResult;var templateResult={TemplateResult:TemplateResult,SVGTemplateResult:SVGTemplateResult};_exports.$templateResult=templateResult;var isPrimitive=function isPrimitive(value){return null===value||!("object"===babelHelpers.typeof(value)||"function"===typeof value)};_exports.isPrimitive$1=_exports.isPrimitive=isPrimitive;var AttributeCommitter=function(){function AttributeCommitter(element,name,strings){babelHelpers.classCallCheck(this,AttributeCommitter);this.dirty=!0;this.element=element;this.name=name;this.strings=strings;this.parts=[];for(var i=0;i<strings.length-1;i++){this.parts[i]=this._createPart()}}babelHelpers.createClass(AttributeCommitter,[{key:"_createPart",value:function _createPart(){return new AttributePart(this)}},{key:"_getValue",value:function _getValue(){for(var strings=this.strings,l=strings.length-1,text="",i=0;i<l;i++){text+=strings[i];var _part5=this.parts[i];if(_part5!==void 0){var v=_part5.value;if(null!=v&&(Array.isArray(v)||"string"!==typeof v&&v[Symbol.iterator])){var _iteratorNormalCompletion8=!0,_didIteratorError8=!1,_iteratorError8=void 0;try{for(var _iterator8=v[Symbol.iterator](),_step8,t;!(_iteratorNormalCompletion8=(_step8=_iterator8.next()).done);_iteratorNormalCompletion8=!0){t=_step8.value;text+="string"===typeof t?t:t+""}}catch(err){_didIteratorError8=!0;_iteratorError8=err}finally{try{if(!_iteratorNormalCompletion8&&null!=_iterator8.return){_iterator8.return()}}finally{if(_didIteratorError8){throw _iteratorError8}}}}else{text+="string"===typeof v?v:v+""}}}text+=strings[l];return text}},{key:"commit",value:function commit(){if(this.dirty){this.dirty=!1;this.element.setAttribute(this.name,this._getValue())}}}]);return AttributeCommitter}();_exports.AttributeCommitter$1=_exports.AttributeCommitter=AttributeCommitter;var AttributePart=function(){function AttributePart(comitter){babelHelpers.classCallCheck(this,AttributePart);this.value=void 0;this.committer=comitter}babelHelpers.createClass(AttributePart,[{key:"setValue",value:function setValue(value){if(value!==noChange&&(!isPrimitive(value)||value!==this.value)){this.value=value;if(!isDirective(value)){this.committer.dirty=!0}}}},{key:"commit",value:function commit(){while(isDirective(this.value)){var directive$$1=this.value;this.value=noChange;directive$$1(this)}if(this.value===noChange){return}this.committer.commit()}}]);return AttributePart}();_exports.AttributePart$1=_exports.AttributePart=AttributePart;var NodePart=function(){function NodePart(options){babelHelpers.classCallCheck(this,NodePart);this.value=void 0;this._pendingValue=void 0;this.options=options}babelHelpers.createClass(NodePart,[{key:"appendInto",value:function appendInto(container){this.startNode=container.appendChild(createMarker());this.endNode=container.appendChild(createMarker())}},{key:"insertAfterNode",value:function insertAfterNode(ref){this.startNode=ref;this.endNode=ref.nextSibling}},{key:"appendIntoPart",value:function appendIntoPart(part){part._insert(this.startNode=createMarker());part._insert(this.endNode=createMarker())}},{key:"insertAfterPart",value:function insertAfterPart(ref){ref._insert(this.startNode=createMarker());this.endNode=ref.endNode;ref.endNode=this.startNode}},{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}var value=this._pendingValue;if(value===noChange){return}if(isPrimitive(value)){if(value!==this.value){this._commitText(value)}}else if(babelHelpers.instanceof(value,TemplateResult)){this._commitTemplateResult(value)}else if(babelHelpers.instanceof(value,Node)){this._commitNode(value)}else if(Array.isArray(value)||value[Symbol.iterator]){this._commitIterable(value)}else{this._commitText(value)}}},{key:"_insert",value:function _insert(node){this.endNode.parentNode.insertBefore(node,this.endNode)}},{key:"_commitNode",value:function _commitNode(value){if(this.value===value){return}this.clear();this._insert(value);this.value=value}},{key:"_commitText",value:function _commitText(value){var node=this.startNode.nextSibling;value=null==value?"":value;if(node===this.endNode.previousSibling&&node.nodeType===Node.TEXT_NODE){node.textContent=value}else{this._commitNode(document.createTextNode("string"===typeof value?value:value+""))}this.value=value}},{key:"_commitTemplateResult",value:function _commitTemplateResult(value){var template=this.options.templateFactory(value);if(this.value&&this.value.template===template){this.value.update(value.values)}else{var instance=new TemplateInstance(template,value.processor,this.options),fragment=instance._clone();instance.update(value.values);this._commitNode(fragment);this.value=instance}}},{key:"_commitIterable",value:function _commitIterable(value){if(!Array.isArray(this.value)){this.value=[];this.clear()}var itemParts=this.value,partIndex=0,itemPart,_iteratorNormalCompletion9=!0,_didIteratorError9=!1,_iteratorError9=void 0;try{for(var _iterator9=value[Symbol.iterator](),_step9,item;!(_iteratorNormalCompletion9=(_step9=_iterator9.next()).done);_iteratorNormalCompletion9=!0){item=_step9.value;itemPart=itemParts[partIndex];if(itemPart===void 0){itemPart=new NodePart(this.options);itemParts.push(itemPart);if(0===partIndex){itemPart.appendIntoPart(this)}else{itemPart.insertAfterPart(itemParts[partIndex-1])}}itemPart.setValue(item);itemPart.commit();partIndex++}}catch(err){_didIteratorError9=!0;_iteratorError9=err}finally{try{if(!_iteratorNormalCompletion9&&null!=_iterator9.return){_iterator9.return()}}finally{if(_didIteratorError9){throw _iteratorError9}}}if(partIndex<itemParts.length){itemParts.length=partIndex;this.clear(itemPart&&itemPart.endNode)}}},{key:"clear",value:function clear(){var startNode=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this.startNode;removeNodes(this.startNode.parentNode,startNode.nextSibling,this.endNode)}}]);return NodePart}();_exports.NodePart$1=_exports.NodePart=NodePart;var BooleanAttributePart=function(){function BooleanAttributePart(element,name,strings){babelHelpers.classCallCheck(this,BooleanAttributePart);this.value=void 0;this._pendingValue=void 0;if(2!==strings.length||""!==strings[0]||""!==strings[1]){throw new Error("Boolean attributes can only contain a single expression")}this.element=element;this.name=name;this.strings=strings}babelHelpers.createClass(BooleanAttributePart,[{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}var value=!!this._pendingValue;if(this.value!==value){if(value){this.element.setAttribute(this.name,"")}else{this.element.removeAttribute(this.name)}}this.value=value;this._pendingValue=noChange}}]);return BooleanAttributePart}();_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=BooleanAttributePart;var PropertyCommitter=function(_AttributeCommitter){babelHelpers.inherits(PropertyCommitter,_AttributeCommitter);function PropertyCommitter(element,name,strings){var _this5;babelHelpers.classCallCheck(this,PropertyCommitter);_this5=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(PropertyCommitter).call(this,element,name,strings));_this5.single=2===strings.length&&""===strings[0]&&""===strings[1];return _this5}babelHelpers.createClass(PropertyCommitter,[{key:"_createPart",value:function _createPart(){return new PropertyPart(this)}},{key:"_getValue",value:function _getValue(){if(this.single){return this.parts[0].value}return babelHelpers.get(babelHelpers.getPrototypeOf(PropertyCommitter.prototype),"_getValue",this).call(this)}},{key:"commit",value:function commit(){if(this.dirty){this.dirty=!1;this.element[this.name]=this._getValue()}}}]);return PropertyCommitter}(AttributeCommitter);_exports.PropertyCommitter$1=_exports.PropertyCommitter=PropertyCommitter;var PropertyPart=function(_AttributePart){babelHelpers.inherits(PropertyPart,_AttributePart);function PropertyPart(){babelHelpers.classCallCheck(this,PropertyPart);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(PropertyPart).apply(this,arguments))}return PropertyPart}(AttributePart);_exports.PropertyPart$1=_exports.PropertyPart=PropertyPart;var eventOptionsSupported=!1;try{var options={get capture(){eventOptionsSupported=!0;return!1}};window.addEventListener("test",options,options);window.removeEventListener("test",options,options)}catch(_e){}var EventPart=function(){function EventPart(element,eventName,eventContext){var _this6=this;babelHelpers.classCallCheck(this,EventPart);this.value=void 0;this._pendingValue=void 0;this.element=element;this.eventName=eventName;this.eventContext=eventContext;this._boundHandleEvent=function(e){return _this6.handleEvent(e)}}babelHelpers.createClass(EventPart,[{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}var newListener=this._pendingValue,oldListener=this.value,shouldRemoveListener=null==newListener||null!=oldListener&&(newListener.capture!==oldListener.capture||newListener.once!==oldListener.once||newListener.passive!==oldListener.passive),shouldAddListener=null!=newListener&&(null==oldListener||shouldRemoveListener);if(shouldRemoveListener){this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options)}if(shouldAddListener){this._options=getOptions(newListener);this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)}this.value=newListener;this._pendingValue=noChange}},{key:"handleEvent",value:function handleEvent(event){if("function"===typeof this.value){this.value.call(this.eventContext||this.element,event)}else{this.value.handleEvent(event)}}}]);return EventPart}();_exports.EventPart$1=_exports.EventPart=EventPart;var getOptions=function getOptions(o){return o&&(eventOptionsSupported?{capture:o.capture,passive:o.passive,once:o.once}:o.capture)},parts={isPrimitive:isPrimitive,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,NodePart:NodePart,BooleanAttributePart:BooleanAttributePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,EventPart:EventPart};_exports.$parts=parts;var DefaultTemplateProcessor=function(){function DefaultTemplateProcessor(){babelHelpers.classCallCheck(this,DefaultTemplateProcessor)}babelHelpers.createClass(DefaultTemplateProcessor,[{key:"handleAttributeExpressions",value:function handleAttributeExpressions(element,name,strings,options){var prefix=name[0];if("."===prefix){var _comitter=new PropertyCommitter(element,name.slice(1),strings);return _comitter.parts}if("@"===prefix){return[new EventPart(element,name.slice(1),options.eventContext)]}if("?"===prefix){return[new BooleanAttributePart(element,name.slice(1),strings)]}var comitter=new AttributeCommitter(element,name,strings);return comitter.parts}},{key:"handleTextExpression",value:function handleTextExpression(options){return new NodePart(options)}}]);return DefaultTemplateProcessor}();_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=DefaultTemplateProcessor;var defaultTemplateProcessor=new DefaultTemplateProcessor;_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=defaultTemplateProcessor;var defaultTemplateProcessor$1={DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor};_exports.$defaultTemplateProcessor=defaultTemplateProcessor$1;function templateFactory(result){var templateCache=templateCaches.get(result.type);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(result.type,templateCache)}var template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}var key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){template=new Template(result,result.getTemplateElement());templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}var templateCaches=new Map;_exports.templateCaches$1=_exports.templateCaches=templateCaches;var templateFactory$1={templateFactory:templateFactory,templateCaches:templateCaches};_exports.$templateFactory=templateFactory$1;var parts$1=new WeakMap;_exports.parts$1=_exports.parts=parts$1;var render=function render(result,container,options){var part=parts$1.get(container);if(part===void 0){removeNodes(container,container.firstChild);parts$1.set(container,part=new NodePart(Object.assign({templateFactory:templateFactory},options)));part.appendInto(container)}part.setValue(result);part.commit()};_exports.render$2=_exports.render=render;var render$1={parts:parts$1,render:render};_exports.$render=render$1;var html=function html(strings){for(var _len=arguments.length,values=Array(1<_len?_len-1:0),_key=1;_key<_len;_key++){values[_key-1]=arguments[_key]}return new TemplateResult(strings,values,"html",defaultTemplateProcessor)};_exports.html$2=_exports.html$1=_exports.html=html;var svg=function svg(strings){for(var _len2=arguments.length,values=Array(1<_len2?_len2-1:0),_key2=1;_key2<_len2;_key2++){values[_key2-1]=arguments[_key2]}return new SVGTemplateResult(strings,values,"svg",defaultTemplateProcessor)};_exports.svg$2=_exports.svg$1=_exports.svg=svg;var litHtml={html:html,svg:svg,DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor,directive:directive,isDirective:isDirective,removeNodes:removeNodes,reparentNodes:reparentNodes,noChange:noChange,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,BooleanAttributePart:BooleanAttributePart,EventPart:EventPart,isPrimitive:isPrimitive,NodePart:NodePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,parts:parts$1,render:render,templateCaches:templateCaches,templateFactory:templateFactory,TemplateInstance:TemplateInstance,SVGTemplateResult:SVGTemplateResult,TemplateResult:TemplateResult,createMarker:createMarker,isTemplatePartActive:isTemplatePartActive,Template:Template};_exports.$litHtml=litHtml;var walkerNodeFilter=NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT;function removeNodesFromTemplate(template,nodesToRemove){var content=template.element.content,parts=template.parts,walker=document.createTreeWalker(content,walkerNodeFilter,null,!1),partIndex=nextActiveIndexInTemplateParts(parts),part=parts[partIndex],nodeIndex=-1,removeCount=0,nodesToRemoveInTemplate=[],currentRemovingNode=null;while(walker.nextNode()){nodeIndex++;var node=walker.currentNode;if(node.previousSibling===currentRemovingNode){currentRemovingNode=null}if(nodesToRemove.has(node)){nodesToRemoveInTemplate.push(node);if(null===currentRemovingNode){currentRemovingNode=node}}if(null!==currentRemovingNode){removeCount++}while(part!==void 0&&part.index===nodeIndex){part.index=null!==currentRemovingNode?-1:part.index-removeCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex);part=parts[partIndex]}}nodesToRemoveInTemplate.forEach(function(n){return n.parentNode.removeChild(n)})}var countNodes=function countNodes(node){var count=node.nodeType===Node.DOCUMENT_FRAGMENT_NODE?0:1,walker=document.createTreeWalker(node,walkerNodeFilter,null,!1);while(walker.nextNode()){count++}return count},nextActiveIndexInTemplateParts=function nextActiveIndexInTemplateParts(parts){for(var startIndex=1<arguments.length&&arguments[1]!==void 0?arguments[1]:-1,i=startIndex+1,_part6;i<parts.length;i++){_part6=parts[i];if(isTemplatePartActive(_part6)){return i}}return-1};function insertNodeIntoTemplate(template,node){var refNode=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,content=template.element.content,parts=template.parts;if(null===refNode||refNode===void 0){content.appendChild(node);return}var walker=document.createTreeWalker(content,walkerNodeFilter,null,!1),partIndex=nextActiveIndexInTemplateParts(parts),insertCount=0,walkerIndex=-1;while(walker.nextNode()){walkerIndex++;var walkerNode=walker.currentNode;if(walkerNode===refNode){insertCount=countNodes(node);refNode.parentNode.insertBefore(node,refNode)}while(-1!==partIndex&&parts[partIndex].index===walkerIndex){if(0<insertCount){while(-1!==partIndex){parts[partIndex].index+=insertCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}return}partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}}}var modifyTemplate={removeNodesFromTemplate:removeNodesFromTemplate,insertNodeIntoTemplate:insertNodeIntoTemplate};_exports.$modifyTemplate=modifyTemplate;var getTemplateCacheKey=function getTemplateCacheKey(type,scopeName){return"".concat(type,"--").concat(scopeName)},compatibleShadyCSSVersion=!0;if("undefined"===typeof window.ShadyCSS){compatibleShadyCSSVersion=!1}else if("undefined"===typeof window.ShadyCSS.prepareTemplateDom){console.warn("Incompatible ShadyCSS version detected."+"Please update to at least @webcomponents/webcomponentsjs@2.0.2 and"+"@webcomponents/shadycss@1.3.1.");compatibleShadyCSSVersion=!1}var shadyTemplateFactory=function shadyTemplateFactory(scopeName){return function(result){var cacheKey=getTemplateCacheKey(result.type,scopeName),templateCache=templateCaches.get(cacheKey);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(cacheKey,templateCache)}var template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}var key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){var element=result.getTemplateElement();if(compatibleShadyCSSVersion){window.ShadyCSS.prepareTemplateDom(element,scopeName)}template=new Template(result,element);templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=function removeStylesFromLitTemplates(scopeName){TEMPLATE_TYPES.forEach(function(type){var templates=templateCaches.get(getTemplateCacheKey(type,scopeName));if(templates!==void 0){templates.keyString.forEach(function(template){var content=template.element.content,styles=new Set;Array.from(content.querySelectorAll("style")).forEach(function(s){styles.add(s)});removeNodesFromTemplate(template,styles)})}})},shadyRenderSet=new Set,prepareTemplateStyles=function prepareTemplateStyles(renderedDOM,template,scopeName){shadyRenderSet.add(scopeName);var styles=renderedDOM.querySelectorAll("style");if(0===styles.length){return}for(var condensedStyle=document.createElement("style"),i=0,style;i<styles.length;i++){style=styles[i];style.parentNode.removeChild(style);condensedStyle.textContent+=style.textContent}removeStylesFromLitTemplates(scopeName);insertNodeIntoTemplate(template,condensedStyle,template.element.content.firstChild);window.ShadyCSS.prepareTemplateStyles(template.element,scopeName);if(window.ShadyCSS.nativeShadow){var _style=template.element.content.querySelector("style");renderedDOM.insertBefore(_style.cloneNode(!0),renderedDOM.firstChild)}else{template.element.content.insertBefore(condensedStyle,template.element.content.firstChild);var removes=new Set([condensedStyle]);removeNodesFromTemplate(template,removes)}},render$2=function render$2(result,container,options){var scopeName=options.scopeName,hasRendered=parts$1.has(container),needsScoping=babelHelpers.instanceof(container,ShadowRoot)&&compatibleShadyCSSVersion&&babelHelpers.instanceof(result,TemplateResult),firstScopeRender=needsScoping&&!shadyRenderSet.has(scopeName),renderContainer=firstScopeRender?document.createDocumentFragment():container;render(result,renderContainer,Object.assign({templateFactory:shadyTemplateFactory(scopeName)},options));if(firstScopeRender){var _part7=parts$1.get(renderContainer);parts$1.delete(renderContainer);if(babelHelpers.instanceof(_part7.value,TemplateInstance)){prepareTemplateStyles(renderContainer,_part7.value.template,scopeName)}removeNodes(container,container.firstChild);container.appendChild(renderContainer);parts$1.set(container,_part7)}if(!hasRendered&&needsScoping){window.ShadyCSS.styleElement(container.host)}};_exports.render$1=render$2;var shadyRender={render:render$2,html:html,svg:svg,TemplateResult:TemplateResult};_exports.$shadyRender=shadyRender;var LitElement=function(_UpdatingElement){babelHelpers.inherits(LitElement,_UpdatingElement);function LitElement(){babelHelpers.classCallCheck(this,LitElement);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(LitElement).apply(this,arguments))}babelHelpers.createClass(LitElement,[{key:"update",value:function update(changedProperties){babelHelpers.get(babelHelpers.getPrototypeOf(LitElement.prototype),"update",this).call(this,changedProperties);var templateResult=this.render();if(babelHelpers.instanceof(templateResult,TemplateResult)){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}}},{key:"render",value:function render(){}}]);return LitElement}(UpdatingElement);_exports.LitElement=LitElement;LitElement.render=render$2;var litElement={LitElement:LitElement,notEqual:notEqual,UpdatingElement:UpdatingElement,customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions,html:html,svg:svg};_exports.$litElement=litElement;var previousValues=new WeakMap,unsafeHTML=directive(function(value){return function(part){if(!babelHelpers.instanceof(part,NodePart)){throw new Error("unsafeHTML can only be used in text bindings")}var previousValue=previousValues.get(part);if(previousValue===value&&isPrimitive(value)){return}var tmp=document.createElement("template");tmp.innerHTML=value;part.setValue(document.importNode(tmp.content,!0));previousValues.set(part,value)}});_exports.unsafeHTML=unsafeHTML;var unsafeHtml={unsafeHTML:unsafeHTML};_exports.$unsafeHtml=unsafeHtml;var _state=new WeakMap,until=directive(function(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3]}return function(part){var state=_state.get(part);if(state===void 0){state={values:[]};_state.set(part,state)}var previousValues=state.values,changedSinceLastRender=!1;state.values=args;var _loop2=function _loop2(i){var value=args[i];if(value===previousValues[i]&&!changedSinceLastRender){return"continue"}changedSinceLastRender=!0;if(isPrimitive(value)||"function"!==typeof value.then){part.setValue(value);state.lastRenderedIndex=i;return"break"}state.lastRenderedIndex=void 0;Promise.resolve(value).then(function(resolvedValue){var index=state.values.indexOf(value);if(-1<index&&(state.lastRenderedIndex===void 0||index<state.lastRenderedIndex)){state.lastRenderedIndex=index;part.setValue(resolvedValue);part.commit()}})};_loop:for(var i=0,_ret;i<args.length;i++){_ret=_loop2(i);switch(_ret){case"continue":continue;case"break":break _loop;}}}});_exports.until=until;var until$1={until:until};_exports.$until=until$1;var formatDate=function formatDate(timestring){var pad=function pad(v){return 10>v?"0".concat(v):v},dateString=timestring.split("T")[0],date=new Date(dateString),weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][date.getUTCDay()],day=pad(date.getUTCDate()),month=["January","February","March","April","May","June","July","August","September","October","November","December"][date.getUTCMonth()],year=date.getUTCFullYear();return"".concat(weekday,", ").concat(day," ").concat(month," ").concat(year)};_exports.formatDate=formatDate;var getLink=function getLink(link){return link?link.replace("content.",""):""};_exports.getLink=getLink;var misc={formatDate:formatDate,getLink:getLink};_exports.$misc=misc;var article=function article(_ref){var content=_ref.content,date_gmt=_ref.date_gmt,errorMessage=_ref.errorMessage,link=_ref.link,title=_ref.title;return html(_templateObject_4b2a46300dee11e9931f27a1f1491b24(),unsafeHTML("<a href=\"".concat(getLink(link),"\">").concat(title.rendered,"</a>")),errorMessage?errorMessage:formatDate(date_gmt),unsafeHTML(content.rendered))};_exports.$articleDefault=article;var article$1={default:article};_exports.$article=article$1;var articles=function articles(_ref2){var apiUrl=_ref2.apiUrl,siteUrl=_ref2.siteUrl;return new Promise(function(resolve,reject){return fetch(apiUrl).then(function(res){if(res.ok){return res.json().then(function(json){return json.map(function(res){return article(res)})})}throw new Error("status: ".concat(res.status).concat(res.statusText?" | statusText: ".concat(res.statusText):""))}).then(function(response){return resolve(response)}).catch(function(err){return reject(err)})}).catch(function(err){return article({errorMessage:"".concat(apiUrl?"":"Missing required attribute: apiUrl. ").concat(err.message),date_gmt:"",link:siteUrl,title:{rendered:"Error"},content:{rendered:"<p>Posts are unavailable. Please check the error and try again.</p>"}})})};_exports.$articlesDefault=articles;var articles$1={default:articles};_exports.$articles=articles$1;var loading=html(_templateObject2_4b2a46300dee11e9931f27a1f1491b24(),getLink());_exports.$loadingDefault=loading;var loading$1={default:loading};_exports.$loading=loading$1;var styles=html(_templateObject3_4b2a46300dee11e9931f27a1f1491b24());_exports.$xPostpressDefault=styles;var xPostpress={default:styles};_exports.$xPostpress$1=xPostpress;var xPostpress$1=function(_LitElement){babelHelpers.inherits(xPostpress$1,_LitElement);babelHelpers.createClass(xPostpress$1,null,[{key:"properties",get:function get(){return{apiUrl:{type:String},siteUrl:{type:String}}}}]);function xPostpress$1(){babelHelpers.classCallCheck(this,xPostpress$1);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(xPostpress$1).call(this))}babelHelpers.createClass(xPostpress$1,[{key:"render",value:function render(){return html(_templateObject4_4b2a46300dee11e9931f27a1f1491b24(),styles,until(articles({apiUrl:this.apiUrl,siteUrl:this.siteUrl}),loading))}}]);return xPostpress$1}(LitElement);window.customElements.define("x-postpress",xPostpress$1)}); | ||
define(["exports"],function(_exports){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.removeNodesFromTemplate=removeNodesFromTemplate;_exports.insertNodeIntoTemplate=insertNodeIntoTemplate;_exports.templateFactory$1=_exports.templateFactory=templateFactory;_exports.createMarker=_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=_exports.Template$1=_exports.Template=_exports.boundAttributeSuffix=_exports.markerRegex=_exports.nodeMarker=_exports.marker=_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=_exports.TemplateInstance$1=_exports.TemplateInstance=_exports.templateCaches$1=_exports.templateCaches=_exports.render$1=_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=_exports.render$2=_exports.render=_exports.parts$1=_exports.parts=_exports.EventPart$1=_exports.EventPart=_exports.PropertyPart$1=_exports.PropertyPart=_exports.PropertyCommitter$1=_exports.PropertyCommitter=_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=_exports.NodePart$1=_exports.NodePart=_exports.AttributePart$1=_exports.AttributePart=_exports.AttributeCommitter$1=_exports.AttributeCommitter=_exports.isPrimitive$1=_exports.isPrimitive=_exports.noChange$1=_exports.noChange=_exports.removeNodes$1=_exports.removeNodes=_exports.reparentNodes$1=_exports.reparentNodes=_exports.isCEPolyfill=_exports.isDirective$1=_exports.isDirective=_exports.directive$1=_exports.directive=_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=_exports.until=_exports.unsafeHTML=_exports.LitElement=_exports.svg$2=_exports.svg$1=_exports.svg=_exports.html$2=_exports.html$1=_exports.html=_exports.UpdatingElement$1=_exports.UpdatingElement=_exports.notEqual$1=_exports.notEqual=_exports.eventOptions$1=_exports.eventOptions=_exports.queryAll$1=_exports.queryAll=_exports.query$1=_exports.query=_exports.property$1=_exports.property=_exports.customElement$1=_exports.customElement=_exports.$misc=_exports.$xPostpress$1=_exports.$loading=_exports.$articles=_exports.$article=_exports.$litHtml=_exports.$template=_exports.$templateResult=_exports.$templateInstance=_exports.$templateFactory=_exports.$shadyRender=_exports.$render=_exports.$parts=_exports.$part=_exports.$modifyTemplate=_exports.$dom=_exports.$directive=_exports.$defaultTemplateProcessor=_exports.$until=_exports.$unsafeHtml=_exports.$litElement=_exports.$updatingElement=_exports.$decorators=void 0;_exports.getLink=_exports.formatDate=_exports.$xPostpressDefault=_exports.$loadingDefault=_exports.$articlesDefault=_exports.$articleDefault=_exports.lastAttributeNameRegex=_exports.createMarker$1=void 0;function _templateObject4_f7405cc00e2511e9b89247ff218efe65(){var data=babelHelpers.taggedTemplateLiteral(["\n ","\n ","\n "]);_templateObject4_f7405cc00e2511e9b89247ff218efe65=function _templateObject4_f7405cc00e2511e9b89247ff218efe65(){return data};return data}function _templateObject3_f7405cc00e2511e9b89247ff218efe65(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n a,\n a:link,\n a:visited {\n color: var(--a-color, #000);\n text-decoration: var(--a-text-decoration, none);\n }\n\n a:hover {\n text-decoration: var(--a-hover-text-decoration, underline);\n }\n\n article {\n clear: var(--article-clear, inherit);\n margin-bottom: var(--article-margin-bottom, 1rem);\n margin-left: var(--article-margin-left, auto);\n margin-right: var(--article-margin-right, auto);\n margin-top: var(--article-margin-top, 0);\n width: var(--article-width, 80%);\n }\n\n h2 {\n color: var(--h2-color, #333);\n font-size: var(--h2-font-size, smaller);\n }\n\n hr {\n clear: var(--hr-clear, both);\n display: var(--hr-display, block);\n }\n\n img {\n display: var(--img-display, inherit);\n float: var(--img-float, inherit);\n height: var(--img-height, auto);\n max-height: var(--img-max-height, inherit);\n max-width: var(--img-max-width, 100%);\n padding-bottom: var(--img-padding-bottom, inherit);\n padding-left: var(--img-padding-left, inherit);\n padding-right: var(--img-padding-right, inherit);\n padding-top: var(--img-padding-top, inherit);\n width: var(--img-width, auto);\n }\n\n ul {\n list-style-type: var(--ul-list-style-type, inherit);\n }\n\n p {\n clear: var(--p-clear, inherit);\n text-align: var(--p-text-align, inherit);\n }\n </style>\n"]);_templateObject3_f7405cc00e2511e9b89247ff218efe65=function _templateObject3_f7405cc00e2511e9b89247ff218efe65(){return data};return data}function _templateObject2_f7405cc00e2511e9b89247ff218efe65(){var data=babelHelpers.taggedTemplateLiteral(["\n <article>\n <h1><a href=\"","\">Loading...</a></h1>\n </article>\n"]);_templateObject2_f7405cc00e2511e9b89247ff218efe65=function _templateObject2_f7405cc00e2511e9b89247ff218efe65(){return data};return data}function _templateObject_f7405cc00e2511e9b89247ff218efe65(){var data=babelHelpers.taggedTemplateLiteral(["\n <article>\n <h1>","</h1>\n <h2>","</h2>\n <p>","</p>\n <hr />\n </article>\n"]);_templateObject_f7405cc00e2511e9b89247ff218efe65=function _templateObject_f7405cc00e2511e9b89247ff218efe65(){return data};return data}var customElement=function customElement(tagName){return function(clazz){window.customElements.define(tagName,clazz);return clazz}};_exports.customElement$1=_exports.customElement=customElement;var property=function property(options){return function(proto,name){proto.constructor.createProperty(name,options)}};_exports.property$1=_exports.property=property;var query=_query(function(target,selector){return target.querySelector(selector)});_exports.query$1=_exports.query=query;var queryAll=_query(function(target,selector){return target.querySelectorAll(selector)});_exports.queryAll$1=_exports.queryAll=queryAll;function _query(queryFn){return function(selector){return function(proto,propName){Object.defineProperty(proto,propName,{get:function get(){return queryFn(this.renderRoot,selector)},enumerable:!0,configurable:!0})}}}var eventOptions=function eventOptions(options){return function(proto,name){Object.assign(proto[name],options)}};_exports.eventOptions$1=_exports.eventOptions=eventOptions;var decorators={customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions};_exports.$decorators=decorators;var fromBooleanAttribute=function fromBooleanAttribute(value){return null!==value},toBooleanAttribute=function toBooleanAttribute(value){return value?"":null},notEqual=function notEqual(value,old){return old!==value&&(old===old||value===value)};_exports.notEqual$1=_exports.notEqual=notEqual;var defaultPropertyDeclaration={attribute:!0,type:String,reflect:!1,hasChanged:notEqual},microtaskPromise=new Promise(function(resolve){return resolve(!0)}),STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=1<<2,STATE_IS_REFLECTING=1<<3,UpdatingElement=function(_HTMLElement){babelHelpers.inherits(UpdatingElement,_HTMLElement);function UpdatingElement(){var _this;babelHelpers.classCallCheck(this,UpdatingElement);_this=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(UpdatingElement).call(this));_this._updateState=0;_this._instanceProperties=void 0;_this._updatePromise=microtaskPromise;_this._changedProperties=new Map;_this._reflectingProperties=void 0;_this.initialize();return _this}babelHelpers.createClass(UpdatingElement,[{key:"initialize",value:function initialize(){this.renderRoot=this.createRenderRoot();this._saveInstanceProperties()}},{key:"_saveInstanceProperties",value:function _saveInstanceProperties(){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _iterator=this.constructor._classProperties[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _step$value=babelHelpers.slicedToArray(_step.value,1),p=_step$value[0];if(this.hasOwnProperty(p)){var value=this[p];delete this[p];if(!this._instanceProperties){this._instanceProperties=new Map}this._instanceProperties.set(p,value)}}}catch(err){_didIteratorError=!0;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&null!=_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}},{key:"_applyInstanceProperties",value:function _applyInstanceProperties(){var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _iterator2=this._instanceProperties[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var _step2$value=babelHelpers.slicedToArray(_step2.value,2),p=_step2$value[0],v=_step2$value[1];this[p]=v}}catch(err){_didIteratorError2=!0;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&null!=_iterator2.return){_iterator2.return()}}finally{if(_didIteratorError2){throw _iteratorError2}}}this._instanceProperties=void 0}},{key:"createRenderRoot",value:function createRenderRoot(){return this.attachShadow({mode:"open"})}},{key:"connectedCallback",value:function connectedCallback(){if(this._updateState&STATE_HAS_UPDATED){if(window.ShadyCSS!==void 0){window.ShadyCSS.styleElement(this)}}else{this.requestUpdate()}}},{key:"disconnectedCallback",value:function disconnectedCallback(){}},{key:"attributeChangedCallback",value:function attributeChangedCallback(name,old,value){if(old!==value){this._attributeToProperty(name,value)}}},{key:"_propertyToAttribute",value:function _propertyToAttribute(name,value){var options=2<arguments.length&&arguments[2]!==void 0?arguments[2]:defaultPropertyDeclaration,ctor=this.constructor,attrValue=ctor._propertyValueToAttribute(value,options);if(attrValue!==void 0){var attr=ctor._attributeNameForProperty(name,options);if(attr!==void 0){this._updateState=this._updateState|STATE_IS_REFLECTING;if(null===attrValue){this.removeAttribute(attr)}else{this.setAttribute(attr,attrValue)}this._updateState=this._updateState&~STATE_IS_REFLECTING}}}},{key:"_attributeToProperty",value:function _attributeToProperty(name,value){if(!(this._updateState&STATE_IS_REFLECTING)){var ctor=this.constructor,propName=ctor._attributeToPropertyMap.get(name);if(propName!==void 0){var options=ctor._classProperties.get(propName);this[propName]=ctor._propertyValueFromAttribute(value,options)}}}},{key:"requestUpdate",value:function requestUpdate(name,oldValue){if(name!==void 0){var options=this.constructor._classProperties.get(name)||defaultPropertyDeclaration;return this._requestPropertyUpdate(name,oldValue,options)}return this._invalidate()}},{key:"_requestPropertyUpdate",value:function _requestPropertyUpdate(name,oldValue,options){if(!this.constructor._valueHasChanged(this[name],oldValue,options.hasChanged)){return this.updateComplete}if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}if(!0===options.reflect){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}return this._invalidate()}},{key:"_invalidate",value:function(){var _invalidate2=babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee(){var resolver,previousValidatePromise;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(this._hasRequestedUpdate){_context.next=8;break}this._updateState=this._updateState|STATE_UPDATE_REQUESTED;previousValidatePromise=this._updatePromise;this._updatePromise=new Promise(function(r){return resolver=r});_context.next=6;return previousValidatePromise;case 6:this._validate();resolver(!this._hasRequestedUpdate);case 8:return _context.abrupt("return",this.updateComplete);case 9:case"end":return _context.stop();}}},_callee,this)}));function _invalidate(){return _invalidate2.apply(this,arguments)}return _invalidate}()},{key:"_validate",value:function _validate(){if(this._instanceProperties){this._applyInstanceProperties()}if(this.shouldUpdate(this._changedProperties)){var changedProperties=this._changedProperties;this.update(changedProperties);this._markUpdated();if(!(this._updateState&STATE_HAS_UPDATED)){this._updateState=this._updateState|STATE_HAS_UPDATED;this.firstUpdated(changedProperties)}this.updated(changedProperties)}else{this._markUpdated()}}},{key:"_markUpdated",value:function _markUpdated(){this._changedProperties=new Map;this._updateState=this._updateState&~STATE_UPDATE_REQUESTED}},{key:"shouldUpdate",value:function shouldUpdate(_changedProperties){return!0}},{key:"update",value:function update(_changedProperties){if(this._reflectingProperties!==void 0&&0<this._reflectingProperties.size){var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _iterator3=this._reflectingProperties[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var _step3$value=babelHelpers.slicedToArray(_step3.value,2),k=_step3$value[0],v=_step3$value[1];this._propertyToAttribute(k,this[k],v)}}catch(err){_didIteratorError3=!0;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&null!=_iterator3.return){_iterator3.return()}}finally{if(_didIteratorError3){throw _iteratorError3}}}this._reflectingProperties=void 0}}},{key:"updated",value:function updated(_changedProperties){}},{key:"firstUpdated",value:function firstUpdated(_changedProperties){}},{key:"_hasRequestedUpdate",get:function get(){return this._updateState&STATE_UPDATE_REQUESTED}},{key:"updateComplete",get:function get(){return this._updatePromise}}],[{key:"createProperty",value:function createProperty(name){var _this2=this,options=1<arguments.length&&arguments[1]!==void 0?arguments[1]:defaultPropertyDeclaration;if(!this.hasOwnProperty("_classProperties")){this._classProperties=new Map;var superProperties=Object.getPrototypeOf(this)._classProperties;if(superProperties!==void 0){superProperties.forEach(function(v,k){return _this2._classProperties.set(k,v)})}}this._classProperties.set(name,options);if(this.prototype.hasOwnProperty(name)){return}var key="symbol"===babelHelpers.typeof(name)?Symbol():"__".concat(name);Object.defineProperty(this.prototype,name,{get:function get(){return this[key]},set:function set(value){var oldValue=this[name];this[key]=value;this._requestPropertyUpdate(name,oldValue,options)},configurable:!0,enumerable:!0})}},{key:"_finalize",value:function _finalize(){if(this.hasOwnProperty("_finalized")&&this._finalized){return}var superCtor=Object.getPrototypeOf(this);if("function"===typeof superCtor._finalize){superCtor._finalize()}this._finalized=!0;this._attributeToPropertyMap=new Map;var props=this.properties,propKeys=[].concat(babelHelpers.toConsumableArray(Object.getOwnPropertyNames(props)),babelHelpers.toConsumableArray("function"===typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(props):[])),_iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _iterator4=propKeys[Symbol.iterator](),_step4,p;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0){p=_step4.value;this.createProperty(p,props[p])}}catch(err){_didIteratorError4=!0;_iteratorError4=err}finally{try{if(!_iteratorNormalCompletion4&&null!=_iterator4.return){_iterator4.return()}}finally{if(_didIteratorError4){throw _iteratorError4}}}}},{key:"_attributeNameForProperty",value:function _attributeNameForProperty(name,options){var attribute=options!==void 0&&options.attribute;return!1===attribute?void 0:"string"===typeof attribute?attribute:"string"===typeof name?name.toLowerCase():void 0}},{key:"_valueHasChanged",value:function _valueHasChanged(value,old){var hasChanged=2<arguments.length&&arguments[2]!==void 0?arguments[2]:notEqual;return hasChanged(value,old)}},{key:"_propertyValueFromAttribute",value:function _propertyValueFromAttribute(value,options){var type=options&&options.type;if(type===void 0){return value}var fromAttribute=type===Boolean?fromBooleanAttribute:"function"===typeof type?type:type.fromAttribute;return fromAttribute?fromAttribute(value):value}},{key:"_propertyValueToAttribute",value:function _propertyValueToAttribute(value,options){if(options===void 0||options.reflect===void 0){return}var toAttribute=options.type===Boolean?toBooleanAttribute:options.type&&options.type.toAttribute||String;return toAttribute(value)}},{key:"observedAttributes",get:function get(){this._finalize();var attributes=[],_iteratorNormalCompletion5=!0,_didIteratorError5=!1,_iteratorError5=void 0;try{for(var _iterator5=this._classProperties[Symbol.iterator](),_step5;!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=!0){var _step5$value=babelHelpers.slicedToArray(_step5.value,2),p=_step5$value[0],v=_step5$value[1],attr=this._attributeNameForProperty(p,v);if(attr!==void 0){this._attributeToPropertyMap.set(attr,p);attributes.push(attr)}}}catch(err){_didIteratorError5=!0;_iteratorError5=err}finally{try{if(!_iteratorNormalCompletion5&&null!=_iterator5.return){_iterator5.return()}}finally{if(_didIteratorError5){throw _iteratorError5}}}return attributes}}]);return UpdatingElement}(babelHelpers.wrapNativeSuper(HTMLElement));_exports.UpdatingElement$1=_exports.UpdatingElement=UpdatingElement;UpdatingElement._attributeToPropertyMap=new Map;UpdatingElement._finalized=!0;UpdatingElement._classProperties=new Map;UpdatingElement.properties={};var updatingElement={notEqual:notEqual,UpdatingElement:UpdatingElement};_exports.$updatingElement=updatingElement;var directives=new WeakMap,directive=function directive(f){return function(){var d=f.apply(void 0,arguments);directives.set(d,!0);return d}};_exports.directive$1=_exports.directive=directive;var isDirective=function isDirective(o){return"function"===typeof o&&directives.has(o)};_exports.isDirective$1=_exports.isDirective=isDirective;var directive$1={directive:directive,isDirective:isDirective};_exports.$directive=directive$1;var isCEPolyfill=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0;_exports.isCEPolyfill=isCEPolyfill;var reparentNodes=function reparentNodes(container,start){var end=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,before=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null,node=start;while(node!==end){var n=node.nextSibling;container.insertBefore(node,before);node=n}};_exports.reparentNodes$1=_exports.reparentNodes=reparentNodes;var removeNodes=function removeNodes(container,startNode){var endNode=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,node=startNode;while(node!==endNode){var n=node.nextSibling;container.removeChild(node);node=n}};_exports.removeNodes$1=_exports.removeNodes=removeNodes;var dom={isCEPolyfill:isCEPolyfill,reparentNodes:reparentNodes,removeNodes:removeNodes};_exports.$dom=dom;var noChange={};_exports.noChange$1=_exports.noChange=noChange;var part={noChange:noChange};_exports.$part=part;var marker="{{lit-".concat((Math.random()+"").slice(2),"}}");_exports.marker=marker;var nodeMarker="<!--".concat(marker,"-->");_exports.nodeMarker=nodeMarker;var markerRegex=new RegExp("".concat(marker,"|").concat(nodeMarker));_exports.markerRegex=markerRegex;var boundAttributeSuffix="$lit$";_exports.boundAttributeSuffix=boundAttributeSuffix;var Template=function Template(result,element){var _this3=this;babelHelpers.classCallCheck(this,Template);this.parts=[];this.element=element;var index=-1,partIndex=0,nodesToRemove=[],_prepareTemplate=function _prepareTemplate(template){var content=template.content,walker=document.createTreeWalker(content,133,null,!1),previousNode,currentNode;while(walker.nextNode()){index++;previousNode=currentNode;var node=currentNode=walker.currentNode;if(1===node.nodeType){if(node.hasAttributes()){for(var attributes=node.attributes,count=0,i=0;i<attributes.length;i++){if(0<=attributes[i].value.indexOf(marker)){count++}}while(0<count--){var stringForPart=result.strings[partIndex],name=lastAttributeNameRegex.exec(stringForPart)[2],attributeLookupName=name.toLowerCase()+boundAttributeSuffix,attributeValue=node.getAttribute(attributeLookupName),strings=attributeValue.split(markerRegex);_this3.parts.push({type:"attribute",index:index,name:name,strings:strings});node.removeAttribute(attributeLookupName);partIndex+=strings.length-1}}if("TEMPLATE"===node.tagName){_prepareTemplate(node)}}else if(3===node.nodeType){var nodeValue=node.nodeValue;if(0>nodeValue.indexOf(marker)){continue}var parent=node.parentNode,_strings=nodeValue.split(markerRegex),lastIndex=_strings.length-1;partIndex+=lastIndex;for(var _i=0;_i<lastIndex;_i++){parent.insertBefore(""===_strings[_i]?createMarker():document.createTextNode(_strings[_i]),node);_this3.parts.push({type:"node",index:index++})}parent.insertBefore(""===_strings[lastIndex]?createMarker():document.createTextNode(_strings[lastIndex]),node);nodesToRemove.push(node)}else if(8===node.nodeType){if(node.nodeValue===marker){var _parent=node.parentNode,previousSibling=node.previousSibling;if(null===previousSibling||previousSibling!==previousNode||previousSibling.nodeType!==Node.TEXT_NODE){_parent.insertBefore(createMarker(),node)}else{index--}_this3.parts.push({type:"node",index:index++});nodesToRemove.push(node);if(null===node.nextSibling){_parent.insertBefore(createMarker(),node)}else{index--}currentNode=previousNode;partIndex++}else{var _i2=-1;while(-1!==(_i2=node.nodeValue.indexOf(marker,_i2+1))){_this3.parts.push({type:"node",index:-1})}}}}};_prepareTemplate(element);for(var _i3=0,n;_i3<nodesToRemove.length;_i3++){n=nodesToRemove[_i3];n.parentNode.removeChild(n)}};_exports.Template$1=_exports.Template=Template;var isTemplatePartActive=function isTemplatePartActive(part){return-1!==part.index};_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=isTemplatePartActive;var createMarker=function createMarker(){return document.createComment("")};_exports.createMarker$1=_exports.createMarker=createMarker;var lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;_exports.lastAttributeNameRegex=lastAttributeNameRegex;var template={marker:marker,nodeMarker:nodeMarker,markerRegex:markerRegex,boundAttributeSuffix:boundAttributeSuffix,Template:Template,isTemplatePartActive:isTemplatePartActive,createMarker:createMarker,lastAttributeNameRegex:lastAttributeNameRegex};_exports.$template=template;var TemplateInstance=function(){function TemplateInstance(template,processor,options){babelHelpers.classCallCheck(this,TemplateInstance);this._parts=[];this.template=template;this.processor=processor;this.options=options}babelHelpers.createClass(TemplateInstance,[{key:"update",value:function update(values){var i=0,_iteratorNormalCompletion6=!0,_didIteratorError6=!1,_iteratorError6=void 0;try{for(var _iterator6=this._parts[Symbol.iterator](),_step6,_part;!(_iteratorNormalCompletion6=(_step6=_iterator6.next()).done);_iteratorNormalCompletion6=!0){_part=_step6.value;if(_part!==void 0){_part.setValue(values[i])}i++}}catch(err){_didIteratorError6=!0;_iteratorError6=err}finally{try{if(!_iteratorNormalCompletion6&&null!=_iterator6.return){_iterator6.return()}}finally{if(_didIteratorError6){throw _iteratorError6}}}var _iteratorNormalCompletion7=!0,_didIteratorError7=!1,_iteratorError7=void 0;try{for(var _iterator7=this._parts[Symbol.iterator](),_step7,_part2;!(_iteratorNormalCompletion7=(_step7=_iterator7.next()).done);_iteratorNormalCompletion7=!0){_part2=_step7.value;if(_part2!==void 0){_part2.commit()}}}catch(err){_didIteratorError7=!0;_iteratorError7=err}finally{try{if(!_iteratorNormalCompletion7&&null!=_iterator7.return){_iterator7.return()}}finally{if(_didIteratorError7){throw _iteratorError7}}}}},{key:"_clone",value:function _clone(){var _this4=this,fragment=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),parts=this.template.parts,partIndex=0,nodeIndex=0,_prepareInstance=function _prepareInstance(fragment){var walker=document.createTreeWalker(fragment,133,null,!1),node=walker.nextNode();while(partIndex<parts.length&&null!==node){var _part3=parts[partIndex];if(!isTemplatePartActive(_part3)){_this4._parts.push(void 0);partIndex++}else if(nodeIndex===_part3.index){if("node"===_part3.type){var _part4=_this4.processor.handleTextExpression(_this4.options);_part4.insertAfterNode(node);_this4._parts.push(_part4)}else{var _this4$_parts;(_this4$_parts=_this4._parts).push.apply(_this4$_parts,babelHelpers.toConsumableArray(_this4.processor.handleAttributeExpressions(node,_part3.name,_part3.strings,_this4.options)))}partIndex++}else{nodeIndex++;if("TEMPLATE"===node.nodeName){_prepareInstance(node.content)}node=walker.nextNode()}}};_prepareInstance(fragment);if(isCEPolyfill){document.adoptNode(fragment);customElements.upgrade(fragment)}return fragment}}]);return TemplateInstance}();_exports.TemplateInstance$1=_exports.TemplateInstance=TemplateInstance;var templateInstance={TemplateInstance:TemplateInstance};_exports.$templateInstance=templateInstance;var TemplateResult=function(){function TemplateResult(strings,values,type,processor){babelHelpers.classCallCheck(this,TemplateResult);this.strings=strings;this.values=values;this.type=type;this.processor=processor}babelHelpers.createClass(TemplateResult,[{key:"getHTML",value:function getHTML(){for(var endIndex=this.strings.length-1,html="",i=0;i<endIndex;i++){var s=this.strings[i],addedMarker=!1;html+=s.replace(lastAttributeNameRegex,function(_match,whitespace,name,value){addedMarker=!0;return whitespace+name+boundAttributeSuffix+value+marker});if(!addedMarker){html+=nodeMarker}}return html+this.strings[endIndex]}},{key:"getTemplateElement",value:function getTemplateElement(){var template=document.createElement("template");template.innerHTML=this.getHTML();return template}}]);return TemplateResult}();_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=TemplateResult;var SVGTemplateResult=function(_TemplateResult){babelHelpers.inherits(SVGTemplateResult,_TemplateResult);function SVGTemplateResult(){babelHelpers.classCallCheck(this,SVGTemplateResult);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(SVGTemplateResult).apply(this,arguments))}babelHelpers.createClass(SVGTemplateResult,[{key:"getHTML",value:function getHTML(){return"<svg>".concat(babelHelpers.get(babelHelpers.getPrototypeOf(SVGTemplateResult.prototype),"getHTML",this).call(this),"</svg>")}},{key:"getTemplateElement",value:function getTemplateElement(){var template=babelHelpers.get(babelHelpers.getPrototypeOf(SVGTemplateResult.prototype),"getTemplateElement",this).call(this),content=template.content,svgElement=content.firstChild;content.removeChild(svgElement);reparentNodes(content,svgElement.firstChild);return template}}]);return SVGTemplateResult}(TemplateResult);_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=SVGTemplateResult;var templateResult={TemplateResult:TemplateResult,SVGTemplateResult:SVGTemplateResult};_exports.$templateResult=templateResult;var isPrimitive=function isPrimitive(value){return null===value||!("object"===babelHelpers.typeof(value)||"function"===typeof value)};_exports.isPrimitive$1=_exports.isPrimitive=isPrimitive;var AttributeCommitter=function(){function AttributeCommitter(element,name,strings){babelHelpers.classCallCheck(this,AttributeCommitter);this.dirty=!0;this.element=element;this.name=name;this.strings=strings;this.parts=[];for(var i=0;i<strings.length-1;i++){this.parts[i]=this._createPart()}}babelHelpers.createClass(AttributeCommitter,[{key:"_createPart",value:function _createPart(){return new AttributePart(this)}},{key:"_getValue",value:function _getValue(){for(var strings=this.strings,l=strings.length-1,text="",i=0;i<l;i++){text+=strings[i];var _part5=this.parts[i];if(_part5!==void 0){var v=_part5.value;if(null!=v&&(Array.isArray(v)||"string"!==typeof v&&v[Symbol.iterator])){var _iteratorNormalCompletion8=!0,_didIteratorError8=!1,_iteratorError8=void 0;try{for(var _iterator8=v[Symbol.iterator](),_step8,t;!(_iteratorNormalCompletion8=(_step8=_iterator8.next()).done);_iteratorNormalCompletion8=!0){t=_step8.value;text+="string"===typeof t?t:t+""}}catch(err){_didIteratorError8=!0;_iteratorError8=err}finally{try{if(!_iteratorNormalCompletion8&&null!=_iterator8.return){_iterator8.return()}}finally{if(_didIteratorError8){throw _iteratorError8}}}}else{text+="string"===typeof v?v:v+""}}}text+=strings[l];return text}},{key:"commit",value:function commit(){if(this.dirty){this.dirty=!1;this.element.setAttribute(this.name,this._getValue())}}}]);return AttributeCommitter}();_exports.AttributeCommitter$1=_exports.AttributeCommitter=AttributeCommitter;var AttributePart=function(){function AttributePart(comitter){babelHelpers.classCallCheck(this,AttributePart);this.value=void 0;this.committer=comitter}babelHelpers.createClass(AttributePart,[{key:"setValue",value:function setValue(value){if(value!==noChange&&(!isPrimitive(value)||value!==this.value)){this.value=value;if(!isDirective(value)){this.committer.dirty=!0}}}},{key:"commit",value:function commit(){while(isDirective(this.value)){var directive$$1=this.value;this.value=noChange;directive$$1(this)}if(this.value===noChange){return}this.committer.commit()}}]);return AttributePart}();_exports.AttributePart$1=_exports.AttributePart=AttributePart;var NodePart=function(){function NodePart(options){babelHelpers.classCallCheck(this,NodePart);this.value=void 0;this._pendingValue=void 0;this.options=options}babelHelpers.createClass(NodePart,[{key:"appendInto",value:function appendInto(container){this.startNode=container.appendChild(createMarker());this.endNode=container.appendChild(createMarker())}},{key:"insertAfterNode",value:function insertAfterNode(ref){this.startNode=ref;this.endNode=ref.nextSibling}},{key:"appendIntoPart",value:function appendIntoPart(part){part._insert(this.startNode=createMarker());part._insert(this.endNode=createMarker())}},{key:"insertAfterPart",value:function insertAfterPart(ref){ref._insert(this.startNode=createMarker());this.endNode=ref.endNode;ref.endNode=this.startNode}},{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}var value=this._pendingValue;if(value===noChange){return}if(isPrimitive(value)){if(value!==this.value){this._commitText(value)}}else if(babelHelpers.instanceof(value,TemplateResult)){this._commitTemplateResult(value)}else if(babelHelpers.instanceof(value,Node)){this._commitNode(value)}else if(Array.isArray(value)||value[Symbol.iterator]){this._commitIterable(value)}else{this._commitText(value)}}},{key:"_insert",value:function _insert(node){this.endNode.parentNode.insertBefore(node,this.endNode)}},{key:"_commitNode",value:function _commitNode(value){if(this.value===value){return}this.clear();this._insert(value);this.value=value}},{key:"_commitText",value:function _commitText(value){var node=this.startNode.nextSibling;value=null==value?"":value;if(node===this.endNode.previousSibling&&node.nodeType===Node.TEXT_NODE){node.textContent=value}else{this._commitNode(document.createTextNode("string"===typeof value?value:value+""))}this.value=value}},{key:"_commitTemplateResult",value:function _commitTemplateResult(value){var template=this.options.templateFactory(value);if(this.value&&this.value.template===template){this.value.update(value.values)}else{var instance=new TemplateInstance(template,value.processor,this.options),fragment=instance._clone();instance.update(value.values);this._commitNode(fragment);this.value=instance}}},{key:"_commitIterable",value:function _commitIterable(value){if(!Array.isArray(this.value)){this.value=[];this.clear()}var itemParts=this.value,partIndex=0,itemPart,_iteratorNormalCompletion9=!0,_didIteratorError9=!1,_iteratorError9=void 0;try{for(var _iterator9=value[Symbol.iterator](),_step9,item;!(_iteratorNormalCompletion9=(_step9=_iterator9.next()).done);_iteratorNormalCompletion9=!0){item=_step9.value;itemPart=itemParts[partIndex];if(itemPart===void 0){itemPart=new NodePart(this.options);itemParts.push(itemPart);if(0===partIndex){itemPart.appendIntoPart(this)}else{itemPart.insertAfterPart(itemParts[partIndex-1])}}itemPart.setValue(item);itemPart.commit();partIndex++}}catch(err){_didIteratorError9=!0;_iteratorError9=err}finally{try{if(!_iteratorNormalCompletion9&&null!=_iterator9.return){_iterator9.return()}}finally{if(_didIteratorError9){throw _iteratorError9}}}if(partIndex<itemParts.length){itemParts.length=partIndex;this.clear(itemPart&&itemPart.endNode)}}},{key:"clear",value:function clear(){var startNode=0<arguments.length&&arguments[0]!==void 0?arguments[0]:this.startNode;removeNodes(this.startNode.parentNode,startNode.nextSibling,this.endNode)}}]);return NodePart}();_exports.NodePart$1=_exports.NodePart=NodePart;var BooleanAttributePart=function(){function BooleanAttributePart(element,name,strings){babelHelpers.classCallCheck(this,BooleanAttributePart);this.value=void 0;this._pendingValue=void 0;if(2!==strings.length||""!==strings[0]||""!==strings[1]){throw new Error("Boolean attributes can only contain a single expression")}this.element=element;this.name=name;this.strings=strings}babelHelpers.createClass(BooleanAttributePart,[{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}var value=!!this._pendingValue;if(this.value!==value){if(value){this.element.setAttribute(this.name,"")}else{this.element.removeAttribute(this.name)}}this.value=value;this._pendingValue=noChange}}]);return BooleanAttributePart}();_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=BooleanAttributePart;var PropertyCommitter=function(_AttributeCommitter){babelHelpers.inherits(PropertyCommitter,_AttributeCommitter);function PropertyCommitter(element,name,strings){var _this5;babelHelpers.classCallCheck(this,PropertyCommitter);_this5=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(PropertyCommitter).call(this,element,name,strings));_this5.single=2===strings.length&&""===strings[0]&&""===strings[1];return _this5}babelHelpers.createClass(PropertyCommitter,[{key:"_createPart",value:function _createPart(){return new PropertyPart(this)}},{key:"_getValue",value:function _getValue(){if(this.single){return this.parts[0].value}return babelHelpers.get(babelHelpers.getPrototypeOf(PropertyCommitter.prototype),"_getValue",this).call(this)}},{key:"commit",value:function commit(){if(this.dirty){this.dirty=!1;this.element[this.name]=this._getValue()}}}]);return PropertyCommitter}(AttributeCommitter);_exports.PropertyCommitter$1=_exports.PropertyCommitter=PropertyCommitter;var PropertyPart=function(_AttributePart){babelHelpers.inherits(PropertyPart,_AttributePart);function PropertyPart(){babelHelpers.classCallCheck(this,PropertyPart);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(PropertyPart).apply(this,arguments))}return PropertyPart}(AttributePart);_exports.PropertyPart$1=_exports.PropertyPart=PropertyPart;var eventOptionsSupported=!1;try{var options={get capture(){eventOptionsSupported=!0;return!1}};window.addEventListener("test",options,options);window.removeEventListener("test",options,options)}catch(_e){}var EventPart=function(){function EventPart(element,eventName,eventContext){var _this6=this;babelHelpers.classCallCheck(this,EventPart);this.value=void 0;this._pendingValue=void 0;this.element=element;this.eventName=eventName;this.eventContext=eventContext;this._boundHandleEvent=function(e){return _this6.handleEvent(e)}}babelHelpers.createClass(EventPart,[{key:"setValue",value:function setValue(value){this._pendingValue=value}},{key:"commit",value:function commit(){while(isDirective(this._pendingValue)){var directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}var newListener=this._pendingValue,oldListener=this.value,shouldRemoveListener=null==newListener||null!=oldListener&&(newListener.capture!==oldListener.capture||newListener.once!==oldListener.once||newListener.passive!==oldListener.passive),shouldAddListener=null!=newListener&&(null==oldListener||shouldRemoveListener);if(shouldRemoveListener){this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options)}if(shouldAddListener){this._options=getOptions(newListener);this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)}this.value=newListener;this._pendingValue=noChange}},{key:"handleEvent",value:function handleEvent(event){if("function"===typeof this.value){this.value.call(this.eventContext||this.element,event)}else{this.value.handleEvent(event)}}}]);return EventPart}();_exports.EventPart$1=_exports.EventPart=EventPart;var getOptions=function getOptions(o){return o&&(eventOptionsSupported?{capture:o.capture,passive:o.passive,once:o.once}:o.capture)},parts={isPrimitive:isPrimitive,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,NodePart:NodePart,BooleanAttributePart:BooleanAttributePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,EventPart:EventPart};_exports.$parts=parts;var DefaultTemplateProcessor=function(){function DefaultTemplateProcessor(){babelHelpers.classCallCheck(this,DefaultTemplateProcessor)}babelHelpers.createClass(DefaultTemplateProcessor,[{key:"handleAttributeExpressions",value:function handleAttributeExpressions(element,name,strings,options){var prefix=name[0];if("."===prefix){var _comitter=new PropertyCommitter(element,name.slice(1),strings);return _comitter.parts}if("@"===prefix){return[new EventPart(element,name.slice(1),options.eventContext)]}if("?"===prefix){return[new BooleanAttributePart(element,name.slice(1),strings)]}var comitter=new AttributeCommitter(element,name,strings);return comitter.parts}},{key:"handleTextExpression",value:function handleTextExpression(options){return new NodePart(options)}}]);return DefaultTemplateProcessor}();_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=DefaultTemplateProcessor;var defaultTemplateProcessor=new DefaultTemplateProcessor;_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=defaultTemplateProcessor;var defaultTemplateProcessor$1={DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor};_exports.$defaultTemplateProcessor=defaultTemplateProcessor$1;function templateFactory(result){var templateCache=templateCaches.get(result.type);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(result.type,templateCache)}var template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}var key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){template=new Template(result,result.getTemplateElement());templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}var templateCaches=new Map;_exports.templateCaches$1=_exports.templateCaches=templateCaches;var templateFactory$1={templateFactory:templateFactory,templateCaches:templateCaches};_exports.$templateFactory=templateFactory$1;var parts$1=new WeakMap;_exports.parts$1=_exports.parts=parts$1;var render=function render(result,container,options){var part=parts$1.get(container);if(part===void 0){removeNodes(container,container.firstChild);parts$1.set(container,part=new NodePart(Object.assign({templateFactory:templateFactory},options)));part.appendInto(container)}part.setValue(result);part.commit()};_exports.render$2=_exports.render=render;var render$1={parts:parts$1,render:render};_exports.$render=render$1;var html=function html(strings){for(var _len=arguments.length,values=Array(1<_len?_len-1:0),_key=1;_key<_len;_key++){values[_key-1]=arguments[_key]}return new TemplateResult(strings,values,"html",defaultTemplateProcessor)};_exports.html$2=_exports.html$1=_exports.html=html;var svg=function svg(strings){for(var _len2=arguments.length,values=Array(1<_len2?_len2-1:0),_key2=1;_key2<_len2;_key2++){values[_key2-1]=arguments[_key2]}return new SVGTemplateResult(strings,values,"svg",defaultTemplateProcessor)};_exports.svg$2=_exports.svg$1=_exports.svg=svg;var litHtml={html:html,svg:svg,DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor,directive:directive,isDirective:isDirective,removeNodes:removeNodes,reparentNodes:reparentNodes,noChange:noChange,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,BooleanAttributePart:BooleanAttributePart,EventPart:EventPart,isPrimitive:isPrimitive,NodePart:NodePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,parts:parts$1,render:render,templateCaches:templateCaches,templateFactory:templateFactory,TemplateInstance:TemplateInstance,SVGTemplateResult:SVGTemplateResult,TemplateResult:TemplateResult,createMarker:createMarker,isTemplatePartActive:isTemplatePartActive,Template:Template};_exports.$litHtml=litHtml;var walkerNodeFilter=NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT;function removeNodesFromTemplate(template,nodesToRemove){var content=template.element.content,parts=template.parts,walker=document.createTreeWalker(content,walkerNodeFilter,null,!1),partIndex=nextActiveIndexInTemplateParts(parts),part=parts[partIndex],nodeIndex=-1,removeCount=0,nodesToRemoveInTemplate=[],currentRemovingNode=null;while(walker.nextNode()){nodeIndex++;var node=walker.currentNode;if(node.previousSibling===currentRemovingNode){currentRemovingNode=null}if(nodesToRemove.has(node)){nodesToRemoveInTemplate.push(node);if(null===currentRemovingNode){currentRemovingNode=node}}if(null!==currentRemovingNode){removeCount++}while(part!==void 0&&part.index===nodeIndex){part.index=null!==currentRemovingNode?-1:part.index-removeCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex);part=parts[partIndex]}}nodesToRemoveInTemplate.forEach(function(n){return n.parentNode.removeChild(n)})}var countNodes=function countNodes(node){var count=node.nodeType===Node.DOCUMENT_FRAGMENT_NODE?0:1,walker=document.createTreeWalker(node,walkerNodeFilter,null,!1);while(walker.nextNode()){count++}return count},nextActiveIndexInTemplateParts=function nextActiveIndexInTemplateParts(parts){for(var startIndex=1<arguments.length&&arguments[1]!==void 0?arguments[1]:-1,i=startIndex+1,_part6;i<parts.length;i++){_part6=parts[i];if(isTemplatePartActive(_part6)){return i}}return-1};function insertNodeIntoTemplate(template,node){var refNode=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,content=template.element.content,parts=template.parts;if(null===refNode||refNode===void 0){content.appendChild(node);return}var walker=document.createTreeWalker(content,walkerNodeFilter,null,!1),partIndex=nextActiveIndexInTemplateParts(parts),insertCount=0,walkerIndex=-1;while(walker.nextNode()){walkerIndex++;var walkerNode=walker.currentNode;if(walkerNode===refNode){insertCount=countNodes(node);refNode.parentNode.insertBefore(node,refNode)}while(-1!==partIndex&&parts[partIndex].index===walkerIndex){if(0<insertCount){while(-1!==partIndex){parts[partIndex].index+=insertCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}return}partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}}}var modifyTemplate={removeNodesFromTemplate:removeNodesFromTemplate,insertNodeIntoTemplate:insertNodeIntoTemplate};_exports.$modifyTemplate=modifyTemplate;var getTemplateCacheKey=function getTemplateCacheKey(type,scopeName){return"".concat(type,"--").concat(scopeName)},compatibleShadyCSSVersion=!0;if("undefined"===typeof window.ShadyCSS){compatibleShadyCSSVersion=!1}else if("undefined"===typeof window.ShadyCSS.prepareTemplateDom){console.warn("Incompatible ShadyCSS version detected."+"Please update to at least @webcomponents/webcomponentsjs@2.0.2 and"+"@webcomponents/shadycss@1.3.1.");compatibleShadyCSSVersion=!1}var shadyTemplateFactory=function shadyTemplateFactory(scopeName){return function(result){var cacheKey=getTemplateCacheKey(result.type,scopeName),templateCache=templateCaches.get(cacheKey);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(cacheKey,templateCache)}var template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}var key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){var element=result.getTemplateElement();if(compatibleShadyCSSVersion){window.ShadyCSS.prepareTemplateDom(element,scopeName)}template=new Template(result,element);templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=function removeStylesFromLitTemplates(scopeName){TEMPLATE_TYPES.forEach(function(type){var templates=templateCaches.get(getTemplateCacheKey(type,scopeName));if(templates!==void 0){templates.keyString.forEach(function(template){var content=template.element.content,styles=new Set;Array.from(content.querySelectorAll("style")).forEach(function(s){styles.add(s)});removeNodesFromTemplate(template,styles)})}})},shadyRenderSet=new Set,prepareTemplateStyles=function prepareTemplateStyles(renderedDOM,template,scopeName){shadyRenderSet.add(scopeName);var styles=renderedDOM.querySelectorAll("style");if(0===styles.length){return}for(var condensedStyle=document.createElement("style"),i=0,style;i<styles.length;i++){style=styles[i];style.parentNode.removeChild(style);condensedStyle.textContent+=style.textContent}removeStylesFromLitTemplates(scopeName);insertNodeIntoTemplate(template,condensedStyle,template.element.content.firstChild);window.ShadyCSS.prepareTemplateStyles(template.element,scopeName);if(window.ShadyCSS.nativeShadow){var _style=template.element.content.querySelector("style");renderedDOM.insertBefore(_style.cloneNode(!0),renderedDOM.firstChild)}else{template.element.content.insertBefore(condensedStyle,template.element.content.firstChild);var removes=new Set([condensedStyle]);removeNodesFromTemplate(template,removes)}},render$2=function render$2(result,container,options){var scopeName=options.scopeName,hasRendered=parts$1.has(container),needsScoping=babelHelpers.instanceof(container,ShadowRoot)&&compatibleShadyCSSVersion&&babelHelpers.instanceof(result,TemplateResult),firstScopeRender=needsScoping&&!shadyRenderSet.has(scopeName),renderContainer=firstScopeRender?document.createDocumentFragment():container;render(result,renderContainer,Object.assign({templateFactory:shadyTemplateFactory(scopeName)},options));if(firstScopeRender){var _part7=parts$1.get(renderContainer);parts$1.delete(renderContainer);if(babelHelpers.instanceof(_part7.value,TemplateInstance)){prepareTemplateStyles(renderContainer,_part7.value.template,scopeName)}removeNodes(container,container.firstChild);container.appendChild(renderContainer);parts$1.set(container,_part7)}if(!hasRendered&&needsScoping){window.ShadyCSS.styleElement(container.host)}};_exports.render$1=render$2;var shadyRender={render:render$2,html:html,svg:svg,TemplateResult:TemplateResult};_exports.$shadyRender=shadyRender;var LitElement=function(_UpdatingElement){babelHelpers.inherits(LitElement,_UpdatingElement);function LitElement(){babelHelpers.classCallCheck(this,LitElement);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(LitElement).apply(this,arguments))}babelHelpers.createClass(LitElement,[{key:"update",value:function update(changedProperties){babelHelpers.get(babelHelpers.getPrototypeOf(LitElement.prototype),"update",this).call(this,changedProperties);var templateResult=this.render();if(babelHelpers.instanceof(templateResult,TemplateResult)){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}}},{key:"render",value:function render(){}}]);return LitElement}(UpdatingElement);_exports.LitElement=LitElement;LitElement.render=render$2;var litElement={LitElement:LitElement,notEqual:notEqual,UpdatingElement:UpdatingElement,customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions,html:html,svg:svg};_exports.$litElement=litElement;var previousValues=new WeakMap,unsafeHTML=directive(function(value){return function(part){if(!babelHelpers.instanceof(part,NodePart)){throw new Error("unsafeHTML can only be used in text bindings")}var previousValue=previousValues.get(part);if(previousValue===value&&isPrimitive(value)){return}var tmp=document.createElement("template");tmp.innerHTML=value;part.setValue(document.importNode(tmp.content,!0));previousValues.set(part,value)}});_exports.unsafeHTML=unsafeHTML;var unsafeHtml={unsafeHTML:unsafeHTML};_exports.$unsafeHtml=unsafeHtml;var _state=new WeakMap,until=directive(function(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3]}return function(part){var state=_state.get(part);if(state===void 0){state={values:[]};_state.set(part,state)}var previousValues=state.values,changedSinceLastRender=!1;state.values=args;var _loop2=function _loop2(i){var value=args[i];if(value===previousValues[i]&&!changedSinceLastRender){return"continue"}changedSinceLastRender=!0;if(isPrimitive(value)||"function"!==typeof value.then){part.setValue(value);state.lastRenderedIndex=i;return"break"}state.lastRenderedIndex=void 0;Promise.resolve(value).then(function(resolvedValue){var index=state.values.indexOf(value);if(-1<index&&(state.lastRenderedIndex===void 0||index<state.lastRenderedIndex)){state.lastRenderedIndex=index;part.setValue(resolvedValue);part.commit()}})};_loop:for(var i=0,_ret;i<args.length;i++){_ret=_loop2(i);switch(_ret){case"continue":continue;case"break":break _loop;}}}});_exports.until=until;var until$1={until:until};_exports.$until=until$1;var formatDate=function formatDate(timestring){var pad=function pad(v){return 10>v?"0".concat(v):v},dateString=timestring.split("T")[0],date=new Date(dateString),weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][date.getUTCDay()],day=pad(date.getUTCDate()),month=["January","February","March","April","May","June","July","August","September","October","November","December"][date.getUTCMonth()],year=date.getUTCFullYear();return"".concat(weekday,", ").concat(day," ").concat(month," ").concat(year)};_exports.formatDate=formatDate;var getLink=function getLink(link){return link?link.replace("content.",""):""};_exports.getLink=getLink;var misc={formatDate:formatDate,getLink:getLink};_exports.$misc=misc;var article=function article(_ref){var content=_ref.content,date_gmt=_ref.date_gmt,errorMessage=_ref.errorMessage,link=_ref.link,title=_ref.title;return html(_templateObject_f7405cc00e2511e9b89247ff218efe65(),unsafeHTML("<a href=\"".concat(getLink(link),"\">").concat(title.rendered,"</a>")),errorMessage?errorMessage:formatDate(date_gmt),unsafeHTML(content.rendered))};_exports.$articleDefault=article;var article$1={default:article};_exports.$article=article$1;var articles=function articles(_ref2){var apiUrl=_ref2.apiUrl,siteUrl=_ref2.siteUrl;return new Promise(function(resolve,reject){return fetch(apiUrl).then(function(res){if(res.ok){return res.json().then(function(json){return json.map(function(res){return article(res)})})}throw new Error("status: ".concat(res.status).concat(res.statusText?" | statusText: ".concat(res.statusText):""))}).then(function(response){return resolve(response)}).catch(function(err){return reject(err)})}).catch(function(err){return article({errorMessage:"".concat(apiUrl?"":"Missing required attribute: apiUrl. ").concat(err.message),date_gmt:"",link:siteUrl,title:{rendered:"Error"},content:{rendered:"<p>Posts are unavailable. Please check the error and try again.</p>"}})})};_exports.$articlesDefault=articles;var articles$1={default:articles};_exports.$articles=articles$1;var loading=html(_templateObject2_f7405cc00e2511e9b89247ff218efe65(),getLink());_exports.$loadingDefault=loading;var loading$1={default:loading};_exports.$loading=loading$1;var styles=html(_templateObject3_f7405cc00e2511e9b89247ff218efe65());_exports.$xPostpressDefault=styles;var xPostpress={default:styles};_exports.$xPostpress$1=xPostpress;var xPostpress$1=function(_LitElement){babelHelpers.inherits(xPostpress$1,_LitElement);babelHelpers.createClass(xPostpress$1,null,[{key:"properties",get:function get(){return{apiUrl:{type:String},siteUrl:{type:String}}}}]);function xPostpress$1(){babelHelpers.classCallCheck(this,xPostpress$1);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(xPostpress$1).call(this))}babelHelpers.createClass(xPostpress$1,[{key:"render",value:function render(){return html(_templateObject4_f7405cc00e2511e9b89247ff218efe65(),styles,until(articles({apiUrl:this.apiUrl,siteUrl:this.siteUrl}),loading))}}]);return xPostpress$1}(LitElement);window.customElements.define("x-postpress",xPostpress$1)}); |
@@ -40,3 +40,3 @@ /** | ||
var precacheConfig = [["index.html","95a46d666346f77973e7a0558c5a4102"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","9ee22268c66d76f87dd2d2769a463e6d"]]; | ||
var precacheConfig = [["index.html","95a46d666346f77973e7a0558c5a4102"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","3d554a19f660c52afb02138ab99e8b68"]]; | ||
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); | ||
@@ -43,0 +43,0 @@ |
@@ -57,4 +57,9 @@ define(["exports"],function(_exports){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.removeNodesFromTemplate=removeNodesFromTemplate;_exports.insertNodeIntoTemplate=insertNodeIntoTemplate;_exports.templateFactory$1=_exports.templateFactory=templateFactory;_exports.createMarker=_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=_exports.Template$1=_exports.Template=_exports.boundAttributeSuffix=_exports.markerRegex=_exports.nodeMarker=_exports.marker=_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=_exports.TemplateInstance$1=_exports.TemplateInstance=_exports.templateCaches$1=_exports.templateCaches=_exports.render$1=_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=_exports.render$2=_exports.render=_exports.parts$1=_exports.parts=_exports.EventPart$1=_exports.EventPart=_exports.PropertyPart$1=_exports.PropertyPart=_exports.PropertyCommitter$1=_exports.PropertyCommitter=_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=_exports.NodePart$1=_exports.NodePart=_exports.AttributePart$1=_exports.AttributePart=_exports.AttributeCommitter$1=_exports.AttributeCommitter=_exports.isPrimitive$1=_exports.isPrimitive=_exports.noChange$1=_exports.noChange=_exports.removeNodes$1=_exports.removeNodes=_exports.reparentNodes$1=_exports.reparentNodes=_exports.isCEPolyfill=_exports.isDirective$1=_exports.isDirective=_exports.directive$1=_exports.directive=_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=_exports.until=_exports.unsafeHTML=_exports.LitElement=_exports.svg$2=_exports.svg$1=_exports.svg=_exports.html$2=_exports.html$1=_exports.html=_exports.UpdatingElement$1=_exports.UpdatingElement=_exports.notEqual$1=_exports.notEqual=_exports.eventOptions$1=_exports.eventOptions=_exports.queryAll$1=_exports.queryAll=_exports.query$1=_exports.query=_exports.property$1=_exports.property=_exports.customElement$1=_exports.customElement=_exports.$misc=_exports.$xPostpress$1=_exports.$loading=_exports.$articles=_exports.$article=_exports.$litHtml=_exports.$template=_exports.$templateResult=_exports.$templateInstance=_exports.$templateFactory=_exports.$shadyRender=_exports.$render=_exports.$parts=_exports.$part=_exports.$modifyTemplate=_exports.$dom=_exports.$directive=_exports.$defaultTemplateProcessor=_exports.$until=_exports.$unsafeHtml=_exports.$litElement=_exports.$updatingElement=_exports.$decorators=void 0;_exports.getLink=_exports.formatDate=_exports.$xPostpressDefault=_exports.$loadingDefault=_exports.$articlesDefault=_exports.$articleDefault=_exports.lastAttributeNameRegex=_exports.createMarker$1=void 0;const customElement=tagName=>clazz=>{window.customElements.define(tagName,clazz);return clazz};_exports.customElement$1=_exports.customElement=customElement;const property=options=>(proto,name)=>{proto.constructor.createProperty(name,options)};_exports.property$1=_exports.property=property;const query=_query((target,selector)=>target.querySelector(selector));_exports.query$1=_exports.query=query;const queryAll=_query((target,selector)=>target.querySelectorAll(selector));_exports.queryAll$1=_exports.queryAll=queryAll;function _query(queryFn){return selector=>(proto,propName)=>{Object.defineProperty(proto,propName,{get(){return queryFn(this.renderRoot,selector)},enumerable:!0,configurable:!0})}}const eventOptions=options=>(proto,name)=>{Object.assign(proto[name],options)};_exports.eventOptions$1=_exports.eventOptions=eventOptions;var decorators={customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions};_exports.$decorators=decorators;const fromBooleanAttribute=value=>null!==value,toBooleanAttribute=value=>value?"":null,notEqual=(value,old)=>{return old!==value&&(old===old||value===value)};_exports.notEqual$1=_exports.notEqual=notEqual;const defaultPropertyDeclaration={attribute:!0,type:String,reflect:!1,hasChanged:notEqual},microtaskPromise=new Promise(resolve=>resolve(!0)),STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=1<<2,STATE_IS_REFLECTING=1<<3;class UpdatingElement extends HTMLElement{constructor(){super();this._updateState=0;this._instanceProperties=void 0;this._updatePromise=microtaskPromise;this._changedProperties=new Map;this._reflectingProperties=void 0;this.initialize()}static get observedAttributes(){this._finalize();const attributes=[];for(const[p,v]of this._classProperties){const attr=this._attributeNameForProperty(p,v);if(attr!==void 0){this._attributeToPropertyMap.set(attr,p);attributes.push(attr)}}return attributes}static createProperty(name,options=defaultPropertyDeclaration){if(!this.hasOwnProperty("_classProperties")){this._classProperties=new Map;const superProperties=Object.getPrototypeOf(this)._classProperties;if(superProperties!==void 0){superProperties.forEach((v,k)=>this._classProperties.set(k,v))}}this._classProperties.set(name,options);if(this.prototype.hasOwnProperty(name)){return}const key="symbol"===typeof name?Symbol():`__${name}`;Object.defineProperty(this.prototype,name,{get(){return this[key]},set(value){const oldValue=this[name];this[key]=value;this._requestPropertyUpdate(name,oldValue,options)},configurable:!0,enumerable:!0})}static _finalize(){if(this.hasOwnProperty("_finalized")&&this._finalized){return}const superCtor=Object.getPrototypeOf(this);if("function"===typeof superCtor._finalize){superCtor._finalize()}this._finalized=!0;this._attributeToPropertyMap=new Map;const props=this.properties,propKeys=[...Object.getOwnPropertyNames(props),...("function"===typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(props):[])];for(const p of propKeys){this.createProperty(p,props[p])}}static _attributeNameForProperty(name,options){const attribute=options!==void 0&&options.attribute;return!1===attribute?void 0:"string"===typeof attribute?attribute:"string"===typeof name?name.toLowerCase():void 0}static _valueHasChanged(value,old,hasChanged=notEqual){return hasChanged(value,old)}static _propertyValueFromAttribute(value,options){const type=options&&options.type;if(type===void 0){return value}const fromAttribute=type===Boolean?fromBooleanAttribute:"function"===typeof type?type:type.fromAttribute;return fromAttribute?fromAttribute(value):value}static _propertyValueToAttribute(value,options){if(options===void 0||options.reflect===void 0){return}const toAttribute=options.type===Boolean?toBooleanAttribute:options.type&&options.type.toAttribute||String;return toAttribute(value)}initialize(){this.renderRoot=this.createRenderRoot();this._saveInstanceProperties()}_saveInstanceProperties(){for(const[p]of this.constructor._classProperties){if(this.hasOwnProperty(p)){const value=this[p];delete this[p];if(!this._instanceProperties){this._instanceProperties=new Map}this._instanceProperties.set(p,value)}}}_applyInstanceProperties(){for(const[p,v]of this._instanceProperties){this[p]=v}this._instanceProperties=void 0}createRenderRoot(){return this.attachShadow({mode:"open"})}connectedCallback(){if(this._updateState&STATE_HAS_UPDATED){if(window.ShadyCSS!==void 0){window.ShadyCSS.styleElement(this)}}else{this.requestUpdate()}}disconnectedCallback(){}attributeChangedCallback(name,old,value){if(old!==value){this._attributeToProperty(name,value)}}_propertyToAttribute(name,value,options=defaultPropertyDeclaration){const ctor=this.constructor,attrValue=ctor._propertyValueToAttribute(value,options);if(attrValue!==void 0){const attr=ctor._attributeNameForProperty(name,options);if(attr!==void 0){this._updateState=this._updateState|STATE_IS_REFLECTING;if(null===attrValue){this.removeAttribute(attr)}else{this.setAttribute(attr,attrValue)}this._updateState=this._updateState&~STATE_IS_REFLECTING}}}_attributeToProperty(name,value){if(!(this._updateState&STATE_IS_REFLECTING)){const ctor=this.constructor,propName=ctor._attributeToPropertyMap.get(name);if(propName!==void 0){const options=ctor._classProperties.get(propName);this[propName]=ctor._propertyValueFromAttribute(value,options)}}}requestUpdate(name,oldValue){if(name!==void 0){const options=this.constructor._classProperties.get(name)||defaultPropertyDeclaration;return this._requestPropertyUpdate(name,oldValue,options)}return this._invalidate()}_requestPropertyUpdate(name,oldValue,options){if(!this.constructor._valueHasChanged(this[name],oldValue,options.hasChanged)){return this.updateComplete}if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}if(!0===options.reflect){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}return this._invalidate()}_invalidate(){var _this=this;return babelHelpers.asyncToGenerator(function*(){if(!_this._hasRequestedUpdate){_this._updateState=_this._updateState|STATE_UPDATE_REQUESTED;let resolver;const previousValidatePromise=_this._updatePromise;_this._updatePromise=new Promise(r=>resolver=r);yield previousValidatePromise;_this._validate();resolver(!_this._hasRequestedUpdate)}return _this.updateComplete})()}get _hasRequestedUpdate(){return this._updateState&STATE_UPDATE_REQUESTED}_validate(){if(this._instanceProperties){this._applyInstanceProperties()}if(this.shouldUpdate(this._changedProperties)){const changedProperties=this._changedProperties;this.update(changedProperties);this._markUpdated();if(!(this._updateState&STATE_HAS_UPDATED)){this._updateState=this._updateState|STATE_HAS_UPDATED;this.firstUpdated(changedProperties)}this.updated(changedProperties)}else{this._markUpdated()}}_markUpdated(){this._changedProperties=new Map;this._updateState=this._updateState&~STATE_UPDATE_REQUESTED}get updateComplete(){return this._updatePromise}shouldUpdate(_changedProperties){return!0}update(_changedProperties){if(this._reflectingProperties!==void 0&&0<this._reflectingProperties.size){for(const[k,v]of this._reflectingProperties){this._propertyToAttribute(k,this[k],v)}this._reflectingProperties=void 0}}updated(_changedProperties){}firstUpdated(_changedProperties){}}_exports.UpdatingElement$1=_exports.UpdatingElement=UpdatingElement;UpdatingElement._attributeToPropertyMap=new Map;UpdatingElement._finalized=!0;UpdatingElement._classProperties=new Map;UpdatingElement.properties={};var updatingElement={notEqual:notEqual,UpdatingElement:UpdatingElement};_exports.$updatingElement=updatingElement;const directives=new WeakMap,directive=f=>(...args)=>{const d=f(...args);directives.set(d,!0);return d};_exports.directive$1=_exports.directive=directive;const isDirective=o=>"function"===typeof o&&directives.has(o);_exports.isDirective$1=_exports.isDirective=isDirective;var directive$1={directive:directive,isDirective:isDirective};_exports.$directive=directive$1;const isCEPolyfill=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0;_exports.isCEPolyfill=isCEPolyfill;const reparentNodes=(container,start,end=null,before=null)=>{let node=start;while(node!==end){const n=node.nextSibling;container.insertBefore(node,before);node=n}};_exports.reparentNodes$1=_exports.reparentNodes=reparentNodes;const removeNodes=(container,startNode,endNode=null)=>{let node=startNode;while(node!==endNode){const n=node.nextSibling;container.removeChild(node);node=n}};_exports.removeNodes$1=_exports.removeNodes=removeNodes;var dom={isCEPolyfill:isCEPolyfill,reparentNodes:reparentNodes,removeNodes:removeNodes};_exports.$dom=dom;const noChange={};_exports.noChange$1=_exports.noChange=noChange;var part={noChange:noChange};_exports.$part=part;const marker=`{{lit-${(Math.random()+"").slice(2)}}}`;_exports.marker=marker;const nodeMarker=`<!--${marker}-->`;_exports.nodeMarker=nodeMarker;const markerRegex=new RegExp(`${marker}|${nodeMarker}`);_exports.markerRegex=markerRegex;const boundAttributeSuffix="$lit$";_exports.boundAttributeSuffix=boundAttributeSuffix;class Template{constructor(result,element){this.parts=[];this.element=element;let index=-1,partIndex=0;const nodesToRemove=[],_prepareTemplate=template=>{const content=template.content,walker=document.createTreeWalker(content,133,null,!1);let previousNode,currentNode;while(walker.nextNode()){index++;previousNode=currentNode;const node=currentNode=walker.currentNode;if(1===node.nodeType){if(node.hasAttributes()){const attributes=node.attributes;let count=0;for(let i=0;i<attributes.length;i++){if(0<=attributes[i].value.indexOf(marker)){count++}}while(0<count--){const stringForPart=result.strings[partIndex],name=lastAttributeNameRegex.exec(stringForPart)[2],attributeLookupName=name.toLowerCase()+boundAttributeSuffix,attributeValue=node.getAttribute(attributeLookupName),strings=attributeValue.split(markerRegex);this.parts.push({type:"attribute",index,name,strings});node.removeAttribute(attributeLookupName);partIndex+=strings.length-1}}if("TEMPLATE"===node.tagName){_prepareTemplate(node)}}else if(3===node.nodeType){const nodeValue=node.nodeValue;if(0>nodeValue.indexOf(marker)){continue}const parent=node.parentNode,strings=nodeValue.split(markerRegex),lastIndex=strings.length-1;partIndex+=lastIndex;for(let i=0;i<lastIndex;i++){parent.insertBefore(""===strings[i]?createMarker():document.createTextNode(strings[i]),node);this.parts.push({type:"node",index:index++})}parent.insertBefore(""===strings[lastIndex]?createMarker():document.createTextNode(strings[lastIndex]),node);nodesToRemove.push(node)}else if(8===node.nodeType){if(node.nodeValue===marker){const parent=node.parentNode,previousSibling=node.previousSibling;if(null===previousSibling||previousSibling!==previousNode||previousSibling.nodeType!==Node.TEXT_NODE){parent.insertBefore(createMarker(),node)}else{index--}this.parts.push({type:"node",index:index++});nodesToRemove.push(node);if(null===node.nextSibling){parent.insertBefore(createMarker(),node)}else{index--}currentNode=previousNode;partIndex++}else{let i=-1;while(-1!==(i=node.nodeValue.indexOf(marker,i+1))){this.parts.push({type:"node",index:-1})}}}}};_prepareTemplate(element);for(const n of nodesToRemove){n.parentNode.removeChild(n)}}}_exports.Template$1=_exports.Template=Template;const isTemplatePartActive=part=>-1!==part.index;_exports.isTemplatePartActive$1=_exports.isTemplatePartActive=isTemplatePartActive;const createMarker=()=>document.createComment("");_exports.createMarker$1=_exports.createMarker=createMarker;const lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;_exports.lastAttributeNameRegex=lastAttributeNameRegex;var template={marker:marker,nodeMarker:nodeMarker,markerRegex:markerRegex,boundAttributeSuffix:boundAttributeSuffix,Template:Template,isTemplatePartActive:isTemplatePartActive,createMarker:createMarker,lastAttributeNameRegex:lastAttributeNameRegex};_exports.$template=template;class TemplateInstance{constructor(template,processor,options){this._parts=[];this.template=template;this.processor=processor;this.options=options}update(values){let i=0;for(const part of this._parts){if(part!==void 0){part.setValue(values[i])}i++}for(const part of this._parts){if(part!==void 0){part.commit()}}}_clone(){const fragment=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),parts=this.template.parts;let partIndex=0,nodeIndex=0;const _prepareInstance=fragment=>{const walker=document.createTreeWalker(fragment,133,null,!1);let node=walker.nextNode();while(partIndex<parts.length&&null!==node){const part=parts[partIndex];if(!isTemplatePartActive(part)){this._parts.push(void 0);partIndex++}else if(nodeIndex===part.index){if("node"===part.type){const part=this.processor.handleTextExpression(this.options);part.insertAfterNode(node);this._parts.push(part)}else{this._parts.push(...this.processor.handleAttributeExpressions(node,part.name,part.strings,this.options))}partIndex++}else{nodeIndex++;if("TEMPLATE"===node.nodeName){_prepareInstance(node.content)}node=walker.nextNode()}}};_prepareInstance(fragment);if(isCEPolyfill){document.adoptNode(fragment);customElements.upgrade(fragment)}return fragment}}_exports.TemplateInstance$1=_exports.TemplateInstance=TemplateInstance;var templateInstance={TemplateInstance:TemplateInstance};_exports.$templateInstance=templateInstance;class TemplateResult{constructor(strings,values,type,processor){this.strings=strings;this.values=values;this.type=type;this.processor=processor}getHTML(){const endIndex=this.strings.length-1;let html="";for(let i=0;i<endIndex;i++){const s=this.strings[i];let addedMarker=!1;html+=s.replace(lastAttributeNameRegex,(_match,whitespace,name,value)=>{addedMarker=!0;return whitespace+name+boundAttributeSuffix+value+marker});if(!addedMarker){html+=nodeMarker}}return html+this.strings[endIndex]}getTemplateElement(){const template=document.createElement("template");template.innerHTML=this.getHTML();return template}}_exports.TemplateResult$2=_exports.TemplateResult$1=_exports.TemplateResult=TemplateResult;class SVGTemplateResult extends TemplateResult{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const template=super.getTemplateElement(),content=template.content,svgElement=content.firstChild;content.removeChild(svgElement);reparentNodes(content,svgElement.firstChild);return template}}_exports.SVGTemplateResult$1=_exports.SVGTemplateResult=SVGTemplateResult;var templateResult={TemplateResult:TemplateResult,SVGTemplateResult:SVGTemplateResult};_exports.$templateResult=templateResult;const isPrimitive=value=>null===value||!("object"===typeof value||"function"===typeof value);_exports.isPrimitive$1=_exports.isPrimitive=isPrimitive;class AttributeCommitter{constructor(element,name,strings){this.dirty=!0;this.element=element;this.name=name;this.strings=strings;this.parts=[];for(let i=0;i<strings.length-1;i++){this.parts[i]=this._createPart()}}_createPart(){return new AttributePart(this)}_getValue(){const strings=this.strings,l=strings.length-1;let text="";for(let i=0;i<l;i++){text+=strings[i];const part=this.parts[i];if(part!==void 0){const v=part.value;if(null!=v&&(Array.isArray(v)||"string"!==typeof v&&v[Symbol.iterator])){for(const t of v){text+="string"===typeof t?t:t+""}}else{text+="string"===typeof v?v:v+""}}}text+=strings[l];return text}commit(){if(this.dirty){this.dirty=!1;this.element.setAttribute(this.name,this._getValue())}}}_exports.AttributeCommitter$1=_exports.AttributeCommitter=AttributeCommitter;class AttributePart{constructor(comitter){this.value=void 0;this.committer=comitter}setValue(value){if(value!==noChange&&(!isPrimitive(value)||value!==this.value)){this.value=value;if(!isDirective(value)){this.committer.dirty=!0}}}commit(){while(isDirective(this.value)){const directive$$1=this.value;this.value=noChange;directive$$1(this)}if(this.value===noChange){return}this.committer.commit()}}_exports.AttributePart$1=_exports.AttributePart=AttributePart;class NodePart{constructor(options){this.value=void 0;this._pendingValue=void 0;this.options=options}appendInto(container){this.startNode=container.appendChild(createMarker());this.endNode=container.appendChild(createMarker())}insertAfterNode(ref){this.startNode=ref;this.endNode=ref.nextSibling}appendIntoPart(part){part._insert(this.startNode=createMarker());part._insert(this.endNode=createMarker())}insertAfterPart(ref){ref._insert(this.startNode=createMarker());this.endNode=ref.endNode;ref.endNode=this.startNode}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}const value=this._pendingValue;if(value===noChange){return}if(isPrimitive(value)){if(value!==this.value){this._commitText(value)}}else if(value instanceof TemplateResult){this._commitTemplateResult(value)}else if(value instanceof Node){this._commitNode(value)}else if(Array.isArray(value)||value[Symbol.iterator]){this._commitIterable(value)}else{this._commitText(value)}}_insert(node){this.endNode.parentNode.insertBefore(node,this.endNode)}_commitNode(value){if(this.value===value){return}this.clear();this._insert(value);this.value=value}_commitText(value){const node=this.startNode.nextSibling;value=null==value?"":value;if(node===this.endNode.previousSibling&&node.nodeType===Node.TEXT_NODE){node.textContent=value}else{this._commitNode(document.createTextNode("string"===typeof value?value:value+""))}this.value=value}_commitTemplateResult(value){const template=this.options.templateFactory(value);if(this.value&&this.value.template===template){this.value.update(value.values)}else{const instance=new TemplateInstance(template,value.processor,this.options),fragment=instance._clone();instance.update(value.values);this._commitNode(fragment);this.value=instance}}_commitIterable(value){if(!Array.isArray(this.value)){this.value=[];this.clear()}const itemParts=this.value;let partIndex=0,itemPart;for(const item of value){itemPart=itemParts[partIndex];if(itemPart===void 0){itemPart=new NodePart(this.options);itemParts.push(itemPart);if(0===partIndex){itemPart.appendIntoPart(this)}else{itemPart.insertAfterPart(itemParts[partIndex-1])}}itemPart.setValue(item);itemPart.commit();partIndex++}if(partIndex<itemParts.length){itemParts.length=partIndex;this.clear(itemPart&&itemPart.endNode)}}clear(startNode=this.startNode){removeNodes(this.startNode.parentNode,startNode.nextSibling,this.endNode)}}_exports.NodePart$1=_exports.NodePart=NodePart;class BooleanAttributePart{constructor(element,name,strings){this.value=void 0;this._pendingValue=void 0;if(2!==strings.length||""!==strings[0]||""!==strings[1]){throw new Error("Boolean attributes can only contain a single expression")}this.element=element;this.name=name;this.strings=strings}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}const value=!!this._pendingValue;if(this.value!==value){if(value){this.element.setAttribute(this.name,"")}else{this.element.removeAttribute(this.name)}}this.value=value;this._pendingValue=noChange}}_exports.BooleanAttributePart$1=_exports.BooleanAttributePart=BooleanAttributePart;class PropertyCommitter extends AttributeCommitter{constructor(element,name,strings){super(element,name,strings);this.single=2===strings.length&&""===strings[0]&&""===strings[1]}_createPart(){return new PropertyPart(this)}_getValue(){if(this.single){return this.parts[0].value}return super._getValue()}commit(){if(this.dirty){this.dirty=!1;this.element[this.name]=this._getValue()}}}_exports.PropertyCommitter$1=_exports.PropertyCommitter=PropertyCommitter;class PropertyPart extends AttributePart{}_exports.PropertyPart$1=_exports.PropertyPart=PropertyPart;let eventOptionsSupported=!1;try{const options={get capture(){eventOptionsSupported=!0;return!1}};window.addEventListener("test",options,options);window.removeEventListener("test",options,options)}catch(_e){}class EventPart{constructor(element,eventName,eventContext){this.value=void 0;this._pendingValue=void 0;this.element=element;this.eventName=eventName;this.eventContext=eventContext;this._boundHandleEvent=e=>this.handleEvent(e)}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}const newListener=this._pendingValue,oldListener=this.value,shouldRemoveListener=null==newListener||null!=oldListener&&(newListener.capture!==oldListener.capture||newListener.once!==oldListener.once||newListener.passive!==oldListener.passive),shouldAddListener=null!=newListener&&(null==oldListener||shouldRemoveListener);if(shouldRemoveListener){this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options)}if(shouldAddListener){this._options=getOptions(newListener);this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)}this.value=newListener;this._pendingValue=noChange}handleEvent(event){if("function"===typeof this.value){this.value.call(this.eventContext||this.element,event)}else{this.value.handleEvent(event)}}}_exports.EventPart$1=_exports.EventPart=EventPart;const getOptions=o=>o&&(eventOptionsSupported?{capture:o.capture,passive:o.passive,once:o.once}:o.capture);var parts={isPrimitive:isPrimitive,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,NodePart:NodePart,BooleanAttributePart:BooleanAttributePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,EventPart:EventPart};_exports.$parts=parts;class DefaultTemplateProcessor{handleAttributeExpressions(element,name,strings,options){const prefix=name[0];if("."===prefix){const comitter=new PropertyCommitter(element,name.slice(1),strings);return comitter.parts}if("@"===prefix){return[new EventPart(element,name.slice(1),options.eventContext)]}if("?"===prefix){return[new BooleanAttributePart(element,name.slice(1),strings)]}const comitter=new AttributeCommitter(element,name,strings);return comitter.parts}handleTextExpression(options){return new NodePart(options)}}_exports.DefaultTemplateProcessor$1=_exports.DefaultTemplateProcessor=DefaultTemplateProcessor;const defaultTemplateProcessor=new DefaultTemplateProcessor;_exports.defaultTemplateProcessor$1=_exports.defaultTemplateProcessor=defaultTemplateProcessor;var defaultTemplateProcessor$1={DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor};_exports.$defaultTemplateProcessor=defaultTemplateProcessor$1;function templateFactory(result){let templateCache=templateCaches.get(result.type);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(result.type,templateCache)}let template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}const key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){template=new Template(result,result.getTemplateElement());templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}const templateCaches=new Map;_exports.templateCaches$1=_exports.templateCaches=templateCaches;var templateFactory$1={templateFactory:templateFactory,templateCaches:templateCaches};_exports.$templateFactory=templateFactory$1;const parts$1=new WeakMap;_exports.parts$1=_exports.parts=parts$1;const render=(result,container,options)=>{let part=parts$1.get(container);if(part===void 0){removeNodes(container,container.firstChild);parts$1.set(container,part=new NodePart(Object.assign({templateFactory},options)));part.appendInto(container)}part.setValue(result);part.commit()};_exports.render$2=_exports.render=render;var render$1={parts:parts$1,render:render};_exports.$render=render$1;const html=(strings,...values)=>new TemplateResult(strings,values,"html",defaultTemplateProcessor);_exports.html$2=_exports.html$1=_exports.html=html;const svg=(strings,...values)=>new SVGTemplateResult(strings,values,"svg",defaultTemplateProcessor);_exports.svg$2=_exports.svg$1=_exports.svg=svg;var litHtml={html:html,svg:svg,DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor,directive:directive,isDirective:isDirective,removeNodes:removeNodes,reparentNodes:reparentNodes,noChange:noChange,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,BooleanAttributePart:BooleanAttributePart,EventPart:EventPart,isPrimitive:isPrimitive,NodePart:NodePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,parts:parts$1,render:render,templateCaches:templateCaches,templateFactory:templateFactory,TemplateInstance:TemplateInstance,SVGTemplateResult:SVGTemplateResult,TemplateResult:TemplateResult,createMarker:createMarker,isTemplatePartActive:isTemplatePartActive,Template:Template};_exports.$litHtml=litHtml;const walkerNodeFilter=NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT;function removeNodesFromTemplate(template,nodesToRemove){const{element:{content},parts}=template,walker=document.createTreeWalker(content,walkerNodeFilter,null,!1);let partIndex=nextActiveIndexInTemplateParts(parts),part=parts[partIndex],nodeIndex=-1,removeCount=0;const nodesToRemoveInTemplate=[];let currentRemovingNode=null;while(walker.nextNode()){nodeIndex++;const node=walker.currentNode;if(node.previousSibling===currentRemovingNode){currentRemovingNode=null}if(nodesToRemove.has(node)){nodesToRemoveInTemplate.push(node);if(null===currentRemovingNode){currentRemovingNode=node}}if(null!==currentRemovingNode){removeCount++}while(part!==void 0&&part.index===nodeIndex){part.index=null!==currentRemovingNode?-1:part.index-removeCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex);part=parts[partIndex]}}nodesToRemoveInTemplate.forEach(n=>n.parentNode.removeChild(n))}const countNodes=node=>{let count=node.nodeType===Node.DOCUMENT_FRAGMENT_NODE?0:1;const walker=document.createTreeWalker(node,walkerNodeFilter,null,!1);while(walker.nextNode()){count++}return count},nextActiveIndexInTemplateParts=(parts,startIndex=-1)=>{for(let i=startIndex+1;i<parts.length;i++){const part=parts[i];if(isTemplatePartActive(part)){return i}}return-1};function insertNodeIntoTemplate(template,node,refNode=null){const{element:{content},parts}=template;if(null===refNode||refNode===void 0){content.appendChild(node);return}const walker=document.createTreeWalker(content,walkerNodeFilter,null,!1);let partIndex=nextActiveIndexInTemplateParts(parts),insertCount=0,walkerIndex=-1;while(walker.nextNode()){walkerIndex++;const walkerNode=walker.currentNode;if(walkerNode===refNode){insertCount=countNodes(node);refNode.parentNode.insertBefore(node,refNode)}while(-1!==partIndex&&parts[partIndex].index===walkerIndex){if(0<insertCount){while(-1!==partIndex){parts[partIndex].index+=insertCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}return}partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}}}var modifyTemplate={removeNodesFromTemplate:removeNodesFromTemplate,insertNodeIntoTemplate:insertNodeIntoTemplate};_exports.$modifyTemplate=modifyTemplate;const getTemplateCacheKey=(type,scopeName)=>`${type}--${scopeName}`;let compatibleShadyCSSVersion=!0;if("undefined"===typeof window.ShadyCSS){compatibleShadyCSSVersion=!1}else if("undefined"===typeof window.ShadyCSS.prepareTemplateDom){console.warn(`Incompatible ShadyCSS version detected.`+`Please update to at least @webcomponents/webcomponentsjs@2.0.2 and`+`@webcomponents/shadycss@1.3.1.`);compatibleShadyCSSVersion=!1}const shadyTemplateFactory=scopeName=>result=>{const cacheKey=getTemplateCacheKey(result.type,scopeName);let templateCache=templateCaches.get(cacheKey);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(cacheKey,templateCache)}let template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}const key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){const element=result.getTemplateElement();if(compatibleShadyCSSVersion){window.ShadyCSS.prepareTemplateDom(element,scopeName)}template=new Template(result,element);templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=scopeName=>{TEMPLATE_TYPES.forEach(type=>{const templates=templateCaches.get(getTemplateCacheKey(type,scopeName));if(templates!==void 0){templates.keyString.forEach(template=>{const{element:{content}}=template,styles=new Set;Array.from(content.querySelectorAll("style")).forEach(s=>{styles.add(s)});removeNodesFromTemplate(template,styles)})}})},shadyRenderSet=new Set,prepareTemplateStyles=(renderedDOM,template,scopeName)=>{shadyRenderSet.add(scopeName);const styles=renderedDOM.querySelectorAll("style");if(0===styles.length){return}const condensedStyle=document.createElement("style");for(let i=0;i<styles.length;i++){const style=styles[i];style.parentNode.removeChild(style);condensedStyle.textContent+=style.textContent}removeStylesFromLitTemplates(scopeName);insertNodeIntoTemplate(template,condensedStyle,template.element.content.firstChild);window.ShadyCSS.prepareTemplateStyles(template.element,scopeName);if(window.ShadyCSS.nativeShadow){const style=template.element.content.querySelector("style");renderedDOM.insertBefore(style.cloneNode(!0),renderedDOM.firstChild)}else{template.element.content.insertBefore(condensedStyle,template.element.content.firstChild);const removes=new Set([condensedStyle]);removeNodesFromTemplate(template,removes)}},render$2=(result,container,options)=>{const scopeName=options.scopeName,hasRendered=parts$1.has(container),needsScoping=container instanceof ShadowRoot&&compatibleShadyCSSVersion&&result instanceof TemplateResult,firstScopeRender=needsScoping&&!shadyRenderSet.has(scopeName),renderContainer=firstScopeRender?document.createDocumentFragment():container;render(result,renderContainer,Object.assign({templateFactory:shadyTemplateFactory(scopeName)},options));if(firstScopeRender){const part=parts$1.get(renderContainer);parts$1.delete(renderContainer);if(part.value instanceof TemplateInstance){prepareTemplateStyles(renderContainer,part.value.template,scopeName)}removeNodes(container,container.firstChild);container.appendChild(renderContainer);parts$1.set(container,part)}if(!hasRendered&&needsScoping){window.ShadyCSS.styleElement(container.host)}};_exports.render$1=render$2;var shadyRender={render:render$2,html:html,svg:svg,TemplateResult:TemplateResult};_exports.$shadyRender=shadyRender;class LitElement extends UpdatingElement{update(changedProperties){super.update(changedProperties);const templateResult=this.render();if(templateResult instanceof TemplateResult){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}}render(){}}_exports.LitElement=LitElement;LitElement.render=render$2;var litElement={LitElement:LitElement,notEqual:notEqual,UpdatingElement:UpdatingElement,customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions,html:html,svg:svg};_exports.$litElement=litElement;const previousValues=new WeakMap,unsafeHTML=directive(value=>part=>{if(!(part instanceof NodePart)){throw new Error("unsafeHTML can only be used in text bindings")}const previousValue=previousValues.get(part);if(previousValue===value&&isPrimitive(value)){return}const tmp=document.createElement("template");tmp.innerHTML=value;part.setValue(document.importNode(tmp.content,!0));previousValues.set(part,value)});_exports.unsafeHTML=unsafeHTML;var unsafeHtml={unsafeHTML:unsafeHTML};_exports.$unsafeHtml=unsafeHtml;const _state=new WeakMap,until=directive((...args)=>part=>{let state=_state.get(part);if(state===void 0){state={values:[]};_state.set(part,state)}const previousValues=state.values;let changedSinceLastRender=!1;state.values=args;for(let i=0;i<args.length;i++){const value=args[i];if(value===previousValues[i]&&!changedSinceLastRender){continue}changedSinceLastRender=!0;if(isPrimitive(value)||"function"!==typeof value.then){part.setValue(value);state.lastRenderedIndex=i;break}state.lastRenderedIndex=void 0;Promise.resolve(value).then(resolvedValue=>{const index=state.values.indexOf(value);if(-1<index&&(state.lastRenderedIndex===void 0||index<state.lastRenderedIndex)){state.lastRenderedIndex=index;part.setValue(resolvedValue);part.commit()}})}});_exports.until=until;var until$1={until:until};_exports.$until=until$1;const formatDate=timestring=>{const pad=v=>10>v?`0${v}`:v,dateString=timestring.split("T")[0],date=new Date(dateString),weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][date.getUTCDay()],day=pad(date.getUTCDate()),month=["January","February","March","April","May","June","July","August","September","October","November","December"][date.getUTCMonth()],year=date.getUTCFullYear();return`${weekday}, ${day} ${month} ${year}`};_exports.formatDate=formatDate;const getLink=link=>link?link.replace("content.",""):"";_exports.getLink=getLink;var misc={formatDate:formatDate,getLink:getLink};_exports.$misc=misc;var article=({content,date_gmt,errorMessage,link,title})=>html` | ||
ul { | ||
list-style-type: var(--ul-list-style-type, inherit); | ||
} | ||
p { | ||
clear: var(--p-clear, inherit); | ||
text-align: var(--p-text-align, inherit); | ||
} | ||
@@ -61,0 +66,0 @@ </style> |
@@ -40,3 +40,3 @@ /** | ||
var precacheConfig = [["index.html","95a46d666346f77973e7a0558c5a4102"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","ce11b961198e6e44360bb6c5366c1480"],["src/templates/articles/article.js","d66eaf0abdae227d7b6d20ed190dec12"],["src/templates/articles/articles.js","df135ef79b3ca347c924a024bdbe2ec2"],["src/templates/loading.js","168db4f5fe426d7f0c83df0303c649d5"],["src/templates/styles/x-postpress.js","dacb90b6661e9468e4717326e3cc68a7"],["src/utilities/misc.js","2985fb4f08b332449ab1d17c449b928b"]]; | ||
var precacheConfig = [["index.html","95a46d666346f77973e7a0558c5a4102"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","ce11b961198e6e44360bb6c5366c1480"],["src/templates/articles/article.js","d66eaf0abdae227d7b6d20ed190dec12"],["src/templates/articles/articles.js","df135ef79b3ca347c924a024bdbe2ec2"],["src/templates/loading.js","168db4f5fe426d7f0c83df0303c649d5"],["src/templates/styles/x-postpress.js","ee311a2ccc2a9b8db642e4bd684b8697"],["src/utilities/misc.js","2985fb4f08b332449ab1d17c449b928b"]]; | ||
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); | ||
@@ -43,0 +43,0 @@ |
@@ -46,6 +46,11 @@ define(["exports","/node_modules/@polymer/lit-element/lit-element.js"],function(_exports,_litElement){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.default=void 0;var _default=_litElement.html` | ||
ul { | ||
list-style-type: var(--ul-list-style-type, inherit); | ||
} | ||
p { | ||
clear: var(--p-clear, inherit); | ||
text-align: var(--p-text-align, inherit); | ||
} | ||
</style> | ||
`;_exports.default=_default}); |
@@ -40,3 +40,3 @@ /** | ||
var precacheConfig = [["index.html","f63f0e54dccff488c04bb9c138f22626"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","c6bf94f86af33e020deb7be2f6bee8c5"]]; | ||
var precacheConfig = [["index.html","f63f0e54dccff488c04bb9c138f22626"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","ac6f11c8afbc2d36bc11fc367af1da0a"]]; | ||
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); | ||
@@ -43,0 +43,0 @@ |
@@ -57,4 +57,9 @@ const customElement=tagName=>clazz=>{window.customElements.define(tagName,clazz);return clazz},property=options=>(proto,name)=>{proto.constructor.createProperty(name,options)},query=_query((target,selector)=>target.querySelector(selector)),queryAll=_query((target,selector)=>target.querySelectorAll(selector));function _query(queryFn){return selector=>(proto,propName)=>{Object.defineProperty(proto,propName,{get(){return queryFn(this.renderRoot,selector)},enumerable:!0,configurable:!0})}}const eventOptions=options=>(proto,name)=>{Object.assign(proto[name],options)};var decorators={customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions};const fromBooleanAttribute=value=>null!==value,toBooleanAttribute=value=>value?"":null,notEqual=(value,old)=>{return old!==value&&(old===old||value===value)},defaultPropertyDeclaration={attribute:!0,type:String,reflect:!1,hasChanged:notEqual},microtaskPromise=new Promise(resolve=>resolve(!0)),STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=1<<2,STATE_IS_REFLECTING=1<<3;class UpdatingElement extends HTMLElement{constructor(){super();this._updateState=0;this._instanceProperties=void 0;this._updatePromise=microtaskPromise;this._changedProperties=new Map;this._reflectingProperties=void 0;this.initialize()}static get observedAttributes(){this._finalize();const attributes=[];for(const[p,v]of this._classProperties){const attr=this._attributeNameForProperty(p,v);if(attr!==void 0){this._attributeToPropertyMap.set(attr,p);attributes.push(attr)}}return attributes}static createProperty(name,options=defaultPropertyDeclaration){if(!this.hasOwnProperty("_classProperties")){this._classProperties=new Map;const superProperties=Object.getPrototypeOf(this)._classProperties;if(superProperties!==void 0){superProperties.forEach((v,k)=>this._classProperties.set(k,v))}}this._classProperties.set(name,options);if(this.prototype.hasOwnProperty(name)){return}const key="symbol"===typeof name?Symbol():`__${name}`;Object.defineProperty(this.prototype,name,{get(){return this[key]},set(value){const oldValue=this[name];this[key]=value;this._requestPropertyUpdate(name,oldValue,options)},configurable:!0,enumerable:!0})}static _finalize(){if(this.hasOwnProperty("_finalized")&&this._finalized){return}const superCtor=Object.getPrototypeOf(this);if("function"===typeof superCtor._finalize){superCtor._finalize()}this._finalized=!0;this._attributeToPropertyMap=new Map;const props=this.properties,propKeys=[...Object.getOwnPropertyNames(props),...("function"===typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(props):[])];for(const p of propKeys){this.createProperty(p,props[p])}}static _attributeNameForProperty(name,options){const attribute=options!==void 0&&options.attribute;return!1===attribute?void 0:"string"===typeof attribute?attribute:"string"===typeof name?name.toLowerCase():void 0}static _valueHasChanged(value,old,hasChanged=notEqual){return hasChanged(value,old)}static _propertyValueFromAttribute(value,options){const type=options&&options.type;if(type===void 0){return value}const fromAttribute=type===Boolean?fromBooleanAttribute:"function"===typeof type?type:type.fromAttribute;return fromAttribute?fromAttribute(value):value}static _propertyValueToAttribute(value,options){if(options===void 0||options.reflect===void 0){return}const toAttribute=options.type===Boolean?toBooleanAttribute:options.type&&options.type.toAttribute||String;return toAttribute(value)}initialize(){this.renderRoot=this.createRenderRoot();this._saveInstanceProperties()}_saveInstanceProperties(){for(const[p]of this.constructor._classProperties){if(this.hasOwnProperty(p)){const value=this[p];delete this[p];if(!this._instanceProperties){this._instanceProperties=new Map}this._instanceProperties.set(p,value)}}}_applyInstanceProperties(){for(const[p,v]of this._instanceProperties){this[p]=v}this._instanceProperties=void 0}createRenderRoot(){return this.attachShadow({mode:"open"})}connectedCallback(){if(this._updateState&STATE_HAS_UPDATED){if(window.ShadyCSS!==void 0){window.ShadyCSS.styleElement(this)}}else{this.requestUpdate()}}disconnectedCallback(){}attributeChangedCallback(name,old,value){if(old!==value){this._attributeToProperty(name,value)}}_propertyToAttribute(name,value,options=defaultPropertyDeclaration){const ctor=this.constructor,attrValue=ctor._propertyValueToAttribute(value,options);if(attrValue!==void 0){const attr=ctor._attributeNameForProperty(name,options);if(attr!==void 0){this._updateState=this._updateState|STATE_IS_REFLECTING;if(null===attrValue){this.removeAttribute(attr)}else{this.setAttribute(attr,attrValue)}this._updateState=this._updateState&~STATE_IS_REFLECTING}}}_attributeToProperty(name,value){if(!(this._updateState&STATE_IS_REFLECTING)){const ctor=this.constructor,propName=ctor._attributeToPropertyMap.get(name);if(propName!==void 0){const options=ctor._classProperties.get(propName);this[propName]=ctor._propertyValueFromAttribute(value,options)}}}requestUpdate(name,oldValue){if(name!==void 0){const options=this.constructor._classProperties.get(name)||defaultPropertyDeclaration;return this._requestPropertyUpdate(name,oldValue,options)}return this._invalidate()}_requestPropertyUpdate(name,oldValue,options){if(!this.constructor._valueHasChanged(this[name],oldValue,options.hasChanged)){return this.updateComplete}if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}if(!0===options.reflect){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}return this._invalidate()}async _invalidate(){if(!this._hasRequestedUpdate){this._updateState=this._updateState|STATE_UPDATE_REQUESTED;let resolver;const previousValidatePromise=this._updatePromise;this._updatePromise=new Promise(r=>resolver=r);await previousValidatePromise;this._validate();resolver(!this._hasRequestedUpdate)}return this.updateComplete}get _hasRequestedUpdate(){return this._updateState&STATE_UPDATE_REQUESTED}_validate(){if(this._instanceProperties){this._applyInstanceProperties()}if(this.shouldUpdate(this._changedProperties)){const changedProperties=this._changedProperties;this.update(changedProperties);this._markUpdated();if(!(this._updateState&STATE_HAS_UPDATED)){this._updateState=this._updateState|STATE_HAS_UPDATED;this.firstUpdated(changedProperties)}this.updated(changedProperties)}else{this._markUpdated()}}_markUpdated(){this._changedProperties=new Map;this._updateState=this._updateState&~STATE_UPDATE_REQUESTED}get updateComplete(){return this._updatePromise}shouldUpdate(_changedProperties){return!0}update(_changedProperties){if(this._reflectingProperties!==void 0&&0<this._reflectingProperties.size){for(const[k,v]of this._reflectingProperties){this._propertyToAttribute(k,this[k],v)}this._reflectingProperties=void 0}}updated(_changedProperties){}firstUpdated(_changedProperties){}}UpdatingElement._attributeToPropertyMap=new Map;UpdatingElement._finalized=!0;UpdatingElement._classProperties=new Map;UpdatingElement.properties={};var updatingElement={notEqual:notEqual,UpdatingElement:UpdatingElement};const directives=new WeakMap,directive=f=>(...args)=>{const d=f(...args);directives.set(d,!0);return d},isDirective=o=>"function"===typeof o&&directives.has(o);var directive$1={directive:directive,isDirective:isDirective};const isCEPolyfill=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0,reparentNodes=(container,start,end=null,before=null)=>{let node=start;while(node!==end){const n=node.nextSibling;container.insertBefore(node,before);node=n}},removeNodes=(container,startNode,endNode=null)=>{let node=startNode;while(node!==endNode){const n=node.nextSibling;container.removeChild(node);node=n}};var dom={isCEPolyfill:isCEPolyfill,reparentNodes:reparentNodes,removeNodes:removeNodes};const noChange={};var part={noChange:noChange};const marker=`{{lit-${(Math.random()+"").slice(2)}}}`,nodeMarker=`<!--${marker}-->`,markerRegex=new RegExp(`${marker}|${nodeMarker}`),boundAttributeSuffix="$lit$";class Template{constructor(result,element){this.parts=[];this.element=element;let index=-1,partIndex=0;const nodesToRemove=[],_prepareTemplate=template=>{const content=template.content,walker=document.createTreeWalker(content,133,null,!1);let previousNode,currentNode;while(walker.nextNode()){index++;previousNode=currentNode;const node=currentNode=walker.currentNode;if(1===node.nodeType){if(node.hasAttributes()){const attributes=node.attributes;let count=0;for(let i=0;i<attributes.length;i++){if(0<=attributes[i].value.indexOf(marker)){count++}}while(0<count--){const stringForPart=result.strings[partIndex],name=lastAttributeNameRegex.exec(stringForPart)[2],attributeLookupName=name.toLowerCase()+boundAttributeSuffix,attributeValue=node.getAttribute(attributeLookupName),strings=attributeValue.split(markerRegex);this.parts.push({type:"attribute",index,name,strings});node.removeAttribute(attributeLookupName);partIndex+=strings.length-1}}if("TEMPLATE"===node.tagName){_prepareTemplate(node)}}else if(3===node.nodeType){const nodeValue=node.nodeValue;if(0>nodeValue.indexOf(marker)){continue}const parent=node.parentNode,strings=nodeValue.split(markerRegex),lastIndex=strings.length-1;partIndex+=lastIndex;for(let i=0;i<lastIndex;i++){parent.insertBefore(""===strings[i]?createMarker():document.createTextNode(strings[i]),node);this.parts.push({type:"node",index:index++})}parent.insertBefore(""===strings[lastIndex]?createMarker():document.createTextNode(strings[lastIndex]),node);nodesToRemove.push(node)}else if(8===node.nodeType){if(node.nodeValue===marker){const parent=node.parentNode,previousSibling=node.previousSibling;if(null===previousSibling||previousSibling!==previousNode||previousSibling.nodeType!==Node.TEXT_NODE){parent.insertBefore(createMarker(),node)}else{index--}this.parts.push({type:"node",index:index++});nodesToRemove.push(node);if(null===node.nextSibling){parent.insertBefore(createMarker(),node)}else{index--}currentNode=previousNode;partIndex++}else{let i=-1;while(-1!==(i=node.nodeValue.indexOf(marker,i+1))){this.parts.push({type:"node",index:-1})}}}}};_prepareTemplate(element);for(const n of nodesToRemove){n.parentNode.removeChild(n)}}}const isTemplatePartActive=part=>-1!==part.index,createMarker=()=>document.createComment(""),lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var template={marker:marker,nodeMarker:nodeMarker,markerRegex:markerRegex,boundAttributeSuffix:boundAttributeSuffix,Template:Template,isTemplatePartActive:isTemplatePartActive,createMarker:createMarker,lastAttributeNameRegex:lastAttributeNameRegex};class TemplateInstance{constructor(template,processor,options){this._parts=[];this.template=template;this.processor=processor;this.options=options}update(values){let i=0;for(const part of this._parts){if(part!==void 0){part.setValue(values[i])}i++}for(const part of this._parts){if(part!==void 0){part.commit()}}}_clone(){const fragment=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),parts=this.template.parts;let partIndex=0,nodeIndex=0;const _prepareInstance=fragment=>{const walker=document.createTreeWalker(fragment,133,null,!1);let node=walker.nextNode();while(partIndex<parts.length&&null!==node){const part=parts[partIndex];if(!isTemplatePartActive(part)){this._parts.push(void 0);partIndex++}else if(nodeIndex===part.index){if("node"===part.type){const part=this.processor.handleTextExpression(this.options);part.insertAfterNode(node);this._parts.push(part)}else{this._parts.push(...this.processor.handleAttributeExpressions(node,part.name,part.strings,this.options))}partIndex++}else{nodeIndex++;if("TEMPLATE"===node.nodeName){_prepareInstance(node.content)}node=walker.nextNode()}}};_prepareInstance(fragment);if(isCEPolyfill){document.adoptNode(fragment);customElements.upgrade(fragment)}return fragment}}var templateInstance={TemplateInstance:TemplateInstance};class TemplateResult{constructor(strings,values,type,processor){this.strings=strings;this.values=values;this.type=type;this.processor=processor}getHTML(){const endIndex=this.strings.length-1;let html="";for(let i=0;i<endIndex;i++){const s=this.strings[i];let addedMarker=!1;html+=s.replace(lastAttributeNameRegex,(_match,whitespace,name,value)=>{addedMarker=!0;return whitespace+name+boundAttributeSuffix+value+marker});if(!addedMarker){html+=nodeMarker}}return html+this.strings[endIndex]}getTemplateElement(){const template=document.createElement("template");template.innerHTML=this.getHTML();return template}}class SVGTemplateResult extends TemplateResult{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const template=super.getTemplateElement(),content=template.content,svgElement=content.firstChild;content.removeChild(svgElement);reparentNodes(content,svgElement.firstChild);return template}}var templateResult={TemplateResult:TemplateResult,SVGTemplateResult:SVGTemplateResult};const isPrimitive=value=>null===value||!("object"===typeof value||"function"===typeof value);class AttributeCommitter{constructor(element,name,strings){this.dirty=!0;this.element=element;this.name=name;this.strings=strings;this.parts=[];for(let i=0;i<strings.length-1;i++){this.parts[i]=this._createPart()}}_createPart(){return new AttributePart(this)}_getValue(){const strings=this.strings,l=strings.length-1;let text="";for(let i=0;i<l;i++){text+=strings[i];const part=this.parts[i];if(part!==void 0){const v=part.value;if(null!=v&&(Array.isArray(v)||"string"!==typeof v&&v[Symbol.iterator])){for(const t of v){text+="string"===typeof t?t:t+""}}else{text+="string"===typeof v?v:v+""}}}text+=strings[l];return text}commit(){if(this.dirty){this.dirty=!1;this.element.setAttribute(this.name,this._getValue())}}}class AttributePart{constructor(comitter){this.value=void 0;this.committer=comitter}setValue(value){if(value!==noChange&&(!isPrimitive(value)||value!==this.value)){this.value=value;if(!isDirective(value)){this.committer.dirty=!0}}}commit(){while(isDirective(this.value)){const directive$$1=this.value;this.value=noChange;directive$$1(this)}if(this.value===noChange){return}this.committer.commit()}}class NodePart{constructor(options){this.value=void 0;this._pendingValue=void 0;this.options=options}appendInto(container){this.startNode=container.appendChild(createMarker());this.endNode=container.appendChild(createMarker())}insertAfterNode(ref){this.startNode=ref;this.endNode=ref.nextSibling}appendIntoPart(part){part._insert(this.startNode=createMarker());part._insert(this.endNode=createMarker())}insertAfterPart(ref){ref._insert(this.startNode=createMarker());this.endNode=ref.endNode;ref.endNode=this.startNode}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}const value=this._pendingValue;if(value===noChange){return}if(isPrimitive(value)){if(value!==this.value){this._commitText(value)}}else if(value instanceof TemplateResult){this._commitTemplateResult(value)}else if(value instanceof Node){this._commitNode(value)}else if(Array.isArray(value)||value[Symbol.iterator]){this._commitIterable(value)}else{this._commitText(value)}}_insert(node){this.endNode.parentNode.insertBefore(node,this.endNode)}_commitNode(value){if(this.value===value){return}this.clear();this._insert(value);this.value=value}_commitText(value){const node=this.startNode.nextSibling;value=null==value?"":value;if(node===this.endNode.previousSibling&&node.nodeType===Node.TEXT_NODE){node.textContent=value}else{this._commitNode(document.createTextNode("string"===typeof value?value:value+""))}this.value=value}_commitTemplateResult(value){const template=this.options.templateFactory(value);if(this.value&&this.value.template===template){this.value.update(value.values)}else{const instance=new TemplateInstance(template,value.processor,this.options),fragment=instance._clone();instance.update(value.values);this._commitNode(fragment);this.value=instance}}_commitIterable(value){if(!Array.isArray(this.value)){this.value=[];this.clear()}const itemParts=this.value;let partIndex=0,itemPart;for(const item of value){itemPart=itemParts[partIndex];if(itemPart===void 0){itemPart=new NodePart(this.options);itemParts.push(itemPart);if(0===partIndex){itemPart.appendIntoPart(this)}else{itemPart.insertAfterPart(itemParts[partIndex-1])}}itemPart.setValue(item);itemPart.commit();partIndex++}if(partIndex<itemParts.length){itemParts.length=partIndex;this.clear(itemPart&&itemPart.endNode)}}clear(startNode=this.startNode){removeNodes(this.startNode.parentNode,startNode.nextSibling,this.endNode)}}class BooleanAttributePart{constructor(element,name,strings){this.value=void 0;this._pendingValue=void 0;if(2!==strings.length||""!==strings[0]||""!==strings[1]){throw new Error("Boolean attributes can only contain a single expression")}this.element=element;this.name=name;this.strings=strings}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}const value=!!this._pendingValue;if(this.value!==value){if(value){this.element.setAttribute(this.name,"")}else{this.element.removeAttribute(this.name)}}this.value=value;this._pendingValue=noChange}}class PropertyCommitter extends AttributeCommitter{constructor(element,name,strings){super(element,name,strings);this.single=2===strings.length&&""===strings[0]&&""===strings[1]}_createPart(){return new PropertyPart(this)}_getValue(){if(this.single){return this.parts[0].value}return super._getValue()}commit(){if(this.dirty){this.dirty=!1;this.element[this.name]=this._getValue()}}}class PropertyPart extends AttributePart{}let eventOptionsSupported=!1;try{const options={get capture(){eventOptionsSupported=!0;return!1}};window.addEventListener("test",options,options);window.removeEventListener("test",options,options)}catch(_e){}class EventPart{constructor(element,eventName,eventContext){this.value=void 0;this._pendingValue=void 0;this.element=element;this.eventName=eventName;this.eventContext=eventContext;this._boundHandleEvent=e=>this.handleEvent(e)}setValue(value){this._pendingValue=value}commit(){while(isDirective(this._pendingValue)){const directive$$1=this._pendingValue;this._pendingValue=noChange;directive$$1(this)}if(this._pendingValue===noChange){return}const newListener=this._pendingValue,oldListener=this.value,shouldRemoveListener=null==newListener||null!=oldListener&&(newListener.capture!==oldListener.capture||newListener.once!==oldListener.once||newListener.passive!==oldListener.passive),shouldAddListener=null!=newListener&&(null==oldListener||shouldRemoveListener);if(shouldRemoveListener){this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options)}if(shouldAddListener){this._options=getOptions(newListener);this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)}this.value=newListener;this._pendingValue=noChange}handleEvent(event){if("function"===typeof this.value){this.value.call(this.eventContext||this.element,event)}else{this.value.handleEvent(event)}}}const getOptions=o=>o&&(eventOptionsSupported?{capture:o.capture,passive:o.passive,once:o.once}:o.capture);var parts={isPrimitive:isPrimitive,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,NodePart:NodePart,BooleanAttributePart:BooleanAttributePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,EventPart:EventPart};class DefaultTemplateProcessor{handleAttributeExpressions(element,name,strings,options){const prefix=name[0];if("."===prefix){const comitter=new PropertyCommitter(element,name.slice(1),strings);return comitter.parts}if("@"===prefix){return[new EventPart(element,name.slice(1),options.eventContext)]}if("?"===prefix){return[new BooleanAttributePart(element,name.slice(1),strings)]}const comitter=new AttributeCommitter(element,name,strings);return comitter.parts}handleTextExpression(options){return new NodePart(options)}}const defaultTemplateProcessor=new DefaultTemplateProcessor;var defaultTemplateProcessor$1={DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor};function templateFactory(result){let templateCache=templateCaches.get(result.type);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(result.type,templateCache)}let template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}const key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){template=new Template(result,result.getTemplateElement());templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template}const templateCaches=new Map;var templateFactory$1={templateFactory:templateFactory,templateCaches:templateCaches};const parts$1=new WeakMap,render=(result,container,options)=>{let part=parts$1.get(container);if(part===void 0){removeNodes(container,container.firstChild);parts$1.set(container,part=new NodePart(Object.assign({templateFactory},options)));part.appendInto(container)}part.setValue(result);part.commit()};var render$1={parts:parts$1,render:render};const html=(strings,...values)=>new TemplateResult(strings,values,"html",defaultTemplateProcessor),svg=(strings,...values)=>new SVGTemplateResult(strings,values,"svg",defaultTemplateProcessor);var litHtml={html:html,svg:svg,DefaultTemplateProcessor:DefaultTemplateProcessor,defaultTemplateProcessor:defaultTemplateProcessor,directive:directive,isDirective:isDirective,removeNodes:removeNodes,reparentNodes:reparentNodes,noChange:noChange,AttributeCommitter:AttributeCommitter,AttributePart:AttributePart,BooleanAttributePart:BooleanAttributePart,EventPart:EventPart,isPrimitive:isPrimitive,NodePart:NodePart,PropertyCommitter:PropertyCommitter,PropertyPart:PropertyPart,parts:parts$1,render:render,templateCaches:templateCaches,templateFactory:templateFactory,TemplateInstance:TemplateInstance,SVGTemplateResult:SVGTemplateResult,TemplateResult:TemplateResult,createMarker:createMarker,isTemplatePartActive:isTemplatePartActive,Template:Template};const walkerNodeFilter=NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT;function removeNodesFromTemplate(template,nodesToRemove){const{element:{content},parts}=template,walker=document.createTreeWalker(content,walkerNodeFilter,null,!1);let partIndex=nextActiveIndexInTemplateParts(parts),part=parts[partIndex],nodeIndex=-1,removeCount=0;const nodesToRemoveInTemplate=[];let currentRemovingNode=null;while(walker.nextNode()){nodeIndex++;const node=walker.currentNode;if(node.previousSibling===currentRemovingNode){currentRemovingNode=null}if(nodesToRemove.has(node)){nodesToRemoveInTemplate.push(node);if(null===currentRemovingNode){currentRemovingNode=node}}if(null!==currentRemovingNode){removeCount++}while(part!==void 0&&part.index===nodeIndex){part.index=null!==currentRemovingNode?-1:part.index-removeCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex);part=parts[partIndex]}}nodesToRemoveInTemplate.forEach(n=>n.parentNode.removeChild(n))}const countNodes=node=>{let count=node.nodeType===Node.DOCUMENT_FRAGMENT_NODE?0:1;const walker=document.createTreeWalker(node,walkerNodeFilter,null,!1);while(walker.nextNode()){count++}return count},nextActiveIndexInTemplateParts=(parts,startIndex=-1)=>{for(let i=startIndex+1;i<parts.length;i++){const part=parts[i];if(isTemplatePartActive(part)){return i}}return-1};function insertNodeIntoTemplate(template,node,refNode=null){const{element:{content},parts}=template;if(null===refNode||refNode===void 0){content.appendChild(node);return}const walker=document.createTreeWalker(content,walkerNodeFilter,null,!1);let partIndex=nextActiveIndexInTemplateParts(parts),insertCount=0,walkerIndex=-1;while(walker.nextNode()){walkerIndex++;const walkerNode=walker.currentNode;if(walkerNode===refNode){insertCount=countNodes(node);refNode.parentNode.insertBefore(node,refNode)}while(-1!==partIndex&&parts[partIndex].index===walkerIndex){if(0<insertCount){while(-1!==partIndex){parts[partIndex].index+=insertCount;partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}return}partIndex=nextActiveIndexInTemplateParts(parts,partIndex)}}}var modifyTemplate={removeNodesFromTemplate:removeNodesFromTemplate,insertNodeIntoTemplate:insertNodeIntoTemplate};const getTemplateCacheKey=(type,scopeName)=>`${type}--${scopeName}`;let compatibleShadyCSSVersion=!0;if("undefined"===typeof window.ShadyCSS){compatibleShadyCSSVersion=!1}else if("undefined"===typeof window.ShadyCSS.prepareTemplateDom){console.warn(`Incompatible ShadyCSS version detected.`+`Please update to at least @webcomponents/webcomponentsjs@2.0.2 and`+`@webcomponents/shadycss@1.3.1.`);compatibleShadyCSSVersion=!1}const shadyTemplateFactory=scopeName=>result=>{const cacheKey=getTemplateCacheKey(result.type,scopeName);let templateCache=templateCaches.get(cacheKey);if(templateCache===void 0){templateCache={stringsArray:new WeakMap,keyString:new Map};templateCaches.set(cacheKey,templateCache)}let template=templateCache.stringsArray.get(result.strings);if(template!==void 0){return template}const key=result.strings.join(marker);template=templateCache.keyString.get(key);if(template===void 0){const element=result.getTemplateElement();if(compatibleShadyCSSVersion){window.ShadyCSS.prepareTemplateDom(element,scopeName)}template=new Template(result,element);templateCache.keyString.set(key,template)}templateCache.stringsArray.set(result.strings,template);return template},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=scopeName=>{TEMPLATE_TYPES.forEach(type=>{const templates=templateCaches.get(getTemplateCacheKey(type,scopeName));if(templates!==void 0){templates.keyString.forEach(template=>{const{element:{content}}=template,styles=new Set;Array.from(content.querySelectorAll("style")).forEach(s=>{styles.add(s)});removeNodesFromTemplate(template,styles)})}})},shadyRenderSet=new Set,prepareTemplateStyles=(renderedDOM,template,scopeName)=>{shadyRenderSet.add(scopeName);const styles=renderedDOM.querySelectorAll("style");if(0===styles.length){return}const condensedStyle=document.createElement("style");for(let i=0;i<styles.length;i++){const style=styles[i];style.parentNode.removeChild(style);condensedStyle.textContent+=style.textContent}removeStylesFromLitTemplates(scopeName);insertNodeIntoTemplate(template,condensedStyle,template.element.content.firstChild);window.ShadyCSS.prepareTemplateStyles(template.element,scopeName);if(window.ShadyCSS.nativeShadow){const style=template.element.content.querySelector("style");renderedDOM.insertBefore(style.cloneNode(!0),renderedDOM.firstChild)}else{template.element.content.insertBefore(condensedStyle,template.element.content.firstChild);const removes=new Set([condensedStyle]);removeNodesFromTemplate(template,removes)}},render$2=(result,container,options)=>{const scopeName=options.scopeName,hasRendered=parts$1.has(container),needsScoping=container instanceof ShadowRoot&&compatibleShadyCSSVersion&&result instanceof TemplateResult,firstScopeRender=needsScoping&&!shadyRenderSet.has(scopeName),renderContainer=firstScopeRender?document.createDocumentFragment():container;render(result,renderContainer,Object.assign({templateFactory:shadyTemplateFactory(scopeName)},options));if(firstScopeRender){const part=parts$1.get(renderContainer);parts$1.delete(renderContainer);if(part.value instanceof TemplateInstance){prepareTemplateStyles(renderContainer,part.value.template,scopeName)}removeNodes(container,container.firstChild);container.appendChild(renderContainer);parts$1.set(container,part)}if(!hasRendered&&needsScoping){window.ShadyCSS.styleElement(container.host)}};var shadyRender={render:render$2,html:html,svg:svg,TemplateResult:TemplateResult};class LitElement extends UpdatingElement{update(changedProperties){super.update(changedProperties);const templateResult=this.render();if(templateResult instanceof TemplateResult){this.constructor.render(templateResult,this.renderRoot,{scopeName:this.localName,eventContext:this})}}render(){}}LitElement.render=render$2;var litElement={LitElement:LitElement,notEqual:notEqual,UpdatingElement:UpdatingElement,customElement:customElement,property:property,query:query,queryAll:queryAll,eventOptions:eventOptions,html:html,svg:svg};const previousValues=new WeakMap,unsafeHTML=directive(value=>part=>{if(!(part instanceof NodePart)){throw new Error("unsafeHTML can only be used in text bindings")}const previousValue=previousValues.get(part);if(previousValue===value&&isPrimitive(value)){return}const tmp=document.createElement("template");tmp.innerHTML=value;part.setValue(document.importNode(tmp.content,!0));previousValues.set(part,value)});var unsafeHtml={unsafeHTML:unsafeHTML};const _state=new WeakMap,until=directive((...args)=>part=>{let state=_state.get(part);if(state===void 0){state={values:[]};_state.set(part,state)}const previousValues=state.values;let changedSinceLastRender=!1;state.values=args;for(let i=0;i<args.length;i++){const value=args[i];if(value===previousValues[i]&&!changedSinceLastRender){continue}changedSinceLastRender=!0;if(isPrimitive(value)||"function"!==typeof value.then){part.setValue(value);state.lastRenderedIndex=i;break}state.lastRenderedIndex=void 0;Promise.resolve(value).then(resolvedValue=>{const index=state.values.indexOf(value);if(-1<index&&(state.lastRenderedIndex===void 0||index<state.lastRenderedIndex)){state.lastRenderedIndex=index;part.setValue(resolvedValue);part.commit()}})}});var until$1={until:until};const formatDate=timestring=>{const pad=v=>10>v?`0${v}`:v,dateString=timestring.split("T")[0],date=new Date(dateString),weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][date.getUTCDay()],day=pad(date.getUTCDate()),month=["January","February","March","April","May","June","July","August","September","October","November","December"][date.getUTCMonth()],year=date.getUTCFullYear();return`${weekday}, ${day} ${month} ${year}`},getLink=link=>link?link.replace("content.",""):"";var misc={formatDate:formatDate,getLink:getLink},article=({content,date_gmt,errorMessage,link,title})=>html` | ||
ul { | ||
list-style-type: var(--ul-list-style-type, inherit); | ||
} | ||
p { | ||
clear: var(--p-clear, inherit); | ||
text-align: var(--p-text-align, inherit); | ||
} | ||
@@ -61,0 +66,0 @@ </style> |
@@ -40,3 +40,3 @@ /** | ||
var precacheConfig = [["index.html","f63f0e54dccff488c04bb9c138f22626"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","6f06bb2078d9fa1e4cb81318563c71b4"],["src/templates/articles/article.js","1f29d966a22c171a2cb073bd79079a0f"],["src/templates/articles/articles.js","f2724e293fae533f36c7ae472bd79c42"],["src/templates/loading.js","0609e299bf7314ae1307f410f28148ac"],["src/templates/styles/x-postpress.js","5a951e1ad0a127d7216540a0080519ec"],["src/utilities/misc.js","9f9250fc6652f10ef862213d85b6cb25"]]; | ||
var precacheConfig = [["index.html","f63f0e54dccff488c04bb9c138f22626"],["manifest.json","57aad2eed3448bc42df48d196f2bea2a"],["src/components/x-postpress.js","6f06bb2078d9fa1e4cb81318563c71b4"],["src/templates/articles/article.js","1f29d966a22c171a2cb073bd79079a0f"],["src/templates/articles/articles.js","f2724e293fae533f36c7ae472bd79c42"],["src/templates/loading.js","0609e299bf7314ae1307f410f28148ac"],["src/templates/styles/x-postpress.js","d0ba3667e48640cd86505bc3d2202aa2"],["src/utilities/misc.js","9f9250fc6652f10ef862213d85b6cb25"]]; | ||
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); | ||
@@ -43,0 +43,0 @@ |
@@ -46,6 +46,11 @@ import{html}from"/node_modules/@polymer/lit-element/lit-element.js";export default html` | ||
ul { | ||
list-style-type: var(--ul-list-style-type, inherit); | ||
} | ||
p { | ||
clear: var(--p-clear, inherit); | ||
text-align: var(--p-text-align, inherit); | ||
} | ||
</style> | ||
`; |
{ | ||
"name": "x-postpress", | ||
"version": "1.2.3", | ||
"version": "1.2.5", | ||
"license": "BSD-3-Clause", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/kherrick/x-postpress#readme", |
@@ -6,5 +6,5 @@ x-postpress | ||
* x-postpress is a collection of Web Components using [lit-html](https://lit-html.polymer-project.org/) and [LitElement](https://lit-element.polymer-project.org/) | ||
* A Web Component built using [LitElement](https://lit-element.polymer-project.org/) | ||
* Fetches [WordPress](https://wordpress.org/) posts from the [REST API](https://developer.wordpress.org/rest-api/) based on attributes set on the element, or parameters in the query string | ||
* Fetches [WordPress](https://wordpress.org/) posts [from the REST API]https://developer.wordpress.org/rest-api/reference/posts/#list-posts) based on attributes set on the element | ||
@@ -27,6 +27,6 @@ * [Built to support Internet Explorer 11](https://github.com/kherrick/x-postpress/tree/master/build/es5-bundled) | ||
* Add the tag into the document. Try using the browser's devtools to change the `apiUrl` attribute within the `x-postpress` tag to render another REST API endpoint: | ||
* Add the tag into the document. Try using the browser's devtools to change the `apiUrl` attribute within the `x-postpress` tag to render another <a href="https://developer.wordpress.org/rest-api/reference/posts/#list-posts">REST API posts endpoint</a>: | ||
```html | ||
<x-postpress | ||
apiUrl="https://a.content.example.com/wp-json/wp/v2/posts" | ||
apiUrl="https://a.content.example.com/wp-json/wp/v2/posts?per_page=1" | ||
siteUrl="https://a.example.com/" | ||
@@ -33,0 +33,0 @@ ></x-postpress> |
@@ -48,6 +48,11 @@ import { html } from '/node_modules/@polymer/lit-element/lit-element.js' | ||
ul { | ||
list-style-type: var(--ul-list-style-type, inherit); | ||
} | ||
p { | ||
clear: var(--p-clear, inherit); | ||
text-align: var(--p-text-align, inherit); | ||
} | ||
</style> | ||
` |
13965286
13730