posthog-js 1.427.3 → 1.428.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/conversations.js +1 -1
- package/dist/conversations.js.map +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.full.js.map +1 -1
- package/dist/customizations.js +1 -1
- package/dist/customizations.js.map +1 -1
- package/dist/dead-clicks-autocapture.js +1 -1
- package/dist/dead-clicks-autocapture.js.map +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/default-extensions.js.map +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/extension-bundles.js.map +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/lazy-recorder.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.js.map +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/module.slim.no-external.js.map +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/posthog-recorder.js.map +1 -1
- package/dist/product-tours.js +1 -1
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/replay/external/json-ld.js +1 -6
- package/lib/src/extensions/replay/external/json-ld.js.map +1 -1
- package/package.json +5 -5
package/dist/surveys.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){function e(){return e=Object.assign?Object.assign.bind():function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},e.apply(null,arguments)}!function(){var r,t,n,i,o,a,l,s,u,c,d,v,p,h,f,y,g,b,m,x={},w=[],k=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,r){for(var t in r)e[t]=r[t];return e}function q(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,n){var i,o,a,l={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:l[a]=t[a];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return T(e,l,i,o,null)}function T(e,r,i,o,a){var l={type:e,props:r,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(l),l}function M(e){return e.children}function P(e,r){this.props=e,this.context=r}function $(e,r){if(null==r)return e.__?$(e.__,e.__i+1):null;for(var t;e.__k.length>r;r++)if(null!=(t=e.__k[r])&&null!=t.__e)return t.__e;return"function"==typeof e.type?$(e):null}function I(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,i=[],o=[],a=C({},r);a.__v=r.__v+1,t.vnode&&t.vnode(a),j(e.__P,a,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,i,null==n?$(r):n,!!(32&r.__u),o),a.__v=r.__v,a.__.__k[a.__i]=a,Q(i,a,o),r.__e=r.__=null,a.__e!=n&&N(a)}}function N(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(r){if(null!=r&&null!=r.__e)return e.__e=e.__c.base=r.__e}),N(e)}function L(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!H.__r++||o!=t.debounceRendering)&&((o=t.debounceRendering)||a)(H)}function H(){try{for(var e,r=1;i.length;)i.length>r&&i.sort(l),e=i.shift(),r=i.length,I(e)}finally{i.length=H.__r=0}}function F(e,r,t,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b=n&&n.__k||w,m=r.length;for(s=V(t,r,b,s,m),d=0;m>d;d++)null!=(p=t.__k[d])&&(v=-1!=p.__i&&b[p.__i]||x,p.__i=d,y=j(e,p,v,i,o,a,l,s,u,c),h=p.__e,p.ref&&v.ref!=p.ref&&(v.ref&&O(v.ref,null,p),c.push(p.ref,p.__c||h,p)),null==f&&null!=h&&(f=h),(g=!!(4&p.__u))||v.__k===p.__k?(s=E(p,s,e,g),g&&v.__e&&(v.__e=null)):"function"==typeof p.type&&void 0!==y?s=y:h&&(s=h.nextSibling),p.__u&=-7);return t.__e=f,s}function V(e,r,t,n,i){var o,a,l,s,u,c=t.length,d=c,v=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(a=r[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=T(null,a,null,null,null):S(a)?a=e.__k[o]=T(M,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=T(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,s=o+v,a.__=e,a.__b=e.__b+1,l=null,-1!=(u=a.__i=Z(a,t,s,d))&&(d--,(l=t[u])&&(l.__u|=2)),null==l||null==l.__v?(-1==u&&(i>c?v--:c>i&&v++),"function"!=typeof a.type&&(a.__u|=4)):u!=s&&(u==s-1?v--:u==s+1?v++:(u>s?v--:v++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(l=t[o])&&!(2&l.__u)&&(l.__e==n&&(n=$(l)),W(l,l));return n}function E(e,r,t,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,r=E(i[o],r,t,n));return r}e.__e!=r&&(n&&(r&&e.type&&!r.parentNode&&(r=$(e)),t.insertBefore(e.__e,r||null)),r=e.__e);do{r=r&&r.nextSibling}while(null!=r&&8==r.nodeType);return r}function Z(e,r,t,n){var i,o,a,l=e.key,s=e.type,u=r[t],c=null!=u&&!(2&u.__u);if(null===u&&null==l||c&&l==u.key&&s==u.type)return t;if(n>(c?1:0))for(i=t-1,o=t+1;i>=0||r.length>o;)if(null!=(u=r[a=0>i?o++:i--])&&!(2&u.__u)&&l==u.key&&s==u.type)return a;return-1}function B(e,r,t){"-"==r[0]?e.setProperty(r,null==t?"":t):e[r]=null==t?"":"number"!=typeof t||k.test(r)?t:t+"px"}function A(e,r,t,n,i){var o,a;e:if("style"==r)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(r in n)t&&r in t||B(e.style,r,"");if(t)for(r in t)n&&t[r]==n[r]||B(e.style,r,t[r])}else if("o"==r[0]&&"n"==r[1])o=r!=(r=r.replace(d,"$1")),a=r.toLowerCase(),r=a in e||"onFocusOut"==r||"onFocusIn"==r?a.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=t,t?n?t[c]=n[c]:(t[c]=v,e.addEventListener(r,o?h:p,o)):e.removeEventListener(r,o?h:p,o);else{if("http://www.w3.org/2000/svg"==i)r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=r&&"height"!=r&&"href"!=r&&"list"!=r&&"form"!=r&&"tabIndex"!=r&&"download"!=r&&"rowSpan"!=r&&"colSpan"!=r&&"role"!=r&&"popover"!=r&&r in e)try{e[r]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=r[4]?e.removeAttribute(r):e.setAttribute(r,"popover"==r&&1==t?"":t))}}function D(e){return function(r){if(this.l){var n=this.l[r.type+e];if(null==r[u])r[u]=v++;else if(n[c]>r[u])return;return n(t.event?t.event(r):r)}}}function j(e,r,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b,m,x,$,k,_,T,I,N,L=r.type;if(void 0!==r.constructor)return null;128&n.__u&&(u=!!(32&n.__u),a=[s=r.__e=n.__e]),(d=t.__b)&&d(r);e:if("function"==typeof L){v=l.length;try{if(m=r.props,x=L.prototype&&L.prototype.render,$=(d=L.contextType)&&i[d.__c],k=d?$?$.props.value:d.__:i,n.__c?b=(p=r.__c=n.__c).__=p.__E:(x?r.__c=p=new L(m,k):(r.__c=p=new P(m,k),p.constructor=L,p.render=G),$&&$.sub(p),p.state||(p.state={}),p.__n=i,h=p.__d=!0,p.__h=[],p._sb=[]),x&&null==p.__s&&(p.__s=p.state),x&&null!=L.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=C({},p.__s)),C(p.__s,L.getDerivedStateFromProps(m,p.__s))),f=p.props,y=p.state,p.__v=r,h)x&&null==L.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),x&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(x&&null==L.getDerivedStateFromProps&&m!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(m,k),r.__v==n.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(m,p.__s,k)){r.__v!=n.__v&&(p.props=m,p.state=p.__s,p.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(e){e&&(e.__=r)}),w.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(m,p.__s,k),x&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,y,g)})}if(p.context=k,p.props=m,p.__P=e,p.__e=!1,_=t.__r,T=0,x)p.state=p.__s,p.__d=!1,_&&_(r),d=p.render(p.props,p.state,p.context),w.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,_&&_(r),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&25>++T);p.state=p.__s,null!=p.getChildContext&&(i=C(C({},i),p.getChildContext())),x&&!h&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(f,y)),I=null!=d&&d.type===M&&null==d.key?z(d.props.children):d,s=F(e,S(I)?I:[I],r,n,i,o,a,l,s,u,c),p.base=r.__e,r.__u&=-161,p.__h.length&&l.push(p),b&&(p.__E=p.__=null)}catch(e){if(l.length=v,r.__v=null,u||null!=a)if(e.then){for(r.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;null!=a&&(a[a.indexOf(s)]=null),r.__e=s}else{if(null!=a)for(N=a.length;N--;)q(a[N]);R(r)}else r.__e=n.__e,!r.__k&&n.__k&&(r.__k=n.__k),e.then||R(r);t.__e(e,r,n)}}else null==a&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):s=r.__e=U(n.__e,r,n,i,o,a,l,u,c);return(d=t.diffed)&&d(r),128&r.__u?void 0:s}function R(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(R))}function Q(e,r,n){for(var i=0;n.length>i;i++)O(n[i],n[++i],n[++i]);t.__c&&t.__c(r,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(e){e.call(r)})}catch(e){t.__e(e,r.__v)}})}function z(e){return"object"!=typeof e||null==e||e.__b>0?e:S(e)?e.map(z):void 0!==e.constructor?null:C({},e)}function U(e,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b=i.props||x,m=n.props,w=n.type;if("svg"==w?a="http://www.w3.org/2000/svg":"math"==w?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;l.length>d;d++)if((f=l[d])&&"setAttribute"in f==!!w&&(w?f.localName==w:3==f.nodeType)){e=f,l[d]=null;break}if(null==e){if(null==w)return document.createTextNode(m);e=document.createElementNS(a,w,m.is&&m),u&&(t.__m&&t.__m(n,l),u=!1),l=null}if(null==w)b===m||u&&e.data==m||(e.data=m);else{if(l="textarea"==w&&null!=m.defaultValue?null:l&&r.call(e.childNodes),!u&&null!=l)for(b={},d=0;e.attributes.length>d;d++)b[(f=e.attributes[d]).name]=f.value;for(d in b)f=b[d],"dangerouslySetInnerHTML"==d?p=f:"children"==d||d in m||"value"==d&&"defaultValue"in m||"checked"==d&&"defaultChecked"in m||A(e,d,null,f,a);for(d in m)f=m[d],"children"==d?h=f:"dangerouslySetInnerHTML"==d?v=f:"value"==d?y=f:"checked"==d?g=f:u&&"function"!=typeof f||b[d]===f||A(e,d,f,b[d],a);if(v)u||p&&(v.__html==p.__html||v.__html==e.innerHTML)||(e.innerHTML=v.__html),n.__k=[];else if(p&&(e.innerHTML=""),F("template"==n.type?e.content:e,S(h)?h:[h],n,i,o,"foreignObject"==w?"http://www.w3.org/1999/xhtml":a,l,s,l?l[0]:i.__k&&$(i,0),u,c),null!=l)for(d=l.length;d--;)q(l[d]);u&&"textarea"!=w||(d="value","progress"==w&&null==y?e.removeAttribute("value"):null!=y&&(y!==e[d]||"progress"==w&&!y||"option"==w&&y!=b[d])&&A(e,d,y,b[d],a),d="checked",null!=g&&g!=e[d]&&A(e,d,g,b[d],a))}return e}function O(e,r,n){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==r||(e.__u=e(r))}else e.current=r}catch(e){t.__e(e,n)}}function W(e,r,n){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||O(i,null,r)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,r)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;i.length>o;o++)i[o]&&W(i[o],r,n||"function"!=typeof e.type);n||q(e.__e),e.__c=e.__=e.__e=void 0}function G(e,r,t){return this.constructor(e,t)}function K(e,n,i){var o,a,l,s;n==document&&(n=document.documentElement),t.__&&t.__(e,n),a=(o="function"==typeof i)?null:i&&i.__k||n.__k,l=[],s=[],j(n,e=(!o&&i||n).__k=_(M,null,[e]),a||x,x,n.namespaceURI,!o&&i?[i]:a?null:n.firstChild?r.call(n.childNodes):null,l,!o&&i?i:a?a.__e:n.firstChild,o,s),Q(l,e,s),e.props.children=null}r=w.slice,t={__e(e,r,t,n){for(var i,o,a;r=r.__;)if((i=r.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(r){e=r}throw e}},n=0,P.prototype.setState=function(e,r){var t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=C({},this.state);"function"==typeof e&&(e=e(C({},t),this.props)),e&&C(t,e),null!=e&&this.__v&&(r&&this._sb.push(r),L(this))},P.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),L(this))},P.prototype.render=M,i=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,r){return e.__v.__b-r.__v.__b},H.__r=0,s=Math.random().toString(8),u="__d"+s,c="__a"+s,d=/(PointerCapture)$|Capture$/i,v=0,p=D(!1),h=D(!0),f=0;var Y=0,J=[],X=t,ee=X.__b,re=X.__r,te=X.diffed,ne=X.__c,ie=X.unmount,oe=X.__;function ae(e,r){X.__h&&X.__h(g,e,Y||r),Y=0;var t=g.__H||(g.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function le(e){return Y=1,function(e,r){var t=ae(y++,2);if(t.t=e,!t.__c&&(t.__=[be(void 0,r),function(e){var r=t.__N?t.__N[0]:t.__[0],n=t.t(r,e);r!==n&&(t.__N=[n,t.__[1]],t.__c.setState({}))}],t.__c=g,!g.__f)){var n=function(e,r,n){if(!t.__c.__H)return!0;var o=!1,a=t.__c.props!==e;if(t.__c.__H.__.some(function(e){if(e.__N){o=!0;var r=e.__[0];e.__=e.__N,e.__N=void 0,r!==e.__[0]&&(a=!0)}}),i){var l=i.call(this,e,r,n);return o?l||a:l}return!o||a};g.__f=!0;var i=g.shouldComponentUpdate,o=g.componentWillUpdate;g.componentWillUpdate=function(e,r,t){if(this.__e){var a=i;i=void 0,n(e,r,t),i=a}o&&o.call(this,e,r,t)},g.shouldComponentUpdate=n}return t.__N||t.__}(be,e)}function se(e,r){var t=ae(y++,3);!X.__s&&ge(t.__H,r)&&(t.__=e,t.u=r,g.__H.__h.push(t))}function ue(e){return Y=5,ce(function(){return{current:e}},[])}function ce(e,r){var t=ae(y++,7);return ge(t.__H,r)&&(t.__=e(),t.__H=r,t.__h=e),t.__}function de(e){var r,t=g.context[e.__c],n=ae(y++,9);return n.c=e,t?(null!==(r=n.__)&&void 0!==r||(n.__=!0,t.sub(g)),t.props.value):e.__}function ve(){for(var e;e=J.shift();){var r=e.__H;if(e.__P&&r)try{r.__h.some(fe),r.__h.some(ye),r.__h=[]}catch(t){r.__h=[],X.__e(t,e.__v)}}}X.__b=function(e){g=null,ee&&ee(e)},X.__=function(e,r){e&&r.__k&&r.__k.__m&&(e.__m=r.__k.__m),oe&&oe(e,r)},X.__r=function(e){re&&re(e),y=0;var r=(g=e.__c).__H;r&&(b===g?(r.__h=[],g.__h=[],r.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(r.__h.length&&ve(),y=0)),b=g},X.diffed=function(e){te&&te(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(1!==J.push(r)&&m===X.requestAnimationFrame||((m=X.requestAnimationFrame)||he)(ve)),r.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),b=g=null},X.__c=function(e,r){r.some(function(e){try{e.__h.some(fe),e.__h=e.__h.filter(function(e){return!e.__||ye(e)})}catch(t){r.some(function(e){e.__h&&(e.__h=[])}),r=[],X.__e(t,e.__v)}}),ne&&ne(e,r)},X.unmount=function(e){ie&&ie(e);var r,t=e.__c;t&&t.__H&&(t.__H.__.some(function(e){try{fe(e)}catch(e){r=e}}),t.__H=void 0,r&&X.__e(r,t.__v))};var pe="function"==typeof requestAnimationFrame;function he(e){var r,t=function(){clearTimeout(n),pe&&cancelAnimationFrame(r),setTimeout(e)},n=setTimeout(t,35);pe&&(r=requestAnimationFrame(t))}function fe(e){var r=g,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),g=r}function ye(e){var r=g;e.__c=e.__(),g=r}function ge(e,r){return!e||e.length!==r.length||r.some(function(r,t){return r!==e[t]})}function be(e,r){return"function"==typeof r?r(e):r}var me="tab",xe="left",we="center",ke="right",Se="next_to_trigger",Ce="popover",qe="widget",_e="external_survey",Te="open",Me="multiple_choice",Pe="single_choice",Ie="rating",Ne="end",Le="always",He="$survey_id",Fe="$survey_name",Ve="$survey_iteration",Ee="$survey_iteration_start_date",Ze="$survey_partially_completed",Be="$survey_submission_id",Ae="$survey_completed",De="$survey_language",je="min_length",Re="max_length",Qe=Object.prototype.toString,ze=Array.isArray||function(e){return"[object Array]"===Qe.call(e)},Ue=e=>"function"==typeof e,Oe=e=>void 0===e,$e=e=>"[object String]"==Qe.call(e),We=e=>null===e,Ge=e=>Oe(e)||We(e),Ke=e=>"[object Number]"==Qe.call(e)&&e==e,Ye="Mobile",Je="Tablet",Xe="Android Tablet",er="iPad",rr="Apple Watch",tr="Nintendo",nr="PlayStation",ir="Xbox",or="Nokia",ar="Ouya",lr="Generic "+Ye.toLowerCase(),sr="Generic "+Je.toLowerCase(),ur=new RegExp(ir,"i"),cr=new RegExp("PlayStation \\w+","i"),dr=new RegExp("Nintendo \\w+","i"),vr=new RegExp("BlackBerry|PlayBook|BB10","i");new RegExp(tr,"i"),new RegExp(nr,"i"),new RegExp("Windows","i");function pr(e,r){var t;if(e)return null==(t=e.find(e=>e.type===r))?void 0:t.value}var hr="u">typeof window?window:void 0,fr="u">typeof globalThis?globalThis:hr,yr=null==fr?void 0:fr.navigator,gr=null==fr?void 0:fr.document;null!=fr&&fr.XMLHttpRequest&&new fr.XMLHttpRequest;var br=null==yr?void 0:yr.userAgent,mr=function(e,r){var t=(void 0===r?{}:r).debugEnabled,n={q(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;n>o;o++)i[o-1]=arguments[o];hr&&(hr.POSTHOG_DEBUG||t)&&!Oe(hr.console)&&hr.console&&("__rrweb_original__"in hr.console[r]?hr.console[r].__rrweb_original__:hr.console[r])(e,...i)},debug(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("debug",...r)},info(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("log",...r)},warn(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("warn",...r)},error(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("error",...r)},critical(){for(var r=arguments.length,t=new Array(r),n=0;r>n;n++)t[n]=arguments[n];console.error(e,...t)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(r,t)=>mr(e+" "+r,t)};return n},xr=mr("[PostHog.js]"),wr=xr.createLogger;function kr(e,r,t,n){var i=null!=n?n:{},o=i.capture,a=i.passive;null==e||e.addEventListener(r,t,{capture:void 0!==o&&o,passive:void 0===a||a})}function Sr(e){return"$survey_response_"+e}function Cr(e,r){if(!r)return null;var t=e[Sr(r)];return ze(t)?[...t]:t}function qr(r,t,n){void 0===r&&(r={});var i={};return t.questions.forEach(e=>{if(!Oe(e.originalQuestionIndex)){var t,n=0===(t=e.originalQuestionIndex)?"$survey_response":"$survey_response_"+t,o=Cr(r,e.id);Oe(o)||(i[n]=o)}}),e({$survey_questions:t.questions.map(e=>{var t,i;return{id:e.id,question:null!==(t=null==n?void 0:n[null!==(i=e.id)&&void 0!==i?i:""])&&void 0!==t?t:e.question,response:Cr(r,e.id)}})},r,i)}function _r(e,r){var t="$survey_"+r+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(t="$survey_"+r+"/"+e.id+"/"+e.current_iteration),t}function Tr(e){return"string"==typeof e&&e.trim()?e.trim():null}function Mr(e){return e.toLowerCase()}function Pr(e,r,t){if(!e||!r)return null;var n=Mr(r),i=Object.keys(e).find(e=>Mr(e)===n);if(i)return null==t||t.debug("Found exact translation match: "+i),i;if(n.includes("-")){var o=n.split("-")[0],a=Object.keys(e).find(e=>Mr(e)===o);if(a)return null==t||t.debug("Found base language translation match: "+a+" (from "+r+")"),a}return null}var Ir=["thankYouMessageHeader","thankYouMessageDescription","thankYouMessageCloseButtonText","introScreenHeader","introScreenDescription","introScreenButtonText","submitButtonText","backButtonText"];function Nr(r,t,n){var i,o=Pr(r.translations,t,n),a=e({},r),l=!1;if(o){var s,u=null==(s=r.translations)?void 0:s[o];if(u)if(null==n||n.info("Applying survey-level translation for language: "+o),Oe(u.name)||(a.name=u.name,l=!0),a.appearance){var c=e({},a.appearance);for(var d of Ir){var v=u[d];Oe(v)||(c[d]=v,l=!0)}a.appearance=c}else(function(e){return Ir.some(r=>!Oe(e[r]))})(u)&&(l=!0)}var p=r.questions.map(r=>function(r,t,n){var i,o=Pr(r.translations,t,n);if(!o)return{question:r,matchedKey:null,hasChanges:!1};var a=null==(i=r.translations)?void 0:i[o];if(!a)return{question:r,matchedKey:null,hasChanges:!1};var l=e({},r),s=!1;return Oe(a.question)||(l.question=a.question,s=!0),Oe(a.description)||(l.description=a.description,s=!0),Oe(a.buttonText)||(l.buttonText=a.buttonText,s=!0),"link"in l&&!Oe(a.link)&&(l.link=a.link,s=!0),"lowerBoundLabel"in l&&!Oe(a.lowerBoundLabel)&&(l.lowerBoundLabel=a.lowerBoundLabel,s=!0),"upperBoundLabel"in l&&!Oe(a.upperBoundLabel)&&(l.upperBoundLabel=a.upperBoundLabel,s=!0),"choices"in l&&function(e){return ze(e.choices)}(a)&&(l.choices=a.choices,s=!0),{question:s?l:r,matchedKey:s?o:null,hasChanges:s}}(r,t,n)),h=p.map(e=>e.question),f=p.some(e=>e.hasChanges),y=null;return o||(y=(null==(i=p.find(e=>e.matchedKey))?void 0:i.matchedKey)||null),f&&(a.questions=h,l=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:l?o||y:null}}function Lr(e){var r;return!(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)||!r.length)}var Hr=(e,r)=>{if(!(e=>{try{new RegExp(e)}catch(e){return!1}return!0})(r))return!1;try{return new RegExp(r).test(e)}catch(e){return!1}},Fr=e=>e.toLowerCase(),Vr={exact:(e,r)=>r.some(r=>e.some(e=>r===e)),is_not:(e,r)=>r.every(r=>e.every(e=>r!==e)),regex:(e,r)=>r.some(r=>e.some(e=>Hr(r,e))),not_regex:(e,r)=>r.every(r=>e.every(e=>!Hr(r,e))),icontains:(e,r)=>r.map(Fr).some(r=>e.map(Fr).some(e=>r.includes(e))),not_icontains:(e,r)=>r.map(Fr).every(r=>e.map(Fr).every(e=>!r.includes(e))),gt:(e,r)=>r.some(r=>{var t=parseFloat(r);return!isNaN(t)&&e.some(e=>t>parseFloat(e))}),lt:(e,r)=>r.some(r=>{var t=parseFloat(r);return!isNaN(t)&&e.some(e=>t<parseFloat(e))})},Er=wr("[Surveys]"),Zr=(e,r)=>""+e+function(e){return e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id}(r),Br=e=>Zr("seenSurvey_",e),Ar=e=>{try{var r=Br(e);if(localStorage.getItem(r))return;localStorage.setItem(r,"true")}catch(e){Er.error("Failed to persist survey seen state",e)}},Dr=[Ce,qe,"api"],jr="$surveys";Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ke(e)&&isFinite(e)&&Math.floor(e)===e});var Rr=class e{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(r,t,n,i){if(!Number.isInteger(r)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(i)||0>r||0>t||0>n||0>i||r>0xffffffffffff||t>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=r/Math.pow(2,40),o[1]=r/Math.pow(2,32),o[2]=r/Math.pow(2,24),o[3]=r/Math.pow(2,16),o[4]=r/256,o[5]=r,o[6]=112|t>>>8,o[7]=t,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)}toString(){for(var e="",r=0;this.bytes.length>r;r++)e=e+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new e(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;16>r;r++){var t=this.bytes[r]-e.bytes[r];if(0!==t)return Math.sign(t)}return 0}},Qr=class{generate(){var e=this.generateOrAbort();if(!Oe(e))return e;this.ri=0;var r=this.generateOrAbort();if(Oe(r))throw new Error("Could not generate UUID after timestamp reset");return r}generateOrAbort(){var e,r=(e=Date.now(),Ke(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0);if(r>this.ri)this.ri=r,this.ii();else{if(this.ri>=r+1e4)return;this.ni++,this.ni>4398046511103&&(this.ri++,this.ii())}return Rr.fromFieldsV7(this.ri,Math.trunc(this.ni/Math.pow(2,30)),this.ni&Math.pow(2,30)-1,this.oi.nextUint32())}ii(){this.ni=1024*this.oi.nextUint32()+(1023&this.oi.nextUint32())}constructor(){this.ri=0,this.ni=0,this.oi=new Or}},zr=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;e.length>r;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};hr&&!Oe(hr.crypto)&&crypto.getRandomValues&&(zr=e=>crypto.getRandomValues(e));var Ur,Or=class{nextUint32(){return this.De.length>this.ai||(zr(this.De),this.ai=0),this.De[this.ai++]}constructor(){this.De=new Uint32Array(8),this.ai=1/0}},$r=()=>Wr().toString(),Wr=()=>(Ur||(Ur=new Qr)).generate();var Gr=null,Kr={si(){if(!We(Gr))return Gr;var e=!0;if(Oe(hr))e=!1;else try{var r="__mplssupport__";Kr.ui(r,"xyz"),'"xyz"'!==Kr.li(r)&&(e=!1),Kr.hi(r)}catch(r){e=!1}return e||xr.error("localStorage unsupported; falling back to cookie store"),Gr=e,e},ci(e){xr.error("localStorage error: "+e)},li(e){try{return null==hr?void 0:hr.localStorage.getItem(e)}catch(e){Kr.ci(e)}return null},di(e){try{return JSON.parse(Kr.li(e))||{}}catch(e){}return null},ui(e,r){try{return null==hr||hr.localStorage.setItem(e,JSON.stringify(r)),!0}catch(e){Kr.ci(e)}return!1},hi(e){try{null==hr||hr.localStorage.removeItem(e)}catch(e){Kr.ci(e)}}},Yr=wr("[Stylesheet Loader]"),Jr=hr,Xr=gr,et="#020617",rt={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ke,widgetType:me,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:et,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},tt=[we,xe,ke];function nt(e){if(e.startsWith("#")){var r=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(r)&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]),/^[0-9A-Fa-f]{6}$/.test(r)?"rgb("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function it(e){var r;void 0===e&&(e=rt.backgroundColor),"#"===e[0]&&(r=nt(e)),e.startsWith("rgb")&&(r=e);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(t&&(r=nt(t)),!r)return et;var n=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?et:"white"}return et}var ot=(r,t,n)=>{var i=qt(r),o=Xr.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=Xr.createElement("div");((r,t,n)=>{var i=e({},rt,n),o=r.style,a=!tt.includes(i.position)||t===qe&&(null==n?void 0:n.widgetType)===me;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var r='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+r:"-apple-system, "+r}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||it(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",it(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||it(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",it(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var l=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),s=l||i.inputBackground;l||"white"!==i.backgroundColor||(s="#f8f8f8"),o.setProperty("--ph-survey-input-background",s);var u=(null==n?void 0:n.inputTextColor)||it(s);o.setProperty("--ph-survey-input-text-color",u),o.setProperty("--ph-survey-rating-text-color",u),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,r.type,r.appearance),a.className=i;var l=a.attachShadow({mode:"open"}),s=function(e){var r=((e,r,t)=>{var n=e.createElement("style");n.innerText=r;var i=(e=>{var r;return Ue(e)?e:null==e||null==(r=e.config)?void 0:r.prepare_external_dependency_stylesheet})(t);return i&&(n=i(n)),n||(Yr.error("prepare_external_dependency_stylesheet returned null"),null)})(Xr,':host{--ph-survey-font-family:-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:calc(2147480000 + 3645);--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px #00000026;--ph-survey-submit-button-color:black;--ph-survey-submit-button-text-color:white;--ph-survey-rating-bg-color:white;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:black;--ph-survey-rating-active-text-color:white;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:white;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:#3b82f6cc;--ph-survey-input-background:white;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:.6}.ph-survey{min-width:300px;width:var(--ph-survey-max-width);max-width:85%;z-index:var(--ph-survey-z-index);height:fit-content;margin:0;position:fixed;bottom:0}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;font-family:var(--ph-survey-font-family);color:var(--ph-survey-text-primary-color)}.ph-survey textarea,.ph-survey input[type=text],.ph-survey .multiple-choice-options label{color:var(--ph-survey-input-text-color);background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey textarea,.ph-survey input[type=text]{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey textarea:focus,.ph-survey textarea:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=radio]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus-visible{outline:1.5px solid var(--ph-survey-outline-color);border-color:var(--ph-survey-rating-active-bg-color);outline-offset:2px}.ph-survey textarea:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible){outline:none}.ph-survey textarea:hover:not(:focus),.ph-survey input[type=text]:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey textarea,.ph-survey input[type=text]{font-size:1rem}}.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey .form-cancel,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey label,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);color:var(--ph-widget-text-color);text-align:center;cursor:pointer;z-index:var(--ph-survey-z-index);border:none;border-radius:3px 3px 0 0;padding:10px 12px;transition:padding .2s ease-out;position:fixed}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{flex-direction:column;gap:16px;display:flex}.bottom-section{flex-direction:column;gap:8px;display:flex}.thank-you-message-header~.bottom-section,.intro-screen-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message,.intro-screen{flex-direction:column;gap:8px;display:flex}.survey-question{font-size:14px;font-weight:500}.survey-question-description{opacity:.8;padding-top:4px;font-size:13px}.survey-question-description,.thank-you-message-body,.intro-screen-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{max-width:100%;height:auto}.question-textarea-wrapper{flex-direction:column;display:flex}.survey-form{animation:.3s ease-out forwards ph-survey-fade-in}.survey-form,.thank-you-message,.intro-screen{text-align:left;width:100%;z-index:var(--ph-survey-z-index);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);background:var(--ph-survey-background-color);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);padding:var(--ph-survey-box-padding);margin:0;position:relative}.survey-form textarea,.survey-form input[type=text]{min-width:100%}.survey-form textarea:focus,.survey-form textarea:focus-visible{box-shadow:0 4px 12px #00000014}.survey-form textarea:focus:not(:focus-visible){box-shadow:none}.survey-box .question-header--empty~.multiple-choice-options,.survey-box .question-header--empty~textarea{margin-top:0}.multiple-choice-options{border:none;flex-direction:column;gap:8px;margin:0;padding:1px 0;font-size:14px;display:flex}.multiple-choice-options label,.multiple-choice-options .response-choice{color:inherit;align-items:center;gap:8px;display:flex}.multiple-choice-options label{cursor:pointer;font-size:13px}.multiple-choice-options label:hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px #00000014}.multiple-choice-options label:has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px #0000000d}.multiple-choice-options label.choice-option-open{flex-wrap:wrap}.multiple-choice-options label span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ph-survey-input-background);cursor:pointer;z-index:1;border-radius:3px;flex-shrink:0;width:1rem;height:1rem;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;position:relative}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;width:4px;height:8px;animation:.2s ease-out .1s forwards ph-survey-checkmark-reveal;left:4px;transform:rotate(45deg)scale(0)}.multiple-choice-options input[type=radio]:checked:after{background:var(--ph-survey-rating-active-text-color);border-radius:50%;width:6px;height:6px;animation:.15s ease-out 50ms forwards ph-survey-radio-reveal;top:5px;left:5px;transform:scale(0)}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{content:"";box-sizing:content-box;position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}.multiple-choice-options .choice-option-open input[type=text]::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{justify-content:space-between;display:flex}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{opacity:.5;background-color:#0000;border:none;padding:0;font-size:16px}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;grid-auto-columns:1fr;grid-auto-flow:column;display:grid;overflow:hidden}.rating-options-number .ratings-number{border-right:1px solid var(--ph-survey-border-color);text-align:center;cursor:pointer;color:var(--ph-survey-rating-text-color);border-top:none;border-bottom:none;border-left:none;font-weight:700}.rating-options-number .ratings-number:last-of-type{border-right:0}.rating-options-number .ratings-number.rating-active{background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb, var(--ph-survey-rating-active-bg-color) 14%, var(--ph-survey-rating-bg-color))}}.rating-text{opacity:.7;flex-direction:row;justify-content:space-between;font-size:11px;display:flex}.form-buttons{flex-direction:row;gap:8px;width:100%;display:flex}.form-buttons-with-back>.form-submit{flex:auto;min-width:0}.form-submit{text-align:center;cursor:pointer;user-select:none;background:var(--ph-survey-submit-button-color);color:var(--ph-survey-submit-button-text-color);border:none;border-radius:6px;min-width:100%;padding:12px;font-weight:700;box-shadow:0 2px #0000000b}.form-submit:not([disabled]):hover{transform:scale(1.02);box-shadow:0 4px 8px #0000001a}.form-submit:not([disabled]):active{transform:scale(.98);box-shadow:0 1px 2px #0000000d}.form-submit[disabled]{opacity:var(--ph-survey-disabled-button-opacity);cursor:not-allowed}.form-back{text-align:center;cursor:pointer;user-select:none;color:var(--ph-survey-text-primary-color);border:1.5px solid var(--ph-survey-border-color);background:0 0;border-radius:6px;flex:none;padding:12px 16px;font-weight:600}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{opacity:.7;margin-top:4px;font-size:12px}.form-cancel{cursor:pointer;background:#fff;border-radius:100%;padding:12px;line-height:0;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%)scale(1.1)}.footer-branding{opacity:.6;justify-content:center;align-items:center;gap:4px;font-size:11px;font-weight:500;text-decoration:none;display:flex}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{opacity:.8;font-size:14px}.intro-screen{text-align:center;animation:.3s ease-out forwards ph-survey-fade-in}.intro-screen-header{margin:10px 0 0}.intro-screen-body{opacity:.8;font-size:14px}.limit-height{scrollbar-width:thin;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);max-height:256px;overflow:hidden auto}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb:hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.ph-survey *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg)scale(0)}50%{opacity:1;transform:rotate(45deg)scale(1.2)}to{opacity:1;transform:rotate(45deg)scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==r||r.setAttribute("data-ph-survey-style","true"),r}(t);if(s){var u=l.querySelector("style");u&&l.removeChild(u),l.appendChild(s)}return(n||Xr.body).appendChild(a),{shadow:l,isNewlyCreated:!0}},at=r=>{var t=r.responses,n=r.survey,i=r.surveySubmissionId,o=r.posthog,a=r.isSurveyCompleted,l=r.properties,s=r.surveyLanguage,u=r.questionSnapshots;o?(Ar(n),o.capture("survey sent",e({[Fe]:n.name,[He]:n.id,[Ve]:n.current_iteration,[Ee]:n.current_iteration_start_date,[Be]:i,[Ae]:a},s&&{[De]:s},{sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},qr(t,n,u),l,{$set:{[_r(n,"responded")]:!0}})),a&&(Jr.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),Ct(n),o.reloadFeatureFlags())):Er.error("[survey sent] event not captured, PostHog instance not found.")},lt=(r,t,n)=>{return e({[Fe]:r.name,[He]:r.id,[Ve]:r.current_iteration,[Ee]:r.current_iteration_start_date,[Ze]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some(e=>!Ge(e)))},(null==t?void 0:t.surveyLanguage)&&{[De]:t.surveyLanguage},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url(),[Be]:null==t?void 0:t.surveySubmissionId},qr(null==t?void 0:t.responses,r,null==t?void 0:t.questionSnapshots));var i},st=(r,t,n,i)=>{if(t){if(!n){var o=kt(r),a=o?o.surveyLanguage:i;t.capture("survey dismissed",e({},lt(r,o,t),a&&{[De]:a},{$set:{[_r(r,"dismissed")]:!0}})),Ct(r),Ar(r),Jr.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:r.id}}))}}else Er.error("[survey dismissed] event not captured, PostHog instance not found.")},ut=(e,r)=>{if(r){var t=(e=>Zr("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(t))return}catch(e){return}var n=kt(e);if(n){try{localStorage.setItem(t,"true")}catch(e){}r.capture("survey abandoned",lt(e,n,r),{transport:"sendBeacon"})}}else Er.error("[survey abandoned] event not captured, PostHog instance not found.")},ct=e=>e.map(e=>({sort:Math.floor(10*Math.random()),value:e})).sort((e,r)=>e.sort-r.sort).map(e=>e.value),dt=(e,r)=>e.length===r.length&&e.every((e,t)=>e===r[t])?r.reverse():r,vt=e=>{var r=e.map(e=>e.id);return r.every(e=>!!e)?r:void 0},pt=(e,r)=>{var t;return(e=>e.questions.some(e=>{var r;return!(null==(r=e.branching)||!r.type)}))(e)?e.questions:r?null!==(t=((e,r)=>{if(!r||r.length!==e.questions.length)return null;var t=new Map(e.questions.map(e=>[e.id,e])),n=[];for(var i of r){var o=t.get(i);if(!o)return null;n.push(o)}return n})(e,r.questionOrder))&&void 0!==t?t:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?dt(e.questions,ct(e.questions)):e.questions},ht=e=>function(e){var r;return Lr(e)&&!(null==(r=e.conditions)||null==(r=r.events)||!r.repeatedActivation)||"always"===e.schedule}(e)||St(e),ft=function(e){function r(e){var t,n;return this.getChildContext||(t=new Set,(n={})[r.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,L(e)})},this.sub=function(e){t.add(e);var r=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),r&&r.call(e)}}),e.children}return r.__c="__cC"+f++,r.__=e,r.Provider=r.__l=(r.Consumer=function(e,r){return e.children(r)}).contextType=r,r}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),yt=()=>de(ft),gt=e=>{var t=e.children,n=e.style;return function(e,t,n){var i,o,a,l,s=C({},e.props);for(a in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=void 0===t[a]&&null!=l?l[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),T(e.type,s,i||e.key,o||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:n}:{children:t,style:n})};function bt(e,r){var t,n;if(null==(t=e.conditions)||!t.url)return!0;var i,o,a,l,s=(o=r,l=null==hr||null==(a=hr.location)?void 0:a.href,Oe(l)?void 0:function(e,r){var t,n=null==e||null==(t=e.config)?void 0:t.get_current_url;if(!Ue(n))return r;try{var i=n(r);return $e(i)&&i?i:r}catch(e){return xr.error("Error in get_current_url, falling back to window.location.href",e),r}}(o,l));return!!s&&Vr[i=null==(n=e.conditions)?void 0:n.urlMatchType,null!=i?i:"icontains"]([e.conditions.url],[s])}function mt(e){var r,t;return function(e,r){var t,n,i;if(!e||0===e.length)return!0;if(!br)return!1;var o,a,l,s,u,c,d=(o={userAgentDataPlatform:null==yr||null==(t=yr.userAgentData)?void 0:t.platform,maxTouchPoints:null==yr?void 0:yr.maxTouchPoints,screenWidth:null==hr||null==(n=hr.screen)?void 0:n.width,screenHeight:null==hr||null==(i=hr.screen)?void 0:i.height,devicePixelRatio:null==hr?void 0:hr.devicePixelRatio},(c=function(e){return dr.test(e)?tr:cr.test(e)?nr:ur.test(e)?ir:new RegExp(ar,"i").test(e)?ar:new RegExp("(Windows Phone|WPDesktop)","i").test(e)?"Windows Phone":/iPad/.test(e)?er:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?rr:vr.test(e)?"BlackBerry":/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(or,"i").test(e)?or:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Ye).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?"Android":Xe:new RegExp("(pda|Mobile)","i").test(e)?lr:new RegExp(Je,"i").test(e)&&!new RegExp("Tablet pc","i").test(e)?sr:""}(br))===er||c===Xe||"Kobo"===c||"Kindle Fire"===c||c===sr?Je:c===tr||c===ir||c===nr||c===ar?"Console":c===rr?"Wearable":c?Ye:"Android"===(null==o?void 0:o.userAgentDataPlatform)&&(null!==(a=null==o?void 0:o.maxTouchPoints)&&void 0!==a?a:0)>0?600>Math.min(null!==(l=null==o?void 0:o.screenWidth)&&void 0!==l?l:0,null!==(s=null==o?void 0:o.screenHeight)&&void 0!==s?s:0)/(null!==(u=null==o?void 0:o.devicePixelRatio)&&void 0!==u?u:1)?Ye:Je:"Desktop");return Vr[null!=r?r:"icontains"](e,[d])}(null==(r=e.conditions)?void 0:r.deviceTypes,null==(t=e.conditions)?void 0:t.deviceTypesMatchType)}var xt=e=>Zr("inProgressSurvey_",e),wt=(e,r)=>{try{localStorage.setItem(xt(e),JSON.stringify(r))}catch(e){Er.error("Error setting in-progress survey state in localStorage",e)}},kt=e=>{try{var r=localStorage.getItem(xt(e));if(r)return JSON.parse(r)}catch(e){Er.error("Error getting in-progress survey state from localStorage",e)}return null},St=e=>{var r=kt(e);return!Ge(null==r?void 0:r.surveySubmissionId)},Ct=e=>{try{localStorage.removeItem(xt(e))}catch(e){Er.error("Error clearing in-progress survey state from localStorage",e)}};function qt(e,r){void 0===r&&(r=!1);var t="PostHogSurvey-"+e.id;return r?"."+t:t}function _t(e,r,t){if(void 0===r&&(r=ke),e===_e)return{};switch(r){case"top_left":return{top:"0",left:"0",transform:"translate(30px, 30px)"};case"top_right":return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case"top_center":return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case"middle_left":return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case"middle_right":return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case"middle_center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case xe:return{left:"30px"};case we:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===qe&&t===me?"60px":"30px"}}}var Tt=0;function Mt(e,r,n,i,o,a){r||(r={});var l,s,u=r;if("ref"in u)for(s in u={},r)"ref"==s?l=r[s]:u[s]=r[s];var c={type:e,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Tt,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return t.vnode&&t.vnode(c),c}var Pt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),It=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Nt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Lt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ht=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ft=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Mt("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Vt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Mt("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Et=Mt("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mt("g",{"clip-path":"url(#clip0_2415_6911)",children:[Mt("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Mt("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Mt("g",{mask:"url(#mask0_2415_6911)",children:[Mt("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Mt("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Mt("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Mt("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Mt("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Mt("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Mt("defs",{children:Mt("clipPath",{id:"clip0_2415_6911",children:Mt("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Zt(e){var r=e.urlParams,t=r?Object.entries(r).map(e=>{var r=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(r)}).join("&"):"";return Mt("a",{href:"https://posthog.com/surveys"+(t?"?"+t:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Et]})}function Bt(e){var r=e.text,t=e.submitDisabled,n=e.appearance,i=e.onSubmit,o=e.link,a=e.onPreviewSubmit,l=e.skipSubmitButton,s=e.canGoBack,u=e.onBack,c=de(ft).isPreviewMode,d=!!s&&!!u,v=!l&&Mt("button",{className:"form-submit",disabled:t,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==hr||hr.open(o)),c?null==a||a():i()},children:r});return Mt("div",{className:"bottom-section",children:[d?Mt("div",{className:"form-buttons form-buttons-with-back",children:[Mt("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:u,children:n.backButtonText||"Back"}),v]}):v,!n.whiteLabel&&Mt(Zt,{urlParams:{utm_source:"survey-footer"}})]})}function At(e){var r=e.question,t=e.forceDisableHtml;return Mt("div",{class:r.question||r.description?"question-header":"question-header question-header--empty",children:[Mt(r.type===Te?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:r.question}),r.description&>({component:_("p",{className:"survey-question-description"}),children:r.description,renderAsHtml:!t&&"text"!==r.descriptionContentType})]})}function Dt(e){var r,t,n;return Mt("button",{className:"form-cancel",onClick:e.onClick,disabled:de(ft).isPreviewMode,"aria-label":"Close survey",type:"button",children:(r={fill:"black"},t=(void 0===r?{}:r).fill,n=void 0===t?"currentColor":t,Mt("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:n,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Mt("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Mt("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:n})]}))})}var jt=hr;function Rt(e){var r=e.header,t=e.description,n=e.contentType,i=e.forceDisableHtml,o=e.appearance,a=e.onClose,l=de(ft).isPopup;return se(()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return kr(jt,"keydown",e),()=>{jt.removeEventListener("keydown",e)}},[a]),Mt("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[l&&!0!==o.hideCancelButton&&Mt(Dt,{onClick:()=>a()}),Mt("h3",{className:"thank-you-message-header",children:r}),t&>({component:_("p",{className:"thank-you-message-body"}),children:t,renderAsHtml:!i&&"text"!==n}),l&&Mt(Bt,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}function Qt(e){var r=e.header,t=e.description,n=e.contentType,i=e.forceDisableHtml,o=e.appearance,a=e.onStart,l=de(ft),s=l.onPreviewSubmit,u=l.onPopupSurveyDismissed;return Mt("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[l.isPopup&&!0!==o.hideCancelButton&&Mt(Dt,{onClick:()=>u()}),r&&Mt("h3",{className:"intro-screen-header",children:r}),t&>({component:_("p",{className:"intro-screen-body"}),children:t,renderAsHtml:!i&&"text"!==n}),Mt(Bt,{text:o.introScreenButtonText||"Get started",submitDisabled:!1,appearance:o,onSubmit:a,onPreviewSubmit:()=>s(null)})]})}var zt=e=>ze(e)&&e.every(e=>$e(e));function Ut(e){var r=e.question,t=e.forceDisableHtml,n=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,a=e.displayQuestionIndex,l=e.initialValue,s=e.canGoBack,u=e.onBack,c=yt().isPreviewMode,d=ue(null),v=le(()=>$e(l)?l:""),p=v[0],h=v[1],f=null==n?void 0:n.disableAutofocus;se(()=>{f||setTimeout(()=>{var e;c||null==(e=d.current)||e.focus()},100)},[c,f]);var y="surveyQuestion"+a,g=ce(()=>function(e,r,t){var n,i,o=e.trim();if(!t&&""===o)return"This field is required";if(""===o)return!1;if(r&&r.length>0)for(var a of r)switch(a.type){case je:if(void 0!==a.value&&a.value>o.length)return null!==(n=a.errorMessage)&&void 0!==n?n:"Please enter at least "+a.value+" characters";break;case Re:if(void 0!==a.value&&o.length>a.value)return null!==(i=a.errorMessage)&&void 0!==i?i:"Please enter no more than "+a.value+" characters"}return!1}(p,r.validation,r.optional),[p,r.validation,r.optional]),b=pr(r.validation,je),m=pr(r.validation,Re),x=ce(()=>function(e,r){var t=1===e?void 0:e;return t&&r?"Enter "+t+"-"+r+" characters":t?"Enter at least "+t+" "+(1===t?"character":"characters"):r?"Maximum "+r+" "+(1===r?"character":"characters"):void 0}(b,m),[b,m]),w=()=>{g||i(p.trim())},k=()=>{g||o(p.trim())};return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:r,forceDisableHtml:t,htmlFor:y}),Mt("textarea",{ref:d,id:y,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:b,maxLength:m,onInput(e){h(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||g||(e.preventDefault(),c?k():w())},value:p}),x&&Mt("div",{className:"validation-hint",children:x})]}),Mt(Bt,{text:r.buttonText||"Submit",submitDisabled:!!g,appearance:n,onSubmit:w,onPreviewSubmit:k,canGoBack:s,onBack:u})]})}function Ot(e){var r=e.question,t=e.appearance,n=e.onSubmit,i=e.onPreviewSubmit,o=e.canGoBack,a=e.onBack;return Mt(M,{children:[Mt("div",{className:"question-container",children:Mt(At,{question:r,forceDisableHtml:e.forceDisableHtml})}),Mt(Bt,{text:r.buttonText||"Submit",submitDisabled:!1,link:r.link,appearance:t,onSubmit:()=>n("link clicked"),onPreviewSubmit:()=>i("link clicked"),canGoBack:o,onBack:a})]})}function $t(e){var r,t=e.question,n=e.forceDisableHtml,i=e.displayQuestionIndex,o=e.appearance,a=e.onSubmit,l=e.onPreviewSubmit,s=e.initialValue,u=e.canGoBack,c=e.onBack,d=t.scale,v=10===t.scale?0:1,p=le(()=>Ke(s)?s:ze(s)&&s.length>0&&Ke(parseInt(s[0]))?parseInt(s[0]):$e(s)&&Ke(parseInt(s))?parseInt(s):null),h=p[0],f=p[1],y="emoji"===t.display&&2===t.scale,g=yt().isPreviewMode,b=e=>g?l(e):a(e);return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:t,forceDisableHtml:n}),Mt("div",{className:"rating-section",children:[Mt("div",{className:"rating-options",children:["emoji"===t.display&&Mt("div",{className:"rating-options-emoji"+(y?" rating-options-emoji-2":""),children:null==(r=Xt[t.scale])?void 0:r.map((e,r)=>Mt("button",{"aria-label":"Rate "+(r+1),className:"ratings-emoji question-"+i+"-rating-"+r+" "+(r+1===h?"rating-active":""),value:r+1,type:"button",onClick(){var e=r+1;f(e),t.skipSubmitButton&&b(e)},children:e},r))}),"number"===t.display&&Mt("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(d-v+1)+", minmax(0, 1fr))"},children:en(t.scale).map((e,r)=>Mt(Wt,{displayQuestionIndex:i,active:h===e,appearance:o,num:e,setActiveNumber(e){f(e),t.skipSubmitButton&&b(e)}},r))})]}),!y&&Mt("div",{className:"rating-text",children:[Mt("div",{children:t.lowerBoundLabel}),Mt("div",{children:t.upperBoundLabel})]})]})]}),Mt(Bt,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:We(h)&&!t.optional,appearance:o,onSubmit:()=>a(h),onPreviewSubmit:()=>l(h),skipSubmitButton:t.skipSubmitButton,canGoBack:u,onBack:c})]})}function Wt(e){var r=e.num,t=e.setActiveNumber;return Mt("button",{"aria-label":"Rate "+r,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+r+" "+(e.active?"rating-active":""),type:"button",onClick(){t(r)},children:r})}function Gt(r){var t=r.question,n=r.forceDisableHtml,i=r.displayQuestionIndex,o=r.appearance,a=r.onSubmit,l=r.onPreviewSubmit,s=r.initialValue,u=r.canGoBack,c=r.onBack,d=ue(null),v=ce(()=>(e=>{if(!e.shuffleOptions)return e.choices;var r=e.choices,t="";e.hasOpenChoice&&(t=r.pop());var n=dt(r,ct(r));return e.hasOpenChoice&&(e.choices.push(t),n.push(t)),n})(t),[t]),p=le(()=>((e,r)=>$e(e)||zt(e)?e:r===Pe?null:[])(s,t.type)),h=p[0],f=p[1],y=le(()=>((e,r)=>{if($e(e)&&!r.includes(e))return{isSelected:!0,inputValue:e};if(zt(e)){var t=e.find(e=>!r.includes(e));if(t)return{isSelected:!0,inputValue:t}}return{isSelected:!1,inputValue:""}})(s,v)),g=y[0],b=y[1],m=yt().isPreviewMode,x=t.type===Pe,w=t.type===Me,k=t.skipSubmitButton&&x&&!t.hasOpenChoice,S=(r,t)=>{if(t){var n=!g.isSelected;return b(r=>e({},r,{isSelected:n,inputValue:n?r.inputValue:""})),x&&f(""),void(n&&setTimeout(()=>{var e;return null==(e=d.current)?void 0:e.focus()},75))}if(x)return f(r),b(r=>e({},r,{isSelected:!1,inputValue:""})),void(k&&(a(r),m&&l(r)));w&&ze(h)&&(h.includes(r)?f(h.filter(e=>e!==r)):f([...h,r]))},C=r=>{r.stopPropagation();var t=r.currentTarget.value;b(r=>e({},r,{inputValue:t})),x&&f(t)},q=r=>{r.stopPropagation(),"Enter"!==r.key||_()||(r.preventDefault(),T()),"Escape"===r.key&&(r.preventDefault(),b(r=>e({},r,{isSelected:!1,inputValue:""})),x&&f(null))},_=()=>!(t.optional||!We(h)&&(!ze(h)||g.isSelected||0!==h.length)&&(!g.isSelected||""!==g.inputValue.trim())),T=()=>{g.isSelected&&w?ze(h)&&(m?l([...h,g.inputValue]):a([...h,g.inputValue])):m?l(h):a(h)};return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:t,forceDisableHtml:n}),Mt("fieldset",{className:"multiple-choice-options limit-height",children:[Mt("legend",{className:"sr-only",children:w?" Select all that apply":" Select one"}),v.map((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",l=n?g.isSelected:x?h===e:ze(h)&&h.includes(e);return Mt("label",{className:n?"choice-option-open":"",children:[Mt("div",{className:"response-choice",children:[Mt("input",{type:x?"radio":"checkbox",name:o,checked:l,onChange:()=>S(e,n),id:o,"aria-controls":a}),Mt("span",{children:n?e+":":e})]}),n&&Mt("input",{type:"text",ref:d,id:a,name:"question"+i+"Open",value:g.inputValue,onKeyDown:q,onInput:C,onClick(r){g.isSelected||S(e,!0),r.stopPropagation()},"aria-label":e+" - please specify"})]},r)})]})]}),Mt(Bt,{text:t.buttonText||"Submit",submitDisabled:_(),appearance:o,onSubmit:T,onPreviewSubmit:T,skipSubmitButton:k,canGoBack:u,onBack:c})]})}var Kt=[1,2,3,4,5],Yt=[1,2,3,4,5,6,7],Jt=[0,1,2,3,4,5,6,7,8,9,10],Xt={2:[Ft,Vt],3:[Nt,It,Pt],5:[Lt,Nt,It,Pt,Ht]};function en(e){switch(e){case 5:default:return Kt;case 7:return Yt;case 10:return Jt}}var rn=wr("[Surveys]");function tn(e,r,t){var n,i=e.questions[r],o=r+1;if(null==(n=i.branching)||!n.type)return r===e.questions.length-1?Ne:o;if(i.branching.type===Ne)return Ne;if("specific_question"===i.branching.type){if(Number.isInteger(i.branching.index))return i.branching.index}else if("response_based"===i.branching.type){if(i.type===Pe){var a,l=i.choices.indexOf(""+t);if(-1===l&&i.hasOpenChoice&&(l=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(l)){var s=i.branching.responseValues[l];return Number.isInteger(s)?s:s===Ne?Ne:o}}else if(i.type===Ie){var u;if("number"!=typeof t||!Number.isInteger(t))throw new Error("The response type must be an integer");var c=function(e,r){if(2===r){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===r){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===r){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===r){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===r){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(t,i.scale);if(null!=(u=i.branching)&&null!=(u=u.responseValues)&&u.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===Ne?Ne:o}}return o}return rn.warn("Falling back to next question index due to unexpected branching type"),o}var nn=wr("[SurveyTranslations]");function on(e,r){var t=function(e){return function(e,r){var t=e.storedPersonProperties,n=e.locale,i=Tr(e.overrideLanguage);if(i)return null==r||r.info("Using override display language: "+i),i;var o=function(e){return e&&"object"==typeof e&&"language"in e?Tr(e.language):null}(t);if(o)return null==r||r.info("Using person property language: "+o),o;var a=Tr(n);return a?(null==r||r.info("Using detected locale: "+a),a):(null==r||r.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:Ue(e.get_property)?e.get_property("$stored_person_properties"):void 0,locale:navigator.language||navigator.userLanguage},nn)}(r);if(!t)return nn.info("No user language detected"),{survey:e,language:null};var n=Nr(e,t,nn);return{survey:n.survey,language:n.matchedKey}}var an=hr,ln=gr,sn="ph:show_survey_widget",un="PHWidgetSurveyClickListener";function cn(e,r){try{var t=e.getBoundingClientRect(),n=an.innerHeight,i=an.innerWidth,o=t.left+t.width/2-r/2;o+r>i-20&&(o=i-r-20),20>o&&(o=20);var a=n-t.bottom,l=250>a&&t.top>a;return{position:"fixed",top:l?"auto":t.bottom+12+"px",left:o+"px",right:"auto",bottom:l?n-t.top+12+"px":"auto",zIndex:rt.zIndex}}catch(e){return Er.warn("Failed to calculate trigger position:",e),null}}var dn=class{constructor(r){var t=this;this.fi=new Map,this.pi=new Map,this.gi=new Map,this.mi=new Set,this.yi=null,this.bi=!1,this.wi=null,this.ki=null,this.Si=null,this.handlePageUnload=()=>{var e=this._posthog.get_property(jr);if(e)for(var r of e)St(r)&&ut(r,this._posthog)},this.handlePopoverSurvey=function(r,n,i){var o,a,l,s,u,c=(void 0===i?{}:i).resumeDelayFromActivation,d=void 0!==c&&c,v=t.xi(r),p=v.survey,h=v.language;t.yi=h,t.Si=null,t.Ci=n;var f=t.Mi(p,n);t.Ti(f.id);var y=null!=n?n:{},g=y.properties,b=y.initialResponses,m=!(!b||0>=Object.keys(b).length)&&t.Ii(f,b,g,h);if(!m||null!=(o=f.appearance)&&o.displayThankYouMessage){t.Ri(f);var x={};if((null==(a=f.appearance)?void 0:a.position)===Se&&null!=(l=f.appearance)&&l.widgetSelector){var w,k=ln.querySelector(f.appearance.widgetSelector);k&&(x=cn(k,parseInt((null==(w=f.appearance)?void 0:w.maxWidth)||rt.maxWidth))||{})}var S=(null==(s=f.appearance)?void 0:s.surveyPopupDelaySeconds)||0,C=ot(f,t._posthog).shadow;t.gi.set(C,C.host);var q={posthog:t._posthog,survey:f,removeSurveyFromFocus:t.Ai,properties:g,style:x,isSurveyCompleted:m,skipShownEvent:null==n?void 0:n.skipShownEvent,surveyLanguage:h};if(t.Si=q,0>=S)return t.bi=!0,K(Mt(yn,e({},q)),C);var _=()=>{if(!t.Ei(f))return Er.info("Survey "+f.id+" no longer eligible when its display delay elapsed; not displaying"),t.Ai(f);(()=>{t.bi=!0;var i=t.xi(r),o=i.survey,a=i.language;t.yi=a;var l=t.Mi(o,n),s=e({},q,{survey:l,surveyLanguage:a});t.Si=s,K(Mt(yn,e({},s,{survey:e({},l,{appearance:e({},l.appearance,{surveyPopupDelaySeconds:0})})})),C)})()},T=d?null==(u=t._posthog.surveys)||null==(u=u._surveyEventReceiver)||null==u.getActivationTimestamp?void 0:u.getActivationTimestamp(f.id):void 0,M=Ke(T)?Math.max(0,Date.now()-T):0,P=Math.max(0,1e3*S-M);if(0>=P)return _();var I=an.setTimeout(()=>{t.fi.delete(f.id),_()},P);t.fi.set(f.id,I)}},this.Li=e=>{var r=this.xi(e),t=r.survey,n=r.language,i=ot(t,this._posthog),o=i.shadow,a=i.isNewlyCreated;this.gi.set(o,o.host),a&&K(Mt(bn,{posthog:this._posthog,survey:t,surveyLanguage:n},e.id),o)},this.Oi=e=>{var r=this.pi.get(e);r&&(r.element.removeEventListener("click",r.listener),r.element.removeAttribute(un),this.pi.delete(e),Er.info("Removed click listener for survey "+e))},this.Pi=e=>{this.Di(e)||(this.Fi(e),this.Oi(e.id))},this.Di=e=>{try{var r;return!(null==(r=ln.querySelector(qt(e,!0)))||null==(r=r.shadowRoot)||!r.querySelector(".ph-survey"))}catch(e){return!1}},this.Ni=(e,r)=>{var t=ln.querySelector(r),n=this.pi.get(e.id);if(t){if(this.Li(e),n){if(t===n.element)return;Er.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Oi(e.id)}if(!t.hasAttribute(un)){var i=r=>{var t,n;r.stopPropagation();var i=(null==(t=e.appearance)?void 0:t.position)===Se?cn(r.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||rt.maxWidth)):{};an.dispatchEvent(new CustomEvent(sn,{detail:{surveyId:e.id,position:i}}))};kr(t,"click",i),t.setAttribute(un,"true"),this.pi.set(e.id,{element:t,listener:i,survey:e}),Er.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.Pi(e)},this.renderPopover=e=>{var r=this.xi(e),t=r.survey,n=r.language,i=ot(t,this._posthog).shadow;this.gi.set(i,i.host),K(Mt(yn,{posthog:this._posthog,survey:t,removeSurveyFromFocus:this.Ai,surveyLanguage:n}),i)},this.renderSurvey=(e,r,t)=>{var n,i=this.xi(e),o=i.survey,a=i.language,l=!1;null!=(n=this._posthog.config)&&null!=(n=n.surveys)&&n.prefillFromUrl&&(l=this.qi(o,a,t)),K(Mt(yn,{posthog:this._posthog,survey:o,removeSurveyFromFocus:this.Ai,isPopup:!1,properties:t,isSurveyCompleted:l,surveyLanguage:a}),r)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||null==(n=n.surveys)||n.getSurveys(r=>{e(r.filter(e=>t.Ei(e)))},r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys(e=>{var r=e.filter(e=>e.type===Ce||e.type===qe),n=new Set(r.map(e=>e.id));for(var i of Array.from(t.fi.keys()))n.has(i)||t.cancelSurvey(i);var o=t.ji(r),a=new Set;o.forEach(e=>{if(e.type===qe){var r,n,i,o;if((null==(r=e.appearance)?void 0:r.widgetType)===me)return void t.Li(e);"selector"===(null==(n=e.appearance)?void 0:n.widgetType)&&null!=(i=e.appearance)&&i.widgetSelector&&(a.add(e.id),t.Ni(e,null==(o=e.appearance)?void 0:o.widgetSelector))}We(t.Bi)&&e.type===Ce&&t.handlePopoverSurvey(e,void 0,{resumeDelayFromActivation:!0})}),t.pi.forEach(e=>{var r=e.survey;a.has(r.id)||t.Pi(r)})},e)},this.Ri=e=>{We(this.Bi)||Er.error("Survey "+this.Bi+" already in focus. Cannot add survey "+e.id+"."),this.Bi=e.id},this.Ai=e=>{this.Bi!==e.id&&Er.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.Ti(e.id),this.Bi=null,this.yi=null,this.bi=!1,this.Si=null,this.Ci=void 0,this.Fi(e)},this._posthog=r,this.Bi=null,this.wi=()=>this.Hi(),kr(an,"languagechange",this.wi),this.ki=r.onFeatureFlags(()=>this.Hi())}Hi(){var r;if(!We(this.Bi)){var t=null==(r=this._posthog.get_property(jr))?void 0:r.find(e=>e.id===this.Bi);if(t){var n=this.xi(t),i=n.survey,o=n.language;if(o!==this.yi&&(this.yi=o,this.bi)){var a=this.Mi(i,this.Ci),l=ot(a,this._posthog).shadow;K(Mt(yn,e({},this.Si,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.Ai,surveyLanguage:o})),l)}}}}get $i(){var e,r,t;return null!==(e=null==(r=(t=this._posthog).getExtension)?void 0:r.call(t,"featureFlags"))&&void 0!==e?e:this._posthog.featureFlags}Mi(r,t){return null!=t&&t.position||null!=t&&t.selector?e({},r,{appearance:e({},r.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):r}Ti(e){var r=this.fi.get(e);r&&(clearTimeout(r),this.fi.delete(e))}cancelSurvey(e){this.fi.has(e)&&(Er.info("Cancelled pending survey "+e),this.Ti(e),this.Bi===e&&(this.Bi=null,this.yi=null,this.bi=!1,this.Si=null,this.Ci=void 0))}setAutomaticDisplayDispose(e){this.Ui=e}dispose(){var e;null==(e=this.Ui)||e.call(this),this.Ui=void 0,this.wi&&(an.removeEventListener("languagechange",this.wi),this.wi=null),this.ki&&(this.ki(),this.ki=null),this.fi.forEach((e,r)=>this.Ti(r)),this.pi.forEach((e,r)=>this.Oi(r)),this.gi.forEach((e,r)=>{K(null,r),null==e||e.remove()}),this.gi.clear(),this.Bi=null}ji(e){return e.sort((e,r)=>{var t,n,i=St(e),o=St(r);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===Le,l=r.schedule===Le;return a&&!l?1:!a&&l?-1:((null==(t=e.appearance)?void 0:t.surveyPopupDelaySeconds)||0)-((null==(n=r.appearance)?void 0:n.surveyPopupDelaySeconds)||0)})}xi(e){return on(e,this._posthog)}qi(e,r,t){if(this.mi.has(e.id))return!1;var n=function(e){var r={},t=!1,n=e.replace(/^\?/,"");if(!n)return{params:r,autoSubmit:t};for(var i of n.split("&")){var o=i.split("="),a=o[0],l=o[1];if(a&&!Oe(l)){var s=decodeURIComponent(a),u=decodeURIComponent(l);if("auto_submit"!==s||"true"!==u){var c=s.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);r[d]||(r[d]=[]),r[d].push(u)}}else t=!0}}return{params:r,autoSubmit:t}}(an.location.search).params;if(0===Object.keys(n).length)return!1;Er.info("[Survey Prefill] Detected URL prefill parameters");var i=this.zi(e,n,r);return!!i&&(this.Wi(e,i,t,r),this.mi.add(e.id),i.isSurveyCompleted)}Wi(e,r,t,n){var i=r.responses,o=r.submissionId,a=r.isSurveyCompleted,l=r.skippedResponses;(Object.keys(l).length>0&&e.enable_partial_responses||a)&&at({responses:a?i:l,survey:e,surveySubmissionId:o,posthog:this._posthog,isSurveyCompleted:a,properties:t,surveyLanguage:n})}Ii(e,r,t,n){var i={};for(var o of Object.entries(r)){var a=o[1];i[parseInt(o[0])]=ze(a)?a.map(String):[String(a)]}Er.info("[Survey] Processing initial responses");var l=this.zi(e,i,n);return!!l&&(this.Wi(e,l,t,n),l.isSurveyCompleted)}zi(e,r,t){try{var n=function(e,r){var t={};return e.questions.forEach((e,n)=>{if(r[n]&&e.id){var i=r[n],o=Sr(e.id);try{switch(e.type){case Pe:if(!e.choices||0===e.choices.length)return void xr.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||0>a||a>=e.choices.length)return void xr.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);t[o]=e.choices[a];break;case Me:if(!e.choices||0===e.choices.length)return void xr.warn("[Survey Prefill] Question "+n+" has no choices");var l=i.map(e=>parseInt(e,10)).filter(r=>!isNaN(r)&&r>=0&&e.choices.length>r);if(0===l.length)return void xr.warn("[Survey Prefill] No valid choices for q"+n);var s=[...new Set(l.map(r=>e.choices[r]))];l.length>s.length&&xr.warn("[Survey Prefill] Removed duplicate choices for q"+n),t[o]=s;break;case Ie:var u=parseInt(i[0],10),c=e.scale||10;if(isNaN(u)||0>u||u>c)return void xr.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");t[o]=u;break;default:xr.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){xr.error("[Survey Prefill] Error converting q"+n+":",e)}}}),t}(e,r);if(0===Object.keys(n).length)return Er.warn("[Survey Prefill] No valid responses after conversion"),null;var i=$r(),o=function(e,r,t){for(var n=0,i={},o=[],a=e.questions.length+1,l=0;e.questions.length>n&&a>l&&(l++,r.includes(n));){var s=e.questions[n];if(!s||!("skipSubmitButton"in s)||!s.skipSubmitButton)break;if(s.id){var u=Sr(s.id);Oe(t[u])||(i[u]=t[u])}o.push(n);var c=tn(e,n,s.id?t[Sr(s.id)]:null);if(c===Ne)return{startQuestionIndex:e.questions.length,skippedResponses:i,skippedIndices:o};n=c}return{startQuestionIndex:n,skippedResponses:i,skippedIndices:o}}(e,Object.keys(r).map(e=>parseInt(e,10)),n),a=o.startQuestionIndex,l=o.skippedResponses,s=o.skippedIndices,u=a>=e.questions.length;return wt(e,{surveySubmissionId:i,responses:n,lastQuestionIndex:a,questionOrder:vt(e.questions),visitedIndices:s,surveyLanguage:t}),Er.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:n,submissionId:i,startQuestionIndex:a,isSurveyCompleted:u,skippedResponses:l}}catch(e){return Er.error("[Survey Prefill] Error handling prefill:",e),null}}Vi(e,r){if(void 0===r&&(r=void 0),!e)return!0;var t=this.$i,n=!(null==t||!t.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),i=!0;return r&&(i=(null==t?void 0:t.getFeatureFlag(e,{send_event:!1}))===r||"any"===r),n&&i}Zi(e){return!e.conditions||bt(e,this._posthog)&&mt(e)&&function(e){var r;return null==(r=e.conditions)||!r.selector||!(null==Xr||!Xr.querySelector(e.conditions.selector))}(e)}Gi(e){var r;return ht(e)?{satisfied:!0}:!e.internal_targeting_flag_key||!function(e){var r;return"recurring"===e.schedule||(null!==(r=e.current_iteration)&&void 0!==r?r:0)>0}(e)||null!=(r=this.$i)&&r.hasLoadedFlags?{satisfied:this.Vi(e.internal_targeting_flag_key)}:{satisfied:!1,reason:"Feature flags have not loaded yet; deferring internal targeting flag check"}}checkSurveyEligibility(e){var r,t,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Dr.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(r=e.conditions)?void 0:r.linkedFlagVariant;if(!this.Vi(e.linked_flag_key,i))return n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n;if(!this.Vi(e.targeting_flag_key))return n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n;var o,a=this.Gi(e);return a.satisfied?function(e,r){if(!e||!r)return!0;var t="string"==typeof r?new Date(r):r,n=Math.abs((new Date).getTime()-t.getTime());return Math.ceil(n/864e5)>e}(null==(t=e.conditions)?void 0:t.seenSurveyWaitPeriodInDays,Kr.li("lastSeenSurveyDate"))?(e=>!!Kr.li(Br(e))&&!ht(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason=null!==(o=a.reason)&&void 0!==o?o:"Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n)}checkSurveyRenderability(e){var r=this.checkSurveyEligibility(e);return r.eligible&&!this.Qi(e)?{eligible:!1,reason:"Survey event/action trigger has not been fired yet"}:r}Qi(e){var r;return!Lr(e)&&!function(e){var r;return!(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)||!r.length)}(e)||!(null==(r=this._posthog.surveys)||null==(r=r._surveyEventReceiver)||null==(r=r.getSurveys())||!r.includes(e.id))}Ji(e){var r;return null==(r=e.feature_flag_keys)||!r.length||e.feature_flag_keys.every(e=>{var r=e.value;return!e.key||!r||this.Vi(r)})}Ei(e){return this.checkSurveyEligibility(e).eligible&&this.Zi(e)&&this.Qi(e)&&this.Ji(e)}Fi(e){try{var r=ln.querySelector(qt(e,!0));null!=r&&r.shadowRoot&&(K(null,r.shadowRoot),this.gi.delete(r.shadowRoot)),null==r||r.remove()}catch(r){Er.warn("Failed to remove survey "+e.id+" from DOM:",r)}}getTestAPI(){return{addSurveyToFocus:this.Ri,removeSurveyFromFocus:this.Ai,surveyInFocus:this.Bi,surveyTimeouts:this.fi,handleWidget:this.Li,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.Ni,sortSurveysByAppearanceDelay:this.ji,checkFlags:this.Ji.bind(this),isSurveyFeatureFlagEnabled:this.Vi.bind(this),onLanguageChange:this.Hi.bind(this),currentLanguage:this.yi,surveyIsRendered:this.bi}}};function vn(e,r){if(ln&&an){var t,n=new dn(e);if(e.config.disable_surveys_automatic_display)return Er.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===r)return Er.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{Oe(t)&&(t=setInterval(()=>{n.callSurveysAndEvaluateDisplayLogic(!1)},1e3))},o=()=>{Oe(t)||(clearInterval(t),t=void 0)};i();var a=()=>{ln.hidden?o():(n.callSurveysAndEvaluateDisplayLogic(!1),i())};return kr(ln,"visibilitychange",a),n.setAutomaticDisplayDispose(()=>{o(),ln.removeEventListener("visibilitychange",a)}),n}}function pn(e){var r=e.survey,t=e.removeSurveyFromFocus,n=void 0===t?()=>{}:t,i=e.setSurveyVisible,o=e.isPreviewMode,a=void 0!==o&&o,l=e.posthog;se(()=>{var e;if(!a&&null!=(e=r.conditions)&&e.url){var t=()=>{var e,t=r.type===qe,o=bt(r,l),a=(null==(e=r.appearance)?void 0:e.widgetType)===me&&t;if(!o)return Er.info("Hiding survey "+r.id+" because URL does not match"),i(!1),n(r);a&&(Er.info("Showing survey "+r.id+" because it is a feedback button tab and URL matches"),i(!0))};kr(an,"popstate",t),kr(an,"hashchange",t);var o=an.history.pushState,s=an.history.replaceState;return an.history.pushState=function(){for(var e=arguments.length,r=new Array(e),n=0;e>n;n++)r[n]=arguments[n];o.apply(this,r),t()},an.history.replaceState=function(){for(var e=arguments.length,r=new Array(e),n=0;e>n;n++)r[n]=arguments[n];s.apply(this,r),t()},()=>{an.removeEventListener("popstate",t),an.removeEventListener("hashchange",t),an.history.pushState=o,an.history.replaceState=s}}},[a,r,n,i,l])}var hn=200;function fn(e){switch(void 0===e&&(e="right"),e){case"top":return{top:"0",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case"bottom":return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function yn(r){var t,n,i,o,a,l,s,u,c,d,v,p,h=r.survey,f=r.forceDisableHtml,y=r.posthog,g=r.style,b=void 0===g?{}:g,m=r.previewPageIndex,x=r.removeSurveyFromFocus,w=void 0===x?()=>{}:x,k=r.isPopup,S=void 0===k||k,C=r.onPreviewSubmit,q=void 0===C?()=>{}:C,_=r.onPreviewBack,T=void 0===_?()=>{}:_,M=r.onPopupSurveyDismissed,P=void 0===M?()=>{}:M,I=r.onCloseConfirmationMessage,N=void 0===I?()=>{}:I,L=r.properties,H=r.isSurveyCompleted,F=r.skipShownEvent,V=r.surveyLanguage,E=ue(null),Z=Number.isInteger(m),B=function(r,t,n,i,o,a,l,s,u){var c=le(i||0===n||r.type===_e),d=c[0],v=c[1],p=le(!1),h=p[0],f=p[1],y=ue(!1),g=()=>{var e=()=>{a&&o(r),v(!1)};if(!y.current){var t=null==l?void 0:l.current;t?(y.current=!0,t.style.transition="opacity "+hn+"ms ease-out",t.style.opacity="0",setTimeout(()=>{y.current=!1,e()},250)):e()}},b=e=>{e.detail.surveyId===r.id&&g()};return se(()=>{if(t){if(!i){var o,a=e=>{var t,n;if(e.detail.surveyId===r.id){if(null==(t=r.appearance)||!t.displayThankYouMessage)return g();f(!0),null!=(n=r.appearance)&&n.autoDisappear&&(o&&clearTimeout(o),o=setTimeout(g,5e3))}},l=()=>{if(bt(r,t)){v(!0),an.dispatchEvent(new Event("PHSurveyShown")),s||t.capture("survey shown",e({[Fe]:r.name,[He]:r.id,[Ve]:r.current_iteration,[Ee]:r.current_iteration_start_date},u&&{[De]:u},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}));try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}};kr(an,"PHSurveyClosed",b),kr(an,"PHSurveySent",a);var c=n>0?setTimeout(l,n):void 0;return Oe(c)&&l(),()=>{Oe(c)||clearTimeout(c),Oe(o)||clearTimeout(o),an.removeEventListener("PHSurveyClosed",b),an.removeEventListener("PHSurveySent",a)}}}else Er.error("usePopupVisibility hook called without a PostHog instance.")},[]),pn({survey:r,removeSurveyFromFocus:o,setSurveyVisible:v,isPreviewMode:i,posthog:t}),{isPopupVisible:d,isSurveySent:h,setIsPopupVisible:v,hidePopupWithAnimation:g}}(h,y,null!=(t=h.appearance)&&t.surveyPopupDelaySeconds?1e3*h.appearance.surveyPopupDelaySeconds:0,Z,w,S,E,F,V),A=B.isPopupVisible,D=B.hidePopupWithAnimation,j=B.isSurveySent||m===h.questions.length||!0===H,R=le(!1),Q=R[0],z=R[1],U=ce(()=>!!kt(h),[h]),O=!!(null!=(n=h.appearance)&&n.introScreenHeader||null!=(i=h.appearance)&&i.introScreenDescription),W=Z?-1===m:!(null==(o=h.appearance)||!o.displayIntroScreen)&&O&&!Q&&!U,G=ce(()=>{var e,r=(null==(e=kt(h))?void 0:e.surveySubmissionId)||$r();return{isPreviewMode:Z,previewPageIndex:m,onPopupSurveyDismissed(){V?st(h,y,Z,V):st(h,y,Z),P()},isPopup:S||!1,surveySubmissionId:r,onPreviewSubmit:q,onPreviewBack:T,posthog:y,properties:L,surveyLanguage:V}},[Z,m,S,y,h,P,q,T,L,V]);return A?Mt(ft.Provider,{value:G,children:Mt("div",{className:"ph-survey",style:e({},_t(h.type,null==(a=h.appearance)?void 0:a.position,null==(l=h.appearance)?void 0:l.widgetType),b),ref:E,children:j?Mt(Rt,{header:(null==(s=h.appearance)?void 0:s.thankYouMessageHeader)||"Thank you!",description:(null==(u=h.appearance)?void 0:u.thankYouMessageDescription)||"",forceDisableHtml:!!f,contentType:null==(c=h.appearance)?void 0:c.thankYouMessageDescriptionContentType,appearance:h.appearance||rt,onClose(){D(),N()}}):W?Mt(Qt,{header:(null==(d=h.appearance)?void 0:d.introScreenHeader)||"",description:(null==(v=h.appearance)?void 0:v.introScreenDescription)||"",forceDisableHtml:!!f,contentType:null==(p=h.appearance)?void 0:p.introScreenDescriptionContentType,appearance:h.appearance||rt,onStart:()=>z(!0)}):Mt(gn,{survey:h,forceDisableHtml:!!f,posthog:y})})}):null}function gn(r){var t,n,i=r.survey,o=r.forceDisableHtml,a=r.posthog,l=ce(()=>{var e=kt(i);if(!e)return null;var r=Ke(e.lastQuestionIndex);return!r||r&&e.lastQuestionIndex>=0&&i.questions.length>e.lastQuestionIndex?e:(Ct(i),null)},[i]),s=le(()=>(null!=l&&l.responses&&Er.info("Survey is already in progress, filling in initial responses"),(null==l?void 0:l.responses)||{})),u=s[0],c=s[1],d=de(ft),v=d.previewPageIndex,p=d.onPopupSurveyDismissed,h=d.isPopup,f=d.onPreviewSubmit,y=d.onPreviewBack,g=d.surveySubmissionId,b=d.isPreviewMode,m=d.properties,x=d.surveyLanguage,w=le(()=>{var e=null==l?void 0:l.lastQuestionIndex,r=Ke(e)&&e>=0&&i.questions.length>e?e:0;return Ke(v)&&v>=0?v:r}),k=w[0],S=w[1],C=le(()=>{var e;return(null!==(e=null==l?void 0:l.visitedIndices)&&void 0!==e?e:[]).filter(e=>e>=0&&i.questions.length>e)}),q=C[0],_=C[1],T=le(()=>{var e,r;return null!==(e=null==(r=kt(i))?void 0:r.questionSnapshots)&&void 0!==e?e:{}}),M=T[0],P=T[1],I=ce(()=>vt(pt(i,l)),[i.id,l]),N=ce(()=>{if(!I||new Set(I).size!==I.length)return pt(i,l);var e=new Map(i.questions.map(e=>[e.id,e])),r=I.map(r=>e.get(r)).filter(e=>!!e);return r.length===I.length?r:i.questions},[I,i.questions,i,l]);se(()=>{!b||Oe(v)||0>v||S(v)},[v,b]);var L=!(null==(t=i.appearance)||!t.allowGoBack)&&(b?(null!=v?v:0)>0:q.length>0),H=N.at(k);return H?Mt("form",{className:"survey-form",name:"surveyForm",children:[h&&!0!==(null==(n=i.appearance)?void 0:n.hideCancelButton)&&Mt(Dt,{onClick(){p()}}),Mt("div",{className:"survey-box","data-question-index":k,children:mn({question:H,forceDisableHtml:o,displayQuestionIndex:k,appearance:i.appearance||rt,onSubmit:r=>(r=>{var t=r.res,n=r.displayQuestionIndex,o=r.questionId;if(a)if(o){var l=Sr(o),s=e({},u,{[l]:t});c(s);var d=N[n],v=null!=d&&d.id?e({},M,{[d.id]:d.question}):M;P(v);var p=tn(i,n,t),h=p===Ne,f=[...q,n];if(h||(_(f),S(p),wt(i,{surveySubmissionId:g,responses:s,lastQuestionIndex:p,questionOrder:vt(N),visitedIndices:f,surveyLanguage:x,questionSnapshots:v})),i.enable_partial_responses||h){var y=new Set(f.map(e=>{var r;return null==(r=N[e])?void 0:r.id}).filter(e=>!!e).map(e=>Sr(e)));at({responses:Object.fromEntries(Object.entries(s).filter(e=>y.has(e[0]))),survey:i,surveySubmissionId:g,isSurveyCompleted:h,posthog:a,properties:m,surveyLanguage:x,questionSnapshots:v})}}else Er.error("onNextButtonClick called without a questionId.");else Er.error("onNextButtonClick called without a PostHog instance.")})({res:r,displayQuestionIndex:k,questionId:H.id}),onPreviewSubmit:f,initialValue:H.id?u[Sr(H.id)]:void 0,canGoBack:L,onBack(){if(b)y();else if(0!==q.length){var e=q[q.length-1],r=q.slice(0,-1);_(r),S(e),wt(i,{surveySubmissionId:g,responses:u,lastQuestionIndex:e,questionOrder:vt(N),visitedIndices:r,surveyLanguage:x,questionSnapshots:M})}}})})]}):null}function bn(e){var r,t,n,i,o,a,l,s=e.survey,u=e.forceDisableHtml,c=e.posthog,d=e.readOnly,v=e.surveyLanguage,p=le(!0),h=p[0],f=p[1],y=le(!1),g=y[0],b=y[1],m=le({}),x=m[0],w=m[1],k=ue(void 0),S=()=>{b(!g)};if(se(()=>{var e;if(c){if(!d){"tab"===(null==(e=s.appearance)?void 0:e.widgetType)&&w({top:"50%",bottom:"auto"});var r=e=>{var r,t=e;(null==(r=t.detail)?void 0:r.surveyId)===s.id&&(Er.info("Received show event for feedback button survey "+s.id),w(t.detail.position||{}),S())};return kr(an,sn,r),()=>{Oe(k.current)||(clearTimeout(k.current),k.current=void 0),an.removeEventListener(sn,r)}}}else Er.error("FeedbackWidget called without a PostHog instance.")},[c,d,s.id,null==(r=s.appearance)?void 0:r.widgetType,null==(t=s.appearance)?void 0:t.widgetSelector,null==(n=s.appearance)?void 0:n.borderColor]),pn({survey:s,setSurveyVisible:f,posthog:c}),!h)return null;var C=()=>{s.schedule!==Le&&f(!1),Oe(k.current)||clearTimeout(k.current),k.current=setTimeout(()=>{k.current=void 0,b(!1)},200)};return Mt(M,{children:["tab"===(null==(i=s.appearance)?void 0:i.widgetType)&&Mt("button",{className:"ph-survey-widget-tab "+("top"===(null==(o=s.appearance)?void 0:o.tabPosition)?"widget-tab-top":""),onClick:S,disabled:d,style:fn(null==(a=s.appearance)?void 0:a.tabPosition),children:(null==(l=s.appearance)?void 0:l.widgetLabel)||""}),g&&Mt(yn,{posthog:c,survey:s,forceDisableHtml:u,style:x,onPopupSurveyDismissed:C,onCloseConfirmationMessage:C,surveyLanguage:v})]})}var mn=r=>{var t=r.question,n=r.displayQuestionIndex,i=r.onSubmit,o=r.onPreviewSubmit,a={forceDisableHtml:r.forceDisableHtml,appearance:r.appearance,onPreviewSubmit(e){o(e)},onSubmit(e){i(e)},initialValue:r.initialValue,displayQuestionIndex:n,canGoBack:r.canGoBack,onBack:r.onBack};switch(t.type){case Te:return _(Ut,e({},a,{question:t,key:t.id}));case"link":return _(Ot,e({},a,{question:t,key:t.id}));case Ie:return _($t,e({},a,{question:t,key:t.id}));case Pe:case Me:return _(Gt,e({},a,{question:t,key:t.id}));default:return Er.error("Unsupported question type: "+t.type),null}},xn="undefined"!=typeof globalThis?globalThis:hr;xn&&"undefined"==typeof self&&(xn.self=xn),xn&&"undefined"==typeof File&&(xn.File=function(){});var wn=null!=hr?hr:{};wn.__PosthogExtensions__=wn.__PosthogExtensions__||{},wn.__PosthogExtensions__.generateSurveys=vn,wn.extendPostHogWithSurveys=vn}()}();
|
|
1
|
+
!function(){function e(){return e=Object.assign?Object.assign.bind():function(e){for(var r=1;arguments.length>r;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},e.apply(null,arguments)}!function(){var r,t,n,i,o,a,l,s,u,c,d,v,p,h,f,y,g,b,m,x={},w=[],k=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,r){for(var t in r)e[t]=r[t];return e}function q(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,n){var i,o,a,l={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:l[a]=t[a];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return T(e,l,i,o,null)}function T(e,r,i,o,a){var l={type:e,props:r,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(l),l}function M(e){return e.children}function P(e,r){this.props=e,this.context=r}function $(e,r){if(null==r)return e.__?$(e.__,e.__i+1):null;for(var t;e.__k.length>r;r++)if(null!=(t=e.__k[r])&&null!=t.__e)return t.__e;return"function"==typeof e.type?$(e):null}function I(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,i=[],o=[],a=C({},r);a.__v=r.__v+1,t.vnode&&t.vnode(a),j(e.__P,a,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,i,null==n?$(r):n,!!(32&r.__u),o),a.__v=r.__v,a.__.__k[a.__i]=a,Q(i,a,o),r.__e=r.__=null,a.__e!=n&&N(a)}}function N(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(r){if(null!=r&&null!=r.__e)return e.__e=e.__c.base=r.__e}),N(e)}function L(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!H.__r++||o!=t.debounceRendering)&&((o=t.debounceRendering)||a)(H)}function H(){try{for(var e,r=1;i.length;)i.length>r&&i.sort(l),e=i.shift(),r=i.length,I(e)}finally{i.length=H.__r=0}}function F(e,r,t,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b=n&&n.__k||w,m=r.length;for(s=V(t,r,b,s,m),d=0;m>d;d++)null!=(p=t.__k[d])&&(v=-1!=p.__i&&b[p.__i]||x,p.__i=d,y=j(e,p,v,i,o,a,l,s,u,c),h=p.__e,p.ref&&v.ref!=p.ref&&(v.ref&&O(v.ref,null,p),c.push(p.ref,p.__c||h,p)),null==f&&null!=h&&(f=h),(g=!!(4&p.__u))||v.__k===p.__k?(s=E(p,s,e,g),g&&v.__e&&(v.__e=null)):"function"==typeof p.type&&void 0!==y?s=y:h&&(s=h.nextSibling),p.__u&=-7);return t.__e=f,s}function V(e,r,t,n,i){var o,a,l,s,u,c=t.length,d=c,v=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(a=r[o])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[o]=T(null,a,null,null,null):S(a)?a=e.__k[o]=T(M,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[o]=T(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,s=o+v,a.__=e,a.__b=e.__b+1,l=null,-1!=(u=a.__i=Z(a,t,s,d))&&(d--,(l=t[u])&&(l.__u|=2)),null==l||null==l.__v?(-1==u&&(i>c?v--:c>i&&v++),"function"!=typeof a.type&&(a.__u|=4)):u!=s&&(u==s-1?v--:u==s+1?v++:(u>s?v--:v++,a.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(l=t[o])&&!(2&l.__u)&&(l.__e==n&&(n=$(l)),W(l,l));return n}function E(e,r,t,n){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,r=E(i[o],r,t,n));return r}e.__e!=r&&(n&&(r&&e.type&&!r.parentNode&&(r=$(e)),t.insertBefore(e.__e,r||null)),r=e.__e);do{r=r&&r.nextSibling}while(null!=r&&8==r.nodeType);return r}function Z(e,r,t,n){var i,o,a,l=e.key,s=e.type,u=r[t],c=null!=u&&!(2&u.__u);if(null===u&&null==l||c&&l==u.key&&s==u.type)return t;if(n>(c?1:0))for(i=t-1,o=t+1;i>=0||r.length>o;)if(null!=(u=r[a=0>i?o++:i--])&&!(2&u.__u)&&l==u.key&&s==u.type)return a;return-1}function B(e,r,t){"-"==r[0]?e.setProperty(r,null==t?"":t):e[r]=null==t?"":"number"!=typeof t||k.test(r)?t:t+"px"}function A(e,r,t,n,i){var o,a;e:if("style"==r)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(r in n)t&&r in t||B(e.style,r,"");if(t)for(r in t)n&&t[r]==n[r]||B(e.style,r,t[r])}else if("o"==r[0]&&"n"==r[1])o=r!=(r=r.replace(d,"$1")),a=r.toLowerCase(),r=a in e||"onFocusOut"==r||"onFocusIn"==r?a.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=t,t?n?t[c]=n[c]:(t[c]=v,e.addEventListener(r,o?h:p,o)):e.removeEventListener(r,o?h:p,o);else{if("http://www.w3.org/2000/svg"==i)r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=r&&"height"!=r&&"href"!=r&&"list"!=r&&"form"!=r&&"tabIndex"!=r&&"download"!=r&&"rowSpan"!=r&&"colSpan"!=r&&"role"!=r&&"popover"!=r&&r in e)try{e[r]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=r[4]?e.removeAttribute(r):e.setAttribute(r,"popover"==r&&1==t?"":t))}}function D(e){return function(r){if(this.l){var n=this.l[r.type+e];if(null==r[u])r[u]=v++;else if(n[c]>r[u])return;return n(t.event?t.event(r):r)}}}function j(e,r,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b,m,x,$,k,_,T,I,N,L=r.type;if(void 0!==r.constructor)return null;128&n.__u&&(u=!!(32&n.__u),a=[s=r.__e=n.__e]),(d=t.__b)&&d(r);e:if("function"==typeof L){v=l.length;try{if(m=r.props,x=L.prototype&&L.prototype.render,$=(d=L.contextType)&&i[d.__c],k=d?$?$.props.value:d.__:i,n.__c?b=(p=r.__c=n.__c).__=p.__E:(x?r.__c=p=new L(m,k):(r.__c=p=new P(m,k),p.constructor=L,p.render=G),$&&$.sub(p),p.state||(p.state={}),p.__n=i,h=p.__d=!0,p.__h=[],p._sb=[]),x&&null==p.__s&&(p.__s=p.state),x&&null!=L.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=C({},p.__s)),C(p.__s,L.getDerivedStateFromProps(m,p.__s))),f=p.props,y=p.state,p.__v=r,h)x&&null==L.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),x&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(x&&null==L.getDerivedStateFromProps&&m!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(m,k),r.__v==n.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(m,p.__s,k)){r.__v!=n.__v&&(p.props=m,p.state=p.__s,p.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(e){e&&(e.__=r)}),w.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(m,p.__s,k),x&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,y,g)})}if(p.context=k,p.props=m,p.__P=e,p.__e=!1,_=t.__r,T=0,x)p.state=p.__s,p.__d=!1,_&&_(r),d=p.render(p.props,p.state,p.context),w.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,_&&_(r),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&25>++T);p.state=p.__s,null!=p.getChildContext&&(i=C(C({},i),p.getChildContext())),x&&!h&&null!=p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(f,y)),I=null!=d&&d.type===M&&null==d.key?z(d.props.children):d,s=F(e,S(I)?I:[I],r,n,i,o,a,l,s,u,c),p.base=r.__e,r.__u&=-161,p.__h.length&&l.push(p),b&&(p.__E=p.__=null)}catch(e){if(l.length=v,r.__v=null,u||null!=a)if(e.then){for(r.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;null!=a&&(a[a.indexOf(s)]=null),r.__e=s}else{if(null!=a)for(N=a.length;N--;)q(a[N]);R(r)}else r.__e=n.__e,!r.__k&&n.__k&&(r.__k=n.__k),e.then||R(r);t.__e(e,r,n)}}else null==a&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):s=r.__e=U(n.__e,r,n,i,o,a,l,u,c);return(d=t.diffed)&&d(r),128&r.__u?void 0:s}function R(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(R))}function Q(e,r,n){for(var i=0;n.length>i;i++)O(n[i],n[++i],n[++i]);t.__c&&t.__c(r,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(e){e.call(r)})}catch(e){t.__e(e,r.__v)}})}function z(e){return"object"!=typeof e||null==e||e.__b>0?e:S(e)?e.map(z):void 0!==e.constructor?null:C({},e)}function U(e,n,i,o,a,l,s,u,c){var d,v,p,h,f,y,g,b=i.props||x,m=n.props,w=n.type;if("svg"==w?a="http://www.w3.org/2000/svg":"math"==w?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;l.length>d;d++)if((f=l[d])&&"setAttribute"in f==!!w&&(w?f.localName==w:3==f.nodeType)){e=f,l[d]=null;break}if(null==e){if(null==w)return document.createTextNode(m);e=document.createElementNS(a,w,m.is&&m),u&&(t.__m&&t.__m(n,l),u=!1),l=null}if(null==w)b===m||u&&e.data==m||(e.data=m);else{if(l="textarea"==w&&null!=m.defaultValue?null:l&&r.call(e.childNodes),!u&&null!=l)for(b={},d=0;e.attributes.length>d;d++)b[(f=e.attributes[d]).name]=f.value;for(d in b)f=b[d],"dangerouslySetInnerHTML"==d?p=f:"children"==d||d in m||"value"==d&&"defaultValue"in m||"checked"==d&&"defaultChecked"in m||A(e,d,null,f,a);for(d in m)f=m[d],"children"==d?h=f:"dangerouslySetInnerHTML"==d?v=f:"value"==d?y=f:"checked"==d?g=f:u&&"function"!=typeof f||b[d]===f||A(e,d,f,b[d],a);if(v)u||p&&(v.__html==p.__html||v.__html==e.innerHTML)||(e.innerHTML=v.__html),n.__k=[];else if(p&&(e.innerHTML=""),F("template"==n.type?e.content:e,S(h)?h:[h],n,i,o,"foreignObject"==w?"http://www.w3.org/1999/xhtml":a,l,s,l?l[0]:i.__k&&$(i,0),u,c),null!=l)for(d=l.length;d--;)q(l[d]);u&&"textarea"!=w||(d="value","progress"==w&&null==y?e.removeAttribute("value"):null!=y&&(y!==e[d]||"progress"==w&&!y||"option"==w&&y!=b[d])&&A(e,d,y,b[d],a),d="checked",null!=g&&g!=e[d]&&A(e,d,g,b[d],a))}return e}function O(e,r,n){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==r||(e.__u=e(r))}else e.current=r}catch(e){t.__e(e,n)}}function W(e,r,n){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||O(i,null,r)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,r)}i.base=i.__P=i.__n=null}if(i=e.__k)for(o=0;i.length>o;o++)i[o]&&W(i[o],r,n||"function"!=typeof e.type);n||q(e.__e),e.__c=e.__=e.__e=void 0}function G(e,r,t){return this.constructor(e,t)}function K(e,n,i){var o,a,l,s;n==document&&(n=document.documentElement),t.__&&t.__(e,n),a=(o="function"==typeof i)?null:i&&i.__k||n.__k,l=[],s=[],j(n,e=(!o&&i||n).__k=_(M,null,[e]),a||x,x,n.namespaceURI,!o&&i?[i]:a?null:n.firstChild?r.call(n.childNodes):null,l,!o&&i?i:a?a.__e:n.firstChild,o,s),Q(l,e,s),e.props.children=null}r=w.slice,t={__e(e,r,t,n){for(var i,o,a;r=r.__;)if((i=r.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(r){e=r}throw e}},n=0,P.prototype.setState=function(e,r){var t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=C({},this.state);"function"==typeof e&&(e=e(C({},t),this.props)),e&&C(t,e),null!=e&&this.__v&&(r&&this._sb.push(r),L(this))},P.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),L(this))},P.prototype.render=M,i=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,r){return e.__v.__b-r.__v.__b},H.__r=0,s=Math.random().toString(8),u="__d"+s,c="__a"+s,d=/(PointerCapture)$|Capture$/i,v=0,p=D(!1),h=D(!0),f=0;var Y=0,J=[],X=t,ee=X.__b,re=X.__r,te=X.diffed,ne=X.__c,ie=X.unmount,oe=X.__;function ae(e,r){X.__h&&X.__h(g,e,Y||r),Y=0;var t=g.__H||(g.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function le(e){return Y=1,function(e,r){var t=ae(y++,2);if(t.t=e,!t.__c&&(t.__=[be(void 0,r),function(e){var r=t.__N?t.__N[0]:t.__[0],n=t.t(r,e);r!==n&&(t.__N=[n,t.__[1]],t.__c.setState({}))}],t.__c=g,!g.__f)){var n=function(e,r,n){if(!t.__c.__H)return!0;var o=!1,a=t.__c.props!==e;if(t.__c.__H.__.some(function(e){if(e.__N){o=!0;var r=e.__[0];e.__=e.__N,e.__N=void 0,r!==e.__[0]&&(a=!0)}}),i){var l=i.call(this,e,r,n);return o?l||a:l}return!o||a};g.__f=!0;var i=g.shouldComponentUpdate,o=g.componentWillUpdate;g.componentWillUpdate=function(e,r,t){if(this.__e){var a=i;i=void 0,n(e,r,t),i=a}o&&o.call(this,e,r,t)},g.shouldComponentUpdate=n}return t.__N||t.__}(be,e)}function se(e,r){var t=ae(y++,3);!X.__s&&ge(t.__H,r)&&(t.__=e,t.u=r,g.__H.__h.push(t))}function ue(e){return Y=5,ce(function(){return{current:e}},[])}function ce(e,r){var t=ae(y++,7);return ge(t.__H,r)&&(t.__=e(),t.__H=r,t.__h=e),t.__}function de(e){var r,t=g.context[e.__c],n=ae(y++,9);return n.c=e,t?(null!==(r=n.__)&&void 0!==r||(n.__=!0,t.sub(g)),t.props.value):e.__}function ve(){for(var e;e=J.shift();){var r=e.__H;if(e.__P&&r)try{r.__h.some(fe),r.__h.some(ye),r.__h=[]}catch(t){r.__h=[],X.__e(t,e.__v)}}}X.__b=function(e){g=null,ee&&ee(e)},X.__=function(e,r){e&&r.__k&&r.__k.__m&&(e.__m=r.__k.__m),oe&&oe(e,r)},X.__r=function(e){re&&re(e),y=0;var r=(g=e.__c).__H;r&&(b===g?(r.__h=[],g.__h=[],r.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(r.__h.length&&ve(),y=0)),b=g},X.diffed=function(e){te&&te(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(1!==J.push(r)&&m===X.requestAnimationFrame||((m=X.requestAnimationFrame)||he)(ve)),r.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),b=g=null},X.__c=function(e,r){r.some(function(e){try{e.__h.some(fe),e.__h=e.__h.filter(function(e){return!e.__||ye(e)})}catch(t){r.some(function(e){e.__h&&(e.__h=[])}),r=[],X.__e(t,e.__v)}}),ne&&ne(e,r)},X.unmount=function(e){ie&&ie(e);var r,t=e.__c;t&&t.__H&&(t.__H.__.some(function(e){try{fe(e)}catch(e){r=e}}),t.__H=void 0,r&&X.__e(r,t.__v))};var pe="function"==typeof requestAnimationFrame;function he(e){var r,t=function(){clearTimeout(n),pe&&cancelAnimationFrame(r),setTimeout(e)},n=setTimeout(t,35);pe&&(r=requestAnimationFrame(t))}function fe(e){var r=g,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),g=r}function ye(e){var r=g;e.__c=e.__(),g=r}function ge(e,r){return!e||e.length!==r.length||r.some(function(r,t){return r!==e[t]})}function be(e,r){return"function"==typeof r?r(e):r}var me="tab",xe="left",we="center",ke="right",Se="next_to_trigger",Ce="popover",qe="widget",_e="external_survey",Te="open",Me="multiple_choice",Pe="single_choice",Ie="rating",Ne="end",Le="always",He="$survey_id",Fe="$survey_name",Ve="$survey_iteration",Ee="$survey_iteration_start_date",Ze="$survey_partially_completed",Be="$survey_submission_id",Ae="$survey_completed",De="$survey_language",je="min_length",Re="max_length",Qe=Object.prototype.toString,ze=Array.isArray||function(e){return"[object Array]"===Qe.call(e)},Ue=e=>"function"==typeof e,Oe=e=>void 0===e,$e=e=>"[object String]"==Qe.call(e),We=e=>null===e,Ge=e=>Oe(e)||We(e),Ke=e=>"[object Number]"==Qe.call(e)&&e==e,Ye="Mobile",Je="Tablet",Xe="Android Tablet",er="iPad",rr="Apple Watch",tr="Nintendo",nr="PlayStation",ir="Xbox",or="Nokia",ar="Ouya",lr="Generic "+Ye.toLowerCase(),sr="Generic "+Je.toLowerCase(),ur=new RegExp(ir,"i"),cr=new RegExp("PlayStation \\w+","i"),dr=new RegExp("Nintendo \\w+","i"),vr=new RegExp("BlackBerry|PlayBook|BB10","i");new RegExp(tr,"i"),new RegExp(nr,"i"),new RegExp("Windows","i");function pr(e,r){var t;if(e)return null==(t=e.find(e=>e.type===r))?void 0:t.value}var hr="u">typeof window?window:void 0,fr="u">typeof globalThis?globalThis:hr,yr=null==fr?void 0:fr.navigator,gr=null==fr?void 0:fr.document;null!=fr&&fr.XMLHttpRequest&&new fr.XMLHttpRequest;var br=null==yr?void 0:yr.userAgent,mr=function(e,r){var t=(void 0===r?{}:r).debugEnabled,n={q(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;n>o;o++)i[o-1]=arguments[o];hr&&(hr.POSTHOG_DEBUG||t)&&!Oe(hr.console)&&hr.console&&("__rrweb_original__"in hr.console[r]?hr.console[r].__rrweb_original__:hr.console[r])(e,...i)},debug(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("debug",...r)},info(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("log",...r)},warn(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("warn",...r)},error(){for(var e=arguments.length,r=new Array(e),t=0;e>t;t++)r[t]=arguments[t];n.q("error",...r)},critical(){for(var r=arguments.length,t=new Array(r),n=0;r>n;n++)t[n]=arguments[n];console.error(e,...t)},uninitializedWarning(e){n.error("You must initialize PostHog before calling "+e)},createLogger:(r,t)=>mr(e+" "+r,t)};return n},xr=mr("[PostHog.js]"),wr=xr.createLogger;function kr(e,r,t,n){var i=null!=n?n:{},o=i.capture,a=i.passive;null==e||e.addEventListener(r,t,{capture:void 0!==o&&o,passive:void 0===a||a})}function Sr(e){return"$survey_response_"+e}function Cr(e,r){if(!r)return null;var t=e[Sr(r)];return ze(t)?[...t]:t}function qr(r,t,n){void 0===r&&(r={});var i={};return t.questions.forEach(e=>{if(!Oe(e.originalQuestionIndex)){var t,n=0===(t=e.originalQuestionIndex)?"$survey_response":"$survey_response_"+t,o=Cr(r,e.id);Oe(o)||(i[n]=o)}}),e({$survey_questions:t.questions.map(e=>{var t,i;return{id:e.id,question:null!==(t=null==n?void 0:n[null!==(i=e.id)&&void 0!==i?i:""])&&void 0!==t?t:e.question,response:Cr(r,e.id)}})},r,i)}function _r(e,r){var t="$survey_"+r+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(t="$survey_"+r+"/"+e.id+"/"+e.current_iteration),t}function Tr(e){return"string"==typeof e&&e.trim()?e.trim():null}function Mr(e){return e.toLowerCase()}function Pr(e,r,t){if(!e||!r)return null;var n=Mr(r),i=Object.keys(e).find(e=>Mr(e)===n);if(i)return null==t||t.debug("Found exact translation match: "+i),i;if(n.includes("-")){var o=n.split("-")[0],a=Object.keys(e).find(e=>Mr(e)===o);if(a)return null==t||t.debug("Found base language translation match: "+a+" (from "+r+")"),a}return null}var Ir=["thankYouMessageHeader","thankYouMessageDescription","thankYouMessageCloseButtonText","introScreenHeader","introScreenDescription","introScreenButtonText","submitButtonText","backButtonText"];function Nr(r,t,n){var i,o=Pr(r.translations,t,n),a=e({},r),l=!1;if(o){var s,u=null==(s=r.translations)?void 0:s[o];if(u)if(null==n||n.info("Applying survey-level translation for language: "+o),Oe(u.name)||(a.name=u.name,l=!0),a.appearance){var c=e({},a.appearance);for(var d of Ir){var v=u[d];Oe(v)||(c[d]=v,l=!0)}a.appearance=c}else(function(e){return Ir.some(r=>!Oe(e[r]))})(u)&&(l=!0)}var p=r.questions.map(r=>function(r,t,n){var i,o=Pr(r.translations,t,n);if(!o)return{question:r,matchedKey:null,hasChanges:!1};var a=null==(i=r.translations)?void 0:i[o];if(!a)return{question:r,matchedKey:null,hasChanges:!1};var l=e({},r),s=!1;return Oe(a.question)||(l.question=a.question,s=!0),Oe(a.description)||(l.description=a.description,s=!0),Oe(a.buttonText)||(l.buttonText=a.buttonText,s=!0),"link"in l&&!Oe(a.link)&&(l.link=a.link,s=!0),"lowerBoundLabel"in l&&!Oe(a.lowerBoundLabel)&&(l.lowerBoundLabel=a.lowerBoundLabel,s=!0),"upperBoundLabel"in l&&!Oe(a.upperBoundLabel)&&(l.upperBoundLabel=a.upperBoundLabel,s=!0),"choices"in l&&function(e){return ze(e.choices)}(a)&&(l.choices=a.choices,s=!0),{question:s?l:r,matchedKey:s?o:null,hasChanges:s}}(r,t,n)),h=p.map(e=>e.question),f=p.some(e=>e.hasChanges),y=null;return o||(y=(null==(i=p.find(e=>e.matchedKey))?void 0:i.matchedKey)||null),f&&(a.questions=h,l=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:a,matchedKey:l?o||y:null}}function Lr(e){var r;return!(null==(r=e.conditions)||null==(r=r.events)||null==(r=r.values)||!r.length)}var Hr=(e,r)=>{if(!(e=>{try{new RegExp(e)}catch(e){return!1}return!0})(r))return!1;try{return new RegExp(r).test(e)}catch(e){return!1}},Fr=e=>e.toLowerCase(),Vr={exact:(e,r)=>r.some(r=>e.some(e=>r===e)),is_not:(e,r)=>r.every(r=>e.every(e=>r!==e)),regex:(e,r)=>r.some(r=>e.some(e=>Hr(r,e))),not_regex:(e,r)=>r.every(r=>e.every(e=>!Hr(r,e))),icontains:(e,r)=>r.map(Fr).some(r=>e.map(Fr).some(e=>r.includes(e))),not_icontains:(e,r)=>r.map(Fr).every(r=>e.map(Fr).every(e=>!r.includes(e))),gt:(e,r)=>r.some(r=>{var t=parseFloat(r);return!isNaN(t)&&e.some(e=>t>parseFloat(e))}),lt:(e,r)=>r.some(r=>{var t=parseFloat(r);return!isNaN(t)&&e.some(e=>t<parseFloat(e))})},Er=wr("[Surveys]"),Zr=(e,r)=>""+e+function(e){return e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id}(r),Br=e=>Zr("seenSurvey_",e),Ar=e=>{try{var r=Br(e);if(localStorage.getItem(r))return;localStorage.setItem(r,"true")}catch(e){Er.error("Failed to persist survey seen state",e)}},Dr=[Ce,qe,"api"],jr="$surveys";Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ke(e)&&isFinite(e)&&Math.floor(e)===e});var Rr=class e{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(r,t,n,i){if(!Number.isInteger(r)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(i)||0>r||0>t||0>n||0>i||r>0xffffffffffff||t>4095||n>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=r/Math.pow(2,40),o[1]=r/Math.pow(2,32),o[2]=r/Math.pow(2,24),o[3]=r/Math.pow(2,16),o[4]=r/256,o[5]=r,o[6]=112|t>>>8,o[7]=t,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)}toString(){for(var e="",r=0;this.bytes.length>r;r++)e=e+(this.bytes[r]>>>4).toString(16)+(15&this.bytes[r]).toString(16),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new e(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;16>r;r++){var t=this.bytes[r]-e.bytes[r];if(0!==t)return Math.sign(t)}return 0}},Qr=class{generate(){var e=this.generateOrAbort();if(!Oe(e))return e;this.ri=0;var r=this.generateOrAbort();if(Oe(r))throw new Error("Could not generate UUID after timestamp reset");return r}generateOrAbort(){var e,r=(e=Date.now(),Ke(e)&&isFinite(e)?Math.min(Math.max(Math.floor(e),0),0xffffffffffff):0);if(r>this.ri)this.ri=r,this.ii();else{if(this.ri>=r+1e4)return;this.ni++,this.ni>4398046511103&&(this.ri++,this.ii())}return Rr.fromFieldsV7(this.ri,Math.trunc(this.ni/Math.pow(2,30)),this.ni&Math.pow(2,30)-1,this.oi.nextUint32())}ii(){this.ni=1024*this.oi.nextUint32()+(1023&this.oi.nextUint32())}constructor(){this.ri=0,this.ni=0,this.oi=new Or}},zr=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;e.length>r;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};hr&&!Oe(hr.crypto)&&crypto.getRandomValues&&(zr=e=>crypto.getRandomValues(e));var Ur,Or=class{nextUint32(){return this.Pe.length>this.ai||(zr(this.Pe),this.ai=0),this.Pe[this.ai++]}constructor(){this.Pe=new Uint32Array(8),this.ai=1/0}},$r=()=>Wr().toString(),Wr=()=>(Ur||(Ur=new Qr)).generate();var Gr=null,Kr={si(){if(!We(Gr))return Gr;var e=!0;if(Oe(hr))e=!1;else try{var r="__mplssupport__";Kr.ui(r,"xyz"),'"xyz"'!==Kr.li(r)&&(e=!1),Kr.hi(r)}catch(r){e=!1}return e||xr.error("localStorage unsupported; falling back to cookie store"),Gr=e,e},ci(e){xr.error("localStorage error: "+e)},li(e){try{return null==hr?void 0:hr.localStorage.getItem(e)}catch(e){Kr.ci(e)}return null},di(e){try{return JSON.parse(Kr.li(e))||{}}catch(e){}return null},ui(e,r){try{return null==hr||hr.localStorage.setItem(e,JSON.stringify(r)),!0}catch(e){Kr.ci(e)}return!1},hi(e){try{null==hr||hr.localStorage.removeItem(e)}catch(e){Kr.ci(e)}}},Yr=wr("[Stylesheet Loader]"),Jr=hr,Xr=gr,et="#020617",rt={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:ke,widgetType:me,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:et,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},tt=[we,xe,ke];function nt(e){if(e.startsWith("#")){var r=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(r)&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]),/^[0-9A-Fa-f]{6}$/.test(r)?"rgb("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function it(e){var r;void 0===e&&(e=rt.backgroundColor),"#"===e[0]&&(r=nt(e)),e.startsWith("rgb")&&(r=e);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(t&&(r=nt(t)),!r)return et;var n=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){var i=parseInt(n[1]),o=parseInt(n[2]),a=parseInt(n[3]);return Math.sqrt(i*i*.299+o*o*.587+a*a*.114)>127.5?et:"white"}return et}var ot=(r,t,n)=>{var i=qt(r),o=Xr.querySelector("."+i);if(o&&o.shadowRoot)return{shadow:o.shadowRoot,isNewlyCreated:!1};var a=Xr.createElement("div");((r,t,n)=>{var i=e({},rt,n),o=r.style,a=!tt.includes(i.position)||t===qe&&(null==n?void 0:n.widgetType)===me;o.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var r='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+r:"-apple-system, "+r}(i.fontFamily)),o.setProperty("--ph-survey-box-padding",i.boxPadding),o.setProperty("--ph-survey-max-width",i.maxWidth),o.setProperty("--ph-survey-z-index",i.zIndex),o.setProperty("--ph-survey-border-color",i.borderColor),a?(o.setProperty("--ph-survey-border-radius",i.borderRadius),o.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(o.setProperty("--ph-survey-border-bottom","none"),o.setProperty("--ph-survey-border-radius",i.borderRadius+" "+i.borderRadius+" 0 0")),o.setProperty("--ph-survey-background-color",i.backgroundColor),o.setProperty("--ph-survey-box-shadow",i.boxShadow),o.setProperty("--ph-survey-disabled-button-opacity",i.disabledButtonOpacity),o.setProperty("--ph-survey-submit-button-color",i.submitButtonColor),o.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||it(i.submitButtonColor)),o.setProperty("--ph-survey-rating-bg-color",i.ratingButtonColor),o.setProperty("--ph-survey-rating-active-bg-color",i.ratingButtonActiveColor),o.setProperty("--ph-survey-rating-active-text-color",it(i.ratingButtonActiveColor)),o.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||it(i.backgroundColor)),o.setProperty("--ph-survey-text-subtle-color",i.textSubtleColor),o.setProperty("--ph-widget-color",i.widgetColor),o.setProperty("--ph-widget-text-color",it(i.widgetColor)),o.setProperty("--ph-widget-z-index",i.zIndex);var l=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),s=l||i.inputBackground;l||"white"!==i.backgroundColor||(s="#f8f8f8"),o.setProperty("--ph-survey-input-background",s);var u=(null==n?void 0:n.inputTextColor)||it(s);o.setProperty("--ph-survey-input-text-color",u),o.setProperty("--ph-survey-rating-text-color",u),o.setProperty("--ph-survey-scrollbar-thumb-color",i.scrollbarThumbColor),o.setProperty("--ph-survey-scrollbar-track-color",i.scrollbarTrackColor),o.setProperty("--ph-survey-outline-color",i.outlineColor)})(a,r.type,r.appearance),a.className=i;var l=a.attachShadow({mode:"open"}),s=function(e){var r=((e,r,t)=>{var n=e.createElement("style");n.innerText=r;var i=(e=>{var r;return Ue(e)?e:null==e||null==(r=e.config)?void 0:r.prepare_external_dependency_stylesheet})(t);return i&&(n=i(n)),n||(Yr.error("prepare_external_dependency_stylesheet returned null"),null)})(Xr,':host{--ph-survey-font-family:-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:calc(2147480000 + 3645);--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px #00000026;--ph-survey-submit-button-color:black;--ph-survey-submit-button-text-color:white;--ph-survey-rating-bg-color:white;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:black;--ph-survey-rating-active-text-color:white;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:white;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:#3b82f6cc;--ph-survey-input-background:white;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:.6}.ph-survey{min-width:300px;width:var(--ph-survey-max-width);max-width:85%;z-index:var(--ph-survey-z-index);height:fit-content;margin:0;position:fixed;bottom:0}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;font-family:var(--ph-survey-font-family);color:var(--ph-survey-text-primary-color)}.ph-survey textarea,.ph-survey input[type=text],.ph-survey .multiple-choice-options label{color:var(--ph-survey-input-text-color);background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey textarea,.ph-survey input[type=text]{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey textarea:focus,.ph-survey textarea:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=radio]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus-visible{outline:1.5px solid var(--ph-survey-outline-color);border-color:var(--ph-survey-rating-active-bg-color);outline-offset:2px}.ph-survey textarea:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible){outline:none}.ph-survey textarea:hover:not(:focus),.ph-survey input[type=text]:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey textarea,.ph-survey input[type=text]{font-size:1rem}}.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey .form-cancel,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey label,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);color:var(--ph-widget-text-color);text-align:center;cursor:pointer;z-index:var(--ph-survey-z-index);border:none;border-radius:3px 3px 0 0;padding:10px 12px;transition:padding .2s ease-out;position:fixed}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{flex-direction:column;gap:16px;display:flex}.bottom-section{flex-direction:column;gap:8px;display:flex}.thank-you-message-header~.bottom-section,.intro-screen-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message,.intro-screen{flex-direction:column;gap:8px;display:flex}.survey-question{font-size:14px;font-weight:500}.survey-question-description{opacity:.8;padding-top:4px;font-size:13px}.survey-question-description,.thank-you-message-body,.intro-screen-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) img,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) video,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) iframe,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) embed,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) object,:is(.survey-question-description,.thank-you-message-body,.intro-screen-body) svg{max-width:100%;height:auto}.question-textarea-wrapper{flex-direction:column;display:flex}.survey-form{animation:.3s ease-out forwards ph-survey-fade-in}.survey-form,.thank-you-message,.intro-screen{text-align:left;width:100%;z-index:var(--ph-survey-z-index);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);background:var(--ph-survey-background-color);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);padding:var(--ph-survey-box-padding);margin:0;position:relative}.survey-form textarea,.survey-form input[type=text]{min-width:100%}.survey-form textarea:focus,.survey-form textarea:focus-visible{box-shadow:0 4px 12px #00000014}.survey-form textarea:focus:not(:focus-visible){box-shadow:none}.survey-box .question-header--empty~.multiple-choice-options,.survey-box .question-header--empty~textarea{margin-top:0}.multiple-choice-options{border:none;flex-direction:column;gap:8px;margin:0;padding:1px 0;font-size:14px;display:flex}.multiple-choice-options label,.multiple-choice-options .response-choice{color:inherit;align-items:center;gap:8px;display:flex}.multiple-choice-options label{cursor:pointer;font-size:13px}.multiple-choice-options label:hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px #00000014}.multiple-choice-options label:has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px #0000000d}.multiple-choice-options label.choice-option-open{flex-wrap:wrap}.multiple-choice-options label span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ph-survey-input-background);cursor:pointer;z-index:1;border-radius:3px;flex-shrink:0;width:1rem;height:1rem;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;position:relative}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;width:4px;height:8px;animation:.2s ease-out .1s forwards ph-survey-checkmark-reveal;left:4px;transform:rotate(45deg)scale(0)}.multiple-choice-options input[type=radio]:checked:after{background:var(--ph-survey-rating-active-text-color);border-radius:50%;width:6px;height:6px;animation:.15s ease-out 50ms forwards ph-survey-radio-reveal;top:5px;left:5px;transform:scale(0)}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{content:"";box-sizing:content-box;position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}.multiple-choice-options .choice-option-open input[type=text]::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{justify-content:space-between;display:flex}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{opacity:.5;background-color:#0000;border:none;padding:0;font-size:16px}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;grid-auto-columns:1fr;grid-auto-flow:column;display:grid;overflow:hidden}.rating-options-number .ratings-number{border-right:1px solid var(--ph-survey-border-color);text-align:center;cursor:pointer;color:var(--ph-survey-rating-text-color);border-top:none;border-bottom:none;border-left:none;font-weight:700}.rating-options-number .ratings-number:last-of-type{border-right:0}.rating-options-number .ratings-number.rating-active{background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb, var(--ph-survey-rating-active-bg-color) 14%, var(--ph-survey-rating-bg-color))}}.rating-text{opacity:.7;flex-direction:row;justify-content:space-between;font-size:11px;display:flex}.form-buttons{flex-direction:row;gap:8px;width:100%;display:flex}.form-buttons-with-back>.form-submit{flex:auto;min-width:0}.form-submit{text-align:center;cursor:pointer;user-select:none;background:var(--ph-survey-submit-button-color);color:var(--ph-survey-submit-button-text-color);border:none;border-radius:6px;min-width:100%;padding:12px;font-weight:700;box-shadow:0 2px #0000000b}.form-submit:not([disabled]):hover{transform:scale(1.02);box-shadow:0 4px 8px #0000001a}.form-submit:not([disabled]):active{transform:scale(.98);box-shadow:0 1px 2px #0000000d}.form-submit[disabled]{opacity:var(--ph-survey-disabled-button-opacity);cursor:not-allowed}.form-back{text-align:center;cursor:pointer;user-select:none;color:var(--ph-survey-text-primary-color);border:1.5px solid var(--ph-survey-border-color);background:0 0;border-radius:6px;flex:none;padding:12px 16px;font-weight:600}.form-back:hover{transform:scale(1.02)}.form-back:active{transform:scale(.98)}.validation-hint{opacity:.7;margin-top:4px;font-size:12px}.form-cancel{cursor:pointer;background:#fff;border-radius:100%;padding:12px;line-height:0;position:absolute;top:0;right:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%)scale(1.1)}.footer-branding{opacity:.6;justify-content:center;align-items:center;gap:4px;font-size:11px;font-weight:500;text-decoration:none;display:flex}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{opacity:.8;font-size:14px}.intro-screen{text-align:center;animation:.3s ease-out forwards ph-survey-fade-in}.intro-screen-header{margin:10px 0 0}.intro-screen-body{opacity:.8;font-size:14px}.limit-height{scrollbar-width:thin;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);max-height:256px;overflow:hidden auto}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb:hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (prefers-reduced-motion:reduce){.ph-survey *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg)scale(0)}50%{opacity:1;transform:rotate(45deg)scale(1.2)}to{opacity:1;transform:rotate(45deg)scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',e);return null==r||r.setAttribute("data-ph-survey-style","true"),r}(t);if(s){var u=l.querySelector("style");u&&l.removeChild(u),l.appendChild(s)}return(n||Xr.body).appendChild(a),{shadow:l,isNewlyCreated:!0}},at=r=>{var t=r.responses,n=r.survey,i=r.surveySubmissionId,o=r.posthog,a=r.isSurveyCompleted,l=r.properties,s=r.surveyLanguage,u=r.questionSnapshots;o?(Ar(n),o.capture("survey sent",e({[Fe]:n.name,[He]:n.id,[Ve]:n.current_iteration,[Ee]:n.current_iteration_start_date,[Be]:i,[Ae]:a},s&&{[De]:s},{sessionRecordingUrl:null==o.get_session_replay_url?void 0:o.get_session_replay_url()},qr(t,n,u),l,{$set:{[_r(n,"responded")]:!0}})),a&&(Jr.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:n.id}})),Ct(n),o.reloadFeatureFlags())):Er.error("[survey sent] event not captured, PostHog instance not found.")},lt=(r,t,n)=>{return e({[Fe]:r.name,[He]:r.id,[Ve]:r.current_iteration,[Ee]:r.current_iteration_start_date,[Ze]:(i=null==t?void 0:t.responses,void 0===i&&(i={}),Object.values(i).some(e=>!Ge(e)))},(null==t?void 0:t.surveyLanguage)&&{[De]:t.surveyLanguage},{sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url(),[Be]:null==t?void 0:t.surveySubmissionId},qr(null==t?void 0:t.responses,r,null==t?void 0:t.questionSnapshots));var i},st=(r,t,n,i)=>{if(t){if(!n){var o=kt(r),a=o?o.surveyLanguage:i;t.capture("survey dismissed",e({},lt(r,o,t),a&&{[De]:a},{$set:{[_r(r,"dismissed")]:!0}})),Ct(r),Ar(r),Jr.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:r.id}}))}}else Er.error("[survey dismissed] event not captured, PostHog instance not found.")},ut=(e,r)=>{if(r){var t=(e=>Zr("abandonedSurvey_",e))(e);try{if("true"===localStorage.getItem(t))return}catch(e){return}var n=kt(e);if(n){try{localStorage.setItem(t,"true")}catch(e){}r.capture("survey abandoned",lt(e,n,r),{transport:"sendBeacon"})}}else Er.error("[survey abandoned] event not captured, PostHog instance not found.")},ct=e=>e.map(e=>({sort:Math.floor(10*Math.random()),value:e})).sort((e,r)=>e.sort-r.sort).map(e=>e.value),dt=(e,r)=>e.length===r.length&&e.every((e,t)=>e===r[t])?r.reverse():r,vt=e=>{var r=e.map(e=>e.id);return r.every(e=>!!e)?r:void 0},pt=(e,r)=>{var t;return(e=>e.questions.some(e=>{var r;return!(null==(r=e.branching)||!r.type)}))(e)?e.questions:r?null!==(t=((e,r)=>{if(!r||r.length!==e.questions.length)return null;var t=new Map(e.questions.map(e=>[e.id,e])),n=[];for(var i of r){var o=t.get(i);if(!o)return null;n.push(o)}return n})(e,r.questionOrder))&&void 0!==t?t:e.questions:e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?dt(e.questions,ct(e.questions)):e.questions},ht=e=>function(e){var r;return Lr(e)&&!(null==(r=e.conditions)||null==(r=r.events)||!r.repeatedActivation)||"always"===e.schedule}(e)||St(e),ft=function(e){function r(e){var t,n;return this.getChildContext||(t=new Set,(n={})[r.__c]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,L(e)})},this.sub=function(e){t.add(e);var r=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),r&&r.call(e)}}),e.children}return r.__c="__cC"+f++,r.__=e,r.Provider=r.__l=(r.Consumer=function(e,r){return e.children(r)}).contextType=r,r}({isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed(){},isPopup:!0,onPreviewSubmit(){},onPreviewBack(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null}),yt=()=>de(ft),gt=e=>{var t=e.children,n=e.style;return function(e,t,n){var i,o,a,l,s=C({},e.props);for(a in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=void 0===t[a]&&null!=l?l[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),T(e.type,s,i||e.key,o||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:n}:{children:t,style:n})};function bt(e,r){var t,n;if(null==(t=e.conditions)||!t.url)return!0;var i,o,a,l,s=(o=r,l=null==hr||null==(a=hr.location)?void 0:a.href,Oe(l)?void 0:function(e,r){var t,n=null==e||null==(t=e.config)?void 0:t.get_current_url;if(!Ue(n))return r;try{var i=n(r);return $e(i)&&i?i:r}catch(e){return xr.error("Error in get_current_url, falling back to window.location.href",e),r}}(o,l));return!!s&&Vr[i=null==(n=e.conditions)?void 0:n.urlMatchType,null!=i?i:"icontains"]([e.conditions.url],[s])}function mt(e){var r,t;return function(e,r){var t,n,i;if(!e||0===e.length)return!0;if(!br)return!1;var o,a,l,s,u,c,d=(o={userAgentDataPlatform:null==yr||null==(t=yr.userAgentData)?void 0:t.platform,maxTouchPoints:null==yr?void 0:yr.maxTouchPoints,screenWidth:null==hr||null==(n=hr.screen)?void 0:n.width,screenHeight:null==hr||null==(i=hr.screen)?void 0:i.height,devicePixelRatio:null==hr?void 0:hr.devicePixelRatio},(c=function(e){return dr.test(e)?tr:cr.test(e)?nr:ur.test(e)?ir:new RegExp(ar,"i").test(e)?ar:new RegExp("(Windows Phone|WPDesktop)","i").test(e)?"Windows Phone":/iPad/.test(e)?er:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?rr:vr.test(e)?"BlackBerry":/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(or,"i").test(e)?or:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Ye).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?"Android":Xe:new RegExp("(pda|Mobile)","i").test(e)?lr:new RegExp(Je,"i").test(e)&&!new RegExp("Tablet pc","i").test(e)?sr:""}(br))===er||c===Xe||"Kobo"===c||"Kindle Fire"===c||c===sr?Je:c===tr||c===ir||c===nr||c===ar?"Console":c===rr?"Wearable":c?Ye:"Android"===(null==o?void 0:o.userAgentDataPlatform)&&(null!==(a=null==o?void 0:o.maxTouchPoints)&&void 0!==a?a:0)>0?600>Math.min(null!==(l=null==o?void 0:o.screenWidth)&&void 0!==l?l:0,null!==(s=null==o?void 0:o.screenHeight)&&void 0!==s?s:0)/(null!==(u=null==o?void 0:o.devicePixelRatio)&&void 0!==u?u:1)?Ye:Je:"Desktop");return Vr[null!=r?r:"icontains"](e,[d])}(null==(r=e.conditions)?void 0:r.deviceTypes,null==(t=e.conditions)?void 0:t.deviceTypesMatchType)}var xt=e=>Zr("inProgressSurvey_",e),wt=(e,r)=>{try{localStorage.setItem(xt(e),JSON.stringify(r))}catch(e){Er.error("Error setting in-progress survey state in localStorage",e)}},kt=e=>{try{var r=localStorage.getItem(xt(e));if(r)return JSON.parse(r)}catch(e){Er.error("Error getting in-progress survey state from localStorage",e)}return null},St=e=>{var r=kt(e);return!Ge(null==r?void 0:r.surveySubmissionId)},Ct=e=>{try{localStorage.removeItem(xt(e))}catch(e){Er.error("Error clearing in-progress survey state from localStorage",e)}};function qt(e,r){void 0===r&&(r=!1);var t="PostHogSurvey-"+e.id;return r?"."+t:t}function _t(e,r,t){if(void 0===r&&(r=ke),e===_e)return{};switch(r){case"top_left":return{top:"0",left:"0",transform:"translate(30px, 30px)"};case"top_right":return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case"top_center":return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case"middle_left":return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case"middle_right":return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case"middle_center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case xe:return{left:"30px"};case we:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===qe&&t===me?"60px":"30px"}}}var Tt=0;function Mt(e,r,n,i,o,a){r||(r={});var l,s,u=r;if("ref"in u)for(s in u={},r)"ref"==s?l=r[s]:u[s]=r[s];var c={type:e,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Tt,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===u[s]&&(u[s]=l[s]);return t.vnode&&t.vnode(c),c}var Pt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),It=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Nt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Lt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ht=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Mt("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ft=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Mt("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Vt=Mt("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Mt("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Et=Mt("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mt("g",{"clip-path":"url(#clip0_2415_6911)",children:[Mt("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Mt("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Mt("g",{mask:"url(#mask0_2415_6911)",children:[Mt("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Mt("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Mt("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Mt("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Mt("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Mt("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Mt("defs",{children:Mt("clipPath",{id:"clip0_2415_6911",children:Mt("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function Zt(e){var r=e.urlParams,t=r?Object.entries(r).map(e=>{var r=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(r)}).join("&"):"";return Mt("a",{href:"https://posthog.com/surveys"+(t?"?"+t:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Et]})}function Bt(e){var r=e.text,t=e.submitDisabled,n=e.appearance,i=e.onSubmit,o=e.link,a=e.onPreviewSubmit,l=e.skipSubmitButton,s=e.canGoBack,u=e.onBack,c=de(ft).isPreviewMode,d=!!s&&!!u,v=!l&&Mt("button",{className:"form-submit",disabled:t,"aria-label":"Submit survey",type:"button",onClick(){o&&(null==hr||hr.open(o)),c?null==a||a():i()},children:r});return Mt("div",{className:"bottom-section",children:[d?Mt("div",{className:"form-buttons form-buttons-with-back",children:[Mt("button",{className:"form-back",type:"button","aria-label":"Go to previous question",onClick:u,children:n.backButtonText||"Back"}),v]}):v,!n.whiteLabel&&Mt(Zt,{urlParams:{utm_source:"survey-footer"}})]})}function At(e){var r=e.question,t=e.forceDisableHtml;return Mt("div",{class:r.question||r.description?"question-header":"question-header question-header--empty",children:[Mt(r.type===Te?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:r.question}),r.description&>({component:_("p",{className:"survey-question-description"}),children:r.description,renderAsHtml:!t&&"text"!==r.descriptionContentType})]})}function Dt(e){var r,t,n;return Mt("button",{className:"form-cancel",onClick:e.onClick,disabled:de(ft).isPreviewMode,"aria-label":"Close survey",type:"button",children:(r={fill:"black"},t=(void 0===r?{}:r).fill,n=void 0===t?"currentColor":t,Mt("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:n,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Mt("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Mt("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:n})]}))})}var jt=hr;function Rt(e){var r=e.header,t=e.description,n=e.contentType,i=e.forceDisableHtml,o=e.appearance,a=e.onClose,l=de(ft).isPopup;return se(()=>{var e=e=>{"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),a())};return kr(jt,"keydown",e),()=>{jt.removeEventListener("keydown",e)}},[a]),Mt("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[l&&!0!==o.hideCancelButton&&Mt(Dt,{onClick:()=>a()}),Mt("h3",{className:"thank-you-message-header",children:r}),t&>({component:_("p",{className:"thank-you-message-body"}),children:t,renderAsHtml:!i&&"text"!==n}),l&&Mt(Bt,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:()=>a()})]})}function Qt(e){var r=e.header,t=e.description,n=e.contentType,i=e.forceDisableHtml,o=e.appearance,a=e.onStart,l=de(ft),s=l.onPreviewSubmit,u=l.onPopupSurveyDismissed;return Mt("div",{className:"intro-screen",role:"status",tabIndex:0,"aria-atomic":"true",children:[l.isPopup&&!0!==o.hideCancelButton&&Mt(Dt,{onClick:()=>u()}),r&&Mt("h3",{className:"intro-screen-header",children:r}),t&>({component:_("p",{className:"intro-screen-body"}),children:t,renderAsHtml:!i&&"text"!==n}),Mt(Bt,{text:o.introScreenButtonText||"Get started",submitDisabled:!1,appearance:o,onSubmit:a,onPreviewSubmit:()=>s(null)})]})}var zt=e=>ze(e)&&e.every(e=>$e(e));function Ut(e){var r=e.question,t=e.forceDisableHtml,n=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,a=e.displayQuestionIndex,l=e.initialValue,s=e.canGoBack,u=e.onBack,c=yt().isPreviewMode,d=ue(null),v=le(()=>$e(l)?l:""),p=v[0],h=v[1],f=null==n?void 0:n.disableAutofocus;se(()=>{f||setTimeout(()=>{var e;c||null==(e=d.current)||e.focus()},100)},[c,f]);var y="surveyQuestion"+a,g=ce(()=>function(e,r,t){var n,i,o=e.trim();if(!t&&""===o)return"This field is required";if(""===o)return!1;if(r&&r.length>0)for(var a of r)switch(a.type){case je:if(void 0!==a.value&&a.value>o.length)return null!==(n=a.errorMessage)&&void 0!==n?n:"Please enter at least "+a.value+" characters";break;case Re:if(void 0!==a.value&&o.length>a.value)return null!==(i=a.errorMessage)&&void 0!==i?i:"Please enter no more than "+a.value+" characters"}return!1}(p,r.validation,r.optional),[p,r.validation,r.optional]),b=pr(r.validation,je),m=pr(r.validation,Re),x=ce(()=>function(e,r){var t=1===e?void 0:e;return t&&r?"Enter "+t+"-"+r+" characters":t?"Enter at least "+t+" "+(1===t?"character":"characters"):r?"Maximum "+r+" "+(1===r?"character":"characters"):void 0}(b,m),[b,m]),w=()=>{g||i(p.trim())},k=()=>{g||o(p.trim())};return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:r,forceDisableHtml:t,htmlFor:y}),Mt("textarea",{ref:d,id:y,rows:4,placeholder:null==n?void 0:n.placeholder,minLength:b,maxLength:m,onInput(e){h(e.currentTarget.value),e.stopPropagation()},onKeyDown(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||g||(e.preventDefault(),c?k():w())},value:p}),x&&Mt("div",{className:"validation-hint",children:x})]}),Mt(Bt,{text:r.buttonText||"Submit",submitDisabled:!!g,appearance:n,onSubmit:w,onPreviewSubmit:k,canGoBack:s,onBack:u})]})}function Ot(e){var r=e.question,t=e.appearance,n=e.onSubmit,i=e.onPreviewSubmit,o=e.canGoBack,a=e.onBack;return Mt(M,{children:[Mt("div",{className:"question-container",children:Mt(At,{question:r,forceDisableHtml:e.forceDisableHtml})}),Mt(Bt,{text:r.buttonText||"Submit",submitDisabled:!1,link:r.link,appearance:t,onSubmit:()=>n("link clicked"),onPreviewSubmit:()=>i("link clicked"),canGoBack:o,onBack:a})]})}function $t(e){var r,t=e.question,n=e.forceDisableHtml,i=e.displayQuestionIndex,o=e.appearance,a=e.onSubmit,l=e.onPreviewSubmit,s=e.initialValue,u=e.canGoBack,c=e.onBack,d=t.scale,v=10===t.scale?0:1,p=le(()=>Ke(s)?s:ze(s)&&s.length>0&&Ke(parseInt(s[0]))?parseInt(s[0]):$e(s)&&Ke(parseInt(s))?parseInt(s):null),h=p[0],f=p[1],y="emoji"===t.display&&2===t.scale,g=yt().isPreviewMode,b=e=>g?l(e):a(e);return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:t,forceDisableHtml:n}),Mt("div",{className:"rating-section",children:[Mt("div",{className:"rating-options",children:["emoji"===t.display&&Mt("div",{className:"rating-options-emoji"+(y?" rating-options-emoji-2":""),children:null==(r=Xt[t.scale])?void 0:r.map((e,r)=>Mt("button",{"aria-label":"Rate "+(r+1),className:"ratings-emoji question-"+i+"-rating-"+r+" "+(r+1===h?"rating-active":""),value:r+1,type:"button",onClick(){var e=r+1;f(e),t.skipSubmitButton&&b(e)},children:e},r))}),"number"===t.display&&Mt("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(d-v+1)+", minmax(0, 1fr))"},children:en(t.scale).map((e,r)=>Mt(Wt,{displayQuestionIndex:i,active:h===e,appearance:o,num:e,setActiveNumber(e){f(e),t.skipSubmitButton&&b(e)}},r))})]}),!y&&Mt("div",{className:"rating-text",children:[Mt("div",{children:t.lowerBoundLabel}),Mt("div",{children:t.upperBoundLabel})]})]})]}),Mt(Bt,{text:t.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:We(h)&&!t.optional,appearance:o,onSubmit:()=>a(h),onPreviewSubmit:()=>l(h),skipSubmitButton:t.skipSubmitButton,canGoBack:u,onBack:c})]})}function Wt(e){var r=e.num,t=e.setActiveNumber;return Mt("button",{"aria-label":"Rate "+r,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+r+" "+(e.active?"rating-active":""),type:"button",onClick(){t(r)},children:r})}function Gt(r){var t=r.question,n=r.forceDisableHtml,i=r.displayQuestionIndex,o=r.appearance,a=r.onSubmit,l=r.onPreviewSubmit,s=r.initialValue,u=r.canGoBack,c=r.onBack,d=ue(null),v=ce(()=>(e=>{if(!e.shuffleOptions)return e.choices;var r=e.choices,t="";e.hasOpenChoice&&(t=r.pop());var n=dt(r,ct(r));return e.hasOpenChoice&&(e.choices.push(t),n.push(t)),n})(t),[t]),p=le(()=>((e,r)=>$e(e)||zt(e)?e:r===Pe?null:[])(s,t.type)),h=p[0],f=p[1],y=le(()=>((e,r)=>{if($e(e)&&!r.includes(e))return{isSelected:!0,inputValue:e};if(zt(e)){var t=e.find(e=>!r.includes(e));if(t)return{isSelected:!0,inputValue:t}}return{isSelected:!1,inputValue:""}})(s,v)),g=y[0],b=y[1],m=yt().isPreviewMode,x=t.type===Pe,w=t.type===Me,k=t.skipSubmitButton&&x&&!t.hasOpenChoice,S=(r,t)=>{if(t){var n=!g.isSelected;return b(r=>e({},r,{isSelected:n,inputValue:n?r.inputValue:""})),x&&f(""),void(n&&setTimeout(()=>{var e;return null==(e=d.current)?void 0:e.focus()},75))}if(x)return f(r),b(r=>e({},r,{isSelected:!1,inputValue:""})),void(k&&(a(r),m&&l(r)));w&&ze(h)&&(h.includes(r)?f(h.filter(e=>e!==r)):f([...h,r]))},C=r=>{r.stopPropagation();var t=r.currentTarget.value;b(r=>e({},r,{inputValue:t})),x&&f(t)},q=r=>{r.stopPropagation(),"Enter"!==r.key||_()||(r.preventDefault(),T()),"Escape"===r.key&&(r.preventDefault(),b(r=>e({},r,{isSelected:!1,inputValue:""})),x&&f(null))},_=()=>!(t.optional||!We(h)&&(!ze(h)||g.isSelected||0!==h.length)&&(!g.isSelected||""!==g.inputValue.trim())),T=()=>{g.isSelected&&w?ze(h)&&(m?l([...h,g.inputValue]):a([...h,g.inputValue])):m?l(h):a(h)};return Mt(M,{children:[Mt("div",{className:"question-container",children:[Mt(At,{question:t,forceDisableHtml:n}),Mt("fieldset",{className:"multiple-choice-options limit-height",children:[Mt("legend",{className:"sr-only",children:w?" Select all that apply":" Select one"}),v.map((e,r)=>{var n=!!t.hasOpenChoice&&r===t.choices.length-1,o="surveyQuestion"+i+"Choice"+r,a=o+"Open",l=n?g.isSelected:x?h===e:ze(h)&&h.includes(e);return Mt("label",{className:n?"choice-option-open":"",children:[Mt("div",{className:"response-choice",children:[Mt("input",{type:x?"radio":"checkbox",name:o,checked:l,onChange:()=>S(e,n),id:o,"aria-controls":a}),Mt("span",{children:n?e+":":e})]}),n&&Mt("input",{type:"text",ref:d,id:a,name:"question"+i+"Open",value:g.inputValue,onKeyDown:q,onInput:C,onClick(r){g.isSelected||S(e,!0),r.stopPropagation()},"aria-label":e+" - please specify"})]},r)})]})]}),Mt(Bt,{text:t.buttonText||"Submit",submitDisabled:_(),appearance:o,onSubmit:T,onPreviewSubmit:T,skipSubmitButton:k,canGoBack:u,onBack:c})]})}var Kt=[1,2,3,4,5],Yt=[1,2,3,4,5,6,7],Jt=[0,1,2,3,4,5,6,7,8,9,10],Xt={2:[Ft,Vt],3:[Nt,It,Pt],5:[Lt,Nt,It,Pt,Ht]};function en(e){switch(e){case 5:default:return Kt;case 7:return Yt;case 10:return Jt}}var rn=wr("[Surveys]");function tn(e,r,t){var n,i=e.questions[r],o=r+1;if(null==(n=i.branching)||!n.type)return r===e.questions.length-1?Ne:o;if(i.branching.type===Ne)return Ne;if("specific_question"===i.branching.type){if(Number.isInteger(i.branching.index))return i.branching.index}else if("response_based"===i.branching.type){if(i.type===Pe){var a,l=i.choices.indexOf(""+t);if(-1===l&&i.hasOpenChoice&&(l=i.choices.length-1),null!=(a=i.branching)&&null!=(a=a.responseValues)&&a.hasOwnProperty(l)){var s=i.branching.responseValues[l];return Number.isInteger(s)?s:s===Ne?Ne:o}}else if(i.type===Ie){var u;if("number"!=typeof t||!Number.isInteger(t))throw new Error("The response type must be an integer");var c=function(e,r){if(2===r){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===r){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===r){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===r){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===r){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(t,i.scale);if(null!=(u=i.branching)&&null!=(u=u.responseValues)&&u.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===Ne?Ne:o}}return o}return rn.warn("Falling back to next question index due to unexpected branching type"),o}var nn=wr("[SurveyTranslations]");function on(e,r){var t=function(e){return function(e,r){var t=e.storedPersonProperties,n=e.locale,i=Tr(e.overrideLanguage);if(i)return null==r||r.info("Using override display language: "+i),i;var o=function(e){return e&&"object"==typeof e&&"language"in e?Tr(e.language):null}(t);if(o)return null==r||r.info("Using person property language: "+o),o;var a=Tr(n);return a?(null==r||r.info("Using detected locale: "+a),a):(null==r||r.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:Ue(e.get_property)?e.get_property("$stored_person_properties"):void 0,locale:navigator.language||navigator.userLanguage},nn)}(r);if(!t)return nn.info("No user language detected"),{survey:e,language:null};var n=Nr(e,t,nn);return{survey:n.survey,language:n.matchedKey}}var an=hr,ln=gr,sn="ph:show_survey_widget",un="PHWidgetSurveyClickListener";function cn(e,r){try{var t=e.getBoundingClientRect(),n=an.innerHeight,i=an.innerWidth,o=t.left+t.width/2-r/2;o+r>i-20&&(o=i-r-20),20>o&&(o=20);var a=n-t.bottom,l=250>a&&t.top>a;return{position:"fixed",top:l?"auto":t.bottom+12+"px",left:o+"px",right:"auto",bottom:l?n-t.top+12+"px":"auto",zIndex:rt.zIndex}}catch(e){return Er.warn("Failed to calculate trigger position:",e),null}}var dn=class{constructor(r){var t=this;this.fi=new Map,this.pi=new Map,this.gi=new Map,this.mi=new Set,this.yi=null,this.bi=!1,this.wi=null,this.ki=null,this.Si=null,this.handlePageUnload=()=>{var e=this._posthog.get_property(jr);if(e)for(var r of e)St(r)&&ut(r,this._posthog)},this.handlePopoverSurvey=function(r,n,i){var o,a,l,s,u,c=(void 0===i?{}:i).resumeDelayFromActivation,d=void 0!==c&&c,v=t.xi(r),p=v.survey,h=v.language;t.yi=h,t.Si=null,t.Ci=n;var f=t.Mi(p,n);t.Ti(f.id);var y=null!=n?n:{},g=y.properties,b=y.initialResponses,m=!(!b||0>=Object.keys(b).length)&&t.Ii(f,b,g,h);if(!m||null!=(o=f.appearance)&&o.displayThankYouMessage){t.Ri(f);var x={};if((null==(a=f.appearance)?void 0:a.position)===Se&&null!=(l=f.appearance)&&l.widgetSelector){var w,k=ln.querySelector(f.appearance.widgetSelector);k&&(x=cn(k,parseInt((null==(w=f.appearance)?void 0:w.maxWidth)||rt.maxWidth))||{})}var S=(null==(s=f.appearance)?void 0:s.surveyPopupDelaySeconds)||0,C=ot(f,t._posthog).shadow;t.gi.set(C,C.host);var q={posthog:t._posthog,survey:f,removeSurveyFromFocus:t.Ai,properties:g,style:x,isSurveyCompleted:m,skipShownEvent:null==n?void 0:n.skipShownEvent,surveyLanguage:h};if(t.Si=q,0>=S)return t.bi=!0,K(Mt(yn,e({},q)),C);var _=()=>{if(!t.Ei(f))return Er.info("Survey "+f.id+" no longer eligible when its display delay elapsed; not displaying"),t.Ai(f);(()=>{t.bi=!0;var i=t.xi(r),o=i.survey,a=i.language;t.yi=a;var l=t.Mi(o,n),s=e({},q,{survey:l,surveyLanguage:a});t.Si=s,K(Mt(yn,e({},s,{survey:e({},l,{appearance:e({},l.appearance,{surveyPopupDelaySeconds:0})})})),C)})()},T=d?null==(u=t._posthog.surveys)||null==(u=u._surveyEventReceiver)||null==u.getActivationTimestamp?void 0:u.getActivationTimestamp(f.id):void 0,M=Ke(T)?Math.max(0,Date.now()-T):0,P=Math.max(0,1e3*S-M);if(0>=P)return _();var I=an.setTimeout(()=>{t.fi.delete(f.id),_()},P);t.fi.set(f.id,I)}},this.Li=e=>{var r=this.xi(e),t=r.survey,n=r.language,i=ot(t,this._posthog),o=i.shadow,a=i.isNewlyCreated;this.gi.set(o,o.host),a&&K(Mt(bn,{posthog:this._posthog,survey:t,surveyLanguage:n},e.id),o)},this.Oi=e=>{var r=this.pi.get(e);r&&(r.element.removeEventListener("click",r.listener),r.element.removeAttribute(un),this.pi.delete(e),Er.info("Removed click listener for survey "+e))},this.Di=e=>{this.Pi(e)||(this.Fi(e),this.Oi(e.id))},this.Pi=e=>{try{var r;return!(null==(r=ln.querySelector(qt(e,!0)))||null==(r=r.shadowRoot)||!r.querySelector(".ph-survey"))}catch(e){return!1}},this.Ni=(e,r)=>{var t=ln.querySelector(r),n=this.pi.get(e.id);if(t){if(this.Li(e),n){if(t===n.element)return;Er.info("Selector element changed for survey "+e.id+". Re-attaching listener."),this.Oi(e.id)}if(!t.hasAttribute(un)){var i=r=>{var t,n;r.stopPropagation();var i=(null==(t=e.appearance)?void 0:t.position)===Se?cn(r.currentTarget,parseInt((null==(n=e.appearance)?void 0:n.maxWidth)||rt.maxWidth)):{};an.dispatchEvent(new CustomEvent(sn,{detail:{surveyId:e.id,position:i}}))};kr(t,"click",i),t.setAttribute(un,"true"),this.pi.set(e.id,{element:t,listener:i,survey:e}),Er.info("Attached click listener for feedback button survey "+e.id)}}else n&&this.Di(e)},this.renderPopover=e=>{var r=this.xi(e),t=r.survey,n=r.language,i=ot(t,this._posthog).shadow;this.gi.set(i,i.host),K(Mt(yn,{posthog:this._posthog,survey:t,removeSurveyFromFocus:this.Ai,surveyLanguage:n}),i)},this.renderSurvey=(e,r,t)=>{var n,i=this.xi(e),o=i.survey,a=i.language,l=!1;null!=(n=this._posthog.config)&&null!=(n=n.surveys)&&n.prefillFromUrl&&(l=this.qi(o,a,t)),K(Mt(yn,{posthog:this._posthog,survey:o,removeSurveyFromFocus:this.Ai,isPopup:!1,properties:t,isSurveyCompleted:l,surveyLanguage:a}),r)},this.getActiveMatchingSurveys=function(e,r){var n;void 0===r&&(r=!1),null==(n=t._posthog)||null==(n=n.surveys)||n.getSurveys(r=>{e(r.filter(e=>t.Ei(e)))},r)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys(e=>{var r=e.filter(e=>e.type===Ce||e.type===qe),n=new Set(r.map(e=>e.id));for(var i of Array.from(t.fi.keys()))n.has(i)||t.cancelSurvey(i);var o=t.ji(r),a=new Set;o.forEach(e=>{if(e.type===qe){var r,n,i,o;if((null==(r=e.appearance)?void 0:r.widgetType)===me)return void t.Li(e);"selector"===(null==(n=e.appearance)?void 0:n.widgetType)&&null!=(i=e.appearance)&&i.widgetSelector&&(a.add(e.id),t.Ni(e,null==(o=e.appearance)?void 0:o.widgetSelector))}We(t.Bi)&&e.type===Ce&&t.handlePopoverSurvey(e,void 0,{resumeDelayFromActivation:!0})}),t.pi.forEach(e=>{var r=e.survey;a.has(r.id)||t.Di(r)})},e)},this.Ri=e=>{We(this.Bi)||Er.error("Survey "+this.Bi+" already in focus. Cannot add survey "+e.id+"."),this.Bi=e.id},this.Ai=e=>{this.Bi!==e.id&&Er.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),this.Ti(e.id),this.Bi=null,this.yi=null,this.bi=!1,this.Si=null,this.Ci=void 0,this.Fi(e)},this._posthog=r,this.Bi=null,this.wi=()=>this.Hi(),kr(an,"languagechange",this.wi),this.ki=r.onFeatureFlags(()=>this.Hi())}Hi(){var r;if(!We(this.Bi)){var t=null==(r=this._posthog.get_property(jr))?void 0:r.find(e=>e.id===this.Bi);if(t){var n=this.xi(t),i=n.survey,o=n.language;if(o!==this.yi&&(this.yi=o,this.bi)){var a=this.Mi(i,this.Ci),l=ot(a,this._posthog).shadow;K(Mt(yn,e({},this.Si,{posthog:this._posthog,survey:a,removeSurveyFromFocus:this.Ai,surveyLanguage:o})),l)}}}}get $i(){var e,r,t;return null!==(e=null==(r=(t=this._posthog).getExtension)?void 0:r.call(t,"featureFlags"))&&void 0!==e?e:this._posthog.featureFlags}Mi(r,t){return null!=t&&t.position||null!=t&&t.selector?e({},r,{appearance:e({},r.appearance,t.position&&{position:t.position},t.selector&&{widgetSelector:t.selector})}):r}Ti(e){var r=this.fi.get(e);r&&(clearTimeout(r),this.fi.delete(e))}cancelSurvey(e){this.fi.has(e)&&(Er.info("Cancelled pending survey "+e),this.Ti(e),this.Bi===e&&(this.Bi=null,this.yi=null,this.bi=!1,this.Si=null,this.Ci=void 0))}setAutomaticDisplayDispose(e){this.Ui=e}dispose(){var e;null==(e=this.Ui)||e.call(this),this.Ui=void 0,this.wi&&(an.removeEventListener("languagechange",this.wi),this.wi=null),this.ki&&(this.ki(),this.ki=null),this.fi.forEach((e,r)=>this.Ti(r)),this.pi.forEach((e,r)=>this.Oi(r)),this.gi.forEach((e,r)=>{K(null,r),null==e||e.remove()}),this.gi.clear(),this.Bi=null}ji(e){return e.sort((e,r)=>{var t,n,i=St(e),o=St(r);if(i&&!o)return-1;if(!i&&o)return 1;var a=e.schedule===Le,l=r.schedule===Le;return a&&!l?1:!a&&l?-1:((null==(t=e.appearance)?void 0:t.surveyPopupDelaySeconds)||0)-((null==(n=r.appearance)?void 0:n.surveyPopupDelaySeconds)||0)})}xi(e){return on(e,this._posthog)}qi(e,r,t){if(this.mi.has(e.id))return!1;var n=function(e){var r={},t=!1,n=e.replace(/^\?/,"");if(!n)return{params:r,autoSubmit:t};for(var i of n.split("&")){var o=i.split("="),a=o[0],l=o[1];if(a&&!Oe(l)){var s=decodeURIComponent(a),u=decodeURIComponent(l);if("auto_submit"!==s||"true"!==u){var c=s.match(/^q(\d+)$/);if(c){var d=parseInt(c[1],10);r[d]||(r[d]=[]),r[d].push(u)}}else t=!0}}return{params:r,autoSubmit:t}}(an.location.search).params;if(0===Object.keys(n).length)return!1;Er.info("[Survey Prefill] Detected URL prefill parameters");var i=this.zi(e,n,r);return!!i&&(this.Wi(e,i,t,r),this.mi.add(e.id),i.isSurveyCompleted)}Wi(e,r,t,n){var i=r.responses,o=r.submissionId,a=r.isSurveyCompleted,l=r.skippedResponses;(Object.keys(l).length>0&&e.enable_partial_responses||a)&&at({responses:a?i:l,survey:e,surveySubmissionId:o,posthog:this._posthog,isSurveyCompleted:a,properties:t,surveyLanguage:n})}Ii(e,r,t,n){var i={};for(var o of Object.entries(r)){var a=o[1];i[parseInt(o[0])]=ze(a)?a.map(String):[String(a)]}Er.info("[Survey] Processing initial responses");var l=this.zi(e,i,n);return!!l&&(this.Wi(e,l,t,n),l.isSurveyCompleted)}zi(e,r,t){try{var n=function(e,r){var t={};return e.questions.forEach((e,n)=>{if(r[n]&&e.id){var i=r[n],o=Sr(e.id);try{switch(e.type){case Pe:if(!e.choices||0===e.choices.length)return void xr.warn("[Survey Prefill] Question "+n+" has no choices");var a=parseInt(i[0],10);if(isNaN(a)||0>a||a>=e.choices.length)return void xr.warn("[Survey Prefill] Invalid choice index for q"+n+": "+i[0]);t[o]=e.choices[a];break;case Me:if(!e.choices||0===e.choices.length)return void xr.warn("[Survey Prefill] Question "+n+" has no choices");var l=i.map(e=>parseInt(e,10)).filter(r=>!isNaN(r)&&r>=0&&e.choices.length>r);if(0===l.length)return void xr.warn("[Survey Prefill] No valid choices for q"+n);var s=[...new Set(l.map(r=>e.choices[r]))];l.length>s.length&&xr.warn("[Survey Prefill] Removed duplicate choices for q"+n),t[o]=s;break;case Ie:var u=parseInt(i[0],10),c=e.scale||10;if(isNaN(u)||0>u||u>c)return void xr.warn("[Survey Prefill] Invalid rating for q"+n+": "+i[0]+" (scale: 0-"+c+")");t[o]=u;break;default:xr.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){xr.error("[Survey Prefill] Error converting q"+n+":",e)}}}),t}(e,r);if(0===Object.keys(n).length)return Er.warn("[Survey Prefill] No valid responses after conversion"),null;var i=$r(),o=function(e,r,t){for(var n=0,i={},o=[],a=e.questions.length+1,l=0;e.questions.length>n&&a>l&&(l++,r.includes(n));){var s=e.questions[n];if(!s||!("skipSubmitButton"in s)||!s.skipSubmitButton)break;if(s.id){var u=Sr(s.id);Oe(t[u])||(i[u]=t[u])}o.push(n);var c=tn(e,n,s.id?t[Sr(s.id)]:null);if(c===Ne)return{startQuestionIndex:e.questions.length,skippedResponses:i,skippedIndices:o};n=c}return{startQuestionIndex:n,skippedResponses:i,skippedIndices:o}}(e,Object.keys(r).map(e=>parseInt(e,10)),n),a=o.startQuestionIndex,l=o.skippedResponses,s=o.skippedIndices,u=a>=e.questions.length;return wt(e,{surveySubmissionId:i,responses:n,lastQuestionIndex:a,questionOrder:vt(e.questions),visitedIndices:s,surveyLanguage:t}),Er.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:n,submissionId:i,startQuestionIndex:a,isSurveyCompleted:u,skippedResponses:l}}catch(e){return Er.error("[Survey Prefill] Error handling prefill:",e),null}}Vi(e,r){if(void 0===r&&(r=void 0),!e)return!0;var t=this.$i,n=!(null==t||!t.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),i=!0;return r&&(i=(null==t?void 0:t.getFeatureFlag(e,{send_event:!1}))===r||"any"===r),n&&i}Zi(e){return!e.conditions||bt(e,this._posthog)&&mt(e)&&function(e){var r;return null==(r=e.conditions)||!r.selector||!(null==Xr||!Xr.querySelector(e.conditions.selector))}(e)}Gi(e){var r;return ht(e)?{satisfied:!0}:!e.internal_targeting_flag_key||!function(e){var r;return"recurring"===e.schedule||(null!==(r=e.current_iteration)&&void 0!==r?r:0)>0}(e)||null!=(r=this.$i)&&r.hasLoadedFlags?{satisfied:this.Vi(e.internal_targeting_flag_key)}:{satisfied:!1,reason:"Feature flags have not loaded yet; deferring internal targeting flag check"}}checkSurveyEligibility(e){var r,t,n={eligible:!0,reason:void 0};if(!function(e){return!(!e.start_date||e.end_date)}(e))return n.eligible=!1,n.reason="Survey is not running. It was completed on "+e.end_date,n;if(!Dr.includes(e.type))return n.eligible=!1,n.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",n;var i=null==(r=e.conditions)?void 0:r.linkedFlagVariant;if(!this.Vi(e.linked_flag_key,i))return n.eligible=!1,n.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",n;if(!this.Vi(e.targeting_flag_key))return n.eligible=!1,n.reason="Survey targeting feature flag is not enabled",n;var o,a=this.Gi(e);return a.satisfied?function(e,r){if(!e||!r)return!0;var t="string"==typeof r?new Date(r):r,n=Math.abs((new Date).getTime()-t.getTime());return Math.ceil(n/864e5)>e}(null==(t=e.conditions)?void 0:t.seenSurveyWaitPeriodInDays,Kr.li("lastSeenSurveyDate"))?(e=>!!Kr.li(Br(e))&&!ht(e))(e)?(n.eligible=!1,n.reason="Survey has already been seen and it can't be activated again",n):n:(n.eligible=!1,n.reason="Survey wait period has not passed",n):(n.eligible=!1,n.reason=null!==(o=a.reason)&&void 0!==o?o:"Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",n)}checkSurveyRenderability(e){var r=this.checkSurveyEligibility(e);return r.eligible&&!this.Qi(e)?{eligible:!1,reason:"Survey event/action trigger has not been fired yet"}:r}Qi(e){var r;return!Lr(e)&&!function(e){var r;return!(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)||!r.length)}(e)||!(null==(r=this._posthog.surveys)||null==(r=r._surveyEventReceiver)||null==(r=r.getSurveys())||!r.includes(e.id))}Ji(e){var r;return null==(r=e.feature_flag_keys)||!r.length||e.feature_flag_keys.every(e=>{var r=e.value;return!e.key||!r||this.Vi(r)})}Ei(e){return this.checkSurveyEligibility(e).eligible&&this.Zi(e)&&this.Qi(e)&&this.Ji(e)}Fi(e){try{var r=ln.querySelector(qt(e,!0));null!=r&&r.shadowRoot&&(K(null,r.shadowRoot),this.gi.delete(r.shadowRoot)),null==r||r.remove()}catch(r){Er.warn("Failed to remove survey "+e.id+" from DOM:",r)}}getTestAPI(){return{addSurveyToFocus:this.Ri,removeSurveyFromFocus:this.Ai,surveyInFocus:this.Bi,surveyTimeouts:this.fi,handleWidget:this.Li,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this.Ni,sortSurveysByAppearanceDelay:this.ji,checkFlags:this.Ji.bind(this),isSurveyFeatureFlagEnabled:this.Vi.bind(this),onLanguageChange:this.Hi.bind(this),currentLanguage:this.yi,surveyIsRendered:this.bi}}};function vn(e,r){if(ln&&an){var t,n=new dn(e);if(e.config.disable_surveys_automatic_display)return Er.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),n;if(!1===r)return Er.info("There are no surveys to load or Surveys is disabled in the project settings."),n;n.callSurveysAndEvaluateDisplayLogic(!0);var i=()=>{Oe(t)&&(t=setInterval(()=>{n.callSurveysAndEvaluateDisplayLogic(!1)},1e3))},o=()=>{Oe(t)||(clearInterval(t),t=void 0)};i();var a=()=>{ln.hidden?o():(n.callSurveysAndEvaluateDisplayLogic(!1),i())};return kr(ln,"visibilitychange",a),n.setAutomaticDisplayDispose(()=>{o(),ln.removeEventListener("visibilitychange",a)}),n}}function pn(e){var r=e.survey,t=e.removeSurveyFromFocus,n=void 0===t?()=>{}:t,i=e.setSurveyVisible,o=e.isPreviewMode,a=void 0!==o&&o,l=e.posthog;se(()=>{var e;if(!a&&null!=(e=r.conditions)&&e.url){var t=()=>{var e,t=r.type===qe,o=bt(r,l),a=(null==(e=r.appearance)?void 0:e.widgetType)===me&&t;if(!o)return Er.info("Hiding survey "+r.id+" because URL does not match"),i(!1),n(r);a&&(Er.info("Showing survey "+r.id+" because it is a feedback button tab and URL matches"),i(!0))};kr(an,"popstate",t),kr(an,"hashchange",t);var o=an.history.pushState,s=an.history.replaceState;return an.history.pushState=function(){for(var e=arguments.length,r=new Array(e),n=0;e>n;n++)r[n]=arguments[n];o.apply(this,r),t()},an.history.replaceState=function(){for(var e=arguments.length,r=new Array(e),n=0;e>n;n++)r[n]=arguments[n];s.apply(this,r),t()},()=>{an.removeEventListener("popstate",t),an.removeEventListener("hashchange",t),an.history.pushState=o,an.history.replaceState=s}}},[a,r,n,i,l])}var hn=200;function fn(e){switch(void 0===e&&(e="right"),e){case"top":return{top:"0",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case"bottom":return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function yn(r){var t,n,i,o,a,l,s,u,c,d,v,p,h=r.survey,f=r.forceDisableHtml,y=r.posthog,g=r.style,b=void 0===g?{}:g,m=r.previewPageIndex,x=r.removeSurveyFromFocus,w=void 0===x?()=>{}:x,k=r.isPopup,S=void 0===k||k,C=r.onPreviewSubmit,q=void 0===C?()=>{}:C,_=r.onPreviewBack,T=void 0===_?()=>{}:_,M=r.onPopupSurveyDismissed,P=void 0===M?()=>{}:M,I=r.onCloseConfirmationMessage,N=void 0===I?()=>{}:I,L=r.properties,H=r.isSurveyCompleted,F=r.skipShownEvent,V=r.surveyLanguage,E=ue(null),Z=Number.isInteger(m),B=function(r,t,n,i,o,a,l,s,u){var c=le(i||0===n||r.type===_e),d=c[0],v=c[1],p=le(!1),h=p[0],f=p[1],y=ue(!1),g=()=>{var e=()=>{a&&o(r),v(!1)};if(!y.current){var t=null==l?void 0:l.current;t?(y.current=!0,t.style.transition="opacity "+hn+"ms ease-out",t.style.opacity="0",setTimeout(()=>{y.current=!1,e()},250)):e()}},b=e=>{e.detail.surveyId===r.id&&g()};return se(()=>{if(t){if(!i){var o,a=e=>{var t,n;if(e.detail.surveyId===r.id){if(null==(t=r.appearance)||!t.displayThankYouMessage)return g();f(!0),null!=(n=r.appearance)&&n.autoDisappear&&(o&&clearTimeout(o),o=setTimeout(g,5e3))}},l=()=>{if(bt(r,t)){v(!0),an.dispatchEvent(new Event("PHSurveyShown")),s||t.capture("survey shown",e({[Fe]:r.name,[He]:r.id,[Ve]:r.current_iteration,[Ee]:r.current_iteration_start_date},u&&{[De]:u},{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()}));try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}};kr(an,"PHSurveyClosed",b),kr(an,"PHSurveySent",a);var c=n>0?setTimeout(l,n):void 0;return Oe(c)&&l(),()=>{Oe(c)||clearTimeout(c),Oe(o)||clearTimeout(o),an.removeEventListener("PHSurveyClosed",b),an.removeEventListener("PHSurveySent",a)}}}else Er.error("usePopupVisibility hook called without a PostHog instance.")},[]),pn({survey:r,removeSurveyFromFocus:o,setSurveyVisible:v,isPreviewMode:i,posthog:t}),{isPopupVisible:d,isSurveySent:h,setIsPopupVisible:v,hidePopupWithAnimation:g}}(h,y,null!=(t=h.appearance)&&t.surveyPopupDelaySeconds?1e3*h.appearance.surveyPopupDelaySeconds:0,Z,w,S,E,F,V),A=B.isPopupVisible,D=B.hidePopupWithAnimation,j=B.isSurveySent||m===h.questions.length||!0===H,R=le(!1),Q=R[0],z=R[1],U=ce(()=>!!kt(h),[h]),O=!!(null!=(n=h.appearance)&&n.introScreenHeader||null!=(i=h.appearance)&&i.introScreenDescription),W=Z?-1===m:!(null==(o=h.appearance)||!o.displayIntroScreen)&&O&&!Q&&!U,G=ce(()=>{var e,r=(null==(e=kt(h))?void 0:e.surveySubmissionId)||$r();return{isPreviewMode:Z,previewPageIndex:m,onPopupSurveyDismissed(){V?st(h,y,Z,V):st(h,y,Z),P()},isPopup:S||!1,surveySubmissionId:r,onPreviewSubmit:q,onPreviewBack:T,posthog:y,properties:L,surveyLanguage:V}},[Z,m,S,y,h,P,q,T,L,V]);return A?Mt(ft.Provider,{value:G,children:Mt("div",{className:"ph-survey",style:e({},_t(h.type,null==(a=h.appearance)?void 0:a.position,null==(l=h.appearance)?void 0:l.widgetType),b),ref:E,children:j?Mt(Rt,{header:(null==(s=h.appearance)?void 0:s.thankYouMessageHeader)||"Thank you!",description:(null==(u=h.appearance)?void 0:u.thankYouMessageDescription)||"",forceDisableHtml:!!f,contentType:null==(c=h.appearance)?void 0:c.thankYouMessageDescriptionContentType,appearance:h.appearance||rt,onClose(){D(),N()}}):W?Mt(Qt,{header:(null==(d=h.appearance)?void 0:d.introScreenHeader)||"",description:(null==(v=h.appearance)?void 0:v.introScreenDescription)||"",forceDisableHtml:!!f,contentType:null==(p=h.appearance)?void 0:p.introScreenDescriptionContentType,appearance:h.appearance||rt,onStart:()=>z(!0)}):Mt(gn,{survey:h,forceDisableHtml:!!f,posthog:y})})}):null}function gn(r){var t,n,i=r.survey,o=r.forceDisableHtml,a=r.posthog,l=ce(()=>{var e=kt(i);if(!e)return null;var r=Ke(e.lastQuestionIndex);return!r||r&&e.lastQuestionIndex>=0&&i.questions.length>e.lastQuestionIndex?e:(Ct(i),null)},[i]),s=le(()=>(null!=l&&l.responses&&Er.info("Survey is already in progress, filling in initial responses"),(null==l?void 0:l.responses)||{})),u=s[0],c=s[1],d=de(ft),v=d.previewPageIndex,p=d.onPopupSurveyDismissed,h=d.isPopup,f=d.onPreviewSubmit,y=d.onPreviewBack,g=d.surveySubmissionId,b=d.isPreviewMode,m=d.properties,x=d.surveyLanguage,w=le(()=>{var e=null==l?void 0:l.lastQuestionIndex,r=Ke(e)&&e>=0&&i.questions.length>e?e:0;return Ke(v)&&v>=0?v:r}),k=w[0],S=w[1],C=le(()=>{var e;return(null!==(e=null==l?void 0:l.visitedIndices)&&void 0!==e?e:[]).filter(e=>e>=0&&i.questions.length>e)}),q=C[0],_=C[1],T=le(()=>{var e,r;return null!==(e=null==(r=kt(i))?void 0:r.questionSnapshots)&&void 0!==e?e:{}}),M=T[0],P=T[1],I=ce(()=>vt(pt(i,l)),[i.id,l]),N=ce(()=>{if(!I||new Set(I).size!==I.length)return pt(i,l);var e=new Map(i.questions.map(e=>[e.id,e])),r=I.map(r=>e.get(r)).filter(e=>!!e);return r.length===I.length?r:i.questions},[I,i.questions,i,l]);se(()=>{!b||Oe(v)||0>v||S(v)},[v,b]);var L=!(null==(t=i.appearance)||!t.allowGoBack)&&(b?(null!=v?v:0)>0:q.length>0),H=N.at(k);return H?Mt("form",{className:"survey-form",name:"surveyForm",children:[h&&!0!==(null==(n=i.appearance)?void 0:n.hideCancelButton)&&Mt(Dt,{onClick(){p()}}),Mt("div",{className:"survey-box","data-question-index":k,children:mn({question:H,forceDisableHtml:o,displayQuestionIndex:k,appearance:i.appearance||rt,onSubmit:r=>(r=>{var t=r.res,n=r.displayQuestionIndex,o=r.questionId;if(a)if(o){var l=Sr(o),s=e({},u,{[l]:t});c(s);var d=N[n],v=null!=d&&d.id?e({},M,{[d.id]:d.question}):M;P(v);var p=tn(i,n,t),h=p===Ne,f=[...q,n];if(h||(_(f),S(p),wt(i,{surveySubmissionId:g,responses:s,lastQuestionIndex:p,questionOrder:vt(N),visitedIndices:f,surveyLanguage:x,questionSnapshots:v})),i.enable_partial_responses||h){var y=new Set(f.map(e=>{var r;return null==(r=N[e])?void 0:r.id}).filter(e=>!!e).map(e=>Sr(e)));at({responses:Object.fromEntries(Object.entries(s).filter(e=>y.has(e[0]))),survey:i,surveySubmissionId:g,isSurveyCompleted:h,posthog:a,properties:m,surveyLanguage:x,questionSnapshots:v})}}else Er.error("onNextButtonClick called without a questionId.");else Er.error("onNextButtonClick called without a PostHog instance.")})({res:r,displayQuestionIndex:k,questionId:H.id}),onPreviewSubmit:f,initialValue:H.id?u[Sr(H.id)]:void 0,canGoBack:L,onBack(){if(b)y();else if(0!==q.length){var e=q[q.length-1],r=q.slice(0,-1);_(r),S(e),wt(i,{surveySubmissionId:g,responses:u,lastQuestionIndex:e,questionOrder:vt(N),visitedIndices:r,surveyLanguage:x,questionSnapshots:M})}}})})]}):null}function bn(e){var r,t,n,i,o,a,l,s=e.survey,u=e.forceDisableHtml,c=e.posthog,d=e.readOnly,v=e.surveyLanguage,p=le(!0),h=p[0],f=p[1],y=le(!1),g=y[0],b=y[1],m=le({}),x=m[0],w=m[1],k=ue(void 0),S=()=>{b(!g)};if(se(()=>{var e;if(c){if(!d){"tab"===(null==(e=s.appearance)?void 0:e.widgetType)&&w({top:"50%",bottom:"auto"});var r=e=>{var r,t=e;(null==(r=t.detail)?void 0:r.surveyId)===s.id&&(Er.info("Received show event for feedback button survey "+s.id),w(t.detail.position||{}),S())};return kr(an,sn,r),()=>{Oe(k.current)||(clearTimeout(k.current),k.current=void 0),an.removeEventListener(sn,r)}}}else Er.error("FeedbackWidget called without a PostHog instance.")},[c,d,s.id,null==(r=s.appearance)?void 0:r.widgetType,null==(t=s.appearance)?void 0:t.widgetSelector,null==(n=s.appearance)?void 0:n.borderColor]),pn({survey:s,setSurveyVisible:f,posthog:c}),!h)return null;var C=()=>{s.schedule!==Le&&f(!1),Oe(k.current)||clearTimeout(k.current),k.current=setTimeout(()=>{k.current=void 0,b(!1)},200)};return Mt(M,{children:["tab"===(null==(i=s.appearance)?void 0:i.widgetType)&&Mt("button",{className:"ph-survey-widget-tab "+("top"===(null==(o=s.appearance)?void 0:o.tabPosition)?"widget-tab-top":""),onClick:S,disabled:d,style:fn(null==(a=s.appearance)?void 0:a.tabPosition),children:(null==(l=s.appearance)?void 0:l.widgetLabel)||""}),g&&Mt(yn,{posthog:c,survey:s,forceDisableHtml:u,style:x,onPopupSurveyDismissed:C,onCloseConfirmationMessage:C,surveyLanguage:v})]})}var mn=r=>{var t=r.question,n=r.displayQuestionIndex,i=r.onSubmit,o=r.onPreviewSubmit,a={forceDisableHtml:r.forceDisableHtml,appearance:r.appearance,onPreviewSubmit(e){o(e)},onSubmit(e){i(e)},initialValue:r.initialValue,displayQuestionIndex:n,canGoBack:r.canGoBack,onBack:r.onBack};switch(t.type){case Te:return _(Ut,e({},a,{question:t,key:t.id}));case"link":return _(Ot,e({},a,{question:t,key:t.id}));case Ie:return _($t,e({},a,{question:t,key:t.id}));case Pe:case Me:return _(Gt,e({},a,{question:t,key:t.id}));default:return Er.error("Unsupported question type: "+t.type),null}},xn="undefined"!=typeof globalThis?globalThis:hr;xn&&"undefined"==typeof self&&(xn.self=xn),xn&&"undefined"==typeof File&&(xn.File=function(){});var wn=null!=hr?hr:{};wn.__PosthogExtensions__=wn.__PosthogExtensions__||{},wn.__PosthogExtensions__.generateSurveys=vn,wn.extendPostHogWithSurveys=vn}()}();
|
|
2
2
|
//# sourceMappingURL=surveys.js.map
|
package/lib/package.json
CHANGED
|
@@ -103,7 +103,6 @@ var ENTITY_RULES = {
|
|
|
103
103
|
aggregateRating: ['AggregateRating'],
|
|
104
104
|
brand: ['Brand'],
|
|
105
105
|
},
|
|
106
|
-
Person: {},
|
|
107
106
|
Place: {
|
|
108
107
|
aggregateRating: ['AggregateRating'],
|
|
109
108
|
},
|
|
@@ -146,9 +145,7 @@ var ENTITY_RULES = {
|
|
|
146
145
|
itemListElement: ANY_ENTITY_TYPES,
|
|
147
146
|
},
|
|
148
147
|
};
|
|
149
|
-
var EMPTY_ENTITY_RULES = {};
|
|
150
148
|
var INHERITED_RULE_GROUPS = [
|
|
151
|
-
[ACTION_TYPES, EMPTY_ENTITY_RULES],
|
|
152
149
|
[
|
|
153
150
|
'3DModel AboutPage Answer Article AudioObject Blog BlogPosting Book Clip CollectionPage Comment ContactPage Course CreativeWorkSeason CreativeWorkSeries DataCatalog DataDownload DataFeed Dataset DiscussionForumPosting Episode FAQPage Game HowTo HowToDirection HowToSection HowToStep HowToTip ImageObject LearningResource MediaObject Message MobileApplication Movie MusicPlaylist MusicRecording NewsArticle Photograph PodcastEpisode PodcastSeries ProfilePage QAPage Question Quiz Recipe Review ScholarlyArticle SearchResultsPage SiteNavigationElement SocialMediaPosting SoftwareApplication TVEpisode TVSeries TechArticle VacationRental VideoGame VideoObject WebApplication WebPage WebPageElement WebSite'.split(' '),
|
|
154
151
|
ENTITY_RULES.CreativeWork,
|
|
@@ -160,9 +157,7 @@ var INHERITED_RULE_GROUPS = [
|
|
|
160
157
|
[ORGANIZATION_TYPES, ENTITY_RULES.Organization],
|
|
161
158
|
[PLACE_TYPES, ENTITY_RULES.Place],
|
|
162
159
|
['Car IndividualProduct ProductGroup ProductModel'.split(' '), ENTITY_RULES.Product],
|
|
163
|
-
['AggregateRating EmployerAggregateRating Rating'.split(' '), EMPTY_ENTITY_RULES],
|
|
164
160
|
];
|
|
165
|
-
var TYPES_WITHOUT_PROPERTIES = 'AlignmentObject BedDetails Certification ContactPoint CreditCard DefinedRegion EducationalOccupationalCredential EntryPoint GeoCoordinates GeoShape InteractionCounter JobPosting LocationFeatureSpecification MathSolver MemberProgram MemberProgramTier MerchantReturnPolicy MerchantReturnPolicySeasonalOverride MonetaryAmount NutritionInformation OccupationalExperienceRequirements OfferShippingDetails OpeningHoursSpecification PeopleAudience PostalAddress PriceSpecification PropertyValue QuantitativeValue ServicePeriod ShippingConditions ShippingDeliveryTime ShippingRateSettings ShippingService SpeakableSpecification Thing UnitPriceSpecification'.split(' ');
|
|
166
161
|
exports.JSON_LD_EVENT_TAG = '$json_ld';
|
|
167
162
|
function getOwnProperty(value, property) {
|
|
168
163
|
return core_1.hasOwnProperty.call(value, property) ? value[property] : undefined;
|
|
@@ -211,7 +206,7 @@ function getEntityRules(type) {
|
|
|
211
206
|
}
|
|
212
207
|
finally { if (e_1) throw e_1.error; }
|
|
213
208
|
}
|
|
214
|
-
return
|
|
209
|
+
return undefined;
|
|
215
210
|
}
|
|
216
211
|
function getEntityTypes(value) {
|
|
217
212
|
var e_2, _a;
|