@snippyly/plugin-staging 1.0.26 → 1.0.27

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 +62 -50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snippyly/plugin-staging",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "snippyly.js",
6
6
  "scripts": {
package/snippyly.js CHANGED
@@ -3,60 +3,60 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),e=new Map;class n{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let i=e.get(this.cssText);return t&&void 0===i&&(e.set(this.cssText,i=new CSSStyleSheet),i.replaceSync(this.cssText)),i}toString(){return this.cssText}}const s=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((i,e,n)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[n+1]),t[0]);return new n(s,i)},o=t?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",i))(e)})(t):t
6
+ const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,t=Symbol(),e=new Map;class n{constructor(i,e){if(this._$cssResult$=!0,e!==t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i}get styleSheet(){let t=e.get(this.cssText);return i&&void 0===t&&(e.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const s=(i,...e)=>{const s=1===i.length?i[0]:e.reduce(((t,e,n)=>t+(i=>{if(!0===i._$cssResult$)return i.cssText;if("number"==typeof i)return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+i[n+1]),i[0]);return new n(s,t)},o=i?i=>i:i=>i instanceof CSSStyleSheet?(i=>{let e="";for(const t of i.cssRules)e+=t.cssText;return(i=>new n("string"==typeof i?i:i+"",t))(e)})(i):i
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */;var r;const l=window.trustedTypes,h=l?l.emptyScript:"",a=window.reactiveElementPolyfillSupport,c={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},d=(t,i)=>i!==t&&(i==i||t==t),p={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:d};class u 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,e)=>{const n=this._$Eh(e,i);void 0!==n&&(this._$Eu.set(n,e),t.push(n))})),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 e="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,e,i);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(n){const s=this[t];this[i]=n,this.requestUpdate(t,s,e)},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 e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(o(t))}else void 0!==t&&i.push(o(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"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,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.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 e=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,e)=>{t?i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((t=>{const e=document.createElement("style"),n=window.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=t.cssText,i.appendChild(e)}))})(e,this.constructor.elementStyles),e}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,e){this._$AK(t,e)}_$ES(t,i,e=p){var n,s;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(s=null===(n=e.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==s?s:c.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,n,s;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(s=null!==(n=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==n?n:"function"==typeof l?l:null)&&void 0!==s?s:c.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let n=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,e))):n=!1),!this.isUpdatePending&&n&&(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 e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),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(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}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,h=l?l.emptyScript:"",a=window.reactiveElementPolyfillSupport,c={toAttribute(i,t){switch(t){case Boolean:i=i?h:null;break;case Object:case Array:i=null==i?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=null!==i;break;case Number:e=null===i?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch(i){e=null}}return e}},d=(i,t)=>t!==i&&(t==t||i==i),p={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:d};class u extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(i){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(i)}static get observedAttributes(){this.finalize();const i=[];return this.elementProperties.forEach(((t,e)=>{const n=this._$Eh(e,t);void 0!==n&&(this._$Eu.set(n,e),i.push(n))})),i}static createProperty(i,t=p){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(i,t),!t.noAccessor&&!this.prototype.hasOwnProperty(i)){const e="symbol"==typeof i?Symbol():"__"+i,n=this.getPropertyDescriptor(i,e,t);void 0!==n&&Object.defineProperty(this.prototype,i,n)}}static getPropertyDescriptor(i,t,e){return{get(){return this[t]},set(n){const s=this[i];this[t]=n,this.requestUpdate(i,s,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(i){return this.elementProperties.get(i)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const i=Object.getPrototypeOf(this);if(i.finalize(),this.elementProperties=new Map(i.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const i=this.properties,t=[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)];for(const e of t)this.createProperty(e,i[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const t=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)t.unshift(o(i))}else void 0!==i&&t.push(o(i));return t}static _$Eh(i,t){const e=t.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof i?i.toLowerCase():void 0}o(){var i;this._$Ep=new Promise((i=>this.enableUpdating=i)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(i=this.constructor.l)||void 0===i||i.forEach((i=>i(this)))}addController(i){var t,e;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(i),void 0!==this.renderRoot&&this.isConnected&&(null===(e=i.hostConnected)||void 0===e||e.call(i))}removeController(i){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(i)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((i,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet)):e.forEach((i=>{const e=document.createElement("style"),n=window.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var i;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(i=this._$Eg)||void 0===i||i.forEach((i=>{var t;return null===(t=i.hostConnected)||void 0===t?void 0:t.call(i)}))}enableUpdating(i){}disconnectedCallback(){var i;null===(i=this._$Eg)||void 0===i||i.forEach((i=>{var t;return null===(t=i.hostDisconnected)||void 0===t?void 0:t.call(i)}))}attributeChangedCallback(i,t,e){this._$AK(i,e)}_$ES(i,t,e=p){var n,s;const o=this.constructor._$Eh(i,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(s=null===(n=e.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==s?s:c.toAttribute)(t,e.type);this._$Ei=i,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(i,t){var e,n,s;const o=this.constructor,r=o._$Eu.get(i);if(void 0!==r&&this._$Ei!==r){const i=o.getPropertyOptions(r),l=i.converter,h=null!==(s=null!==(n=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==n?n:"function"==typeof l?l:null)&&void 0!==s?s:c.fromAttribute;this._$Ei=r,this[r]=h(t,i.type),this._$Ei=null}}requestUpdate(i,t,e){let n=!0;void 0!==i&&(((e=e||this.constructor.getPropertyOptions(i)).hasChanged||d)(this[i],t)?(this._$AL.has(i)||this._$AL.set(i,t),!0===e.reflect&&this._$Ei!==i&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(i,e))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(i){Promise.reject(i)}const i=this.scheduleUpdate();return null!=i&&await i,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((i,t)=>this[t]=i)),this._$Et=void 0);let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),null===(i=this._$Eg)||void 0===i||i.forEach((i=>{var t;return null===(t=i.hostUpdate)||void 0===t?void 0:t.call(i)})),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(i){}_$AE(i){var t;null===(t=this._$Eg)||void 0===t||t.forEach((i=>{var t;return null===(t=i.hostUpdated)||void 0===t?void 0:t.call(i)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(i)),this.updated(i)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(i){return!0}update(i){void 0!==this._$EC&&(this._$EC.forEach(((i,t)=>this._$ES(t,this[t],i))),this._$EC=void 0),this._$EU()}updated(i){}firstUpdated(i){}}
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- var y;u.finalized=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:"open"},null==a||a({ReactiveElement:u}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const v=globalThis.trustedTypes,m=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,w="?"+g,f=`<${w}>`,b=document,$=(t="")=>b.createComment(t),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,E=/>/g,L=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,_=/'/g,M=/"/g,U=/^(?:script|style|textarea|title)$/i,A=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),T=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),I=new WeakMap,O=b.createTreeWalker(b,129,null,!1),R=(t,i)=>{const e=t.length-1,n=[];let s,o=2===i?"<svg>":"",r=x;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,c=0;for(;c<e.length&&(r.lastIndex=c,h=r.exec(e),null!==h);)c=r.lastIndex,r===x?"!--"===h[1]?r=k:void 0!==h[1]?r=E:void 0!==h[2]?(U.test(h[2])&&(s=RegExp("</"+h[2],"g")),r=L):void 0!==h[3]&&(r=L):r===L?">"===h[0]?(r=null!=s?s:x,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?L:'"'===h[3]?M:_):r===M||r===_?r=L:r===k||r===E?r=x:(r=L,s=void 0);const d=r===L&&t[i+1].startsWith("/>")?" ":"";o+=r===x?e+f:a>=0?(n.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+g+d):e+g+(-2===a?(n.push(void 0),i):d)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(l):l,n]};class V{constructor({strings:t,_$litType$:i},e){let n;this.parts=[];let s=0,o=0;const r=t.length-1,l=this.parts,[h,a]=R(t,i);if(this.el=V.createElement(h,e),O.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(n=O.nextNode())&&l.length<r;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const i of n.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(g)){const e=a[o++];if(t.push(i),void 0!==e){const t=n.getAttribute(e.toLowerCase()+"$lit$").split(g),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?Z:"?"===i[1]?H:"@"===i[1]?J:P})}else l.push({type:6,index:s})}for(const i of t)n.removeAttribute(i)}if(U.test(n.tagName)){const t=n.textContent.split(g),i=t.length-1;if(i>0){n.textContent=v?v.emptyScript:"";for(let e=0;e<i;e++)n.append(t[e],$()),O.nextNode(),l.push({type:2,index:++s});n.append(t[i],$())}}}else if(8===n.nodeType)if(n.data===w)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=n.data.indexOf(g,t+1));)l.push({type:7,index:s}),t+=g.length-1}s++}}static createElement(t,i){const e=b.createElement("template");return e.innerHTML=t,e}}function z(t,i,e=t,n){var s,o,r,l;if(i===T)return i;let h=void 0!==n?null===(s=e._$Cl)||void 0===s?void 0:s[n]:e._$Cu;const a=C(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,n)),void 0!==n?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[n]=h:e._$Cu=h),void 0!==h&&(i=z(t,h._$AS(t,i.values),h,n)),i}class B{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:e},parts:n}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:b).importNode(e,!0);O.currentNode=s;let o=O.nextNode(),r=0,l=0,h=n[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new N(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new F(o,this,t)),this.v.push(i),h=n[++l]}r!==(null==h?void 0:h.index)&&(o=O.nextNode(),r++)}return s}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class N{constructor(t,i,e,n){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=n,this._$Cg=null===(s=null==n?void 0:n.isConnected)||void 0===s||s}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=z(this,t,i),C(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==T&&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!==j&&C(this._$AH)?this._$AA.nextSibling.data=t:this.k(b.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:n}=t,s="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=V.createElement(n.h,this.options)),n);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.m(e);else{const t=new B(s,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=I.get(t.strings);return void 0===i&&I.set(t.strings,i=new V(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,n=0;for(const s of t)n===i.length?i.push(e=new N(this.M($()),this.M($()),this,this.options)):e=i[n],e._$AI(s),n++;n<i.length&&(this._$AR(e&&e._$AB.nextSibling,n),i.length=n)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.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 P{constructor(t,i,e,n,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=n,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,n){const s=this.strings;let o=!1;if(void 0===s)t=z(this,t,i,0),o=!C(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const n=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=z(this,n[e+r],i,r),l===T&&(l=this._$AH[r]),o||(o=!C(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}o&&!n&&this.C(t)}C(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends P{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===j?void 0:t}}const K=v?v.emptyScript:"";class H extends P{constructor(){super(...arguments),this.type=4}C(t){t&&t!==j?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class J extends P{constructor(t,i,e,n,s){super(t,i,e,n,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=z(this,t,i,0))&&void 0!==e?e:j)===T)return;const n=this._$AH,s=t===j&&n!==j||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==j&&(n===j||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class F{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){z(this,t)}}const D=window.litHtmlPolyfillSupport;
17
+ var y;u.finalized=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:"open"},null==a||a({ReactiveElement:u}),(null!==(r=globalThis.reactiveElementVersions)&&void 0!==r?r:globalThis.reactiveElementVersions=[]).push("1.3.2");const v=globalThis.trustedTypes,m=v?v.createPolicy("lit-html",{createHTML:i=>i}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,w="?"+g,f=`<${w}>`,b=document,$=(i="")=>b.createComment(i),C=i=>null===i||"object"!=typeof i&&"function"!=typeof i,S=Array.isArray,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,E=/>/g,L=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,M=/'/g,_=/"/g,U=/^(?:script|style|textarea|title)$/i,A=(i=>(t,...e)=>({_$litType$:i,strings:t,values:e}))(1),T=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),I=new WeakMap,O=b.createTreeWalker(b,129,null,!1),V=(i,t)=>{const e=i.length-1,n=[];let s,o=2===t?"<svg>":"",r=x;for(let t=0;t<e;t++){const e=i[t];let l,h,a=-1,c=0;for(;c<e.length&&(r.lastIndex=c,h=r.exec(e),null!==h);)c=r.lastIndex,r===x?"!--"===h[1]?r=k:void 0!==h[1]?r=E:void 0!==h[2]?(U.test(h[2])&&(s=RegExp("</"+h[2],"g")),r=L):void 0!==h[3]&&(r=L):r===L?">"===h[0]?(r=null!=s?s:x,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?L:'"'===h[3]?_:M):r===_||r===M?r=L:r===k||r===E?r=x:(r=L,s=void 0);const d=r===L&&i[t+1].startsWith("/>")?" ":"";o+=r===x?e+f:a>=0?(n.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+g+d):e+g+(-2===a?(n.push(void 0),t):d)}const l=o+(i[e]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(l):l,n]};class R{constructor({strings:i,_$litType$:t},e){let n;this.parts=[];let s=0,o=0;const r=i.length-1,l=this.parts,[h,a]=V(i,t);if(this.el=R.createElement(h,e),O.currentNode=this.el.content,2===t){const i=this.el.content,t=i.firstChild;t.remove(),i.append(...t.childNodes)}for(;null!==(n=O.nextNode())&&l.length<r;){if(1===n.nodeType){if(n.hasAttributes()){const i=[];for(const t of n.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(g)){const e=a[o++];if(i.push(t),void 0!==e){const i=n.getAttribute(e.toLowerCase()+"$lit$").split(g),t=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:t[2],strings:i,ctor:"."===t[1]?Z:"?"===t[1]?H:"@"===t[1]?J:P})}else l.push({type:6,index:s})}for(const t of i)n.removeAttribute(t)}if(U.test(n.tagName)){const i=n.textContent.split(g),t=i.length-1;if(t>0){n.textContent=v?v.emptyScript:"";for(let e=0;e<t;e++)n.append(i[e],$()),O.nextNode(),l.push({type:2,index:++s});n.append(i[t],$())}}}else if(8===n.nodeType)if(n.data===w)l.push({type:2,index:s});else{let i=-1;for(;-1!==(i=n.data.indexOf(g,i+1));)l.push({type:7,index:s}),i+=g.length-1}s++}}static createElement(i,t){const e=b.createElement("template");return e.innerHTML=i,e}}function z(i,t,e=i,n){var s,o,r,l;if(t===T)return t;let h=void 0!==n?null===(s=e._$Cl)||void 0===s?void 0:s[n]:e._$Cu;const a=C(t)?void 0:t._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(i),h._$AT(i,e,n)),void 0!==n?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[n]=h:e._$Cu=h),void 0!==h&&(t=z(i,h._$AS(i,t.values),h,n)),t}class B{constructor(i,t){this.v=[],this._$AN=void 0,this._$AD=i,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(i){var t;const{el:{content:e},parts:n}=this._$AD,s=(null!==(t=null==i?void 0:i.creationScope)&&void 0!==t?t:b).importNode(e,!0);O.currentNode=s;let o=O.nextNode(),r=0,l=0,h=n[0];for(;void 0!==h;){if(r===h.index){let t;2===h.type?t=new N(o,o.nextSibling,this,i):1===h.type?t=new h.ctor(o,h.name,h.strings,this,i):6===h.type&&(t=new F(o,this,i)),this.v.push(t),h=n[++l]}r!==(null==h?void 0:h.index)&&(o=O.nextNode(),r++)}return s}m(i){let t=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(i,e,t),t+=e.strings.length-2):e._$AI(i[t])),t++}}class N{constructor(i,t,e,n){var s;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=i,this._$AB=t,this._$AM=e,this.options=n,this._$Cg=null===(s=null==n?void 0:n.isConnected)||void 0===s||s}get _$AU(){var i,t;return null!==(t=null===(i=this._$AM)||void 0===i?void 0:i._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let i=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===i.nodeType&&(i=t.parentNode),i}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(i,t=this){i=z(this,i,t),C(i)?i===j||null==i||""===i?(this._$AH!==j&&this._$AR(),this._$AH=j):i!==this._$AH&&i!==T&&this.$(i):void 0!==i._$litType$?this.T(i):void 0!==i.nodeType?this.k(i):(i=>{var t;return S(i)||"function"==typeof(null===(t=i)||void 0===t?void 0:t[Symbol.iterator])})(i)?this.S(i):this.$(i)}M(i,t=this._$AB){return this._$AA.parentNode.insertBefore(i,t)}k(i){this._$AH!==i&&(this._$AR(),this._$AH=this.M(i))}$(i){this._$AH!==j&&C(this._$AH)?this._$AA.nextSibling.data=i:this.k(b.createTextNode(i)),this._$AH=i}T(i){var t;const{values:e,_$litType$:n}=i,s="number"==typeof n?this._$AC(i):(void 0===n.el&&(n.el=R.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===s)this._$AH.m(e);else{const i=new B(s,this),t=i.p(this.options);i.m(e),this.k(t),this._$AH=i}}_$AC(i){let t=I.get(i.strings);return void 0===t&&I.set(i.strings,t=new R(i)),t}S(i){S(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let e,n=0;for(const s of i)n===t.length?t.push(e=new N(this.M($()),this.M($()),this,this.options)):e=t[n],e._$AI(s),n++;n<t.length&&(this._$AR(e&&e._$AB.nextSibling,n),t.length=n)}_$AR(i=this._$AA.nextSibling,t){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,t);i&&i!==this._$AB;){const t=i.nextSibling;i.remove(),i=t}}setConnected(i){var t;void 0===this._$AM&&(this._$Cg=i,null===(t=this._$AP)||void 0===t||t.call(this,i))}}class P{constructor(i,t,e,n,s){this.type=1,this._$AH=j,this._$AN=void 0,this.element=i,this.name=t,this._$AM=n,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(i,t=this,e,n){const s=this.strings;let o=!1;if(void 0===s)i=z(this,i,t,0),o=!C(i)||i!==this._$AH&&i!==T,o&&(this._$AH=i);else{const n=i;let r,l;for(i=s[0],r=0;r<s.length-1;r++)l=z(this,n[e+r],t,r),l===T&&(l=this._$AH[r]),o||(o=!C(l)||l!==this._$AH[r]),l===j?i=j:i!==j&&(i+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}o&&!n&&this.C(i)}C(i){i===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=i?i:"")}}class Z extends P{constructor(){super(...arguments),this.type=3}C(i){this.element[this.name]=i===j?void 0:i}}const K=v?v.emptyScript:"";class H extends P{constructor(){super(...arguments),this.type=4}C(i){i&&i!==j?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class J extends P{constructor(i,t,e,n,s){super(i,t,e,n,s),this.type=5}_$AI(i,t=this){var e;if((i=null!==(e=z(this,i,t,0))&&void 0!==e?e:j)===T)return;const n=this._$AH,s=i===j&&n!==j||i.capture!==n.capture||i.once!==n.once||i.passive!==n.passive,o=i!==j&&(n===j||s);s&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,i),this._$AH=i}handleEvent(i){var t,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==e?e:this.element,i):this._$AH.handleEvent(i)}}class F{constructor(i,t,e){this.element=i,this.type=6,this._$AN=void 0,this._$AM=t,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(i){z(this,i)}}const D=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,q;null==D||D(V,N),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.6");class G extends u{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var n,s;const o=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:i;let r=o._$litPart$;if(void 0===r){const t=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:null;o._$litPart$=r=new N(i.insertBefore($(),t),t,void 0,null!=e?e:{})}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 T}}G.finalized=!0,G._$litElement$=!0,null===(W=globalThis.litElementHydrateSupport)||void 0===W||W.call(globalThis,{LitElement:G});const X=globalThis.litElementPolyfillSupport;null==X||X({LitElement:G}),(null!==(q=globalThis.litElementVersions)&&void 0!==q?q:globalThis.litElementVersions=[]).push("3.2.0");
23
+ var W,G;null==D||D(R,N),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.6");class q extends u{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var i,t;const e=super.createRenderRoot();return null!==(i=(t=this.renderOptions).renderBefore)&&void 0!==i||(t.renderBefore=e.firstChild),e}update(i){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(i),this._$Dt=((i,t,e)=>{var n,s;const o=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:t;let r=o._$litPart$;if(void 0===r){const i=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:null;o._$litPart$=r=new N(t.insertBefore($(),i),i,void 0,null!=e?e:{})}return r._$AI(i),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var i;super.connectedCallback(),null===(i=this._$Dt)||void 0===i||i.setConnected(!0)}disconnectedCallback(){var i;super.disconnectedCallback(),null===(i=this._$Dt)||void 0===i||i.setConnected(!1)}render(){return T}}q.finalized=!0,q._$litElement$=!0,null===(W=globalThis.litElementHydrateSupport)||void 0===W||W.call(globalThis,{LitElement:q});const X=globalThis.litElementPolyfillSupport;null==X||X({LitElement:q}),(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
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- const Q=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};
29
+ const Q=(i,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}};
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */function Y(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):Q(t,i)
34
+ */function Y(i){return(t,e)=>void 0!==e?((i,t,e)=>{t.constructor.createProperty(e,i)})(i,t,e):Q(i,t)
35
35
  /**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */}function tt(t){return Y({...t,state:!0})}
39
+ */}function ii(i){return Y({...i,state:!0})}
40
40
  /**
41
41
  * @license
42
42
  * Copyright 2021 Google LLC
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
- */var it;null===(it=window.HTMLSlotElement)||void 0===it||it.prototype.assignedElements;
44
+ */var ti;null===(ti=window.HTMLSlotElement)||void 0===ti||ti.prototype.assignedElements;
45
45
  /**
46
46
  * @license
47
47
  * Copyright 2017 Google LLC
48
48
  * SPDX-License-Identifier: BSD-3-Clause
49
49
  */
50
- const et=1;
50
+ const ei=1;
51
51
  /**
52
52
  * @license
53
53
  * Copyright 2018 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
55
  */
56
- const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,e){this._$Ct=t,this._$AM=i,this._$Ci=e}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}}{constructor(t){var i;if(super(t),t.type!==et||"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 e,n;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===(e=this.st)||void 0===e?void 0:e.has(t))&&this.et.add(t);return this.render(i)}const s=t.element.classList;this.et.forEach((t=>{t in i||(s.remove(t),this.et.delete(t))}));for(const t in i){const e=!!i[t];e===this.et.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(e?(s.add(t),this.et.add(t)):(s.remove(t),this.et.delete(t)))}return T}}),st="snippyly-cursor",ot="snippyly-comments",rt="snippyly-comments-sidebar",lt="enable-url-navigation",ht=(t,i,e=!1,n="localStorage")=>{try{const s=e?btoa(i):i;"localStorage"===n?localStorage.setItem(t,s):sessionStorage.setItem(t,s)}catch(t){console.warn("Error in setLocalStorage: ",t)}},at=(t,i=!1,e="localStorage")=>{try{let n=null;return n="localStorage"===e?localStorage.getItem(t):sessionStorage.getItem(t),n&&i?atob(n):n}catch(t){return console.warn("Error in getLocalStorage: ",t),null}},ct=(t,i="localStorage")=>{try{"localStorage"===i?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t)}},dt=(...t)=>{if(t)switch(t.length){case 1:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1))`;case 2:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))`;case 3:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
57
- calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1))`;case 4:return s`calc(${t[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[1]}rem * var(--snippyly-base-rem-unit, 1))
58
- calc(${t[2]}rem * var(--snippyly-base-rem-unit, 1)) calc(${t[3]}rem * var(--snippyly-base-rem-unit, 1))`}return s`0`};var pt=function(t,i,e,n){for(var s,o=arguments.length,r=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(o<3?s(r):o>3?s(i,e,r):s(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};let ut=class extends G{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this._expanded=!0,this.staging=true,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!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=()=>{try{const t=new URL(document.location),i=t.searchParams;if(i.has("snippyly_google_token")){const e=JSON.parse(atob(i.get("snippyly_google_token"))),n={};n.userId=e.uid,n.name=e.displayName,n.email=e.email,n.photoUrl=null==e?void 0:e.photoURL,n.contacts=window.SNIPPYLY_USER_CONTACTS||[],ht("snippyly-user",JSON.stringify(n),!0),i.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}i.has("review")?(ht("review","true",!1,"sessionStorage"),"true"!==i.get("review")&&(i.delete("review"),i.append("review","true"),window.history.replaceState({},document.title,t.href)),this.loadPluginUI()):at("review",!1,"sessionStorage")&&(i.append("review","true"),window.history.replaceState({},document.title,t.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&&ht("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(t){console.warn("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||at("projectVersionKey",!1,"sessionStorage"),i=this.projectVersion||at("projectVersion",!1,"sessionStorage");if(t&&i){const e=new URL(document.location),n=e.searchParams;n.get(t)||(n.set(t,i),window.history.replaceState({},document.title,e.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return;if(this.loadPlugin=!0,!document.querySelector(ot)){const t=document.createElement(ot);null==t||t.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(t)}if(!document.querySelector(rt)){const t=document.createElement(rt);t.setAttribute(lt,"true"),window.document.body.appendChild(t)}if(!document.querySelector(st)){const t=document.createElement(st);window.document.body.appendChild(t)}((t="",i=!1,e)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))e&&e();else{const n=document.createElement("script");n.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${i?"-staging":""}${t?"@"+t:""}/snippyly.js`,n.id="snippylyScript",n.type="module",document.body.appendChild(n),n.onload=()=>{e&&e()}}})(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));const t=new URL(document.location).searchParams;this.documentId=((t,i=0)=>{try{let e=3735928559^i,n=1103547991^i;for(let i,s=0;s<t.length;s++)i=t.charCodeAt(s),e=Math.imul(e^i,2654435761),n=Math.imul(n^i,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&n)+(e>>>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+"");const i=new URL(document.location);i.searchParams.delete("review"),i.searchParams.delete("sreviewId"),i.searchParams.delete("scommentId");const e=t.get("sversion")||this.projectVersion;null===Snippyly||void 0===Snippyly||Snippyly.setLocation({url:i.href,version:e}),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.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.identifySnippyly=async()=>{var t;try{this.invalidApiKey=!1;let t={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};at("snippyly-user",!0)&&(t=JSON.parse(at("snippyly-user",!0))),t.contacts=window.SNIPPYLY_USER_CONTACTS||[],t.groupId=this.documentId+"",await Snippyly.identify(t),(null==t?void 0:t.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(t))),this.getComments()}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.commentElement.getAllCommentAnnotations(this.documentId).subscribe((t=>{this.comments=t}))}catch(t){console.warn("Error in getComments: ",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{ct("review","sessionStorage"),ct("sreviewId","sessionStorage"),ct("projectVersionKey","sessionStorage"),ct("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(),ct("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.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&&ht("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,e,n,s,o,r,l,h,a,c,d;return this.loadPlugin?A`
59
- <div class="snippyly-plugin-container ${nt({expanded:this.expanded,active:null===(t=this.snippylyUser)||void 0===t?void 0:t.userId,"comment-mode-enabled":this.addCommentMode})}">
56
+ const ni=(i=>(...t)=>({_$litDirective$:i,values:t}))(class extends class{constructor(i){}get _$AU(){return this._$AM._$AU}_$AT(i,t,e){this._$Ct=i,this._$AM=t,this._$Ci=e}_$AS(i,t){return this.update(i,t)}update(i,t){return this.render(...t)}}{constructor(i){var t;if(super(i),i.type!==ei||"class"!==i.name||(null===(t=i.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((t=>i[t])).join(" ")+" "}update(i,[t]){var e,n;if(void 0===this.et){this.et=new Set,void 0!==i.strings&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter((i=>""!==i))));for(const i in t)t[i]&&!(null===(e=this.st)||void 0===e?void 0:e.has(i))&&this.et.add(i);return this.render(t)}const s=i.element.classList;this.et.forEach((i=>{i in t||(s.remove(i),this.et.delete(i))}));for(const i in t){const e=!!t[i];e===this.et.has(i)||(null===(n=this.st)||void 0===n?void 0:n.has(i))||(e?(s.add(i),this.et.add(i)):(s.remove(i),this.et.delete(i)))}return T}}),si="snippyly-cursor",oi="snippyly-comments",ri="snippyly-comments-sidebar",li="enable-url-navigation",hi=(i,t,e=!1,n="localStorage")=>{try{const s=e?btoa(t):t;"localStorage"===n?localStorage.setItem(i,s):sessionStorage.setItem(i,s)}catch(i){console.warn("Error in setLocalStorage: ",i)}},ai=(i,t=!1,e="localStorage")=>{try{let n=null;return n="localStorage"===e?localStorage.getItem(i):sessionStorage.getItem(i),n&&t?atob(n):n}catch(i){return console.warn("Error in getLocalStorage: ",i),null}},ci=(i,t="localStorage")=>{try{"localStorage"===t?localStorage.removeItem(i):sessionStorage.removeItem(i)}catch(i){console.warn("Error in removeLocalStorageData: ",i)}},di=(...i)=>{if(i)switch(i.length){case 1:return s`calc(${i[0]}rem * var(--snippyly-base-rem-unit, 1))`;case 2:return s`calc(${i[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${i[1]}rem * var(--snippyly-base-rem-unit, 1))`;case 3:return s`calc(${i[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${i[1]}rem * var(--snippyly-base-rem-unit, 1))
57
+ calc(${i[2]}rem * var(--snippyly-base-rem-unit, 1))`;case 4:return s`calc(${i[0]}rem * var(--snippyly-base-rem-unit, 1)) calc(${i[1]}rem * var(--snippyly-base-rem-unit, 1))
58
+ calc(${i[2]}rem * var(--snippyly-base-rem-unit, 1)) calc(${i[3]}rem * var(--snippyly-base-rem-unit, 1))`}return s`0`};var pi=function(i,t,e,n){for(var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,e):n,l=i.length-1;l>=0;l--)(s=i[l])&&(r=(o<3?s(r):o>3?s(t,e,r):s(t,e))||r);return o>3&&r&&Object.defineProperty(t,e,r),r};let ui=class extends q{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(i){console.warn("Error in addWindowClickEventListener: ",i)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(i){console.warn("Error in removeWindowClickEventListener: ",i)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(i){console.warn("Error in setWindowEventListner: ",i)}},this.urlChangeListener=()=>{try{const i=history.pushState;history.pushState=function(){const t=i.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),t};const t=history.replaceState;history.replaceState=function(){const i=t.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),i},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(i){console.warn("Error in urlChangeListener: ",i)}},this.checkUrl=()=>{try{const i=new URL(document.location),t=i.searchParams;if(t.has("snippyly_google_token")){const e=JSON.parse(atob(t.get("snippyly_google_token"))),n={};n.userId=e.uid,n.name=e.displayName,n.email=e.email,n.photoUrl=null==e?void 0:e.photoURL,n.contacts=window.SNIPPYLY_USER_CONTACTS||[],hi("snippyly-user",JSON.stringify(n),!0),t.delete("snippyly_google_token"),window.history.replaceState({},document.title,i.href)}t.has("review")?(hi("review","true",!1,"sessionStorage"),"true"!==t.get("review")&&(t.delete("review"),t.append("review","true"),window.history.replaceState({},document.title,i.href)),this.loadPluginUI()):ai("review",!1,"sessionStorage")&&(t.append("review","true"),window.history.replaceState({},document.title,i.href),this.loadPluginUI()),this.setVersionInUrl()}catch(i){console.warn("Error in checkUrl: ",i)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const i=new URL(document.location).searchParams;if(i.get(this.projectVersionKey))this.projectVersion=i.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const i=new URL(window.snippylyInitialLoadUrl).searchParams;i.get(this.projectVersionKey)&&(this.projectVersion=i.get(this.projectVersionKey))}this.projectVersion&&hi("projectVersion",this.projectVersion,!1,"sessionStorage")}}catch(i){console.warn("Error in detectVersion: ",i)}},this.setVersionInUrl=()=>{try{const i=this.projectVersionKey||ai("projectVersionKey",!1,"sessionStorage"),t=this.projectVersion||ai("projectVersion",!1,"sessionStorage");if(i&&t){const e=new URL(document.location),n=e.searchParams;n.get(i)||(n.set(i,t),window.history.replaceState({},document.title,e.href))}}catch(i){console.warn("Error in setVersionInUrl: ",i)}},this.loadPluginUI=()=>{try{if(this.loadPlugin)return;if(this.loadPlugin=!0,!document.querySelector(oi)){const i=document.createElement(oi);null==i||i.addEventListener("signIn",(()=>{this.loginWithGoogle()})),window.document.body.appendChild(i)}if(!document.querySelector(ri)){const i=document.createElement(ri);i.setAttribute(li,"true"),window.document.body.appendChild(i)}if(!document.querySelector(si)){const i=document.createElement(si);window.document.body.appendChild(i)}((i="",t=!1,e)=>{if(console.log("load snippyly called"),document.getElementById("snippylyScript"))e&&e();else{const n=document.createElement("script");n.src=`https://cdn.jsdelivr.net/npm/@snippyly/sdk${t?"-staging":""}${i?"@"+i:""}/snippyly.js`,n.id="snippylyScript",n.type="module",document.body.appendChild(n),n.onload=()=>{e&&e()}}})(void 0,this.staging,(()=>{window.Snippyly&&this.initializeSnippyly()}))}catch(i){console.warn("Error in loadPluginUI: ",i)}},this.initializeSnippyly=async()=>{try{await(null===Snippyly||void 0===Snippyly?void 0:Snippyly.init(this.apiKey));const i=new URL(document.location).searchParams;this.documentId=((i,t=0)=>{try{let e=3735928559^t,n=1103547991^t;for(let t,s=0;s<i.length;s++)t=i.charCodeAt(s),e=Math.imul(e^t,2654435761),n=Math.imul(n^t,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&n)+(e>>>0)}catch(i){return console.warn("Error in cyrb53: ",i),0}})((i=>{let t;return t=i.includes("http")?new URL(i):new URL("http://"+i),t.hostname.replace("www.","")})(window.location.origin))+"",null===Snippyly||void 0===Snippyly||Snippyly.setDocumentId(this.documentId+"");const t=new URL(document.location);t.searchParams.delete("review"),t.searchParams.delete("sreviewId"),t.searchParams.delete("scommentId");const e=i.get("sversion")||this.projectVersion;null===Snippyly||void 0===Snippyly||Snippyly.setLocation({url:t.href,version:e}),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.addCommentModeChange&&this.commentElement.addCommentModeChange().subscribe((i=>{this.addCommentMode=i}))),this.selectionElement=Snippyly.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.identifySnippyly()}catch(i){console.warn("Error in initializeSnippyly: ",i)}},this.identifySnippyly=async()=>{var i;try{this.invalidApiKey=!1;let i={name:"Anonymous User",email:"anonymous@snippyly.com",userId:"anonymous",isAnonymous:!0};ai("snippyly-user",!0)&&(i=JSON.parse(ai("snippyly-user",!0))),i.contacts=window.SNIPPYLY_USER_CONTACTS||[],i.groupId=Snippyly.getDocumentId()+"",await Snippyly.identify(i),(null==i?void 0:i.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(i))),this.getComments(),this.checkGlobalUserContact()}catch(t){t&&"string"==typeof t&&(null===(i=null==t?void 0:t.toLowerCase())||void 0===i?void 0:i.includes("invalid"))&&(this.invalidApiKey=!0),console.warn("Error in identifySnippyly: ",t)}},this.getComments=()=>{try{this.commentElement&&this.commentElement.getAllCommentAnnotations(this.documentId).subscribe((i=>{this.comments=i}))}catch(i){console.warn("Error in getComments: ",i)}},this.checkGlobalUserContact=()=>{try{this.commentElement&&this.commentElement.isUserGlobalContact().subscribe((i=>{this.isUserGlobalContact=i,i||this.setViewMode(null)}))}catch(i){console.warn("Error in checkGlobalUserContact: ",i)}},this.toggleCommentSidebar=()=>{try{this.commentElement&&this.commentElement.toggleCommentSidebar()}catch(i){console.warn("Error in toggleCommentSidebar: ",i)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded}catch(i){console.warn("Error in toggleSnippylyPluginToolbar: ",i)}},this.loginWithGoogle=()=>{try{window.open(`https://snippyly-login-staging.web.app/?redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(i){console.warn("Error in loginWithGoogle: ",i)}},this.removeSnippyly=async()=>{try{ci("review","sessionStorage"),ci("sreviewId","sessionStorage"),ci("projectVersionKey","sessionStorage"),ci("projectVersion","sessionStorage");const i=new URL(document.location),t=i.searchParams;t.delete("sreviewId"),t.delete("review"),this.projectVersionKey&&t.delete(this.projectVersionKey),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,i.href),window.location.reload()}catch(i){console.warn("Error in removeSnippyly: ",i)}},this.signOutUser=async()=>{try{await Snippyly.signOutUser(),ci("snippyly-user"),this.snippylyUser=void 0,window.open(`https://snippyly-login-staging.web.app/?signout=true&redirect_url=${encodeURIComponent(window.location.href)}`,"_self")}catch(i){console.warn("Error in signOutUser: ",i)}},this.toggleMenu=(i,t)=>{try{i.stopPropagation(),this.menuOpenedId===t?this.menuOpenedId=void 0:this.menuOpenedId=t}catch(i){console.warn("Error in toggleMenu: ",i)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(i){console.warn("Error in copyLink: ",i)}},this.setViewMode=i=>{try{this.viewMode!==i&&(this.viewMode=i,this.commentElement&&this.commentElement.setViewMode(i))}catch(i){console.warn("Error in setViewMode: ",i)}},this.setAttribute("snippyly-comment-disabled","true");try{this.expanded=!0,this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),console.log("*** Staging Mode ON! ***")}catch(i){console.warn("Error in constructor: ",i)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(i){this._loadPlugin=i,this.loadPlugin?this.classList.add("visible"):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(i){this._expanded=i,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(i){try{this._projectVersionKey=i,this.projectVersionKey&&hi("projectVersionKey",this.projectVersionKey,!1,"sessionStorage"),this.detectVersion()}catch(i){console.warn("Error in set projectVersionKey: ",i)}}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(i){this._menuOpenedId=i,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}render(){var i,t,e,n,s,o,r,l,h,a,c,d;return this.loadPlugin?A`
59
+ <div class="snippyly-plugin-container ${ni({expanded:this.expanded,active:null===(i=this.snippylyUser)||void 0===i?void 0:i.userId,"comment-mode-enabled":this.addCommentMode})}">
60
60
  <div class="snippyly-logo-container snippyly-menu-trigger" @click=${()=>this.toggleSnippylyPluginToolbar()}>
61
61
  ${this.expanded?null:A`
62
62
  <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow-icon">
@@ -92,7 +92,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
92
92
  </div>
93
93
  </div>
94
94
  ${this.expanded?A`
95
- <div class="snippyly-comment-tool-container snippyly-menu-trigger ${nt({disabled:!(null===(i=this.snippylyUser)||void 0===i?void 0:i.userId)})}">
95
+ <div class="snippyly-comment-tool-container snippyly-menu-trigger ${ni({disabled:!(null===(t=this.snippylyUser)||void 0===t?void 0:t.userId)})}">
96
96
  <snippyly-comment-tool class="custom-tool">
97
97
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
98
98
  <path
@@ -114,6 +114,18 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
114
114
  </div>
115
115
  </div>
116
116
  `:null}
117
+ ${this.isUserGlobalContact?A`
118
+ <div class="snippyly-menu-container snippyly-menu-trigger ${ni({opened:"viewModeMenu"===this.menuOpenedId})}" id="viewModeMenu" @click=${i=>this.toggleMenu(i,"viewModeMenu")}>
119
+ <div class="comment-counter">
120
+ View: ${this.viewMode||"External"}
121
+ </div>
122
+ <div class="snippyly-menu">
123
+ <div class="menu-item" @click=${()=>this.setViewMode("Internal")}>Internal</div>
124
+ <div class="menu-item" @click=${()=>this.setViewMode(null)}>External</div>
125
+ <div class="menu-item" @click=${()=>this.setViewMode("All")}>All</div>
126
+ </div>
127
+ </div>
128
+ `:null}
117
129
  <div class="spacer"></div>
118
130
  <div class="snippyly-presence-container snippyly-menu-trigger">
119
131
  <snippyly-presence max-users="4"></snippyly-presence>
@@ -137,7 +149,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
137
149
  `}
138
150
  `:null}
139
151
 
140
- <div class="snippyly-menu-container snippyly-menu-trigger ${nt({opened:"userMenu"===this.menuOpenedId})}" id="userMenu" @click=${t=>this.toggleMenu(t,"userMenu")}>
152
+ <div class="snippyly-menu-container snippyly-menu-trigger ${ni({opened:"userMenu"===this.menuOpenedId})}" id="userMenu" @click=${i=>this.toggleMenu(i,"userMenu")}>
141
153
  ${this.expanded&&(null===(h=this.snippylyUser)||void 0===h?void 0:h.photoUrl)?A`
142
154
  <img src=${null===(a=this.snippylyUser)||void 0===a?void 0:a.photoUrl} class="profile-img" referrerpolicy="no-referrer" title=${null===(c=this.snippylyUser)||void 0===c?void 0:c.name} />
143
155
  `:null}
@@ -157,7 +169,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
157
169
  </div>
158
170
  </div>
159
171
  </div>
160
- `:A``}};ut.styles=s`
172
+ `:A``}};ui.styles=s`
161
173
 
162
174
  @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
163
175
 
@@ -166,33 +178,33 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
166
178
  }
167
179
 
168
180
  .snippyly-plugin-container {
169
- height: ${dt(3.5)};
181
+ height: ${di(3.5)};
170
182
  background-color: white;
171
183
  position: fixed;
172
184
  bottom: 0;
173
185
  right: 0;
174
186
  z-index: 99999999;
175
- margin: ${dt(1.5)};
176
- border-radius: ${dt(.5)};
187
+ margin: ${di(1.5)};
188
+ border-radius: ${di(.5)};
177
189
  border: 1px solid rgba(0, 0, 0, 0.12);
178
190
  display: flex;
179
191
  box-sizing: border-box;
180
192
  align-items: center;
181
193
  z-index: 999999995;
182
194
  color: black !important;
183
- box-shadow: 0 ${dt(1)} ${dt(3)} #0000002d;
184
- margin-bottom: ${dt(3)}; // Added to prevent overlap between plugin UI and webflow badge
195
+ box-shadow: 0 ${di(1)} ${di(3)} #0000002d;
196
+ margin-bottom: ${di(3)}; // Added to prevent overlap between plugin UI and webflow badge
185
197
  /* overflow: hidden; */
186
198
  }
187
199
 
188
200
  .snippyly-plugin-container.expanded {
189
- min-width: ${dt(30)};
201
+ min-width: ${di(30)};
190
202
  }
191
203
 
192
204
  .snippyly-plugin-container>* {
193
205
  display: flex;
194
206
  align-items: center;
195
- padding: 0 ${dt(.5)};
207
+ padding: 0 ${di(.5)};
196
208
  height: 100%;
197
209
  position: relative;
198
210
  }
@@ -200,7 +212,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
200
212
  .snippyly-logo-container {
201
213
  display: flex;
202
214
  align-items: center;
203
- /* padding: ${dt(1)}; */
215
+ /* padding: ${di(1)}; */
204
216
  height: 100%;
205
217
  }
206
218
 
@@ -216,21 +228,21 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
216
228
  }
217
229
 
218
230
  .snippyly-logo-container {
219
- border-top-left-radius: ${dt(.5)};
220
- border-bottom-left-radius: ${dt(.5)};
231
+ border-top-left-radius: ${di(.5)};
232
+ border-bottom-left-radius: ${di(.5)};
221
233
  }
222
234
 
223
235
  .snippyly-menu-container {
224
- border-top-right-radius: ${dt(.5)};
225
- border-bottom-right-radius: ${dt(.5)};
236
+ border-top-right-radius: ${di(.5)};
237
+ border-bottom-right-radius: ${di(.5)};
226
238
  }
227
239
 
228
240
  .snippyly-plugin-container.expanded .snippyly-logo {
229
- margin-right: ${dt(.5)};
241
+ margin-right: ${di(.5)};
230
242
  }
231
243
 
232
244
  .snippyly-plugin-container:not(.expanded) .snippyly-logo {
233
- margin-left: ${dt(.5)};
245
+ margin-left: ${di(.5)};
234
246
  }
235
247
 
236
248
  .snippyly-comment-tool-container {
@@ -251,25 +263,25 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
251
263
  }
252
264
 
253
265
  .snippyly-comment-tool-container .custom-tool {
254
- font-size: ${dt(1)};
266
+ font-size: ${di(1)};
255
267
  }
256
268
 
257
269
  snippyly-comment-tool {
258
270
  height: 100%;
259
- padding: ${dt(1)};
271
+ padding: ${di(1)};
260
272
  box-sizing: border-box;
261
273
  }
262
274
 
263
275
  .snippyly-comments-container {
264
- padding-left: ${dt(.5)};
265
- padding-right: ${dt(.5)};
276
+ padding-left: ${di(.5)};
277
+ padding-right: ${di(.5)};
266
278
  }
267
279
 
268
280
  .comment-counter {
269
281
  border: 1px solid rgb(0, 0, 0, 0.25);
270
- padding: ${dt(.3,.5)};
271
- border-radius: ${dt(.5)};
272
- font-size: ${dt(.8)};
282
+ padding: ${di(.3,.5)};
283
+ border-radius: ${di(.5)};
284
+ font-size: ${di(.8)};
273
285
  }
274
286
 
275
287
  .comment-counter:hover {
@@ -279,8 +291,8 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
279
291
 
280
292
  .snippyly-btn {
281
293
  cursor: pointer;
282
- padding: ${dt(.3,.5)};
283
- font-size: ${dt(.8)};
294
+ padding: ${di(.3,.5)};
295
+ font-size: ${di(.8)};
284
296
  }
285
297
 
286
298
  .snippyly-primary-btn {
@@ -311,29 +323,29 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
311
323
  top: 0;
312
324
  left: 50%;
313
325
  white-space: nowrap;
314
- transform: translate(-50%, calc(-100% - ${dt(1)}));
326
+ transform: translate(-50%, calc(-100% - ${di(1)}));
315
327
  display: none;
316
328
  border-radius: 4px;
317
329
  }
318
330
 
319
331
  .menu-item {
320
- padding: ${dt(.25,.5)};
332
+ padding: ${di(.25,.5)};
321
333
  cursor: pointer;
322
- font-size: ${dt(.8)};
334
+ font-size: ${di(.8)};
323
335
  }
324
336
 
325
337
  .menu-item:first-child {
326
- padding-top: ${dt(.5)};
338
+ padding-top: ${di(.5)};
327
339
  }
328
340
 
329
341
  .menu-item:last-child {
330
- padding-bottom: ${dt(.5)};
342
+ padding-bottom: ${di(.5)};
331
343
  }
332
344
 
333
345
  .menu-item-divider {
334
346
  background: black;
335
347
  height: 1px;
336
- margin: ${dt(.2)} 0;
348
+ margin: ${di(.2)} 0;
337
349
  }
338
350
 
339
351
  .snippyly-menu:not(.snippyly-tooltip):after {
@@ -355,8 +367,8 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
355
367
  }
356
368
 
357
369
  .profile-img {
358
- width: ${dt(1.5)};
359
- height: ${dt(1.5)};
370
+ width: ${di(1.5)};
371
+ height: ${di(1.5)};
360
372
  border-radius: 100%;
361
373
  }
362
374
 
@@ -381,7 +393,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
381
393
  }
382
394
 
383
395
  .more-menu-icon {
384
- margin: ${dt(.5)};
396
+ margin: ${di(.5)};
385
397
  }
386
398
 
387
399
  .disabled {
@@ -436,7 +448,7 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
436
448
  }
437
449
 
438
450
  .s-presence-avatar-image-small {
439
- width: ${dt(1.6)};
451
+ width: ${di(1.6)};
440
452
  height: auto;
441
453
  display: block;
442
454
  }
@@ -448,4 +460,4 @@ const nt=(t=>(...i)=>({_$litDirective$:t,values:i}))(class extends class{constru
448
460
  .away {
449
461
  filter: grayscale(1);
450
462
  }
451
- `,pt([tt()],ut.prototype,"loadPlugin",null),pt([tt()],ut.prototype,"comments",void 0),pt([tt()],ut.prototype,"commentElement",void 0),pt([tt()],ut.prototype,"selectionElement",void 0),pt([tt()],ut.prototype,"addCommentMode",void 0),pt([tt()],ut.prototype,"_expanded",void 0),pt([tt()],ut.prototype,"snippylyUser",void 0),pt([Y()],ut.prototype,"apiKey",void 0),pt([tt()],ut.prototype,"staging",void 0),pt([Y()],ut.prototype,"projectVersionKey",null),pt([tt()],ut.prototype,"projectVersion",void 0),pt([tt()],ut.prototype,"_menuOpenedId",void 0),pt([tt()],ut.prototype,"copyLinkTooltip",void 0),pt([tt()],ut.prototype,"invalidApiKey",void 0),pt([tt()],ut.prototype,"documentId",void 0),ut=pt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:e,elements:n}=i;return{kind:e,elements:n,finisher(i){window.customElements.define(t,i)}}})(t,i))("snippyly-plugin")],ut);export{ut as SnippylyPlugin};
463
+ `,pi([ii()],ui.prototype,"loadPlugin",null),pi([ii()],ui.prototype,"comments",void 0),pi([ii()],ui.prototype,"commentElement",void 0),pi([ii()],ui.prototype,"selectionElement",void 0),pi([ii()],ui.prototype,"addCommentMode",void 0),pi([ii()],ui.prototype,"_expanded",void 0),pi([ii()],ui.prototype,"snippylyUser",void 0),pi([Y()],ui.prototype,"apiKey",void 0),pi([ii()],ui.prototype,"staging",void 0),pi([Y()],ui.prototype,"projectVersionKey",null),pi([ii()],ui.prototype,"projectVersion",void 0),pi([ii()],ui.prototype,"_menuOpenedId",void 0),pi([ii()],ui.prototype,"copyLinkTooltip",void 0),pi([ii()],ui.prototype,"invalidApiKey",void 0),pi([ii()],ui.prototype,"documentId",void 0),pi([ii()],ui.prototype,"isUserGlobalContact",void 0),pi([ii()],ui.prototype,"viewMode",void 0),ui=pi([(i=>t=>"function"==typeof t?((i,t)=>(window.customElements.define(i,t),t))(i,t):((i,t)=>{const{kind:e,elements:n}=t;return{kind:e,elements:n,finisher(t){window.customElements.define(i,t)}}})(i,t))("snippyly-plugin")],ui);export{ui as SnippylyPlugin};