/*! * __ __ __ __ * /\ \/\ \ /\ \ __ /\ \ * \ \ \_\ \ __ __ \_\ \ __ /\_\ __ ___ \ \ \/'\ * \ \ _ \ /\ \/\ \ /'_` \ /'__`\ \/\ \ /'__`\ /'___\\ \ , < * \ \ \ \ \\ \ \_\ \ /\ \L\ \ /\ __/ \ \ \ /\ \L\.\_ /\ \__/ \ \ \\`\ * \ \_\ \_\\/`____ \\ \___,_\\ \____\ _\ \ \\ \__/.\_\\ \____\ \ \_\ \_\ * \/_/\/_/ `/___/> \\/__,_ / \/____//\ \_\ \\/__/\/_/ \/____/ \/_/\/_/ * /\___/ \ \____/ * \/__/ \/___/ * * Powered by Hydejack v9.2.1 */ (window.webpackJsonp=window.webpackJsonp||[]).push([[9],{197:function(e,t){!function(e){var t=[];function n(n){var r=this,i="$BroadcastChannel$"+(n=String(n))+"$";t[i]=t[i]||[],t[i].push(this),this._name=n,this._id=i,this._closed=!1,this._mc=new MessageChannel,this._mc.port1.start(),this._mc.port2.start(),e.addEventListener("storage",(function(t){if(t.storageArea===e.localStorage&&null!=t.newValue&&""!==t.newValue&&t.key.substring(0,i.length)===i){var n=JSON.parse(t.newValue);r._mc.port2.postMessage(n)}}))}n.prototype={get name(){return this._name},postMessage:function(n){var r=this;if(this._closed){var i=new Error;throw i.name="InvalidStateError",i}var o=JSON.stringify(n),s=this._id+String(Date.now())+"$"+String(Math.random());e.localStorage.setItem(s,o),setTimeout((function(){e.localStorage.removeItem(s)}),500),t[this._id].forEach((function(e){e!==r&&e._mc.port2.postMessage(JSON.parse(o))}))},close:function(){if(!this._closed){this._closed=!0,this._mc.port1.close(),this._mc.port2.close();var e=t[this._id].indexOf(this);t[this._id].splice(e,1)}},get onmessage(){return this._mc.port1.onmessage},set onmessage(e){this._mc.port1.onmessage=e},addEventListener:function(){return this._mc.port1.addEventListener.apply(this._mc.port1,arguments)},removeEventListener:function(){return this._mc.port1.removeEventListener.apply(this._mc.port1,arguments)},dispatchEvent:function(){return this._mc.port1.dispatchEvent.apply(this._mc.port1,arguments)}},e.BroadcastChannel=e.BroadcastChannel||n}(self)},198:function(e,t){var n,r,i,o,s,a,l,c,u,h;function d(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){p(o,r,i,s,a,"next",e)}function a(e){p(o,r,i,s,a,"throw",e)}s(void 0)}))}}(()=>{var e=Object.defineProperty,t=Object.prototype.hasOwnProperty,p=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertySymbols,m=Object.prototype.propertyIsEnumerable,y=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,g=(e,n)=>{for(var r in n||(n={}))t.call(n,r)&&y(e,r,n[r]);if(v)for(var r of v(n))m.call(n,r)&&y(e,r,n[r]);return e},w=(t,n,r,i)=>{for(var o,s=i>1?void 0:i?p(n,r):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i?o(n,r,s):o(s))||s);return i&&s&&e(n,r,s),s},b=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},_=(e,t,n)=>(b(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n,r)=>(b(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),C=function(){function e(){}return e.prototype.then=function(t,n){var r=new e,i=this.s;if(i){var o=1&i?t:n;if(o){try{x(r,1,o(this.v))}catch(e){x(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?x(r,1,t?t(i):i):n?x(r,1,n(i)):x(r,2,i)}catch(i){x(r,2,i)}},r},e}();function x(e,t,n){if(!e.s){if(n instanceof C){if(!n.s)return void(n.o=x.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(x.bind(null,e,t),x.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var k=0,P="function"==typeof WeakMap?WeakMap:function(){var e="function"==typeof Symbol?Symbol(0):"__weak$"+ ++k;this.set=function(t,n){t[e]=n},this.get=function(t){return t[e]}};function A(e,t){return new Promise((function(n,r){e.onsuccess=function(){var r=e.result;t&&(r=t(r)),n(r)},e.onerror=function(){r(e.error)}}))}function N(e,t){return A(e.openCursor(t),(function(e){return e?[e.key,e.value]:[]}))}function L(e){return new Promise((function(t,n){e.oncomplete=function(){t()},e.onabort=function(){n(e.error)},e.onerror=function(){n(e.error)}}))}function E(e){if(!("number"==typeof(t=e)||"string"==typeof t||"object"==typeof t&&t&&(Array.isArray(t)||"setUTCFullYear"in t||"function"==typeof ArrayBuffer&&ArrayBuffer.isView(t)||"byteLength"in t&&"length"in t)))throw Error("kv-storage: The given value is not allowed as a key");var t}var T={};function M(e,t){return N(e,U(t))}function U(e){return e===T?IDBKeyRange.lowerBound(-1/0):IDBKeyRange.lowerBound(e,!0)}var O=new P,j=new P,V=new P,R=new P,I=function(){};function B(e,t){return t((function(t,n){try{var r=function(){return j.set(e,o),V.set(e,void 0),{value:a,done:void 0===o}},i=j.get(e);if(void 0===i)return Promise.resolve({value:void 0,done:!0});var o,s,a,l=function(e,t){var n,r=-1;e:{for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t!==n;){var i=t.nextSibling;e.insertBefore(t,r),t=i}},K=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t!==n;){var r=t.nextSibling;e.removeChild(t),t=r}},Z="{{lit-".concat(String(Math.random()).slice(2),"}}"),G="\x3c!--".concat(Z,"--\x3e"),X=new RegExp("".concat(Z,"|").concat(G)),Q="$lit$",ee=class{constructor(e,t){this.parts=[],this.element=t;for(var n=[],r=[],i=document.createTreeWalker(t.content,133,null,!1),o=0,s=-1,a=0,{strings:l,values:{length:c}}=e;a0;){var v=l[a],m=ie.exec(v)[2],y=m.toLowerCase()+Q,g=u.getAttribute(y);u.removeAttribute(y);var w=g.split(X);this.parts.push({type:"attribute",index:s,name:m,strings:w}),a+=w.length-1}}"TEMPLATE"===u.tagName&&(r.push(u),i.currentNode=u.content)}else if(3===u.nodeType){var b=u.data;if(b.indexOf(Z)>=0){for(var _=u.parentNode,S=b.split(X),C=S.length-1,x=0;x{var n=e.length-t.length;return n>=0&&e.slice(n)===t},ne=e=>-1!==e.index,re=()=>document.createComment(""),ie=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function oe(e,t){for(var{element:{content:n},parts:r}=e,i=document.createTreeWalker(n,133,null,!1),o=ae(r),s=r[o],a=-1,l=0,c=[],u=null;i.nextNode();){a++;var h=i.currentNode;for(h.previousSibling===u&&(u=null),t.has(h)&&(c.push(h),null===u&&(u=h)),null!==u&&l++;void 0!==s&&s.index===a;)s.index=null!==u?-1:s.index-l,s=r[o=ae(r,o)]}c.forEach(e=>e.parentNode.removeChild(e))}var se=e=>{for(var t=11===e.nodeType?0:1,n=document.createTreeWalker(e,133,null,!1);n.nextNode();)t++;return t},ae=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=t+1;nfunction(){var t=e(...arguments);return le.set(t,!0),t},ue=e=>"function"==typeof e&&le.has(e),he={},de={},pe=class{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){var t=0;for(var n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(var r of this.__parts)void 0!==r&&r.commit()}_clone(){for(var e,t=Y?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],r=this.template.parts,i=document.createTreeWalker(t,133,null,!1),o=0,s=0,a=i.nextNode();oe}),ve=" ".concat(Z," "),me=class{constructor(e,t,n,r){this.strings=e,this.values=t,this.type=n,this.processor=r}getHTML(){for(var e=this.strings.length-1,t="",n=!1,r=0;r-1||n)&&-1===i.indexOf("--\x3e",o+1);var s=ie.exec(i);t+=null===s?i+(n?ve:G):i.substr(0,s.index)+s[1]+s[2]+Q+s[3]+Z}return t+=this.strings[e]}getTemplateElement(){var e=document.createElement("template"),t=this.getHTML();return void 0!==fe&&(t=fe.createHTML(t)),e.innerHTML=t,e}},ye=class extends me{getHTML(){return"".concat(super.getHTML(),"")}getTemplateElement(){var e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),$(t,n.firstChild),e}},ge=e=>null===e||!("object"==typeof e||"function"==typeof e),we=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]),be=class{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:this.startNode;K(this.startNode.parentNode,e.nextSibling,this.endNode)}},Ce=class{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;ue(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=he,e(this)}if(this.__pendingValue!==he){var t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=he}}},xe=class extends be{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new ke(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}},ke=class extends _e{},Pe=!1;(()=>{try{var e={get capture(){return Pe=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();var Ae=class{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;ue(this.__pendingValue);){var e=this.__pendingValue;this.__pendingValue=he,e(this)}if(this.__pendingValue!==he){var t=this.__pendingValue,n=this.value,r=null==t||null!=n&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=null!=t&&(null==n||r);r&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=Ne(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=he}}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}},Ne=e=>e&&(Pe?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);function Le(e){var t=Ee.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},Ee.set(e.type,t));var n=t.stringsArray.get(e.strings);if(void 0!==n)return n;var r=e.strings.join(Z);return void 0===(n=t.keyString.get(r))&&(n=new ee(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}var Ee=new Map,Te=new WeakMap,Me=new class{handleAttributeExpressions(e,t,n,r){var i=t[0];return"."===i?new xe(e,t.slice(1),n).parts:"@"===i?[new Ae(e,t.slice(1),r.eventContext)]:"?"===i?[new Ce(e,t.slice(1),n)]:new be(e,t,n).parts}handleTextExpression(e){return new Se(e)}};"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.3.0");var Ue=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"".concat(e,"--").concat(t),Ve=!0;void 0===window.ShadyCSS?Ve=!1:void 0===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."),Ve=!1);var Re=e=>t=>{var n=je(t.type,e),r=Ee.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},Ee.set(n,r));var i=r.stringsArray.get(t.strings);if(void 0!==i)return i;var o=t.strings.join(Z);if(void 0===(i=r.keyString.get(o))){var s=t.getTemplateElement();Ve&&window.ShadyCSS.prepareTemplateDom(s,e),i=new ee(t,s),r.keyString.set(o,i)}return r.stringsArray.set(t.strings,i),i},Ie=["html","svg"],Be=new Set,De=(e,t,n)=>{Be.add(e);var r=n?n.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:o}=i;if(0!==o){for(var s=document.createElement("style"),a=0;a{Ie.forEach(t=>{var n=Ee.get(je(t,e));void 0!==n&&n.keyString.forEach(e=>{var{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{n.add(e)}),oe(e,n)})})})(e);var c=r.content;n?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,{element:{content:r},parts:i}=e;if(null!=n)for(var o=document.createTreeWalker(r,133,null,!1),s=ae(i),a=0,l=-1;o.nextNode();)for(l++,o.currentNode===n&&(a=se(t),n.parentNode.insertBefore(t,n));-1!==s&&i[s].index===l;){if(a>0){for(;-1!==s;)i[s].index+=a,s=ae(i,s);return}s=ae(i,s)}else r.appendChild(t)}(n,s,c.firstChild):c.insertBefore(s,c.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);var u=c.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==u)t.insertBefore(u.cloneNode(!0),t.firstChild);else if(n){c.insertBefore(s,c.firstChild);var h=new Set;h.add(s),oe(n,h)}}else window.ShadyCSS.prepareTemplateStyles(r,e)};window.JSCompiler_renameProperty=(e,t)=>e;var ze={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},We=(e,t)=>t!==e&&(t==t||e==e),qe={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:We},He="finalized",Fe=class extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();var e=[];return this._classProperties.forEach((t,n)=>{var r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe;if(this._ensureClassProperties(),this._classProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){var n="symbol"==typeof e?Symbol():"__".concat(e),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){var i=this[e];this[t]=r,this.requestUpdateInternal(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||qe}static finalize(){var e=Object.getPrototypeOf(this);if(e.hasOwnProperty(He)||e.finalize(),this[He]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var t=this.properties,n=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(var r of n)this.createProperty(r,t[r])}}static _attributeNameForProperty(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:We)(e,t)}static _propertyValueFromAttribute(e,t){var n=t.type,r=t.converter||ze,i="function"==typeof r?r:r.fromAttribute;return i?i(e,n):e}static _propertyValueToAttribute(e,t){if(void 0!==t.reflect){var n=t.type,r=t.converter;return(r&&r.toAttribute||ze.toAttribute)(e,n)}}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){var n=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,n)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe,r=this.constructor,i=r._attributeNameForProperty(e,n);if(void 0!==i){var o=r._propertyValueToAttribute(t,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){var i=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,i),this._updateState=-17&this._updateState}}}requestUpdateInternal(e,t,n){var r=!0;if(void 0!==e){var i=this.constructor;n=n||i.getPropertyOptions(e),i._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0===n.reflect&&!(16&this._updateState)&&(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):r=!1}!this._hasRequestedUpdate&&r&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}_enqueueUpdate(){var e=this;return f((function*(){e._updateState=4|e._updateState;try{yield e._updatePromise}catch(e){}var t=e.performUpdate();return null!=t&&(yield t),!e._hasRequestedUpdate}))()}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(this._hasRequestedUpdate){this._instanceProperties&&this._applyInstanceProperties();var e=!1,t=this._changedProperties;try{(e=this.shouldUpdate(t))?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}};Fe.finalized=!0;var Je=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{var{kind:n,elements:r}=t;return{kind:n,elements:r,finisher(t){window.customElements.define(e,t)}}})(e,t),Ye=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function $e(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):Ye(e,t)}var Ke=(e,t,n)=>{Object.defineProperty(t,n,e)},Ze=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),Ge=Element.prototype,Xe=(Ge.msMatchesSelector||Ge.webkitMatchesSelector,window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype),Qe=Symbol(),et=class{constructor(e,t){if(t!==Qe)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(Xe?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}},tt=e=>{if(e instanceof et)return e.cssText;if("number"==typeof e)return e;throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(e,". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security."))};(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");var nt={},rt=class extends Fe{static getStyles(){return this.styles}static _getUniqueStyles(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var e=this.getStyles();if(Array.isArray(e)){var t=(e,n)=>e.reduceRight((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e),n),n=t(e,new Set),r=[];n.forEach(e=>r.unshift(e)),this._styles=r}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!Xe){var t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return new et(String(t),Qe)}return e})}}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){var e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Xe?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){var t=this.render();super.update(e),t!==nt&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{var t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return nt}};rt.finalized=!0,rt.render=(e,t,n)=>{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=Te.has(t),o=Ve&&11===t.nodeType&&!!t.host,s=o&&!Be.has(r),a=s?document.createDocumentFragment():t;if(((e,t,n)=>{var r=Te.get(t);void 0===r&&(K(t,t.firstChild),Te.set(t,r=new Se(Object.assign({templateFactory:Le},n))),r.appendInto(t)),r.setValue(e),r.commit()})(e,a,Object.assign({templateFactory:Re(r)},n)),s){var l=Te.get(a);Te.delete(a);var c=l.value instanceof pe?l.value.template:void 0;De(r,a,c),K(t,t.firstChild),t.appendChild(a),Te.set(t,l)}!i&&o&&window.ShadyCSS.styleElement(t.host)};var it=new WeakMap,ot=ce(e=>t=>{if(!(t instanceof _e)||t instanceof ke||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");var{committer:n}=t,{element:r}=n,i=it.get(t);void 0===i&&(r.setAttribute("class",n.strings.join(" ")),it.set(t,i=new Set));var o=r.classList||new class{constructor(e){this.classes=new Set,this.changed=!1,this.element=e;var t=(e.getAttribute("class")||"").split(/\s+/);for(var n of t)this.classes.add(n)}add(e){this.classes.add(e),this.changed=!0}remove(e){this.classes.delete(e),this.changed=!0}commit(){if(this.changed){var e="";this.classes.forEach(t=>e+=t+" "),this.element.setAttribute("class",e)}}}(r);for(var s in i.forEach(t=>{t in e||(o.remove(t),i.delete(t))}),e){var a=e[s];a!=i.has(s)&&(a?(o.add(s),i.add(s)):(o.remove(s),i.delete(s)))}"function"==typeof o.commit&&o.commit()}),st=new WeakMap,at=ce(e=>t=>{if(!(t instanceof _e)||t instanceof ke||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");var{committer:n}=t,{style:r}=n.element,i=st.get(t);for(var o in void 0===i&&(r.cssText=n.strings.join(" "),st.set(t,i=new Set)),i.forEach(t=>{t in e||(i.delete(t),-1===t.indexOf("-")?r[t]=null:r.removeProperty(t))}),e)i.add(o),-1===o.indexOf("-")?r[o]=e[o]:r.setProperty(o,e[o])}),lt=(e,t)=>{var n=e.startNode.parentNode,r=void 0===t?e.endNode:t.startNode,i=n.insertBefore(re(),r);n.insertBefore(re(),r);var o=new Se(e.options);return o.insertAfterNode(i),o},ct=(e,t)=>(e.setValue(t),e.commit(),e),ut=(e,t,n)=>{var r=e.startNode.parentNode,i=n?n.startNode:e.endNode,o=t.endNode.nextSibling;o!==i&&$(r,t.startNode,o,i)},ht=e=>{K(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},dt=(e,t,n)=>{for(var r=new Map,i=t;i<=n;i++)r.set(e[i],i);return r},pt=new WeakMap,ft=new WeakMap,vt=ce((e,t,n)=>{var r;return void 0===n?n=t:void 0!==t&&(r=t),t=>{if(!(t instanceof Se))throw new Error("repeat can only be used in text bindings");var i=pt.get(t)||[],o=ft.get(t)||[],s=[],a=[],l=[],c=0;for(var u of e)l[c]=r?r(u,c):c,a[c]=n(u,c),c++;for(var h,d,p=0,f=i.length-1,v=0,m=a.length-1;p<=f&&v<=m;)if(null===i[p])p++;else if(null===i[f])f--;else if(o[p]===l[v])s[v]=ct(i[p],a[v]),p++,v++;else if(o[f]===l[m])s[m]=ct(i[f],a[m]),f--,m--;else if(o[p]===l[m])s[m]=ct(i[p],a[m]),ut(t,i[p],s[m+1]),p++,m--;else if(o[f]===l[v])s[v]=ct(i[f],a[v]),ut(t,i[f],i[p]),f--,v++;else if(void 0===h&&(h=dt(l,v,m),d=dt(o,p,f)),h.has(o[p]))if(h.has(o[f])){var y=d.get(l[v]),g=void 0!==y?i[y]:null;if(null===g){var w=lt(t,i[p]);ct(w,a[v]),s[v]=w}else s[v]=ct(g,a[v]),ut(t,g,i[p]),i[y]=null;v++}else ht(i[f]),f--;else ht(i[p]),p++;for(;v<=m;){var b=lt(t,s[m+1]);ct(b,a[v]),s[v++]=b}for(;p<=f;){var _=i[p++];null!==_&&ht(_)}pt.set(t,s),ft.set(t,l)}}),mt=new WeakMap,yt=ce(e=>t=>{if(!(t instanceof Se))throw new Error("unsafeHTML can only be used in text bindings");var n=mt.get(t);if(void 0===n||!ge(e)||e!==n.value||t.value!==n.fragment){var r=document.createElement("template");r.innerHTML=e;var i=document.importNode(r.content,!0);t.setValue(i),mt.set(t,{value:e,fragment:i})}}),gt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt+tt(n)+e[r+1],e[0]);return new et(i,Qe)}(n||(n=d(["\n:host {\n display: block;\n position: relative;\n width: 5em;\n height: 5em;\n margin: 5em auto;\n}\n.style-root {\n position: absolute;\n fill: var(--clap-button-color, var(--theme-color, rgb(79,177,186)));\n stroke: var(--clap-button-color, var(--theme-color, rgb(79,177,186)));\n top: 0;\n left: 0;\n right: 0;\n bottom: 0; }\n .style-root .error { color: indianred }\n .style-root button {\n -webkit-tap-highlight-color: transparent;\n cursor: pointer; \n border: none;\n background: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n .style-root button:disabled {\n cursor: default; }\n .style-root .shockwave {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n color: var(--clap-button-color, var(--theme-color, rgb(79,177,186)));\n border-radius: 50%; }\n .style-root svg {\n position: absolute;\n width: 60%;\n height: 60%;\n margin: 20%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n opacity: 0.8;\n stroke: none;\n overflow: visible !important; }\n .style-root svg g.flat {\n visibility: hidden; }\n .style-root svg g.outline {\n visibility: visible; }\n .style-root.clapped:not(.loading) svg g.flat {\n visibility: visible; }\n .style-root.clapped svg g.outline {\n visibility: hidden; }\n .style-root.loading svg g.outline {\n visibility: visible; }\n .style-root .count-container {\n position: absolute;\n width: 100%;\n color: inherit;\n user-select: none; }\n .style-root .count-container.container-top {\n top: -2.5em; }\n .style-root .count-container.container-bottom {\n bottom: -2.5em; }\n .style-root .count-container > div {\n width: 300%;\n margin-left: -100%;\n text-align: center; }\n .style-root g.sparkle circle {\n opacity: 0;\n stroke-width: 0; }\n .style-root:not(.clapped):not(.no-shockwave):not(.no-animation) .shockwave {\n animation-name: shockwave;\n animation-duration: 1.5s;\n animation-iteration-count: infinite;\n animation-timing-function: ease-in; }\n .style-root.clap {\n animation-name: pulse;\n animation-duration: 0.5s;\n animation-iteration-count: 1; \n animation-timing-function: ease-out; }\n .style-root.clap .sparkle circle {\n animation-name: explode;\n animation-duration: 0.5s;\n animation-iteration-count: 1; }\n .style-root.clap .container-top .count {\n animation-name: hide-then-show;\n animation-duration: 0.5s;\n animation-iteration-count: 1; }\n .style-root.clap .container-bottom .count {\n animation-name: hide-then-show-inverse;\n animation-duration: 0.5s;\n animation-iteration-count: 1; }\n\n#hand-svg {\n margin-top: 22%;\n margin-left: 22%;\n}\n\n#countdown-svg {\n width: 100%;\n height: 100%;\n stroke: var(--clap-button-color, var(--theme-color, rgb(79,177,186)));\n margin: 0;\n}\n\n.countdown {\n fill: none; \n transform: rotateZ(0deg);\n transform-origin: center;\n}\n\n.countdown circle {\n stroke-width: 2px;\n opacity: 1;\n stroke-linecap: round;\n stroke-dasharray: 308 308;\n transform: rotate(-90deg);\n transform-origin: center;\n}\n\n.style-root.ticking .countdown circle {\n animation-timing-function: ease;\n animation-name: countdown;\n animation-duration: 3s; \n}\n\n.style-root.loading:not(.no-animation) .countdown {\n animation: 2s linear infinite svg-animation; \n}\n\n.style-root.loading:not(.no-animation) .countdown circle {\n animation: 1.4s ease-in-out infinite both circle-animation;\n stroke-dasharray: 308;\n stroke-dashoffset: 302; \n}\n\n@keyframes svg-animation {\n 0% { \n transform: rotateZ(-90deg);\n }\n 100% { \n transform: rotateZ(270deg);\n }\n}\n\n@keyframes circle-animation {\n 0%,\n 15% {\n stroke-dashoffset: 280;\n transform: rotate(0); \n }\n 50%,\n 65% {\n stroke-dashoffset: 75;\n transform: rotate(45deg); \n }\n 100% {\n stroke-dashoffset: 280;\n transform: rotate(360deg); \n }\n}\n\n@keyframes countdown {\n 0% {\n stroke-dasharray: 308 308;\n }\n 50% {\n stroke-dasharray: 308 308;\n }\n 100% {\n stroke-dasharray: 0 308;\n }\n}\n\n@keyframes explode {\n 0% {\n transform: translateX(10px);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateX(25px);\n }\n}\n\n@keyframes shockwave {\n 0% {\n transform: scale(1);\n opacity: 1; \n box-shadow: 0 0 2px, inset 0 0 1px;\n }\n 89.99% {\n transform: scale(1);\n opacity: 0;\n box-shadow: 0 0 50px, inset 0 0 10px;\n }\n 90%, 100% {\n transform: scale(1);\n opacity: 0;\n box-shadow: 0 0 2px, inset 0 0 1px;\n }\n}\n\n@keyframes pulse {\n 0% {\n transform: scale(1);\n }\n 25% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\n\n@keyframes hide-then-show {\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 20% {\n opacity: 0;\n transform: translateY(-10px);\n }\n 50% {\n transform: translateY(10px);\n }\n 80% {\n transform: translateY(10px);\n opacity: 0;\n }\n 100% {\n opacity: 1;\n transform: translateY(0); \n }\n}\n\n@keyframes hide-then-show-inverse {\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 20% {\n opacity: 0;\n transform: translateY(10px);\n }\n 50% {\n transform: translateY(-10px);\n }\n 80% {\n transform: translateY(-10px);\n opacity: 0;\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n"]))),wt=e=>e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),bt=wt,_t=e=>parseInt(e,16);function St(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.length,0),i=new Uint8Array(r),o=0;for(var s of t)i.set(s,o),o+=s.length;return i}function Ct(e){var t=(e=>Array.from(bt(e),e=>(e=>e.toString(16).padStart(2,"0"))(e)))(e);return t.splice(4,0,"-"),t.splice(7,0,"-"),t.splice(10,0,"-"),t.splice(13,0,"-"),t.join("")}function xt(){var e=crypto.getRandomValues(new Uint8Array(16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e.buffer}function kt(e){var t=e.replace(/[^0-9a-f]/gi,"").slice(0,32);if(t.length<32)throw Error("UUID too short");return(e=>new Uint8Array(e.match(/[0-9a-f]{1,2}/gi).map(_t)))(t).buffer}function Pt(e){return e=unescape(encodeURIComponent(e)),(new TextEncoder).encode(e)}function At(){return(At=f((function*(e,t){var n="string"==typeof e?Pt(e):wt(e),r="string"==typeof t?new Nt(t):t,i=new Uint8Array(yield crypto.subtle.digest("SHA-1",St(r,n)));return i[6]=15&i[6]|80,i[8]=63&i[8]|128,i.buffer.slice(0,16)}))).apply(this,arguments)}var Nt=class extends Uint8Array{static v4(){return new Nt(xt())}static v5(e,t){return f((function*(){return new Nt(yield function(e,t){return At.apply(this,arguments)}(e,t))}))()}constructor(e,t){if(null==e)super(xt());else if("string"==typeof e)super(kt(e));else if(e instanceof Nt)super(e.buffer.slice(0));else{var n=e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?new Uint8Array(e,null!=t?t:0,16):new Uint8Array(e);if(n.length<16)throw Error("UUID too short");super(n.buffer.slice(0,16))}}get id(){return Ct(this)}get uuid(){return Ct(this)}toString(){return Ct(this)}toJSON(){return Ct(this)}static get[Symbol.species](){return Uint8Array}},Lt=Symbol.for("nodejs.util.inspect.custom"),Et="undefined"!=typeof Deno?"symbols"in Deno?Deno.symbols.customInspect:Deno.customInspect:Symbol();Nt.prototype[Lt]=function(){return"UUID [ ".concat(this.uuid," ]")},Nt.prototype[Et]=function(){return"UUID [ ".concat(this.uuid," ]")};var Tt=e=>e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function Mt(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.length,0),i=new Uint8Array(r),o=0;for(var s of t)i.set(s,o),o+=s.length;return i}function Ut(){for(var e=arguments.length,t=new Array(e),n=0;ncrypto.subtle.digest("SHA-256",e),jt=e=>Ot((new TextEncoder).encode(e));function Vt(e){return Rt.apply(this,arguments)}function Rt(){return(Rt=f((function*(e){var{url:t,id:n,claps:r,nonce:i}=e;return Ut(yield jt(t.toString()),new Nt(n.toString()),new Uint32Array([r]),new Uint32Array([i])).buffer}))).apply(this,arguments)}function It(e,t){for(var n=new Uint8Array(e),r=Math.ceil(t/8),i=0;i>7-s&1))return!1;return!0}var Bt=e=>8+Math.round(Math.log2(15+e));function Dt(){return(Dt=f((function*(e){for(var{url:t,claps:n,id:r}=e,i=Bt(n),o=0,s=new Uint32Array(yield Vt({url:t,id:r,claps:n,nonce:o})),a=yield Ot(s);!It(a,i);)o++,s[s.length-1]=o,a=yield Ot(s);return o}))).apply(this,arguments)}var zt=Reflect.get(window,"GET_CLAPS_API")||"https://worker.getclaps.app";function Wt(e,t,n){var r=new URL(e,n);for(var[i,o]of Object.entries(t||{}))r.searchParams.append(i,o);return r.href}var qt,Ht,Ft,Jt,Yt=new Map,$t=!1,Kt=function(){var e=f((function*(e,t,n){var r=Yt.get(t);return r||Yt.set(t,r=Yt.get(t)||f((function*(){var e,r=Wt("/views",g({href:t},n&&!$t?{referrer:n}:{}),zt),i=yield fetch(r,{method:"POST",body:null,mode:"cors",credentials:"include",headers:{accept:"application/json"}});if($t=!0,i.ok&&(null==(e=i.headers.get("Content-Type"))?void 0:e.includes("json")))return yield i.json();if(404===i.status)return{};throw 402===i.status?i:(Yt.delete(t),Error())}))()),(yield r)[e]||{claps:0}}));return function(t,n,r){return e.apply(this,arguments)}}(),Zt=function(){var e=f((function*(e,t){var n=new URL(t);n.search="";var r=new Nt,i=yield function(e){return Dt.apply(this,arguments)}({url:n,claps:e,id:r});return{href:n.href,id:r,nonce:i}}));return function(t,n){return e.apply(this,arguments)}}(),Gt=function(){var e=f((function*(e,t,n,r,i){var o,s=Wt("/claps",{href:t},zt),a=yield fetch(s,{method:"POST",body:JSON.stringify({claps:e,id:r,nonce:i}),mode:"cors",credentials:"include",headers:{accept:"application/json","content-type":"application/json;charset=UTF-8"}});if(a.ok&&(null==(o=a.headers.get("Content-Type"))?void 0:o.includes("json")))return Yt.delete(n),a.clone().json();throw Error()}));return function(t,n,r,i,o){return e.apply(this,arguments)}}(),Xt=new Map,Qt=class extends rt{constructor(){super(...arguments),qt.set(this,void 0)}get connectedCountKey(){}allDisconnectedCallback(){}connectedCallback(){var e;super.connectedCallback(),S(this,qt,null!=(e=this.connectedCountKey)?e:this),Xt.set(_(this,qt),1+(Xt.get(_(this,qt))||0))}disconnectedCallback(){var e;super.disconnectedCallback();var t=((null==Xt?void 0:Xt.get(_(this,qt)))||0)-1;t>0?Xt.set(_(this,qt),t):(Xt.delete(_(this,qt)),null==(e=this.allDisconnectedCallback)||e.call(this))}};qt=new WeakMap,(Ft=Ht||(Ht={})).Top="top",Ft.Bottom="bottom",function(e){e[e.PaymentRequired=1]="PaymentRequired",e[e.CryptoRequired=2]="CryptoRequired",e[e.Generic=3]="Generic"}(Jt||(Jt={}));var en=new F("clap-button"),tn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var t=new URL(e);return t.hash="",t.search="",t.href},rn=class extends rt{};rn=w([Je("clap-config")],rn);var on=class extends rt{constructor(){super(...arguments),this.at=1}};w([$e({type:Number,reflect:!0})],on.prototype,"at",2),on=w([Je("clap-text")],on);var sn,an,ln,cn,un,hn,dn,pn,fn=class extends Qt{constructor(){var e;super(...arguments),e=this,sn.set(this,void 0),this.textPlacement=Ht.Bottom,this.noWave=!1,this.messages=!1,this.uiClaps=0,this.bufferedClaps=0,this.loading=!1,this.clapped=!1,this.clicking=!1,this.ready=!1,this.error=null,this.isIntersecting=!1,an.set(this,void 0),ln.set(this,void 0),cn.set(this,"BroadcastChannel"in window?new BroadcastChannel("clap-button"):null),un.set(this,Math.trunc(1e9*Math.random())),hn.set(this,e=>{0===e.button&&(e.preventDefault(),this.clapped=!0,this.clicking=!0,this.bufferedClaps++,tn(this.styleRoot,"clap","ticking"),_(this,dn).call(this),this.uiClaps=this.bufferedClaps)}),dn.set(this,((e,t)=>{var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;oe(...i),t)}})(f((function*(){var n,r=e.bufferedClaps;e.bufferedClaps=0,e.loading=!0;var{href:i,id:o,nonce:s}=yield Zt(r,e.canonical),{claps:a}=yield Gt(r,i,e.parentHref,o,s);e.loading=!1,e.clicking=!1,e.styleRoot.classList.remove("ticking"),tn(e.styleRoot,"clap");var l={btnId:_(e,un),claps:r,totalClaps:a,href:i};_(e,cn)?_(e,cn).postMessage(l):_(e,pn).call(e,{data:l}),setTimeout(()=>{e.uiClaps=a},250);var c=null!=(n=yield en.get(i))?n:{claps:0},{claps:u}=c,h=((e,n)=>{var r={};for(var i in e)t.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&v)for(var i of v(e))n.indexOf(i)<0&&m.call(e,i)&&(r[i]=e[i]);return r})(c,["claps"]);yield en.set(i,g(g({},h),{claps:u+r}))})),3e3)),pn.set(this,e=>{var{data:{href:t,claps:n,btnId:r}}=e;r!==_(this,un)&&[t,nn(t)].includes(this.canonical)&&(this.clapped=!0,this.uiClaps+=n,tn(this.styleRoot,"clap"))})}get canonical(){var e=this.href||this.url||"",t=S(this,an,_(this,an)||this.ownerDocument.head.querySelector("link[rel=canonical]")),n=null!=t?new URL(t.href):this.ownerDocument.location;return new URL(e,n.href).href}get parentHref(){return nn(this.canonical)}get referrer(){var e=new URLSearchParams(this.ownerDocument.location.search);return e.get("referrer")||e.get("referer")||this.ownerDocument.referrer}connectedCallback(){var e,t=this;if(super.connectedCallback(),"crypto"in window&&"subtle"in window.crypto&&"digest"in window.crypto.subtle){null==(e=_(this,cn))||e.addEventListener("message",_(this,pn)),fn.intersectionObserver.observe(this);var n=this.ownerDocument.querySelector("clap-config");S(this,sn,new MutationObserver(()=>{var e,t=Array.from(null!=(e=null==n?void 0:n.querySelectorAll("clap-text"))?e:[]);S(this,ln,new Map(null==t?void 0:t.map(e=>[e.at,e.innerHTML]).sort((e,t)=>{var[n]=e,[r]=t;return r-n})))})),n&&_(this,sn).observe(n,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),f((function*(){t.loading=!0,t.clapped=null!=(yield en.get(t.canonical));try{var{claps:e}=yield Kt(t.canonical,t.parentHref,t.referrer);t.loading=!1,t.ready=!0,t.uiClaps=e}catch(e){t.loading=!1,t.ready=!1,t.error=402===e.status?1:3}}))()}else this.error=2}disconnectedCallback(){var e;super.disconnectedCallback(),fn.intersectionObserver.unobserve(this),_(this,sn).disconnect(),null==(e=_(this,cn))||e.removeEventListener("message",_(this,pn))}get connectedCountKey(){return this.parentHref}allDisconnectedCallback(){(e=>{Yt.delete(e)})(this.parentHref)}render(){var e,t,n=Oe(r||(r=d(['\n \n \n \n \n \n \n \n \n \n ']))),p=Oe(i||(i=d(['\n \n \n \n \n \n ']))),f=this.bufferedClaps,v=5+f,m=300*(1-Math.E**(-f/15)),y=Oe(o||(o=d(['\n \n \n ',"\n \n "])),vt((e=>[...new Array(e).keys()])(v),e=>e,e=>Oe(s||(s=d(["\n \n '])),at({transform:"rotate(".concat(Math.floor(360/v*e),"deg) translateX(10px)")}),at({animationDelay:"".concat(Math.floor(Math.random()*m),"ms")}))));return Ue(a||(a=d(["\n \n \n \n ',"","\n ","\n ","\n ","\n \n \n \n ","\n \n ","\n ","\n ","\n \n \n "])),ot({"style-root":!0,loading:this.loading,clapped:this.clapped,"no-shockwave":this.noWave||!this.ready,"no-animation":!this.isIntersecting}),at(g({},null!=this.error?{"--clap-button-color":"indianred"}:{})),ot({"count-container":!0,"container-top":this.textPlacement===Ht.Top,"container-bottom":this.textPlacement===Ht.Bottom}),this.clicking?"+":"",this.ready?(e=>null!=e?e.toLocaleString("en"):"")(this.uiClaps):"",1===this.error?Ue(l||(l=d(['Payment required'])),"https://getclaps.app"):null,2===this.error?Ue(c||(c=d(['Crypto required']))):null,3===this.error?Ue(u||(u=d(['Error']))):null,ot({"count-container":!0,"container-top":this.textPlacement===Ht.Bottom,"container-bottom":this.textPlacement===Ht.Top}),this.messages?Ue(h||(h=d(['\n ',"\n "])),this.clicking?yt(null!=(t=null==(e=[..._(this,ln)].find(e=>{var[t]=e;return this.uiClaps>=t}))?void 0:e[1])?t:""):""):null,n,y,p,this.loading||!this.ready,this.loading||!this.ready?null:_(this,hn),this.loading||!this.ready?null:_(this,hn))}};sn=new WeakMap,an=new WeakMap,ln=new WeakMap,cn=new WeakMap,un=new WeakMap,hn=new WeakMap,dn=new WeakMap,pn=new WeakMap,fn.styles=gt,fn.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>e.target.isIntersecting=e.isIntersecting)}),w([function(e,t){return(n,r)=>{var i={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};if(t){var o="symbol"==typeof r?Symbol():"__".concat(r);i.get=function(){return void 0===this[o]&&(this[o]=this.renderRoot.querySelector(e)),this[o]}}return void 0!==r?Ke(i,n,r):Ze(i,n)}}(".style-root")],fn.prototype,"styleRoot",2),w([$e({type:String,reflect:!0,attribute:"text-placement"})],fn.prototype,"textPlacement",2),w([$e({type:Boolean,reflect:!0})],fn.prototype,"noWave",2),w([$e({type:Boolean,reflect:!0})],fn.prototype,"messages",2),w([$e({type:String,reflect:!1})],fn.prototype,"href",2),w([$e({type:String,reflect:!1})],fn.prototype,"url",2),w([$e()],fn.prototype,"uiClaps",2),w([$e()],fn.prototype,"bufferedClaps",2),w([$e()],fn.prototype,"loading",2),w([$e()],fn.prototype,"clapped",2),w([$e()],fn.prototype,"clicking",2),w([$e()],fn.prototype,"ready",2),w([$e()],fn.prototype,"error",2),w([$e()],fn.prototype,"isIntersecting",2),fn=w([Je("clap-button")],fn)})()}}]);