@snippyly/plugin-staging 1.0.40 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/snippyly.js +126 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snippyly/plugin-staging",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "",
5
5
  "main": "snippyly.js",
6
6
  "scripts": {
package/snippyly.js CHANGED
@@ -8,19 +8,19 @@ const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */;var r;const l=window.trustedTypes,a=l?l.emptyScript:"",d=window.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let o=t;switch(i){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},h=(t,i)=>i!==t&&(i==i||t==t),v={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:h};class p extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,o)=>{const s=this._$Eh(o,i);void 0!==s&&(this._$Eu.set(s,o),t.push(s))})),t}static createProperty(t,i=v){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,o,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,o){return{get(){return this[i]},set(s){const e=this[t];this[i]=s,this.requestUpdate(t,e,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of i)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Eh(t,i){const o=i.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,o;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var i;const o=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,o)=>{t?i.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((t=>{const o=document.createElement("style"),s=window.litNonce;void 0!==s&&o.setAttribute("nonce",s),o.textContent=t.cssText,i.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ES(t,i,o=v){var s,e;const n=this.constructor._$Eh(t,o);if(void 0!==n&&!0===o.reflect){const r=(null!==(e=null===(s=o.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==e?e:c.toAttribute)(i,o.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,i){var o,s,e;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(e=null!==(s=null===(o=l)||void 0===o?void 0:o.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==e?e:c.fromAttribute;this._$Ei=r,this[r]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,o){let s=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||h)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===o.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const o=this._$AL;try{i=this.shouldUpdate(o),i?(this.willUpdate(o),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(o)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(o)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),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._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
11
+ */;var r;const l=window.trustedTypes,a=l?l.emptyScript:"",d=window.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?a:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let o=t;switch(i){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},h=(t,i)=>i!==t&&(i==i||t==t),p={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:h};class v extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,o)=>{const s=this._$Eh(o,i);void 0!==s&&(this._$Eu.set(s,o),t.push(s))})),t}static createProperty(t,i=p){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const o="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,o,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,o){return{get(){return this[i]},set(s){const e=this[t];this[i]=s,this.requestUpdate(t,e,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of i)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)i.unshift(n(t))}else void 0!==t&&i.push(n(t));return i}static _$Eh(t,i){const o=i.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,o;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var i;const o=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,o)=>{t?i.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((t=>{const o=document.createElement("style"),s=window.litNonce;void 0!==s&&o.setAttribute("nonce",s),o.textContent=t.cssText,i.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ES(t,i,o=p){var s,e;const n=this.constructor._$Eh(t,o);if(void 0!==n&&!0===o.reflect){const r=(null!==(e=null===(s=o.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==e?e:c.toAttribute)(i,o.type);this._$Ei=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$Ei=null}}_$AK(t,i){var o,s,e;const n=this.constructor,r=n._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=n.getPropertyOptions(r),l=t.converter,a=null!==(e=null!==(s=null===(o=l)||void 0===o?void 0:o.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==e?e:c.fromAttribute;this._$Ei=r,this[r]=a(i,t.type),this._$Ei=null}}requestUpdate(t,i,o){let s=!0;void 0!==t&&(((o=o||this.constructor.getPropertyOptions(t)).hasChanged||h)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===o.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,o))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const o=this._$AL;try{i=this.shouldUpdate(o),i?(this.willUpdate(o),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(o)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(o)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),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._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- var u;p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:p}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,C="?"+w,b=`<${C}>`,m=document,f=(t="")=>m.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,E=/>/g,L=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,M=/'/g,k=/"/g,_=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),U=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),j=new WeakMap,B=m.createTreeWalker(m,129,null,!1),V=(t,i)=>{const o=t.length-1,s=[];let e,n=2===i?"<svg>":"",r=F;for(let i=0;i<o;i++){const o=t[i];let l,a,d=-1,c=0;for(;c<o.length&&(r.lastIndex=c,a=r.exec(o),null!==a);)c=r.lastIndex,r===F?"!--"===a[1]?r=$:void 0!==a[1]?r=E:void 0!==a[2]?(_.test(a[2])&&(e=RegExp("</"+a[2],"g")),r=L):void 0!==a[3]&&(r=L):r===L?">"===a[0]?(r=null!=e?e:F,d=-1):void 0===a[1]?d=-2:(d=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?L:'"'===a[3]?k:M):r===k||r===M?r=L:r===$||r===E?r=F:(r=L,e=void 0);const h=r===L&&t[i+1].startsWith("/>")?" ":"";n+=r===F?o+b:d>=0?(s.push(l),o.slice(0,d)+"$lit$"+o.slice(d)+w+h):o+w+(-2===d?(s.push(void 0),i):h)}const l=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,s]};class O{constructor({strings:t,_$litType$:i},o){let s;this.parts=[];let e=0,n=0;const r=t.length-1,l=this.parts,[a,d]=V(t,i);if(this.el=O.createElement(a,o),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=B.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const o=d[n++];if(t.push(i),void 0!==o){const t=s.getAttribute(o.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(o);l.push({type:1,index:e,name:i[2],strings:t,ctor:"."===i[1]?N:"?"===i[1]?P:"@"===i[1]?H:D})}else l.push({type:6,index:e})}for(const i of t)s.removeAttribute(i)}if(_.test(s.tagName)){const t=s.textContent.split(w),i=t.length-1;if(i>0){s.textContent=y?y.emptyScript:"";for(let o=0;o<i;o++)s.append(t[o],f()),B.nextNode(),l.push({type:2,index:++e});s.append(t[i],f())}}}else if(8===s.nodeType)if(s.data===C)l.push({type:2,index:e});else{let t=-1;for(;-1!==(t=s.data.indexOf(w,t+1));)l.push({type:7,index:e}),t+=w.length-1}e++}}static createElement(t,i){const o=m.createElement("template");return o.innerHTML=t,o}}function I(t,i,o=t,s){var e,n,r,l;if(i===U)return i;let a=void 0!==s?null===(e=o._$Cl)||void 0===e?void 0:e[s]:o._$Cu;const d=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,o,s)),void 0!==s?(null!==(r=(l=o)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=a:o._$Cu=a),void 0!==a&&(i=I(t,a._$AS(t,i.values),a,s)),i}class R{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:s}=this._$AD,e=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:m).importNode(o,!0);B.currentNode=e;let n=B.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new T(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new K(n,this,t)),this.v.push(i),a=s[++l]}r!==(null==a?void 0:a.index)&&(n=B.nextNode(),r++)}return e}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class T{constructor(t,i,o,s){var e;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=s,this._$Cg=null===(e=null==s?void 0:s.isConnected)||void 0===e||e}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=I(this,t,i),x(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==Z&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(m.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=O.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===e)this._$AH.m(o);else{const t=new R(e,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=j.get(t.strings);return void 0===i&&j.set(t.strings,i=new O(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,s=0;for(const e of t)s===i.length?i.push(o=new T(this.M(f()),this.M(f()),this,this.options)):o=i[s],o._$AI(e),s++;s<i.length&&(this._$AR(o&&o._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,o,s,e){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=e,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,s){const e=this.strings;let n=!1;if(void 0===e)t=I(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const s=t;let r,l;for(t=e[0],r=0;r<e.length-1;r++)l=I(this,s[o+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===Z?t=Z:t!==Z&&(t+=(null!=l?l:"")+e[r+1]),this._$AH[r]=l}n&&!s&&this.C(t)}C(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class N extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===Z?void 0:t}}const z=y?y.emptyScript:"";class P extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==Z?this.element.setAttribute(this.name,z):this.element.removeAttribute(this.name)}}class H extends D{constructor(t,i,o,s,e){super(t,i,o,s,e),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=I(this,t,i,0))&&void 0!==o?o:Z)===U)return;const s=this._$AH,e=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Z&&(s===Z||e);e&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const J=window.litHtmlPolyfillSupport;
17
+ var u;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,g=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,C="?"+w,m=`<${C}>`,b=document,f=(t="")=>b.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,E=/>/g,k=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,L=/'/g,M=/"/g,_=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...o)=>({_$litType$:t,strings:i,values:o}))(1),U=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),j=new WeakMap,B=b.createTreeWalker(b,129,null,!1),V=(t,i)=>{const o=t.length-1,s=[];let e,n=2===i?"<svg>":"",r=$;for(let i=0;i<o;i++){const o=t[i];let l,a,d=-1,c=0;for(;c<o.length&&(r.lastIndex=c,a=r.exec(o),null!==a);)c=r.lastIndex,r===$?"!--"===a[1]?r=F:void 0!==a[1]?r=E:void 0!==a[2]?(_.test(a[2])&&(e=RegExp("</"+a[2],"g")),r=k):void 0!==a[3]&&(r=k):r===k?">"===a[0]?(r=null!=e?e:$,d=-1):void 0===a[1]?d=-2:(d=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?k:'"'===a[3]?M:L):r===M||r===L?r=k:r===F||r===E?r=$:(r=k,e=void 0);const h=r===k&&t[i+1].startsWith("/>")?" ":"";n+=r===$?o+m:d>=0?(s.push(l),o.slice(0,d)+"$lit$"+o.slice(d)+w+h):o+w+(-2===d?(s.push(void 0),i):h)}const l=n+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==g?g.createHTML(l):l,s]};class I{constructor({strings:t,_$litType$:i},o){let s;this.parts=[];let e=0,n=0;const r=t.length-1,l=this.parts,[a,d]=V(t,i);if(this.el=I.createElement(a,o),B.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=B.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(w)){const o=d[n++];if(t.push(i),void 0!==o){const t=s.getAttribute(o.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(o);l.push({type:1,index:e,name:i[2],strings:t,ctor:"."===i[1]?N:"?"===i[1]?H:"@"===i[1]?P:D})}else l.push({type:6,index:e})}for(const i of t)s.removeAttribute(i)}if(_.test(s.tagName)){const t=s.textContent.split(w),i=t.length-1;if(i>0){s.textContent=y?y.emptyScript:"";for(let o=0;o<i;o++)s.append(t[o],f()),B.nextNode(),l.push({type:2,index:++e});s.append(t[i],f())}}}else if(8===s.nodeType)if(s.data===C)l.push({type:2,index:e});else{let t=-1;for(;-1!==(t=s.data.indexOf(w,t+1));)l.push({type:7,index:e}),t+=w.length-1}e++}}static createElement(t,i){const o=b.createElement("template");return o.innerHTML=t,o}}function O(t,i,o=t,s){var e,n,r,l;if(i===U)return i;let a=void 0!==s?null===(e=o._$Cl)||void 0===e?void 0:e[s]:o._$Cu;const d=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==d&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===d?a=void 0:(a=new d(t),a._$AT(t,o,s)),void 0!==s?(null!==(r=(l=o)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=a:o._$Cu=a),void 0!==a&&(i=O(t,a._$AS(t,i.values),a,s)),i}class R{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:o},parts:s}=this._$AD,e=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:b).importNode(o,!0);B.currentNode=e;let n=B.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new T(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new K(n,this,t)),this.v.push(i),a=s[++l]}r!==(null==a?void 0:a.index)&&(n=B.nextNode(),r++)}return e}m(t){let i=0;for(const o of this.v)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}}class T{constructor(t,i,o,s){var e;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=s,this._$Cg=null===(e=null==s?void 0:s.isConnected)||void 0===e||e}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=O(this,t,i),x(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==U&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var i;return S(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==Z&&x(this._$AH)?this._$AA.nextSibling.data=t:this.k(b.createTextNode(t)),this._$AH=t}T(t){var i;const{values:o,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=I.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===e)this._$AH.m(o);else{const t=new R(e,this),i=t.p(this.options);t.m(o),this.k(i),this._$AH=t}}_$AC(t){let i=j.get(t.strings);return void 0===i&&j.set(t.strings,i=new I(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let o,s=0;for(const e of t)s===i.length?i.push(o=new T(this.M(f()),this.M(f()),this,this.options)):o=i[s],o._$AI(e),s++;s<i.length&&(this._$AR(o&&o._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var o;for(null===(o=this._$AP)||void 0===o||o.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,o,s,e){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=e,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,o,s){const e=this.strings;let n=!1;if(void 0===e)t=O(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{const s=t;let r,l;for(t=e[0],r=0;r<e.length-1;r++)l=O(this,s[o+r],i,r),l===U&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===Z?t=Z:t!==Z&&(t+=(null!=l?l:"")+e[r+1]),this._$AH[r]=l}n&&!s&&this.C(t)}C(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class N extends D{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===Z?void 0:t}}const z=y?y.emptyScript:"";class H extends D{constructor(){super(...arguments),this.type=4}C(t){t&&t!==Z?this.element.setAttribute(this.name,z):this.element.removeAttribute(this.name)}}class P extends D{constructor(t,i,o,s,e){super(t,i,o,s,e),this.type=5}_$AI(t,i=this){var o;if((t=null!==(o=O(this,t,i,0))&&void 0!==o?o:Z)===U)return;const s=this._$AH,e=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Z&&(s===Z||e);e&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,o;"function"==typeof this._$AH?this._$AH.call(null!==(o=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==o?o:this.element,t):this._$AH.handleEvent(t)}}class K{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){O(this,t)}}const J=window.litHtmlPolyfillSupport;
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
22
  */
23
- var W,G;null==J||J(O,T),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class X extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const o=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=o.firstChild),o}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,o)=>{var s,e;const n=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:i;let r=n._$litPart$;if(void 0===r){const t=null!==(e=null==o?void 0:o.renderBefore)&&void 0!==e?e:null;n._$litPart$=r=new T(i.insertBefore(f(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return U}}X.finalized=!0,X._$litElement$=!0,null===(W=globalThis.litElementHydrateSupport)||void 0===W||W.call(globalThis,{LitElement:X});const q=globalThis.litElementPolyfillSupport;null==q||q({LitElement:X}),(null!==(G=globalThis.litElementVersions)&&void 0!==G?G:globalThis.litElementVersions=[]).push("3.2.0");
23
+ var W,G;null==J||J(I,T),(null!==(u=globalThis.litHtmlVersions)&&void 0!==u?u:globalThis.litHtmlVersions=[]).push("2.2.6");class X extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const o=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=o.firstChild),o}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,o)=>{var s,e;const n=null!==(s=null==o?void 0:o.renderBefore)&&void 0!==s?s:i;let r=n._$litPart$;if(void 0===r){const t=null!==(e=null==o?void 0:o.renderBefore)&&void 0!==e?e:null;n._$litPart$=r=new T(i.insertBefore(f(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return U}}X.finalized=!0,X._$litElement$=!0,null===(W=globalThis.litElementHydrateSupport)||void 0===W||W.call(globalThis,{LitElement:X});const q=globalThis.litElementPolyfillSupport;null==q||q({LitElement:X}),(null!==(G=globalThis.litElementVersions)&&void 0!==G?G:globalThis.litElementVersions=[]).push("3.2.0");
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
@@ -53,7 +53,7 @@ const ot=1;
53
53
  * Copyright 2018 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
55
  */
56
- const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==ot||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var o,s;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(o=this.st)||void 0===o?void 0:o.has(t))&&this.et.add(t);return this.render(i)}const e=t.element.classList;this.et.forEach((t=>{t in i||(e.remove(t),this.et.delete(t))}));for(const t in i){const o=!!i[t];o===this.et.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(o?(e.add(t),this.et.add(t)):(e.remove(t),this.et.delete(t)))}return U}}),et="snippyly-cursor",nt="snippyly-comments",rt="snippyly-comments-sidebar",lt="snippyly-huddle",at="snippyly-recorder-notes",dt="enable-url-navigation",ct=(t,i,o=!1,s="localStorage")=>{try{const e=o?btoa(i):i;"localStorage"===s?localStorage.setItem(t,e):sessionStorage.setItem(t,e)}catch(t){console.warn("Error in setLocalStorage: ",t)}},ht=(t,i=!1,o="localStorage")=>{try{let s=null;return s="localStorage"===o?localStorage.getItem(t):sessionStorage.getItem(t),s&&i?atob(s):s}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},vt=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}},pt=(...t)=>{if(t)switch(t.length){case 1:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1))`;case 2:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))`;case 3:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
56
+ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==ot||"class"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((i=>t[i])).join(" ")+" "}update(t,[i]){var o,s;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!(null===(o=this.st)||void 0===o?void 0:o.has(t))&&this.et.add(t);return this.render(i)}const e=t.element.classList;this.et.forEach((t=>{t in i||(e.remove(t),this.et.delete(t))}));for(const t in i){const o=!!i[t];o===this.et.has(t)||(null===(s=this.st)||void 0===s?void 0:s.has(t))||(o?(e.add(t),this.et.add(t)):(e.remove(t),this.et.delete(t)))}return U}}),et="snippyly-cursor",nt="snippyly-comments",rt="snippyly-comments-sidebar",lt="snippyly-huddle",at="snippyly-recorder-notes",dt="enable-url-navigation",ct=(t,i,o=!1,s="localStorage")=>{try{const e=o?btoa(i):i;"localStorage"===s?localStorage.setItem(t,e):sessionStorage.setItem(t,e)}catch(t){console.warn("Error in setLocalStorage: ",t)}},ht=(t,i=!1,o="localStorage")=>{try{let s=null;return s="localStorage"===o?localStorage.getItem(t):sessionStorage.getItem(t),s&&i?atob(s):s}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},pt=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}},vt=(...t)=>{if(t)switch(t.length){case 1:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1))`;case 2:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))`;case 3:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
57
57
  calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1))`;case 4:return e`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
