UNPKG

@sprig-technologies/sprig-bundled

Version:

npm package for the sprig web sdk with bundled dependencies

12 lines 132 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("./index-MkVSshrN.cjs");var ve,M,Qt,se,at,Wt,Ue,Zt,_e={},Gt=[],sr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function X(e,t){for(var n in t)e[n]=t[n];return e}function Kt(e){var t=e.parentNode;t&&t.removeChild(e)}function G(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ve.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return fe(e,s,r,o,null)}function fe(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,constructor:void 0,__v:o??++Qt,__i:-1,__u:0};return o==null&&M.vnode!=null&&M.vnode(i),i}function Yt(){return{current:null}}function V(e){return e.children}function K(e,t){this.props=e,this.context=t}function de(e,t){if(t==null)return e.__?de(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?de(e):null}function Jt(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Jt(e)}}function Fe(e){(!e.__d&&(e.__d=!0)&&se.push(e)&&!Ce.__r++||at!==M.debounceRendering)&&((at=M.debounceRendering)||Wt)(Ce)}function Ce(){var e,t,n,r,o,i,s,l,c;for(se.sort(Ue);e=se.shift();)e.__d&&(t=se.length,r=void 0,i=(o=(n=e).__v).__e,l=[],c=[],(s=n.__P)&&((r=X({},o)).__v=o.__v+1,M.vnode&&M.vnode(r),We(s,r,o,n.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,l,i??de(o),!!(32&o.__u),c),r.__.__k[r.__i]=r,tn(l,r,c),r.__e!=i&&Jt(r)),se.length>t&&se.sort(Ue));Ce.__r=0}function Xt(e,t,n,r,o,i,s,l,c,p,m){var u,d,h,g,x,y=r&&r.__k||Gt,k=t.length;for(n.__d=c,function(v,C,N){var f,b,_,E,I,P=C.length,S=N.length,w=S,L=0;for(v.__k=[],f=0;f<P;f++)(b=v.__k[f]=(b=C[f])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"||b.constructor==String?fe(null,b,null,null,b):Ee(b)?fe(V,{children:b},null,null,null):b.constructor===void 0&&b.__b>0?fe(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null?(b.__=v,b.__b=v.__b+1,I=ar(b,N,E=f+L,w),b.__i=I,_=null,I!==-1&&(w--,(_=N[I])&&(_.__u|=131072)),_==null||_.__v===null?(I==-1&&L--,typeof b.type!="function"&&(b.__u|=65536)):I!==E&&(I===E+1?L++:I>E?w>P-E?L+=I-E:L--:L=I<E&&I==E-1?I-E:0,I!==f+L&&(b.__u|=65536))):(_=N[f])&&_.key==null&&_.__e&&(_.__e==v.__d&&(v.__d=de(_)),Ae(_,_,!1),N[f]=null,w--);if(w)for(f=0;f<S;f++)(_=N[f])!=null&&!(131072&_.__u)&&(_.__e==v.__d&&(v.__d=de(_)),Ae(_,_))}(n,t,y),c=n.__d,u=0;u<k;u++)(h=n.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(d=h.__i===-1?_e:y[h.__i]||_e,h.__i=u,We(e,h,d,o,i,s,l,c,p,m),g=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&Ze(d.ref,null,h),m.push(h.ref,h.__c||g,h)),x==null&&g!=null&&(x=g),65536&h.__u||d.__k===h.__k?c=en(h,c,e):typeof h.type=="function"&&h.__d!==void 0?c=h.__d:g&&(c=g.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=c,n.__e=x}function en(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=en(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function ee(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ee(e)?e.some(function(n){ee(n,t)}):t.push(e)),t}function ar(e,t,n,r){var o=e.key,i=e.type,s=n-1,l=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c==null||131072&c.__u?0:1))for(;s>=0||l<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(l<t.length){if((c=t[l])&&!(131072&c.__u)&&o==c.key&&i===c.type)return l;l++}}return-1}function lt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||sr.test(t)?n:n+"px"}function xe(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||lt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||lt(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?ut:ct,i)):e.removeEventListener(t,i?ut:ct,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function ct(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(M.event?M.event(e):e)}function ut(e){return this.l[e.type+!0](M.event?M.event(e):e)}function We(e,t,n,r,o,i,s,l,c,p){var m,u,d,h,g,x,y,k,v,C,N,f,b,_,E,I=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[l=t.__e=n.__e]),(m=M.__b)&&m(t);e:if(typeof I=="function")try{if(k=t.props,v=(m=I.contextType)&&r[m.__c],C=m?v?v.props.value:m.__:r,n.__c?y=(u=t.__c=n.__c).__=u.__E:("prototype"in I&&I.prototype.render?t.__c=u=new I(k,C):(t.__c=u=new K(k,C),u.constructor=I,u.render=cr),v&&v.sub(u),u.props=k,u.state||(u.state={}),u.context=C,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),I.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=X({},u.__s)),X(u.__s,I.getDerivedStateFromProps(k,u.__s))),h=u.props,g=u.state,u.__v=t,d)I.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(I.getDerivedStateFromProps==null&&k!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(k,C),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(k,u.__s,C)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=k,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(P){P&&(P.__=t)}),N=0;N<u._sb.length;N++)u.__h.push(u._sb[N]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(k,u.__s,C),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,g,x)})}if(u.context=C,u.props=k,u.__P=e,u.__e=!1,f=M.__r,b=0,"prototype"in I&&I.prototype.render){for(u.state=u.__s,u.__d=!1,f&&f(t),m=u.render(u.props,u.state,u.context),_=0;_<u._sb.length;_++)u.__h.push(u._sb[_]);u._sb=[]}else do u.__d=!1,f&&f(t),m=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++b<25);u.state=u.__s,u.getChildContext!=null&&(r=X(X({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(x=u.getSnapshotBeforeUpdate(h,g)),Xt(e,Ee(E=m!=null&&m.type===V&&m.key==null?m.props.children:m)?E:[E],t,n,r,o,i,s,l,c,p),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),y&&(u.__E=u.__=null)}catch(P){t.__v=null,c||i!=null?(t.__e=l,t.__u|=c?160:32,i[i.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),M.__e(P,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=lr(n.__e,t,n,r,o,i,s,c,p);(m=M.diffed)&&m(t)}function tn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Ze(n[r],n[++r],n[++r]);M.__c&&M.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){M.__e(i,o.__v)}})}function lr(e,t,n,r,o,i,s,l,c){var p,m,u,d,h,g,x,y=n.props,k=t.props,v=t.type;if(v==="svg"&&(o=!0),i!=null){for(p=0;p<i.length;p++)if((h=i[p])&&"setAttribute"in h==!!v&&(v?h.localName===v:h.nodeType===3)){e=h,i[p]=null;break}}if(e==null){if(v===null)return document.createTextNode(k);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,k.is&&k),i=null,l=!1}if(v===null)y===k||l&&e.data===k||(e.data=k);else{if(i=i&&ve.call(e.childNodes),y=n.props||_e,!l&&i!=null)for(y={},p=0;p<e.attributes.length;p++)y[(h=e.attributes[p]).name]=h.value;for(p in y)h=y[p],p=="children"||(p=="dangerouslySetInnerHTML"?u=h:p==="key"||p in k||xe(e,p,null,h,o));for(p in k)h=k[p],p=="children"?d=h:p=="dangerouslySetInnerHTML"?m=h:p=="value"?g=h:p=="checked"?x=h:p==="key"||l&&typeof h!="function"||y[p]===h||xe(e,p,h,y[p],o);if(m)l||u&&(m.__html===u.__html||m.__html===e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(u&&(e.innerHTML=""),Xt(e,Ee(d)?d:[d],t,n,r,o&&v!=="foreignObject",i,s,i?i[0]:n.__k&&de(n,0),l,c),i!=null)for(p=i.length;p--;)i[p]!=null&&Kt(i[p]);l||(p="value",g!==void 0&&(g!==e[p]||v==="progress"&&!g||v==="option"&&g!==y[p])&&xe(e,p,g,y[p],!1),p="checked",x!==void 0&&x!==e[p]&&xe(e,p,x,y[p],!1))}return e}function Ze(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){M.__e(r,n)}}function Ae(e,t,n){var r,o;if(M.unmount&&M.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Ze(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){M.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ae(r[o],t,n||typeof e.type!="function");n||e.__e==null||Kt(e.__e),e.__=e.__e=e.__d=void 0}function cr(e,t,n){return this.constructor(e,n)}function pe(e,t,n){var r,o,i,s;M.__&&M.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],We(t,e=(!r&&n||t).__k=G(V,null,[e]),o||_e,_e,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?ve.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),tn(i,e,s)}function nn(e,t){pe(e,t,nn)}function ur(e,t,n){var r,o,i,s,l=X({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:l[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(l.children=arguments.length>3?ve.call(arguments,2):n),fe(e.type,l,r||e.key,o||e.ref,null)}function rn(e,t){var n={__c:t="__cC"+Zt++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(l){l.__e=!0,Fe(l)})},this.sub=function(s){o.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),l&&l.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ve=Gt.slice,M={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},Qt=0,K.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=X({},this.state),typeof e=="function"&&(e=e(X({},n),this.props)),e&&X(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fe(this))},K.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fe(this))},K.prototype.render=V,se=[],Wt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ue=function(e,t){return e.__v.__b-t.__v.__b},Ce.__r=0,Zt=0;var dr=0;function a(e,t,n,r,o,i){var s,l,c={};for(l in t)l=="ref"?s=t[l]:c[l]=t[l];var p={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--dr,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return M.vnode&&M.vnode(p),p}var te,F,Re,dt,me=0,on=[],ke=[],pt=M.__b,mt=M.__r,ht=M.diffed,ft=M.__c,gt=M.unmount;function le(e,t){M.__h&&M.__h(F,e,me||t),me=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ke}),n.__[e]}function B(e){return me=1,Ge(cn,e)}function Ge(e,t,n){var r=le(te++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cn(void 0,t),function(l){var c=r.__N?r.__N[0]:r.__[0],p=r.t(c,l);c!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=F,!F.u)){var o=function(l,c,p){if(!r.__c.__H)return!0;var m=r.__c.__H.__.filter(function(d){return d.__c});if(m.every(function(d){return!d.__N}))return!i||i.call(this,l,c,p);var u=!1;return m.forEach(function(d){if(d.__N){var h=d.__[0];d.__=d.__N,d.__N=void 0,h!==d.__[0]&&(u=!0)}}),!(!u&&r.__c.props===l)&&(!i||i.call(this,l,c,p))};F.u=!0;var i=F.shouldComponentUpdate,s=F.componentWillUpdate;F.componentWillUpdate=function(l,c,p){if(this.__e){var m=i;i=void 0,o(l,c,p),i=m}s&&s.call(this,l,c,p)},F.shouldComponentUpdate=o}return r.__N||r.__}function j(e,t){var n=le(te++,3);!M.__s&&Ye(n.__H,t)&&(n.__=e,n.i=t,F.__H.__h.push(n))}function be(e,t){var n=le(te++,4);!M.__s&&Ye(n.__H,t)&&(n.__=e,n.i=t,F.__h.push(n))}function Q(e){return me=5,ne(function(){return{current:e}},[])}function sn(e,t,n){me=6,be(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function ne(e,t){var n=le(te++,7);return Ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return me=8,ne(function(){return e},t)}function an(e){var t=F.context[e.__c],n=le(te++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(F)),t.props.value):e.__}function Ke(e,t){M.useDebugValue&&M.useDebugValue(t?t(e):e)}function ln(){var e=le(te++,11);if(!e.__){for(var t=F.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function pr(){for(var e;e=on.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(we),e.__H.__h.forEach(Be),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}M.__b=function(e){F=null,pt&&pt(e)},M.__r=function(e){mt&&mt(e),te=0;var t=(F=e.__c).__H;t&&(Re===F?(t.__h=[],F.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=ke,n.__N=n.i=void 0})):(t.__h.forEach(we),t.__h.forEach(Be),t.__h=[],te=0)),Re=F},M.diffed=function(e){ht&&ht(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(on.push(t)!==1&&dt===M.requestAnimationFrame||((dt=M.requestAnimationFrame)||mr)(pr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==ke&&(n.__=n.__V),n.i=void 0,n.__V=ke})),Re=F=null},M.__c=function(e,t){t.some(function(n){try{n.__h.forEach(we),n.__h=n.__h.filter(function(r){return!r.__||Be(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],M.__e(r,n.__v)}}),ft&&ft(e,t)},M.unmount=function(e){gt&&gt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{we(r)}catch(o){t=o}}),n.__H=void 0,t&&M.__e(t,n.__v))};var _t=typeof requestAnimationFrame=="function";function mr(e){var t,n=function(){clearTimeout(r),_t&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);_t&&(t=requestAnimationFrame(n))}function we(e){var t=F,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),F=t}function Be(e){var t=F;e.__c=e.__(),F=t}function Ye(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cn(e,t){return typeof t=="function"?t(e):t}function un(e,t){for(var n in t)e[n]=t[n];return e}function je(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ie(e){this.props=e}function dn(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:je(this.props,o)}function r(o){return this.shouldComponentUpdate=n,G(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ie.prototype=new K).isPureReactComponent=!0,Ie.prototype.shouldComponentUpdate=function(e,t){return je(this.props,e)||je(this.state,t)};var vt=M.__b;M.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),vt&&vt(e)};var hr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Je(e){function t(n){var r=un({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=hr,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var bt=function(e,t){return e==null?null:ee(ee(e).map(t))},pn={map:bt,forEach:bt,count:function(e){return e?ee(e).length:0},only:function(e){var t=ee(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ee},fr=M.__e;M.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}fr(e,t,n,r)};var yt=M.unmount;function mn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=un({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return mn(r,t,n)})),e}function hn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return hn(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ge(){this.__u=0,this.t=null,this.__b=null}function fn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function gn(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return G(n,i)}return o.displayName="Lazy",o.__f=!0,o}function ue(){this.u=null,this.o=null}M.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),yt&&yt(e)},(ge.prototype=new K).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=fn(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=s;var l=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=hn(c,c.__c.__P,c.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},ge.prototype.componentWillUnmount=function(){this.t=[]},ge.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]=mn(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&G(V,null,e.fallback);return o&&(o.__u&=-33),[G(V,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&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function gr(e){return this.getChildContext=function(){return e.context},e.children}function _r(e){var t=this,n=e.i;t.componentWillUnmount=function(){pe(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),pe(G(gr,{context:t.context},e.__v),t.l)}function _n(e,t){var n=G(_r,{__v:e,i:t});return n.containerInfo=t,n}(ue.prototype=new K).__a=function(e){var t=this,n=fn(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()}},ue.prototype.render=function(e){this.u=null,this.o=new Map;var t=ee(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ue.prototype.componentDidUpdate=ue.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){xt(e,n,t)})};var vn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,vr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,br=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yr=/[A-Z0-9]/g,xr=typeof document<"u",kr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function bn(e,t,n){return t.__k==null&&(t.textContent=""),pe(e,t),typeof n=="function"&&n(),e?e.__c:null}function yn(e,t,n){return nn(e,t),typeof n=="function"&&n(),e?e.__c:null}K.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(K.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var kt=M.event;function wr(){}function Sr(){return this.cancelBubble}function Cr(){return this.defaultPrevented}M.event=function(e){return kt&&(e=kt(e)),e.persist=wr,e.isPropagationStopped=Sr,e.isDefaultPrevented=Cr,e.nativeEvent=e};var Xe,Ir={enumerable:!1,configurable:!0,get:function(){return this.class}},wt=M.vnode;M.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||xr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":l==="ondoubleclick"?i="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||kr(n.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":br.test(i)?i=l:r.indexOf("-")===-1&&vr.test(i)?i=i.replace(yr,"-$&").toLowerCase():s===null&&(s=void 0):l=i="oninput",l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ee(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=ee(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Ir)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=vn,wt&&wt(e)};var St=M.__r;M.__r=function(e){St&&St(e),Xe=e.__c};var Ct=M.diffed;M.diffed=function(e){Ct&&Ct(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Xe=null};var xn={ReactCurrentDispatcher:{current:{readContext:function(e){return Xe.__n[e.__c].props.value}}}};function kn(e){return G.bind(null,e)}function ye(e){return!!e&&e.$$typeof===vn}function wn(e){return ye(e)&&e.type===V}function Sn(e){return ye(e)?ur.apply(null,arguments):e}function et(e){return!!e.__k&&(pe(null,e),!0)}function Cn(e){return e&&(e.base||e.nodeType===1&&e)||null}var In=function(e,t){return e(t)},Tn=function(e,t){return e(t)},En=V;function tt(e){e()}function Nn(e){return e}function Ln(){return[!1,tt]}var Pn=be,Rn=ye;function Mn(e,t){var n=t(),r=B({h:{__:n,v:t}}),o=r[0].h,i=r[1];return be(function(){o.__=n,o.v=t,Me(o)&&i({h:o})},[e,n,t]),j(function(){return Me(o)&&i({h:o}),e(function(){Me(o)&&i({h:o})})},[e]),n}function Me(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var Tr={useState:B,useId:ln,useReducer:Ge,useEffect:j,useLayoutEffect:be,useInsertionEffect:Pn,useTransition:Ln,useDeferredValue:Nn,useSyncExternalStore:Mn,startTransition:tt,useRef:Q,useImperativeHandle:sn,useMemo:ne,useCallback:ae,useContext:an,useDebugValue:Ke,version:"17.0.2",Children:pn,render:bn,hydrate:yn,unmountComponentAtNode:et,createPortal:_n,createElement:G,createContext:rn,createFactory:kn,cloneElement:Sn,createRef:Yt,Fragment:V,isValidElement:ye,isElement:Rn,isFragment:wn,findDOMNode:Cn,Component:K,PureComponent:Ie,memo:dn,forwardRef:Je,flushSync:Tn,unstable_batchedUpdates:In,StrictMode:En,Suspense:ge,SuspenseList:ue,lazy:gn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:xn};const Er=Object.freeze(Object.defineProperty({__proto__:null,Children:pn,Component:K,Fragment:V,PureComponent:Ie,StrictMode:En,Suspense:ge,SuspenseList:ue,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:xn,cloneElement:Sn,createContext:rn,createElement:G,createFactory:kn,createPortal:_n,createRef:Yt,default:Tr,findDOMNode:Cn,flushSync:Tn,forwardRef:Je,hydrate:yn,isElement:Rn,isFragment:wn,isValidElement:ye,lazy:gn,memo:dn,render:bn,startTransition:tt,unmountComponentAtNode:et,unstable_batchedUpdates:In,useCallback:ae,useContext:an,useDebugValue:Ke,useDeferredValue:Nn,useEffect:j,useErrorBoundary:function(e){var t=le(te++,10),n=B();return t.__=e,F.componentDidCatch||(F.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:ln,useImperativeHandle:sn,useInsertionEffect:Pn,useLayoutEffect:be,useMemo:ne,useReducer:Ge,useRef:Q,useState:B,useSyncExternalStore:Mn,useTransition:Ln,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),It=e=>{let t;const n=new Set,r=(s,l)=>{const c=typeof s=="function"?s(t):s;if(!Object.is(c,t)){const p=t;t=l??typeof c!="object"?c:Object.assign({},t,c),n.forEach(m=>m(t,p))}},o=()=>t,i={setState:r,getState:o,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>n.clear()};return t=e(r,o,i),i};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Tt={exports:{}},Oe={};const On=Lr(Er);var Et,Nt,Lt,Pt,Rt={exports:{}},qe={};function Pr(){return Nt||(Nt=1,Rt.exports=function(){if(Et)return qe;Et=1;var e=On,t=typeof Object.is=="function"?Object.is:function(c,p){return c===p&&(c!==0||1/c==1/p)||c!=c&&p!=p},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function s(c){var p=c.getSnapshot;c=c.value;try{var m=p();return!t(c,m)}catch{return!0}}var l=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(c,p){return p()}:function(c,p){var m=p(),u=n({inst:{value:m,getSnapshot:p}}),d=u[0].inst,h=u[1];return o(function(){d.value=m,d.getSnapshot=p,s(d)&&h({inst:d})},[c,m,p]),r(function(){return s(d)&&h({inst:d}),c(function(){s(d)&&h({inst:d})})},[c]),i(m),m};return qe.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,qe}()),Rt.exports}var Rr=(Pt||(Pt=1,Tt.exports=function(){if(Lt)return Oe;Lt=1;var e=On,t=Pr(),n=typeof Object.is=="function"?Object.is:function(c,p){return c===p&&(c!==0||1/c==1/p)||c!=c&&p!=p},r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Oe.useSyncExternalStoreWithSelector=function(c,p,m,u,d){var h=o(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=s(function(){function y(f){if(!C){if(C=!0,k=f,f=u(f),d!==void 0&&g.hasValue){var b=g.value;if(d(b,f))return v=b}return v=f}if(b=v,n(k,f))return b;var _=u(f);return d!==void 0&&d(b,_)?b:(k=f,v=_)}var k,v,C=!1,N=m===void 0?null:m;return[function(){return y(p())},N===null?void 0:function(){return y(N())}]},[p,m,u,d]);var x=r(c,h[0],h[1]);return i(function(){g.hasValue=!0,g.value=x},[x]),l(x),x},Oe}()),Tt.exports);const Mr=Nr(Rr),{useSyncExternalStoreWithSelector:Or}=Mr,Mt=e=>{const t=typeof e=="function"?(r=>r?It(r):It)(e):e,n=(r,o)=>function(i,s=i.getState,l){const c=Or(i.subscribe,i.getState,i.getServerState||i.getState,s,l);return Ke(c),c}(t,r,o);return Object.assign(n,t),n},qn=e=>e?Mt(e):Mt,qr=1,Dr=2,nt={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(n=>e.indexOf(n)===-1),list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(o=>r.has(o))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(o=>!r.has(o))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},Hr=(e,t,n)=>{switch(t){case"videovoice":return!!(e&&e.value);case"open":return!!n;case"multipleselect":return!!(n&&Object.keys(n).length);case"recordedtask":return(n==null?void 0:n.taskStatus)==="completed";case"texturlprompt":return!e.value;case"consentlegal":case"nps":case"likert":return n!==null;case"multiplechoice":return n!==void 0;case"matrix":return!!(n&&Object.values(n).every(r=>r!==null));default:return!0}},Dn=(e,t)=>{if(t==="matrix"){const n=Object.keys(e).length,r=Object.values(e).filter(o=>o!==null).length;return r>0&&r<n}return!1},Hn=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:o={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const l=i.props.routingOptions||[];for(let m=0;m<l.length;m++){const{group:u,target:d}=l[m];if(!(u!=null&&u.length))continue;const h=u[0];if(h.questionIndex===void 0||h.questionIndex>r.length)continue;let g=Ot({comparator:h.comparator,response:r[h.questionIndex],type:i.type,value:h.value});for(let x=1;x<u.length;x+=2){const y=u[x],k=u[x+1],v=Ot({comparator:k.comparator,response:r[k.questionIndex],type:e[k.questionIndex].type,value:k.value});y===qr?g&&(g=v):y===Dr&&(g||(g=v))}if(g){s=d===-1&&n?e.length-1:d;break}}const c=e.findIndex(m=>m.type==="uploading");let p;return p=c>0?n?e.length-3:e.length-2:e.length-1,t>=p||s===-1||s!==null&&s>p?c>0&&Object.values(o).some(u=>u.isSubmitted&&!u.isComplete)?c:n?e.length-1:null:s===-1?null:s},Ot=({comparator:e,response:t,type:n,value:r})=>{if(e==="answered")switch(n){case"texturlprompt":return t===void 0;case"consentlegal":return t&&t.submitted===!0;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="completed";case"likert":case"nps":return Number.isInteger(t);case"matrix":return Object.values(t).every(o=>o!==null);case"multiplechoice":return t!==void 0;case"multipleselect":return(t==null?void 0:t.length)>0;case"open":return t&&t.length>0;case"videovoice":return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e==="given_up")return n!=="recordedtask"||"taskStatus"in t&&t.taskStatus==="given.up";if(e==="partial")return n==="matrix"&&Dn(t,n);if(e==="skipped")switch(n){case"texturlprompt":return t==null?void 0:t.skipped;case"consentlegal":case"likert":case"nps":case"videovoice":return t===null;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="abandoned";case"open":case"multipleselect":return(t==null?void 0:t.length)===0;case"multiplechoice":return t===void 0;case"matrix":return Object.values(t).every(o=>o===null);default:return!1}return nt[e](t,r)},Ur=e=>{var r,o,i;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(s=>[s.value]):(t=e.props.options.map(s=>s.value),n=!e.props.properties.required,t.reduce((s,l)=>s.concat(s.map(c=>[...c,l])),[[]]).filter(s=>n||s.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const s=e.props.options.map(l=>l.value);return e.props.properties.required||s.push(void 0),s}case"matrix":{if(!((r=e==null?void 0:e.props)!=null&&r.options))return null;const s=e.props.properties.matrixColumn,l=e.props.options,c=l.reduce((m,u)=>(m[u.id]=null,m),{}),p=[{...c,[l[0].id]:s[0].value},l.reduce((m,u)=>(m[u.id]=s[0].value,m),{})];return e.props.properties.required||p.push(c),p}case"likert":{const s=Number((i=(o=e.props)==null?void 0:o.properties)==null?void 0:i.range)||5;return[...Array.from(Array(s).keys()).map(c=>c+1),...e.props.properties.required?[]:[null]]}case"nps":return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case"videovoice":case"open":return["1",...e.props.properties.required?[]:[""]];case"recordedtask":{const s=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||s.push({taskStatus:"abandoned"}),s}case"texturlprompt":return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case"consentlegal":return[1,...e.props.properties.required?[]:[null]];default:return[1]}var t,n},Fr=e=>e in nt,Ar=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Br=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(l=>!!Number(l)||typeof l=="object"&&l.questionIndex===e).map(l=>{const{comparator:c,value:p}=l;return{comparator:c,target:i,value:p}});return[...n,...s]},[]),De=new Set(["thanks","uploading"]),q=qn()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=R.APP_ID)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s,studyType:l}=r;await o(n),He(r)||s({event:"closed"}),R.breadcrumbsLogger.info("SurveyClosing",{surveyId:r.surveyId}),R.ConflictingWidgets.enable(),i({initiator:R.DismissReason.Closed,studyType:l})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i,studyType:s,surveyId:l}=t();r("survey.complete",l),await o(n),R.ConflictingWidgets.enable(),i({initiator:R.DismissReason.Complete,studyType:s})},endCard:{headline:""},envId:"",eventEmitFn:R.eventEmitter.emit.bind(R.eventEmitter),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return R.shouldDirectEmbed(o)?Promise.resolve():(r(R.SprigEvent.SurveyFadingOut),new Promise(s=>{const l=i.getElementById(n);l?(l.addEventListener("transitionend",()=>{s()}),l.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{qid:r[i].name,props:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var h,g,x;const{cards:s,destroy:l,index:c,uploadProgress:p}=t(),m=r||((h=p[n])==null?void 0:h.isComplete),u={...p,[n]:{progressPct:m?100:o||((g=p[n])==null?void 0:g.progressPct),isComplete:m,isSubmitted:i||((x=p[n])==null?void 0:x.isSubmitted)}};if(e({uploadProgress:u}),s[c].type!=="uploading")return;const d=Object.entries(p).every(([y,k])=>!k.isSubmitted||k.isComplete||n==y&&r);if(d&&c>=s.length-1)return l(R.APP_ID);e({index:d?c+1:c,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":"web","x-ul-environment-id":"","x-ul-installation-method":"web-snippet","x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:l,submit:c,trackHistory:p,uploadProgress:m,viewedCardCount:u}=t();e({minScrollableHeight:void 0});const d=Array.isArray(n.data)?n.data:[n.data],h=Date.now(),g=[...o],x={response:[],responseGroupUid:l,questionIndex:s};let y=null;const k=r.slice(0);d.forEach((N,f)=>{const b=g[s+f],{type:_,...E}=N,I={...E,answeredAt:h},P=I.value;(w=>w&&!De.has(w.type))(b)&&(b.value=P),x.response.push(I);let S=_==="multiplechoice"?Object.values(P).find(w=>w!==!1):P;_==="multipleselect"&&(S=g[s+f].props.options.reduce((w,L)=>(P[L.id]&&w.push(L.value),w),[])),k[s+f]=S,y=Hn({cards:g,index:s+f,hasEndCard:!!n.endCard,uploadProgress:m,allResponses:k})}),e({allResponses:k}),(y===null||De.has(g[y].type))&&(x.completedAt=h);const v=c(x);if(y===null)return void n.completeSurvey();y&&!De.has(g[y].type)&&v.finally(()=>{p({event:"seen",index:y})});const C=g[y];g[y]&&i&&i("survey.question",{qid:C.name,props:C.props}),e({cards:g,hasViewedEmbed:!1,index:y,viewedCardCount:u+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:R.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n,studyType:r})=>{const{eventEmitFn:o,removeIframeIfReady:i,surveyId:s}=t();e({pendingRemoveIframeReason:n,studyType:r}),o(R.SprigEvent.SurveyCloseRequested,{name:R.SprigEvent.SurveyCloseRequested,initiator:n,studyType:r,"survey.id":s}),i()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o,studyType:i,surveyId:s}=t();r&&o===0&&(n(R.SprigEvent.SurveyWillClose,{name:R.SprigEvent.SurveyWillClose,initiator:r,studyType:i,"survey.id":s}),e({pendingRemoveIframeReason:null,studyType:i}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||He(s))return;const l={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:o,completedAt:n,previewKey:s.previewKey},c=await s.trackPromise(R.sprigFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(l),headers:s.headers,method:"POST"}));c.ok?o.forEach((p,m)=>{s.eventEmitFn(R.SprigEvent.QuestionAnswered,{...p,questionIndex:r?r+m:void 0,"survey.id":s.surveyId})}):c.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",c.error),await s.trackPromise(qt(s,"submitResponse",c.error)))},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(He(i))return;const{cards:s,index:l}=i;let c=r??l,p=s[c];for(;p;){const m={sid:i.surveyId,qid:p.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},u=await i.trackPromise(R.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{method:"POST",headers:i.headers,body:JSON.stringify(m)}));!u.ok&&u.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",u.error),await i.trackPromise(qt(i,"trackHistory",u.error)));const d=s[c+1];if(!p.groupId||!(d!=null&&d.groupId)||d.groupId!==p.groupId)break;c++,p=d,o=!1}},trackPromise:async n=>{const{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:l,surveyId:c,viewDocument:p}=t(),m=o["userleap-platform"]==="web",u=R.shouldDirectEmbed(o),d=n[r],h=d.type==="matrix"&&!(d.props.properties.displayMatrixAsAccordion||l);e({minScrollableHeight:void 0}),setTimeout(()=>{var k,v,C;!u&&!l&&((k=s==null?void 0:s.setWidth)==null||k.call(s,R.DEFAULT_WIDTH_PX));const[g,x,y]=R.calculateFrameDimensions(p,m&&!l,u);u?(i(R.SprigEvent.SurveyHeight,{name:R.SprigEvent.SurveyHeight,contentFrameHeight:g,"survey.id":c}),i(R.SprigEvent.SurveyWidth,{name:R.SprigEvent.SurveyWidth,contentFrameWidth:x,"survey.id":c})):((v=s.setHeight)==null||v.call(s,g),e({minScrollableHeight:y}),!l&&h&&((C=s.setWidth)==null||C.call(s,x)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0,focusedQuestionId:null,setFocusedQuestionId:n=>e({focusedQuestionId:n})})),He=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,qt=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:l,viewDocument:c}=e,p=c.documentElement,m={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:p.clientWidth,clientHeight:p.clientHeight,location:window.location.href,language:window.navigator.language},u={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:m,vid:o,envId:i};(await R.sprigFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},l),body:JSON.stringify(u)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Un=e=>G("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},G("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),Fn=e=>G("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},G("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2})),jr=({visible:e})=>a("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:a(Fn,{className:"sprig-check"})}),Dt="250ms",Vr=Je(({animate:e,children:t,header:n,isOpen:r,onClick:o,showHeaderCheck:i},s)=>{const l=Q(null),[c,p]=B(0),[m,u]=B("none"),[d,h]=B(!0);return j(()=>{var x;const g=(x=l.current)==null?void 0:x.getBoundingClientRect();p(r&&g?g.height:0)},[r]),j(()=>{!c&&r||!d||h(!1),u(e&&!d?`height ${Dt} ease`:"none")},[e,d,c,r]),a("div",{className:"sprig-accordion",ref:s,children:[a("button",{className:"sprig-accordion-header-container",onClick:o,type:"button",children:[a("div",{className:"sprig-header-label-container",children:[a("span",{className:"sprig-header-label",children:n}),a(jr,{visible:i})]}),a(Un,{className:"sprig-caret",style:{transitionDuration:e?Dt:"0",transform:r?"rotate(-180deg)":"none"}})]}),a("div",{className:"sprig-accordion-body",style:{transition:m,height:c},children:a("div",{ref:l,children:t})})]})}),rt=({style:e,stroke:t="black"})=>a("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),a("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),O=(...e)=>e.filter(Boolean).join(" "),$=(e,t,n)=>{const r=t?"--mobile":"--desktop";return`${e+r} ${e+(n?`${r}_${n}`:"")} ${e}`},$r=(e,t)=>`${e} ${e}__${t}`,W=e=>a("button",{...e,className:O("ul-card-text__button",e.className),id:"ul-card-text__button"}),An=()=>{const{viewDocument:e}=q(r=>({viewDocument:r.viewDocument})),[t,n]=B(!1);return j(()=>{const r=e.querySelector(".sprig-question-body"),o=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{n(!!(r&&R.isHTMLElement(r)&&r.scrollHeight>r.offsetHeight))})});return r&&o.observe(r),()=>{r&&o.disconnect()}},[e]),t},Ht=({plainText:e,richText:t,id:n,className:r,isHeader:o})=>t?a("div",{className:r,dangerouslySetInnerHTML:{__html:t},id:n}):e?a(o?"h1":"p",{className:r,id:n,children:e}):null,zr=()=>{const{cards:e,close:t,endCard:n,headers:r,index:o}=q(l=>({cards:l.cards,close:l.close,endCard:l.endCard,headers:l.headers,index:l.index,useMobileStyling:l.useMobileStyling})),i=e.length,s=ne(()=>()=>t(R.APP_ID),[t]);return["email","link"].includes(r["userleap-platform"])||n&&o+1===i?null:a("div",{"aria-label":"Close button",className:"close-btn",onClick:s,onKeyPress:l=>{l.key==="Enter"&&s()},role:"button",tabIndex:0,children:a("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:a("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"})})})},J=({message:e,properties:t})=>{const n=Q(null),r=t==null?void 0:t.captionText,o=An();return a("div",{className:O("question-header-container","sprig-header-container",o?"sprig-border-bottom":null),ref:n,children:[a("div",{className:"question-header-button-container",children:[a(Ht,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),a(zr,{})]}),a(Ht,{className:"ul-caption",id:"ul-caption",plainText:r,richText:t==null?void 0:t.captionHtml})]})},Qr=()=>a("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),ot=({isSubmitDisabled:e,handleSubmit:t})=>a("div",{className:"ul-card-longform__submit-button-container",children:a(W,{className:"ul-card-longform__submit-button",disabled:e,onClick:t,children:["OK ",a(Qr,{})]})}),Ut=({buttonText:e="View Prototype",handleClick:t})=>a("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),oe=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var u;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=q(d=>({handleClickEmbedButton:d.handleClickEmbedButton,hasViewedEmbed:d.hasViewedEmbed,headers:d.headers,useDesktopPrototype:d.useDesktopPrototype})),l=(n==null?void 0:n.conceptUrl)||((u=n==null?void 0:n.consentDocument)==null?void 0:u.url),c=window.innerWidth<R.EMBED_MOBILE_MAX_WIDTH,p=i["userleap-platform"],m=(d,h)=>{d.preventDefault(),r(h)};if(!s&&c&&!o&&l&&["email","link"].includes(p)){if(t==="prototype")return a(Ut,{handleClick:d=>{m(d,"question.prototype.click")}});if(t==="pdf")return a(Ut,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:d=>{m(d,"question.agreement.click")}})}return e()},Bn=({isSelected:e,id:t,divId:n,themeColor:r})=>a("div",{"aria-checked":e,"aria-labelledby":`label-${t}`,className:"select-checkbox",id:n,role:"checkbox",style:e?{backgroundColor:r,borderColor:r,boxShadow:"none"}:{},tabIndex:0,children:e&&a(Fn,{})}),jn=(e,t)=>{const n=Q(0);return()=>{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`}}},Ne=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:l,isRadio:c,useMobileStyling:p,error:m,allowTextEntry:u,noneOfTheAbove:d,promptText:h,onUserInputChanged:g})=>{const{styleNonce:x,viewDocument:y}=q(w=>({styleNonce:w.styleNonce,viewDocument:w.viewDocument})),[k,v]=B(!1);Zr(y,t,x);const C=({isSelected:w,userText:L})=>{g&&g({id:l,selected:w,value:i,userText:L,noneOfTheAbove:d})},N=w=>{w.stopPropagation(),C({isSelected:c||!o,userText:s}),v(!1)},f=()=>{k||v(!0)},b=()=>{k&&v(!1)},_={onClick:w=>N(w),onKeyPress:w=>(L=>{L.key!=="Enter"&&L.key!==" "||N(L)})(w)};"ontouchstart"in y.documentElement?(_.onTouchStart=b,_.onTouchCancel=b,_.onTouchEnd=b):(_.onMouseDown=f,_.onMouseLeave=b);const E=c?`radio-${l}`:`checkbox-${l}`,I=o||k?[Se]:[],P=[...m?[Vn]:[],...I],S=r?{"aria-labelledby":`label-${l}`}:{"aria-label":e};return a("div",{className:O($("choice",p),...P),id:`choice-div-${l}`,style:{...n,...m?{borderColor:R.ERROR_BORDER_COLOR}:{}},..._,children:[a("div",{className:O("choice-label-container"),children:[c?a("div",{...S,className:O("select-radio",...I),id:E,role:"radio",tabIndex:0}):a(Bn,{divId:E,id:l,isSelected:o,themeColor:t}),r&&a("label",{className:O($("select-label",p)),htmlFor:E,id:`label-${l}`,children:r})]}),u&&o&&a("div",{className:O("choice-text-entry-container",...I),children:a(Wr,{onTextChange:w=>C({isSelected:o,userText:w}),promptText:h||"Please specify",textValue:s,useMobileStyling:p})})]})},Wr=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=Q(null),{update:i}=q(l=>({update:l.update})),s=jn(o,()=>i());return j(()=>(s(),o.current&&o.current.focus(),()=>{i()}),[]),a("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:O($("choice-text-input",r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:l=>{s(),l.stopPropagation(),n(l.currentTarget.value)},onClick:l=>{l.stopPropagation()},onKeyPress:l=>{l.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},Ft="ul-select-style-element",Se="ul-select-active-dynamic-style",Vn="ul-select-error-dynamic-style",Zr=(e,t,n)=>{let r=e.getElementById(Ft),o=!1;r||(r=e.createElement("style"),o=!0),r.tagName.toLowerCase()==="style"&&(r.id=Ft,n&&(r.nonce=n),r.textContent=Gr(t),o&&e.head.appendChild(r))},Gr=e=>` .${Se} { border-color: ${e}; } .${Se} .select-radio, .${Se}.select-radio { border: 6px solid ${e}; box-shadow: none; } .${Vn} { border-color: ${R.ERROR_BORDER_COLOR}; } `,ie=({children:e})=>a("div",{className:"sprig-question-body",children:e}),ce=({children:e})=>{const t=An();return a("div",{className:O("sprig-question-footer-container",t?"sprig-border-top":null),children:e})},$n=({logoOnly:e=!1,style:t={}})=>a("svg",{alt:(e?"Powered by ":"")+"Sprig",width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&a("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.781