@monster_property_services/monster-google-review
Advanced tools
Comparing version 1.2.0 to 1.3.0
243
index.js
@@ -1,16 +0,16 @@ | ||
var ct=Object.defineProperty;var dt=(o,t,e)=>t in o?ct(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var H=(o,t,e)=>(dt(o,typeof t!="symbol"?t+"":t,e),e);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const r of n.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function e(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(s){if(s.ep)return;s.ep=!0;const n=e(s);fetch(s.href,n)}})();/** | ||
var dt=Object.defineProperty;var pt=(o,t,e)=>t in o?dt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var N=(o,t,e)=>(pt(o,typeof t!="symbol"?t+"":t,e),e);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const r of n.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function e(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=e(i);fetch(i.href,n)}})();/** | ||
* @license | ||
* Copyright 2019 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const N=globalThis,q=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),F=new WeakMap;let it=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==B)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(q&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=F.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&F.set(e,t))}return t}toString(){return this.cssText}};const pt=o=>new it(typeof o=="string"?o:o+"",void 0,B),ut=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,s,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[n+1],o[0]);return new it(e,o,B)},mt=(o,t)=>{if(q)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=N.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)}},V=q?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return pt(e)})(o):o;/** | ||
*/const O=globalThis,B=O.ShadowRoot&&(O.ShadyCSS===void 0||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),V=new WeakMap;let rt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=V.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&V.set(e,t))}return t}toString(){return this.cssText}};const ut=o=>new rt(typeof o=="string"?o:o+"",void 0,W),ot=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new rt(e,o,W)},mt=(o,t)=>{if(B)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=O.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},G=B?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ut(e)})(o):o;/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const{is:gt,defineProperty:$t,getOwnPropertyDescriptor:ft,getOwnPropertyNames:_t,getOwnPropertySymbols:wt,getPrototypeOf:vt}=Object,$=globalThis,G=$.trustedTypes,yt=G?G.emptyScript:"",L=$.reactiveElementPolyfillSupport,E=(o,t)=>o,I={toAttribute(o,t){switch(t){case Boolean:o=o?yt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},W=(o,t)=>!gt(o,t),K={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:W};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&$t(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=ft(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return s==null?void 0:s.call(this)},set(r){const l=s==null?void 0:s.call(this);n.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??K}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=vt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,i=[..._t(e),...wt(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(V(s))}else t!==void 0&&e.push(V(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var n;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const r=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=i.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:I;this._$Em=s,this[s]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??W)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,r]of s)r.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[E("elementProperties")]=new Map,y[E("finalized")]=new Map,L==null||L({ReactiveElement:y}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.0.4");/** | ||
*/const{is:gt,defineProperty:$t,getOwnPropertyDescriptor:ft,getOwnPropertyNames:wt,getOwnPropertySymbols:_t,getPrototypeOf:vt}=Object,$=globalThis,K=$.trustedTypes,yt=K?K.emptyScript:"",L=$.reactiveElementPolyfillSupport,E=(o,t)=>o,I={toAttribute(o,t){switch(t){case Boolean:o=o?yt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},F=(o,t)=>!gt(o,t),X={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:F};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=X){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&$t(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ft(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return i==null?void 0:i.call(this)},set(r){const l=i==null?void 0:i.call(this);n.call(this,r),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??X}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=vt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,s=[...wt(e),..._t(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(G(i))}else t!==void 0&&e.push(G(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:I).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const r=s.getPropertyOptions(i),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:I;this._$Em=i,this[i]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??F)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i)r.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[E("elementProperties")]=new Map,y[E("finalized")]=new Map,L==null||L({ReactiveElement:y}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.0.4");/** | ||
* @license | ||
* Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const C=globalThis,O=C.trustedTypes,X=O?O.createPolicy("lit-html",{createHTML:o=>o}):void 0,rt="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,ot="?"+g,At=`<${ot}>`,w=document,T=()=>w.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",nt=Array.isArray,bt=o=>nt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",j=`[ | ||
\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,J=/-->/g,Z=/>/g,f=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,Q=/"/g,at=/^(?:script|style|textarea|title)$/i,xt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),v=xt(1),A=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),tt=new WeakMap,_=w.createTreeWalker(w,129);function ht(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return X!==void 0?X.createHTML(t):t}const Et=(o,t)=>{const e=o.length-1,i=[];let s,n=t===2?"<svg>":"",r=x;for(let l=0;l<e;l++){const a=o[l];let d,c,h=-1,u=0;for(;u<a.length&&(r.lastIndex=u,c=r.exec(a),c!==null);)u=r.lastIndex,r===x?c[1]==="!--"?r=J:c[1]!==void 0?r=Z:c[2]!==void 0?(at.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=f):c[3]!==void 0&&(r=f):r===f?c[0]===">"?(r=s??x,h=-1):c[1]===void 0?h=-2:(h=r.lastIndex-c[2].length,d=c[1],r=c[3]===void 0?f:c[3]==='"'?Q:Y):r===Q||r===Y?r=f:r===J||r===Z?r=x:(r=f,s=void 0);const m=r===f&&o[l+1].startsWith("/>")?" ":"";n+=r===x?a+At:h>=0?(i.push(d),a.slice(0,h)+rt+a.slice(h)+g+m):a+g+(h===-2?l:m)}return[ht(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),i]};class U{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const l=t.length-1,a=this.parts,[d,c]=Et(t,e);if(this.el=U.createElement(d,i),_.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=_.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const h of s.getAttributeNames())if(h.endsWith(rt)){const u=c[r++],m=s.getAttribute(h).split(g),k=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:k[2],strings:m,ctor:k[1]==="."?St:k[1]==="?"?Tt:k[1]==="@"?Pt:M}),s.removeAttribute(h)}else h.startsWith(g)&&(a.push({type:6,index:n}),s.removeAttribute(h));if(at.test(s.tagName)){const h=s.textContent.split(g),u=h.length-1;if(u>0){s.textContent=O?O.emptyScript:"";for(let m=0;m<u;m++)s.append(h[m],T()),_.nextNode(),a.push({type:2,index:++n});s.append(h[u],T())}}}else if(s.nodeType===8)if(s.data===ot)a.push({type:2,index:n});else{let h=-1;for(;(h=s.data.indexOf(g,h+1))!==-1;)a.push({type:7,index:n}),h+=g.length-1}n++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function b(o,t,e=o,i){var r,l;if(t===A)return t;let s=i!==void 0?(r=e._$Co)==null?void 0:r[i]:e._$Cl;const n=P(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==n&&((l=s==null?void 0:s._$AO)==null||l.call(s,!1),n===void 0?s=void 0:(s=new n(o),s._$AT(o,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=b(o,s._$AS(o,t.values),s,i)),t}class Ct{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??w).importNode(e,!0);_.currentNode=s;let n=_.nextNode(),r=0,l=0,a=i[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new R(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Ut(n,this,t)),this._$AV.push(d),a=i[++l]}r!==(a==null?void 0:a.index)&&(n=_.nextNode(),r++)}return _.currentNode=w,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):bt(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(w.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=U.createElement(ht(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===s)this._$AH.p(e);else{const r=new Ct(s,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=tt.get(t.strings);return e===void 0&&tt.set(t.strings,e=new U(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new R(this.S(T()),this.S(T()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=b(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{const l=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=b(this,l[i+a],e,a),d===A&&(d=this._$AH[a]),r||(r=!P(d)||d!==this._$AH[a]),d===p?t=p:t!==p&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class St extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Tt extends M{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Pt extends M{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){if((t=b(this,t,e,0)??p)===A)return;const i=this._$AH,s=t===p&&i!==p||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==p&&(i===p||s);s&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ut{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}const z=C.litHtmlPolyfillSupport;z==null||z(U,R),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.1.3");const Rt=(o,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new R(t.insertBefore(T(),n),n,void 0,e??{})}return s._$AI(o),s};/** | ||
*/const C=globalThis,M=C.trustedTypes,J=M?M.createPolicy("lit-html",{createHTML:o=>o}):void 0,nt="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,at="?"+g,At=`<${at}>`,_=document,T=()=>_.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",ht=Array.isArray,bt=o=>ht(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",j=`[ | ||
\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,Y=/>/g,f=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Q=/'/g,tt=/"/g,lt=/^(?:script|style|textarea|title)$/i,xt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),v=xt(1),A=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),et=new WeakMap,w=_.createTreeWalker(_,129);function ct(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return J!==void 0?J.createHTML(t):t}const Et=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":"",r=x;for(let l=0;l<e;l++){const a=o[l];let d,c,h=-1,u=0;for(;u<a.length&&(r.lastIndex=u,c=r.exec(a),c!==null);)u=r.lastIndex,r===x?c[1]==="!--"?r=Z:c[1]!==void 0?r=Y:c[2]!==void 0?(lt.test(c[2])&&(i=RegExp("</"+c[2],"g")),r=f):c[3]!==void 0&&(r=f):r===f?c[0]===">"?(r=i??x,h=-1):c[1]===void 0?h=-2:(h=r.lastIndex-c[2].length,d=c[1],r=c[3]===void 0?f:c[3]==='"'?tt:Q):r===tt||r===Q?r=f:r===Z||r===Y?r=x:(r=f,i=void 0);const m=r===f&&o[l+1].startsWith("/>")?" ":"";n+=r===x?a+At:h>=0?(s.push(d),a.slice(0,h)+nt+a.slice(h)+g+m):a+g+(h===-2?l:m)}return[ct(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const l=t.length-1,a=this.parts,[d,c]=Et(t,e);if(this.el=U.createElement(d,s),w.currentNode=this.el.content,e===2){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=w.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(nt)){const u=c[r++],m=i.getAttribute(h).split(g),k=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:k[2],strings:m,ctor:k[1]==="."?St:k[1]==="?"?Tt:k[1]==="@"?Pt:H}),i.removeAttribute(h)}else h.startsWith(g)&&(a.push({type:6,index:n}),i.removeAttribute(h));if(lt.test(i.tagName)){const h=i.textContent.split(g),u=h.length-1;if(u>0){i.textContent=M?M.emptyScript:"";for(let m=0;m<u;m++)i.append(h[m],T()),w.nextNode(),a.push({type:2,index:++n});i.append(h[u],T())}}}else if(i.nodeType===8)if(i.data===at)a.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(g,h+1))!==-1;)a.push({type:7,index:n}),h+=g.length-1}n++}}static createElement(t,e){const s=_.createElement("template");return s.innerHTML=t,s}}function b(o,t,e=o,s){var r,l;if(t===A)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const n=P(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=b(o,i._$AS(o,t.values),i,s)),t}class Ct{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??_).importNode(e,!0);w.currentNode=i;let n=w.nextNode(),r=0,l=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new R(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Ut(n,this,t)),this._$AV.push(d),a=s[++l]}r!==(a==null?void 0:a.index)&&(n=w.nextNode(),r++)}return w.currentNode=_,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):bt(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(ct(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const r=new Ct(i,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=et.get(t.strings);return e===void 0&&et.set(t.strings,e=new U(t)),e}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new R(this.S(T()),this.S(T()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=b(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{const l=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=b(this,l[s+a],e,a),d===A&&(d=this._$AH[a]),r||(r=!P(d)||d!==this._$AH[a]),d===p?t=p:t!==p&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class St extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}class Tt extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}}class Pt extends H{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=b(this,t,e,0)??p)===A)return;const s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ut{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}const z=C.litHtmlPolyfillSupport;z==null||z(U,R),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.1.3");const Rt=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new R(t.insertBefore(T(),n),n,void 0,e??{})}return i._$AI(o),i};/** | ||
* @license | ||
@@ -23,4 +23,120 @@ * Copyright 2017 Google LLC | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/const kt=Symbol();class Nt{get taskComplete(){return this.t||(this.i===1?this.t=new Promise((t,e)=>{this.o=t,this.h=e}):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,i){var n;this.p=0,this.i=0,(this._=t).addController(this);const s=typeof e=="object"?e:{task:e,args:i};this.v=s.task,this.j=s.args,this.m=s.argsEqual??Ot,this.k=s.onComplete,this.A=s.onError,this.autoRun=s.autoRun??!0,"initialValue"in s&&(this.u=s.initialValue,this.i=2,this.O=(n=this.T)==null?void 0:n.call(this))}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;const t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){const t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){var r,l,a,d,c;let e,i;t??(t=this.T()),this.O=t,this.i===1?(r=this.q)==null||r.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask(()=>this._.requestUpdate()):this._.requestUpdate();const s=++this.p;this.q=new AbortController;let n=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(h){n=!0,i=h}if(this.p===s){if(e===kt)this.i=0;else{if(n===!1){try{(l=this.k)==null||l.call(this,e)}catch{}this.i=2,(a=this.o)==null||a.call(this,e)}else{try{(d=this.A)==null||d.call(this,i)}catch{}this.i=3,(c=this.h)==null||c.call(this,i)}this.u=e,this.l=i}this._.requestUpdate()}}abort(t){var e;this.i===1&&((e=this.q)==null||e.abort(t))}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){var e,i,s,n;switch(this.i){case 0:return(e=t.initial)==null?void 0:e.call(t);case 1:return(i=t.pending)==null?void 0:i.call(t);case 2:return(s=t.complete)==null?void 0:s.call(t,this.value);case 3:return(n=t.error)==null?void 0:n.call(t,this.error);default:throw Error("Unexpected status: "+this.i)}}}const Ot=(o,t)=>o===t||o.length===t.length&&o.every((e,i)=>!W(e,t[i])),et=90,Mt="https://www.google.com/search?hl=en-CA&gl=ca&q=Monster+Plowing+Company,+1145+Lawrence+Ave+W,+Toronto,+ON+M6A+1E1&ludocid=6244746586875559414&lsig=AB86z5WTbVyrpc7TX7n5zijMYGdt#lrd=0x882b343da1000019:0x56a9cbef470cfdf6,3";class lt extends S{constructor(){super();H(this,"_googleAPITask",new Nt(this,{task:async([e],{signal:i})=>{const s=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${this.apiToken}`,"Content-Type":"application/json"}},{signal:i});if(!s.ok)throw new Error(response.status);return s.json()},args:()=>[this._apiUrl]}));this._baseUrl="https://www.monsterapi.ca/google/reviews/list",this._apiUrl=this._baseUrl,this._reviews={averageRating:0,results:[],success:!1}}static get styles(){return ut` | ||
*/const kt=Symbol();class Nt{get taskComplete(){return this.t||(this.i===1?this.t=new Promise((t,e)=>{this.o=t,this.h=e}):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){var n;this.p=0,this.i=0,(this._=t).addController(this);const i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??Ot,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=(n=this.T)==null?void 0:n.call(this))}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;const t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){const t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){var r,l,a,d,c;let e,s;t??(t=this.T()),this.O=t,this.i===1?(r=this.q)==null||r.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask(()=>this._.requestUpdate()):this._.requestUpdate();const i=++this.p;this.q=new AbortController;let n=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(h){n=!0,s=h}if(this.p===i){if(e===kt)this.i=0;else{if(n===!1){try{(l=this.k)==null||l.call(this,e)}catch{}this.i=2,(a=this.o)==null||a.call(this,e)}else{try{(d=this.A)==null||d.call(this,s)}catch{}this.i=3,(c=this.h)==null||c.call(this,s)}this.u=e,this.l=s}this._.requestUpdate()}}abort(t){var e;this.i===1&&((e=this.q)==null||e.abort(t))}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){var e,s,i,n;switch(this.i){case 0:return(e=t.initial)==null?void 0:e.call(t);case 1:return(s=t.pending)==null?void 0:s.call(t);case 2:return(i=t.complete)==null?void 0:i.call(t,this.value);case 3:return(n=t.error)==null?void 0:n.call(t,this.error);default:throw Error("Unexpected status: "+this.i)}}}const Ot=(o,t)=>o===t||o.length===t.length&&o.every((e,s)=>!F(e,t[s])),Mt=ot` | ||
:host { | ||
--mp-wc-small-spacing: 10px; | ||
--mp-wc-default-spacing: 20px; | ||
--mp-wc-small-padding: 30px; | ||
--mp-wc-medium-padding: 40px; | ||
--mp-wc-default-radius: 12px; | ||
--mp-wc-x-large-title-size: 82px; | ||
--mp-wc-x-large-title-height: 56px; | ||
--mp-wc-large-title-size: 62px; | ||
--mp-wc-large-title-height: 74px; | ||
--mp-wc-medium-title-size: 48px; | ||
--mp-wc-medium-title-height: 56px; | ||
--mp-wc-small-title-size: 32px; | ||
--mp-wc-small-title-height: 40px; | ||
} | ||
`,it=90,Ht="https://www.google.com/search?hl=en-CA&gl=ca&q=Monster+Plowing+Company,+1145+Lawrence+Ave+W,+Toronto,+ON+M6A+1E1&ludocid=6244746586875559414&lsig=AB86z5WTbVyrpc7TX7n5zijMYGdt#lrd=0x882b343da1000019:0x56a9cbef470cfdf6,3";class q extends S{constructor(){super();N(this,"_googleAPITask",new Nt(this,{task:async([e],{signal:s})=>{const i=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${this.apiToken}`,"Content-Type":"application/json"}},{signal:s});if(!i.ok)throw new Error(response.status);return i.json()},args:()=>[this._apiUrl]}));this._baseUrl="https://www.monsterapi.ca/google/reviews/list",this._apiUrl=this._baseUrl,this._reviews={averageRating:0,results:[],success:!1}}render(){const{apiToken:e}=this;try{if(!e||e.trim()==="")throw new Error("Missing or invalid apiToken");const s=r=>Array.from({length:5}).map((l,a)=>v` | ||
<svg | ||
fill="${a<=r?"#FCBF02":"#DADCE0"}" | ||
width="15px" | ||
height="15px" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
<g> | ||
<path d="M6.82617 11.442L3.54617 13.166C3.46353 13.2093 3.3704 13.2287 3.27732 13.2219C3.18425 13.2151 3.09494 13.1824 3.0195 13.1274C2.94406 13.0725 2.8855 12.9975 2.85045 12.911C2.8154 12.8245 2.80526 12.7299 2.82117 12.638L3.44817 8.98798C3.46192 8.908 3.456 8.82587 3.43091 8.74869C3.40582 8.67151 3.36232 8.6016 3.30417 8.54499L0.650168 5.95899C0.583317 5.89388 0.53602 5.81136 0.51363 5.72076C0.491239 5.63017 0.494647 5.53512 0.52347 5.44637C0.552292 5.35761 0.605378 5.27869 0.676721 5.21854C0.748065 5.15838 0.834818 5.1194 0.927168 5.10599L4.59317 4.57299C4.67344 4.56146 4.7497 4.53059 4.81537 4.48303C4.88105 4.43547 4.93418 4.37265 4.97017 4.29999L6.61017 0.977985C6.65153 0.894518 6.7154 0.824266 6.79455 0.775151C6.87371 0.726037 6.96501 0.700012 7.05817 0.700012C7.15132 0.700012 7.24263 0.726037 7.32178 0.775151C7.40094 0.824266 7.4648 0.894518 7.50617 0.977985L9.14717 4.29899C9.18307 4.37152 9.23604 4.43426 9.30153 4.48182C9.36702 4.52937 9.44308 4.56031 9.52317 4.57199L13.1892 5.10499C13.2815 5.1184 13.3683 5.15738 13.4396 5.21754C13.511 5.27769 13.564 5.35661 13.5929 5.44537C13.6217 5.53412 13.6251 5.62917 13.6027 5.71976C13.5803 5.81036 13.533 5.89288 13.4662 5.95798L10.8132 8.54398C10.7552 8.60049 10.7118 8.67024 10.6867 8.74723C10.6616 8.82422 10.6556 8.90616 10.6692 8.98598L11.2962 12.637C11.3122 12.7291 11.3021 12.8238 11.267 12.9105C11.232 12.9971 11.1733 13.0722 11.0977 13.1272C11.0221 13.1822 10.9326 13.2149 10.8393 13.2215C10.7461 13.2282 10.6528 13.2086 10.5702 13.165L7.29117 11.441C7.21946 11.4033 7.13967 11.3836 7.05867 11.3836C6.97767 11.3836 6.89788 11.4033 6.82617 11.441V11.442Z"> | ||
</path> | ||
</g> | ||
</svg> | ||
`),i=()=>{window.open(Ht,"_blank")},n=()=>this._reviews.results.map(r=>{const l=r.comment.length;let a=r.comment.split("").slice(0,it).join("");const d=()=>{const c=this.renderRoot.querySelector(`#button-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}`),h=this.renderRoot.querySelector(`#text-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}`),u=this.renderRoot.querySelectorAll(".mp-wc-review-card");c.innerText.trim("")==="Read More"?(u.forEach(m=>{m.style.height="auto"}),h.removeChild(h.childNodes[1]),h.appendChild(document.createTextNode(r.comment)),c.removeChild(c.childNodes[0]),c.appendChild(document.createTextNode("Hide"))):(h.removeChild(h.childNodes[1]),h.appendChild(document.createTextNode(r.comment.split("").slice(0,it).join(""))),c.removeChild(c.childNodes[0]),c.appendChild(document.createTextNode("Read More")))};return v` | ||
<div class="mp-wc-review-card"> | ||
<header class="mp-wc-profile-header"> | ||
<img | ||
src="${r.reviewer.profilePhotoUrl}" | ||
alt="${r.reviewer.displayName}" | ||
class="mp-wc-reviewer-profile" | ||
/> | ||
<div> | ||
<h3 class="mp-wc-review-profile-name">${r.reviewer.displayName}</h3> | ||
<p class="mp-wc-review-date">${r.relativeTime}</p> | ||
</div> | ||
</header> | ||
<div> | ||
${s(r.starRating)} | ||
</div> | ||
<p class="mp-wc-review-text" id="text-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}">${a}</p> | ||
${l>90?v`<button | ||
class="mp-wc-read-more-button" | ||
id="button-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}" | ||
@click=${()=>d()} | ||
> | ||
Read More | ||
</button>`:p} | ||
</div> | ||
`});return this._googleAPITask.render({pending:()=>v` | ||
<section class="mp-wc-reviews-main"> | ||
<header class="mp-wc-reviews-header"> | ||
<div class="mp-wm-google-rating"> | ||
<img | ||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/800px-Google_2015_logo.svg.png" | ||
alt="google" | ||
class="mp-wc-google-logo" | ||
/> | ||
<h3 class="mp-wc-rating-title">Rating</h3> | ||
<h3 class="mp-wc-rating-value">${this._reviews.averageRating}</h3> | ||
<div class="mp-wc-stars"> | ||
${s(this._reviews.averageRating)} | ||
</div> | ||
</div> | ||
<button | ||
class="mp-wc-review-button" | ||
@click=${()=>i()} | ||
>Write a review</button> | ||
</header> | ||
<div class="mp-wc-reviews-container"> | ||
${n()} | ||
</div> | ||
</section> | ||
`,complete:r=>{this._reviews={results:[...this._reviews.results,...r.reviews],averageRating:r.averageRating,success:r.success};const l=()=>{this._apiUrl=`${this._baseUrl}?nextPageToken=${r.nextPageToken}`,this.requestUpdate()};return v` | ||
<section class="mp-wc-reviews-main"> | ||
<header class="mp-wc-reviews-header"> | ||
<div class="mp-wm-google-rating"> | ||
<img | ||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/800px-Google_2015_logo.svg.png" | ||
alt="google" | ||
class="mp-wc-google-logo" | ||
/> | ||
<h3 class="mp-wc-rating-title">Rating</h3> | ||
<h3 class="mp-wc-rating-value">${this._reviews.averageRating}</h3> | ||
<div class="mp-wc-stars"> | ||
${s(this._reviews.averageRating)} | ||
</div> | ||
</div> | ||
<button | ||
class="mp-wc-review-button" | ||
@click=${()=>i()} | ||
>Write a review</button> | ||
</header> | ||
<div class="mp-wc-reviews-container"> | ||
${n()} | ||
</div> | ||
<button | ||
class="mp-wc-load-more" | ||
@click=${()=>l()} | ||
> | ||
Load More | ||
</button> | ||
</section> | ||
`},error:r=>{throw new Error(r)}})}catch(s){return v` | ||
<div style="background-color: black; color: white; padding: 10px;"> | ||
<h1>Invalid properties</h1> | ||
<p>Error: ${s} - check your apiToken</p> | ||
</div> | ||
`}}}N(q,"styles",[Mt,ot` | ||
.mp-wc-reviews-main { | ||
@@ -33,3 +149,3 @@ display: flex; | ||
background-color: #1A3148; | ||
border-radius: 12px; | ||
border-radius: var(--mp-wc-default-radius); | ||
padding: 24px; | ||
@@ -47,3 +163,3 @@ display: flex; | ||
align-items: center; | ||
gap: 10px; | ||
gap: var(--mp-wc-small-spacing); | ||
} | ||
@@ -68,3 +184,3 @@ | ||
.mp-wc-review-button { | ||
padding: 8px 20px; | ||
padding: 8px var(--mp-wc-default-spacing); | ||
font-family: 'Oswald'; | ||
@@ -89,4 +205,4 @@ font-size: 15px; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
margin-top: 20px; | ||
gap: var(--mp-wc-default-spacing); | ||
margin-top: var(--mp-wc-default-spacing); | ||
justify-content: center; | ||
@@ -97,3 +213,3 @@ } | ||
background-color: #1A3148; | ||
border-radius: 12px; | ||
border-radius: var(--mp-wc-default-radius); | ||
padding: 24px; | ||
@@ -137,3 +253,3 @@ display: flex; | ||
cursor: pointer; | ||
margin: 20px auto; | ||
margin: var(--mp-wc-default-spacing) auto; | ||
font-weight: bold; | ||
@@ -158,97 +274,2 @@ transition: all 300ms; | ||
} | ||
`}render(){const{apiToken:e}=this;try{if(!e||e.trim()==="")throw new Error("Missing or invalid apiToken");const i=r=>Array.from({length:5}).map((l,a)=>v` | ||
<svg | ||
fill="${a<=r?"#FCBF02":"#DADCE0"}" | ||
width="15px" | ||
height="15px" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
<g> | ||
<path d="M6.82617 11.442L3.54617 13.166C3.46353 13.2093 3.3704 13.2287 3.27732 13.2219C3.18425 13.2151 3.09494 13.1824 3.0195 13.1274C2.94406 13.0725 2.8855 12.9975 2.85045 12.911C2.8154 12.8245 2.80526 12.7299 2.82117 12.638L3.44817 8.98798C3.46192 8.908 3.456 8.82587 3.43091 8.74869C3.40582 8.67151 3.36232 8.6016 3.30417 8.54499L0.650168 5.95899C0.583317 5.89388 0.53602 5.81136 0.51363 5.72076C0.491239 5.63017 0.494647 5.53512 0.52347 5.44637C0.552292 5.35761 0.605378 5.27869 0.676721 5.21854C0.748065 5.15838 0.834818 5.1194 0.927168 5.10599L4.59317 4.57299C4.67344 4.56146 4.7497 4.53059 4.81537 4.48303C4.88105 4.43547 4.93418 4.37265 4.97017 4.29999L6.61017 0.977985C6.65153 0.894518 6.7154 0.824266 6.79455 0.775151C6.87371 0.726037 6.96501 0.700012 7.05817 0.700012C7.15132 0.700012 7.24263 0.726037 7.32178 0.775151C7.40094 0.824266 7.4648 0.894518 7.50617 0.977985L9.14717 4.29899C9.18307 4.37152 9.23604 4.43426 9.30153 4.48182C9.36702 4.52937 9.44308 4.56031 9.52317 4.57199L13.1892 5.10499C13.2815 5.1184 13.3683 5.15738 13.4396 5.21754C13.511 5.27769 13.564 5.35661 13.5929 5.44537C13.6217 5.53412 13.6251 5.62917 13.6027 5.71976C13.5803 5.81036 13.533 5.89288 13.4662 5.95798L10.8132 8.54398C10.7552 8.60049 10.7118 8.67024 10.6867 8.74723C10.6616 8.82422 10.6556 8.90616 10.6692 8.98598L11.2962 12.637C11.3122 12.7291 11.3021 12.8238 11.267 12.9105C11.232 12.9971 11.1733 13.0722 11.0977 13.1272C11.0221 13.1822 10.9326 13.2149 10.8393 13.2215C10.7461 13.2282 10.6528 13.2086 10.5702 13.165L7.29117 11.441C7.21946 11.4033 7.13967 11.3836 7.05867 11.3836C6.97767 11.3836 6.89788 11.4033 6.82617 11.441V11.442Z"> | ||
</path> | ||
</g> | ||
</svg> | ||
`),s=()=>{window.open(Mt,"_blank")},n=()=>this._reviews.results.map(r=>{const l=r.comment.length;let a=r.comment.split("").slice(0,et).join("");const d=()=>{const c=this.renderRoot.querySelector(`#button-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}`),h=this.renderRoot.querySelector(`#text-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}`),u=this.renderRoot.querySelectorAll(".mp-wc-review-card");c.innerText.trim("")==="Read More"?(u.forEach(m=>{m.style.height="auto"}),h.removeChild(h.childNodes[1]),h.appendChild(document.createTextNode(r.comment)),c.removeChild(c.childNodes[0]),c.appendChild(document.createTextNode("Hide"))):(h.removeChild(h.childNodes[1]),h.appendChild(document.createTextNode(r.comment.split("").slice(0,et).join(""))),c.removeChild(c.childNodes[0]),c.appendChild(document.createTextNode("Read More")))};return v` | ||
<div class="mp-wc-review-card"> | ||
<header class="mp-wc-profile-header"> | ||
<img | ||
src="${r.reviewer.profilePhotoUrl}" | ||
alt="${r.reviewer.displayName}" | ||
class="mp-wc-reviewer-profile" | ||
/> | ||
<div> | ||
<h3 class="mp-wc-review-profile-name">${r.reviewer.displayName}</h3> | ||
<p class="mp-wc-review-date">${r.relativeTime}</p> | ||
</div> | ||
</header> | ||
<div> | ||
${i(r.starRating)} | ||
</div> | ||
<p class="mp-wc-review-text" id="text-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}">${a}</p> | ||
${l>90?v`<button | ||
class="mp-wc-read-more-button" | ||
id="button-${new Date(r.updateTime)[Symbol.toPrimitive]("number")}" | ||
@click=${()=>d()} | ||
> | ||
Read More | ||
</button>`:p} | ||
</div> | ||
`});return this._googleAPITask.render({pending:()=>v` | ||
<section class="mp-wc-reviews-main"> | ||
<header class="mp-wc-reviews-header"> | ||
<div class="mp-wm-google-rating"> | ||
<img | ||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/800px-Google_2015_logo.svg.png" | ||
alt="google" | ||
class="mp-wc-google-logo" | ||
/> | ||
<h3 class="mp-wc-rating-title">Rating</h3> | ||
<h3 class="mp-wc-rating-value">${this._reviews.averageRating}</h3> | ||
<div class="mp-wc-stars"> | ||
${i(this._reviews.averageRating)} | ||
</div> | ||
</div> | ||
<button | ||
class="mp-wc-review-button" | ||
@click=${()=>s()} | ||
>Write a review</button> | ||
</header> | ||
<div class="mp-wc-reviews-container"> | ||
${n()} | ||
</div> | ||
</section> | ||
`,complete:r=>{this._reviews={results:[...this._reviews.results,...r.reviews],averageRating:r.averageRating,success:r.success};const l=()=>{this._apiUrl=`${this._baseUrl}?nextPageToken=${r.nextPageToken}`,this.requestUpdate()};return v` | ||
<section class="mp-wc-reviews-main"> | ||
<header class="mp-wc-reviews-header"> | ||
<div class="mp-wm-google-rating"> | ||
<img | ||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/800px-Google_2015_logo.svg.png" | ||
alt="google" | ||
class="mp-wc-google-logo" | ||
/> | ||
<h3 class="mp-wc-rating-title">Rating</h3> | ||
<h3 class="mp-wc-rating-value">${this._reviews.averageRating}</h3> | ||
<div class="mp-wc-stars"> | ||
${i(this._reviews.averageRating)} | ||
</div> | ||
</div> | ||
<button | ||
class="mp-wc-review-button" | ||
@click=${()=>s()} | ||
>Write a review</button> | ||
</header> | ||
<div class="mp-wc-reviews-container"> | ||
${n()} | ||
</div> | ||
<button | ||
class="mp-wc-load-more" | ||
@click=${()=>l()} | ||
> | ||
Load More | ||
</button> | ||
</section> | ||
`},error:r=>{throw new Error(r)}})}catch(i){return v` | ||
<div style="background-color: black; color: white; padding: 10px;"> | ||
<h1>Invalid properties</h1> | ||
<p>Error: ${i} - check your apiToken</p> | ||
</div> | ||
`}}}H(lt,"properties",{_baseUrl:"",_apiUrl:"",_reviews:{averageRating:0,results:[],success:!1},apiToken:""});customElements.define("monster-google-reviews",lt); | ||
`]),N(q,"properties",{_baseUrl:"",_apiUrl:"",_reviews:{averageRating:0,results:[],success:!1},apiToken:""});customElements.define("monster-google-reviews",q); |
{ | ||
"name": "@monster_property_services/monster-google-review", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "This is a web component to display all the google reviews of a given place.", | ||
@@ -42,4 +42,5 @@ "main": "index.js", | ||
"@lit/task": "^1.0.1", | ||
"@monster_property_services/monster-global-styles": "^1.0.0", | ||
"lit": "^3.1.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34359
324
3
3