-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
userresearch-58f93644b98c2fbd.js
3 lines (3 loc) · 177 KB
/
userresearch-58f93644b98c2fbd.js
1
2
3
/*! For license information please see userresearch-58f93644b98c2fbd.js.LICENSE.txt */
"use strict";(("undefined"!=typeof self?self:this).webpackChunk_cb_app=("undefined"!=typeof self?self:this).webpackChunk_cb_app||[]).push([[2139],{1580:(e,t,n)=>{n.d(t,{jA:()=>Yi});var r=Object.defineProperty,o=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),i=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(i||{}),s=(e=>(e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e))(s||{}),a=(e=>(e.SurveyId="survey.id",e))(a||{});const l={SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}};var d=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(d||{}),c=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(c||{});let u;const p=new Uint8Array(16);function m(){if(!u&&(u=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(p)}const h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));const v={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function g(e,t,n){if(v.randomUUID&&!t&&!e)return v.randomUUID();const r=(e=e||{}).random||(e.rng||m)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+"-"+h[e[t+4]]+h[e[t+5]]+"-"+h[e[t+6]]+h[e[t+7]]+"-"+h[e[t+8]]+h[e[t+9]]+"-"+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}(r)}const f="ul-app";var y=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e))(y||{});const _="#e6e6e6",w="#bd282a",b=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},x=Object.freeze(Object.defineProperty({__proto__:null,enable:()=>{const e=b();!e||(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},disable:()=>{const e=b();!e||(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))}},Symbol.toStringTag,{value:"Module"})),C=[x];class k{static disable(){C.forEach((e=>e.disable()))}static enable(){C.forEach((e=>e.enable()))}}const S=e=>e instanceof HTMLElement,E=e=>e instanceof HTMLTextAreaElement,L=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=y.CustomStyle,e.head.appendChild(r)},U=e=>{const t=e.querySelector(`.${y.CardContainer}`);return(t?t.scrollHeight:600)+(t&&t.parentElement?t.parentElement.clientHeight-t.clientHeight:0)+1};var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof n.g<"u"?n.g:typeof self<"u"?self:{};function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function P(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var T={},D={},R={};Object.defineProperty(R,"__esModule",{value:!0}),R.MemoryLeakError=void 0;class O extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}}R.MemoryLeakError=O,Object.defineProperty(D,"__esModule",{value:!0}),D.Emitter=void 0;const M=R;class A{constructor(){this.events=new Map,this.maxListeners=A.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}static listenerCount(e,t){return e.listenerCount(t)}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return this.events.get(e)||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>{this.removeListener(e,n),t.apply(this,r)};return n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach((e=>{e.apply(this,t)})),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const t=new M.MemoryLeakError(this,e,this.listenerCount(e));console.warn(t)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}}var N,V,H;D.Emitter=A,A.defaultMaxListeners=10,N=T,V=I&&I.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),H=I&&I.__exportStar||function(e,t){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(t,n)&&V(t,e,n)},Object.defineProperty(N,"__esModule",{value:!0}),H(D,N),H(R,N);const B=new T.Emitter;var F=(e=>(e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",e.Center="center",e.TopLeft="topLeft",e.TopRight="topRight",e))(F||{}),q=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(q||{}),z=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(z||{}),$=(e=>(e.Npm="web-npm",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))($||{});const W=e=>new Promise((t=>{setTimeout((()=>{t()}),e)})),G=({"userleap-platform":e})=>e!==z.Web,Z=(e,t)=>[e+(t?y.MobileSuffix:y.DesktopSuffix),e],Y=(e,t)=>[e,`${e}__${t}`];class J{constructor(e){o(this,"payload"),o(this,"promise"),o(this,"reject",(()=>{})),o(this,"resolve",(()=>{})),this.payload=e,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}resolveRequest(e){this.resolve(e)}}const Q=10;let K=!1,X="",ee=!1,te=[];const ne=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?$.Gtm:e._segment?$.Segment:$.Snippet,re=(e="")=>{K=!0,X=e};function oe(e={}){const t={"Content-Type":"application/json","userleap-platform":z.Web,"x-ul-sdk-version":"2.21.6",[q.InstallationMethod]:ne(e)};if(e.envId&&(t[q.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[q.UserID]=e.userId),e.visitorId&&(t[q.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[q.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[q.PreviewMode]="1"),t}const ie=async(e,t,n)=>{if(e)return{status:429};{const e=new J(n);return te.push(e),e.promise}},se=async(e,t,n=0,r=!1,o=!1)=>{const i={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(ee&&!o)return ie(r,0,i);const s={ok:!1,reportError:!1};if(K)return console.info(`UserLeap - ${X}`),s;try{t.headers=Object.assign(oe(),t.headers);const n=await fetch(e,t);if(429===n.status){if(!ee&&!r||o){ee=!0;const o=n.headers.has("ratelimit-reset")?Number(n.headers.get("ratelimit-reset")):Q;return await W(1e3*o),se(e,t,0,r,!0)}return ie(r,0,i)}if(ee=!1,te.length&&(te.map((e=>{const{url:t,options:n,attempt:r,shouldDropOnRateLimit:o}=e.payload;se(t,n,r,o).then((t=>{e.resolveRequest(t)}))})),te=[]),n.ok){if(249===n.status)return re(),s;const t=await n.text();try{return t&&"OK"!==t&&(n.json=JSON.parse(t)),n}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${t}`)}}}return n}catch(r){const o=n+1;return o>5?{ok:!1,reportError:!1,error:r}:(await W(1e3*Math.pow(2,n)),se(e,t,o))}};var ae,le,de,ce,ue,pe,me,he,ve={},ge=[],fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ye(e,t){for(var n in t)e[n]=t[n];return e}function _e(e){var t=e.parentNode;t&&t.removeChild(e)}function we(e,t,n){var r,o,i,s={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ae.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return be(e,s,r,o,null)}function be(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++de:o};return null==o&&null!=le.vnode&&le.vnode(i),i}function xe(){return{current:null}}function Ce(e){return e.children}function ke(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||fe.test(t)?n:n+"px"}function Se(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ke(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ke(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?Le:Ee,i):e.removeEventListener(t,i?Le:Ee,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch{}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function Ee(e){ce=!0;try{return this.l[e.type+!1](le.event?le.event(e):e)}finally{ce=!1}}function Le(e){ce=!0;try{return this.l[e.type+!0](le.event?le.event(e):e)}finally{ce=!1}}function Ue(e,t){this.props=e,this.context=t}function Ie(e,t){if(null==t)return e.__?Ie(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Ie(e):null}function je(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return je(e)}}function Pe(e){ce?setTimeout(e):me(e)}function Te(e){(!e.__d&&(e.__d=!0)&&ue.push(e)&&!De.__r++||pe!==le.debounceRendering)&&((pe=le.debounceRendering)||Pe)(De)}function De(){var e,t,n,r,o,i,s,a;for(ue.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=ue.shift();)e.__d&&(t=ue.length,r=void 0,o=void 0,s=(i=(n=e).__v).__e,(a=n.__P)&&(r=[],(o=ye({},i)).__v=i.__v+1,Ve(a,i,o,n.__n,void 0!==a.ownerSVGElement,null!=i.__h?[s]:null,r,null==s?Ie(i):s,i.__h),He(r,i),i.__e!=s&&je(i)),ue.length>t&&ue.sort((function(e,t){return e.__v.__b-t.__v.__b})));De.__r=0}function Re(e,t,n,r,o,i,s,a,l,d){var c,u,p,m,h,v,g,f=r&&r.__k||ge,y=f.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(m=n.__k[c]=null==(m=t[c])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?be(null,m,null,null,m):Array.isArray(m)?be(Ce,{children:m},null,null,null):m.__b>0?be(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=f[c])||p&&m.key==p.key&&m.type===p.type)f[c]=void 0;else for(u=0;u<y;u++){if((p=f[u])&&m.key==p.key&&m.type===p.type){f[u]=void 0;break}p=null}Ve(e,m,p=p||ve,o,i,s,a,l,d),h=m.__e,(u=m.ref)&&p.ref!=u&&(g||(g=[]),p.ref&&g.push(p.ref,null,m),g.push(u,m.__c||h,m)),null!=h?(null==v&&(v=h),"function"==typeof m.type&&m.__k===p.__k?m.__d=l=Oe(m,l,e):l=Ae(e,m,p,f,h,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Ie(p))}for(n.__e=v,c=y;c--;)null!=f[c]&&("function"==typeof n.type&&null!=f[c].__e&&f[c].__e==n.__d&&(n.__d=Ne(r).nextSibling),Fe(f[c],f[c]));if(g)for(c=0;c<g.length;c++)Be(g[c],g[++c],g[++c])}function Oe(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?Oe(r,t,n):Ae(n,r,r,o,r.__e,t));return t}function Me(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){Me(e,t)})):t.push(e)),t}function Ae(e,t,n,r,o,i){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),s=null;else{for(a=i,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==o)break e;e.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function Ne(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Ne(n)))return r;return null}function Ve(e,t,n,r,o,i,s,a,l){var d,c,u,p,m,h,v,g,f,y,_,w,b,x,C,k=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(d=le.__b)&&d(t);try{e:if("function"==typeof k){if(g=t.props,f=(d=k.contextType)&&r[d.__c],y=d?f?f.props.value:d.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in k&&k.prototype.render?t.__c=c=new k(g,y):(t.__c=c=new Ue(g,y),c.constructor=k,c.render=qe),f&&f.sub(c),c.props=g,c.state||(c.state={}),c.context=y,c.__n=r,u=c.__d=!0,c.__h=[],c._sb=[]),null==c.__s&&(c.__s=c.state),null!=k.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=ye({},c.__s)),ye(c.__s,k.getDerivedStateFromProps(g,c.__s))),p=c.props,m=c.state,c.__v=t,u)null==k.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==k.getDerivedStateFromProps&&g!==p&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(g,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(g,c.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=g,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),_=0;_<c._sb.length;_++)c.__h.push(c._sb[_]);c._sb=[],c.__h.length&&s.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(g,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(p,m,h)}))}if(c.context=y,c.props=g,c.__P=e,w=le.__r,b=0,"prototype"in k&&k.prototype.render){for(c.state=c.__s,c.__d=!1,w&&w(t),d=c.render(c.props,c.state,c.context),x=0;x<c._sb.length;x++)c.__h.push(c._sb[x]);c._sb=[]}else do{c.__d=!1,w&&w(t),d=c.render(c.props,c.state,c.context),c.state=c.__s}while(c.__d&&++b<25);c.state=c.__s,null!=c.getChildContext&&(r=ye(ye({},r),c.getChildContext())),u||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(p,m)),C=null!=d&&d.type===Ce&&null==d.key?d.props.children:d,Re(e,Array.isArray(C)?C:[C],t,n,r,o,i,s,a,l),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),v&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,s,a){var l,d,c,u=n.props,p=t.props,m=t.type,h=0;if("svg"===m&&(o=!0),null!=i)for(;h<i.length;h++)if((l=i[h])&&"setAttribute"in l==!!m&&(m?l.localName===m:3===l.nodeType)){e=l,i[h]=null;break}if(null==e){if(null===m)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),i=null,a=!1}if(null===m)u===p||a&&e.data===p||(e.data=p);else{if(i=i&&ae.call(e.childNodes),d=(u=n.props||ve).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(null!=i)for(u={},h=0;h<e.attributes.length;h++)u[e.attributes[h].name]=e.attributes[h].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||Se(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||Se(e,i,t[i],n[i],r)}(e,p,u,o,a),c)t.__k=[];else if(h=t.props.children,Re(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==m,i,s,i?i[0]:n.__k&&Ie(n,0),a),null!=i)for(h=i.length;h--;)null!=i[h]&&_e(i[h]);a||("value"in p&&void 0!==(h=p.value)&&(h!==e.value||"progress"===m&&!h||"option"===m&&h!==u.value)&&Se(e,"value",h,u.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==e.checked&&Se(e,"checked",h,u.checked,!1))}return e}(n.__e,t,n,r,o,i,s,l);(d=le.diffed)&&d(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=a,t.__h=!!l,i[i.indexOf(a)]=null),le.__e(e,t,n)}}function He(e,t){le.__c&&le.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){le.__e(e,t.__v)}}))}function Be(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){le.__e(e,n)}}function Fe(e,t,n){var r,o;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Be(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){le.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Fe(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||_e(e.__e),e.__=e.__e=e.__d=void 0}function qe(e,t,n){return this.constructor(e,n)}function ze(e,t,n){var r,o,i;le.__&&le.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],Ve(t,e=(!r&&n||t).__k=we(Ce,null,[e]),o||ve,ve,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),He(i,e)}function $e(e,t){ze(e,t,$e)}function We(e,t,n){var r,o,i,s=ye({},e.props);for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=t[i];return arguments.length>2&&(s.children=arguments.length>3?ae.call(arguments,2):n),be(e.type,s,r||e.key,o||e.ref,null)}function Ge(e,t){var n={__c:t="__cC"+he++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Te(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}ae=ge.slice,le={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},de=0,ce=!1,Ue.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=ye({},this.state),"function"==typeof e&&(e=e(ye({},n),this.props)),e&&ye(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Te(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Te(this))},Ue.prototype.render=Ce,ue=[],me="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,De.__r=0,he=0;var Ze=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",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))(Ze||{}),Ye=(e=>(e.Answered="answered",e.Equal="eq",e.NotEqual="neq",e.Skipped="skipped",e.LessThan="lt",e.LessThanOrEqual="lte",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e))(Ye||{}),Je=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(Je||{}),Qe=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(Qe||{}),Ke=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(Ke||{}),Xe=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(Xe||{}),et=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(et||{}),tt=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(tt||{}),nt=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(nt||{});const rt=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,o,i),i};var ot,it,st,at,lt=0,dt=[],ct=[],ut=le.__b,pt=le.__r,mt=le.diffed,ht=le.__c,vt=le.unmount;function gt(e,t){le.__h&&le.__h(it,e,lt||t),lt=0;var n=it.__H||(it.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ct}),n.__[e]}function ft(e){return lt=1,yt(Rt,e)}function yt(e,t,n){var r=gt(ot++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Rt(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=it,!it.u)){it.u=!0;var o=it.shouldComponentUpdate;it.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))}}return r.__N||r.__}function _t(e,t){var n=gt(ot++,3);!le.__s&&Dt(n.__H,t)&&(n.__=e,n.i=t,it.__H.__h.push(n))}function wt(e,t){var n=gt(ot++,4);!le.__s&&Dt(n.__H,t)&&(n.__=e,n.i=t,it.__h.push(n))}function bt(e){return lt=5,Ct((function(){return{current:e}}),[])}function xt(e,t,n){lt=6,wt((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function Ct(e,t){var n=gt(ot++,7);return Dt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function kt(e,t){return lt=8,Ct((function(){return e}),t)}function St(e){var t=it.context[e.__c],n=gt(ot++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(it)),t.props.value):e.__}function Et(e,t){le.useDebugValue&&le.useDebugValue(t?t(e):e)}function Lt(){var e=gt(ot++,11);if(!e.__){for(var t=it.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ut(){for(var e;e=dt.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Pt),e.__H.__h.forEach(Tt),e.__H.__h=[]}catch(t){e.__H.__h=[],le.__e(t,e.__v)}}le.__b=function(e){it=null,ut&&ut(e)},le.__r=function(e){pt&&pt(e),ot=0;var t=(it=e.__c).__H;t&&(st===it?(t.__h=[],it.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ct,e.__N=e.i=void 0}))):(t.__h.forEach(Pt),t.__h.forEach(Tt),t.__h=[])),st=it},le.diffed=function(e){mt&&mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==dt.push(t)&&at===le.requestAnimationFrame||((at=le.requestAnimationFrame)||jt)(Ut)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ct&&(e.__=e.__V),e.i=void 0,e.__V=ct}))),st=it=null},le.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Pt),e.__h=e.__h.filter((function(e){return!e.__||Tt(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],le.__e(n,e.__v)}})),ht&&ht(e,t)},le.unmount=function(e){vt&&vt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Pt(e)}catch(e){t=e}})),n.__H=void 0,t&&le.__e(t,n.__v))};var It="function"==typeof requestAnimationFrame;function jt(e){var t,n=function(){clearTimeout(r),It&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);It&&(t=requestAnimationFrame(n))}function Pt(e){var t=it,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),it=t}function Tt(e){var t=it;e.__c=e.__(),it=t}function Dt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Rt(e,t){return"function"==typeof t?t(e):t}function Ot(e,t){for(var n in t)e[n]=t[n];return e}function Mt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function At(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function Nt(e){this.props=e}function Vt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Mt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,we(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Nt.prototype=new Ue).isPureReactComponent=!0,Nt.prototype.shouldComponentUpdate=function(e,t){return Mt(this.props,e)||Mt(this.state,t)};var Ht=le.__b;le.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ht&&Ht(e)};var Bt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ft(e){function t(t){var n=Ot({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Bt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var qt=function(e,t){return null==e?null:Me(Me(e).map(t))},zt={map:qt,forEach:qt,count:function(e){return e?Me(e).length:0},only:function(e){var t=Me(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:Me},$t=le.__e;le.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);$t(e,t,n,r)};var Wt=le.unmount;function Gt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Ot({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Gt(e,t,n)}))),e}function Zt(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Zt(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Yt(){this.__u=0,this.t=null,this.__b=null}function Jt(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Qt(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return we(n,o)}return o.displayName="Lazy",o.__f=!0,o}function Kt(){this.u=null,this.o=null}le.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Wt&&Wt(e)},(Yt.prototype=new Ue).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Jt(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Zt(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Yt.prototype.componentWillUnmount=function(){this.t=[]},Yt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Gt(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&we(Ce,null,e.fallback);return o&&(o.__h=null),[we(Ce,null,t.__a?null:e.children),o]};var Xt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!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 en(e){return this.getChildContext=function(){return e.context},e.children}function tn(e){var t=this,n=e.i;t.componentWillUnmount=function(){ze(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),ze(we(en,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function nn(e,t){var n=we(tn,{__v:e,i:t});return n.containerInfo=t,n}(Kt.prototype=new Ue).__a=function(e){var t=this,n=Jt(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Xt(t,e,r)):o()};n?n(i):i()}},Kt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Me(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Kt.prototype.componentDidUpdate=Kt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Xt(e,n,t)}))};var rn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,on=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,sn=typeof document<"u",an=function(e){return(typeof Symbol<"u"&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function ln(e,t,n){return null==t.__k&&(t.textContent=""),ze(e,t),"function"==typeof n&&n(),e?e.__c:null}function dn(e,t,n){return $e(e,t),"function"==typeof n&&n(),e?e.__c:null}Ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var cn=le.event;function un(){}function pn(){return this.cancelBubble}function mn(){return this.defaultPrevented}le.event=function(e){return cn&&(e=cn(e)),e.persist=un,e.isPropagationStopped=pn,e.isDefaultPrevented=mn,e.nativeEvent=e};var hn,vn={configurable:!0,get:function(){return this.class}},gn=le.vnode;le.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in r={},n){var s=n[i];sn&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in n&&null==s||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!an(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&on.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),r[i]&&(i="oninputCapture")),r[i]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Me(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Me(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(vn.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",vn))}e.$$typeof=rn,gn&&gn(e)};var fn=le.__r;le.__r=function(e){fn&&fn(e),hn=e.__c};var yn={ReactCurrentDispatcher:{current:{readContext:function(e){return hn.__n[e.__c].props.value}}}};function _n(e){return we.bind(null,e)}function wn(e){return!!e&&e.$$typeof===rn}function bn(e){return wn(e)?We.apply(null,arguments):e}function xn(e){return!!e.__k&&(ze(null,e),!0)}function Cn(e){return e&&(e.base||1===e.nodeType&&e)||null}var kn=function(e,t){return e(t)},Sn=function(e,t){return e(t)},En=Ce;function Ln(e){e()}function Un(e){return e}function In(){return[!1,Ln]}var jn=wt;function Pn(e,t){var n=t(),r=ft({h:{__:n,v:t}}),o=r[0].h,i=r[1];return wt((function(){o.__=n,o.v=t,At(o.__,t())||i({h:o})}),[e,n,t]),_t((function(){return At(o.__,o.v())||i({h:o}),e((function(){At(o.__,o.v())||i({h:o})}))}),[e]),n}var Tn={useState:ft,useId:Lt,useReducer:yt,useEffect:_t,useLayoutEffect:wt,useInsertionEffect:jn,useTransition:In,useDeferredValue:Un,useSyncExternalStore:Pn,startTransition:Ln,useRef:bt,useImperativeHandle:xt,useMemo:Ct,useCallback:kt,useContext:St,useDebugValue:Et,version:"17.0.2",Children:zt,render:ln,hydrate:dn,unmountComponentAtNode:xn,createPortal:nn,createElement:we,createContext:Ge,createFactory:_n,cloneElement:bn,createRef:xe,Fragment:Ce,isValidElement:wn,findDOMNode:Cn,Component:Ue,PureComponent:Nt,memo:Vt,forwardRef:Ft,flushSync:Sn,unstable_batchedUpdates:kn,StrictMode:En,Suspense:Yt,SuspenseList:Kt,lazy:Qt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yn};const Dn=Object.freeze(Object.defineProperty({__proto__:null,Children:zt,PureComponent:Nt,StrictMode:En,Suspense:Yt,SuspenseList:Kt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yn,cloneElement:bn,createFactory:_n,createPortal:nn,default:Tn,findDOMNode:Cn,flushSync:Sn,forwardRef:Ft,hydrate:dn,isValidElement:wn,lazy:Qt,memo:Vt,render:ln,startTransition:Ln,unmountComponentAtNode:xn,unstable_batchedUpdates:kn,useDeferredValue:Un,useInsertionEffect:jn,useSyncExternalStore:Pn,useTransition:In,version:"17.0.2",Component:Ue,Fragment:Ce,createContext:Ge,createElement:we,createRef:xe,useCallback:kt,useContext:St,useDebugValue:Et,useEffect:_t,useErrorBoundary:function(e){var t=gt(ot++,10),n=ft();return t.__=e,it.componentDidCatch||(it.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:Lt,useImperativeHandle:xt,useLayoutEffect:wt,useMemo:Ct,useReducer:yt,useRef:bt,useState:ft},Symbol.toStringTag,{value:"Module"}));var Rn={exports:{}},On={};const Mn=P(Dn);var An={exports:{}},Nn={},Vn=Mn;var Hn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Bn=Vn.useState,Fn=Vn.useEffect,qn=Vn.useLayoutEffect,zn=Vn.useDebugValue;function $n(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hn(e,n)}catch{return!0}}var Wn=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?function(e,t){return t()}:function(e,t){var n=t(),r=Bn({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return qn((function(){o.value=n,o.getSnapshot=t,$n(o)&&i({inst:o})}),[e,n,t]),Fn((function(){return $n(o)&&i({inst:o}),e((function(){$n(o)&&i({inst:o})}))}),[e]),zn(n),n};Nn.useSyncExternalStore=void 0!==Vn.useSyncExternalStore?Vn.useSyncExternalStore:Wn,function(e){e.exports=Nn}(An);var Gn=Mn,Zn=An.exports;var Yn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Jn=Zn.useSyncExternalStore,Qn=Gn.useRef,Kn=Gn.useEffect,Xn=Gn.useMemo,er=Gn.useDebugValue;On.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Qn(null);if(null===i.current){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Xn((function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&s.hasValue){var t=s.value;if(o(t,e))return a=t}return a=e}if(t=a,Yn(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,a=n)}var i,a,l=!1,d=void 0===n?null:n;return[function(){return e(t())},null===d?void 0:function(){return e(d())}]}),[t,n,r,o]);var a=Jn(e,i[0],i[1]);return Kn((function(){s.hasValue=!0,s.value=a}),[a]),er(a),a},function(e){e.exports=On}(Rn);const tr=j(Rn.exports),{useSyncExternalStoreWithSelector:nr}=tr;const rr=e=>{const t="function"==typeof e?(e=>e?rt(e):rt)(e):e,n=(e,n)=>function(e,t=e.getState,n){const r=nr(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return Et(r),r}(t,e,n);return Object.assign(n,t),n},or=e=>e?rr(e):rr,ir={eq:(e,t)=>e==t,neq(e,t){return!this.eq(e,t)},gt:(e,t)=>e>t,gte:(e,t)=>e>=t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,list_exact:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&e.slice().sort().join(",")===t.slice().sort().join(","),list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some((t=>-1===e.indexOf(t))),list_alo:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&t.some((t=>-1!=e.indexOf(t)))},sr=(e,t,n)=>{switch(t){case Ze.VideoVoice:return Boolean(e&&e.value);case Ze.Open:return!!n;case Ze.MultipleSelect:return Boolean(n&&!!Object.keys(n).length);case Ze.RecordedTask:return(null==n?void 0:n.taskStatus)===tt.Completed;case Ze.TextUrlPrompt:return!e.value;case Ze.ConsentLegal:return null!==n;case Ze.MultipleChoice:return void 0!==n;case Ze.NPS:case Ze.Likert:return null!==n;default:return!0}},ar=({cards:e,index:t,hasEndCard:n,selectedValue:r,hasValidAnswer:o=!0,uploadProgress:i={}})=>{if(t>=e.length||t<0)return null;const s=e[t].props.routingOptions||[];let a=null,l=null;for(let e=0;e<s.length;e++){const{comparator:t,target:n,value:i}=s[e];if(t===Ye.Answered&&o){a=n;break}if(t===Ye.GivenUp&&r instanceof Object&&"taskStatus"in r&&(null==r?void 0:r.taskStatus)===tt.GivenUp){a=n;break}if(!(t!==Ye.Skipped||o||r instanceof Object&&"taskStatus"in r&&(null==r?void 0:r.taskStatus)===tt.GivenUp)){a=n;break}if(o&&dr(t)&&ir[t](r,i)){a=n;break}}const d=a&&parseInt(String(a),10);a&&null!==d&&!isNaN(d)&&(-1===d||d>t)&&(l=d);const c=e.findIndex((e=>e.type===Ze.Uploading));let u;return u=c>0&&n?e.length-3:c>0||n?e.length-2:e.length-1,t>=u||-1===l||null!==l&&l>u?c>0&&Object.values(i).some((e=>e.isSubmitted&&!e.isComplete))?c:n?e.length-1:null:null!==l?l:t+1},lr=e=>{switch(e.type){case Ze.MultipleSelect:return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map((e=>[e.value])):((e,t)=>e.reduce(((e,t)=>e.concat(e.map((e=>[...e,t])))),[[]]).filter((e=>t||e.length>0)))(e.props.options.map((e=>e.value)),!e.props.properties.required):null;case Ze.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const t=e.props.options.map((e=>e.value));return e.props.properties.required||t.push(void 0),t}case Ze.Likert:return[1,2,3,4,5,...e.props.properties.required?[]:[null]];case Ze.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case Ze.VideoVoice:case Ze.Open:return[1,...e.props.properties.required?[]:[""]];case Ze.RecordedTask:return[{taskStatus:tt.Completed},{taskStatus:tt.GivenUp},...e.props.properties.required?[]:[{taskStatus:tt.Abandoned}]];case Ze.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case Ze.ConsentLegal:return[1,...e.props.properties.required?[]:[null]];default:return[1]}},dr=e=>e in ir,cr=e=>"object"==typeof e&&null!==e&&"taskStatus"in e,ur=or()(((e,t)=>({answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(e=f)=>{const n=t(),{fadeout:r,remove:o,trackHistory:s}=n;await r(e),pr(n)||s({event:"closed"}),k.enable(),o({initiator:i.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async e=>{const{eventEmitFn:n,fadeout:r,remove:o}=t();n(d.SurveyComplete),await r(e),k.enable(),o({initiator:i.Complete})},endCard:{headline:""},envId:"",eventEmitFn:B.emit.bind(B),fadeout:async e=>{const{eventEmitFn:n,headers:r,viewDocument:o}=t();return G(r)?Promise.resolve():(n(s.SurveyFadingOut),new Promise((t=>{const n=o.getElementById(e);n?(n.addEventListener("transitionend",(()=>{t()})),n.classList.remove("ul-app--visible")):t()})))},frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{[c.QuestionId]:r[i].name,[c.Props]:r[i].props}),e((()=>({hasViewedEmbed:!0})))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var s,a,l;const{cards:d,destroy:c,index:u,uploadProgress:p}=t(),m={...p,[n]:{progressPct:o||0===o?o:null==(s=p[n])?void 0:s.progressPct,isComplete:r||(null==(a=p[n])?void 0:a.isComplete),isSubmitted:i||(null==(l=p[n])?void 0:l.isSubmitted)}};if(d[u].type!==Ze.Uploading)return void e({uploadProgress:m});const h=Object.entries(p).every((([e,t])=>!t.isSubmitted||t.isComplete||n==e&&r));h&&u>=d.length-1?c(f):e({index:h?u+1:u,uploadingCardViewed:!0,uploadProgress:m})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":z.Web,"x-ul-environment-id":"","x-ul-installation-method":$.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{cards:r,eventEmitFn:o,index:i,responseGroupUid:s,submit:a,trackHistory:l,uploadProgress:u,viewedCardCount:p}=t(),m=Date.now(),h=[...r],v=h[i],{type:g}=n.data,f={...n.data},y=f.value;(e=>!(e.type===Ze.Thanks||e.type===Ze.Uploading))(v)&&(v.value=y),f.answeredAt=m,delete f.type;const _={response:f,responseGroupUid:s};let w=g===Ze.MultipleChoice?Object.values(y).find((e=>!1!==e)):y;g===Ze.MultipleSelect&&(w=h[i].props.options.reduce(((e,t)=>(y[t.id]&&e.push(t.value),e)),[]));const b=sr(f,g,w),x=ar({cards:h,index:i,selectedValue:w,hasEndCard:!!n.endCard,hasValidAnswer:b,uploadProgress:u});if(null===x)return _.completedAt=m,a(_),void n.completeSurvey();[Ze.Thanks,Ze.Uploading].includes(h[x].type)&&(_.completedAt=m);const C=a(_);[Ze.Thanks,Ze.Uploading].includes(h[x].type)||C.finally((()=>{l({event:"seen",index:x})}));const k=h[x];h[x]&&o&&o(d.CurrentQuestion,{[c.QuestionId]:k.name,[c.Props]:k.props}),e({cards:h,hasViewedEmbed:!1,index:x,viewedCardCount:p+1})},recorder:()=>{},recorderEventEmitter:B,responseGroupUid:"",remove:({initiator:e})=>{const{frame:n,headers:r,eventEmitFn:o}=t();["ios","android"].includes(r["userleap-platform"])&&o(s.SurveyWillClose,{name:s.SurveyWillClose,initiator:e}),!G(r)&&(o(s.SurveyWillClose,{name:s.SurveyWillClose,initiator:e}),n.remove())},seen:async()=>{const{trackHistory:e}=t();return e({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:e,response:n,responseGroupUid:r})=>{const o=t();if(!r||pr(o))return;const i={responseGroupUid:r,meta:o.meta,customMetadata:o.customMetadata,responses:[n],completedAt:e},s=await se(`${o.apiURL}/sdk/1/environments/${o.envId}/visitors/${o.userId}/responses/submit`,{body:JSON.stringify(i),headers:o.headers,method:"POST"});s.ok||s.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",s.error),await mr(o,"submitResponse",s.error))},surveyId:0,tabTitle:"",trackHistory:async({event:e,index:n,isNew:r=!1})=>{const o=t();if(pr(o))return;const{cards:i,index:s}=o,a=void 0!==n?i[n]:i[s],l={sid:o.surveyId,qid:a.name,action:e,vid:o.userId,eid:o.envId,isNew:r,responseGroupUid:o.responseGroupUid},d=await se(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`,{body:JSON.stringify(l),headers:o.headers,method:"POST"});!d.ok&&d.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",d.error),await mr(o,"trackHistory",d.error))},update:()=>{const{headers:e,eventEmitFn:n,frame:r,viewDocument:o}=t();setTimeout((()=>{var t;const i=U(o);G(e)?n(s.SurveyHeight,{name:s.SurveyHeight,contentFrameHeight:i}):null==(t=r.setHeight)||t.call(r,i)}),100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0}))),pr=e=>!e.userId||e.meta&&"test"===e.meta.mode||e.isPreview,mr=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:a,viewDocument:l}=e,d=l.documentElement,c={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:d.clientWidth,clientHeight:d.clientHeight,location:window.location.href,language:window.navigator.language},u={action:t,err:{message:null==n?void 0:n.message,stack:null==n?void 0:n.stack},meta:c,vid:o,envId:i};(await se(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(u)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},hr=async(e,t)=>{var n;const r=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok){const e=await r.json();return null==(n=null==e?void 0:e.upload)?void 0:n.url}return null},vr=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",gr=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:vr()};return new MediaRecorder(e,t)},fr=(e,t,n)=>{n[t]=[],e.ondataavailable=function(e){n[t].push(e.data)},e.currentMediaRecordingUid=t,e.start()};function yr(e,t,n,r,o,i){if(e&&"inactive"!==e.state){const{[nt.BeginCallback]:s}=r,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>async function(e,t,n,r,o,i,s){const a=ur.getState().viewDocument,{[nt.UploadCallback]:l,[nt.ProgressCallback]:d}=r,c={mediaType:n,updatedAt:(new Date).toISOString(),mediaRecordingUid:o,...r[nt.PassthroughData]},u=await hr(c,e);if(!u)return void(l&&l(null,{message:"failed to get upload url"}));const p=new Blob(s,{type:vr()});if(!a.defaultView)return;const m=new a.defaultView.File([p],`recording video ${Date.now()}`),h=i.createUpload({endpoint:u,file:m,chunkSize:5120});h.startTime=Date.now(),h.on("error",(e=>{l&&l(null,e)})),h.on("progress",(e=>{d&&d(o,e)})),h.on("success",(()=>{l&&l(o,!0)}))}(t,0,n,r,a,o,i),e.stop()}}const _r={state:{chunks:{}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?Xe.Video:Xe.Audio;this.state.chunks&&t&&o&&(null!=n&&n.currentMediaRecordingUid&&yr(n,t,i,e,o,this.state.chunks[null==n?void 0:n.currentMediaRecordingUid]),null!=r&&r.currentMediaRecordingUid&&yr(r,t,Xe.Screen,e,o,this.state.chunks[null==r?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e,t){const n=e.getVideoTracks(),r=e.getAudioTracks();let o=n.length&&n[0];o=o||r.length&&r[0],o&&o.addEventListener("ended",(()=>{let e=!1;[this.state.avRecorder,this.state.screenRecorder].map((t=>{t&&("recording"===t.state&&t.stop(),t.stream.getTracks().map((e=>{"live"===e.readyState&&e.stop()})),e=!0)})),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null}),e&&t&&t()}))},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(et.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(et.AvPermission,(async e=>{this.avPermissionCallback(e)})),e.on(et.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(et.StartTask,this.startTaskCallback.bind(this)),e.on(et.ScreenPermission,(async e=>{this.screenPermissionCallback(e)})),e.on(et.FinishTask,(async e=>{this.finishTaskCallback(e)}))},async avPermissionCallback(e){var t,n,r;const{[nt.StreamReadyCallback]:o,[nt.StreamCanceledCallback]:i,[nt.PermissionDescriptors]:s}=e;try{null!=(t=this.state.avStream)&&t.active&&(this.state.avStream.getTracks().map((e=>"live"===e.readyState&&e.stop())),1===(null==(n=this.state.captureStream)?void 0:n.getAudioTracks().length)&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:s.includes(Je.Camera),audio:!0}),0===(null==(r=this.state.captureStream)?void 0:r.getAudioTracks().length)&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream,i)}catch(e){return console.warn("Error: failed to get permissions: "+e),void(o&&o(null,null))}o&&o(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[nt.ScreenPermissionRequested]:t,[nt.StreamReadyCallback]:n,[nt.StreamCanceledCallback]:r}=e;null==t||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(e){return null==t||t(!1),console.warn("Error: failed to get permissions: "+e),void(n&&n(null,null))}null==t||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,r),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[nt.RecordingMediaTypes]:t,[nt.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(Xe.Video)&&this.state.avStream){this.state.avRecorder=gr(this.state.avStream);const e=g();fr(this.state.avRecorder,e,this.state.chunks),r.push(e)}if(t.includes(Xe.Screen)&&this.state.captureStream){this.state.screenRecorder=gr(this.state.captureStream);const e=g();fr(this.state.screenRecorder,e,this.state.chunks),r.push(e)}r&&n&&n(r)},async finishTaskCallback(e){const{[nt.CurrentIndex]:t,[nt.TaskResponse]:n,[nt.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&void 0!==this.state.hasEndCard&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var t;const{[nt.PermissionStatusCallback]:n}=e,r=this.state.avStream;n&&n(r,!!r&&(null==r?void 0:r.getVideoTracks().length)>0,!(null==(t=this.state.captureStream)||!t.active))},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,s=ar({cards:n,index:e,selectedValue:t.value,hasEndCard:r,hasValidAnswer:sr(t,t.type,t.value)});null!==s&&n[s].type===Ze.RecordedTask||[o,i].map((e=>{e&&("recording"===e.state&&e.stop(),e.stream.getTracks().map((e=>{"live"===e.readyState&&e.stop()})))}))}},wr=Object.create(_r);function br(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=br(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xr(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=br(e))&&(r&&(r+=" "),r+=t);return r}Object.freeze(wr);var Cr=0;function kr(e,t,n,r,o,i){var s,a,l={};for(a in t)"ref"==a?s=t[a]:l[a]=t[a];var d={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Cr,__source:o,__self:i};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return le.vnode&&le.vnode(d),d}const Sr=e=>kr("button",{...e,className:xr("ul-card-text__button",e.className),id:"ul-card-text__button"}),Er=({message:e,properties:t})=>{const n=null==t?void 0:t.captionText;return kr(Ce,{children:[e&&kr("h1",{className:y.QuestionHeader,id:y.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&kr("p",{className:y.Caption,id:y.Caption,children:n})]})},Lr=({buttonText:e="View Prototype",handleClick:t})=>kr("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),Ur=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var r;const{handleClickEmbedButton:o,hasViewedEmbed:i,headers:s,useDesktopPrototype:a}=ur((e=>({handleClickEmbedButton:e.handleClickEmbedButton,hasViewedEmbed:e.hasViewedEmbed,headers:e.headers,useDesktopPrototype:e.useDesktopPrototype}))),l=(null==n?void 0:n.conceptUrl)||(null==(r=null==n?void 0:n.consentDocument)?void 0:r.url),c=window.innerWidth<1030,u=s["userleap-platform"],p=(e,t)=>{e.preventDefault(),o(t)};if(!a&&c&&!i&&l&&["email","link"].includes(u)){if("prototype"===t)return kr(Lr,{handleClick:e=>{p(e,d.ViewPrototypeClick)}});if("pdf"===t)return kr(Lr,{buttonText:(null==n?void 0:n.viewDocumentText)||"View Document",handleClick:e=>{p(e,d.ViewAgreementClick)}})}return e()},Ir=(e,t)=>{const n=bt(0),r=()=>{if(e.current){const r=e.current;r.style.height="1px";const o=r.scrollHeight+(r.offsetHeight-r.clientHeight),i=parseInt(window.getComputedStyle(r).getPropertyValue("max-height")),s=o<=i?o:i;n.current!==s&&t(),n.current=s,r.style.height=`${s}px`}};return _t(r,[]),r},jr=({border:e,label:t,isSelected:n,value:r,text:o,id:i,isRadio:s,useMobileStyling:a,error:l,allowTextEntry:d,promptText:c,onUserInputChanged:u})=>{const{styleNonce:p,viewDocument:m}=ur((e=>({styleNonce:e.styleNonce,viewDocument:e.viewDocument}))),[h,v]=ft(!1);Or(m,e,p);const g=({isSelected:e,userText:t})=>{u&&u({id:i||"",selected:e,value:r,userText:t})},f=e=>{e.stopPropagation(),g({isSelected:s||!n,userText:o}),v(!1)},_=()=>{h&&v(!1)},b={onClick:e=>f(e),onKeyPress:e=>(e=>{E(e.target)||("Enter"===e.key||" "===e.key)&&f(e)})(e)};"ontouchstart"in m.documentElement?(b.onTouchStart=_,b.onTouchCancel=_,b.onTouchEnd=_):(b.onMouseDown=()=>{h||v(!0)},b.onMouseLeave=_);const x=s?`radio-${i}`:`checkbox-${i}`,C=n||h?[Dr]:[],k=[...l?[Rr]:[],...C];return kr("div",{className:xr([...Z(y.Choice,a),...k]),id:`choice-div-${i}`,style:l?{borderColor:w}:{},...b,children:[kr("div",{className:xr([y.ChoiceLabelContainer]),children:[kr("div",s?{"aria-labelledby":`label-${i}`,className:xr([y.ChoiceRadio,...C]),id:x,role:"radio",tabIndex:0}:{"aria-checked":n,"aria-labelledby":`label-${i}`,className:y.ChoiceCheckbox,id:x,role:"checkbox",style:n?{backgroundColor:e,borderColor:e,boxShadow:"none"}:{},tabIndex:0,children:n&&kr("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:kr("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),kr("label",{className:xr(Z(y.ChoiceLabel,a)),htmlFor:x,id:`label-${i}`,children:t})]}),d&&n&&kr("div",{className:xr([y.ChoiceTextEntryContainer,...C]),children:kr(Pr,{onTextChange:e=>g({isSelected:n,userText:e}),promptText:c||"Please specify",textValue:o,useMobileStyling:a})})]})},Pr=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=bt(null),{update:i}=ur((e=>({update:e.update}))),s=Ir(o,(()=>i()));return _t((()=>{o.current&&o.current.focus()}),[]),kr("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:xr(Z(y.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:e=>{s(),E(e.target)&&(e.stopPropagation(),n(e.target.value))},onClick:e=>{e.stopPropagation()},onKeyPress:e=>{e.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},Tr="ul-select-style-element",Dr="ul-select-active-dynamic-style",Rr="ul-select-error-dynamic-style",Or=(e,t,n)=>{let r=e.getElementById(Tr),o=!1;r||(r=e.createElement("style"),o=!0),(e=>"style"===e.tagName.toLowerCase())(r)&&(r.id=Tr,n&&(r.nonce=n),r.textContent=Mr(t),o&&e.head.appendChild(r))},Mr=e=>`\n .${Dr} {\n border-color: ${e};\n }\n .${Dr} .${y.ChoiceRadio}, .${Dr}.${y.ChoiceRadio} {\n border: 6px solid ${e};\n box-shadow: none;\n }\n .${Rr} {\n border-color: ${w};\n }\n `,Ar=e=>(null==e?void 0:e.buttonText)||"Next",Nr=e=>(null==e?void 0:e.skipButtonText)||"Skip",Vr=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{headers:s,useMobileStyling:a,border:l}=ur((e=>({headers:e.headers,useMobileStyling:e.useMobileStyling,border:e.border}))),[d,c]=ft(!1),[u,p]=ft(""),[m,h]=ft(!1),v=s["userleap-platform"],g=null==r?void 0:r.collectName,f=(null==r?void 0:r.nameLabelText)||"Full Name",b=(null==r?void 0:r.consentText)||"I agree to the stated conditions",x=(null==r?void 0:r.submitButtonText)||"Submit",C=!!u.trim(),k=d&&(!g||C),E=(e,t=!1)=>{e.preventDefault(),e.stopPropagation();let r=null;if(!t){if(!k)return void h(!0);r={submitted:!0},g&&(r.name=u)}n({value:r,questionId:o,type:i})},L=e=>{(e=>e instanceof HTMLInputElement)(e.target)&&(e.preventDefault(),e.stopPropagation(),p(e.target.value))},U=e=>{S(e.target)&&(e.target.style.borderColor=m&&!C?w:l)},I=e=>{S(e.target)&&(e.target.style.borderColor=m&&!C?w:_)};return kr("div",{className:xr(Y(y.CardMainContent,v)),children:kr("div",{className:xr([e,"ul-card__consent-legal",y.FadeInTransition]),children:[kr(Er,{message:t}),kr("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r&&r.richTextBody?{__html:r&&r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),kr(Ur,{properties:r,defaultBody:()=>kr("div",{children:[kr(jr,{allowTextEntry:!1,border:l,error:m&&!d,index:0,isRadio:!1,isSelected:d,label:b,onUserInputChanged:({selected:e})=>{e!==d&&c(!d)},useMobileStyling:a}),g&&kr("input",{"aria-label":f,"aria-placeholder":f,className:xr(Z(y.ConsentLegalNameInput,a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:I,onFocus:U,onInput:L,placeholder:f,style:m&&!C?{borderColor:w}:{},tabIndex:0,value:u}),kr("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[kr(Sr,{className:k?"":y.ButtonDisabled,onClick:E,children:x}),!1===r.required&&kr("button",{className:"ul-card-skip__button",onClick:e=>E(e,!0),children:Nr(r)})]})]}),embeddedType:"pdf"})]},o)})},Hr=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:o,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:l,useMobileStyling:d,value:c})=>{const u=`option-${c}`,p=s===Ke.Number,m=s===Ke.Star,h=p&&c===e,[v,g]=c<=e&&m||c===e?r?[t,1]:[t,.3]:["",1];return kr("div",{"aria-label":p?void 0:String(c),className:(()=>{switch(s){case Ke.Star:return xr([...Z(y.LikertStar,d),...Z(`${y.LikertStar}-${c}`,d)]);case Ke.Smiley:return xr([...Z(y.LikertSmiley,d),...Z(`${y.LikertSmiley}-${c}`,d)]);default:return xr(c===i?[...Z(y.LikertNumber,d),...Z(`${y.LikertNumber}-${c}`,d),...Z("likert-last-option",d)]:[...Z(y.LikertNumber,d),...Z(`${y.LikertNumber}-${c}`,d)])}})(),dangerouslySetInnerHTML:{__html:n},id:u,onClick:()=>o(),onPointerDown:()=>l(!0),onPointerEnter:()=>a(c),onPointerLeave:()=>{a(-1),l(!1)},role:"radio",style:{color:p?"":v,borderColor:h?v:"",fillOpacity:h?"":g,zIndex:h?3:"auto"},tabIndex:0})},Br=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:s})=>{const{border:a,headers:l,useMobileStyling:d}=ur((e=>({border:e.border,headers:e.headers,useMobileStyling:e.useMobileStyling}))),[c,u]=ft(-1),[p,m]=ft(!1),h=l["userleap-platform"],v=t&&t.left,g=t&&t.right;let f;const{range:_,scaleLabelType:w,ratingIcons:b}=o;_&&(f=Number(_));const x=f||5,C=e=>{var t,n;switch(w){case Ke.Star:return null==(t=b[0])?void 0:t.svg;case Ke.Smiley:return null==(n=b[e])?void 0:n.svg;default:return String(e+1)}},k=[...Array(x)].map(((e,t)=>{const n=t+1;return kr(Hr,{activeValue:c,border:a,icon:C(t),isPressed:p,onSubmit:()=>r({value:n,questionId:i,type:s}),range:x,scaleLabelType:w,setActiveValue:u,setIsPressed:m,useMobileStyling:d,value:n},t)})),S=e=>{e.preventDefault(),e.stopPropagation(),r({value:null,questionId:i,type:s})};return kr("div",{className:xr(Y(y.CardMainContent,h)),children:kr("form",{className:xr([e,"ul-card--likert",y.FadeInTransition]),children:[kr(Er,{message:n,properties:o}),kr(Ur,{properties:o,defaultBody:()=>kr(Ce,{children:[kr("div",{"aria-label":`Rating (1 - ${x})`,className:"ul-card--likert__numbers",role:"radiogroup",children:k}),kr("div",{className:"ul-card--likert__labels",children:[kr("span",{children:v}),kr("span",{children:g})]}),!o.required&&kr("div",{className:"ul-vertical-centered-container",children:kr(Sr,{onClick:S,children:Ar(o)})})]})})]},i)})},Fr=({className:e,message:t,onSubmit:n,options:r=[],properties:o,questionId:i,type:s})=>{const{border:a,headers:l,useMobileStyling:d}=ur((e=>({border:e.border,headers:e.headers,useMobileStyling:e.useMobileStyling}))),c=r.reduce(((e,t)=>(e[t.id]={isSelected:!1},e)),{}),[u,p]=ft(c),m=l["userleap-platform"],h=s===Ze.MultipleChoice,v=o.required,g=Object.entries(u).some((([e,t])=>{var n;const o=r.find((t=>`${t.id}`===e)),i=void 0===t.userText||""===t.userText.trim();return(null==(n=null==o?void 0:o.optionProperties)?void 0:n.allowsTextEntry)&&i&&t.isSelected})),f=Object.values(u).some((e=>e.isSelected)),_=g||v&&!f,w=r.map((({id:e,label:t,value:n,optionProperties:r},o)=>{var i,s;const l=`${e}`,{allowsTextEntry:c}=r||{allowsTextEntry:!1};return kr(jr,{allowTextEntry:c,border:a,error:!1,id:l,index:o,isRadio:h,isSelected:!(null==(i=u[l])||!i.isSelected),label:t,onUserInputChanged:e=>x(e.id,e.selected,e.userText),promptText:"Please specify",text:null==(s=u[e])?void 0:s.userText,useMobileStyling:d,value:n},l)})),b=e=>{e.preventDefault(),e.stopPropagation(),n(u)},x=(e,t,n)=>{const r=Object.assign({},u);if(h&&t)for(const e of Object.values(r))e.isSelected=!1,delete e.userText;r[e]={isSelected:t,userText:n},p(r)};return kr("div",{className:xr(Y(y.CardMainContent,m)),children:kr("form",{className:xr([e,"ul-card--multiple",y.FadeInTransition]),id:"text-form",onSubmit:b,children:[kr(Er,{message:t,properties:o}),kr(Ur,{properties:o,defaultBody:()=>kr("div",{children:[kr("div",{className:xr(Z(y.ChoiceGroup,d)),role:h?"radiogroup":"group",children:w}),kr("div",{className:"ul-card__button-wrapper",children:kr(Sr,{disabled:_,onClick:b,children:Ar(o)})})]})})]},i)})},qr=e=>{const{questionId:t,type:n,next:r,options:o}=e;return kr(Fr,{...e,onSubmit:e=>{const i=Object.entries(e).find((([,e])=>e.isSelected))||[void 0,void 0],[s,a]=i,l=o.find((e=>`${e.id}`===s)),d=null!=a&&a.userText?{[s]:{userText:a.userText}}:null;r({value:l&&s?{[s]:l.value}:{},secondaryValue:d,questionId:t,type:n})}})},zr=e=>{const{questionId:t,type:n,next:r}=e;return kr(Fr,{...e,onSubmit:e=>{const o=Object.entries(e).reduce(((e,[t,n])=>(e[t]=n.isSelected,e)),{}),i=Object.entries(e).reduce(((e,[t,n])=>{if(!n.userText)return e;const r=e||{};return r[t]={userText:n.userText},r}),null);r({value:o,secondaryValue:i,questionId:t,type:n})}})},$r=({className:e,props:{labels:t,message:n,properties:r},next:o,questionId:i,type:s})=>{const{border:a,headers:l,useMobileStyling:d}=ur((e=>({border:e.border,headers:e.headers,useMobileStyling:e.useMobileStyling}))),c=l["userleap-platform"],u=t&&t.left,p=t&&t.right,m=[...Array(11)].map(((e,t)=>kr("div",{className:xr([...Z(y.NPSNumber,d),...Z(`${y.NPSNumber}-${t}`,d)]),id:`option-${t}`,onClick:()=>o({value:t,questionId:i,type:s}),onKeyPress:e=>{e.preventDefault(),("Enter"===e.key||" "===e.key)&&o({value:t,questionId:i,type:s})},onPointerDown:e=>{S(e.target)&&(e.target.style.zIndex="2",e.target.style.borderColor=a)},onPointerLeave:e=>{S(e.target)&&(e.target.style.zIndex="auto",e.target.style.borderColor=_)},role:"radio",tabIndex:0,children:t},t))),h=e=>{e.preventDefault(),e.stopPropagation(),o({value:null,questionId:i,type:s})};return kr("div",{className:xr(Y(y.CardMainContent,c)),children:kr("form",{className:xr([e,"ul-card--nps",y.FadeInTransition]),children:[kr(Er,{message:n,properties:r}),kr(Ur,{properties:r,defaultBody:()=>kr("div",{children:[kr("div",{className:"ul-card--nps__numbers",children:m}),kr("div",{className:"ul-card--nps__labels",children:[kr("span",{children:u}),kr("span",{children:p})]}),!r.required&&kr("div",{className:"ul-vertical-centered-container",children:kr(Sr,{onClick:h,children:Ar(r)})})]})})]},i)})},Wr=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{border:s,headers:a,useMobileStyling:l,update:d}=ur((e=>({border:e.border,headers:e.headers,useMobileStyling:e.useMobileStyling,update:e.update}))),[c,u]=ft(""),p=bt(null),m=a["userleap-platform"],h=c.trim(),v=!0===r.required&&!h,g=Ir(p,(()=>d())),f=e=>{g(),e.preventDefault(),e.stopPropagation(),E(e.target)&&u(e.target.value)},w=e=>{e.preventDefault(),e.stopPropagation(),n({value:c,questionId:o,type:i})},b=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",x=e=>{E(e.target)&&(e.target.style.borderColor=s)},C=e=>{E(e.target)&&(e.target.style.borderColor=_)};return kr("div",{className:xr(Y(y.CardMainContent,m)),children:kr("form",{className:xr([e,"ul-card--text",y.FadeInTransition]),id:"text-form",children:[kr(Er,{message:t,properties:r}),kr(Ur,{defaultBody:()=>kr("div",{className:"ul-card-text",children:[kr("div",{className:"ul-card-text__container",children:kr("textarea",{"aria-label":b,"aria-labelledby":y.QuestionHeader,"aria-multiline":"true","aria-placeholder":b,className:xr(Z(y.OpenTextInput,l)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:C,onChange:f,onFocus:x,placeholder:b,ref:p,role:"textbox",tabIndex:0})}),kr(Sr,{disabled:v,onClick:w,style:{backgroundColor:v?"":s},children:Ar(r)})]}),properties:r})]},o)})};var Gr=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(Gr||{});const Zr=e=>e.type===Qe.AvPermission,Yr=e=>e.type===Qe.ScreenPermission,Jr=(e,t)=>void 0===e?Gr.RequestNeeded:e?((e,t)=>!(Zr(t)?t.permissionDescriptors:[]).includes(Je.Camera)||e.getVideoTracks().length>0)(e,t)?Gr.Ready:Gr.RequestNeeded:Gr.TryAgain,Qr={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Kr=or((e=>({...Qr,reset:()=>{e(Qr)},updatePage:t=>{e(t)}})));function Xr({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:o}=Kr.getState(),{recorderEventEmitter:i}=ur.getState();i.emit(et.AvPermission,{[nt.PermissionDescriptors]:e.permissionDescriptors,[nt.StreamReadyCallback]:(s,a)=>{if(n===s)return;let l=e;if(s&&!e.permissionDescriptors.includes(Je.Camera)){const n=t.indexOf(e),s=null!=a&&a.active?n+2:n+1;(null==a?void 0:a.active)&&r&&i.emit(et.BeginRecording,{[nt.RecordingMediaTypes]:r,[nt.StartRecordingCallback]:e=>o({mediaRecordingUids:e})}),l=t[s]}o({currentPage:l,avStream:s})},[nt.StreamCanceledCallback]:()=>{eo({status:tt.Abandoned})}})}function eo({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:o}=Kr.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=ur.getState(),l={value:{taskStatus:e},type:Ze.RecordedTask,questionId:(null==n?void 0:n.questionId)||1};!n||i.emit(et.FinishTask,{[nt.BeginCallback]:e=>{s({mediaRecordingUid:e,isSubmitted:!0,progressPct:0,isComplete:!1})},[nt.ProgressCallback]:(e,t)=>{s({mediaRecordingUid:e,progressPct:t.detail,isSubmitted:!1,isComplete:!1})},[nt.UploadCallback]:e=>{e&&s({mediaRecordingUid:e,isComplete:!0,isSubmitted:!0,progressPct:100})},[nt.PassthroughData]:n,[nt.CurrentIndex]:a,[nt.TaskResponse]:l,[nt.TaskCompleteCallback]:e=>{l.value.taskDurationMillisecond=e,r&&(l.value.mediaRecordingUids=r),o(),t(l)}})}function to({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=ur.getState(),{updatePage:o,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=Kr.getState();if(!i)return;const l=e.indexOf(i);switch(i.type){case Qe.AvPermission:{const t=a?l+2:l+1;return a&&s&&n.emit(et.BeginRecording,{[nt.RecordingMediaTypes]:s,[nt.StartRecordingCallback]:e=>{o({mediaRecordingUids:e})}}),void o({currentPage:e[t]})}case Qe.ScreenPermission:return void n.emit(et.ScreenPermission,{[nt.ScreenPermissionRequested]:t,[nt.StreamReadyCallback]:(t,r)=>{const a=r?e[l+1]:i;r&&s&&n.emit(et.BeginRecording,{[nt.RecordingMediaTypes]:s,[nt.StartRecordingCallback]:e=>{o({mediaRecordingUids:e})}}),o({currentPage:a,screenPermissionRequested:!0})},[nt.StreamCanceledCallback]:()=>{eo({status:tt.Abandoned})}});case Qe.StartTask:return r(d.RecordedTaskStart),n.emit(d.RecordedTaskStart),n.emit(et.StartTask),void o({currentPage:e[l+1],screenPermissionRequested:!0});case Qe.CompleteTask:return}}const no="ul-permission-graphics-container",ro="ul-permission-body",oo=xr([no,"ul_recorded-task-inset-spacing"]),io=xr(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),so=({richTextBody:e})=>kr("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),ao=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:kr(Sr,{className:xr([n&&"ul-skip-button-below",y.InactiveButton]),onClick:eo.bind(null,{status:tt.Abandoned}),children:t||"Skip"}),lo=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o,taskDetail:i}=e;return kr("div",{className:"ul-task-page",children:[kr(so,{richTextBody:i}),kr("div",{className:io,children:[kr(Sr,{onClick:to.bind(null,{pages:t}),children:r}),kr(ao,{required:n,skipButtonText:o})]})]},"start-task")},co=({content:e,properties:t})=>{const{buttonText:n,skipButtonText:r}=e,o=kr(Ur,{properties:t,defaultBody:()=>kr("div",{className:io,children:[kr(Sr,{className:"ul-complete-task-button",onClick:eo.bind(null,{status:tt.Completed}),children:n}),kr(Sr,{className:xr([y.InactiveButton]),onClick:eo.bind(null,{status:tt.GivenUp}),children:r})]})});return kr("div",{className:"ul-task-page",children:[kr(so,{richTextBody:e.taskDetail}),o]},"complete-task")},uo=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o}=e,[i]=ur((e=>[e.tabTitle])),[s,a]=ft(!1);return kr("div",{children:[kr("div",{className:oo,children:[kr("p",{style:{marginTop:"auto"},children:e.selectTabText}),kr("div",{className:"ul-select-tab-container",children:kr("p",{className:ro,children:i})})]}),kr("div",{className:n?"":io,children:[kr(Sr,{disabled:s,onClick:to.bind(null,{pages:t,setIsRequestingPermission:a}),children:r}),kr(ao,{required:n,skipButtonText:o})]})]})},po=({content:e})=>kr("div",{className:xr([no,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),mo=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:o,skipButtonText:i,tryAgainButtonText:s}=e,a=Zr(t[0])?t[0]:null;return _t((()=>{const e=setInterval((()=>{null!==a&&Xr({currentPage:a,pages:t})}),1e3);return()=>clearInterval(e)}),[a,t]),a?kr("div",{children:[kr("div",{className:oo,children:kr("p",{className:"ul-av-permission-denied-paragraph",children:[kr("span",{className:"ul-av-permission-denied-headline",children:r}),kr("span",{className:ro,children:o})]})}),kr("div",{className:io,children:[kr(Sr,{onClick:Xr.bind(null,{currentPage:a,pages:t}),children:s}),kr(ao,{required:n,skipButtonText:i})]})]}):null},ho=({stream:e})=>kr("video",{autoPlay:!0,className:xr(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),vo=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,o=Kr((e=>e.avStream));return kr("div",{children:[kr(ho,{stream:o}),kr("div",{className:"ul-vertical-button-container-center",children:[kr(Sr,{onClick:to.bind(null,{pages:t}),children:e.buttonText}),kr(ao,{bottom:!0,required:n,skipButtonText:r})]})]})},go=({properties:e})=>{const{pages:t,required:n}=e,r=Kr((e=>e.avStream)),o=Kr((e=>e.currentPage));if(void 0===o)return null;switch(null==o?void 0:o.type){case Qe.AvPermission:{const e=Jr(r,o);return e===Gr.RequestNeeded?kr(po,{content:o}):e===Gr.TryAgain?kr(mo,{content:o,pages:t,required:n}):kr(vo,{content:o,pages:t,required:n})}case Qe.ScreenPermission:return kr(uo,{content:o,pages:t,required:n});case Qe.StartTask:return kr(lo,{content:o,pages:t,required:n});case Qe.CompleteTask:return kr(co,{content:o,properties:e});default:return null}},fo=({className:e,properties:t,next:n,questionId:r})=>{const o=ur(),{headers:i,surveyId:s,responseGroupUid:a,userId:l}=o,c=Kr(),{screenPermissionRequested:u}=c,p=Kr((e=>e.avStream));let m=Kr((e=>e.currentPage));m||(m=function({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:o,next:i}){const{updatePage:s}=Kr.getState(),{eventEmitFn:a,recorderEventEmitter:l}=ur.getState(),c={questionId:o,surveyId:r,visitorId:t,responseGroupUid:n};let u=0;l.emit(d.RecordedTaskPermissionScreen),a(d.RecordedTaskPermissionScreen),l.emit(et.PermissionStatus,{[nt.PermissionStatusCallback]:(t,n,r)=>{const o=e[u],{type:a}=o,d=[Xe.Screen];if(Zr(o)){const{permissionDescriptors:e}=o,r=null==e?void 0:e.includes(Je.Microphone),i=null==e?void 0:e.includes(Je.Camera);r&&d.push(Xe.Audio),i&&d.push(Xe.Video);const s=(null==t?void 0:t.active)&&!i,a=(null==t?void 0:t.active)&&n;(s||a)&&u++}Yr(e[u])&&r&&(u++,l.emit(et.BeginRecording,{[nt.RecordingMediaTypes]:d,[nt.StartRecordingCallback]:e=>s({mediaRecordingUids:e})})),s({currentPage:e[u],avStream:t,screenPermissionRequested:r,nextQuestion:i,type:a,passthroughData:c,recordingMediaTypes:d})}});const p=e[u];return p.type===Qe.AvPermission&&Xr({currentPage:p,pages:e}),p}({questionId:r,surveyId:s,next:e=>{n(e)},pages:t.pages,responseGroupUid:a,userId:l}));let h=m.headline,v=m.captionText;const g=Jr(p,m);return Yr(m)&&u&&(h=m.permissionDeniedHeadline,v=m.permissionDeniedCaptionText),Zr(m)&&g===Gr.Ready&&(h=m.permissionGrantedHeadline,v=m.permissionGrantedCaptionText),kr("div",{className:xr([...Y(y.CardMainContent,i["userleap-platform"])]),children:kr("div",{className:xr([e,"ul-center-horizontally",y.FadeInTransition]),children:[kr(Er,{message:h,properties:{captionText:v}}),kr(go,{properties:t})]})})},yo={"{{user_id}}":"externalUserId","{{email}}":"email"},_o=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[e,o]of Object.entries(yo))if(n.toLowerCase().includes(e))if(t[o]){const r=new RegExp(e,"gi");n=n.replace(r,t[o])}else r.push(e);if(0===r.length||!n.includes("?"))return n;const o=n.slice(0,n.indexOf("?")),i=n.slice(n.indexOf("?")+1).split("&").map((e=>e.split("="))).filter((e=>!r.includes(e[1])));if(0===i.length)return o;return`${o}?${i.map((e=>e.join("="))).join("&")}`},wo=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{headers:s,visitorAttributes:a}=ur((e=>({headers:e.headers,visitorAttributes:e.visitorAttributes}))),l=s["userleap-platform"],d=(e,t=!1)=>{n({value:t?{skipped:!0}:void 0,questionId:o,type:i})},c=e=>{("Enter"===e.key||" "===e.key)&&n({value:void 0,questionId:o,type:i})};return kr("div",{className:xr(Y(y.CardMainContent,l)),children:kr("div",{className:xr([e,"ul-card__text-url-prompt",y.FadeInTransition]),children:[kr(Er,{message:t}),(u=r&&r.richTextBody,p=r&&r.body,kr("div",u?{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:u},id:"ul-card__text-url-body-container"}:{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(p?p.split(/\n\s*\n/g):[]).map(((e,t)=>kr("p",{children:e},t)))})),kr(Ur,{defaultBody:()=>kr("div",{className:"ul-card-button-group",children:[kr("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:_o(r&&r.buttonUrl,a),id:"ul-card-text__button",onClick:d,onKeyPress:c,rel:"noreferrer",role:"button",tabIndex:0,target:"_blank",children:Ar(r)}),!1===r.required&&kr("button",{className:"ul-card-skip__button",onClick:e=>d(0,!0),children:Nr(r)})]}),properties:r})]},o)});var u,p},bo=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:o,headers:i}=ur((e=>({border:e.border,endCard:e.endCard,destroy:e.destroy,headers:e.headers})));_t((()=>{setTimeout((()=>{r(f)}),2e3)}),[r]);const s=o&&o.subheader?kr("p",{className:y.Caption,children:o.subheader}):null,a=o&&o.headline?o.headline:"";return kr("div",{className:xr(Y(y.CardMainContent,i["userleap-platform"])),children:kr("div",{className:xr([e,"ul-card--thanks",y.FadeInTransition]),children:kr("div",{children:kr("div",{className:"ul-card--thanks-content",children:[kr("div",{className:"ul-thanks-check",children:kr("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[kr("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"}),kr("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"}),kr("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"})]})}),kr(Er,{message:a}),s]})})},t)})},xo="https://cdn.sprig.com",Co={document:void 0,videojs:void 0},ko=e=>e+"-loading-spiner",So="hidden",Eo=".m3u8",Lo="questionId",Uo="ul-video-recorder-camera-off-button",Io="ul-recording-in-session",jo=[{type:"link",content:`${xo}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${xo}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${xo}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${xo}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${xo}/userleap-web-upchunk-v2.2.2.js`}],Po=[{type:"link",content:`${xo}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${xo}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:"/* progress control styles */\n.video-js .vjs-control {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 0px;\n}\n\n.video-js .vjs-progress-control {\n position: absolute;\n height: 3px;\n width: 100%;\n}\n/* position and align the buttons and button texts */\n.ul-control-panel {\n bottom: 0;\n width: 100%;\n flex-direction: column;\n background-color: white;\n height: fit-content;\n z-index: 2;\n}\n\n.ul-buttons-panel {\n color: black;\n display: flex;\n gap: 20px;\n height: 50px;\n justify-content: center;\n margin: 10px;\n padding: 2px 14px 0;\n}\n\n.video-js .vjs-volume-panel {\n height: 30px;\n width: 40px;\n}\n\n.ul-inactive {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n/* buttons */\n.ul-buttons-panel > .vjs-button {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 50%;\n display: flex;\n height: 3em;\n justify-content: center;\n width: 3em;\n}\n\n.vjs-button>.vjs-icon-placeholder:before {\n align-items: center;\n display: flex;\n font-size: unset;\n line-height: 0.5;\n justify-content: center;\n}\n\nspan.ul-button-text {\n align-self: flex-end;\n position: relative;\n top: 14px;\n}\n\n#ul-camera-button {\n white-space: nowrap;\n}\n\n.video-js .vjs-volume-control.vjs-volume-horizontal {\n background-color: #fff;\n z-index: 1;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {\n background-color: black;\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {\n width: 40px;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,\n.video-js .vjs-volume-panel .vjs-volume-control:active,\n.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,\n.video-js .vjs-volume-panel:active .vjs-volume-control,\n.video-js .vjs-volume-panel:focus .vjs-volume-control {\n visibility: visible;\n left: 40px;\n position: absolute;\n transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;\n}\n\n/* play button customization */\n.video-js .vjs-play-control {\n color: black;\n}\n\n.video-js .vjs-play-control .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E\");\n}\n\n/* position and style the current timer */\n.ul-time-panel {\n position: absolute;\n bottom: 80px;\n left: 10px;\n height: 22px;\n color: black;\n border: 1px solid #e0e0eb;\n border-radius: 23px;\n background-color: white;\n width: fit-content;\n}\n\n.video-js .vjs-current-time,\n.vjs-no-flex .vjs-current-time {\n display: flex;\n align-items: center;\n text-align: center;\n}\n\n/* remove the dot progress indicator */\n.video-js .vjs-play-progress:before,\n.video-js .vjs-volume-level:before,\n.vjs-icon-circle:before,\n.vjs-seek-to-live-control .vjs-icon-placeholder:before {\n content: none;\n}\n\n.video-js .vjs-mute-control .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E\");\n}\n\n.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n}\n\n.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A\");\n}\n\n.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A\");\n}\n\n.video-js .vjs-volume-control:hover .vjs-mouse-display {\n display: none !important;\n}\n\n.video-js .vjs-play-progress {\n background-color: black;\n}\n\n/* position video player inside the container */\n.video-js .vjs-tech {\n position: static;\n}\n\n.video-js .vjs-time-tooltip {\n padding: 0.25em 0.75em;\n align-items: center;\n color: #333;\n background: #FCFCFD;\n border-radius: 99px;\n text-align: center;\n border: 1px solid #E0E0EB;\n display: flex;\n align-items: center;\n justify-content: center;\n top: -25px;\n font-size: 12px !important;\n width: 50px !important;\n}\n\n.video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {\n visibility: hidden !important;\n}\n\n.video-js .vjs-progress-control .vjs-mouse-display {\n z-index: 2;\n}\n\n.ul-video-player {\n width: 100%;\n display: flex;\n flex-direction: column;\n height: auto;\n border: 1px solid #E6E6E6;\n background-color: white;\n box-sizing: border-box;\n border-radius: 4px;\n background-clip: border-box;\n overflow: hidden;\n}\n\n.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {\n border: none;\n}\n\n#video-response-player-secondary-video-player {\n max-width: 200px;\n margin-right: 20px;\n background-color: transparent;\n}\n\n#ul-card-video__player_recorder-video-recorder.vjs-fullscreen {\n display: table;\n}\n\n.video-js div.vjs-progress-control {\n margin-top: -3px;\n}\n\n.video-js .vjs-progress-control .vjs-slider {\n background-color: #B2BBBD;\n}\n\n.vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {\n position:relative;\n}\n\n.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n}\n\n.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");\n}\n\n.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {\n content: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E\");\n}\n\n.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A\");\n padding: 2px;\n}\n\n.vjs-error-display {\n display: none;\n}\n\n.ul-video-player-video {\n position: relative;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.ul-video-container {\n width: 100%;\n height: auto;\n left: 0px;\n top: 0px;\n\n background-color: transparent;\n border-radius: 4px;\n\n align-items: start;\n display: flex;\n flex-direction: column;\n\n /* Inside Auto Layout */\n\n flex: none;\n order: 0;\n flex-grow: 0;\n margin: 10px 0px;\n position: relative;\n}\n\n.vjs-record button.vjs-device-button.vjs-control {\n background: rgba(255, 255, 255, 96);\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n margin: 0;\n border-radius: 0;\n line-height: 0.6;\n padding: 10px;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n z-index: 3;\n}\n\n.vjs-record .vjs-device-button.vjs-control:before {\n font-size: 14px !important;\n color: #333;\n content: \"Your browser needs to access your camera and microphone for video recording\";\n line-height: 135%;\n}\n\n.vjs-record .vjs-device-button.vjs-control.permission-denied:before {\n font-size: 16px !important;\n color: #262136;\n content: \"Unable to access your camera and microphone\";\n}\n\n.vjs-record .vjs-device-button.vjs-control:after {\n display: inline-block;\n background: #F0F0F5;\n font-size: 13px;\n border-radius: 4px;\n content: \"Request Permissions\";\n padding: 1em 2em;\n color: #333;\n margin-top: 20px;\n}\n\n.vjs-record .vjs-device-button.vjs-control.permission-denied:after {\n display: inline-block;\n background: white;\n font-size: 13px;\n content: \"Please go to your browser settings and update permissions to enable recording\";\n padding: 1em;\n color: #4B575D;\n margin: 5px;\n line-height: 135%;\n text-align: center;\n}\n\n.vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button {\n cursor: pointer;\n}\n\n.ul-video-recorder-delete-button .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\");\n}\n\n.ul-video-recorder-toggle-button .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E\");\n}\n\n.ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A\");\n}\n\n.ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\");\n}\n\n.ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {\n content: url(\"data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E\");\n transform: scale(0.75);\n}\n\n.ul-upload-progress-label {\n padding: 0.15em 0.75em;\n align-items: center;\n font-size: 12px;\n color: #333;\n background: #FCFCFD;\n border-radius: 99px;\n text-align: center;\n border: 1px solid #E0E0EB;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n bottom: 75px;\n left: calc(50% - 65px);\n width: 130px;\n z-index: 5;\n}\n\n.ul-upload-progress-label__time {\n display: inline-flex;\n margin-left: 0.8em;\n align-items: center;\n}\n\n.ul-upload-progress-label__time:before {\n content: \"\";\n display: inline-flex;\n width: 1px;\n height: 12px;\n background-color: #E0E0EB;\n margin-right: 0.8em;\n}\n\n@keyframes grow {\n 0% {\n transform: scale(1);\n background-color: #EEECFC;\n }\n 50% {\n transform: scale(1.2);\n background-color: #E1DFF4;\n }\n 100% {\n transform: scale(1);\n background-color: #EEECFC;\n }\n}\n\n.ul-audio-recorder-placeholder:before {\n width: 80px;\n height: 80px;\n border-radius: 120px;\n background-color: #EEECFC;\n content: \"\";\n position: absolute;\n left: calc(50% - 40px);\n top: calc(50% - 40px);\n animation: 6s infinite grow;\n transform-origin: 50% 60%;\n}\n\n.ul-audio-recorder-placeholder:after {\n content: url(\"data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E\");\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform: translate(-50%, -50%) scale(0.6);\n}\n\n.ul-audio-recorder-placeholder {\n min-height: 150px;\n width: 100%;\n background-color: #fcfcfd;\n display: block;\n position: relative;\n}\n\n.vjs-fullscreen .ul-audio-recorder-placeholder {\n vertical-align: middle;\n display: table-cell;\n}\n\n.vjs-fullscreen .ul-control-panel {\n height: 80px;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: 100%;\n background-color: #F8F8F8;\n}\n\n.vjs-playback-rate .vjs-playback-rate-value {\n align-items: center;\n display: flex;\n font-size: 12px;\n justify-content: center;\n}\n\n.vjs-playback-rate .vjs-menu {\n left: -5px;\n bottom: 3px;\n}\n\n.vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-sizing: border-box;\n border-radius: 4px;\n}\n\n.vjs-menu li {\n font-size: 12px;\n padding: 5px 0;\n}\n\n.vjs-menu li.vjs-selected {\n color: lightgray;\n}\n\n.vjs-menu li.vjs-menu-item:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.vjs-fullscreen .ul-buttons-panel {\n top: calc(50% - 30px);\n position: relative;\n}\n\n.vjs-fullscreen .vjs-record-indicator.vjs-control {\n bottom: 90px !important;\n}\n\n.vjs-record.video-js div.vjs-control.vjs-record-indicator {\n padding: 0.3em 0.75em 0.15em 15px;\n align-items: center;\n font-size: 12px;\n color: #333;\n background: #FCFCFD;\n border-radius: 99px;\n text-align: center;\n border: 1px solid #E0E0EB;\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n bottom: 75px;\n top: auto;\n left: calc(50% - 21px);\n width: 43px;\n height: 16px;\n z-index: 4;\n}\n\n.vjs-record.video-js div.vjs-control.vjs-record-indicator:after {\n content: \"\";\n background-color: #EB5757;\n width: 6px;\n height: 6px;\n border-radius: 8px;\n animation: none;\n top: 4px;\n left: 5px;\n}\n\n.vjs-record.video-js div.vjs-control.vjs-record-indicator:before {\n position: relative;\n font-size: 9px;\n animation: none;\n opacity: 1;\n color: #333;\n top: auto;\n left: auto;\n}\n\n.ul-video-player-loading {\n display: inline-block;\n position: relative;\n width: 6rem;\n height: 6rem;\n\n}\n.ul-video-player-loading div {\n box-sizing: border-box;\n position: absolute;\n display: block;\n width: 80%;\n height: 80%;\n margin: 5px;\n border: 5px solid #666;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #666 transparent transparent transparent;\n}\n\n.first {\n animation-delay: -0.45s;\n}\n.second {\n animation-delay: -0.3s;\n}\n.third {\n animation-delay: -0.15s;\n}\n\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.ul-video-btn {\n width: 100%;\n border: 1px solid #E6E6E6;\n border-radius: 4px;\n background-color: rgba(0, 0, 0, 0.02);\n padding: 8px;\n font-weight: 500;\n font-size: 15px;\n}\n\n.ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {\n margin: 0 5px;\n vertical-align: middle;\n}\n\n.ul-record-response-btn:before {\n content: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\");\n display: inline-block;\n transform: translate(0px, 2px);\n}\n\n.ul-record-response-btn:after {\n content: 'Record your Response';\n}\n\n.ul-back-question-btn:before {\n content: url(\"data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E\");\n display: inline-block;\n transform: scale(0.85) translate(0, 1px);\n -moz-transform: scale(0.85) translate(0, 2px);\n}\n\n.ul-back-question-btn:after {\n content: 'Back to Question';\n}\n\n.hidden {\n display: none !important;\n opacity: 0;\n visibility: hidden;\n}\n\n.visible {\n visibility: visible;\n opacity: 1;\n animation: fade 0.3s;\n}\n\n@keyframes fade {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n#ul-recording-countdown-screen {\n width: 100%;\n height: 100%;\n color: black;\n background-color: rgba(255, 255, 255, 0.8);\n position: absolute;\n text-align: center;\n font-size: 15px;\n z-index: 1;\n display: table;\n}\n\n.ul-countdown-text {\n vertical-align: middle;\n display: table-cell;\n transform: translate(0, -25px);\n}\n\n.vjs-fullscreen > #ul-recording-countdown-screen {\n font-size: 25px;\n transform: unset;\n}\n\n.vjs-poster {\n background-size: cover;\n}\n"}],To="-video-player",Do="-secondary-video-player",Ro="-video-recorder";let Oo,Mo;const Ao=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=Co.document.documentElement;if(!r||!o)return;const a={event:`SDK - ${e}`,visitorId:r,environmentId:o,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/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},No=async(e,t,n,r,o,i)=>{Ao({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=Co.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Vo=(e,t)=>{if(0===e.length)return t&&t();Promise.all(e.reduce(((e,t)=>(e.push(((e,{type:t,content:n})=>new Promise((function(r,o){let i;"script"===t?(i=Co.document.createElement("script"),i.src=n):"link"===t?(i=Co.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=Co.document.createElement("style"),i.innerHTML=n),i.onload=function(){r(n)},i.onerror=function(){o(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)})))(Co.document.head,t)),e)),[])).then((()=>{Co.videojs=Co.document.defaultView.videojs,t&&t()})).catch((function(e){console.log(e+" failed to load")}))},Ho=(e,t,n)=>{if("start"===t&&(e.style.visibility="visible"),"none"===t)e.style.visibility=So;else if("success"===t)e.style.visibility=So,e.innerHTML="Upload succeeded!";else{const t=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${t}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${t}%, #FCFCFD ${t}%, #FCFCFD 100%)`}},Bo=(e,t)=>{const n=Co.videojs(e.id());return null==n?void 0:n.payload[t]},Fo=(e,t)=>{const n=new(Co.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map((e=>{n.addChild(e)})),qo(n),n},qo=e=>{e.children().forEach((e=>{if(ti[e.name_]){const t=zo(ti[e.name_],`ul-${ti[e.name_]}`);e.el_.appendChild(t)}}))},zo=(e,t="")=>{const n=Co.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},$o=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(Co.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(Co.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Xo(n.src):null;!n||!o&&a?(e.audioPlayerPlaceholder.hide(),Co.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)):(e.children()[0].classList.add("vjs-hidden"),Co.document.getElementById(`${e.id()}_html5_api`).style.height="0px"),e.on("play",(()=>{!o&&n&&!a&&Jo(e,!1),null==i||i.play()})),e.on("pause",(()=>{null==i||i.pause()})),e.on("seeked",(()=>{null==i||i.currentTime(e.currentTime())})),e.on("ratechange",(()=>{null==i||i.playbackRate(e.playbackRate())})),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},Wo=(e,t,n,r,o,i,s,a=!1)=>{Mo=Date.now();const l=Qo(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:d,questionId:c,responseGroupUid:u,visitorId:p,envId:m}=n;let h;const v=e=>{const t=Uo,n=Uo+"-audio-only";Ho(l.uploadProgressLabel,"none"),Oo&&Oo.startTime>=Mo&&Oo.abort();const r=Co.document.getElementById("ul-camera-button");e?(l.children()[0].classList.add("vjs-hidden"),w.removeClass(t),w.addClass(n),r.innerHTML=ti.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),null==h||h.getTracks().forEach((e=>{e.stop()})),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then((e=>{h=e,e.getVideoTracks().forEach((e=>{e.enabled=!1})),l.record().onDeviceReady(e)})).catch(l.record().onDeviceError.bind(l.record()))):(null==h||h.getVideoTracks().forEach((e=>{e.enabled=!0})),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),w.removeClass(n),w.addClass(t),r.innerHTML=ti.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},f=new(Co.videojs.getComponent("Button"))(l,{clickHandler:()=>{f.hasClass(So)||(Ao({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:p,envId:m,metadata:{questionId:c,responseGroupUid:u,surveyId:d}}),v(l.cameraOff),o(ei.DELETE,{}),w.removeClass(So),f.addClass(So))}});f.addClass("ul-video-recorder-delete-button"),f.el_.appendChild(zo(ti.DeleteButton,"ul-delete-button"));const y=Co.document.getElementById(t),_=()=>{y.classList.contains("vjs-fullscreen")&&l.cameraOff?y.style.display="table":y.style.display="flex"};_();const w=new(Co.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,Ao({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:c,responseGroupUid:u,surveyId:d,cameraOff:l.cameraOff}}),v(l.cameraOff),!f.hasClass(So)&&f.addClass(So),o(ei.DELETE,{}),_())}});w.addClass(Uo),w.el_.appendChild(zo(ti.TurnOffCamera,"ul-camera-button"));const b=new(Co.videojs.getComponent("Button"))(l,{clickHandler:()=>{const e=Co.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),e&&(e.innerHTML=ti.RecordButton),b.removeClass(Io),f.removeClass(So);else{const t=Co.document.getElementById("ul-recording-countdown-screen");if(t)t.remove(),e&&(e.innerHTML=ti.RecordButton),v(l.cameraOff),o(ei.DELETE,{}),w.removeClass(So),f.addClass(So),b.removeClass(Io),k.show();else{b.addClass(Io),k.hide(),w.addClass(So),f.addClass(So),e&&(e.innerHTML=ti.StopButton);const t=Co.document.createElement("div");t.id="ul-recording-countdown-screen",y.insertBefore(t,y.children[1]),t.style.height=`${y.offsetHeight}px`,Go(l,3)}}}});b.addClass("ul-video-recorder-toggle-button"),b.el_.appendChild(zo(ti.RecordButton,"ul-recorder-toggle"));const x=Co.document.createElement("p");x.style.visibility="hidden",x.className="ul-upload-progress-label",e.appendChild(x),l.uploadProgressLabel=x;const C=Fo(l,[f,w,"PlayToggle",b,"FullscreenToggle"]),k=C.children().find((e=>"FullscreenToggle"===e.name_));k.hasClass("vjs-disabled")&&k.hide();const S=C.children().find((e=>"PlayToggle"===e.name_));S.hide(),i&&w.addClass(So),!i&&f.addClass(So),$o(l,C,i,!1,a),l.on("stopRecord",(()=>{b.hide(),S.show(),k.show(),f.removeClass(So)})),l.on("deviceReady",(()=>{b.show(),S.hide(),f.addClass(So)})),((e,t,n,r,o)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:l}=e.payload;e.on("deviceError",(function(){console.warn("device error: ",e.deviceErrorCode),"Permission denied"===e.deviceErrorCode.message?(e.deviceButton.addClass("permission-denied"),n&&n(ei.ERROR,{type:ei.PERMISSION_DENIED}),Ao({event:"Video Permission Denied",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:Bo(e,Lo),responseGroupUid:s,surveyId:i}})):(n&&n(ei.ERROR,{type:ei.OTHER}),No(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,o,a,l))})),e.on("error",(function(n,r){No(r||e.error(),"recorderError",t,o,a,l)})),e.on("startRecord",(function(n,d){r(e.uploadProgressLabel,"none"),Ao({event:"Video Record Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:Bo(e,Lo),responseGroupUid:s,surveyId:i}})})),e.on("finishRecord",(async function(){r(e.uploadProgressLabel,"start",0);const d=Bo(e,Lo);if(!i){const e="internal error: missing fields in payload";return n&&n(ei.ERROR,{type:ei.OTHER}),No(new Error(e),"finishRecord",t,o,a,l),null}e.record().stopDevice();const c=e.cameraOff?ei.MEDIA_TYPE_AUDIO:ei.MEDIA_TYPE_VIDEO,u=g();Ao({event:"Video Record Finish",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:u,questionId:d,responseGroupUid:s,surveyId:i,mediaType:c}});const p={surveyId:i,updatedAt:(new Date).toISOString(),mediaType:c,mediaRecordingUid:u};d&&(p.questionId=d),s&&(p.responseGroupUid=s),a&&(p.visitorId=a);const m=await(async()=>{const e=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(e.ok){const t=await e.json();return n&&n(ei.UPLOAD_STARTED,{[ei.UPLOAD_ID]:t.upload.id,[ei.MEDIA_TYPE]:c,[ei.MEDIA_RECORDING_UID]:u}),t.upload.url}return n&&n(ei.ERROR,{type:ei.OTHER,response:e}),No(new Error("failed to get upload response with url"),"finishRecord",t,o,a,l),null})();!m||(Oo=Co.document.defaultView.UpChunk.createUpload({endpoint:m,file:new Co.document.defaultView.File([e.recordedData],`recording ${c} ${Date.now()}`),chunkSize:5120}),Oo.startTime=Date.now(),Ao({event:"Video Upload Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:u,questionId:d,responseGroupUid:s,surveyId:i,mediaType:c,url:m}}),Oo.on("error",(i=>{r(e.uploadProgressLabel,"none"),n&&n(ei.UPLOAD_FINISHED,{[ei.MEDIA_RECORDING_UID]:u}),No(i,"finishRecord",t,o,a,l)})),Oo.on("progress",(t=>{n&&n(ei.UPLOAD_PROGRESS,{[ei.MEDIA_RECORDING_UID]:u,[ei.UPLOAD_PROGRESS_PCT]:t.detail}),r(e.uploadProgressLabel,"progress",t.detail)})),Oo.on("success",(()=>{r(e.uploadProgressLabel,"success"),n&&n(ei.UPLOAD_FINISHED,{[ei.MEDIA_RECORDING_UID]:u}),Ao({event:"Video Upload Success",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:u,questionId:d,responseGroupUid:s,surveyId:i,mediaType:c,url:m,elapsedMs:Oo.startTime&&Date.now()-Oo.startTime}})})))}))})(l,r,o,Ho,s),i&&(l.deviceButton&&l.deviceButton.hide(),l.src(i),S.show(),b.hide(),f.removeClass(So));const E=[{name:"microphone"}];!l.cameraOff&&E.push({name:"camera"}),Promise.all(E.map((e=>{var t;return null==(t=null==navigator?void 0:navigator.permissions)?void 0:t.query(e)}))).then((e=>{e.reduce(((e,t)=>e&"granted"===t.state),!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),!i&&l.record().getDevice())})).catch((e=>{}))},Go=(e,t=3)=>{const n=Co.document.getElementById("ul-recording-countdown-screen");n&&0===t?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout((()=>{Go(e,t-1)}),1e3))},Zo=e=>{const t=Co.document.createElement("div");return t.className="ul-video-container",t.appendChild((e=>{const t=Co.document.createElement("div");return t.className="ul-video-player-loading",t.id=ko(e),["first","second","third","fourth"].map((e=>{const n=Co.document.createElement("div");n.className=e,t.appendChild(n)})),t})(e)),t},Yo=(e,t)=>{const n=Co.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=Co.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=Co.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",r.appendChild(o),n.appendChild(r),t.appendChild(n),t},Jo=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),Co.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),Co.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Qo=(e,t)=>Co.document.getElementById(e)?t?Co.videojs(e,t):Co.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Ko=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,a=null)=>{Co.document=i;const l=e+To,d=Zo(l);return Co.document.addEventListener("securitypolicyviolation",(e=>{No(new Error(`Voice & Video feature violates ${e.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})})),Vo(Po,(()=>{Co.document.getElementById(ko(l)).remove(),Yo(l,d);const i={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const o=e+Do;Yo(o,d);const c=Qo(l,i),u=Qo(o,{muted:!0,...i});if(!c||!u)return;((e,t,n)=>{e.addClass(`ul${Do}`);const r=new(Co.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)})(u,s,a),s||u.addClass(So);const p=Fo(c,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),m=p.children().find((e=>"FullscreenToggle"===e.name_));m.hasClass("vjs-disabled")&&m.hide(),$o(c,p,t,n,r,u)}catch(e){return void No(new Error(`Error when creating video player object ${e}`),"playerDeviceError",o,{})}})),d},Xo=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Eo)&&(n=n.replace(Eo,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},ei={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"},ti={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},ni="ul-card-video__player_recorder",ri="ul-video-btn",oi=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:l,headers:d,responseGroupUid:c,surveyId:u,viewDocument:p,visitorId:m}=ur((e=>({apiURL:e.apiURL,envId:e.envId,handleUploadUpdate:e.handleUploadUpdate,headers:e.headers,responseGroupUid:e.responseGroupUid,surveyId:e.surveyId,viewDocument:e.viewDocument,visitorId:e.userId}))),[h,v]=ft(!1),[g,f]=ft(null),[_,w]=ft(null),[b,x]=ft(0),C=d["userleap-platform"],k=r&&r.videoUrl,S=(e,t)=>{e===ei.UPLOAD_STARTED?(f(t[ei.UPLOAD_ID]),w(t[ei.MEDIA_RECORDING_UID]),v(!0)):e===ei.DELETE?(f(null),w(null),v(!1)):e===ei.UPLOAD_PROGRESS?isNaN(t[ei.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:t[ei.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:t[ei.MEDIA_RECORDING_UID],progressPct:t[ei.UPLOAD_PROGRESS_PCT]}):e===ei.UPLOAD_FINISHED&&l({mediaRecordingUid:t[ei.MEDIA_RECORDING_UID],isComplete:!0})},E=e=>{e.preventDefault(),e.stopPropagation(),(e=>{const t=e+Ro;if(Co.document.getElementById(t)&&Co.videojs){try{if(!Co.videojs(t).record().stream)return}catch{return}Co.videojs(t).record().stop(),Co.videojs(t).record().stopDevice()}})(ni),g&&_?(l({mediaRecordingUid:_,isSubmitted:!0}),n({value:{mediaRecordingUid:_},questionId:o,type:i})):n({value:null,questionId:o,type:i})};return kr("div",{className:xr(Y(y.CardMainContent,C)),style:{marginTop:"unset"},children:kr("form",{className:xr([e,y.VideoCard,y.FadeInTransition]),id:"ul-video-interview-form",children:[kr(Er,{message:t,properties:r}),kr("div",{id:"ul-card-voice__video",children:[kr("div",{children:[kr("div",{id:"ul-question-player-container",style:{display:0===b?"":"none"},children:[kr("div",{id:ni,ref:e=>{if(e&&0===e.children.length){const t=Ko(ni,{src:k,type:"application/x-mpegURL"},void 0,r.mediaType===ei.MEDIA_TYPE_AUDIO,s,p);e.appendChild(t)}}}),kr(Ur,{defaultBody:()=>kr("button",{className:`${ri} ul-record-response-btn`,onClick:e=>{e.preventDefault(),e.stopPropagation(),(e=>{const t=Qo(e+To);null==t||t.pause()})(ni),x(1)}}),properties:r})]}),kr("div",{style:{display:1===b?"block":"none"},children:[kr("button",{className:`${ri} ul-back-question-btn`,onClick:e=>{e.preventDefault(),e.stopPropagation(),x(0)}}),kr("div",{id:"ul-recorder-player-container",ref:e=>{if(e&&0===e.children.length){const t=((e,t={},n="https://api.userleap.com",r,o,i,s=!1,a=document)=>{Co.document=a;const l=e+Ro,d=Zo(l);return Co.document.addEventListener("securitypolicyviolation",(e=>{No(new Error(`Voice & Video feature violates ${e.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)})),Vo(Po.concat(jo),(()=>{Yo(l,d),Co.document.getElementById(ko(l)).remove();try{Wo(d,l,t,n,r,o,i,s)}catch(e){return void No(new Error(`Error when creating video recorder player object ${e}`),"recorderDeviceError",n,i,t.visitorId,t.envId)}})),d})(ni,{surveyId:u,responseGroupUid:c,questionId:o,visitorId:m,envId:a},s,S,void 0,{...d,"x-ul-video-recorder-origin":"sdk"},r.mediaType===ei.MEDIA_TYPE_AUDIO,p);e.appendChild(t)}}})]})]}),kr(Sr,{disabled:!h,onClick:E,children:Ar(r)}),kr("button",{className:`ul-card-text__button ${y.InactiveButton}`,id:"ul-card-video__skip_button",onClick:E,style:{display:r.required?"none":"block",...h?{display:"none"}:{}},children:Nr(r)})]})]})})},ii=({className:e})=>{const{headers:t,uploadProgress:n}=ur((e=>({headers:e.headers,uploadProgress:e.uploadProgress})));let r,o;Object.values(n).filter((e=>e.isSubmitted)).length>1?(r="Your responses are processing",o="Please keep this tab open until your responses are fully processed."):(r="Your response is processing",o="Please keep this tab open until your response is fully processed.");const i=Math.round(Math.min(99,...Object.values(n).filter((e=>e.isSubmitted)).map((e=>e.progressPct))));return kr("div",{className:xr(Y(y.CardMainContent,t["userleap-platform"])),children:kr("div",{className:xr([e,"ul-card--uploading",y.FadeInTransition]),children:[kr("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:y.LoadingSpinnerContainer,role:"progressbar",children:kr("div",{className:y.LoadingSpinner,children:[kr("div",{className:y.LoadingSpinnerFirst}),kr("div",{className:y.LoadingSpinnerSecond}),kr("div",{className:y.LoadingSpinnerThird}),kr("div",{className:y.LoadingSpinnerFourth})]})}),kr(Er,{message:`${r} (${i}% complete)`}),kr("p",{className:y.Caption,children:o})]})})},si=()=>kr("svg",{alt:"Powered by Sprig",fill:"none",height:"13",viewBox:"0 0 100 13",width:"100",xmlns:"http://www.w3.org/2000/svg",children:[kr("path",{d:"M3.0369 0.839981H0.0249023V8.99998H1.3209V6.53998H2.8569C4.8969 6.53998 6.2409 5.37598 6.2409 3.62398C6.2409 1.95598 4.9689 0.839981 3.0369 0.839981ZM3.0009 5.35198H1.3209V2.02798H3.0009C4.1769 2.02798 4.9689 2.67598 4.9689 3.62398C4.9689 4.65598 4.1769 5.35198 3.0009 5.35198Z",fill:"#5D696F"}),kr("path",{d:"M9.90653 3.21598C8.15453 3.21598 6.90653 4.45198 6.90653 6.17998C6.90653 7.90798 8.15453 9.14398 9.90653 9.14398C11.6585 9.14398 12.9065 7.90798 12.9065 6.17998C12.9065 4.45198 11.6585 3.21598 9.90653 3.21598ZM9.90653 8.01598C8.88653 8.01598 8.15453 7.23598 8.15453 6.17998C8.15453 5.11198 8.88653 4.34398 9.90653 4.34398C10.9265 4.34398 11.6585 5.11198 11.6585 6.17998C11.6585 7.23598 10.9265 8.01598 9.90653 8.01598Z",fill:"#5D696F"}),kr("path",{d:"M20.9631 3.35998L19.7391 7.11598L18.3951 3.35998H17.3271L15.9831 7.12798L14.7591 3.35998H13.4151L15.4431 8.99998H16.5351L17.8671 5.08798L19.1871 8.99998H20.2791L22.3071 3.35998H20.9631Z",fill:"#5D696F"}),kr("path",{d:"M25.7246 3.21598C24.0086 3.21598 22.8206 4.51198 22.8206 6.17998C22.8206 7.85998 24.0206 9.14398 25.7966 9.14398C27.0206 9.14398 28.0166 8.54398 28.3766 7.52398H27.0086C26.7806 7.88398 26.3606 8.05198 25.8086 8.05198C24.7526 8.05198 24.2126 7.40398 24.0926 6.55198H28.5206C28.7606 4.64398 27.5966 3.21598 25.7246 3.21598ZM25.7366 4.27198C26.6126 4.27198 27.2126 4.76398 27.2846 5.68798H24.1166C24.2606 4.89598 24.8006 4.27198 25.7366 4.27198Z",fill:"#5D696F"}),kr("path",{d:"M31.1297 4.12798V3.35998H29.8817V8.99998H31.1297V5.44798C31.6337 4.78798 32.3177 4.45198 33.2177 4.41598V3.23998C32.3537 3.23998 31.6457 3.56398 31.1297 4.12798Z",fill:"#5D696F"}),kr("path",{d:"M36.8222 3.21598C35.1062 3.21598 33.9182 4.51198 33.9182 6.17998C33.9182 7.85998 35.1182 9.14398 36.8942 9.14398C38.1182 9.14398 39.1142 8.54398 39.4742 7.52398H38.1062C37.8782 7.88398 37.4582 8.05198 36.9062 8.05198C35.8502 8.05198 35.3102 7.40398 35.1902 6.55198H39.6182C39.8582 4.64398 38.6942 3.21598 36.8222 3.21598ZM36.8342 4.27198C37.7102 4.27198 38.3102 4.76398 38.3822 5.68798H35.2142C35.3582 4.89598 35.8982 4.27198 36.8342 4.27198Z",fill:"#5D696F"}),kr("path",{d:"M45.4886 0.47998V3.80398C45.0086 3.43198 44.3966 3.21598 43.6766 3.21598C42.0926 3.21598 40.8206 4.53598 40.8206 6.16798C40.8206 7.82398 42.0926 9.14398 43.6766 9.14398C44.3966 9.14398 45.0086 8.92798 45.4886 8.54398V8.99998H46.7246V0.47998H45.4886ZM43.8566 8.01598C42.8246 8.01598 42.0686 7.17598 42.0686 6.16798C42.0686 5.17198 42.8246 4.34398 43.8566 4.34398C44.4806 4.34398 45.0686 4.55998 45.4886 5.15998V7.18798C45.0686 7.79998 44.4806 8.01598 43.8566 8.01598Z",fill:"#5D696F"}),kr("path",{d:"M54.6797 3.21598C53.9597 3.21598 53.3477 3.43198 52.8797 3.79198V0.47998H51.6317V8.99998H52.8797V8.55598C53.3477 8.92798 53.9597 9.14398 54.6797 9.14398C56.2637 9.14398 57.5477 7.82398 57.5477 6.16798C57.5477 4.53598 56.2637 3.21598 54.6797 3.21598ZM54.4997 8.01598C53.8757 8.01598 53.2997 7.79998 52.8797 7.21198V5.13598C53.2997 4.54798 53.8757 4.34398 54.4997 4.34398C55.5437 4.34398 56.2997 5.17198 56.2997 6.16798C56.2997 7.17598 55.5437 8.01598 54.4997 8.01598Z",fill:"#5D696F"}),kr("path",{d:"M63.3347 3.34798L61.3907 7.76398L59.2667 3.34798H57.9347L60.8147 9.08398L59.6267 11.784H60.9347L64.6547 3.34798H63.3347Z",fill:"#5D696F"}),kr("path",{d:"M71.1466 4.34661C69.8092 4.05038 69.131 3.53001 69.131 2.80065C69.131 2.04705 69.8546 1.47822 70.8142 1.47822C71.8034 1.47822 72.5496 2.10339 72.5496 2.9321V2.99813H73.9165V2.9321C73.9165 1.41764 72.5883 0.272705 70.8271 0.272705C69.9784 0.272705 69.2009 0.533191 68.6379 1.0057C68.3584 1.23619 68.1339 1.52487 67.9805 1.8511C67.8271 2.17733 67.7486 2.53303 67.7506 2.89273C67.7451 3.22255 67.8137 3.54949 67.9515 3.84994C68.0894 4.15038 68.293 4.41686 68.5478 4.63012C69.0218 5.04266 69.6945 5.34798 70.5463 5.5388C71.9806 5.85502 72.7078 6.39296 72.7078 7.13686C72.7078 7.94316 71.9156 8.55076 70.8682 8.55076C69.7804 8.55076 68.9599 7.87531 68.9599 6.97996V6.91393H67.5918V6.97996C67.5918 8.56348 68.9942 9.75688 70.8535 9.75688C71.7426 9.75688 72.5588 9.48731 73.1518 8.99662C73.446 8.75831 73.6827 8.4581 73.8445 8.1179C74.0063 7.7777 74.0891 7.40611 74.087 7.03024C74.087 5.6854 73.0991 4.78217 71.1466 4.34661Z",fill:"#5D696F"}),kr("path",{d:"M78.7986 2.50806C78.2874 2.50175 77.7823 2.6176 77.3263 2.84576C76.8703 3.07391 76.4768 3.40759 76.1795 3.81837V2.66738H74.8789V12.0752H76.1795V8.48716C76.4768 8.8979 76.8703 9.23152 77.3263 9.45957C77.7824 9.68763 78.2875 9.80335 78.7986 9.79687C80.8167 9.79687 82.3381 8.23031 82.3381 6.15246C82.3381 4.07462 80.8167 2.50806 78.7986 2.50806ZM80.9835 6.42264C80.9316 6.9629 80.6921 7.46879 80.3056 7.8544C79.919 8.24001 79.4093 8.48156 78.863 8.53804C78.1369 8.61074 77.4605 8.40295 76.9583 7.95407C76.4561 7.50518 76.1795 6.86365 76.1795 6.15246C76.1795 4.7846 77.2122 3.75295 78.5815 3.75295C79.2904 3.75295 79.9306 4.02191 80.3776 4.51018C80.8387 5.01116 81.054 5.69025 80.9835 6.42264Z",fill:"#5D696F"}),kr("path",{d:"M98.2908 2.6692V3.80747C97.6776 2.97875 96.7302 2.50806 95.6583 2.50806C93.6482 2.50806 92.1323 4.04615 92.1323 6.08582C92.1323 8.1255 93.6482 9.66299 95.6583 9.66299C96.7345 9.66299 97.6819 9.19714 98.2908 8.37691V8.55198C98.2908 9.96891 97.3906 10.8843 95.9974 10.8843C95.0561 10.8843 94.2718 10.4766 93.8996 9.79384L93.8806 9.7587H92.5389L92.5695 9.84654C92.7961 10.514 93.2392 11.0889 93.8303 11.4822C94.4233 11.8723 95.1726 12.0783 95.9974 12.0783C97.0552 12.0783 97.9554 11.7451 98.6017 11.1157C99.2481 10.4862 99.5915 9.6012 99.5915 8.56773V2.6692H98.2908ZM97.5611 7.842C97.0092 8.36418 96.2225 8.58348 95.4001 8.44294C94.9132 8.35796 94.4664 8.12184 94.1245 7.76889C93.7827 7.41593 93.5636 6.96452 93.4992 6.48019C93.3833 5.66541 93.631 4.89364 94.1786 4.36418C94.6383 3.92741 95.2542 3.68788 95.8919 3.69782C96.0464 3.69795 96.2006 3.71031 96.3531 3.73477C97.3459 3.89349 98.1314 4.70403 98.2632 5.71024C98.3749 6.53835 98.1179 7.31436 97.5611 7.842Z",fill:"#5D696F"}),kr("path",{d:"M90.705 0.0995975C90.4602 0.046773 90.2043 0.0911971 89.9925 0.223269C89.7806 0.35534 89.6299 0.564452 89.5729 0.805409C89.5159 1.04637 89.5571 1.29982 89.6877 1.51098C89.8183 1.72215 90.0277 1.87407 90.2708 1.93391C90.3415 1.94954 90.4136 1.95747 90.486 1.95754C90.72 1.9579 90.9458 1.87325 91.1206 1.71973C91.2955 1.5662 91.407 1.35452 91.4341 1.125C91.4611 0.89547 91.4017 0.664135 91.2673 0.475046C91.1329 0.285958 90.9327 0.152325 90.705 0.0995975V0.0995975Z",fill:"#5D696F"}),kr("path",{d:"M89.8366 8.39143H88.715C87.9178 8.39143 87.4389 7.85531 87.4389 6.95693C87.4389 6.08096 87.8681 5.03659 88.7432 3.76444L88.7548 3.74748V3.38825L85.0271 2.86727C85.0284 2.71553 84.9886 2.56622 84.9118 2.43478C84.8351 2.30335 84.7241 2.19458 84.5905 2.11973C84.2563 1.938 83.8908 1.938 83.5879 2.11368C83.4361 2.2023 83.3122 2.33077 83.23 2.4848C83.1477 2.63884 83.1103 2.8124 83.1219 2.98618C83.1336 3.15996 83.1938 3.32714 83.2958 3.46914C83.3979 3.61114 83.5379 3.72238 83.7001 3.79049L82.5405 9.63753H83.8283L84.8977 4.08551L86.9115 4.42111C86.3701 5.38007 86.0953 6.27421 86.0953 7.07869C86.0953 8.56347 87.0041 9.53576 88.4734 9.62965V9.63753H91.1341V2.69099H89.8366V8.39143Z",fill:"#5D696F"})]}),ai=()=>{const{border:e,cards:t,headers:n,index:r,marketingUrl:o,showSurveyBrand:i,slugName:s,surveyId:a,viewedCardCount:l}=ur((e=>({border:e.border,cards:e.cards,headers:e.headers,index:e.index,marketingUrl:e.marketingUrl,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,surveyId:e.surveyId,viewedCardCount:e.viewedCardCount}))),d=bt(null),c=t.filter((e=>e.type!==Ze.Uploading&&e.type!==Ze.Thanks)),u=((e,t)=>{const n=new Set([Ze.Thanks,Ze.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter((e=>!n.has(e.type)));if(t===r.length-1)return 1;const o={[r.length-1]:1,[-1]:0};for(let e=r.length-2;e>=t;e--){const n=r[e],i=n.props.routingOptions||[];if(0===i.length){o[e]=o[e+1]+1;continue}let s=0,a=lr(n);if(null===a)return r.length-1-t;for(let l=0;l<i.length&&0!==a.length;l++){const{comparator:d,target:c,value:u}=i[l],p=a.filter((e=>{const t=sr({value:e},n.type,e);return!(t&&d===Ye.Answered||!t&&d===Ye.Skipped||d===Ye.GivenUp&&cr(e)&&e.taskStatus===tt.GivenUp||t&&dr(d)&&ir[d](e,u))}));if(p.length<a.length){const n=parseInt(String(c),10);if(-1!==n&&n<=e||n>=r.length)return r.length-1-t;s=Math.max(o[n]+1,s)}a=p}a.length>0&&(s=Math.max(o[e+1]+1,s)),o[e]=s}return o[t]})(t,r),p=l+1,m=p/(p+u);_t((()=>{d.current&&(d.current.style.width=100*m+"%")}),[m]);return c&&1!==c.length?kr("footer",{className:"ul-footer "+("link"===n["userleap-platform"]?"ul-footer__link":""),children:[c.length>1&&kr("div",{id:"ul-progress-bar-container",children:kr("div",{id:"ul-progress-bar-current",ref:d,style:{border:`1px solid ${e||"#000"}`}})}),i&&kr("a",{href:`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${a}`,rel:"noreferrer",style:{display:"block",margin:"5px 0"},target:"_blank",children:kr(si,{})})]}):kr("footer",{className:"ul-footer",style:i?{}:{marginBottom:"10px"},children:i?kr("a",{href:`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${a}`,rel:"noreferrer",style:{display:"block",margin:"5px 0"},target:"_blank",children:kr(si,{})}):null})},li=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:a,eventEmitFn:l,fontFamily:d,headers:c,index:u,next:p,showStripes:m,update:h,useMobileStyling:v,viewDocument:g}=ur((e=>({answers:e.answers,border:e.border,cards:e.cards,close:e.close,configureExitOnOverlayClick:e.configureExitOnOverlayClick,destroy:e.destroy,endCard:e.endCard,eventEmitFn:e.eventEmitFn,fontFamily:e.fontFamily,headers:e.headers,index:e.index,next:e.next,showStripes:e.showStripes,update:e.update,useMobileStyling:e.useMobileStyling,viewDocument:e.viewDocument}))),_=bt(null),w=bt(!1),{props:b,type:x,name:C}=n[u],k=n.length;_t((()=>{_.current&&(_.current.classList.contains("ul-app--visible")||_.current.classList.add("ul-app--visible"),!w.current&&l&&(w.current=!0,l(s.SurveyAppeared)))}),[l]),_t((()=>{h()}),[u,h]),_t((()=>{o((()=>r()))}),[r,o]);const S=()=>r(f),E=async function(e){p({data:e,completeSurvey:()=>{i(f)},endCard:a}),(e=>{const t=e.querySelector(`.${y.CardContainer}`);t&&(t.scrollTop=0)})(g)};if(e)for(const t of e)if(t.questionId===C){let e;if(x===Ze.MultipleChoice){const n=b.options.find((({value:e})=>e===t.value));if(!n)break;e={[n.id]:n.value}}else e=t.value;E({value:e,type:x,questionId:t.questionId});break}return kr("div",{className:xr("ul-app",G(c)?"ul-app--visible":"ul-app--overlay"),id:f,ref:_,style:{"--theme":t,...d?{fontFamily:d.replace(";","")}:{}},children:kr("div",{className:"ul-app__container",children:[kr("div",{className:xr(Z(y.CardContainer,v)),style:v?{borderColor:t}:{borderColor:t,margin:"15px"},children:[m&&kr("div",{className:"ul-header__container",children:kr("div",{className:"ul-header",children:"For development purposes only"})}),(()=>{const e={className:"ul-card",next:E,questionId:C,type:x};switch(x){case Ze.ConsentLegal:return we(Vr,{...e,...b,key:C});case Ze.Likert:return we(Br,{...e,...b,key:C});case Ze.MultipleChoice:return we(qr,{...e,...b,key:C});case Ze.MultipleSelect:return we(zr,{...e,...b,key:C});case Ze.NPS:return we($r,{...e,key:C,props:b});case Ze.Open:return we(Wr,{...e,...b,key:C});case Ze.RecordedTask:return we(fo,{...e,...b,key:C});case Ze.TextUrlPrompt:return we(wo,{...e,...b,key:C});case Ze.Thanks:return we(bo,{...e,...b,key:C});case Ze.Uploading:return we(ii,{...e,...b,key:C});case Ze.VideoVoice:return we(oi,{...e,...b,key:C});default:return null}})(),kr(ai,{})]}),![z.Email,z.Link].includes(c["userleap-platform"])&&(!a||u+1!==k)&&kr("div",{className:xr(Z(y.CloseContainer,v)),children:kr("div",{"aria-label":"Close button",className:y.CloseButton,onClick:S,onKeyPress:e=>{"Enter"===e.key&&S()},role:"button",tabIndex:0,children:kr("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:kr("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"})})})})]})})},di=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:t.location.href,l:t.navigator.language}};const ci={configure:function(e,t=!0){var n;const{answers:r,apiURL:o,customStyles:i,endCard:s,eventEmitFn:a,fontFamilyURL:l,frame:u,UpChunk:p,viewDocument:m,viewWindow:h}=e,v=G(e.headers)?e.frame:m.body,g=B,f=((e,t)=>{const n=[...e],r=new Set([Ze.VideoVoice,Ze.RecordedTask]);return e.some((e=>r.has(e.type)))&&n.push({name:-2,props:{routingOptions:[]},type:Ze.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:Ze.Thanks}),n})(e.cards,!!s);wr.configure(g,{cards:f,hasEndCard:!!s,apiURL:o,UpChunk:p}),ur.setState({apiURL:o,answers:r,border:e.border,index:e.startingQuestionIdx||0,cards:f,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:a,fontFamily:e.fontFamily,frame:u,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:di({mode:e.mode,viewWindow:h,viewDocument:m}),mode:e.mode,recorder:wr,recorderEventEmitter:g,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:y}=ur.getState();y();const{head:_}=m,w=m.createElement("style");if(w.id="sprig-style",w.textContent='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}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:left;margin:auto}.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:#ffffff;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 5px 20px}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:left;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{padding-top:15px;margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:left}.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:left}.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{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%;height:fit-content;flex:0 0 fit-content}.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;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{box-shadow:unset;border-radius:unset;border:none!important;position:unset}@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:rgba(0,0,0,.01);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:white}.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;margin-left:-2px}.likert-number--desktop{border:1px solid #e6e6e6;margin-left:-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:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-number-1{border-top-left-radius:5px;border-bottom-left-radius:5px}.likert-last-option{border-top-right-radius:5px;border-bottom-right-radius:5px}.likert-star--mobile{margin-left:-2px}.likert-star--desktop{margin-left:-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{margin-left:-2px}.likert-smiley--desktop{margin-left:-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--likert__labels span:last-child{text-align:right}.select-label{flex:1;overflow-wrap:anywhere;cursor:pointer;padding-left:15px}.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;margin-left:-2px}.nps-number--desktop{border:1px solid #e6e6e6;margin-left:-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:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.nps-number-0{border-top-left-radius:5px;border-bottom-left-radius:5px}.nps-number-10{border-top-right-radius:5px;border-bottom-right-radius:5px}.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--nps__labels span:last-child{text-align:right}.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:rgba(0,0,0,.01);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:white}.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}#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:#ffffff;border-radius:5px;text-align:left;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:30px}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-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.close-container--desktop,.close-container--mobile{height:22px;width:22px;border-radius:22px;background-color:#fff;align-items:center;justify-content:center}.close-container--desktop{top:25px;right:25px}.close-container--mobile{top:15px;right:10px}.close-container{background:transparent;box-sizing:border-box;display:flex;position:absolute}.close-btn{height:18px;width:18px;align-items:center;justify-content:center;display:flex;cursor:pointer}.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:rgba(0,0,0,.01);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}\n',w.nonce=e.styleNonce,_.appendChild(w),e.fontFamily&&l&&parent){const e=m.createElement("link");e.rel="stylesheet",e.href=l,_.appendChild(e)}if(e.customStyles&&L(m,i,e.styleNonce),!p)if(e.installationMethod!==$.Npm){const e=m.createElement("script");e.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",e.onload=()=>{wr.setUpChunk(h.UpChunk)},e.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(e)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const b=a||(null==(n=u.eventEmitter)?void 0:n.emit);null==b||b(d.VerifyViewVersion,{[c.ViewVersion]:"2.21.6"}),v&&t&&ze(kr(li,{}),v)}};window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const ui="0px",pi=()=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container",document.body.appendChild(window.UserLeap.container)},mi=e=>{const t=window.UserLeap.container;if(t)try{document.body.removeChild(t),window.UserLeap.container=null,Mi("trackStartUrl",null),B.emit(s.SurveyLifeCycle,{state:"dismissed"}),B.emit(s.SurveyClosed,{name:s.SurveyClosed,initiator:e})}catch(n){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+t),n instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",n)}},hi=()=>{B.on(s.SurveyWillClose,(({initiator:e})=>{mi(e)}))},vi=(e,t,n)=>{var r,o;const i={position:"fixed",bottom:"0px",right:ui,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646},s=Object.assign({},t,window.UserLeap);let a,l=!1;return n?(null!=(r=window.UserLeap.windowDimensions)&&r.width?i.width=`${window.UserLeap.windowDimensions.width}px`:i.width="100%",null!=(o=window.UserLeap.windowDimensions)&&o.height?i.maxHeight=window.UserLeap.windowDimensions.height-20+"px":window.UserLeap.maxHeight?i.maxHeight=window.UserLeap.maxHeight:i.maxHeight=document.body.clientHeight-20+"px",["light","dark"].includes(s.overlayStyleMobile)&&(l=!0)):(i.width="360px",i.maxHeight=window.UserLeap.maxHeight||"66vh",s.framePosition===F.BottomLeft?a={left:ui}:s.framePosition===F.TopLeft?a={left:ui,top:"0px"}:s.framePosition===F.TopRight?a={top:"0px"}:s.framePosition===F.Center&&(l=!0,a={margin:"auto",position:"static"},i.maxHeight=null)),l&&((e,t)=>{const n={position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646},r=t?e.overlayStyleMobile:e.overlayStyle;n["background-color"]="light"===r?"rgba(255,255,255, 0.95)":"rgba(0,0,0,0.9)",t||(n.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,n)})(s,n),Object.assign(e.style,i,a),l};const gi=new class{constructor(){o(this,"_optimizelyData",{})}setOptimizelyExperiment(e){if(!e||"object"!=typeof e)return!1;const{experiments:t}=e;try{return Object.keys(this._optimizelyData).map((e=>{delete this._optimizelyData[e]})),t&&t.map((e=>{const{id:t,variation:n}=e,r=this.transformExperimentId(t);n&&"string"==typeof n&&(this._optimizelyData[r]=n)})),!0}catch(e){return e instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",e),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(e){return this._optimizelyData[this.transformExperimentId(e)]}transformExperimentId(e){return"!optimizely_experiments_"+e}getAndSetWebOptimizelyExperiments(){var e;try{if(window&&window.optimizely&&"function"==typeof window.optimizely.get){const t=null==(e=window.optimizely.get("state"))?void 0:e.getExperimentStates({isActive:!0});if(t){const e=Object.keys(t).map((e=>{var n,r;return null!=(n=t[e].variation)&&n.name?{id:e,variation:null==(r=t[e].variation)?void 0:r.name}:{id:e,variation:"Original"}}));return this.setOptimizelyExperiment({experiments:e}),!0}return!1}return!1}catch(e){return e instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",e),!1}}};Object.freeze(gi);class fi{constructor(e,t){o(this,"paused"),o(this,"queue"),o(this,"ul"),this.ul=e,this.paused=!1,this.queue=[],this.flush(t)}flush(e){const t=e.length;if(t)for(let n=0;n<t;n++)this.push(e[n])}isPaused(){return this.paused}pause(){this.paused=!0}unpause(){this.paused=!1;const e=this.queue.slice();this.empty(),this.flush(e)}push(e){if(this.paused)this.queue.push(e);else if(e instanceof Function)e();else{const t=Array.prototype.slice.call(e,1),n=e[0],r=this.ul[n];r instanceof Function?r.apply(this.ul,t):n&&console.warn("[Sprig] (ERR-100) No valid UserLeap action called",n)}}perform(e){if(this.paused){let t=()=>{};const n=new Promise((function(n){t=function(){n(e())}}));return this.queue.push(t),n}return e()}empty(){this.queue.length=0}}const yi="userleap.ids",_i="userleap.pageviews",wi=["popState","pushState","replaceState"],bi="test",xi="!email",Ci=["ios","android"],ki="environments",Si="pageUrl",Ei="visitors",Li="ul-view-sdk-script",Ui=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function Ii(e,t){const{matchType:n,pattern:r}=e;return(n?Ui[n]:Ui.legacy)(r,t)}function ji(e){const{pageUrlEvents:t,interactiveEvents:n,dismissOnPageChange:r,platform:o}=window.UserLeap._config;if(o&&o!==z.Web)return;const s=Oi("trackStartUrl"),a=s?String(s):null;t&&function(e){if(!window.UserLeap.localStorageAvailable||e.endsWith("mock_snippet.html"))return;const t=window.UserLeap._config.pageUrlEvents;if(t&&t.length){let n=!1;for(let r=0;r<t.length&&(n=Ii(t[r],e),!n);r++);if(!n)return}window.UserLeap.debugMode&&console.info("[DEBUG] Sprig trackPageView",e);const n=10,r=1;let o=[];const i={viewedAt:Date.now(),location:e},s=localStorage.getItem(_i);try{if(o=s?JSON.parse(s):[],Array.isArray(o)||(o=[]),o.length>0){const t=o[o.length-1],s=(Date.now()-t.viewedAt)/1e3;(t.location!=e&&s>r||s>n)&&(window.UserLeap._queue.push(["track",Si,null,{url:e}]),o.push(i))}else window.UserLeap._queue.push(["track",Si,null,{url:e}]),o.push(i);o.length>5&&o.splice(0,o.length-5);try{localStorage.setItem(_i,JSON.stringify(o))}catch(e){e instanceof Error&&console.warn(`[Sprig] Unable to write to Local Storage: ${e.message}`)}}catch(e){e instanceof Error&&(e.stack=s||"",window.UserLeap.reportError("trackPageView",e)),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}(window.location.href),n&&(Di(),Ti()),r&&a&&a!==window.location.href&&e&&wi.includes(e.type)&&window.UserLeap("dismissActiveSurvey",i.PageChange)}const Pi={capture:!0},Ti=()=>{const e=window.UserLeap._config.interactiveEvents.filter((e=>Ii(e,window.location.href))).map((e=>{const{name:t,properties:n}=e,{selector:r,innerText:o}=n;return r?e=>(S(e.target)&&e.target.closest(r)&&window.UserLeap("track",t),!1):e=>(S(e.target)&&e.target.innerText===o&&window.UserLeap("track",t),!1)})),t=t=>e.forEach((e=>e(t)));window.UserLeap._config.interactiveEventsHandler=t,window.addEventListener("click",t,Pi)},Di=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,Pi),delete window.UserLeap._config.interactiveEventsHandler};function Ri(e,t,n){const r=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach((e=>{r.push(e),e===ki?r.push(window.UserLeap.envId):e===Ei&&r.push(Ni())})),n&&r.push(n),r.join("/")}function Oi(e){if(!window.UserLeap.localStorageAvailable)return null;const t=localStorage.getItem(yi);if(t)try{const n=JSON.parse(t)[window.UserLeap.envId];return n&&n[e]||null}catch(e){e instanceof Error&&(e.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",e)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",e)}return null}function Mi(e,t){if(!window.UserLeap.localStorageAvailable)return;const n=localStorage.getItem(yi);let r={};if(n)try{r=JSON.parse(n)}catch(e){e instanceof Error&&(e.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",e)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",e)}let o=r[window.UserLeap.envId];o?o[e]=t:o={[e]:t},r[window.UserLeap.envId]=o;try{localStorage.setItem(yi,JSON.stringify(r))}catch(e){e instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${e.message}`)}}function Ai(){window.previewMode||(window.UserLeap.visitorId=g(),Mi("vid",window.UserLeap.visitorId),B.emit(s.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function Ni(){return window.previewMode?"0":window.UserLeap.visitorId||""}function Vi(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(e=>function(...t){const n=e.apply(this,t),r=new Event("pushState");return window.dispatchEvent(r),ji(r),n})(e.pushState)),"replaceState"in e&&(e.replaceState=(e=>function(...t){const n=e.apply(this,t),r=new Event("replaceState");return window.dispatchEvent(r),ji(r),n})(e.replaceState)),["hashchange","popstate"].forEach((e=>window.addEventListener(e,ji,!0)))}async function Hi(e,t){const n=Ni();e&&!t&&(window.UserLeap._config.mode=bi);const r=await zi(function(e,t){let n=Ri("1",[ki],"questions?");return null!=e&&(n+=`&vid=${e}`),t&&(t.surveyId&&(n+=`&surveyid=${t.surveyId}`),t.surveyTemplateId&&(n+=`&surveytemplateid=${t.surveyTemplateId}`)),n}(n,e),{},0,!0);return r.ok?(r.json.delay&&await W(r.json.delay),Bi(r.json)):(r.reportError&&r.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",r.error),window.UserLeap.reportError("getQuestions",r.error)),{success:!1,surveyState:"no survey"})}const Bi=async(e,t)=>{var n,r;const{context:o,endCard:i,locale:u,productConfig:p,questions:m,responseGroupUid:h,surveyId:v,uuid:g,vid:f}=e,y=oe(window.UserLeap),_=Fi(y),w=function(e){if(void 0!==window.UserLeap.useMobileStyling)return window.UserLeap.useMobileStyling;const t=window.UserLeap.windowDimensions&&window.UserLeap.windowDimensions.width||document.body.clientWidth;return Fi(e)||t>10&&t<500}(y);if(null==f||!m||!m.length)return{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){const e="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(e),{success:!1,message:e,surveyState:"no survey"}}if(f!==window.UserLeap.visitorId&&g!==window.UserLeap.visitorId&&!window.previewMode){const e="Attempted to display survey to a different visitor";return window.UserLeap.reportError("DisplaySurvey",new Error(e)),{success:!1,message:e,surveyState:"no survey"}}if(t&&!await t(v))return{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:"no survey"};k.disable(),B.emit(s.SurveyWillPresent,{name:s.SurveyWillPresent,[a.SurveyId]:v});let b,x,C,S,E=document.createElement("div");const L=e=>{const{[c.ViewVersion]:t}=e;t!==y["x-ul-sdk-version"]&&mi(),B.removeListener(d.VerifyViewVersion,L)};B.on(d.VerifyViewVersion,L),G(y)?(b="ul-direct-embeded-frame",x=document.head,C=window,S=!1,_&&(pi(),E.id=b,window.UserLeap.container.appendChild(E),hi(),B.emit(s.SurveyLifeCycle,{state:"presented"}),B.emit(s.SurveyPresented,{name:s.SurveyPresented}))):({frameId:b,contentWinDocHead:x,contentWindow:C,hasOverlay:S,iframe:E}=((e,t)=>{var n,r;const o="ul-frame";pi();const i=document.createElement("iframe");i.id=o,i.setAttribute("title","Sprig User Feedback Dialog");const a=vi(i,e,t);B.on(s.SurveyFadingOut,(()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})})),hi(),i.setHeight=e=>{parseInt(i.style.height)!=e&&(i.style.height=`${e}px`,B.emit(s.SurveyHeight,{name:s.SurveyHeight,contentFrameHeight:i.clientHeight}))},null==(n=window.UserLeap.container)||n.appendChild(i),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{B.emit(s.CloseSurveyOnOverlayClick)}),B.emit(s.SurveyLifeCycle,{state:"presented"}),B.emit(s.SurveyPresented,{name:s.SurveyPresented});const l=null==(r=i.contentWindow)?void 0:r.document;return l&&(l.open("text/html","replace"),l.write("<!doctype html><head></head><body></body></html>"),l.close()),{frameId:o,contentWinDocHead:null==l?void 0:l.head,contentWindow:i.contentWindow,hasOverlay:a,iframe:i}})(p,w)),window.UserLeap.frameId=b,window.UserLeap.useMobileStyling=w;const U=Object.assign({frame:E,envId:window.UserLeap.envId,surveyId:v,userId:g,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},cards:m,context:o,locale:u,fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,apiURL:window.UserLeap._API_URL,responseGroupUid:h,headers:y,endCard:i,useMobileStyling:w,mobileSDKVersion:window.UserLeap.mobileSDKVersion,configureExitOnOverlayClick:e=>{B.on(s.CloseSurveyOnOverlayClick,e)},eventEmitFn:B.emit.bind(B),ulEvents:l,viewDocument:null==C?void 0:C.document,viewWindow:C,tabTitle:document.title,startingQuestionIdx:null==(n=window.UserLeap.config)?void 0:n.startingQuestionIdx,styleNonce:window.UserLeap.styleNonce},window.UserLeap._config);null!=(r=window.UserLeap.config)&&r.startingQuestionIdx&&(window.UserLeap.config={...window.UserLeap.config,startingQuestionIdx:null}),window.UserLeap.customStyles&&(U.customStyles=window.UserLeap.customStyles),C&&(C.__cfg=U);const I=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:U.path,j=document.getElementById(Li);j&&j.remove();const P=function(){const e=document.createElement("script");return window.UserLeap.nonce&&e.setAttribute("nonce",window.UserLeap.nonce),e.id=Li,e}(),T=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};return U.installationMethod===$.Npm?(ci.configure(U),S&&window.UserLeap.container&&T()):I&&(P.src=I,S&&P.addEventListener("load",(()=>{window.UserLeap.container&&T()})),null==C||C.addEventListener("error",(e=>{e.target instanceof HTMLScriptElement&&e.target.src===I&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))}),{capture:!0,once:!0})),null==x||x.appendChild(P),{success:!0,surveyState:"ready"}};function Fi(e){return Ci.includes(e[q.Platform])}function qi(e){if(!e)return;window.UserLeap._config=e,e.mute&&window.UserLeap._queue.pause();const{interactiveEvents:t,pageUrlEvents:n,dismissOnPageChange:r}=e;t&&function(e){let t=e.length;for(;t;){const n=Math.floor(Math.random()*t);t-=1;const r=e[t];e[t]=e[n],e[n]=r}}(t),(t||n||r)&&(Vi(),ji())}async function zi(e,t,n=0,r=!1){var o,i;t.headers=Object.assign(oe(window.UserLeap),t.headers);const a=await se(e,t,n,r);if(a.ok){const e=null==(o=a.headers)?void 0:o.get("Authorization"),t=e?e.split(" "):void 0,n=t&&2===t.length?t[1]:void 0,r=null==(i=a.headers)?void 0:i.get(q.VisitorID);n&&r&&(r!==window.UserLeap.visitorId||window.UserLeap.token!==n)&&(Mi("token",n),Mi("vid",r),B.emit(s.VisitorIDUpdated,{visitorId:r}),window.UserLeap.token=n,window.UserLeap.visitorId=r)}return a.json&&a.json.logMessage&&console.warn(`[Sprig] ${a.json.logMessage}`),a}const $i=function(e){if(!window.UserLeap)return;const t=async(t={})=>{var n,r;const{userId:o,anonymousId:i,metadata:s={},properties:a,showSurveyCallback:l}=t;let{eventName:d}=t;if(window.UserLeap.debugMode&&d!==Si&&console.info("[DEBUG] Sprig track",t),"test"===e.mode)return;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!o){const e="[Sprig] - Skipping tracking without userId";return console.warn(e),{success:!1,message:e,surveyState:"no survey"}}if(!d||0===d.trim().length){d=d?String(d):"";const e="[Sprig] - Invalid event name "+d;return console.warn(e),{success:!1,message:e,surveyState:"no survey"}}const c=window.location.href;if(s.url||(s.url=c),Mi("trackStartUrl",c),null!=(r=null==(n=window.UserLeap)?void 0:n._config)&&r.optimizelyEnabled){Fi(oe(window.UserLeap))||gi.getAndSetWebOptimizelyExperiments(),s.optimizelyExperiments=Object.assign({},gi.getAllOptimizelyExperiments())}o&&(window.UserLeap.userId=o),i&&(window.UserLeap.partnerAnonymousId=i),a&&(s.eventProperties=a);const u=window.UserLeap.delayingSurvey?await zi(Ri("1",[Ei],"events/batch"),{body:JSON.stringify({events:[{event:d,metadata:s}]}),method:"POST"},0,!0):await zi(Ri("1",[Ei],"events"),{body:JSON.stringify({event:d,metadata:s}),method:"POST"},0,!0);if(!u.ok){const e="[Sprig] (ERR-421) Failed to track event";return u.reportError&&(console.warn(e,u.error),u.error&&window.UserLeap.reportError("track",u.error)),{success:!1,message:e,error:u.error,surveyState:"no survey"}}o&&Mi("uid",o),i&&Mi("aid",i);const p=u.json;return await async function(e){var t;null==(t=null==e?void 0:e.json)||!t.delay||(window.UserLeap.delayingSurvey=!0,await W(e.json.delay),window.UserLeap.delayingSurvey=!1)}(u),function(e,t){const{pageUrlEvents:n,interactiveEvents:r,dismissOnPageChange:o}=window.UserLeap._config;if(!o)return!0;const i=[];n&&n.length&&i.push(...n),r&&r.length&&i.push(...r);const s=e&&i.find((t=>t.id===e));return s?Ii(s,window.location.href):t===window.location.href}(p.eventId,c)?Bi(p,l):{success:!1,message:"Study should not be displayed after page navigation",surveyState:"no survey"}},n={displaySurvey:async e=>(console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",i.Override),Hi({surveyId:e},!0)),_previewSurvey(e){window.UserLeap("dismissActiveSurvey",i.Override),Hi({surveyTemplateId:e},!1)},_reviewSurvey(e){window.UserLeap("dismissActiveSurvey",i.Override),Hi({surveyId:e},!1)},previewSurvey(e){n._previewSurvey(e)},reviewSurvey(e){n._reviewSurvey(e)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(e=i.API){B.emit(s.SurveyWillClose,{name:s.SurveyWillClose,initiator:e})},async setAttribute(e,t){if(!e||!t&&0!==t){const e="[Sprig] - Disregarding empty attribute / value provided";return console.warn(e),{success:!1,message:e}}return this.setAttributes({[e]:t})},async setAttributes(e){if(null==e||0===Object.keys(e).length){const e="[Sprig] - Disregarding empty attributes provided";return console.warn(e),{success:!1,message:e}}return this.identifyAndSetAttributes({attributes:e})},async identifyAndSetAttributes(t){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",t),"test"===e.mode)return;if(null===t||"object"!=typeof t||!(t.userId||t.anonymousId||t.attributes)){const e="[Sprig] - Disregarding empty payload provided";return console.warn(e),{success:!1,message:e}}const{userId:n,anonymousId:r,attributes:o}=t;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!n){const e="[Sprig] - Skipping tracking without userId";return console.warn(e),{success:!1,message:e}}if(!(o||n&&window.UserLeap.userId!==n||r&&window.UserLeap.partnerAnonymousId!==r))return{success:!0};const i={};let s;return n&&(i.userId=window.UserLeap.userId=n),r&&(i.partnerAnonymousId=window.UserLeap.partnerAnonymousId=r),o?(o.email&&!Object.prototype.hasOwnProperty.call(o,xi)&&(o[xi]=o.email,delete o.email),s=await zi(Ri("1",[ki,Ei],"attributes"),{body:JSON.stringify(o),method:"PUT"}),!s.ok&&s.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",s.error),s.error&&window.UserLeap.reportError("identifyAndSetAttributes",s.error))):s=await zi(Ri("1",[ki,Ei]),{body:JSON.stringify(i),method:"PUT"}),o&&o[xi]&&(window.UserLeap.email=o[xi]),s.ok&&(n&&Mi("uid",n),r&&Mi("aid",r)),{success:!!s.ok}},async removeAttributes(t){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",t),"test"===e.mode)return;if(null==t||0===t.length){const e="[Sprig] - Disregarding empty attributes provided";return console.warn(e),{success:!1,message:e}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const e="[Sprig] - Skipping tracking without userId";return console.warn(e),{success:!1,message:e}}const n=await zi(Ri("1",[ki,Ei],"attributes"),{body:JSON.stringify({delete:t}),method:"DELETE"});return!n.ok&&n.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",n.error),n.error&&window.UserLeap.reportError("removeAttributes",n.error)),{success:!!n.ok}},async addSurveyListener(e){B.on(s.SurveyLifeCycle,e)},async removeSurveyListener(e){B.removeListener(s.SurveyLifeCycle,e)},async addListener(e,t){B.on(e,t)},async removeListener(e,t){B.removeListener(e,t)},async removeAllListeners(){B.removeAllListeners()},setVisitorAttribute:(e,t)=>(console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),n.setAttribute(e,t)),setEmail:async e=>n.setAttribute(xi,e),setVisitorEmail:async e=>(console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),n.setEmail(e)),async setUserId(t){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",t),null==t){const e=`[Sprig] - Invalid userId ${t}`;return console.warn(e),{success:!1,message:e}}if("test"===e.mode||t===window.UserLeap.userId)return;window.UserLeap.userId=t;const n=await zi(Ri("1",[ki,Ei]),{body:JSON.stringify({userId:t}),method:"PUT"});n.ok?Mi("uid",t):n.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",n.error),n.error&&window.UserLeap.reportError("setUserId",n.error))},async setPartnerAnonymousId(e){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",e),null==e){const t=`[Sprig] - Invalid partnerAnonymousId ${e}`;return console.warn(t),{success:!1,message:t}}return window.UserLeap.partnerAnonymousId=e,Mi("aid",e),{success:!0}},track:async(e,n,r={},o=void 0)=>t({eventName:e,properties:n,metadata:r,showSurveyCallback:o}),identifyAndTrack:async e=>await t(e),applyStyles(e){if(window.UserLeap.customStyles=e,window.UserLeap.container){const t=window.UserLeap.container.children[0].contentDocument;if(t){const n=t.getElementById(y.CustomStyle);n?n.textContent=e:L(t,e,window.UserLeap.styleNonce)}}},setWindowDimensions(e,t){var n,r;const o="string"==typeof e?parseInt(e,10):e,i="string"==typeof t?parseInt(t,10):t;if(!isNaN(o)&&!isNaN(i)&&(window.UserLeap.windowDimensions={width:o,height:i}),!window.UserLeap.frameId)return;const a=document.getElementById(window.UserLeap.frameId);!a||(window.UserLeap.useMobileStyling&&(null!=(n=window.UserLeap.windowDimensions)&&n.width&&(a.style.width=`${window.UserLeap.windowDimensions.width}px`),null!=(r=window.UserLeap.windowDimensions)&&r.height&&(a.style.maxHeight=window.UserLeap.windowDimensions.height-20+"px"),a.contentDocument&&(a.style.height=String(U(a.contentDocument))+"px")),B.emit(s.SurveyDimensions,{name:s.SurveyDimensions,contentFrameWidth:a.clientWidth,contentFrameHeight:a.clientHeight}))},logoutUser(){window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,window.UserLeap.localStorageAvailable&&(localStorage.removeItem(yi),localStorage.removeItem(_i)),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),Ai(),window.UserLeap._queue.unpause()},teardown(){["hashchange","popstate"].forEach((e=>window.removeEventListener(e,ji,!0))),window.UserLeap._config.interactiveEvents&&Di(),window.UserLeap("dismissActiveSurvey",i.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(e){const t=JSON.parse(e);gi.setOptimizelyExperiment(t)}};Object.assign(window.UserLeap,n)};async function Wi(e,t){const n=window.__cfg&&window.__cfg.mode,r=Ni(),o=window.UserLeap.envId,i=window.document.documentElement,s={mode:n,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:i.clientWidth,clientHeight:i.clientHeight,location:window.location.href,language:window.navigator.language},a={action:e,err:{message:t.message,stack:t.stack},meta:s,vid:r,envId:o};(await zi(Ri("1",null,"errors"),{method:"POST",headers:{[q.Error]:window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(a)},0,!0)).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",t)}function Gi(e={}){async function t(){if(window.UserLeap.loaded)return;if(window.UserLeap.UPDATES=l,window.UserLeap.reportError=Wi,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&"object"==typeof window.UserLeap._config)for(const e in window.UserLeap._config)window.UserLeap[e]=window.UserLeap._config[e];if(!window.UserLeap.envId){if(!window.UserLeap.appId)throw new Error("Missing Environment id");window.UserLeap.envId=window.UserLeap.appId}window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const t=function(){try{if(typeof localStorage<"u"&&(localStorage.setItem("is_available","yes"),"yes"===localStorage.getItem("is_available")))return localStorage.removeItem("is_available"),!0}catch{return!1}return!1}();window.UserLeap.localStorageAvailable=t;const n=window.UserLeap.sampleRate;if(n)if(t){let e=Oi("sampled");if(null===e&&(e=Math.random()<n,Mi("sampled",e)),!e)return}else window.UserLeap.debugMode&&console.info("[DEBUG] Sprig cannot sample users without localStorage permissions");else t&&null!==Oi("sampled")&&Mi("sampled",null);window.UserLeap._API_URL||(window.UserLeap._API_URL="https://api.sprig.com");const r=[...window.UserLeap._queue];window.UserLeap._queue=new fi(window.UserLeap,[]),window.UserLeap._queue.pause();for(let e=0;e<r.length;e++)window.UserLeap._queue.push(r[e]);const o=Oi("token");o?(window.UserLeap.token=o,window.UserLeap.visitorId=Oi("vid"),window.UserLeap.userId=Oi("uid"),window.UserLeap.partnerAnonymousId=Oi("aid")):(window.UserLeap.localStorageAvailable&&localStorage.removeItem(yi),Ai());const i=await async function(e){const t=oe(window.UserLeap);let n=await se(Ri("1",[ki],"config"),{headers:t});if(window.UserLeap.error=n.error,!n.ok&&n.error&&"TypeError"===n.error.name&&(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error),n=await se(Ri("1",[ki],"config"),{headers:t})),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),re("Disabled: failed to fetch configuration"),e;const r=n.json;return null!=r&&r.disabled?(re(`Disabled: ${r.disabled}`),{disabled:r.disabled}):Object.assign({},e,r)}(e);$i(i),await qi(i),window.UserLeap._queue.unpause(),B.emit(s.SDKReady),B.emit(s.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}"complete"===document.readyState?t():window.attachEvent?window.attachEvent("onload",t):window.addEventListener("load",t,!1)}class Zi{constructor(){o(this,"UPDATES",l)}displaySurvey(e){window.Sprig("displaySurvey",e)}mute(){window.Sprig("mute")}unmute(){window.Sprig("unmute")}dismissActiveSurvey(){window.Sprig("dismissActiveSurvey")}setAttribute(e,t){window.Sprig("setAttribute",e,t)}setAttributes(e){window.Sprig("setAttributes",e)}identifyAndSetAttributes(e){window.Sprig("identifyAndSetAttributes",e)}removeAttributes(e){window.Sprig("removeAttributes",e)}addListener(e,t){window.Sprig("addListener",e,t)}removeListener(e,t){window.Sprig("removeListener",e,t)}removeAllListeners(){window.Sprig("removeAllListeners")}setEmail(e){window.Sprig("setAttribute","!email",e)}setUserId(e){window.Sprig("setUserId",e)}setPartnerAnonymousId(e){window.Sprig("setPartnerAnonymousId",e)}track(e,t={},n={}){window.Sprig("track",e,t,n)}identifyAndTrack(e){window.Sprig("identifyAndTrack",e)}applyStyles(e){window.Sprig("applyStyles",e)}setWindowDimensions(e,t){window.Sprig("setWindowDimensions",e,t)}logoutUser(){window.Sprig("logoutUser")}teardown(){window.Sprig("teardown")}}const Yi={configure:e=>{if(!e.envId&&!e.environmentId)throw new Error("Initialization Error: Sprig configure requires an environmentId");if(e.envId||(e.envId=e.environmentId||""),e.installationMethod=$.Npm,window.Sprig)return window.Sprig;window.Sprig=function(){window.Sprig._queue.push(arguments)},Object.getOwnPropertyNames(Zi.prototype).map((e=>{"constructor"!==e&&(window.Sprig[e]=Zi.prototype[e])}));const t=window.Sprig;return t.appId=e.envId,t._queue=[],window.UserLeap=t,Gi(e),window.Sprig}};Yi.configure}}]);
//# sourceMappingURL=userresearch-58f93644b98c2fbd.js.map