@sprig-technologies/sprig-browser 2.26.3 → 2.26.4
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.
- package/dist/{index-aRW0ww4B.js → index-GurVf9fu.js} +1715 -1568
- package/dist/index-rCLyJyii.cjs +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +1 -1
- package/dist/{view-OvpAXz1V.js → view-KfdScd8f.js} +945 -904
- package/dist/{view-oIOZ7KpC.cjs → view-TTq-V8ms.cjs} +5 -5
- package/package.json +1 -1
- package/dist/index-R4BhGZ2a.cjs +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-R4BhGZ2a.cjs");var x=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.Matrix="matrix",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(x||{}),Y=(e=>(e.Answered="answered",e.Contains="contains",e.DoesNotContain="notcontains",e.DoesNotInclude="list_dni",e.Equal="eq",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.LessThan="lt",e.LessThanOrEqual="lte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.NotEqual="neq",e.Partial="partial",e.Skipped="skipped",e))(Y||{}),ge=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(ge||{}),q=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(q||{}),pe=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(pe||{}),Se,S,rn,de,yt,sn,Xe,an,we={},ln=[],wo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ue=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function cn(e){var t=e.parentNode;t&&t.removeChild(e)}function B(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?Se.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??++rn,__i:-1,__u:0};return r==null&&S.vnode!=null&&S.vnode(i),i}function dn(){return{current:null}}function F(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 un(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 un(e)}}function et(e){(!e.__d&&(e.__d=!0)&&de.push(e)&&!Oe.__r++||yt!==S.debounceRendering)&&((yt=S.debounceRendering)||sn)(Oe)}function Oe(){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,S.vnode&&S.vnode(o),lt(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,mn(a,o,d),o.__e!=i&&un(o)),de.length>t&&de.sort(Xe));Oe.__r=0}function pn(e,t,n,o,r,i,s,a,d,l,h){var c,m,f,v,g,C=o&&o.__k||ln,_=t.length;for(n.__d=d,So(n,t,C),d=n.__d,c=0;c<_;c++)(f=n.__k[c])!=null&&typeof f!="boolean"&&typeof f!="function"&&(m=f.__i===-1?we:C[f.__i]||we,f.__i=c,lt(e,f,m,r,i,s,a,d,l,h),v=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&ct(m.ref,null,f),h.push(f.ref,f.__c||v,f)),g==null&&v!=null&&(g=v),65536&f.__u||m.__k===f.__k?d=hn(f,d,e):typeof f.type=="function"&&f.__d!==void 0?d=f.__d:v&&(d=v.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=d,n.__e=g}function So(e,t,n){var o,r,i,s,a,d=t.length,l=n.length,h=l,c=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):Ue(r)?ye(F,{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=Eo(r,n,s=o+c,h),r.__i=a,i=null,a!==-1&&(h--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&c--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?c++:a>s?h>d-s?c+=a-s:c--:c=a<s&&a==s-1?a-s:0,a!==o+c&&(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,h--);if(h)for(o=0;o<l;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function hn(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=hn(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"||(Ue(e)?e.some(function(n){oe(n,t)}):t.push(e)),t}function Eo(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 kt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wo.test(t)?n:n+"px"}function Pe(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||kt(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||kt(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:wt,i)):e.removeEventListener(t,i?St:wt,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 wt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(S.event?S.event(e):e)}function St(e){return this.l[e.type+!0](S.event?S.event(e):e)}function lt(e,t,n,o,r,i,s,a,d,l){var h,c,m,f,v,g,C,_,k,w,R,b,y,L,j,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[a=t.__e=n.__e]),(h=S.__b)&&h(t);e:if(typeof E=="function")try{if(_=t.props,k=(h=E.contextType)&&o[h.__c],w=h?k?k.props.value:h.__:o,n.__c?C=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(_,w):(t.__c=c=new Q(_,w),c.constructor=E,c.render=To),k&&k.sub(c),c.props=_,c.state||(c.state={}),c.context=w,c.__n=o,m=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),E.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ne({},c.__s)),ne(c.__s,E.getDerivedStateFromProps(_,c.__s))),f=c.props,v=c.state,c.__v=t,m)E.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(E.getDerivedStateFromProps==null&&_!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(_,w),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(_,c.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=_,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(N){N&&(N.__=t)}),R=0;R<c._sb.length;R++)c.__h.push(c._sb[R]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(_,c.__s,w),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,v,g)})}if(c.context=w,c.props=_,c.__P=e,c.__e=!1,b=S.__r,y=0,"prototype"in E&&E.prototype.render){for(c.state=c.__s,c.__d=!1,b&&b(t),h=c.render(c.props,c.state,c.context),L=0;L<c._sb.length;L++)c.__h.push(c._sb[L]);c._sb=[]}else do c.__d=!1,b&&b(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++y<25);c.state=c.__s,c.getChildContext!=null&&(o=ne(ne({},o),c.getChildContext())),m||c.getSnapshotBeforeUpdate==null||(g=c.getSnapshotBeforeUpdate(f,v)),pn(e,Ue(j=h!=null&&h.type===F&&h.key==null?h.props.children:h)?j:[j],t,n,o,r,i,s,a,d,l),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),C&&(c.__E=c.__=null)}catch(N){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),S.__e(N,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Ro(n.__e,t,n,o,r,i,s,d,l);(h=S.diffed)&&h(t)}function mn(e,t,n){t.__d=void 0;for(var o=0;o<n.length;o++)ct(n[o],n[++o],n[++o]);S.__c&&S.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(i){i.call(r)})}catch(i){S.__e(i,r.__v)}})}function Ro(e,t,n,o,r,i,s,a,d){var l,h,c,m,f,v,g,C=n.props,_=t.props,k=t.type;if(k==="svg"&&(r=!0),i!=null){for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!k&&(k?f.localName===k:f.nodeType===3)){e=f,i[l]=null;break}}if(e==null){if(k===null)return document.createTextNode(_);e=r?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,_.is&&_),i=null,a=!1}if(k===null)C===_||a&&e.data===_||(e.data=_);else{if(i=i&&Se.call(e.childNodes),C=n.props||we,!a&&i!=null)for(C={},l=0;l<e.attributes.length;l++)C[(f=e.attributes[l]).name]=f.value;for(l in C)f=C[l],l=="children"||(l=="dangerouslySetInnerHTML"?c=f:l==="key"||l in _||Pe(e,l,null,f,r));for(l in _)f=_[l],l=="children"?m=f:l=="dangerouslySetInnerHTML"?h=f:l=="value"?v=f:l=="checked"?g=f:l==="key"||a&&typeof f!="function"||C[l]===f||Pe(e,l,f,C[l],r);if(h)a||c&&(h.__html===c.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(c&&(e.innerHTML=""),pn(e,Ue(m)?m:[m],t,n,o,r&&k!=="foreignObject",i,s,i?i[0]:n.__k&&ve(n,0),a,d),i!=null)for(l=i.length;l--;)i[l]!=null&&cn(i[l]);a||(l="value",v!==void 0&&(v!==e[l]||k==="progress"&&!v||k==="option"&&v!==C[l])&&Pe(e,l,v,C[l],!1),l="checked",g!==void 0&&g!==e[l]&&Pe(e,l,g,C[l],!1))}return e}function ct(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(o){S.__e(o,n)}}function tt(e,t,n){var o,r;if(S.unmount&&S.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){S.__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||cn(e.__e),e.__=e.__e=e.__d=void 0}function To(e,t,n){return this.constructor(e,n)}function _e(e,t,n){var o,r,i,s;S.__&&S.__(e,t),r=(o=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],lt(t,e=(!o&&n||t).__k=B(F,null,[e]),r||we,we,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?Se.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),mn(i,e,s)}function fn(e,t){_e(e,t,fn)}function Po(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?Se.call(arguments,2):n),ye(e.type,a,o||e.key,r||e.ref,null)}function gn(e,t){var n={__c:t="__cC"+an++,__: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}Se=ln.slice,S={__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}},rn=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=F,de=[],sn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xe=function(e,t){return e.__v.__b-t.__v.__b},Oe.__r=0,an=0;function vn(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=vn(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function M(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=vn(e))&&(o&&(o+=" "),o+=t);return o}var re,U,qe,Et,be=0,_n=[],je=[],Rt=S.__b,Tt=S.__r,Pt=S.diffed,jt=S.__c,It=S.unmount;function he(e,t){S.__h&&S.__h(U,e,be||t),be=0;var n=U.__H||(U.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:je}),n.__[e]}function H(e){return be=1,dt(kn,e)}function dt(e,t,n){var o=he(re++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):kn(void 0,t),function(a){var d=o.__N?o.__N[0]:o.__[0],l=o.t(d,a);d!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=U,!U.u)){var r=function(a,d,l){if(!o.__c.__H)return!0;var h=o.__c.__H.__.filter(function(m){return m.__c});if(h.every(function(m){return!m.__N}))return!i||i.call(this,a,d,l);var c=!1;return h.forEach(function(m){if(m.__N){var f=m.__[0];m.__=m.__N,m.__N=void 0,f!==m.__[0]&&(c=!0)}}),!(!c&&o.__c.props===a)&&(!i||i.call(this,a,d,l))};U.u=!0;var i=U.shouldComponentUpdate,s=U.componentWillUpdate;U.componentWillUpdate=function(a,d,l){if(this.__e){var h=i;i=void 0,r(a,d,l),i=h}s&&s.call(this,a,d,l)},U.shouldComponentUpdate=r}return o.__N||o.__}function G(e,t){var n=he(re++,3);!S.__s&&pt(n.__H,t)&&(n.__=e,n.i=t,U.__H.__h.push(n))}function Ee(e,t){var n=he(re++,4);!S.__s&&pt(n.__H,t)&&(n.__=e,n.i=t,U.__h.push(n))}function le(e){return be=5,Ve(function(){return{current:e}},[])}function bn(e,t,n){be=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 Ve(e,t){var n=he(re++,7);return pt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function xn(e,t){return be=8,Ve(function(){return e},t)}function Cn(e){var t=U.context[e.__c],n=he(re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(U)),t.props.value):e.__}function ut(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function jo(e){var t=he(re++,10),n=H();return t.__=e,U.componentDidCatch||(U.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function yn(){var e=he(re++,11);if(!e.__){for(var t=U.__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 Io(){for(var e;e=_n.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(nt),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){U=null,Rt&&Rt(e)},S.__r=function(e){Tt&&Tt(e),re=0;var t=(U=e.__c).__H;t&&(qe===U?(t.__h=[],U.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=je,n.__N=n.i=void 0})):(t.__h.forEach(Ie),t.__h.forEach(nt),t.__h=[],re=0)),qe=U},S.diffed=function(e){Pt&&Pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_n.push(t)!==1&&Et===S.requestAnimationFrame||((Et=S.requestAnimationFrame)||Do)(Io)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==je&&(n.__=n.__V),n.i=void 0,n.__V=je})),qe=U=null},S.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ie),n.__h=n.__h.filter(function(o){return!o.__||nt(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],S.__e(o,n.__v)}}),jt&&jt(e,t)},S.unmount=function(e){It&&It(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{Ie(o)}catch(r){t=r}}),n.__H=void 0,t&&S.__e(t,n.__v))};var Dt=typeof requestAnimationFrame=="function";function Do(e){var t,n=function(){clearTimeout(o),Dt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Dt&&(t=requestAnimationFrame(n))}function Ie(e){var t=U,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),U=t}function nt(e){var t=U;e.__c=e.__(),U=t}function pt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function kn(e,t){return typeof t=="function"?t(e):t}function wn(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 Me(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,B(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Me.prototype=new Q).isPureReactComponent=!0,Me.prototype.shouldComponentUpdate=function(e,t){return ot(this.props,e)||ot(this.state,t)};var Lt=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Lt&&Lt(e)};var Lo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function En(e){function t(n){var o=wn({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Lo,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))},Rn={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},No=S.__e;S.__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)}No(e,t,n,o)};var Ot=S.unmount;function Tn(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=wn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Tn(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 jn(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 B(n,i)}return r.displayName="Lazy",r.__f=!0,r}function fe(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ot&&Ot(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=jn(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 l;for(o.setState({__a:o.__b=null});l=o.t.pop();)l.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]=Tn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&B(F,null,e.fallback);return r&&(r.__u&=-33),[B(F,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 Oo(e){return this.getChildContext=function(){return e.context},e.children}function Mo(e){var t=this,n=e.i;t.componentWillUnmount=function(){_e(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)}}),_e(B(Oo,{context:t.context},e.__v),t.l)}function Dn(e,t){var n=B(Mo,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new Q).__a=function(e){var t=this,n=jn(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,Ao=/^(?: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]/,Uo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vo=/[A-Z0-9]/g,Bo=typeof document<"u",$o=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=""),_e(e,t),typeof n=="function"&&n(),e?e.__c:null}function On(e,t,n){return fn(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 At=S.event;function Ho(){}function Fo(){return this.cancelBubble}function zo(){return this.defaultPrevented}S.event=function(e){return At&&(e=At(e)),e.persist=Ho,e.isPropagationStopped=Fo,e.isDefaultPrevented=zo,e.nativeEvent=e};var ht,qo={enumerable:!1,configurable:!0,get:function(){return this.class}},Ut=S.vnode;S.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||Bo&&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"||$o(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Uo.test(i)?i=a:o.indexOf("-")===-1&&Ao.test(i)?i=i.replace(Vo,"-$&").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",qo)):(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 Vt=S.__r;S.__r=function(e){Vt&&Vt(e),ht=e.__c};var Bt=S.diffed;S.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}}}},Go="17.0.2";function An(e){return B.bind(null,e)}function Re(e){return!!e&&e.$$typeof===Ln}function Un(e){return Re(e)&&e.type===F}function Vn(e){return Re(e)?Po.apply(null,arguments):e}function Bn(e){return!!e.__k&&(_e(null,e),!0)}function $n(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hn=function(e,t){return e(t)},Fn=function(e,t){return e(t)},zn=F;function mt(e){e()}function qn(e){return e}function Gn(){return[!1,mt]}var Wn=Ee,Zn=Re;function Yn(e,t){var n=t(),o=H({h:{__:n,v:t}}),r=o[0].h,i=o[1];return Ee(function(){r.__=n,r.v=t,Ge(r)&&i({h:r})},[e,n,t]),G(function(){return Ge(r)&&i({h:r}),e(function(){Ge(r)&&i({h:r})})},[e]),n}function Ge(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 Wo={useState:H,useId:yn,useReducer:dt,useEffect:G,useLayoutEffect:Ee,useInsertionEffect:Wn,useTransition:Gn,useDeferredValue:qn,useSyncExternalStore:Yn,startTransition:mt,useRef:le,useImperativeHandle:bn,useMemo:Ve,useCallback:xn,useContext:Cn,useDebugValue:ut,version:"17.0.2",Children:Rn,render:Nn,hydrate:On,unmountComponentAtNode:Bn,createPortal:Dn,createElement:B,createContext:gn,createFactory:An,cloneElement:Vn,createRef:dn,Fragment:F,isValidElement:Re,isElement:Zn,isFragment:Un,findDOMNode:$n,Component:Q,PureComponent:Me,memo:Sn,forwardRef:En,flushSync:Fn,unstable_batchedUpdates:Hn,StrictMode:zn,Suspense:ke,SuspenseList:fe,lazy:In,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn};const Zo=Object.freeze(Object.defineProperty({__proto__:null,Children:Rn,Component:Q,Fragment:F,PureComponent:Me,StrictMode:zn,Suspense:ke,SuspenseList:fe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn,cloneElement:Vn,createContext:gn,createElement:B,createFactory:An,createPortal:Dn,createRef:dn,default:Wo,findDOMNode:$n,flushSync:Fn,forwardRef:En,hydrate:On,isElement:Zn,isFragment:Un,isValidElement:Re,lazy:In,memo:Sn,render:Nn,startTransition:mt,unmountComponentAtNode:Bn,unstable_batchedUpdates:Hn,useCallback:xn,useContext:Cn,useDebugValue:ut,useDeferredValue:qn,useEffect:G,useErrorBoundary:jo,useId:yn,useImperativeHandle:bn,useInsertionEffect:Wn,useLayoutEffect:Ee,useMemo:Ve,useReducer:dt,useRef:le,useState:H,useSyncExternalStore:Yn,useTransition:Gn,version:Go},Symbol.toStringTag,{value:"Module"})),$t=e=>{let t;const n=new Set,o=(d,l)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const c=t;t=l??typeof h!="object"?h:Object.assign({},t,h),n.forEach(m=>m(t,c))}},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},Yo=e=>e?$t(e):$t;var Qn={exports:{}},Kn={};const Jn=u.getAugmentedNamespace(Zo);var Xn={exports:{}},eo={};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-rCLyJyii.cjs");var x=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.Matrix="matrix",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(x||{}),Y=(e=>(e.Answered="answered",e.Contains="contains",e.DoesNotContain="notcontains",e.DoesNotInclude="list_dni",e.Equal="eq",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.LessThan="lt",e.LessThanOrEqual="lte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.NotEqual="neq",e.Partial="partial",e.Skipped="skipped",e))(Y||{}),ge=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(ge||{}),W=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(W||{}),pe=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(pe||{}),Se,E,rn,de,yt,sn,Xe,an,we={},ln=[],wo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ue=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function cn(e){var t=e.parentNode;t&&t.removeChild(e)}function B(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?Se.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??++rn,__i:-1,__u:0};return r==null&&E.vnode!=null&&E.vnode(i),i}function dn(){return{current:null}}function F(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 un(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 un(e)}}function et(e){(!e.__d&&(e.__d=!0)&&de.push(e)&&!Oe.__r++||yt!==E.debounceRendering)&&((yt=E.debounceRendering)||sn)(Oe)}function Oe(){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),lt(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,mn(a,o,d),o.__e!=i&&un(o)),de.length>t&&de.sort(Xe));Oe.__r=0}function pn(e,t,n,o,r,i,s,a,d,l,h){var c,f,m,v,g,C=o&&o.__k||ln,b=t.length;for(n.__d=d,So(n,t,C),d=n.__d,c=0;c<b;c++)(m=n.__k[c])!=null&&typeof m!="boolean"&&typeof m!="function"&&(f=m.__i===-1?we:C[m.__i]||we,m.__i=c,lt(e,m,f,r,i,s,a,d,l,h),v=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&ct(f.ref,null,m),h.push(m.ref,m.__c||v,m)),g==null&&v!=null&&(g=v),65536&m.__u||f.__k===m.__k?d=hn(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=g}function So(e,t,n){var o,r,i,s,a,d=t.length,l=n.length,h=l,c=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):Ue(r)?ye(F,{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=Eo(r,n,s=o+c,h),r.__i=a,i=null,a!==-1&&(h--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&c--,typeof r.type!="function"&&(r.__u|=65536)):a!==s&&(a===s+1?c++:a>s?h>d-s?c+=a-s:c--:c=a<s&&a==s-1?a-s:0,a!==o+c&&(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,h--);if(h)for(o=0;o<l;o++)(i=n[o])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=ve(i)),tt(i,i))}function hn(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=hn(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"||(Ue(e)?e.some(function(n){oe(n,t)}):t.push(e)),t}function Eo(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 kt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wo.test(t)?n:n+"px"}function Pe(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||kt(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||kt(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:wt,i)):e.removeEventListener(t,i?St:wt,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 wt(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 lt(e,t,n,o,r,i,s,a,d,l){var h,c,f,m,v,g,C,b,y,w,R,S,k,O,I,_=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[a=t.__e=n.__e]),(h=E.__b)&&h(t);e:if(typeof _=="function")try{if(b=t.props,y=(h=_.contextType)&&o[h.__c],w=h?y?y.props.value:h.__:o,n.__c?C=(c=t.__c=n.__c).__=c.__E:("prototype"in _&&_.prototype.render?t.__c=c=new _(b,w):(t.__c=c=new Q(b,w),c.constructor=_,c.render=To),y&&y.sub(c),c.props=b,c.state||(c.state={}),c.context=w,c.__n=o,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),_.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ne({},c.__s)),ne(c.__s,_.getDerivedStateFromProps(b,c.__s))),m=c.props,v=c.state,c.__v=t,f)_.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(_.getDerivedStateFromProps==null&&b!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(b,w),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(b,c.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=b,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(T){T&&(T.__=t)}),R=0;R<c._sb.length;R++)c.__h.push(c._sb[R]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(b,c.__s,w),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,v,g)})}if(c.context=w,c.props=b,c.__P=e,c.__e=!1,S=E.__r,k=0,"prototype"in _&&_.prototype.render){for(c.state=c.__s,c.__d=!1,S&&S(t),h=c.render(c.props,c.state,c.context),O=0;O<c._sb.length;O++)c.__h.push(c._sb[O]);c._sb=[]}else do c.__d=!1,S&&S(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++k<25);c.state=c.__s,c.getChildContext!=null&&(o=ne(ne({},o),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(g=c.getSnapshotBeforeUpdate(m,v)),pn(e,Ue(I=h!=null&&h.type===F&&h.key==null?h.props.children:h)?I:[I],t,n,o,r,i,s,a,d,l),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),C&&(c.__E=c.__=null)}catch(T){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(T,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Ro(n.__e,t,n,o,r,i,s,d,l);(h=E.diffed)&&h(t)}function mn(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 Ro(e,t,n,o,r,i,s,a,d){var l,h,c,f,m,v,g,C=n.props,b=t.props,y=t.type;if(y==="svg"&&(r=!0),i!=null){for(l=0;l<i.length;l++)if((m=i[l])&&"setAttribute"in m==!!y&&(y?m.localName===y:m.nodeType===3)){e=m,i[l]=null;break}}if(e==null){if(y===null)return document.createTextNode(b);e=r?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),i=null,a=!1}if(y===null)C===b||a&&e.data===b||(e.data=b);else{if(i=i&&Se.call(e.childNodes),C=n.props||we,!a&&i!=null)for(C={},l=0;l<e.attributes.length;l++)C[(m=e.attributes[l]).name]=m.value;for(l in C)m=C[l],l=="children"||(l=="dangerouslySetInnerHTML"?c=m:l==="key"||l in b||Pe(e,l,null,m,r));for(l in b)m=b[l],l=="children"?f=m:l=="dangerouslySetInnerHTML"?h=m:l=="value"?v=m:l=="checked"?g=m:l==="key"||a&&typeof m!="function"||C[l]===m||Pe(e,l,m,C[l],r);if(h)a||c&&(h.__html===c.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(c&&(e.innerHTML=""),pn(e,Ue(f)?f:[f],t,n,o,r&&y!=="foreignObject",i,s,i?i[0]:n.__k&&ve(n,0),a,d),i!=null)for(l=i.length;l--;)i[l]!=null&&cn(i[l]);a||(l="value",v!==void 0&&(v!==e[l]||y==="progress"&&!v||y==="option"&&v!==C[l])&&Pe(e,l,v,C[l],!1),l="checked",g!==void 0&&g!==e[l]&&Pe(e,l,g,C[l],!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||cn(e.__e),e.__=e.__e=e.__d=void 0}function To(e,t,n){return this.constructor(e,n)}function _e(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=[],lt(t,e=(!o&&n||t).__k=B(F,null,[e]),r||we,we,t.ownerSVGElement!==void 0,!o&&n?[n]:r?null:t.firstChild?Se.call(t.childNodes):null,i,!o&&n?n:r?r.__e:t.firstChild,o,s),mn(i,e,s)}function fn(e,t){_e(e,t,fn)}function Po(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?Se.call(arguments,2):n),ye(e.type,a,o||e.key,r||e.ref,null)}function gn(e,t){var n={__c:t="__cC"+an++,__: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}Se=ln.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}},rn=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=F,de=[],sn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xe=function(e,t){return e.__v.__b-t.__v.__b},Oe.__r=0,an=0;function vn(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=vn(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function M(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=vn(e))&&(o&&(o+=" "),o+=t);return o}var re,U,qe,Et,be=0,_n=[],je=[],Rt=E.__b,Tt=E.__r,Pt=E.diffed,jt=E.__c,It=E.unmount;function he(e,t){E.__h&&E.__h(U,e,be||t),be=0;var n=U.__H||(U.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:je}),n.__[e]}function $(e){return be=1,dt(kn,e)}function dt(e,t,n){var o=he(re++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):kn(void 0,t),function(a){var d=o.__N?o.__N[0]:o.__[0],l=o.t(d,a);d!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=U,!U.u)){var r=function(a,d,l){if(!o.__c.__H)return!0;var h=o.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!i||i.call(this,a,d,l);var c=!1;return h.forEach(function(f){if(f.__N){var m=f.__[0];f.__=f.__N,f.__N=void 0,m!==f.__[0]&&(c=!0)}}),!(!c&&o.__c.props===a)&&(!i||i.call(this,a,d,l))};U.u=!0;var i=U.shouldComponentUpdate,s=U.componentWillUpdate;U.componentWillUpdate=function(a,d,l){if(this.__e){var h=i;i=void 0,r(a,d,l),i=h}s&&s.call(this,a,d,l)},U.shouldComponentUpdate=r}return o.__N||o.__}function q(e,t){var n=he(re++,3);!E.__s&&pt(n.__H,t)&&(n.__=e,n.i=t,U.__H.__h.push(n))}function Ee(e,t){var n=he(re++,4);!E.__s&&pt(n.__H,t)&&(n.__=e,n.i=t,U.__h.push(n))}function ie(e){return be=5,Ve(function(){return{current:e}},[])}function bn(e,t,n){be=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 Ve(e,t){var n=he(re++,7);return pt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function xn(e,t){return be=8,Ve(function(){return e},t)}function Cn(e){var t=U.context[e.__c],n=he(re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(U)),t.props.value):e.__}function ut(e,t){E.useDebugValue&&E.useDebugValue(t?t(e):e)}function jo(e){var t=he(re++,10),n=$();return t.__=e,U.componentDidCatch||(U.componentDidCatch=function(o,r){t.__&&t.__(o,r),n[1](o)}),[n[0],function(){n[1](void 0)}]}function yn(){var e=he(re++,11);if(!e.__){for(var t=U.__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 Io(){for(var e;e=_n.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(nt),e.__H.__h=[]}catch(t){e.__H.__h=[],E.__e(t,e.__v)}}E.__b=function(e){U=null,Rt&&Rt(e)},E.__r=function(e){Tt&&Tt(e),re=0;var t=(U=e.__c).__H;t&&(qe===U?(t.__h=[],U.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=je,n.__N=n.i=void 0})):(t.__h.forEach(Ie),t.__h.forEach(nt),t.__h=[],re=0)),qe=U},E.diffed=function(e){Pt&&Pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_n.push(t)!==1&&Et===E.requestAnimationFrame||((Et=E.requestAnimationFrame)||Do)(Io)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==je&&(n.__=n.__V),n.i=void 0,n.__V=je})),qe=U=null},E.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ie),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)}}),jt&&jt(e,t)},E.unmount=function(e){It&&It(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(o){try{Ie(o)}catch(r){t=r}}),n.__H=void 0,t&&E.__e(t,n.__v))};var Dt=typeof requestAnimationFrame=="function";function Do(e){var t,n=function(){clearTimeout(o),Dt&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);Dt&&(t=requestAnimationFrame(n))}function Ie(e){var t=U,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),U=t}function nt(e){var t=U;e.__c=e.__(),U=t}function pt(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function kn(e,t){return typeof t=="function"?t(e):t}function wn(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 Me(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,B(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Me.prototype=new Q).isPureReactComponent=!0,Me.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 Lo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function En(e){function t(n){var o=wn({},n);return delete o.ref,e(o,n.ref||null)}return t.$$typeof=Lo,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))},Rn={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},No=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)}No(e,t,n,o)};var Ot=E.unmount;function Tn(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=wn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return Tn(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 jn(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 B(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),Ot&&Ot(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=jn(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 l;for(o.setState({__a:o.__b=null});l=o.t.pop();)l.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]=Tn(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&B(F,null,e.fallback);return r&&(r.__u&=-33),[B(F,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 Oo(e){return this.getChildContext=function(){return e.context},e.children}function Mo(e){var t=this,n=e.i;t.componentWillUnmount=function(){_e(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)}}),_e(B(Oo,{context:t.context},e.__v),t.l)}function Dn(e,t){var n=B(Mo,{__v:e,i:t});return n.containerInfo=t,n}(fe.prototype=new Q).__a=function(e){var t=this,n=jn(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,Ao=/^(?: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]/,Uo=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vo=/[A-Z0-9]/g,Bo=typeof document<"u",$o=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=""),_e(e,t),typeof n=="function"&&n(),e?e.__c:null}function On(e,t,n){return fn(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 At=E.event;function Ho(){}function Fo(){return this.cancelBubble}function zo(){return this.defaultPrevented}E.event=function(e){return At&&(e=At(e)),e.persist=Ho,e.isPropagationStopped=Fo,e.isDefaultPrevented=zo,e.nativeEvent=e};var ht,qo={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||Bo&&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"||$o(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Uo.test(i)?i=a:o.indexOf("-")===-1&&Ao.test(i)?i=i.replace(Vo,"-$&").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",qo)):(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 Vt=E.__r;E.__r=function(e){Vt&&Vt(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}}}},Wo="17.0.2";function An(e){return B.bind(null,e)}function Re(e){return!!e&&e.$$typeof===Ln}function Un(e){return Re(e)&&e.type===F}function Vn(e){return Re(e)?Po.apply(null,arguments):e}function Bn(e){return!!e.__k&&(_e(null,e),!0)}function $n(e){return e&&(e.base||e.nodeType===1&&e)||null}var Hn=function(e,t){return e(t)},Fn=function(e,t){return e(t)},zn=F;function mt(e){e()}function qn(e){return e}function Wn(){return[!1,mt]}var Gn=Ee,Zn=Re;function Yn(e,t){var n=t(),o=$({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]),q(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 Go={useState:$,useId:yn,useReducer:dt,useEffect:q,useLayoutEffect:Ee,useInsertionEffect:Gn,useTransition:Wn,useDeferredValue:qn,useSyncExternalStore:Yn,startTransition:mt,useRef:ie,useImperativeHandle:bn,useMemo:Ve,useCallback:xn,useContext:Cn,useDebugValue:ut,version:"17.0.2",Children:Rn,render:Nn,hydrate:On,unmountComponentAtNode:Bn,createPortal:Dn,createElement:B,createContext:gn,createFactory:An,cloneElement:Vn,createRef:dn,Fragment:F,isValidElement:Re,isElement:Zn,isFragment:Un,findDOMNode:$n,Component:Q,PureComponent:Me,memo:Sn,forwardRef:En,flushSync:Fn,unstable_batchedUpdates:Hn,StrictMode:zn,Suspense:ke,SuspenseList:fe,lazy:In,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn};const Zo=Object.freeze(Object.defineProperty({__proto__:null,Children:Rn,Component:Q,Fragment:F,PureComponent:Me,StrictMode:zn,Suspense:ke,SuspenseList:fe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Mn,cloneElement:Vn,createContext:gn,createElement:B,createFactory:An,createPortal:Dn,createRef:dn,default:Go,findDOMNode:$n,flushSync:Fn,forwardRef:En,hydrate:On,isElement:Zn,isFragment:Un,isValidElement:Re,lazy:In,memo:Sn,render:Nn,startTransition:mt,unmountComponentAtNode:Bn,unstable_batchedUpdates:Hn,useCallback:xn,useContext:Cn,useDebugValue:ut,useDeferredValue:qn,useEffect:q,useErrorBoundary:jo,useId:yn,useImperativeHandle:bn,useInsertionEffect:Gn,useLayoutEffect:Ee,useMemo:Ve,useReducer:dt,useRef:ie,useState:$,useSyncExternalStore:Yn,useTransition:Wn,version:Wo},Symbol.toStringTag,{value:"Module"})),$t=e=>{let t;const n=new Set,o=(d,l)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const c=t;t=l??typeof h!="object"?h:Object.assign({},t,h),n.forEach(f=>f(t,c))}},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},Yo=e=>e?$t(e):$t;var Qn={exports:{}},Kn={};const Jn=u.getAugmentedNamespace(Zo);var Xn={exports:{}},eo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var xe=Jn;function Qo(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ko=typeof Object.is=="function"?Object.is:Qo,Jo=xe.useState,Xo=xe.useEffect,er=xe.useLayoutEffect,tr=xe.useDebugValue;function nr(e,t){var n=t(),o=Jo({inst:{value:n,getSnapshot:t}}),r=o[0].inst,i=o[1];return er(function(){r.value=n,r.getSnapshot=t,
|
|
9
|
+
*/var xe=Jn;function Qo(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ko=typeof Object.is=="function"?Object.is:Qo,Jo=xe.useState,Xo=xe.useEffect,er=xe.useLayoutEffect,tr=xe.useDebugValue;function nr(e,t){var n=t(),o=Jo({inst:{value:n,getSnapshot:t}}),r=o[0].inst,i=o[1];return er(function(){r.value=n,r.getSnapshot=t,Ge(r)&&i({inst:r})},[e,n,t]),Xo(function(){return Ge(r)&&i({inst:r}),e(function(){Ge(r)&&i({inst:r})})},[e]),tr(n),n}function Ge(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ko(e,n)}catch{return!0}}function or(e,t){return t()}var rr=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?or:nr;eo.useSyncExternalStore=xe.useSyncExternalStore!==void 0?xe.useSyncExternalStore:rr;Xn.exports=eo;var ir=Xn.exports;/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Be=Jn,sr=ir;function ar(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lr=typeof Object.is=="function"?Object.is:ar,cr=sr.useSyncExternalStore,dr=Be.useRef,ur=Be.useEffect,pr=Be.useMemo,hr=Be.useDebugValue;Kn.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var i=dr(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=pr(function(){function d(f){if(!l){if(l=!0,h=f,f=o(f),r!==void 0&&s.hasValue){var v=s.value;if(r(v,f))return c=v}return c=f}if(v=c,lr(h,f))return v;var g=o(f);return r!==void 0&&r(v,g)?v:(h=f,c=g)}var l=!1,h,c,m=n===void 0?null:n;return[function(){return d(t())},m===null?void 0:function(){return d(m())}]},[t,n,o,r]);var a=cr(e,i[0],i[1]);return ur(function(){s.hasValue=!0,s.value=a},[a]),hr(a),a};Qn.exports=Kn;var mr=Qn.exports;const fr=u.getDefaultExportFromCjs(mr),{useSyncExternalStoreWithSelector:gr}=fr;function vr(e,t=e.getState,n){const o=gr(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ut(o),o}const Ht=e=>{const t=typeof e=="function"?Yo(e):e,n=(o,r)=>vr(t,o,r);return Object.assign(n,t),n},to=e=>e?Ht(e):Ht;var rt=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(rt||{});const Ft=1,ft={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return e<t},lte(e,t){return e<=t},list_exact(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:e.slice().sort().join(",")===t.slice().sort().join(",")},list_all(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:!t.some(n=>e.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.some(r=>o.has(r))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.every(r=>!o.has(r))},contains(e,t){const n=e.toLowerCase(),o=t.toLowerCase();return n.includes(o)},notcontains(e,t){return!this.contains(e,t)}},_r=(e,t,n)=>{switch(t){case x.VideoVoice:return!!(e&&e.value);case x.Open:return!!n;case x.MultipleSelect:return!!(n&&Object.keys(n).length);case x.RecordedTask:return(n==null?void 0:n.taskStatus)===u.TaskStatus.Completed;case x.TextUrlPrompt:return!e.value;case x.ConsentLegal:return n!==null;case x.MultipleChoice:return n!==void 0;case x.Matrix:return!!(n&&Object.values(n).every(o=>o!==null));case x.NPS:return n!==null;case x.Likert:return n!==null;default:return!0}},no=(e,t)=>{if(t===x.Matrix){const n=Object.keys(e).length,o=Object.values(e).filter(r=>r!==null).length;return o>0&&o<n}return!1},oo=({cards:e,index:t,hasEndCard:n,allResponses:o,uploadProgress:r={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const a=i.props.routingOptions||[];for(let h=0;h<a.length;h++){const{group:c,target:m}=a[h];if(!(c!=null&&c.length))continue;const f=c[0];if(f.questionIndex===void 0||f.questionIndex>o.length)continue;let v=zt({comparator:f.comparator,response:o[f.questionIndex],type:i.type,value:f.value});for(let g=1;g<c.length;g+=2){const C=c[g],_=c[g+1],k=zt({comparator:_.comparator,response:o[_.questionIndex],type:e[_.questionIndex].type,value:_.value});C===rt.And?v&&(v=k):C===rt.Or&&(v||(v=k))}if(v){s=m===-1&&n?e.length-1:m;break}}const d=e.findIndex(h=>h.type===x.Uploading);let l;return d>0?l=n?e.length-3:e.length-2:l=e.length-1,t>=l||s===-1||s!==null&&s>l?d>0&&Object.values(r).some(c=>c.isSubmitted&&!c.isComplete)?d:n?e.length-1:null:s===-1?null:s},zt=({comparator:e,response:t,type:n,value:o})=>{if(e===Y.Answered)switch(n){case x.TextUrlPrompt:return t===void 0;case x.ConsentLegal:return t&&t.submitted===!0;case x.RecordedTask:return"taskStatus"in t&&t.taskStatus===u.TaskStatus.Completed;case x.Likert:return Number.isInteger(t);case x.Open:return t&&t.length>0;case x.MultipleChoice:case x.MultipleSelect:return Object.keys(t).length>0;case x.Matrix:return Object.values(t).every(r=>r!==null);case x.NPS:return Number.isInteger(t);case x.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===Y.GivenUp)return n===x.RecordedTask?"taskStatus"in t&&t.taskStatus===u.TaskStatus.GivenUp:!0;if(e===Y.Partial)return n===x.Matrix?no(t,n):!1;if(e===Y.Skipped)switch(n){case x.TextUrlPrompt:return t==null?void 0:t.skipped;case x.ConsentLegal:return t===null;case x.RecordedTask:return"taskStatus"in t&&t.taskStatus===u.TaskStatus.Abandoned;case x.Likert:return t===null;case x.Open:return(t==null?void 0:t.length)===0;case x.MultipleChoice:return t===void 0;case x.MultipleSelect:return(t==null?void 0:t.length)===0;case x.Matrix:return Object.values(t).every(r=>r===null);case x.NPS:return t===null;case x.VideoVoice:return t===null;default:return!1}return ft[e](t,o)},br=13,xr=(e,t)=>e.reduce((n,o)=>n.concat(n.map(r=>[...r,o])),[[]]).filter(n=>t||n.length>0),Cr=e=>{var t,n,o;switch(e.type){case x.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>br?e.props.options.map(r=>[r.value]):xr(e.props.options.map(r=>r.value),!e.props.properties.required);case x.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case x.Matrix:{if(!((t=e==null?void 0:e.props)!=null&&t.options))return null;const r=e.props.properties.matrixColumn,i=e.props.options,s=i.reduce((h,c)=>(h[c.id]=null,h),{}),a={...s,[i[0].id]:r[0].value},d=i.reduce((h,c)=>(h[c.id]=r[0].value,h),{}),l=[a,d];return e.props.properties.required||l.push(s),l}case x.Likert:{const r=Number((o=(n=e.props)==null?void 0:n.properties)==null?void 0:o.range)||5;return[...Array.from(Array(r).keys()).map(s=>s+1),...e.props.properties.required?[]:[null]]}case x.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case x.VideoVoice:case x.Open:return["1",...e.props.properties.required?[]:[""]];case x.RecordedTask:return[{taskStatus:u.TaskStatus.Completed},{taskStatus:u.TaskStatus.GivenUp},...e.props.properties.required?[]:[{taskStatus:u.TaskStatus.Abandoned}]];case x.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case x.ConsentLegal:return[Ft,...e.props.properties.required?[]:[null]];default:return[Ft]}},yr=e=>e in ft,kr=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,wr=(e,t=[])=>t.reduce((n,o)=>{const{group:r,target:i}=o;if(!(r!=null&&r.length))return[...n];const s=r.filter(a=>Number(a)?!0:typeof a=="object"?a.questionIndex===e:!1).map(a=>{const{comparator:d,value:l}=a;return{comparator:d,target:i,value:l}});return[...n,...s]},[]),Sr=(e,t)=>{const n=new Set([x.Thanks,x.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const o=e.filter(i=>!n.has(i.type));if(t===o.length-1)return 1;const r={[o.length-1]:1,[-1]:0};for(let i=o.length-2;i>=t;i--){const s=o[i],a=wr(i,s.props.routingOptions);if(a.length===0){r[i]=r[i+1]+1;continue}let d=0,l=Cr(s);if(l===null)return o.length-1-t;for(let h=0;h<a.length&&l.length!==0;h++){const{comparator:c,target:m,value:f}=a[h],v=l.filter(g=>{const C=_r({value:g},s.type,g),_=no(g,s.type);return!(C&&c===Y.Answered||_&&c===Y.Partial||!C&&!_&&c===Y.Skipped||c===Y.GivenUp&&kr(g)&&g.taskStatus===u.TaskStatus.GivenUp||C&&s.type===x.Open&&(c===Y.Contains||c===Y.DoesNotContain)||C&&yr(c)&&ft[c](g,f))});if(v.length<l.length){const g=parseInt(String(m),10);if(g!==-1&&g<=i||g>=o.length)return o.length-1-t;d=Math.max(r[g]+1,d)}l=v}l.length>0&&(d=Math.max(r[i+1]+1,d)),r[i]=d}return r[t]},Er=e=>!(e.type===x.Thanks||e.type===x.Uploading),V=to()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=u.APP_ID)=>{const o=t(),{fadeout:r,remove:i,trackHistory:s}=o;await r(n),Ze(o)||s({event:"closed"}),u.info(`Closing survey: ${o.surveyId}`),u.ConflictingWidgets.enable(),i({initiator:u.DismissReason.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:o,fadeout:r,remove:i}=t();o(u.InternalEventName.SurveyComplete),await r(n),u.ConflictingWidgets.enable(),i({initiator:u.DismissReason.Complete})},endCard:{headline:""},envId:"",eventEmitFn:u.eventEmitter.emit.bind(u.eventEmitter),fadeout:async n=>{const{eventEmitFn:o,headers:r,viewDocument:i}=t();return u.shouldDirectEmbed(r)?Promise.resolve():(o(u.SprigEvent.SurveyFadingOut),new Promise(s=>{const a=i.getElementById(n);a?(a.addEventListener("transitionend",()=>{s()}),a.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:o,eventEmitFn:r,index:i}=t();r(n,{[u.InternalEventData.QuestionId]:o[i].name,[u.InternalEventData.Props]:o[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:o,progressPct:r,isSubmitted:i})=>{var f,v,g;const{cards:s,destroy:a,index:d,uploadProgress:l}=t(),h=o||((f=l[n])==null?void 0:f.isComplete),c={...l,[n]:{progressPct:h?100:r||((v=l[n])==null?void 0:v.progressPct),isComplete:h,isSubmitted:i||((g=l[n])==null?void 0:g.isSubmitted)}};if(e({uploadProgress:c}),s[d].type!==x.Uploading)return;const m=Object.entries(l).every(([C,_])=>!_.isSubmitted||_.isComplete||n==C&&o);if(m&&d>=s.length-1)return a(u.APP_ID);e({index:m?d+1:d,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":u.Platform.Web,"x-ul-environment-id":"","x-ul-installation-method":u.InstallationMethod.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:o,cards:r,eventEmitFn:i,index:s,responseGroupUid:a,submit:d,trackHistory:l,uploadProgress:h,viewedCardCount:c}=t(),m=Date.now(),f=[...r],v=f[s],{type:g}=n.data,C={...n.data},_=C.value;Er(v)&&(v.value=_),C.answeredAt=m,delete C.type;const k={response:C,responseGroupUid:a,questionIndex:s};let w=g===x.MultipleChoice?Object.values(_).find(j=>j!==!1):_;g===x.MultipleSelect&&(w=f[s].props.options.reduce((j,E)=>(_[E.id]&&j.push(E.value),j),[]));const R=o.slice(0);R[s]=w,e({allResponses:R});const b=oo({cards:f,index:s,hasEndCard:!!n.endCard,uploadProgress:h,allResponses:R});if(b===null){k.completedAt=m,d(k),n.completeSurvey();return}else[x.Thanks,x.Uploading].includes(f[b].type)&&(k.completedAt=m);const y=d(k);[x.Thanks,x.Uploading].includes(f[b].type)||y.finally(()=>{l({event:"seen",index:b})});const L=f[b];f[b]&&i&&i(u.InternalEventName.CurrentQuestion,{[u.InternalEventData.QuestionId]:L.name,[u.InternalEventData.Props]:L.props}),e({cards:f,hasViewedEmbed:!1,index:b,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:u.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(o=>({unresolvedRequestCount:o.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n})=>{const{removeIframeIfReady:o}=t();e({pendingRemoveIframeReason:n}),o()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:o,unresolvedRequestCount:r}=t();o&&r===0&&(n(u.SprigEvent.SurveyWillClose,{name:u.SprigEvent.SurveyWillClose,initiator:o}),e({pendingRemoveIframeReason:null}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:o,response:r,responseGroupUid:i})=>{const s=t();if(!i||Ze(s))return;const a={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[r],completedAt:n,previewKey:s.previewKey};u.info(`Submitting response: ${JSON.stringify(r.value,null,2)} for survey: ${s.surveyId}`),n&&(u.info("Survey complete"),u.RecordSurveyComplete({id:s.surveyId}));const d=await s.trackPromise(u.ulFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(a),headers:s.headers,method:"POST"}));if(!d.ok){d.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",d.error),await s.trackPromise(qt(s,"submitResponse",d.error)));return}s.eventEmitFn(u.SprigEvent.QuestionAnswered,{...r,questionIndex:o})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:o,isNew:r=!1})=>{const i=t();if(Ze(i))return;const{cards:s,index:a}=i,d=o!==void 0?s[o]:s[a],l={sid:i.surveyId,qid:d.name,action:n,vid:i.userId,eid:i.envId,isNew:r,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},h=await i.trackPromise(u.ulFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(l),headers:i.headers,method:"POST"}));!h.ok&&h.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",h.error),await i.trackPromise(qt(i,"trackHistory",h.error)))},trackPromise:async n=>{let{resolveTrackedPromise:o}=t();return e(r=>({unresolvedRequestCount:r.unresolvedRequestCount+1})),n.then(r=>(o(),r)).catch(r=>{throw o(),r})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:o,headers:r,eventEmitFn:i,frame:s,useMobileStyling:a,viewDocument:d}=t(),h=n[o].type===x.Matrix;setTimeout(()=>{var f,v;const[c,m]=u.calculateFrameDimensions(d);u.shouldDirectEmbed(r)?i(u.SprigEvent.SurveyHeight,{name:u.SprigEvent.SurveyHeight,contentFrameHeight:c}):((f=s.setHeight)==null||f.call(s,c),a||(v=s.setWidth)==null||v.call(s,h?m:parseInt(u.DEFAULT_WIDTH)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),Ze=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,qt=async(e,t,n)=>{const{mode:o,userId:r,envId:i,apiURL:s,headers:a,viewDocument:d}=e,l=d.documentElement,h={mode:o,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:h,vid:r,envId:i},m=await u.ulFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(c)});if(!m.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",n);else{const{presignedUrl:f}=m.json;u.uploadLogfile(f)}};var Rr=0;function p(e,t,n,o,r,i){var s,a,d={};for(a in t)a=="ref"?s=t[a]:d[a]=t[a];var l={type:e,props:d,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Rr,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)d[a]===void 0&&(d[a]=s[a]);return S.vnode&&S.vnode(l),l}const z=e=>p("button",{...e,className:M("ul-card-text__button",e.className),id:"ul-card-text__button"}),K=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return p(F,{children:[e&&p("h1",{className:u.CssConstant.QuestionHeader,id:u.CssConstant.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&p("p",{className:u.CssConstant.Caption,id:u.CssConstant.Caption,children:n})]})},Gt=({buttonText:e="View Prototype",handleClick:t})=>p("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),ie=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:o,hasViewedEmbed:r,headers:i,useDesktopPrototype:s}=V(m=>({handleClickEmbedButton:m.handleClickEmbedButton,hasViewedEmbed:m.hasViewedEmbed,headers:m.headers,useDesktopPrototype:m.useDesktopPrototype})),a=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),d=window.innerWidth<u.EMBED_MOBILE_MAX_WIDTH,l=i["userleap-platform"],h=(m,f)=>{m.preventDefault(),o(f)};if(!s&&d&&!r&&a&&["email","link"].includes(l)){if(t==="prototype")return p(Gt,{handleClick:m=>{h(m,u.InternalEventName.ViewPrototypeClick)}});if(t==="pdf")return p(Gt,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:m=>{h(m,u.InternalEventName.ViewAgreementClick)}})}return e()},ro=(e,t)=>{const n=le(0),o=()=>{if(e.current){const r=e.current;r.style.height="1px";const i=r.scrollHeight,s=r.offsetHeight-r.clientHeight,a=i+s,d=parseInt(window.getComputedStyle(r).getPropertyValue("max-height")),l=a<=d?a:d;n.current!==l&&t(),n.current=l,r.style.height=`${l}px`}};return G(o,[]),o},gt=({ariaLabel:e,border:t,choiceStyle:n={},label:o,isSelected:r,value:i,text:s,id:a,isRadio:d,useMobileStyling:l,error:h,allowTextEntry:c,noneOfTheAbove:m,promptText:f,onUserInputChanged:v})=>{const{styleNonce:g,viewDocument:C}=V(D=>({styleNonce:D.styleNonce,viewDocument:D.viewDocument})),[_,k]=H(!1);jr(C,t,g);const w=({isSelected:D,userText:W})=>{v&&v({id:a||"",selected:D,value:i,userText:W,noneOfTheAbove:m})},R=D=>{D.stopPropagation(),w({isSelected:d||!r,userText:s}),k(!1)},b=()=>{_||k(!0)},y=()=>{_&&k(!1)},L=D=>{(D.key==="Enter"||D.key===" ")&&R(D)},j={onClick:D=>R(D),onKeyPress:D=>L(D)};"ontouchstart"in C.documentElement?(j.onTouchStart=y,j.onTouchCancel=y,j.onTouchEnd=y):(j.onMouseDown=b,j.onMouseLeave=y);const E=d?`radio-${a}`:`checkbox-${a}`,N=r||_?[De]:[],A=[...h?[io]:[],...N],I=o?{"aria-labelledby":`label-${a}`}:{"aria-label":e};return p("div",{className:M([...u.getClasses(u.CssConstant.Choice,l),...A]),id:`choice-div-${a}`,style:{...n,...h?{borderColor:u.ERROR_BORDER_COLOR}:{}},...j,children:[p("div",{className:M([u.CssConstant.ChoiceLabelContainer]),children:[d?p("div",{...I,className:M([u.CssConstant.ChoiceRadio,...N]),id:E,role:"radio",tabIndex:0}):p("div",{"aria-checked":r,"aria-labelledby":`label-${a}`,className:u.CssConstant.ChoiceCheckbox,id:E,role:"checkbox",style:r?{backgroundColor:t,borderColor:t,boxShadow:"none"}:{},tabIndex:0,children:r&&p("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),o&&p("label",{className:M(u.getClasses(u.CssConstant.ChoiceLabel,l)),htmlFor:E,id:`label-${a}`,children:o})]}),c&&r&&p("div",{className:M([u.CssConstant.ChoiceTextEntryContainer,...N]),children:p(Tr,{onTextChange:D=>w({isSelected:r,userText:D}),promptText:f||"Please specify",textValue:s,useMobileStyling:l})})]})},Tr=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:o})=>{const r=le(null),{update:i}=V(a=>({update:a.update})),s=ro(r,()=>i());return G(()=>{r.current&&r.current.focus()},[]),p("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:M(u.getClasses(u.CssConstant.ChoiceTextInput,o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:a=>{s(),a.stopPropagation(),n(a.currentTarget.value)},onClick:a=>{a.stopPropagation()},onKeyPress:a=>{a.stopPropagation()},placeholder:e,ref:r,role:"textbox",rows:1,value:t})},Wt="ul-select-style-element",De="ul-select-active-dynamic-style",io="ul-select-error-dynamic-style",Pr=e=>e.tagName.toLowerCase()==="style",jr=(e,t,n)=>{let o=e.getElementById(Wt),r=!1;o||(o=e.createElement("style"),r=!0),Pr(o)&&(o.id=Wt,n&&(o.nonce=n),o.textContent=Ir(t),r&&e.head.appendChild(o))},Ir=e=>`
|
|
17
|
+
*/var Be=Jn,sr=ir;function ar(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lr=typeof Object.is=="function"?Object.is:ar,cr=sr.useSyncExternalStore,dr=Be.useRef,ur=Be.useEffect,pr=Be.useMemo,hr=Be.useDebugValue;Kn.useSyncExternalStoreWithSelector=function(e,t,n,o,r){var i=dr(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=pr(function(){function d(m){if(!l){if(l=!0,h=m,m=o(m),r!==void 0&&s.hasValue){var v=s.value;if(r(v,m))return c=v}return c=m}if(v=c,lr(h,m))return v;var g=o(m);return r!==void 0&&r(v,g)?v:(h=m,c=g)}var l=!1,h,c,f=n===void 0?null:n;return[function(){return d(t())},f===null?void 0:function(){return d(f())}]},[t,n,o,r]);var a=cr(e,i[0],i[1]);return ur(function(){s.hasValue=!0,s.value=a},[a]),hr(a),a};Qn.exports=Kn;var mr=Qn.exports;const fr=u.getDefaultExportFromCjs(mr),{useSyncExternalStoreWithSelector:gr}=fr;function vr(e,t=e.getState,n){const o=gr(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ut(o),o}const Ht=e=>{const t=typeof e=="function"?Yo(e):e,n=(o,r)=>vr(t,o,r);return Object.assign(n,t),n},to=e=>e?Ht(e):Ht;var rt=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(rt||{});const Ft=1,ft={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return e<t},lte(e,t){return e<=t},list_exact(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:e.slice().sort().join(",")===t.slice().sort().join(",")},list_all(e,t){return!Array.isArray(e)||!Array.isArray(t)?!1:!t.some(n=>e.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.some(r=>o.has(r))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],o=new Set(n);return t.every(r=>!o.has(r))},contains(e,t){const n=e.toLowerCase(),o=t.toLowerCase();return n.includes(o)},notcontains(e,t){return!this.contains(e,t)}},_r=(e,t,n)=>{switch(t){case x.VideoVoice:return!!(e&&e.value);case x.Open:return!!n;case x.MultipleSelect:return!!(n&&Object.keys(n).length);case x.RecordedTask:return(n==null?void 0:n.taskStatus)===u.TaskStatus.Completed;case x.TextUrlPrompt:return!e.value;case x.ConsentLegal:return n!==null;case x.MultipleChoice:return n!==void 0;case x.Matrix:return!!(n&&Object.values(n).every(o=>o!==null));case x.NPS:return n!==null;case x.Likert:return n!==null;default:return!0}},no=(e,t)=>{if(t===x.Matrix){const n=Object.keys(e).length,o=Object.values(e).filter(r=>r!==null).length;return o>0&&o<n}return!1},oo=({cards:e,index:t,hasEndCard:n,allResponses:o,uploadProgress:r={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const a=i.props.routingOptions||[];for(let h=0;h<a.length;h++){const{group:c,target:f}=a[h];if(!(c!=null&&c.length))continue;const m=c[0];if(m.questionIndex===void 0||m.questionIndex>o.length)continue;let v=zt({comparator:m.comparator,response:o[m.questionIndex],type:i.type,value:m.value});for(let g=1;g<c.length;g+=2){const C=c[g],b=c[g+1],y=zt({comparator:b.comparator,response:o[b.questionIndex],type:e[b.questionIndex].type,value:b.value});C===rt.And?v&&(v=y):C===rt.Or&&(v||(v=y))}if(v){s=f===-1&&n?e.length-1:f;break}}const d=e.findIndex(h=>h.type===x.Uploading);let l;return d>0?l=n?e.length-3:e.length-2:l=e.length-1,t>=l||s===-1||s!==null&&s>l?d>0&&Object.values(r).some(c=>c.isSubmitted&&!c.isComplete)?d:n?e.length-1:null:s===-1?null:s},zt=({comparator:e,response:t,type:n,value:o})=>{if(e===Y.Answered)switch(n){case x.TextUrlPrompt:return t===void 0;case x.ConsentLegal:return t&&t.submitted===!0;case x.RecordedTask:return"taskStatus"in t&&t.taskStatus===u.TaskStatus.Completed;case x.Likert:return Number.isInteger(t);case x.Open:return t&&t.length>0;case x.MultipleChoice:case x.MultipleSelect:return Object.keys(t).length>0;case x.Matrix:return Object.values(t).every(r=>r!==null);case x.NPS:return Number.isInteger(t);case x.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===Y.GivenUp)return n===x.RecordedTask?"taskStatus"in t&&t.taskStatus===u.TaskStatus.GivenUp:!0;if(e===Y.Partial)return n===x.Matrix?no(t,n):!1;if(e===Y.Skipped)switch(n){case x.TextUrlPrompt:return t==null?void 0:t.skipped;case x.ConsentLegal:return t===null;case x.RecordedTask:return"taskStatus"in t&&t.taskStatus===u.TaskStatus.Abandoned;case x.Likert:return t===null;case x.Open:return(t==null?void 0:t.length)===0;case x.MultipleChoice:return t===void 0;case x.MultipleSelect:return(t==null?void 0:t.length)===0;case x.Matrix:return Object.values(t).every(r=>r===null);case x.NPS:return t===null;case x.VideoVoice:return t===null;default:return!1}return ft[e](t,o)},br=13,xr=(e,t)=>e.reduce((n,o)=>n.concat(n.map(r=>[...r,o])),[[]]).filter(n=>t||n.length>0),Cr=e=>{var t,n,o;switch(e.type){case x.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>br?e.props.options.map(r=>[r.value]):xr(e.props.options.map(r=>r.value),!e.props.properties.required);case x.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case x.Matrix:{if(!((t=e==null?void 0:e.props)!=null&&t.options))return null;const r=e.props.properties.matrixColumn,i=e.props.options,s=i.reduce((h,c)=>(h[c.id]=null,h),{}),a={...s,[i[0].id]:r[0].value},d=i.reduce((h,c)=>(h[c.id]=r[0].value,h),{}),l=[a,d];return e.props.properties.required||l.push(s),l}case x.Likert:{const r=Number((o=(n=e.props)==null?void 0:n.properties)==null?void 0:o.range)||5;return[...Array.from(Array(r).keys()).map(s=>s+1),...e.props.properties.required?[]:[null]]}case x.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case x.VideoVoice:case x.Open:return["1",...e.props.properties.required?[]:[""]];case x.RecordedTask:return[{taskStatus:u.TaskStatus.Completed},{taskStatus:u.TaskStatus.GivenUp},...e.props.properties.required?[]:[{taskStatus:u.TaskStatus.Abandoned}]];case x.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case x.ConsentLegal:return[Ft,...e.props.properties.required?[]:[null]];default:return[Ft]}},yr=e=>e in ft,kr=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,wr=(e,t=[])=>t.reduce((n,o)=>{const{group:r,target:i}=o;if(!(r!=null&&r.length))return[...n];const s=r.filter(a=>Number(a)?!0:typeof a=="object"?a.questionIndex===e:!1).map(a=>{const{comparator:d,value:l}=a;return{comparator:d,target:i,value:l}});return[...n,...s]},[]),Sr=(e,t)=>{const n=new Set([x.Thanks,x.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const o=e.filter(i=>!n.has(i.type));if(t===o.length-1)return 1;const r={[o.length-1]:1,[-1]:0};for(let i=o.length-2;i>=t;i--){const s=o[i],a=wr(i,s.props.routingOptions);if(a.length===0){r[i]=r[i+1]+1;continue}let d=0,l=Cr(s);if(l===null)return o.length-1-t;for(let h=0;h<a.length&&l.length!==0;h++){const{comparator:c,target:f,value:m}=a[h],v=l.filter(g=>{const C=_r({value:g},s.type,g),b=no(g,s.type);return!(C&&c===Y.Answered||b&&c===Y.Partial||!C&&!b&&c===Y.Skipped||c===Y.GivenUp&&kr(g)&&g.taskStatus===u.TaskStatus.GivenUp||C&&s.type===x.Open&&(c===Y.Contains||c===Y.DoesNotContain)||C&&yr(c)&&ft[c](g,m))});if(v.length<l.length){const g=parseInt(String(f),10);if(g!==-1&&g<=i||g>=o.length)return o.length-1-t;d=Math.max(r[g]+1,d)}l=v}l.length>0&&(d=Math.max(r[i+1]+1,d)),r[i]=d}return r[t]},Er=e=>!(e.type===x.Thanks||e.type===x.Uploading),V=to()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=u.APP_ID)=>{const o=t(),{fadeout:r,remove:i,trackHistory:s}=o;await r(n),Ze(o)||s({event:"closed"}),u.info(`Closing survey: ${o.surveyId}`),u.ConflictingWidgets.enable(),i({initiator:u.DismissReason.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:o,fadeout:r,remove:i}=t();o(u.InternalEventName.SurveyComplete),await r(n),u.ConflictingWidgets.enable(),i({initiator:u.DismissReason.Complete})},endCard:{headline:""},envId:"",eventEmitFn:u.eventEmitter.emit.bind(u.eventEmitter),fadeout:async n=>{const{eventEmitFn:o,headers:r,viewDocument:i}=t();return u.shouldDirectEmbed(r)?Promise.resolve():(o(u.SprigEvent.SurveyFadingOut),new Promise(s=>{const a=i.getElementById(n);a?(a.addEventListener("transitionend",()=>{s()}),a.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:o,eventEmitFn:r,index:i}=t();r(n,{[u.InternalEventData.QuestionId]:o[i].name,[u.InternalEventData.Props]:o[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:o,progressPct:r,isSubmitted:i})=>{var m,v,g;const{cards:s,destroy:a,index:d,uploadProgress:l}=t(),h=o||((m=l[n])==null?void 0:m.isComplete),c={...l,[n]:{progressPct:h?100:r||((v=l[n])==null?void 0:v.progressPct),isComplete:h,isSubmitted:i||((g=l[n])==null?void 0:g.isSubmitted)}};if(e({uploadProgress:c}),s[d].type!==x.Uploading)return;const f=Object.entries(l).every(([C,b])=>!b.isSubmitted||b.isComplete||n==C&&o);if(f&&d>=s.length-1)return a(u.APP_ID);e({index:f?d+1:d,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":u.Platform.Web,"x-ul-environment-id":"","x-ul-installation-method":u.InstallationMethod.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:o,cards:r,eventEmitFn:i,index:s,responseGroupUid:a,submit:d,trackHistory:l,uploadProgress:h,viewedCardCount:c}=t(),f=Date.now(),m=[...r],v=m[s],{type:g}=n.data,C={...n.data},b=C.value;Er(v)&&(v.value=b),C.answeredAt=f,delete C.type;const y={response:C,responseGroupUid:a,questionIndex:s};let w=g===x.MultipleChoice?Object.values(b).find(I=>I!==!1):b;g===x.MultipleSelect&&(w=m[s].props.options.reduce((I,_)=>(b[_.id]&&I.push(_.value),I),[]));const R=o.slice(0);R[s]=w,e({allResponses:R});const S=oo({cards:m,index:s,hasEndCard:!!n.endCard,uploadProgress:h,allResponses:R});if(S===null){y.completedAt=f,d(y),n.completeSurvey();return}else[x.Thanks,x.Uploading].includes(m[S].type)&&(y.completedAt=f);const k=d(y);[x.Thanks,x.Uploading].includes(m[S].type)||k.finally(()=>{l({event:"seen",index:S})});const O=m[S];m[S]&&i&&i(u.InternalEventName.CurrentQuestion,{[u.InternalEventData.QuestionId]:O.name,[u.InternalEventData.Props]:O.props}),e({cards:m,hasViewedEmbed:!1,index:S,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:u.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(o=>({unresolvedRequestCount:o.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n})=>{const{removeIframeIfReady:o}=t();e({pendingRemoveIframeReason:n}),o()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:o,unresolvedRequestCount:r}=t();o&&r===0&&(n(u.SprigEvent.SurveyWillClose,{name:u.SprigEvent.SurveyWillClose,initiator:o}),e({pendingRemoveIframeReason:null}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:o,response:r,responseGroupUid:i})=>{const s=t();if(!i||Ze(s))return;const a={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[r],completedAt:n,previewKey:s.previewKey};u.info(`Submitting response: ${JSON.stringify(r.value,null,2)} for survey: ${s.surveyId}`),n&&(u.info("Survey complete"),u.RecordSurveyComplete({id:s.surveyId}));const d=await s.trackPromise(u.ulFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(a),headers:s.headers,method:"POST"}));if(!d.ok){d.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",d.error),await s.trackPromise(qt(s,"submitResponse",d.error)));return}s.eventEmitFn(u.SprigEvent.QuestionAnswered,{...r,questionIndex:o})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:o,isNew:r=!1})=>{const i=t();if(Ze(i))return;const{cards:s,index:a}=i,d=o!==void 0?s[o]:s[a],l={sid:i.surveyId,qid:d.name,action:n,vid:i.userId,eid:i.envId,isNew:r,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},h=await i.trackPromise(u.ulFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(l),headers:i.headers,method:"POST"}));!h.ok&&h.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",h.error),await i.trackPromise(qt(i,"trackHistory",h.error)))},trackPromise:async n=>{let{resolveTrackedPromise:o}=t();return e(r=>({unresolvedRequestCount:r.unresolvedRequestCount+1})),n.then(r=>(o(),r)).catch(r=>{throw o(),r})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:o,headers:r,eventEmitFn:i,frame:s,useMobileStyling:a,viewDocument:d}=t(),h=n[o].type===x.Matrix;setTimeout(()=>{var m,v;const[c,f]=u.calculateFrameDimensions(d);u.shouldDirectEmbed(r)?i(u.SprigEvent.SurveyHeight,{name:u.SprigEvent.SurveyHeight,contentFrameHeight:c}):((m=s.setHeight)==null||m.call(s,c),a||(v=s.setWidth)==null||v.call(s,h?f:parseInt(u.DEFAULT_WIDTH)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),Ze=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,qt=async(e,t,n)=>{const{mode:o,userId:r,envId:i,apiURL:s,headers:a,viewDocument:d}=e,l=d.documentElement,h={mode:o,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:l.clientWidth,clientHeight:l.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:h,vid:r,envId:i},f=await u.ulFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(c)});if(!f.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",n);else{const{presignedUrl:m}=f.json;u.uploadLogfile(m)}};var Rr=0;function p(e,t,n,o,r,i){var s,a,d={};for(a in t)a=="ref"?s=t[a]:d[a]=t[a];var l={type:e,props:d,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Rr,__i:-1,__u:0,__source:r,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)d[a]===void 0&&(d[a]=s[a]);return E.vnode&&E.vnode(l),l}const z=e=>p("button",{...e,className:M("ul-card-text__button",e.className),id:"ul-card-text__button"}),K=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return p(F,{children:[e&&p("h1",{className:u.CssConstant.QuestionHeader,id:u.CssConstant.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&p("p",{className:u.CssConstant.Caption,id:u.CssConstant.Caption,children:n})]})},Wt=({buttonText:e="View Prototype",handleClick:t})=>p("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),se=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:o,hasViewedEmbed:r,headers:i,useDesktopPrototype:s}=V(f=>({handleClickEmbedButton:f.handleClickEmbedButton,hasViewedEmbed:f.hasViewedEmbed,headers:f.headers,useDesktopPrototype:f.useDesktopPrototype})),a=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),d=window.innerWidth<u.EMBED_MOBILE_MAX_WIDTH,l=i["userleap-platform"],h=(f,m)=>{f.preventDefault(),o(m)};if(!s&&d&&!r&&a&&["email","link"].includes(l)){if(t==="prototype")return p(Wt,{handleClick:f=>{h(f,u.InternalEventName.ViewPrototypeClick)}});if(t==="pdf")return p(Wt,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:f=>{h(f,u.InternalEventName.ViewAgreementClick)}})}return e()},ro=(e,t)=>{const n=ie(0),o=()=>{if(e.current){const r=e.current;r.style.height="1px";const i=r.scrollHeight,s=r.offsetHeight-r.clientHeight,a=i+s,d=parseInt(window.getComputedStyle(r).getPropertyValue("max-height")),l=a<=d?a:d;n.current!==l&&t(),n.current=l,r.style.height=`${l}px`}};return q(o,[]),o},gt=({ariaLabel:e,border:t,choiceStyle:n={},label:o,isSelected:r,value:i,text:s,id:a,isRadio:d,useMobileStyling:l,error:h,allowTextEntry:c,noneOfTheAbove:f,promptText:m,onUserInputChanged:v})=>{const{styleNonce:g,viewDocument:C}=V(N=>({styleNonce:N.styleNonce,viewDocument:N.viewDocument})),[b,y]=$(!1);jr(C,t,g);const w=({isSelected:N,userText:G})=>{v&&v({id:a||"",selected:N,value:i,userText:G,noneOfTheAbove:f})},R=N=>{N.stopPropagation(),w({isSelected:d||!r,userText:s}),y(!1)},S=()=>{b||y(!0)},k=()=>{b&&y(!1)},O=N=>{(N.key==="Enter"||N.key===" ")&&R(N)},I={onClick:N=>R(N),onKeyPress:N=>O(N)};"ontouchstart"in C.documentElement?(I.onTouchStart=k,I.onTouchCancel=k,I.onTouchEnd=k):(I.onMouseDown=S,I.onMouseLeave=k);const _=d?`radio-${a}`:`checkbox-${a}`,T=r||b?[De]:[],L=[...h?[io]:[],...T],D=o?{"aria-labelledby":`label-${a}`}:{"aria-label":e};return p("div",{className:M([...u.getClasses(u.CssConstant.Choice,l),...L]),id:`choice-div-${a}`,style:{...n,...h?{borderColor:u.ERROR_BORDER_COLOR}:{}},...I,children:[p("div",{className:M([u.CssConstant.ChoiceLabelContainer]),children:[d?p("div",{...D,className:M([u.CssConstant.ChoiceRadio,...T]),id:_,role:"radio",tabIndex:0}):p("div",{"aria-checked":r,"aria-labelledby":`label-${a}`,className:u.CssConstant.ChoiceCheckbox,id:_,role:"checkbox",style:r?{backgroundColor:t,borderColor:t,boxShadow:"none"}:{},tabIndex:0,children:r&&p("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),o&&p("label",{className:M(u.getClasses(u.CssConstant.ChoiceLabel,l)),htmlFor:_,id:`label-${a}`,children:o})]}),c&&r&&p("div",{className:M([u.CssConstant.ChoiceTextEntryContainer,...T]),children:p(Tr,{onTextChange:N=>w({isSelected:r,userText:N}),promptText:m||"Please specify",textValue:s,useMobileStyling:l})})]})},Tr=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:o})=>{const r=ie(null),{update:i}=V(a=>({update:a.update})),s=ro(r,()=>i());return q(()=>{r.current&&r.current.focus()},[]),p("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:M(u.getClasses(u.CssConstant.ChoiceTextInput,o)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:a=>{s(),a.stopPropagation(),n(a.currentTarget.value)},onClick:a=>{a.stopPropagation()},onKeyPress:a=>{a.stopPropagation()},placeholder:e,ref:r,role:"textbox",rows:1,value:t})},Gt="ul-select-style-element",De="ul-select-active-dynamic-style",io="ul-select-error-dynamic-style",Pr=e=>e.tagName.toLowerCase()==="style",jr=(e,t,n)=>{let o=e.getElementById(Gt),r=!1;o||(o=e.createElement("style"),r=!0),Pr(o)&&(o.id=Gt,n&&(o.nonce=n),o.textContent=Ir(t),r&&e.head.appendChild(o))},Ir=e=>`
|
|
18
18
|
.${De} {
|
|
19
19
|
border-color: ${e};
|
|
20
20
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.${io} {
|
|
26
26
|
border-color: ${u.ERROR_BORDER_COLOR};
|
|
27
27
|
}
|
|
28
|
-
`,me=e=>(e==null?void 0:e.buttonText)||"Next",vt=e=>(e==null?void 0:e.skipButtonText)||"Skip",Dr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{useMobileStyling:s,border:a}=V(E=>({useMobileStyling:E.useMobileStyling,border:E.border})),[d,l]=H(!1),[h,c]=H(""),[m,f]=H(!1),v=o==null?void 0:o.collectName,g=(o==null?void 0:o.nameLabelText)||"Full Name",C=(o==null?void 0:o.consentText)||"I agree to the stated conditions",_=(o==null?void 0:o.submitButtonText)||"Submit",k=!!h.trim(),w=d&&(!v||k),R=(E,N=!1)=>{E.preventDefault(),E.stopPropagation();let A=null;if(!N){if(!w){f(!0);return}A={submitted:!0},v&&(A.name=h)}n({value:A,questionId:r,type:i})},b=E=>{E.preventDefault(),E.stopPropagation(),c(E.currentTarget.value)},y=E=>{E.currentTarget.style.borderColor=m&&!k?u.ERROR_BORDER_COLOR:a},L=E=>{E.currentTarget.style.borderColor=m&&!k?u.ERROR_BORDER_COLOR:u.DEFAULT_BORDER_COLOR},j=()=>p("div",{children:[p(gt,{allowTextEntry:!1,border:a,error:m&&!d,isRadio:!1,isSelected:d,label:C,onUserInputChanged:({selected:E})=>{E!==d&&l(!d)},useMobileStyling:s}),v&&p("input",{"aria-label":g,"aria-placeholder":g,className:M(u.getClasses(u.CssConstant.ConsentLegalNameInput,s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:L,onFocus:y,onInput:b,placeholder:g,style:m&&!k?{borderColor:u.ERROR_BORDER_COLOR}:{},tabIndex:0,value:h}),p("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[p(z,{className:w?"":u.CssConstant.ButtonDisabled,onClick:R,children:_}),o.required===!1&&p("button",{className:u.CssConstant.SkipButton,onClick:E=>R(E,!0),children:vt(o)})]})]});return p("div",{className:M([e,"ul-card__consent-legal",u.CssConstant.FadeInTransition]),children:[p(K,{message:t}),p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:o!=null&&o.richTextBody?{__html:o.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),p(ie,{properties:o,defaultBody:j,embeddedType:"pdf"})]},r)},Lr=({activeValue:e,border:t,icon:n,isPressed:o,onSubmit:r,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:d,useMobileStyling:l,value:h})=>{const c=`option-${h}`,m=s===pe.Number,f=s===pe.Star,v=m&&h===e,[g,C]=h<=e&&f||h===e?o?[t,1]:[t,.3]:["",1],_=()=>{switch(s){case pe.Star:return M([...u.getClasses(u.CssConstant.LikertStar,l),...u.getClasses(`${u.CssConstant.LikertStar}-${h}`,l)]);case pe.Smiley:return M([...u.getClasses(u.CssConstant.LikertSmiley,l),...u.getClasses(`${u.CssConstant.LikertSmiley}-${h}`,l)]);default:return M(h===i?[...u.getClasses(u.CssConstant.LikertNumber,l),...u.getClasses(`${u.CssConstant.LikertNumber}-${h}`,l),...u.getClasses("likert-last-option",l)]:[...u.getClasses(u.CssConstant.LikertNumber,l),...u.getClasses(`${u.CssConstant.LikertNumber}-${h}`,l)])}},k=()=>{a(-1),d(!1)};return p("div",{"aria-label":m?void 0:String(h),className:_(),dangerouslySetInnerHTML:{__html:n},id:c,onClick:()=>r(),onPointerDown:()=>d(!0),onPointerEnter:()=>a(h),onPointerLeave:k,role:"radio",style:{color:m?"":g,borderColor:v?g:"",fillOpacity:v?"":C,zIndex:v?3:"auto"},tabIndex:0})},Nr=({className:e,labels:t,message:n,next:o,properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(j=>({border:j.border,useMobileStyling:j.useMobileStyling})),[l,h]=H(-1),[c,m]=H(!1),f=t&&t.left,v=t&&t.right;let g;const{range:C,scaleLabelType:_,ratingIcons:k}=r;C&&(g=Number(C));const w=g||5,R=j=>{var E,N;switch(_){case pe.Star:return(E=k[0])==null?void 0:E.svg;case pe.Smiley:return(N=k[j])==null?void 0:N.svg;default:return String(j+1)}},b=[...Array(w)].map((j,E)=>{const N=E+1;return p(Lr,{activeValue:l,border:a,icon:R(E),isPressed:c,onSubmit:()=>o({value:N,questionId:i,type:s}),range:w,scaleLabelType:_,setActiveValue:h,setIsPressed:m,useMobileStyling:d,value:N},E)}),y=j=>{j.preventDefault(),j.stopPropagation(),o({value:null,questionId:i,type:s})},L=()=>p(F,{children:[p("div",{"aria-label":`Rating (1 - ${w})`,className:"ul-card--likert__numbers",role:"radiogroup",children:b}),p("div",{className:"ul-card--likert__labels",children:[p("span",{children:f}),p("span",{children:v})]}),!r.required&&p("div",{className:"ul-vertical-centered-container",children:p(z,{onClick:y,children:me(r)})})]});return p("form",{className:M([e,"ul-card--likert",u.CssConstant.FadeInTransition]),children:[p(K,{message:n,properties:r}),p(ie,{properties:r,defaultBody:L})]},i)},Or=({className:e,message:t,next:n,options:o,properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(b=>({border:b.border,useMobileStyling:b.useMobileStyling})),l=r.matrixColumn,h=o.length,c=l.length,m=r.required,f=b=>{b.preventDefault(),b.stopPropagation(),n({value:g,questionId:i,type:s})},v=o.reduce((b,y)=>(b[y.id]=null,b),{}),[g,C]=H(v),_=(b,y)=>{C(L=>({...L,[b]:y}))},k=m&&Object.values(g).every(b=>b==null),w=o.map(b=>p(F,{children:[p("div",{"aria-label":b.label,className:"ul-matrix-row-label",children:b.label},b.label),p("div",{className:"ul-matrix-row-options",role:"radiogroup",children:l.map((y,L)=>{const j=L===c-1;return p("div",{className:M("ul-matrix-option-wrapper",j&&"ul-matrix-last-option"),children:p(gt,{allowTextEntry:!1,ariaLabel:`${b.label}-${y.label}`,border:a,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${b.id}-${y.value}`,isRadio:!0,isSelected:g[b.id]===y.value,onUserInputChanged:()=>_(b.id,y.value),useMobileStyling:d})},y.value)})})]})),R=()=>p("div",{children:[p("div",{className:"ul-card--matrix_container",children:p("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${c}; --numRows: ${h+1}`,children:[p("div",{})," ",l.map(b=>p("div",{className:"ul-matrix-column-label",children:b.label},b.label)),w]})}),p("div",{className:"ul-card__button-wrapper",children:p(z,{disabled:k,children:me(r)})})]});return p("form",{className:M([e,u.CssConstant.FadeInTransition,"ul-card__matrix"]),id:"text-form",onSubmit:f,children:[p(K,{message:t,properties:r}),p(ie,{properties:r,defaultBody:R})]},i)},so=({className:e,message:t,onSubmit:n,options:o=[],properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(y=>({border:y.border,useMobileStyling:y.useMobileStyling})),l=o.reduce((y,L)=>(y[L.id]={isSelected:!1},y),{}),[h,c]=H(l),m=s===x.MultipleChoice,f=r.required,v=o.find(y=>{var L;return(L=y.optionProperties)==null?void 0:L.noneOfTheAbove}),g=Object.entries(h).some(([y,L])=>{var N;const j=o.find(A=>`${A.id}`===y),E=L.userText===void 0||L.userText.trim()==="";return((N=j==null?void 0:j.optionProperties)==null?void 0:N.allowsTextEntry)&&E&&L.isSelected}),C=Object.values(h).some(y=>y.isSelected),_=g||f&&!C,k=o.map(({id:y,label:L,value:j,optionProperties:E})=>{var D,W;const N=`${y}`,{allowsTextEntry:A,noneOfTheAbove:I}={allowsTextEntry:!1,noneOfTheAbove:!1,...E};return p(gt,{allowTextEntry:A,border:a,error:!1,id:N,isRadio:m,noneOfTheAbove:I,isSelected:!!((D=h[N])!=null&&D.isSelected),label:L,onUserInputChanged:T=>R(T.id,T.selected,T.userText,T.noneOfTheAbove),promptText:"Please specify",text:(W=h[y])==null?void 0:W.userText,useMobileStyling:d,value:j},N)}),w=y=>{y.preventDefault(),y.stopPropagation(),n(h)},R=(y,L,j,E)=>{const N=Object.assign({},h);if((m||E)&&L)for(const A of Object.values(N))A.isSelected=!1,delete A.userText;else v&&!E&&h[v.id].isSelected&&(N[v.id].isSelected=!1);N[y]={isSelected:L,userText:j},c(N)},b=()=>p("div",{children:[p("div",{className:M(u.getClasses(u.CssConstant.ChoiceGroup,d)),role:m?"radiogroup":"group",children:k}),p("div",{className:"ul-card__button-wrapper",children:p(z,{disabled:_,onClick:w,children:me(r)})})]});return p("form",{className:M([e,"ul-card--multiple",u.CssConstant.FadeInTransition]),id:"text-form",onSubmit:w,children:[p(K,{message:t,properties:r}),p(ie,{properties:r,defaultBody:b})]},i)},Mr=e=>{const{questionId:t,type:n,next:o,options:r}=e;return p(so,{...e,onSubmit:s=>{const a=Object.entries(s).find(([,m])=>m.isSelected)||[void 0,void 0],[d,l]=a,h=r.find(m=>`${m.id}`===d),c=l!=null&&l.userText?{[d]:{userText:l.userText}}:null;o({value:h&&d?{[d]:h.value}:{},secondaryValue:c,questionId:t,type:n})}})},Ar=e=>{const{questionId:t,type:n,next:o}=e;return p(so,{...e,onSubmit:i=>{const s={},a=Object.entries(i).reduce((l,[h,c])=>(l[h]=c.isSelected,l),s),d=Object.entries(i).reduce((l,[h,c])=>{if(!c.userText)return l;const m=l||{};return m[h]={userText:c.userText},m},null);o({value:a,secondaryValue:d,questionId:t,type:n})}})},Ur=({className:e,props:{labels:t,message:n,properties:o},next:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(v=>({border:v.border,useMobileStyling:v.useMobileStyling})),l=t&&t.left,h=t&&t.right,c=[...Array(11)].map((v,g)=>p("div",{className:M([...u.getClasses(u.CssConstant.NPSNumber,d),...u.getClasses(`${u.CssConstant.NPSNumber}-${g}`,d)]),id:`option-${g}`,onClick:()=>r({value:g,questionId:i,type:s}),onKeyPress:C=>{C.preventDefault(),(C.key==="Enter"||C.key===" ")&&r({value:g,questionId:i,type:s})},onPointerDown:C=>{C.currentTarget.style.zIndex="2",C.currentTarget.style.borderColor=a},onPointerLeave:C=>{C.currentTarget.style.zIndex="auto",C.currentTarget.style.borderColor=u.DEFAULT_BORDER_COLOR},role:"radio",tabIndex:0,children:g},g)),m=v=>{v.preventDefault(),v.stopPropagation(),r({value:null,questionId:i,type:s})},f=()=>p("div",{children:[p("div",{className:"ul-card--nps__numbers",children:c}),p("div",{className:"ul-card--nps__labels",children:[p("span",{children:l}),p("span",{children:h})]}),!o.required&&p("div",{className:"ul-vertical-centered-container",children:p(z,{onClick:m,children:me(o)})})]});return p("form",{className:M([e,"ul-card--nps",u.CssConstant.FadeInTransition]),children:[p(K,{message:n,properties:o}),p(ie,{properties:o,defaultBody:f})]},i)},Vr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{border:s,useMobileStyling:a,update:d}=V(b=>({border:b.border,useMobileStyling:b.useMobileStyling,update:b.update})),[l,h]=H(""),c=le(null),m=l.trim(),f=o.required===!0&&!m,v=ro(c,()=>d()),g=b=>{v(),b.preventDefault(),b.stopPropagation(),h(b.currentTarget.value)},C=b=>{b.preventDefault(),b.stopPropagation(),n({value:l,questionId:r,type:i})},_=o&&o.openTextPlaceholder?o.openTextPlaceholder:"",k=b=>{b.currentTarget.style.borderColor=s},w=b=>{b.currentTarget.style.borderColor=u.DEFAULT_BORDER_COLOR},R=()=>p("div",{className:"ul-card-text",children:[p("div",{className:"ul-card-text__container",children:p("textarea",{"aria-label":_,"aria-labelledby":u.CssConstant.QuestionHeader,"aria-multiline":"true","aria-placeholder":_,className:M(u.getClasses(u.CssConstant.OpenTextInput,a)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:w,onChange:g,onFocus:k,placeholder:_,ref:c,role:"textbox",tabIndex:0})}),p(z,{disabled:f,onClick:C,style:{backgroundColor:f?"":s},children:me(o)})]});return p("form",{className:M([e,"ul-card--text",u.CssConstant.FadeInTransition]),id:"text-form",children:[p(K,{message:t,properties:o}),p(ie,{defaultBody:R,properties:o})]},r)};var ae=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(ae||{});const $e=e=>e.type===q.AvPermission,ao=e=>e.type===q.ScreenPermission,Br=(e,t)=>!($e(t)?t.permissionDescriptors:[]).includes(ge.Camera)||e.getVideoTracks().length>0,lo=(e,t)=>{if(e===void 0)return ae.RequestNeeded;if(e){if(!Br(e,t))return ae.RequestNeeded}else return ae.TryAgain;return ae.Ready},Zt={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ee=to(e=>({...Zt,reset:()=>{e(Zt)},updatePage:t=>{e(t)}}));function it({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),{recorderEventEmitter:i}=V.getState();i.emit(u.SprigRecordingEvent.AvPermission,{[u.SprigRecordingEventData.PermissionDescriptors]:e.permissionDescriptors,[u.SprigRecordingEventData.StreamReadyCallback]:(s,a)=>{if(n===s)return;let d=e;if(s&&!e.permissionDescriptors.includes(ge.Camera)){const l=t.indexOf(e),h=a!=null&&a.active?l+2:l+1;a!=null&&a.active&&o&&i.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:o,[u.SprigRecordingEventData.StartRecordingCallback]:c=>r({mediaRecordingUids:c})}),d=t[h]}r({currentPage:d,avStream:s})}})}function $r({pages:e,userId:t,responseGroupUid:n,surveyId:o,questionId:r,next:i}){const{updatePage:s}=ee.getState(),{eventEmitFn:a,recorderEventEmitter:d}=V.getState(),l={questionId:r,surveyId:o,visitorId:t,responseGroupUid:n};let h=0;d.emit(u.InternalEventName.RecordedTaskPermissionScreen),a(u.InternalEventName.RecordedTaskPermissionScreen),d.emit(u.SprigRecordingEvent.PermissionStatus,{[u.SprigRecordingEventData.PermissionStatusCallback]:(m,f,v,g)=>{const C=e[h],{type:_}=C,k=[u.MediaType.Screen];if($e(C)){const{permissionDescriptors:w}=C,R=w==null?void 0:w.includes(ge.Microphone),b=w==null?void 0:w.includes(ge.Camera);R&&k.push(u.MediaType.Audio),b&&k.push(u.MediaType.Video);const y=(m==null?void 0:m.active)&&!b,L=(m==null?void 0:m.active)&&f;(y||L)&&h++}ao(e[h])&&v&&(h++,d.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:k,[u.SprigRecordingEventData.StartRecordingCallback]:w=>s({mediaRecordingUids:w})})),s({currentPage:e[h],avStream:m,screenPermissionRequested:v,nextQuestion:i,type:_,passthroughData:l,recordingMediaTypes:k,captureStream:g})}});const c=e[h];return c.type===q.AvPermission&&it({currentPage:c,pages:e}),c}function st({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:o,reset:r}=ee.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=V.getState(),d={value:{taskStatus:e},type:x.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};n&&i.emit(u.SprigRecordingEvent.FinishTask,{[u.SprigRecordingEventData.BeginCallback]:l=>{s({mediaRecordingUid:l,isSubmitted:!0,progressPct:0,isComplete:!1})},[u.SprigRecordingEventData.ProgressCallback]:(l,h)=>{s({mediaRecordingUid:l,progressPct:h.detail,isSubmitted:!1,isComplete:!1})},[u.SprigRecordingEventData.UploadCallback]:l=>{l&&s({mediaRecordingUid:l,isComplete:!0,isSubmitted:!0,progressPct:100})},[u.SprigRecordingEventData.PassthroughData]:n,[u.SprigRecordingEventData.CurrentIndex]:a,[u.SprigRecordingEventData.TaskResponse]:d,[u.SprigRecordingEventData.TaskCompleteCallback]:l=>{d.value.taskDurationMillisecond=l,o&&(d.value.mediaRecordingUids=o),r(),t(d)}})}function _t({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:o}=V.getState(),{updatePage:r,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=ee.getState();if(!i)return;const d=e.indexOf(i);switch(i.type){case q.AvPermission:{const l=a?d+2:d+1;a&&s&&n.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:s,[u.SprigRecordingEventData.StartRecordingCallback]:h=>{r({mediaRecordingUids:h})}}),r({currentPage:e[l]});return}case q.ScreenPermission:n.emit(u.SprigRecordingEvent.ScreenPermission,{[u.SprigRecordingEventData.ScreenPermissionRequested]:t,[u.SprigRecordingEventData.StreamReadyCallback]:(l,h)=>{const c=h?e[d+1]:i;h&&s&&n.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:s,[u.SprigRecordingEventData.StartRecordingCallback]:m=>{r({captureStream:h,mediaRecordingUids:m})}}),r({currentPage:c,screenPermissionRequested:!0,captureStream:h})}});return;case q.StartTask:o(u.InternalEventName.RecordedTaskStart),n.emit(u.InternalEventName.RecordedTaskStart),n.emit(u.SprigRecordingEvent.StartTask),r({currentPage:e[d+1],screenPermissionRequested:!0});return;case q.CompleteTask:return}}const co="ul-permission-graphics-container",uo="ul-permission-body",po=M([co,"ul_recorded-task-inset-spacing"]),He=M(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ho=({richTextBody:e})=>p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Fe=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:p(z,{className:M([n&&"ul-skip-button-below",u.CssConstant.InactiveButton]),onClick:st.bind(null,{status:u.TaskStatus.Abandoned}),children:t||"Skip"}),bt=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),i=(o==null?void 0:o.includes(u.MediaType.Audio))||(o==null?void 0:o.includes(u.MediaType.Video));G(()=>{const s=setInterval(()=>{i&&t&&!t.active?r({avStream:null,currentPage:e[0]}):(!n||!n.active)&&r({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(s)},[t,n,i,e,o,r])},Hr=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r,taskDetail:i}=e;return bt(t),p("div",{className:"ul-task-page",children:[i&&p(ho,{richTextBody:i}),p("div",{className:He,children:[p(z,{onClick:_t.bind(null,{pages:t}),children:o}),p(Fe,{required:n,skipButtonText:r})]})]},"start-task")},Fr=({content:e,pages:t,properties:n})=>{const{buttonText:o,skipButtonText:r}=e;bt(t);const s=p(ie,{properties:n,defaultBody:()=>p("div",{className:He,children:[p(z,{className:"ul-complete-task-button",onClick:st.bind(null,{status:u.TaskStatus.Completed}),children:o}),p(z,{className:M([u.CssConstant.InactiveButton]),onClick:st.bind(null,{status:u.TaskStatus.GivenUp}),children:r})]})});return p("div",{className:"ul-task-page",children:[e.taskDetail&&p(ho,{richTextBody:e.taskDetail}),s]},"complete-task")},zr=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r}=e,[i]=V(d=>[d.tabTitle]),[s,a]=H(!1);return p("div",{children:[p("div",{className:po,children:[p("p",{style:{marginTop:"auto"},children:e.selectTabText}),p("div",{className:"ul-select-tab-container",children:p("p",{className:uo,children:i})})]}),p("div",{className:n?"":He,children:[p(z,{disabled:s,onClick:_t.bind(null,{pages:t,setIsRequestingPermission:a}),children:o}),p(Fe,{required:n,skipButtonText:r})]})]})},qr=({content:e})=>p("div",{className:M([co,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Gr=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:o,permissionDeniedBody:r,skipButtonText:i,tryAgainButtonText:s}=e,a=$e(t[0])?t[0]:null;return G(()=>{const d=setInterval(()=>{a!==null&&it({currentPage:a,pages:t})},1e3);return()=>clearInterval(d)},[a,t]),a?p("div",{children:[p("div",{className:po,children:p("p",{className:"ul-av-permission-denied-paragraph",children:[p("span",{className:"ul-av-permission-denied-headline",children:o}),p("span",{className:uo,children:r})]})}),p("div",{className:He,children:[p(z,{onClick:it.bind(null,{currentPage:a,pages:t}),children:s}),p(Fe,{required:n,skipButtonText:i})]})]}):null},Wr=({stream:e})=>p("video",{autoPlay:!0,className:M(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Zr=({content:e,pages:t,required:n})=>{const{skipButtonText:o}=e,{avStream:r}=ee.getState();return bt(t),p("div",{children:[p(Wr,{stream:r}),p("div",{className:"ul-vertical-button-container-center",children:[p(z,{onClick:_t.bind(null,{pages:t}),children:e.buttonText}),p(Fe,{bottom:!0,required:n,skipButtonText:o})]})]})},Yr=({properties:e})=>{const{pages:t,required:n}=e,{avStream:o,currentPage:r}=ee.getState();if(r===void 0)return null;switch(r==null?void 0:r.type){case q.AvPermission:{const i=lo(o,r);return i===ae.RequestNeeded?p(qr,{content:r}):i===ae.TryAgain?p(Gr,{content:r,pages:t,required:n}):p(Zr,{content:r,pages:t,required:n})}case q.ScreenPermission:return p(zr,{content:r,pages:t,required:n});case q.StartTask:return p(Hr,{content:r,pages:t,required:n});case q.CompleteTask:return p(Fr,{content:r,pages:t,properties:e});default:return null}},Qr=({className:e,properties:t,next:n,questionId:o})=>{const r=V(),{surveyId:i,responseGroupUid:s,userId:a}=r,d=ee(),{screenPermissionRequested:l}=d,h=ee(g=>g.avStream);let c=ee(g=>g.currentPage);c||(c=$r({questionId:o,surveyId:i,next:g=>{n(g)},pages:t.pages,responseGroupUid:s,userId:a}));let m=c.headline,f=c.captionText;const v=lo(h,c);return ao(c)&&l&&(m=c.permissionDeniedHeadline,f=c.permissionDeniedCaptionText),$e(c)&&v===ae.Ready&&(m=c.permissionGrantedHeadline,f=c.permissionGrantedCaptionText),p("div",{className:M([e,"ul-center-horizontally",u.CssConstant.FadeInTransition]),children:[p(K,{message:m,properties:{captionText:f}}),p(Yr,{properties:t})]})},Kr={"{{user_id}}":"externalUserId","{{email}}":"email"},Jr=(e=void 0,t={})=>{if(!e)return e;let n=e;const o=[];for(const[d,l]of Object.entries(Kr))if(n.toLowerCase().includes(d))if(t[l]){const h=new RegExp(d,"gi");n=n.replace(h,t[l])}else o.push(d);if(o.length===0||!n.includes("?"))return n;const r=n.slice(0,n.indexOf("?")),s=n.slice(n.indexOf("?")+1).split("&").map(d=>d.split("=")).filter(d=>!o.includes(d[1]));if(s.length===0)return r;const a=s.map(d=>d.join("=")).join("&");return`${r}?${a}`},Xr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{visitorAttributes:s}=V(c=>({visitorAttributes:c.visitorAttributes})),a=(c,m=!1)=>{n({value:m?{skipped:!0}:void 0,questionId:r,type:i})},d=c=>{(c.key==="Enter"||c.key===" ")&&n({value:void 0,questionId:r,type:i})},l=()=>{const c=Jr(o&&o.buttonUrl,s);return p("div",{className:"ul-card-button-group",children:[p("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:c,id:"ul-card-text__button",onClick:a,onKeyPress:d,rel:"noreferrer",role:c?"link":"button",tabIndex:0,target:"_blank",children:me(o)}),o.required===!1&&p("button",{className:u.CssConstant.SkipButton,onClick:m=>a(m,!0),children:vt(o)})]})},h=(c,m)=>c?p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:c},id:"ul-card__text-url-body-container"}):p("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(m?m.split(/\n\s*\n/g):[]).map((f,v)=>p("p",{children:f},v))});return p("div",{className:M([e,"ul-card__text-url-prompt",u.CssConstant.FadeInTransition]),children:[p(K,{message:t}),h(o==null?void 0:o.richTextBody,o==null?void 0:o.body),p(ie,{defaultBody:l,properties:o})]},r)},ei=({className:e,questionId:t})=>{const{border:n,destroy:o,endCard:r,forceBrandedLogo:i}=V(d=>({border:d.border,destroy:d.destroy,endCard:d.endCard,forceBrandedLogo:d.forceBrandedLogo}));G(()=>{setTimeout(()=>{o(u.APP_ID)},i?4e3:2e3)},[o,i]);const s=r&&r.subheader?p("p",{className:u.CssConstant.Caption,children:r.subheader}):null,a=r&&r.headline?r.headline:"";return p("div",{className:M([e,"ul-card--thanks",u.CssConstant.FadeInTransition]),children:p("div",{children:p("div",{className:"ul-card--thanks-content",children:[p("div",{className:"ul-thanks-check",children:p("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[p("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),p("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),p("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),p(K,{message:a}),s]})})},t)},ue="https://cdn.sprig.com",P={document:void 0,videojs:void 0},ti=`/* progress control styles */
|
|
28
|
+
`,me=e=>(e==null?void 0:e.buttonText)||"Next",vt=e=>(e==null?void 0:e.skipButtonText)||"Skip",Dr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{useMobileStyling:s,border:a}=V(_=>({useMobileStyling:_.useMobileStyling,border:_.border})),[d,l]=$(!1),[h,c]=$(""),[f,m]=$(!1),v=o==null?void 0:o.collectName,g=(o==null?void 0:o.nameLabelText)||"Full Name",C=(o==null?void 0:o.consentText)||"I agree to the stated conditions",b=(o==null?void 0:o.submitButtonText)||"Submit",y=!!h.trim(),w=d&&(!v||y),R=(_,T=!1)=>{_.preventDefault(),_.stopPropagation();let L=null;if(!T){if(!w){m(!0);return}L={submitted:!0},v&&(L.name=h)}n({value:L,questionId:r,type:i})},S=_=>{_.preventDefault(),_.stopPropagation(),c(_.currentTarget.value)},k=_=>{_.currentTarget.style.borderColor=f&&!y?u.ERROR_BORDER_COLOR:a},O=_=>{_.currentTarget.style.borderColor=f&&!y?u.ERROR_BORDER_COLOR:u.DEFAULT_BORDER_COLOR},I=()=>p("div",{children:[p(gt,{allowTextEntry:!1,border:a,error:f&&!d,isRadio:!1,isSelected:d,label:C,onUserInputChanged:({selected:_})=>{_!==d&&l(!d)},useMobileStyling:s}),v&&p("input",{"aria-label":g,"aria-placeholder":g,className:M(u.getClasses(u.CssConstant.ConsentLegalNameInput,s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:O,onFocus:k,onInput:S,placeholder:g,style:f&&!y?{borderColor:u.ERROR_BORDER_COLOR}:{},tabIndex:0,value:h}),p("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[p(z,{className:w?"":u.CssConstant.ButtonDisabled,onClick:R,children:b}),o.required===!1&&p("button",{className:u.CssConstant.SkipButton,onClick:_=>R(_,!0),children:vt(o)})]})]});return p("div",{className:M([e,"ul-card__consent-legal",u.CssConstant.FadeInTransition]),children:[p(K,{message:t}),p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:o!=null&&o.richTextBody?{__html:o.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),p(se,{properties:o,defaultBody:I,embeddedType:"pdf"})]},r)},Lr=({activeValue:e,border:t,icon:n,isPressed:o,onSubmit:r,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:d,useMobileStyling:l,value:h})=>{const c=`option-${h}`,f=s===pe.Number,m=s===pe.Star,v=f&&h===e,[g,C]=h<=e&&m||h===e?o?[t,1]:[t,.3]:["",1],b=()=>{switch(s){case pe.Star:return M([...u.getClasses(u.CssConstant.LikertStar,l),...u.getClasses(`${u.CssConstant.LikertStar}-${h}`,l)]);case pe.Smiley:return M([...u.getClasses(u.CssConstant.LikertSmiley,l),...u.getClasses(`${u.CssConstant.LikertSmiley}-${h}`,l)]);default:return M(h===i?[...u.getClasses(u.CssConstant.LikertNumber,l),...u.getClasses(`${u.CssConstant.LikertNumber}-${h}`,l),...u.getClasses("likert-last-option",l)]:[...u.getClasses(u.CssConstant.LikertNumber,l),...u.getClasses(`${u.CssConstant.LikertNumber}-${h}`,l)])}},y=()=>{a(-1),d(!1)};return p("div",{"aria-label":f?void 0:String(h),className:b(),dangerouslySetInnerHTML:{__html:n},id:c,onClick:()=>r(),onPointerDown:()=>d(!0),onPointerEnter:()=>a(h),onPointerLeave:y,role:"radio",style:{color:f?"":g,borderColor:v?g:"",fillOpacity:v?"":C,zIndex:v?3:"auto"},tabIndex:0})},Nr=({className:e,labels:t,message:n,next:o,properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(I=>({border:I.border,useMobileStyling:I.useMobileStyling})),[l,h]=$(-1),[c,f]=$(!1),m=t&&t.left,v=t&&t.right;let g;const{range:C,scaleLabelType:b,ratingIcons:y}=r;C&&(g=Number(C));const w=g||5,R=I=>{var _,T;switch(b){case pe.Star:return(_=y[0])==null?void 0:_.svg;case pe.Smiley:return(T=y[I])==null?void 0:T.svg;default:return String(I+1)}},S=[...Array(w)].map((I,_)=>{const T=_+1;return p(Lr,{activeValue:l,border:a,icon:R(_),isPressed:c,onSubmit:()=>o({value:T,questionId:i,type:s}),range:w,scaleLabelType:b,setActiveValue:h,setIsPressed:f,useMobileStyling:d,value:T},_)}),k=I=>{I.preventDefault(),I.stopPropagation(),o({value:null,questionId:i,type:s})},O=()=>p(F,{children:[p("div",{"aria-label":`Rating (1 - ${w})`,className:"ul-card--likert__numbers",role:"radiogroup",children:S}),p("div",{className:"ul-card--likert__labels",children:[p("span",{children:m}),p("span",{children:v})]}),!r.required&&p("div",{className:"ul-vertical-centered-container",children:p(z,{onClick:k,children:me(r)})})]});return p("form",{className:M([e,"ul-card--likert",u.CssConstant.FadeInTransition]),children:[p(K,{message:n,properties:r}),p(se,{properties:r,defaultBody:O})]},i)},Or=({className:e,message:t,next:n,options:o,properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(_=>({border:_.border,useMobileStyling:_.useMobileStyling})),l=r.matrixColumn,h=o.length,c=l.length,f=r.required,m=ie(null),[v,g]=$(!1),C=()=>{const _=m.current;_&&g(_.clientWidth+Math.abs(_.scrollLeft)<_.scrollWidth)};q(()=>{let _;if(m.current){_=m.current;const T=new ResizeObserver(L=>{g(Math.round(L[0].contentRect.width)<_.scrollWidth)});return T.observe(_),()=>{_&&T.unobserve(_)}}},[]);const b=_=>{_.preventDefault(),_.stopPropagation(),n({value:w,questionId:i,type:s})},y=o.reduce((_,T)=>(_[T.id]=null,_),{}),[w,R]=$(y),S=(_,T)=>{R(L=>({...L,[_]:T}))},k=f&&Object.values(w).every(_=>_==null),O=o.map(_=>p(F,{children:[p("div",{"aria-label":_.label,className:"ul-matrix-row-label",children:_.label},_.label),p("div",{className:"ul-matrix-row-options",role:"radiogroup",children:l.map((T,L)=>{const D=L===c-1;return p("div",{className:M("ul-matrix-option-wrapper",D&&"ul-matrix-last-option"),children:p(gt,{allowTextEntry:!1,ariaLabel:`${_.label}-${T.label}`,border:a,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${_.id}-${T.value}`,isRadio:!0,isSelected:w[_.id]===T.value,onUserInputChanged:()=>S(_.id,T.value),useMobileStyling:d})},T.value)})})]})),I=()=>p("div",{className:"ul-card--matrix_question_container",children:[p("div",{className:M(["ul-card--matrix_container",v&&"ul-matrix-scroll-gradient"]),onScroll:()=>{C()},ref:m,children:p("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${c}; --numRows: ${h+1}`,children:[p("div",{})," ",l.map(_=>p("div",{className:"ul-matrix-column-label",children:_.label},_.label)),O]})}),v&&p("button",{className:"ul-matrix-scroll-arrow",onClick:_=>{_.preventDefault();const T=m.current;if(T){const L=getComputedStyle(T).direction==="rtl";T.scrollLeft=L?T.clientWidth-T.scrollWidth:T.scrollWidth}},children:p("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:p("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})})}),p("div",{className:"ul-card__button-wrapper",children:p(z,{disabled:k,children:me(r)})})]});return p("form",{className:M([e,u.CssConstant.FadeInTransition,"ul-card__matrix"]),id:"text-form",onSubmit:b,children:[p(K,{message:t,properties:r}),p(se,{properties:r,defaultBody:I})]},i)},so=({className:e,message:t,onSubmit:n,options:o=[],properties:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(k=>({border:k.border,useMobileStyling:k.useMobileStyling})),l=o.reduce((k,O)=>(k[O.id]={isSelected:!1},k),{}),[h,c]=$(l),f=s===x.MultipleChoice,m=r.required,v=o.find(k=>{var O;return(O=k.optionProperties)==null?void 0:O.noneOfTheAbove}),g=Object.entries(h).some(([k,O])=>{var T;const I=o.find(L=>`${L.id}`===k),_=O.userText===void 0||O.userText.trim()==="";return((T=I==null?void 0:I.optionProperties)==null?void 0:T.allowsTextEntry)&&_&&O.isSelected}),C=Object.values(h).some(k=>k.isSelected),b=g||m&&!C,y=o.map(({id:k,label:O,value:I,optionProperties:_})=>{var N,G;const T=`${k}`,{allowsTextEntry:L,noneOfTheAbove:D}={allowsTextEntry:!1,noneOfTheAbove:!1,..._};return p(gt,{allowTextEntry:L,border:a,error:!1,id:T,isRadio:f,noneOfTheAbove:D,isSelected:!!((N=h[T])!=null&&N.isSelected),label:O,onUserInputChanged:P=>R(P.id,P.selected,P.userText,P.noneOfTheAbove),promptText:"Please specify",text:(G=h[k])==null?void 0:G.userText,useMobileStyling:d,value:I},T)}),w=k=>{k.preventDefault(),k.stopPropagation(),n(h)},R=(k,O,I,_)=>{const T=Object.assign({},h);if((f||_)&&O)for(const L of Object.values(T))L.isSelected=!1,delete L.userText;else v&&!_&&h[v.id].isSelected&&(T[v.id].isSelected=!1);T[k]={isSelected:O,userText:I},c(T)},S=()=>p("div",{children:[p("div",{className:M(u.getClasses(u.CssConstant.ChoiceGroup,d)),role:f?"radiogroup":"group",children:y}),p("div",{className:"ul-card__button-wrapper",children:p(z,{disabled:b,onClick:w,children:me(r)})})]});return p("form",{className:M([e,"ul-card--multiple",u.CssConstant.FadeInTransition]),id:"text-form",onSubmit:w,children:[p(K,{message:t,properties:r}),p(se,{properties:r,defaultBody:S})]},i)},Mr=e=>{const{questionId:t,type:n,next:o,options:r}=e;return p(so,{...e,onSubmit:s=>{const a=Object.entries(s).find(([,f])=>f.isSelected)||[void 0,void 0],[d,l]=a,h=r.find(f=>`${f.id}`===d),c=l!=null&&l.userText?{[d]:{userText:l.userText}}:null;o({value:h&&d?{[d]:h.value}:{},secondaryValue:c,questionId:t,type:n})}})},Ar=e=>{const{questionId:t,type:n,next:o}=e;return p(so,{...e,onSubmit:i=>{const s={},a=Object.entries(i).reduce((l,[h,c])=>(l[h]=c.isSelected,l),s),d=Object.entries(i).reduce((l,[h,c])=>{if(!c.userText)return l;const f=l||{};return f[h]={userText:c.userText},f},null);o({value:a,secondaryValue:d,questionId:t,type:n})}})},Ur=({className:e,props:{labels:t,message:n,properties:o},next:r,questionId:i,type:s})=>{const{border:a,useMobileStyling:d}=V(v=>({border:v.border,useMobileStyling:v.useMobileStyling})),l=t&&t.left,h=t&&t.right,c=[...Array(11)].map((v,g)=>p("div",{className:M([...u.getClasses(u.CssConstant.NPSNumber,d),...u.getClasses(`${u.CssConstant.NPSNumber}-${g}`,d)]),id:`option-${g}`,onClick:()=>r({value:g,questionId:i,type:s}),onKeyPress:C=>{C.preventDefault(),(C.key==="Enter"||C.key===" ")&&r({value:g,questionId:i,type:s})},onPointerDown:C=>{C.currentTarget.style.zIndex="2",C.currentTarget.style.borderColor=a},onPointerLeave:C=>{C.currentTarget.style.zIndex="auto",C.currentTarget.style.borderColor=u.DEFAULT_BORDER_COLOR},role:"radio",tabIndex:0,children:g},g)),f=v=>{v.preventDefault(),v.stopPropagation(),r({value:null,questionId:i,type:s})},m=()=>p("div",{children:[p("div",{className:"ul-card--nps__numbers",children:c}),p("div",{className:"ul-card--nps__labels",children:[p("span",{children:l}),p("span",{children:h})]}),!o.required&&p("div",{className:"ul-vertical-centered-container",children:p(z,{onClick:f,children:me(o)})})]});return p("form",{className:M([e,"ul-card--nps",u.CssConstant.FadeInTransition]),children:[p(K,{message:n,properties:o}),p(se,{properties:o,defaultBody:m})]},i)},Vr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{border:s,useMobileStyling:a,update:d}=V(S=>({border:S.border,useMobileStyling:S.useMobileStyling,update:S.update})),[l,h]=$(""),c=ie(null),f=l.trim(),m=o.required===!0&&!f,v=ro(c,()=>d()),g=S=>{v(),S.preventDefault(),S.stopPropagation(),h(S.currentTarget.value)},C=S=>{S.preventDefault(),S.stopPropagation(),n({value:l,questionId:r,type:i})},b=o&&o.openTextPlaceholder?o.openTextPlaceholder:"",y=S=>{S.currentTarget.style.borderColor=s},w=S=>{S.currentTarget.style.borderColor=u.DEFAULT_BORDER_COLOR},R=()=>p("div",{className:"ul-card-text",children:[p("div",{className:"ul-card-text__container",children:p("textarea",{"aria-label":b,"aria-labelledby":u.CssConstant.QuestionHeader,"aria-multiline":"true","aria-placeholder":b,className:M(u.getClasses(u.CssConstant.OpenTextInput,a)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:w,onChange:g,onFocus:y,placeholder:b,ref:c,role:"textbox",tabIndex:0})}),p(z,{disabled:m,onClick:C,style:{backgroundColor:m?"":s},children:me(o)})]});return p("form",{className:M([e,"ul-card--text",u.CssConstant.FadeInTransition]),id:"text-form",children:[p(K,{message:t,properties:o}),p(se,{defaultBody:R,properties:o})]},r)};var le=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(le||{});const $e=e=>e.type===W.AvPermission,ao=e=>e.type===W.ScreenPermission,Br=(e,t)=>!($e(t)?t.permissionDescriptors:[]).includes(ge.Camera)||e.getVideoTracks().length>0,lo=(e,t)=>{if(e===void 0)return le.RequestNeeded;if(e){if(!Br(e,t))return le.RequestNeeded}else return le.TryAgain;return le.Ready},Zt={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ee=to(e=>({...Zt,reset:()=>{e(Zt)},updatePage:t=>{e(t)}}));function it({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),{recorderEventEmitter:i}=V.getState();i.emit(u.SprigRecordingEvent.AvPermission,{[u.SprigRecordingEventData.PermissionDescriptors]:e.permissionDescriptors,[u.SprigRecordingEventData.StreamReadyCallback]:(s,a)=>{if(n===s)return;let d=e;if(s&&!e.permissionDescriptors.includes(ge.Camera)){const l=t.indexOf(e),h=a!=null&&a.active?l+2:l+1;a!=null&&a.active&&o&&i.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:o,[u.SprigRecordingEventData.StartRecordingCallback]:c=>r({mediaRecordingUids:c})}),d=t[h]}r({currentPage:d,avStream:s})}})}function $r({pages:e,userId:t,responseGroupUid:n,surveyId:o,questionId:r,next:i}){const{updatePage:s}=ee.getState(),{eventEmitFn:a,recorderEventEmitter:d}=V.getState(),l={questionId:r,surveyId:o,visitorId:t,responseGroupUid:n};let h=0;d.emit(u.InternalEventName.RecordedTaskPermissionScreen),a(u.InternalEventName.RecordedTaskPermissionScreen),d.emit(u.SprigRecordingEvent.PermissionStatus,{[u.SprigRecordingEventData.PermissionStatusCallback]:(f,m,v,g)=>{const C=e[h],{type:b}=C,y=[u.MediaType.Screen];if($e(C)){const{permissionDescriptors:w}=C,R=w==null?void 0:w.includes(ge.Microphone),S=w==null?void 0:w.includes(ge.Camera);R&&y.push(u.MediaType.Audio),S&&y.push(u.MediaType.Video);const k=(f==null?void 0:f.active)&&!S,O=(f==null?void 0:f.active)&&m;(k||O)&&h++}ao(e[h])&&v&&(h++,d.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:y,[u.SprigRecordingEventData.StartRecordingCallback]:w=>s({mediaRecordingUids:w})})),s({currentPage:e[h],avStream:f,screenPermissionRequested:v,nextQuestion:i,type:b,passthroughData:l,recordingMediaTypes:y,captureStream:g})}});const c=e[h];return c.type===W.AvPermission&&it({currentPage:c,pages:e}),c}function st({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:o,reset:r}=ee.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=V.getState(),d={value:{taskStatus:e},type:x.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};n&&i.emit(u.SprigRecordingEvent.FinishTask,{[u.SprigRecordingEventData.BeginCallback]:l=>{s({mediaRecordingUid:l,isSubmitted:!0,progressPct:0,isComplete:!1})},[u.SprigRecordingEventData.ProgressCallback]:(l,h)=>{s({mediaRecordingUid:l,progressPct:h.detail,isSubmitted:!1,isComplete:!1})},[u.SprigRecordingEventData.UploadCallback]:l=>{l&&s({mediaRecordingUid:l,isComplete:!0,isSubmitted:!0,progressPct:100})},[u.SprigRecordingEventData.PassthroughData]:n,[u.SprigRecordingEventData.CurrentIndex]:a,[u.SprigRecordingEventData.TaskResponse]:d,[u.SprigRecordingEventData.TaskCompleteCallback]:l=>{d.value.taskDurationMillisecond=l,o&&(d.value.mediaRecordingUids=o),r(),t(d)}})}function _t({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:o}=V.getState(),{updatePage:r,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=ee.getState();if(!i)return;const d=e.indexOf(i);switch(i.type){case W.AvPermission:{const l=a?d+2:d+1;a&&s&&n.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:s,[u.SprigRecordingEventData.StartRecordingCallback]:h=>{r({mediaRecordingUids:h})}}),r({currentPage:e[l]});return}case W.ScreenPermission:n.emit(u.SprigRecordingEvent.ScreenPermission,{[u.SprigRecordingEventData.ScreenPermissionRequested]:t,[u.SprigRecordingEventData.StreamReadyCallback]:(l,h)=>{const c=h?e[d+1]:i;h&&s&&n.emit(u.SprigRecordingEvent.BeginRecording,{[u.SprigRecordingEventData.RecordingMediaTypes]:s,[u.SprigRecordingEventData.StartRecordingCallback]:f=>{r({captureStream:h,mediaRecordingUids:f})}}),r({currentPage:c,screenPermissionRequested:!0,captureStream:h})}});return;case W.StartTask:o(u.InternalEventName.RecordedTaskStart),n.emit(u.InternalEventName.RecordedTaskStart),n.emit(u.SprigRecordingEvent.StartTask),r({currentPage:e[d+1],screenPermissionRequested:!0});return;case W.CompleteTask:return}}const co="ul-permission-graphics-container",uo="ul-permission-body",po=M([co,"ul_recorded-task-inset-spacing"]),He=M(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ho=({richTextBody:e})=>p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Fe=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:p(z,{className:M([n&&"ul-skip-button-below",u.CssConstant.InactiveButton]),onClick:st.bind(null,{status:u.TaskStatus.Abandoned}),children:t||"Skip"}),bt=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:o,updatePage:r}=ee.getState(),i=(o==null?void 0:o.includes(u.MediaType.Audio))||(o==null?void 0:o.includes(u.MediaType.Video));q(()=>{const s=setInterval(()=>{i&&t&&!t.active?r({avStream:null,currentPage:e[0]}):(!n||!n.active)&&r({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(s)},[t,n,i,e,o,r])},Hr=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r,taskDetail:i}=e;return bt(t),p("div",{className:"ul-task-page",children:[i&&p(ho,{richTextBody:i}),p("div",{className:He,children:[p(z,{onClick:_t.bind(null,{pages:t}),children:o}),p(Fe,{required:n,skipButtonText:r})]})]},"start-task")},Fr=({content:e,pages:t,properties:n})=>{const{buttonText:o,skipButtonText:r}=e;bt(t);const s=p(se,{properties:n,defaultBody:()=>p("div",{className:He,children:[p(z,{className:"ul-complete-task-button",onClick:st.bind(null,{status:u.TaskStatus.Completed}),children:o}),p(z,{className:M([u.CssConstant.InactiveButton]),onClick:st.bind(null,{status:u.TaskStatus.GivenUp}),children:r})]})});return p("div",{className:"ul-task-page",children:[e.taskDetail&&p(ho,{richTextBody:e.taskDetail}),s]},"complete-task")},zr=({content:e,pages:t,required:n})=>{const{buttonText:o,skipButtonText:r}=e,[i]=V(d=>[d.tabTitle]),[s,a]=$(!1);return p("div",{children:[p("div",{className:po,children:[p("p",{style:{marginTop:"auto"},children:e.selectTabText}),p("div",{className:"ul-select-tab-container",children:p("p",{className:uo,children:i})})]}),p("div",{className:n?"":He,children:[p(z,{disabled:s,onClick:_t.bind(null,{pages:t,setIsRequestingPermission:a}),children:o}),p(Fe,{required:n,skipButtonText:r})]})]})},qr=({content:e})=>p("div",{className:M([co,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Wr=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:o,permissionDeniedBody:r,skipButtonText:i,tryAgainButtonText:s}=e,a=$e(t[0])?t[0]:null;return q(()=>{const d=setInterval(()=>{a!==null&&it({currentPage:a,pages:t})},1e3);return()=>clearInterval(d)},[a,t]),a?p("div",{children:[p("div",{className:po,children:p("p",{className:"ul-av-permission-denied-paragraph",children:[p("span",{className:"ul-av-permission-denied-headline",children:o}),p("span",{className:uo,children:r})]})}),p("div",{className:He,children:[p(z,{onClick:it.bind(null,{currentPage:a,pages:t}),children:s}),p(Fe,{required:n,skipButtonText:i})]})]}):null},Gr=({stream:e})=>p("video",{autoPlay:!0,className:M(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Zr=({content:e,pages:t,required:n})=>{const{skipButtonText:o}=e,{avStream:r}=ee.getState();return bt(t),p("div",{children:[p(Gr,{stream:r}),p("div",{className:"ul-vertical-button-container-center",children:[p(z,{onClick:_t.bind(null,{pages:t}),children:e.buttonText}),p(Fe,{bottom:!0,required:n,skipButtonText:o})]})]})},Yr=({properties:e})=>{const{pages:t,required:n}=e,{avStream:o,currentPage:r}=ee.getState();if(r===void 0)return null;switch(r==null?void 0:r.type){case W.AvPermission:{const i=lo(o,r);return i===le.RequestNeeded?p(qr,{content:r}):i===le.TryAgain?p(Wr,{content:r,pages:t,required:n}):p(Zr,{content:r,pages:t,required:n})}case W.ScreenPermission:return p(zr,{content:r,pages:t,required:n});case W.StartTask:return p(Hr,{content:r,pages:t,required:n});case W.CompleteTask:return p(Fr,{content:r,pages:t,properties:e});default:return null}},Qr=({className:e,properties:t,next:n,questionId:o})=>{const r=V(),{surveyId:i,responseGroupUid:s,userId:a}=r,d=ee(),{screenPermissionRequested:l}=d,h=ee(g=>g.avStream);let c=ee(g=>g.currentPage);c||(c=$r({questionId:o,surveyId:i,next:g=>{n(g)},pages:t.pages,responseGroupUid:s,userId:a}));let f=c.headline,m=c.captionText;const v=lo(h,c);return ao(c)&&l&&(f=c.permissionDeniedHeadline,m=c.permissionDeniedCaptionText),$e(c)&&v===le.Ready&&(f=c.permissionGrantedHeadline,m=c.permissionGrantedCaptionText),p("div",{className:M([e,"ul-center-horizontally",u.CssConstant.FadeInTransition]),children:[p(K,{message:f,properties:{captionText:m}}),p(Yr,{properties:t})]})},Kr={"{{user_id}}":"externalUserId","{{email}}":"email"},Jr=(e=void 0,t={})=>{if(!e)return e;let n=e;const o=[];for(const[d,l]of Object.entries(Kr))if(n.toLowerCase().includes(d))if(t[l]){const h=new RegExp(d,"gi");n=n.replace(h,t[l])}else o.push(d);if(o.length===0||!n.includes("?"))return n;const r=n.slice(0,n.indexOf("?")),s=n.slice(n.indexOf("?")+1).split("&").map(d=>d.split("=")).filter(d=>!o.includes(d[1]));if(s.length===0)return r;const a=s.map(d=>d.join("=")).join("&");return`${r}?${a}`},Xr=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{visitorAttributes:s}=V(c=>({visitorAttributes:c.visitorAttributes})),a=(c,f=!1)=>{n({value:f?{skipped:!0}:void 0,questionId:r,type:i})},d=c=>{(c.key==="Enter"||c.key===" ")&&n({value:void 0,questionId:r,type:i})},l=()=>{const c=Jr(o&&o.buttonUrl,s);return p("div",{className:"ul-card-button-group",children:[p("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:c,id:"ul-card-text__button",onClick:a,onKeyPress:d,rel:"noreferrer",role:c?"link":"button",tabIndex:0,target:"_blank",children:me(o)}),o.required===!1&&p("button",{className:u.CssConstant.SkipButton,onClick:f=>a(f,!0),children:vt(o)})]})},h=(c,f)=>c?p("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:c},id:"ul-card__text-url-body-container"}):p("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(f?f.split(/\n\s*\n/g):[]).map((m,v)=>p("p",{children:m},v))});return p("div",{className:M([e,"ul-card__text-url-prompt",u.CssConstant.FadeInTransition]),children:[p(K,{message:t}),h(o==null?void 0:o.richTextBody,o==null?void 0:o.body),p(se,{defaultBody:l,properties:o})]},r)},ei=({className:e,questionId:t})=>{const{border:n,destroy:o,endCard:r,forceBrandedLogo:i}=V(d=>({border:d.border,destroy:d.destroy,endCard:d.endCard,forceBrandedLogo:d.forceBrandedLogo}));q(()=>{setTimeout(()=>{o(u.APP_ID)},i?4e3:2e3)},[o,i]);const s=r&&r.subheader?p("p",{className:u.CssConstant.Caption,children:r.subheader}):null,a=r&&r.headline?r.headline:"";return p("div",{className:M([e,"ul-card--thanks",u.CssConstant.FadeInTransition]),children:p("div",{children:p("div",{className:"ul-card--thanks-content",children:[p("div",{className:"ul-thanks-check",children:p("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[p("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),p("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),p("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),p(K,{message:a}),s]})})},t)},ue="https://cdn.sprig.com",j={document:void 0,videojs:void 0},ti=`/* progress control styles */
|
|
29
29
|
.video-js .vjs-control {
|
|
30
30
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
31
31
|
}
|
|
@@ -682,4 +682,4 @@ span.ul-button-text {
|
|
|
682
682
|
.vjs-poster {
|
|
683
683
|
background-size: cover;
|
|
684
684
|
}
|
|
685
|
-
`,ni=e=>{const t=P.document.createElement("div");return t.className="ul-video-player-loading",t.id=xt(e),["first","second","third","fourth"].map(n=>{const o=P.document.createElement("div");o.className=n,t.appendChild(o)}),t},xt=e=>e+"-loading-spiner",$="hidden",Yt=".m3u8",Ye="questionId",Qe="ul-video-recorder-camera-off-button",Ke="ul-recording-in-session",oi=[{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`}],mo=[{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:ti}],fo="-video-player",go="-secondary-video-player",vo="-video-recorder";let X,Qt;const se=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)=>{se({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)},ri=(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)}),_o=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,o)=>(n.push(ri(P.document.head,o)),n),[])).then(()=>{P.videojs=P.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},Kt=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=$;else if(t==="success")e.style.visibility=$,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]},ii=(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(O.ERROR,{type:O.PERMISSION_DENIED}),se({event:"Video Permission Denied",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})):(n&&n(O.ERROR,{type:O.OTHER}),te(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,r,a,d))}),e.on("error",function(l,h){te(h||e.error(),"recorderError",t,r,a,d)}),e.on("startRecord",function(l,h){o(e.uploadProgressLabel,"none"),se({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 l=Je(e,Ye);if(!i){const g="internal error: missing fields in payload";return n&&n(O.ERROR,{type:O.OTHER}),te(new Error(g),"finishRecord",t,r,a,d),null}e.record().stopDevice();const h=e.cameraOff?O.MEDIA_TYPE_AUDIO:O.MEDIA_TYPE_VIDEO,c=u.v4();se({event:"Video Record Finish",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h}});const m={surveyId:i,updatedAt:new Date().toISOString(),mediaType:h,mediaRecordingUid:c};l&&(m.questionId=l),s&&(m.responseGroupUid=s),a&&(m.visitorId=a);const v=await(async()=>{const g=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(g.ok){const C=await g.json();return n&&n(O.UPLOAD_STARTED,{[O.UPLOAD_ID]:C.upload.id,[O.MEDIA_TYPE]:h,[O.MEDIA_RECORDING_UID]:c}),C.upload.url}else return n&&n(O.ERROR,{type:O.OTHER,response:g}),te(new Error("failed to get upload response with url"),"finishRecord",t,r,a,d),null})();v&&(X=P.document.defaultView.UpChunk.createUpload({endpoint:v,file:new P.document.defaultView.File([e.recordedData],`recording ${h} ${Date.now()}`),chunkSize:5120}),X.startTime=Date.now(),se({event:"Video Upload Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h,url:v}}),X.on("error",g=>{o(e.uploadProgressLabel,"none"),n&&n(O.UPLOAD_FINISHED,{[O.MEDIA_RECORDING_UID]:c}),te(g,"finishRecord",t,r,a,d)}),X.on("progress",g=>{n&&n(O.UPLOAD_PROGRESS,{[O.MEDIA_RECORDING_UID]:c,[O.UPLOAD_PROGRESS_PCT]:g.detail}),o(e.uploadProgressLabel,"progress",g.detail)}),X.on("success",()=>{o(e.uploadProgressLabel,"success"),n&&n(O.UPLOAD_FINISHED,{[O.MEDIA_RECORDING_UID]:c}),se({event:"Video Upload Success",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h,url:v,elapsedMs:X.startTime&&Date.now()-X.startTime}})}))})},bo=(e,t)=>{const n=new(P.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(o=>{n.addChild(o)}),si(n),n},si=e=>{e.children().forEach(t=>{if(Z[t.name_]){const n=Le(Z[t.name_],`ul-${Z[t.name_]}`);t.el_.appendChild(n)}})},Le=(e,t="")=>{const n=P.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},xo=(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?mi(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&&ci(e,!1),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)},ai=(e,t,n)=>{e.addClass(`ul${go}`);const o=new(P.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(o),n&&n(e)},li=(e,t,n,o,r,i,s,a=!1)=>{Qt=Date.now();const l=Ae(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(!l)return;l.payload=n;const{surveyId:h,questionId:c,responseGroupUid:m,visitorId:f,envId:v}=n;let g;const C=A=>{const I=Qe,D=Qe+"-audio-only";Kt(l.uploadProgressLabel,"none"),X&&X.startTime>=Qt&&X.abort();const W=P.document.getElementById("ul-camera-button");A?(l.children()[0].classList.add("vjs-hidden"),R.removeClass(I),R.addClass(D),W.innerHTML=Z.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),g==null||g.getTracks().forEach(T=>{T.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(T=>{g=T,T.getVideoTracks().forEach(J=>{J.enabled=!1}),l.record().onDeviceReady(T)}).catch(l.record().onDeviceError.bind(l.record()))):(g==null||g.getVideoTracks().forEach(T=>{T.enabled=!0}),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),R.removeClass(D),R.addClass(I),W.innerHTML=Z.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(P.videojs.getComponent("Button"))(l,{clickHandler:()=>{_.hasClass($)||(se({event:"Video Delete Button Clicked",apiBase:o,headers:s,visitorId:f,envId:v,metadata:{questionId:c,responseGroupUid:m,surveyId:h}}),C(l.cameraOff),r(O.DELETE,{}),R.removeClass($),_.addClass($))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Le(Z.DeleteButton,"ul-delete-button"));const k=P.document.getElementById(t),w=()=>{k.classList.contains("vjs-fullscreen")&&l.cameraOff?k.style.display="table":k.style.display="flex"};w();const R=new(P.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,se({event:"Video Camera Button Clicked",apiBase:o,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:c,responseGroupUid:m,surveyId:h,cameraOff:l.cameraOff}}),C(l.cameraOff),!_.hasClass($)&&_.addClass($),r(O.DELETE,{}),w())}});R.addClass(Qe),R.el_.appendChild(Le(Z.TurnOffCamera,"ul-camera-button"));const b=new(P.videojs.getComponent("Button"))(l,{clickHandler:()=>{const A=P.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),A&&(A.innerHTML=Z.RecordButton),b.removeClass(Ke),_.removeClass($);else{const I=P.document.getElementById("ul-recording-countdown-screen");if(I)I.remove(),A&&(A.innerHTML=Z.RecordButton),C(l.cameraOff),r(O.DELETE,{}),R.removeClass($),_.addClass($),b.removeClass(Ke),j.show();else{b.addClass(Ke),j.hide(),R.addClass($),_.addClass($),A&&(A.innerHTML=Z.StopButton);const D=P.document.createElement("div");D.id="ul-recording-countdown-screen",k.insertBefore(D,k.children[1]),D.style.height=`${k.offsetHeight}px`,Co(l,3)}}}});b.addClass("ul-video-recorder-toggle-button"),b.el_.appendChild(Le(Z.RecordButton,"ul-recorder-toggle"));const y=P.document.createElement("p");y.style.visibility="hidden",y.className="ul-upload-progress-label",e.appendChild(y),l.uploadProgressLabel=y;const L=bo(l,[_,R,"PlayToggle",b,"FullscreenToggle"]),j=L.children().find(A=>A.name_==="FullscreenToggle");j.hasClass("vjs-disabled")&&j.hide();const E=L.children().find(A=>A.name_==="PlayToggle");E.hide(),i&&R.addClass($),!i&&_.addClass($),xo(l,L,i,!1,a),l.on("stopRecord",()=>{b.hide(),E.show(),j.show(),_.removeClass($)}),l.on("deviceReady",()=>{b.show(),E.hide(),_.addClass($)}),ii(l,o,r,Kt,s),i&&(l.deviceButton&&l.deviceButton.hide(),l.src(i),E.show(),b.hide(),_.removeClass($));const N=[{name:"microphone"}];!l.cameraOff&&N.push({name:"camera"}),Promise.all(N.map(A=>{var I;return(I=navigator==null?void 0:navigator.permissions)==null?void 0:I.query(A)})).then(A=>{A.reduce((D,W)=>D&W.state==="granted",!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),!i&&l.record().getDevice())}).catch(A=>{})},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))},yo=e=>{const t=P.document.createElement("div");return t.className="ul-video-container",t.appendChild(ni(e)),t},at=(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},ci=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),P.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),P.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Ae=(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),di=(e,t,n,o=!1,r="https://api.sprig.com",i=document,s=null,a=null)=>{P.document=i;const d=e+fo,l=yo(d);return P.document.addEventListener("securitypolicyviolation",h=>{te(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",r,{})}),_o(mo,()=>{P.document.getElementById(xt(d)).remove(),at(d,l);const h={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+go;at(c,l);const m=Ae(d,h),f=Ae(c,{muted:!0,...h});if(!m||!f)return;ai(f,s,a),s||f.addClass($);const v=bo(m,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),g=v.children().find(C=>C.name_==="FullscreenToggle");g.hasClass("vjs-disabled")&&g.hide(),xo(m,v,t,n,o,f)}catch(c){te(new Error(`Error when creating video player object ${c}`),"playerDeviceError",r,{});return}}),l},ui=(e,t={},n="https://api.userleap.com",o,r,i,s=!1,a=document)=>{P.document=a;const d=e+vo,l=yo(d);return P.document.addEventListener("securitypolicyviolation",h=>{te(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),_o(mo.concat(oi),()=>{at(d,l),P.document.getElementById(xt(d)).remove();try{li(l,d,t,n,o,r,i,s)}catch(h){te(new Error(`Error when creating video recorder player object ${h}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),l},pi=e=>{const t=e+vo;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()}},hi=e=>{const t=Ae(e+fo);t==null||t.pause()},mi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Yt)&&(n=n.replace(Yt,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},O={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"},Z={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",fi="ul-card-video__skip_button",gi="ul-video-interview-form",Jt="ul-video-btn",vi=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:d,headers:l,responseGroupUid:h,surveyId:c,viewDocument:m,visitorId:f}=V(I=>({apiURL:I.apiURL,envId:I.envId,handleUploadUpdate:I.handleUploadUpdate,headers:I.headers,responseGroupUid:I.responseGroupUid,surveyId:I.surveyId,viewDocument:I.viewDocument,visitorId:I.userId})),[v,g]=H(!1),[C,_]=H(null),[k,w]=H(null),[R,b]=H(0),y=o&&o.videoUrl,L=(I,D)=>{I===O.UPLOAD_STARTED?(_(D[O.UPLOAD_ID]),w(D[O.MEDIA_RECORDING_UID]),g(!0)):I===O.DELETE?(_(null),w(null),g(!1)):I===O.UPLOAD_PROGRESS?isNaN(D[O.UPLOAD_PROGRESS_PCT])?d({mediaRecordingUid:D[O.MEDIA_RECORDING_UID],isComplete:!0}):d({mediaRecordingUid:D[O.MEDIA_RECORDING_UID],progressPct:D[O.UPLOAD_PROGRESS_PCT]}):I===O.UPLOAD_FINISHED&&d({mediaRecordingUid:D[O.MEDIA_RECORDING_UID],isComplete:!0})},j=I=>{if(I&&I.children.length===0){const D=di(Ce,{src:y,type:"application/x-mpegURL"},void 0,o.mediaType===O.MEDIA_TYPE_AUDIO,s,m);I.appendChild(D)}},E=I=>{if(I&&I.children.length===0){const D=ui(Ce,{surveyId:c,responseGroupUid:h,questionId:r,visitorId:f,envId:a},s,L,void 0,{...l,"x-ul-video-recorder-origin":"sdk"},o.mediaType===O.MEDIA_TYPE_AUDIO,m);I.appendChild(D)}},N=I=>{I.preventDefault(),I.stopPropagation(),pi(Ce),C&&k?(d({mediaRecordingUid:k,isSubmitted:!0}),n({value:{mediaRecordingUid:k},questionId:r,type:i})):n({value:null,questionId:r,type:i})},A=()=>p(ie,{defaultBody:()=>p("button",{className:`${Jt} ul-record-response-btn`,onClick:I=>{I.preventDefault(),I.stopPropagation(),hi(Ce),b(1)}}),properties:o});return p("form",{className:M([e,u.CssConstant.VideoCard,u.CssConstant.FadeInTransition]),id:gi,children:[p(K,{message:t,properties:o}),p("div",{id:"ul-card-voice__video",children:[p("div",{children:[p("div",{id:"ul-question-player-container",style:{display:R===0?"":"none"},children:[p("div",{id:Ce,ref:j}),A()]}),p("div",{style:{display:R===1?"block":"none"},children:[p("button",{className:`${Jt} ul-back-question-btn`,onClick:I=>{I.preventDefault(),I.stopPropagation(),b(0)}}),p("div",{id:"ul-recorder-player-container",ref:E})]})]}),p(z,{disabled:!v,onClick:N,children:me(o)}),p("button",{className:`ul-card-text__button ${u.CssConstant.InactiveButton} ${u.CssConstant.SkipButton}`,id:fi,onClick:N,style:{display:o.required?"none":"block",...v?{display:"none"}:{}},children:vt(o)})]})]})},_i=({className:e})=>{const{uploadProgress:t}=V(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 p("div",{className:M([e,"ul-card--uploading",u.CssConstant.FadeInTransition]),children:[p("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:u.CssConstant.LoadingSpinnerContainer,role:"progressbar",children:p("div",{className:u.CssConstant.LoadingSpinner,children:[p("div",{className:u.CssConstant.LoadingSpinnerFirst}),p("div",{className:u.CssConstant.LoadingSpinnerSecond}),p("div",{className:u.CssConstant.LoadingSpinnerThird}),p("div",{className:u.CssConstant.LoadingSpinnerFourth})]})}),p(K,{message:`${n} (${r}% complete)`}),p("p",{className:u.CssConstant.Caption,children:o})]})},Xt=({logoOnly:e=!1,style:t={}})=>p("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&&p("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"}),p("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"}),p("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"}),p("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"}),p("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"}),p("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"})]}),bi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:o,index:r,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:d,viewedCardCount:l}=V(w=>({border:w.border,cards:w.cards,forceBrandedLogo:w.forceBrandedLogo,headers:w.headers,index:w.index,marketingUrl:w.marketingUrl,showSurveyBrand:w.showSurveyBrand,slugName:w.slugName,surveyId:w.surveyId,viewedCardCount:w.viewedCardCount})),h=le(null),c=t.filter(w=>w.type!==x.Uploading&&w.type!==x.Thanks),m=Sr(t,r),f=l+1,v=f/(f+m),g=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${d}${n&&"&utm_term=poweredby_pill"}`;G(()=>{h.current&&(h.current.style.width=`${v*100}%`)},[v]);const C=()=>p(F,{children:[c.length>1&&p("div",{id:"ul-progress-bar-container",children:p("div",{id:"ul-progress-bar-current",ref:h,style:{border:`1px solid ${e||"#000"}`}})}),s?p("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:p("a",{href:g,rel:"noreferrer",target:"_blank",children:p("div",{style:{display:"flex"},children:[p(Xt,{logoOnly:!1}),n&&p(en,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),_=()=>p("a",{dir:"ltr",href:g,rel:"noreferrer",target:"_blank",children:p("div",{className:"thank-you-card-link",children:[p("div",{className:"sprig-box-logo",children:p(Xt,{logoOnly:!0,style:{margin:"auto"}})}),p("div",{children:p("p",{children:["Capture insights about your own product",p(en,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),k=t[r].type===x.Thanks;return p("footer",{className:`ul-footer ${o["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:k&&n?_():C()})},en=({style:e})=>p("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[p("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),p("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),xi=()=>{const{answers:e,border:t,cards:n,close:o,configureExitOnOverlayClick:r,destroy:i,endCard:s,eventEmitFn:a,fontFamily:d,headers:l,index:h,next:c,showStripes:m,surveyId:f,update:v,useMobileStyling:g,viewDocument:C}=V(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,next:T.next,showStripes:T.showStripes,surveyId:T.surveyId,update:T.update,useMobileStyling:T.useMobileStyling,viewDocument:T.viewDocument})),_=le(null),k=le(!1),w=l["userleap-platform"],{props:R,type:b,name:y}=n[h],L=n.length;G(()=>{_.current&&(_.current.classList.contains("ul-app--visible")||_.current.classList.add("ul-app--visible"),!k.current&&a&&(k.current=!0,a(u.SprigEvent.SurveyAppeared,{name:u.SprigEvent.SurveyAppeared,[u.SprigEventData.SurveyId]:f})))},[a,f]),G(()=>{v()},[h,v]),G(()=>{r(()=>o())},[o,r]);const j=()=>o(u.APP_ID),E=T=>{T.key==="Enter"&&j()},N=async function(T){c({data:T,completeSurvey:()=>{i(u.APP_ID)},endCard:s}),u.resetScrollPosition(C)};if(e){for(const T of e)if(T.questionId===y){let J;if(b===x.MultipleChoice){const ce=R.options.find(({value:ze})=>ze===T.value);if(!ce)break;J={[ce.id]:ce.value}}else J=T.value;N({value:J,type:b,questionId:T.questionId});break}}const A=()=>[u.Platform.Email,u.Platform.Link].includes(l["userleap-platform"])?!1:!s||h+1!==L,I=()=>g?{borderColor:t}:{borderColor:t,margin:"15px"},D=()=>{const T={className:"ul-card",next:N,questionId:y,type:b};switch(b){case x.ConsentLegal:return B(Dr,{...T,...R,key:y});case x.Likert:return B(Nr,{...T,...R,key:y});case x.Matrix:return B(Or,{...T,...R,key:y});case x.MultipleChoice:return B(Mr,{...T,...R,key:y});case x.MultipleSelect:return B(Ar,{...T,...R,key:y});case x.NPS:return B(Ur,{...T,key:y,props:R});case x.Open:return B(Vr,{...T,...R,key:y});case x.RecordedTask:return B(Qr,{...T,...R,key:y});case x.TextUrlPrompt:return B(Xr,{...T,...R,key:y});case x.Thanks:return B(ei,{...T,...R,key:y});case x.Uploading:return B(_i,{...T,...R,key:y});case x.VideoVoice:return B(vi,{...T,...R,key:y});default:return null}},W=T=>{var Ct;const J=window.sprigAPI,ce=T.target;if(!J||!ce)return;const ze=[ce,ce.parentElement];for(const Te of ze)if(((Ct=Te==null?void 0:Te.tagName)==null?void 0:Ct.toLowerCase())==="a"){T.preventDefault(),J==null||J.openUrl(Te.href);return}};return p("div",{className:M("ul-app",u.shouldDirectEmbed(l)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:u.APP_ID,onClick:W,ref:_,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{}},children:p("div",{className:"ul-app__container",children:p("div",{className:M(u.getClasses(u.CssConstant.CardContainer,g)),style:I(),children:[A()&&p("div",{className:M(u.getClasses(u.CssConstant.CloseContainer,g)),children:p("div",{"aria-label":"Close button",className:u.CssConstant.CloseButton,onClick:j,onKeyPress:E,role:"button",tabIndex:0,children:p("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:p("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"})})})}),m&&p("div",{className:"ul-header__container",dir:"ltr",children:p("div",{className:"ul-header",children:"For development purposes only"})}),p("div",{className:M(u.getPlatformClass(u.CssConstant.CardMainContent,w)),children:D()}),p(bi,{})]})})})},Ci='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-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}.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-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}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.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}.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)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.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}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[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}.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}.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}.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(93px,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-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}.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}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}',yi=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},ko=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",tn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:ko()};return new MediaRecorder(e,t)},nn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(o){n[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function on(e,t,n,o,r,i){if(e&&e.state!=="inactive"){const{[u.SprigRecordingEventData.BeginCallback]:s}=o,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>ki(t,e,n,o,a,r,i),e.stop()}}async function ki(e,t,n,o,r,i,s){const a=V.getState().viewDocument,{[u.SprigRecordingEventData.UploadCallback]:d,[u.SprigRecordingEventData.ProgressCallback]:l}=o,h={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:r,...o[u.SprigRecordingEventData.PassthroughData]},c=await yi(h,e);if(!c){d&&d(null,{message:"failed to get upload url"});return}const m=new Blob(s,{type:ko()});if(!a.defaultView)return;const f=new a.defaultView.File([m],`recording video ${Date.now()}`),v=i.createUpload({endpoint:c,file:f,chunkSize:5120});v.on("error",g=>{d&&d(null,g)}),v.on("progress",g=>{l&&l(r,g)}),v.on("success",()=>{d&&d(r,!0)})}const wi={chunks:{}},Si={state:{...wi},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:o,UpChunk:r}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?u.MediaType.Video:u.MediaType.Audio;this.state.chunks&&t&&r&&(n!=null&&n.currentMediaRecordingUid&&on(n,t,i,e,r,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&on(o,t,u.MediaType.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(u.SprigRecordingEvent.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(u.SprigRecordingEvent.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(u.SprigRecordingEvent.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(u.SprigRecordingEvent.StartTask,this.startTaskCallback.bind(this)),e.on(u.SprigRecordingEvent.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(u.SprigRecordingEvent.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var o,r,i;const{[u.SprigRecordingEventData.StreamReadyCallback]:t,[u.SprigRecordingEventData.PermissionDescriptors]: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(ge.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{[u.SprigRecordingEventData.ScreenPermissionRequested]:t,[u.SprigRecordingEventData.StreamReadyCallback]: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{[u.SprigRecordingEventData.RecordingMediaTypes]:t,[u.SprigRecordingEventData.StartRecordingCallback]:n}=e;if(!t)return;const o=[];if(t.includes(u.MediaType.Video)&&this.state.avStream){this.state.avRecorder=tn(this.state.avStream);const r=u.v4();nn(this.state.avRecorder,r,this.state.chunks),o.push(r)}if(t.includes(u.MediaType.Screen)&&this.state.captureStream){this.state.screenRecorder=tn(this.state.captureStream);const r=u.v4();nn(this.state.screenRecorder,r,this.state.chunks),o.push(r)}o&&n&&n(o)},async finishTaskCallback(e){const{[u.SprigRecordingEventData.CurrentIndex]:t,[u.SprigRecordingEventData.TaskResponse]:n,[u.SprigRecordingEventData.TaskCompleteCallback]: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{[u.SprigRecordingEventData.PermissionStatusCallback]: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}=V.getState(),a=oo({cards:n,index:e,hasEndCard:o,allResponses:s});a!==null&&n[a].type===x.RecordedTask||[r,i].map(d=>{d&&(d.state==="recording"&&d.stop(),d.stream.getTracks().map(l=>{l.readyState==="live"&&l.stop()}))})}},Ne=Object.create(Si);Object.freeze(Ne);const Ei=(e,t)=>{const n=[...e],o=new Set([x.VideoVoice,x.RecordedTask]);return e.some(r=>o.has(r.type))&&n.push({name:-2,props:{routingOptions:[]},type:x.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:x.Thanks}),n},Ri=({mode:e=null,viewWindow:t,viewDocument:n})=>{const o=n.documentElement;let r;try{r=t.parent.location.href}catch{r=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:o.clientWidth,ch:o.clientHeight,p:r,l:t.navigator.language}};function Ti(e,t=!0){var b;const{answers:n,apiURL:o,customStyles:r,endCard:i,eventEmitFn:s,fontFamilyURL:a,frame:d,previewKey:l,viewDocument:h,viewWindow:c}=e,m=u.shouldDirectEmbed(e.headers)?e.frame:h.body,f=e.UpChunk||window.UpChunk,v=u.eventEmitter,g=Ei(e.cards,!!i);Ne.configure(v,{cards:g,hasEndCard:!!i,apiURL:o,UpChunk:f}),V.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:g,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:d,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Ri({mode:e.mode,viewWindow:c,viewDocument:h}),mode:e.mode,previewKey:l,recorder:Ne,recorderEventEmitter:v,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,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{seen:C}=V.getState();C();const{head:_}=h,k=h.createElement("style");if(k.id="sprig-style",k.textContent=Ci,k.nonce=e.styleNonce,_.appendChild(k),e.fontFamily&&a&&parent){const y=h.createElement("link");y.rel="stylesheet",y.href=a,_.appendChild(y)}if(e.customStyles&&u.overrideStyles(h,r,e.styleNonce),!f)if(e.installationMethod!==u.InstallationMethod.Npm){const y=h.createElement("script");y.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",y.onload=()=>{Ne.setUpChunk(c.UpChunk)},y.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(y)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const w="2.26.3",R=s||((b=d.eventEmitter)==null?void 0:b.emit);R==null||R(u.InternalEventName.VerifyViewVersion,{[u.InternalEventData.ViewVersion]:w}),m&&t&&_e(p(xi,{}),m)}const Pi={configure:Ti};exports.default=Pi;
|
|
685
|
+
`,ni=e=>{const t=j.document.createElement("div");return t.className="ul-video-player-loading",t.id=xt(e),["first","second","third","fourth"].map(n=>{const o=j.document.createElement("div");o.className=n,t.appendChild(o)}),t},xt=e=>e+"-loading-spiner",H="hidden",Yt=".m3u8",Ye="questionId",Qe="ul-video-recorder-camera-off-button",Ke="ul-recording-in-session",oi=[{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`}],mo=[{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:ti}],fo="-video-player",go="-secondary-video-player",vo="-video-recorder";let X,Qt;const ae=async({event:e,apiBase:t,headers:n,visitorId:o,envId:r,metadata:i})=>{const s=j.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)=>{ae({event:`Video Error ${t}`,apiBase:n,headers:o,visitorId:r,envId:i,metadata:{errorMessage:e.message}});const s=j.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)},ri=(e,{type:t,content:n})=>new Promise(function(o,r){let i;t==="script"?(i=j.document.createElement("script"),i.src=n):t==="link"?(i=j.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=j.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)}),_o=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,o)=>(n.push(ri(j.document.head,o)),n),[])).then(()=>{j.videojs=j.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},Kt=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=H;else if(t==="success")e.style.visibility=H,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=j.videojs(e.id());return n==null?void 0:n.payload[t]},ii=(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(A.ERROR,{type:A.PERMISSION_DENIED}),ae({event:"Video Permission Denied",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{questionId:Je(e,Ye),responseGroupUid:s,surveyId:i}})):(n&&n(A.ERROR,{type:A.OTHER}),te(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,r,a,d))}),e.on("error",function(l,h){te(h||e.error(),"recorderError",t,r,a,d)}),e.on("startRecord",function(l,h){o(e.uploadProgressLabel,"none"),ae({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 l=Je(e,Ye);if(!i){const g="internal error: missing fields in payload";return n&&n(A.ERROR,{type:A.OTHER}),te(new Error(g),"finishRecord",t,r,a,d),null}e.record().stopDevice();const h=e.cameraOff?A.MEDIA_TYPE_AUDIO:A.MEDIA_TYPE_VIDEO,c=u.v4();ae({event:"Video Record Finish",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h}});const f={surveyId:i,updatedAt:new Date().toISOString(),mediaType:h,mediaRecordingUid:c};l&&(f.questionId=l),s&&(f.responseGroupUid=s),a&&(f.visitorId=a);const v=await(async()=>{const g=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(g.ok){const C=await g.json();return n&&n(A.UPLOAD_STARTED,{[A.UPLOAD_ID]:C.upload.id,[A.MEDIA_TYPE]:h,[A.MEDIA_RECORDING_UID]:c}),C.upload.url}else return n&&n(A.ERROR,{type:A.OTHER,response:g}),te(new Error("failed to get upload response with url"),"finishRecord",t,r,a,d),null})();v&&(X=j.document.defaultView.UpChunk.createUpload({endpoint:v,file:new j.document.defaultView.File([e.recordedData],`recording ${h} ${Date.now()}`),chunkSize:5120}),X.startTime=Date.now(),ae({event:"Video Upload Start",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h,url:v}}),X.on("error",g=>{o(e.uploadProgressLabel,"none"),n&&n(A.UPLOAD_FINISHED,{[A.MEDIA_RECORDING_UID]:c}),te(g,"finishRecord",t,r,a,d)}),X.on("progress",g=>{n&&n(A.UPLOAD_PROGRESS,{[A.MEDIA_RECORDING_UID]:c,[A.UPLOAD_PROGRESS_PCT]:g.detail}),o(e.uploadProgressLabel,"progress",g.detail)}),X.on("success",()=>{o(e.uploadProgressLabel,"success"),n&&n(A.UPLOAD_FINISHED,{[A.MEDIA_RECORDING_UID]:c}),ae({event:"Video Upload Success",apiBase:t,headers:r,visitorId:a,envId:d,metadata:{mediaRecordingUid:c,questionId:l,responseGroupUid:s,surveyId:i,mediaType:h,url:v,elapsedMs:X.startTime&&Date.now()-X.startTime}})}))})},bo=(e,t)=>{const n=new(j.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(o=>{n.addChild(o)}),si(n),n},si=e=>{e.children().forEach(t=>{if(Z[t.name_]){const n=Le(Z[t.name_],`ul-${Z[t.name_]}`);t.el_.appendChild(n)}})},Le=(e,t="")=>{const n=j.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},xo=(e,t,n,o,r=!1,i)=>{e.addClass("ul-video-player");const s=new(j.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(j.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?mi(n.src):null;n&&(r||!a)?(e.children()[0].classList.add("vjs-hidden"),j.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),j.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!r&&n&&!a&&ci(e,!1),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)},ai=(e,t,n)=>{e.addClass(`ul${go}`);const o=new(j.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(o),n&&n(e)},li=(e,t,n,o,r,i,s,a=!1)=>{Qt=Date.now();const l=Ae(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(!l)return;l.payload=n;const{surveyId:h,questionId:c,responseGroupUid:f,visitorId:m,envId:v}=n;let g;const C=L=>{const D=Qe,N=Qe+"-audio-only";Kt(l.uploadProgressLabel,"none"),X&&X.startTime>=Qt&&X.abort();const G=j.document.getElementById("ul-camera-button");L?(l.children()[0].classList.add("vjs-hidden"),R.removeClass(D),R.addClass(N),G.innerHTML=Z.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),g==null||g.getTracks().forEach(P=>{P.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(P=>{g=P,P.getVideoTracks().forEach(J=>{J.enabled=!1}),l.record().onDeviceReady(P)}).catch(l.record().onDeviceError.bind(l.record()))):(g==null||g.getVideoTracks().forEach(P=>{P.enabled=!0}),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),R.removeClass(N),R.addClass(D),G.innerHTML=Z.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},b=new(j.videojs.getComponent("Button"))(l,{clickHandler:()=>{b.hasClass(H)||(ae({event:"Video Delete Button Clicked",apiBase:o,headers:s,visitorId:m,envId:v,metadata:{questionId:c,responseGroupUid:f,surveyId:h}}),C(l.cameraOff),r(A.DELETE,{}),R.removeClass(H),b.addClass(H))}});b.addClass("ul-video-recorder-delete-button"),b.el_.appendChild(Le(Z.DeleteButton,"ul-delete-button"));const y=j.document.getElementById(t),w=()=>{y.classList.contains("vjs-fullscreen")&&l.cameraOff?y.style.display="table":y.style.display="flex"};w();const R=new(j.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,ae({event:"Video Camera Button Clicked",apiBase:o,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:c,responseGroupUid:f,surveyId:h,cameraOff:l.cameraOff}}),C(l.cameraOff),!b.hasClass(H)&&b.addClass(H),r(A.DELETE,{}),w())}});R.addClass(Qe),R.el_.appendChild(Le(Z.TurnOffCamera,"ul-camera-button"));const S=new(j.videojs.getComponent("Button"))(l,{clickHandler:()=>{const L=j.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),L&&(L.innerHTML=Z.RecordButton),S.removeClass(Ke),b.removeClass(H);else{const D=j.document.getElementById("ul-recording-countdown-screen");if(D)D.remove(),L&&(L.innerHTML=Z.RecordButton),C(l.cameraOff),r(A.DELETE,{}),R.removeClass(H),b.addClass(H),S.removeClass(Ke),I.show();else{S.addClass(Ke),I.hide(),R.addClass(H),b.addClass(H),L&&(L.innerHTML=Z.StopButton);const N=j.document.createElement("div");N.id="ul-recording-countdown-screen",y.insertBefore(N,y.children[1]),N.style.height=`${y.offsetHeight}px`,Co(l,3)}}}});S.addClass("ul-video-recorder-toggle-button"),S.el_.appendChild(Le(Z.RecordButton,"ul-recorder-toggle"));const k=j.document.createElement("p");k.style.visibility="hidden",k.className="ul-upload-progress-label",e.appendChild(k),l.uploadProgressLabel=k;const O=bo(l,[b,R,"PlayToggle",S,"FullscreenToggle"]),I=O.children().find(L=>L.name_==="FullscreenToggle");I.hasClass("vjs-disabled")&&I.hide();const _=O.children().find(L=>L.name_==="PlayToggle");_.hide(),i&&R.addClass(H),!i&&b.addClass(H),xo(l,O,i,!1,a),l.on("stopRecord",()=>{S.hide(),_.show(),I.show(),b.removeClass(H)}),l.on("deviceReady",()=>{S.show(),_.hide(),b.addClass(H)}),ii(l,o,r,Kt,s),i&&(l.deviceButton&&l.deviceButton.hide(),l.src(i),_.show(),S.hide(),b.removeClass(H));const T=[{name:"microphone"}];!l.cameraOff&&T.push({name:"camera"}),Promise.all(T.map(L=>{var D;return(D=navigator==null?void 0:navigator.permissions)==null?void 0:D.query(L)})).then(L=>{L.reduce((N,G)=>N&G.state==="granted",!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),!i&&l.record().getDevice())}).catch(L=>{})},Co=(e,t=3)=>{const n=j.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))},yo=e=>{const t=j.document.createElement("div");return t.className="ul-video-container",t.appendChild(ni(e)),t},at=(e,t)=>{const n=j.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const o=j.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=j.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},ci=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),j.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),j.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Ae=(e,t)=>j.document.getElementById(e)?t?j.videojs(e,t):j.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),di=(e,t,n,o=!1,r="https://api.sprig.com",i=document,s=null,a=null)=>{j.document=i;const d=e+fo,l=yo(d);return j.document.addEventListener("securitypolicyviolation",h=>{te(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",r,{})}),_o(mo,()=>{j.document.getElementById(xt(d)).remove(),at(d,l);const h={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+go;at(c,l);const f=Ae(d,h),m=Ae(c,{muted:!0,...h});if(!f||!m)return;ai(m,s,a),s||m.addClass(H);const v=bo(f,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),g=v.children().find(C=>C.name_==="FullscreenToggle");g.hasClass("vjs-disabled")&&g.hide(),xo(f,v,t,n,o,m)}catch(c){te(new Error(`Error when creating video player object ${c}`),"playerDeviceError",r,{});return}}),l},ui=(e,t={},n="https://api.userleap.com",o,r,i,s=!1,a=document)=>{j.document=a;const d=e+vo,l=yo(d);return j.document.addEventListener("securitypolicyviolation",h=>{te(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),_o(mo.concat(oi),()=>{at(d,l),j.document.getElementById(xt(d)).remove();try{li(l,d,t,n,o,r,i,s)}catch(h){te(new Error(`Error when creating video recorder player object ${h}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),l},pi=e=>{const t=e+vo;if(j.document.getElementById(t)&&j.videojs){try{if(!j.videojs(t).record().stream)return}catch{return}j.videojs(t).record().stop(),j.videojs(t).record().stopDevice()}},hi=e=>{const t=Ae(e+fo);t==null||t.pause()},mi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Yt)&&(n=n.replace(Yt,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},A={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"},Z={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",fi="ul-card-video__skip_button",gi="ul-video-interview-form",Jt="ul-video-btn",vi=({className:e,message:t,next:n,properties:o,questionId:r,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:d,headers:l,responseGroupUid:h,surveyId:c,viewDocument:f,visitorId:m}=V(D=>({apiURL:D.apiURL,envId:D.envId,handleUploadUpdate:D.handleUploadUpdate,headers:D.headers,responseGroupUid:D.responseGroupUid,surveyId:D.surveyId,viewDocument:D.viewDocument,visitorId:D.userId})),[v,g]=$(!1),[C,b]=$(null),[y,w]=$(null),[R,S]=$(0),k=o&&o.videoUrl,O=(D,N)=>{D===A.UPLOAD_STARTED?(b(N[A.UPLOAD_ID]),w(N[A.MEDIA_RECORDING_UID]),g(!0)):D===A.DELETE?(b(null),w(null),g(!1)):D===A.UPLOAD_PROGRESS?isNaN(N[A.UPLOAD_PROGRESS_PCT])?d({mediaRecordingUid:N[A.MEDIA_RECORDING_UID],isComplete:!0}):d({mediaRecordingUid:N[A.MEDIA_RECORDING_UID],progressPct:N[A.UPLOAD_PROGRESS_PCT]}):D===A.UPLOAD_FINISHED&&d({mediaRecordingUid:N[A.MEDIA_RECORDING_UID],isComplete:!0})},I=D=>{if(D&&D.children.length===0){const N=di(Ce,{src:k,type:"application/x-mpegURL"},void 0,o.mediaType===A.MEDIA_TYPE_AUDIO,s,f);D.appendChild(N)}},_=D=>{if(D&&D.children.length===0){const N=ui(Ce,{surveyId:c,responseGroupUid:h,questionId:r,visitorId:m,envId:a},s,O,void 0,{...l,"x-ul-video-recorder-origin":"sdk"},o.mediaType===A.MEDIA_TYPE_AUDIO,f);D.appendChild(N)}},T=D=>{D.preventDefault(),D.stopPropagation(),pi(Ce),C&&y?(d({mediaRecordingUid:y,isSubmitted:!0}),n({value:{mediaRecordingUid:y},questionId:r,type:i})):n({value:null,questionId:r,type:i})},L=()=>p(se,{defaultBody:()=>p("button",{className:`${Jt} ul-record-response-btn`,onClick:D=>{D.preventDefault(),D.stopPropagation(),hi(Ce),S(1)}}),properties:o});return p("form",{className:M([e,u.CssConstant.VideoCard,u.CssConstant.FadeInTransition]),id:gi,children:[p(K,{message:t,properties:o}),p("div",{id:"ul-card-voice__video",children:[p("div",{children:[p("div",{id:"ul-question-player-container",style:{display:R===0?"":"none"},children:[p("div",{id:Ce,ref:I}),L()]}),p("div",{style:{display:R===1?"block":"none"},children:[p("button",{className:`${Jt} ul-back-question-btn`,onClick:D=>{D.preventDefault(),D.stopPropagation(),S(0)}}),p("div",{id:"ul-recorder-player-container",ref:_})]})]}),p(z,{disabled:!v,onClick:T,children:me(o)}),p("button",{className:`ul-card-text__button ${u.CssConstant.InactiveButton} ${u.CssConstant.SkipButton}`,id:fi,onClick:T,style:{display:o.required?"none":"block",...v?{display:"none"}:{}},children:vt(o)})]})]})},_i=({className:e})=>{const{uploadProgress:t}=V(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 p("div",{className:M([e,"ul-card--uploading",u.CssConstant.FadeInTransition]),children:[p("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:u.CssConstant.LoadingSpinnerContainer,role:"progressbar",children:p("div",{className:u.CssConstant.LoadingSpinner,children:[p("div",{className:u.CssConstant.LoadingSpinnerFirst}),p("div",{className:u.CssConstant.LoadingSpinnerSecond}),p("div",{className:u.CssConstant.LoadingSpinnerThird}),p("div",{className:u.CssConstant.LoadingSpinnerFourth})]})}),p(K,{message:`${n} (${r}% complete)`}),p("p",{className:u.CssConstant.Caption,children:o})]})},Xt=({logoOnly:e=!1,style:t={}})=>p("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&&p("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"}),p("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"}),p("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"}),p("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"}),p("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"}),p("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"})]}),bi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:o,index:r,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:d,viewedCardCount:l}=V(w=>({border:w.border,cards:w.cards,forceBrandedLogo:w.forceBrandedLogo,headers:w.headers,index:w.index,marketingUrl:w.marketingUrl,showSurveyBrand:w.showSurveyBrand,slugName:w.slugName,surveyId:w.surveyId,viewedCardCount:w.viewedCardCount})),h=ie(null),c=t.filter(w=>w.type!==x.Uploading&&w.type!==x.Thanks),f=Sr(t,r),m=l+1,v=m/(m+f),g=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${d}${n&&"&utm_term=poweredby_pill"}`;q(()=>{h.current&&(h.current.style.width=`${v*100}%`)},[v]);const C=()=>p(F,{children:[c.length>1&&p("div",{id:"ul-progress-bar-container",children:p("div",{id:"ul-progress-bar-current",ref:h,style:{border:`1px solid ${e||"#000"}`}})}),s?p("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:p("a",{href:g,rel:"noreferrer",target:"_blank",children:p("div",{style:{display:"flex"},children:[p(Xt,{logoOnly:!1}),n&&p(en,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),b=()=>p("a",{dir:"ltr",href:g,rel:"noreferrer",target:"_blank",children:p("div",{className:"thank-you-card-link",children:[p("div",{className:"sprig-box-logo",children:p(Xt,{logoOnly:!0,style:{margin:"auto"}})}),p("div",{children:p("p",{children:["Capture insights about your own product",p(en,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),y=t[r].type===x.Thanks;return p("footer",{className:`ul-footer ${o["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:y&&n?b():C()})},en=({style:e})=>p("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[p("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),p("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),xi=()=>{const{answers:e,border:t,cards:n,close:o,configureExitOnOverlayClick:r,destroy:i,endCard:s,eventEmitFn:a,fontFamily:d,headers:l,index:h,next:c,showStripes:f,surveyId:m,update:v,useMobileStyling:g,viewDocument:C}=V(P=>({answers:P.answers,border:P.border,cards:P.cards,close:P.close,configureExitOnOverlayClick:P.configureExitOnOverlayClick,destroy:P.destroy,endCard:P.endCard,eventEmitFn:P.eventEmitFn,fontFamily:P.fontFamily,headers:P.headers,index:P.index,next:P.next,showStripes:P.showStripes,surveyId:P.surveyId,update:P.update,useMobileStyling:P.useMobileStyling,viewDocument:P.viewDocument})),b=ie(null),y=ie(!1),w=l["userleap-platform"],{props:R,type:S,name:k}=n[h],O=n.length;q(()=>{b.current&&(b.current.classList.contains("ul-app--visible")||b.current.classList.add("ul-app--visible"),!y.current&&a&&(y.current=!0,a(u.SprigEvent.SurveyAppeared,{name:u.SprigEvent.SurveyAppeared,[u.SprigEventData.SurveyId]:m})))},[a,m]),q(()=>{v()},[h,v]),q(()=>{r(()=>o())},[o,r]);const I=()=>o(u.APP_ID),_=P=>{P.key==="Enter"&&I()},T=async function(P){c({data:P,completeSurvey:()=>{i(u.APP_ID)},endCard:s}),u.resetScrollPosition(C)};if(e){for(const P of e)if(P.questionId===k){let J;if(S===x.MultipleChoice){const ce=R.options.find(({value:ze})=>ze===P.value);if(!ce)break;J={[ce.id]:ce.value}}else J=P.value;T({value:J,type:S,questionId:P.questionId});break}}const L=()=>[u.Platform.Email,u.Platform.Link].includes(l["userleap-platform"])?!1:!s||h+1!==O,D=()=>g?{borderColor:t}:{borderColor:t,margin:"15px"},N=()=>{const P={className:"ul-card",next:T,questionId:k,type:S};switch(S){case x.ConsentLegal:return B(Dr,{...P,...R,key:k});case x.Likert:return B(Nr,{...P,...R,key:k});case x.Matrix:return B(Or,{...P,...R,key:k});case x.MultipleChoice:return B(Mr,{...P,...R,key:k});case x.MultipleSelect:return B(Ar,{...P,...R,key:k});case x.NPS:return B(Ur,{...P,key:k,props:R});case x.Open:return B(Vr,{...P,...R,key:k});case x.RecordedTask:return B(Qr,{...P,...R,key:k});case x.TextUrlPrompt:return B(Xr,{...P,...R,key:k});case x.Thanks:return B(ei,{...P,...R,key:k});case x.Uploading:return B(_i,{...P,...R,key:k});case x.VideoVoice:return B(vi,{...P,...R,key:k});default:return null}},G=P=>{var Ct;const J=window.sprigAPI,ce=P.target;if(!J||!ce)return;const ze=[ce,ce.parentElement];for(const Te of ze)if(((Ct=Te==null?void 0:Te.tagName)==null?void 0:Ct.toLowerCase())==="a"){P.preventDefault(),J==null||J.openUrl(Te.href);return}};return p("div",{className:M("ul-app",u.shouldDirectEmbed(l)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:u.APP_ID,onClick:G,ref:b,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{}},children:p("div",{className:"ul-app__container",children:p("div",{className:M(u.getClasses(u.CssConstant.CardContainer,g)),style:D(),children:[L()&&p("div",{className:M(u.getClasses(u.CssConstant.CloseContainer,g)),children:p("div",{"aria-label":"Close button",className:u.CssConstant.CloseButton,onClick:I,onKeyPress:_,role:"button",tabIndex:0,children:p("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:p("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&&p("div",{className:"ul-header__container",dir:"ltr",children:p("div",{className:"ul-header",children:"For development purposes only"})}),p("div",{className:M(u.getPlatformClass(u.CssConstant.CardMainContent,w)),children:N()}),p(bi,{})]})})})},Ci='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-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}.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-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}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.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}.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)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.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}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[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}.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}.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}.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(93px,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}.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}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}',yi=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},ko=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",tn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:ko()};return new MediaRecorder(e,t)},nn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(o){n[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function on(e,t,n,o,r,i){if(e&&e.state!=="inactive"){const{[u.SprigRecordingEventData.BeginCallback]:s}=o,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>ki(t,e,n,o,a,r,i),e.stop()}}async function ki(e,t,n,o,r,i,s){const a=V.getState().viewDocument,{[u.SprigRecordingEventData.UploadCallback]:d,[u.SprigRecordingEventData.ProgressCallback]:l}=o,h={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:r,...o[u.SprigRecordingEventData.PassthroughData]},c=await yi(h,e);if(!c){d&&d(null,{message:"failed to get upload url"});return}const f=new Blob(s,{type:ko()});if(!a.defaultView)return;const m=new a.defaultView.File([f],`recording video ${Date.now()}`),v=i.createUpload({endpoint:c,file:m,chunkSize:5120});v.on("error",g=>{d&&d(null,g)}),v.on("progress",g=>{l&&l(r,g)}),v.on("success",()=>{d&&d(r,!0)})}const wi={chunks:{}},Si={state:{...wi},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:o,UpChunk:r}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?u.MediaType.Video:u.MediaType.Audio;this.state.chunks&&t&&r&&(n!=null&&n.currentMediaRecordingUid&&on(n,t,i,e,r,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&on(o,t,u.MediaType.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(u.SprigRecordingEvent.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(u.SprigRecordingEvent.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(u.SprigRecordingEvent.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(u.SprigRecordingEvent.StartTask,this.startTaskCallback.bind(this)),e.on(u.SprigRecordingEvent.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(u.SprigRecordingEvent.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var o,r,i;const{[u.SprigRecordingEventData.StreamReadyCallback]:t,[u.SprigRecordingEventData.PermissionDescriptors]: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(ge.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{[u.SprigRecordingEventData.ScreenPermissionRequested]:t,[u.SprigRecordingEventData.StreamReadyCallback]: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{[u.SprigRecordingEventData.RecordingMediaTypes]:t,[u.SprigRecordingEventData.StartRecordingCallback]:n}=e;if(!t)return;const o=[];if(t.includes(u.MediaType.Video)&&this.state.avStream){this.state.avRecorder=tn(this.state.avStream);const r=u.v4();nn(this.state.avRecorder,r,this.state.chunks),o.push(r)}if(t.includes(u.MediaType.Screen)&&this.state.captureStream){this.state.screenRecorder=tn(this.state.captureStream);const r=u.v4();nn(this.state.screenRecorder,r,this.state.chunks),o.push(r)}o&&n&&n(o)},async finishTaskCallback(e){const{[u.SprigRecordingEventData.CurrentIndex]:t,[u.SprigRecordingEventData.TaskResponse]:n,[u.SprigRecordingEventData.TaskCompleteCallback]: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{[u.SprigRecordingEventData.PermissionStatusCallback]: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}=V.getState(),a=oo({cards:n,index:e,hasEndCard:o,allResponses:s});a!==null&&n[a].type===x.RecordedTask||[r,i].map(d=>{d&&(d.state==="recording"&&d.stop(),d.stream.getTracks().map(l=>{l.readyState==="live"&&l.stop()}))})}},Ne=Object.create(Si);Object.freeze(Ne);const Ei=(e,t)=>{const n=[...e],o=new Set([x.VideoVoice,x.RecordedTask]);return e.some(r=>o.has(r.type))&&n.push({name:-2,props:{routingOptions:[]},type:x.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:x.Thanks}),n},Ri=({mode:e=null,viewWindow:t,viewDocument:n})=>{const o=n.documentElement;let r;try{r=t.parent.location.href}catch{r=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:o.clientWidth,ch:o.clientHeight,p:r,l:t.navigator.language}};function Ti(e,t=!0){var S;const{answers:n,apiURL:o,customStyles:r,endCard:i,eventEmitFn:s,fontFamilyURL:a,frame:d,previewKey:l,viewDocument:h,viewWindow:c}=e,f=u.shouldDirectEmbed(e.headers)?e.frame:h.body,m=e.UpChunk||window.UpChunk,v=u.eventEmitter,g=Ei(e.cards,!!i);Ne.configure(v,{cards:g,hasEndCard:!!i,apiURL:o,UpChunk:m}),V.setState({apiURL:o,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:g,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:d,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Ri({mode:e.mode,viewWindow:c,viewDocument:h}),mode:e.mode,previewKey:l,recorder:Ne,recorderEventEmitter:v,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,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{seen:C}=V.getState();C();const{head:b}=h,y=h.createElement("style");if(y.id="sprig-style",y.textContent=Ci,y.nonce=e.styleNonce,b.appendChild(y),e.fontFamily&&a&&parent){const k=h.createElement("link");k.rel="stylesheet",k.href=a,b.appendChild(k)}if(e.customStyles&&u.overrideStyles(h,r,e.styleNonce),!m)if(e.installationMethod!==u.InstallationMethod.Npm){const k=h.createElement("script");k.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",k.onload=()=>{Ne.setUpChunk(c.UpChunk)},k.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},b.appendChild(k)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const w="2.26.4",R=s||((S=d.eventEmitter)==null?void 0:S.emit);R==null||R(u.InternalEventName.VerifyViewVersion,{[u.InternalEventData.ViewVersion]:w}),f&&t&&_e(p(xi,{}),f)}const Pi={configure:Ti};exports.default=Pi;
|