@vouchfor/embeds 0.0.0-experiment.2e18d0d → 0.0.0-experiment.2f44fa4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"embeds.js","sources":["../../../../node_modules/lit/node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/lit/node_modules/@lit/reactive-element/reactive-element.js","../../../../node_modules/lit/node_modules/lit-html/lit-html.js","../../../../node_modules/lit-element/node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/lit-element/node_modules/@lit/reactive-element/reactive-element.js","../../../../node_modules/lit-element/node_modules/lit-html/lit-html.js","../../../../node_modules/lit-element/lit-element.js","../../src/utils/events.ts","../../src/components/Embed/controllers/event-forwarder.ts","../../src/utils/env.ts","../../src/components/Embed/controllers/fetcher.ts","../../src/components/Embed/controllers/tracking.ts","../../src/components/Embed/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(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.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(e?r:this[t],s))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.2\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?k:\"?\"===e[1]?H:\"@\"===e[1]?I:R}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=E.nextNode(),o++)}return E.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}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=N(this,t,i),c(t)?t===T||null==t||\"\"===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):u(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new S(e,this),s=t.u(this.options);t.p(i),this.$(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}T(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.k(l()),this.k(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.O(t)}O(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class k extends R{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===T?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const z={j:e,P:h,A:o,C:1,M:P,L:S,R:u,V:N,D:M,I:R,H,N:I,U:k,B:L},Z=t.litHtmlPolyfillSupport;Z?.(V,M),(t.litHtmlVersions??=[]).push(\"3.1.0\");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(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.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(e?r:this[t],s))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.2\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?k:\"?\"===e[1]?H:\"@\"===e[1]?I:R}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=E.nextNode(),o++)}return E.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}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=N(this,t,i),c(t)?t===T||null==t||\"\"===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):u(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new S(e,this),s=t.u(this.options);t.p(i),this.$(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}T(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.k(l()),this.k(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.O(t)}O(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class k extends R{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===T?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const z={j:e,P:h,A:o,C:1,M:P,L:S,R:u,V:N,D:M,I:R,H,N:I,U:k,B:L},Z=t.litHtmlPolyfillSupport;Z?.(V,M),(t.litHtmlVersions??=[]).push(\"3.1.0\");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[(\"finalized\",\"finalized\")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.0.2\");export{s as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","function forwardEvent(type: string, fromElement: HTMLElement, toElement: HTMLElement) {\n function forwarder(event: Event) {\n toElement.dispatchEvent(new CustomEvent(event.type, event));\n }\n\n fromElement.addEventListener(type, forwarder);\n\n return () => {\n fromElement.removeEventListener(type, forwarder);\n };\n}\n\nexport { forwardEvent };\n","import { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Embed } from '..';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { Ref } from 'lit/directives/ref.js';\n\nimport { forwardEvent } from '~/utils/events';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\nclass EventForwardController implements ReactiveController {\n host: EmbedHost;\n\n private _events: string[] = [];\n private _cleanup: (() => void)[] = [];\n private _forwardElementRef: Ref<HTMLElement> = createRef();\n\n constructor(host: EmbedHost, events: string[]) {\n this.host = host;\n this._events = events;\n host.addController(this);\n }\n\n register() {\n return ref(this._forwardElementRef);\n }\n\n hostConnected() {\n // Guaranteed to have the element ref in the RAF callback because of how the lit lifecycle works\n requestAnimationFrame(() => {\n this._events.forEach((event) => {\n if (this._forwardElementRef.value) {\n this._cleanup.push(forwardEvent(event, this._forwardElementRef.value, this.host));\n }\n });\n });\n }\n\n hostDisconnected() {\n this._cleanup.forEach((fn) => {\n fn();\n });\n this._cleanup = [];\n }\n}\n\nexport { EventForwardController };\n","type Environment = 'local' | 'dev' | 'staging' | 'prod';\n\ntype GetEnvUrlsReturn = {\n videoUrl: string;\n publicApiUrl: string;\n embedApiUrl: string;\n};\n\nconst devVideoUrl = 'https://d2rxhdlm2q91uk.cloudfront.net';\nconst stagingVideoUrl = 'https://d1ix11aj5kfygl.cloudfront.net';\nconst prodVideoUrl = 'https://d157jlwnudd93d.cloudfront.net';\n\nconst devPublicApiUrl = 'https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev';\nconst stagingPublicApiUrl = 'https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging';\nconst prodPublicApiUrl = 'https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod';\n\nconst localEmbedApiUrl = 'http://localhost:6060/v2';\nconst devEmbedApiUrl = 'https://embed-dev.vouchfor.com/v2';\nconst stagingEmbedApiUrl = 'https://embed-staging.vouchfor.com/v2';\nconst prodEmbedApiUrl = 'https://embed.vouchfor.com/v2';\n\n// We are handling the case where env is an unknown string so the ts error is a lie\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nfunction getEnvUrls(env: Environment): GetEnvUrlsReturn {\n if (!['local', 'dev', 'staging', 'prod'].includes(env)) {\n throw new Error(`Unknown environment: ${env}`);\n }\n\n if (env === 'local') {\n return {\n videoUrl: devVideoUrl,\n publicApiUrl: devPublicApiUrl,\n embedApiUrl: localEmbedApiUrl\n };\n }\n\n if (env === 'dev') {\n return {\n videoUrl: devVideoUrl,\n publicApiUrl: devPublicApiUrl,\n embedApiUrl: devEmbedApiUrl\n };\n }\n\n if (env === 'staging') {\n return {\n videoUrl: stagingVideoUrl,\n publicApiUrl: stagingPublicApiUrl,\n embedApiUrl: stagingEmbedApiUrl\n };\n }\n\n if (env === 'prod') {\n return {\n videoUrl: prodVideoUrl,\n publicApiUrl: prodPublicApiUrl,\n embedApiUrl: prodEmbedApiUrl\n };\n }\n}\n\nexport { devEmbedApiUrl, stagingEmbedApiUrl, prodEmbedApiUrl, getEnvUrls };\nexport type { Environment };\n","import { Task } from '@lit/task';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport type { Embed, EmbedProps } from '..';\nimport type { ReactiveControllerHost } from 'lit';\nimport type { Environment } from '~/utils/env';\n\nimport { getEnvUrls } from '~/utils/env';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype TaskDeps = [\n EmbedProps['env'],\n EmbedProps['apiKey'],\n EmbedProps['data'],\n EmbedProps['vouchId'],\n EmbedProps['templateId']\n];\n\nclass FetcherController {\n host: EmbedHost;\n\n private _fetching = false;\n\n set fetching(value) {\n if (this._fetching !== value) {\n this._fetching = value;\n this.host.requestUpdate();\n }\n }\n get fetching() {\n return this._fetching;\n }\n\n private getVouch = async (env: Environment, apiKey: string, vouchId: string) => {\n const { embedApiUrl } = getEnvUrls(env);\n\n const cacheCheck = uuidv4();\n const res = await fetch(`${embedApiUrl}/vouches/${vouchId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['X-Cache-Check', cacheCheck]\n ]\n });\n\n const vouch = await res.json();\n this.host.dispatchEvent(new CustomEvent('vouch:loaded', { detail: vouchId }));\n\n // HACK: we're currently using API Gateway caching on the embed API without any invalidation logic,\n // so to ensure that the cache stays up to date, whenever we detect a cache hit we trigger another\n // API call with the `Cache-Control` header which will re-fill the cache\n const resCacheCheck = res?.headers?.get('X-Cache-Check');\n if (resCacheCheck && resCacheCheck !== cacheCheck) {\n fetch(`${embedApiUrl}/vouches/${vouchId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['Cache-Control', 'max-age=0']\n ]\n });\n }\n\n return vouch;\n };\n\n private getTemplate = async (env: Environment, apiKey: string, templateId: string) => {\n const { embedApiUrl } = getEnvUrls(env);\n\n const cacheCheck = uuidv4();\n const res = await fetch(`${embedApiUrl}/templates/${templateId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['X-Cache-Check', cacheCheck]\n ]\n });\n const template = await res.json();\n\n // HACK: we're currently using API Gateway caching on the embed API without any invalidation logic,\n // so to ensure that the cache stays up to date, whenever we detect a cache hit we trigger another\n // API call with the `Cache-Control` header which will re-fill the cache\n const resCacheCheck = res?.headers?.get('X-Cache-Check');\n if (resCacheCheck && resCacheCheck !== cacheCheck) {\n fetch(`${embedApiUrl}/templates/${templateId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['Cache-Control', 'max-age=0']\n ]\n });\n }\n\n return template;\n };\n\n constructor(host: EmbedHost) {\n this.host = host;\n new Task<TaskDeps, void>(\n this.host,\n async ([env, apiKey, data, vouchId, templateId]: TaskDeps) => {\n try {\n host.vouch = undefined;\n host.template = undefined;\n\n if (data) {\n let template;\n if (templateId) {\n this.fetching = true;\n template = await this.getTemplate(env, apiKey, templateId);\n }\n host.vouch = data;\n host.template = template ?? data?.settings?.template?.instance;\n } else if (vouchId) {\n this.fetching = true;\n\n const [vouch, template] = await Promise.all([\n this.getVouch(env, apiKey, vouchId),\n templateId ? this.getTemplate(env, apiKey, templateId) : null\n ]);\n host.vouch = vouch;\n host.template = template ?? vouch?.settings?.template?.instance;\n }\n } finally {\n this.fetching = false;\n }\n },\n () => [host.env, host.apiKey, host.data, host.vouchId, host.templateId]\n );\n }\n}\n\nexport { FetcherController };\n","import { v4 as uuidv4 } from 'uuid';\n\nimport type { Embed } from '..';\nimport type { VideoEventDetail } from '@vouchfor/media-player';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport { getEnvUrls } from '~/utils/env';\n\n// In seconds due to checking against node.currentTime\nconst STREAMED_THROTTLE = 10;\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype TrackingEvent = 'VOUCH_LOADED' | 'VOUCH_RESPONSE_VIEWED' | 'VIDEO_PLAYED' | 'VIDEO_STREAMED';\ntype TrackingPayload = {\n answerId?: string;\n streamStart?: number;\n streamEnd?: number;\n};\n\ntype TimeMap = {\n [key: string]: number;\n};\n\ntype BooleanMap = {\n [key: string]: boolean;\n};\n\nclass TrackingController implements ReactiveController {\n host: EmbedHost;\n\n private _tabId: string | undefined = undefined;\n private _clientId: string | undefined = undefined;\n private _visitorId: string | undefined = undefined;\n\n private _hasPlayed = false;\n private _hasLoaded: BooleanMap = {};\n private _answersViewed: BooleanMap = {};\n private _streamStartTime: TimeMap = {};\n private _streamLatestTime: TimeMap = {};\n private _currentlyPlayingVideo: VideoEventDetail | null = null;\n\n constructor(host: EmbedHost) {\n this.host = host;\n host.addController(this);\n }\n\n private _findVouchId() {\n if (this.host.vouch) {\n if ('uuid' in this.host.vouch) {\n return this.host.vouch.uuid;\n }\n return this.host.vouch.id;\n }\n }\n\n private _createVisitor = (visitorId: string) => {\n const { publicApiUrl } = getEnvUrls(this.host.env);\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n navigator.sendBeacon(`${publicApiUrl}/api/visitor`, JSON.stringify({ visitorId }));\n return visitorId;\n };\n\n private _getUids() {\n if (typeof window === 'undefined') {\n return {\n client: null,\n tab: null,\n request: uuidv4()\n };\n }\n\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const visitorId =\n this._visitorId || window.localStorage?.getItem?.('vouch-uid-visitor') || this._createVisitor(uuidv4());\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const clientId = this._clientId || window.localStorage?.getItem?.('vouch-uid-client') || uuidv4();\n // Persisted in session storage, so we can search for everything the user has done in a specific tab\n const tabId = this._tabId || window.sessionStorage?.getItem?.('vouch-uid-tab') || uuidv4();\n // Not persisted, allows us to search for any logs related to a single FE request\n // E.g. BE should pass this request ID through all other services to be able to group logs\n const requestId = uuidv4();\n\n // Cache and persist uids\n if (visitorId !== this._visitorId) {\n this._visitorId = visitorId;\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n }\n\n if (clientId !== this._clientId) {\n this._clientId = clientId;\n window.localStorage?.setItem?.('vouch-uid-client', clientId);\n }\n\n if (tabId !== this._tabId) {\n this._tabId = tabId;\n window.sessionStorage?.setItem?.('vouch-uid-tab', tabId);\n }\n\n return {\n client: clientId,\n tab: tabId,\n request: requestId,\n visitor: visitorId\n };\n }\n\n private _getReportingMetadata = () => {\n const [country, region] = Intl.DateTimeFormat().resolvedOptions().timeZone?.split?.('/') ?? [];\n\n const utmParams: any = {};\n [...new URLSearchParams(location.search).entries()].forEach(([key, value]) => {\n if (/utm/.test(key)) {\n const param = key.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n utmParams[param] = value;\n }\n });\n\n return {\n source: this.host.trackingSource,\n time: new Date(),\n region,\n country,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n referrer: document.referrer,\n currentUrl: location.href,\n ...utmParams\n };\n };\n\n private _sendTrackingEvent = (event: TrackingEvent, payload?: TrackingPayload) => {\n const vouchId = this._findVouchId();\n\n if (!vouchId || this.host.disableTracking) {\n return;\n }\n\n const { publicApiUrl } = getEnvUrls(this.host.env);\n const { client, tab, request, visitor } = this._getUids();\n\n navigator.sendBeacon(\n `${publicApiUrl}/api/events`,\n JSON.stringify({\n event,\n payload,\n context: {\n 'x-uid-client': client,\n 'x-uid-tab': tab,\n 'x-uid-request': request,\n 'x-uid-visitor': visitor,\n 'x-reporting-metadata': this._getReportingMetadata()\n }\n })\n );\n };\n\n private _handleVouchLoaded = ({ detail: vouchId }: CustomEvent<string>) => {\n if (!vouchId) {\n return;\n }\n\n // Only send loaded event once per session\n if (!this._hasLoaded[vouchId]) {\n this._sendTrackingEvent('VOUCH_LOADED');\n this._hasLoaded[vouchId] = true;\n }\n };\n\n private _handlePlay = () => {\n // Only send the video played event once per session\n if (!this._hasPlayed) {\n this._sendTrackingEvent('VIDEO_PLAYED', {\n streamStart: this.host.currentTime\n });\n this._hasPlayed = true;\n }\n };\n\n private _handleVideoPlay = ({ detail: { id, key, node } }: CustomEvent<VideoEventDetail>) => {\n // Only increment play count once per session\n if (!this._answersViewed[key]) {\n this._sendTrackingEvent('VOUCH_RESPONSE_VIEWED', {\n answerId: id\n });\n this._answersViewed[key] = true;\n }\n\n this._streamStartTime[key] = node.currentTime;\n this._streamLatestTime[key] = node.currentTime;\n };\n\n private _handleVideoTimeUpdate = ({ detail: { id, key, node } }: CustomEvent<VideoEventDetail>) => {\n // We only want to count any time that the video is actually playing\n if (!this.host.paused) {\n this._currentlyPlayingVideo = { id, key, node };\n this._streamLatestTime[key] = node.currentTime;\n }\n\n if (\n !node.paused &&\n !this.host.paused &&\n // Only fire the video seeked event when this video is the active one\n id === this.host.scene?.video?.id &&\n // Throttle the frequency that we send streamed events while playing\n this._streamLatestTime[key] - this._streamStartTime[key] > STREAMED_THROTTLE\n ) {\n this._sendTrackingEvent('VIDEO_STREAMED', {\n answerId: id,\n streamStart: this._streamStartTime[key],\n streamEnd: this._streamLatestTime[key]\n });\n\n this._streamStartTime[key] = node.currentTime;\n }\n };\n\n private _handleVideoPause = ({ detail: { id, key } }: CustomEvent<VideoEventDetail>) => {\n // Don't send a tracking event when seeking backwards\n if (this._streamLatestTime[key] > this._streamStartTime[key]) {\n // Send a video streamed event any time the video pauses then reset the streamed state\n // We do this to capture the last bit of time that the video was played between the previous\n // stream event and the video being paused manually or stopping because it ended\n this._sendTrackingEvent('VIDEO_STREAMED', {\n answerId: id,\n streamStart: this._streamStartTime[key],\n streamEnd: this._streamLatestTime[key]\n });\n }\n this._currentlyPlayingVideo = null;\n delete this._streamStartTime[key];\n delete this._streamLatestTime[key];\n };\n\n hostConnected() {\n requestAnimationFrame(() => {\n this.host.addEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.addEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.addEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.addEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.addEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n });\n }\n\n hostDisconnected() {\n if (this._currentlyPlayingVideo) {\n const { id, key } = this._currentlyPlayingVideo;\n if (this._streamLatestTime[key] > this._streamStartTime[key]) {\n // Send a video streamed event any time the video pauses then reset the streamed state\n // We do this to capture the last bit of time that the video was played between the previous\n // stream event and the video being paused manually or stopping because it ended\n this._sendTrackingEvent('VIDEO_STREAMED', {\n answerId: id,\n streamStart: this._streamStartTime[key],\n streamEnd: this._streamLatestTime[key]\n });\n }\n }\n\n this.host.removeEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.removeEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.removeEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.removeEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.removeEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n }\n}\n\nexport { TrackingController };\n","import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Scene, TemplateInstance } from '@vouchfor/canvas-video';\nimport type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';\nimport type { Ref } from 'lit/directives/ref.js';\nimport type { Environment } from '~/utils/env';\n\nimport { EventForwardController } from './controllers/event-forwarder';\nimport { FetcherController } from './controllers/fetcher';\nimport { TrackingController } from './controllers/tracking';\n\nimport '@vouchfor/media-player';\n\ntype EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {\n env: Environment;\n apiKey: string;\n disableTracking?: boolean;\n trackingSource?: string;\n vouchId?: string;\n templateId?: string;\n};\n\n@customElement('vouch-embed')\nclass Embed extends LitElement {\n private _mediaPlayerRef: Ref<MediaPlayer> = createRef();\n\n @property({ type: Object, attribute: 'data' }) data: EmbedProps['data'];\n @property({ type: String }) vouchId: EmbedProps['vouchId'];\n @property({ type: String }) templateId: EmbedProps['templateId'];\n\n @property({ type: String }) env: EmbedProps['env'] = 'prod';\n @property({ type: String }) apiKey: EmbedProps['apiKey'] = '';\n @property({ type: Boolean }) disableTracking: EmbedProps['disableTracking'] = false;\n @property({ type: String }) trackingSource: EmbedProps['trackingSource'] = 'embed';\n\n @property({ type: Array }) controls: EmbedProps['controls'];\n @property({ type: String }) preload: EmbedProps['preload'] = 'auto';\n @property({ type: Boolean }) autoplay: EmbedProps['autoplay'] = false;\n @property({ type: Number }) aspectRatio: EmbedProps['aspectRatio'] = 0;\n\n private eventController = new EventForwardController(this, [\n 'durationchange',\n 'ended',\n 'error',\n 'loadeddata',\n 'pause',\n 'stalled',\n 'play',\n 'playing',\n 'ratechange',\n 'scenechange',\n 'seeking',\n 'seeked',\n 'timeupdate',\n 'volumechange',\n 'waiting',\n\n 'video:loadeddata',\n 'video:seeking',\n 'video:seeked',\n 'video:play',\n 'video:playing',\n 'video:pause',\n 'video:stalled',\n 'video:timeupdate',\n 'video:ended',\n 'video:error'\n ]);\n private _fetcherController = new FetcherController(this);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n private _trackingController = new TrackingController(this);\n\n @state() vouch: EmbedProps['data'];\n @state() template: TemplateInstance | undefined;\n\n get fetching() {\n return this._fetcherController.fetching;\n }\n\n get waiting() {\n return this._mediaPlayerRef.value?.waiting;\n }\n\n get seeking() {\n return this._mediaPlayerRef.value?.seeking;\n }\n\n get paused() {\n return this._mediaPlayerRef.value?.paused;\n }\n\n get captions() {\n return this._mediaPlayerRef.value?.captions;\n }\n\n get fullscreen() {\n return this._mediaPlayerRef.value?.fullscreen;\n }\n\n get duration() {\n return this._mediaPlayerRef.value?.duration;\n }\n\n set currentTime(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.currentTime = value;\n }\n }\n get currentTime() {\n return this._mediaPlayerRef.value?.currentTime ?? 0;\n }\n\n set playbackRate(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.playbackRate = value;\n }\n }\n get playbackRate() {\n return this._mediaPlayerRef.value?.playbackRate ?? 1;\n }\n\n set volume(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.volume = value;\n }\n }\n get volume() {\n return this._mediaPlayerRef.value?.volume ?? 1;\n }\n\n set muted(value: boolean) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.muted = value;\n }\n }\n get muted() {\n return this._mediaPlayerRef.value?.muted ?? false;\n }\n\n get scene(): Scene | null {\n return this._mediaPlayerRef.value?.scene ?? null;\n }\n\n get scenes(): Scene[] {\n return this._mediaPlayerRef.value?.scenes ?? [];\n }\n\n get videoState() {\n return this._mediaPlayerRef.value?.videoState;\n }\n\n get mediaPlayer() {\n return this._mediaPlayerRef.value;\n }\n\n play() {\n this._mediaPlayerRef.value?.play();\n }\n\n pause() {\n this._mediaPlayerRef.value?.pause();\n }\n\n setScene(index: number) {\n this._mediaPlayerRef.value?.setScene(index);\n }\n\n render() {\n return html`\n <vmp-new-media-player\n ${ref(this._mediaPlayerRef)}\n ${this.eventController.register()}\n ?autoplay=${this.autoplay}\n ?loading=${this.fetching}\n .data=${this.vouch}\n .template=${this.template}\n aspectRatio=${ifDefined(this.aspectRatio)}\n preload=${ifDefined(this.preload)}\n .controls=${this.controls}\n ></vmp-new-media-player>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vouch-embed': Embed;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'vouch-embed': Embed;\n }\n }\n}\n\nexport { Embed };\nexport type { EmbedProps };\n"],"names":["t","e","s","o","n$5","r","n","S","c","i","h","a","l","p","d","u","f","y","b$1","_a","b","v","_","m","g","$","w","T","A","E","C","P","x","V$1","V","k","H","I","R","N","_b","S$2","M","L","R$1","H$1","Z","n$2","j","forwardEvent","type","fromElement","toElement","forwarder","event","EventForwardController","host","events","createRef","ref","fn","devVideoUrl","stagingVideoUrl","prodVideoUrl","devPublicApiUrl","stagingPublicApiUrl","prodPublicApiUrl","localEmbedApiUrl","devEmbedApiUrl","stagingEmbedApiUrl","prodEmbedApiUrl","getEnvUrls","env","FetcherController","apiKey","vouchId","embedApiUrl","cacheCheck","uuidv4","res","vouch","resCacheCheck","templateId","template","Task","data","_d","_c","value","STREAMED_THROTTLE","TrackingController","visitorId","publicApiUrl","country","region","utmParams","key","param","group","payload","client","tab","request","visitor","id","node","clientId","tabId","_f","_e","requestId","_h","_g","_j","_i","_l","_k","Embed","LitElement","index","html","ifDefined","__decorateClass","property","state","customElement"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,KAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,KAAE,OAAQ,GAACC,KAAE,oBAAI;AAAO,IAAAC,KAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID;AAAE,YAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,MAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,GAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,iBAAe,YAAY,KAAK,OAA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EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAbtBN,EAawB,WAAA,WAAA,CAAA;AACCK,EAAA;AAAA,EAA5BC,EAAS,EAAE,MAAM,SAAS;AAAA,GAdvBN,EAcyB,WAAA,YAAA,CAAA;AACDK,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,QAAQ;AAAA,GAftBN,EAewB,WAAA,eAAA,CAAA;AAmCnBK,EAAA;AAAA,EAARE,GAAM;AAAA,GAlDHP,EAkDK,WAAA,SAAA,CAAA;AACAK,EAAA;AAAA,EAARE,GAAM;AAAA,GAnDHP,EAmDK,WAAA,YAAA,CAAA;AAnDLA,IAANK,EAAA;AAAA,EADCG,GAAc,aAAa;AAAA,GACtBR,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6]}
1
+ {"version":3,"file":"embeds.js","sources":["../../../../node_modules/lit/node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/lit/node_modules/@lit/reactive-element/reactive-element.js","../../../../node_modules/lit/node_modules/lit-html/lit-html.js","../../../../node_modules/lit-element/node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/lit-element/node_modules/@lit/reactive-element/reactive-element.js","../../../../node_modules/lit-element/node_modules/lit-html/lit-html.js","../../../../node_modules/lit-element/lit-element.js","../../src/utils/events.ts","../../src/components/Embed/controllers/event-forwarder.ts","../../src/utils/env.ts","../../src/components/Embed/controllers/fetcher.ts","../../src/components/Embed/controllers/tracking.ts","../../src/components/Embed/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(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.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(e?r:this[t],s))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.2\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?k:\"?\"===e[1]?H:\"@\"===e[1]?I:R}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=E.nextNode(),o++)}return E.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}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=N(this,t,i),c(t)?t===T||null==t||\"\"===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):u(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new S(e,this),s=t.u(this.options);t.p(i),this.$(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}T(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.k(l()),this.k(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.O(t)}O(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class k extends R{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===T?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const z={j:e,P:h,A:o,C:1,M:P,L:S,R:u,V:N,D:M,I:R,H,N:I,U:k,B:L},Z=t.litHtmlPolyfillSupport;Z?.(V,M),(t.litHtmlVersions??=[]).push(\"3.1.0\");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(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.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(e?r:this[t],s))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.2\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${(Math.random()+\"\").slice(9)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=Symbol.for(\"lit-noChange\"),T=Symbol.for(\"lit-nothing\"),A=new WeakMap,E=r.createTreeWalker(r,129);function C(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const P=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[C(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),o]};class V{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=P(t,s);if(this.el=V.createElement(f,n),E.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=E.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?k:\"?\"===e[1]?H:\"@\"===e[1]?I:R}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),E.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function N(t,i,s=t,e){if(i===w)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=N(t,h._$AS(t,i.values),h,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);E.currentNode=e;let h=E.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new M(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new L(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=E.nextNode(),o++)}return E.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}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=N(this,t,i),c(t)?t===T||null==t||\"\"===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==w&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):u(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==T&&c(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=V.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new S(e,this),s=t.u(this.options);t.p(i),this.$(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new V(t)),i}T(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new M(this.k(l()),this.k(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=T}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=N(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==w,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=N(this,e[s+n],i,n),r===w&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===T?t=T:t!==T&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.O(t)}O(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class k extends R{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===T?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==T)}}class I extends R{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=N(this,t,i,0)??T)===w)return;const s=this._$AH,e=t===T&&s!==T||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==T&&(s===T||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const z={j:e,P:h,A:o,C:1,M:P,L:S,R:u,V:N,D:M,I:R,H,N:I,U:k,B:L},Z=t.litHtmlPolyfillSupport;Z?.(V,M),(t.litHtmlVersions??=[]).push(\"3.1.0\");const j=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new M(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{z as _$LH,x as html,w as noChange,T as nothing,j as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i}}s._$litElement$=!0,s[(\"finalized\",\"finalized\")]=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const r=globalThis.litElementPolyfillSupport;r?.({LitElement:s});const o={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.0.2\");export{s as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","function forwardEvent(type: string, fromElement: HTMLElement, toElement: HTMLElement) {\n function forwarder(event: Event) {\n toElement.dispatchEvent(new CustomEvent(event.type, event));\n }\n\n fromElement.addEventListener(type, forwarder);\n\n return () => {\n fromElement.removeEventListener(type, forwarder);\n };\n}\n\nexport { forwardEvent };\n","import { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Embed } from '..';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { Ref } from 'lit/directives/ref.js';\n\nimport { forwardEvent } from '~/utils/events';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\nclass EventForwardController implements ReactiveController {\n host: EmbedHost;\n\n private _events: string[] = [];\n private _cleanup: (() => void)[] = [];\n private _forwardElementRef: Ref<HTMLElement> = createRef();\n\n constructor(host: EmbedHost, events: string[]) {\n this.host = host;\n this._events = events;\n host.addController(this);\n }\n\n register() {\n return ref(this._forwardElementRef);\n }\n\n hostConnected() {\n // Guaranteed to have the element ref in the RAF callback because of how the lit lifecycle works\n requestAnimationFrame(() => {\n this._events.forEach((event) => {\n if (this._forwardElementRef.value) {\n this._cleanup.push(forwardEvent(event, this._forwardElementRef.value, this.host));\n }\n });\n });\n }\n\n hostDisconnected() {\n this._cleanup.forEach((fn) => {\n fn();\n });\n this._cleanup = [];\n }\n}\n\nexport { EventForwardController };\n","type Environment = 'local' | 'dev' | 'staging' | 'prod';\n\ntype GetEnvUrlsReturn = {\n videoUrl: string;\n publicApiUrl: string;\n embedApiUrl: string;\n};\n\nconst devVideoUrl = 'https://d2rxhdlm2q91uk.cloudfront.net';\nconst stagingVideoUrl = 'https://d1ix11aj5kfygl.cloudfront.net';\nconst prodVideoUrl = 'https://d157jlwnudd93d.cloudfront.net';\n\nconst devPublicApiUrl = 'https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev';\nconst stagingPublicApiUrl = 'https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging';\nconst prodPublicApiUrl = 'https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod';\n\nconst localEmbedApiUrl = 'http://localhost:6060/v2';\nconst devEmbedApiUrl = 'https://embed-dev.vouchfor.com/v2';\nconst stagingEmbedApiUrl = 'https://embed-staging.vouchfor.com/v2';\nconst prodEmbedApiUrl = 'https://embed.vouchfor.com/v2';\n\n// We are handling the case where env is an unknown string so the ts error is a lie\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nfunction getEnvUrls(env: Environment): GetEnvUrlsReturn {\n if (!['local', 'dev', 'staging', 'prod'].includes(env)) {\n throw new Error(`Unknown environment: ${env}`);\n }\n\n if (env === 'local') {\n return {\n videoUrl: devVideoUrl,\n publicApiUrl: devPublicApiUrl,\n embedApiUrl: localEmbedApiUrl\n };\n }\n\n if (env === 'dev') {\n return {\n videoUrl: devVideoUrl,\n publicApiUrl: devPublicApiUrl,\n embedApiUrl: devEmbedApiUrl\n };\n }\n\n if (env === 'staging') {\n return {\n videoUrl: stagingVideoUrl,\n publicApiUrl: stagingPublicApiUrl,\n embedApiUrl: stagingEmbedApiUrl\n };\n }\n\n if (env === 'prod') {\n return {\n videoUrl: prodVideoUrl,\n publicApiUrl: prodPublicApiUrl,\n embedApiUrl: prodEmbedApiUrl\n };\n }\n}\n\nexport { devEmbedApiUrl, stagingEmbedApiUrl, prodEmbedApiUrl, getEnvUrls };\nexport type { Environment };\n","import { Task } from '@lit/task';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport type { Embed, EmbedProps } from '..';\nimport type { ReactiveControllerHost } from 'lit';\nimport type { Environment } from '~/utils/env';\n\nimport { getEnvUrls } from '~/utils/env';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype FetchTaskDeps = [\n EmbedProps['env'],\n EmbedProps['apiKey'],\n EmbedProps['data'],\n EmbedProps['vouchId'],\n EmbedProps['templateId']\n];\n\ntype FilterTaskDeps = [EmbedProps['data'], EmbedProps['questions']];\n\nclass FetcherController {\n host: EmbedHost;\n\n private _fetching = false;\n private _vouch: EmbedProps['data'];\n\n set fetching(value) {\n if (this._fetching !== value) {\n this._fetching = value;\n this.host.requestUpdate();\n }\n }\n get fetching() {\n return this._fetching;\n }\n\n private getVouch = async (env: Environment, apiKey: string, vouchId: string) => {\n const { embedApiUrl } = getEnvUrls(env);\n\n const cacheCheck = uuidv4();\n const res = await fetch(`${embedApiUrl}/vouches/${vouchId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['X-Cache-Check', cacheCheck]\n ]\n });\n\n const vouch = await res.json();\n this.host.dispatchEvent(new CustomEvent('vouch:loaded', { detail: vouch?.id }));\n\n // HACK: we're currently using API Gateway caching on the embed API without any invalidation logic,\n // so to ensure that the cache stays up to date, whenever we detect a cache hit we trigger another\n // API call with the `Cache-Control` header which will re-fill the cache\n const resCacheCheck = res?.headers?.get('X-Cache-Check');\n if (resCacheCheck !== cacheCheck) {\n fetch(`${embedApiUrl}/vouches/${vouchId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['Cache-Control', 'max-age=0']\n ]\n });\n }\n\n return vouch;\n };\n\n private getTemplate = async (env: Environment, apiKey: string, templateId: string) => {\n const { embedApiUrl } = getEnvUrls(env);\n\n const cacheCheck = uuidv4();\n const res = await fetch(`${embedApiUrl}/templates/${templateId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['X-Cache-Check', cacheCheck]\n ]\n });\n const template = await res.json();\n\n // HACK: we're currently using API Gateway caching on the embed API without any invalidation logic,\n // so to ensure that the cache stays up to date, whenever we detect a cache hit we trigger another\n // API call with the `Cache-Control` header which will re-fill the cache\n const resCacheCheck = res?.headers?.get('X-Cache-Check');\n if (resCacheCheck !== cacheCheck) {\n fetch(`${embedApiUrl}/templates/${templateId}`, {\n method: 'GET',\n headers: [\n ['X-Api-Key', apiKey],\n ['Cache-Control', 'max-age=0']\n ]\n });\n }\n\n return template;\n };\n\n constructor(host: EmbedHost) {\n this.host = host;\n new Task<FetchTaskDeps, void>(\n this.host,\n async ([env, apiKey, data, vouchId, templateId]: FetchTaskDeps) => {\n try {\n host.vouch = undefined;\n host.template = undefined;\n\n if (data) {\n let template;\n if (templateId) {\n this.fetching = true;\n template = await this.getTemplate(env, apiKey, templateId);\n }\n this._vouch = data;\n host.template = template ?? data?.settings?.template?.instance;\n } else if (vouchId) {\n this.fetching = true;\n\n const [vouch, template] = await Promise.all([\n this.getVouch(env, apiKey, vouchId),\n templateId ? this.getTemplate(env, apiKey, templateId) : null\n ]);\n this._vouch = vouch;\n host.template = template ?? vouch?.settings?.template?.instance;\n }\n } finally {\n this.fetching = false;\n }\n },\n () => [host.env, host.apiKey, host.data, host.vouchId, host.templateId]\n );\n\n // This second task is to be able to filter the vouch without fetching it again if only the questions changed\n new Task<FilterTaskDeps, void>(\n this.host,\n ([vouch, questions]: FilterTaskDeps) => {\n host.vouch = vouch\n ? {\n ...vouch,\n questions: {\n items: vouch?.questions.items.filter((_, index) => !questions?.length || questions?.includes(index + 1))\n }\n }\n : undefined;\n },\n () => [this._vouch, host.questions]\n );\n }\n}\n\nexport { FetcherController };\n","import { v4 as uuidv4 } from 'uuid';\n\nimport type { Embed } from '..';\nimport type { VideoEventDetail } from '@vouchfor/media-player';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport packageJson from '../../../../package.json';\nimport { getEnvUrls } from '~/utils/env';\n\nconst MINIMUM_SEND_THRESHOLD = 1;\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype TrackingEvent = 'VOUCH_LOADED' | 'VOUCH_RESPONSE_VIEWED' | 'VIDEO_PLAYED' | 'VIDEO_STREAMED';\ntype TrackingPayload = {\n vouchId?: string;\n answerId?: string;\n streamStart?: number;\n streamEnd?: number;\n};\n\ntype TimeMap = {\n [key: string]: number;\n};\n\ntype BooleanMap = {\n [key: string]: boolean;\n};\n\nclass TrackingController implements ReactiveController {\n host: EmbedHost;\n\n private _tabId: string | undefined = undefined;\n private _clientId: string | undefined = undefined;\n private _visitorId: string | undefined = undefined;\n\n private _hasPlayed = false;\n private _hasLoaded: BooleanMap = {};\n private _answersViewed: BooleanMap = {};\n private _streamStartTime: TimeMap = {};\n private _streamLatestTime: TimeMap = {};\n private _currentlyPlayingVideo: VideoEventDetail | null = null;\n\n constructor(host: EmbedHost) {\n this.host = host;\n host.addController(this);\n }\n\n private _findVouchId(payload?: TrackingPayload) {\n if (payload && 'vouchId' in payload) {\n return payload.vouchId;\n }\n if (this.host.vouch) {\n return this.host.vouch.id;\n }\n return null;\n }\n\n private _createVisitor = (visitorId: string) => {\n const { publicApiUrl } = getEnvUrls(this.host.env);\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n navigator.sendBeacon(`${publicApiUrl}/api/visitor`, JSON.stringify({ visitorId }));\n return visitorId;\n };\n\n private _getUids() {\n if (typeof window === 'undefined') {\n return {\n client: null,\n tab: null,\n request: uuidv4()\n };\n }\n\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const visitorId =\n this._visitorId || window.localStorage?.getItem?.('vouch-uid-visitor') || this._createVisitor(uuidv4());\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const clientId = this._clientId || window.localStorage?.getItem?.('vouch-uid-client') || uuidv4();\n // Persisted in session storage, so we can search for everything the user has done in a specific tab\n const tabId = this._tabId || window.sessionStorage?.getItem?.('vouch-uid-tab') || uuidv4();\n // Not persisted, allows us to search for any logs related to a single FE request\n // E.g. BE should pass this request ID through all other services to be able to group logs\n const requestId = uuidv4();\n\n // Cache and persist uids\n if (visitorId !== this._visitorId) {\n this._visitorId = visitorId;\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n }\n\n if (clientId !== this._clientId) {\n this._clientId = clientId;\n window.localStorage?.setItem?.('vouch-uid-client', clientId);\n }\n\n if (tabId !== this._tabId) {\n this._tabId = tabId;\n window.sessionStorage?.setItem?.('vouch-uid-tab', tabId);\n }\n\n return {\n client: clientId,\n tab: tabId,\n request: requestId,\n visitor: visitorId\n };\n }\n\n private _getReportingMetadata = () => {\n const [country, region] = Intl.DateTimeFormat().resolvedOptions().timeZone?.split?.('/') ?? [];\n\n const utmParams: any = {};\n [...new URLSearchParams(location.search).entries()].forEach(([key, value]) => {\n if (/utm/.test(key)) {\n const param = key.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n utmParams[param] = value;\n }\n });\n\n return {\n source: this.host.trackingSource,\n time: new Date(),\n region,\n country,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n referrer: document.referrer,\n currentUrl: location.href,\n ...utmParams\n };\n };\n\n private _sendTrackingEvent = (event: TrackingEvent, payload?: TrackingPayload) => {\n const vouchId = this._findVouchId(payload);\n\n if (!vouchId || this.host.disableTracking) {\n return;\n }\n\n const { publicApiUrl } = getEnvUrls(this.host.env);\n const { client, tab, request, visitor } = this._getUids();\n\n navigator.sendBeacon(\n `${publicApiUrl}/api/v2/events`,\n JSON.stringify({\n event,\n payload: {\n ...payload,\n vouchId\n },\n context: {\n 'x-uid-client': client,\n 'x-uid-tab': tab,\n 'x-uid-request': request,\n 'x-uid-visitor': visitor,\n 'x-reporting-metadata': this._getReportingMetadata(),\n 'x-embeds-version': packageJson.version\n }\n })\n );\n };\n\n private _streamEnded = () => {\n if (this._currentlyPlayingVideo) {\n const { id, key } = this._currentlyPlayingVideo;\n // Don't send a tracking event when seeking backwards\n if (this._streamLatestTime[key] > this._streamStartTime[key] + MINIMUM_SEND_THRESHOLD) {\n // Send a video streamed event any time the stream ends to capture the time between starting\n // the video and the video stopping for any reason (pausing, deleting the embed node or closing the browser)\n this._sendTrackingEvent('VIDEO_STREAMED', {\n answerId: id,\n streamStart: this._streamStartTime[key],\n streamEnd: this._streamLatestTime[key]\n });\n }\n\n // Make sure these events are only sent once by deleting the start and latest times\n delete this._streamStartTime[key];\n delete this._streamLatestTime[key];\n }\n };\n\n private _handleVouchLoaded = ({ detail: vouchId }: CustomEvent<string>) => {\n if (!vouchId) {\n return;\n }\n\n // Only send loaded event once per session\n if (!this._hasLoaded[vouchId]) {\n this._sendTrackingEvent('VOUCH_LOADED', { vouchId });\n this._hasLoaded[vouchId] = true;\n }\n };\n\n private _handlePlay = () => {\n // Only send the video played event once per session\n if (!this._hasPlayed) {\n this._sendTrackingEvent('VIDEO_PLAYED', {\n streamStart: this.host.currentTime\n });\n this._hasPlayed = true;\n }\n };\n\n private _handleVideoPlay = ({ detail: { id, key, node } }: CustomEvent<VideoEventDetail>) => {\n // Only increment play count once per session\n if (!this._answersViewed[key]) {\n this._sendTrackingEvent('VOUCH_RESPONSE_VIEWED', {\n answerId: id\n });\n this._answersViewed[key] = true;\n }\n\n if (!this._streamStartTime[key]) {\n this._streamStartTime[key] = node.currentTime;\n this._streamLatestTime[key] = node.currentTime;\n }\n };\n\n private _handleVideoTimeUpdate = ({ detail: { id, key, node } }: CustomEvent<VideoEventDetail>) => {\n if (\n // We only want to count any time that the video is actually playing\n !this.host.paused &&\n // Only update the latest time if this event fires for the currently active video\n id === this.host.scene?.video?.id\n ) {\n this._currentlyPlayingVideo = { id, key, node };\n this._streamLatestTime[key] = node.currentTime;\n }\n };\n\n private _handleVideoPause = ({ detail: { id, key } }: CustomEvent<VideoEventDetail>) => {\n if (this._streamLatestTime[key] > this._streamStartTime[key] + MINIMUM_SEND_THRESHOLD) {\n this._sendTrackingEvent('VIDEO_STREAMED', {\n answerId: id,\n streamStart: this._streamStartTime[key],\n streamEnd: this._streamLatestTime[key]\n });\n }\n delete this._streamStartTime[key];\n delete this._streamLatestTime[key];\n };\n\n private _pageUnloading = () => {\n this._streamEnded();\n // This will try to send the same stream event again so we delete the start and latest\n // time in stream ended so that there is no times to send and the pause event does nothing\n this.host.pause();\n };\n\n private _handleVisibilityChange = () => {\n if (document.visibilityState === 'hidden') {\n this._pageUnloading();\n }\n };\n\n private _handlePageHide = () => {\n this._pageUnloading();\n };\n\n hostConnected() {\n requestAnimationFrame(() => {\n if ('onvisibilitychange' in document) {\n document.addEventListener('visibilitychange', this._handleVisibilityChange);\n } else {\n window.addEventListener('pagehide', this._handlePageHide);\n }\n this.host.addEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.addEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.addEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.addEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.addEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n });\n }\n\n hostDisconnected() {\n this._streamEnded();\n if ('onvisibilitychange' in document) {\n document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n } else {\n window.removeEventListener('pagehide', this._handlePageHide);\n }\n this.host.removeEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.removeEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.removeEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.removeEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.removeEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n }\n}\n\nexport { TrackingController };\n","import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';\nimport type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';\nimport type { Ref } from 'lit/directives/ref.js';\nimport type { Environment } from '~/utils/env';\n\nimport { EventForwardController } from './controllers/event-forwarder';\nimport { FetcherController } from './controllers/fetcher';\nimport { TrackingController } from './controllers/tracking';\n\nimport '@vouchfor/media-player';\n\ntype EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {\n env: Environment;\n apiKey: string;\n disableTracking?: boolean;\n trackingSource?: string;\n vouchId?: string;\n templateId?: string;\n // Index of the questions to include starting from 1\n questions?: number[];\n};\n\n@customElement('vouch-embed')\nclass Embed extends LitElement {\n private _mediaPlayerRef: Ref<MediaPlayer> = createRef();\n\n @property({ type: Object }) data: EmbedProps['data'];\n @property({ type: String }) vouchId: EmbedProps['vouchId'];\n @property({ type: String }) templateId: EmbedProps['templateId'];\n @property({ type: Array }) questions: EmbedProps['questions'];\n\n @property({ type: String }) env: EmbedProps['env'] = 'prod';\n @property({ type: String }) apiKey: EmbedProps['apiKey'] = '';\n @property({ type: Boolean }) disableTracking: EmbedProps['disableTracking'] = false;\n @property({ type: String }) trackingSource: EmbedProps['trackingSource'] = 'embed';\n\n @property({ type: Array }) controls: EmbedProps['controls'];\n @property({ type: String }) preload: EmbedProps['preload'] = 'auto';\n @property({ type: Boolean }) autoplay: EmbedProps['autoplay'] = false;\n @property({ type: Number }) aspectRatio: EmbedProps['aspectRatio'] = 0;\n\n private eventController = new EventForwardController(this, [\n 'durationchange',\n 'ended',\n 'error',\n 'loadeddata',\n 'pause',\n 'stalled',\n 'play',\n 'playing',\n 'ratechange',\n 'scenechange',\n 'seeking',\n 'seeked',\n 'timeupdate',\n 'volumechange',\n 'waiting',\n\n 'video:loadeddata',\n 'video:seeking',\n 'video:seeked',\n 'video:play',\n 'video:playing',\n 'video:pause',\n 'video:stalled',\n 'video:timeupdate',\n 'video:ended',\n 'video:error'\n ]);\n private _fetcherController = new FetcherController(this);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n private _trackingController = new TrackingController(this);\n\n @state() vouch: EmbedProps['data'];\n @state() template: TemplateInstance | undefined;\n\n get fetching() {\n return this._fetcherController.fetching;\n }\n\n get waiting() {\n return this._mediaPlayerRef.value?.waiting;\n }\n\n get seeking() {\n return this._mediaPlayerRef.value?.seeking;\n }\n\n get paused() {\n return this._mediaPlayerRef.value?.paused;\n }\n\n get captions() {\n return this._mediaPlayerRef.value?.captions;\n }\n\n get fullscreen() {\n return this._mediaPlayerRef.value?.fullscreen;\n }\n\n get duration() {\n return this._mediaPlayerRef.value?.duration;\n }\n\n set currentTime(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.currentTime = value;\n }\n }\n get currentTime() {\n return this._mediaPlayerRef.value?.currentTime ?? 0;\n }\n\n set playbackRate(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.playbackRate = value;\n }\n }\n get playbackRate() {\n return this._mediaPlayerRef.value?.playbackRate ?? 1;\n }\n\n set volume(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.volume = value;\n }\n }\n get volume() {\n return this._mediaPlayerRef.value?.volume ?? 1;\n }\n\n set muted(value: boolean) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.muted = value;\n }\n }\n get muted() {\n return this._mediaPlayerRef.value?.muted ?? false;\n }\n\n get scene(): Scene | null {\n return this._mediaPlayerRef.value?.scene ?? null;\n }\n\n get scenes(): Scene[] {\n return this._mediaPlayerRef.value?.scenes ?? [];\n }\n\n get sceneConfig(): Scenes | null {\n return this._mediaPlayerRef.value?.sceneConfig ?? null;\n }\n\n get videoState() {\n return this._mediaPlayerRef.value?.videoState;\n }\n\n get mediaPlayer() {\n return this._mediaPlayerRef.value;\n }\n\n play() {\n this._mediaPlayerRef.value?.play();\n }\n\n pause() {\n this._mediaPlayerRef.value?.pause();\n }\n\n setScene(index: number) {\n this._mediaPlayerRef.value?.setScene(index);\n }\n\n render() {\n return html`\n <vmp-media-player\n ${ref(this._mediaPlayerRef)}\n ${this.eventController.register()}\n ?autoplay=${this.autoplay}\n ?loading=${this.fetching}\n .data=${this.vouch}\n .template=${this.template}\n aspectRatio=${ifDefined(this.aspectRatio)}\n preload=${ifDefined(this.preload)}\n .controls=${this.controls}\n ></vmp-media-player>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vouch-embed': Embed;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'vouch-embed': Embed;\n }\n }\n}\n\nexport { Embed };\nexport type { EmbedProps };\n"],"names":["t","e","s","o","n$5","r","n","S","c","i","h","a","l","p","d","u","f","y","b$1","_a","b","v","_","m","g","$","w","T","A","E","C","P","x","V$1","V","k","H","I","R","N","_b","S$2","M","L","R$1","H$1","Z","n$2","j","forwardEvent","type","fromElement","toElement","forwarder","event","EventForwardController","host","events","createRef","ref","fn","devVideoUrl","stagingVideoUrl","prodVideoUrl","devPublicApiUrl","stagingPublicApiUrl","prodPublicApiUrl","localEmbedApiUrl","devEmbedApiUrl","stagingEmbedApiUrl","prodEmbedApiUrl","getEnvUrls","env","FetcherController","apiKey","vouchId","embedApiUrl","cacheCheck","uuidv4","res","vouch","templateId","template","Task","data","_d","_c","questions","index","value","MINIMUM_SEND_THRESHOLD","TrackingController","visitorId","publicApiUrl","country","region","utmParams","key","param","group","payload","client","tab","request","visitor","packageJson","id","node","clientId","tabId","_f","_e","requestId","_h","_g","_j","_i","_l","_k","Embed","LitElement","html","ifDefined","__decorateClass","property","state","customElement"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,KAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,KAAE,OAAQ,GAACC,KAAE,oBAAI;AAAO,IAAAC,KAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAED,GAAE;AAAC,QAAG,KAAK,eAAa,IAAGA,MAAID;AAAE,YAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,MAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,GAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,iBAAe,YAAY,KAAK,OAAO,GAAED,KAAGE,GAAE,IAAID,GAAE,CAAC;AAAA,IAAE;AAAC,WAAO;AAAA,EAAC;AAAA,EAAC,WAAU;AAAC,W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GAAM;AAAA,GAnDHN,EAmDK,WAAA,SAAA,CAAA;AACAI,EAAA;AAAA,EAARE,GAAM;AAAA,GApDHN,EAoDK,WAAA,YAAA,CAAA;AApDLA,IAANI,EAAA;AAAA,EADCG,GAAc,aAAa;AAAA,GACtBP,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6]}
@@ -4,6 +4,7 @@ type EmbedHost = ReactiveControllerHost & Embed;
4
4
  declare class FetcherController {
5
5
  host: EmbedHost;
6
6
  private _fetching;
7
+ private _vouch;
7
8
  set fetching(value: boolean);
8
9
  get fetching(): boolean;
9
10
  private getVouch;
@@ -18,11 +18,15 @@ declare class TrackingController implements ReactiveController {
18
18
  private _getUids;
19
19
  private _getReportingMetadata;
20
20
  private _sendTrackingEvent;
21
+ private _streamEnded;
21
22
  private _handleVouchLoaded;
22
23
  private _handlePlay;
23
24
  private _handleVideoPlay;
24
25
  private _handleVideoTimeUpdate;
25
26
  private _handleVideoPause;
27
+ private _pageUnloading;
28
+ private _handleVisibilityChange;
29
+ private _handlePageHide;
26
30
  hostConnected(): void;
27
31
  hostDisconnected(): void;
28
32
  }
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import type { Scene, TemplateInstance } from '@vouchfor/canvas-video';
2
+ import type { Scene, Scenes, TemplateInstance } from '@vouchfor/canvas-video';
3
3
  import type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';
4
4
  import type { Environment } from '../../utils/env';
5
5
  type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {
@@ -9,12 +9,14 @@ type EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'a
9
9
  trackingSource?: string;
10
10
  vouchId?: string;
11
11
  templateId?: string;
12
+ questions?: number[];
12
13
  };
13
14
  declare class Embed extends LitElement {
14
15
  private _mediaPlayerRef;
15
16
  data: EmbedProps['data'];
16
17
  vouchId: EmbedProps['vouchId'];
17
18
  templateId: EmbedProps['templateId'];
19
+ questions: EmbedProps['questions'];
18
20
  env: EmbedProps['env'];
19
21
  apiKey: EmbedProps['apiKey'];
20
22
  disableTracking: EmbedProps['disableTracking'];
@@ -45,6 +47,7 @@ declare class Embed extends LitElement {
45
47
  get muted(): boolean;
46
48
  get scene(): Scene | null;
47
49
  get scenes(): Scene[];
50
+ get sceneConfig(): Scenes | null;
48
51
  get videoState(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/controllers/scenes").VideoStateMap | undefined;
49
52
  get mediaPlayer(): MediaPlayer | undefined;
50
53
  play(): void;