@sprig-technologies/sprig-browser 2.30.4 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("./core-pJaEAG0Z.cjs"),A=require("./metricsReporter-DwcQeyB8.cjs");var we,E,an,de,Ct,cn,Xe,dn,Ce={},un=[],To=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$e=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function pn(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var o,r,i,s={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?we.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ye(e,s,o,r,null)}function ye(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++an,__i:-1,__u:0};return r==null&&E.vnode!=null&&E.vnode(i),i}function mn(){return{current:null}}function W(e){return e.children}function Q(e,t){this.props=e,this.context=t}function ve(e,t){if(t==null)return e.__?ve(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ve(e):null}function hn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return hn(e)}}function et(e){(!e.__d&&(e.__d=!0)&&de.push(e)&&!Ne.__r++||Ct!==E.debounceRendering)&&((Ct=E.debounceRendering)||cn)(Ne)}function Ne(){var e,t,n,o,r,i,s,a,d;for(de.sort(Xe);e=de.shift();)e.__d&&(t=de.length,o=void 0,i=(r=(n=e).__v).__e,a=[],d=[],(s=n.__P)&&((o=ne({},r)).__v=r.__v+1,E.vnode&&E.vnode(o),at(s,o,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[i]:null,a,i??ve(r),!!(32&r.__u),d),o.__.__k[o.__i]=o,gn(a,o,d),o.__e!=i&&hn(o)),de.length>t&&de.sort(Xe));Ne.__r=0}function fn(e,t,n,o,r,i,s,a,d,c,p){var l,h,m,v,f,b=o&&o.__k||un,_=t.length;for(n.__d=d,Ro(n,t,b),d=n.__d,l=0;l<_;l++)(m=n.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?Ce:b[m.__i]||Ce,m.__i=l,at(e,m,h,r,i,s,a,d,c,p),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&ct(h.ref,null,m),p.push(m.ref,m.__c||v,m)),f==null&&v!=null&&(f=v),65536&m.__u||h.__k===m.__k?d=vn(m,d,e):typeof m.type=="function"&&m.__d!==void 0?d=m.__d:v&&(d=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=d,n.__e=f}function Ro(e,t,n){var o,r,i,s,a,d=t.length,c=n.length,p=c,l=0;for(e.__k=[],o=0;o<d;o++)(r=e.__k[o]=(r=t[o])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?ye(null,r,null,null,r):$e(r)?ye(W,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?ye(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,a=Po(r,n,s=o+l,p),r.__i=a,i=null,a!==-1&&(p--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?l++:a>s?p>d-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==o+l&&(r.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i,!1),n[o]=null,p--);if(p)for(o=0;o<c;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function vn(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=vn(o[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function oe(e,t){return t=t||[],e==null||typeof e=="boolean"||($e(e)?e.some(function(n){oe(n,t)}):t.push(e)),t}function Po(e,t,n,o){var r=e.key,i=e.type,s=n-1,a=n+1,d=t[n];if(d===null||d&&r==d.key&&i===d.type)return n;if(o>(d!=null&&!(131072&d.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((d=t[s])&&!(131072&d.__u)&&r==d.key&&i===d.type)return s;s--}if(a<t.length){if((d=t[a])&&!(131072&d.__u)&&r==d.key&&i===d.type)return a;a++}}return-1}function wt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||To.test(t)?n:n+"px"}function Re(e,t,n,o,r){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||wt(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||wt(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?St:Et,i)):e.removeEventListener(t,i?St:Et,i);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Et(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(E.event?E.event(e):e)}function St(e){return this.l[e.type+!0](E.event?E.event(e):e)}function at(e,t,n,o,r,i,s,a,d,c){var p,l,h,m,v,f,b,_,x,y,C,w,j,I,S,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[a=t.__e=n.__e]),(p=E.__b)&&p(t);e:if(typeof g=="function")try{if(_=t.props,x=(p=g.contextType)&&o[p.__c],y=p?x?x.props.value:p.__:o,n.__c?b=(l=t.__c=n.__c).__=l.__E:("prototype"in g&&g.prototype.render?t.__c=l=new g(_,y):(t.__c=l=new Q(_,y),l.constructor=g,l.render=Io),x&&x.sub(l),l.props=_,l.state||(l.state={}),l.context=y,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),g.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ne({},l.__s)),ne(l.__s,g.getDerivedStateFromProps(_,l.__s))),m=l.props,v=l.state,l.__v=t,h)g.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,y),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,y)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(k){k&&(k.__=t)}),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,y),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,v,f)})}if(l.context=y,l.props=_,l.__P=e,l.__e=!1,w=E.__r,j=0,"prototype"in g&&g.prototype.render){for(l.state=l.__s,l.__d=!1,w&&w(t),p=l.render(l.props,l.state,l.context),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);l._sb=[]}else do l.__d=!1,w&&w(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++j<25);l.state=l.__s,l.getChildContext!=null&&(o=ne(ne({},o),l.getChildContext())),h||l.getSnapshotBeforeUpdate==null||(f=l.getSnapshotBeforeUpdate(m,v)),fn(e,$e(S=p!=null&&p.type===W&&p.key==null?p.props.children:p)?S:[S],t,n,o,r,i,s,a,d,c),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),b&&(l.__E=l.__=null)}catch(k){t.__v=null,d||i!=null?(t.__e=a,t.__u|=d?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),E.__e(k,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Do(n.__e,t,n,o,r,i,s,d,c);(p=E.diffed)&&p(t)}function gn(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)ct(n[o],n[++o],n[++o]);E.__c&&E.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){E.__e(i,r.__v)}})}function Do(e,t,n,o,r,i,s,a,d){var c,p,l,h,m,v,f,b=n.props,_=t.props,x=t.type;if(x==="svg"&&(r=!0),i!=null){for(c=0;c<i.length;c++)if((m=i[c])&&"setAttribute"in m==!!x&&(x?m.localName===x:m.nodeType===3)){e=m,i[c]=null;break}}if(e==null){if(x===null)return document.createTextNode(_);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,_.is&&_),i=null,a=!1}if(x===null)b===_||a&&e.data===_||(e.data=_);else{if(i=i&&we.call(e.childNodes),b=n.props||Ce,!a&&i!=null)for(b={},c=0;c<e.attributes.length;c++)b[(m=e.attributes[c]).name]=m.value;for(c in b)m=b[c],c=="children"||(c=="dangerouslySetInnerHTML"?l=m:c==="key"||c in _||Re(e,c,null,m,r));for(c in _)m=_[c],c=="children"?h=m:c=="dangerouslySetInnerHTML"?p=m:c=="value"?v=m:c=="checked"?f=m:c==="key"||a&&typeof m!="function"||b[c]===m||Re(e,c,m,b[c],r);if(p)a||l&&(p.__html===l.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(l&&(e.innerHTML=""),fn(e,$e(h)?h:[h],t,n,o,r&&x!=="foreignObject",i,s,i?i[0]:n.__k&&ve(n,0),a,d),i!=null)for(c=i.length;c--;)i[c]!=null&&pn(i[c]);a||(c="value",v!==void 0&&(v!==e[c]||x==="progress"&&!v||x==="option"&&v!==b[c])&&Re(e,c,v,b[c],!1),c="checked",f!==void 0&&f!==e[c]&&Re(e,c,f,b[c],!1))}return e}function ct(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){E.__e(o,n)}}function tt(e,t,n){var o,r;if(E.unmount&&E.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||ct(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){E.__e(i,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&tt(o[r],t,n||typeof e.type!="function");n||e.__e==null||pn(e.__e),e.__=e.__e=e.__d=void 0}function Io(e,t,n){return this.constructor(e,n)}function ge(e,t,n){var o,r,i,s;E.__&&E.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],at(t,e=(!o&&n||t).__k=$(W,null,[e]),r||Ce,Ce,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?we.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),gn(i,e,s)}function _n(e,t){ge(e,t,_n)}function Oo(e,t,n){var o,r,i,s,a=ne({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?o=t[i]:i=="ref"?r=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?we.call(arguments,2):n),ye(e.type,a,o||e.key,r||e.ref,null)}function bn(e,t){var n={__c:t="__cC"+dn++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&r.some(function(a){a.__e=!0,et(a)})},this.sub=function(s){r.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){r.splice(r.indexOf(s),1),a&&a.call(s)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n}we=un.slice,E={__e:function(e,t,n,o){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},an=0,Q.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof e=="function"&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),et(this))},Q.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),et(this))},Q.prototype.render=W,de=[],cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xe=function(e,t){return e.__v.__b-t.__v.__b},Ne.__r=0,dn=0;var re,M,qe,jt,_e=0,xn=[],Pe=[],Tt=E.__b,Rt=E.__r,Pt=E.diffed,Dt=E.__c,It=E.unmount;function me(e,t){E.__h&&E.__h(M,e,_e||t),_e=0;var n=M.__H||(M.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Pe}),n.__[e]}function B(e){return _e=1,dt(wn,e)}function dt(e,t,n){var o=me(re++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):wn(void 0,t),function(a){var d=o.__N?o.__N[0]:o.__[0],c=o.t(d,a);d!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=M,!M.u)){var r=function(a,d,c){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,a,d,c);var l=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&o.__c.props===a)&&(!i||i.call(this,a,d,c))};M.u=!0;var i=M.shouldComponentUpdate,s=M.componentWillUpdate;M.componentWillUpdate=function(a,d,c){if(this.__e){var p=i;i=void 0,r(a,d,c),i=p}s&&s.call(this,a,d,c)},M.shouldComponentUpdate=r}return o.__N||o.__}function z(e,t){var n=me(re++,3);!E.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,M.__H.__h.push(n))}function Ee(e,t){var n=me(re++,4);!E.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,M.__h.push(n))}function ee(e){return _e=5,Se(function(){return{current:e}},[])}function yn(e,t,n){_e=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Se(e,t){var n=me(re++,7);return mt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ut(e,t){return _e=8,Se(function(){return e},t)}function kn(e){var t=M.context[e.__c],n=me(re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(M)),t.props.value):e.__}function pt(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function Lo(e){var t=me(re++,10),n=B();return t.__=e,M.componentDidCatch||(M.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function Cn(){var e=me(re++,11);if(!e.__){for(var t=M.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function No(){for(var e;e=xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(De),e.__H.__h.forEach(nt),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){M=null,Tt&&Tt(e)},E.__r=function(e){Rt&&Rt(e),re=0;var t=(M=e.__c).__H;t&&(qe===M?(t.__h=[],M.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Pe,n.__N=n.i=void 0})):(t.__h.forEach(De),t.__h.forEach(nt),t.__h=[],re=0)),qe=M},E.diffed=function(e){Pt&&Pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xn.push(t)!==1&&jt===E.requestAnimationFrame||((jt=E.requestAnimationFrame)||Ao)(No)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Pe&&(n.__=n.__V),n.i=void 0,n.__V=Pe})),qe=M=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(De),n.__h=n.__h.filter(function(o){return!o.__||nt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],E.__e(o,n.__v)}}),Dt&&Dt(e,t)},E.unmount=function(e){It&&It(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{De(o)}catch(r){t=r}}),n.__H=void 0,t&&E.__e(t,n.__v))};var Ot=typeof requestAnimationFrame=="function";function Ao(e){var t,n=function(){clearTimeout(o),Ot&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Ot&&(t=requestAnimationFrame(n))}function De(e){var t=M,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),M=t}function nt(e){var t=M;e.__c=e.__(),M=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function wn(e,t){return typeof t=="function"?t(e):t}function En(e,t){for(var n in t)e[n]=t[n];return e}function ot(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ae(e){this.props=e}function Sn(e,t){function n(r){var i=this.props.ref,s=i==r.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!s:ot(this.props,r)}function o(r){return this.shouldComponentUpdate=n,$(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Ae.prototype=new Q).isPureReactComponent=!0,Ae.prototype.shouldComponentUpdate=function(e,t){return ot(this.props,e)||ot(this.state,t)};var Lt=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Lt&&Lt(e)};var Mo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function jn(e){function t(n){var o=En({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Mo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Nt=function(e,t){return e==null?null:oe(oe(e).map(t))},Tn={map:Nt,forEach:Nt,count:function(e){return e?oe(e).length:0},only:function(e){var t=oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:oe},$o=E.__e;E.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}$o(e,t,n,o)};var At=E.unmount;function Rn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=En({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Rn(o,t,n)})),e}function Pn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Pn(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ke(){this.__u=0,this.t=null,this.__b=null}function Dn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function In(e){var t,n,o;function r(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){o=s}),o)throw o;if(!n)throw t;return $(n,i)}return r.displayName="Lazy",r.__f=!0,r}function fe(){this.u=null,this.o=null}E.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),At&&At(e)},(ke.prototype=new Q).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=Dn(o.__v),i=!1,s=function(){i||(i=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=Pn(d,d.__c.__P,d.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},ke.prototype.componentWillUnmount=function(){this.t=[]},ke.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Rn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&$(W,null,e.fallback);return r&&(r.__u&=-33),[$(W,null,t.__a?null:e.children),r]};var Mt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Uo(e){return this.getChildContext=function(){return e.context},e.children}function Ho(e){var t=this,n=e.i;t.componentWillUnmount=function(){ge(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),ge($(Uo,{context:t.context},e.__v),t.l)}function On(e,t){var n=$(Ho,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new Q).__a=function(e){var t=this,n=Dn(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),Mt(t,e,o)):r()};n?n(i):i()}},fe.prototype.render=function(e){this.u=null,this.o=new Map;var t=oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Mt(e,n,t)})};var Ln=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Bo=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Vo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fo=/[A-Z0-9]/g,zo=typeof document<"u",qo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nn(e,t,n){return t.__k==null&&(t.textContent=""),ge(e,t),typeof n=="function"&&n(),e?e.__c:null}function An(e,t,n){return _n(e,t),typeof n=="function"&&n(),e?e.__c:null}Q.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Q.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=E.event;function Wo(){}function Zo(){return this.cancelBubble}function Go(){return this.defaultPrevented}E.event=function(e){return $t&&(e=$t(e)),e.persist=Wo,e.isPropagationStopped=Zo,e.isDefaultPrevented=Go,e.nativeEvent=e};var ht,Yo={enumerable:!1,configurable:!0,get:function(){return this.class}},Ut=E.vnode;E.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||zo&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||o!=="input"&&o!=="textarea"||qo(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Vo.test(i)?i=a:o.indexOf("-")===-1&&Bo.test(i)?i=i.replace(Fo,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&r[i=a]&&(i="oninputCapture"),r[i]=s}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.value.indexOf(d.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.multiple?r.defaultValue.indexOf(d.props.value)!=-1:r.defaultValue==d.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Yo)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=Ln,Ut&&Ut(e)};var Ht=E.__r;E.__r=function(e){Ht&&Ht(e),ht=e.__c};var Bt=E.diffed;E.diffed=function(e){Bt&&Bt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ht=null};var Mn={ReactCurrentDispatcher:{current:{readContext:function(e){return ht.__n[e.__c].props.value}}}},Qo="17.0.2";function $n(e){return $.bind(null,e)}function je(e){return!!e&&e.$$typeof===Ln}function Un(e){return je(e)&&e.type===W}function Hn(e){return je(e)?Oo.apply(null,arguments):e}function Bn(e){return!!e.__k&&(ge(null,e),!0)}function Vn(e){return e&&(e.base||e.nodeType===1&&e)||null}var Fn=function(e,t){return e(t)},zn=function(e,t){return e(t)},qn=W;function ft(e){e()}function Wn(e){return e}function Zn(){return[!1,ft]}var Gn=Ee,Yn=je;function Qn(e,t){var n=t(),o=B({h:{__:n,v:t}}),r=o[0].h,i=o[1];return Ee(function(){r.__=n,r.v=t,We(r)&&i({h:r})},[e,n,t]),z(function(){return We(r)&&i({h:r}),e(function(){We(r)&&i({h:r})})},[e]),n}function We(e){var t,n,o=e.v,r=e.__;try{var i=o();return!((t=r)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Ko={useState:B,useId:Cn,useReducer:dt,useEffect:z,useLayoutEffect:Ee,useInsertionEffect:Gn,useTransition:Zn,useDeferredValue:Wn,useSyncExternalStore:Qn,startTransition:ft,useRef:ee,useImperativeHandle:yn,useMemo:Se,useCallback:ut,useContext:kn,useDebugValue:pt,version:"17.0.2",Children:Tn,render:Nn,hydrate:An,unmountComponentAtNode:Bn,createPortal:On,createElement:$,createContext:bn,createFactory:$n,cloneElement:Hn,createRef:mn,Fragment:W,isValidElement:je,isElement:Yn,isFragment:Un,findDOMNode:Vn,Component:Q,PureComponent:Ae,memo:Sn,forwardRef:jn,flushSync:zn,unstable_batchedUpdates:Fn,StrictMode:qn,Suspense:ke,SuspenseList:fe,lazy:In,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn};const Jo=Object.freeze(Object.defineProperty({__proto__:null,Children:Tn,Component:Q,Fragment:W,PureComponent:Ae,StrictMode:qn,Suspense:ke,SuspenseList:fe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn,cloneElement:Hn,createContext:bn,createElement:$,createFactory:$n,createPortal:On,createRef:mn,default:Ko,findDOMNode:Vn,flushSync:zn,forwardRef:jn,hydrate:An,isElement:Yn,isFragment:Un,isValidElement:je,lazy:In,memo:Sn,render:Nn,startTransition:ft,unmountComponentAtNode:Bn,unstable_batchedUpdates:Fn,useCallback:ut,useContext:kn,useDebugValue:pt,useDeferredValue:Wn,useEffect:z,useErrorBoundary:Lo,useId:Cn,useImperativeHandle:yn,useInsertionEffect:Gn,useLayoutEffect:Ee,useMemo:Se,useReducer:dt,useRef:ee,useState:B,useSyncExternalStore:Qn,useTransition:Zn,version:Qo},Symbol.toStringTag,{value:"Module"})),Vt=e=>{let t;const n=new Set,o=(d,c)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const l=t;t=c??typeof p!="object"?p:Object.assign({},t,p),n.forEach(h=>h(t,l))}},r=()=>t,a={setState:o,getState:r,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>n.clear()};return t=e(o,r,a),a},Xo=e=>e?Vt(e):Vt;function er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var Kn={exports:{}},Jn={};const Xn=tr(Jo);var eo={exports:{}},to={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("./core-rfFWMlyt.cjs"),A=require("./metricsReporter-D8MMZt8T.cjs");var we,E,an,de,Ct,cn,Xe,dn,Ce={},un=[],To=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$e=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function pn(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var o,r,i,s={};for(i in t)i=="key"?o=t[i]:i=="ref"?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?we.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ye(e,s,o,r,null)}function ye(e,t,n,o,r){var i={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r??++an,__i:-1,__u:0};return r==null&&E.vnode!=null&&E.vnode(i),i}function mn(){return{current:null}}function W(e){return e.children}function Q(e,t){this.props=e,this.context=t}function ve(e,t){if(t==null)return e.__?ve(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ve(e):null}function hn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return hn(e)}}function et(e){(!e.__d&&(e.__d=!0)&&de.push(e)&&!Ne.__r++||Ct!==E.debounceRendering)&&((Ct=E.debounceRendering)||cn)(Ne)}function Ne(){var e,t,n,o,r,i,s,a,d;for(de.sort(Xe);e=de.shift();)e.__d&&(t=de.length,o=void 0,i=(r=(n=e).__v).__e,a=[],d=[],(s=n.__P)&&((o=ne({},r)).__v=r.__v+1,E.vnode&&E.vnode(o),at(s,o,r,n.__n,s.ownerSVGElement!==void 0,32&r.__u?[i]:null,a,i??ve(r),!!(32&r.__u),d),o.__.__k[o.__i]=o,gn(a,o,d),o.__e!=i&&hn(o)),de.length>t&&de.sort(Xe));Ne.__r=0}function fn(e,t,n,o,r,i,s,a,d,c,p){var l,h,m,v,f,b=o&&o.__k||un,_=t.length;for(n.__d=d,Ro(n,t,b),d=n.__d,l=0;l<_;l++)(m=n.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?Ce:b[m.__i]||Ce,m.__i=l,at(e,m,h,r,i,s,a,d,c,p),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&ct(h.ref,null,m),p.push(m.ref,m.__c||v,m)),f==null&&v!=null&&(f=v),65536&m.__u||h.__k===m.__k?d=vn(m,d,e):typeof m.type=="function"&&m.__d!==void 0?d=m.__d:v&&(d=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=d,n.__e=f}function Ro(e,t,n){var o,r,i,s,a,d=t.length,c=n.length,p=c,l=0;for(e.__k=[],o=0;o<d;o++)(r=e.__k[o]=(r=t[o])==null||typeof r=="boolean"||typeof r=="function"?null:typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?ye(null,r,null,null,r):$e(r)?ye(W,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?ye(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)!=null?(r.__=e,r.__b=e.__b+1,a=Po(r,n,s=o+l,p),r.__i=a,i=null,a!==-1&&(p--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?l++:a>s?p>d-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==o+l&&(r.__u|=65536))):(i=n[o])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i,!1),n[o]=null,p--);if(p)for(o=0;o<c;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function vn(e,t,n){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=vn(o[r],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function oe(e,t){return t=t||[],e==null||typeof e=="boolean"||($e(e)?e.some(function(n){oe(n,t)}):t.push(e)),t}function Po(e,t,n,o){var r=e.key,i=e.type,s=n-1,a=n+1,d=t[n];if(d===null||d&&r==d.key&&i===d.type)return n;if(o>(d!=null&&!(131072&d.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((d=t[s])&&!(131072&d.__u)&&r==d.key&&i===d.type)return s;s--}if(a<t.length){if((d=t[a])&&!(131072&d.__u)&&r==d.key&&i===d.type)return a;a++}}return-1}function wt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||To.test(t)?n:n+"px"}function Re(e,t,n,o,r){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||wt(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||wt(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n.u=o.u:(n.u=Date.now(),e.addEventListener(t,i?St:Et,i)):e.removeEventListener(t,i?St:Et,i);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Et(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(E.event?E.event(e):e)}function St(e){return this.l[e.type+!0](E.event?E.event(e):e)}function at(e,t,n,o,r,i,s,a,d,c){var p,l,h,m,v,f,b,_,x,y,C,w,j,I,S,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[a=t.__e=n.__e]),(p=E.__b)&&p(t);e:if(typeof g=="function")try{if(_=t.props,x=(p=g.contextType)&&o[p.__c],y=p?x?x.props.value:p.__:o,n.__c?b=(l=t.__c=n.__c).__=l.__E:("prototype"in g&&g.prototype.render?t.__c=l=new g(_,y):(t.__c=l=new Q(_,y),l.constructor=g,l.render=Io),x&&x.sub(l),l.props=_,l.state||(l.state={}),l.context=y,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),g.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ne({},l.__s)),ne(l.__s,g.getDerivedStateFromProps(_,l.__s))),m=l.props,v=l.state,l.__v=t,h)g.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,y),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,y)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(k){k&&(k.__=t)}),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,y),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,v,f)})}if(l.context=y,l.props=_,l.__P=e,l.__e=!1,w=E.__r,j=0,"prototype"in g&&g.prototype.render){for(l.state=l.__s,l.__d=!1,w&&w(t),p=l.render(l.props,l.state,l.context),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);l._sb=[]}else do l.__d=!1,w&&w(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++j<25);l.state=l.__s,l.getChildContext!=null&&(o=ne(ne({},o),l.getChildContext())),h||l.getSnapshotBeforeUpdate==null||(f=l.getSnapshotBeforeUpdate(m,v)),fn(e,$e(S=p!=null&&p.type===W&&p.key==null?p.props.children:p)?S:[S],t,n,o,r,i,s,a,d,c),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),b&&(l.__E=l.__=null)}catch(k){t.__v=null,d||i!=null?(t.__e=a,t.__u|=d?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),E.__e(k,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Do(n.__e,t,n,o,r,i,s,d,c);(p=E.diffed)&&p(t)}function gn(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)ct(n[o],n[++o],n[++o]);E.__c&&E.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){E.__e(i,r.__v)}})}function Do(e,t,n,o,r,i,s,a,d){var c,p,l,h,m,v,f,b=n.props,_=t.props,x=t.type;if(x==="svg"&&(r=!0),i!=null){for(c=0;c<i.length;c++)if((m=i[c])&&"setAttribute"in m==!!x&&(x?m.localName===x:m.nodeType===3)){e=m,i[c]=null;break}}if(e==null){if(x===null)return document.createTextNode(_);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,_.is&&_),i=null,a=!1}if(x===null)b===_||a&&e.data===_||(e.data=_);else{if(i=i&&we.call(e.childNodes),b=n.props||Ce,!a&&i!=null)for(b={},c=0;c<e.attributes.length;c++)b[(m=e.attributes[c]).name]=m.value;for(c in b)m=b[c],c=="children"||(c=="dangerouslySetInnerHTML"?l=m:c==="key"||c in _||Re(e,c,null,m,r));for(c in _)m=_[c],c=="children"?h=m:c=="dangerouslySetInnerHTML"?p=m:c=="value"?v=m:c=="checked"?f=m:c==="key"||a&&typeof m!="function"||b[c]===m||Re(e,c,m,b[c],r);if(p)a||l&&(p.__html===l.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(l&&(e.innerHTML=""),fn(e,$e(h)?h:[h],t,n,o,r&&x!=="foreignObject",i,s,i?i[0]:n.__k&&ve(n,0),a,d),i!=null)for(c=i.length;c--;)i[c]!=null&&pn(i[c]);a||(c="value",v!==void 0&&(v!==e[c]||x==="progress"&&!v||x==="option"&&v!==b[c])&&Re(e,c,v,b[c],!1),c="checked",f!==void 0&&f!==e[c]&&Re(e,c,f,b[c],!1))}return e}function ct(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){E.__e(o,n)}}function tt(e,t,n){var o,r;if(E.unmount&&E.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||ct(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(i){E.__e(i,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&tt(o[r],t,n||typeof e.type!="function");n||e.__e==null||pn(e.__e),e.__=e.__e=e.__d=void 0}function Io(e,t,n){return this.constructor(e,n)}function ge(e,t,n){var o,r,i,s;E.__&&E.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],at(t,e=(!o&&n||t).__k=$(W,null,[e]),r||Ce,Ce,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?we.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),gn(i,e,s)}function _n(e,t){ge(e,t,_n)}function Oo(e,t,n){var o,r,i,s,a=ne({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?o=t[i]:i=="ref"?r=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?we.call(arguments,2):n),ye(e.type,a,o||e.key,r||e.ref,null)}function bn(e,t){var n={__c:t="__cC"+dn++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&r.some(function(a){a.__e=!0,et(a)})},this.sub=function(s){r.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){r.splice(r.indexOf(s),1),a&&a.call(s)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n}we=un.slice,E={__e:function(e,t,n,o){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&i.getDerivedStateFromError!=null&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},an=0,Q.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof e=="function"&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),et(this))},Q.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),et(this))},Q.prototype.render=W,de=[],cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xe=function(e,t){return e.__v.__b-t.__v.__b},Ne.__r=0,dn=0;var re,M,qe,jt,_e=0,xn=[],Pe=[],Tt=E.__b,Rt=E.__r,Pt=E.diffed,Dt=E.__c,It=E.unmount;function me(e,t){E.__h&&E.__h(M,e,_e||t),_e=0;var n=M.__H||(M.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Pe}),n.__[e]}function B(e){return _e=1,dt(wn,e)}function dt(e,t,n){var o=me(re++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):wn(void 0,t),function(a){var d=o.__N?o.__N[0]:o.__[0],c=o.t(d,a);d!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=M,!M.u)){var r=function(a,d,c){if(!o.__c.__H)return!0;var p=o.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,a,d,c);var l=!1;return p.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&o.__c.props===a)&&(!i||i.call(this,a,d,c))};M.u=!0;var i=M.shouldComponentUpdate,s=M.componentWillUpdate;M.componentWillUpdate=function(a,d,c){if(this.__e){var p=i;i=void 0,r(a,d,c),i=p}s&&s.call(this,a,d,c)},M.shouldComponentUpdate=r}return o.__N||o.__}function z(e,t){var n=me(re++,3);!E.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,M.__H.__h.push(n))}function Ee(e,t){var n=me(re++,4);!E.__s&&mt(n.__H,t)&&(n.__=e,n.i=t,M.__h.push(n))}function ee(e){return _e=5,Se(function(){return{current:e}},[])}function yn(e,t,n){_e=6,Ee(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Se(e,t){var n=me(re++,7);return mt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ut(e,t){return _e=8,Se(function(){return e},t)}function kn(e){var t=M.context[e.__c],n=me(re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(M)),t.props.value):e.__}function pt(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function Lo(e){var t=me(re++,10),n=B();return t.__=e,M.componentDidCatch||(M.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function Cn(){var e=me(re++,11);if(!e.__){for(var t=M.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function No(){for(var e;e=xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(De),e.__H.__h.forEach(nt),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){M=null,Tt&&Tt(e)},E.__r=function(e){Rt&&Rt(e),re=0;var t=(M=e.__c).__H;t&&(qe===M?(t.__h=[],M.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Pe,n.__N=n.i=void 0})):(t.__h.forEach(De),t.__h.forEach(nt),t.__h=[],re=0)),qe=M},E.diffed=function(e){Pt&&Pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xn.push(t)!==1&&jt===E.requestAnimationFrame||((jt=E.requestAnimationFrame)||Ao)(No)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Pe&&(n.__=n.__V),n.i=void 0,n.__V=Pe})),qe=M=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(De),n.__h=n.__h.filter(function(o){return!o.__||nt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],E.__e(o,n.__v)}}),Dt&&Dt(e,t)},E.unmount=function(e){It&&It(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{De(o)}catch(r){t=r}}),n.__H=void 0,t&&E.__e(t,n.__v))};var Ot=typeof requestAnimationFrame=="function";function Ao(e){var t,n=function(){clearTimeout(o),Ot&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Ot&&(t=requestAnimationFrame(n))}function De(e){var t=M,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),M=t}function nt(e){var t=M;e.__c=e.__(),M=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function wn(e,t){return typeof t=="function"?t(e):t}function En(e,t){for(var n in t)e[n]=t[n];return e}function ot(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Ae(e){this.props=e}function Sn(e,t){function n(r){var i=this.props.ref,s=i==r.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!s:ot(this.props,r)}function o(r){return this.shouldComponentUpdate=n,$(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Ae.prototype=new Q).isPureReactComponent=!0,Ae.prototype.shouldComponentUpdate=function(e,t){return ot(this.props,e)||ot(this.state,t)};var Lt=E.__b;E.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Lt&&Lt(e)};var Mo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function jn(e){function t(n){var o=En({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Mo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Nt=function(e,t){return e==null?null:oe(oe(e).map(t))},Tn={map:Nt,forEach:Nt,count:function(e){return e?oe(e).length:0},only:function(e){var t=oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:oe},$o=E.__e;E.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}$o(e,t,n,o)};var At=E.unmount;function Rn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=En({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Rn(o,t,n)})),e}function Pn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Pn(o,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ke(){this.__u=0,this.t=null,this.__b=null}function Dn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function In(e){var t,n,o;function r(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){o=s}),o)throw o;if(!n)throw t;return $(n,i)}return r.displayName="Lazy",r.__f=!0,r}function fe(){this.u=null,this.o=null}E.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),At&&At(e)},(ke.prototype=new Q).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=Dn(o.__v),i=!1,s=function(){i||(i=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(!--o.__u){if(o.state.__a){var d=o.state.__a;o.__v.__k[0]=Pn(d,d.__c.__P,d.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},ke.prototype.componentWillUnmount=function(){this.t=[]},ke.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Rn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&$(W,null,e.fallback);return r&&(r.__u&=-33),[$(W,null,t.__a?null:e.children),r]};var Mt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Uo(e){return this.getChildContext=function(){return e.context},e.children}function Ho(e){var t=this,n=e.i;t.componentWillUnmount=function(){ge(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,r){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),ge($(Uo,{context:t.context},e.__v),t.l)}function On(e,t){var n=$(Ho,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new Q).__a=function(e){var t=this,n=Dn(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),Mt(t,e,o)):r()};n?n(i):i()}},fe.prototype.render=function(e){this.u=null,this.o=new Map;var t=oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},fe.prototype.componentDidUpdate=fe.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Mt(e,n,t)})};var Ln=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Bo=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Vo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fo=/[A-Z0-9]/g,zo=typeof document<"u",qo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Nn(e,t,n){return t.__k==null&&(t.textContent=""),ge(e,t),typeof n=="function"&&n(),e?e.__c:null}function An(e,t,n){return _n(e,t),typeof n=="function"&&n(),e?e.__c:null}Q.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Q.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $t=E.event;function Wo(){}function Zo(){return this.cancelBubble}function Go(){return this.defaultPrevented}E.event=function(e){return $t&&(e=$t(e)),e.persist=Wo,e.isPropagationStopped=Zo,e.isDefaultPrevented=Go,e.nativeEvent=e};var ht,Yo={enumerable:!1,configurable:!0,get:function(){return this.class}},Ut=E.vnode;E.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,o=t.type,r={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||zo&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||o!=="input"&&o!=="textarea"||qo(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Vo.test(i)?i=a:o.indexOf("-")===-1&&Bo.test(i)?i=i.replace(Fo,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&r[i=a]&&(i="oninputCapture"),r[i]=s}}o=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.value.indexOf(d.props.value)!=-1})),o=="select"&&r.defaultValue!=null&&(r.value=oe(n.children).forEach(function(d){d.props.selected=r.multiple?r.defaultValue.indexOf(d.props.value)!=-1:r.defaultValue==d.props.value})),n.class&&!n.className?(r.class=n.class,Object.defineProperty(r,"className",Yo)):(n.className&&!n.class||n.class&&n.className)&&(r.class=r.className=n.className),t.props=r}(e),e.$$typeof=Ln,Ut&&Ut(e)};var Ht=E.__r;E.__r=function(e){Ht&&Ht(e),ht=e.__c};var Bt=E.diffed;E.diffed=function(e){Bt&&Bt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),ht=null};var Mn={ReactCurrentDispatcher:{current:{readContext:function(e){return ht.__n[e.__c].props.value}}}},Qo="17.0.2";function $n(e){return $.bind(null,e)}function je(e){return!!e&&e.$$typeof===Ln}function Un(e){return je(e)&&e.type===W}function Hn(e){return je(e)?Oo.apply(null,arguments):e}function Bn(e){return!!e.__k&&(ge(null,e),!0)}function Vn(e){return e&&(e.base||e.nodeType===1&&e)||null}var Fn=function(e,t){return e(t)},zn=function(e,t){return e(t)},qn=W;function ft(e){e()}function Wn(e){return e}function Zn(){return[!1,ft]}var Gn=Ee,Yn=je;function Qn(e,t){var n=t(),o=B({h:{__:n,v:t}}),r=o[0].h,i=o[1];return Ee(function(){r.__=n,r.v=t,We(r)&&i({h:r})},[e,n,t]),z(function(){return We(r)&&i({h:r}),e(function(){We(r)&&i({h:r})})},[e]),n}function We(e){var t,n,o=e.v,r=e.__;try{var i=o();return!((t=r)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Ko={useState:B,useId:Cn,useReducer:dt,useEffect:z,useLayoutEffect:Ee,useInsertionEffect:Gn,useTransition:Zn,useDeferredValue:Wn,useSyncExternalStore:Qn,startTransition:ft,useRef:ee,useImperativeHandle:yn,useMemo:Se,useCallback:ut,useContext:kn,useDebugValue:pt,version:"17.0.2",Children:Tn,render:Nn,hydrate:An,unmountComponentAtNode:Bn,createPortal:On,createElement:$,createContext:bn,createFactory:$n,cloneElement:Hn,createRef:mn,Fragment:W,isValidElement:je,isElement:Yn,isFragment:Un,findDOMNode:Vn,Component:Q,PureComponent:Ae,memo:Sn,forwardRef:jn,flushSync:zn,unstable_batchedUpdates:Fn,StrictMode:qn,Suspense:ke,SuspenseList:fe,lazy:In,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn};const Jo=Object.freeze(Object.defineProperty({__proto__:null,Children:Tn,Component:Q,Fragment:W,PureComponent:Ae,StrictMode:qn,Suspense:ke,SuspenseList:fe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn,cloneElement:Hn,createContext:bn,createElement:$,createFactory:$n,createPortal:On,createRef:mn,default:Ko,findDOMNode:Vn,flushSync:zn,forwardRef:jn,hydrate:An,isElement:Yn,isFragment:Un,isValidElement:je,lazy:In,memo:Sn,render:Nn,startTransition:ft,unmountComponentAtNode:Bn,unstable_batchedUpdates:Fn,useCallback:ut,useContext:kn,useDebugValue:pt,useDeferredValue:Wn,useEffect:z,useErrorBoundary:Lo,useId:Cn,useImperativeHandle:yn,useInsertionEffect:Gn,useLayoutEffect:Ee,useMemo:Se,useReducer:dt,useRef:ee,useState:B,useSyncExternalStore:Qn,useTransition:Zn,version:Qo},Symbol.toStringTag,{value:"Module"})),Vt=e=>{let t;const n=new Set,o=(d,c)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const l=t;t=c??typeof p!="object"?p:Object.assign({},t,p),n.forEach(h=>h(t,l))}},r=()=>t,a={setState:o,getState:r,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>n.clear()};return t=e(o,r,a),a},Xo=e=>e?Vt(e):Vt;function er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}),n}var Kn={exports:{}},Jn={};const Xn=tr(Jo);var eo={exports:{}},to={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.min.js
4
4
  *
@@ -682,4 +682,4 @@ span.ul-button-text {
682
682
  .vjs-poster {
683
683
  background-size: cover;
684
684
  }
685
- `,mi=e=>{const t=P.document.createElement("div");return t.className="ul-video-player-loading",t.id=yt(e),["first","second","third","fourth"].map(n=>{const o=P.document.createElement("div");o.className=n,t.appendChild(o)}),t},yt=e=>e+"-loading-spiner",F="hidden",Jt=".m3u8",Ye="questionId",Qe="ul-video-recorder-camera-off-button",Ke="ul-recording-in-session",hi=[{type:"link",content:`${ue}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${ue}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${ue}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${ue}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${ue}/userleap-web-upchunk-v2.2.2.js`}],vo=[{type:"link",content:`${ue}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${ue}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:pi}],go="-video-player",_o="-secondary-video-player",bo="-video-recorder";let J,Xt;const le=async({event:e,apiBase:t,headers:n,visitorId:o,envId:r,metadata:i})=>{const s=P.document.documentElement;if(!o||!r)return;const a={event:`SDK - ${e}`,visitorId:o,environmentId:r,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${o}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},te=async(e,t,n,o,r,i)=>{le({event:`Video Error ${t}`,apiBase:n,headers:o,visitorId:r,envId:i,metadata:{errorMessage:e.message}});const s=P.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},d={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:r,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...o,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},fi=(e,{type:t,content:n})=>new Promise(function(o,r){let i;t==="script"?(i=P.document.createElement("script"),i.src=n):t==="link"?(i=P.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=P.document.createElement("style"),i.innerHTML=n),i.onload=function(){o(n)},i.onerror=function(){r(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)}),xo=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,o)=>(n.push(fi(P.document.head,o)),n),[])).then(()=>{P.videojs=P.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},en=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=F;else if(t==="success")e.style.visibility=F,e.innerHTML="Upload succeeded!";else{const o=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${o}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${o}%, #FCFCFD ${o}%, #FCFCFD 100%)`}},Je=(e,t)=>{const n=P.videojs(e.id());return n==null?void 0:n.payload[t]},vi=(e,t,n,o,r)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:d}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(N.ERROR,{type:N.PERMISSION_DENIED}),le({event:"Video Permission Denied",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})):(n&&n(N.ERROR,{type:N.OTHER}),te(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,r,a,d))}),e.on("error",function(c,p){te(p||e.error(),"recorderError",t,r,a,d)}),e.on("startRecord",function(c,p){o(e.uploadProgressLabel,"none"),le({event:"Video Record Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})}),e.on("finishRecord",async function(){o(e.uploadProgressLabel,"start",0);const c=Je(e,Ye);if(!i){const f="internal error: missing fields in payload";return n&&n(N.ERROR,{type:N.OTHER}),te(new Error(f),"finishRecord",t,r,a,d),null}e.record().stopDevice();const p=e.cameraOff?N.MEDIA_TYPE_AUDIO:N.MEDIA_TYPE_VIDEO,l=A.v4();le({event:"Video Record Finish",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:p,mediaRecordingUid:l};c&&(h.questionId=c),s&&(h.responseGroupUid=s),a&&(h.visitorId=a);const v=await(async()=>{const f=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(f.ok){const b=await f.json();return n&&n(N.UPLOAD_STARTED,{[N.UPLOAD_ID]:b.upload.id,[N.MEDIA_TYPE]:p,[N.MEDIA_RECORDING_UID]:l}),b.upload.url}else return n&&n(N.ERROR,{type:N.OTHER,response:f}),te(new Error("failed to get upload response with url"),"finishRecord",t,r,a,d),null})();v&&(J=P.document.defaultView.UpChunk.createUpload({endpoint:v,file:new P.document.defaultView.File([e.recordedData],`recording ${p} ${Date.now()}`),chunkSize:5120}),J.startTime=Date.now(),le({event:"Video Upload Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:v}}),J.on("error",f=>{o(e.uploadProgressLabel,"none"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),te(f,"finishRecord",t,r,a,d)}),J.on("progress",f=>{n&&n(N.UPLOAD_PROGRESS,{[N.MEDIA_RECORDING_UID]:l,[N.UPLOAD_PROGRESS_PCT]:f.detail}),o(e.uploadProgressLabel,"progress",f.detail)}),J.on("success",()=>{o(e.uploadProgressLabel,"success"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),le({event:"Video Upload Success",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:v,elapsedMs:J.startTime&&Date.now()-J.startTime}})}))})},yo=(e,t)=>{const n=new(P.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(o=>{n.addChild(o)}),gi(n),n},gi=e=>{e.children().forEach(t=>{if(Y[t.name_]){const n=Oe(Y[t.name_],`ul-${Y[t.name_]}`);t.el_.appendChild(n)}})},Oe=(e,t="")=>{const n=P.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},ko=(e,t,n,o,r=!1,i)=>{e.addClass("ul-video-player");const s=new(P.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(P.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Ei(n.src):null;n&&(r||!a)?(e.children()[0].classList.add("vjs-hidden"),P.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),P.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!r&&n&&!a&&xi(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),o&&o(e)},_i=(e,t,n)=>{e.addClass(`ul${_o}`);const o=new(P.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(o),n&&n(e)},bi=(e,t,n,o,r,i,s,a=!1)=>{Xt=Date.now();const c=Me(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!c)return;c.payload=n;const{surveyId:p,questionId:l,responseGroupUid:h,visitorId:m,envId:v}=n;let f;const b=D=>{const R=Qe,O=Qe+"-audio-only";en(c.uploadProgressLabel,"none"),J&&J.startTime>=Xt&&J.abort();const G=P.document.getElementById("ul-camera-button");D?(c.children()[0].classList.add("vjs-hidden"),C.removeClass(R),C.addClass(O),G.innerHTML=Y.TurnOnCamera,c.audioPlayerPlaceholder.removeClass("vjs-hidden"),f==null||f.getTracks().forEach(q=>{q.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(q=>{f=q,q.getVideoTracks().forEach(Fe=>{Fe.enabled=!1}),c.record().onDeviceReady(q)}).catch(c.record().onDeviceError.bind(c.record()))):(f==null||f.getVideoTracks().forEach(q=>{q.enabled=!0}),c.children()[0].classList.remove("vjs-hidden"),c.record().getDevice(),C.removeClass(O),C.addClass(R),G.innerHTML=Y.TurnOffCamera,c.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{_.hasClass(F)||(le({event:"Video Delete Button Clicked",apiBase:o,headers:s,visitorId:m,envId:v,metadata:{questionId:l,responseGroupUid:h,surveyId:p}}),b(c.cameraOff),r(N.DELETE,{}),C.removeClass(F),_.addClass(F))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Oe(Y.DeleteButton,"ul-delete-button"));const x=P.document.getElementById(t),y=()=>{x.classList.contains("vjs-fullscreen")&&c.cameraOff?x.style.display="table":x.style.display="flex"};y();const C=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{c.record().isRecording()||(c.cameraOff=!c.cameraOff,le({event:"Video Camera Button Clicked",apiBase:o,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:l,responseGroupUid:h,surveyId:p,cameraOff:c.cameraOff}}),b(c.cameraOff),!_.hasClass(F)&&_.addClass(F),r(N.DELETE,{}),y())}});C.addClass(Qe),C.el_.appendChild(Oe(Y.TurnOffCamera,"ul-camera-button"));const w=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{const D=P.document.getElementById("ul-recorder-toggle");if(c.record().isRecording())c.record().stop(),D&&(D.innerHTML=Y.RecordButton),w.removeClass(Ke),_.removeClass(F);else{const R=P.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),D&&(D.innerHTML=Y.RecordButton),b(c.cameraOff),r(N.DELETE,{}),C.removeClass(F),_.addClass(F),w.removeClass(Ke),S.show();else{w.addClass(Ke),S.hide(),C.addClass(F),_.addClass(F),D&&(D.innerHTML=Y.StopButton);const O=P.document.createElement("div");O.id="ul-recording-countdown-screen",x.insertBefore(O,x.children[1]),O.style.height=`${x.offsetHeight}px`,Co(c,3)}}}});w.addClass("ul-video-recorder-toggle-button"),w.el_.appendChild(Oe(Y.RecordButton,"ul-recorder-toggle"));const j=P.document.createElement("p");j.style.visibility="hidden",j.className="ul-upload-progress-label",e.appendChild(j),c.uploadProgressLabel=j;const I=yo(c,[_,C,"PlayToggle",w,"FullscreenToggle"]),S=I.children().find(D=>D.name_==="FullscreenToggle");S.hasClass("vjs-disabled")&&S.hide();const g=I.children().find(D=>D.name_==="PlayToggle");g.hide(),_.addClass(F),ko(c,I,i,!1,a),c.on("stopRecord",()=>{w.hide(),g.show(),S.show(),_.removeClass(F)}),c.on("deviceReady",()=>{w.show(),g.hide(),_.addClass(F)}),vi(c,o,r,en,s);const k=[{name:"microphone"}];!c.cameraOff&&k.push({name:"camera"}),Promise.all(k.map(D=>{var R;return(R=navigator==null?void 0:navigator.permissions)==null?void 0:R.query(D)})).then(D=>{D.reduce((O,G)=>O&G.state==="granted",!0)&&c&&(c.deviceButton&&c.deviceButton.hide(),c.record().getDevice())}).catch(D=>{})},Co=(e,t=3)=>{const n=P.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{Co(e,t-1)},1e3))},wo=e=>{const t=P.document.createElement("div");return t.className="ul-video-container",t.appendChild(mi(e)),t},lt=(e,t)=>{const n=P.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const o=P.document.createElement("p");o.className="vjs-no-js",o.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const r=P.document.createElement("a");return r.href="https://videojs.com/html5-video-support/",r.target="_blank",r.innerHTML="supports HTML5 video",o.appendChild(r),n.appendChild(o),t.appendChild(n),t},xi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),P.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Me=(e,t)=>P.document.getElementById(e)?t?P.videojs(e,t):P.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),yi=(e,t,n,o=!1,r="https://api.sprig.com",i=document,s=null,a=null)=>{P.document=i;const d=e+go,c=wo(d);return P.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",r,{})}),xo(vo,()=>{P.document.getElementById(yt(d)).remove(),lt(d,c);const p={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const l=e+_o;lt(l,c);const h=Me(d,p),m=Me(l,{muted:!0,...p});if(!h||!m)return;_i(m,s,a),s||m.addClass(F);const v=yo(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=v.children().find(b=>b.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),ko(h,v,t,n,o,m)}catch(l){te(new Error(`Error when creating video player object ${l}`),"playerDeviceError",r,{});return}}),c},ki=(e,t={},n="https://api.userleap.com",o,r,i,s=!1,a=document)=>{P.document=a;const d=e+bo,c=wo(d);return P.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),xo(vo.concat(hi),()=>{lt(d,c),P.document.getElementById(yt(d)).remove();try{bi(c,d,t,n,o,r,i,s)}catch(p){te(new Error(`Error when creating video recorder player object ${p}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),c},Ci=e=>{const t=e+bo;if(P.document.getElementById(t)&&P.videojs){try{if(!P.videojs(t).record().stream)return}catch{return}P.videojs(t).record().stop(),P.videojs(t).record().stopDevice()}},wi=e=>{const t=Me(e+go);t==null||t.pause()},Ei=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Jt)&&(n=n.replace(Jt,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},N={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},Y={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},ce="ul-card-video__player_recorder",Si="ul-card-video__skip_button",ji="ul-video-interview-form",tn="ul-video-btn",xe={Question:0,Answer:1},Ti=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:d,headers:c,responseGroupUid:p,surveyId:l,viewDocument:h,visitorId:m}=U(R=>({apiURL:R.apiURL,envId:R.envId,handleUploadUpdate:R.handleUploadUpdate,headers:R.headers,responseGroupUid:R.responseGroupUid,surveyId:R.surveyId,viewDocument:R.viewDocument,visitorId:R.userId})),[v,f]=B(!1),[b,_]=B(null),[x,y]=B(null),[C,w]=B(xe.Question),j=o&&o.videoUrl,I=(R,O)=>{R===N.UPLOAD_STARTED?(_(O[N.UPLOAD_ID]),y(O[N.MEDIA_RECORDING_UID]),f(!0)):R===N.DELETE?(_(null),y(null),f(!1)):R===N.UPLOAD_PROGRESS?isNaN(O[N.UPLOAD_PROGRESS_PCT])?d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],isComplete:!0}):d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],progressPct:O[N.UPLOAD_PROGRESS_PCT]}):R===N.UPLOAD_FINISHED&&d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],isComplete:!0})},S=R=>{if(R&&R.children.length===0&&!o.hideRecordedPrompt){const O=yi(ce,{src:j,type:"application/x-mpegURL"},void 0,o.mediaType===N.MEDIA_TYPE_AUDIO,s,h);R.appendChild(O)}},g=R=>{if(R&&R.children.length===0){const O=ki(ce,{surveyId:l,responseGroupUid:p,questionId:r,visitorId:m,envId:a},s,I,void 0,{...c,"x-ul-video-recorder-origin":"sdk"},o.mediaType===N.MEDIA_TYPE_AUDIO,h);R.appendChild(O)}},k=R=>{R.preventDefault(),R.stopPropagation(),document.getElementById(ce)&&Ci(ce),b&&x?(d({mediaRecordingUid:x,isSubmitted:!0}),n({value:{mediaRecordingUid:x},questionId:r,type:i})):n({value:null,questionId:r,type:i})},D=()=>u(ie,{defaultBody:()=>u("button",{className:`${tn} ul-record-response-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),document.getElementById(ce)&&wi(ce),w(xe.Answer)}}),properties:o});return u("form",{className:L(e,"ul-card--video","fade-in-transition"),id:ji,children:[u(K,{message:t,properties:o}),u("div",{id:"ul-card-voice__video",children:[u("div",{children:[u("div",{id:"ul-question-player-container",style:{display:C===xe.Question?"":"none"},children:[u("div",{id:ce,ref:S}),D()]}),u("div",{style:{display:C===xe.Answer?"block":"none"},children:[u("button",{className:`${tn} ul-back-question-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),w(xe.Question)},style:{display:o.hideRecordedPrompt?"none":"block"}}),u("div",{id:"ul-recorder-player-container",ref:g})]})]}),u(Z,{disabled:!v,onClick:k,children:he(o)}),u("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:Si,onClick:k,style:{display:o.required?"none":"block",...v?{display:"none"}:{}},children:_t(o)})]})]})},Ri=({className:e})=>{const{uploadProgress:t}=U(i=>({uploadProgress:i.uploadProgress}));let n,o;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",o="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",o="Please keep this tab open until your response is fully processed.");const r=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return u("div",{className:L(e,"ul-card--uploading","fade-in-transition"),children:[u("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:u("div",{className:"ul-loading-spinner",children:[u("div",{className:"first"}),u("div",{className:"second"}),u("div",{className:"third"}),u("div",{className:"fourth"})]})}),u(K,{message:`${n} (${r}% complete)`}),u("p",{className:"ul-caption",children:o})]})},nn=({logoOnly:e=!1,style:t={}})=>u("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&u("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),Pi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:o,index:r,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:d,viewedCardCount:c}=U(y=>({border:y.border,cards:y.cards,forceBrandedLogo:y.forceBrandedLogo,headers:y.headers,index:y.index,marketingUrl:y.marketingUrl,showSurveyBrand:y.showSurveyBrand,slugName:y.slugName,surveyId:y.surveyId,viewedCardCount:y.viewedCardCount})),p=ee(null),l=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),h=Dr(t,r),m=c+1,v=m/(m+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${d}${n&&"&utm_term=poweredby_pill"}`;z(()=>{p.current&&(p.current.style.width=`${v*100}%`)},[v]);const b=()=>u(W,{children:[l.length>1&&u("div",{id:"ul-progress-bar-container",children:u("div",{id:"ul-progress-bar-current",ref:p,style:{border:`1px solid ${e||"#000"}`}})}),s?u("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:u("a",{href:f,rel:"noreferrer",target:"_blank",children:u("div",{style:{display:"flex"},children:[u(nn,{logoOnly:!1}),n&&u(on,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),_=()=>u("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:u("div",{className:"thank-you-card-link",children:[u("div",{className:"sprig-box-logo",children:u(nn,{logoOnly:!0,style:{margin:"auto"}})}),u("div",{children:u("p",{children:["Capture insights about your own product",u(on,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),x=t[r].type==="thanks";return u("footer",{className:`ul-footer ${o["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:x&&n?_():b()})},on=({style:e})=>u("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),u("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Di=()=>{const{answers:e,border:t,cards:n,close:o,configureExitOnOverlayClick:r,destroy:i,endCard:s,eventEmitFn:a,fontFamily:d,headers:c,index:p,next:l,previewMode:h,productConfig:m,seen:v,showStripes:f,studyType:b,surveyId:_,update:x,useMobileStyling:y,viewDocument:C}=U(T=>({answers:T.answers,border:T.border,cards:T.cards,close:T.close,configureExitOnOverlayClick:T.configureExitOnOverlayClick,destroy:T.destroy,endCard:T.endCard,eventEmitFn:T.eventEmitFn,fontFamily:T.fontFamily,headers:T.headers,index:T.index,previewMode:T.previewMode,productConfig:T.productConfig,next:T.next,seen:T.seen,showStripes:T.showStripes,studyType:T.studyType,surveyId:T.surveyId,update:T.update,useMobileStyling:T.useMobileStyling,viewDocument:T.viewDocument})),w=ee(null),j=ee(!1),I=c["userleap-platform"],{props:S,type:g,name:k}=n[p],D=n.length;z(()=>{w.current&&(w.current.classList.contains("ul-app--visible")||w.current.classList.add("ul-app--visible"),!j.current&&a&&(j.current=!0,a(A.SprigEvent.SurveyAppeared,{name:A.SprigEvent.SurveyAppeared,"survey.id":_})))},[a,_]),z(()=>{const T=()=>{C.visibilityState==="visible"&&(v(),C.removeEventListener("visibilitychange",T))};return C.addEventListener("visibilitychange",T),T(),()=>{C.removeEventListener("visibilitychange",T)}},[v,C]),z(()=>{x()},[p,x]),z(()=>{r(()=>o())},[o,r]);const R=Se(()=>()=>o(H.APP_ID),[o]),O=T=>{T.key==="Enter"&&R()},G=async function(T){l({data:T,completeSurvey:()=>{i(H.APP_ID)},endCard:s}),H.resetScrollPosition(C)};if(e){for(const T of e)if(T.questionId===k){let se;if(g==="multiplechoice"){const ae=S.options.find(({value:ze})=>ze===T.value);if(!ae)break;se={[ae.id]:ae.value}}else se=T.value;G({value:se,type:g,questionId:T.questionId});break}}const q=()=>["email","link"].includes(c["userleap-platform"])?!1:!s||p+1!==D,Fe=()=>{const T={className:"ul-card",next:G,questionId:k,type:g};switch(g){case"consentlegal":return $(Hr,{...T,...S,key:k});case"likert":return $(Vr,{...T,...S,key:k});case"matrix":return $(Fr,{...T,...S,key:k});case"multiplechoice":return $(Zr,{...T,...S,key:k});case"multipleselect":return $(Gr,{...T,...S,key:k});case"nps":return $(Yr,{...T,key:k,props:S});case"open":return $(Qr,{...T,...S,key:k});case"recordedtask":return $(li,{...T,...S,key:k});case"texturlprompt":return $(di,{...T,...S,key:k});case"thanks":return $(ui,{...T,...S,key:k});case"uploading":return $(Ri,{...T,...S,key:k});case"videovoice":return $(Ti,{...T,...S,key:k});default:return null}},So=T=>{var kt;const se=window.sprigAPI,ae=T.target;if(!se||!ae)return;const ze=[ae,ae.parentElement];for(const Te of ze)if(((kt=Te==null?void 0:Te.tagName)==null?void 0:kt.toLowerCase())==="a"){T.preventDefault(),se==null||se.openUrl(Te.href);return}},jo=!y&&((m==null?void 0:m.framePosition)==="center"||(m==null?void 0:m.desktopDisplay)==="center-modal"||((m==null?void 0:m.placement)||"").includes("center"));return u("div",{className:L("ul-app",A.shouldDirectEmbed(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:H.APP_ID,onClick:So,ref:w,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{},...jo?{position:"relative"}:{}},children:u("div",{className:"ul-app__container",children:u("div",{className:L(V("ul-card__container",y,b)),style:{...b!=="feedbackButton"||(m==null?void 0:m.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(m==null?void 0:m.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[q()&&u("div",{className:L(V("close-container",y)),children:u("div",{"aria-label":"Close button",className:"close-btn",onClick:R,onKeyPress:O,role:"button",tabIndex:0,children:u("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"For development purposes only"})}),h&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),u("div",{className:L(Or("ul-card-main-content",I)),children:Fe()}),u(Pi,{})]})})})},Ii='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;margin:auto;text-align:start;min-width:200px}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.question-header-container{margin-bottom:15px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:8px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #B0B5B7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;max-height:190px;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}',Oi=async(e,t)=>{var o;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const r=await n.json();return(o=r==null?void 0:r.upload)==null?void 0:o.url}else return null},Eo=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",rn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Eo()};return new MediaRecorder(e,t)},sn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(o){n[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function ln(e,t,n,o,r,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=o,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>Li(t,e,n,o,a,r,i),e.stop()}}async function Li(e,t,n,o,r,i,s){const a=U.getState().viewDocument,{"upload.callback":d,"progress.callback":c}=o,p={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:r,...o["passthrough.data"]},l=await Oi(p,e);if(!l){d&&d(null,{message:"failed to get upload url"});return}const h=new Blob(s,{type:Eo()});if(!a.defaultView)return;const m=new a.defaultView.File([h],`recording video ${Date.now()}`),v=i.createUpload({endpoint:l,file:m,chunkSize:5120});v.on("error",f=>{d&&d(null,f)}),v.on("progress",f=>{c&&c(r,f)}),v.on("success",()=>{d&&d(r,!0)})}const Ni={chunks:{}},Ai={state:{...Ni},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:o,UpChunk:r}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&r&&(n!=null&&n.currentMediaRecordingUid&&ln(n,t,i,e,r,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&ln(o,t,"screen",e,r,this.state.chunks[o==null?void 0:o.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let o=t.length&&t[0];o=o||n.length&&n[0],o&&o.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(r=>{r&&(r.state==="recording"&&r.stop(),r.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var o,r,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(o=this.state.avStream)!=null&&o.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((r=this.state.captureStream)==null?void 0:r.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){console.warn("Error: failed to get permissions: "+s),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(o){t==null||t(!1),console.warn("Error: failed to get permissions: "+o),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const o=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=rn(this.state.avStream);const r=A.v4();sn(this.state.avRecorder,r,this.state.chunks),o.push(r)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=rn(this.state.captureStream);const r=A.v4();sn(this.state.screenRecorder,r,this.state.chunks),o.push(r)}o&&n&&n(o)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":o}=e;await this.stopRecording(e),o&&o(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var o;const{["permission.status.callback"]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((o=this.state.captureStream)!=null&&o.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,o){const{avRecorder:r,screenRecorder:i}=this.state,{allResponses:s}=U.getState(),a=ro({cards:n,index:e,hasEndCard:o,allResponses:s});a!==null&&n[a].type==="recordedtask"||[r,i].map(d=>{d&&(d.state==="recording"&&d.stop(),d.stream.getTracks().map(c=>{c.readyState==="live"&&c.stop()}))})}},Le=Object.create(Ai);Object.freeze(Le);const Mi=(e,t)=>{const n=[...e],o=new Set(["videovoice","recordedtask"]);return e.some(r=>o.has(r.type))&&n.push({name:-2,props:{routingOptions:[]},type:"uploading"}),t&&n.push({name:-1,props:{routingOptions:[]},type:"thanks"}),n},$i=({mode:e=null,viewWindow:t,viewDocument:n,trackPageViewUrl:o})=>{const r=n.documentElement;let i;try{i=t.parent.location.href}catch{i=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:o??i,l:t.navigator.language}};function Ui(e,t=!0){var y;const{answers:n,apiURL:o,endCard:r,eventEmitFn:i,fontFamilyURL:s,frame:a,previewKey:d,viewDocument:c,viewWindow:p}=e,l=A.shouldDirectEmbed(e.headers)?e.frame:c.body,h=e.UpChunk||window.UpChunk,m=A.eventEmitter,v=Mi(e.cards,!!r);Le.configure(m,{cards:v,hasEndCard:!!r,apiURL:o,UpChunk:h}),U.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:a,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:$i({mode:e.mode,viewWindow:p,viewDocument:c,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:d,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Le,recorderEventEmitter:m,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{head:f}=c,b=c.createElement("style");if(b.id="sprig-style",b.textContent=Ii,b.nonce=e.styleNonce,f.appendChild(b),e.fontFamily&&s&&parent){const C=c.createElement("link");C.rel="stylesheet",C.href=s,f.appendChild(C)}if(e.customStyles&&H.overrideStyles(c,e.customStyles,e.styleNonce),!h)if(e.installationMethod!=="web-npm"){const C=c.createElement("script");C.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",C.onload=()=>{Le.setUpChunk(p.UpChunk)},C.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},f.appendChild(C)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const _="2.30.4",x=i||((y=a.eventEmitter)==null?void 0:y.emit);x==null||x("verify.view.version",{"view.version":_}),l&&t&&ge(u(Di,{}),l)}const Hi={configure:Ui};exports.default=Hi;
685
+ `,mi=e=>{const t=P.document.createElement("div");return t.className="ul-video-player-loading",t.id=yt(e),["first","second","third","fourth"].map(n=>{const o=P.document.createElement("div");o.className=n,t.appendChild(o)}),t},yt=e=>e+"-loading-spiner",F="hidden",Jt=".m3u8",Ye="questionId",Qe="ul-video-recorder-camera-off-button",Ke="ul-recording-in-session",hi=[{type:"link",content:`${ue}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${ue}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${ue}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${ue}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${ue}/userleap-web-upchunk-v2.2.2.js`}],vo=[{type:"link",content:`${ue}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${ue}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:pi}],go="-video-player",_o="-secondary-video-player",bo="-video-recorder";let J,Xt;const le=async({event:e,apiBase:t,headers:n,visitorId:o,envId:r,metadata:i})=>{const s=P.document.documentElement;if(!o||!r)return;const a={event:`SDK - ${e}`,visitorId:o,environmentId:r,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${o}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},te=async(e,t,n,o,r,i)=>{le({event:`Video Error ${t}`,apiBase:n,headers:o,visitorId:r,envId:i,metadata:{errorMessage:e.message}});const s=P.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},d={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:r,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...o,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},fi=(e,{type:t,content:n})=>new Promise(function(o,r){let i;t==="script"?(i=P.document.createElement("script"),i.src=n):t==="link"?(i=P.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=P.document.createElement("style"),i.innerHTML=n),i.onload=function(){o(n)},i.onerror=function(){r(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)}),xo=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,o)=>(n.push(fi(P.document.head,o)),n),[])).then(()=>{P.videojs=P.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},en=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=F;else if(t==="success")e.style.visibility=F,e.innerHTML="Upload succeeded!";else{const o=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${o}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${o}%, #FCFCFD ${o}%, #FCFCFD 100%)`}},Je=(e,t)=>{const n=P.videojs(e.id());return n==null?void 0:n.payload[t]},vi=(e,t,n,o,r)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:d}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(N.ERROR,{type:N.PERMISSION_DENIED}),le({event:"Video Permission Denied",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})):(n&&n(N.ERROR,{type:N.OTHER}),te(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,r,a,d))}),e.on("error",function(c,p){te(p||e.error(),"recorderError",t,r,a,d)}),e.on("startRecord",function(c,p){o(e.uploadProgressLabel,"none"),le({event:"Video Record Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})}),e.on("finishRecord",async function(){o(e.uploadProgressLabel,"start",0);const c=Je(e,Ye);if(!i){const f="internal error: missing fields in payload";return n&&n(N.ERROR,{type:N.OTHER}),te(new Error(f),"finishRecord",t,r,a,d),null}e.record().stopDevice();const p=e.cameraOff?N.MEDIA_TYPE_AUDIO:N.MEDIA_TYPE_VIDEO,l=A.v4();le({event:"Video Record Finish",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:p,mediaRecordingUid:l};c&&(h.questionId=c),s&&(h.responseGroupUid=s),a&&(h.visitorId=a);const v=await(async()=>{const f=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(f.ok){const b=await f.json();return n&&n(N.UPLOAD_STARTED,{[N.UPLOAD_ID]:b.upload.id,[N.MEDIA_TYPE]:p,[N.MEDIA_RECORDING_UID]:l}),b.upload.url}else return n&&n(N.ERROR,{type:N.OTHER,response:f}),te(new Error("failed to get upload response with url"),"finishRecord",t,r,a,d),null})();v&&(J=P.document.defaultView.UpChunk.createUpload({endpoint:v,file:new P.document.defaultView.File([e.recordedData],`recording ${p} ${Date.now()}`),chunkSize:5120}),J.startTime=Date.now(),le({event:"Video Upload Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:v}}),J.on("error",f=>{o(e.uploadProgressLabel,"none"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),te(f,"finishRecord",t,r,a,d)}),J.on("progress",f=>{n&&n(N.UPLOAD_PROGRESS,{[N.MEDIA_RECORDING_UID]:l,[N.UPLOAD_PROGRESS_PCT]:f.detail}),o(e.uploadProgressLabel,"progress",f.detail)}),J.on("success",()=>{o(e.uploadProgressLabel,"success"),n&&n(N.UPLOAD_FINISHED,{[N.MEDIA_RECORDING_UID]:l}),le({event:"Video Upload Success",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:l,questionId:c,responseGroupUid:s,surveyId:i,mediaType:p,url:v,elapsedMs:J.startTime&&Date.now()-J.startTime}})}))})},yo=(e,t)=>{const n=new(P.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(o=>{n.addChild(o)}),gi(n),n},gi=e=>{e.children().forEach(t=>{if(Y[t.name_]){const n=Oe(Y[t.name_],`ul-${Y[t.name_]}`);t.el_.appendChild(n)}})},Oe=(e,t="")=>{const n=P.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},ko=(e,t,n,o,r=!1,i)=>{e.addClass("ul-video-player");const s=new(P.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(P.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Ei(n.src):null;n&&(r||!a)?(e.children()[0].classList.add("vjs-hidden"),P.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),P.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!r&&n&&!a&&xi(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),o&&o(e)},_i=(e,t,n)=>{e.addClass(`ul${_o}`);const o=new(P.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(o),n&&n(e)},bi=(e,t,n,o,r,i,s,a=!1)=>{Xt=Date.now();const c=Me(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!c)return;c.payload=n;const{surveyId:p,questionId:l,responseGroupUid:h,visitorId:m,envId:v}=n;let f;const b=D=>{const R=Qe,O=Qe+"-audio-only";en(c.uploadProgressLabel,"none"),J&&J.startTime>=Xt&&J.abort();const G=P.document.getElementById("ul-camera-button");D?(c.children()[0].classList.add("vjs-hidden"),C.removeClass(R),C.addClass(O),G.innerHTML=Y.TurnOnCamera,c.audioPlayerPlaceholder.removeClass("vjs-hidden"),f==null||f.getTracks().forEach(q=>{q.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(q=>{f=q,q.getVideoTracks().forEach(Fe=>{Fe.enabled=!1}),c.record().onDeviceReady(q)}).catch(c.record().onDeviceError.bind(c.record()))):(f==null||f.getVideoTracks().forEach(q=>{q.enabled=!0}),c.children()[0].classList.remove("vjs-hidden"),c.record().getDevice(),C.removeClass(O),C.addClass(R),G.innerHTML=Y.TurnOffCamera,c.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{_.hasClass(F)||(le({event:"Video Delete Button Clicked",apiBase:o,headers:s,visitorId:m,envId:v,metadata:{questionId:l,responseGroupUid:h,surveyId:p}}),b(c.cameraOff),r(N.DELETE,{}),C.removeClass(F),_.addClass(F))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Oe(Y.DeleteButton,"ul-delete-button"));const x=P.document.getElementById(t),y=()=>{x.classList.contains("vjs-fullscreen")&&c.cameraOff?x.style.display="table":x.style.display="flex"};y();const C=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{c.record().isRecording()||(c.cameraOff=!c.cameraOff,le({event:"Video Camera Button Clicked",apiBase:o,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:l,responseGroupUid:h,surveyId:p,cameraOff:c.cameraOff}}),b(c.cameraOff),!_.hasClass(F)&&_.addClass(F),r(N.DELETE,{}),y())}});C.addClass(Qe),C.el_.appendChild(Oe(Y.TurnOffCamera,"ul-camera-button"));const w=new(P.videojs.getComponent("Button"))(c,{clickHandler:()=>{const D=P.document.getElementById("ul-recorder-toggle");if(c.record().isRecording())c.record().stop(),D&&(D.innerHTML=Y.RecordButton),w.removeClass(Ke),_.removeClass(F);else{const R=P.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),D&&(D.innerHTML=Y.RecordButton),b(c.cameraOff),r(N.DELETE,{}),C.removeClass(F),_.addClass(F),w.removeClass(Ke),S.show();else{w.addClass(Ke),S.hide(),C.addClass(F),_.addClass(F),D&&(D.innerHTML=Y.StopButton);const O=P.document.createElement("div");O.id="ul-recording-countdown-screen",x.insertBefore(O,x.children[1]),O.style.height=`${x.offsetHeight}px`,Co(c,3)}}}});w.addClass("ul-video-recorder-toggle-button"),w.el_.appendChild(Oe(Y.RecordButton,"ul-recorder-toggle"));const j=P.document.createElement("p");j.style.visibility="hidden",j.className="ul-upload-progress-label",e.appendChild(j),c.uploadProgressLabel=j;const I=yo(c,[_,C,"PlayToggle",w,"FullscreenToggle"]),S=I.children().find(D=>D.name_==="FullscreenToggle");S.hasClass("vjs-disabled")&&S.hide();const g=I.children().find(D=>D.name_==="PlayToggle");g.hide(),_.addClass(F),ko(c,I,i,!1,a),c.on("stopRecord",()=>{w.hide(),g.show(),S.show(),_.removeClass(F)}),c.on("deviceReady",()=>{w.show(),g.hide(),_.addClass(F)}),vi(c,o,r,en,s);const k=[{name:"microphone"}];!c.cameraOff&&k.push({name:"camera"}),Promise.all(k.map(D=>{var R;return(R=navigator==null?void 0:navigator.permissions)==null?void 0:R.query(D)})).then(D=>{D.reduce((O,G)=>O&G.state==="granted",!0)&&c&&(c.deviceButton&&c.deviceButton.hide(),c.record().getDevice())}).catch(D=>{})},Co=(e,t=3)=>{const n=P.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{Co(e,t-1)},1e3))},wo=e=>{const t=P.document.createElement("div");return t.className="ul-video-container",t.appendChild(mi(e)),t},lt=(e,t)=>{const n=P.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const o=P.document.createElement("p");o.className="vjs-no-js",o.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const r=P.document.createElement("a");return r.href="https://videojs.com/html5-video-support/",r.target="_blank",r.innerHTML="supports HTML5 video",o.appendChild(r),n.appendChild(o),t.appendChild(n),t},xi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),P.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Me=(e,t)=>P.document.getElementById(e)?t?P.videojs(e,t):P.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),yi=(e,t,n,o=!1,r="https://api.sprig.com",i=document,s=null,a=null)=>{P.document=i;const d=e+go,c=wo(d);return P.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",r,{})}),xo(vo,()=>{P.document.getElementById(yt(d)).remove(),lt(d,c);const p={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const l=e+_o;lt(l,c);const h=Me(d,p),m=Me(l,{muted:!0,...p});if(!h||!m)return;_i(m,s,a),s||m.addClass(F);const v=yo(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=v.children().find(b=>b.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),ko(h,v,t,n,o,m)}catch(l){te(new Error(`Error when creating video player object ${l}`),"playerDeviceError",r,{});return}}),c},ki=(e,t={},n="https://api.userleap.com",o,r,i,s=!1,a=document)=>{P.document=a;const d=e+bo,c=wo(d);return P.document.addEventListener("securitypolicyviolation",p=>{te(new Error(`Voice & Video feature violates ${p.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),xo(vo.concat(hi),()=>{lt(d,c),P.document.getElementById(yt(d)).remove();try{bi(c,d,t,n,o,r,i,s)}catch(p){te(new Error(`Error when creating video recorder player object ${p}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),c},Ci=e=>{const t=e+bo;if(P.document.getElementById(t)&&P.videojs){try{if(!P.videojs(t).record().stream)return}catch{return}P.videojs(t).record().stop(),P.videojs(t).record().stopDevice()}},wi=e=>{const t=Me(e+go);t==null||t.pause()},Ei=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Jt)&&(n=n.replace(Jt,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},N={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},Y={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},ce="ul-card-video__player_recorder",Si="ul-card-video__skip_button",ji="ul-video-interview-form",tn="ul-video-btn",xe={Question:0,Answer:1},Ti=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:d,headers:c,responseGroupUid:p,surveyId:l,viewDocument:h,visitorId:m}=U(R=>({apiURL:R.apiURL,envId:R.envId,handleUploadUpdate:R.handleUploadUpdate,headers:R.headers,responseGroupUid:R.responseGroupUid,surveyId:R.surveyId,viewDocument:R.viewDocument,visitorId:R.userId})),[v,f]=B(!1),[b,_]=B(null),[x,y]=B(null),[C,w]=B(xe.Question),j=o&&o.videoUrl,I=(R,O)=>{R===N.UPLOAD_STARTED?(_(O[N.UPLOAD_ID]),y(O[N.MEDIA_RECORDING_UID]),f(!0)):R===N.DELETE?(_(null),y(null),f(!1)):R===N.UPLOAD_PROGRESS?isNaN(O[N.UPLOAD_PROGRESS_PCT])?d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],isComplete:!0}):d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],progressPct:O[N.UPLOAD_PROGRESS_PCT]}):R===N.UPLOAD_FINISHED&&d({mediaRecordingUid:O[N.MEDIA_RECORDING_UID],isComplete:!0})},S=R=>{if(R&&R.children.length===0&&!o.hideRecordedPrompt){const O=yi(ce,{src:j,type:"application/x-mpegURL"},void 0,o.mediaType===N.MEDIA_TYPE_AUDIO,s,h);R.appendChild(O)}},g=R=>{if(R&&R.children.length===0){const O=ki(ce,{surveyId:l,responseGroupUid:p,questionId:r,visitorId:m,envId:a},s,I,void 0,{...c,"x-ul-video-recorder-origin":"sdk"},o.mediaType===N.MEDIA_TYPE_AUDIO,h);R.appendChild(O)}},k=R=>{R.preventDefault(),R.stopPropagation(),document.getElementById(ce)&&Ci(ce),b&&x?(d({mediaRecordingUid:x,isSubmitted:!0}),n({value:{mediaRecordingUid:x},questionId:r,type:i})):n({value:null,questionId:r,type:i})},D=()=>u(ie,{defaultBody:()=>u("button",{className:`${tn} ul-record-response-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),document.getElementById(ce)&&wi(ce),w(xe.Answer)}}),properties:o});return u("form",{className:L(e,"ul-card--video","fade-in-transition"),id:ji,children:[u(K,{message:t,properties:o}),u("div",{id:"ul-card-voice__video",children:[u("div",{children:[u("div",{id:"ul-question-player-container",style:{display:C===xe.Question?"":"none"},children:[u("div",{id:ce,ref:S}),D()]}),u("div",{style:{display:C===xe.Answer?"block":"none"},children:[u("button",{className:`${tn} ul-back-question-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),w(xe.Question)},style:{display:o.hideRecordedPrompt?"none":"block"}}),u("div",{id:"ul-recorder-player-container",ref:g})]})]}),u(Z,{disabled:!v,onClick:k,children:he(o)}),u("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:Si,onClick:k,style:{display:o.required?"none":"block",...v?{display:"none"}:{}},children:_t(o)})]})]})},Ri=({className:e})=>{const{uploadProgress:t}=U(i=>({uploadProgress:i.uploadProgress}));let n,o;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",o="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",o="Please keep this tab open until your response is fully processed.");const r=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return u("div",{className:L(e,"ul-card--uploading","fade-in-transition"),children:[u("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:u("div",{className:"ul-loading-spinner",children:[u("div",{className:"first"}),u("div",{className:"second"}),u("div",{className:"third"}),u("div",{className:"fourth"})]})}),u(K,{message:`${n} (${r}% complete)`}),u("p",{className:"ul-caption",children:o})]})},nn=({logoOnly:e=!1,style:t={}})=>u("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&u("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),u("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),Pi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:o,index:r,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:d,viewedCardCount:c}=U(y=>({border:y.border,cards:y.cards,forceBrandedLogo:y.forceBrandedLogo,headers:y.headers,index:y.index,marketingUrl:y.marketingUrl,showSurveyBrand:y.showSurveyBrand,slugName:y.slugName,surveyId:y.surveyId,viewedCardCount:y.viewedCardCount})),p=ee(null),l=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),h=Dr(t,r),m=c+1,v=m/(m+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${d}${n&&"&utm_term=poweredby_pill"}`;z(()=>{p.current&&(p.current.style.width=`${v*100}%`)},[v]);const b=()=>u(W,{children:[l.length>1&&u("div",{id:"ul-progress-bar-container",children:u("div",{id:"ul-progress-bar-current",ref:p,style:{border:`1px solid ${e||"#000"}`}})}),s?u("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:u("a",{href:f,rel:"noreferrer",target:"_blank",children:u("div",{style:{display:"flex"},children:[u(nn,{logoOnly:!1}),n&&u(on,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),_=()=>u("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:u("div",{className:"thank-you-card-link",children:[u("div",{className:"sprig-box-logo",children:u(nn,{logoOnly:!0,style:{margin:"auto"}})}),u("div",{children:u("p",{children:["Capture insights about your own product",u(on,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),x=t[r].type==="thanks";return u("footer",{className:`ul-footer ${o["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:x&&n?_():b()})},on=({style:e})=>u("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[u("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),u("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Di=()=>{const{answers:e,border:t,cards:n,close:o,configureExitOnOverlayClick:r,destroy:i,endCard:s,eventEmitFn:a,fontFamily:d,headers:c,index:p,next:l,previewMode:h,productConfig:m,seen:v,showStripes:f,studyType:b,surveyId:_,update:x,useMobileStyling:y,viewDocument:C}=U(T=>({answers:T.answers,border:T.border,cards:T.cards,close:T.close,configureExitOnOverlayClick:T.configureExitOnOverlayClick,destroy:T.destroy,endCard:T.endCard,eventEmitFn:T.eventEmitFn,fontFamily:T.fontFamily,headers:T.headers,index:T.index,previewMode:T.previewMode,productConfig:T.productConfig,next:T.next,seen:T.seen,showStripes:T.showStripes,studyType:T.studyType,surveyId:T.surveyId,update:T.update,useMobileStyling:T.useMobileStyling,viewDocument:T.viewDocument})),w=ee(null),j=ee(!1),I=c["userleap-platform"],{props:S,type:g,name:k}=n[p],D=n.length;z(()=>{w.current&&(w.current.classList.contains("ul-app--visible")||w.current.classList.add("ul-app--visible"),!j.current&&a&&(j.current=!0,a(A.SprigEvent.SurveyAppeared,{name:A.SprigEvent.SurveyAppeared,"survey.id":_})))},[a,_]),z(()=>{const T=()=>{C.visibilityState==="visible"&&(v(),C.removeEventListener("visibilitychange",T))};return C.addEventListener("visibilitychange",T),T(),()=>{C.removeEventListener("visibilitychange",T)}},[v,C]),z(()=>{x()},[p,x]),z(()=>{r(()=>o())},[o,r]);const R=Se(()=>()=>o(H.APP_ID),[o]),O=T=>{T.key==="Enter"&&R()},G=async function(T){l({data:T,completeSurvey:()=>{i(H.APP_ID)},endCard:s}),H.resetScrollPosition(C)};if(e){for(const T of e)if(T.questionId===k){let se;if(g==="multiplechoice"){const ae=S.options.find(({value:ze})=>ze===T.value);if(!ae)break;se={[ae.id]:ae.value}}else se=T.value;G({value:se,type:g,questionId:T.questionId});break}}const q=()=>["email","link"].includes(c["userleap-platform"])?!1:!s||p+1!==D,Fe=()=>{const T={className:"ul-card",next:G,questionId:k,type:g};switch(g){case"consentlegal":return $(Hr,{...T,...S,key:k});case"likert":return $(Vr,{...T,...S,key:k});case"matrix":return $(Fr,{...T,...S,key:k});case"multiplechoice":return $(Zr,{...T,...S,key:k});case"multipleselect":return $(Gr,{...T,...S,key:k});case"nps":return $(Yr,{...T,key:k,props:S});case"open":return $(Qr,{...T,...S,key:k});case"recordedtask":return $(li,{...T,...S,key:k});case"texturlprompt":return $(di,{...T,...S,key:k});case"thanks":return $(ui,{...T,...S,key:k});case"uploading":return $(Ri,{...T,...S,key:k});case"videovoice":return $(Ti,{...T,...S,key:k});default:return null}},So=T=>{var kt;const se=window.sprigAPI,ae=T.target;if(!se||!ae)return;const ze=[ae,ae.parentElement];for(const Te of ze)if(((kt=Te==null?void 0:Te.tagName)==null?void 0:kt.toLowerCase())==="a"){T.preventDefault(),se==null||se.openUrl(Te.href);return}},jo=!y&&((m==null?void 0:m.framePosition)==="center"||(m==null?void 0:m.desktopDisplay)==="center-modal"||((m==null?void 0:m.placement)||"").includes("center"));return u("div",{className:L("ul-app",A.shouldDirectEmbed(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:H.APP_ID,onClick:So,ref:w,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{},...jo?{position:"relative"}:{}},children:u("div",{className:"ul-app__container",children:u("div",{className:L(V("ul-card__container",y,b)),style:{...b!=="feedbackButton"||(m==null?void 0:m.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(m==null?void 0:m.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[q()&&u("div",{className:L(V("close-container",y)),children:u("div",{"aria-label":"Close button",className:"close-btn",onClick:R,onKeyPress:O,role:"button",tabIndex:0,children:u("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:u("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"For development purposes only"})}),h&&u("div",{className:"ul-header__container",dir:"ltr",children:u("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),u("div",{className:L(Or("ul-card-main-content",I)),children:Fe()}),u(Pi,{})]})})})},Ii='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;margin:auto;text-align:start;min-width:200px}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.question-header-container{margin-bottom:15px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:8px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #B0B5B7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;max-height:190px;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}',Oi=async(e,t)=>{var o;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const r=await n.json();return(o=r==null?void 0:r.upload)==null?void 0:o.url}else return null},Eo=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",rn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Eo()};return new MediaRecorder(e,t)},sn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(o){n[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function ln(e,t,n,o,r,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=o,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>Li(t,e,n,o,a,r,i),e.stop()}}async function Li(e,t,n,o,r,i,s){const a=U.getState().viewDocument,{"upload.callback":d,"progress.callback":c}=o,p={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:r,...o["passthrough.data"]},l=await Oi(p,e);if(!l){d&&d(null,{message:"failed to get upload url"});return}const h=new Blob(s,{type:Eo()});if(!a.defaultView)return;const m=new a.defaultView.File([h],`recording video ${Date.now()}`),v=i.createUpload({endpoint:l,file:m,chunkSize:5120});v.on("error",f=>{d&&d(null,f)}),v.on("progress",f=>{c&&c(r,f)}),v.on("success",()=>{d&&d(r,!0)})}const Ni={chunks:{}},Ai={state:{...Ni},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:o,UpChunk:r}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&r&&(n!=null&&n.currentMediaRecordingUid&&ln(n,t,i,e,r,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&ln(o,t,"screen",e,r,this.state.chunks[o==null?void 0:o.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let o=t.length&&t[0];o=o||n.length&&n[0],o&&o.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(r=>{r&&(r.state==="recording"&&r.stop(),r.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var o,r,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(o=this.state.avStream)!=null&&o.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((r=this.state.captureStream)==null?void 0:r.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){console.warn("Error: failed to get permissions: "+s),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(o){t==null||t(!1),console.warn("Error: failed to get permissions: "+o),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const o=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=rn(this.state.avStream);const r=A.v4();sn(this.state.avRecorder,r,this.state.chunks),o.push(r)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=rn(this.state.captureStream);const r=A.v4();sn(this.state.screenRecorder,r,this.state.chunks),o.push(r)}o&&n&&n(o)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":o}=e;await this.stopRecording(e),o&&o(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var o;const{["permission.status.callback"]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((o=this.state.captureStream)!=null&&o.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,o){const{avRecorder:r,screenRecorder:i}=this.state,{allResponses:s}=U.getState(),a=ro({cards:n,index:e,hasEndCard:o,allResponses:s});a!==null&&n[a].type==="recordedtask"||[r,i].map(d=>{d&&(d.state==="recording"&&d.stop(),d.stream.getTracks().map(c=>{c.readyState==="live"&&c.stop()}))})}},Le=Object.create(Ai);Object.freeze(Le);const Mi=(e,t)=>{const n=[...e],o=new Set(["videovoice","recordedtask"]);return e.some(r=>o.has(r.type))&&n.push({name:-2,props:{routingOptions:[]},type:"uploading"}),t&&n.push({name:-1,props:{routingOptions:[]},type:"thanks"}),n},$i=({mode:e=null,viewWindow:t,viewDocument:n,trackPageViewUrl:o})=>{const r=n.documentElement;let i;try{i=t.parent.location.href}catch{i=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:o??i,l:t.navigator.language}};function Ui(e,t=!0){var y;const{answers:n,apiURL:o,endCard:r,eventEmitFn:i,fontFamilyURL:s,frame:a,previewKey:d,viewDocument:c,viewWindow:p}=e,l=A.shouldDirectEmbed(e.headers)?e.frame:c.body,h=e.UpChunk||window.UpChunk,m=A.eventEmitter,v=Mi(e.cards,!!r);Le.configure(m,{cards:v,hasEndCard:!!r,apiURL:o,UpChunk:h}),U.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:a,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:$i({mode:e.mode,viewWindow:p,viewDocument:c,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:d,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Le,recorderEventEmitter:m,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{head:f}=c,b=c.createElement("style");if(b.id="sprig-style",b.textContent=Ii,b.nonce=e.styleNonce,f.appendChild(b),e.fontFamily&&s&&parent){const C=c.createElement("link");C.rel="stylesheet",C.href=s,f.appendChild(C)}if(e.customStyles&&H.overrideStyles(c,e.customStyles,e.styleNonce),!h)if(e.installationMethod!=="web-npm"){const C=c.createElement("script");C.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",C.onload=()=>{Le.setUpChunk(p.UpChunk)},C.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},f.appendChild(C)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const _="2.31.0",x=i||((y=a.eventEmitter)==null?void 0:y.emit);x==null||x("verify.view.version",{"view.version":_}),l&&t&&ge(u(Di,{}),l)}const Hi={configure:Ui};exports.default=Hi;
package/package.json CHANGED
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "homepage": "https://docs.sprig.com/docs/web-javascript",
48
48
  "license": "See LICENSE file",
49
- "version": "2.30.4"
49
+ "version": "2.31.0"
50
50
  }
@@ -1,12 +0,0 @@
1
- var ft=Object.defineProperty,ht=(e,t,n)=>t in e?ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W=(e,t,n)=>(ht(e,typeof t!="symbol"?t+"":t,n),n);import{h as F,s as Ce,f as w,S as g,l as I,i as _,v as Te,m as U,j as bt,E as V,D as M,c as Lt,r as j,k as Ut,n as St,o as kt,p as It,q as Fe,t as Me,u as Et,a as _t,x as me,b as xt,y as je}from"./metricsReporter-ChJRb1ed.js";const At='.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}#sprig-feedback-button{border-left:0;border-radius:0 8px 8px 0;display:grid;padding:8px;text-align:center;transition:all ease-in-out 1s;z-index:inherit}#sprig-feedback-button:hover{cursor:pointer}.sprig-feedback-button-label{writing-mode:vertical-lr;text-orientation:sideways}.sprig-feedback-button-right{transform:rotate(180deg)}.sprig-feedback-button-bottom{align-self:flex-end;margin-bottom:20px}.sprig-feedback-button-light{background:#efefee;color:#000;border:1px solid #e2e3e1}.sprig-feedback-button-dark{background:#000;color:#fff;border:1px solid #000000}#sprig-feedback-container{display:flex;align-items:center;position:fixed;transition:right .2s linear,left .2s linear;z-index:2147483646}.sprig-feedback-container-left{flex-flow:row-reverse}.sprig-feedback-container-center{top:50%;transform:translateY(-50%)}.sprig-feedback-container-bottom{bottom:0%;margin-bottom:15px}.sprig-feedback-loading-container{align-items:center;background-color:#fff;border:2px solid var(--feedback-border);display:flex;max-height:90vh;max-width:90vw;min-width:0px}.sprig-feedback-loading-container-left{border-left:none;border-radius:0 8px 8px 0}.sprig-feedback-loading-container-right{border-right:none;border-radius:8px 0 0 8px}#sprig-feedback-error-container{margin:auto;text-align:center;width:360px}.sprig-feedback-error-text{font-weight:400;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}#sprig-feedback-loading-container .ul-container{position:relative;max-height:inherit}#sprig-feedback-loading-animation{position:absolute}.sprig-feedback-loading-container-previews iframe{max-height:inherit!important}',Ne="360px",Dt="ul-app",Rt="#e6e6e6",Ot="#bd282a",Pt=500,Ct=1030,ze=()=>{try{return window.parent.Intercom}catch{return null}},Tt=()=>{const e=ze();e&&(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},Ft=()=>{const e=ze();e&&(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))},Mt=Object.freeze(Object.defineProperty({__proto__:null,disable:Ft,enable:Tt},Symbol.toStringTag,{value:"Module"})),Be=[Mt];class qe{static disable(){Be.forEach(t=>t.disable())}static enable(){Be.forEach(t=>t.enable())}}const We="ul-view-sdk-script",jt=["ios","android"],C="visitors",T="environments";async function R(e,t){var n,o,r;const{shouldDropOnRateLimit:i,...a}=t;a.headers=Object.assign(F(window.UserLeap),a.headers);const s=await Ce(e,{...a,shouldDropOnRateLimit:i});if(s.ok){const d=(n=s.headers)==null?void 0:n.get("Authorization"),p=d?d.split(" "):void 0,l=p&&p.length===2?p[1]:void 0,c=(o=s.headers)==null?void 0:o.get("x-ul-visitor-id");l&&c&&(c!==window.UserLeap.visitorId||window.UserLeap.token!==l)&&(E("token",l),E("vid",c),w.emit(g.VisitorIDUpdated,{visitorId:c}),window.UserLeap.token=l,window.UserLeap.visitorId=c)}return(r=s.json)!=null&&r.logMessage&&console.warn(`[Sprig] ${s.json.logMessage}`),s}function E(e,t){const n=I.getItem("userleap.ids");let o={};if(n)try{o=JSON.parse(n)}catch(i){i instanceof Error&&(i.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",i)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",i)}let r=o[window.UserLeap.envId];r?r[e]=t:r={[e]:t},o[window.UserLeap.envId]=r;try{I.setItem("userleap.ids",JSON.stringify(o))}catch(i){i instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${i.message}`)}}function ye(){return window.previewMode?"0":window.UserLeap.visitorId??""}function D(e,t,n){const o=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach(r=>{o.push(r),r===T?o.push(window.UserLeap.envId):r===C&&o.push(ye())}),n&&o.push(n),o.join("/")}const $=async(e,t)=>{var n,o,r;const{context:i,forceBrandedLogo:a,endCard:s,isFeedback:d=!1,heatmap:p,locale:l,previewMode:c,productConfig:u,questions:f,responseGroupUid:y,surveyId:m,uuid:x,vid:b,sessionReplay:h,studyType:A}=e,S=F(window.UserLeap),k=fe(S),pe=ve(S);if(_(`Attempting to display survey: ${m}`),h)if(_("Survey has replay attached"),k)w.emit(g.ReplayCapture,{responseGroupUid:y,hasQuestions:!!(f!=null&&f.length),surveyId:m,uploadId:h.uploadId,replayType:h.replayDurationType??"before",seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:{mediaRecordingUid:Te(),mediaType:"screen",questionId:1,responseGroupUid:y,surveyId:m,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0}});else{if(!U.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};U.replay.scheduleOrCaptureReplay({responseGroupId:y,surveyId:m,visitorId:b,replayParams:h,completeUploadHeaders:S,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:f.length===0})}if(p){if(!U.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};const{eventId:L,replayParams:ge,responseGroupUid:yt,surveyId:vt}=p;await U.replay.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:300,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests,teardownAfter:!0}),U.replay.scheduleCapture({apiUrl:window.UserLeap._API_URL,completeUploadHeaders:S,eventId:L,isHeatmap:!0,replayParams:ge,responseGroupId:yt,surveyId:vt,triggerTimestamp:Date.now(),visitorId:b})}if(b==null||!(f!=null&&f.length))return _(`Not displaying survey: vid: ${b} / questions: ${f}`),{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){_("Already displaying a survey");const L="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(L),{success:!1,message:L,surveyState:"no survey"}}if(b!==window.UserLeap.visitorId&&x!==window.UserLeap.visitorId&&!window.previewMode){const L="Attempted to display survey to a different visitor";return _(L),window.UserLeap.reportError("DisplaySurvey",new Error(L)),{success:!1,message:L,surveyState:"no survey"}}_(`Showing survey: ${m}`),(n=U.replay)==null||n.RecordSurveyShown({id:m,userAgent:window.navigator.userAgent}),qe.disable(),w.emit(g.SurveyWillPresent,{name:g.SurveyWillPresent,"survey.id":m});let Y,X=document.createElement("div"),Z,P,ee;const Re=L=>{const{"view.version":ge}=L;ge!==S["x-ul-sdk-version"]&&$e(),w.removeListener("verify.view.version",Re)};w.on("verify.view.version",Re),window.UserLeap.useMobileStyling=pe,bt(S)?(Y="ul-direct-embeded-frame",Z=document.head,P=window,ee=!1,k&&(Ve(d),X.id=Y,window.UserLeap.container.appendChild(X),He(),w.emit(g.SurveyLifeCycle,{state:"presented"}),w.emit(g.SurveyPresented,{name:g.SurveyPresented,"survey.id":m}))):{frameId:Y,contentWinDocHead:Z,contentWindow:P,hasOverlay:ee,iframe:X}=Wt({productConfig:u,useMobileStyling:pe,surveyId:m,isFeedback:d}),window.UserLeap.frameId=Y;const wt=L=>{w.once(g.CloseSurveyOnOverlayClick,L)},B={apiURL:window.UserLeap._API_URL,cards:f,configureExitOnOverlayClick:wt,context:i,endCard:s,envId:window.UserLeap.envId,eventEmitFn:w.emit.bind(w),fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,forceBrandedLogo:a,frame:X,headers:S,locale:l,mobileSDKVersion:window.UserLeap.mobileSDKVersion,previewKey:I.getItem("sprig.previewKey"),previewMode:c,productConfig:{framePosition:u?.framePosition,desktopDisplay:u?.desktopDisplay,placement:u?.placement},responseGroupUid:y,startingQuestionIdx:(o=window.UserLeap.config)==null?void 0:o.startingQuestionIdx,studyType:A,styleNonce:window.UserLeap.styleNonce,surveyId:m,tabTitle:document.title,trackPageViewUrl:t,ulEvents:V,upchunkLibraryURL:window.UserLeap.upchunkLibraryURL,useMobileStyling:pe,userId:x,viewDocument:P?.document,viewWindow:P,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},...window.UserLeap._config};(r=window.UserLeap._config)!=null&&r.startingQuestionIdx&&(window.UserLeap._config={...window.UserLeap._config,startingQuestionIdx:null});const gt=(d?window.UserLeap.feedbackCustomStyles:window.UserLeap.customStyles)??u.customStyles;B.customStyles=gt,P&&(P.__cfg=B);function mt(){const L=document.createElement("script");return window.UserLeap.nonce&&L.setAttribute("nonce",window.UserLeap.nonce),L.id=We,L}const ue=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:B.path,Oe=document.getElementById(We);Oe&&Oe.remove();const we=mt(),Pe=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(B.installationMethod==="web-npm"||B.installationMethod==="web-npm-bundled"){const{default:L}=await import("./view-CVyjVx3W.js");L.configure(B),ee&&window.UserLeap.container&&Pe()}else ue&&(we.src=ue,ee&&we.addEventListener("load",()=>{window.UserLeap.container&&Pe()}),P?.addEventListener("error",L=>{L.target instanceof HTMLScriptElement&&L.target.src===ue&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));return Z?.appendChild(we),{success:!0,surveyState:"ready",surveyId:m,responseGroupUid:y}};function ve(e){var t;if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const n=((t=window.UserLeap.windowDimensions)==null?void 0:t.width)??document.body.clientWidth;return fe(e)||n>10&&n<Pt}function fe(e){return jt.includes(e["userleap-platform"])}const he="ul-frame";window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const Nt="rgba(255,255,255, 0.95)",zt="rgba(0,0,0,0.9)",be="0px",Ve=(e,t)=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className=`ul-container ${e&&"ul-container-feedback"}`;const n=Qe();t&&n&&!window.UserLeap.useMobileStyling?n.appendChild(window.UserLeap.container):document.body.appendChild(window.UserLeap.container)},$e=(e,t)=>{var n;$t();const o=window.UserLeap.container;if(o)try{(n=o.parentNode)==null||n.removeChild(o),window.UserLeap.container=null,E("trackStartUrl",null),w.emit(g.SurveyLifeCycle,{state:"dismissed"}),w.emit(g.SurveyClosed,{name:g.SurveyClosed,initiator:e,studyType:t})}catch(r){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+o),r instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",r)}},He=()=>{w.once(g.SurveyWillClose,({initiator:e,studyType:t})=>{w.removeAllListeners(g.CloseSurveyOnOverlayClick),$e(e,t)})},Bt=(e,t)=>{const n={position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646},o=t?e.overlayStyleMobile:e.overlayStyle;n["background-color"]=o==="light"?Nt:zt,t||(n.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,n)},qt=(e,t,n,o)=>{var r,i;const a={position:"fixed",bottom:"0px",right:be,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out",maxWidth:"100%"},s=Object.assign({},t,window.UserLeap),{desktopDisplay:d}=t||{},p=d==="center-modal";p&&(s.framePosition="center");let l,c=!1;if(n)(r=window.UserLeap.windowDimensions)!=null&&r.width?a.width=`${window.UserLeap.windowDimensions.width}px`:a.width="100%",(i=window.UserLeap.windowDimensions)!=null&&i.height?a.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?a.maxHeight=window.UserLeap.maxHeight:a.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(s.overlayStyleMobile)&&(c=!0);else{a.width=Ne,a.maxHeight=window.UserLeap.maxHeight||"66vh";const u=()=>{c=!0,l={margin:"auto",position:"static"}};if(o)p?u():l={position:"relative",height:"300px"};else switch(s.framePosition){case"bottomLeft":l={left:be};break;case"topLeft":l={left:be,top:0};break;case"topRight":l={top:0};break;case"center":u();break}}return c&&Bt(s,n),Object.assign(e.style,a,l),c},Wt=({productConfig:e,useMobileStyling:t,surveyId:n,isFeedback:o})=>{var r,i;const a=he,s=o&&e.desktopDisplay==="slider";Ve(o,s),Vt();const d=document.createElement("iframe");d.id=a,d.setAttribute("title","Sprig User Feedback Dialog");const p=qt(d,e,t,o);He();let l=!1;d.setHeight=y=>{(parseInt(d.style.height)!=y||!l)&&(l=!0,d.style.height=`${y}px`,w.emit(g.SurveyHeight,{name:g.SurveyHeight,contentFrameHeight:y}))};let c=!1;d.setWidth=y=>{(parseInt(d.style.width)!=y||!c)&&(c=!0,d.style.width=`${y}px`,w.emit(g.SurveyWidth,{name:g.SurveyWidth,contentFrameWidth:y}))},(r=window.UserLeap.container)==null||r.appendChild(d),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{w.emit(g.CloseSurveyOnOverlayClick)}),w.emit(g.SurveyLifeCycle,{state:"presented"}),w.emit(g.SurveyPresented,{name:g.SurveyPresented,"survey.id":n});const u=(i=d.contentWindow)==null?void 0:i.document;if(u&&(u.open("text/html","replace"),u.write("<!doctype html><head></head><body></body></html>"),u.close(),!t)){const y=u.body;y.style.display="flex",y.style.alignItems="center"}const f=u?.head;return{frameId:a,contentWinDocHead:f,contentWindow:d.contentWindow,hasOverlay:p,iframe:d}},Ge={[g.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},Vt=()=>{Object.entries(Ge).forEach(([e,t])=>{w.on(e,t)})},$t=()=>{Object.entries(Ge).forEach(([e,t])=>{w.off(e,t)})},Ht=1,Je=e=>e instanceof HTMLElement||e instanceof SVGElement,te=(e,t,n)=>{const o="ul-custom-style",r=e.getElementById(o);if(r){r.textContent=t;return}const i=e.createElement("style");n&&(i.nonce=n),i.textContent=t,i.id=o,e.head.appendChild(i)},Ke=e=>{const t=e.querySelector(".ul-card__container");let n=600,o=360;if(t){n=t.scrollHeight;const r=getComputedStyle(t),i=parseFloat(r.marginTop)+parseFloat(r.marginBottom),a=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),s=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);n+=i+a+s;const d=t.querySelector(".ul-card--matrix_grid");o=d?d.scrollWidth:t.scrollWidth;const p=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),l=parseFloat(r.marginLeft)+parseFloat(r.marginRight),c=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth);o+=l+c+p}return[n+Ht,o]},Gt=e=>{const t=e.querySelector(".ul-card__container");t&&(t.scrollTop=0)},Qe=()=>v,q=()=>document.getElementById("sprig-feedback-container"),Le=()=>document.getElementById("sprig-feedback-loading-animation"),Jt=()=>{if(Le())return;const e=document.createElement("div");return e.className="ul-loading-spinner-container",e.id="sprig-feedback-loading-animation",e.role="progressbar",e.setAttribute("aria-live","polite"),e.setAttribute("aria-busy","true"),e.setAttribute("aria-label","Processing..."),e.innerHTML=`
2
- <div class="ul-loading-spinner">
3
- <div class="first"></div>
4
- <div class="second"></div>
5
- <div class="third"></div>
6
- <div class="fourth"></div>
7
- </div>
8
- `,e},Ye=()=>!!document.getElementById(he);let Xe=!1,v=null,O=null,Ue=!1,H=null,G=null;const Kt=["bottom-left","bottom-right","center-left","center-right"],Qt=e=>{if(q()||!Kt.includes(e))return;const[t,n]=e.split("-"),o=document.createElement("div");o.id="sprig-feedback-container",o.classList.add(`sprig-feedback-container-${n}`,`sprig-feedback-container-${t}`),document.body.appendChild(o)},re=()=>{var e;const t=window.UserLeap.container;return((e=t?.parentElement)==null?void 0:e.id)==="sprig-feedback-loading-container"},Ze=()=>document.getElementById("sprig-feedback-error-container"),et=()=>{if(!v)return 0;const e=v?.clientWidth,t=window.getComputedStyle(v),n=parseInt(t.borderRightWidth||"0"),o=parseInt(t.borderLeftWidth||"0");return e+n+o},ne=e=>{const t=q();t&&(G!=null&&G.endsWith("right")?t.style.right=`${e}px`:G!=null&&G.endsWith("left")&&(t.style.left=`${e}px`))},Se=()=>{if(v&&(re()||Ze())){w.off(g.SurveyAppeared,J),ke();const e=et();return ne(-e),!0}return!1},J=()=>{if(!v||!O)return;const e=Le();e&&e.remove(),v.style.height="auto",v.style.width="auto",O.disabled=!1,Ue=!1},ke=()=>{if(v&&!Le()){const e=Jt();e&&(v.style.height="300px",v.style.width="360px",v.appendChild(e))}},tt=()=>{!v||!O||(ne(0),O.disabled=!0,Ue=!0)},Yt=async e=>{const t=await R(D("1",[C],"startFeedbackStudy"),{body:JSON.stringify({surveyUuid:e}),method:"POST"});return t.ok?t.json:null},rt=async(e,t,n)=>{const{buttonTheme:o,customStyles:r,eventId:i,placement:a,desktopDisplay:s,feedbackLabel:d,surveyUuid:p,surveyId:l}=e;window.UserLeap.feedbackCustomStyles=void 0;let c=q();if(c){if(!t&&i===H)return;c.remove(),w.off(V.SURVEY_FADING_OUT,Se)}if(H=i,!document.getElementById("sprig-feedback-style")){const{head:b}=document,h=document.createElement("style");h.id="sprig-feedback-style",h.textContent=At,h.nonce=window.UserLeap.styleNonce,b.appendChild(h)}te(document,r??"",window.UserLeap.styleNonce),Xe=s==="center-modal",G=a;const[u,f]=a.split("-");Qt(a),c=q(),O=document.createElement("button");const y=document.createElement("div");y.className="sprig-feedback-button-label",y.innerText=d,O.appendChild(y),O.id="sprig-feedback-button",O.classList.add(`sprig-feedback-button-${f}`,`sprig-feedback-button-${u}`,`sprig-feedback-button-${o}`,"fade-in-transition"),w.on(V.SURVEY_FADING_OUT,Se),O.addEventListener("click",async()=>{const b=document.getElementById("sprig-feedback-error-container");if(Ye()||Ze()){if(Se()){w.emit(g.SurveyWillClose,{name:g.SurveyWillClose,initiator:M.FeedbackClosed,studyType:"feedbackButton"});const S=q();b&&S&&(S.remove(),H=null,v=null)}return}const h=F(window.UserLeap);if(!ve(h)&&!Ue&&tt(),t){v&&v.classList.add("sprig-feedback-loading-container-previews"),await $(t),J();return}const A=await Yt(p);if(A)w.once(g.SurveyAppeared,J),$({...A,studyType:"feedbackButton"},n);else if(v){const S=Zt();v.appendChild(S),J(),v.style.height="300px",v.style.width="360px"}}),c?.appendChild(O),w.emit(g.FeedbackButtonLoaded,{name:g.FeedbackButtonLoaded,"survey.id":l});const{useMobileStyling:m,_config:{border:x}}=window.UserLeap;if(!Xe&&!m){const b=document.createElement("div");b.id="sprig-feedback-loading-container",b.className=`sprig-feedback-loading-container sprig-feedback-loading-container-${f}`,b.style.setProperty("--feedback-border",x),v=b,ke(),c?.appendChild(b);const h=et();ne(-h)}else ne(0);window.UserLeap._config.isOnQuestionsTab&&t&&!re()&&v&&(tt(),ke(),v&&v.classList.add("sprig-feedback-loading-container-previews"),$(t),J())},Xt=()=>{if(re())return;const e=q();e&&(Lt(H)||(e.remove(),H=null,v=null))},Zt=()=>{const e=document.createElement("div");e.id="sprig-feedback-error-container",e.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
9
- <circle cx="20" cy="20" r="14.5" stroke="#B0B5B7" stroke-width="3"/>
10
- <path d="M20 12L20 21.6" stroke="#B0B5B7" stroke-width="3" stroke-linecap="round"/>
11
- <circle cx="19.9984" cy="27.6" r="1.6" fill="#B0B5B7"/>
12
- </svg>`;const t=document.createElement("h3");return t.className="sprig-feedback-error-text",t.innerText="There was an error while loading the survey",e.appendChild(t),e},er="!launch_darkly_";class tr{constructor(){W(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>this._ldData[`${er}${n}`]=(t[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const Ie=new tr;Object.freeze(Ie);const rr="!optimizely_experiments_";class nr{constructor(){W(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:o}=t;try{return n&&Object.keys(this._optimizelyData).map(r=>{delete this._optimizelyData[r]}),o&&o.map(r=>{const{id:i,variation:a}=r,s=this.transformExperimentId(i);a&&typeof a=="string"&&(this._optimizelyData[s]=a)}),!0}catch(r){return r instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",r),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return rr+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const o=Object.keys(n).map(r=>{var i,a;return(i=n[r].variation)!=null&&i.name?{id:r,variation:(a=n[r].variation)==null?void 0:a.name}:{id:r,variation:"Original"}});return this.setOptimizelyExperiment({experiments:o},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const ie=new nr;Object.freeze(ie);class ir{constructor(t,n){W(this,"paused"),W(this,"queue"),W(this,"ul"),this.ul=t,this.paused=!1,this.queue=[],this.flush(n)}flush(t){const n=t.length;if(n)for(let o=0;o<n;o++)this.push(t[o])}isPaused(){return this.paused}pause(){this.paused=!0}unpause(){this.paused=!1;const t=this.queue.slice();this.empty(),this.flush(t)}push(t){if(this.paused)this.queue.push(t);else if(t instanceof Function)t();else{const n=Array.prototype.slice.call(t,1),o=t[0],r=this.ul[o];r instanceof Function?r.apply(this.ul,n):o&&console.warn("[Sprig] (ERR-100) No valid UserLeap action called",o)}}perform(t){if(this.paused){let n=()=>{};const o=new Promise(function(r){n=function(){r(t())}});return this.queue.push(n),o}else return t()}empty(){this.queue.length=0}}let nt,it;const Ee=e=>{let t=0,n=e.firstElementChild;for(;n;)t+=Ee(n),n.shadowRoot&&(t+=Ee(n.shadowRoot)),n=n.nextElementSibling,t++;return t},or=()=>document.documentElement.innerHTML.length,ot=()=>{nt.report(Ee(document.body)),it.report(or())},sr=(e=10*1e3)=>{nt=j("sdk_dom_nodes_count"),it=j("sdk_page_html_characters"),ot(),setInterval(ot,e)},_e=(e,t)=>{const n=performance.now();document.hidden?setTimeout(()=>_e(e,t),e):setTimeout(()=>{const o=performance.now()-n;t.report(o/1e3),setTimeout(()=>_e(e,t),e)},0)},ar=(e=1e3)=>{const t=j("sdk_event_queue_latency_seconds");_e(e,t)};let oe,se,ae,de,N={},st;const le=(e,t=1)=>{const{name:n}=e;N[n]=(N[n]||0)+t},at=e=>{let t=1;return e.childNodes.forEach(n=>{t+=at(n)}),t},dt=e=>{let t=0;return e.forEach(n=>{t+=at(n)}),t},dr=e=>{switch(e.type){case"childList":le(oe,dt(e.addedNodes)),le(se,dt(e.removedNodes));return;case"attributes":le(ae);return;case"characterData":le(de);return}},lr=e=>e.forEach(dr),cr=()=>{st=new MutationObserver(lr),st.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0})},pr=()=>{oe.report(N[oe.name]||0),se.report(N[se.name]||0),ae.report(N[ae.name]||0),de.report(N[de.name]||0),N={}},ur=(e=1*1e3)=>{oe=j("sdk_mutations_nodes_added"),se=j("sdk_mutations_nodes_removed"),ae=j("sdk_mutations_attributes_changed"),de=j("sdk_mutations_character_data"),cr(),setInterval(pr,e)},wr=({webMetricsEnabled:e,reportingIntervalSeconds:t,thresholds:n,postMetrics:o})=>{Ut(n,(r,i)=>{var a,s;if((a=U.replay)!=null&&a.isReplayRecording()){const d=`Value: ${r} on ${i.metric} violated threshold of ${i.type} ${i.value}`;(s=U.replay)==null||s.disableRecording("Threshold violated",new Error(d),{reportError:!1}),window.UserLeap.reportError("Sdk Performance Metric threshold violated",new Error("Sdk Performance Metric threshold violated"),{metricName:i.metric,type:i.type,value:i.value},{metricName:i.metric}),kt()}}),St({reportingIntervalSeconds:t,postMetrics:o}),e&&(ar(),sr(),ur())},gr={test:"test"},mr=["popState","pushState","replaceState"],K="!email",xe="pageUrl";function yr(e,t){const{pageUrlEvents:n,interactiveEvents:o,dismissOnPageChange:r}=window.UserLeap._config;if(!r)return!0;const i=[];n&&n.length&&i.push(...n),o&&o.length&&i.push(...o);const a=e&&i.find(s=>s.id===e);return a?me(a,window.location.href):t===window.location.href}function Q(e){var t;const{pageUrlEvents:n,interactiveEvents:o,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!=="web")return;const a=z("trackStartUrl"),s=a?String(a):null;n&&ut(window.location.href),o&&(ct(),vr()),Qe()&&Xt(),_t.getItem("sprig.isCapturingHeatmap")&&((t=U.replay)==null||t.checkPendingHeatmapsUrl()),!re()&&r&&s&&s!==window.location.href&&e&&mr.includes(e.type)&&window.UserLeap("dismissActiveSurvey",M.PageChange)}const lt={capture:!0},vr=()=>{const e=window.UserLeap._config.interactiveEvents.filter(n=>me(n,window.location.href)).map(n=>{const{name:o,properties:r}=n,{selector:i,innerText:a}=r;return i?s=>{if(Je(s.target))try{s.target.closest(i)&&window.UserLeap("track",o)}catch{}return!1}:s=>(Je(s.target)&&s.target.innerText===a&&window.UserLeap("track",o),!1)}),t=n=>e.forEach(o=>o(n));window.UserLeap._config.interactiveEventsHandler=t,window.addEventListener("click",t,lt)},ct=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,lt),delete window.UserLeap._config.interactiveEventsHandler};function fr(){["hashchange","popstate"].forEach(e=>window.addEventListener(e,Q,!0))}function hr(){["hashchange","popstate"].forEach(e=>window.removeEventListener(e,Q,!0)),window.UserLeap._config.interactiveEvents&&ct()}function br(e){const t=new URL(D("1",[T],"questions"));return Object.entries(e||{}).forEach(([n,o])=>{o&&t.searchParams.append(n,String(o))}),t.toString()}function z(e){const t=I.getItem("userleap.ids");if(t)try{const n=JSON.parse(t)[window.UserLeap.envId];return n&&n[e]||null}catch(n){n instanceof Error&&(n.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function pt(){window.previewMode||(window.UserLeap.visitorId=Te(),_(`Generating new vid: ${window.UserLeap.visitorId}`),E("vid",window.UserLeap.visitorId),w.emit(g.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function ut(e,t,n,o){var r,i,a;if(e.endsWith("mock_snippet.html"))return;_(`Tracking page view: ${e}`);const s=window.UserLeap._config.pageUrlEvents;let d=!1;if(s&&s.length)for(let m=0;m<s.length&&(d=me(s[m],e),!d);m++);if(!d)return;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig trackPageView",e);const p=10,l=1;let c=[];const u={viewedAt:Date.now(),location:e},f={url:e};o&&(f.trackPageView=!0);const y=I.getItem("userleap.pageviews");try{if(c=y?JSON.parse(y):[],Array.isArray(c)||(c=[]),c.length>0){const m=c[c.length-1],x=(Date.now()-m.viewedAt)/1e3;if(m.location!=e&&x>l){const b=(r=document?.querySelector('meta[name="description"]'))==null?void 0:r.getAttribute("content");(i=U.replay)==null||i.RecordPageView({...b&&{description:b},url:e,referrer:document.referrer,pageTitle:document.title})}(m.location!=e&&x>l||x>p)&&(window.UserLeap._queue.push(["track",xe,t,f,n]),c.push(u))}else window.UserLeap._queue.push(["track",xe,t,f,n]),c.push(u),(a=U.replay)==null||a.RecordPageView({url:e});c.length>5&&c.splice(0,c.length-5),I.setItem("userleap.pageviews",JSON.stringify(c))}catch(m){m instanceof Error&&window.UserLeap.reportError("trackPageView",m,{pageViewsStorage:y}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function Lr(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(t=>function(...n){const o=t.apply(this,n),r=new Event("pushState");return window.dispatchEvent(r),Q(r),o})(e.pushState)),"replaceState"in e&&(e.replaceState=(t=>function(...n){const o=t.apply(this,n),r=new Event("replaceState");return window.dispatchEvent(r),Q(r),o})(e.replaceState)),fr()}async function Ae(e,t){const n=ye();e&&!t&&(window.UserLeap._config.mode=gr.test);const o=F(window.UserLeap),r=ve(o),i=await R(br({desktopDisplay:window.UserLeap._config.desktopDisplay,isMobile:r,previewLanguage:window.UserLeap._config.previewLanguage,surveyid:e?.surveyId,surveytemplateid:e?.surveyTemplateId,vid:n}),{shouldDropOnRateLimit:!0});if(!i.ok)return i.reportError&&i.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",i.error),window.UserLeap.reportError("getQuestions",i.error)),{success:!1,surveyState:"no survey"};if(i.json.delay&&await je(i.json.delay),i.json.isFeedback){const{feedbackLabel:a,productConfig:s,surveyUuid:d,feedbackCustomStyles:p}=i.json,{buttonTheme:l,placement:c,desktopDisplay:u}=s,f={customStyles:p,buttonTheme:l,desktopDisplay:u,eventId:0,feedbackLabel:a,placement:c,surveyUuid:d,surveyId:e?.surveyId};rt(f,i.json)}else return $(i.json)}function Ur(e){let t=e.length;for(;t;){const n=Math.floor(Math.random()*t);t-=1;const o=e[t];e[t]=e[n],e[n]=o}}function Sr(e){if(!e)return;window.UserLeap._config=e,e.mute&&window.UserLeap._queue.pause();const{interactiveEvents:t,pageUrlEvents:n,dismissOnPageChange:o}=e;t&&Ur(t),(t||n||o)&&(Lr(),Q())}async function kr(e,t){var n,o;let r=!0;return t&&(n=e?.json)!=null&&n.surveyId&&(window.UserLeap.delayingSurvey=!0,r=await t(e.json.surveyId),window.UserLeap.delayingSurvey=!1,!r)?!1:((o=e?.json)!=null&&o.delay&&(window.UserLeap.delayingSurvey=!0,await je(e.json.delay),window.UserLeap.delayingSurvey=!1),r)}const Ir=function(e){if(!window.UserLeap)return;const t=async(r={})=>{var i,a,s,d,p;const{userId:l,anonymousId:c,metadata:u={},properties:f,showSurveyCallback:y}=r;let{eventName:m}=r;if(window.UserLeap.debugMode&&m!==xe&&console.info("[DEBUG] Sprig track",r),e.mode==="test")return;const x=I.getItem("sprig.previewKey")??void 0;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!l){const k="[Sprig] - Skipping tracking without userId";return console.warn(k),{success:!1,message:k,surveyState:"no survey"}}if(!m||m.trim().length===0){m=m?String(m):"";const k="[Sprig] - Invalid event name "+m;return console.warn(k),{success:!1,message:k,surveyState:"no survey"}}const b=window.location.href;if(u.url||(u.url=b),E("trackStartUrl",b),(a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.optimizelyEnabled){const k=F(window.UserLeap);fe(k)||ie.getAndSetWebOptimizelyExperiments(),u.optimizelyExperiments=Object.assign({},ie.getAllOptimizelyExperiments())}(d=(s=window.UserLeap)==null?void 0:s._config)!=null&&d.launchDarklyEnabled&&(u.launchDarklyFlags=Ie.getAllLaunchDarklyVariations()),l&&(window.UserLeap.userId=l),c&&(window.UserLeap.partnerAnonymousId=c),f&&(u.eventProperties=f),(p=U.replay)==null||p.RecordEvent({name:m,url:u.url}),_(`Tracking event: ${m}`);const h=window.UserLeap.delayingSurvey||Ye()?await R(D("1",[C],"events/batch"),{body:JSON.stringify({events:[{event:m,metadata:u}],previewKey:x}),method:"POST",shouldDropOnRateLimit:!0}):await R(D("1",[C],"events"),{body:JSON.stringify({event:m,metadata:u,previewKey:x}),method:"POST",shouldDropOnRateLimit:!0});if(!h.ok){const k="[Sprig] (ERR-421) Failed to track event";return h.reportError&&(console.warn(k,h.error),h.error&&window.UserLeap.reportError("track",h.error)),{success:!1,message:k,error:h.error,surveyState:"no survey"}}l&&E("uid",l),c&&E("aid",c);const A=h.json;A.invalidPreviewKey&&I.removeItem("sprig.previewKey");const S=u.trackPageView?u.url:void 0;return A!=null&&A.feedbackButton&&rt(A.feedbackButton,void 0,S),await kr(h,y)?yr(A.eventId,b)?$(A,S):{success:!1,message:"Study should not be displayed after page navigation",surveyState:"no survey"}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:"no survey"}},n=(r,i)=>{var a;const s=(a=r?.querySelector(`[id="${he}"]`))==null?void 0:a.contentDocument;s&&te(s,i)},o={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",M.Override),Ae({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",M.Override),Ae({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",M.Override),Ae({surveyId:r},!1)},previewSurvey(r){o._previewSurvey(r)},reviewSurvey(r){o._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=M.API){w.emit(g.SurveyWillClose,{name:g.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0&&i!==!1){const a="[Sprig] - Disregarding empty attribute / value provided";return console.warn(a),{success:!1,message:a}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),e.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const l="[Sprig] - Disregarding empty payload provided";return console.warn(l),{success:!1,message:l}}const{userId:i,anonymousId:a,attributes:s}=r;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const l="[Sprig] - Skipping tracking without userId";return console.warn(l),{success:!1,message:l}}if(!s&&(!i||window.UserLeap.userId===i)&&(!a||window.UserLeap.partnerAnonymousId===a))return{success:!0};const d={};i&&(d.userId=window.UserLeap.userId=i),a&&(d.partnerAnonymousId=window.UserLeap.partnerAnonymousId=a);let p;return s?(s.email&&!Object.prototype.hasOwnProperty.call(s,K)&&(s[K]=s.email,delete s.email),_(`Setting attributes: ${JSON.stringify(s)}`),p=await R(D("1",[T,C],"attributes"),{body:JSON.stringify(s),method:"PUT"}),!p.ok&&p.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",p.error),p.error&&window.UserLeap.reportError("identifyAndSetAttributes",p.error))):p=await R(D("1",[T,C]),{body:JSON.stringify(d),method:"PUT"}),s&&s[K]&&(window.UserLeap.email=s[K]),p.ok&&(i&&E("uid",i),a&&E("aid",a)),{success:!!p.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),e.mode==="test")return;if(r==null||r.length===0){const a="[Sprig] - Disregarding empty attributes provided";return console.warn(a),{success:!1,message:a}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const a="[Sprig] - Skipping tracking without userId";return console.warn(a),{success:!1,message:a}}const i=await R(D("1",[T,C],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){w.on(g.SurveyLifeCycle,r)},async removeSurveyListener(r){w.removeListener(g.SurveyLifeCycle,r)},async addListener(r,i){w.on(r,i)},async removeListener(r,i){w.removeListener(r,i)},async removeAllListeners(){w.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||I.isStorageAvailable&&r&&I.setItem("sprig.previewKey",r)},async setUserId(r){var i;if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const d=`[Sprig] - Invalid userId ${r}`;return console.warn(d),{success:!1,message:d}}if(e.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const a=window.UserLeap.visitorId,s=await R(D("1",[T,C]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!s.ok){s.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",s.error),s.error&&window.UserLeap.reportError("setUserId",s.error));return}a!==window.UserLeap.visitorId&&((i=U.replay)==null||i.clearUserReplayData()),E("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,E("aid",r),{success:!0}},async track(r,i,a={},s=void 0){return t({eventName:r,properties:i,metadata:a,showSurveyCallback:s})},async identifyAndTrack(r){return await t(r)},trackPageView(r,i=void 0,a=void 0,s=!0){ut(r,i,a,s)},applyFeedbackStyles({button:r="",view:i=""}){window.UserLeap.feedbackCustomStyles=i,document.getElementById("sprig-feedback-style")&&te(document,r,window.UserLeap.styleNonce),n(document.querySelector(".ul-container-feedback"),i)},applyStyles(r){window.UserLeap.customStyles=r,n(window.UserLeap.container,r)},setWindowDimensions(r,i){var a,s;const d=typeof r=="string"?parseInt(r,10):r,p=typeof i=="string"?parseInt(i,10):i;if(!isNaN(d)&&!isNaN(p)&&(window.UserLeap.windowDimensions={width:d,height:p}),!window.UserLeap.frameId)return;const l=document.getElementById(window.UserLeap.frameId);l&&(window.UserLeap.useMobileStyling&&((a=window.UserLeap.windowDimensions)!=null&&a.width&&(l.style.width=`${window.UserLeap.windowDimensions.width}px`),(s=window.UserLeap.windowDimensions)!=null&&s.height&&(l.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),l.contentDocument&&(l.style.height=String(Ke(l.contentDocument)[0])+"px")),w.emit(g.SurveyDimensions,{name:g.SurveyDimensions,contentFrameWidth:l.clientWidth,contentFrameHeight:l.clientHeight}))},logoutUser(){var r;window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),_(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,I.removeItem("userleap.ids"),I.removeItem("userleap.pageviews"),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),pt(),(r=U.replay)==null||r.clearUserReplayData(),window.UserLeap._queue.unpause()},teardown(){hr(),window.UserLeap("dismissActiveSurvey",M.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var a,s;if(!((s=(a=window.UserLeap)==null?void 0:a._config)!=null&&s.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const d=typeof r=="string"?JSON.parse(r):r;ie.setOptimizelyExperiment(d,i)}catch(d){console.warn("[Sprig] Error with integrating Optimizely data"),d instanceof Error&&window.UserLeap.reportError("integrateOptimizely",d)}},integrateOptimizelyClient(r){var i,a;if(!((a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const s=({experiment:d,variation:p})=>{const l={experiments:[{id:d.id,variation:p.key}]};window.UserLeap("integrateOptimizely",l,!1)};r.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event",s)},importLaunchDarklyData(r){var i,a;if(!((a=(i=window.UserLeap)==null?void 0:i._config)!=null&&a.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}Ie.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),o.setAttribute(r,i)},async setEmail(r){return o.setAttribute(K,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),o.setEmail(r)},async _generateVideoUploadUrl(r){return Ar(r)},_reportMetric(r,i){xt(r,i)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:a}){var s;return U.replay?(s=U.replay)==null?void 0:s._completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:a,headers:F(window.UserLeap)}):(window.UserLeap.reportError("_completeSessionReplay",new Error("Replay module not registered")),!1)}};Object.assign(window.UserLeap,o)};async function Er(e){const t=F(window.UserLeap);document.addEventListener("securitypolicyviolation",Fe);const n=await Ce(D("1",[T],"config"),{headers:t});if(document.removeEventListener("securitypolicyviolation",Fe),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),Me("Disabled: failed to fetch configuration"),e;const o=n.json;return o!=null&&o.disabled?(Me(`Disabled: ${o.disabled}`),{disabled:o.disabled}):Object.assign({},o,e)}const _r=e=>typeof e=="object"&&e&&"inner"in e&&!!e.inner&&typeof e.inner=="object";async function xr(e,t,n={},o={}){var r,i;const a=window.__cfg&&window.__cfg.mode,s=ye(),d=window.UserLeap.envId,p=window.document.documentElement,l=_r(t)?{inner:{message:(r=t.inner)==null?void 0:r.message,stack:(i=t.inner)==null?void 0:i.stack}}:{},c={mode:a,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:p.clientWidth,clientHeight:p.clientHeight,location:window.location.href,language:window.navigator.language,...n,...l},u={action:e,err:{message:t.message,stack:t.stack},meta:c,vid:s,envId:d,...o},f=await R(D("1",null,"errors"),{method:"POST",headers:{"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(u),shouldDropOnRateLimit:!0});if(!f.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",t);else{const{presignedUrl:y}=f.json;Et(y)}}async function Ar(e){var t;if(!e)return;const n=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const o=await fetch(n,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(o.ok){const r=await o.json();return(t=r?.upload)==null?void 0:t.url}else return null}catch(o){console.warn("[Sprig] Error with generating video upload url"),o instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",o)}}function Dr(e={}){const t=new URLSearchParams(window.location.search).get("sprigPreviewKey")??"";window.UserLeap.UPDATES=V,window.UserLeap("setPreviewKey",t);async function n(){var o;if(window.UserLeap.loaded)return;if(_("Loading sprig on page load"),window.UserLeap.reportError=xr,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const d in window.UserLeap._config)window.UserLeap[d]=window.UserLeap._config[d];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const r=window.UserLeap.sampleRate;if(r){let d=z("sampled");if(d===null&&(d=Math.random()<r,E("sampled",d)),!d)return}else z("sampled")!==null&&E("sampled",null);window.UserLeap._API_URL||(window.UserLeap._API_URL="https://api.sprig.com");const i=[...window.UserLeap._queue];window.UserLeap._queue=new ir(window.UserLeap,[]),window.UserLeap._queue.pause();for(let d=0;d<i.length;d++)window.UserLeap._queue.push(i[d]);const a=z("token");a?(window.UserLeap.token=a,window.UserLeap.visitorId=z("vid"),window.UserLeap.userId=z("uid"),window.UserLeap.partnerAnonymousId=z("aid")):(I.removeItem("userleap.ids"),pt());const s=await Er(e);wr({webMetricsEnabled:s.metricsReportingEnabled,reportingIntervalSeconds:s.metricsReportingEnabled||s.mobileMetricsReportingEnabled?s.metricsReportingIntervalSeconds:0,thresholds:s.metricThresholds,postMetrics:async d=>{var p;await R(D("1",[T],"metrics"),{body:d,method:"POST",headers:{"x-ul-replay-enabled":`${!!((p=U.replay)!=null&&p.isReplayRecording())}`},shouldDropOnRateLimit:!0})}}),(o=U.replay)==null||o.initializeReplay({viewDocument:window.document,maxReplayDurationSeconds:s.maxReplayDurationSeconds,replayNonce:window.UserLeap.replayNonce,maxInflightRequests:window.UserLeap.maxInflightReplayRequests??2,replaySettings:s.replaySettings}),It(s.logBufferLimit,s.logLevel),Ir(s),await Sr(s),window.UserLeap._queue.unpause(),w.emit(g.SDKReady,{mobileMetricsReportingEnabled:!!s.mobileMetricsReportingEnabled,metricsReportingInterval:s.metricsReportingIntervalSeconds||0,metricsThresholds:s.metricThresholds||[],maxMobileReplayDurationSeconds:s.maxMobileReplayDurationSeconds,mobileReplaySettings:s.mobileReplaySettings}),w.emit(g.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}document.readyState==="complete"?n():window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",()=>{n()},!1)}class ce{constructor(){this.UPDATES=V}displaySurvey(t){window.Sprig("displaySurvey",t)}mute(){window.Sprig("mute")}unmute(){window.Sprig("unmute")}dismissActiveSurvey(){window.Sprig("dismissActiveSurvey")}setAttribute(t,n){window.Sprig("setAttribute",t,n)}setAttributes(t){window.Sprig("setAttributes",t)}identifyAndSetAttributes(t){window.Sprig("identifyAndSetAttributes",t)}removeAttributes(t){window.Sprig("removeAttributes",t)}addListener(t,n){window.Sprig("addListener",t,n)}removeListener(t,n){window.Sprig("removeListener",t,n)}removeAllListeners(){window.Sprig("removeAllListeners")}setEmail(t){window.Sprig("setAttribute","!email",t)}setUserId(t){window.Sprig("setUserId",t)}setPartnerAnonymousId(t){window.Sprig("setPartnerAnonymousId",t)}track(t,n={},o={}){window.Sprig("track",t,n,o)}identifyAndTrack(t){window.Sprig("identifyAndTrack",t)}trackPageView(t,n,o){window.Sprig("trackPageView",t,n,o)}applyStyles(t){window.Sprig("applyStyles",t)}setWindowDimensions(t,n){window.Sprig("setWindowDimensions",t,n)}logoutUser(){window.Sprig("logoutUser")}teardown(){window.Sprig("teardown")}}const De={configure:e=>{if(!e.envId&&!e.environmentId)throw new Error("Initialization Error: Sprig configure requires an environmentId");if(e.envId||(e.envId=e.environmentId??""),e.installationMethod="web-npm",window.Sprig)return window.Sprig;window.Sprig=function(){window.Sprig._queue.push(arguments)},Object.getOwnPropertyNames(ce.prototype).map(n=>{n!=="constructor"&&(window.Sprig[n]=ce.prototype[n])});const t=window.Sprig;return t.appId=e.envId,t._queue=[],window.UserLeap=t,Dr(e),window.Sprig}},Rr={sprig:De,SprigAPI:ce,configure:De.configure};export{Dt as A,qe as C,Ne as D,Ct as E,ce as S,Ke as a,Ot as b,Rr as c,Rt as d,te as o,Gt as r,De as s};