freemium-survey-components 0.10.0 → 0.10.3
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 +1 -1
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
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),r=e(require("react-dom"));function o(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}o(".freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 52px;\n gap: 52px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--default-background-color);\n border-top: 1px solid var(--background-color, var(--default-background-color));\n padding-top: 20px;\n margin-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n display: flex;\n border-radius: 4px;\n justify-content: space-between;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n position: absolute;\n color: #475867;\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 position: absolute;\n color: #475867;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\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}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, color 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 .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n color: #000;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice.active,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .button-container,\n.card-survey-style .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n.card-survey-style .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .nps-scale .button-container {\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: #ebeff3;\n}");const a=e=>{const{type_info:{linear_scale:{button_style:r="highlighted",button_shape:o="rounded"}={},score_presets:{start:a="Very unlikely",end:s="Very likely"}={},validation:{min:i},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===i?1:0)},((e,n)=>n+i)));return t.createElement("div",{className:"nps-container","data-test-input":"nps"},t.createElement("div",{className:`nps-scale ${o} ${r}`},t.createElement("div",{className:"button-container"},t.createElement("span",{className:"negative-text",role:"note"},`${i} - ${a}`),t.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${s}`),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:"footer",role:"note"},c))},s=(e,n)=>(e.defaultProps=n,e);o('.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 .end-max-length {\n padding: 0 8px;\n font-size: 0.85rem;\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 /* 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]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]:-ms-input-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 /* 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:-ms-input-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 i={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocusInput:!0},c=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocusInput&&setTimeout((()=>{o.current?.focus()}),k+20)}),[e.autoFocusInput]);const{inputStyle:a,style:s,className:i,showCount:c,isErrored:l,startLabel:u,isRequired:d,errorText:p,endLabel:m,maxLength:f,autoFocusInput:h,...v}=e;return t.createElement("div",{className:"input-container",style:s},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),t.createElement("div",null,u&&t.createElement("div",{className:"start-label"},u),t.createElement("div",{className:`input-basic ${l?"error":""}${i||""}`},t.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:o,style:a},v)),c&&f>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`)),m&&t.createElement("div",{className:"end-label"},m)),l&&p&&t.createElement("span",{className:"input-error"},e.errorText))})),l=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocusInput&&setTimeout((()=>{o.current?.focus()}),k+20)}),[]);const{inputStyle:a,style:s,className:i,showCount:c,maxLength:l,isErrored:u,startLabel:d,isRequired:p,autoFocusInput:m,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:s},e.label&&t.createElement("label",{className:"input-label "+(p?"required":"")},e.label),d&&t.createElement("div",{className:"start-label"},d),t.createElement("div",{className:`input-basic ${u?"error":""} ${i||""}`},t.createElement("textarea",Object.assign({autoComplete:"off",ref:o,style:a},f)),c&&l&&l>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`)),e.endLabel&&t.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&t.createElement("span",{className:"input-error"},e.errorText))})),u=s(c,i),d=s(l,i);o('.freemium-survey-components .checkbox-group {\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover .checkbox {\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 .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 p=()=>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"})),m=({values:e=[],options:r,autoFocusGroup:o,onChangeHandler:a,othersOption:s,othersRequired:i})=>{const c=(()=>{let n=-1;return e.map(((e,t)=>{const o=r.find((n=>n.value===e));return o||(n=t),o})),n})(),[l,d]=n.useState(!1),p=n.useRef(null);return n.useEffect((()=>{o&&setTimeout((()=>{p.current?.focus()}),k+20)}),[]),t.createElement("div",{className:"checkbox-group"},t.createElement("button",{ref:p,className:"autofocus-button","aria-hidden":!0}),r?.map(((n,r)=>t.createElement(f,{key:n.value,checked:e?.includes(n.value),name:n.value,id:n.value,onChange:(t,r)=>{if(r)a([...e||[],n.value]);else{const t=e.indexOf(n.value);t>-1&&e.splice(t,1),a([...e])}}},n.value))),s&&t.createElement(f,{key:"others",checked:l,name:"others",id:"others",onChange:(e,n)=>{d(n)}},"Others"),l&&t.createElement(t.Fragment,null,t.createElement(u,{placeholder:"Enter your comment",value:e[c],onChange:n=>{-1!==c?(e[c]=n.target.value,a(e)):a(e.concat(n.target.value))},label:""})))},f=s((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),k+20)}),[]),t.createElement("label",{className:`checkbox-label ${e.disabled&&"disabled"}`},t.createElement("input",{ref:r,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(p,null)," ")),t.createElement("div",null,e.children))}),{checked:!1});o('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\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 .radio {\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}');const h=({name:e,options:r,value:o,autoFocusGroup:a,onChangeHandler:s,othersOption:i,othersRequired:c})=>{const[l,d]=n.useState(""),[p,m]=n.useState(""),f=n.useRef(null);return n.useEffect((()=>{a&&setTimeout((()=>{f.current?.focus()}),k+20)}),[]),n.useEffect((()=>{o||(m(""),d(""))}),[o]),n.useEffect((()=>{p&&r.find((e=>e.value===p))&&s(p)}),[p]),t.createElement("div",{className:"radio-group",role:"radiogroup"},t.createElement("button",{ref:f,className:"autofocus-button","aria-hidden":!0,tabIndex:-1}),r?.map(((n,r)=>t.createElement(v,{key:n.value,value:n.value,name:e,onChange:e=>{m(e.currentTarget.value)},checked:p===n.value},n.value))),i&&t.createElement(v,{key:"others",value:"others",name:e,onChange:e=>{m("others")},checked:"others"===p},"Others"),"others"===p&&t.createElement(t.Fragment,null,t.createElement(u,{value:l,onChange:e=>d(e.target.value),placeholder:"Enter your comment",label:""}),l!==o&&t.createElement(y,{disabled:c&&0===l.length,onClick:()=>s(l)},"Next")))},v=s((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),k+20)}),[]),t.createElement("label",{className:"radio-label"},t.createElement("input",{ref:r,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});o(".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}\n\n.progressbar {\n transition: transform 0.25s linear;\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 x=e=>{const{totalSteps:n,completedSteps:r}=e;return t.createElement("div",{className:"progressbar-container"},t.createElement("div",{className:"progressbar",style:{width:(r>0?100/n:0)+"%",transform:`scaleX(${r})`}}))};o(".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: 500;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 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 b=()=>t.createElement(t.Fragment,null,"..."),y=e=>{const{inline:n=!1,children:r,disabled:o,className:a="",htmlType:s,type:i="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:d=!1,...p}=e;return t.createElement("button",Object.assign({style:n?{display:"inline-block"}:{},disabled:o,className:`action-button ${a} ${u}`,type:s,onClick:c},p),d?t.createElement(b,null):r)},g=()=>t.createElement("svg",{width:"200",height:"139",viewBox:"0 0 200 139",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M190.697 136.825C186.261 131.331 179.073 124.281 168.747 121.667C154.73 118.111 148.472 126.141 131.704 124.424C113.961 122.609 114.198 112.925 98.779 112.02C80.2862 110.93 78.3089 124.764 56.2489 125.805C40.6303 126.538 34.572 119.938 21.95 124.424C13.4252 127.456 7.68088 133.49 4.11768 138.209L190.697 136.825Z",fill:"#F4F4F4"}),t.createElement("path",{d:"M144.95 136.825H148.489C150.749 134.074 152.86 131.202 154.812 128.222C156.907 124.887 157.16 123.408 156.638 122.835C155.701 121.79 152.011 123.498 149.854 125.203C147.783 126.882 146.292 129.176 145.594 131.757C145.119 133.403 144.902 135.112 144.95 136.825Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M146.634 137.128C146.705 137.128 146.773 137.104 146.828 137.059C146.883 137.014 146.921 136.952 146.935 136.882C147.456 134.085 148.604 131.445 150.291 129.16C151.403 127.668 152.733 126.355 154.237 125.264C154.298 125.217 154.34 125.149 154.353 125.073C154.366 124.997 154.349 124.919 154.306 124.854C154.26 124.793 154.192 124.753 154.116 124.74C154.041 124.727 153.963 124.743 153.899 124.785C152.346 125.912 150.971 127.268 149.822 128.808C148.08 131.168 146.895 133.895 146.357 136.784C146.342 136.863 146.359 136.945 146.404 137.011C146.449 137.078 146.518 137.124 146.597 137.14L146.634 137.128Z",fill:"#30354F"}),t.createElement("path",{d:"M141.778 136.866C135.067 117.366 135.035 111.676 136.771 110.758C138.655 109.762 143.025 114.125 145.21 117.681C150.4 126.128 146.674 135.596 146.16 136.845L141.778 136.866Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M143.726 136.628C143.797 136.628 143.866 136.603 143.92 136.558C143.975 136.512 144.012 136.448 144.024 136.378C144.829 131.888 144.574 127.27 143.282 122.896C142.449 120.118 141.201 117.482 139.58 115.08C139.559 115.044 139.53 115.013 139.497 114.989C139.463 114.964 139.425 114.947 139.384 114.938C139.343 114.929 139.301 114.928 139.261 114.936C139.22 114.944 139.181 114.96 139.146 114.984C139.112 115.007 139.083 115.037 139.06 115.072C139.038 115.108 139.023 115.147 139.016 115.188C139.01 115.229 139.011 115.272 139.021 115.312C139.031 115.353 139.049 115.391 139.075 115.424C140.661 117.775 141.883 120.353 142.699 123.072C143.964 127.353 144.212 131.873 143.425 136.268C143.41 136.348 143.428 136.43 143.474 136.497C143.52 136.563 143.59 136.609 143.669 136.624L143.726 136.628Z",fill:"#30354F"}),t.createElement("path",{d:"M21.7544 136.825H26.9606C31.3677 131.303 34.3438 127.206 36.264 124.142C39.3503 119.226 39.7212 117.054 38.9589 116.206C37.5727 114.67 32.1423 117.186 28.9705 119.697C25.9224 122.173 23.7284 125.552 22.7002 129.353C22.0003 131.779 21.6812 134.3 21.7544 136.825Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M24.2127 137.128C24.2836 137.128 24.3524 137.104 24.4074 137.059C24.4624 137.014 24.5003 136.952 24.5144 136.882C25.2854 132.744 26.9835 128.837 29.4801 125.457C31.1256 123.25 33.0955 121.308 35.3223 119.697C35.3549 119.673 35.3826 119.643 35.4038 119.609C35.4249 119.574 35.4391 119.536 35.4456 119.496C35.452 119.456 35.4506 119.415 35.4413 119.376C35.432 119.337 35.4151 119.299 35.3916 119.267C35.368 119.234 35.3383 119.206 35.304 119.185C35.2697 119.163 35.2316 119.149 35.1919 119.143C35.1521 119.136 35.1115 119.138 35.0723 119.147C35.0331 119.156 34.9962 119.173 34.9635 119.197C32.6895 120.847 30.6772 122.833 28.9949 125.088C26.4416 128.543 24.7044 132.537 23.9151 136.767C23.9007 136.847 23.9179 136.928 23.9629 136.995C24.0078 137.062 24.0771 137.108 24.1557 137.124L24.2127 137.128Z",fill:"#30354F"}),t.createElement("path",{d:"M17.0659 136.886C7.18764 108.181 7.15095 99.8075 9.699 98.4556C12.4672 96.9931 18.9005 103.413 22.1172 108.648C29.7573 121.081 24.2739 135.014 23.5156 136.853L17.0659 136.886Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M19.9316 136.387C20.0025 136.387 20.0712 136.362 20.1256 136.316C20.1801 136.27 20.2167 136.207 20.2292 136.137C21.4098 129.549 21.0384 122.775 19.1447 116.358C17.9218 112.28 16.0894 108.412 13.7102 104.887C13.6629 104.825 13.5935 104.783 13.5164 104.77C13.4392 104.758 13.3601 104.775 13.2954 104.819C13.2307 104.863 13.1852 104.93 13.1683 105.007C13.1515 105.084 13.1645 105.164 13.2047 105.232C15.5538 108.71 17.3616 112.529 18.5658 116.555C20.4317 122.878 20.7975 129.552 19.634 136.042C19.6269 136.082 19.6278 136.123 19.6365 136.163C19.6452 136.202 19.6616 136.239 19.6847 136.273C19.7078 136.306 19.7371 136.334 19.7711 136.356C19.8051 136.377 19.843 136.392 19.8826 136.399L19.9316 136.387Z",fill:"#30354F"}),t.createElement("path",{d:"M182.865 94.6252L175.478 93.6133C175.004 93.5534 174.555 93.3671 174.177 93.0739C173.8 92.7807 173.507 92.3913 173.329 91.946C173.161 91.5192 173.11 91.0548 173.182 90.6015C173.254 90.1482 173.445 89.7225 173.737 89.3692L178.344 83.6544C178.642 83.2834 179.033 82.9978 179.475 82.8259C179.918 82.6541 180.398 82.6021 180.867 82.6752C181.332 82.7383 181.771 82.9229 182.142 83.2105C182.512 83.4982 182.801 83.8787 182.979 84.3139L185.768 91.0488C185.943 91.4689 186.003 91.9283 185.943 92.3798C185.883 92.8312 185.704 93.2584 185.425 93.6174C185.172 93.9482 184.846 94.2157 184.472 94.3991C184.099 94.5824 183.688 94.6766 183.273 94.6743C183.136 94.6669 183 94.6505 182.865 94.6252ZM178.739 83.9739L174.132 89.6887C173.903 89.9709 173.752 90.3094 173.697 90.6695C173.641 91.0295 173.681 91.3981 173.814 91.7371C173.957 92.0943 174.192 92.4067 174.495 92.6416C174.798 92.8765 175.159 93.0253 175.539 93.0726L182.934 94.0926C183.316 94.1494 183.706 94.1034 184.064 93.9595C184.422 93.8155 184.736 93.5788 184.973 93.2733C185.199 92.9886 185.343 92.6478 185.391 92.2871C185.439 91.9264 185.389 91.5593 185.246 91.225L182.457 84.4901C182.313 84.143 182.08 83.8401 181.782 83.6116C181.485 83.383 181.133 83.2367 180.761 83.1873C180.651 83.1711 180.539 83.1629 180.427 83.1627C180.104 83.165 179.786 83.2397 179.495 83.3815C179.204 83.5232 178.949 83.7284 178.747 83.9821L178.739 83.9739Z",fill:"#ECEDF0"}),t.createElement("path",{d:"M1.22812e-05 137.513C-0.00052885 137.603 0.0168174 137.693 0.0510461 137.777C0.0852748 137.861 0.135705 137.937 0.199414 138.001C0.263122 138.065 0.338842 138.116 0.422184 138.15C0.505527 138.184 0.594834 138.202 0.68493 138.201H199.315C199.497 138.201 199.671 138.129 199.799 138C199.928 137.871 200 137.695 200 137.513C200 137.33 199.928 137.155 199.799 137.026C199.671 136.897 199.497 136.825 199.315 136.825H0.68493C0.594985 136.825 0.505921 136.843 0.422823 136.877C0.339725 136.912 0.26422 136.962 0.20062 137.026C0.13702 137.09 0.0865687 137.166 0.0521484 137.25C0.017728 137.333 1.22812e-05 137.423 1.22812e-05 137.513Z",fill:"#5F6386"}),t.createElement("path",{d:"M51.2017 57.6777L41.0829 66.7886L40.1737 67.4604L40.7282 68.5829L54.7568 96.6614L57.3578 101.889L47.7934 107.132L44.6583 103.036L20.4416 71.5161C19.6508 70.4576 19.0809 69.2495 18.766 67.9643C18.5747 67.1594 18.4829 66.3339 18.4928 65.5064C18.4633 64.2632 18.6855 63.027 19.1459 61.8727C19.6063 60.7185 20.2954 59.6704 21.1714 58.7919L47.8261 32.8233C47.8261 32.8233 65.9927 19.6853 90.9432 32.7577",fill:"#D0D3D9"}),t.createElement("path",{d:"M47.7158 107.476L44.4258 103.191L20.2172 71.6881C18.8837 69.9133 18.1778 67.7421 18.2114 65.5186C18.1798 64.2337 18.4082 62.9558 18.8826 61.7622C19.3571 60.5686 20.0677 59.4842 20.9714 58.5747L47.6628 32.5733C47.7077 32.5405 52.339 29.2345 59.971 27.5918C67.0036 26.076 78.109 25.695 91.0736 32.4832L90.8167 32.9871C66.6163 20.3079 48.6372 32.5774 48.0094 33.0239L21.3669 58.9762C20.5147 59.8348 19.8453 60.8587 19.3995 61.9855C18.9537 63.1124 18.7409 64.3187 18.774 65.5309C18.7633 66.3336 18.8523 67.1345 19.039 67.9151C19.3443 69.1628 19.8991 70.3351 20.6697 71.3604L47.8748 106.764L56.9989 101.786L54.5161 96.8006L39.8393 67.3948L40.9278 66.5755L51.0303 57.4768L51.4054 57.8865L41.2703 66.9852L40.5364 67.53L40.989 68.4395L55.0135 96.5179L57.7409 101.991L47.7158 107.476Z",fill:"#251138"}),t.createElement("path",{d:"M99.093 138.054H75.2758C72.9846 127.403 73.3067 132.757 72.7522 121.217C72.5892 117.819 72.4138 114.46 72.2263 111.139C72.2263 111 72.2263 110.856 72.2263 110.729C72.0592 107.804 71.892 104.908 71.7126 102.069C71.6719 101.459 71.6352 100.84 71.5944 100.234C71.5699 99.8239 71.5414 99.4143 71.5169 99.0292C71.4639 98.1771 71.4069 97.3332 71.3457 96.4893L72.6666 96.4483L73.4086 96.4237H73.8163L92.2683 95.8256H92.6964L96.0272 95.6617V95.6863C96.4349 102.143 96.7284 109.406 96.92 117.165V117.284C97.2095 129.373 99.2887 124.646 99.093 138.054Z",fill:"#5D6476"}),t.createElement("path",{d:"M73.1636 93.2037C72.9964 94.2566 72.8293 95.3258 72.6499 96.4196C72.5194 97.2389 72.3808 98.0378 72.2422 98.8776C72.1607 99.3528 72.0791 99.828 71.9935 100.311C71.8916 100.885 71.7978 101.471 71.6918 102.052C70.6481 108.021 69.421 114.441 68.0511 121.151C65.7844 132.286 68.9032 128.218 63.5666 138.05H39.0645C41.743 124.531 41.9183 131.36 44.079 118.951C44.1035 118.8 44.128 118.648 44.1565 118.501C44.8944 114.269 45.6242 109.898 46.3662 105.24L46.4273 104.875C46.6189 103.646 47.7686 102.606 49.1588 101.598C49.9253 101.053 50.7692 100.52 51.5642 99.9837L51.7844 99.8321C51.9597 99.7133 52.1309 99.5904 52.298 99.4716C53.4966 98.6031 54.4914 97.7141 54.789 96.7064C54.8189 96.6045 54.8408 96.5004 54.8542 96.395L54.6056 95.6617L54.2957 94.7277L73.1636 93.2037Z",fill:"#5D6476"}),t.createElement("path",{d:"M84.3548 121.372L63 121.09L69.095 99.4388L79.226 97.6486L84.3548 121.372Z",fill:"#5D6476"}),t.createElement("path",{d:"M70.9498 111.29L76.9673 110.59L74.7902 96.5465L74.3744 96.612L76.4821 110.221L70.9009 110.873L70.9498 111.29Z",fill:"#251138"}),t.createElement("path",{d:"M96.7077 117.554L96.9767 117.226L94.2534 114.957L92.6797 95.7517L92.2598 95.7886L93.8457 115.17L96.7077 117.554Z",fill:"#251138"}),t.createElement("path",{d:"M44.0753 118.98L48.1848 117.509L52.4125 98.9636L52.0008 98.8776L47.8179 117.19L43.9326 118.582L44.0753 118.98Z",fill:"#251138"}),t.createElement("path",{d:"M154.526 81.3931C154.624 79.2137 150.804 77.9396 147.498 77.1858C148.913 75.9937 150.005 74.482 149.638 73.7078C149.108 72.5976 145.777 73.4374 143.641 74.4575C143.261 74.6387 142.896 74.8497 142.549 75.0883C141.46 75.0669 140.393 75.3992 139.507 76.0357C138.621 76.6723 137.963 77.5791 137.631 78.6215C137.299 79.6638 137.311 80.786 137.664 81.8211C138.017 82.8563 138.694 83.7493 139.593 84.3673C140.681 85.3844 142.039 86.0631 143.503 86.3214C146.988 86.9809 154.302 86.3377 154.526 81.3931Z",fill:"#F3A268"}),t.createElement("path",{d:"M94.8285 85.6536C95.3068 85.7353 95.7907 85.7792 96.2758 85.7847H103.635L136.136 85.7561H141.028L142.756 74.945L138.064 74.0314L103.957 67.3785L103.635 67.317L102.004 67.0057L101.188 66.8459L97.9596 66.2109C97.4389 66.1294 96.9128 66.0884 96.3859 66.088C93.9217 66.0879 91.5478 67.0202 89.7367 68.6993C87.9256 70.3784 86.8101 72.6812 86.6122 75.1493C86.4144 77.6175 87.1486 80.07 88.6689 82.0188C90.1891 83.9675 92.3839 85.2696 94.8163 85.6659L94.8285 85.6536Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M96.2754 86.0674C95.7753 86.0618 95.2763 86.0166 94.7833 85.9322C92.2802 85.5237 90.0222 84.1828 88.4588 82.1766C86.8955 80.1703 86.1416 77.646 86.3472 75.1062C86.5529 72.5665 87.703 70.1979 89.5686 68.472C91.4341 66.7461 93.8782 65.7896 96.414 65.7931C96.9601 65.7922 97.5054 65.8347 98.0448 65.9201L104.038 67.0876L143.107 74.7074L141.28 86.0264H136.135L96.2754 86.0674ZM96.4018 66.3584C94.0074 66.3566 91.7002 67.261 89.9397 68.8917C88.1791 70.5223 87.0944 72.7595 86.9016 75.1576C86.7088 77.5558 87.4221 79.9389 88.8993 81.8324C90.3765 83.7258 92.5093 84.9907 94.873 85.3751C95.3364 85.4545 95.8053 85.4969 96.2754 85.5021L140.791 85.4611L142.422 75.158L97.9021 66.4772C97.4057 66.4 96.9041 66.3603 96.4018 66.3584Z",fill:"#251138"}),t.createElement("path",{d:"M96.227 85.4857H96.1659C95.725 85.5734 95.2778 85.6255 94.8287 85.6414C92.8571 85.7282 90.9103 85.1735 89.2776 84.0598C87.6448 82.9461 86.4132 81.3327 85.7657 79.4595L74.5298 46.9977C74.0013 45.4742 73.7911 43.8576 73.9122 42.2489C74.0333 40.6401 74.4832 39.0737 75.2338 37.6475C75.9843 36.2213 77.0194 34.9659 78.2745 33.9597C79.5295 32.9535 80.9776 32.2181 82.5281 31.7994C84.0787 31.3807 85.6985 31.2878 87.2864 31.5264C88.8744 31.765 90.3963 32.3299 91.7572 33.186C93.118 34.0421 94.2887 35.171 95.1959 36.502C96.1032 37.8331 96.7276 39.3379 97.0302 40.9223L101.735 65.4613L102.028 66.9934L101.837 66.723",fill:"#D0D3D9"}),t.createElement("path",{d:"M94.3964 85.9444C92.4376 85.9348 90.5296 85.3167 88.9341 84.1748C87.3386 83.0329 86.1336 81.423 85.4843 79.5659L74.2484 47.1041C73.7126 45.5457 73.5016 43.8932 73.6287 42.2494C73.7558 40.6055 74.2182 39.0056 74.9872 37.549C75.7561 36.0925 76.8152 34.8106 78.0985 33.7831C79.3817 32.7556 80.8617 32.0045 82.4463 31.5764C84.0309 31.1484 85.6862 31.0527 87.3091 31.2952C88.9321 31.5378 90.4881 32.1134 91.8802 32.9862C93.2722 33.859 94.4707 35.0103 95.4008 36.3686C96.331 37.7269 96.973 39.263 97.2869 40.8813L102.55 68.2141L101.608 66.8704L101.706 66.8008L96.7569 40.9919C96.4878 39.4201 95.8954 37.922 95.0175 36.5932C94.1397 35.2645 92.9957 34.1342 91.6587 33.2747C90.3217 32.4152 88.821 31.8454 87.2525 31.6015C85.6839 31.3576 84.082 31.4451 82.549 31.8584C81.016 32.2717 79.5857 33.0016 78.3492 34.0017C77.1128 35.0018 76.0975 36.2499 75.3682 37.6665C74.6389 39.083 74.2116 40.6368 74.1135 42.2287C74.0155 43.8206 74.2489 45.4155 74.7988 46.9116L86.0347 79.3734C86.6651 81.1846 87.8573 82.7447 89.4358 83.8243C91.0144 84.9039 92.8961 85.446 94.8041 85.3709C95.2396 85.3554 95.6732 85.3047 96.1006 85.2193H96.1576L96.2718 85.7765H96.2106C95.7546 85.8646 95.2926 85.918 94.8286 85.9362C94.6981 85.9444 94.5554 85.9444 94.3964 85.9444Z",fill:"#251138"}),t.createElement("path",{d:"M49.2325 32.52C59.5389 25.523 76.9269 25.441 90.8617 33.0854L92.4191 51.5571L94.4575 75.9404L96.0883 95.5265C89.235 107.44 73.7469 99.8648 56.5139 96.9644C53.66 96.481 52.5756 90.7457 50.3251 87.3537L48.0747 82.8473L48.6006 59.3408L49.2325 32.52Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M62.808 5.77865C62.8669 5.33003 61.8415 4.8242 60.5177 4.64884C59.194 4.47349 58.0731 4.69501 58.0143 5.14363C57.9554 5.59225 58.9808 6.09809 60.3046 6.27344C61.6283 6.4488 62.7491 6.22727 62.808 5.77865Z",fill:"#202738"}),t.createElement("path",{d:"M61.1588 7.76636C61.452 7.67001 61.3533 6.55814 60.9382 5.28293C60.5232 4.00772 59.9491 3.05207 59.6559 3.14842C59.3627 3.24477 59.4615 4.35664 59.8765 5.63185C60.2915 6.90706 60.8657 7.86271 61.1588 7.76636Z",fill:"#202738"}),t.createElement("path",{d:"M76.4864 29.2961C76.307 32.3276 75.2919 35.8138 71.5493 35.6336C64.9936 35.314 63.3955 28.3866 63.3955 28.3866C63.3955 28.3866 63.9296 18.4727 64.0845 18.3744H76.2662V24.9741C76.4867 26.4034 76.5605 27.8516 76.4864 29.2961Z",fill:"#F3A268"}),t.createElement("path",{d:"M76.4865 29.296C67.0566 27.3297 65.7153 22.3318 65.7153 22.3318L75.1941 18.3744H76.2786V24.9741C76.4949 26.4038 76.5646 27.852 76.4865 29.296Z",fill:"#E56542"}),t.createElement("path",{d:"M62.307 14.7733C62.307 14.7733 65.1364 28.6568 75.6792 25.8138C76.8773 25.4953 77.9693 24.8618 78.8428 23.9785C79.6282 23.1898 80.197 22.2104 80.494 21.1354C81.554 17.2845 81.3664 11.0003 80.2249 2.7865L62.2866 4.31865L62.307 14.7733Z",fill:"#F3A268"}),t.createElement("path",{d:"M61.6387 15.818C61.6754 15.818 63.7423 13.5567 65.5443 16.6046C65.5443 16.6046 62.3603 15.0929 61.6754 15.818H61.6387Z",fill:"#F35757"}),t.createElement("path",{d:"M66.5389 9.77144C74.9128 11.2462 81.8068 9.14875 83.6129 4.0771C83.7768 3.60959 83.8252 3.10906 83.7541 2.61857C83.6829 2.12808 83.4942 1.6623 83.2042 1.26131C82.9142 0.860313 82.5317 0.536102 82.0894 0.316552C81.6471 0.0970034 81.1584 -0.0113085 80.6653 0.000933601C76.8167 0.10335 70.2937 1.5085 63.95 2.64327C63.4756 2.72569 63.0147 2.87318 62.5802 3.08161C58.8662 4.87185 57.8225 8.28436 58.6664 12.8357C60.0933 19.6034 62.2867 20.8201 64.6513 20.7955C64.4923 16.7603 67.5581 13.5813 66.5389 9.77144Z",fill:"#202738"}),t.createElement("path",{d:"M63.5503 20.2302C65.0972 20.2302 66.3512 18.607 66.3512 16.6047C66.3512 14.6023 65.0972 12.9791 63.5503 12.9791C62.0035 12.9791 60.7495 14.6023 60.7495 16.6047C60.7495 18.607 62.0035 20.2302 63.5503 20.2302Z",fill:"#F3A268"}),t.createElement("path",{d:"M61.6387 16.0434C61.602 16.0434 63.6119 13.9091 65.1203 16.3261C65.1203 16.3261 62.927 15.3675 61.6387 16.0434Z",fill:"#E56542"}),t.createElement("path",{d:"M59.4572 115.194C61.2348 113.945 59.9098 110.131 58.4869 107.034C60.2889 107.444 62.1561 107.378 62.5312 106.624C63.0857 105.526 60.3908 103.384 58.279 102.311C57.9058 102.117 57.5171 101.955 57.1171 101.827C56.5167 101.015 55.6888 100.401 54.7393 100.064C53.7898 99.7264 52.7619 99.6814 51.7868 99.9343C50.8117 100.187 49.9338 100.726 49.2653 101.483C48.5968 102.24 48.168 103.18 48.0338 104.183C47.9911 104.499 47.9788 104.819 47.9971 105.137C47.8602 106.623 48.1547 108.117 48.8451 109.439C50.4514 112.61 55.4211 118.038 59.4572 115.194Z",fill:"#F3A268"}),t.createElement("path",{d:"M71.268 35.6295H71.4474C73.2942 35.5967 74.7089 34.6749 75.6996 32.8929C76.4759 31.3143 76.9121 29.5889 76.9797 27.8294L76.572 27.8049C76.1643 34.4087 72.858 35.1788 71.4515 35.2075H71.2843C64.5044 35.2075 62.9675 27.3747 62.9512 27.2969L62.5435 27.3747C62.5394 27.4566 64.1416 35.6295 71.268 35.6295Z",fill:"#251138"}),t.createElement("path",{d:"M71.6423 35.4185L71.2227 35.4335L73.5034 99.7756L73.9231 99.7606L71.6423 35.4185Z",fill:"#251138"}),t.createElement("path",{d:"M73.8814 43.831C74.2619 43.831 74.5704 43.521 74.5704 43.1386C74.5704 42.7563 74.2619 42.4463 73.8814 42.4463C73.5009 42.4463 73.1924 42.7563 73.1924 43.1386C73.1924 43.521 73.5009 43.831 73.8814 43.831Z",fill:"black"}),t.createElement("path",{d:"M74.4034 53.8145C74.7839 53.8145 75.0923 53.5045 75.0923 53.1221C75.0923 52.7398 74.7839 52.4298 74.4034 52.4298C74.0228 52.4298 73.7144 52.7398 73.7144 53.1221C73.7144 53.5045 74.0228 53.8145 74.4034 53.8145Z",fill:"black"}),t.createElement("path",{d:"M74.9292 63.7979C75.3097 63.7979 75.6182 63.4879 75.6182 63.1056C75.6182 62.7232 75.3097 62.4132 74.9292 62.4132C74.5487 62.4132 74.2402 62.7232 74.2402 63.1056C74.2402 63.4879 74.5487 63.7979 74.9292 63.7979Z",fill:"black"}),t.createElement("path",{d:"M75.4507 73.7815C75.8312 73.7815 76.1397 73.4716 76.1397 73.0892C76.1397 72.7068 75.8312 72.3969 75.4507 72.3969C75.0702 72.3969 74.7617 72.7068 74.7617 73.0892C74.7617 73.4716 75.0702 73.7815 75.4507 73.7815Z",fill:"black"}),t.createElement("path",{d:"M75.9766 83.7691C76.3571 83.7691 76.6656 83.4591 76.6656 83.0767C76.6656 82.6944 76.3571 82.3844 75.9766 82.3844C75.5961 82.3844 75.2876 82.6944 75.2876 83.0767C75.2876 83.4591 75.5961 83.7691 75.9766 83.7691Z",fill:"black"}),t.createElement("path",{d:"M76.4986 93.7526C76.8791 93.7526 77.1876 93.4426 77.1876 93.0603C77.1876 92.6779 76.8791 92.3679 76.4986 92.3679C76.118 92.3679 75.8096 92.6779 75.8096 93.0603C75.8096 93.4426 76.118 93.7526 76.4986 93.7526Z",fill:"#001065"}),t.createElement("path",{d:"M142.76 74.9326L141.032 85.7437L136.135 85.7519L138.068 74.0232L142.76 74.9326Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M57.3659 101.889L47.7933 107.132L44.6582 103.036C47.1655 101.397 54.3449 96.8089 54.7689 96.6819L57.3659 101.889Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M35.9829 66.9195L40.231 67.4848V67.0629L35.9829 66.4976V66.9195Z",fill:"#251138"}),t.createElement("path",{d:"M102.222 66.5607L97.7969 71.0072L98.0938 71.3056L102.519 66.859L102.222 66.5607Z",fill:"#251138"}),t.createElement("path",{d:"M93.8744 83.7692L88.9658 84.8548L81.0566 34.7405L87.5633 33.0896L90.6618 36.7602L93.8744 83.7692Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M47.8725 59.6533L47.3169 82.8295L47.8793 82.8431L48.435 59.6669L47.8725 59.6533Z",fill:"#251138"}),t.createElement("path",{d:"M95.7976 85.5249L95.3252 85.5464L95.7806 95.663L96.2531 95.6415L95.7976 85.5249Z",fill:"#251138"}),t.createElement("circle",{cx:"137.5",cy:"37.3126",r:"23.2143",fill:"#B4DD64"}),t.createElement("path",{d:"M136.527 50.5319C136.019 50.5481 135.512 50.4482 135.037 50.2384C134.561 50.0286 134.127 49.7131 133.759 49.3109L125.266 38.96C124.907 38.5683 124.62 38.1019 124.42 37.5873C124.22 37.0728 124.111 36.5202 124.099 35.9611C124.088 35.402 124.175 34.8474 124.354 34.3289C124.533 33.8104 124.802 33.3382 125.144 32.9392C125.487 32.5402 125.896 32.2223 126.35 32.0036C126.804 31.7849 127.292 31.6697 127.788 31.6646C128.284 31.6594 128.777 31.7644 129.239 31.9736C129.701 32.1828 130.124 32.4921 130.482 32.8838L136.415 40.4491L164.73 11.5998C165.476 10.9084 166.433 10.5711 167.403 10.6581C168.372 10.7451 169.28 11.2496 169.937 12.0668C170.595 12.884 170.951 13.9511 170.932 15.0463C170.913 16.1416 170.52 17.1807 169.836 17.9479L138.911 49.4528C138.258 50.1197 137.414 50.5019 136.527 50.5319Z",fill:"#128749"})),C=({question:e,formValues:n,onChangeHandler:r,autoFocusInput:o})=>{switch(e.type_info.question_type){case"RANGE":return t.createElement(a,{type_info:e.type_info,onChangeHandler:r,npsValue:n[e.name]});case"CHECKBOX":case"MULTI_SELECT":return t.createElement(m,{autoFocusGroup:o,values:n[e.name],options:e.type_info.choices,onChangeHandler:r,othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired});case"RADIO":case"DROPDOWN":return t.createElement(h,{autoFocusGroup:o,name:e.name,onChangeHandler:r,options:e.type_info.choices,value:n[e.name],othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired});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(u,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:e.is_required,value:n[e.name]||"",placeholder:e.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),t.createElement(d,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,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(d,{autoFocusInput:o,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}};o(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #000;\n --default-question-background-color: #fff;\n --default-background-color: #ebeff3;\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-step-navigation {\n box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.1);\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 32px;\n text-align: -webkit-center;\n height: 32px;\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 #d9d9d9;\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\n.freemium-survey-components .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: 0 1px 3px 0 rgba(18, 52, 77, 0.2);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n}\n.freemium-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 color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-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}\n@-webkit-keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.freemium-survey-components .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 .question-footer:empty {\n display: none;\n}\n.freemium-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components .skip-button {\n font-weight: 400;\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}\n.freemium-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n}\n.freemium-survey-components .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 .submit {\n max-width: 700px;\n margin: 0 auto;\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 .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.freemium-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 1.2rem;\n line-height: 2;\n color: #12344d;\n}\n.freemium-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-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 .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container,\n.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container,\n.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components,\ndiv.card-survey-style {\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\n}\ndiv.widget-survey-components .questions,\ndiv.card-survey-style .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n position: relative;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text,\ndiv.card-survey-style .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container,\ndiv.card-survey-style .question-container {\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .question-footer,\ndiv.card-survey-style .question-footer {\n margin: 0px auto;\n justify-content: space-between;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n padding-bottom: 20px;\n}\ndiv.widget-survey-components .submit,\ndiv.card-survey-style .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer,\ndiv.card-survey-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices,\ndiv.card-survey-style .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group,\ndiv.card-survey-style .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group,\ndiv.card-survey-style .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou,\ndiv.card-survey-style div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components div.thankyou svg,\ndiv.card-survey-style div.thankyou svg {\n width: 140px;\n height: 120px;\n}\n\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n border-radius: 0;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 3px 0 0 0;\n}\ndiv.widget-survey-components .textarea-container .end-max-length {\n padding: 4px;\n}\ndiv.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\ndiv.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n\ndiv.widget-survey-components.default-style .freemium-survey-step-navigation {\n margin: 0;\n}\ndiv.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\ndiv.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\ndiv.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\ndiv.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\ndiv.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\ndiv.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\ndiv.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\n\n.widget-survey-components.cozy-style .freemium-survey-step-navigation {\n margin: 0;\n}\n.widget-survey-components.cozy-style .questions {\n max-height: 380px;\n max-height: var(--cozy-widget-max-height);\n}\n.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n}\n.widget-survey-components.cozy-style .question-text.nps {\n text-align: center;\n width: 60%;\n min-width: 600px;\n margin: auto;\n}\n.widget-survey-components.cozy-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.widget-survey-components.cozy-style .nps-container {\n grid-gap: 44px;\n gap: 44px;\n}\n.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}");const w=["RANGE","NPS","RADIO","DROPDOWN"],k=200,E=({thankYouQuestion:e,preview:r})=>(n.useEffect((()=>{r||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e4)}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement(g,null),t.createElement("div",{className:"text"},e.text),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 10 seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),L=()=>t.createElement("svg",{style:{display:"block"},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"})),q=()=>t.createElement("svg",{style:{display:"block"},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"})),_=({currentBlockIndex:e,currentBlockIndexOfBlocksWithQns:n,blocksWithQns:r,setHorizontalScrollUnits:o})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:0==e.current,className:"navigation-button",onClick:()=>{e.current=Math.max(e.current-1,0),n.current=Math.max(n.current-1,0),o(e.current)}},t.createElement(q,null)),t.createElement("button",{className:"navigation-button",disabled:e.current>=r.length-1,onClick:()=>{e.current=Math.min(e.current+1,r.length-1),n.current=Math.min(n.current+1,r.length-1),o(e.current)}},t.createElement(L,null))),N=({widget:e,widgetStyle:n,surveyStyle:r,formValues:o,blocksWithQns:a,blocks:s,thankYouQuestion:i,currentBlockIndexOfBlocksWithQns:c,currentBlockIndexOfBlocks:l,currentEditingBlock:u,isSubmitting:d,isValuesCommitted:p,isCurrentBlockFinal:m,setHorizontalScrollUnits:f,handleFormValues:h,skipBlock:v,setIsSubmitting:x,onSubmit:b,setIsSurveyCompleted:g,...C})=>{const k=C.blockIndex??c.current,E=C.question??a[k].question,L=()=>E.name===u.current.question.name&&!w.includes(E.type_info.question_type)&&!m(),q=()=>"RANGE"!==E.type_info.question_type&&!E.required&&E.name===u.current.question.name&&!m(),N=()=>"DROPDOWN"===E.type_info.question_type&&E.name!==u.current.question.name&&!E.required&&null!=o[E.name],z=()=>m()&&(e||"classic"!==r)&&E.name===u.current.question.name;return t.createElement("div",{className:"question-footer"},!(!e&&"classic"===r||0===k&&!o[E.name]||"compact"===n)&&t.createElement(_,{currentBlockIndex:l,currentBlockIndexOfBlocksWithQns:c,blocksWithQns:a,setHorizontalScrollUnits:f}),(L()||N()||q()||z())&&t.createElement("div",{className:"action-buttons"},L()&&t.createElement(y,{onClick:()=>{p.current?(l.current=Math.min(l.current+1,a.length-1),u.current=a[k+1],f(l.current)):h(a[k],null,!0)},disabled:!o[u.current.question.name]||Array.isArray(o[u.current.question.name])&&0===o[u.current.question.name].length,className:"next-button"},"Next"),q()&&t.createElement("button",{className:"skip-button",onClick:()=>v(E)},"Skip"),N()&&t.createElement("button",{className:"skip-button",onClick:()=>{u.current=a[k],l.current=s.findIndex((e=>e.name===a[k].name)),v(E)}},"Clear selection"),z()&&t.createElement("div",{className:"submit"},t.createElement(y,{disabled:(u.current.question.required||u.current.question.type_info.pivot_question)&&void 0===o[u.current.question.name]||d,onClick:()=>{x(!0),b(o,(()=>{i?.type_info.meta?.skipThankYouPage||g(!0)}))}},d?"Submitting":"Submit Survey"))))},z=({survey:e,surveyStyle:o="classic",placeholders:a,onSubmit:s,widget:i,npsValue:c,widgetStyle:l,widgetNavigatorQuerySelector:u,preview:d,mobilePreview:p})=>{const{meta:{blocks:m},question_details:{questions:f}}=e,[h,v]=n.useState(null),[b,g]=n.useState({}),[L,q]=n.useState(!1),[z,M]=n.useState([]),[S,Z]=n.useState(0),[R,I]=n.useState(!1),[B,F]=n.useState(null),O=n.useRef(null),D=n.useRef(null),H=n.useRef(-1),$=n.useRef(null),T=n.useRef(0),A=n.useRef(0),V=n.useRef(!1),j=n.useRef([]),Q=n.useRef(null),U=n.useRef([]);n.useEffect((()=>{m&&(Q.current=m.find((e=>"TY"===e.name)),v(m.filter((e=>"TY"!==e.name))))}),[m]),n.useEffect((()=>{if(h)if(D.current=f.find((e=>e.pivot_question))??f.find((e=>"RANGE"===e.type_info.question_type))??f[0],null!=c){H.current=c;const e=f.find((e=>e.name===h[0].question_names[0]));O.current={...h[0],question:e},j.current=[...j.current,{...h[0],question:e}],M(j.current),g({Q_1:c})}else if(!O.current&&h.length>0)return O.current=h[0],void Y(h[0])}),[h,c]),t.useEffect((()=>{i||"classic"!==o||$.current?.scrollIntoView({block:"center",behavior:"smooth"}),z.length&&(j.current=z,A.current=z.length-1),$.current&&($.current.style.maxHeight="unset"),U.current[T.current]=$.current?.scrollHeight||U.current[T.current]||0,Z(z.length-1),$.current&&($.current.style.maxHeight="100%")}),[z]),n.useEffect((()=>{Object.keys(b).length>0&&O.current.question&&(w.includes(O.current.question.type_info.question_type)||V.current)&&!P()&&G()}),[b]),n.useEffect((()=>{if(null!=b?.[D.current?.name])if(Q.current?.is_based_on_score){const e=D.current?.type_info?.choices[b?.[D.current?.name]]?.dependent_question_names,n=Q.current?.question_names.find((n=>e?.includes(n))),t=f.find((e=>e.name===n));F(t)}else{const e=f.find((e=>e.name==Q.current?.question_names[0]));F(e)}}),[b?.[D.current?.name]]);const P=()=>T.current===h.length-1||"end"===O.current.branchOption,W=e=>{if(e){let n={"{{nps.score}}":H.current};a&&(n={...n,...a});const t=new RegExp(Object.keys(n).join("|"),"gi");e=e.replace(t,(function(e){return n[e.toLowerCase()]}))}return e},Y=e=>{let n={};if(e.is_based_on_score){const t=D.current?.type_info?.choices[b?.[D.current?.name]]?.dependent_question_names,r=e.question_names.find((e=>t?.includes(e)));n=f.find((e=>e.name===r))}else n=f.find((n=>n.name===e.question_names[0]));O.current.question=n;const t=j.current.find((e=>e.question.name===n.name));M(t?[...j.current]:[...j.current,{...e,question:n}])},G=()=>{if(P())q(!0);else{if(O.current.nextBlock)T.current=h.findIndex((e=>e.name===O.current.nextBlock));else if(O.current.question.type_info?.meta?.branches){const e=O.current.question.type_info?.meta?.branches,n=b[O.current.question.name];let t;t="RANGE"===O.current.question.type_info.question_type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?T.current=h.findIndex((e=>e.name===t.nextBlock)):T.current+=1}else T.current+=1;O.current=h[T.current],Y(h[T.current])}},X=e=>{V.current=!0,delete b[e.name],g({...b})},K=(e,n,t)=>{if(t){if(V.current=!0,null!=b[e.question.name]&&e.name!==z[z.length-1].name){const[t,r]=(e=>{const n=z.findIndex((n=>n.name===e.name)),t=z.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=b[n.question.name],e)),{});return T.current=h.findIndex((n=>n.name===e.name)),[t,r]})(e);g({...r,...null!=n&&{[e.question.name]:n}}),j.current=t}else g({...b,...null!=n&&{[e.question.name]:n}});D?.current?.name==e?.question?.name&&(H.current=n)}else g({...b,...null!=n&&{[e.question.name]:n}})};return O.current&&O.current.question?L?t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style`},t.createElement(E,{thankYouQuestion:B,preview:d})):t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style ${p?"mobile-preview":""} ${o}-survey-style`},t.createElement(x,{totalSteps:h.length,completedSteps:T.current}),i&&"compact"===l&&document.querySelector(u)&&t.createElement(t.Fragment,null,r.createPortal(t.createElement(_,{currentBlockIndex:T,currentBlockIndexOfBlocksWithQns:A,blocksWithQns:z,setHorizontalScrollUnits:Z}),document.querySelector(u))),t.createElement("div",{style:i||"card"===o?{transform:`translateX(calc(-${S} * 100%))`,height:`${U.current[T.current]}px`,transition:z?.length>1?`all ${k}ms ease-out 0ms`:`transform ${k}ms ease-out 0ms`}:{},className:"questions"},z.map(((e,n)=>t.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(i||"card"===o)&&A.current!==n?0:1},ref:$,id:e.question.name,key:e.question.name},t.createElement("div",{className:"question-text "+(0===n?"nps":""),dangerouslySetInnerHTML:{__html:W(e.question.text)},title:`question-${n}`,role:"heading","aria-level":1}),t.createElement(C,{question:e.question,formValues:b,autoFocusInput:O.current.name===e.name,onChangeHandler:n=>{V.current=!1,T.current=h.findIndex((n=>n.name===e.name)),O.current=e,K(e,n,w.includes(e.question.type_info.question_type)&&!P())}}),("classic"===o||i)&&t.createElement(N,{question:e.question,blockIndex:n,widget:i,widgetStyle:l,surveyStyle:o,formValues:b,blocksWithQns:z,blocks:h,thankYouQuestion:B,currentBlockIndexOfBlocksWithQns:A,currentBlockIndexOfBlocks:T,currentEditingBlock:O,isSubmitting:R,isValuesCommitted:V,isCurrentBlockFinal:P,setHorizontalScrollUnits:Z,handleFormValues:K,skipBlock:X,setIsSubmitting:I,onSubmit:s,setIsSurveyCompleted:q})))),!i&&"card"!==o&&P()&&t.createElement("div",{className:"submit"},t.createElement(y,{disabled:O.current.question.required&&void 0===b[O.current.question.name]||R,onClick:()=>{I(!0),s(b,(()=>{d||B?.type_info.meta?.skipThankYouPage&&(window.location.href=B?.type_info.meta?.redirectUrl),B?.type_info.meta?.skipThankYouPage||q(!0)}))}},R?"Submitting Survey":"Submit Survey"))),z.length&&"card"===o&&!i&&t.createElement(t.Fragment,null,t.createElement(N,{widget:i,widgetStyle:l,surveyStyle:o,formValues:b,blocksWithQns:z,blocks:h,thankYouQuestion:B,currentBlockIndexOfBlocksWithQns:A,currentBlockIndexOfBlocks:T,currentEditingBlock:O,isSubmitting:R,isValuesCommitted:V,isCurrentBlockFinal:P,setHorizontalScrollUnits:Z,handleFormValues:K,skipBlock:X,setIsSubmitting:I,onSubmit:s,setIsSurveyCompleted:q}))):null};exports.AUTO_REDIRECT_DELAY=1e4,exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=y,exports.CheckboxGroup=m,exports.Input=u,exports.NPS=a,exports.ProgressBar=x,exports.Radio=v,exports.RadioGroup=h,exports.Survey=e=>{const{survey:n}=e,r=[],{question_details:{questions:o}}=n;return o.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),r.push(n))})),n.meta={...n.meta,blocks:r},t.createElement(z,Object.assign({},e,{survey:n}))},exports.TRANSITION_DELAY=k,exports.TextArea=d;
|
|
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),r=e(require("react-dom"));function o(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}o(".freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 52px;\n gap: 52px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--default-background-color);\n border-top: 1px solid var(--background-color, var(--default-background-color));\n padding-top: 20px;\n margin-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n display: flex;\n border-radius: 4px;\n justify-content: space-between;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n position: absolute;\n color: #475867;\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 position: absolute;\n color: #475867;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\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}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, color 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 .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n color: #000;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice.active,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .button-container,\n.card-survey-style .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n.card-survey-style .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .nps-scale .button-container {\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: #ebeff3;\n}");const a=e=>{const{type_info:{linear_scale:{button_style:r="highlighted",button_shape:o="rounded"}={},score_presets:{start:a="Very unlikely",end:s="Very likely"}={},validation:{min:i},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===i?1:0)},((e,n)=>n+i)));return t.createElement("div",{className:"nps-container","data-test-input":"nps"},t.createElement("div",{className:`nps-scale ${o} ${r}`},t.createElement("div",{className:"button-container"},t.createElement("span",{className:"negative-text",role:"note"},`${i} - ${a}`),t.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${s}`),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:"footer",role:"note"},c))},s=(e,n)=>(e.defaultProps=n,e);o('.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 .end-max-length {\n padding: 0 8px;\n font-size: 0.85rem;\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 /* 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]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]:-ms-input-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 /* 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:-ms-input-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 i={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocusInput:!0},c=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocusInput&&setTimeout((()=>{o.current?.focus()}),k+20)}),[e.autoFocusInput]);const{inputStyle:a,style:s,className:i,showCount:c,isErrored:l,startLabel:u,isRequired:d,errorText:p,endLabel:m,maxLength:f,autoFocusInput:h,...v}=e;return t.createElement("div",{className:"input-container",style:s},e.label&&t.createElement("label",{className:"input-label "+(d?"required":"")},e.label),t.createElement("div",null,u&&t.createElement("div",{className:"start-label"},u),t.createElement("div",{className:`input-basic ${l?"error":""}${i||""}`},t.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:o,style:a},v)),c&&f>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`)),m&&t.createElement("div",{className:"end-label"},m)),l&&p&&t.createElement("span",{className:"input-error"},e.errorText))})),l=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocusInput&&setTimeout((()=>{o.current?.focus()}),k+20)}),[]);const{inputStyle:a,style:s,className:i,showCount:c,maxLength:l,isErrored:u,startLabel:d,isRequired:p,autoFocusInput:m,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:s},e.label&&t.createElement("label",{className:"input-label "+(p?"required":"")},e.label),d&&t.createElement("div",{className:"start-label"},d),t.createElement("div",{className:`input-basic ${u?"error":""} ${i||""}`},t.createElement("textarea",Object.assign({autoComplete:"off",ref:o,style:a},f)),c&&l&&l>0&&t.createElement("div",{className:"end-max-length"},`${e.value&&e.value.length||0}/${e.maxLength}`)),e.endLabel&&t.createElement("div",{className:"end-label"},e.endLabel)),e.isErrored&&e.errorText&&t.createElement("span",{className:"input-error"},e.errorText))})),u=s(c,i),d=s(l,i);o('.freemium-survey-components .checkbox-group {\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover .checkbox {\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 .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 p=()=>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"})),m=({values:e=[],options:r,autoFocusGroup:o,onChangeHandler:a,othersOption:s,othersRequired:i})=>{const c=(()=>{let n=-1;return e.map(((e,t)=>{const o=r.find((n=>n.value===e));return o||(n=t),o})),n})(),[l,d]=n.useState(!1),p=n.useRef(null);return n.useEffect((()=>{o&&setTimeout((()=>{p.current?.focus()}),k+20)}),[]),t.createElement("div",{className:"checkbox-group"},t.createElement("button",{ref:p,className:"autofocus-button","aria-hidden":!0}),r?.map(((n,r)=>t.createElement(f,{key:n.value,checked:e?.includes(n.value),name:n.value,id:n.value,onChange:(t,r)=>{if(r)a([...e||[],n.value]);else{const t=e.indexOf(n.value);t>-1&&e.splice(t,1),a([...e])}}},n.value))),s&&t.createElement(f,{key:"others",checked:l,name:"others",id:"others",onChange:(e,n)=>{d(n)}},"Others"),l&&t.createElement(t.Fragment,null,t.createElement(u,{placeholder:"Enter your comment",value:e[c],onChange:n=>{-1!==c?(e[c]=n.target.value,a(e)):a(e.concat(n.target.value))},label:""})))},f=s((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),k+20)}),[]),t.createElement("label",{className:`checkbox-label ${e.disabled&&"disabled"}`},t.createElement("input",{ref:r,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(p,null)," ")),t.createElement("div",null,e.children))}),{checked:!1});o('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\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 .radio {\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}');const h=({name:e,options:r,value:o,autoFocusGroup:a,onChangeHandler:s,othersOption:i,othersRequired:c})=>{const[l,d]=n.useState(""),[p,m]=n.useState(""),f=n.useRef(null);return n.useEffect((()=>{a&&setTimeout((()=>{f.current?.focus()}),k+20)}),[]),n.useEffect((()=>{o||(m(""),d(""))}),[o]),n.useEffect((()=>{p&&r.find((e=>e.value===p))&&s(p)}),[p]),t.createElement("div",{className:"radio-group",role:"radiogroup"},t.createElement("button",{ref:f,className:"autofocus-button","aria-hidden":!0,tabIndex:-1}),r?.map(((n,r)=>t.createElement(v,{key:n.value,value:n.value,name:e,onChange:e=>{m(e.currentTarget.value)},checked:p===n.value},n.value))),i&&t.createElement(v,{key:"others",value:"others",name:e,onChange:e=>{m("others")},checked:"others"===p},"Others"),"others"===p&&t.createElement(t.Fragment,null,t.createElement(u,{value:l,onChange:e=>d(e.target.value),placeholder:"Enter your comment",label:""}),l!==o&&t.createElement(y,{disabled:c&&0===l.length,onClick:()=>s(l)},"Next")))},v=s((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),k+20)}),[]),t.createElement("label",{className:"radio-label"},t.createElement("input",{ref:r,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});o(".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}\n\n.progressbar {\n transition: transform 0.25s linear;\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 x=e=>{const{totalSteps:n,completedSteps:r}=e;return t.createElement("div",{className:"progressbar-container"},t.createElement("div",{className:"progressbar",style:{width:(r>0?100/n:0)+"%",transform:`scaleX(${r})`}}))};o(".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: 500;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 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 b=()=>t.createElement(t.Fragment,null,"..."),y=e=>{const{inline:n=!1,children:r,disabled:o,className:a="",htmlType:s,type:i="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:d=!1,...p}=e;return t.createElement("button",Object.assign({style:n?{display:"inline-block"}:{},disabled:o,className:`action-button ${a} ${u}`,type:s,onClick:c},p),d?t.createElement(b,null):r)},g=()=>t.createElement("svg",{width:"200",height:"139",viewBox:"0 0 200 139",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M190.697 136.825C186.261 131.331 179.073 124.281 168.747 121.667C154.73 118.111 148.472 126.141 131.704 124.424C113.961 122.609 114.198 112.925 98.779 112.02C80.2862 110.93 78.3089 124.764 56.2489 125.805C40.6303 126.538 34.572 119.938 21.95 124.424C13.4252 127.456 7.68088 133.49 4.11768 138.209L190.697 136.825Z",fill:"#F4F4F4"}),t.createElement("path",{d:"M144.95 136.825H148.489C150.749 134.074 152.86 131.202 154.812 128.222C156.907 124.887 157.16 123.408 156.638 122.835C155.701 121.79 152.011 123.498 149.854 125.203C147.783 126.882 146.292 129.176 145.594 131.757C145.119 133.403 144.902 135.112 144.95 136.825Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M146.634 137.128C146.705 137.128 146.773 137.104 146.828 137.059C146.883 137.014 146.921 136.952 146.935 136.882C147.456 134.085 148.604 131.445 150.291 129.16C151.403 127.668 152.733 126.355 154.237 125.264C154.298 125.217 154.34 125.149 154.353 125.073C154.366 124.997 154.349 124.919 154.306 124.854C154.26 124.793 154.192 124.753 154.116 124.74C154.041 124.727 153.963 124.743 153.899 124.785C152.346 125.912 150.971 127.268 149.822 128.808C148.08 131.168 146.895 133.895 146.357 136.784C146.342 136.863 146.359 136.945 146.404 137.011C146.449 137.078 146.518 137.124 146.597 137.14L146.634 137.128Z",fill:"#30354F"}),t.createElement("path",{d:"M141.778 136.866C135.067 117.366 135.035 111.676 136.771 110.758C138.655 109.762 143.025 114.125 145.21 117.681C150.4 126.128 146.674 135.596 146.16 136.845L141.778 136.866Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M143.726 136.628C143.797 136.628 143.866 136.603 143.92 136.558C143.975 136.512 144.012 136.448 144.024 136.378C144.829 131.888 144.574 127.27 143.282 122.896C142.449 120.118 141.201 117.482 139.58 115.08C139.559 115.044 139.53 115.013 139.497 114.989C139.463 114.964 139.425 114.947 139.384 114.938C139.343 114.929 139.301 114.928 139.261 114.936C139.22 114.944 139.181 114.96 139.146 114.984C139.112 115.007 139.083 115.037 139.06 115.072C139.038 115.108 139.023 115.147 139.016 115.188C139.01 115.229 139.011 115.272 139.021 115.312C139.031 115.353 139.049 115.391 139.075 115.424C140.661 117.775 141.883 120.353 142.699 123.072C143.964 127.353 144.212 131.873 143.425 136.268C143.41 136.348 143.428 136.43 143.474 136.497C143.52 136.563 143.59 136.609 143.669 136.624L143.726 136.628Z",fill:"#30354F"}),t.createElement("path",{d:"M21.7544 136.825H26.9606C31.3677 131.303 34.3438 127.206 36.264 124.142C39.3503 119.226 39.7212 117.054 38.9589 116.206C37.5727 114.67 32.1423 117.186 28.9705 119.697C25.9224 122.173 23.7284 125.552 22.7002 129.353C22.0003 131.779 21.6812 134.3 21.7544 136.825Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M24.2127 137.128C24.2836 137.128 24.3524 137.104 24.4074 137.059C24.4624 137.014 24.5003 136.952 24.5144 136.882C25.2854 132.744 26.9835 128.837 29.4801 125.457C31.1256 123.25 33.0955 121.308 35.3223 119.697C35.3549 119.673 35.3826 119.643 35.4038 119.609C35.4249 119.574 35.4391 119.536 35.4456 119.496C35.452 119.456 35.4506 119.415 35.4413 119.376C35.432 119.337 35.4151 119.299 35.3916 119.267C35.368 119.234 35.3383 119.206 35.304 119.185C35.2697 119.163 35.2316 119.149 35.1919 119.143C35.1521 119.136 35.1115 119.138 35.0723 119.147C35.0331 119.156 34.9962 119.173 34.9635 119.197C32.6895 120.847 30.6772 122.833 28.9949 125.088C26.4416 128.543 24.7044 132.537 23.9151 136.767C23.9007 136.847 23.9179 136.928 23.9629 136.995C24.0078 137.062 24.0771 137.108 24.1557 137.124L24.2127 137.128Z",fill:"#30354F"}),t.createElement("path",{d:"M17.0659 136.886C7.18764 108.181 7.15095 99.8075 9.699 98.4556C12.4672 96.9931 18.9005 103.413 22.1172 108.648C29.7573 121.081 24.2739 135.014 23.5156 136.853L17.0659 136.886Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M19.9316 136.387C20.0025 136.387 20.0712 136.362 20.1256 136.316C20.1801 136.27 20.2167 136.207 20.2292 136.137C21.4098 129.549 21.0384 122.775 19.1447 116.358C17.9218 112.28 16.0894 108.412 13.7102 104.887C13.6629 104.825 13.5935 104.783 13.5164 104.77C13.4392 104.758 13.3601 104.775 13.2954 104.819C13.2307 104.863 13.1852 104.93 13.1683 105.007C13.1515 105.084 13.1645 105.164 13.2047 105.232C15.5538 108.71 17.3616 112.529 18.5658 116.555C20.4317 122.878 20.7975 129.552 19.634 136.042C19.6269 136.082 19.6278 136.123 19.6365 136.163C19.6452 136.202 19.6616 136.239 19.6847 136.273C19.7078 136.306 19.7371 136.334 19.7711 136.356C19.8051 136.377 19.843 136.392 19.8826 136.399L19.9316 136.387Z",fill:"#30354F"}),t.createElement("path",{d:"M182.865 94.6252L175.478 93.6133C175.004 93.5534 174.555 93.3671 174.177 93.0739C173.8 92.7807 173.507 92.3913 173.329 91.946C173.161 91.5192 173.11 91.0548 173.182 90.6015C173.254 90.1482 173.445 89.7225 173.737 89.3692L178.344 83.6544C178.642 83.2834 179.033 82.9978 179.475 82.8259C179.918 82.6541 180.398 82.6021 180.867 82.6752C181.332 82.7383 181.771 82.9229 182.142 83.2105C182.512 83.4982 182.801 83.8787 182.979 84.3139L185.768 91.0488C185.943 91.4689 186.003 91.9283 185.943 92.3798C185.883 92.8312 185.704 93.2584 185.425 93.6174C185.172 93.9482 184.846 94.2157 184.472 94.3991C184.099 94.5824 183.688 94.6766 183.273 94.6743C183.136 94.6669 183 94.6505 182.865 94.6252ZM178.739 83.9739L174.132 89.6887C173.903 89.9709 173.752 90.3094 173.697 90.6695C173.641 91.0295 173.681 91.3981 173.814 91.7371C173.957 92.0943 174.192 92.4067 174.495 92.6416C174.798 92.8765 175.159 93.0253 175.539 93.0726L182.934 94.0926C183.316 94.1494 183.706 94.1034 184.064 93.9595C184.422 93.8155 184.736 93.5788 184.973 93.2733C185.199 92.9886 185.343 92.6478 185.391 92.2871C185.439 91.9264 185.389 91.5593 185.246 91.225L182.457 84.4901C182.313 84.143 182.08 83.8401 181.782 83.6116C181.485 83.383 181.133 83.2367 180.761 83.1873C180.651 83.1711 180.539 83.1629 180.427 83.1627C180.104 83.165 179.786 83.2397 179.495 83.3815C179.204 83.5232 178.949 83.7284 178.747 83.9821L178.739 83.9739Z",fill:"#ECEDF0"}),t.createElement("path",{d:"M1.22812e-05 137.513C-0.00052885 137.603 0.0168174 137.693 0.0510461 137.777C0.0852748 137.861 0.135705 137.937 0.199414 138.001C0.263122 138.065 0.338842 138.116 0.422184 138.15C0.505527 138.184 0.594834 138.202 0.68493 138.201H199.315C199.497 138.201 199.671 138.129 199.799 138C199.928 137.871 200 137.695 200 137.513C200 137.33 199.928 137.155 199.799 137.026C199.671 136.897 199.497 136.825 199.315 136.825H0.68493C0.594985 136.825 0.505921 136.843 0.422823 136.877C0.339725 136.912 0.26422 136.962 0.20062 137.026C0.13702 137.09 0.0865687 137.166 0.0521484 137.25C0.017728 137.333 1.22812e-05 137.423 1.22812e-05 137.513Z",fill:"#5F6386"}),t.createElement("path",{d:"M51.2017 57.6777L41.0829 66.7886L40.1737 67.4604L40.7282 68.5829L54.7568 96.6614L57.3578 101.889L47.7934 107.132L44.6583 103.036L20.4416 71.5161C19.6508 70.4576 19.0809 69.2495 18.766 67.9643C18.5747 67.1594 18.4829 66.3339 18.4928 65.5064C18.4633 64.2632 18.6855 63.027 19.1459 61.8727C19.6063 60.7185 20.2954 59.6704 21.1714 58.7919L47.8261 32.8233C47.8261 32.8233 65.9927 19.6853 90.9432 32.7577",fill:"#D0D3D9"}),t.createElement("path",{d:"M47.7158 107.476L44.4258 103.191L20.2172 71.6881C18.8837 69.9133 18.1778 67.7421 18.2114 65.5186C18.1798 64.2337 18.4082 62.9558 18.8826 61.7622C19.3571 60.5686 20.0677 59.4842 20.9714 58.5747L47.6628 32.5733C47.7077 32.5405 52.339 29.2345 59.971 27.5918C67.0036 26.076 78.109 25.695 91.0736 32.4832L90.8167 32.9871C66.6163 20.3079 48.6372 32.5774 48.0094 33.0239L21.3669 58.9762C20.5147 59.8348 19.8453 60.8587 19.3995 61.9855C18.9537 63.1124 18.7409 64.3187 18.774 65.5309C18.7633 66.3336 18.8523 67.1345 19.039 67.9151C19.3443 69.1628 19.8991 70.3351 20.6697 71.3604L47.8748 106.764L56.9989 101.786L54.5161 96.8006L39.8393 67.3948L40.9278 66.5755L51.0303 57.4768L51.4054 57.8865L41.2703 66.9852L40.5364 67.53L40.989 68.4395L55.0135 96.5179L57.7409 101.991L47.7158 107.476Z",fill:"#251138"}),t.createElement("path",{d:"M99.093 138.054H75.2758C72.9846 127.403 73.3067 132.757 72.7522 121.217C72.5892 117.819 72.4138 114.46 72.2263 111.139C72.2263 111 72.2263 110.856 72.2263 110.729C72.0592 107.804 71.892 104.908 71.7126 102.069C71.6719 101.459 71.6352 100.84 71.5944 100.234C71.5699 99.8239 71.5414 99.4143 71.5169 99.0292C71.4639 98.1771 71.4069 97.3332 71.3457 96.4893L72.6666 96.4483L73.4086 96.4237H73.8163L92.2683 95.8256H92.6964L96.0272 95.6617V95.6863C96.4349 102.143 96.7284 109.406 96.92 117.165V117.284C97.2095 129.373 99.2887 124.646 99.093 138.054Z",fill:"#5D6476"}),t.createElement("path",{d:"M73.1636 93.2037C72.9964 94.2566 72.8293 95.3258 72.6499 96.4196C72.5194 97.2389 72.3808 98.0378 72.2422 98.8776C72.1607 99.3528 72.0791 99.828 71.9935 100.311C71.8916 100.885 71.7978 101.471 71.6918 102.052C70.6481 108.021 69.421 114.441 68.0511 121.151C65.7844 132.286 68.9032 128.218 63.5666 138.05H39.0645C41.743 124.531 41.9183 131.36 44.079 118.951C44.1035 118.8 44.128 118.648 44.1565 118.501C44.8944 114.269 45.6242 109.898 46.3662 105.24L46.4273 104.875C46.6189 103.646 47.7686 102.606 49.1588 101.598C49.9253 101.053 50.7692 100.52 51.5642 99.9837L51.7844 99.8321C51.9597 99.7133 52.1309 99.5904 52.298 99.4716C53.4966 98.6031 54.4914 97.7141 54.789 96.7064C54.8189 96.6045 54.8408 96.5004 54.8542 96.395L54.6056 95.6617L54.2957 94.7277L73.1636 93.2037Z",fill:"#5D6476"}),t.createElement("path",{d:"M84.3548 121.372L63 121.09L69.095 99.4388L79.226 97.6486L84.3548 121.372Z",fill:"#5D6476"}),t.createElement("path",{d:"M70.9498 111.29L76.9673 110.59L74.7902 96.5465L74.3744 96.612L76.4821 110.221L70.9009 110.873L70.9498 111.29Z",fill:"#251138"}),t.createElement("path",{d:"M96.7077 117.554L96.9767 117.226L94.2534 114.957L92.6797 95.7517L92.2598 95.7886L93.8457 115.17L96.7077 117.554Z",fill:"#251138"}),t.createElement("path",{d:"M44.0753 118.98L48.1848 117.509L52.4125 98.9636L52.0008 98.8776L47.8179 117.19L43.9326 118.582L44.0753 118.98Z",fill:"#251138"}),t.createElement("path",{d:"M154.526 81.3931C154.624 79.2137 150.804 77.9396 147.498 77.1858C148.913 75.9937 150.005 74.482 149.638 73.7078C149.108 72.5976 145.777 73.4374 143.641 74.4575C143.261 74.6387 142.896 74.8497 142.549 75.0883C141.46 75.0669 140.393 75.3992 139.507 76.0357C138.621 76.6723 137.963 77.5791 137.631 78.6215C137.299 79.6638 137.311 80.786 137.664 81.8211C138.017 82.8563 138.694 83.7493 139.593 84.3673C140.681 85.3844 142.039 86.0631 143.503 86.3214C146.988 86.9809 154.302 86.3377 154.526 81.3931Z",fill:"#F3A268"}),t.createElement("path",{d:"M94.8285 85.6536C95.3068 85.7353 95.7907 85.7792 96.2758 85.7847H103.635L136.136 85.7561H141.028L142.756 74.945L138.064 74.0314L103.957 67.3785L103.635 67.317L102.004 67.0057L101.188 66.8459L97.9596 66.2109C97.4389 66.1294 96.9128 66.0884 96.3859 66.088C93.9217 66.0879 91.5478 67.0202 89.7367 68.6993C87.9256 70.3784 86.8101 72.6812 86.6122 75.1493C86.4144 77.6175 87.1486 80.07 88.6689 82.0188C90.1891 83.9675 92.3839 85.2696 94.8163 85.6659L94.8285 85.6536Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M96.2754 86.0674C95.7753 86.0618 95.2763 86.0166 94.7833 85.9322C92.2802 85.5237 90.0222 84.1828 88.4588 82.1766C86.8955 80.1703 86.1416 77.646 86.3472 75.1062C86.5529 72.5665 87.703 70.1979 89.5686 68.472C91.4341 66.7461 93.8782 65.7896 96.414 65.7931C96.9601 65.7922 97.5054 65.8347 98.0448 65.9201L104.038 67.0876L143.107 74.7074L141.28 86.0264H136.135L96.2754 86.0674ZM96.4018 66.3584C94.0074 66.3566 91.7002 67.261 89.9397 68.8917C88.1791 70.5223 87.0944 72.7595 86.9016 75.1576C86.7088 77.5558 87.4221 79.9389 88.8993 81.8324C90.3765 83.7258 92.5093 84.9907 94.873 85.3751C95.3364 85.4545 95.8053 85.4969 96.2754 85.5021L140.791 85.4611L142.422 75.158L97.9021 66.4772C97.4057 66.4 96.9041 66.3603 96.4018 66.3584Z",fill:"#251138"}),t.createElement("path",{d:"M96.227 85.4857H96.1659C95.725 85.5734 95.2778 85.6255 94.8287 85.6414C92.8571 85.7282 90.9103 85.1735 89.2776 84.0598C87.6448 82.9461 86.4132 81.3327 85.7657 79.4595L74.5298 46.9977C74.0013 45.4742 73.7911 43.8576 73.9122 42.2489C74.0333 40.6401 74.4832 39.0737 75.2338 37.6475C75.9843 36.2213 77.0194 34.9659 78.2745 33.9597C79.5295 32.9535 80.9776 32.2181 82.5281 31.7994C84.0787 31.3807 85.6985 31.2878 87.2864 31.5264C88.8744 31.765 90.3963 32.3299 91.7572 33.186C93.118 34.0421 94.2887 35.171 95.1959 36.502C96.1032 37.8331 96.7276 39.3379 97.0302 40.9223L101.735 65.4613L102.028 66.9934L101.837 66.723",fill:"#D0D3D9"}),t.createElement("path",{d:"M94.3964 85.9444C92.4376 85.9348 90.5296 85.3167 88.9341 84.1748C87.3386 83.0329 86.1336 81.423 85.4843 79.5659L74.2484 47.1041C73.7126 45.5457 73.5016 43.8932 73.6287 42.2494C73.7558 40.6055 74.2182 39.0056 74.9872 37.549C75.7561 36.0925 76.8152 34.8106 78.0985 33.7831C79.3817 32.7556 80.8617 32.0045 82.4463 31.5764C84.0309 31.1484 85.6862 31.0527 87.3091 31.2952C88.9321 31.5378 90.4881 32.1134 91.8802 32.9862C93.2722 33.859 94.4707 35.0103 95.4008 36.3686C96.331 37.7269 96.973 39.263 97.2869 40.8813L102.55 68.2141L101.608 66.8704L101.706 66.8008L96.7569 40.9919C96.4878 39.4201 95.8954 37.922 95.0175 36.5932C94.1397 35.2645 92.9957 34.1342 91.6587 33.2747C90.3217 32.4152 88.821 31.8454 87.2525 31.6015C85.6839 31.3576 84.082 31.4451 82.549 31.8584C81.016 32.2717 79.5857 33.0016 78.3492 34.0017C77.1128 35.0018 76.0975 36.2499 75.3682 37.6665C74.6389 39.083 74.2116 40.6368 74.1135 42.2287C74.0155 43.8206 74.2489 45.4155 74.7988 46.9116L86.0347 79.3734C86.6651 81.1846 87.8573 82.7447 89.4358 83.8243C91.0144 84.9039 92.8961 85.446 94.8041 85.3709C95.2396 85.3554 95.6732 85.3047 96.1006 85.2193H96.1576L96.2718 85.7765H96.2106C95.7546 85.8646 95.2926 85.918 94.8286 85.9362C94.6981 85.9444 94.5554 85.9444 94.3964 85.9444Z",fill:"#251138"}),t.createElement("path",{d:"M49.2325 32.52C59.5389 25.523 76.9269 25.441 90.8617 33.0854L92.4191 51.5571L94.4575 75.9404L96.0883 95.5265C89.235 107.44 73.7469 99.8648 56.5139 96.9644C53.66 96.481 52.5756 90.7457 50.3251 87.3537L48.0747 82.8473L48.6006 59.3408L49.2325 32.52Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M62.808 5.77865C62.8669 5.33003 61.8415 4.8242 60.5177 4.64884C59.194 4.47349 58.0731 4.69501 58.0143 5.14363C57.9554 5.59225 58.9808 6.09809 60.3046 6.27344C61.6283 6.4488 62.7491 6.22727 62.808 5.77865Z",fill:"#202738"}),t.createElement("path",{d:"M61.1588 7.76636C61.452 7.67001 61.3533 6.55814 60.9382 5.28293C60.5232 4.00772 59.9491 3.05207 59.6559 3.14842C59.3627 3.24477 59.4615 4.35664 59.8765 5.63185C60.2915 6.90706 60.8657 7.86271 61.1588 7.76636Z",fill:"#202738"}),t.createElement("path",{d:"M76.4864 29.2961C76.307 32.3276 75.2919 35.8138 71.5493 35.6336C64.9936 35.314 63.3955 28.3866 63.3955 28.3866C63.3955 28.3866 63.9296 18.4727 64.0845 18.3744H76.2662V24.9741C76.4867 26.4034 76.5605 27.8516 76.4864 29.2961Z",fill:"#F3A268"}),t.createElement("path",{d:"M76.4865 29.296C67.0566 27.3297 65.7153 22.3318 65.7153 22.3318L75.1941 18.3744H76.2786V24.9741C76.4949 26.4038 76.5646 27.852 76.4865 29.296Z",fill:"#E56542"}),t.createElement("path",{d:"M62.307 14.7733C62.307 14.7733 65.1364 28.6568 75.6792 25.8138C76.8773 25.4953 77.9693 24.8618 78.8428 23.9785C79.6282 23.1898 80.197 22.2104 80.494 21.1354C81.554 17.2845 81.3664 11.0003 80.2249 2.7865L62.2866 4.31865L62.307 14.7733Z",fill:"#F3A268"}),t.createElement("path",{d:"M61.6387 15.818C61.6754 15.818 63.7423 13.5567 65.5443 16.6046C65.5443 16.6046 62.3603 15.0929 61.6754 15.818H61.6387Z",fill:"#F35757"}),t.createElement("path",{d:"M66.5389 9.77144C74.9128 11.2462 81.8068 9.14875 83.6129 4.0771C83.7768 3.60959 83.8252 3.10906 83.7541 2.61857C83.6829 2.12808 83.4942 1.6623 83.2042 1.26131C82.9142 0.860313 82.5317 0.536102 82.0894 0.316552C81.6471 0.0970034 81.1584 -0.0113085 80.6653 0.000933601C76.8167 0.10335 70.2937 1.5085 63.95 2.64327C63.4756 2.72569 63.0147 2.87318 62.5802 3.08161C58.8662 4.87185 57.8225 8.28436 58.6664 12.8357C60.0933 19.6034 62.2867 20.8201 64.6513 20.7955C64.4923 16.7603 67.5581 13.5813 66.5389 9.77144Z",fill:"#202738"}),t.createElement("path",{d:"M63.5503 20.2302C65.0972 20.2302 66.3512 18.607 66.3512 16.6047C66.3512 14.6023 65.0972 12.9791 63.5503 12.9791C62.0035 12.9791 60.7495 14.6023 60.7495 16.6047C60.7495 18.607 62.0035 20.2302 63.5503 20.2302Z",fill:"#F3A268"}),t.createElement("path",{d:"M61.6387 16.0434C61.602 16.0434 63.6119 13.9091 65.1203 16.3261C65.1203 16.3261 62.927 15.3675 61.6387 16.0434Z",fill:"#E56542"}),t.createElement("path",{d:"M59.4572 115.194C61.2348 113.945 59.9098 110.131 58.4869 107.034C60.2889 107.444 62.1561 107.378 62.5312 106.624C63.0857 105.526 60.3908 103.384 58.279 102.311C57.9058 102.117 57.5171 101.955 57.1171 101.827C56.5167 101.015 55.6888 100.401 54.7393 100.064C53.7898 99.7264 52.7619 99.6814 51.7868 99.9343C50.8117 100.187 49.9338 100.726 49.2653 101.483C48.5968 102.24 48.168 103.18 48.0338 104.183C47.9911 104.499 47.9788 104.819 47.9971 105.137C47.8602 106.623 48.1547 108.117 48.8451 109.439C50.4514 112.61 55.4211 118.038 59.4572 115.194Z",fill:"#F3A268"}),t.createElement("path",{d:"M71.268 35.6295H71.4474C73.2942 35.5967 74.7089 34.6749 75.6996 32.8929C76.4759 31.3143 76.9121 29.5889 76.9797 27.8294L76.572 27.8049C76.1643 34.4087 72.858 35.1788 71.4515 35.2075H71.2843C64.5044 35.2075 62.9675 27.3747 62.9512 27.2969L62.5435 27.3747C62.5394 27.4566 64.1416 35.6295 71.268 35.6295Z",fill:"#251138"}),t.createElement("path",{d:"M71.6423 35.4185L71.2227 35.4335L73.5034 99.7756L73.9231 99.7606L71.6423 35.4185Z",fill:"#251138"}),t.createElement("path",{d:"M73.8814 43.831C74.2619 43.831 74.5704 43.521 74.5704 43.1386C74.5704 42.7563 74.2619 42.4463 73.8814 42.4463C73.5009 42.4463 73.1924 42.7563 73.1924 43.1386C73.1924 43.521 73.5009 43.831 73.8814 43.831Z",fill:"black"}),t.createElement("path",{d:"M74.4034 53.8145C74.7839 53.8145 75.0923 53.5045 75.0923 53.1221C75.0923 52.7398 74.7839 52.4298 74.4034 52.4298C74.0228 52.4298 73.7144 52.7398 73.7144 53.1221C73.7144 53.5045 74.0228 53.8145 74.4034 53.8145Z",fill:"black"}),t.createElement("path",{d:"M74.9292 63.7979C75.3097 63.7979 75.6182 63.4879 75.6182 63.1056C75.6182 62.7232 75.3097 62.4132 74.9292 62.4132C74.5487 62.4132 74.2402 62.7232 74.2402 63.1056C74.2402 63.4879 74.5487 63.7979 74.9292 63.7979Z",fill:"black"}),t.createElement("path",{d:"M75.4507 73.7815C75.8312 73.7815 76.1397 73.4716 76.1397 73.0892C76.1397 72.7068 75.8312 72.3969 75.4507 72.3969C75.0702 72.3969 74.7617 72.7068 74.7617 73.0892C74.7617 73.4716 75.0702 73.7815 75.4507 73.7815Z",fill:"black"}),t.createElement("path",{d:"M75.9766 83.7691C76.3571 83.7691 76.6656 83.4591 76.6656 83.0767C76.6656 82.6944 76.3571 82.3844 75.9766 82.3844C75.5961 82.3844 75.2876 82.6944 75.2876 83.0767C75.2876 83.4591 75.5961 83.7691 75.9766 83.7691Z",fill:"black"}),t.createElement("path",{d:"M76.4986 93.7526C76.8791 93.7526 77.1876 93.4426 77.1876 93.0603C77.1876 92.6779 76.8791 92.3679 76.4986 92.3679C76.118 92.3679 75.8096 92.6779 75.8096 93.0603C75.8096 93.4426 76.118 93.7526 76.4986 93.7526Z",fill:"#001065"}),t.createElement("path",{d:"M142.76 74.9326L141.032 85.7437L136.135 85.7519L138.068 74.0232L142.76 74.9326Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M57.3659 101.889L47.7933 107.132L44.6582 103.036C47.1655 101.397 54.3449 96.8089 54.7689 96.6819L57.3659 101.889Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M35.9829 66.9195L40.231 67.4848V67.0629L35.9829 66.4976V66.9195Z",fill:"#251138"}),t.createElement("path",{d:"M102.222 66.5607L97.7969 71.0072L98.0938 71.3056L102.519 66.859L102.222 66.5607Z",fill:"#251138"}),t.createElement("path",{d:"M93.8744 83.7692L88.9658 84.8548L81.0566 34.7405L87.5633 33.0896L90.6618 36.7602L93.8744 83.7692Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M47.8725 59.6533L47.3169 82.8295L47.8793 82.8431L48.435 59.6669L47.8725 59.6533Z",fill:"#251138"}),t.createElement("path",{d:"M95.7976 85.5249L95.3252 85.5464L95.7806 95.663L96.2531 95.6415L95.7976 85.5249Z",fill:"#251138"}),t.createElement("circle",{cx:"137.5",cy:"37.3126",r:"23.2143",fill:"#B4DD64"}),t.createElement("path",{d:"M136.527 50.5319C136.019 50.5481 135.512 50.4482 135.037 50.2384C134.561 50.0286 134.127 49.7131 133.759 49.3109L125.266 38.96C124.907 38.5683 124.62 38.1019 124.42 37.5873C124.22 37.0728 124.111 36.5202 124.099 35.9611C124.088 35.402 124.175 34.8474 124.354 34.3289C124.533 33.8104 124.802 33.3382 125.144 32.9392C125.487 32.5402 125.896 32.2223 126.35 32.0036C126.804 31.7849 127.292 31.6697 127.788 31.6646C128.284 31.6594 128.777 31.7644 129.239 31.9736C129.701 32.1828 130.124 32.4921 130.482 32.8838L136.415 40.4491L164.73 11.5998C165.476 10.9084 166.433 10.5711 167.403 10.6581C168.372 10.7451 169.28 11.2496 169.937 12.0668C170.595 12.884 170.951 13.9511 170.932 15.0463C170.913 16.1416 170.52 17.1807 169.836 17.9479L138.911 49.4528C138.258 50.1197 137.414 50.5019 136.527 50.5319Z",fill:"#128749"})),C=({question:e,formValues:n,onChangeHandler:r,autoFocusInput:o})=>{switch(e.type_info.question_type){case"RANGE":return t.createElement(a,{type_info:e.type_info,onChangeHandler:r,npsValue:n[e.name]});case"CHECKBOX":case"MULTI_SELECT":return t.createElement(m,{autoFocusGroup:o,values:n[e.name],options:e.type_info.choices,onChangeHandler:r,othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired});case"RADIO":case"DROPDOWN":return t.createElement(h,{autoFocusGroup:o,name:e.name,onChangeHandler:r,options:e.type_info.choices,value:n[e.name],othersOption:e.type_info.meta?.othersOption,othersRequired:e.type_info.meta?.othersRequired});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(u,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:e.is_required,value:n[e.name]||"",placeholder:e.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),t.createElement(d,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,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(d,{autoFocusInput:o,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}};o(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #000;\n --default-question-background-color: #fff;\n --default-background-color: #ebeff3;\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-step-navigation {\n box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.1);\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 32px;\n text-align: -webkit-center;\n height: 32px;\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 #d9d9d9;\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\n.freemium-survey-components .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: 0 1px 3px 0 rgba(18, 52, 77, 0.2);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n}\n.freemium-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 color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-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}\n@-webkit-keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.freemium-survey-components .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 .question-footer:empty {\n display: none;\n}\n.freemium-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components .skip-button {\n font-weight: 400;\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}\n.freemium-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n}\n.freemium-survey-components .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 .submit {\n max-width: 700px;\n margin: 0 auto;\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 .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.freemium-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 1.2rem;\n line-height: 2;\n color: #12344d;\n}\n.freemium-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-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 .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container,\n.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container,\n.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components,\ndiv.card-survey-style {\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\n}\ndiv.widget-survey-components .questions,\ndiv.card-survey-style .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n position: relative;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text,\ndiv.card-survey-style .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container,\ndiv.card-survey-style .question-container {\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .question-footer,\ndiv.card-survey-style .question-footer {\n margin: 0px auto;\n justify-content: space-between;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n padding-bottom: 20px;\n}\ndiv.widget-survey-components .submit,\ndiv.card-survey-style .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer,\ndiv.card-survey-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices,\ndiv.card-survey-style .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group,\ndiv.card-survey-style .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group,\ndiv.card-survey-style .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou,\ndiv.card-survey-style div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components div.thankyou svg,\ndiv.card-survey-style div.thankyou svg {\n width: 140px;\n height: 120px;\n}\n\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n border-radius: 0;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 3px 0 0 0;\n}\ndiv.widget-survey-components .textarea-container .end-max-length {\n padding: 4px;\n}\ndiv.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\ndiv.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n\ndiv.widget-survey-components.default-style .freemium-survey-step-navigation {\n margin: 0;\n}\ndiv.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\ndiv.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\ndiv.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\ndiv.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\ndiv.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\ndiv.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\ndiv.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\n\n.widget-survey-components.cozy-style .freemium-survey-step-navigation {\n margin: 0;\n}\n.widget-survey-components.cozy-style .questions {\n max-height: 380px;\n max-height: var(--cozy-widget-max-height);\n}\n.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n}\n.widget-survey-components.cozy-style .question-text.nps {\n text-align: center;\n width: 60%;\n min-width: 600px;\n margin: auto;\n}\n.widget-survey-components.cozy-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.widget-survey-components.cozy-style .nps-container {\n grid-gap: 44px;\n gap: 44px;\n}\n.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}");const w=["RANGE","NPS","RADIO","DROPDOWN"],k=200,E=({thankYouQuestion:e,preview:r})=>(n.useEffect((()=>{r||e.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=e.type_info.meta?.redirectUrl}),1e4)}),[]),t.createElement("div",{className:"question-container thankyou"},t.createElement(g,null),t.createElement("div",{className:"text"},e.text),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 10 seconds.",t.createElement("br",null)),t.createElement("a",{className:"link",href:e.type_info.meta?.redirectUrl},e?.type_info.meta?.redirectUrl)))),L=()=>t.createElement("svg",{style:{display:"block"},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"})),q=()=>t.createElement("svg",{style:{display:"block"},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"})),_=({currentBlockIndex:e,currentBlockIndexOfBlocksWithQns:n,blocksWithQns:r,blocks:o,setHorizontalScrollUnits:a})=>t.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},t.createElement("button",{disabled:0==n.current,className:"navigation-button",onClick:()=>{n.current=Math.max(n.current-1,0),e.current=o.findIndex((e=>e.name===r[n.current].name)),a(n.current)}},t.createElement(q,null)),t.createElement("button",{className:"navigation-button",disabled:n.current>=r.length-1,onClick:()=>{n.current=Math.min(n.current+1,r.length-1),e.current=o.findIndex((e=>e.name===r[n.current].name)),a(n.current)}},t.createElement(L,null))),N=({widget:e,widgetStyle:n,surveyStyle:r,formValues:o,blocksWithQns:a,blocks:s,thankYouQuestion:i,currentBlockIndexOfBlocksWithQns:c,currentBlockIndexOfBlocks:l,currentEditingBlock:u,isSubmitting:d,isValuesCommitted:p,isCurrentBlockFinal:m,setHorizontalScrollUnits:f,handleFormValues:h,skipBlock:v,setIsSubmitting:x,onSubmit:b,setIsSurveyCompleted:g,...C})=>{const k=C.blockIndex??c.current,E=C.question??a[k].question,L=()=>E.name===u.current.question.name&&!w.includes(E.type_info.question_type)&&!m(),q=()=>"RANGE"!==E.type_info.question_type&&!E.required&&E.name===u.current.question.name&&!m(),N=()=>"DROPDOWN"===E.type_info.question_type&&E.name!==u.current.question.name&&!E.required&&null!=o[E.name],S=()=>m()&&(e||"classic"!==r)&&E.name===u.current.question.name;return t.createElement("div",{className:"question-footer"},!(!e&&"classic"===r||0===k&&!o[E.name]||"compact"===n)&&t.createElement(_,{currentBlockIndex:l,currentBlockIndexOfBlocksWithQns:c,blocksWithQns:a,blocks:s,setHorizontalScrollUnits:f}),(L()||N()||q()||S())&&t.createElement("div",{className:"action-buttons"},L()&&t.createElement(y,{onClick:()=>{h(a[k],null,!0)},disabled:!o[u.current.question.name]||Array.isArray(o[u.current.question.name])&&0===o[u.current.question.name].length,className:"next-button"},"Next"),q()&&t.createElement("button",{className:"skip-button",onClick:()=>v(E)},"Skip"),N()&&t.createElement("button",{className:"skip-button",onClick:()=>{u.current=a[k],l.current=s.findIndex((e=>e.name===a[k].name)),v(E)}},"Clear selection"),S()&&t.createElement("div",{className:"submit"},t.createElement(y,{disabled:(u.current.question.required||u.current.question.type_info.pivot_question)&&void 0===o[u.current.question.name]||d,onClick:()=>{x(!0),b(o,(()=>{i?.type_info.meta?.skipThankYouPage||g(!0)}))}},d?"Submitting":"Submit Survey"))))},S=({survey:e,surveyStyle:o="classic",placeholders:a,onSubmit:s,widget:i,npsValue:c,widgetStyle:l,widgetNavigatorQuerySelector:u,preview:d,mobilePreview:p})=>{const{meta:{blocks:m},question_details:{questions:f}}=e,[h,v]=n.useState(null),[b,g]=n.useState({}),[L,q]=n.useState(!1),[S,z]=n.useState([]),[M,Z]=n.useState(0),[I,R]=n.useState(!1),[B,F]=n.useState(null),O=n.useRef(null),D=n.useRef(null),H=n.useRef(-1),$=n.useRef(null),T=n.useRef(0),A=n.useRef(0),V=n.useRef(!1),j=n.useRef([]),Q=n.useRef(null),U=n.useRef([]);n.useEffect((()=>{m&&(Q.current=m.find((e=>"TY"===e.name)),v(m.filter((e=>"TY"!==e.name))))}),[m]),n.useEffect((()=>{if(h)if(D.current=f.find((e=>e.pivot_question))??f.find((e=>"RANGE"===e.type_info.question_type))??f[0],null!=c){H.current=c;const e=f.find((e=>e.name===h[0].question_names[0]));O.current={...h[0],question:e},j.current=[...j.current,{...h[0],question:e}],z(j.current),g({Q_1:c})}else if(!O.current&&h.length>0)return O.current=h[0],void W(h[0])}),[h,c]),t.useEffect((()=>{i||"classic"!==o||$.current?.scrollIntoView({block:"center",behavior:"smooth"}),S.length&&(j.current=S,A.current=S.length-1),$.current&&($.current.style.maxHeight="unset"),U.current[T.current]=$.current?.scrollHeight||U.current[T.current]||0,Z(S.length-1),$.current&&($.current.style.maxHeight="100%")}),[S]),n.useEffect((()=>{Object.keys(b).length>0&&O.current.question&&(w.includes(O.current.question.type_info.question_type)||V.current)&&!P()&&G()}),[b]),n.useEffect((()=>{if(null!=b?.[D.current?.name])if(Q.current?.is_based_on_score){const e=D.current?.type_info?.choices[b?.[D.current?.name]]?.dependent_question_names,n=Q.current?.question_names.find((n=>e?.includes(n))),t=f.find((e=>e.name===n));F(t)}else{const e=f.find((e=>e.name==Q.current?.question_names[0]));F(e)}}),[b?.[D.current?.name]]);const P=()=>T.current===h.length-1||"end"===O.current.branchOption,Y=e=>{if(e){let n={"{{nps.score}}":H.current};a&&(n={...n,...a});const t=new RegExp(Object.keys(n).join("|"),"gi");e=e.replace(t,(function(e){return n[e.toLowerCase()]}))}return e},W=e=>{let n={};if(e.is_based_on_score){const t=D.current?.type_info?.choices[b?.[D.current?.name]]?.dependent_question_names,r=e.question_names.find((e=>t?.includes(e)));n=f.find((e=>e.name===r))}else n=f.find((n=>n.name===e.question_names[0]));O.current.question=n;const t=j.current.find((e=>e.question.name===n.name));z(t?[...j.current]:[...j.current,{...e,question:n}])},G=()=>{if(P())q(!0);else{if(O.current.nextBlock)T.current=h.findIndex((e=>e.name===O.current.nextBlock));else if(O.current.question.type_info?.meta?.branches){const e=O.current.question.type_info?.meta?.branches,n=b[O.current.question.name];let t;if(t="RANGE"===O.current.question.type_info.question_type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock){if("TY"===t.nextBlock)return void q(!0);T.current=h.findIndex((e=>e.name===t.nextBlock))}else T.current+=1}else T.current+=1;O.current=h[T.current],W(h[T.current])}},X=e=>{V.current=!0,delete b[e.name],g({...b})},J=(e,n,t)=>{if(t){if(V.current=!0,null!=b[e.question.name]&&e.name!==S[S.length-1].name){const[t,r]=(e=>{const n=S.findIndex((n=>n.name===e.name)),t=S.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=b[n.question.name],e)),{});return T.current=h.findIndex((n=>n.name===e.name)),[t,r]})(e);g({...r,...null!=n&&{[e.question.name]:n}}),j.current=t}else g({...b,...null!=n&&{[e.question.name]:n}});D?.current?.name==e?.question?.name&&(H.current=n)}else g({...b,...null!=n&&{[e.question.name]:n}})};return O.current&&O.current.question?L?t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style`},t.createElement(E,{thankYouQuestion:B,preview:d})):t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style ${p?"mobile-preview":""} ${o}-survey-style`},t.createElement(x,{totalSteps:h.length,completedSteps:T.current}),i&&"compact"===l&&document.querySelector(u)&&t.createElement(t.Fragment,null,r.createPortal(t.createElement(_,{currentBlockIndex:T,currentBlockIndexOfBlocksWithQns:A,blocksWithQns:S,setHorizontalScrollUnits:Z}),document.querySelector(u))),t.createElement("div",{style:i||"card"===o?{transform:`translateX(calc(-${M} * 100%))`,height:`${U.current[T.current]}px`,transition:S?.length>1?`all ${k}ms ease-out 0ms`:`transform ${k}ms ease-out 0ms`}:{},className:"questions"},S.map(((e,n)=>t.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(i||"card"===o)&&A.current!==n?0:1},ref:$,id:e.question.name,key:e.question.name},t.createElement("div",{className:"question-text "+(0===n?"nps":""),dangerouslySetInnerHTML:{__html:Y(e.question.text)},title:`question-${n}`,role:"heading","aria-level":1}),t.createElement(C,{question:e.question,formValues:b,autoFocusInput:O.current.name===e.name,onChangeHandler:n=>{V.current=!1,T.current=h.findIndex((n=>n.name===e.name)),O.current=e,J(e,n,w.includes(e.question.type_info.question_type)&&!P())}}),("classic"===o||i)&&t.createElement(N,{question:e.question,blockIndex:n,widget:i,widgetStyle:l,surveyStyle:o,formValues:b,blocksWithQns:S,blocks:h,thankYouQuestion:B,currentBlockIndexOfBlocksWithQns:A,currentBlockIndexOfBlocks:T,currentEditingBlock:O,isSubmitting:I,isValuesCommitted:V,isCurrentBlockFinal:P,setHorizontalScrollUnits:Z,handleFormValues:J,skipBlock:X,setIsSubmitting:R,onSubmit:s,setIsSurveyCompleted:q})))),!i&&"card"!==o&&P()&&t.createElement("div",{className:"submit"},t.createElement(y,{disabled:O.current.question.required&&void 0===b[O.current.question.name]||I,onClick:()=>{R(!0),s(b,(()=>{d||B?.type_info.meta?.skipThankYouPage&&(window.location.href=B?.type_info.meta?.redirectUrl),B?.type_info.meta?.skipThankYouPage||q(!0)}))}},I?"Submitting Survey":"Submit Survey"))),S.length&&"card"===o&&!i&&t.createElement(t.Fragment,null,t.createElement(N,{widget:i,widgetStyle:l,surveyStyle:o,formValues:b,blocksWithQns:S,blocks:h,thankYouQuestion:B,currentBlockIndexOfBlocksWithQns:A,currentBlockIndexOfBlocks:T,currentEditingBlock:O,isSubmitting:I,isValuesCommitted:V,isCurrentBlockFinal:P,setHorizontalScrollUnits:Z,handleFormValues:J,skipBlock:X,setIsSubmitting:R,onSubmit:s,setIsSurveyCompleted:q}))):null};exports.AUTO_REDIRECT_DELAY=1e4,exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=y,exports.CheckboxGroup=m,exports.Input=u,exports.NPS=a,exports.ProgressBar=x,exports.Radio=v,exports.RadioGroup=h,exports.Survey=e=>{const{survey:n}=e,r=JSON.parse(JSON.stringify(n)),o=[],{question_details:{questions:a}}=r;a.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),o.push(n))}));const s={...r,meta:{...r.meta,blocks:o}};return t.createElement(S,Object.assign({},e,{survey:s}))},exports.TRANSITION_DELAY=k,exports.TextArea=d;
|
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useRef as n,forwardRef as t,useEffect as r,useState as o}from"react";import a from"react-dom";function i(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}i(".freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 52px;\n gap: 52px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--default-background-color);\n border-top: 1px solid var(--background-color, var(--default-background-color));\n padding-top: 20px;\n margin-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n display: flex;\n border-radius: 4px;\n justify-content: space-between;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n position: absolute;\n color: #475867;\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 position: absolute;\n color: #475867;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\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}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, color 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 .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n color: #000;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice.active,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .button-container,\n.card-survey-style .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n.card-survey-style .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .nps-scale .button-container {\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: #ebeff3;\n}");const s=t=>{const{type_info:{linear_scale:{button_style:r="highlighted",button_shape:o="rounded"}={},score_presets:{start:a="Very unlikely",end:i="Very likely"}={},validation:{min:s},footer_text:c}}=t,l=e=>{switch(e){case e<=6:return"detractor";case e<=8:return"passive";default:return"promoter"}},u=n(Array.from({length:10+(0===s?1:0)},((e,n)=>n+s)));return e.createElement("div",{className:"nps-container","data-test-input":"nps"},e.createElement("div",{className:`nps-scale ${o} ${r}`},e.createElement("div",{className:"button-container"},e.createElement("span",{className:"negative-text",role:"note"},`${s} - ${a}`),e.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${i}`),e.createElement("div",{className:"choices",role:"radiogroup","aria-required":!0},u.current.map((n=>e.createElement("button",{role:"radio","aria-checked":t.npsValue===n,key:n,"data-test-nps-choice":n,onClick:e=>{t.onChangeHandler(n)},className:`choice ${l(n)} ${t.npsValue===n&&"active"}`},n)))))),e.createElement("div",{className:"footer",role:"note"},c))},c=(e,n)=>(e.defaultProps=n,e);i('.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 .end-max-length {\n padding: 0 8px;\n font-size: 0.85rem;\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 /* 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]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]:-ms-input-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 /* 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:-ms-input-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 l={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocusInput:!0},u=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocusInput&&setTimeout((()=>{a.current?.focus()}),q+20)}),[t.autoFocusInput]);const{inputStyle:i,style:s,className:c,showCount:l,isErrored:u,startLabel:d,isRequired:p,errorText:m,endLabel:f,maxLength:h,autoFocusInput:v,...b}=t;return e.createElement("div",{className:"input-container",style:s},t.label&&e.createElement("label",{className:"input-label "+(p?"required":"")},t.label),e.createElement("div",null,d&&e.createElement("div",{className:"start-label"},d),e.createElement("div",{className:`input-basic ${u?"error":""}${c||""}`},e.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:a,style:i},b)),l&&h>0&&e.createElement("div",{className:"end-max-length"},`${t.value&&t.value.length||0}/${t.maxLength}`)),f&&e.createElement("div",{className:"end-label"},f)),u&&m&&e.createElement("span",{className:"input-error"},t.errorText))})),d=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocusInput&&setTimeout((()=>{a.current?.focus()}),q+20)}),[]);const{inputStyle:i,style:s,className:c,showCount:l,maxLength:u,isErrored:d,startLabel:p,isRequired:m,autoFocusInput:f,...h}=t;return e.createElement(e.Fragment,null,e.createElement("div",{className:"textarea-container",style:s},t.label&&e.createElement("label",{className:"input-label "+(m?"required":"")},t.label),p&&e.createElement("div",{className:"start-label"},p),e.createElement("div",{className:`input-basic ${d?"error":""} ${c||""}`},e.createElement("textarea",Object.assign({autoComplete:"off",ref:a,style:i},h)),l&&u&&u>0&&e.createElement("div",{className:"end-max-length"},`${t.value&&t.value.length||0}/${t.maxLength}`)),t.endLabel&&e.createElement("div",{className:"end-label"},t.endLabel)),t.isErrored&&t.errorText&&e.createElement("span",{className:"input-error"},t.errorText))})),p=c(u,l),m=c(d,l);i('.freemium-survey-components .checkbox-group {\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover .checkbox {\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 .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 f=()=>e.createElement("svg",{id:"tick",className:"tick-icon",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"title",viewBox:"0 0 10 10"},e.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"})),h=({values:t=[],options:a,autoFocusGroup:i,onChangeHandler:s,othersOption:c,othersRequired:l})=>{const u=(()=>{let e=-1;return t.map(((n,t)=>{const r=a.find((e=>e.value===n));return r||(e=t),r})),e})(),[d,m]=o(!1),f=n(null);return r((()=>{i&&setTimeout((()=>{f.current?.focus()}),q+20)}),[]),e.createElement("div",{className:"checkbox-group"},e.createElement("button",{ref:f,className:"autofocus-button","aria-hidden":!0}),a?.map(((n,r)=>e.createElement(v,{key:n.value,checked:t?.includes(n.value),name:n.value,id:n.value,onChange:(e,r)=>{if(r)s([...t||[],n.value]);else{const e=t.indexOf(n.value);e>-1&&t.splice(e,1),s([...t])}}},n.value))),c&&e.createElement(v,{key:"others",checked:d,name:"others",id:"others",onChange:(e,n)=>{m(n)}},"Others"),d&&e.createElement(e.Fragment,null,e.createElement(p,{placeholder:"Enter your comment",value:t[u],onChange:e=>{-1!==u?(t[u]=e.target.value,s(t)):s(t.concat(e.target.value))},label:""})))},v=c((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),q+20)}),[]),e.createElement("label",{className:`checkbox-label ${t.disabled&&"disabled"}`},e.createElement("input",{ref:o,id:t.id,type:"checkbox",name:t.name,readOnly:t.readOnly,disabled:t.disabled,"aria-disabled":t.disabled,checked:t.checked,onChange:t.readOnly?()=>{}:e=>t.onChange(e,e.target.checked)}),e.createElement("div",{className:"checkbox"},t.checked&&e.createElement("div",{className:"icon-container"},e.createElement(f,null)," ")),e.createElement("div",null,t.children))}),{checked:!1});i('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\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 .radio {\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}');const b=({name:t,options:a,value:i,autoFocusGroup:s,onChangeHandler:c,othersOption:l,othersRequired:u})=>{const[d,m]=o(""),[f,h]=o(""),v=n(null);return r((()=>{s&&setTimeout((()=>{v.current?.focus()}),q+20)}),[]),r((()=>{i||(h(""),m(""))}),[i]),r((()=>{f&&a.find((e=>e.value===f))&&c(f)}),[f]),e.createElement("div",{className:"radio-group",role:"radiogroup"},e.createElement("button",{ref:v,className:"autofocus-button","aria-hidden":!0,tabIndex:-1}),a?.map(((n,r)=>e.createElement(x,{key:n.value,value:n.value,name:t,onChange:e=>{h(e.currentTarget.value)},checked:f===n.value},n.value))),l&&e.createElement(x,{key:"others",value:"others",name:t,onChange:e=>{h("others")},checked:"others"===f},"Others"),"others"===f&&e.createElement(e.Fragment,null,e.createElement(p,{value:d,onChange:e=>m(e.target.value),placeholder:"Enter your comment",label:""}),d!==i&&e.createElement(w,{disabled:u&&0===d.length,onClick:()=>c(d)},"Next")))},x=c((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),q+20)}),[]),e.createElement("label",{className:"radio-label"},e.createElement("input",{ref:o,type:"radio",name:t.name,value:t.value,checked:t.checked,onChange:t.onChange}),e.createElement("div",{className:"radio"}),e.createElement("div",null,t.children))}),{checked:!1,autoFocus:!1});i(".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}\n\n.progressbar {\n transition: transform 0.25s linear;\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 y=n=>{const{totalSteps:t,completedSteps:r}=n;return e.createElement("div",{className:"progressbar-container"},e.createElement("div",{className:"progressbar",style:{width:(r>0?100/t:0)+"%",transform:`scaleX(${r})`}}))};i(".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: 500;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 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 g=()=>e.createElement(e.Fragment,null,"..."),C={LARGE:"large",MINI:"mini",NORMAL:"normal"},w=n=>{const{inline:t=!1,children:r,disabled:o,className:a="",htmlType:i,type:s="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:d=!1,...p}=n;return e.createElement("button",Object.assign({style:t?{display:"inline-block"}:{},disabled:o,className:`action-button ${a} ${u}`,type:i,onClick:c},p),d?e.createElement(g,null):r)},k=()=>e.createElement("svg",{width:"200",height:"139",viewBox:"0 0 200 139",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M190.697 136.825C186.261 131.331 179.073 124.281 168.747 121.667C154.73 118.111 148.472 126.141 131.704 124.424C113.961 122.609 114.198 112.925 98.779 112.02C80.2862 110.93 78.3089 124.764 56.2489 125.805C40.6303 126.538 34.572 119.938 21.95 124.424C13.4252 127.456 7.68088 133.49 4.11768 138.209L190.697 136.825Z",fill:"#F4F4F4"}),e.createElement("path",{d:"M144.95 136.825H148.489C150.749 134.074 152.86 131.202 154.812 128.222C156.907 124.887 157.16 123.408 156.638 122.835C155.701 121.79 152.011 123.498 149.854 125.203C147.783 126.882 146.292 129.176 145.594 131.757C145.119 133.403 144.902 135.112 144.95 136.825Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M146.634 137.128C146.705 137.128 146.773 137.104 146.828 137.059C146.883 137.014 146.921 136.952 146.935 136.882C147.456 134.085 148.604 131.445 150.291 129.16C151.403 127.668 152.733 126.355 154.237 125.264C154.298 125.217 154.34 125.149 154.353 125.073C154.366 124.997 154.349 124.919 154.306 124.854C154.26 124.793 154.192 124.753 154.116 124.74C154.041 124.727 153.963 124.743 153.899 124.785C152.346 125.912 150.971 127.268 149.822 128.808C148.08 131.168 146.895 133.895 146.357 136.784C146.342 136.863 146.359 136.945 146.404 137.011C146.449 137.078 146.518 137.124 146.597 137.14L146.634 137.128Z",fill:"#30354F"}),e.createElement("path",{d:"M141.778 136.866C135.067 117.366 135.035 111.676 136.771 110.758C138.655 109.762 143.025 114.125 145.21 117.681C150.4 126.128 146.674 135.596 146.16 136.845L141.778 136.866Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M143.726 136.628C143.797 136.628 143.866 136.603 143.92 136.558C143.975 136.512 144.012 136.448 144.024 136.378C144.829 131.888 144.574 127.27 143.282 122.896C142.449 120.118 141.201 117.482 139.58 115.08C139.559 115.044 139.53 115.013 139.497 114.989C139.463 114.964 139.425 114.947 139.384 114.938C139.343 114.929 139.301 114.928 139.261 114.936C139.22 114.944 139.181 114.96 139.146 114.984C139.112 115.007 139.083 115.037 139.06 115.072C139.038 115.108 139.023 115.147 139.016 115.188C139.01 115.229 139.011 115.272 139.021 115.312C139.031 115.353 139.049 115.391 139.075 115.424C140.661 117.775 141.883 120.353 142.699 123.072C143.964 127.353 144.212 131.873 143.425 136.268C143.41 136.348 143.428 136.43 143.474 136.497C143.52 136.563 143.59 136.609 143.669 136.624L143.726 136.628Z",fill:"#30354F"}),e.createElement("path",{d:"M21.7544 136.825H26.9606C31.3677 131.303 34.3438 127.206 36.264 124.142C39.3503 119.226 39.7212 117.054 38.9589 116.206C37.5727 114.67 32.1423 117.186 28.9705 119.697C25.9224 122.173 23.7284 125.552 22.7002 129.353C22.0003 131.779 21.6812 134.3 21.7544 136.825Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M24.2127 137.128C24.2836 137.128 24.3524 137.104 24.4074 137.059C24.4624 137.014 24.5003 136.952 24.5144 136.882C25.2854 132.744 26.9835 128.837 29.4801 125.457C31.1256 123.25 33.0955 121.308 35.3223 119.697C35.3549 119.673 35.3826 119.643 35.4038 119.609C35.4249 119.574 35.4391 119.536 35.4456 119.496C35.452 119.456 35.4506 119.415 35.4413 119.376C35.432 119.337 35.4151 119.299 35.3916 119.267C35.368 119.234 35.3383 119.206 35.304 119.185C35.2697 119.163 35.2316 119.149 35.1919 119.143C35.1521 119.136 35.1115 119.138 35.0723 119.147C35.0331 119.156 34.9962 119.173 34.9635 119.197C32.6895 120.847 30.6772 122.833 28.9949 125.088C26.4416 128.543 24.7044 132.537 23.9151 136.767C23.9007 136.847 23.9179 136.928 23.9629 136.995C24.0078 137.062 24.0771 137.108 24.1557 137.124L24.2127 137.128Z",fill:"#30354F"}),e.createElement("path",{d:"M17.0659 136.886C7.18764 108.181 7.15095 99.8075 9.699 98.4556C12.4672 96.9931 18.9005 103.413 22.1172 108.648C29.7573 121.081 24.2739 135.014 23.5156 136.853L17.0659 136.886Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M19.9316 136.387C20.0025 136.387 20.0712 136.362 20.1256 136.316C20.1801 136.27 20.2167 136.207 20.2292 136.137C21.4098 129.549 21.0384 122.775 19.1447 116.358C17.9218 112.28 16.0894 108.412 13.7102 104.887C13.6629 104.825 13.5935 104.783 13.5164 104.77C13.4392 104.758 13.3601 104.775 13.2954 104.819C13.2307 104.863 13.1852 104.93 13.1683 105.007C13.1515 105.084 13.1645 105.164 13.2047 105.232C15.5538 108.71 17.3616 112.529 18.5658 116.555C20.4317 122.878 20.7975 129.552 19.634 136.042C19.6269 136.082 19.6278 136.123 19.6365 136.163C19.6452 136.202 19.6616 136.239 19.6847 136.273C19.7078 136.306 19.7371 136.334 19.7711 136.356C19.8051 136.377 19.843 136.392 19.8826 136.399L19.9316 136.387Z",fill:"#30354F"}),e.createElement("path",{d:"M182.865 94.6252L175.478 93.6133C175.004 93.5534 174.555 93.3671 174.177 93.0739C173.8 92.7807 173.507 92.3913 173.329 91.946C173.161 91.5192 173.11 91.0548 173.182 90.6015C173.254 90.1482 173.445 89.7225 173.737 89.3692L178.344 83.6544C178.642 83.2834 179.033 82.9978 179.475 82.8259C179.918 82.6541 180.398 82.6021 180.867 82.6752C181.332 82.7383 181.771 82.9229 182.142 83.2105C182.512 83.4982 182.801 83.8787 182.979 84.3139L185.768 91.0488C185.943 91.4689 186.003 91.9283 185.943 92.3798C185.883 92.8312 185.704 93.2584 185.425 93.6174C185.172 93.9482 184.846 94.2157 184.472 94.3991C184.099 94.5824 183.688 94.6766 183.273 94.6743C183.136 94.6669 183 94.6505 182.865 94.6252ZM178.739 83.9739L174.132 89.6887C173.903 89.9709 173.752 90.3094 173.697 90.6695C173.641 91.0295 173.681 91.3981 173.814 91.7371C173.957 92.0943 174.192 92.4067 174.495 92.6416C174.798 92.8765 175.159 93.0253 175.539 93.0726L182.934 94.0926C183.316 94.1494 183.706 94.1034 184.064 93.9595C184.422 93.8155 184.736 93.5788 184.973 93.2733C185.199 92.9886 185.343 92.6478 185.391 92.2871C185.439 91.9264 185.389 91.5593 185.246 91.225L182.457 84.4901C182.313 84.143 182.08 83.8401 181.782 83.6116C181.485 83.383 181.133 83.2367 180.761 83.1873C180.651 83.1711 180.539 83.1629 180.427 83.1627C180.104 83.165 179.786 83.2397 179.495 83.3815C179.204 83.5232 178.949 83.7284 178.747 83.9821L178.739 83.9739Z",fill:"#ECEDF0"}),e.createElement("path",{d:"M1.22812e-05 137.513C-0.00052885 137.603 0.0168174 137.693 0.0510461 137.777C0.0852748 137.861 0.135705 137.937 0.199414 138.001C0.263122 138.065 0.338842 138.116 0.422184 138.15C0.505527 138.184 0.594834 138.202 0.68493 138.201H199.315C199.497 138.201 199.671 138.129 199.799 138C199.928 137.871 200 137.695 200 137.513C200 137.33 199.928 137.155 199.799 137.026C199.671 136.897 199.497 136.825 199.315 136.825H0.68493C0.594985 136.825 0.505921 136.843 0.422823 136.877C0.339725 136.912 0.26422 136.962 0.20062 137.026C0.13702 137.09 0.0865687 137.166 0.0521484 137.25C0.017728 137.333 1.22812e-05 137.423 1.22812e-05 137.513Z",fill:"#5F6386"}),e.createElement("path",{d:"M51.2017 57.6777L41.0829 66.7886L40.1737 67.4604L40.7282 68.5829L54.7568 96.6614L57.3578 101.889L47.7934 107.132L44.6583 103.036L20.4416 71.5161C19.6508 70.4576 19.0809 69.2495 18.766 67.9643C18.5747 67.1594 18.4829 66.3339 18.4928 65.5064C18.4633 64.2632 18.6855 63.027 19.1459 61.8727C19.6063 60.7185 20.2954 59.6704 21.1714 58.7919L47.8261 32.8233C47.8261 32.8233 65.9927 19.6853 90.9432 32.7577",fill:"#D0D3D9"}),e.createElement("path",{d:"M47.7158 107.476L44.4258 103.191L20.2172 71.6881C18.8837 69.9133 18.1778 67.7421 18.2114 65.5186C18.1798 64.2337 18.4082 62.9558 18.8826 61.7622C19.3571 60.5686 20.0677 59.4842 20.9714 58.5747L47.6628 32.5733C47.7077 32.5405 52.339 29.2345 59.971 27.5918C67.0036 26.076 78.109 25.695 91.0736 32.4832L90.8167 32.9871C66.6163 20.3079 48.6372 32.5774 48.0094 33.0239L21.3669 58.9762C20.5147 59.8348 19.8453 60.8587 19.3995 61.9855C18.9537 63.1124 18.7409 64.3187 18.774 65.5309C18.7633 66.3336 18.8523 67.1345 19.039 67.9151C19.3443 69.1628 19.8991 70.3351 20.6697 71.3604L47.8748 106.764L56.9989 101.786L54.5161 96.8006L39.8393 67.3948L40.9278 66.5755L51.0303 57.4768L51.4054 57.8865L41.2703 66.9852L40.5364 67.53L40.989 68.4395L55.0135 96.5179L57.7409 101.991L47.7158 107.476Z",fill:"#251138"}),e.createElement("path",{d:"M99.093 138.054H75.2758C72.9846 127.403 73.3067 132.757 72.7522 121.217C72.5892 117.819 72.4138 114.46 72.2263 111.139C72.2263 111 72.2263 110.856 72.2263 110.729C72.0592 107.804 71.892 104.908 71.7126 102.069C71.6719 101.459 71.6352 100.84 71.5944 100.234C71.5699 99.8239 71.5414 99.4143 71.5169 99.0292C71.4639 98.1771 71.4069 97.3332 71.3457 96.4893L72.6666 96.4483L73.4086 96.4237H73.8163L92.2683 95.8256H92.6964L96.0272 95.6617V95.6863C96.4349 102.143 96.7284 109.406 96.92 117.165V117.284C97.2095 129.373 99.2887 124.646 99.093 138.054Z",fill:"#5D6476"}),e.createElement("path",{d:"M73.1636 93.2037C72.9964 94.2566 72.8293 95.3258 72.6499 96.4196C72.5194 97.2389 72.3808 98.0378 72.2422 98.8776C72.1607 99.3528 72.0791 99.828 71.9935 100.311C71.8916 100.885 71.7978 101.471 71.6918 102.052C70.6481 108.021 69.421 114.441 68.0511 121.151C65.7844 132.286 68.9032 128.218 63.5666 138.05H39.0645C41.743 124.531 41.9183 131.36 44.079 118.951C44.1035 118.8 44.128 118.648 44.1565 118.501C44.8944 114.269 45.6242 109.898 46.3662 105.24L46.4273 104.875C46.6189 103.646 47.7686 102.606 49.1588 101.598C49.9253 101.053 50.7692 100.52 51.5642 99.9837L51.7844 99.8321C51.9597 99.7133 52.1309 99.5904 52.298 99.4716C53.4966 98.6031 54.4914 97.7141 54.789 96.7064C54.8189 96.6045 54.8408 96.5004 54.8542 96.395L54.6056 95.6617L54.2957 94.7277L73.1636 93.2037Z",fill:"#5D6476"}),e.createElement("path",{d:"M84.3548 121.372L63 121.09L69.095 99.4388L79.226 97.6486L84.3548 121.372Z",fill:"#5D6476"}),e.createElement("path",{d:"M70.9498 111.29L76.9673 110.59L74.7902 96.5465L74.3744 96.612L76.4821 110.221L70.9009 110.873L70.9498 111.29Z",fill:"#251138"}),e.createElement("path",{d:"M96.7077 117.554L96.9767 117.226L94.2534 114.957L92.6797 95.7517L92.2598 95.7886L93.8457 115.17L96.7077 117.554Z",fill:"#251138"}),e.createElement("path",{d:"M44.0753 118.98L48.1848 117.509L52.4125 98.9636L52.0008 98.8776L47.8179 117.19L43.9326 118.582L44.0753 118.98Z",fill:"#251138"}),e.createElement("path",{d:"M154.526 81.3931C154.624 79.2137 150.804 77.9396 147.498 77.1858C148.913 75.9937 150.005 74.482 149.638 73.7078C149.108 72.5976 145.777 73.4374 143.641 74.4575C143.261 74.6387 142.896 74.8497 142.549 75.0883C141.46 75.0669 140.393 75.3992 139.507 76.0357C138.621 76.6723 137.963 77.5791 137.631 78.6215C137.299 79.6638 137.311 80.786 137.664 81.8211C138.017 82.8563 138.694 83.7493 139.593 84.3673C140.681 85.3844 142.039 86.0631 143.503 86.3214C146.988 86.9809 154.302 86.3377 154.526 81.3931Z",fill:"#F3A268"}),e.createElement("path",{d:"M94.8285 85.6536C95.3068 85.7353 95.7907 85.7792 96.2758 85.7847H103.635L136.136 85.7561H141.028L142.756 74.945L138.064 74.0314L103.957 67.3785L103.635 67.317L102.004 67.0057L101.188 66.8459L97.9596 66.2109C97.4389 66.1294 96.9128 66.0884 96.3859 66.088C93.9217 66.0879 91.5478 67.0202 89.7367 68.6993C87.9256 70.3784 86.8101 72.6812 86.6122 75.1493C86.4144 77.6175 87.1486 80.07 88.6689 82.0188C90.1891 83.9675 92.3839 85.2696 94.8163 85.6659L94.8285 85.6536Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M96.2754 86.0674C95.7753 86.0618 95.2763 86.0166 94.7833 85.9322C92.2802 85.5237 90.0222 84.1828 88.4588 82.1766C86.8955 80.1703 86.1416 77.646 86.3472 75.1062C86.5529 72.5665 87.703 70.1979 89.5686 68.472C91.4341 66.7461 93.8782 65.7896 96.414 65.7931C96.9601 65.7922 97.5054 65.8347 98.0448 65.9201L104.038 67.0876L143.107 74.7074L141.28 86.0264H136.135L96.2754 86.0674ZM96.4018 66.3584C94.0074 66.3566 91.7002 67.261 89.9397 68.8917C88.1791 70.5223 87.0944 72.7595 86.9016 75.1576C86.7088 77.5558 87.4221 79.9389 88.8993 81.8324C90.3765 83.7258 92.5093 84.9907 94.873 85.3751C95.3364 85.4545 95.8053 85.4969 96.2754 85.5021L140.791 85.4611L142.422 75.158L97.9021 66.4772C97.4057 66.4 96.9041 66.3603 96.4018 66.3584Z",fill:"#251138"}),e.createElement("path",{d:"M96.227 85.4857H96.1659C95.725 85.5734 95.2778 85.6255 94.8287 85.6414C92.8571 85.7282 90.9103 85.1735 89.2776 84.0598C87.6448 82.9461 86.4132 81.3327 85.7657 79.4595L74.5298 46.9977C74.0013 45.4742 73.7911 43.8576 73.9122 42.2489C74.0333 40.6401 74.4832 39.0737 75.2338 37.6475C75.9843 36.2213 77.0194 34.9659 78.2745 33.9597C79.5295 32.9535 80.9776 32.2181 82.5281 31.7994C84.0787 31.3807 85.6985 31.2878 87.2864 31.5264C88.8744 31.765 90.3963 32.3299 91.7572 33.186C93.118 34.0421 94.2887 35.171 95.1959 36.502C96.1032 37.8331 96.7276 39.3379 97.0302 40.9223L101.735 65.4613L102.028 66.9934L101.837 66.723",fill:"#D0D3D9"}),e.createElement("path",{d:"M94.3964 85.9444C92.4376 85.9348 90.5296 85.3167 88.9341 84.1748C87.3386 83.0329 86.1336 81.423 85.4843 79.5659L74.2484 47.1041C73.7126 45.5457 73.5016 43.8932 73.6287 42.2494C73.7558 40.6055 74.2182 39.0056 74.9872 37.549C75.7561 36.0925 76.8152 34.8106 78.0985 33.7831C79.3817 32.7556 80.8617 32.0045 82.4463 31.5764C84.0309 31.1484 85.6862 31.0527 87.3091 31.2952C88.9321 31.5378 90.4881 32.1134 91.8802 32.9862C93.2722 33.859 94.4707 35.0103 95.4008 36.3686C96.331 37.7269 96.973 39.263 97.2869 40.8813L102.55 68.2141L101.608 66.8704L101.706 66.8008L96.7569 40.9919C96.4878 39.4201 95.8954 37.922 95.0175 36.5932C94.1397 35.2645 92.9957 34.1342 91.6587 33.2747C90.3217 32.4152 88.821 31.8454 87.2525 31.6015C85.6839 31.3576 84.082 31.4451 82.549 31.8584C81.016 32.2717 79.5857 33.0016 78.3492 34.0017C77.1128 35.0018 76.0975 36.2499 75.3682 37.6665C74.6389 39.083 74.2116 40.6368 74.1135 42.2287C74.0155 43.8206 74.2489 45.4155 74.7988 46.9116L86.0347 79.3734C86.6651 81.1846 87.8573 82.7447 89.4358 83.8243C91.0144 84.9039 92.8961 85.446 94.8041 85.3709C95.2396 85.3554 95.6732 85.3047 96.1006 85.2193H96.1576L96.2718 85.7765H96.2106C95.7546 85.8646 95.2926 85.918 94.8286 85.9362C94.6981 85.9444 94.5554 85.9444 94.3964 85.9444Z",fill:"#251138"}),e.createElement("path",{d:"M49.2325 32.52C59.5389 25.523 76.9269 25.441 90.8617 33.0854L92.4191 51.5571L94.4575 75.9404L96.0883 95.5265C89.235 107.44 73.7469 99.8648 56.5139 96.9644C53.66 96.481 52.5756 90.7457 50.3251 87.3537L48.0747 82.8473L48.6006 59.3408L49.2325 32.52Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M62.808 5.77865C62.8669 5.33003 61.8415 4.8242 60.5177 4.64884C59.194 4.47349 58.0731 4.69501 58.0143 5.14363C57.9554 5.59225 58.9808 6.09809 60.3046 6.27344C61.6283 6.4488 62.7491 6.22727 62.808 5.77865Z",fill:"#202738"}),e.createElement("path",{d:"M61.1588 7.76636C61.452 7.67001 61.3533 6.55814 60.9382 5.28293C60.5232 4.00772 59.9491 3.05207 59.6559 3.14842C59.3627 3.24477 59.4615 4.35664 59.8765 5.63185C60.2915 6.90706 60.8657 7.86271 61.1588 7.76636Z",fill:"#202738"}),e.createElement("path",{d:"M76.4864 29.2961C76.307 32.3276 75.2919 35.8138 71.5493 35.6336C64.9936 35.314 63.3955 28.3866 63.3955 28.3866C63.3955 28.3866 63.9296 18.4727 64.0845 18.3744H76.2662V24.9741C76.4867 26.4034 76.5605 27.8516 76.4864 29.2961Z",fill:"#F3A268"}),e.createElement("path",{d:"M76.4865 29.296C67.0566 27.3297 65.7153 22.3318 65.7153 22.3318L75.1941 18.3744H76.2786V24.9741C76.4949 26.4038 76.5646 27.852 76.4865 29.296Z",fill:"#E56542"}),e.createElement("path",{d:"M62.307 14.7733C62.307 14.7733 65.1364 28.6568 75.6792 25.8138C76.8773 25.4953 77.9693 24.8618 78.8428 23.9785C79.6282 23.1898 80.197 22.2104 80.494 21.1354C81.554 17.2845 81.3664 11.0003 80.2249 2.7865L62.2866 4.31865L62.307 14.7733Z",fill:"#F3A268"}),e.createElement("path",{d:"M61.6387 15.818C61.6754 15.818 63.7423 13.5567 65.5443 16.6046C65.5443 16.6046 62.3603 15.0929 61.6754 15.818H61.6387Z",fill:"#F35757"}),e.createElement("path",{d:"M66.5389 9.77144C74.9128 11.2462 81.8068 9.14875 83.6129 4.0771C83.7768 3.60959 83.8252 3.10906 83.7541 2.61857C83.6829 2.12808 83.4942 1.6623 83.2042 1.26131C82.9142 0.860313 82.5317 0.536102 82.0894 0.316552C81.6471 0.0970034 81.1584 -0.0113085 80.6653 0.000933601C76.8167 0.10335 70.2937 1.5085 63.95 2.64327C63.4756 2.72569 63.0147 2.87318 62.5802 3.08161C58.8662 4.87185 57.8225 8.28436 58.6664 12.8357C60.0933 19.6034 62.2867 20.8201 64.6513 20.7955C64.4923 16.7603 67.5581 13.5813 66.5389 9.77144Z",fill:"#202738"}),e.createElement("path",{d:"M63.5503 20.2302C65.0972 20.2302 66.3512 18.607 66.3512 16.6047C66.3512 14.6023 65.0972 12.9791 63.5503 12.9791C62.0035 12.9791 60.7495 14.6023 60.7495 16.6047C60.7495 18.607 62.0035 20.2302 63.5503 20.2302Z",fill:"#F3A268"}),e.createElement("path",{d:"M61.6387 16.0434C61.602 16.0434 63.6119 13.9091 65.1203 16.3261C65.1203 16.3261 62.927 15.3675 61.6387 16.0434Z",fill:"#E56542"}),e.createElement("path",{d:"M59.4572 115.194C61.2348 113.945 59.9098 110.131 58.4869 107.034C60.2889 107.444 62.1561 107.378 62.5312 106.624C63.0857 105.526 60.3908 103.384 58.279 102.311C57.9058 102.117 57.5171 101.955 57.1171 101.827C56.5167 101.015 55.6888 100.401 54.7393 100.064C53.7898 99.7264 52.7619 99.6814 51.7868 99.9343C50.8117 100.187 49.9338 100.726 49.2653 101.483C48.5968 102.24 48.168 103.18 48.0338 104.183C47.9911 104.499 47.9788 104.819 47.9971 105.137C47.8602 106.623 48.1547 108.117 48.8451 109.439C50.4514 112.61 55.4211 118.038 59.4572 115.194Z",fill:"#F3A268"}),e.createElement("path",{d:"M71.268 35.6295H71.4474C73.2942 35.5967 74.7089 34.6749 75.6996 32.8929C76.4759 31.3143 76.9121 29.5889 76.9797 27.8294L76.572 27.8049C76.1643 34.4087 72.858 35.1788 71.4515 35.2075H71.2843C64.5044 35.2075 62.9675 27.3747 62.9512 27.2969L62.5435 27.3747C62.5394 27.4566 64.1416 35.6295 71.268 35.6295Z",fill:"#251138"}),e.createElement("path",{d:"M71.6423 35.4185L71.2227 35.4335L73.5034 99.7756L73.9231 99.7606L71.6423 35.4185Z",fill:"#251138"}),e.createElement("path",{d:"M73.8814 43.831C74.2619 43.831 74.5704 43.521 74.5704 43.1386C74.5704 42.7563 74.2619 42.4463 73.8814 42.4463C73.5009 42.4463 73.1924 42.7563 73.1924 43.1386C73.1924 43.521 73.5009 43.831 73.8814 43.831Z",fill:"black"}),e.createElement("path",{d:"M74.4034 53.8145C74.7839 53.8145 75.0923 53.5045 75.0923 53.1221C75.0923 52.7398 74.7839 52.4298 74.4034 52.4298C74.0228 52.4298 73.7144 52.7398 73.7144 53.1221C73.7144 53.5045 74.0228 53.8145 74.4034 53.8145Z",fill:"black"}),e.createElement("path",{d:"M74.9292 63.7979C75.3097 63.7979 75.6182 63.4879 75.6182 63.1056C75.6182 62.7232 75.3097 62.4132 74.9292 62.4132C74.5487 62.4132 74.2402 62.7232 74.2402 63.1056C74.2402 63.4879 74.5487 63.7979 74.9292 63.7979Z",fill:"black"}),e.createElement("path",{d:"M75.4507 73.7815C75.8312 73.7815 76.1397 73.4716 76.1397 73.0892C76.1397 72.7068 75.8312 72.3969 75.4507 72.3969C75.0702 72.3969 74.7617 72.7068 74.7617 73.0892C74.7617 73.4716 75.0702 73.7815 75.4507 73.7815Z",fill:"black"}),e.createElement("path",{d:"M75.9766 83.7691C76.3571 83.7691 76.6656 83.4591 76.6656 83.0767C76.6656 82.6944 76.3571 82.3844 75.9766 82.3844C75.5961 82.3844 75.2876 82.6944 75.2876 83.0767C75.2876 83.4591 75.5961 83.7691 75.9766 83.7691Z",fill:"black"}),e.createElement("path",{d:"M76.4986 93.7526C76.8791 93.7526 77.1876 93.4426 77.1876 93.0603C77.1876 92.6779 76.8791 92.3679 76.4986 92.3679C76.118 92.3679 75.8096 92.6779 75.8096 93.0603C75.8096 93.4426 76.118 93.7526 76.4986 93.7526Z",fill:"#001065"}),e.createElement("path",{d:"M142.76 74.9326L141.032 85.7437L136.135 85.7519L138.068 74.0232L142.76 74.9326Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M57.3659 101.889L47.7933 107.132L44.6582 103.036C47.1655 101.397 54.3449 96.8089 54.7689 96.6819L57.3659 101.889Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M35.9829 66.9195L40.231 67.4848V67.0629L35.9829 66.4976V66.9195Z",fill:"#251138"}),e.createElement("path",{d:"M102.222 66.5607L97.7969 71.0072L98.0938 71.3056L102.519 66.859L102.222 66.5607Z",fill:"#251138"}),e.createElement("path",{d:"M93.8744 83.7692L88.9658 84.8548L81.0566 34.7405L87.5633 33.0896L90.6618 36.7602L93.8744 83.7692Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M47.8725 59.6533L47.3169 82.8295L47.8793 82.8431L48.435 59.6669L47.8725 59.6533Z",fill:"#251138"}),e.createElement("path",{d:"M95.7976 85.5249L95.3252 85.5464L95.7806 95.663L96.2531 95.6415L95.7976 85.5249Z",fill:"#251138"}),e.createElement("circle",{cx:"137.5",cy:"37.3126",r:"23.2143",fill:"#B4DD64"}),e.createElement("path",{d:"M136.527 50.5319C136.019 50.5481 135.512 50.4482 135.037 50.2384C134.561 50.0286 134.127 49.7131 133.759 49.3109L125.266 38.96C124.907 38.5683 124.62 38.1019 124.42 37.5873C124.22 37.0728 124.111 36.5202 124.099 35.9611C124.088 35.402 124.175 34.8474 124.354 34.3289C124.533 33.8104 124.802 33.3382 125.144 32.9392C125.487 32.5402 125.896 32.2223 126.35 32.0036C126.804 31.7849 127.292 31.6697 127.788 31.6646C128.284 31.6594 128.777 31.7644 129.239 31.9736C129.701 32.1828 130.124 32.4921 130.482 32.8838L136.415 40.4491L164.73 11.5998C165.476 10.9084 166.433 10.5711 167.403 10.6581C168.372 10.7451 169.28 11.2496 169.937 12.0668C170.595 12.884 170.951 13.9511 170.932 15.0463C170.913 16.1416 170.52 17.1807 169.836 17.9479L138.911 49.4528C138.258 50.1197 137.414 50.5019 136.527 50.5319Z",fill:"#128749"})),E=({question:n,formValues:t,onChangeHandler:r,autoFocusInput:o})=>{switch(n.type_info.question_type){case"RANGE":return e.createElement(s,{type_info:n.type_info,onChangeHandler:r,npsValue:t[n.name]});case"CHECKBOX":case"MULTI_SELECT":return e.createElement(h,{autoFocusGroup:o,values:t[n.name],options:n.type_info.choices,onChangeHandler:r,othersOption:n.type_info.meta?.othersOption,othersRequired:n.type_info.meta?.othersRequired});case"RADIO":case"DROPDOWN":return e.createElement(b,{autoFocusGroup:o,name:n.name,onChangeHandler:r,options:n.type_info.choices,value:t[n.name],othersOption:n.type_info.meta?.othersOption,othersRequired:n.type_info.meta?.othersRequired});case"INPUT":case"TEXT":return n.type_info?.meta?.readOnly?e.createElement("div",{className:"message-container"},n.type_info?.meta?.value):e.createElement("div",{className:"responsive-text-field"},e.createElement(p,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:n.is_required,value:t[n.name]||"",placeholder:n.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),e.createElement(m,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:n.is_required,placeholder:n.type_info?.meta?.placeholder??"",value:t[n.name]||"",onChange:e=>r(e.target.value)}));case"PARAGRAPH":return e.createElement(m,{autoFocusInput:o,label:"",isRequired:n.is_required,placeholder:n.type_info?.meta?.placeholder??"",value:t[n.name]||"",onChange:e=>r(e.target.value)});default:return console.error(`Question type ${n.type_info.question_type} not found`),null}};i(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #000;\n --default-question-background-color: #fff;\n --default-background-color: #ebeff3;\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-step-navigation {\n box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.1);\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 32px;\n text-align: -webkit-center;\n height: 32px;\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 #d9d9d9;\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\n.freemium-survey-components .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: 0 1px 3px 0 rgba(18, 52, 77, 0.2);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n}\n.freemium-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 color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-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}\n@-webkit-keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.freemium-survey-components .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 .question-footer:empty {\n display: none;\n}\n.freemium-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components .skip-button {\n font-weight: 400;\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}\n.freemium-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n}\n.freemium-survey-components .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 .submit {\n max-width: 700px;\n margin: 0 auto;\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 .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.freemium-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 1.2rem;\n line-height: 2;\n color: #12344d;\n}\n.freemium-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-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 .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container,\n.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container,\n.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components,\ndiv.card-survey-style {\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\n}\ndiv.widget-survey-components .questions,\ndiv.card-survey-style .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n position: relative;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text,\ndiv.card-survey-style .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container,\ndiv.card-survey-style .question-container {\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .question-footer,\ndiv.card-survey-style .question-footer {\n margin: 0px auto;\n justify-content: space-between;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n padding-bottom: 20px;\n}\ndiv.widget-survey-components .submit,\ndiv.card-survey-style .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer,\ndiv.card-survey-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices,\ndiv.card-survey-style .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group,\ndiv.card-survey-style .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group,\ndiv.card-survey-style .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou,\ndiv.card-survey-style div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components div.thankyou svg,\ndiv.card-survey-style div.thankyou svg {\n width: 140px;\n height: 120px;\n}\n\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n border-radius: 0;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 3px 0 0 0;\n}\ndiv.widget-survey-components .textarea-container .end-max-length {\n padding: 4px;\n}\ndiv.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\ndiv.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n\ndiv.widget-survey-components.default-style .freemium-survey-step-navigation {\n margin: 0;\n}\ndiv.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\ndiv.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\ndiv.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\ndiv.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\ndiv.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\ndiv.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\ndiv.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\n\n.widget-survey-components.cozy-style .freemium-survey-step-navigation {\n margin: 0;\n}\n.widget-survey-components.cozy-style .questions {\n max-height: 380px;\n max-height: var(--cozy-widget-max-height);\n}\n.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n}\n.widget-survey-components.cozy-style .question-text.nps {\n text-align: center;\n width: 60%;\n min-width: 600px;\n margin: auto;\n}\n.widget-survey-components.cozy-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.widget-survey-components.cozy-style .nps-container {\n grid-gap: 44px;\n gap: 44px;\n}\n.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}");const L=["RANGE","NPS","RADIO","DROPDOWN"],q=200,_=1e4,N=({thankYouQuestion:n,preview:t})=>(r((()=>{t||n.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=n.type_info.meta?.redirectUrl}),1e4)}),[]),e.createElement("div",{className:"question-container thankyou"},e.createElement(k,null),e.createElement("div",{className:"text"},n.text),n.type_info.meta?.redirectUrl&&e.createElement("div",{style:{width:"100%"}},e.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in 10 seconds.",e.createElement("br",null)),e.createElement("a",{className:"link",href:n.type_info.meta?.redirectUrl},n?.type_info.meta?.redirectUrl)))),z=()=>e.createElement("svg",{style:{display:"block"},width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.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"})),M=()=>e.createElement("svg",{style:{display:"block"},width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.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"})),Z=({currentBlockIndex:n,currentBlockIndexOfBlocksWithQns:t,blocksWithQns:r,setHorizontalScrollUnits:o})=>e.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},e.createElement("button",{disabled:0==n.current,className:"navigation-button",onClick:()=>{n.current=Math.max(n.current-1,0),t.current=Math.max(t.current-1,0),o(n.current)}},e.createElement(M,null)),e.createElement("button",{className:"navigation-button",disabled:n.current>=r.length-1,onClick:()=>{n.current=Math.min(n.current+1,r.length-1),t.current=Math.min(t.current+1,r.length-1),o(n.current)}},e.createElement(z,null))),S=({widget:n,widgetStyle:t,surveyStyle:r,formValues:o,blocksWithQns:a,blocks:i,thankYouQuestion:s,currentBlockIndexOfBlocksWithQns:c,currentBlockIndexOfBlocks:l,currentEditingBlock:u,isSubmitting:d,isValuesCommitted:p,isCurrentBlockFinal:m,setHorizontalScrollUnits:f,handleFormValues:h,skipBlock:v,setIsSubmitting:b,onSubmit:x,setIsSurveyCompleted:y,...g})=>{const C=g.blockIndex??c.current,k=g.question??a[C].question,E=()=>k.name===u.current.question.name&&!L.includes(k.type_info.question_type)&&!m(),q=()=>"RANGE"!==k.type_info.question_type&&!k.required&&k.name===u.current.question.name&&!m(),_=()=>"DROPDOWN"===k.type_info.question_type&&k.name!==u.current.question.name&&!k.required&&null!=o[k.name],N=()=>m()&&(n||"classic"!==r)&&k.name===u.current.question.name;return e.createElement("div",{className:"question-footer"},!(!n&&"classic"===r||0===C&&!o[k.name]||"compact"===t)&&e.createElement(Z,{currentBlockIndex:l,currentBlockIndexOfBlocksWithQns:c,blocksWithQns:a,setHorizontalScrollUnits:f}),(E()||_()||q()||N())&&e.createElement("div",{className:"action-buttons"},E()&&e.createElement(w,{onClick:()=>{p.current?(l.current=Math.min(l.current+1,a.length-1),u.current=a[C+1],f(l.current)):h(a[C],null,!0)},disabled:!o[u.current.question.name]||Array.isArray(o[u.current.question.name])&&0===o[u.current.question.name].length,className:"next-button"},"Next"),q()&&e.createElement("button",{className:"skip-button",onClick:()=>v(k)},"Skip"),_()&&e.createElement("button",{className:"skip-button",onClick:()=>{u.current=a[C],l.current=i.findIndex((e=>e.name===a[C].name)),v(k)}},"Clear selection"),N()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:(u.current.question.required||u.current.question.type_info.pivot_question)&&void 0===o[u.current.question.name]||d,onClick:()=>{b(!0),x(o,(()=>{s?.type_info.meta?.skipThankYouPage||y(!0)}))}},d?"Submitting":"Submit Survey"))))},F=({survey:t,surveyStyle:i="classic",placeholders:s,onSubmit:c,widget:l,npsValue:u,widgetStyle:d,widgetNavigatorQuerySelector:p,preview:m,mobilePreview:f})=>{const{meta:{blocks:h},question_details:{questions:v}}=t,[b,x]=o(null),[g,C]=o({}),[k,_]=o(!1),[z,M]=o([]),[F,B]=o(0),[I,H]=o(!1),[D,O]=o(null),$=n(null),R=n(null),T=n(-1),V=n(null),A=n(0),j=n(0),Q=n(!1),U=n([]),W=n(null),P=n([]);r((()=>{h&&(W.current=h.find((e=>"TY"===e.name)),x(h.filter((e=>"TY"!==e.name))))}),[h]),r((()=>{if(b)if(R.current=v.find((e=>e.pivot_question))??v.find((e=>"RANGE"===e.type_info.question_type))??v[0],null!=u){T.current=u;const e=v.find((e=>e.name===b[0].question_names[0]));$.current={...b[0],question:e},U.current=[...U.current,{...b[0],question:e}],M(U.current),C({Q_1:u})}else if(!$.current&&b.length>0)return $.current=b[0],void X(b[0])}),[b,u]),e.useEffect((()=>{l||"classic"!==i||V.current?.scrollIntoView({block:"center",behavior:"smooth"}),z.length&&(U.current=z,j.current=z.length-1),V.current&&(V.current.style.maxHeight="unset"),P.current[A.current]=V.current?.scrollHeight||P.current[A.current]||0,B(z.length-1),V.current&&(V.current.style.maxHeight="100%")}),[z]),r((()=>{Object.keys(g).length>0&&$.current.question&&(L.includes($.current.question.type_info.question_type)||Q.current)&&!Y()&&K()}),[g]),r((()=>{if(null!=g?.[R.current?.name])if(W.current?.is_based_on_score){const e=R.current?.type_info?.choices[g?.[R.current?.name]]?.dependent_question_names,n=W.current?.question_names.find((n=>e?.includes(n))),t=v.find((e=>e.name===n));O(t)}else{const e=v.find((e=>e.name==W.current?.question_names[0]));O(e)}}),[g?.[R.current?.name]]);const Y=()=>A.current===b.length-1||"end"===$.current.branchOption,G=e=>{if(e){let n={"{{nps.score}}":T.current};s&&(n={...n,...s});const t=new RegExp(Object.keys(n).join("|"),"gi");e=e.replace(t,(function(e){return n[e.toLowerCase()]}))}return e},X=e=>{let n={};if(e.is_based_on_score){const t=R.current?.type_info?.choices[g?.[R.current?.name]]?.dependent_question_names,r=e.question_names.find((e=>t?.includes(e)));n=v.find((e=>e.name===r))}else n=v.find((n=>n.name===e.question_names[0]));$.current.question=n;const t=U.current.find((e=>e.question.name===n.name));M(t?[...U.current]:[...U.current,{...e,question:n}])},K=()=>{if(Y())_(!0);else{if($.current.nextBlock)A.current=b.findIndex((e=>e.name===$.current.nextBlock));else if($.current.question.type_info?.meta?.branches){const e=$.current.question.type_info?.meta?.branches,n=g[$.current.question.name];let t;t="RANGE"===$.current.question.type_info.question_type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?A.current=b.findIndex((e=>e.name===t.nextBlock)):A.current+=1}else A.current+=1;$.current=b[A.current],X(b[A.current])}},J=e=>{Q.current=!0,delete g[e.name],C({...g})},ee=(e,n,t)=>{if(t){if(Q.current=!0,null!=g[e.question.name]&&e.name!==z[z.length-1].name){const[t,r]=(e=>{const n=z.findIndex((n=>n.name===e.name)),t=z.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=g[n.question.name],e)),{});return A.current=b.findIndex((n=>n.name===e.name)),[t,r]})(e);C({...r,...null!=n&&{[e.question.name]:n}}),U.current=t}else C({...g,...null!=n&&{[e.question.name]:n}});R?.current?.name==e?.question?.name&&(T.current=n)}else C({...g,...null!=n&&{[e.question.name]:n}})};return $.current&&$.current.question?k?e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style`},e.createElement(N,{thankYouQuestion:D,preview:m})):e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style ${f?"mobile-preview":""} ${i}-survey-style`},e.createElement(y,{totalSteps:b.length,completedSteps:A.current}),l&&"compact"===d&&document.querySelector(p)&&e.createElement(e.Fragment,null,a.createPortal(e.createElement(Z,{currentBlockIndex:A,currentBlockIndexOfBlocksWithQns:j,blocksWithQns:z,setHorizontalScrollUnits:B}),document.querySelector(p))),e.createElement("div",{style:l||"card"===i?{transform:`translateX(calc(-${F} * 100%))`,height:`${P.current[A.current]}px`,transition:z?.length>1?`all ${q}ms ease-out 0ms`:`transform ${q}ms ease-out 0ms`}:{},className:"questions"},z.map(((n,t)=>e.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(l||"card"===i)&&j.current!==t?0:1},ref:V,id:n.question.name,key:n.question.name},e.createElement("div",{className:"question-text "+(0===t?"nps":""),dangerouslySetInnerHTML:{__html:G(n.question.text)},title:`question-${t}`,role:"heading","aria-level":1}),e.createElement(E,{question:n.question,formValues:g,autoFocusInput:$.current.name===n.name,onChangeHandler:e=>{Q.current=!1,A.current=b.findIndex((e=>e.name===n.name)),$.current=n,ee(n,e,L.includes(n.question.type_info.question_type)&&!Y())}}),("classic"===i||l)&&e.createElement(S,{question:n.question,blockIndex:t,widget:l,widgetStyle:d,surveyStyle:i,formValues:g,blocksWithQns:z,blocks:b,thankYouQuestion:D,currentBlockIndexOfBlocksWithQns:j,currentBlockIndexOfBlocks:A,currentEditingBlock:$,isSubmitting:I,isValuesCommitted:Q,isCurrentBlockFinal:Y,setHorizontalScrollUnits:B,handleFormValues:ee,skipBlock:J,setIsSubmitting:H,onSubmit:c,setIsSurveyCompleted:_})))),!l&&"card"!==i&&Y()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:$.current.question.required&&void 0===g[$.current.question.name]||I,onClick:()=>{H(!0),c(g,(()=>{m||D?.type_info.meta?.skipThankYouPage&&(window.location.href=D?.type_info.meta?.redirectUrl),D?.type_info.meta?.skipThankYouPage||_(!0)}))}},I?"Submitting Survey":"Submit Survey"))),z.length&&"card"===i&&!l&&e.createElement(e.Fragment,null,e.createElement(S,{widget:l,widgetStyle:d,surveyStyle:i,formValues:g,blocksWithQns:z,blocks:b,thankYouQuestion:D,currentBlockIndexOfBlocksWithQns:j,currentBlockIndexOfBlocks:A,currentEditingBlock:$,isSubmitting:I,isValuesCommitted:Q,isCurrentBlockFinal:Y,setHorizontalScrollUnits:B,handleFormValues:ee,skipBlock:J,setIsSubmitting:H,onSubmit:c,setIsSurveyCompleted:_}))):null},B=n=>{const{survey:t}=n,r=[],{question_details:{questions:o}}=t;return o.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),r.push(n))})),t.meta={...t.meta,blocks:r},e.createElement(F,Object.assign({},n,{survey:t}))};export{_ as AUTO_REDIRECT_DELAY,C as BUTTON_SIZE_VARIANTS,w as Button,h as CheckboxGroup,p as Input,s as NPS,y as ProgressBar,x as Radio,b as RadioGroup,B as Survey,q as TRANSITION_DELAY,m as TextArea};
|
|
1
|
+
import e,{useRef as n,forwardRef as t,useEffect as r,useState as o}from"react";import a from"react-dom";function i(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}i(".freemium-survey-components .nps-container {\n margin: 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n grid-gap: 52px;\n gap: 52px;\n}\n.freemium-survey-components .nps-container .footer {\n border-top: 1px solid var(--default-background-color);\n border-top: 1px solid var(--background-color, var(--default-background-color));\n padding-top: 20px;\n margin-top: 20px;\n display: flex;\n justify-content: center;\n font-size: 0.875rem;\n line-height: 1.5;\n}\n.freemium-survey-components .nps-container .nps-scale {\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .button-container {\n display: flex;\n border-radius: 4px;\n justify-content: space-between;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n position: relative;\n}\n.freemium-survey-components .nps-container .nps-scale .positive-text {\n position: absolute;\n color: #475867;\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 position: absolute;\n color: #475867;\n bottom: -40px;\n font-size: 12px;\n left: 0;\n text-align: left;\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}\n.freemium-survey-components .nps-container .nps-scale button:hover {\n transition: background 0.2s ease-in, color 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 .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice {\n color: #000;\n background: var(--default-background-color);\n background: var(--background-color, var(--default-background-color));\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice.active,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:focus,\n.freemium-survey-components .nps-container .nps-scale.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11):focus, .freemium-survey-components .nps-container .nps-scale.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .nps-scale .button-container,\n.card-survey-style .nps-container .nps-scale .button-container {\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-gap: 16px;\n gap: 16px;\n background: transparent;\n }\n .freemium-survey-components .nps-container .nps-scale button,\n.card-survey-style .nps-container .nps-scale button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .nps-scale .button-container {\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: #ebeff3;\n}");const s=t=>{const{type_info:{linear_scale:{button_style:r="highlighted",button_shape:o="rounded"}={},score_presets:{start:a="Very unlikely",end:i="Very likely"}={},validation:{min:s},footer_text:c}}=t,l=e=>{switch(e){case e<=6:return"detractor";case e<=8:return"passive";default:return"promoter"}},u=n(Array.from({length:10+(0===s?1:0)},((e,n)=>n+s)));return e.createElement("div",{className:"nps-container","data-test-input":"nps"},e.createElement("div",{className:`nps-scale ${o} ${r}`},e.createElement("div",{className:"button-container"},e.createElement("span",{className:"negative-text",role:"note"},`${s} - ${a}`),e.createElement("span",{className:"positive-text",role:"note"},`${u.current[u.current.length-1]} - ${i}`),e.createElement("div",{className:"choices",role:"radiogroup","aria-required":!0},u.current.map((n=>e.createElement("button",{role:"radio","aria-checked":t.npsValue===n,key:n,"data-test-nps-choice":n,onClick:e=>{t.onChangeHandler(n)},className:`choice ${l(n)} ${t.npsValue===n&&"active"}`},n)))))),e.createElement("div",{className:"footer",role:"note"},c))},c=(e,n)=>(e.defaultProps=n,e);i('.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 .end-max-length {\n padding: 0 8px;\n font-size: 0.85rem;\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 /* 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]::-moz-placeholder {\n color: #92a2b2;\n font-weight: 400;\n font-size: 0.85rem;\n}\n.freemium-survey-components input[type=text]:-ms-input-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 /* 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:-ms-input-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 l={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocusInput:!0},u=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocusInput&&setTimeout((()=>{a.current?.focus()}),q+20)}),[t.autoFocusInput]);const{inputStyle:i,style:s,className:c,showCount:l,isErrored:u,startLabel:d,isRequired:p,errorText:m,endLabel:f,maxLength:h,autoFocusInput:v,...b}=t;return e.createElement("div",{className:"input-container",style:s},t.label&&e.createElement("label",{className:"input-label "+(p?"required":"")},t.label),e.createElement("div",null,d&&e.createElement("div",{className:"start-label"},d),e.createElement("div",{className:`input-basic ${u?"error":""}${c||""}`},e.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:a,style:i},b)),l&&h>0&&e.createElement("div",{className:"end-max-length"},`${t.value&&t.value.length||0}/${t.maxLength}`)),f&&e.createElement("div",{className:"end-label"},f)),u&&m&&e.createElement("span",{className:"input-error"},t.errorText))})),d=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocusInput&&setTimeout((()=>{a.current?.focus()}),q+20)}),[]);const{inputStyle:i,style:s,className:c,showCount:l,maxLength:u,isErrored:d,startLabel:p,isRequired:m,autoFocusInput:f,...h}=t;return e.createElement(e.Fragment,null,e.createElement("div",{className:"textarea-container",style:s},t.label&&e.createElement("label",{className:"input-label "+(m?"required":"")},t.label),p&&e.createElement("div",{className:"start-label"},p),e.createElement("div",{className:`input-basic ${d?"error":""} ${c||""}`},e.createElement("textarea",Object.assign({autoComplete:"off",ref:a,style:i},h)),l&&u&&u>0&&e.createElement("div",{className:"end-max-length"},`${t.value&&t.value.length||0}/${t.maxLength}`)),t.endLabel&&e.createElement("div",{className:"end-label"},t.endLabel)),t.isErrored&&t.errorText&&e.createElement("span",{className:"input-error"},t.errorText))})),p=c(u,l),m=c(d,l);i('.freemium-survey-components .checkbox-group {\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\n}\n.freemium-survey-components .checkbox-label:hover .checkbox {\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 .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 f=()=>e.createElement("svg",{id:"tick",className:"tick-icon",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"title",viewBox:"0 0 10 10"},e.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"})),h=({values:t=[],options:a,autoFocusGroup:i,onChangeHandler:s,othersOption:c,othersRequired:l})=>{const u=(()=>{let e=-1;return t.map(((n,t)=>{const r=a.find((e=>e.value===n));return r||(e=t),r})),e})(),[d,m]=o(!1),f=n(null);return r((()=>{i&&setTimeout((()=>{f.current?.focus()}),q+20)}),[]),e.createElement("div",{className:"checkbox-group"},e.createElement("button",{ref:f,className:"autofocus-button","aria-hidden":!0}),a?.map(((n,r)=>e.createElement(v,{key:n.value,checked:t?.includes(n.value),name:n.value,id:n.value,onChange:(e,r)=>{if(r)s([...t||[],n.value]);else{const e=t.indexOf(n.value);e>-1&&t.splice(e,1),s([...t])}}},n.value))),c&&e.createElement(v,{key:"others",checked:d,name:"others",id:"others",onChange:(e,n)=>{m(n)}},"Others"),d&&e.createElement(e.Fragment,null,e.createElement(p,{placeholder:"Enter your comment",value:t[u],onChange:e=>{-1!==u?(t[u]=e.target.value,s(t)):s(t.concat(e.target.value))},label:""})))},v=c((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),q+20)}),[]),e.createElement("label",{className:`checkbox-label ${t.disabled&&"disabled"}`},e.createElement("input",{ref:o,id:t.id,type:"checkbox",name:t.name,readOnly:t.readOnly,disabled:t.disabled,"aria-disabled":t.disabled,checked:t.checked,onChange:t.readOnly?()=>{}:e=>t.onChange(e,e.target.checked)}),e.createElement("div",{className:"checkbox"},t.checked&&e.createElement("div",{className:"icon-container"},e.createElement(f,null)," ")),e.createElement("div",null,t.children))}),{checked:!1});i('.freemium-survey-components .radio-group {\n display: flex;\n grid-gap: 12px;\n gap: 12px;\n white-space: nowrap;\n flex-direction: column;\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: flex-start;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.06);\n border-radius: 4px;\n white-space: pre-wrap;\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 .radio {\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}');const b=({name:t,options:a,value:i,autoFocusGroup:s,onChangeHandler:c,othersOption:l,othersRequired:u})=>{const[d,m]=o(""),[f,h]=o(""),v=n(null);return r((()=>{s&&setTimeout((()=>{v.current?.focus()}),q+20)}),[]),r((()=>{i||(h(""),m(""))}),[i]),r((()=>{f&&a.find((e=>e.value===f))&&c(f)}),[f]),e.createElement("div",{className:"radio-group",role:"radiogroup"},e.createElement("button",{ref:v,className:"autofocus-button","aria-hidden":!0,tabIndex:-1}),a?.map(((n,r)=>e.createElement(x,{key:n.value,value:n.value,name:t,onChange:e=>{h(e.currentTarget.value)},checked:f===n.value},n.value))),l&&e.createElement(x,{key:"others",value:"others",name:t,onChange:e=>{h("others")},checked:"others"===f},"Others"),"others"===f&&e.createElement(e.Fragment,null,e.createElement(p,{value:d,onChange:e=>m(e.target.value),placeholder:"Enter your comment",label:""}),d!==i&&e.createElement(w,{disabled:u&&0===d.length,onClick:()=>c(d)},"Next")))},x=c((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),q+20)}),[]),e.createElement("label",{className:"radio-label"},e.createElement("input",{ref:o,type:"radio",name:t.name,value:t.value,checked:t.checked,onChange:t.onChange}),e.createElement("div",{className:"radio"}),e.createElement("div",null,t.children))}),{checked:!1,autoFocus:!1});i(".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}\n\n.progressbar {\n transition: transform 0.25s linear;\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 y=n=>{const{totalSteps:t,completedSteps:r}=n;return e.createElement("div",{className:"progressbar-container"},e.createElement("div",{className:"progressbar",style:{width:(r>0?100/t:0)+"%",transform:`scaleX(${r})`}}))};i(".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: 500;\n letter-spacing: 0.3px;\n border-radius: 4px;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-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 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 g=()=>e.createElement(e.Fragment,null,"..."),C={LARGE:"large",MINI:"mini",NORMAL:"normal"},w=n=>{const{inline:t=!1,children:r,disabled:o,className:a="",htmlType:i,type:s="primary",onClick:c,size:l,overrideStyleClassName:u="",loading:d=!1,...p}=n;return e.createElement("button",Object.assign({style:t?{display:"inline-block"}:{},disabled:o,className:`action-button ${a} ${u}`,type:i,onClick:c},p),d?e.createElement(g,null):r)},k=()=>e.createElement("svg",{width:"200",height:"139",viewBox:"0 0 200 139",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M190.697 136.825C186.261 131.331 179.073 124.281 168.747 121.667C154.73 118.111 148.472 126.141 131.704 124.424C113.961 122.609 114.198 112.925 98.779 112.02C80.2862 110.93 78.3089 124.764 56.2489 125.805C40.6303 126.538 34.572 119.938 21.95 124.424C13.4252 127.456 7.68088 133.49 4.11768 138.209L190.697 136.825Z",fill:"#F4F4F4"}),e.createElement("path",{d:"M144.95 136.825H148.489C150.749 134.074 152.86 131.202 154.812 128.222C156.907 124.887 157.16 123.408 156.638 122.835C155.701 121.79 152.011 123.498 149.854 125.203C147.783 126.882 146.292 129.176 145.594 131.757C145.119 133.403 144.902 135.112 144.95 136.825Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M146.634 137.128C146.705 137.128 146.773 137.104 146.828 137.059C146.883 137.014 146.921 136.952 146.935 136.882C147.456 134.085 148.604 131.445 150.291 129.16C151.403 127.668 152.733 126.355 154.237 125.264C154.298 125.217 154.34 125.149 154.353 125.073C154.366 124.997 154.349 124.919 154.306 124.854C154.26 124.793 154.192 124.753 154.116 124.74C154.041 124.727 153.963 124.743 153.899 124.785C152.346 125.912 150.971 127.268 149.822 128.808C148.08 131.168 146.895 133.895 146.357 136.784C146.342 136.863 146.359 136.945 146.404 137.011C146.449 137.078 146.518 137.124 146.597 137.14L146.634 137.128Z",fill:"#30354F"}),e.createElement("path",{d:"M141.778 136.866C135.067 117.366 135.035 111.676 136.771 110.758C138.655 109.762 143.025 114.125 145.21 117.681C150.4 126.128 146.674 135.596 146.16 136.845L141.778 136.866Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M143.726 136.628C143.797 136.628 143.866 136.603 143.92 136.558C143.975 136.512 144.012 136.448 144.024 136.378C144.829 131.888 144.574 127.27 143.282 122.896C142.449 120.118 141.201 117.482 139.58 115.08C139.559 115.044 139.53 115.013 139.497 114.989C139.463 114.964 139.425 114.947 139.384 114.938C139.343 114.929 139.301 114.928 139.261 114.936C139.22 114.944 139.181 114.96 139.146 114.984C139.112 115.007 139.083 115.037 139.06 115.072C139.038 115.108 139.023 115.147 139.016 115.188C139.01 115.229 139.011 115.272 139.021 115.312C139.031 115.353 139.049 115.391 139.075 115.424C140.661 117.775 141.883 120.353 142.699 123.072C143.964 127.353 144.212 131.873 143.425 136.268C143.41 136.348 143.428 136.43 143.474 136.497C143.52 136.563 143.59 136.609 143.669 136.624L143.726 136.628Z",fill:"#30354F"}),e.createElement("path",{d:"M21.7544 136.825H26.9606C31.3677 131.303 34.3438 127.206 36.264 124.142C39.3503 119.226 39.7212 117.054 38.9589 116.206C37.5727 114.67 32.1423 117.186 28.9705 119.697C25.9224 122.173 23.7284 125.552 22.7002 129.353C22.0003 131.779 21.6812 134.3 21.7544 136.825Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M24.2127 137.128C24.2836 137.128 24.3524 137.104 24.4074 137.059C24.4624 137.014 24.5003 136.952 24.5144 136.882C25.2854 132.744 26.9835 128.837 29.4801 125.457C31.1256 123.25 33.0955 121.308 35.3223 119.697C35.3549 119.673 35.3826 119.643 35.4038 119.609C35.4249 119.574 35.4391 119.536 35.4456 119.496C35.452 119.456 35.4506 119.415 35.4413 119.376C35.432 119.337 35.4151 119.299 35.3916 119.267C35.368 119.234 35.3383 119.206 35.304 119.185C35.2697 119.163 35.2316 119.149 35.1919 119.143C35.1521 119.136 35.1115 119.138 35.0723 119.147C35.0331 119.156 34.9962 119.173 34.9635 119.197C32.6895 120.847 30.6772 122.833 28.9949 125.088C26.4416 128.543 24.7044 132.537 23.9151 136.767C23.9007 136.847 23.9179 136.928 23.9629 136.995C24.0078 137.062 24.0771 137.108 24.1557 137.124L24.2127 137.128Z",fill:"#30354F"}),e.createElement("path",{d:"M17.0659 136.886C7.18764 108.181 7.15095 99.8075 9.699 98.4556C12.4672 96.9931 18.9005 103.413 22.1172 108.648C29.7573 121.081 24.2739 135.014 23.5156 136.853L17.0659 136.886Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M19.9316 136.387C20.0025 136.387 20.0712 136.362 20.1256 136.316C20.1801 136.27 20.2167 136.207 20.2292 136.137C21.4098 129.549 21.0384 122.775 19.1447 116.358C17.9218 112.28 16.0894 108.412 13.7102 104.887C13.6629 104.825 13.5935 104.783 13.5164 104.77C13.4392 104.758 13.3601 104.775 13.2954 104.819C13.2307 104.863 13.1852 104.93 13.1683 105.007C13.1515 105.084 13.1645 105.164 13.2047 105.232C15.5538 108.71 17.3616 112.529 18.5658 116.555C20.4317 122.878 20.7975 129.552 19.634 136.042C19.6269 136.082 19.6278 136.123 19.6365 136.163C19.6452 136.202 19.6616 136.239 19.6847 136.273C19.7078 136.306 19.7371 136.334 19.7711 136.356C19.8051 136.377 19.843 136.392 19.8826 136.399L19.9316 136.387Z",fill:"#30354F"}),e.createElement("path",{d:"M182.865 94.6252L175.478 93.6133C175.004 93.5534 174.555 93.3671 174.177 93.0739C173.8 92.7807 173.507 92.3913 173.329 91.946C173.161 91.5192 173.11 91.0548 173.182 90.6015C173.254 90.1482 173.445 89.7225 173.737 89.3692L178.344 83.6544C178.642 83.2834 179.033 82.9978 179.475 82.8259C179.918 82.6541 180.398 82.6021 180.867 82.6752C181.332 82.7383 181.771 82.9229 182.142 83.2105C182.512 83.4982 182.801 83.8787 182.979 84.3139L185.768 91.0488C185.943 91.4689 186.003 91.9283 185.943 92.3798C185.883 92.8312 185.704 93.2584 185.425 93.6174C185.172 93.9482 184.846 94.2157 184.472 94.3991C184.099 94.5824 183.688 94.6766 183.273 94.6743C183.136 94.6669 183 94.6505 182.865 94.6252ZM178.739 83.9739L174.132 89.6887C173.903 89.9709 173.752 90.3094 173.697 90.6695C173.641 91.0295 173.681 91.3981 173.814 91.7371C173.957 92.0943 174.192 92.4067 174.495 92.6416C174.798 92.8765 175.159 93.0253 175.539 93.0726L182.934 94.0926C183.316 94.1494 183.706 94.1034 184.064 93.9595C184.422 93.8155 184.736 93.5788 184.973 93.2733C185.199 92.9886 185.343 92.6478 185.391 92.2871C185.439 91.9264 185.389 91.5593 185.246 91.225L182.457 84.4901C182.313 84.143 182.08 83.8401 181.782 83.6116C181.485 83.383 181.133 83.2367 180.761 83.1873C180.651 83.1711 180.539 83.1629 180.427 83.1627C180.104 83.165 179.786 83.2397 179.495 83.3815C179.204 83.5232 178.949 83.7284 178.747 83.9821L178.739 83.9739Z",fill:"#ECEDF0"}),e.createElement("path",{d:"M1.22812e-05 137.513C-0.00052885 137.603 0.0168174 137.693 0.0510461 137.777C0.0852748 137.861 0.135705 137.937 0.199414 138.001C0.263122 138.065 0.338842 138.116 0.422184 138.15C0.505527 138.184 0.594834 138.202 0.68493 138.201H199.315C199.497 138.201 199.671 138.129 199.799 138C199.928 137.871 200 137.695 200 137.513C200 137.33 199.928 137.155 199.799 137.026C199.671 136.897 199.497 136.825 199.315 136.825H0.68493C0.594985 136.825 0.505921 136.843 0.422823 136.877C0.339725 136.912 0.26422 136.962 0.20062 137.026C0.13702 137.09 0.0865687 137.166 0.0521484 137.25C0.017728 137.333 1.22812e-05 137.423 1.22812e-05 137.513Z",fill:"#5F6386"}),e.createElement("path",{d:"M51.2017 57.6777L41.0829 66.7886L40.1737 67.4604L40.7282 68.5829L54.7568 96.6614L57.3578 101.889L47.7934 107.132L44.6583 103.036L20.4416 71.5161C19.6508 70.4576 19.0809 69.2495 18.766 67.9643C18.5747 67.1594 18.4829 66.3339 18.4928 65.5064C18.4633 64.2632 18.6855 63.027 19.1459 61.8727C19.6063 60.7185 20.2954 59.6704 21.1714 58.7919L47.8261 32.8233C47.8261 32.8233 65.9927 19.6853 90.9432 32.7577",fill:"#D0D3D9"}),e.createElement("path",{d:"M47.7158 107.476L44.4258 103.191L20.2172 71.6881C18.8837 69.9133 18.1778 67.7421 18.2114 65.5186C18.1798 64.2337 18.4082 62.9558 18.8826 61.7622C19.3571 60.5686 20.0677 59.4842 20.9714 58.5747L47.6628 32.5733C47.7077 32.5405 52.339 29.2345 59.971 27.5918C67.0036 26.076 78.109 25.695 91.0736 32.4832L90.8167 32.9871C66.6163 20.3079 48.6372 32.5774 48.0094 33.0239L21.3669 58.9762C20.5147 59.8348 19.8453 60.8587 19.3995 61.9855C18.9537 63.1124 18.7409 64.3187 18.774 65.5309C18.7633 66.3336 18.8523 67.1345 19.039 67.9151C19.3443 69.1628 19.8991 70.3351 20.6697 71.3604L47.8748 106.764L56.9989 101.786L54.5161 96.8006L39.8393 67.3948L40.9278 66.5755L51.0303 57.4768L51.4054 57.8865L41.2703 66.9852L40.5364 67.53L40.989 68.4395L55.0135 96.5179L57.7409 101.991L47.7158 107.476Z",fill:"#251138"}),e.createElement("path",{d:"M99.093 138.054H75.2758C72.9846 127.403 73.3067 132.757 72.7522 121.217C72.5892 117.819 72.4138 114.46 72.2263 111.139C72.2263 111 72.2263 110.856 72.2263 110.729C72.0592 107.804 71.892 104.908 71.7126 102.069C71.6719 101.459 71.6352 100.84 71.5944 100.234C71.5699 99.8239 71.5414 99.4143 71.5169 99.0292C71.4639 98.1771 71.4069 97.3332 71.3457 96.4893L72.6666 96.4483L73.4086 96.4237H73.8163L92.2683 95.8256H92.6964L96.0272 95.6617V95.6863C96.4349 102.143 96.7284 109.406 96.92 117.165V117.284C97.2095 129.373 99.2887 124.646 99.093 138.054Z",fill:"#5D6476"}),e.createElement("path",{d:"M73.1636 93.2037C72.9964 94.2566 72.8293 95.3258 72.6499 96.4196C72.5194 97.2389 72.3808 98.0378 72.2422 98.8776C72.1607 99.3528 72.0791 99.828 71.9935 100.311C71.8916 100.885 71.7978 101.471 71.6918 102.052C70.6481 108.021 69.421 114.441 68.0511 121.151C65.7844 132.286 68.9032 128.218 63.5666 138.05H39.0645C41.743 124.531 41.9183 131.36 44.079 118.951C44.1035 118.8 44.128 118.648 44.1565 118.501C44.8944 114.269 45.6242 109.898 46.3662 105.24L46.4273 104.875C46.6189 103.646 47.7686 102.606 49.1588 101.598C49.9253 101.053 50.7692 100.52 51.5642 99.9837L51.7844 99.8321C51.9597 99.7133 52.1309 99.5904 52.298 99.4716C53.4966 98.6031 54.4914 97.7141 54.789 96.7064C54.8189 96.6045 54.8408 96.5004 54.8542 96.395L54.6056 95.6617L54.2957 94.7277L73.1636 93.2037Z",fill:"#5D6476"}),e.createElement("path",{d:"M84.3548 121.372L63 121.09L69.095 99.4388L79.226 97.6486L84.3548 121.372Z",fill:"#5D6476"}),e.createElement("path",{d:"M70.9498 111.29L76.9673 110.59L74.7902 96.5465L74.3744 96.612L76.4821 110.221L70.9009 110.873L70.9498 111.29Z",fill:"#251138"}),e.createElement("path",{d:"M96.7077 117.554L96.9767 117.226L94.2534 114.957L92.6797 95.7517L92.2598 95.7886L93.8457 115.17L96.7077 117.554Z",fill:"#251138"}),e.createElement("path",{d:"M44.0753 118.98L48.1848 117.509L52.4125 98.9636L52.0008 98.8776L47.8179 117.19L43.9326 118.582L44.0753 118.98Z",fill:"#251138"}),e.createElement("path",{d:"M154.526 81.3931C154.624 79.2137 150.804 77.9396 147.498 77.1858C148.913 75.9937 150.005 74.482 149.638 73.7078C149.108 72.5976 145.777 73.4374 143.641 74.4575C143.261 74.6387 142.896 74.8497 142.549 75.0883C141.46 75.0669 140.393 75.3992 139.507 76.0357C138.621 76.6723 137.963 77.5791 137.631 78.6215C137.299 79.6638 137.311 80.786 137.664 81.8211C138.017 82.8563 138.694 83.7493 139.593 84.3673C140.681 85.3844 142.039 86.0631 143.503 86.3214C146.988 86.9809 154.302 86.3377 154.526 81.3931Z",fill:"#F3A268"}),e.createElement("path",{d:"M94.8285 85.6536C95.3068 85.7353 95.7907 85.7792 96.2758 85.7847H103.635L136.136 85.7561H141.028L142.756 74.945L138.064 74.0314L103.957 67.3785L103.635 67.317L102.004 67.0057L101.188 66.8459L97.9596 66.2109C97.4389 66.1294 96.9128 66.0884 96.3859 66.088C93.9217 66.0879 91.5478 67.0202 89.7367 68.6993C87.9256 70.3784 86.8101 72.6812 86.6122 75.1493C86.4144 77.6175 87.1486 80.07 88.6689 82.0188C90.1891 83.9675 92.3839 85.2696 94.8163 85.6659L94.8285 85.6536Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M96.2754 86.0674C95.7753 86.0618 95.2763 86.0166 94.7833 85.9322C92.2802 85.5237 90.0222 84.1828 88.4588 82.1766C86.8955 80.1703 86.1416 77.646 86.3472 75.1062C86.5529 72.5665 87.703 70.1979 89.5686 68.472C91.4341 66.7461 93.8782 65.7896 96.414 65.7931C96.9601 65.7922 97.5054 65.8347 98.0448 65.9201L104.038 67.0876L143.107 74.7074L141.28 86.0264H136.135L96.2754 86.0674ZM96.4018 66.3584C94.0074 66.3566 91.7002 67.261 89.9397 68.8917C88.1791 70.5223 87.0944 72.7595 86.9016 75.1576C86.7088 77.5558 87.4221 79.9389 88.8993 81.8324C90.3765 83.7258 92.5093 84.9907 94.873 85.3751C95.3364 85.4545 95.8053 85.4969 96.2754 85.5021L140.791 85.4611L142.422 75.158L97.9021 66.4772C97.4057 66.4 96.9041 66.3603 96.4018 66.3584Z",fill:"#251138"}),e.createElement("path",{d:"M96.227 85.4857H96.1659C95.725 85.5734 95.2778 85.6255 94.8287 85.6414C92.8571 85.7282 90.9103 85.1735 89.2776 84.0598C87.6448 82.9461 86.4132 81.3327 85.7657 79.4595L74.5298 46.9977C74.0013 45.4742 73.7911 43.8576 73.9122 42.2489C74.0333 40.6401 74.4832 39.0737 75.2338 37.6475C75.9843 36.2213 77.0194 34.9659 78.2745 33.9597C79.5295 32.9535 80.9776 32.2181 82.5281 31.7994C84.0787 31.3807 85.6985 31.2878 87.2864 31.5264C88.8744 31.765 90.3963 32.3299 91.7572 33.186C93.118 34.0421 94.2887 35.171 95.1959 36.502C96.1032 37.8331 96.7276 39.3379 97.0302 40.9223L101.735 65.4613L102.028 66.9934L101.837 66.723",fill:"#D0D3D9"}),e.createElement("path",{d:"M94.3964 85.9444C92.4376 85.9348 90.5296 85.3167 88.9341 84.1748C87.3386 83.0329 86.1336 81.423 85.4843 79.5659L74.2484 47.1041C73.7126 45.5457 73.5016 43.8932 73.6287 42.2494C73.7558 40.6055 74.2182 39.0056 74.9872 37.549C75.7561 36.0925 76.8152 34.8106 78.0985 33.7831C79.3817 32.7556 80.8617 32.0045 82.4463 31.5764C84.0309 31.1484 85.6862 31.0527 87.3091 31.2952C88.9321 31.5378 90.4881 32.1134 91.8802 32.9862C93.2722 33.859 94.4707 35.0103 95.4008 36.3686C96.331 37.7269 96.973 39.263 97.2869 40.8813L102.55 68.2141L101.608 66.8704L101.706 66.8008L96.7569 40.9919C96.4878 39.4201 95.8954 37.922 95.0175 36.5932C94.1397 35.2645 92.9957 34.1342 91.6587 33.2747C90.3217 32.4152 88.821 31.8454 87.2525 31.6015C85.6839 31.3576 84.082 31.4451 82.549 31.8584C81.016 32.2717 79.5857 33.0016 78.3492 34.0017C77.1128 35.0018 76.0975 36.2499 75.3682 37.6665C74.6389 39.083 74.2116 40.6368 74.1135 42.2287C74.0155 43.8206 74.2489 45.4155 74.7988 46.9116L86.0347 79.3734C86.6651 81.1846 87.8573 82.7447 89.4358 83.8243C91.0144 84.9039 92.8961 85.446 94.8041 85.3709C95.2396 85.3554 95.6732 85.3047 96.1006 85.2193H96.1576L96.2718 85.7765H96.2106C95.7546 85.8646 95.2926 85.918 94.8286 85.9362C94.6981 85.9444 94.5554 85.9444 94.3964 85.9444Z",fill:"#251138"}),e.createElement("path",{d:"M49.2325 32.52C59.5389 25.523 76.9269 25.441 90.8617 33.0854L92.4191 51.5571L94.4575 75.9404L96.0883 95.5265C89.235 107.44 73.7469 99.8648 56.5139 96.9644C53.66 96.481 52.5756 90.7457 50.3251 87.3537L48.0747 82.8473L48.6006 59.3408L49.2325 32.52Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M62.808 5.77865C62.8669 5.33003 61.8415 4.8242 60.5177 4.64884C59.194 4.47349 58.0731 4.69501 58.0143 5.14363C57.9554 5.59225 58.9808 6.09809 60.3046 6.27344C61.6283 6.4488 62.7491 6.22727 62.808 5.77865Z",fill:"#202738"}),e.createElement("path",{d:"M61.1588 7.76636C61.452 7.67001 61.3533 6.55814 60.9382 5.28293C60.5232 4.00772 59.9491 3.05207 59.6559 3.14842C59.3627 3.24477 59.4615 4.35664 59.8765 5.63185C60.2915 6.90706 60.8657 7.86271 61.1588 7.76636Z",fill:"#202738"}),e.createElement("path",{d:"M76.4864 29.2961C76.307 32.3276 75.2919 35.8138 71.5493 35.6336C64.9936 35.314 63.3955 28.3866 63.3955 28.3866C63.3955 28.3866 63.9296 18.4727 64.0845 18.3744H76.2662V24.9741C76.4867 26.4034 76.5605 27.8516 76.4864 29.2961Z",fill:"#F3A268"}),e.createElement("path",{d:"M76.4865 29.296C67.0566 27.3297 65.7153 22.3318 65.7153 22.3318L75.1941 18.3744H76.2786V24.9741C76.4949 26.4038 76.5646 27.852 76.4865 29.296Z",fill:"#E56542"}),e.createElement("path",{d:"M62.307 14.7733C62.307 14.7733 65.1364 28.6568 75.6792 25.8138C76.8773 25.4953 77.9693 24.8618 78.8428 23.9785C79.6282 23.1898 80.197 22.2104 80.494 21.1354C81.554 17.2845 81.3664 11.0003 80.2249 2.7865L62.2866 4.31865L62.307 14.7733Z",fill:"#F3A268"}),e.createElement("path",{d:"M61.6387 15.818C61.6754 15.818 63.7423 13.5567 65.5443 16.6046C65.5443 16.6046 62.3603 15.0929 61.6754 15.818H61.6387Z",fill:"#F35757"}),e.createElement("path",{d:"M66.5389 9.77144C74.9128 11.2462 81.8068 9.14875 83.6129 4.0771C83.7768 3.60959 83.8252 3.10906 83.7541 2.61857C83.6829 2.12808 83.4942 1.6623 83.2042 1.26131C82.9142 0.860313 82.5317 0.536102 82.0894 0.316552C81.6471 0.0970034 81.1584 -0.0113085 80.6653 0.000933601C76.8167 0.10335 70.2937 1.5085 63.95 2.64327C63.4756 2.72569 63.0147 2.87318 62.5802 3.08161C58.8662 4.87185 57.8225 8.28436 58.6664 12.8357C60.0933 19.6034 62.2867 20.8201 64.6513 20.7955C64.4923 16.7603 67.5581 13.5813 66.5389 9.77144Z",fill:"#202738"}),e.createElement("path",{d:"M63.5503 20.2302C65.0972 20.2302 66.3512 18.607 66.3512 16.6047C66.3512 14.6023 65.0972 12.9791 63.5503 12.9791C62.0035 12.9791 60.7495 14.6023 60.7495 16.6047C60.7495 18.607 62.0035 20.2302 63.5503 20.2302Z",fill:"#F3A268"}),e.createElement("path",{d:"M61.6387 16.0434C61.602 16.0434 63.6119 13.9091 65.1203 16.3261C65.1203 16.3261 62.927 15.3675 61.6387 16.0434Z",fill:"#E56542"}),e.createElement("path",{d:"M59.4572 115.194C61.2348 113.945 59.9098 110.131 58.4869 107.034C60.2889 107.444 62.1561 107.378 62.5312 106.624C63.0857 105.526 60.3908 103.384 58.279 102.311C57.9058 102.117 57.5171 101.955 57.1171 101.827C56.5167 101.015 55.6888 100.401 54.7393 100.064C53.7898 99.7264 52.7619 99.6814 51.7868 99.9343C50.8117 100.187 49.9338 100.726 49.2653 101.483C48.5968 102.24 48.168 103.18 48.0338 104.183C47.9911 104.499 47.9788 104.819 47.9971 105.137C47.8602 106.623 48.1547 108.117 48.8451 109.439C50.4514 112.61 55.4211 118.038 59.4572 115.194Z",fill:"#F3A268"}),e.createElement("path",{d:"M71.268 35.6295H71.4474C73.2942 35.5967 74.7089 34.6749 75.6996 32.8929C76.4759 31.3143 76.9121 29.5889 76.9797 27.8294L76.572 27.8049C76.1643 34.4087 72.858 35.1788 71.4515 35.2075H71.2843C64.5044 35.2075 62.9675 27.3747 62.9512 27.2969L62.5435 27.3747C62.5394 27.4566 64.1416 35.6295 71.268 35.6295Z",fill:"#251138"}),e.createElement("path",{d:"M71.6423 35.4185L71.2227 35.4335L73.5034 99.7756L73.9231 99.7606L71.6423 35.4185Z",fill:"#251138"}),e.createElement("path",{d:"M73.8814 43.831C74.2619 43.831 74.5704 43.521 74.5704 43.1386C74.5704 42.7563 74.2619 42.4463 73.8814 42.4463C73.5009 42.4463 73.1924 42.7563 73.1924 43.1386C73.1924 43.521 73.5009 43.831 73.8814 43.831Z",fill:"black"}),e.createElement("path",{d:"M74.4034 53.8145C74.7839 53.8145 75.0923 53.5045 75.0923 53.1221C75.0923 52.7398 74.7839 52.4298 74.4034 52.4298C74.0228 52.4298 73.7144 52.7398 73.7144 53.1221C73.7144 53.5045 74.0228 53.8145 74.4034 53.8145Z",fill:"black"}),e.createElement("path",{d:"M74.9292 63.7979C75.3097 63.7979 75.6182 63.4879 75.6182 63.1056C75.6182 62.7232 75.3097 62.4132 74.9292 62.4132C74.5487 62.4132 74.2402 62.7232 74.2402 63.1056C74.2402 63.4879 74.5487 63.7979 74.9292 63.7979Z",fill:"black"}),e.createElement("path",{d:"M75.4507 73.7815C75.8312 73.7815 76.1397 73.4716 76.1397 73.0892C76.1397 72.7068 75.8312 72.3969 75.4507 72.3969C75.0702 72.3969 74.7617 72.7068 74.7617 73.0892C74.7617 73.4716 75.0702 73.7815 75.4507 73.7815Z",fill:"black"}),e.createElement("path",{d:"M75.9766 83.7691C76.3571 83.7691 76.6656 83.4591 76.6656 83.0767C76.6656 82.6944 76.3571 82.3844 75.9766 82.3844C75.5961 82.3844 75.2876 82.6944 75.2876 83.0767C75.2876 83.4591 75.5961 83.7691 75.9766 83.7691Z",fill:"black"}),e.createElement("path",{d:"M76.4986 93.7526C76.8791 93.7526 77.1876 93.4426 77.1876 93.0603C77.1876 92.6779 76.8791 92.3679 76.4986 92.3679C76.118 92.3679 75.8096 92.6779 75.8096 93.0603C75.8096 93.4426 76.118 93.7526 76.4986 93.7526Z",fill:"#001065"}),e.createElement("path",{d:"M142.76 74.9326L141.032 85.7437L136.135 85.7519L138.068 74.0232L142.76 74.9326Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M57.3659 101.889L47.7933 107.132L44.6582 103.036C47.1655 101.397 54.3449 96.8089 54.7689 96.6819L57.3659 101.889Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M35.9829 66.9195L40.231 67.4848V67.0629L35.9829 66.4976V66.9195Z",fill:"#251138"}),e.createElement("path",{d:"M102.222 66.5607L97.7969 71.0072L98.0938 71.3056L102.519 66.859L102.222 66.5607Z",fill:"#251138"}),e.createElement("path",{d:"M93.8744 83.7692L88.9658 84.8548L81.0566 34.7405L87.5633 33.0896L90.6618 36.7602L93.8744 83.7692Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M47.8725 59.6533L47.3169 82.8295L47.8793 82.8431L48.435 59.6669L47.8725 59.6533Z",fill:"#251138"}),e.createElement("path",{d:"M95.7976 85.5249L95.3252 85.5464L95.7806 95.663L96.2531 95.6415L95.7976 85.5249Z",fill:"#251138"}),e.createElement("circle",{cx:"137.5",cy:"37.3126",r:"23.2143",fill:"#B4DD64"}),e.createElement("path",{d:"M136.527 50.5319C136.019 50.5481 135.512 50.4482 135.037 50.2384C134.561 50.0286 134.127 49.7131 133.759 49.3109L125.266 38.96C124.907 38.5683 124.62 38.1019 124.42 37.5873C124.22 37.0728 124.111 36.5202 124.099 35.9611C124.088 35.402 124.175 34.8474 124.354 34.3289C124.533 33.8104 124.802 33.3382 125.144 32.9392C125.487 32.5402 125.896 32.2223 126.35 32.0036C126.804 31.7849 127.292 31.6697 127.788 31.6646C128.284 31.6594 128.777 31.7644 129.239 31.9736C129.701 32.1828 130.124 32.4921 130.482 32.8838L136.415 40.4491L164.73 11.5998C165.476 10.9084 166.433 10.5711 167.403 10.6581C168.372 10.7451 169.28 11.2496 169.937 12.0668C170.595 12.884 170.951 13.9511 170.932 15.0463C170.913 16.1416 170.52 17.1807 169.836 17.9479L138.911 49.4528C138.258 50.1197 137.414 50.5019 136.527 50.5319Z",fill:"#128749"})),E=({question:n,formValues:t,onChangeHandler:r,autoFocusInput:o})=>{switch(n.type_info.question_type){case"RANGE":return e.createElement(s,{type_info:n.type_info,onChangeHandler:r,npsValue:t[n.name]});case"CHECKBOX":case"MULTI_SELECT":return e.createElement(h,{autoFocusGroup:o,values:t[n.name],options:n.type_info.choices,onChangeHandler:r,othersOption:n.type_info.meta?.othersOption,othersRequired:n.type_info.meta?.othersRequired});case"RADIO":case"DROPDOWN":return e.createElement(b,{autoFocusGroup:o,name:n.name,onChangeHandler:r,options:n.type_info.choices,value:t[n.name],othersOption:n.type_info.meta?.othersOption,othersRequired:n.type_info.meta?.othersRequired});case"INPUT":case"TEXT":return n.type_info?.meta?.readOnly?e.createElement("div",{className:"message-container"},n.type_info?.meta?.value):e.createElement("div",{className:"responsive-text-field"},e.createElement(p,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:n.is_required,value:t[n.name]||"",placeholder:n.type_info?.meta?.placeholder??"",onChange:e=>r(e.target.value)}),e.createElement(m,{autoFocusInput:o,label:"",maxLength:300,showCount:!0,isRequired:n.is_required,placeholder:n.type_info?.meta?.placeholder??"",value:t[n.name]||"",onChange:e=>r(e.target.value)}));case"PARAGRAPH":return e.createElement(m,{autoFocusInput:o,label:"",isRequired:n.is_required,placeholder:n.type_info?.meta?.placeholder??"",value:t[n.name]||"",onChange:e=>r(e.target.value)});default:return console.error(`Question type ${n.type_info.question_type} not found`),null}};i(":root {\n --default-brand-color: #264966;\n --default-question-text-color: #000;\n --default-question-background-color: #fff;\n --default-background-color: #ebeff3;\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-step-navigation {\n box-shadow: 0px 2px 5px rgba(18, 52, 77, 0.1);\n}\n.freemium-survey-step-navigation .navigation-button {\n width: 32px;\n text-align: -webkit-center;\n height: 32px;\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 #d9d9d9;\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\n.freemium-survey-components .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: 0 1px 3px 0 rgba(18, 52, 77, 0.2);\n margin-bottom: 28px;\n padding: 28px;\n grid-gap: 28px;\n gap: 28px;\n position: relative;\n}\n.freemium-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 color: var(--default-question-text-color);\n color: var(--question-text-color, var(--default-question-text-color));\n}\n.freemium-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}\n@-webkit-keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes opac {\n 0%, 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.freemium-survey-components .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 .question-footer:empty {\n display: none;\n}\n.freemium-survey-components .action-buttons {\n display: flex;\n grid-gap: 20px;\n gap: 20px;\n flex-direction: row-reverse;\n}\n.freemium-survey-components .action-buttons:empty {\n display: none;\n}\n.freemium-survey-components .skip-button {\n font-weight: 400;\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}\n.freemium-survey-components .skip-button:hover {\n background-color: #f3f3f3;\n}\n.freemium-survey-components .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 .submit {\n max-width: 700px;\n margin: 0 auto;\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 .thankyou {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.freemium-survey-components .thankyou .text {\n white-space: pre-wrap;\n font-weight: 500;\n font-size: 1.2rem;\n line-height: 2;\n color: #12344d;\n}\n.freemium-survey-components .thankyou .redirection-text {\n color: #929292;\n margin-bottom: 12px;\n font-weight: 300;\n}\n.freemium-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 .responsive-text-field {\n width: 100%;\n}\n.freemium-survey-components .responsive-text-field .textarea-container {\n display: none;\n}\n.freemium-survey-components .message-container:empty {\n display: none;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-component .responsive-text-field .input-container,\n.card-survey-style .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-component .responsive-text-field .textarea-container,\n.card-survey-style .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components,\ndiv.card-survey-style {\n display: flex;\n flex-direction: column;\n grid-gap: 28px;\n gap: 28px;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\n}\ndiv.widget-survey-components .questions,\ndiv.card-survey-style .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n position: relative;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text,\ndiv.card-survey-style .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container,\ndiv.card-survey-style .question-container {\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .question-footer,\ndiv.card-survey-style .question-footer {\n margin: 0px auto;\n justify-content: space-between;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n padding-bottom: 20px;\n}\ndiv.widget-survey-components .submit,\ndiv.card-survey-style .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer,\ndiv.card-survey-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices,\ndiv.card-survey-style .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group,\ndiv.card-survey-style .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group,\ndiv.card-survey-style .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou,\ndiv.card-survey-style div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components div.thankyou svg,\ndiv.card-survey-style div.thankyou svg {\n width: 140px;\n height: 120px;\n}\n\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n border-radius: 0;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 3px 0 0 0;\n}\ndiv.widget-survey-components .textarea-container .end-max-length {\n padding: 4px;\n}\ndiv.widget-survey-components .responsive-text-field .input-container {\n display: none;\n}\ndiv.widget-survey-components .responsive-text-field .textarea-container {\n display: flex;\n}\n\ndiv.widget-survey-components.default-style .freemium-survey-step-navigation {\n margin: 0;\n}\ndiv.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\ndiv.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\ndiv.widget-survey-components.default-style .question-footer {\n justify-content: space-between;\n}\ndiv.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\ndiv.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\ndiv.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\ndiv.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\ndiv.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\ndiv.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\n\n.widget-survey-components.cozy-style .freemium-survey-step-navigation {\n margin: 0;\n}\n.widget-survey-components.cozy-style .questions {\n max-height: 380px;\n max-height: var(--cozy-widget-max-height);\n}\n.widget-survey-components.cozy-style .question-text {\n font-size: 1rem;\n}\n.widget-survey-components.cozy-style .question-text.nps {\n text-align: center;\n width: 60%;\n min-width: 600px;\n margin: auto;\n}\n.widget-survey-components.cozy-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.cozy-style .question-footer {\n justify-content: space-between;\n}\n.widget-survey-components.cozy-style .nps-container {\n grid-gap: 44px;\n gap: 44px;\n}\n.widget-survey-components.cozy-style .nps-container .widget {\n display: flex;\n justify-content: center;\n}\n.widget-survey-components.cozy-style .nps-container .button-container {\n width: 60%;\n min-width: 600px;\n margin: 0 auto;\n}\n.widget-survey-components.cozy-style .nps-container .button-container .choices {\n justify-content: space-around;\n}\n.widget-survey-components.cozy-style .nps-container .footer {\n padding-top: 8px;\n}\n.widget-survey-components.cozy-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.cozy-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.cozy-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.cozy-style textarea {\n min-height: 60px;\n}\n.widget-survey-components.cozy-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}");const L=["RANGE","NPS","RADIO","DROPDOWN"],q=200,_=1e4,N=({thankYouQuestion:n,preview:t})=>(r((()=>{t||n.type_info.meta?.redirectUrl&&setTimeout((()=>{window.location.href=n.type_info.meta?.redirectUrl}),1e4)}),[]),e.createElement("div",{className:"question-container thankyou"},e.createElement(k,null),e.createElement("div",{className:"text"},n.text),n.type_info.meta?.redirectUrl&&e.createElement("div",{style:{width:"100%"}},e.createElement("div",{className:"redirection-text"},"You will be redirected to the below URL automatically in 10 seconds.",e.createElement("br",null)),e.createElement("a",{className:"link",href:n.type_info.meta?.redirectUrl},n?.type_info.meta?.redirectUrl)))),z=()=>e.createElement("svg",{style:{display:"block"},width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.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"})),M=()=>e.createElement("svg",{style:{display:"block"},width:"9",height:"14",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.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"})),Z=({currentBlockIndex:n,currentBlockIndexOfBlocksWithQns:t,blocksWithQns:r,blocks:o,setHorizontalScrollUnits:a})=>e.createElement("div",{className:"freemium-survey-step-navigation","data-navigation-element":"1"},e.createElement("button",{disabled:0==t.current,className:"navigation-button",onClick:()=>{t.current=Math.max(t.current-1,0),n.current=o.findIndex((e=>e.name===r[t.current].name)),a(t.current)}},e.createElement(M,null)),e.createElement("button",{className:"navigation-button",disabled:t.current>=r.length-1,onClick:()=>{t.current=Math.min(t.current+1,r.length-1),n.current=o.findIndex((e=>e.name===r[t.current].name)),a(t.current)}},e.createElement(z,null))),S=({widget:n,widgetStyle:t,surveyStyle:r,formValues:o,blocksWithQns:a,blocks:i,thankYouQuestion:s,currentBlockIndexOfBlocksWithQns:c,currentBlockIndexOfBlocks:l,currentEditingBlock:u,isSubmitting:d,isValuesCommitted:p,isCurrentBlockFinal:m,setHorizontalScrollUnits:f,handleFormValues:h,skipBlock:v,setIsSubmitting:b,onSubmit:x,setIsSurveyCompleted:y,...g})=>{const C=g.blockIndex??c.current,k=g.question??a[C].question,E=()=>k.name===u.current.question.name&&!L.includes(k.type_info.question_type)&&!m(),q=()=>"RANGE"!==k.type_info.question_type&&!k.required&&k.name===u.current.question.name&&!m(),_=()=>"DROPDOWN"===k.type_info.question_type&&k.name!==u.current.question.name&&!k.required&&null!=o[k.name],N=()=>m()&&(n||"classic"!==r)&&k.name===u.current.question.name;return e.createElement("div",{className:"question-footer"},!(!n&&"classic"===r||0===C&&!o[k.name]||"compact"===t)&&e.createElement(Z,{currentBlockIndex:l,currentBlockIndexOfBlocksWithQns:c,blocksWithQns:a,blocks:i,setHorizontalScrollUnits:f}),(E()||_()||q()||N())&&e.createElement("div",{className:"action-buttons"},E()&&e.createElement(w,{onClick:()=>{h(a[C],null,!0)},disabled:!o[u.current.question.name]||Array.isArray(o[u.current.question.name])&&0===o[u.current.question.name].length,className:"next-button"},"Next"),q()&&e.createElement("button",{className:"skip-button",onClick:()=>v(k)},"Skip"),_()&&e.createElement("button",{className:"skip-button",onClick:()=>{u.current=a[C],l.current=i.findIndex((e=>e.name===a[C].name)),v(k)}},"Clear selection"),N()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:(u.current.question.required||u.current.question.type_info.pivot_question)&&void 0===o[u.current.question.name]||d,onClick:()=>{b(!0),x(o,(()=>{s?.type_info.meta?.skipThankYouPage||y(!0)}))}},d?"Submitting":"Submit Survey"))))},B=({survey:t,surveyStyle:i="classic",placeholders:s,onSubmit:c,widget:l,npsValue:u,widgetStyle:d,widgetNavigatorQuerySelector:p,preview:m,mobilePreview:f})=>{const{meta:{blocks:h},question_details:{questions:v}}=t,[b,x]=o(null),[g,C]=o({}),[k,_]=o(!1),[z,M]=o([]),[B,F]=o(0),[I,H]=o(!1),[O,D]=o(null),$=n(null),R=n(null),T=n(-1),V=n(null),A=n(0),j=n(0),Q=n(!1),U=n([]),W=n(null),Y=n([]);r((()=>{h&&(W.current=h.find((e=>"TY"===e.name)),x(h.filter((e=>"TY"!==e.name))))}),[h]),r((()=>{if(b)if(R.current=v.find((e=>e.pivot_question))??v.find((e=>"RANGE"===e.type_info.question_type))??v[0],null!=u){T.current=u;const e=v.find((e=>e.name===b[0].question_names[0]));$.current={...b[0],question:e},U.current=[...U.current,{...b[0],question:e}],M(U.current),C({Q_1:u})}else if(!$.current&&b.length>0)return $.current=b[0],void X(b[0])}),[b,u]),e.useEffect((()=>{l||"classic"!==i||V.current?.scrollIntoView({block:"center",behavior:"smooth"}),z.length&&(U.current=z,j.current=z.length-1),V.current&&(V.current.style.maxHeight="unset"),Y.current[A.current]=V.current?.scrollHeight||Y.current[A.current]||0,F(z.length-1),V.current&&(V.current.style.maxHeight="100%")}),[z]),r((()=>{Object.keys(g).length>0&&$.current.question&&(L.includes($.current.question.type_info.question_type)||Q.current)&&!P()&&J()}),[g]),r((()=>{if(null!=g?.[R.current?.name])if(W.current?.is_based_on_score){const e=R.current?.type_info?.choices[g?.[R.current?.name]]?.dependent_question_names,n=W.current?.question_names.find((n=>e?.includes(n))),t=v.find((e=>e.name===n));D(t)}else{const e=v.find((e=>e.name==W.current?.question_names[0]));D(e)}}),[g?.[R.current?.name]]);const P=()=>A.current===b.length-1||"end"===$.current.branchOption,G=e=>{if(e){let n={"{{nps.score}}":T.current};s&&(n={...n,...s});const t=new RegExp(Object.keys(n).join("|"),"gi");e=e.replace(t,(function(e){return n[e.toLowerCase()]}))}return e},X=e=>{let n={};if(e.is_based_on_score){const t=R.current?.type_info?.choices[g?.[R.current?.name]]?.dependent_question_names,r=e.question_names.find((e=>t?.includes(e)));n=v.find((e=>e.name===r))}else n=v.find((n=>n.name===e.question_names[0]));$.current.question=n;const t=U.current.find((e=>e.question.name===n.name));M(t?[...U.current]:[...U.current,{...e,question:n}])},J=()=>{if(P())_(!0);else{if($.current.nextBlock)A.current=b.findIndex((e=>e.name===$.current.nextBlock));else if($.current.question.type_info?.meta?.branches){const e=$.current.question.type_info?.meta?.branches,n=g[$.current.question.name];let t;if(t="RANGE"===$.current.question.type_info.question_type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock){if("TY"===t.nextBlock)return void _(!0);A.current=b.findIndex((e=>e.name===t.nextBlock))}else A.current+=1}else A.current+=1;$.current=b[A.current],X(b[A.current])}},K=e=>{Q.current=!0,delete g[e.name],C({...g})},ee=(e,n,t)=>{if(t){if(Q.current=!0,null!=g[e.question.name]&&e.name!==z[z.length-1].name){const[t,r]=(e=>{const n=z.findIndex((n=>n.name===e.name)),t=z.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=g[n.question.name],e)),{});return A.current=b.findIndex((n=>n.name===e.name)),[t,r]})(e);C({...r,...null!=n&&{[e.question.name]:n}}),U.current=t}else C({...g,...null!=n&&{[e.question.name]:n}});R?.current?.name==e?.question?.name&&(T.current=n)}else C({...g,...null!=n&&{[e.question.name]:n}})};return $.current&&$.current.question?k?e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style`},e.createElement(N,{thankYouQuestion:O,preview:m})):e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style ${f?"mobile-preview":""} ${i}-survey-style`},e.createElement(y,{totalSteps:b.length,completedSteps:A.current}),l&&"compact"===d&&document.querySelector(p)&&e.createElement(e.Fragment,null,a.createPortal(e.createElement(Z,{currentBlockIndex:A,currentBlockIndexOfBlocksWithQns:j,blocksWithQns:z,setHorizontalScrollUnits:F}),document.querySelector(p))),e.createElement("div",{style:l||"card"===i?{transform:`translateX(calc(-${B} * 100%))`,height:`${Y.current[A.current]}px`,transition:z?.length>1?`all ${q}ms ease-out 0ms`:`transform ${q}ms ease-out 0ms`}:{},className:"questions"},z.map(((n,t)=>e.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(l||"card"===i)&&j.current!==t?0:1},ref:V,id:n.question.name,key:n.question.name},e.createElement("div",{className:"question-text "+(0===t?"nps":""),dangerouslySetInnerHTML:{__html:G(n.question.text)},title:`question-${t}`,role:"heading","aria-level":1}),e.createElement(E,{question:n.question,formValues:g,autoFocusInput:$.current.name===n.name,onChangeHandler:e=>{Q.current=!1,A.current=b.findIndex((e=>e.name===n.name)),$.current=n,ee(n,e,L.includes(n.question.type_info.question_type)&&!P())}}),("classic"===i||l)&&e.createElement(S,{question:n.question,blockIndex:t,widget:l,widgetStyle:d,surveyStyle:i,formValues:g,blocksWithQns:z,blocks:b,thankYouQuestion:O,currentBlockIndexOfBlocksWithQns:j,currentBlockIndexOfBlocks:A,currentEditingBlock:$,isSubmitting:I,isValuesCommitted:Q,isCurrentBlockFinal:P,setHorizontalScrollUnits:F,handleFormValues:ee,skipBlock:K,setIsSubmitting:H,onSubmit:c,setIsSurveyCompleted:_})))),!l&&"card"!==i&&P()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:$.current.question.required&&void 0===g[$.current.question.name]||I,onClick:()=>{H(!0),c(g,(()=>{m||O?.type_info.meta?.skipThankYouPage&&(window.location.href=O?.type_info.meta?.redirectUrl),O?.type_info.meta?.skipThankYouPage||_(!0)}))}},I?"Submitting Survey":"Submit Survey"))),z.length&&"card"===i&&!l&&e.createElement(e.Fragment,null,e.createElement(S,{widget:l,widgetStyle:d,surveyStyle:i,formValues:g,blocksWithQns:z,blocks:b,thankYouQuestion:O,currentBlockIndexOfBlocksWithQns:j,currentBlockIndexOfBlocks:A,currentEditingBlock:$,isSubmitting:I,isValuesCommitted:Q,isCurrentBlockFinal:P,setHorizontalScrollUnits:F,handleFormValues:ee,skipBlock:K,setIsSubmitting:H,onSubmit:c,setIsSurveyCompleted:_}))):null},F=n=>{const{survey:t}=n,r=JSON.parse(JSON.stringify(t)),o=[],{question_details:{questions:a}}=r;a.forEach((e=>{const n=e.type_info?.meta?.block;n&&(n.question_names||(n.question_names=[e.name]),o.push(n))}));const i={...r,meta:{...r.meta,blocks:o}};return e.createElement(B,Object.assign({},n,{survey:i}))};export{_ as AUTO_REDIRECT_DELAY,C as BUTTON_SIZE_VARIANTS,w as Button,h as CheckboxGroup,p as Input,s as NPS,y as ProgressBar,x as Radio,b as RadioGroup,F as Survey,q as TRANSITION_DELAY,m as TextArea};
|