freemium-survey-components 0.15.3 → 0.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react"),t=e(n),o=require("react-transition-group"),r=e(require("react-dom"));function s(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}s(".freemium-survey-components {\n --choice-background-color: #ebeff3;\n}\n.freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--choice-background-color);\n padding-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n color: #12344d;\n}\n.freemium-survey-components .nps-container .footer:empty {\n display: none;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n flex-direction: column;\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n}\n.freemium-survey-components .nps-container .nps-scale .help-text-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n color: #12344d;\n bottom: -40px;\n font-size: 12px;\n right: 0px;\n text-align: right;\n}\n.freemium-survey-components .nps-container .nps-scale .negative-text {\n color: #12344d;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\n}\n.freemium-survey-components .nps-container .nps-scale .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n font-weight: 500;\n border-radius: 4px;\n}\n.freemium-survey-components .nps-container .nps-scale .choice {\n background: var(--choice-background-color);\n}\n.freemium-survey-components .nps-container .nps-scale span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .nps-scale button {\n display: inline-block;\n font-size: 1rem;\n white-space: nowrap;\n vertical-align: middle;\n background: none;\n border: none;\n box-shadow: none;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n border-radius: 4px;\n margin: 0;\n outline: none;\n margin-left: -1px;\n width: 40px;\n height: 40px;\n transform: scale(1);\n padding: 0;\n}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, border-color 0.2s ease-in, transform 0.2s cubic-bezier(0.5, 2, 0.5, 0.75);\n}\n.freemium-survey-components .nps-container .nps-scale button:hover, .freemium-survey-components .nps-container .nps-scale button:focus {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .nps-scale.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .nps-scale.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .nps-scale.highlighted button:hover, .freemium-survey-components .nps-container .nps-scale.highlighted button:focus, .freemium-survey-components .nps-container .nps-scale.highlighted button.active {\n background: var(--default-brand-color) !important;\n background: var(--brand-color, var(--default-brand-color)) !important;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n background: rgba(228, 62, 61, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(2) {\n background: rgba(0, 175, 80, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(4) {\n background: rgba(248, 196, 62, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:hover, .freemium-survey-components .nps-container .nps-scale.standard .choice.active {\n background: rgb(228, 62, 61);\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(2), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(2), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(2) {\n background: rgb(0, 175, 80);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(4), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(4), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(4) {\n background: rgb(248, 196, 62);\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .choices {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-row-gap: 6px;\n row-gap: 6px;\n grid-column-gap: 6px;\n -moz-column-gap: 6px;\n column-gap: 6px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n background: var(--choice-background-color);\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .choices,\n .card-survey-style .nps-container .nps-scale .choices {\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale .choices,\n .card-survey-style .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-row-gap: 6px;\n row-gap: 6px;\n grid-column-gap: 6px;\n -moz-column-gap: 6px;\n column-gap: 6px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n .card-survey-style .nps-container .nps-scale button {\n background: var(--choice-background-color);\n }\n .freemium-survey-components .nps-container .nps-scale button:hover, .freemium-survey-components .nps-container .nps-scale button:focus,\n .card-survey-style .nps-container .nps-scale button:hover,\n .card-survey-style .nps-container .nps-scale button:focus {\n color: unset;\n transform: unset;\n z-index: unset;\n position: unset;\n }\n .freemium-survey-components .nps-container .nps-scale.highlighted button:hover, .freemium-survey-components .nps-container .nps-scale.highlighted button:focus, .freemium-survey-components .nps-container .nps-scale.standard button:hover, .freemium-survey-components .nps-container .nps-scale.standard button:focus,\n .card-survey-style .nps-container .nps-scale.highlighted button:hover,\n .card-survey-style .nps-container .nps-scale.highlighted button:focus,\n .card-survey-style .nps-container .nps-scale.standard button:hover,\n .card-survey-style .nps-container .nps-scale.standard button:focus {\n background: var(--choice-background-color) !important;\n }\n}\n.widget-survey-components .nps-container .nps-scale .choices {\n background: transparent;\n}\n.widget-survey-components .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.widget-survey-components .nps-container .nps-scale button {\n border-radius: 50%;\n background: var(--choice-background-color);\n}");const i=e=>{const{type_info:{linear_scale:{button_style:o="highlighted",button_shape:r="rounded"}={},rating_presets:{start:s="Very unlikely",end:i="Very likely"}={},validation:{min:a},footer_text:c}}=e,l=e=>{switch(e){case e<=6:return"detractor";case e<=8:return"passive";default:return"promoter"}},u=n.useRef(Array.from({length:10+(0===a?1:0)},((e,n)=>n+a)));return t.createElement("div",{className:"nps-container","data-test-input":"nps"},t.createElement("div",{className:`nps-scale ${r} ${o}`},t.createElement("div",{className:"button-container"},t.createElement("div",{className:"choices",role:"radiogroup","aria-required":!0},u.current.map((n=>t.createElement("button",{role:"radio","aria-checked":e.npsValue===n,key:n,"data-test-nps-choice":n,onClick:t=>{e.onChangeHandler(n)},className:`choice ${l(n)} ${e.npsValue===n&&"active"}`},n)))),t.createElement("div",{className:"help-text-container"},t.createElement("span",{className:"negative-text",role:"note"},`${a} - ${s}`),t.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${i}`)))),t.createElement("div",{className:"footer",role:"note"},c))},a=(e,n)=>(e.defaultProps=n,e);s('.freemium-survey-components .input-container,\n.freemium-survey-components .textarea-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n border-radius: 4px;\n position: relative;\n}\n.freemium-survey-components label.input-label {\n display: inline-block;\n padding-bottom: 8px;\n padding-left: 2px;\n font-size: 0.75rem;\n font-weight: 400;\n}\n.freemium-survey-components label.required::after {\n content: "*";\n position: relative;\n top: 2px;\n font-weight: 500;\n font-size: 0.85rem;\n padding-left: 3px;\n color: #d72d30;\n}\n.freemium-survey-components .input-basic {\n width: 100%;\n display: flex;\n align-items: center;\n border-radius: 4px;\n border: 1px solid var(--default-brand-color);\n border: 1px solid var(--brand-color, var(--default-brand-color));\n transition: border-color 0.2s linear;\n background: #fff;\n}\n.freemium-survey-components .textarea-container .input-basic {\n flex-direction: column;\n align-items: unset;\n}\n.freemium-survey-components .input-basic.error {\n border: 1px solid #d72d30;\n}\n.freemium-survey-components .input-basic.error:hover {\n border: 1px solid #d72d30;\n}\n.freemium-survey-components .input-basic.error[focus-within] {\n box-shadow: none;\n}\n.freemium-survey-components .input-basic.error:focus-within {\n box-shadow: none;\n}\n.freemium-survey-components .input-basic:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n transition: 0.2s linear;\n}\n.freemium-survey-components .input-basic[focus-within] {\n border: 1px solid transparent;\n box-shadow: 0 0 0 2px var(--default-brand-color);\n box-shadow: 0 0 0 2px var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .input-basic:focus-within {\n border: 1px solid transparent;\n box-shadow: 0 0 0 2px var(--default-brand-color);\n box-shadow: 0 0 0 2px var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .input-basic[focus-within] .end-max-length {\n opacity: 1;\n}\n.freemium-survey-components .input-basic:focus-within .end-max-length {\n opacity: 1;\n}\n.freemium-survey-components .end-max-length {\n transition: opacity ease 0.2s;\n opacity: 0;\n padding: 0 8px;\n font-size: 0.75rem;\n color: #264966;\n}\n.freemium-survey-components .textarea-container .end-max-length {\n padding: 8px;\n align-self: flex-end;\n}\n.freemium-survey-components span.input-error {\n display: block;\n padding-left: 2px;\n padding-top: 4px;\n font-size: 0.9rem;\n color: #d72d30;\n}\n.freemium-survey-components input[type=text] {\n padding: 6px 12px;\n flex: 1;\n border: unset;\n height: 32px;\n font-size: 1rem;\n min-width: 0;\n /* line-height: ${typography.input.text.lineHeight}; */\n border-radius: 4px;\n}\n.freemium-survey-components input[type=text],\n.freemium-survey-components textarea {\n outline: none;\n border: none;\n}\n.freemium-survey-components input[type=text]:focus,\n.freemium-survey-components textarea:focus {\n box-shadow: none !important;\n}\n.freemium-survey-components input[type=text]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]::placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components textarea {\n min-height: 116px;\n padding: 12px;\n flex: 1;\n border: unset;\n resize: none;\n font-size: 1rem;\n min-width: 0;\n /* line-height: ${typography.input.text.lineHeight}; */\n border-radius: 4px;\n}\n.freemium-survey-components textarea::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components textarea::placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}');const c=["RANGE","NPS"],l="Others",u=300,m={default:500,compact:500,cozy:400},d={default:"600px",compact:"350px",cozy:"96%"},p={isRequired:!1,showCount:!0,isErrored:!1,inline:!1,spellCheck:!1},f=n.forwardRef(((e,o)=>{const r=n.useRef(null);n.useEffect((()=>{setTimeout((()=>{r.current?.focus()}),u+(e.autoFocusDelay??0))}),[]);const{inputStyle:s,style:i,className:a,showCount:c,isErrored:l,startLabel:m,isRequired:d,errorText:p,endLabel:f,maxLength:v=256,onChange:y,...h}=e;return t.createElement("div",{className:"input-container",style:i},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),t.createElement(t.Fragment,null,m&&t.createElement("div",{className:"start-label"},m),t.createElement("div",{className:`input-basic ${l?"error":""}${a||""}`},t.createElement("input",{...h,onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),type:"text",autoComplete:"off",ref:r,style:s,onChange:e=>{e.target.value?.length>v||y?.(e)}}),c&&v>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${v}`)),f&&t.createElement("div",{className:"end-label"},f)),l&&p&&t.createElement("span",{className:"input-error"},e.errorText))})),v=n.forwardRef(((e,o)=>{const r=n.useRef(null);n.useEffect((()=>{setTimeout((()=>{r.current?.focus()}),u+(e.autoFocusDelay??0))}),[]);const{inputStyle:s,style:i,className:a,showCount:c,maxLength:l=1500,startLabel:m,isRequired:d,onChange:p,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:i},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),m&&t.createElement("div",{className:"start-label"},m),t.createElement("div",{className:`input-basic ${a||""}`},t.createElement("textarea",{...f,onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),autoComplete:"off",ref:r,style:s,onChange:e=>{e.target.value?.length>l||p?.(e)}}),c&&l&&l>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${l}`)),e.endLabel&&t.createElement("div",{className:"end-label"},e.endLabel)))})),y=a(f,p),h=a(v,p);s('.freemium-survey-components .checkbox-group {\n width: 100%;\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n flex-direction: column;\n white-space: nowrap;\n flex-wrap: wrap;\n}\n.freemium-survey-components .icon-container {\n display: inline-block;\n flex: 0 0 12px;\n width: 12px;\n height: 12px;\n min-width: 12px;\n min-height: 12px;\n color: inherit;\n position: absolute;\n left: 1px;\n top: 2px;\n}\n.freemium-survey-components .tick-icon {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n width: 100%;\n color: inherit;\n fill: currentColor;\n}\n.freemium-survey-components input[type=checkbox] {\n position: absolute;\n clip: rect(0px 0px 0px 0px);\n width: 0px;\n height: 0px;\n}\n.freemium-survey-components input[type=checkbox]:focus ~ .checkbox {\n /* box-shadow: ${pseudo.focus} 0px 0px 0px 2px; */\n box-shadow: var(--default-brand-color) 0px 0px 0px 2px;\n box-shadow: var(--brand-color, var(--default-brand-color)) 0px 0px 0px 2px;\n border-color: transparent;\n}\n.freemium-survey-components .checkbox-label {\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: left;\n opacity: 1;\n line-height: 1.2;\n cursor: pointer;\n font-size: 1rem;\n padding: 16px 24px;\n min-width: 200px;\n border: 1px solid #ebeff3;\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover {\n border-color: #92a2b1;\n}\n.freemium-survey-components .checkbox-label.disabled {\n opacity: 0.5;\n cursor: "not-allowed";\n}\n.freemium-survey-components .checkbox {\n transition: background-color ease-in 0.2s;\n min-width: 14px;\n min-height: 14px;\n min-height: 14px;\n max-height: 14px;\n border-radius: 2px;\n position: relative;\n margin-right: 16px;\n background-color: #fff;\n border: 1px solid;\n text-align: left;\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .checkbox:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n box-shadow: var(--default-background-color) 0px 0px 0px 5px;\n box-shadow: var(--background-color, var(--default-background-color)) 0px 0px 0px 5px;\n}\n.freemium-survey-components input[type=checkbox]:checked ~ .checkbox {\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components input[type=checkbox]:checked ~ .checkbox:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components input[type=checkbox]:disabled ~ .checkbox:hover {\n box-shadow: unset;\n border-color: unset;\n}');const g=()=>t.createElement("svg",{id:"tick",className:"tick-icon",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"title",viewBox:"0 0 10 10"},t.createElement("path",{d:"M3 5.87c-.18666814.00267463-.36667109-.06932655-.5-.2L.21 3.41c-.1786328-.17863279-.24839684-.43899577-.1830127-.6830127.06538414-.24401694.25598306-.43461586.5-.5C.77100423 2.16160316 1.0313672 2.23136721 1.21 2.41L3 4.18 6.8.33c.27679776-.27455556.72320224-.27455556 1 0 .13696438.13025306.21450026.31098915.21450026.5S7.93696438 1.19974694 7.8 1.33L3.45 5.67c-.12082534.11896945-.28072735.19003701-.45.2Z",fill:"#fff",fillRule:"evenodd"})),x=({values:e=[],othersValue:o="",options:r,name:s,autoFocusDelay:i,onChangeHandler:a,saveOthersValue:c})=>{const m=e.includes(l),d=n.useRef(null);return n.useEffect((()=>{setTimeout((()=>{d.current?.focus()}),u+i)}),[]),t.createElement("div",{className:"checkbox-group"},t.createElement("button",{ref:d,className:"autofocus-button","aria-label":"checkbox question"}),r?.filter((e=>e.value!==l)).map(((n,o)=>t.createElement(b,{key:n.id,checked:e?.includes(n.value),name:n.value,id:n.id,onChange:(t,o)=>{if(o){const t=r.reduce(((e,n)=>({...e,[n.value]:n.position})),{});a([...e||[],n.value].sort(((e,n)=>t[e]-t[n])))}else{const t=e.indexOf(n.value);t>-1&&e.splice(t,1),a([...e])}}},n.value))),r?.find((e=>e.value===l))&&t.createElement(b,{key:"others",checked:m,name:l,id:l,onChange:(n,t)=>{if(t)a([...e,l]);else{const n=e.findIndex((e=>e===l));e.splice(n,1),a(e)}}},"Others"),m&&t.createElement(t.Fragment,null,t.createElement(y,{placeholder:"Enter your comment",value:o,onChange:e=>{c(s,e.target.value)},autoFocusDelay:10,label:""})))},b=a((e=>{const o=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),320)}),[]),t.createElement("label",{className:`checkbox-label ${e.disabled&&"disabled"}`},t.createElement("input",{ref:o,id:e.id,type:"checkbox",name:e.name,readOnly:e.readOnly,disabled:e.disabled,"aria-disabled":e.disabled,checked:e.checked,onChange:e.readOnly?()=>{}:n=>e.onChange(n,n.target.checked)}),t.createElement("div",{className:"checkbox"},e.checked&&t.createElement("div",{className:"icon-container"},t.createElement(g,null)," ")),t.createElement("div",null,e.children))}),{checked:!1});s('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\n width: 100%;\n}\n.freemium-survey-components .radio {\n background-color: #fff;\n border: 1px solid;\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n transition: background-color ease-in 0.2s;\n min-width: 18px;\n max-width: 18px;\n min-height: 18px;\n max-height: 18px;\n border-radius: 50%;\n position: relative;\n margin-right: 16px;\n text-align: left;\n}\n.freemium-survey-components .radio:before {\n left: 3px;\n top: 3px;\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n transition: all ease-in 0.2s;\n background-color: #fff;\n}\n.freemium-survey-components .radio-label {\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: left;\n cursor: pointer;\n line-height: 1.2;\n font-size: 1rem;\n font-weight: 400;\n padding: 16px 24px;\n min-width: 200px;\n border: 1px solid #ebeff3;\n border-radius: 4px;\n white-space: pre-wrap;\n color: #3a4b67;\n}\n.freemium-survey-components input[type=radio] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n width: 0px;\n height: 0px;\n}\n.freemium-survey-components input[type=radio]:focus ~ .radio {\n /* box-shadow: ${pseudo.focus} 0px 0px 0px 3px; */\n box-shadow: var(--default-brand-color) 0px 0px 0px 3px;\n box-shadow: var(--brand-color, var(--default-brand-color)) 0px 0px 0px 3px;\n border-color: transparent;\n}\n.freemium-survey-components input[type=radio]:checked ~ .radio:before {\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .radio-label:hover {\n border-color: #92a2b1;\n}');const w=({name:e,options:o,value:r,autoFocusDelay:s,onChangeHandler:i,saveOthersValue:a,othersOption:c,othersRequired:m,othersValue:d,isFinalQn:p})=>{const f=n.useRef(null);return n.useEffect((()=>{setTimeout((()=>{f.current?.focus()}),u+s)}),[]),t.createElement("div",{className:"radio-group",role:"radiogroup"},t.createElement("button",{ref:f,className:"autofocus-button","aria-label":"radio question",tabIndex:-1}),o?.sort(((e,n)=>e.value===l?1:n.value===l?-1:0))?.map(((n,o)=>t.createElement(k,{key:n.value,value:n.value,name:e,onChange:n=>{n.currentTarget.value!==l&&a(e,null),i(n.currentTarget.value)},checked:r===n.value},n.value===l?"Others":n.value))),r===l&&t.createElement(t.Fragment,null,t.createElement(y,{value:d??"",onChange:n=>{r!==l&&p&&i(l),a(e,n.target.value)},placeholder:"Enter your comment",label:"",autoFocusDelay:10})))},k=a((e=>{const o=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),320)}),[]),t.createElement("label",{className:"radio-label"},t.createElement("input",{ref:o,type:"radio",name:e.name,value:e.value,checked:e.checked,onChange:e.onChange}),t.createElement("div",{className:"radio"}),t.createElement("div",null,e.children))}),{checked:!1,autoFocus:!1});s(".progressbar-container {\n width: 100%;\n height: 4px;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1;\n text-align: left;\n overflow: hidden;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n}\n\n.progressbar-container.widget {\n position: absolute;\n top: 0;\n height: 2px;\n}\n\n.progressbar {\n transition: transform 0.2s linear 200ms;\n transform-origin: left;\n height: 100%;\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n}");const B=e=>{const{totalSteps:n,completedSteps:o,widget:r}=e;return t.createElement("div",{className:"progressbar-container "+(r?"widget":"")},t.createElement("div",{className:"progressbar",style:{width:(o>0?100/n:0)+"%",transform:`scaleX(${o})`}}))};s(".freemium-survey-components .action-button {\n width: auto;\n display: block;\n padding: 8px 16px;\n cursor: pointer;\n line-height: 1.5;\n text-align: center;\n font-weight: 600;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n color: --default-button-text-color;\n color: var(--button-text-color, --default-button-text-color);\n background: var(--default-brand-color);\n background: var(--brand-color, var(--default-brand-color));\n border: 1px solid var(--default-brand-color);\n border: 1px solid var(--brand-color, var(--default-brand-color));\n border-radius: 4px;\n min-width: 200px;\n max-width: -moz-fit-content;\n max-width: fit-content;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components .action-button:not([disabled]):hover {\n transform: translateY(-4px);\n}\n.freemium-survey-components .action-button[disabled] {\n cursor: not-allowed;\n opacity: 0.6;\n}\n.freemium-survey-components button:focus:not(:active) {\n /* box-shadow: 0 0 0 2px ${pseudo.focus}; */\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .action-button {\n min-width: 120px;\n }\n}\n.widget-survey-components .action-button {\n min-width: 120px;\n}\n\n.freemium-survey-components.mobile-preview .action-button {\n min-width: 120px;\n}");const E=()=>t.createElement(t.Fragment,null,"..."),q=e=>{const{inline:n=!1,children:o,disabled:r,className:s="",htmlType:i,type:a="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:m=!1,...d}=e;return t.createElement("button",{style:n?{display:"inline-block"}:{},disabled:r,className:`action-button ${s} ${u}`,type:i,onClick:c,...d},m?t.createElement(E,null):o)},_=({name:e})=>{switch(e){case"arrow-previous":return t.createElement("svg",{width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0.256667 7.83755C0.0925257 7.67361 0.000204227 7.4512 0 7.21921V6.77588C0.00268801 6.5444 0.0946357 6.32289 0.256667 6.15755L6.25333 0.172549C6.30756 0.117874 6.37208 0.0744776 6.44316 0.0448625C6.51425 0.0152474 6.59049 0 6.6675 0C6.74451 0 6.82075 0.0152474 6.89184 0.0448625C6.96292 0.0744776 7.02744 0.117874 7.08167 0.172549L7.91 1.00088C7.96432 1.05411 8.00748 1.11764 8.03694 1.18776C8.06641 1.25787 8.08158 1.33316 8.08158 1.40922C8.08158 1.48527 8.06641 1.56056 8.03694 1.63067C8.00748 1.70079 7.96432 1.76432 7.91 1.81755L2.71833 6.99755L7.91 12.1775C7.96467 12.2318 8.00807 12.2963 8.03769 12.3674C8.0673 12.4385 8.08255 12.5147 8.08255 12.5917C8.08255 12.6687 8.0673 12.745 8.03769 12.8161C8.00807 12.8871 7.96467 12.9517 7.91 13.0059L7.08167 13.8225C7.02744 13.8772 6.96292 13.9206 6.89184 13.9502C6.82075 13.9799 6.74451 13.9951 6.6675 13.9951C6.59049 13.9951 6.51425 13.9799 6.44316 13.9502C6.37208 13.9206 6.30756 13.8772 6.25333 13.8225L0.256667 7.83755Z",fill:"#6B6B6B"}));case"arrow-next":return t.createElement("svg",{width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.82585 6.15754C7.98999 6.32147 8.08232 6.54389 8.08252 6.77587L8.08252 7.2192C8.07983 7.45069 7.98788 7.6722 7.82585 7.83754L1.82919 13.8225C1.77496 13.8772 1.71044 13.9206 1.63936 13.9502C1.56827 13.9798 1.49203 13.9951 1.41502 13.9951C1.33801 13.9951 1.26177 13.9798 1.19068 13.9502C1.1196 13.9206 1.05508 13.8772 1.00085 13.8225L0.172521 12.9942C0.118197 12.941 0.0750381 12.8774 0.0455752 12.8073C0.0161124 12.7372 0.000937578 12.6619 0.000937585 12.5859C0.000937592 12.5098 0.0161125 12.4345 0.0455753 12.3644C0.0750381 12.2943 0.118197 12.2308 0.172521 12.1775L5.36419 6.99754L0.172522 1.81754C0.117847 1.76331 0.0744506 1.69879 0.0448352 1.62771C0.0152208 1.55662 -2.75162e-05 1.48038 -2.75094e-05 1.40337C-2.75027e-05 1.32636 0.0152208 1.25012 0.0448353 1.17904C0.0744507 1.10795 0.117847 1.04343 0.172522 0.989205L1.00086 0.172537C1.05508 0.117862 1.1196 0.0744661 1.19069 0.0448507C1.26177 0.0152353 1.33801 -1.20337e-05 1.41502 -1.2027e-05C1.49203 -1.20203e-05 1.56827 0.0152353 1.63936 0.0448507C1.71044 0.0744661 1.77496 0.117862 1.82919 0.172537L7.82585 6.15754Z",fill:"#6B6B6B"}));case"widget-maximize":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 11 11",fill:"none"},t.createElement("mask",{id:"a",maskUnits:"userSpaceOnUse",x:"-.400146",y:"-.400024",width:"11",height:"11",fill:"#000"},t.createElement("path",{fill:"#fff",d:"M-.400146-.400024h11v11h-11z"}),t.createElement("path",{d:"m4.70226 6.76428-2.6856 2.6856 2.60775-.00293c.02738-.00011.05452.0052.07983.01562.02532.01043.04833.02577.06769.04513.01936.01936.0347.04237.04512.06769.01043.02531.01574.05245.01563.07983l-.00293.41358c.00011.0274-.0052.0545-.01563.0799-.01043.0253-.02576.0483-.04512.0676-.01937.0194-.04237.0347-.06769.0452-.02532.0104-.05245.0157-.07983.0156l-3.59922.0029c-.082493.0001-.161625-.0326-.220005-.0909l-.111467-.1115c-.057526-.0589-.090102-.13767-.090934-.21998L.602787 6.2584c-.000112-.02738.005198-.05452.015625-.07984.010427-.02532.025763-.04832.045125-.06768.019362-.01936.042366-.0347.067685-.04513.025319-.01042.052451-.01573.079833-.01562h.416535c.02704-.00028.05387.00485.0789.01507.02504.01022.04779.02533.06691.04445.01912.01913.03424.04187.04446.06691s.01534.05186.01507.0789l-.00294 2.60775 4.74323-4.74323.0044-.00427 2.6856-2.6856-2.60775.00294c-.02738.00011-.05452-.0052-.07983-.01563-.02532-.01042-.04833-.02576-.06769-.04512-.01936-.01936-.0347-.04237-.04512-.06769-.01043-.02532-.01574-.05245-.01563-.07983l.00293-.413603c-.00011-.027382.0052-.054514.01563-.079833.01043-.025319.02576-.048323.04512-.067685.01937-.019362.04237-.034698.06769-.045125.02532-.010427.05245-.015737.07983-.015625L9.85762.599976c.08249-.000052.16158.032657.21998.090934l.1115.111467c.0575.058878.0901.13769.0909.220003l-.0029 3.59922c.0001.02738-.0052.05452-.0156.07983-.0105.02532-.0258.04833-.0452.06769-.0193.01936-.0423.0347-.0676.04512-.0254.01043-.0525.01574-.0799.01563h-.41651c-.02704.00027-.05387-.00485-.0789-.01507-.02504-.01022-.04779-.02533-.06691-.04446-.01912-.01912-.03424-.04187-.04446-.0669-.01022-.02504-.01534-.05186-.01506-.07891l.00293-2.60775-4.74323 4.74323-.0044.00427Z"})),t.createElement("path",{d:"m4.70226 6.76428-2.6856 2.6856 2.60775-.00293c.02738-.00011.05452.0052.07983.01562.02532.01043.04833.02577.06769.04513.01936.01936.0347.04237.04512.06769.01043.02531.01574.05245.01563.07983l-.00293.41358c.00011.0274-.0052.0545-.01563.0799-.01043.0253-.02576.0483-.04512.0676-.01937.0194-.04237.0347-.06769.0452-.02532.0104-.05245.0157-.07983.0156l-3.59922.0029c-.082493.0001-.161625-.0326-.220005-.0909l-.111467-.1115c-.057526-.0589-.090102-.13767-.090934-.21998L.602787 6.2584c-.000112-.02738.005198-.05452.015625-.07984.010427-.02532.025763-.04832.045125-.06768.019362-.01936.042366-.0347.067685-.04513.025319-.01042.052451-.01573.079833-.01562h.416535c.02704-.00028.05387.00485.0789.01507.02504.01022.04779.02533.06691.04445.01912.01913.03424.04187.04446.06691s.01534.05186.01507.0789l-.00294 2.60775 4.74323-4.74323.0044-.00427 2.6856-2.6856-2.60775.00294c-.02738.00011-.05452-.0052-.07983-.01563-.02532-.01042-.04833-.02576-.06769-.04512-.01936-.01936-.0347-.04237-.04512-.06769-.01043-.02532-.01574-.05245-.01563-.07983l.00293-.413603c-.00011-.027382.0052-.054514.01563-.079833.01043-.025319.02576-.048323.04512-.067685.01937-.019362.04237-.034698.06769-.045125.02532-.010427.05245-.015737.07983-.015625L9.85762.599976c.08249-.000052.16158.032657.21998.090934l.1115.111467c.0575.058878.0901.13769.0909.220003l-.0029 3.59922c.0001.02738-.0052.05452-.0156.07983-.0105.02532-.0258.04833-.0452.06769-.0193.01936-.0423.0347-.0676.04512-.0254.01043-.0525.01574-.0799.01563h-.41651c-.02704.00027-.05387-.00485-.0789-.01507-.02504-.01022-.04779-.02533-.06691-.04446-.01912-.01912-.03424-.04187-.04446-.0669-.01022-.02504-.01534-.05186-.01506-.07891l.00293-2.60775-4.74323 4.74323-.0044.00427Z",fill:"#264966"}),t.createElement("path",{d:"m4.70226 6.76428-.19158-.19732-.00287.00287.19445.19445Zm-2.6856 2.6856-.19445-.19445-.4702.4702.66496-.00075-.00031-.275Zm2.60775-.00293.00031.275h.00082l-.00113-.275Zm.14752.06075.19446-.19445-.00001-.00001-.19445.19446Zm.06075.14752.27499.00195.00001-.00082-.275-.00113Zm-.00293.41358-.27501-.0019.00001.003.275-.0011Zm-.06075.1475.19445.1945-.19445-.1945Zm-.06769.0452-.10471-.2543.10471.2543Zm-.07983.0156.00113-.275h-.00136l.00023.275Zm-3.59922.0029.00017.275h.00005l-.00022-.275Zm-.220005-.0909-.194454.1944.00017.0002.194284-.1946Zm-.111467-.1115-.196712.1922.002257.0023.194455-.1945Zm-.090934-.21998L.324837 9.8574l.000031.003.274986-.00278ZM.602787 6.2584l.275003.00022-.000005-.00135-.274998.00113Zm.015625-.07984L.36413 6.07385H.364129l.254283.10471Zm.045125-.06768.194453.19445h.000003l-.194456-.19445Zm.067685-.04513.104714.25429.000005-.00001-.104719-.25428Zm.079833-.01562-.001128.275h.001127l.000001-.275Zm.416535 0v.27501l.00281-.00002-.00281-.27499Zm.0789.01507-.10394.2546h.00001l.10393-.2546Zm.06691.04445.19445-.19445-.19445.19445Zm.04446.06691.2546-.10394-.2546.10394Zm.01507.0789-.275-.0028v.00249l.275.00031Zm-.00294 2.60775-.275-.00031-.00075.66497.47021-.4702-.19446-.19446Zm4.74323-4.74323-.19158-.19732-.00287.00287.19445.19445Zm.0044-.00427.19158.19733.00287-.00287-.19445-.19446Zm2.6856-2.6856.19445.19446.4702-.4702-.66496.00074.00031.275Zm-2.60775.00294-.00031-.275h-.00082l.00113.275Zm-.07983-.01563-.10472.25429.10472-.25429Zm-.06769-.04512.19446-.19446H6.3024l-.19445.19446Zm-.04512-.06769.25428-.10471v-.00001l-.25428.10472Zm-.01563-.07983-.27499-.00195-.00001.00082.275.00113Zm.00293-.413603.27502.001951L6.32513.81005l-.275.001127Zm.01563-.079833L5.81148.626625v.000004l.25428.104715Zm.04512-.067685L5.91643.469203v.000003l.19445.194453Zm.06769-.045125L6.07385.364252l.10472.254282ZM6.2584.602909 6.25728.87791l.00135-.000001-.00023-.275ZM9.85762.599976l-.00017-.275H9.8574l.00022.275Zm.21998.090934.1945-.194455-.0002-.000172-.1943.194627Zm.1115.111467.1967-.192197-.0023-.002257-.1944.194454Zm.0909.220003.275.00022v-.003l-.275.00278Zm-.0029 3.59922-.275-.00022v.00135l.275-.00113Zm-.0156.07983-.2543-.10472v.00001l.2543.10471Zm-.0452.06769-.1944-.19446.1944.19446Zm-.1475.06075.0012-.275h-.0012v.275Zm-.41651 0v-.27502l-.00281.00003.00281.27499Zm-.0789-.01507.10394-.2546-.10394.2546Zm-.06691-.04446.19446-.19445-.00001-.00001-.19445.19446Zm-.04446-.0669.25461-.10394-.00001-.00001-.2546.10395Zm-.01506-.07891.27499.00282.00001-.00251-.275-.00031Zm.00293-2.60775.275.00031.00075-.66496-.47021.4702.19446.19445ZM4.70666 6.76001l.19159.19733.00286-.00287-.19445-.19446Zm-.19885-.19018-2.6856 2.6856.38891.38891 2.6856-2.6856-.38891-.38891ZM2.01697 9.72488l2.60775-.00293-.00062-.55-2.60775.00293.00062.55Zm2.60857-.00293c-.00893.00003-.01777-.0017-.02601-.00509l.20943-.50857c-.05888-.02425-.12198-.0366-.18568-.03634l.00226.55Zm-.02601-.00509c-.00825-.0034-.01575-.0084-.02205-.0147l.3889-.38892c-.04503-.04503-.09853-.0807-.15742-.10495l-.20943.50857Zm-.02206-.01471c-.00631-.00631-.0113-.0138-.0147-.02205l.50857-.20943c-.02425-.05889-.05992-.11239-.10495-.15742l-.38892.3889Zm-.0147-.02205c-.0034-.00825-.00512-.01709-.00509-.02601l.55.00226c.00026-.06369-.01209-.12679-.03634-.18568l-.50857.20943Zm-.00508-.02683-.00294.41363.54999.0039.00293-.41363-.54998-.0039Zm-.00294.41663c-.00004-.0089.00169-.0177.00509-.026l.50856.2095c.02425-.0589.0366-.122.03634-.1857l-.54999.0022Zm.00509-.026c.0034-.0082.00839-.0157.0147-.022l.38891.3889c.04503-.045.0807-.0985.10495-.1574l-.50856-.2095Zm.01471-.022c.0063-.0063.01379-.0113.02205-.0147l.20943.5085c.05889-.0242.11239-.0599.15742-.1049l-.3889-.3889Zm.02205-.0147c.00824-.0034.01708-.0051.02601-.0051l-.00226.55c.06369.0002.1268-.0121.18568-.0364l-.20943-.5085Zm.02465-.0051-3.59922.0029.00045.55 3.59922-.0029-.00045-.55Zm-3.59917.0029c-.00957 0-.01876-.0038-.025541-.01054l-.388568.38924c.109981.1098.259058.1714.414459.1713l-.00035-.55Zm-.025371-.01037-.111467-.11146-.388909.38893.111468.1114.388908-.38887Zm-.109222-.10919c-.008001-.00819-.012532-.01915-.012648-.0306l-.549971.00556c.001548.1532.062169.2998.169221.4094l.393398-.38436Zm-.012634-.0276.002934-3.59922-.55-.00045L.324854 9.8574l.549999.00044Zm.002932-3.60057a.0675974.0675974 0 0 1-.005091.02601l-.508565-.20943c-.024249.05888-.036601.12199-.03634.18567l.549996-.00225Zm-.005092.02601c-.003395.00825-.008392.01574-.014703.02205l-.388906-.38891c-.045036.04504-.080705.09854-.104954.15743l.508563.20943Zm-.0147.02205c-.006311.00631-.013807.01131-.022057.01471l-.209429-.50857c-.058887.02425-.112392.05992-.157426.10496l.388912.3889Zm-.022052.0147c-.008251.0034-.017093.00513-.026013.0051l.002254-.55c-.063684-.00026-.12679.01209-.185679.03634l.209438.50856Zm-.024887.0051h.416536v-.55H.811055l-.000001.55Zm.419346-.00001c-.00954.00009-.01901-.00171-.02785-.00532l.20788-.5092c-.05891-.02405-.12202-.03611-.18564-.03546l.00561.54998Zm-.02784-.00532c-.00884-.00361-.01687-.00894-.02361-.01569l.3889-.38891c-.04499-.04499-.09851-.08055-.15742-.1046l-.20787.5092Zm-.02362-.01569c-.00674-.00675-.01208-.01477-.01568-.02361l.5092-.20788c-.02405-.05891-.05962-.11243-.10461-.15742l-.38891.38891Zm-.01568-.02361c-.00361-.00884-.00542-.0183-.00532-.02784l.54997.00561c.00065-.06362-.0114-.12674-.03545-.18565l-.5092.20788Zm-.00533-.02535L1.15499 8.8629l.55.00062.00294-2.60775-.55-.00062Zm.46652 2.80252 4.74323-4.74323-.38891-.38891-4.74323 4.74323.38891.38891Zm4.74033-4.74038.0044-.00427-.38312-.39461-.0044.00427.38312.39461Zm.00729-.00712 2.6856-2.6856-.38891-.38891-2.6856 2.6856.38891.38891Zm2.49084-3.15506-2.60775.00294.00062.55 2.60775-.00294-.00062-.55Zm-2.60857.00294c.00892-.00004.01776.00169.02601.00509l-.20943.50857c.05889.02424.12199.0366.18568.03634l-.00226-.55Zm.02601.00509c.00825.0034.01575.00839.02206.0147l-.38891.38891c.04503.04503.09853.0807.15742.10496l.20943-.50857Zm.02205.0147c.00631.00631.01131.01381.01471.02206l-.50857.20943c.02425.05888.05992.11239.10496.15742l.3889-.38891Zm.01471.02205c.0034.00826.00513.0171.00509.02602l-.55-.00226c-.00026.06369.01209.12679.03635.18568l.50856-.20944Zm.00508.02684.00294-.413602-.54999-.003901-.00293.413603.54998.0039Zm.00294-.41668c.00004.00892-.00169.01776-.00509.026009l-.50856-.20943c-.02425.058887-.0366.121992-.03634.185675L6.32513.81005Zm-.00509.026013c-.0034.008247-.00839.015741-.0147.022049L5.91643.469206c-.04503.045032-.0807.098534-.10495.157419l.50856.209438Zm-.0147.022052c-.00631.006307-.0138.011304-.02205.014701L6.07385.364252c-.05889.024251-.11239.059921-.15742.104951l.38891.388912Zm-.02205.014701a.0675974.0675974 0 0 1-.02601.005091l.00225-.549996c-.06369-.000261-.12679.012091-.18568.036341l.20944.508564Zm-.02466.005093L9.85785.874976l-.00045-.55-3.59922.002933.00045.55ZM9.8578.874976c.00957-.000006.01876.003791.02554.01056l.38856-.389253c-.11-.109784-.259-.171404-.41445-.171307l.00035.55Zm.02537.010388.11147.111467.38886-.388908-.1114-.111467-.38893.388908Zm.10922.109197c.00801.008189.01251.019149.01261.030599l.55-.00556c-.0015-.153176-.0622-.29984-.1692-.409407l-.39341.384368Zm.01261.027589-.0029 3.59923.55.00044.0029-3.59922-.55-.00045Zm-.0029 3.60058c0-.00892.0017-.01777.0051-.02602l.5085.20945c.0243-.05889.0367-.122.0364-.18569l-.55.00226Zm.0051-.02601c.0034-.00825.0084-.01574.0147-.02206l.3889.38892c.045-.04504.0807-.09855.105-.15743l-.5086-.20943Zm.0147-.02206c.0063-.00631.0138-.0113.022-.0147l.2095.50857c.0589-.02425.1124-.05992.1574-.10496l-.3889-.38891Zm.022-.0147c.0083-.0034.0171-.00513.0261-.00509l-.0023.55c.0637.00026.1268-.01209.1857-.03634l-.2095-.50857Zm.0249-.00509h-.41651v.55h.41651v-.55Zm-.41932.00001c.00954-.00009.01901.00171.02785.00532l-.20789.5092c.05892.02405.12203.0361.18566.03545l-.00562-.54997Zm.02785.00532c.00883.00361.01686.00894.02361.01569l-.38892.3889c.045.045.09852.08056.15743.10461l.20788-.5092Zm.0236.01568c.00675.00675.01209.01478.0157.02362l-.50921.20787c.02405.05892.05961.11244.10461.15743l.3889-.38892Zm.01569.02361c.00361.00884.00542.01831.00532.02786l-.54997-.00563c-.00065.06363.0114.12675.03546.18566l.50919-.20789Zm.00534.02535.00293-2.60775-.55-.00061-.00293 2.60774.55.00062Zm-.46653-2.80251L4.51221 6.56556l.3889.38891 4.74323-4.74323-.38891-.38891ZM4.51509 6.56271l-.00439.00427.38313.3946.0044-.00427-.38314-.3946Z",fill:"#264966",mask:"url(#a)"}));case"widget-minimze":return t.createElement("svg",{width:"8",height:"8",viewBox:"0 0 7 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6.08333 1.32682H0.583333C0.261167 1.32682 0 1.06565 0 0.743489C0 0.421323 0.261167 0.160156 0.583333 0.160156H6.08333C6.4055 0.160156 6.66667 0.421323 6.66667 0.743489C6.66667 1.06565 6.4055 1.32682 6.08333 1.32682Z",fill:"#264966"}));case"widget-close":return t.createElement("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("rect",{opacity:"0.01",x:"0.16748",width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),t.createElement("path",{d:"M1.85129 1.68479L8.48395 8.31744",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}),t.createElement("path",{d:"M8.48395 1.68479L1.85129 8.31744",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}));case"thumbs-up":return t.createElement("path",{fill:"#12344D",stroke:"#12344D","stroke-width":".5",d:"M16.5 7.25H14a.5.5 0 0 0-.5.5v.442A17.952 17.952 0 0 1 11.25 6.5c-.894-.806-1.75-3.022-1.75-4.25a1.25 1.25 0 1 0-2.5 0V3.5c0 1.339.315 2.41.537 3H2.5a1.496 1.496 0 0 0-.516 2.903 1.49 1.49 0 0 0 .5 2.5 1.49 1.49 0 0 0 .5 2.5A1.49 1.49 0 0 0 2.5 15.5 1.5 1.5 0 0 0 4 17h5.25c1.991 0 3.645-1.095 4.25-1.552V16.5a.5.5 0 0 0 .5.5h2.5a.5.5 0 0 0 .5-.5V7.75a.5.5 0 0 0-.5-.5Zm-3 7.466c-.812.772-2.507 1.784-4.25 1.784H4a.997.997 0 0 1-.29-1.952s.29-.044.29-.298c0-.273-.4-.25-.4-.25h-.1a.997.997 0 0 1-.29-1.952s.29-.053.29-.298c0-.297-.4-.25-.4-.25H3a.997.997 0 0 1-.29-1.952S3 9.533 3 9.25C3 8.944 2.6 9 2.6 9h-.1a1 1 0 0 1 0-2H8c.158 0 .37-.119.188-.48C7.845 5.84 7.5 4.894 7.5 3.5V2.25a.75.75 0 1 1 1.5 0v.25c0 1.364.909 3.523 2 4.5 1.103.988 1.985 1.517 2.5 1.778v5.938Zm3 1.784H14V7.75h2.5v8.75ZM6.25 14H3.726a.25.25 0 1 0 0 .5H6.25a.25.25 0 1 0 0-.5ZM6 11.75a.25.25 0 0 0-.25-.25H3.226a.25.25 0 1 0 0 .5H5.75a.25.25 0 0 0 .25-.25Zm-.5-2.5A.25.25 0 0 0 5.25 9H2.726a.25.25 0 1 0 0 .5H5.25a.25.25 0 0 0 .25-.25Z"});case"thumbs-down":return t.createElement("path",{d:"M16.5 10.75H14C13.724 10.75 13.5 10.526 13.5 10.25V9.80825C12.9585 10.1553 12.0635 10.7667 11.25 11.5C10.3558 12.3063 9.5 14.522 9.5 15.75C9.5 16.4405 8.9405 17 8.25 17C7.5595 17 7 16.4405 7 15.75C7 15.75 7 15.7405 7 14.5C7 13.1613 7.315 12.0897 7.5365 11.5H2.5C1.67175 11.5 1 10.8282 1 10C1 9.354 1.41075 8.808 1.9835 8.597C1.68775 8.323 1.5 7.93475 1.5 7.5C1.5 6.854 1.91075 6.308 2.4835 6.097C2.18775 5.823 2 5.43475 2 5C2 4.354 2.41075 3.808 2.9835 3.597C2.68775 3.323 2.5 2.93475 2.5 2.5C2.5 1.67175 3.17175 1 4 1H9.25C11.241 1 12.895 2.0955 13.5 2.552V1.5C13.5 1.224 13.724 1 14 1H16.5C16.776 1 17 1.224 17 1.5V10.25C17 10.526 16.776 10.75 16.5 10.75ZM13.5 3.284C12.688 2.512 10.9932 1.5 9.25 1.5H4C3.44775 1.5 3 1.94775 3 2.5C3 2.95075 3.3 3.32725 3.7095 3.45225C3.7095 3.45225 4 3.4965 4 3.75C4 4.023 3.6 4 3.6 4H3.5C2.94775 4 2.5 4.44775 2.5 5C2.5 5.45075 2.8 5.82725 3.2095 5.95225C3.2095 5.95225 3.5 6.00475 3.5 6.25C3.5 6.54675 3.1 6.5 3.1 6.5H3C2.44775 6.5 2 6.94775 2 7.5C2 7.95075 2.3 8.32725 2.7095 8.45225C2.7095 8.45225 3 8.46725 3 8.75C3 9.05575 2.6 9 2.6 9H2.5C1.94775 9 1.5 9.44775 1.5 10C1.5 10.5522 1.94775 11 2.5 11H8C8.158 11 8.36975 11.1187 8.18825 11.4795C7.84525 12.1607 7.5 13.107 7.5 14.5C7.5 15.3388 7.5 15.75 7.5 15.75C7.5 16.1643 7.83575 16.5 8.25 16.5C8.66425 16.5 9 16.1643 9 15.75V15.5C9 14.1363 9.90875 11.977 11 11C12.1033 10.0122 12.9847 9.4835 13.5 9.22225V3.284ZM16.5 1.5H14V9.5V10.25H16.5V1.5ZM6.25 4H3.72619C3.58794 4 3.47619 3.88825 3.47619 3.75C3.47619 3.61175 3.58794 3.5 3.72619 3.5H6.25C6.38825 3.5 6.5 3.61175 6.5 3.75C6.5 3.88825 6.38825 4 6.25 4ZM6 6.25C6 6.38825 5.88825 6.5 5.75 6.5H3.22619C3.08794 6.5 2.97619 6.38825 2.97619 6.25C2.97619 6.11175 3.08794 6 3.22619 6H5.75C5.88825 6 6 6.11175 6 6.25ZM5.5 8.75C5.5 8.88825 5.38825 9 5.25 9H2.72619C2.58794 9 2.47619 8.88825 2.47619 8.75C2.47619 8.61175 2.58794 8.5 2.72619 8.5H5.25C5.38825 8.5 5.5 8.61175 5.5 8.75Z",fill:"#12344D",stroke:"#12344D","stroke-width":"0.5"});case"tick":return t.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3552 16.1457C13.7379 15.1037 16.0337 11.9625 15.9995 8.42306C15.9987 8.02539 15.9689 7.6283 15.9104 7.23496C15.875 6.98912 15.7112 6.78082 15.4806 6.68854C15.25 6.59625 14.9877 6.63399 14.7925 6.78755C14.5973 6.9411 14.4988 7.18713 14.5342 7.43297C14.5901 7.75998 14.6166 8.09133 14.6134 8.42306C14.6134 12.032 11.6877 14.9577 8.07878 14.9577C4.46983 14.9577 1.5442 12.032 1.5442 8.42306C1.5442 4.81411 4.46983 1.88847 8.07878 1.88847C8.94795 1.89329 9.80701 2.07521 10.6035 2.42312C10.9562 2.57349 11.364 2.40948 11.5144 2.05679C11.6648 1.7041 11.5008 1.29628 11.1481 1.14591C7.89405 -0.246989 4.11151 0.664075 1.84854 3.38579C-0.414427 6.10751 -0.619803 9.9928 1.34361 12.9379C3.30703 15.8831 6.97244 17.1878 10.3552 16.1457ZM4.75255 7.63644C4.93969 7.63644 5.11863 7.71321 5.24759 7.84881L7.02975 9.63097L13.2277 3.41321C13.5011 3.13981 13.9444 3.13981 14.2178 3.41321C14.4912 3.68662 14.4912 4.1299 14.2178 4.4033L7.5149 11.1062C7.38452 11.2392 7.2061 11.3142 7.01985 11.3141C6.83634 11.3149 6.6607 11.2396 6.53471 11.1062L4.2575 8.8389C3.98567 8.56485 3.98567 8.12287 4.2575 7.84881C4.38647 7.71321 4.56541 7.63644 4.75255 7.63644Z",fill:"#12344D"}));case"cross":return t.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 16.5C12.4183 16.5 16 12.9183 16 8.5C16 4.08172 12.4183 0.5 8 0.5C3.58172 0.5 0 4.08172 0 8.5C0 12.9183 3.58172 16.5 8 16.5ZM8 15.2346C4.28056 15.2346 1.26535 12.2194 1.26535 8.5C1.26535 4.78056 4.28056 1.76535 8 1.76535C11.7194 1.76535 14.7346 4.78056 14.7346 8.5C14.7346 12.2194 11.7194 15.2346 8 15.2346ZM5.00502 5.50503C5.27839 5.23166 5.72161 5.23166 5.99497 5.50503L8.25 7.76005L10.505 5.50503C10.7784 5.23166 11.2216 5.23166 11.495 5.50503C11.7683 5.77839 11.7683 6.22161 11.495 6.49497L9.23995 8.75L11.495 11.005C11.7683 11.2784 11.7683 11.7216 11.495 11.995C11.2216 12.2683 10.7784 12.2683 10.505 11.995L8.25 9.73995L5.99497 11.995C5.72161 12.2683 5.27839 12.2683 5.00503 11.995C4.73166 11.7216 4.73166 11.2784 5.00503 11.005L7.26005 8.75L5.00502 6.49497C4.73166 6.22161 4.73166 5.77839 5.00502 5.50503Z",fill:"#12344D"}));default:return null}},C=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"76",height:"16",viewBox:"0 0 200 40"},t.createElement("g",{fill:"none",fillRule:"nonzero"},t.createElement("path",{fill:"#4D4D4D",d:"M48.6 1c-5 0-6.8 3.5-6.8 6.8v2h-1c-.8 0-1.4.6-1.4 1.4 0 .8.6 1.4 1.4 1.4h1v13.8c0 .8.6 1.5 1.5 1.5s1.5-.6 1.5-1.5V12.5H48c.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4h-3.2v-2c0-1.8.7-4 3.9-4 .8 0 1.4-.6 1.4-1.3-.1-.8-.7-1.4-1.5-1.4zM60 9.3c-2-.1-3.8.8-5 2.4v-.8c0-.8-.6-1.5-1.5-1.5s-1.5.7-1.5 1.5v15.4c0 .8.6 1.5 1.5 1.5s1.5-.6 1.5-1.5v-8.5c0-3.6 1.9-5.7 5-5.7.8 0 1.4-.6 1.4-1.4 0-.8-.7-1.4-1.4-1.4zM77.7 16.9c0-1.7-.5-3.4-1.4-4.8-1.4-1.9-3.7-3-6.1-2.8-5.1 0-8 3.4-8 9.3 0 6.1 2.9 9.4 8.4 9.4 2.2.1 4.4-.7 6.1-2.2.3-.2.5-.6.5-1 0-.7-.6-1.3-1.3-1.3-.3 0-.6.1-.8.3-1.2 1-2.8 1.6-4.4 1.6-3.3 0-5.4-2.2-5.5-5.7H76c1.7-.2 1.7-1.8 1.7-2.8zm-7.4-5c3 0 4.5 1.7 4.6 5h-9.7c.3-3.2 2.1-5 5.1-5zM87.5 17.1c-2.2-.8-4-1.4-4-3 0-1.8 2-2 3.1-2 1.5-.1 3 .5 4 1.5.5.5 1.4.5 1.9 0 .3-.3.4-.6.4-1 0-.3-.1-.6-.3-.9-1.5-1.7-3.7-2.7-5.9-2.5-3.7 0-6 1.9-6 4.8 0 3.6 3.2 4.7 6 5.7 2.1.7 4 1.3 4 2.9 0 2.1-2.4 2.5-3.8 2.5-1.7.1-3.4-.6-4.6-1.8-.3-.3-.6-.4-1-.5-.7 0-1.3.6-1.3 1.3 0 .3.1.6.3.9 1.7 2 4.1 3 6.6 3 4.2 0 6.7-2 6.7-5.2-.2-3.7-3.3-4.7-6.1-5.7zM104.8 9.2c-1.8-.1-3.6.7-4.8 2.1V1.5c0-.8-.6-1.5-1.5-1.5-.8 0-1.4.6-1.4 1.5v24.8c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.5V17c0-3.4 1.6-5.1 4.8-5.1 3.2 0 4.3 1.4 4.3 4.8v9.6c0 .8.6 1.5 1.5 1.5.8 0 1.4-.6 1.4-1.5V16.2c0-4.6-2.4-7-7.2-7zM136.2 9.5c-.6 0-1.2.4-1.4 1l-4.2 11.8-3.4-11.8c-.3-.8-1.1-1.1-1.9-.9-.4.1-.7.5-.9.9L121 22.3l-4-11.9c-.2-.6-.7-1-1.4-.9-.8 0-1.4.6-1.4 1.4 0 .2 0 .4.1.6l5.6 15.3c.2.6.7 1 1.4 1 .6 0 1.2-.4 1.4-1l3.3-11.2 3.3 11.2c.2.6.8 1 1.4 1 .6 0 1.2-.4 1.4-1l5.6-15.3c.1-.2.1-.4.1-.6-.2-.8-.8-1.4-1.6-1.4zM146.8 9.2c-5.3 0-8.2 3.3-8.2 9.3 0 6 2.9 9.4 8.2 9.4 5.3 0 8.2-3.3 8.2-9.4 0-6.1-2.9-9.3-8.2-9.3zm0 16c-3.5 0-5.3-2.2-5.3-6.7s1.8-6.7 5.3-6.7 5.2 2.3 5.2 6.7-1.7 6.8-5.2 6.7zM166.2 9.3c-2-.1-3.8.8-5 2.4v-.8c0-.8-.6-1.5-1.4-1.5-.8 0-1.5.6-1.5 1.4v15.4c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.4v-8.5c0-3.6 1.9-5.7 5-5.7.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4zM177.3 16.9l6-4.8c.4-.3.6-.7.6-1.2 0-.8-.6-1.4-1.4-1.4-.4 0-.7.1-1 .4l-8.6 7V1.5c0-.8-.6-1.5-1.4-1.5-.8 0-1.5.6-1.5 1.4v24.8c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.4v-6l2-1.6 6.6 8.4c.3.4.8.7 1.2.7.8 0 1.4-.6 1.4-1.4 0-.3-.1-.7-.3-.9l-6.5-8.6zM193.7 17.1c-2.2-.8-4-1.4-4-3 0-1.8 2-2 3.1-2 1.5-.1 3 .5 4 1.5.3.3.6.4 1 .4.7-.1 1.2-.7 1.2-1.4 0-.3-.1-.6-.3-.9-1.5-1.7-3.7-2.7-5.9-2.5-3.7 0-6 1.9-6 4.8 0 3.6 3.2 4.7 6 5.7 2.1.7 4 1.3 4 2.9 0 2.1-2.4 2.5-3.8 2.5-1.7.1-3.4-.6-4.6-1.8-.3-.3-.6-.4-1-.5-.7 0-1.3.6-1.3 1.3 0 .3.1.6.3.9 1.7 1.9 4.1 2.9 6.7 2.8 4.2 0 6.7-2 6.7-5.2-.2-3.5-3.3-4.5-6.1-5.5z"}),t.createElement("path",{fill:"#9B65C3",d:"M.2 25.5C.7 29.1 2.4 32.4 5 35l5.8-5.8c0-6.1 3.2-11.7 8.5-14.8L.2 25.5z"}),t.createElement("path",{fill:"#9B65C3",d:"M10.8 29.2c-3 0-5.9-.8-8.5-2.3-.7-.4-1.4-.9-2.1-1.4.5 3.6 2.2 6.9 4.8 9.5l5.8-5.8z"}),t.createElement("path",{fill:"#BE63C5",d:"M10.8 29.2L5 35c2.6 2.6 5.9 4.3 9.5 4.8l11-19.1c-3 5.2-8.6 8.5-14.7 8.5z"}),t.createElement("path",{fill:"#BF63C6",d:"M13.1 37.7c-1.5-2.6-2.3-5.5-2.3-8.5L5 35c2.6 2.6 5.9 4.3 9.5 4.8-.5-.7-1-1.4-1.4-2.1z"}),t.createElement("path",{fill:"#3278B1",d:"M32.5 6.8l-13.2 7.6c-5.3 3-11.7 3-17 0C.8 17 0 20 0 23c0 .8.1 1.7.2 2.5.7.5 1.4 1 2.1 1.4 2.6 1.5 5.5 2.3 8.5 2.3l22-22c-.1-.1-.2-.2-.3-.4z"}),t.createElement("path",{fill:"#3278B2",d:"M2.3 26.9c2.6 1.5 5.5 2.3 8.5 2.3 0-6.1 3.2-11.7 8.5-14.8L.2 25.4c.7.6 1.4 1.1 2.1 1.5z"}),t.createElement("path",{fill:"#45A4EC",d:"M2.3 14.4C.8 17 0 20 0 23c0 .8.1 1.7.2 2.5l19.1-11.1c-5.2 3.1-11.7 3.1-17 0z"}),t.createElement("path",{fill:"#19BB7D",d:"M32.8 7.2c-.3-.3-.5-.5-.8-.7-.6-.4-1.4-.6-2.1-.6H17c-6.1 0-11.7 3.3-14.7 8.5 5.3 3 11.7 3 17 0-5.3 3-8.5 8.7-8.5 14.8 6.1 0 11.7-3.2 14.8-8.5l7.6-13.2c-.2-.1-.3-.2-.4-.3z"}),t.createElement("path",{fill:"#08C7FB",d:"M19.3 14.4l13.2-7.6c-.2-.1-.3-.3-.5-.4l-29.7 8c5.3 3.1 11.8 3.1 17 0z"}),t.createElement("path",{fill:"#59F2F6",d:"M29.8 5.9H17c-6.1 0-11.7 3.3-14.7 8.5l29.7-8c-.7-.3-1.4-.5-2.2-.5z"}),t.createElement("path",{fill:"#DA3757",d:"M25.6 20.7l7.6-13.2c-.1-.1-.2-.2-.3-.4l-22 22c0 3 .8 5.9 2.3 8.5.4.7.9 1.4 1.4 2.1.8.1 1.6.2 2.4.2 3 0 5.9-.8 8.5-2.3-3-5.2-3-11.7.1-16.9z"}),t.createElement("path",{fill:"#D33C4E",d:"M10.8 29.2c0 3 .8 5.9 2.3 8.5.4.7.9 1.4 1.4 2.1l11-19.1c-3 5.2-8.6 8.5-14.7 8.5z"}),t.createElement("path",{fill:"#EE5A24",d:"M25.6 20.7l-11 19.1c.8.1 1.6.2 2.5.2 3 0 5.9-.8 8.5-2.3-3.1-5.3-3.1-11.8 0-17z"}),t.createElement("path",{fill:"#8BDF55",d:"M33.5 8c-.3-.5-.6-.9-1-1.2l-13.2 7.6c-5.3 3-8.5 8.7-8.5 14.8 6.1 0 11.7-3.2 14.8-8.5-3 5.3-3 11.7 0 17 5.2-3 8.5-8.6 8.5-14.6V10.2c0-.8-.2-1.5-.6-2.2z"}),t.createElement("path",{fill:"#25C16F",d:"M32.5 6.8l-13.2 7.6c-5.3 3-8.5 8.7-8.5 14.8l22-22c-.1-.1-.2-.3-.3-.4z"}),t.createElement("path",{fill:"#8BDF55",d:"M10.8 29.2c6.1 0 11.7-3.2 14.8-8.5l7.6-13.2c-.1-.1-.2-.2-.3-.4L10.8 29.2z"}),t.createElement("path",{fill:"#FB0",d:"M33.2 7.5l-7.6 13.2c-3 5.3-3 11.7 0 17l8-29.7c-.2-.2-.3-.3-.4-.5z"}),t.createElement("path",{fill:"#FFA800",d:"M25.6 37.7c5.3-3 8.5-8.6 8.5-14.7V10.2c0-.8-.2-1.5-.6-2.2l-7.9 29.7z"}))),O=({question:e,formValues:n,othersMeta:o,onChangeHandler:r,saveOthersValue:s,autoFocusDelay:a,isFinalQn:c})=>{switch(e.type_info.question_type){case"RANGE":return t.createElement(i,{type_info:e.type_info,onChangeHandler:r,npsValue:n[e.name]});case"CHECKBOX":case"MULTI_SELECT":return t.createElement(x,{name:e.name,values:n[e.name],othersValue:o[e.name],options:e.type_info.choices,onChangeHandler:r,saveOthersValue:s,othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired,autoFocusDelay:a});case"RADIO":case"DROPDOWN":return t.createElement(w,{autoFocusDelay:a,name:e.name,onChangeHandler:r,saveOthersValue:s,options:e.type_info.choices,value:n[e.name],othersValue:o[e.name],othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired,isFinalQn:c});case"INPUT":case"TEXT":return e.type_info?.meta?.readOnly?t.createElement("div",{className:"message-container"},e.type_info?.meta?.value):t.createElement("div",{className:"responsive-text-field"},t.createElement(y,{autoFocusDelay:a,label:"",isRequired:e.is_required,value:n[e.name]||"",placeholder:e.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),t.createElement(h,{autoFocusDelay:a,label:"",maxLength:256,isRequired:e.is_required,placeholder:e.type_info?.meta?.placeholder??"",value:n[e.name]||"",onChange:e=>r(e.target.value)}));case"PARAGRAPH":return t.createElement(h,{autoFocusDelay:a,label:"",isRequired:e.is_required,placeholder:e.type_info?.meta?.placeholder??"",value:n[e.name]||"",onChange:e=>r(e.target.value)});default:return console.error(`Question type ${e.type_info.question_type} not found`),null}},S=(e={})=>0==Object.values(e).length,I=e=>null==e||"string"==typeof e&&""===e.trim()||Array.isArray(e)&&0===e.length,Q=(e,n,t)=>{if(e){let o=null;if(null!=t&&(o={"{{nps.rating}}":String(t)}),n&&"object"==typeof n&&Object.keys(n).length>0&&(o={...n,...o??{}}),o){const n=new RegExp(Object.keys(o).join("|"),"gi");return e.replace(n,(function(e){return o?.[e.toLowerCase()]||e}))??""}}return e??""},N=e=>({...e.brand_color&&{"--brand-color":e.brand_color},...e.body_background_color&&{"--background-color":e.body_background_color},...e.secondary_button_color&&{"--secondary-button-color":e.secondary_button_color},...e.question_background_color&&{"--question-background-color":e.question_background_color},...e.primary_button_text_color&&{"--button-text-color":e.primary_button_text_color},...e.secondary_button_text_color&&{"--secondary-button-text-color":e.secondary_button_text_color},...e.question_text_color&&{"--question-text-color":e.question_text_color}});s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n --compact-widget-max-height: 560px;\n --default-widget-max-height: 400px;\n --cozy-widget-max-height: 380px;\n}\n\n.freemium-survey-components.card-survey-style {\n padding: 20px 0;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation {\n white-space: nowrap;\n border-radius: 3px;\n border: 1px solid #efefef;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button svg {\n transform: rotate(90deg);\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n.freemium-survey-components.card-survey-style .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: center;\n max-width: 700px;\n margin: 0 auto;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n border-radius: 4px;\n transition: transform 500ms ease 0ms, opacity 200ms ease 0ms;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n height: -moz-fit-content;\n height: fit-content;\n transition: opacity 50ms ease-out;\n overflow: auto;\n}\n.freemium-survey-components.card-survey-style .hide-question-container {\n opacity: 0;\n}\n.freemium-survey-components.card-survey-style .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.card-survey-style .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.card-survey-style .fade-enter .question-container {\n opacity: 0;\n transform: translateY(15px);\n}\n.freemium-survey-components.card-survey-style .fade-enter-active .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-exit .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-exit-active .question-container {\n opacity: 0.05;\n transform: translateY(-15px);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-enter .question-container {\n opacity: 0;\n transform: translateY(-15px);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-enter-active .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-exit .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-exit-active .question-container {\n opacity: 0.05;\n transform: translateY(15px);\n}\n.freemium-survey-components.card-survey-style .fade-enter-active .question-container,\n.freemium-survey-components.card-survey-style .fade-exit-active .question-container,\n.freemium-survey-components.card-survey-style .fade-reverse-enter-active .question-container,\n.freemium-survey-components.card-survey-style .fade-reverse-exit-active .question-container {\n transition: opacity 200ms, transform 200ms;\n pointer-events: none;\n}\n.freemium-survey-components.card-survey-style .question-footer {\n display: flex;\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.card-survey-style .question-footer:only-child {\n margin-left: auto;\n}\n.freemium-survey-components.card-survey-style .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n width: 100%;\n}\n.freemium-survey-components.card-survey-style .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.card-survey-style .skip-button {\n font-weight: 500;\n color: #3a4b67;\n cursor: pointer;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.card-survey-style .skip-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.card-survey-style .next-button {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.card-survey-style .submit {\n max-width: 700px;\n text-align: left;\n background: transparent;\n box-shadow: none;\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.card-survey-style .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.card-survey-style .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.card-survey-style .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.card-survey-style .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.card-survey-style .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.card-survey-style .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components.card-survey-style .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n div.freemium-survey-components.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n div.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n div.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n }\n div.freemium-survey-components.card-survey-style .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n }\n div.freemium-survey-components.card-survey-style .question-footer > *:first-child {\n margin-bottom: 0px;\n }\n div.freemium-survey-components.card-survey-style .question-footer > * {\n margin-bottom: 20px;\n }\n div.freemium-survey-components.card-survey-style .freemium-survey-step-navigation {\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button {\n width: 50%;\n }\n div.freemium-survey-components.card-survey-style .action-buttons {\n flex-direction: column;\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .action-buttons button {\n max-width: unset;\n }\n div.freemium-survey-components.card-survey-style .action-button {\n max-width: unset;\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .thankyou .text {\n width: auto;\n }\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .input-container {\n display: none;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .textarea-container {\n display: flex;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer > *:first-child {\n margin-bottom: 0px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer > * {\n margin-bottom: 20px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .freemium-survey-step-navigation {\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .freemium-survey-step-navigation .navigation-button {\n width: 50%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-buttons {\n flex-direction: column;\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-buttons button {\n max-width: unset;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-button {\n max-width: unset;\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .thankyou .text {\n width: auto;\n}\n\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const Z=({questions:e})=>e.find((e=>e.type_info?.pivot_question))??e.find((e=>"RANGE"===e.type_info?.question_type))??e[0],z=(e,n)=>Math.min(e.type_info?.validation?.max??10,Math.max(e.type_info?.validation?.min??0,n)),V=({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o})=>{const r=e[n];return(n===e.length-1||"end"===r.branchOption)&&o===t.length-1},W=({pivotQn:e,pivotQnAnswer:n,block:t,questions:o})=>{if(t?.is_based_on_rating){const r=e?.type_info?.choices?.[n-(e?.type_info?.validation?.min??0)??0]?.dependent_question_names,s=t?.question_names?.find((e=>r?.includes(e)));return o.find((e=>e.name===s))}return o.find((e=>e.name===t?.question_names?.[0]))},T=({activeBlock:e,blocks:n,activeBlockIndexOfBlocks:t,answers:o})=>(({activeBlock:e,answers:n})=>{const t=n.formValues[e.question.name];return I(t)})({activeBlock:e,answers:o})?t+1:"specific"===e.branchOption&&e.nextBlock?n.findIndex((n=>n.name===e.nextBlock)):"logic"===e.branchOption?(({activeBlock:e,answers:n,blocks:t,activeBlockIndexOfBlocks:o})=>{const r=e.question.type_info?.meta?.branches||e.question.type_info?.choices||[],s=n.formValues[e.question.name];let i;if("RANGE"===e.question.type_info?.question_type)i=r.find((e=>s>=e.min&&s<=e.max))?.nextBlock;else{const e=r.find((e=>s===e.value));i=e?.nextBlock??e?.meta?.nextBlock}return i?"TY"===i?1/0:t.findIndex((e=>e.name===i)):o+1})({activeBlock:e,answers:o,blocks:n,activeBlockIndexOfBlocks:t}):"end"===e.branchOption?1/0:t+1,L=({question:e,answers:n})=>c.includes(e?.type_info?.question_type||"")&&!("DROPDOWN"===e.type_info?.question_type&&n.formValues[e.name]===l)||n.commitDirtyValue,M=({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o,answers:r})=>{const{question:s}=t[o];return!!s&&(!V({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o})&&L({question:s,answers:r}))},j=(e,{answers:n,blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s,surveyStyle:i,widget:a,blockIndex:u})=>{const m=V({blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s}),d=r[s],p=d.question;switch(e){case"next":return(!c.includes(p.type_info?.question_type??"")||"DROPDOWN"===p.type_info?.question_type&&n.formValues[p.name]===l)&&!m;case"skip":return"RANGE"!==p.type_info?.question_type&&!d.required&&!m;case"submit":return m;case"navigation":return(a||"card"===i)&&!(0===s&&1===r.length);case"clear-selection":return null!=u&&u!==s&&"DROPDOWN"===r[u].question.type_info?.question_type&&n.formValues[r[u].question.name]}},H=(e,n)=>("MULTI_SELECT"===e.question.type_info?.question_type&&n.formValues[e.question.name].includes(l)||"DROPDOWN"===e.question.type_info?.question_type&&n.formValues[e.question.name]===l)&&I(n.others[e.question.name]),R=(e,{answers:n,blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s,isSubmitting:i})=>{const a=r[s];switch(e){case"next":return I(n?.formValues[a.question.name])||a.question.type_info?.meta?.othersRequired&&H(a,n);case"submit":return(a.required||a.question.type_info?.pivot_question)&&I(n?.formValues[a.question.name])||a.question?.type_info?.meta?.othersRequired&&H(a,n)||i;case"navigation-prev":return 0==s;case"navigation-next":return s>=r.length-1;default:return!1}},D=({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n,answers:t})=>{const o=A({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n}).reduce(((e,n)=>(void 0!==t.formValues[n.question.name]&&(e[n.question.name]=t.formValues[n.question.name]),e)),{});return{...t,formValues:o}},A=({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n})=>e.slice(0,n+1);var F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var P,$,Y,U=(P=function(e,n){var t="__lodash_hash_undefined__",o=9007199254740991,r="[object Arguments]",s="[object Boolean]",i="[object Date]",a="[object Function]",c="[object GeneratorFunction]",l="[object Map]",u="[object Number]",m="[object Object]",d="[object Promise]",p="[object RegExp]",f="[object Set]",v="[object String]",y="[object Symbol]",h="[object WeakMap]",g="[object ArrayBuffer]",x="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",k="[object Int8Array]",B="[object Int16Array]",E="[object Int32Array]",q="[object Uint8Array]",_="[object Uint8ClampedArray]",C="[object Uint16Array]",O="[object Uint32Array]",S=/\w*$/,I=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,N={};N[r]=N["[object Array]"]=N[g]=N[x]=N[s]=N[i]=N[b]=N[w]=N[k]=N[B]=N[E]=N[l]=N[u]=N[m]=N[p]=N[f]=N[v]=N[y]=N[q]=N[_]=N[C]=N[O]=!0,N["[object Error]"]=N[a]=N[h]=!1;var Z="object"==typeof F&&F&&F.Object===Object&&F,z="object"==typeof self&&self&&self.Object===Object&&self,V=Z||z||Function("return this")(),W=n&&!n.nodeType&&n,T=W&&e&&!e.nodeType&&e,L=T&&T.exports===W;function M(e,n){return e.set(n[0],n[1]),e}function j(e,n){return e.add(n),e}function H(e,n,t,o){var r=-1,s=e?e.length:0;for(o&&s&&(t=e[++r]);++r<s;)t=n(t,e[r],r,e);return t}function R(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}function D(e){var n=-1,t=Array(e.size);return e.forEach((function(e,o){t[++n]=[o,e]})),t}function A(e,n){return function(t){return e(n(t))}}function P(e){var n=-1,t=Array(e.size);return e.forEach((function(e){t[++n]=e})),t}var $,Y=Array.prototype,U=Function.prototype,G=Object.prototype,X=V["__core-js_shared__"],K=($=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",J=U.toString,ee=G.hasOwnProperty,ne=G.toString,te=RegExp("^"+J.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=L?V.Buffer:void 0,re=V.Symbol,se=V.Uint8Array,ie=A(Object.getPrototypeOf,Object),ae=Object.create,ce=G.propertyIsEnumerable,le=Y.splice,ue=Object.getOwnPropertySymbols,me=oe?oe.isBuffer:void 0,de=A(Object.keys,Object),pe=Le(V,"DataView"),fe=Le(V,"Map"),ve=Le(V,"Promise"),ye=Le(V,"Set"),he=Le(V,"WeakMap"),ge=Le(Object,"create"),xe=De(pe),be=De(fe),we=De(ve),ke=De(ye),Be=De(he),Ee=re?re.prototype:void 0,qe=Ee?Ee.valueOf:void 0;function _e(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Ce(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Oe(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Se(e){this.__data__=new Ce(e)}function Ie(e,n){var t=Fe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Pe(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||ne.call(e)==r)}(e)?function(e,n){for(var t=-1,o=Array(e);++t<e;)o[t]=n(t);return o}(e.length,String):[],o=t.length,s=!!o;for(var i in e)!n&&!ee.call(e,i)||s&&("length"==i||He(i,o))||t.push(i);return t}function Qe(e,n,t){var o=e[n];ee.call(e,n)&&Ae(o,t)&&(void 0!==t||n in e)||(e[n]=t)}function Ne(e,n){for(var t=e.length;t--;)if(Ae(e[t][0],n))return t;return-1}function Ze(e,n,t,o,d,h,I){var Q;if(o&&(Q=h?o(e,d,h,I):o(e)),void 0!==Q)return Q;if(!Ue(e))return e;var Z=Fe(e);if(Z){if(Q=function(e){var n=e.length,t=e.constructor(n);return n&&"string"==typeof e[0]&&ee.call(e,"index")&&(t.index=e.index,t.input=e.input),t}(e),!n)return function(e,n){var t=-1,o=e.length;for(n||(n=Array(o));++t<o;)n[t]=e[t];return n}(e,Q)}else{var z=je(e),V=z==a||z==c;if($e(e))return function(e,n){if(n)return e.slice();var t=new e.constructor(e.length);return e.copy(t),t}(e,n);if(z==m||z==r||V&&!h){if(R(e))return h?e:{};if(Q=function(e){return"function"!=typeof e.constructor||Re(e)?{}:Ue(n=ie(e))?ae(n):{};var n}(V?{}:e),!n)return function(e,n){return We(e,Me(e),n)}(e,function(e,n){return e&&We(n,Ge(n),e)}(Q,e))}else{if(!N[z])return h?e:{};Q=function(e,n,t,o){var r,a=e.constructor;switch(n){case g:return Ve(e);case s:case i:return new a(+e);case x:return function(e,n){var t=n?Ve(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,o);case b:case w:case k:case B:case E:case q:case _:case C:case O:return function(e,n){var t=n?Ve(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}(e,o);case l:return function(e,n,t){var o=n?t(D(e),!0):D(e);return H(o,M,new e.constructor)}(e,o,t);case u:case v:return new a(e);case p:return function(e){var n=new e.constructor(e.source,S.exec(e));return n.lastIndex=e.lastIndex,n}(e);case f:return function(e,n,t){var o=n?t(P(e),!0):P(e);return H(o,j,new e.constructor)}(e,o,t);case y:return r=e,qe?Object(qe.call(r)):{}}}(e,z,Ze,n)}}I||(I=new Se);var W=I.get(e);if(W)return W;if(I.set(e,Q),!Z)var T=t?function(e){return function(e,n,t){var o=n(e);return Fe(e)?o:function(e,n){for(var t=-1,o=n.length,r=e.length;++t<o;)e[r+t]=n[t];return e}(o,t(e))}(e,Ge,Me)}(e):Ge(e);return function(e,n){for(var t=-1,o=e?e.length:0;++t<o&&!1!==n(e[t],t,e););}(T||e,(function(r,s){T&&(r=e[s=r]),Qe(Q,s,Ze(r,n,t,o,s,e,I))})),Q}function ze(e){return!(!Ue(e)||(n=e,K&&K in n))&&(Ye(e)||R(e)?te:I).test(De(e));var n}function Ve(e){var n=new e.constructor(e.byteLength);return new se(n).set(new se(e)),n}function We(e,n,t,o){t||(t={});for(var r=-1,s=n.length;++r<s;){var i=n[r],a=o?o(t[i],e[i],i,t,e):void 0;Qe(t,i,void 0===a?e[i]:a)}return t}function Te(e,n){var t,o,r=e.__data__;return("string"==(o=typeof(t=n))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==t:null===t)?r["string"==typeof n?"string":"hash"]:r.map}function Le(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return ze(t)?t:void 0}_e.prototype.clear=function(){this.__data__=ge?ge(null):{}},_e.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},_e.prototype.get=function(e){var n=this.__data__;if(ge){var o=n[e];return o===t?void 0:o}return ee.call(n,e)?n[e]:void 0},_e.prototype.has=function(e){var n=this.__data__;return ge?void 0!==n[e]:ee.call(n,e)},_e.prototype.set=function(e,n){return this.__data__[e]=ge&&void 0===n?t:n,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var n=this.__data__,t=Ne(n,e);return!(t<0||(t==n.length-1?n.pop():le.call(n,t,1),0))},Ce.prototype.get=function(e){var n=this.__data__,t=Ne(n,e);return t<0?void 0:n[t][1]},Ce.prototype.has=function(e){return Ne(this.__data__,e)>-1},Ce.prototype.set=function(e,n){var t=this.__data__,o=Ne(t,e);return o<0?t.push([e,n]):t[o][1]=n,this},Oe.prototype.clear=function(){this.__data__={hash:new _e,map:new(fe||Ce),string:new _e}},Oe.prototype.delete=function(e){return Te(this,e).delete(e)},Oe.prototype.get=function(e){return Te(this,e).get(e)},Oe.prototype.has=function(e){return Te(this,e).has(e)},Oe.prototype.set=function(e,n){return Te(this,e).set(e,n),this},Se.prototype.clear=function(){this.__data__=new Ce},Se.prototype.delete=function(e){return this.__data__.delete(e)},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,n){var t=this.__data__;if(t instanceof Ce){var o=t.__data__;if(!fe||o.length<199)return o.push([e,n]),this;t=this.__data__=new Oe(o)}return t.set(e,n),this};var Me=ue?A(ue,Object):function(){return[]},je=function(e){return ne.call(e)};function He(e,n){return!!(n=null==n?o:n)&&("number"==typeof e||Q.test(e))&&e>-1&&e%1==0&&e<n}function Re(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||G)}function De(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ae(e,n){return e===n||e!=e&&n!=n}(pe&&je(new pe(new ArrayBuffer(1)))!=x||fe&&je(new fe)!=l||ve&&je(ve.resolve())!=d||ye&&je(new ye)!=f||he&&je(new he)!=h)&&(je=function(e){var n=ne.call(e),t=n==m?e.constructor:void 0,o=t?De(t):void 0;if(o)switch(o){case xe:return x;case be:return l;case we:return d;case ke:return f;case Be:return h}return n});var Fe=Array.isArray;function Pe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Ye(e)}var $e=me||function(){return!1};function Ye(e){var n=Ue(e)?ne.call(e):"";return n==a||n==c}function Ue(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}function Ge(e){return Pe(e)?Ie(e):function(e){if(!Re(e))return de(e);var n=[];for(var t in Object(e))ee.call(e,t)&&"constructor"!=t&&n.push(t);return n}(e)}e.exports=function(e){return Ze(e,!0,!0)}},P(Y={path:$,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&Y.path)}},Y.exports),Y.exports);const G=e=>n.useMemo((()=>{const n=U(e),t=[],o=(n.question_details?.questions||[]).filter((e=>!e.type_info?.meta?.is_deleted));return o.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),t.push(n))})),{...n,question_details:{questions:o},meta:{...n.meta,blocks:t}}}),[]),X=e=>{const o=e.survey.question_details?.questions||[],[r,s]=n.useState([]),[i,a]=n.useState({formValues:{},others:{},commitDirtyValue:!1}),[c,l]=n.useState([]),[u,m]=n.useState(0),[d,p]=n.useState(!1),f=n.useRef(),[v,y]=n.useState(!1),h=n.useRef(!1),g=n.useRef(),x=n.useRef(!0),b=c[u],w=t.useMemo((()=>c.length>0?r?.findIndex((e=>e.name===c[u].name)):0),[u]);n.useEffect((()=>{e.survey.meta?.blocks&&s(e.survey.meta?.blocks.filter((e=>"TY"!==e.name)))}),[e.survey.meta?.blocks]),n.useEffect((()=>{if(!r||!r.length)return;f.current={...f.current,question:Z({questions:o})},null!=e.npsValue&&(f.current={...f.current,answer:z(f.current.question,e.npsValue)},a({...i,formValues:{[f.current.question.name]:f.current.answer}}));const n=W({pivotQn:f.current.question,pivotQnAnswer:f.current.answer,block:r[0],questions:o});l([{...r[0],question:n}])}),[r,e.npsValue]),n.useEffect((()=>{c.length&&(c.length>1&&(x.current=!1),m(c.length-1))}),[c]),n.useEffect((()=>{if(!S(i.formValues)&&r&&M({blocks:r,activeBlockIndexOfBlocks:w,blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i})){const n=()=>{p(!1);const e=T({activeBlock:b,blocks:r,activeBlockIndexOfBlocks:w,answers:i});if(e===1/0)return void setTimeout((()=>{E("COMPLETE"),y(!0)}));setTimeout((()=>{E()}));const n=W({pivotQn:f.current?.question,pivotQnAnswer:f.current?.answer,block:r?.[e],questions:o}),t=A({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u});l([...t,{...r?.[e],question:n}])};null!=e.npsValue&&1==c.length?g.current?(clearTimeout(g.current),g.current=null,n()):g.current=setTimeout((()=>{n()}),1500):n()}}),[i,r]),n.useEffect((()=>{!S(i.formValues)&&h.current&&(d?B():k(),h.current=!1)}),[d]);const k=()=>{d?(h.current=!0,p(!1)):m(u+1)},B=()=>{d?m(u-1):(h.current=!0,p(!0))},E=(n="PARTIAL")=>{let t=()=>{};"COMPLETE"===n&&(t=()=>{y(!0)}),e.onSubmit({...i.formValues,others_meta:i.others},t,n)};return{blocks:r,questions:o,blocksWithQns:c,activeBlock:b,activeBlockIndexOfBlocks:w,activeBlockIndexOfBlocksWithQns:u,isSurveyCompleted:v,isReverseAnimation:d,isNavigating:h.current,pivot:f.current,answers:i,isInitialTransition:x.current,navigateToNextBlock:k,navigateToPreviousBlock:B,saveFormValues:(e,n,t=!1)=>{e.question.name===f.current?.question.name&&f.current&&(f.current={...f.current,answer:n});let o=i;(t||L({question:e.question,answers:i}))&&(o=D({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i})),a({...o,formValues:{...o.formValues,...null!=n&&{[e.question.name]:n}},commitDirtyValue:t})},saveOthersValue:(e,n)=>{if(null===n){const n={...i.others};delete n[e],a({...i,commitDirtyValue:!1,others:n})}else a({...i,commitDirtyValue:!1,others:{...i.others,[e]:n}})},skipBlock:()=>{p(!1);const e=b.question;if(delete i.formValues[e.name],delete i.others[e.name],u!==c.length-1){const e=D({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i}),n=A({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u});l(n),a({...e,commitDirtyValue:!0})}else a({...i,commitDirtyValue:!0})},onSubmitHandler:E}},K=({thankYouQuestion:e,preview:o,placeholders:r,npsValue:s})=>(n.useEffect((()=>{o||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e3*e.type_info.meta?.redirectDelay??1e4)}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,r,s)}}),e.type_info.meta?.redirectUrl&&t.createElement("div",{style:{width:"100%"}},t.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in"," ",e.type_info.meta?.redirectDelay," seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),J=({activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,blocksWithQns:o,blocks:r,answers:s,navigateToPreviousBlock:i,navigateToNextBlock:a})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:R("navigation-prev",{blocks:r,answers:s,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n}),className:"navigation-button",onClick:i,title:"go to previous question"},t.createElement(_,{name:"arrow-previous"})),t.createElement("button",{className:"navigation-button",disabled:R("navigation-next",{blocks:r,answers:s,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n}),title:"go to next question",onClick:a},t.createElement(_,{name:"arrow-next"}))),ee=e=>{const{widget:o,surveyStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,onSubmit:m,skipBlock:d,navigateToNextBlock:p,navigateToPreviousBlock:f,isInitialTransition:v}=e,[y,h]=n.useState(!1),g={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,surveyStyle:r,widget:o},x={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,isSubmitting:y};return v&&!V({blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i})?null:t.createElement("div",{className:"question-footer"},j("navigation",g)&&t.createElement(J,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f}),t.createElement("div",{className:"action-buttons"},j("next",g)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",x),className:"next-button"},"Next"),j("skip",g)&&t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip"),j("submit",g)&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",x),onClick:()=>{h(!0),m()}},y?"Submitting":"Submit survey"))))},ne=e=>{const{blocks:n,blocksWithQns:r,activeBlock:s,activeBlockIndexOfBlocks:i,activeBlockIndexOfBlocksWithQns:a,isSurveyCompleted:c,isReverseAnimation:l,saveFormValues:u,saveOthersValue:m,skipBlock:d,onSubmitHandler:p,navigateToNextBlock:f,navigateToPreviousBlock:v,answers:y,questions:h,pivot:g,isInitialTransition:x}=X(e);return s&&s.question?t.createElement("div",{className:`freemium-survey-components ${e.mobilePreview?"mobile-preview":""} ${e.surveyStyle}-survey-style`,id:"freemium-survey"},c?null:t.createElement(B,{totalSteps:n.length,completedSteps:i+(c?1:0)}),t.createElement(o.SwitchTransition,{mode:"out-in"},t.createElement(o.CSSTransition,{key:a+String(c),addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:l?"fade-reverse":"fade"},t.createElement("div",{className:"questions"},c?t.createElement(K,{thankYouQuestion:W({pivotQn:g?.question,pivotQnAnswer:g?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:h}),preview:e.preview,placeholders:e.placeholders,npsValue:g?.answer}):t.createElement("div",{id:`${s.question.name}`,className:"question-container","data-test-question-name":s.question.name},t.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:Q(s?.question.text,e.placeholders,g?.answer)},"aria-label":`question-${a}`,role:"heading","aria-level":1}),t.createElement("div",{onTransitionEndCapture:e=>e.stopPropagation(),style:{width:"100%"}},t.createElement(O,{question:s.question,isFinalQn:V({blocks:n,activeBlockIndexOfBlocks:i,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:a}),formValues:y.formValues,othersMeta:y.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,saveOthersValue:m,onChangeHandler:e=>{u(s,e)}})),t.createElement(ee,{widget:!1,surveyStyle:e.surveyStyle,answers:y,blocksWithQns:r,blocks:n,activeBlockIndexOfBlocksWithQns:a,activeBlockIndexOfBlocks:i,saveFormValues:u,skipBlock:d,onSubmit:p,navigateToPreviousBlock:v,navigateToNextBlock:f,isInitialTransition:x})))))):null};s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n --compact-widget-max-height: 480px;\n --default-widget-max-height: 460px;\n --cozy-widget-max-height: 380px;\n}\n\n.freemium-survey-step-navigation {\n border-radius: 3px;\n border: 1px solid #efefef;\n white-space: nowrap;\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.freemium-survey-components.standard-survey-style .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: center;\n max-width: 700px;\n margin: 0 auto;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n border-radius: 4px;\n transition: transform 500ms ease 0ms, opacity 800ms ease 0ms;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n height: -moz-fit-content;\n height: fit-content;\n overflow: auto;\n opacity: 1;\n}\n.freemium-survey-components.standard-survey-style .hide-question-container {\n pointer-events: none;\n opacity: 0;\n}\n.freemium-survey-components.standard-survey-style .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.standard-survey-style .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.standard-survey-style .question-footer {\n display: flex;\n justify-content: flex-start;\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.standard-survey-style .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components.standard-survey-style .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .sec-button {\n font-weight: 500;\n color: #3a4b67;\n cursor: pointer;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.standard-survey-style .sec-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.standard-survey-style .next-button {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.standard-survey-style .submit {\n max-width: 700px;\n margin: 0 auto;\n text-align: left;\n background: transparent;\n box-shadow: none;\n padding-bottom: 40px;\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.standard-survey-style .fade-enter {\n opacity: 0;\n transform: translateY(40px);\n}\n.freemium-survey-components.standard-survey-style .fade-enter-active {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.standard-survey-style .fade-exit {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.standard-survey-style .fade-exit-active {\n opacity: 0;\n transform: translateY(-40px);\n}\n.freemium-survey-components.standard-survey-style .fade-enter,\n.freemium-survey-components.standard-survey-style .fade-enter-active,\n.freemium-survey-components.standard-survey-style .fade-exit,\n.freemium-survey-components.standard-survey-style .fade-exit-active {\n transition: all ease 400ms;\n pointer-events: none;\n}\n.freemium-survey-components.standard-survey-style .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.standard-survey-style .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.standard-survey-style .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.standard-survey-style .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.standard-survey-style .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.standard-survey-style .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .message-container:empty {\n display: none;\n}\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .action-buttons {\n flex-direction: column;\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .action-buttons button {\n max-width: unset;\n }\n .freemium-survey-components.standard-survey-style .action-button {\n max-width: unset;\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .thankyou .text {\n width: auto;\n }\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container {\n display: flex;\n }\n .freemium-survey-component .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n }\n}\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const te=({thankYouQuestion:e,preview:o,placeholders:r,npsValue:s})=>(n.useEffect((()=>{o||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e3*(1e3*e.type_info.meta?.redirectDelay??1e4))}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,r,s)}}),e.type_info.meta?.redirectUrl&&t.createElement("div",{style:{width:"100%"}},t.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in"," ",e.type_info.meta?.redirectDelay," seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),oe=e=>{const{blockIndex:n,widget:o,surveyStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,skipBlock:m,clearRadioSelection:d}=e,p={answers:s,blocks:a,blockIndex:n,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,surveyStyle:r,widget:o},f={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i};return(1!==i.length||1===a.length)&&n===l||j("clear-selection",p)?t.createElement("div",{className:"question-footer"},t.createElement("div",{className:"action-buttons"},j("next",p)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",f),className:"next-button"},"Next"),j("skip",p)&&t.createElement("button",{className:"sec-button",onClick:m,"aria-label":"skip question"},"Skip"),j("clear-selection",p)&&t.createElement("button",{className:"sec-button",onClick:()=>d(n)},"Clear selection"))):null},re=e=>{const{blocks:r,blocksWithQns:s,activeBlock:i,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,isSurveyCompleted:l,saveFormValues:u,saveOthersValue:m,skipBlock:d,clearRadioSelection:p,onSubmitHandler:f,answers:v,questions:y,pivot:h}=(e=>{const o=e.survey.question_details?.questions||[],[r,s]=n.useState([]),[i,a]=n.useState(0),c=n.useRef(),[l,u]=n.useState({formValues:{},others:{},commitDirtyValue:!1}),m=n.useRef(),[d,p]=n.useState(null),[f,v]=n.useState(!1),[y,h]=n.useState(!1),g=n.useRef(null),x=r[i],b=t.useMemo((()=>r.length>0?d?.findIndex((e=>e.name===r[i].name)):0),[i]);n.useEffect((()=>{e.survey.meta?.blocks&&p(e.survey.meta?.blocks.filter((e=>"TY"!==e.name)))}),[e.survey.meta?.blocks]),n.useEffect((()=>{if(!d||!d.length)return;c.current={...c.current,question:Z({questions:o})},null!=e.npsValue&&(c.current={...c.current,answer:z(c.current.question,e.npsValue)},o.find((e=>e.name===d[0].question_names[0])),u({...l,formValues:{[c.current.question.name]:c.current.answer}}));const n=W({pivotQn:c.current.question,pivotQnAnswer:c.current.answer,block:d[0],questions:o});s([{...d[0],question:n}])}),[d,e.npsValue]),n.useEffect((()=>{r.length&&a(r.length-1),g.current?.scrollIntoView({block:"start",behavior:"smooth"})}),[r]),n.useEffect((()=>{if(!S(l.formValues)&&d&&M({blocks:d,activeBlockIndexOfBlocks:b,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i,answers:l})){const n=()=>{const e=T({activeBlock:x,blocks:d,activeBlockIndexOfBlocks:b,answers:l});if(e===1/0)return void setTimeout((()=>{w("COMPLETE"),v(!0)}));setTimeout((()=>{w()}));const n=W({pivotQn:c.current?.question,pivotQnAnswer:c.current?.answer,block:d?.[e],questions:o}),t=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i});s([...t,{...d?.[e],question:n}])};null!=e.npsValue&&1==r.length?m.current?(clearTimeout(m.current),m.current=null,n()):m.current=setTimeout((()=>{n()}),1500):n()}}),[l,d]);const w=(n="PARTIAL")=>{let t=()=>{};"COMPLETE"===n&&(t=()=>{v(!0)}),e.onSubmit({...l.formValues,others_meta:l.others},t,n)};return{blocks:d,questions:o,blocksWithQns:r,activeBlock:x,activeBlockIndexOfBlocks:b,activeBlockIndexOfBlocksWithQns:i,isSurveyCompleted:f,pivot:c.current,answers:l,saveFormValues:(e,n,t=!1,o=i)=>{e.question.name===c.current?.question.name&&(c.current={...c.current,answer:n});let s=l;(t||L({question:e.question,answers:l}))&&(s=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:o,answers:l})),o!==i&&a(o),u({...s,formValues:{...s.formValues,...null!=n&&{[e.question.name]:n}},commitDirtyValue:t})},saveOthersValue:(e,n,t=i)=>{if(t!==i&&a(t),null===n){const n={...l.others};delete n[e],u({...l,commitDirtyValue:!1,others:n})}else u({...l,commitDirtyValue:!1,others:{...l.others,[e]:n}})},skipBlock:()=>{const e=x.question;if(delete l.formValues[e.name],delete l.others[e.name],i!==r.length-1){const e=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i,answers:l}),n=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i});s(n),u({...e,commitDirtyValue:!0})}else u({...l,commitDirtyValue:!0})},clearRadioSelection:e=>{e!==i&&a(e);const n=r[e].question;delete l.formValues[n.name],delete l.others[n.name];const t=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:e,answers:l}),o=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:e});s(o),u({...t,commitDirtyValue:!1})},onSubmitHandler:w}})(e),g=n.useRef(null),[x,b]=n.useState(!1);return n.useEffect((()=>{g.current?.scrollIntoView({block:"start",behavior:"smooth"})}),[s]),i&&i.question?t.createElement("div",{className:`freemium-survey-components ${e.mobilePreview?"mobile-preview":""} standard-survey-style`,id:"freemium-survey"},l?null:t.createElement(B,{totalSteps:r.length,completedSteps:a+(l?1:0)}),t.createElement(o.SwitchTransition,{mode:"out-in"},t.createElement(o.CSSTransition,{key:String(l),addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:"fade"},t.createElement("div",null,l?t.createElement(te,{thankYouQuestion:W({pivotQn:h?.question,pivotQnAnswer:h?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:y}),preview:e.preview,placeholders:e.placeholders,npsValue:h?.answer}):t.createElement(t.Fragment,null,t.createElement("div",{onTransitionEndCapture:e=>e.stopPropagation(),className:"questions"},s.map(((n,o)=>t.createElement("div",{key:n.question.name,ref:g,className:"question-container"},t.createElement("div",{className:"question-text "+(0===o?"nps":""),dangerouslySetInnerHTML:{__html:Q(n.question.text,e.placeholders,h?.answer)},"aria-label":`question-${o}`,role:"heading","aria-level":1}),t.createElement(O,{question:n.question,isFinalQn:V({blocks:r,activeBlockIndexOfBlocks:a,blocksWithQns:s,activeBlockIndexOfBlocksWithQns:c}),formValues:v.formValues,othersMeta:v.others,autoFocusDelay:"standard"===e.surveyStyle?350:20,saveOthersValue:(e,n)=>{m(e,n,o)},onChangeHandler:e=>{u(n,e,!1,o)}}),t.createElement(oe,{widget:!1,surveyStyle:e.surveyStyle,answers:v,blocksWithQns:s,blocks:r,blockIndex:o,activeBlockIndexOfBlocksWithQns:c,activeBlockIndexOfBlocks:a,saveFormValues:u,skipBlock:d,clearRadioSelection:p,onSubmit:f})))),j("submit",{answers:v,blocks:r,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,blocksWithQns:s,surveyStyle:e.surveyStyle,widget:!1})&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",{answers:v,blocks:r,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,blocksWithQns:s,isSubmitting:x}),onClick:()=>{b(!0),f()}},x?"Submitting":"Submit survey")))))))):null};s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n}\n\n.freemium-survey-components.widget-survey-components {\n overflow: hidden;\n}\n.freemium-survey-components.widget-survey-components * {\n scrollbar-color: rgba(216, 216, 216, 0.5) transparent !important;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar {\n height: auto;\n height: initial;\n width: 6px;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar-track {\n background: transparent !important;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: rgba(216, 216, 216, 0.5) !important;\n}\n.freemium-survey-components.widget-survey-components p {\n margin: 0;\n}\n.freemium-survey-components.widget-survey-components .questions {\n min-width: 100%;\n max-width: 100%;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n position: relative;\n display: flex;\n justify-content: row;\n align-items: flex-end;\n height: 100%;\n transition: height 200ms ease;\n}\n.freemium-survey-components.widget-survey-components .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n text-align: center;\n max-height: 100%;\n min-width: 100%;\n max-width: 700px;\n margin: 0 auto;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n padding: 28px 0;\n padding-top: 0;\n grid-gap: 28px;\n gap: 28px;\n overflow: auto;\n}\n.freemium-survey-components.widget-survey-components .question-wrapper {\n width: 100%;\n flex-grow: 1;\n padding: 4px 28px;\n overflow: auto;\n}\n.freemium-survey-components.widget-survey-components .hide-question-container {\n opacity: 0;\n}\n.freemium-survey-components.widget-survey-components .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n padding: 0 28px;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.widget-survey-components .question-text p {\n all: inherit;\n padding: 0;\n}\n.freemium-survey-components.widget-survey-components .nps-container .footer {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-enter {\n opacity: 1;\n transform: translateX(80px);\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-enter-active {\n position: absolute;\n opacity: 1;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-enter-done {\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-exit {\n opacity: 0.05;\n pointer-events: none;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-exit-active {\n pointer-events: none;\n opacity: 0;\n transform: translateX(-80px);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-enter {\n opacity: 0;\n position: absolute;\n transform: translateX(-80px);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-enter-active {\n opacity: 1;\n position: absolute;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-exit {\n opacity: 0.05;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-exit-active {\n opacity: 0;\n transform: translateX(80px);\n}\n.freemium-survey-components.widget-survey-components .fade-enter-active,\n.freemium-survey-components.widget-survey-components .fade-reverse-enter-active,\n.freemium-survey-components.widget-survey-components .fade-reverse-exit-active,\n.freemium-survey-components.widget-survey-components .fade-exit-active {\n transition: opacity 200ms, transform 200ms;\n}\n.freemium-survey-components.widget-survey-components .question-footer {\n margin: 0px auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: sticky;\n padding: 0 28px;\n bottom: -28px;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .question-footer:only-child {\n margin-left: auto;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation {\n white-space: nowrap;\n border-radius: 3px;\n border: 1px solid #efefef;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 40px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n.freemium-survey-components.widget-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .skip-button {\n font-weight: 500;\n cursor: pointer;\n color: #3a4b67;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.widget-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.widget-survey-components .next-button,\n.freemium-survey-components.widget-survey-components .submit {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.widget-survey-components .submit {\n margin-left: auto;\n}\n.freemium-survey-components.widget-survey-components .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.widget-survey-components .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.widget-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.widget-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.widget-survey-components .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n}\n.freemium-survey-components.widget-survey-components .message-container:empty {\n display: none;\n}\n\n.freemium-survey-components.widget-survey-components.compact-style .nps-question-text {\n text-align: center;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-container {\n grid-gap: 20px;\n gap: 20px;\n max-width: 100%;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer > *:first-child {\n margin-bottom: 0px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer > * {\n margin-bottom: 20px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .compact-footer-layout {\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .compact-footer-layout:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .action-buttons {\n grid-gap: 32px;\n gap: 32px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .submit,\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .action-button {\n max-width: unset;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components.compact-style .nps-container .footer {\n padding-top: 12px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .nps-container .choices {\n grid-gap: 10px;\n gap: 10px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .thankyou .text {\n width: 86%;\n}\n\n.freemium-survey-components.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\n.freemium-survey-components.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\n.freemium-survey-components.widget-survey-components.default-style .nps-container .choices {\n flex-wrap: unset;\n grid-gap: 12px;\n gap: 12px;\n}\n.freemium-survey-components.widget-survey-components.default-style .radio-group {\n flex-direction: column;\n flex-wrap: nowrap;\n}\n.freemium-survey-components.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n color: #3a4b67;\n}\n.freemium-survey-components.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.freemium-survey-components.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\n.freemium-survey-components.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n\n.freemium-survey-components.widget-survey-components.cozy-style {\n max-width: 1000px;\n min-width: 600px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n text-align: left;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-question-text {\n text-align: center;\n width: 70%;\n margin: 0 auto;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n color: #3a4b67;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.freemium-survey-components.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const se=({thankYouQuestion:e,placeholders:n,npsValue:o})=>t.createElement(t.Fragment,null,t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,n,o)}})),ie=({activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,blocksWithQns:o,blocks:r,answers:s,navigateToPreviousBlock:i,navigateToNextBlock:a})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:R("navigation-prev",{blocks:r,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,answers:s}),className:"navigation-button",onClick:i,title:"go to previous question"},t.createElement(_,{id:"arrow-previous"})),t.createElement("button",{className:"navigation-button",disabled:R("navigation-next",{blocks:r,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,answers:s}),onClick:a,title:"go to next question"},t.createElement(_,{glyph:"arrow-next"}))),ae=e=>{const{widget:o,widgetStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,onSubmit:m,skipBlock:d,navigateToNextBlock:p,navigateToPreviousBlock:f}=e,[v,y]=n.useState(!1),h={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,widget:o},g={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,isSubmitting:v},x="compact"===r&&j("navigation",h)&&j("skip",h);return 0!==l||V({blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i})?t.createElement("div",{className:"question-footer"},x?t.createElement("div",{className:"compact-footer-layout"},t.createElement(ie,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f}),t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip")):null,t.createElement("div",{className:"action-buttons"},!x&&j("navigation",h)&&t.createElement("div",{style:{marginRight:"auto"}},t.createElement(ie,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f})),"compact"!==r&&j("skip",h)&&t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip"),j("next",h)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",g),className:"next-button"},"Next"),j("submit",h)&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",g),onClick:()=>{y(!0),m()}},v?"Submitting":"Submit survey")))):null},ce=e=>{const{blocks:s,blocksWithQns:i,activeBlock:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,isSurveyCompleted:u,isReverseAnimation:d,saveFormValues:p,saveOthersValue:f,skipBlock:v,onSubmitHandler:y,navigateToNextBlock:h,navigateToPreviousBlock:g,answers:x,questions:b,pivot:w}=X(e),[k,E]=n.useState(null),q=n.useRef(0);return n.useMemo((()=>{(()=>{if(k){k.style.minHeight="unset",k.style.maxHeight="unset",k.style.height="min-content",k.style.position="static";const n=Math.min(k?.scrollHeight+2,m[e.widgetStyle]);k.style.height=n+"px",k.style.minHeight=n+"px",q.current=n}})()}),[k]),n.useEffect((()=>{e.setCurrentSurveyState?.({question:i?.[l]?.question,npsScore:w?.answer})}),[l,w?.answer]),a&&a.question?t.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style `,id:"freemium-survey"},e.widgetHeaderQuerySelector&&!u&&document.querySelector(e.widgetHeaderQuerySelector)?r.createPortal(t.createElement(B,{totalSteps:s.length,completedSteps:c+(u?1:0),widget:!0}),document.querySelector(e.widgetHeaderQuerySelector)):null,t.createElement("div",{className:"questions",style:{height:q.current,...1===i.length?{transition:"none"}:{}}},t.createElement(o.TransitionGroup,{component:null},t.createElement(o.CSSTransition,{key:l+String(u),unmountOnExit:!0,addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:d?"fade-reverse":"fade"},t.createElement("div",{ref:e=>e?E(e):null,id:`${a.question.name}`,className:"question-container "+(u?"thankyou":""),"data-test-question-name":a.question.name},u?t.createElement(se,{thankYouQuestion:W({pivotQn:w?.question,pivotQnAnswer:w?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:b}),placeholders:e.placeholders,npsValue:w?.answer}):t.createElement(t.Fragment,null,t.createElement("div",{className:"question-text "+("RANGE"===a?.question?.type_info?.question_type?"nps-question-text":""),dangerouslySetInnerHTML:{__html:Q(a?.question.text,e.placeholders,w?.answer)},"aria-label":`question-${l}`,role:"heading","aria-level":1}),t.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},t.createElement(O,{question:a.question,isFinalQn:V({blocks:s,activeBlockIndexOfBlocks:c,blocksWithQns:i,activeBlockIndexOfBlocksWithQns:l}),formValues:x.formValues,othersMeta:x.others,autoFocusDelay:0,saveOthersValue:f,onChangeHandler:e=>{p(a,e)}})),t.createElement(ae,{widget:!0,widgetStyle:e.widgetStyle,surveyStyle:"standard",answers:x,blocksWithQns:i,blocks:s,activeBlockIndexOfBlocksWithQns:l,activeBlockIndexOfBlocks:c,saveFormValues:p,skipBlock:v,onSubmit:y,navigateToPreviousBlock:g,navigateToNextBlock:h}))))))):null};s('#freshworks-survey-widget {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n --container-width: 350px;\n --widget-header-height: 36px;\n --widget-footer-height: 32px;\n}\n#freshworks-survey-widget * {\n box-sizing: border-box;\n}\n#freshworks-survey-widget input,\n#freshworks-survey-widget select,\n#freshworks-survey-widget textarea,\n#freshworks-survey-widget button {\n font-family: inherit;\n}\n@keyframes mountWidget {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n#freshworks-survey-widget div.widget-survey-components {\n border: none;\n}\n#freshworks-survey-widget .freemium-survey-components {\n width: 100%;\n height: 100%;\n min-height: inherit;\n}\n#freshworks-survey-widget .default-container-style {\n right: calc(50% - var(--container-width) / 2);\n}\n#freshworks-survey-widget .compact-container-style {\n right: 40px;\n}\n#freshworks-survey-widget .compact-container-style .widget-footer {\n padding: 8px 16px;\n}\n#freshworks-survey-widget .compact-container-style .header-content.minimized {\n padding-left: 16px;\n}\n#freshworks-survey-widget .cozy-container-style {\n max-width: 1000px;\n min-width: 800px;\n left: 50%;\n transform: translate(-50%, 0);\n}\n#freshworks-survey-widget .surveyserv-widget-container {\n position: fixed;\n bottom: 0;\n border-radius: 4px 4px 0 0;\n z-index: 2147483647;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n background-color: var(--question-background-color, #fff);\n width: var(--container-width);\n box-shadow: 0px 7px 13px rgba(18, 52, 77, 0.19);\n transition: opacity 0.25s ease, height var(--height-transition-duration) ease;\n animation: mountWidget 0.5s ease;\n height: auto;\n}\n#freshworks-survey-widget .widget-header {\n height: var(--widget-header-height);\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: row-reverse;\n grid-gap: 8px;\n gap: 8px;\n background-color: #fff;\n background-color: var(--question-background-color, #fff);\n border-radius: inherit;\n position: relative;\n}\n#freshworks-survey-widget .widget-header .icons {\n height: 100%;\n display: flex;\n}\n#freshworks-survey-widget .widget-header .icon {\n cursor: pointer;\n height: 100%;\n width: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n background-color: transparent;\n border: none;\n}\n#freshworks-survey-widget .widget-header .icon:hover .icon-tooltip {\n display: block;\n animation: mountWidget 0.4s ease;\n opacity: 1;\n}\n#freshworks-survey-widget .widget-header .icon:hover .icon-tooltip:hover {\n display: none;\n}\n#freshworks-survey-widget .widget-header .icon-tooltip {\n background: rgba(18, 52, 77, 0.8901960784);\n color: #fff;\n letter-spacing: 0.5px;\n padding: 4px 8px;\n border-radius: 4px;\n font-weight: 500;\n font-size: 0.9rem;\n position: absolute;\n right: 48px;\n top: 12px;\n white-space: nowrap;\n z-index: 1;\n transition: opacity ease 0.2s;\n display: none;\n opacity: 0;\n}\n#freshworks-survey-widget .widget-header.minimized {\n min-height: var(--widget-header-height);\n width: 100%;\n flex-direction: row;\n}\n#freshworks-survey-widget .header-content.minimized {\n opacity: 0;\n text-overflow: ellipsis;\n width: calc(100% - 72px);\n padding-left: 28px;\n overflow: hidden;\n white-space: nowrap;\n animation: mountWidget 0.8s ease forwards;\n animation-delay: 0.3s;\n font-weight: 500;\n line-height: 1.8;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n#freshworks-survey-widget .header-content.minimized p {\n all: inherit !important;\n width: 100% !important;\n padding: 0 !important;\n margin: 0 !important;\n}\n#freshworks-survey-widget .widget-main {\n opacity: 1;\n flex-grow: 1;\n transition: opacity 0.25s ease, height var(--height-transition-duration) ease;\n}\n#freshworks-survey-widget .widget-main.minimized {\n opacity: 0;\n height: 0;\n border-radius: 3px 3px 0 0;\n}\n#freshworks-survey-widget .widget-footer {\n height: var(--widget-footer-height);\n font-size: 12px;\n display: flex;\n padding: 8px 28px;\n justify-content: space-between;\n align-items: center;\n color: rgba(18, 52, 77, 0.831372549);\n background-color: rgba(187, 187, 187, 0.1);\n letter-spacing: 0.2px;\n}\n#freshworks-survey-widget .widget-footer .fw-link {\n display: flex;\n align-items: center;\n grid-gap: 6px;\n gap: 6px;\n}\n#freshworks-survey-widget .widget-footer .emoji {\n position: relative;\n top: -1px;\n left: -2px;\n}\n#freshworks-survey-widget .widget-footer a {\n color: inherit;\n text-decoration: none;\n box-sizing: border-box;\n border-bottom: 1px solid transparent;\n}\n#freshworks-survey-widget .widget-footer a:hover {\n border-bottom: 1px solid;\n}\n#freshworks-survey-widget .title,\n#freshworks-survey-widget .description {\n text-align: center;\n}\n#freshworks-survey-widget .description {\n color: #666;\n line-height: 1.2;\n}\n#freshworks-survey-widget .close-widget {\n position: absolute;\n z-index: 10;\n background-color: #fff;\n flex-direction: column;\n display: flex;\n top: 40px;\n right: 12px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);\n border-radius: 2px;\n padding: 4px;\n}\n#freshworks-survey-widget .close-widget button {\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 8px 12px;\n border-radius: 2px;\n font-size: 14px;\n}\n#freshworks-survey-widget .close-widget button:hover {\n background-color: #f3f3f3;\n}\n#freshworks-survey-widget .close-widget.top {\n top: -72px;\n}');const le=({survey:e,preview:o,placeholders:r,onSubmit:s,onDismiss:i,onClose:a,surveyType:c,unsubscribeUrl:l,isSurveyCompleted:u,children:m=null})=>{const p=e.question_details?.questions||[],[f,v]=n.useState(!1),[y,h]=n.useState(!1),[g,x]=n.useState(0),{ui_theme:b}=e,[w,k]=n.useState(null),[B,E]=n.useState(null),q=Z({questions:p}),O=()=>{v(!0),setTimeout((()=>{a?.()}),300)},S=n.useRef(null);return t.createElement("div",{className:`surveyserv-widget-container ${c}-container-style ${y?"minimized":""}`,style:{opacity:f?0:1,"--container-width":`${d[c]}`,"--height-transition-duration":"600ms",...N(b)}},m,t.createElement("header",{id:"surveyserv-widget-header",className:"widget-header "+(y?"minimized":"")},y&&t.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:Q(B?.question?.text??q?.text,{...r,"{{nps.rating}}":B?.npsScore})}}),t.createElement("div",{className:"icons"},!u&&t.createElement("button",{onClick:()=>{y?(h(!y),setTimeout((()=>{x(0)}),700)):(x(w?.clientHeight??0),setTimeout((()=>{h(!y)}),0))},className:"icon",title:y?"maximize widget":"minimize widget"},y?t.createElement(_,{name:"widget-maximize"}):t.createElement(_,{name:"widget-minimize"})),t.createElement("button",{ref:S,onClick:()=>{u||i(),O()},title:"dismiss widget",className:"icon"},t.createElement(_,{name:"widget-close"})))),t.createElement("main",{ref:e=>k(e),className:"widget-main "+(y?"minimized":""),style:{height:y?0:g||"auto"}},t.createElement(ce,{widgetStyle:c,survey:e,placeholders:r,onSubmit:s,setCurrentSurveyState:E,widgetHeaderQuerySelector:y?void 0:"#surveyserv-widget-header"})),t.createElement("footer",{className:"widget-footer"},t.createElement("a",{className:"fw-link",href:"https://www.freshworks.com/?utm_source=survey&utm_medium=survey_public_page",target:"_blank",rel:"noopener noreferrer"},"Powered by",t.createElement(C,null)),l&&!y&&t.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>{o&&e.preventDefault(),e.stopPropagation(),O()}},"Unsubscribe")))};exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=q,exports.CheckboxGroup=x,exports.Input=y,exports.NPS=i,exports.ProgressBar=B,exports.Radio=k,exports.RadioGroup=w,exports.Survey=e=>{const n=G(e.survey);return t.createElement(t.Fragment,null,"standard"===e.surveyStyle?t.createElement(re,{...e,survey:n}):t.createElement(ne,{...e,survey:n,surveyStyle:"card"}))},exports.TextArea=h,exports.WebInAppSurvey=e=>{const n=G(e.survey);return t.createElement(le,{...e,survey:n})};
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("react"),t=e(n),o=require("react-transition-group"),r=e(require("react-dom"));function s(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}s(".freemium-survey-components {\n --choice-background-color: #ebeff3;\n}\n.freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--choice-background-color);\n padding-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n color: #12344d;\n}\n.freemium-survey-components .nps-container .footer:empty {\n display: none;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n flex-direction: column;\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n}\n.freemium-survey-components .nps-container .nps-scale .help-text-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n color: #12344d;\n bottom: -40px;\n font-size: 12px;\n right: 0px;\n text-align: right;\n}\n.freemium-survey-components .nps-container .nps-scale .negative-text {\n color: #12344d;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\n}\n.freemium-survey-components .nps-container .nps-scale .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n font-weight: 500;\n border-radius: 4px;\n}\n.freemium-survey-components .nps-container .nps-scale .choice {\n background: var(--choice-background-color);\n}\n.freemium-survey-components .nps-container .nps-scale span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .nps-scale button {\n display: inline-block;\n font-size: 1rem;\n white-space: nowrap;\n vertical-align: middle;\n background: none;\n border: none;\n box-shadow: none;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n border-radius: 4px;\n margin: 0;\n outline: none;\n margin-left: -1px;\n width: 40px;\n height: 40px;\n transform: scale(1);\n padding: 0;\n}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, border-color 0.2s ease-in, transform 0.2s cubic-bezier(0.5, 2, 0.5, 0.75);\n}\n.freemium-survey-components .nps-container .nps-scale button:hover, .freemium-survey-components .nps-container .nps-scale button:focus {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .nps-scale.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .nps-scale.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .nps-scale.highlighted button:hover, .freemium-survey-components .nps-container .nps-scale.highlighted button:focus, .freemium-survey-components .nps-container .nps-scale.highlighted button.active {\n background: var(--default-brand-color) !important;\n background: var(--brand-color, var(--default-brand-color)) !important;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n background: rgba(228, 62, 61, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(2) {\n background: rgba(0, 175, 80, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-last-child(4) {\n background: rgba(248, 196, 62, 0.3);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:hover, .freemium-survey-components .nps-container .nps-scale.standard .choice.active {\n background: rgb(228, 62, 61);\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(2), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(2), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(1), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(2) {\n background: rgb(0, 175, 80);\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:focus:nth-last-child(4), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice:hover:nth-last-child(4), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(3), .freemium-survey-components .nps-container .nps-scale.standard .choice.active:nth-last-child(4) {\n background: rgb(248, 196, 62);\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .choices {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-row-gap: 6px;\n row-gap: 6px;\n grid-column-gap: 6px;\n -moz-column-gap: 6px;\n column-gap: 6px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n background: var(--choice-background-color);\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .choices,\n .card-survey-style .nps-container .nps-scale .choices {\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale .choices,\n .card-survey-style .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-row-gap: 6px;\n row-gap: 6px;\n grid-column-gap: 6px;\n -moz-column-gap: 6px;\n column-gap: 6px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n .card-survey-style .nps-container .nps-scale button {\n background: var(--choice-background-color);\n }\n .freemium-survey-components .nps-container .nps-scale button:hover, .freemium-survey-components .nps-container .nps-scale button:focus,\n .card-survey-style .nps-container .nps-scale button:hover,\n .card-survey-style .nps-container .nps-scale button:focus {\n color: unset;\n transform: unset;\n z-index: unset;\n position: unset;\n }\n .freemium-survey-components .nps-container .nps-scale.highlighted button:hover, .freemium-survey-components .nps-container .nps-scale.highlighted button:focus, .freemium-survey-components .nps-container .nps-scale.standard button:hover, .freemium-survey-components .nps-container .nps-scale.standard button:focus,\n .card-survey-style .nps-container .nps-scale.highlighted button:hover,\n .card-survey-style .nps-container .nps-scale.highlighted button:focus,\n .card-survey-style .nps-container .nps-scale.standard button:hover,\n .card-survey-style .nps-container .nps-scale.standard button:focus {\n background: var(--choice-background-color) !important;\n }\n}\n.widget-survey-components .nps-container .nps-scale .choices {\n background: transparent;\n}\n.widget-survey-components .nps-container .nps-scale .choices {\n flex-wrap: wrap;\n justify-content: center;\n grid-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.widget-survey-components .nps-container .nps-scale button {\n border-radius: 50%;\n background: var(--choice-background-color);\n}");const i=e=>{const{type_info:{linear_scale:{button_style:o="highlighted",button_shape:r="rounded"}={},rating_presets:{start:s="Very unlikely",end:i="Very likely"}={},validation:{min:a},footer_text:c}}=e,l=e=>{switch(e){case e<=6:return"detractor";case e<=8:return"passive";default:return"promoter"}},u=n.useRef(Array.from({length:10+(0===a?1:0)},((e,n)=>n+a)));return t.createElement("div",{className:"nps-container","data-test-input":"nps"},t.createElement("div",{className:`nps-scale ${r} ${o}`},t.createElement("div",{className:"button-container"},t.createElement("div",{className:"choices",role:"radiogroup","aria-required":!0},u.current.map((n=>t.createElement("button",{role:"radio","aria-checked":e.npsValue===n,key:n,"data-test-nps-choice":n,onClick:t=>{e.onChangeHandler(n)},className:`choice ${l(n)} ${e.npsValue===n&&"active"}`},n)))),t.createElement("div",{className:"help-text-container"},t.createElement("span",{className:"negative-text",role:"note"},`${a} - ${s}`),t.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${i}`)))),t.createElement("div",{className:"footer",role:"note"},c))},a=(e,n)=>(e.defaultProps=n,e);s('.freemium-survey-components .input-container,\n.freemium-survey-components .textarea-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n border-radius: 4px;\n position: relative;\n}\n.freemium-survey-components label.input-label {\n display: inline-block;\n padding-bottom: 8px;\n padding-left: 2px;\n font-size: 0.75rem;\n font-weight: 400;\n}\n.freemium-survey-components label.required::after {\n content: "*";\n position: relative;\n top: 2px;\n font-weight: 500;\n font-size: 0.85rem;\n padding-left: 3px;\n color: #d72d30;\n}\n.freemium-survey-components .input-basic {\n width: 100%;\n display: flex;\n align-items: center;\n border-radius: 4px;\n border: 1px solid var(--default-brand-color);\n border: 1px solid var(--brand-color, var(--default-brand-color));\n transition: border-color 0.2s linear;\n background: #fff;\n}\n.freemium-survey-components .textarea-container .input-basic {\n flex-direction: column;\n align-items: unset;\n}\n.freemium-survey-components .input-basic.error {\n border: 1px solid #d72d30;\n}\n.freemium-survey-components .input-basic.error:hover {\n border: 1px solid #d72d30;\n}\n.freemium-survey-components .input-basic.error[focus-within] {\n box-shadow: none;\n}\n.freemium-survey-components .input-basic.error:focus-within {\n box-shadow: none;\n}\n.freemium-survey-components .input-basic:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n transition: 0.2s linear;\n}\n.freemium-survey-components .input-basic[focus-within] {\n border: 1px solid transparent;\n box-shadow: 0 0 0 2px var(--default-brand-color);\n box-shadow: 0 0 0 2px var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .input-basic:focus-within {\n border: 1px solid transparent;\n box-shadow: 0 0 0 2px var(--default-brand-color);\n box-shadow: 0 0 0 2px var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .input-basic[focus-within] .end-max-length {\n opacity: 1;\n}\n.freemium-survey-components .input-basic:focus-within .end-max-length {\n opacity: 1;\n}\n.freemium-survey-components .end-max-length {\n transition: opacity ease 0.2s;\n opacity: 0;\n padding: 0 8px;\n font-size: 0.75rem;\n color: #264966;\n}\n.freemium-survey-components .textarea-container .end-max-length {\n padding: 8px;\n align-self: flex-end;\n}\n.freemium-survey-components span.input-error {\n display: block;\n padding-left: 2px;\n padding-top: 4px;\n font-size: 0.9rem;\n color: #d72d30;\n}\n.freemium-survey-components input[type=text] {\n padding: 6px 12px;\n flex: 1;\n border: unset;\n height: 32px;\n font-size: 1rem;\n min-width: 0;\n /* line-height: ${typography.input.text.lineHeight}; */\n border-radius: 4px;\n}\n.freemium-survey-components input[type=text],\n.freemium-survey-components textarea {\n outline: none;\n border: none;\n}\n.freemium-survey-components input[type=text]:focus,\n.freemium-survey-components textarea:focus {\n box-shadow: none !important;\n}\n.freemium-survey-components input[type=text]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]::placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components textarea {\n min-height: 116px;\n padding: 12px;\n flex: 1;\n border: unset;\n resize: none;\n font-size: 1rem;\n min-width: 0;\n /* line-height: ${typography.input.text.lineHeight}; */\n border-radius: 4px;\n}\n.freemium-survey-components textarea::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components textarea::placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}');const c=["RANGE","NPS"],l="Others",u=300,m={default:500,compact:500,cozy:400},d={default:"600px",compact:"350px",cozy:"96%"},p={isRequired:!1,showCount:!0,isErrored:!1,inline:!1,spellCheck:!1},f=n.forwardRef(((e,o)=>{const r=n.useRef(null);n.useEffect((()=>{setTimeout((()=>{r.current?.focus()}),u+(e.autoFocusDelay??0))}),[]);const{inputStyle:s,style:i,className:a,showCount:c,isErrored:l,startLabel:m,isRequired:d,errorText:p,endLabel:f,maxLength:v=256,onChange:y,...h}=e;return t.createElement("div",{className:"input-container",style:i},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),t.createElement(t.Fragment,null,m&&t.createElement("div",{className:"start-label"},m),t.createElement("div",{className:`input-basic ${l?"error":""}${a||""}`},t.createElement("input",{...h,onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),type:"text",autoComplete:"off",ref:r,style:s,onChange:e=>{e.target.value?.length>v||y?.(e)}}),c&&v>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${v}`)),f&&t.createElement("div",{className:"end-label"},f)),l&&p&&t.createElement("span",{className:"input-error"},e.errorText))})),v=n.forwardRef(((e,o)=>{const r=n.useRef(null);n.useEffect((()=>{setTimeout((()=>{r.current?.focus()}),u+(e.autoFocusDelay??0))}),[]);const{inputStyle:s,style:i,className:a,showCount:c,maxLength:l=1500,startLabel:m,isRequired:d,onChange:p,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:i},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),m&&t.createElement("div",{className:"start-label"},m),t.createElement("div",{className:`input-basic ${a||""}`},t.createElement("textarea",{...f,onFocus:e=>e.currentTarget.setSelectionRange(e.currentTarget.value.length,e.currentTarget.value.length),autoComplete:"off",ref:r,style:s,onChange:e=>{e.target.value?.length>l||p?.(e)}}),c&&l&&l>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${l}`)),e.endLabel&&t.createElement("div",{className:"end-label"},e.endLabel)))})),y=a(f,p),h=a(v,p);s('.freemium-survey-components .checkbox-group {\n width: 100%;\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n flex-direction: column;\n white-space: nowrap;\n flex-wrap: wrap;\n}\n.freemium-survey-components .icon-container {\n display: inline-block;\n flex: 0 0 12px;\n width: 12px;\n height: 12px;\n min-width: 12px;\n min-height: 12px;\n color: inherit;\n position: absolute;\n left: 1px;\n top: 2px;\n}\n.freemium-survey-components .tick-icon {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n width: 100%;\n color: inherit;\n fill: currentColor;\n}\n.freemium-survey-components input[type=checkbox] {\n position: absolute;\n clip: rect(0px 0px 0px 0px);\n width: 0px;\n height: 0px;\n}\n.freemium-survey-components input[type=checkbox]:focus ~ .checkbox {\n /* box-shadow: ${pseudo.focus} 0px 0px 0px 2px; */\n box-shadow: var(--default-brand-color) 0px 0px 0px 2px;\n box-shadow: var(--brand-color, var(--default-brand-color)) 0px 0px 0px 2px;\n border-color: transparent;\n}\n.freemium-survey-components .checkbox-label {\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: left;\n opacity: 1;\n line-height: 1.2;\n cursor: pointer;\n font-size: 1rem;\n padding: 16px 24px;\n min-width: 200px;\n border: 1px solid #ebeff3;\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover {\n border-color: #92a2b1;\n}\n.freemium-survey-components .checkbox-label.disabled {\n opacity: 0.5;\n cursor: "not-allowed";\n}\n.freemium-survey-components .checkbox {\n transition: background-color ease-in 0.2s;\n min-width: 14px;\n min-height: 14px;\n min-height: 14px;\n max-height: 14px;\n border-radius: 2px;\n position: relative;\n margin-right: 16px;\n background-color: #fff;\n border: 1px solid;\n text-align: left;\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .checkbox:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n box-shadow: var(--default-background-color) 0px 0px 0px 5px;\n box-shadow: var(--background-color, var(--default-background-color)) 0px 0px 0px 5px;\n}\n.freemium-survey-components input[type=checkbox]:checked ~ .checkbox {\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components input[type=checkbox]:checked ~ .checkbox:hover {\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components input[type=checkbox]:disabled ~ .checkbox:hover {\n box-shadow: unset;\n border-color: unset;\n}');const g=()=>t.createElement("svg",{id:"tick",className:"tick-icon",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"title",viewBox:"0 0 10 10"},t.createElement("path",{d:"M3 5.87c-.18666814.00267463-.36667109-.06932655-.5-.2L.21 3.41c-.1786328-.17863279-.24839684-.43899577-.1830127-.6830127.06538414-.24401694.25598306-.43461586.5-.5C.77100423 2.16160316 1.0313672 2.23136721 1.21 2.41L3 4.18 6.8.33c.27679776-.27455556.72320224-.27455556 1 0 .13696438.13025306.21450026.31098915.21450026.5S7.93696438 1.19974694 7.8 1.33L3.45 5.67c-.12082534.11896945-.28072735.19003701-.45.2Z",fill:"#fff",fillRule:"evenodd"})),x=({values:e=[],othersValue:o="",options:r,name:s,autoFocusDelay:i,onChangeHandler:a,saveOthersValue:c})=>{const m=e.includes(l),d=n.useRef(null);return n.useEffect((()=>{setTimeout((()=>{d.current?.focus()}),u+i)}),[]),t.createElement("div",{className:"checkbox-group"},t.createElement("button",{ref:d,className:"autofocus-button","aria-label":"checkbox question"}),r?.filter((e=>e.value!==l)).map(((n,o)=>t.createElement(b,{key:n.id,checked:e?.includes(n.value),name:n.value,id:n.id,onChange:(t,o)=>{if(o){const t=r.reduce(((e,n)=>({...e,[n.value]:n.position})),{});a([...e||[],n.value].sort(((e,n)=>t[e]-t[n])))}else{const t=e.indexOf(n.value);t>-1&&e.splice(t,1),a([...e])}}},n.value))),r?.find((e=>e.value===l))&&t.createElement(b,{key:"others",checked:m,name:l,id:l,onChange:(n,t)=>{if(t)a([...e,l]);else{const n=e.findIndex((e=>e===l));e.splice(n,1),a(e)}}},"Others"),m&&t.createElement(t.Fragment,null,t.createElement(y,{placeholder:"Enter your comment",value:o,onChange:e=>{c(s,e.target.value)},autoFocusDelay:10,label:""})))},b=a((e=>{const o=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),320)}),[]),t.createElement("label",{className:`checkbox-label ${e.disabled&&"disabled"}`},t.createElement("input",{ref:o,id:e.id,type:"checkbox",name:e.name,readOnly:e.readOnly,disabled:e.disabled,"aria-disabled":e.disabled,checked:e.checked,onChange:e.readOnly?()=>{}:n=>e.onChange(n,n.target.checked)}),t.createElement("div",{className:"checkbox"},e.checked&&t.createElement("div",{className:"icon-container"},t.createElement(g,null)," ")),t.createElement("div",null,e.children))}),{checked:!1});s('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\n width: 100%;\n}\n.freemium-survey-components .radio {\n background-color: #fff;\n border: 1px solid;\n border-color: var(--default-brand-color);\n border-color: var(--brand-color, var(--default-brand-color));\n transition: background-color ease-in 0.2s;\n min-width: 18px;\n max-width: 18px;\n min-height: 18px;\n max-height: 18px;\n border-radius: 50%;\n position: relative;\n margin-right: 16px;\n text-align: left;\n}\n.freemium-survey-components .radio:before {\n left: 3px;\n top: 3px;\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n transition: all ease-in 0.2s;\n background-color: #fff;\n}\n.freemium-survey-components .radio-label {\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n text-align: left;\n cursor: pointer;\n line-height: 1.2;\n font-size: 1rem;\n font-weight: 400;\n padding: 16px 24px;\n min-width: 200px;\n border: 1px solid #ebeff3;\n border-radius: 4px;\n white-space: pre-wrap;\n color: #3a4b67;\n}\n.freemium-survey-components input[type=radio] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n width: 0px;\n height: 0px;\n}\n.freemium-survey-components input[type=radio]:focus ~ .radio {\n /* box-shadow: ${pseudo.focus} 0px 0px 0px 3px; */\n box-shadow: var(--default-brand-color) 0px 0px 0px 3px;\n box-shadow: var(--brand-color, var(--default-brand-color)) 0px 0px 0px 3px;\n border-color: transparent;\n}\n.freemium-survey-components input[type=radio]:checked ~ .radio:before {\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n}\n.freemium-survey-components .radio-label:hover {\n border-color: #92a2b1;\n}');const w=({name:e,options:o,value:r,autoFocusDelay:s,onChangeHandler:i,saveOthersValue:a,othersOption:c,othersRequired:m,othersValue:d,isFinalQn:p})=>{const f=n.useRef(null);return n.useEffect((()=>{setTimeout((()=>{f.current?.focus()}),u+s)}),[]),t.createElement("div",{className:"radio-group",role:"radiogroup"},t.createElement("button",{ref:f,className:"autofocus-button","aria-label":"radio question",tabIndex:-1}),o?.sort(((e,n)=>e.value===l?1:n.value===l?-1:0))?.map(((n,o)=>t.createElement(k,{key:n.value,value:n.value,name:e,onChange:n=>{n.currentTarget.value!==l&&a(e,null),i(n.currentTarget.value)},checked:r===n.value},n.value===l?"Others":n.value))),r===l&&t.createElement(t.Fragment,null,t.createElement(y,{value:d??"",onChange:n=>{r!==l&&p&&i(l),a(e,n.target.value)},placeholder:"Enter your comment",label:"",autoFocusDelay:10})))},k=a((e=>{const o=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),320)}),[]),t.createElement("label",{className:"radio-label"},t.createElement("input",{ref:o,type:"radio",name:e.name,value:e.value,checked:e.checked,onChange:e.onChange}),t.createElement("div",{className:"radio"}),t.createElement("div",null,e.children))}),{checked:!1,autoFocus:!1});s(".progressbar-container {\n width: 100%;\n height: 4px;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 1;\n text-align: left;\n overflow: hidden;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n}\n\n.progressbar-container.widget {\n position: absolute;\n top: 0;\n height: 2px;\n}\n\n.progressbar {\n transition: transform 0.2s linear 200ms;\n transform-origin: left;\n height: 100%;\n background-color: var(--default-brand-color);\n background-color: var(--brand-color, var(--default-brand-color));\n}");const B=e=>{const{totalSteps:n,completedSteps:o,widget:r}=e;return t.createElement("div",{className:"progressbar-container "+(r?"widget":"")},t.createElement("div",{className:"progressbar",style:{width:(o>0?100/n:0)+"%",transform:`scaleX(${o})`}}))};s(".freemium-survey-components .action-button {\n width: auto;\n display: block;\n padding: 8px 16px;\n cursor: pointer;\n line-height: 1.5;\n text-align: center;\n font-weight: 600;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n color: --default-button-text-color;\n color: var(--button-text-color, --default-button-text-color);\n background: var(--default-brand-color);\n background: var(--brand-color, var(--default-brand-color));\n border: 1px solid var(--default-brand-color);\n border: 1px solid var(--brand-color, var(--default-brand-color));\n border-radius: 4px;\n min-width: 200px;\n max-width: -moz-fit-content;\n max-width: fit-content;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components .action-button:not([disabled]):hover {\n transform: translateY(-4px);\n}\n.freemium-survey-components .action-button[disabled] {\n cursor: not-allowed;\n opacity: 0.6;\n}\n.freemium-survey-components button:focus:not(:active) {\n /* box-shadow: 0 0 0 2px ${pseudo.focus}; */\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .action-button {\n min-width: 120px;\n }\n}\n.widget-survey-components .action-button {\n min-width: 120px;\n}\n\n.freemium-survey-components.mobile-preview .action-button {\n min-width: 120px;\n}");const E=()=>t.createElement(t.Fragment,null,"..."),q=e=>{const{inline:n=!1,children:o,disabled:r,className:s="",htmlType:i,type:a="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:m=!1,...d}=e;return t.createElement("button",{style:n?{display:"inline-block"}:{},disabled:r,className:`action-button ${s} ${u}`,type:i,onClick:c,...d},m?t.createElement(E,null):o)},_=({name:e})=>{switch(e){case"arrow-previous":return t.createElement("svg",{width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0.256667 7.83755C0.0925257 7.67361 0.000204227 7.4512 0 7.21921V6.77588C0.00268801 6.5444 0.0946357 6.32289 0.256667 6.15755L6.25333 0.172549C6.30756 0.117874 6.37208 0.0744776 6.44316 0.0448625C6.51425 0.0152474 6.59049 0 6.6675 0C6.74451 0 6.82075 0.0152474 6.89184 0.0448625C6.96292 0.0744776 7.02744 0.117874 7.08167 0.172549L7.91 1.00088C7.96432 1.05411 8.00748 1.11764 8.03694 1.18776C8.06641 1.25787 8.08158 1.33316 8.08158 1.40922C8.08158 1.48527 8.06641 1.56056 8.03694 1.63067C8.00748 1.70079 7.96432 1.76432 7.91 1.81755L2.71833 6.99755L7.91 12.1775C7.96467 12.2318 8.00807 12.2963 8.03769 12.3674C8.0673 12.4385 8.08255 12.5147 8.08255 12.5917C8.08255 12.6687 8.0673 12.745 8.03769 12.8161C8.00807 12.8871 7.96467 12.9517 7.91 13.0059L7.08167 13.8225C7.02744 13.8772 6.96292 13.9206 6.89184 13.9502C6.82075 13.9799 6.74451 13.9951 6.6675 13.9951C6.59049 13.9951 6.51425 13.9799 6.44316 13.9502C6.37208 13.9206 6.30756 13.8772 6.25333 13.8225L0.256667 7.83755Z",fill:"#6B6B6B"}));case"arrow-next":return t.createElement("svg",{width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.82585 6.15754C7.98999 6.32147 8.08232 6.54389 8.08252 6.77587L8.08252 7.2192C8.07983 7.45069 7.98788 7.6722 7.82585 7.83754L1.82919 13.8225C1.77496 13.8772 1.71044 13.9206 1.63936 13.9502C1.56827 13.9798 1.49203 13.9951 1.41502 13.9951C1.33801 13.9951 1.26177 13.9798 1.19068 13.9502C1.1196 13.9206 1.05508 13.8772 1.00085 13.8225L0.172521 12.9942C0.118197 12.941 0.0750381 12.8774 0.0455752 12.8073C0.0161124 12.7372 0.000937578 12.6619 0.000937585 12.5859C0.000937592 12.5098 0.0161125 12.4345 0.0455753 12.3644C0.0750381 12.2943 0.118197 12.2308 0.172521 12.1775L5.36419 6.99754L0.172522 1.81754C0.117847 1.76331 0.0744506 1.69879 0.0448352 1.62771C0.0152208 1.55662 -2.75162e-05 1.48038 -2.75094e-05 1.40337C-2.75027e-05 1.32636 0.0152208 1.25012 0.0448353 1.17904C0.0744507 1.10795 0.117847 1.04343 0.172522 0.989205L1.00086 0.172537C1.05508 0.117862 1.1196 0.0744661 1.19069 0.0448507C1.26177 0.0152353 1.33801 -1.20337e-05 1.41502 -1.2027e-05C1.49203 -1.20203e-05 1.56827 0.0152353 1.63936 0.0448507C1.71044 0.0744661 1.77496 0.117862 1.82919 0.172537L7.82585 6.15754Z",fill:"#6B6B6B"}));case"widget-maximize":return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",viewBox:"0 0 11 11",fill:"none"},t.createElement("mask",{id:"a",maskUnits:"userSpaceOnUse",x:"-.400146",y:"-.400024",width:"11",height:"11",fill:"#000"},t.createElement("path",{fill:"#fff",d:"M-.400146-.400024h11v11h-11z"}),t.createElement("path",{d:"m4.70226 6.76428-2.6856 2.6856 2.60775-.00293c.02738-.00011.05452.0052.07983.01562.02532.01043.04833.02577.06769.04513.01936.01936.0347.04237.04512.06769.01043.02531.01574.05245.01563.07983l-.00293.41358c.00011.0274-.0052.0545-.01563.0799-.01043.0253-.02576.0483-.04512.0676-.01937.0194-.04237.0347-.06769.0452-.02532.0104-.05245.0157-.07983.0156l-3.59922.0029c-.082493.0001-.161625-.0326-.220005-.0909l-.111467-.1115c-.057526-.0589-.090102-.13767-.090934-.21998L.602787 6.2584c-.000112-.02738.005198-.05452.015625-.07984.010427-.02532.025763-.04832.045125-.06768.019362-.01936.042366-.0347.067685-.04513.025319-.01042.052451-.01573.079833-.01562h.416535c.02704-.00028.05387.00485.0789.01507.02504.01022.04779.02533.06691.04445.01912.01913.03424.04187.04446.06691s.01534.05186.01507.0789l-.00294 2.60775 4.74323-4.74323.0044-.00427 2.6856-2.6856-2.60775.00294c-.02738.00011-.05452-.0052-.07983-.01563-.02532-.01042-.04833-.02576-.06769-.04512-.01936-.01936-.0347-.04237-.04512-.06769-.01043-.02532-.01574-.05245-.01563-.07983l.00293-.413603c-.00011-.027382.0052-.054514.01563-.079833.01043-.025319.02576-.048323.04512-.067685.01937-.019362.04237-.034698.06769-.045125.02532-.010427.05245-.015737.07983-.015625L9.85762.599976c.08249-.000052.16158.032657.21998.090934l.1115.111467c.0575.058878.0901.13769.0909.220003l-.0029 3.59922c.0001.02738-.0052.05452-.0156.07983-.0105.02532-.0258.04833-.0452.06769-.0193.01936-.0423.0347-.0676.04512-.0254.01043-.0525.01574-.0799.01563h-.41651c-.02704.00027-.05387-.00485-.0789-.01507-.02504-.01022-.04779-.02533-.06691-.04446-.01912-.01912-.03424-.04187-.04446-.0669-.01022-.02504-.01534-.05186-.01506-.07891l.00293-2.60775-4.74323 4.74323-.0044.00427Z"})),t.createElement("path",{d:"m4.70226 6.76428-2.6856 2.6856 2.60775-.00293c.02738-.00011.05452.0052.07983.01562.02532.01043.04833.02577.06769.04513.01936.01936.0347.04237.04512.06769.01043.02531.01574.05245.01563.07983l-.00293.41358c.00011.0274-.0052.0545-.01563.0799-.01043.0253-.02576.0483-.04512.0676-.01937.0194-.04237.0347-.06769.0452-.02532.0104-.05245.0157-.07983.0156l-3.59922.0029c-.082493.0001-.161625-.0326-.220005-.0909l-.111467-.1115c-.057526-.0589-.090102-.13767-.090934-.21998L.602787 6.2584c-.000112-.02738.005198-.05452.015625-.07984.010427-.02532.025763-.04832.045125-.06768.019362-.01936.042366-.0347.067685-.04513.025319-.01042.052451-.01573.079833-.01562h.416535c.02704-.00028.05387.00485.0789.01507.02504.01022.04779.02533.06691.04445.01912.01913.03424.04187.04446.06691s.01534.05186.01507.0789l-.00294 2.60775 4.74323-4.74323.0044-.00427 2.6856-2.6856-2.60775.00294c-.02738.00011-.05452-.0052-.07983-.01563-.02532-.01042-.04833-.02576-.06769-.04512-.01936-.01936-.0347-.04237-.04512-.06769-.01043-.02532-.01574-.05245-.01563-.07983l.00293-.413603c-.00011-.027382.0052-.054514.01563-.079833.01043-.025319.02576-.048323.04512-.067685.01937-.019362.04237-.034698.06769-.045125.02532-.010427.05245-.015737.07983-.015625L9.85762.599976c.08249-.000052.16158.032657.21998.090934l.1115.111467c.0575.058878.0901.13769.0909.220003l-.0029 3.59922c.0001.02738-.0052.05452-.0156.07983-.0105.02532-.0258.04833-.0452.06769-.0193.01936-.0423.0347-.0676.04512-.0254.01043-.0525.01574-.0799.01563h-.41651c-.02704.00027-.05387-.00485-.0789-.01507-.02504-.01022-.04779-.02533-.06691-.04446-.01912-.01912-.03424-.04187-.04446-.0669-.01022-.02504-.01534-.05186-.01506-.07891l.00293-2.60775-4.74323 4.74323-.0044.00427Z",fill:"#264966"}),t.createElement("path",{d:"m4.70226 6.76428-.19158-.19732-.00287.00287.19445.19445Zm-2.6856 2.6856-.19445-.19445-.4702.4702.66496-.00075-.00031-.275Zm2.60775-.00293.00031.275h.00082l-.00113-.275Zm.14752.06075.19446-.19445-.00001-.00001-.19445.19446Zm.06075.14752.27499.00195.00001-.00082-.275-.00113Zm-.00293.41358-.27501-.0019.00001.003.275-.0011Zm-.06075.1475.19445.1945-.19445-.1945Zm-.06769.0452-.10471-.2543.10471.2543Zm-.07983.0156.00113-.275h-.00136l.00023.275Zm-3.59922.0029.00017.275h.00005l-.00022-.275Zm-.220005-.0909-.194454.1944.00017.0002.194284-.1946Zm-.111467-.1115-.196712.1922.002257.0023.194455-.1945Zm-.090934-.21998L.324837 9.8574l.000031.003.274986-.00278ZM.602787 6.2584l.275003.00022-.000005-.00135-.274998.00113Zm.015625-.07984L.36413 6.07385H.364129l.254283.10471Zm.045125-.06768.194453.19445h.000003l-.194456-.19445Zm.067685-.04513.104714.25429.000005-.00001-.104719-.25428Zm.079833-.01562-.001128.275h.001127l.000001-.275Zm.416535 0v.27501l.00281-.00002-.00281-.27499Zm.0789.01507-.10394.2546h.00001l.10393-.2546Zm.06691.04445.19445-.19445-.19445.19445Zm.04446.06691.2546-.10394-.2546.10394Zm.01507.0789-.275-.0028v.00249l.275.00031Zm-.00294 2.60775-.275-.00031-.00075.66497.47021-.4702-.19446-.19446Zm4.74323-4.74323-.19158-.19732-.00287.00287.19445.19445Zm.0044-.00427.19158.19733.00287-.00287-.19445-.19446Zm2.6856-2.6856.19445.19446.4702-.4702-.66496.00074.00031.275Zm-2.60775.00294-.00031-.275h-.00082l.00113.275Zm-.07983-.01563-.10472.25429.10472-.25429Zm-.06769-.04512.19446-.19446H6.3024l-.19445.19446Zm-.04512-.06769.25428-.10471v-.00001l-.25428.10472Zm-.01563-.07983-.27499-.00195-.00001.00082.275.00113Zm.00293-.413603.27502.001951L6.32513.81005l-.275.001127Zm.01563-.079833L5.81148.626625v.000004l.25428.104715Zm.04512-.067685L5.91643.469203v.000003l.19445.194453Zm.06769-.045125L6.07385.364252l.10472.254282ZM6.2584.602909 6.25728.87791l.00135-.000001-.00023-.275ZM9.85762.599976l-.00017-.275H9.8574l.00022.275Zm.21998.090934.1945-.194455-.0002-.000172-.1943.194627Zm.1115.111467.1967-.192197-.0023-.002257-.1944.194454Zm.0909.220003.275.00022v-.003l-.275.00278Zm-.0029 3.59922-.275-.00022v.00135l.275-.00113Zm-.0156.07983-.2543-.10472v.00001l.2543.10471Zm-.0452.06769-.1944-.19446.1944.19446Zm-.1475.06075.0012-.275h-.0012v.275Zm-.41651 0v-.27502l-.00281.00003.00281.27499Zm-.0789-.01507.10394-.2546-.10394.2546Zm-.06691-.04446.19446-.19445-.00001-.00001-.19445.19446Zm-.04446-.0669.25461-.10394-.00001-.00001-.2546.10395Zm-.01506-.07891.27499.00282.00001-.00251-.275-.00031Zm.00293-2.60775.275.00031.00075-.66496-.47021.4702.19446.19445ZM4.70666 6.76001l.19159.19733.00286-.00287-.19445-.19446Zm-.19885-.19018-2.6856 2.6856.38891.38891 2.6856-2.6856-.38891-.38891ZM2.01697 9.72488l2.60775-.00293-.00062-.55-2.60775.00293.00062.55Zm2.60857-.00293c-.00893.00003-.01777-.0017-.02601-.00509l.20943-.50857c-.05888-.02425-.12198-.0366-.18568-.03634l.00226.55Zm-.02601-.00509c-.00825-.0034-.01575-.0084-.02205-.0147l.3889-.38892c-.04503-.04503-.09853-.0807-.15742-.10495l-.20943.50857Zm-.02206-.01471c-.00631-.00631-.0113-.0138-.0147-.02205l.50857-.20943c-.02425-.05889-.05992-.11239-.10495-.15742l-.38892.3889Zm-.0147-.02205c-.0034-.00825-.00512-.01709-.00509-.02601l.55.00226c.00026-.06369-.01209-.12679-.03634-.18568l-.50857.20943Zm-.00508-.02683-.00294.41363.54999.0039.00293-.41363-.54998-.0039Zm-.00294.41663c-.00004-.0089.00169-.0177.00509-.026l.50856.2095c.02425-.0589.0366-.122.03634-.1857l-.54999.0022Zm.00509-.026c.0034-.0082.00839-.0157.0147-.022l.38891.3889c.04503-.045.0807-.0985.10495-.1574l-.50856-.2095Zm.01471-.022c.0063-.0063.01379-.0113.02205-.0147l.20943.5085c.05889-.0242.11239-.0599.15742-.1049l-.3889-.3889Zm.02205-.0147c.00824-.0034.01708-.0051.02601-.0051l-.00226.55c.06369.0002.1268-.0121.18568-.0364l-.20943-.5085Zm.02465-.0051-3.59922.0029.00045.55 3.59922-.0029-.00045-.55Zm-3.59917.0029c-.00957 0-.01876-.0038-.025541-.01054l-.388568.38924c.109981.1098.259058.1714.414459.1713l-.00035-.55Zm-.025371-.01037-.111467-.11146-.388909.38893.111468.1114.388908-.38887Zm-.109222-.10919c-.008001-.00819-.012532-.01915-.012648-.0306l-.549971.00556c.001548.1532.062169.2998.169221.4094l.393398-.38436Zm-.012634-.0276.002934-3.59922-.55-.00045L.324854 9.8574l.549999.00044Zm.002932-3.60057a.0675974.0675974 0 0 1-.005091.02601l-.508565-.20943c-.024249.05888-.036601.12199-.03634.18567l.549996-.00225Zm-.005092.02601c-.003395.00825-.008392.01574-.014703.02205l-.388906-.38891c-.045036.04504-.080705.09854-.104954.15743l.508563.20943Zm-.0147.02205c-.006311.00631-.013807.01131-.022057.01471l-.209429-.50857c-.058887.02425-.112392.05992-.157426.10496l.388912.3889Zm-.022052.0147c-.008251.0034-.017093.00513-.026013.0051l.002254-.55c-.063684-.00026-.12679.01209-.185679.03634l.209438.50856Zm-.024887.0051h.416536v-.55H.811055l-.000001.55Zm.419346-.00001c-.00954.00009-.01901-.00171-.02785-.00532l.20788-.5092c-.05891-.02405-.12202-.03611-.18564-.03546l.00561.54998Zm-.02784-.00532c-.00884-.00361-.01687-.00894-.02361-.01569l.3889-.38891c-.04499-.04499-.09851-.08055-.15742-.1046l-.20787.5092Zm-.02362-.01569c-.00674-.00675-.01208-.01477-.01568-.02361l.5092-.20788c-.02405-.05891-.05962-.11243-.10461-.15742l-.38891.38891Zm-.01568-.02361c-.00361-.00884-.00542-.0183-.00532-.02784l.54997.00561c.00065-.06362-.0114-.12674-.03545-.18565l-.5092.20788Zm-.00533-.02535L1.15499 8.8629l.55.00062.00294-2.60775-.55-.00062Zm.46652 2.80252 4.74323-4.74323-.38891-.38891-4.74323 4.74323.38891.38891Zm4.74033-4.74038.0044-.00427-.38312-.39461-.0044.00427.38312.39461Zm.00729-.00712 2.6856-2.6856-.38891-.38891-2.6856 2.6856.38891.38891Zm2.49084-3.15506-2.60775.00294.00062.55 2.60775-.00294-.00062-.55Zm-2.60857.00294c.00892-.00004.01776.00169.02601.00509l-.20943.50857c.05889.02424.12199.0366.18568.03634l-.00226-.55Zm.02601.00509c.00825.0034.01575.00839.02206.0147l-.38891.38891c.04503.04503.09853.0807.15742.10496l.20943-.50857Zm.02205.0147c.00631.00631.01131.01381.01471.02206l-.50857.20943c.02425.05888.05992.11239.10496.15742l.3889-.38891Zm.01471.02205c.0034.00826.00513.0171.00509.02602l-.55-.00226c-.00026.06369.01209.12679.03635.18568l.50856-.20944Zm.00508.02684.00294-.413602-.54999-.003901-.00293.413603.54998.0039Zm.00294-.41668c.00004.00892-.00169.01776-.00509.026009l-.50856-.20943c-.02425.058887-.0366.121992-.03634.185675L6.32513.81005Zm-.00509.026013c-.0034.008247-.00839.015741-.0147.022049L5.91643.469206c-.04503.045032-.0807.098534-.10495.157419l.50856.209438Zm-.0147.022052c-.00631.006307-.0138.011304-.02205.014701L6.07385.364252c-.05889.024251-.11239.059921-.15742.104951l.38891.388912Zm-.02205.014701a.0675974.0675974 0 0 1-.02601.005091l.00225-.549996c-.06369-.000261-.12679.012091-.18568.036341l.20944.508564Zm-.02466.005093L9.85785.874976l-.00045-.55-3.59922.002933.00045.55ZM9.8578.874976c.00957-.000006.01876.003791.02554.01056l.38856-.389253c-.11-.109784-.259-.171404-.41445-.171307l.00035.55Zm.02537.010388.11147.111467.38886-.388908-.1114-.111467-.38893.388908Zm.10922.109197c.00801.008189.01251.019149.01261.030599l.55-.00556c-.0015-.153176-.0622-.29984-.1692-.409407l-.39341.384368Zm.01261.027589-.0029 3.59923.55.00044.0029-3.59922-.55-.00045Zm-.0029 3.60058c0-.00892.0017-.01777.0051-.02602l.5085.20945c.0243-.05889.0367-.122.0364-.18569l-.55.00226Zm.0051-.02601c.0034-.00825.0084-.01574.0147-.02206l.3889.38892c.045-.04504.0807-.09855.105-.15743l-.5086-.20943Zm.0147-.02206c.0063-.00631.0138-.0113.022-.0147l.2095.50857c.0589-.02425.1124-.05992.1574-.10496l-.3889-.38891Zm.022-.0147c.0083-.0034.0171-.00513.0261-.00509l-.0023.55c.0637.00026.1268-.01209.1857-.03634l-.2095-.50857Zm.0249-.00509h-.41651v.55h.41651v-.55Zm-.41932.00001c.00954-.00009.01901.00171.02785.00532l-.20789.5092c.05892.02405.12203.0361.18566.03545l-.00562-.54997Zm.02785.00532c.00883.00361.01686.00894.02361.01569l-.38892.3889c.045.045.09852.08056.15743.10461l.20788-.5092Zm.0236.01568c.00675.00675.01209.01478.0157.02362l-.50921.20787c.02405.05892.05961.11244.10461.15743l.3889-.38892Zm.01569.02361c.00361.00884.00542.01831.00532.02786l-.54997-.00563c-.00065.06363.0114.12675.03546.18566l.50919-.20789Zm.00534.02535.00293-2.60775-.55-.00061-.00293 2.60774.55.00062Zm-.46653-2.80251L4.51221 6.56556l.3889.38891 4.74323-4.74323-.38891-.38891ZM4.51509 6.56271l-.00439.00427.38313.3946.0044-.00427-.38314-.3946Z",fill:"#264966",mask:"url(#a)"}));case"widget-minimize":return t.createElement("svg",{width:"8",height:"8",viewBox:"0 0 7 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6.08333 1.32682H0.583333C0.261167 1.32682 0 1.06565 0 0.743489C0 0.421323 0.261167 0.160156 0.583333 0.160156H6.08333C6.4055 0.160156 6.66667 0.421323 6.66667 0.743489C6.66667 1.06565 6.4055 1.32682 6.08333 1.32682Z",fill:"#264966"}));case"widget-close":return t.createElement("svg",{width:"11",height:"10",viewBox:"0 0 11 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("rect",{opacity:"0.01",x:"0.16748",width:"10",height:"10",fill:"white",fillOpacity:"0.01"}),t.createElement("path",{d:"M1.85129 1.68479L8.48395 8.31744",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}),t.createElement("path",{d:"M8.48395 1.68479L1.85129 8.31744",stroke:"#264966",strokeWidth:"1.5",strokeLinecap:"round"}));case"thumbs-up":return t.createElement("path",{fill:"#12344D",stroke:"#12344D","stroke-width":".5",d:"M16.5 7.25H14a.5.5 0 0 0-.5.5v.442A17.952 17.952 0 0 1 11.25 6.5c-.894-.806-1.75-3.022-1.75-4.25a1.25 1.25 0 1 0-2.5 0V3.5c0 1.339.315 2.41.537 3H2.5a1.496 1.496 0 0 0-.516 2.903 1.49 1.49 0 0 0 .5 2.5 1.49 1.49 0 0 0 .5 2.5A1.49 1.49 0 0 0 2.5 15.5 1.5 1.5 0 0 0 4 17h5.25c1.991 0 3.645-1.095 4.25-1.552V16.5a.5.5 0 0 0 .5.5h2.5a.5.5 0 0 0 .5-.5V7.75a.5.5 0 0 0-.5-.5Zm-3 7.466c-.812.772-2.507 1.784-4.25 1.784H4a.997.997 0 0 1-.29-1.952s.29-.044.29-.298c0-.273-.4-.25-.4-.25h-.1a.997.997 0 0 1-.29-1.952s.29-.053.29-.298c0-.297-.4-.25-.4-.25H3a.997.997 0 0 1-.29-1.952S3 9.533 3 9.25C3 8.944 2.6 9 2.6 9h-.1a1 1 0 0 1 0-2H8c.158 0 .37-.119.188-.48C7.845 5.84 7.5 4.894 7.5 3.5V2.25a.75.75 0 1 1 1.5 0v.25c0 1.364.909 3.523 2 4.5 1.103.988 1.985 1.517 2.5 1.778v5.938Zm3 1.784H14V7.75h2.5v8.75ZM6.25 14H3.726a.25.25 0 1 0 0 .5H6.25a.25.25 0 1 0 0-.5ZM6 11.75a.25.25 0 0 0-.25-.25H3.226a.25.25 0 1 0 0 .5H5.75a.25.25 0 0 0 .25-.25Zm-.5-2.5A.25.25 0 0 0 5.25 9H2.726a.25.25 0 1 0 0 .5H5.25a.25.25 0 0 0 .25-.25Z"});case"thumbs-down":return t.createElement("path",{d:"M16.5 10.75H14C13.724 10.75 13.5 10.526 13.5 10.25V9.80825C12.9585 10.1553 12.0635 10.7667 11.25 11.5C10.3558 12.3063 9.5 14.522 9.5 15.75C9.5 16.4405 8.9405 17 8.25 17C7.5595 17 7 16.4405 7 15.75C7 15.75 7 15.7405 7 14.5C7 13.1613 7.315 12.0897 7.5365 11.5H2.5C1.67175 11.5 1 10.8282 1 10C1 9.354 1.41075 8.808 1.9835 8.597C1.68775 8.323 1.5 7.93475 1.5 7.5C1.5 6.854 1.91075 6.308 2.4835 6.097C2.18775 5.823 2 5.43475 2 5C2 4.354 2.41075 3.808 2.9835 3.597C2.68775 3.323 2.5 2.93475 2.5 2.5C2.5 1.67175 3.17175 1 4 1H9.25C11.241 1 12.895 2.0955 13.5 2.552V1.5C13.5 1.224 13.724 1 14 1H16.5C16.776 1 17 1.224 17 1.5V10.25C17 10.526 16.776 10.75 16.5 10.75ZM13.5 3.284C12.688 2.512 10.9932 1.5 9.25 1.5H4C3.44775 1.5 3 1.94775 3 2.5C3 2.95075 3.3 3.32725 3.7095 3.45225C3.7095 3.45225 4 3.4965 4 3.75C4 4.023 3.6 4 3.6 4H3.5C2.94775 4 2.5 4.44775 2.5 5C2.5 5.45075 2.8 5.82725 3.2095 5.95225C3.2095 5.95225 3.5 6.00475 3.5 6.25C3.5 6.54675 3.1 6.5 3.1 6.5H3C2.44775 6.5 2 6.94775 2 7.5C2 7.95075 2.3 8.32725 2.7095 8.45225C2.7095 8.45225 3 8.46725 3 8.75C3 9.05575 2.6 9 2.6 9H2.5C1.94775 9 1.5 9.44775 1.5 10C1.5 10.5522 1.94775 11 2.5 11H8C8.158 11 8.36975 11.1187 8.18825 11.4795C7.84525 12.1607 7.5 13.107 7.5 14.5C7.5 15.3388 7.5 15.75 7.5 15.75C7.5 16.1643 7.83575 16.5 8.25 16.5C8.66425 16.5 9 16.1643 9 15.75V15.5C9 14.1363 9.90875 11.977 11 11C12.1033 10.0122 12.9847 9.4835 13.5 9.22225V3.284ZM16.5 1.5H14V9.5V10.25H16.5V1.5ZM6.25 4H3.72619C3.58794 4 3.47619 3.88825 3.47619 3.75C3.47619 3.61175 3.58794 3.5 3.72619 3.5H6.25C6.38825 3.5 6.5 3.61175 6.5 3.75C6.5 3.88825 6.38825 4 6.25 4ZM6 6.25C6 6.38825 5.88825 6.5 5.75 6.5H3.22619C3.08794 6.5 2.97619 6.38825 2.97619 6.25C2.97619 6.11175 3.08794 6 3.22619 6H5.75C5.88825 6 6 6.11175 6 6.25ZM5.5 8.75C5.5 8.88825 5.38825 9 5.25 9H2.72619C2.58794 9 2.47619 8.88825 2.47619 8.75C2.47619 8.61175 2.58794 8.5 2.72619 8.5H5.25C5.38825 8.5 5.5 8.61175 5.5 8.75Z",fill:"#12344D",stroke:"#12344D","stroke-width":"0.5"});case"tick":return t.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.3552 16.1457C13.7379 15.1037 16.0337 11.9625 15.9995 8.42306C15.9987 8.02539 15.9689 7.6283 15.9104 7.23496C15.875 6.98912 15.7112 6.78082 15.4806 6.68854C15.25 6.59625 14.9877 6.63399 14.7925 6.78755C14.5973 6.9411 14.4988 7.18713 14.5342 7.43297C14.5901 7.75998 14.6166 8.09133 14.6134 8.42306C14.6134 12.032 11.6877 14.9577 8.07878 14.9577C4.46983 14.9577 1.5442 12.032 1.5442 8.42306C1.5442 4.81411 4.46983 1.88847 8.07878 1.88847C8.94795 1.89329 9.80701 2.07521 10.6035 2.42312C10.9562 2.57349 11.364 2.40948 11.5144 2.05679C11.6648 1.7041 11.5008 1.29628 11.1481 1.14591C7.89405 -0.246989 4.11151 0.664075 1.84854 3.38579C-0.414427 6.10751 -0.619803 9.9928 1.34361 12.9379C3.30703 15.8831 6.97244 17.1878 10.3552 16.1457ZM4.75255 7.63644C4.93969 7.63644 5.11863 7.71321 5.24759 7.84881L7.02975 9.63097L13.2277 3.41321C13.5011 3.13981 13.9444 3.13981 14.2178 3.41321C14.4912 3.68662 14.4912 4.1299 14.2178 4.4033L7.5149 11.1062C7.38452 11.2392 7.2061 11.3142 7.01985 11.3141C6.83634 11.3149 6.6607 11.2396 6.53471 11.1062L4.2575 8.8389C3.98567 8.56485 3.98567 8.12287 4.2575 7.84881C4.38647 7.71321 4.56541 7.63644 4.75255 7.63644Z",fill:"#12344D"}));case"cross":return t.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 16.5C12.4183 16.5 16 12.9183 16 8.5C16 4.08172 12.4183 0.5 8 0.5C3.58172 0.5 0 4.08172 0 8.5C0 12.9183 3.58172 16.5 8 16.5ZM8 15.2346C4.28056 15.2346 1.26535 12.2194 1.26535 8.5C1.26535 4.78056 4.28056 1.76535 8 1.76535C11.7194 1.76535 14.7346 4.78056 14.7346 8.5C14.7346 12.2194 11.7194 15.2346 8 15.2346ZM5.00502 5.50503C5.27839 5.23166 5.72161 5.23166 5.99497 5.50503L8.25 7.76005L10.505 5.50503C10.7784 5.23166 11.2216 5.23166 11.495 5.50503C11.7683 5.77839 11.7683 6.22161 11.495 6.49497L9.23995 8.75L11.495 11.005C11.7683 11.2784 11.7683 11.7216 11.495 11.995C11.2216 12.2683 10.7784 12.2683 10.505 11.995L8.25 9.73995L5.99497 11.995C5.72161 12.2683 5.27839 12.2683 5.00503 11.995C4.73166 11.7216 4.73166 11.2784 5.00503 11.005L7.26005 8.75L5.00502 6.49497C4.73166 6.22161 4.73166 5.77839 5.00502 5.50503Z",fill:"#12344D"}));default:return null}},C=()=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"76",height:"16",viewBox:"0 0 200 40"},t.createElement("g",{fill:"none",fillRule:"nonzero"},t.createElement("path",{fill:"#4D4D4D",d:"M48.6 1c-5 0-6.8 3.5-6.8 6.8v2h-1c-.8 0-1.4.6-1.4 1.4 0 .8.6 1.4 1.4 1.4h1v13.8c0 .8.6 1.5 1.5 1.5s1.5-.6 1.5-1.5V12.5H48c.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4h-3.2v-2c0-1.8.7-4 3.9-4 .8 0 1.4-.6 1.4-1.3-.1-.8-.7-1.4-1.5-1.4zM60 9.3c-2-.1-3.8.8-5 2.4v-.8c0-.8-.6-1.5-1.5-1.5s-1.5.7-1.5 1.5v15.4c0 .8.6 1.5 1.5 1.5s1.5-.6 1.5-1.5v-8.5c0-3.6 1.9-5.7 5-5.7.8 0 1.4-.6 1.4-1.4 0-.8-.7-1.4-1.4-1.4zM77.7 16.9c0-1.7-.5-3.4-1.4-4.8-1.4-1.9-3.7-3-6.1-2.8-5.1 0-8 3.4-8 9.3 0 6.1 2.9 9.4 8.4 9.4 2.2.1 4.4-.7 6.1-2.2.3-.2.5-.6.5-1 0-.7-.6-1.3-1.3-1.3-.3 0-.6.1-.8.3-1.2 1-2.8 1.6-4.4 1.6-3.3 0-5.4-2.2-5.5-5.7H76c1.7-.2 1.7-1.8 1.7-2.8zm-7.4-5c3 0 4.5 1.7 4.6 5h-9.7c.3-3.2 2.1-5 5.1-5zM87.5 17.1c-2.2-.8-4-1.4-4-3 0-1.8 2-2 3.1-2 1.5-.1 3 .5 4 1.5.5.5 1.4.5 1.9 0 .3-.3.4-.6.4-1 0-.3-.1-.6-.3-.9-1.5-1.7-3.7-2.7-5.9-2.5-3.7 0-6 1.9-6 4.8 0 3.6 3.2 4.7 6 5.7 2.1.7 4 1.3 4 2.9 0 2.1-2.4 2.5-3.8 2.5-1.7.1-3.4-.6-4.6-1.8-.3-.3-.6-.4-1-.5-.7 0-1.3.6-1.3 1.3 0 .3.1.6.3.9 1.7 2 4.1 3 6.6 3 4.2 0 6.7-2 6.7-5.2-.2-3.7-3.3-4.7-6.1-5.7zM104.8 9.2c-1.8-.1-3.6.7-4.8 2.1V1.5c0-.8-.6-1.5-1.5-1.5-.8 0-1.4.6-1.4 1.5v24.8c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.5V17c0-3.4 1.6-5.1 4.8-5.1 3.2 0 4.3 1.4 4.3 4.8v9.6c0 .8.6 1.5 1.5 1.5.8 0 1.4-.6 1.4-1.5V16.2c0-4.6-2.4-7-7.2-7zM136.2 9.5c-.6 0-1.2.4-1.4 1l-4.2 11.8-3.4-11.8c-.3-.8-1.1-1.1-1.9-.9-.4.1-.7.5-.9.9L121 22.3l-4-11.9c-.2-.6-.7-1-1.4-.9-.8 0-1.4.6-1.4 1.4 0 .2 0 .4.1.6l5.6 15.3c.2.6.7 1 1.4 1 .6 0 1.2-.4 1.4-1l3.3-11.2 3.3 11.2c.2.6.8 1 1.4 1 .6 0 1.2-.4 1.4-1l5.6-15.3c.1-.2.1-.4.1-.6-.2-.8-.8-1.4-1.6-1.4zM146.8 9.2c-5.3 0-8.2 3.3-8.2 9.3 0 6 2.9 9.4 8.2 9.4 5.3 0 8.2-3.3 8.2-9.4 0-6.1-2.9-9.3-8.2-9.3zm0 16c-3.5 0-5.3-2.2-5.3-6.7s1.8-6.7 5.3-6.7 5.2 2.3 5.2 6.7-1.7 6.8-5.2 6.7zM166.2 9.3c-2-.1-3.8.8-5 2.4v-.8c0-.8-.6-1.5-1.4-1.5-.8 0-1.5.6-1.5 1.4v15.4c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.4v-8.5c0-3.6 1.9-5.7 5-5.7.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4zM177.3 16.9l6-4.8c.4-.3.6-.7.6-1.2 0-.8-.6-1.4-1.4-1.4-.4 0-.7.1-1 .4l-8.6 7V1.5c0-.8-.6-1.5-1.4-1.5-.8 0-1.5.6-1.5 1.4v24.8c0 .8.6 1.5 1.4 1.5.8 0 1.5-.6 1.5-1.4v-6l2-1.6 6.6 8.4c.3.4.8.7 1.2.7.8 0 1.4-.6 1.4-1.4 0-.3-.1-.7-.3-.9l-6.5-8.6zM193.7 17.1c-2.2-.8-4-1.4-4-3 0-1.8 2-2 3.1-2 1.5-.1 3 .5 4 1.5.3.3.6.4 1 .4.7-.1 1.2-.7 1.2-1.4 0-.3-.1-.6-.3-.9-1.5-1.7-3.7-2.7-5.9-2.5-3.7 0-6 1.9-6 4.8 0 3.6 3.2 4.7 6 5.7 2.1.7 4 1.3 4 2.9 0 2.1-2.4 2.5-3.8 2.5-1.7.1-3.4-.6-4.6-1.8-.3-.3-.6-.4-1-.5-.7 0-1.3.6-1.3 1.3 0 .3.1.6.3.9 1.7 1.9 4.1 2.9 6.7 2.8 4.2 0 6.7-2 6.7-5.2-.2-3.5-3.3-4.5-6.1-5.5z"}),t.createElement("path",{fill:"#9B65C3",d:"M.2 25.5C.7 29.1 2.4 32.4 5 35l5.8-5.8c0-6.1 3.2-11.7 8.5-14.8L.2 25.5z"}),t.createElement("path",{fill:"#9B65C3",d:"M10.8 29.2c-3 0-5.9-.8-8.5-2.3-.7-.4-1.4-.9-2.1-1.4.5 3.6 2.2 6.9 4.8 9.5l5.8-5.8z"}),t.createElement("path",{fill:"#BE63C5",d:"M10.8 29.2L5 35c2.6 2.6 5.9 4.3 9.5 4.8l11-19.1c-3 5.2-8.6 8.5-14.7 8.5z"}),t.createElement("path",{fill:"#BF63C6",d:"M13.1 37.7c-1.5-2.6-2.3-5.5-2.3-8.5L5 35c2.6 2.6 5.9 4.3 9.5 4.8-.5-.7-1-1.4-1.4-2.1z"}),t.createElement("path",{fill:"#3278B1",d:"M32.5 6.8l-13.2 7.6c-5.3 3-11.7 3-17 0C.8 17 0 20 0 23c0 .8.1 1.7.2 2.5.7.5 1.4 1 2.1 1.4 2.6 1.5 5.5 2.3 8.5 2.3l22-22c-.1-.1-.2-.2-.3-.4z"}),t.createElement("path",{fill:"#3278B2",d:"M2.3 26.9c2.6 1.5 5.5 2.3 8.5 2.3 0-6.1 3.2-11.7 8.5-14.8L.2 25.4c.7.6 1.4 1.1 2.1 1.5z"}),t.createElement("path",{fill:"#45A4EC",d:"M2.3 14.4C.8 17 0 20 0 23c0 .8.1 1.7.2 2.5l19.1-11.1c-5.2 3.1-11.7 3.1-17 0z"}),t.createElement("path",{fill:"#19BB7D",d:"M32.8 7.2c-.3-.3-.5-.5-.8-.7-.6-.4-1.4-.6-2.1-.6H17c-6.1 0-11.7 3.3-14.7 8.5 5.3 3 11.7 3 17 0-5.3 3-8.5 8.7-8.5 14.8 6.1 0 11.7-3.2 14.8-8.5l7.6-13.2c-.2-.1-.3-.2-.4-.3z"}),t.createElement("path",{fill:"#08C7FB",d:"M19.3 14.4l13.2-7.6c-.2-.1-.3-.3-.5-.4l-29.7 8c5.3 3.1 11.8 3.1 17 0z"}),t.createElement("path",{fill:"#59F2F6",d:"M29.8 5.9H17c-6.1 0-11.7 3.3-14.7 8.5l29.7-8c-.7-.3-1.4-.5-2.2-.5z"}),t.createElement("path",{fill:"#DA3757",d:"M25.6 20.7l7.6-13.2c-.1-.1-.2-.2-.3-.4l-22 22c0 3 .8 5.9 2.3 8.5.4.7.9 1.4 1.4 2.1.8.1 1.6.2 2.4.2 3 0 5.9-.8 8.5-2.3-3-5.2-3-11.7.1-16.9z"}),t.createElement("path",{fill:"#D33C4E",d:"M10.8 29.2c0 3 .8 5.9 2.3 8.5.4.7.9 1.4 1.4 2.1l11-19.1c-3 5.2-8.6 8.5-14.7 8.5z"}),t.createElement("path",{fill:"#EE5A24",d:"M25.6 20.7l-11 19.1c.8.1 1.6.2 2.5.2 3 0 5.9-.8 8.5-2.3-3.1-5.3-3.1-11.8 0-17z"}),t.createElement("path",{fill:"#8BDF55",d:"M33.5 8c-.3-.5-.6-.9-1-1.2l-13.2 7.6c-5.3 3-8.5 8.7-8.5 14.8 6.1 0 11.7-3.2 14.8-8.5-3 5.3-3 11.7 0 17 5.2-3 8.5-8.6 8.5-14.6V10.2c0-.8-.2-1.5-.6-2.2z"}),t.createElement("path",{fill:"#25C16F",d:"M32.5 6.8l-13.2 7.6c-5.3 3-8.5 8.7-8.5 14.8l22-22c-.1-.1-.2-.3-.3-.4z"}),t.createElement("path",{fill:"#8BDF55",d:"M10.8 29.2c6.1 0 11.7-3.2 14.8-8.5l7.6-13.2c-.1-.1-.2-.2-.3-.4L10.8 29.2z"}),t.createElement("path",{fill:"#FB0",d:"M33.2 7.5l-7.6 13.2c-3 5.3-3 11.7 0 17l8-29.7c-.2-.2-.3-.3-.4-.5z"}),t.createElement("path",{fill:"#FFA800",d:"M25.6 37.7c5.3-3 8.5-8.6 8.5-14.7V10.2c0-.8-.2-1.5-.6-2.2l-7.9 29.7z"}))),O=({question:e,formValues:n,othersMeta:o,onChangeHandler:r,saveOthersValue:s,autoFocusDelay:a,isFinalQn:c})=>{switch(e.type_info.question_type){case"RANGE":return t.createElement(i,{type_info:e.type_info,onChangeHandler:r,npsValue:n[e.name]});case"CHECKBOX":case"MULTI_SELECT":return t.createElement(x,{name:e.name,values:n[e.name],othersValue:o[e.name],options:e.type_info.choices,onChangeHandler:r,saveOthersValue:s,othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired,autoFocusDelay:a});case"RADIO":case"DROPDOWN":return t.createElement(w,{autoFocusDelay:a,name:e.name,onChangeHandler:r,saveOthersValue:s,options:e.type_info.choices,value:n[e.name],othersValue:o[e.name],othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired,isFinalQn:c});case"INPUT":case"TEXT":return e.type_info?.meta?.readOnly?t.createElement("div",{className:"message-container"},e.type_info?.meta?.value):t.createElement("div",{className:"responsive-text-field"},t.createElement(y,{autoFocusDelay:a,label:"",isRequired:e.is_required,value:n[e.name]||"",placeholder:e.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),t.createElement(h,{autoFocusDelay:a,label:"",maxLength:256,isRequired:e.is_required,placeholder:e.type_info?.meta?.placeholder??"",value:n[e.name]||"",onChange:e=>r(e.target.value)}));case"PARAGRAPH":return t.createElement(h,{autoFocusDelay:a,label:"",isRequired:e.is_required,placeholder:e.type_info?.meta?.placeholder??"",value:n[e.name]||"",onChange:e=>r(e.target.value)});default:return console.error(`Question type ${e.type_info.question_type} not found`),null}},S=(e={})=>0==Object.values(e).length,I=e=>null==e||"string"==typeof e&&""===e.trim()||Array.isArray(e)&&0===e.length,Q=(e,n,t)=>{if(e){let o=null;if(null!=t&&(o={"{{nps.rating}}":String(t)}),n&&"object"==typeof n&&Object.keys(n).length>0&&(o={...n,...o??{}}),o){const n=new RegExp(Object.keys(o).join("|"),"gi");return e.replace(n,(function(e){return o?.[e.toLowerCase()]||e}))??""}}return e??""},N=e=>({...e.brand_color&&{"--brand-color":e.brand_color},...e.body_background_color&&{"--background-color":e.body_background_color},...e.secondary_button_color&&{"--secondary-button-color":e.secondary_button_color},...e.question_background_color&&{"--question-background-color":e.question_background_color},...e.primary_button_text_color&&{"--button-text-color":e.primary_button_text_color},...e.secondary_button_text_color&&{"--secondary-button-text-color":e.secondary_button_text_color},...e.question_text_color&&{"--question-text-color":e.question_text_color}});s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n --compact-widget-max-height: 560px;\n --default-widget-max-height: 400px;\n --cozy-widget-max-height: 380px;\n}\n\n.freemium-survey-components.card-survey-style {\n padding: 20px 0;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation {\n white-space: nowrap;\n border-radius: 3px;\n border: 1px solid #efefef;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button svg {\n transform: rotate(90deg);\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n.freemium-survey-components.card-survey-style .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: center;\n max-width: 700px;\n margin: 0 auto;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n border-radius: 4px;\n transition: transform 500ms ease 0ms, opacity 200ms ease 0ms;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n height: -moz-fit-content;\n height: fit-content;\n transition: opacity 50ms ease-out;\n overflow: auto;\n}\n.freemium-survey-components.card-survey-style .hide-question-container {\n opacity: 0;\n}\n.freemium-survey-components.card-survey-style .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.card-survey-style .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.card-survey-style .fade-enter .question-container {\n opacity: 0;\n transform: translateY(15px);\n}\n.freemium-survey-components.card-survey-style .fade-enter-active .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-exit .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-exit-active .question-container {\n opacity: 0.05;\n transform: translateY(-15px);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-enter .question-container {\n opacity: 0;\n transform: translateY(-15px);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-enter-active .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-exit .question-container {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.card-survey-style .fade-reverse-exit-active .question-container {\n opacity: 0.05;\n transform: translateY(15px);\n}\n.freemium-survey-components.card-survey-style .fade-enter-active .question-container,\n.freemium-survey-components.card-survey-style .fade-exit-active .question-container,\n.freemium-survey-components.card-survey-style .fade-reverse-enter-active .question-container,\n.freemium-survey-components.card-survey-style .fade-reverse-exit-active .question-container {\n transition: opacity 200ms, transform 200ms;\n pointer-events: none;\n}\n.freemium-survey-components.card-survey-style .question-footer {\n display: flex;\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.card-survey-style .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.card-survey-style .question-footer:only-child {\n margin-left: auto;\n}\n.freemium-survey-components.card-survey-style .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n width: 100%;\n}\n.freemium-survey-components.card-survey-style .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.card-survey-style .skip-button {\n font-weight: 500;\n color: #3a4b67;\n cursor: pointer;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.card-survey-style .skip-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.card-survey-style .next-button {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.card-survey-style .submit {\n max-width: 700px;\n text-align: left;\n background: transparent;\n box-shadow: none;\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.card-survey-style .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.card-survey-style .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.card-survey-style .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.card-survey-style .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.card-survey-style .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.card-survey-style .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components.card-survey-style .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n div.freemium-survey-components.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n div.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n div.freemium-survey-components.card-survey-style .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n }\n div.freemium-survey-components.card-survey-style .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n }\n div.freemium-survey-components.card-survey-style .question-footer > *:first-child {\n margin-bottom: 0px;\n }\n div.freemium-survey-components.card-survey-style .question-footer > * {\n margin-bottom: 20px;\n }\n div.freemium-survey-components.card-survey-style .freemium-survey-step-navigation {\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .freemium-survey-step-navigation .navigation-button {\n width: 50%;\n }\n div.freemium-survey-components.card-survey-style .action-buttons {\n flex-direction: column;\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .action-buttons button {\n max-width: unset;\n }\n div.freemium-survey-components.card-survey-style .action-button {\n max-width: unset;\n width: 100%;\n }\n div.freemium-survey-components.card-survey-style .thankyou .text {\n width: auto;\n }\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .input-container {\n display: none;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .textarea-container {\n display: flex;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer > *:first-child {\n margin-bottom: 0px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .question-footer > * {\n margin-bottom: 20px;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .freemium-survey-step-navigation {\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .freemium-survey-step-navigation .navigation-button {\n width: 50%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-buttons {\n flex-direction: column;\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-buttons button {\n max-width: unset;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .action-button {\n max-width: unset;\n width: 100%;\n}\ndiv.freemium-survey-components.card-survey-style.mobile-preview .thankyou .text {\n width: auto;\n}\n\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const Z=({questions:e})=>e.find((e=>e.type_info?.pivot_question))??e.find((e=>"RANGE"===e.type_info?.question_type))??e[0],z=(e,n)=>Math.min(e.type_info?.validation?.max??10,Math.max(e.type_info?.validation?.min??0,n)),V=({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o})=>{const r=e[n];return(n===e.length-1||"end"===r.branchOption)&&o===t.length-1},W=({pivotQn:e,pivotQnAnswer:n,block:t,questions:o})=>{if(t?.is_based_on_rating){const r=e?.type_info?.choices?.[n-(e?.type_info?.validation?.min??0)??0]?.dependent_question_names,s=t?.question_names?.find((e=>r?.includes(e)));return o.find((e=>e.name===s))}return o.find((e=>e.name===t?.question_names?.[0]))},T=({activeBlock:e,blocks:n,activeBlockIndexOfBlocks:t,answers:o})=>(({activeBlock:e,answers:n})=>{const t=n.formValues[e.question.name];return I(t)})({activeBlock:e,answers:o})?t+1:"specific"===e.branchOption&&e.nextBlock?n.findIndex((n=>n.name===e.nextBlock)):"logic"===e.branchOption?(({activeBlock:e,answers:n,blocks:t,activeBlockIndexOfBlocks:o})=>{const r=e.question.type_info?.meta?.branches||e.question.type_info?.choices||[],s=n.formValues[e.question.name];let i;if("RANGE"===e.question.type_info?.question_type)i=r.find((e=>s>=e.min&&s<=e.max))?.nextBlock;else{const e=r.find((e=>s===e.value));i=e?.nextBlock??e?.meta?.nextBlock}return i?"TY"===i?1/0:t.findIndex((e=>e.name===i)):o+1})({activeBlock:e,answers:o,blocks:n,activeBlockIndexOfBlocks:t}):"end"===e.branchOption?1/0:t+1,L=({question:e,answers:n})=>c.includes(e?.type_info?.question_type||"")&&!("DROPDOWN"===e.type_info?.question_type&&n.formValues[e.name]===l)||n.commitDirtyValue,M=({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o,answers:r})=>{const{question:s}=t[o];return!!s&&(!V({blocks:e,activeBlockIndexOfBlocks:n,blocksWithQns:t,activeBlockIndexOfBlocksWithQns:o})&&L({question:s,answers:r}))},j=(e,{answers:n,blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s,surveyStyle:i,widget:a,blockIndex:u})=>{const m=V({blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s}),d=r[s],p=d.question;switch(e){case"next":return(!c.includes(p.type_info?.question_type??"")||"DROPDOWN"===p.type_info?.question_type&&n.formValues[p.name]===l)&&!m;case"skip":return"RANGE"!==p.type_info?.question_type&&!d.required&&!m;case"submit":return m;case"navigation":return(a||"card"===i)&&!(0===s&&1===r.length);case"clear-selection":return null!=u&&u!==s&&"DROPDOWN"===r[u].question.type_info?.question_type&&n.formValues[r[u].question.name]}},H=(e,n)=>("MULTI_SELECT"===e.question.type_info?.question_type&&n.formValues[e.question.name].includes(l)||"DROPDOWN"===e.question.type_info?.question_type&&n.formValues[e.question.name]===l)&&I(n.others[e.question.name]),R=(e,{answers:n,blocks:t,activeBlockIndexOfBlocks:o,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:s,isSubmitting:i})=>{const a=r[s];switch(e){case"next":return I(n?.formValues[a.question.name])||a.question.type_info?.meta?.othersRequired&&H(a,n);case"submit":return(a.required||a.question.type_info?.pivot_question)&&I(n?.formValues[a.question.name])||a.question?.type_info?.meta?.othersRequired&&H(a,n)||i;case"navigation-prev":return 0==s;case"navigation-next":return s>=r.length-1;default:return!1}},D=({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n,answers:t})=>{const o=A({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n}).reduce(((e,n)=>(void 0!==t.formValues[n.question.name]&&(e[n.question.name]=t.formValues[n.question.name]),e)),{});return{...t,formValues:o}},A=({blocksWithQns:e,activeBlockIndexOfBlocksWithQns:n})=>e.slice(0,n+1);var F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var P,$,Y,U=(P=function(e,n){var t="__lodash_hash_undefined__",o=9007199254740991,r="[object Arguments]",s="[object Boolean]",i="[object Date]",a="[object Function]",c="[object GeneratorFunction]",l="[object Map]",u="[object Number]",m="[object Object]",d="[object Promise]",p="[object RegExp]",f="[object Set]",v="[object String]",y="[object Symbol]",h="[object WeakMap]",g="[object ArrayBuffer]",x="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",k="[object Int8Array]",B="[object Int16Array]",E="[object Int32Array]",q="[object Uint8Array]",_="[object Uint8ClampedArray]",C="[object Uint16Array]",O="[object Uint32Array]",S=/\w*$/,I=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,N={};N[r]=N["[object Array]"]=N[g]=N[x]=N[s]=N[i]=N[b]=N[w]=N[k]=N[B]=N[E]=N[l]=N[u]=N[m]=N[p]=N[f]=N[v]=N[y]=N[q]=N[_]=N[C]=N[O]=!0,N["[object Error]"]=N[a]=N[h]=!1;var Z="object"==typeof F&&F&&F.Object===Object&&F,z="object"==typeof self&&self&&self.Object===Object&&self,V=Z||z||Function("return this")(),W=n&&!n.nodeType&&n,T=W&&e&&!e.nodeType&&e,L=T&&T.exports===W;function M(e,n){return e.set(n[0],n[1]),e}function j(e,n){return e.add(n),e}function H(e,n,t,o){var r=-1,s=e?e.length:0;for(o&&s&&(t=e[++r]);++r<s;)t=n(t,e[r],r,e);return t}function R(e){var n=!1;if(null!=e&&"function"!=typeof e.toString)try{n=!!(e+"")}catch(e){}return n}function D(e){var n=-1,t=Array(e.size);return e.forEach((function(e,o){t[++n]=[o,e]})),t}function A(e,n){return function(t){return e(n(t))}}function P(e){var n=-1,t=Array(e.size);return e.forEach((function(e){t[++n]=e})),t}var $,Y=Array.prototype,U=Function.prototype,G=Object.prototype,X=V["__core-js_shared__"],K=($=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",J=U.toString,ee=G.hasOwnProperty,ne=G.toString,te=RegExp("^"+J.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=L?V.Buffer:void 0,re=V.Symbol,se=V.Uint8Array,ie=A(Object.getPrototypeOf,Object),ae=Object.create,ce=G.propertyIsEnumerable,le=Y.splice,ue=Object.getOwnPropertySymbols,me=oe?oe.isBuffer:void 0,de=A(Object.keys,Object),pe=Le(V,"DataView"),fe=Le(V,"Map"),ve=Le(V,"Promise"),ye=Le(V,"Set"),he=Le(V,"WeakMap"),ge=Le(Object,"create"),xe=De(pe),be=De(fe),we=De(ve),ke=De(ye),Be=De(he),Ee=re?re.prototype:void 0,qe=Ee?Ee.valueOf:void 0;function _e(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Ce(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Oe(e){var n=-1,t=e?e.length:0;for(this.clear();++n<t;){var o=e[n];this.set(o[0],o[1])}}function Se(e){this.__data__=new Ce(e)}function Ie(e,n){var t=Fe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Pe(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||ne.call(e)==r)}(e)?function(e,n){for(var t=-1,o=Array(e);++t<e;)o[t]=n(t);return o}(e.length,String):[],o=t.length,s=!!o;for(var i in e)!n&&!ee.call(e,i)||s&&("length"==i||He(i,o))||t.push(i);return t}function Qe(e,n,t){var o=e[n];ee.call(e,n)&&Ae(o,t)&&(void 0!==t||n in e)||(e[n]=t)}function Ne(e,n){for(var t=e.length;t--;)if(Ae(e[t][0],n))return t;return-1}function Ze(e,n,t,o,d,h,I){var Q;if(o&&(Q=h?o(e,d,h,I):o(e)),void 0!==Q)return Q;if(!Ue(e))return e;var Z=Fe(e);if(Z){if(Q=function(e){var n=e.length,t=e.constructor(n);return n&&"string"==typeof e[0]&&ee.call(e,"index")&&(t.index=e.index,t.input=e.input),t}(e),!n)return function(e,n){var t=-1,o=e.length;for(n||(n=Array(o));++t<o;)n[t]=e[t];return n}(e,Q)}else{var z=je(e),V=z==a||z==c;if($e(e))return function(e,n){if(n)return e.slice();var t=new e.constructor(e.length);return e.copy(t),t}(e,n);if(z==m||z==r||V&&!h){if(R(e))return h?e:{};if(Q=function(e){return"function"!=typeof e.constructor||Re(e)?{}:Ue(n=ie(e))?ae(n):{};var n}(V?{}:e),!n)return function(e,n){return We(e,Me(e),n)}(e,function(e,n){return e&&We(n,Ge(n),e)}(Q,e))}else{if(!N[z])return h?e:{};Q=function(e,n,t,o){var r,a=e.constructor;switch(n){case g:return Ve(e);case s:case i:return new a(+e);case x:return function(e,n){var t=n?Ve(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}(e,o);case b:case w:case k:case B:case E:case q:case _:case C:case O:return function(e,n){var t=n?Ve(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}(e,o);case l:return function(e,n,t){var o=n?t(D(e),!0):D(e);return H(o,M,new e.constructor)}(e,o,t);case u:case v:return new a(e);case p:return function(e){var n=new e.constructor(e.source,S.exec(e));return n.lastIndex=e.lastIndex,n}(e);case f:return function(e,n,t){var o=n?t(P(e),!0):P(e);return H(o,j,new e.constructor)}(e,o,t);case y:return r=e,qe?Object(qe.call(r)):{}}}(e,z,Ze,n)}}I||(I=new Se);var W=I.get(e);if(W)return W;if(I.set(e,Q),!Z)var T=t?function(e){return function(e,n,t){var o=n(e);return Fe(e)?o:function(e,n){for(var t=-1,o=n.length,r=e.length;++t<o;)e[r+t]=n[t];return e}(o,t(e))}(e,Ge,Me)}(e):Ge(e);return function(e,n){for(var t=-1,o=e?e.length:0;++t<o&&!1!==n(e[t],t,e););}(T||e,(function(r,s){T&&(r=e[s=r]),Qe(Q,s,Ze(r,n,t,o,s,e,I))})),Q}function ze(e){return!(!Ue(e)||(n=e,K&&K in n))&&(Ye(e)||R(e)?te:I).test(De(e));var n}function Ve(e){var n=new e.constructor(e.byteLength);return new se(n).set(new se(e)),n}function We(e,n,t,o){t||(t={});for(var r=-1,s=n.length;++r<s;){var i=n[r],a=o?o(t[i],e[i],i,t,e):void 0;Qe(t,i,void 0===a?e[i]:a)}return t}function Te(e,n){var t,o,r=e.__data__;return("string"==(o=typeof(t=n))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==t:null===t)?r["string"==typeof n?"string":"hash"]:r.map}function Le(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return ze(t)?t:void 0}_e.prototype.clear=function(){this.__data__=ge?ge(null):{}},_e.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},_e.prototype.get=function(e){var n=this.__data__;if(ge){var o=n[e];return o===t?void 0:o}return ee.call(n,e)?n[e]:void 0},_e.prototype.has=function(e){var n=this.__data__;return ge?void 0!==n[e]:ee.call(n,e)},_e.prototype.set=function(e,n){return this.__data__[e]=ge&&void 0===n?t:n,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var n=this.__data__,t=Ne(n,e);return!(t<0||(t==n.length-1?n.pop():le.call(n,t,1),0))},Ce.prototype.get=function(e){var n=this.__data__,t=Ne(n,e);return t<0?void 0:n[t][1]},Ce.prototype.has=function(e){return Ne(this.__data__,e)>-1},Ce.prototype.set=function(e,n){var t=this.__data__,o=Ne(t,e);return o<0?t.push([e,n]):t[o][1]=n,this},Oe.prototype.clear=function(){this.__data__={hash:new _e,map:new(fe||Ce),string:new _e}},Oe.prototype.delete=function(e){return Te(this,e).delete(e)},Oe.prototype.get=function(e){return Te(this,e).get(e)},Oe.prototype.has=function(e){return Te(this,e).has(e)},Oe.prototype.set=function(e,n){return Te(this,e).set(e,n),this},Se.prototype.clear=function(){this.__data__=new Ce},Se.prototype.delete=function(e){return this.__data__.delete(e)},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,n){var t=this.__data__;if(t instanceof Ce){var o=t.__data__;if(!fe||o.length<199)return o.push([e,n]),this;t=this.__data__=new Oe(o)}return t.set(e,n),this};var Me=ue?A(ue,Object):function(){return[]},je=function(e){return ne.call(e)};function He(e,n){return!!(n=null==n?o:n)&&("number"==typeof e||Q.test(e))&&e>-1&&e%1==0&&e<n}function Re(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||G)}function De(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ae(e,n){return e===n||e!=e&&n!=n}(pe&&je(new pe(new ArrayBuffer(1)))!=x||fe&&je(new fe)!=l||ve&&je(ve.resolve())!=d||ye&&je(new ye)!=f||he&&je(new he)!=h)&&(je=function(e){var n=ne.call(e),t=n==m?e.constructor:void 0,o=t?De(t):void 0;if(o)switch(o){case xe:return x;case be:return l;case we:return d;case ke:return f;case Be:return h}return n});var Fe=Array.isArray;function Pe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Ye(e)}var $e=me||function(){return!1};function Ye(e){var n=Ue(e)?ne.call(e):"";return n==a||n==c}function Ue(e){var n=typeof e;return!!e&&("object"==n||"function"==n)}function Ge(e){return Pe(e)?Ie(e):function(e){if(!Re(e))return de(e);var n=[];for(var t in Object(e))ee.call(e,t)&&"constructor"!=t&&n.push(t);return n}(e)}e.exports=function(e){return Ze(e,!0,!0)}},P(Y={path:$,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&Y.path)}},Y.exports),Y.exports);const G=e=>n.useMemo((()=>{const n=U(e),t=[],o=(n.question_details?.questions||[]).filter((e=>!e.type_info?.meta?.is_deleted));return o.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),t.push(n))})),{...n,question_details:{questions:o},meta:{...n.meta,blocks:t}}}),[]),X=e=>{const o=e.survey.question_details?.questions||[],[r,s]=n.useState([]),[i,a]=n.useState({formValues:{},others:{},commitDirtyValue:!1}),[c,l]=n.useState([]),[u,m]=n.useState(0),[d,p]=n.useState(!1),f=n.useRef(),[v,y]=n.useState(!1),h=n.useRef(!1),g=n.useRef(),x=n.useRef(!0),b=c[u],w=t.useMemo((()=>c.length>0?r?.findIndex((e=>e.name===c[u].name)):0),[u]);n.useEffect((()=>{e.survey.meta?.blocks&&s(e.survey.meta?.blocks.filter((e=>"TY"!==e.name)))}),[e.survey.meta?.blocks]),n.useEffect((()=>{if(!r||!r.length)return;f.current={...f.current,question:Z({questions:o})},null!=e.npsValue&&(f.current={...f.current,answer:z(f.current.question,e.npsValue)},a({...i,formValues:{[f.current.question.name]:f.current.answer}}));const n=W({pivotQn:f.current.question,pivotQnAnswer:f.current.answer,block:r[0],questions:o});l([{...r[0],question:n}])}),[r,e.npsValue]),n.useEffect((()=>{c.length&&(c.length>1&&(x.current=!1),m(c.length-1))}),[c]),n.useEffect((()=>{if(!S(i.formValues)&&r&&M({blocks:r,activeBlockIndexOfBlocks:w,blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i})){const n=()=>{p(!1);const e=T({activeBlock:b,blocks:r,activeBlockIndexOfBlocks:w,answers:i});if(e===1/0)return void setTimeout((()=>{E("COMPLETE"),y(!0)}));setTimeout((()=>{E()}));const n=W({pivotQn:f.current?.question,pivotQnAnswer:f.current?.answer,block:r?.[e],questions:o}),t=A({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u});l([...t,{...r?.[e],question:n}])};null!=e.npsValue&&1==c.length?g.current?(clearTimeout(g.current),g.current=null,n()):g.current=setTimeout((()=>{n()}),1500):n()}}),[i,r]),n.useEffect((()=>{!S(i.formValues)&&h.current&&(d?B():k(),h.current=!1)}),[d]);const k=()=>{d?(h.current=!0,p(!1)):m(u+1)},B=()=>{d?m(u-1):(h.current=!0,p(!0))},E=(n="PARTIAL")=>{let t=()=>{};"COMPLETE"===n&&(t=()=>{y(!0)}),e.onSubmit({...i.formValues,others_meta:i.others},t,n)};return{blocks:r,questions:o,blocksWithQns:c,activeBlock:b,activeBlockIndexOfBlocks:w,activeBlockIndexOfBlocksWithQns:u,isSurveyCompleted:v,isReverseAnimation:d,isNavigating:h.current,pivot:f.current,answers:i,isInitialTransition:x.current,navigateToNextBlock:k,navigateToPreviousBlock:B,saveFormValues:(e,n,t=!1)=>{e.question.name===f.current?.question.name&&f.current&&(f.current={...f.current,answer:n});let o=i;(t||L({question:e.question,answers:i}))&&(o=D({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i})),a({...o,formValues:{...o.formValues,...null!=n&&{[e.question.name]:n}},commitDirtyValue:t})},saveOthersValue:(e,n)=>{if(null===n){const n={...i.others};delete n[e],a({...i,commitDirtyValue:!1,others:n})}else a({...i,commitDirtyValue:!1,others:{...i.others,[e]:n}})},skipBlock:()=>{p(!1);const e=b.question;if(delete i.formValues[e.name],delete i.others[e.name],u!==c.length-1){const e=D({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u,answers:i}),n=A({blocksWithQns:c,activeBlockIndexOfBlocksWithQns:u});l(n),a({...e,commitDirtyValue:!0})}else a({...i,commitDirtyValue:!0})},onSubmitHandler:E}},K=({thankYouQuestion:e,preview:o,placeholders:r,npsValue:s})=>(n.useEffect((()=>{o||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e3*e.type_info.meta?.redirectDelay??1e4)}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,r,s)}}),e.type_info.meta?.redirectUrl&&t.createElement("div",{style:{width:"100%"}},t.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in"," ",e.type_info.meta?.redirectDelay," seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),J=({activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,blocksWithQns:o,blocks:r,answers:s,navigateToPreviousBlock:i,navigateToNextBlock:a})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:R("navigation-prev",{blocks:r,answers:s,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n}),className:"navigation-button",onClick:i,title:"go to previous question"},t.createElement(_,{name:"arrow-previous"})),t.createElement("button",{className:"navigation-button",disabled:R("navigation-next",{blocks:r,answers:s,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n}),title:"go to next question",onClick:a},t.createElement(_,{name:"arrow-next"}))),ee=e=>{const{widget:o,surveyStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,onSubmit:m,skipBlock:d,navigateToNextBlock:p,navigateToPreviousBlock:f,isInitialTransition:v}=e,[y,h]=n.useState(!1),g={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,surveyStyle:r,widget:o},x={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,isSubmitting:y};return v&&!V({blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i})?null:t.createElement("div",{className:"question-footer"},j("navigation",g)&&t.createElement(J,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f}),t.createElement("div",{className:"action-buttons"},j("next",g)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",x),className:"next-button"},"Next"),j("skip",g)&&t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip"),j("submit",g)&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",x),onClick:()=>{h(!0),m()}},y?"Submitting":"Submit survey"))))},ne=e=>{const{blocks:n,blocksWithQns:r,activeBlock:s,activeBlockIndexOfBlocks:i,activeBlockIndexOfBlocksWithQns:a,isSurveyCompleted:c,isReverseAnimation:l,saveFormValues:u,saveOthersValue:m,skipBlock:d,onSubmitHandler:p,navigateToNextBlock:f,navigateToPreviousBlock:v,answers:y,questions:h,pivot:g,isInitialTransition:x}=X(e);return s&&s.question?t.createElement("div",{className:`freemium-survey-components ${e.mobilePreview?"mobile-preview":""} ${e.surveyStyle}-survey-style`,id:"freemium-survey"},c?null:t.createElement(B,{totalSteps:n.length,completedSteps:i+(c?1:0)}),t.createElement(o.SwitchTransition,{mode:"out-in"},t.createElement(o.CSSTransition,{key:a+String(c),addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:l?"fade-reverse":"fade"},t.createElement("div",{className:"questions"},c?t.createElement(K,{thankYouQuestion:W({pivotQn:g?.question,pivotQnAnswer:g?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:h}),preview:e.preview,placeholders:e.placeholders,npsValue:g?.answer}):t.createElement("div",{id:`${s.question.name}`,className:"question-container","data-test-question-name":s.question.name},t.createElement("div",{className:"question-text",dangerouslySetInnerHTML:{__html:Q(s?.question.text,e.placeholders,g?.answer)},"aria-label":`question-${a}`,role:"heading","aria-level":1}),t.createElement("div",{onTransitionEndCapture:e=>e.stopPropagation(),style:{width:"100%"}},t.createElement(O,{question:s.question,isFinalQn:V({blocks:n,activeBlockIndexOfBlocks:i,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:a}),formValues:y.formValues,othersMeta:y.others,autoFocusDelay:"standard"===e.surveyStyle?350:0,saveOthersValue:m,onChangeHandler:e=>{u(s,e)}})),t.createElement(ee,{widget:!1,surveyStyle:e.surveyStyle,answers:y,blocksWithQns:r,blocks:n,activeBlockIndexOfBlocksWithQns:a,activeBlockIndexOfBlocks:i,saveFormValues:u,skipBlock:d,onSubmit:p,navigateToPreviousBlock:v,navigateToNextBlock:f,isInitialTransition:x})))))):null};s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n --compact-widget-max-height: 480px;\n --default-widget-max-height: 460px;\n --cozy-widget-max-height: 380px;\n}\n\n.freemium-survey-step-navigation {\n border-radius: 3px;\n border: 1px solid #efefef;\n white-space: nowrap;\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 38px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n\n.freemium-survey-components.standard-survey-style .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n text-align: center;\n max-width: 700px;\n margin: 0 auto;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n border-radius: 4px;\n transition: transform 500ms ease 0ms, opacity 800ms ease 0ms;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n height: -moz-fit-content;\n height: fit-content;\n overflow: auto;\n opacity: 1;\n}\n.freemium-survey-components.standard-survey-style .hide-question-container {\n pointer-events: none;\n opacity: 0;\n}\n.freemium-survey-components.standard-survey-style .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.standard-survey-style .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.standard-survey-style .question-footer {\n display: flex;\n justify-content: flex-start;\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.standard-survey-style .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components.standard-survey-style .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .sec-button {\n font-weight: 500;\n color: #3a4b67;\n cursor: pointer;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.standard-survey-style .sec-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.standard-survey-style .next-button {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.standard-survey-style .submit {\n max-width: 700px;\n margin: 0 auto;\n text-align: left;\n background: transparent;\n box-shadow: none;\n padding-bottom: 40px;\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.standard-survey-style .fade-enter {\n opacity: 0;\n transform: translateY(40px);\n}\n.freemium-survey-components.standard-survey-style .fade-enter-active {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.standard-survey-style .fade-exit {\n opacity: 1;\n transform: translateY(0);\n}\n.freemium-survey-components.standard-survey-style .fade-exit-active {\n opacity: 0;\n transform: translateY(-40px);\n}\n.freemium-survey-components.standard-survey-style .fade-enter,\n.freemium-survey-components.standard-survey-style .fade-enter-active,\n.freemium-survey-components.standard-survey-style .fade-exit,\n.freemium-survey-components.standard-survey-style .fade-exit-active {\n transition: all ease 400ms;\n pointer-events: none;\n}\n.freemium-survey-components.standard-survey-style .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.standard-survey-style .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.standard-survey-style .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.standard-survey-style .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.standard-survey-style .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.standard-survey-style .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components.standard-survey-style .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components.standard-survey-style .message-container:empty {\n display: none;\n}\n@media (max-width: 550px) {\n .freemium-survey-components.standard-survey-style .action-buttons {\n flex-direction: column;\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .action-buttons button {\n max-width: unset;\n }\n .freemium-survey-components.standard-survey-style .action-button {\n max-width: unset;\n width: 100%;\n }\n .freemium-survey-components.standard-survey-style .thankyou .text {\n width: auto;\n }\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container {\n display: flex;\n }\n .freemium-survey-component .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n }\n}\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const te=({thankYouQuestion:e,preview:o,placeholders:r,npsValue:s})=>(n.useEffect((()=>{o||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e3*(1e3*e.type_info.meta?.redirectDelay??1e4))}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,r,s)}}),e.type_info.meta?.redirectUrl&&t.createElement("div",{style:{width:"100%"}},t.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in"," ",e.type_info.meta?.redirectDelay," seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),oe=e=>{const{blockIndex:n,widget:o,surveyStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,skipBlock:m,clearRadioSelection:d}=e,p={answers:s,blocks:a,blockIndex:n,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,surveyStyle:r,widget:o},f={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i};return(1!==i.length||1===a.length)&&n===l||j("clear-selection",p)?t.createElement("div",{className:"question-footer"},t.createElement("div",{className:"action-buttons"},j("next",p)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",f),className:"next-button"},"Next"),j("skip",p)&&t.createElement("button",{className:"sec-button",onClick:m,"aria-label":"skip question"},"Skip"),j("clear-selection",p)&&t.createElement("button",{className:"sec-button",onClick:()=>d(n)},"Clear selection"))):null},re=e=>{const{blocks:r,blocksWithQns:s,activeBlock:i,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,isSurveyCompleted:l,saveFormValues:u,saveOthersValue:m,skipBlock:d,clearRadioSelection:p,onSubmitHandler:f,answers:v,questions:y,pivot:h}=(e=>{const o=e.survey.question_details?.questions||[],[r,s]=n.useState([]),[i,a]=n.useState(0),c=n.useRef(),[l,u]=n.useState({formValues:{},others:{},commitDirtyValue:!1}),m=n.useRef(),[d,p]=n.useState(null),[f,v]=n.useState(!1),[y,h]=n.useState(!1),g=n.useRef(null),x=r[i],b=t.useMemo((()=>r.length>0?d?.findIndex((e=>e.name===r[i].name)):0),[i]);n.useEffect((()=>{e.survey.meta?.blocks&&p(e.survey.meta?.blocks.filter((e=>"TY"!==e.name)))}),[e.survey.meta?.blocks]),n.useEffect((()=>{if(!d||!d.length)return;c.current={...c.current,question:Z({questions:o})},null!=e.npsValue&&(c.current={...c.current,answer:z(c.current.question,e.npsValue)},o.find((e=>e.name===d[0].question_names[0])),u({...l,formValues:{[c.current.question.name]:c.current.answer}}));const n=W({pivotQn:c.current.question,pivotQnAnswer:c.current.answer,block:d[0],questions:o});s([{...d[0],question:n}])}),[d,e.npsValue]),n.useEffect((()=>{r.length&&a(r.length-1),g.current?.scrollIntoView({block:"start",behavior:"smooth"})}),[r]),n.useEffect((()=>{if(!S(l.formValues)&&d&&M({blocks:d,activeBlockIndexOfBlocks:b,blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i,answers:l})){const n=()=>{const e=T({activeBlock:x,blocks:d,activeBlockIndexOfBlocks:b,answers:l});if(e===1/0)return void setTimeout((()=>{w("COMPLETE"),v(!0)}));setTimeout((()=>{w()}));const n=W({pivotQn:c.current?.question,pivotQnAnswer:c.current?.answer,block:d?.[e],questions:o}),t=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i});s([...t,{...d?.[e],question:n}])};null!=e.npsValue&&1==r.length?m.current?(clearTimeout(m.current),m.current=null,n()):m.current=setTimeout((()=>{n()}),1500):n()}}),[l,d]);const w=(n="PARTIAL")=>{let t=()=>{};"COMPLETE"===n&&(t=()=>{v(!0)}),e.onSubmit({...l.formValues,others_meta:l.others},t,n)};return{blocks:d,questions:o,blocksWithQns:r,activeBlock:x,activeBlockIndexOfBlocks:b,activeBlockIndexOfBlocksWithQns:i,isSurveyCompleted:f,pivot:c.current,answers:l,saveFormValues:(e,n,t=!1,o=i)=>{e.question.name===c.current?.question.name&&(c.current={...c.current,answer:n});let s=l;(t||L({question:e.question,answers:l}))&&(s=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:o,answers:l})),o!==i&&a(o),u({...s,formValues:{...s.formValues,...null!=n&&{[e.question.name]:n}},commitDirtyValue:t})},saveOthersValue:(e,n,t=i)=>{if(t!==i&&a(t),null===n){const n={...l.others};delete n[e],u({...l,commitDirtyValue:!1,others:n})}else u({...l,commitDirtyValue:!1,others:{...l.others,[e]:n}})},skipBlock:()=>{const e=x.question;if(delete l.formValues[e.name],delete l.others[e.name],i!==r.length-1){const e=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i,answers:l}),n=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:i});s(n),u({...e,commitDirtyValue:!0})}else u({...l,commitDirtyValue:!0})},clearRadioSelection:e=>{e!==i&&a(e);const n=r[e].question;delete l.formValues[n.name],delete l.others[n.name];const t=D({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:e,answers:l}),o=A({blocksWithQns:r,activeBlockIndexOfBlocksWithQns:e});s(o),u({...t,commitDirtyValue:!1})},onSubmitHandler:w}})(e),g=n.useRef(null),[x,b]=n.useState(!1);return n.useEffect((()=>{g.current?.scrollIntoView({block:"start",behavior:"smooth"})}),[s]),i&&i.question?t.createElement("div",{className:`freemium-survey-components ${e.mobilePreview?"mobile-preview":""} standard-survey-style`,id:"freemium-survey"},l?null:t.createElement(B,{totalSteps:r.length,completedSteps:a+(l?1:0)}),t.createElement(o.SwitchTransition,{mode:"out-in"},t.createElement(o.CSSTransition,{key:String(l),addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:"fade"},t.createElement("div",null,l?t.createElement(te,{thankYouQuestion:W({pivotQn:h?.question,pivotQnAnswer:h?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:y}),preview:e.preview,placeholders:e.placeholders,npsValue:h?.answer}):t.createElement(t.Fragment,null,t.createElement("div",{onTransitionEndCapture:e=>e.stopPropagation(),className:"questions"},s.map(((n,o)=>t.createElement("div",{key:n.question.name,ref:g,className:"question-container"},t.createElement("div",{className:"question-text "+(0===o?"nps":""),dangerouslySetInnerHTML:{__html:Q(n.question.text,e.placeholders,h?.answer)},"aria-label":`question-${o}`,role:"heading","aria-level":1}),t.createElement(O,{question:n.question,isFinalQn:V({blocks:r,activeBlockIndexOfBlocks:a,blocksWithQns:s,activeBlockIndexOfBlocksWithQns:c}),formValues:v.formValues,othersMeta:v.others,autoFocusDelay:"standard"===e.surveyStyle?350:20,saveOthersValue:(e,n)=>{m(e,n,o)},onChangeHandler:e=>{u(n,e,!1,o)}}),t.createElement(oe,{widget:!1,surveyStyle:e.surveyStyle,answers:v,blocksWithQns:s,blocks:r,blockIndex:o,activeBlockIndexOfBlocksWithQns:c,activeBlockIndexOfBlocks:a,saveFormValues:u,skipBlock:d,clearRadioSelection:p,onSubmit:f})))),j("submit",{answers:v,blocks:r,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,blocksWithQns:s,surveyStyle:e.surveyStyle,widget:!1})&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",{answers:v,blocks:r,activeBlockIndexOfBlocks:a,activeBlockIndexOfBlocksWithQns:c,blocksWithQns:s,isSubmitting:x}),onClick:()=>{b(!0),f()}},x?"Submitting":"Submit survey")))))))):null};s(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #3a4b67;\n --default-question-background-color: #fff;\n --default-background-color: #f8f8f8;\n --default-button-text-color: #fff;\n --default-secondary-button-text-color: #000;\n --default-input-placeholder-color: #92a2b1;\n}\n\n.freemium-survey-components.widget-survey-components {\n overflow: hidden;\n}\n.freemium-survey-components.widget-survey-components * {\n scrollbar-color: rgba(216, 216, 216, 0.5) transparent !important;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar {\n height: auto;\n height: initial;\n width: 6px;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar-track {\n background: transparent !important;\n}\n.freemium-survey-components.widget-survey-components * ::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: rgba(216, 216, 216, 0.5) !important;\n}\n.freemium-survey-components.widget-survey-components p {\n margin: 0;\n}\n.freemium-survey-components.widget-survey-components .questions {\n min-width: 100%;\n max-width: 100%;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n position: relative;\n display: flex;\n justify-content: row;\n align-items: flex-end;\n height: 100%;\n transition: height 200ms ease;\n}\n.freemium-survey-components.widget-survey-components .question-container {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n text-align: center;\n max-height: 100%;\n min-width: 100%;\n max-width: 700px;\n margin: 0 auto;\n box-shadow: 0px 12px 15px rgba(18, 52, 77, 0.03);\n padding: 28px 0;\n padding-top: 0;\n grid-gap: 28px;\n gap: 28px;\n overflow: auto;\n}\n.freemium-survey-components.widget-survey-components .question-wrapper {\n width: 100%;\n flex-grow: 1;\n padding: 4px 28px;\n overflow: auto;\n}\n.freemium-survey-components.widget-survey-components .hide-question-container {\n opacity: 0;\n}\n.freemium-survey-components.widget-survey-components .question-text {\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.8;\n width: 100%;\n text-align: left;\n padding: 0 28px;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-survey-components.widget-survey-components .question-text p {\n all: inherit;\n padding: 0;\n}\n.freemium-survey-components.widget-survey-components .nps-container .footer {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .autofocus-button {\n border: none;\n width: 0;\n height: 0;\n opacity: 0;\n margin-top: -12px;\n margin-left: -12px;\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-enter {\n opacity: 1;\n transform: translateX(80px);\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-enter-active {\n position: absolute;\n opacity: 1;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-enter-done {\n position: absolute;\n}\n.freemium-survey-components.widget-survey-components .fade-exit {\n opacity: 0.05;\n pointer-events: none;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-exit-active {\n pointer-events: none;\n opacity: 0;\n transform: translateX(-80px);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-enter {\n opacity: 0;\n position: absolute;\n transform: translateX(-80px);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-enter-active {\n opacity: 1;\n position: absolute;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-exit {\n opacity: 0.05;\n transform: translateX(0);\n}\n.freemium-survey-components.widget-survey-components .fade-reverse-exit-active {\n opacity: 0;\n transform: translateX(80px);\n}\n.freemium-survey-components.widget-survey-components .fade-enter-active,\n.freemium-survey-components.widget-survey-components .fade-reverse-enter-active,\n.freemium-survey-components.widget-survey-components .fade-reverse-exit-active,\n.freemium-survey-components.widget-survey-components .fade-exit-active {\n transition: opacity 200ms, transform 200ms;\n}\n.freemium-survey-components.widget-survey-components .question-footer {\n margin: 0px auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n position: sticky;\n padding: 0 28px;\n bottom: -28px;\n background: var(--default-question-background-color);\n background: var(--question-background-color, var(--default-question-background-color));\n grid-gap: 40px;\n gap: 40px;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components .question-footer:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .question-footer:only-child {\n margin-left: auto;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation {\n white-space: nowrap;\n border-radius: 3px;\n border: 1px solid #efefef;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button {\n width: 38px;\n text-align: -webkit-center;\n height: 40px;\n background-color: #fff;\n border: none;\n cursor: pointer;\n border-radius: 0 3px 3px 0;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #efefef;\n border-radius: 3px 0 0 3px;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n.freemium-survey-components.widget-survey-components .freemium-survey-step-navigation .navigation-button:focus {\n position: relative;\n z-index: 1;\n}\n.freemium-survey-components.widget-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .skip-button {\n font-weight: 500;\n cursor: pointer;\n color: #3a4b67;\n background: transparent;\n border: none;\n min-width: 40px;\n padding: 8px 16px;\n border-radius: 4px;\n color: var(--default-secondary-button-text-color);\n color: var(--secondary-button-text-color, var(--default-secondary-button-text-color));\n letter-spacing: 0.05rem;\n line-height: 1.5;\n border: 1px solid transparent;\n transform: translateY(0px);\n transition: transform ease 0.2s;\n}\n.freemium-survey-components.widget-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n transform: translateY(-4px);\n}\n.freemium-survey-components.widget-survey-components .next-button,\n.freemium-survey-components.widget-survey-components .submit {\n color: var(--default-button-text-color);\n color: var(--button-text-color, var(--default-button-text-color));\n}\n.freemium-survey-components.widget-survey-components .submit {\n margin-left: auto;\n}\n.freemium-survey-components.widget-survey-components .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n grid-gap: 20px;\n gap: 20px;\n min-height: 180px;\n}\n.freemium-survey-components.widget-survey-components .thankyou .heading {\n font-weight: 500;\n font-size: 22px;\n}\n.freemium-survey-components.widget-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 0.875rem;\n line-height: 1.6;\n color: #475867;\n width: 75%;\n}\n.freemium-survey-components.widget-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-survey-components.widget-survey-components .thankyou .link {\n width: 100%;\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #666;\n font-weight: 500;\n text-decoration: underline;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n.freemium-survey-components.widget-survey-components .responsive-text-field .textarea-container textarea {\n min-height: 80px;\n height: 80px;\n}\n.freemium-survey-components.widget-survey-components .message-container:empty {\n display: none;\n}\n\n.freemium-survey-components.widget-survey-components.compact-style .nps-question-text {\n text-align: center;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-container {\n grid-gap: 20px;\n gap: 20px;\n max-width: 100%;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer {\n flex-direction: column-reverse;\n grid-gap: 0;\n gap: 0;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer > *:first-child {\n margin-bottom: 0px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer > * {\n margin-bottom: 20px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .compact-footer-layout {\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .compact-footer-layout:empty {\n display: none;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .action-buttons {\n grid-gap: 32px;\n gap: 32px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .submit,\n.freemium-survey-components.widget-survey-components.compact-style .question-footer .action-button {\n max-width: unset;\n width: 100%;\n}\n.freemium-survey-components.widget-survey-components.compact-style .nps-container .footer {\n padding-top: 12px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .nps-container .choices {\n grid-gap: 10px;\n gap: 10px;\n}\n.freemium-survey-components.widget-survey-components.compact-style .thankyou .text {\n width: 86%;\n}\n\n.freemium-survey-components.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\n.freemium-survey-components.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\n.freemium-survey-components.widget-survey-components.default-style .nps-container .choices {\n flex-wrap: unset;\n grid-gap: 12px;\n gap: 12px;\n}\n.freemium-survey-components.widget-survey-components.default-style .radio-group {\n flex-direction: column;\n flex-wrap: nowrap;\n}\n.freemium-survey-components.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n color: #3a4b67;\n}\n.freemium-survey-components.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.freemium-survey-components.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\n.freemium-survey-components.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n\n.freemium-survey-components.widget-survey-components.cozy-style {\n max-width: 1000px;\n min-width: 600px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n text-align: left;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-question-text {\n text-align: center;\n width: 70%;\n margin: 0 auto;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n color: #3a4b67;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.freemium-survey-components.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.freemium-survey-components.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n\n.freemium-survey-components.mobile-preview .thankyou .text {\n width: unset;\n}");const se=({thankYouQuestion:e,placeholders:n,npsValue:o})=>t.createElement(t.Fragment,null,t.createElement("div",{className:"heading"},"Thank you!"),t.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:Q(e.text,n,o)}})),ie=({activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,blocksWithQns:o,blocks:r,answers:s,navigateToPreviousBlock:i,navigateToNextBlock:a})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:R("navigation-prev",{blocks:r,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,answers:s}),className:"navigation-button",onClick:i,title:"go to previous question"},t.createElement(_,{name:"arrow-previous"})),t.createElement("button",{className:"navigation-button",disabled:R("navigation-next",{blocks:r,blocksWithQns:o,activeBlockIndexOfBlocks:e,activeBlockIndexOfBlocksWithQns:n,answers:s}),onClick:a,title:"go to next question"},t.createElement(_,{name:"arrow-next"}))),ae=e=>{const{widget:o,widgetStyle:r,answers:s,blocksWithQns:i,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,saveFormValues:u,onSubmit:m,skipBlock:d,navigateToNextBlock:p,navigateToPreviousBlock:f}=e,[v,y]=n.useState(!1),h={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,widget:o},g={answers:s,blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,isSubmitting:v},x="compact"===r&&j("navigation",h)&&j("skip",h);return 0!==l||V({blocks:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i})?t.createElement("div",{className:"question-footer"},x?t.createElement("div",{className:"compact-footer-layout"},t.createElement(ie,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f}),t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip")):null,t.createElement("div",{className:"action-buttons"},!x&&j("navigation",h)&&t.createElement("div",{style:{marginRight:"auto"}},t.createElement(ie,{answers:s,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,blocksWithQns:i,blocks:a,navigateToNextBlock:p,navigateToPreviousBlock:f})),"compact"!==r&&j("skip",h)&&t.createElement("button",{className:"skip-button",onClick:d,"aria-label":"skip question"},"Skip"),j("next",h)&&t.createElement(q,{onClick:()=>{u(i[l],null,!0)},disabled:R("next",g),className:"next-button"},"Next"),j("submit",h)&&t.createElement("div",{className:"submit"},t.createElement(q,{disabled:R("submit",g),onClick:()=>{y(!0),m()}},v?"Submitting":"Submit survey")))):null},ce=e=>{const{blocks:s,blocksWithQns:i,activeBlock:a,activeBlockIndexOfBlocks:c,activeBlockIndexOfBlocksWithQns:l,isSurveyCompleted:u,isReverseAnimation:d,saveFormValues:p,saveOthersValue:f,skipBlock:v,onSubmitHandler:y,navigateToNextBlock:h,navigateToPreviousBlock:g,answers:x,questions:b,pivot:w}=X(e),[k,E]=n.useState(null),q=n.useRef(0);return n.useMemo((()=>{(()=>{if(k){k.style.minHeight="unset",k.style.maxHeight="unset",k.style.height="min-content",k.style.position="static";const n=Math.min(k?.scrollHeight+2,m[e.widgetStyle]);k.style.height=n+"px",k.style.minHeight=n+"px",q.current=n}})()}),[k]),n.useEffect((()=>{e.setCurrentSurveyState?.({question:i?.[l]?.question,npsScore:w?.answer})}),[l,w?.answer]),a&&a.question?t.createElement("div",{className:`freemium-survey-components widget-survey-components\n ${e.widgetStyle}-style `,id:"freemium-survey"},e.widgetHeaderQuerySelector&&!u&&document.querySelector(e.widgetHeaderQuerySelector)?r.createPortal(t.createElement(B,{totalSteps:s.length,completedSteps:c+(u?1:0),widget:!0}),document.querySelector(e.widgetHeaderQuerySelector)):null,t.createElement("div",{className:"questions",style:{height:q.current,...1===i.length?{transition:"none"}:{}}},t.createElement(o.TransitionGroup,{component:null},t.createElement(o.CSSTransition,{key:l+String(u),unmountOnExit:!0,addEndListener:(e,n)=>{e.addEventListener("transitionend",n,!1)},classNames:d?"fade-reverse":"fade"},t.createElement("div",{ref:e=>e?E(e):null,id:`${a.question.name}`,className:"question-container "+(u?"thankyou":""),"data-test-question-name":a.question.name},u?t.createElement(se,{thankYouQuestion:W({pivotQn:w?.question,pivotQnAnswer:w?.answer,block:e.survey.meta?.blocks?.find((e=>"TY"===e.name)),questions:b}),placeholders:e.placeholders,npsValue:w?.answer}):t.createElement(t.Fragment,null,t.createElement("div",{className:"question-text "+("RANGE"===a?.question?.type_info?.question_type?"nps-question-text":""),dangerouslySetInnerHTML:{__html:Q(a?.question.text,e.placeholders,w?.answer)},"aria-label":`question-${l}`,role:"heading","aria-level":1}),t.createElement("div",{className:"question-wrapper",onTransitionEndCapture:e=>e.stopPropagation()},t.createElement(O,{question:a.question,isFinalQn:V({blocks:s,activeBlockIndexOfBlocks:c,blocksWithQns:i,activeBlockIndexOfBlocksWithQns:l}),formValues:x.formValues,othersMeta:x.others,autoFocusDelay:0,saveOthersValue:f,onChangeHandler:e=>{p(a,e)}})),t.createElement(ae,{widget:!0,widgetStyle:e.widgetStyle,surveyStyle:"standard",answers:x,blocksWithQns:i,blocks:s,activeBlockIndexOfBlocksWithQns:l,activeBlockIndexOfBlocks:c,saveFormValues:p,skipBlock:v,onSubmit:y,navigateToPreviousBlock:g,navigateToNextBlock:h}))))))):null};s('#freshworks-survey-widget {\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;\n --container-width: 350px;\n --widget-header-height: 36px;\n --widget-footer-height: 32px;\n}\n#freshworks-survey-widget * {\n box-sizing: border-box;\n}\n#freshworks-survey-widget input,\n#freshworks-survey-widget select,\n#freshworks-survey-widget textarea,\n#freshworks-survey-widget button {\n font-family: inherit;\n}\n@keyframes mountWidget {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n#freshworks-survey-widget div.widget-survey-components {\n border: none;\n}\n#freshworks-survey-widget .freemium-survey-components {\n width: 100%;\n height: 100%;\n min-height: inherit;\n}\n#freshworks-survey-widget .default-container-style {\n right: calc(50% - var(--container-width) / 2);\n}\n#freshworks-survey-widget .compact-container-style {\n right: 40px;\n}\n#freshworks-survey-widget .compact-container-style .widget-footer {\n padding: 8px 16px;\n}\n#freshworks-survey-widget .compact-container-style .header-content.minimized {\n padding-left: 16px;\n}\n#freshworks-survey-widget .cozy-container-style {\n max-width: 1000px;\n min-width: 800px;\n left: 50%;\n transform: translate(-50%, 0);\n}\n#freshworks-survey-widget .surveyserv-widget-container {\n position: fixed;\n bottom: 0;\n border-radius: 4px 4px 0 0;\n z-index: 2147483647;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n background-color: var(--question-background-color, #fff);\n width: var(--container-width);\n box-shadow: 0px 7px 13px rgba(18, 52, 77, 0.19);\n transition: opacity 0.25s ease, height var(--height-transition-duration) ease;\n animation: mountWidget 0.5s ease;\n height: auto;\n}\n#freshworks-survey-widget .widget-header {\n height: var(--widget-header-height);\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: row-reverse;\n grid-gap: 8px;\n gap: 8px;\n background-color: #fff;\n background-color: var(--question-background-color, #fff);\n border-radius: inherit;\n position: relative;\n}\n#freshworks-survey-widget .widget-header .icons {\n height: 100%;\n display: flex;\n}\n#freshworks-survey-widget .widget-header .icon {\n cursor: pointer;\n height: 100%;\n width: 48px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n background-color: transparent;\n border: none;\n}\n#freshworks-survey-widget .widget-header .icon:hover .icon-tooltip {\n display: block;\n animation: mountWidget 0.4s ease;\n opacity: 1;\n}\n#freshworks-survey-widget .widget-header .icon:hover .icon-tooltip:hover {\n display: none;\n}\n#freshworks-survey-widget .widget-header .icon-tooltip {\n background: rgba(18, 52, 77, 0.8901960784);\n color: #fff;\n letter-spacing: 0.5px;\n padding: 4px 8px;\n border-radius: 4px;\n font-weight: 500;\n font-size: 0.9rem;\n position: absolute;\n right: 48px;\n top: 12px;\n white-space: nowrap;\n z-index: 1;\n transition: opacity ease 0.2s;\n display: none;\n opacity: 0;\n}\n#freshworks-survey-widget .widget-header.minimized {\n min-height: var(--widget-header-height);\n width: 100%;\n flex-direction: row;\n}\n#freshworks-survey-widget .header-content.minimized {\n opacity: 0;\n text-overflow: ellipsis;\n width: calc(100% - 72px);\n padding-left: 28px;\n overflow: hidden;\n white-space: nowrap;\n animation: mountWidget 0.8s ease forwards;\n animation-delay: 0.3s;\n font-weight: 500;\n line-height: 1.8;\n text-align: left;\n color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n#freshworks-survey-widget .header-content.minimized p {\n all: inherit !important;\n width: 100% !important;\n padding: 0 !important;\n margin: 0 !important;\n}\n#freshworks-survey-widget .widget-main {\n opacity: 1;\n flex-grow: 1;\n transition: opacity 0.25s ease, height var(--height-transition-duration) ease;\n}\n#freshworks-survey-widget .widget-main.minimized {\n opacity: 0;\n height: 0;\n border-radius: 3px 3px 0 0;\n}\n#freshworks-survey-widget .widget-footer {\n height: var(--widget-footer-height);\n font-size: 12px;\n display: flex;\n padding: 8px 28px;\n justify-content: space-between;\n align-items: center;\n color: rgba(18, 52, 77, 0.831372549);\n background-color: rgba(187, 187, 187, 0.1);\n letter-spacing: 0.2px;\n}\n#freshworks-survey-widget .widget-footer .fw-link {\n display: flex;\n align-items: center;\n grid-gap: 6px;\n gap: 6px;\n}\n#freshworks-survey-widget .widget-footer .emoji {\n position: relative;\n top: -1px;\n left: -2px;\n}\n#freshworks-survey-widget .widget-footer a {\n color: inherit;\n text-decoration: none;\n box-sizing: border-box;\n border-bottom: 1px solid transparent;\n}\n#freshworks-survey-widget .widget-footer a:hover {\n border-bottom: 1px solid;\n}\n#freshworks-survey-widget .title,\n#freshworks-survey-widget .description {\n text-align: center;\n}\n#freshworks-survey-widget .description {\n color: #666;\n line-height: 1.2;\n}\n#freshworks-survey-widget .close-widget {\n position: absolute;\n z-index: 10;\n background-color: #fff;\n flex-direction: column;\n display: flex;\n top: 40px;\n right: 12px;\n box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);\n border-radius: 2px;\n padding: 4px;\n}\n#freshworks-survey-widget .close-widget button {\n cursor: pointer;\n border: none;\n background-color: transparent;\n padding: 8px 12px;\n border-radius: 2px;\n font-size: 14px;\n}\n#freshworks-survey-widget .close-widget button:hover {\n background-color: #f3f3f3;\n}\n#freshworks-survey-widget .close-widget.top {\n top: -72px;\n}');const le=({survey:e,preview:o,placeholders:r,onSubmit:s,onDismiss:i,onClose:a,surveyType:c,unsubscribeUrl:l,isSurveyCompleted:u,children:m=null})=>{const p=e.question_details?.questions||[],[f,v]=n.useState(!1),[y,h]=n.useState(!1),[g,x]=n.useState(0),{ui_theme:b}=e,[w,k]=n.useState(null),[B,E]=n.useState(null),q=Z({questions:p}),O=()=>{v(!0),setTimeout((()=>{a?.()}),300)},S=n.useRef(null);return t.createElement("div",{className:`surveyserv-widget-container ${c}-container-style ${y?"minimized":""}`,style:{opacity:f?0:1,"--container-width":`${d[c]}`,"--height-transition-duration":"600ms",...N(b)}},m,t.createElement("header",{id:"surveyserv-widget-header",className:"widget-header "+(y?"minimized":"")},y&&t.createElement("span",{className:"header-content minimized",dangerouslySetInnerHTML:{__html:Q(B?.question?.text??q?.text,{...r,"{{nps.rating}}":B?.npsScore})}}),t.createElement("div",{className:"icons"},!u&&t.createElement("button",{onClick:()=>{y?(h(!y),setTimeout((()=>{x(0)}),700)):(x(w?.clientHeight??0),setTimeout((()=>{h(!y)}),0))},className:"icon",title:y?"maximize widget":"minimize widget"},y?t.createElement(_,{name:"widget-maximize"}):t.createElement(_,{name:"widget-minimize"})),t.createElement("button",{ref:S,onClick:()=>{u||i(),O()},title:"dismiss widget",className:"icon"},t.createElement(_,{name:"widget-close"})))),t.createElement("main",{ref:e=>k(e),className:"widget-main "+(y?"minimized":""),style:{height:y?0:g||"auto"}},t.createElement(ce,{widgetStyle:c,survey:e,placeholders:r,onSubmit:s,setCurrentSurveyState:E,widgetHeaderQuerySelector:y?void 0:"#surveyserv-widget-header"})),t.createElement("footer",{className:"widget-footer"},t.createElement("a",{className:"fw-link",href:"https://www.freshworks.com/?utm_source=survey&utm_medium=survey_public_page",target:"_blank",rel:"noopener noreferrer"},"Powered by",t.createElement(C,null)),l&&!y&&t.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer",onClick:e=>{o&&e.preventDefault(),e.stopPropagation(),O()}},"Unsubscribe")))};exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=q,exports.CheckboxGroup=x,exports.Input=y,exports.NPS=i,exports.ProgressBar=B,exports.Radio=k,exports.RadioGroup=w,exports.Survey=e=>{const n=G(e.survey);return t.createElement(t.Fragment,null,"standard"===e.surveyStyle?t.createElement(re,{...e,survey:n}):t.createElement(ne,{...e,survey:n,surveyStyle:"card"}))},exports.TextArea=h,exports.WebInAppSurvey=e=>{const n=G(e.survey);return t.createElement(le,{...e,survey:n})};
|