58
58
  calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[3]}rem * var(--snippyly-base-rem-unit, 1))`}return e`0`},ut=e`
59
59
 
@@ -68,8 +68,14 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
68
68
  bottom: 0;
69
69
  right: 0;
70
70
  z-index: 99999999;
71
- margin: ${pt(1.5)};
72
- margin-bottom: ${pt(3)}; // Added to prevent overlap between plugin UI and webflow badge
71
+ margin: ${vt(1.5)};
72
+ margin-bottom: ${vt(3)}; // Added to prevent overlap between plugin UI and webflow badge
73
+ }
74
+
75
+ @media only screen and (max-width: 660px) {
76
+ .snippyly-plugin-container {
77
+ display: none;
78
+ }
73
79
  }
74
80
 
75
81
  .wrap {
@@ -129,7 +135,7 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
129
135
  background: #EAE8F9;
130
136
  }
131
137
 
132
- .toolbar-icon:active {
138
+ .toolbar-icon:active, .toolbar-icon.active {
133
139
  fill: #FFFFFF;
134
140
  background: #625DF5;
135
141
  }
@@ -301,6 +307,17 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
301
307
  border-radius: 50px;
302
308
  }
303
309
 
310
+ .profile-initial {
311
+ background: #625df5;
312
+ width: 32px;
313
+ height: 32px;
314
+ border-radius: 32px;
315
+ display: flex;
316
+ align-items: center;
317
+ justify-content: center;
318
+ color: white;
319
+ }
320
+
304
321
 
305
322
 
306
323
  .toolbar:not(.expanded) .toolbar-icon-arrow {
@@ -376,7 +393,60 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
376
393
  .d-none {
377
394
  display: none;
378
395
  }
379
- `;var yt=function(t,i,o,s){for(var e,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,o):s,l=t.length-1;l>=0;l--)(e=t[l])&&(r=(n<3?e(r):n>3?e(i,o,r):e(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let gt=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const s=JSON.parse(atob(o.get("snippyly_google_token"))),e={},n=(null===(t=s.providerData)||void 0===t?void 0:t.length)?s.providerData[0]:null;e.userId=s.uid,e.name=s.displayName||(null==n?void 0:n.displayName),e.email=s.email||(null==n?void 0:n.email),e.photoUrl=(null==s?void 0:s.photoURL)||(null==n?void 0:n.photoURL),e.contacts=window.SNIPPYLY_USER_CONTACTS||[],ct("snippyly-user",JSON.stringify(e),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ct("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):ht("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&ct("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||ht("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||ht("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),s=o.searchParams;s.get(t)||(s.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(dt,"true"),window.document.body.appendChild(t)}if(!document.querySelector(et)){const t=document.createElement(et);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const s=document.createElement("script");s.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,s.id="snippylyScript",s.type="module",document.body.appendChild(s),s.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,s=1103547991^i;for(let i,e=0;e<t.length;e++)i=t.charCodeAt(e),o=Math.imul(o^i,2654435761),s=Math.imul(s^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&s)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(ht("snippyly-user",!0)){const i=JSON.parse(ht("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{vt("review","sessionStorage"),vt("sreviewId","sessionStorage"),vt("projectVersionKey","sessionStorage"),vt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),vt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ct("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i;return this.loadPlugin?this.snippylyUser?A`
396
+
397
+ snippyly-presence {
398
+ display: flex;
399
+ }
400
+
401
+ .s-presence-container {
402
+ display: inline-flex;
403
+ flex-direction: row-reverse;
404
+ align-items: center;
405
+ }
406
+
407
+ .s-presence-avatar {
408
+ position: relative;
409
+ box-shadow: 0px 0px 0px 3px;
410
+ border-radius: 50%;
411
+ overflow: hidden;
412
+ width: 24px;
413
+ height: 24px;
414
+ display: flex;
415
+ align-items: center;
416
+ justify-content: center;
417
+ font-size: 12px;
418
+ // background-color: white;
419
+ }
420
+
421
+ .s-presence-avatar.more-users {
422
+ background: #4578a7;
423
+ box-shadow: 0px 0px 0px 3px #4578a7;
424
+ }
425
+
426
+ .s-presence-avatar:not(:last-child):not(.more-users) {
427
+ margin-left: -6px !important;
428
+ }
429
+
430
+ .s-presence-avatar-image {
431
+ width: 100%;
432
+ height: auto;
433
+ display: block;
434
+ }
435
+
436
+ .s-presence-avatar-image-small {
437
+ width: ${vt(1.6)};
438
+ height: auto;
439
+ display: block;
440
+ }
441
+
442
+ .s-presence-avatar-initial {
443
+ color: white;
444
+ }
445
+
446
+ .away {
447
+ filter: grayscale(1);
448
+ }
449
+ `;var yt=function(t,i,o,s){for(var e,n=arguments.length,r=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,o):s,l=t.length-1;l>=0;l--)(e=t[l])&&(r=(n<3?e(r):n>3?e(i,o,r):e(i,o))||r);return n>3&&r&&Object.defineProperty(i,o,r),r};let gt=class extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this.isUserGlobalContact=!1,this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i};const i=history.replaceState;history.replaceState=function(){const t=i.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{var t;try{const i=new URL(document.location),o=i.searchParams;if(o.has("snippyly_google_token")){const s=JSON.parse(atob(o.get("snippyly_google_token"))),e={},n=(null===(t=s.providerData)||void 0===t?void 0:t.length)?s.providerData[0]:null;e.userId=s.uid,e.name=s.displayName||(null==n?void 0:n.displayName),e.email=s.email||(null==n?void 0:n.email),e.photoUrl=(null==s?void 0:s.photoURL)||(null==n?void 0:n.photoURL),e.contacts=window.SNIPPYLY_USER_CONTACTS||[],ct("snippyly-user",JSON.stringify(e),!0),o.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}o.has("review")?(ct("review","true",!1,"sessionStorage"),"true"!==o.get("review")&&(o.delete("review"),o.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):ht("review",!1,"sessionStorage")&&(o.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&ct("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||ht("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||ht("projectVersion",!1,"sessionStorage");if(t&&i){const o=new URL(document.location),s=o.searchParams;s.get(t)||(s.set(t,i),window.history.replaceState({},document.title,o.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return this.generateLocation(),void this.setViewMode(this.viewMode);if(this.loadPlugin=!0,!document.querySelector(nt)){const t=document.createElement(nt);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(dt,"true"),window.document.body.appendChild(t)}if(!document.querySelector(et)){const t=document.createElement(et);window.document.body.appendChild(t)}if(!document.querySelector(lt)){const t=document.createElement(lt);window.document.body.appendChild(t)}if(!document.querySelector(at)){const t=document.createElement(at);window.document.body.appendChild(t)}((t="",i=!1,o)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))o&&o();else{const s=document.createElement("script");s.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,s.id="snippylyScript",s.type="module",document.body.appendChild(s),s.onload=()=>{o&&o()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(t){console.warn("Error in loadPluginUI: ",t)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey)),this.documentId=((t,i=0)=>{try{let o=3735928559^i,s=1103547991^i;for(let i,e=0;e<t.length;e++)i=t.charCodeAt(e),o=Math.imul(o^i,2654435761),s=Math.imul(s^i,1597334677);return o=Math.imul(o^o>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&s)+(o>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),0}})((t=>{let i;return i=t.includes("http")?new URL(t):new URL("http://"+t),i.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+""),this.generateLocation(),this.setLocation(),this.commentElement=null===Snippyly||void 0===Snippyly?void 0:Snippyly.getCommentElement(),this.commentElement&&(this.commentElement.enableTextComments(!0),this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachment(!0),this.commentElement.showScreenSizeInfo(!0),this.commentElement.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((t=>{this.addCommentMode=t}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(t){console.warn("Error in initializeSnippyly: ",t)}},this.generateLocation=()=>{try{const t=new URL(document.location).searchParams,i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const o=t.get("sversion")||this.projectVersion;this.location={url:i.href,version:o}}catch(t){console.warn("Error in generateLocation: ",t)}},this.setLocation=()=>{try{window.Snippyly&&(null===Snippyly||void 0===Snippyly?void 0:Snippyly.setLocation)&&(null===Snippyly||void 0===Snippyly||Snippyly.setLocation(JSON.parse(JSON.stringify(this.location))))}catch(t){console.warn("Error in setLocation: ",t)}},this.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};if(ht("snippyly-user",!0)){const i=JSON.parse(ht("snippyly-user",!0));(null==i?void 0:i.email)&&(t=i)}t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.isAnonymous?delete t.groupId:t.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments(),this.checkGlobalUserContact()}catch(i){i&&"string"==typeof i&&(null===(t=null==i?void 0:i.toLowerCase())||void 0===t?void 0:t.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",i)}},this.getComments=()=>{try{this.commentElement&&(this.commentSubscription&&this.commentSubscription.unsubscribe(),this.commentSubscription=this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t,"All"!==this.viewMode&&(this.viewMode?this.comments=t.filter((t=>{var i;return(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)===this.viewMode})):this.comments=this.comments.filter((t=>{var i;return!(null===(i=null==t?void 0:t.location)||void 0===i?void 0:i.view)})))})))}catch(t){console.warn("Error in getComments: ",t)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((t=>{!this.isUserGlobalContact&&t&&this.setViewMode("All"),this.isUserGlobalContact=t,t||this.setViewMode(null)}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(t){console.warn("Error in toggleCommentSidebar: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t)}},this.removeSnippyly=async()=>{try{pt("review","sessionStorage"),pt("sreviewId","sessionStorage"),pt("projectVersionKey","sessionStorage"),pt("projectVersion","sessionStorage");const t=new URL(document.location),i=t.searchParams;i.delete("sreviewId"),i.delete("review"),this.projectVersionKey&&i.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),pt("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(t){console.warn("Error in signOutUser: ",t)}},this.toggleMenu=(t,i)=>{try{t.stopPropagation(),this.menuOpenedId===i?this.menuOpenedId=void 0:this.menuOpenedId=i}catch(t){console.warn("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t)}},this.setViewMode=t=>{try{this.viewMode=t,t?this.location.view=t:delete this.location.view,this.setLocation(),this.getComments()}catch(t){console.warn("Error in setViewMode: ",t)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){this._loadPlugin=t,this.loadPlugin?this.classList.add("visible"):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&ct("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var t,i,o,s,e,n;return this.loadPlugin?this.snippylyUser?A`
380
450
  <div class="snippyly-plugin-container">
381
451
  <div class="toolbar ${st({expanded:this.expanded})}">
382
452
 
@@ -444,7 +514,7 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
444
514
  <div class="toolbar-actions">
445
515
  <snippyly-comment-tool class="custom-tool">
446
516
  <div class="action">
447
- <svg class="toolbar-icon" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
517
+ <svg class="toolbar-icon ${st({active:this.addCommentMode})}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
448
518
  <path fill-rule="evenodd" clip-rule="evenodd"
449
519
  d="M17.7608 6.03888C21.6888 6.64595 24.7153 9.3481 25.7503 13.1722C26.0832 14.4028 26.0832 16.5981 25.7503 17.8287C24.8136 21.2897 22.3047 23.7986 18.8437 24.7353C18.1546 24.9217 17.6783 24.9695 16.5154 24.9685C14.9367 24.9672 14.1823 24.8254 12.8496 24.2792L12.1364 23.9869L9.93697 24.5342C7.8786 25.0464 7.71866 25.071 7.44436 24.917C6.90064 24.6118 6.90443 24.3818 7.49147 22.0353L8.03021 19.8823L7.73728 19.1677C7.19053 17.8336 7.04867 17.0796 7.04737 15.5005C7.0464 14.3376 7.09415 13.8613 7.28063 13.1722C8.21127 9.73361 10.737 7.1939 14.1308 6.28405C14.9298 6.06985 17.0392 5.92745 17.7608 6.03888ZM14.2233 8.05664C12.9452 8.46912 12.019 9.04056 11.0373 10.0223C9.57907 11.4805 8.85364 13.0991 8.75174 15.1214C8.68947 16.3572 8.85884 17.3544 9.31582 18.4435C9.47381 18.8201 9.65855 19.2624 9.72624 19.4266C9.82922 19.6761 9.78471 19.9865 9.45432 21.3204C9.23688 22.1979 9.06827 22.9251 9.07953 22.9364C9.09079 22.9476 9.81796 22.779 10.6955 22.5616C12.0294 22.2312 12.3398 22.1867 12.5893 22.2897C12.7535 22.3573 13.1958 22.5421 13.5724 22.7001C14.6615 23.1571 15.6587 23.3264 16.8945 23.2642C18.9168 23.1623 20.5354 22.4368 21.9936 20.9786C22.968 20.0042 23.5361 19.0878 23.9685 17.7926C24.2112 17.0656 24.2457 16.7805 24.2457 15.5005C24.2457 14.2204 24.2112 13.9353 23.9685 13.2083C23.5361 11.9132 22.968 10.9967 21.9936 10.0223C20.3414 8.37025 18.566 7.66777 16.2447 7.74769C15.3595 7.77823 14.8403 7.8575 14.2233 8.05664Z" />
450
520
  </svg>
@@ -486,18 +556,27 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
486
556
  </svg>
487
557
  <p class="action-text">${null===(t=this.comments)||void 0===t?void 0:t.length}</p>
488
558
  </div>
489
- <div class="action-border dropdown">
490
- <svg width="16" height="24" viewBox="0 0 16 24" fill="none" xmlns="http://www.w3.org/2000/svg">
491
- <path fill-rule="evenodd" clip-rule="evenodd" d="M7.99939 16.3333C10.7497 16.3333 12.7055 14.6051 13.8509 13.1658C14.2482 12.6665 14.2482 12.0001 13.8509 11.5009C12.7055 10.0616 10.7497 8.33333 7.99939 8.33333C5.24906 8.33333 3.29326 10.0616 2.14788 11.5009C1.75062 12.0001 1.75062 12.6665 2.14788 13.1658C3.29325 14.6051 5.24906 16.3333 7.99939 16.3333ZM14.8942 13.996C15.6782 13.0108 15.6782 11.6558 14.8942 10.6707C13.6487 9.10551 11.3504 7 7.99939 7C4.64837 7 2.3501 9.10551 1.10458 10.6707C0.320609 11.6558 0.320609 13.0108 1.10458 13.996C2.3501 15.5612 4.64837 17.6667 7.99939 17.6667C11.3504 17.6667 13.6487 15.5612 14.8942 13.996Z" fill="#8F95B2"/>
492
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9.33301 12.3332C9.33301 13.0696 8.73605 13.6665 7.99967 13.6665C7.26329 13.6665 6.66634 13.0696 6.66634 12.3332C6.66634 12.3142 6.66674 12.2954 6.66752 12.2767C6.77144 12.3133 6.88324 12.3332 6.99967 12.3332C7.55196 12.3332 7.99967 11.8855 7.99967 11.3332C7.99967 11.2167 7.97977 11.1049 7.94319 11.001C7.96192 11.0002 7.98075 10.9998 7.99967 10.9998C8.73605 10.9998 9.33301 11.5968 9.33301 12.3332ZM10.6663 12.3332C10.6663 13.8059 9.47243 14.9998 7.99967 14.9998C6.52692 14.9998 5.33301 13.8059 5.33301 12.3332C5.33301 10.8604 6.52692 9.6665 7.99967 9.6665C9.47243 9.6665 10.6663 10.8604 10.6663 12.3332Z" fill="#8F95B2"/>
493
- </svg>
494
- <p class="action-text" style="margin-left:4px">All</p>
495
- <svg class="toolbar-icon-dropdown-arrow" viewBox="0 0 16 16" fill="none"
496
- xmlns="http://www.w3.org/2000/svg">
497
- <path fill-rule="evenodd" clip-rule="evenodd"
498
- d="M10.8047 6.5286C10.5444 6.26825 10.1223 6.26825 9.86193 6.5286L8 8.39052L6.13807 6.5286C5.87772 6.26825 5.45561 6.26825 5.19526 6.5286C4.93491 6.78894 4.93491 7.21105 5.19526 7.4714L7.5286 9.80474C7.78894 10.0651 8.21105 10.0651 8.4714 9.80474L10.8047 7.4714C11.0651 7.21105 11.0651 6.78894 10.8047 6.5286Z" />
499
- </svg>
500
- </div>
559
+ ${this.isUserGlobalContact?A`
560
+ <snippyly-menu>
561
+ <div menu-trigger class="action-border dropdown">
562
+ <svg width="16" height="24" viewBox="0 0 16 24" fill="none" xmlns="http://www.w3.org/2000/svg">
563
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.99939 16.3333C10.7497 16.3333 12.7055 14.6051 13.8509 13.1658C14.2482 12.6665 14.2482 12.0001 13.8509 11.5009C12.7055 10.0616 10.7497 8.33333 7.99939 8.33333C5.24906 8.33333 3.29326 10.0616 2.14788 11.5009C1.75062 12.0001 1.75062 12.6665 2.14788 13.1658C3.29325 14.6051 5.24906 16.3333 7.99939 16.3333ZM14.8942 13.996C15.6782 13.0108 15.6782 11.6558 14.8942 10.6707C13.6487 9.10551 11.3504 7 7.99939 7C4.64837 7 2.3501 9.10551 1.10458 10.6707C0.320609 11.6558 0.320609 13.0108 1.10458 13.996C2.3501 15.5612 4.64837 17.6667 7.99939 17.6667C11.3504 17.6667 13.6487 15.5612 14.8942 13.996Z" fill="#8F95B2"/>
564
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.33301 12.3332C9.33301 13.0696 8.73605 13.6665 7.99967 13.6665C7.26329 13.6665 6.66634 13.0696 6.66634 12.3332C6.66634 12.3142 6.66674 12.2954 6.66752 12.2767C6.77144 12.3133 6.88324 12.3332 6.99967 12.3332C7.55196 12.3332 7.99967 11.8855 7.99967 11.3332C7.99967 11.2167 7.97977 11.1049 7.94319 11.001C7.96192 11.0002 7.98075 10.9998 7.99967 10.9998C8.73605 10.9998 9.33301 11.5968 9.33301 12.3332ZM10.6663 12.3332C10.6663 13.8059 9.47243 14.9998 7.99967 14.9998C6.52692 14.9998 5.33301 13.8059 5.33301 12.3332C5.33301 10.8604 6.52692 9.6665 7.99967 9.6665C9.47243 9.6665 10.6663 10.8604 10.6663 12.3332Z" fill="#8F95B2"/>
565
+ </svg>
566
+ <p class="action-text" style="margin-left:4px">${this.viewMode||"External"}</p>
567
+ <svg class="toolbar-icon-dropdown-arrow" viewBox="0 0 16 16" fill="none"
568
+ xmlns="http://www.w3.org/2000/svg">
569
+ <path fill-rule="evenodd" clip-rule="evenodd"
570
+ d="M10.8047 6.5286C10.5444 6.26825 10.1223 6.26825 9.86193 6.5286L8 8.39052L6.13807 6.5286C5.87772 6.26825 5.45561 6.26825 5.19526 6.5286C4.93491 6.78894 4.93491 7.21105 5.19526 7.4714L7.5286 9.80474C7.78894 10.0651 8.21105 10.0651 8.4714 9.80474L10.8047 7.4714C11.0651 7.21105 11.0651 6.78894 10.8047 6.5286Z" />
571
+ </svg>
572
+ </div>
573
+ <div menu-items>
574
+ <div @click=${()=>this.setViewMode("Internal")}>Internal</div>
575
+ <div @click=${()=>this.setViewMode(null)}>External</div>
576
+ <div @click=${()=>this.setViewMode("All")}>All</div>
577
+ </div>
578
+ </snippyly-menu>
579
+ `:null}
501
580
  </div>
502
581
  </div>
503
582
 
@@ -519,18 +598,25 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
519
598
 
520
599
  </div>
521
600
  <div class="action">
522
- <img class="toolbar-img" src=${null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl}>
601
+ ${(null===(i=this.snippylyUser)||void 0===i?void 0:i.photoUrl)?A`<img class="toolbar-img" src=${null===(o=this.snippylyUser)||void 0===o?void 0:o.photoUrl} referrerpolicy="no-referrer" title=${null===(s=this.snippylyUser)||void 0===s?void 0:s.name} />`:A`<div class="profile-initial"><span>${(null===(n=null===(e=this.snippylyUser)||void 0===e?void 0:e.name)||void 0===n?void 0:n.charAt(0))||"-"}</span></div>`}
523
602
  </div>
524
603
  </div>
525
604
  </div>
526
605
 
527
606
  <!-- context menu icon -->
528
- <div class="toolbar-section" @click=${()=>this.signOutUser()}>
529
- <svg class="toolbar-icon-context" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
530
- <path
531
- d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
532
- </svg>
533
- </div>
607
+ <snippyly-menu>
608
+ <div menu-trigger class="toolbar-section">
609
+ <svg class="toolbar-icon-context" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
610
+ <path
611
+ d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
612
+ </svg>
613
+ </div>
614
+ <div menu-items>
615
+ <div @click=${()=>this.toggleSnippylyPluginToolbar()}>${this.expanded?"Hide Toolbar":"Show Toolbar"}</div>
616
+ <div @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
617
+ <div @click=${()=>this.signOutUser()}>Sign out</div>
618
+ </div>
619
+ </snippyly-menu>
534
620
 
535
621
  </div>
536
622
  </div>
@@ -565,18 +651,23 @@ const st=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
565
651
  </div>
566
652
  <div class="toolbar-section" @click=${()=>this.loginWithGoogle()}>
567
653
  <a class="toolbar-button " href="#">
568
- Sign up
654
+ Sign in
569
655
  </a>
570
656
  </div>
571
657
  <div class="toolbar-section">
572
658
  <div class="toolbar-divider"></div>
573
659
  </div>
574
- <div class="toolbar-section">
575
- <svg class="toolbar-icon-context" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
576
- <path
577
- d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
578
- </svg>
579
- </div>
660
+ <snippyly-menu>
661
+ <div menu-trigger class="toolbar-section">
662
+ <svg class="toolbar-icon-context" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
663
+ <path
664
+ d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z" />
665
+ </svg>
666
+ </div>
667
+ <div menu-items>
668
+ <div @click=${()=>this.removeSnippyly()}>Exit Review Mode</div>
669
+ </div>
670
+ </snippyly-menu>
580
671
  </div>
581
672
  </div>
582
673
  `:A``}};gt.styles=ut,yt([tt()],gt.prototype,"loadPlugin",null),yt([tt()],gt.prototype,"comments",void 0),yt([tt()],gt.prototype,"commentElement",void 0),yt([tt()],gt.prototype,"commentSubscription",void 0),yt([tt()],gt.prototype,"selectionElement",void 0),yt([tt()],gt.prototype,"addCommentMode",void 0),yt([tt()],gt.prototype,"_expanded",void 0),yt([tt()],gt.prototype,"snippylyUser",void 0),yt([Y()],gt.prototype,"apiKey",void 0),yt([tt()],gt.prototype,"staging",void 0),yt([Y()],gt.prototype,"projectVersionKey",null),yt([tt()],gt.prototype,"projectVersion",void 0),yt([tt()],gt.prototype,"_menuOpenedId",void 0),yt([tt()],gt.prototype,"copyLinkTooltip",void 0),yt([tt()],gt.prototype,"invalidApiKey",void 0),yt([tt()],gt.prototype,"documentId",void 0),yt([tt()],gt.prototype,"isUserGlobalContact",void 0),yt([tt()],gt.prototype,"location",void 0),yt([tt()],gt.prototype,"viewMode",void 0),gt=yt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:o,elements:s}=i;return{kind:o,elements:s,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],gt);export{gt as SnippylyPlugin};