freemium-survey-components 0.9.2 → 0.9.5
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/lib/types/mock.d.ts +133 -202
- package/lib/types/survey/index.d.ts +2 -2
- 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 .widget {\n position: relative;\n}\n.freemium-survey-components .nps-container .widget .button-container {\n display: flex;\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 .widget .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 .widget .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 .widget span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .widget 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 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 .widget button:hover {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .widget.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .widget.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .widget.highlighted button:hover, .freemium-survey-components .nps-container .widget.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 .widget .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .widget.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .widget.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 .widget.standard .choice.active,\n.freemium-survey-components .nps-container .widget.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .widget .button-container {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .widget .button-container {\n background: transparent;\n }\n .freemium-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .widget .button-container {\n background: transparent;\n}\n.widget-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}");const a=e=>{const{type_info:{linear_scale:{button_shape:r,button_style:o},score_presets:{start:a,end:i},validation:{min:c},footer_text:s}}=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===c?1:0)},((e,n)=>n+c)));return t.createElement("div",{className:"nps-container"},t.createElement("div",{className:`widget ${r} ${o}`},t.createElement("div",{className:"button-container"},t.createElement("span",{className:"negative-text"},a),t.createElement("div",{className:"choices"},u.current.map((n=>t.createElement("button",{key:n,onClick:t=>{e.onChangeHandler(n)},className:`choice ${l(n)} ${e.npsValue===n&&"active"}`},n)))),t.createElement("span",{className:"positive-text"},i))),t.createElement("div",{className:"footer"},s))},i=(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 c={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocus:!0},s=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),L+20)}),[e.autoFocus]);const{inputStyle:a,style:i,className:c,showCount:s,isErrored:l,startLabel:u,isRequired:d,errorText:p,endLabel:m,maxLength:f,autoFocus:h,...C}=e;return t.createElement("div",{className:"input-container",style:i},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":""}${c||""}`},t.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:o,style:a},C)),s&&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.autoFocus&&setTimeout((()=>{o.current?.focus()}),L+20)}),[]);const{inputStyle:a,style:i,className:c,showCount:s,maxLength:l,isErrored:u,startLabel:d,isRequired:p,autoFocus:m,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:i},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":""} ${c||""}`},t.createElement("textarea",Object.assign({autoComplete:"off",ref:o,style:a},f)),s&&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=i(s,c),d=i(l,c);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,autoFocus:o,onChangeHandler:a,othersOption:i,othersRequired:c})=>{const s=(()=>{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);return t.createElement("div",{className:"checkbox-group"},r?.map(((n,r)=>t.createElement(f,{key:n.value,checked:e?.includes(n.value),name:n.value,id:n.value,autoFocus:0===r&&o,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))),i&&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[s],onChange:n=>{-1!==s?(e[s]=n.target.value,a(e)):a(e.concat(n.target.value))},label:""})))},f=i((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),L+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,autoFocus:a,onChangeHandler:i,othersOption:c,othersRequired:s})=>{const[l,d]=n.useState(""),[p,m]=n.useState("");return n.useEffect((()=>{o||(m(""),d(""))}),[o]),n.useEffect((()=>{p&&r.find((e=>e.value===p))&&i(p)}),[p]),t.createElement("div",{className:"radio-group"},r?.map(((n,r)=>t.createElement(C,{key:n.value,value:n.value,name:e,onChange:e=>{m(e.currentTarget.value)},autoFocus:0===r&&a,checked:p===n.value},n.value))),c&&t.createElement(C,{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(b,{disabled:s&&0===l.length,onClick:()=>i(l)},"Next")))},C=i((e=>{const r=n.useRef(null);return n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{r.current?.focus()}),L+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}");const g=()=>t.createElement(t.Fragment,null,"..."),b=e=>{const{inline:n=!1,children:r,disabled:o,className:a="",htmlType:i,type:c="primary",onClick:s,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:i,onClick:s},p),d?t.createElement(g,null):r)},v=()=>t.createElement("svg",{width:"200",height:"182",viewBox:"0 0 200 182",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{"clip-path":"url(#clip0_5504_25779)"},t.createElement("g",{opacity:"0.8"},t.createElement("path",{opacity:"0.8",d:"M165.375 76.3154C165.375 77.0026 165.375 77.6857 165.342 78.3729C165.342 78.9202 165.305 79.4634 165.276 80.019C165.039 84.6023 164.35 89.1511 163.219 93.599C162.483 96.5028 161.558 99.3552 160.449 102.138C158.518 106.993 156.047 111.616 153.083 115.919C152.627 116.586 152.153 117.245 151.672 117.895C149.529 120.792 147.165 123.519 144.602 126.051C143.702 126.94 142.779 127.804 141.832 128.644C136.335 133.522 130.104 137.505 123.368 140.446C122.458 140.857 121.532 141.223 120.598 141.582C114.818 143.816 108.764 145.265 102.599 145.89C101.677 145.985 100.755 146.063 99.8292 146.116C98.3752 146.207 96.913 146.252 95.4425 146.252C89.6055 146.257 83.7909 145.531 78.1342 144.092C77.2014 143.856 76.2783 143.601 75.3647 143.326C68.9961 141.419 62.9333 138.61 57.361 134.985C56.4227 134.372 55.4968 133.75 54.5915 133.088C51.0031 130.499 47.6661 127.578 44.6246 124.364C44.0759 123.782 43.5368 123.192 43.0073 122.594C40.6559 119.932 38.5099 117.096 36.5877 114.109C35.6083 112.583 34.6851 111.017 33.8182 109.409C28.597 99.7056 25.7564 88.9001 25.5303 77.8832C25.5303 77.3647 25.5303 76.838 25.5303 76.3154C25.5167 65.5894 27.9828 55.0054 32.7359 45.3901C32.9335 44.9786 33.1475 44.567 33.3491 44.1555C33.5096 43.8428 33.6742 43.53 33.8388 43.2214C34.703 41.6165 35.6261 40.05 36.6083 38.5219C41.2923 31.2474 47.2786 24.8998 54.2664 19.798L54.612 19.547C54.9001 19.3371 55.1882 19.1355 55.4803 18.9297C56.1058 18.4935 56.7396 18.0655 57.3815 17.6458C62.9478 14.0235 69.0035 11.216 75.3647 9.30851C76.2783 9.03416 77.2014 8.77903 78.1342 8.54309C83.7911 7.10508 89.6057 6.38067 95.4425 6.38676C96.9157 6.38676 98.378 6.43202 99.8292 6.52256C100.757 6.58017 101.68 6.65561 102.599 6.74889C108.764 7.37169 114.818 8.81801 120.598 11.0492C121.532 11.4072 122.458 11.7858 123.368 12.185C128.019 14.2174 132.434 16.7508 136.536 19.7404C136.948 20.0285 137.326 20.3206 137.713 20.6169C139.126 21.6869 140.498 22.8103 141.828 23.9872C142.775 24.8267 143.698 25.6923 144.598 26.5839C148.891 30.8221 152.617 35.5983 155.684 40.7935C155.927 41.205 156.161 41.6165 156.392 42.028C159.408 47.3707 161.702 53.0899 163.215 59.0359C164.651 64.6834 165.377 70.4881 165.375 76.3154Z",fill:"#F4F4F4"})),t.createElement("path",{d:"M137.75 20.6126C133.225 23.0657 128.514 25.1586 123.66 26.8717C114.533 30.1296 104.92 31.8174 95.2285 31.8634C88.4636 31.8759 81.7275 30.9818 75.2001 29.205C67.7764 27.1585 60.7097 23.9874 54.2458 19.8019L54.5915 19.5509C54.8796 19.341 55.1676 19.1394 55.4598 18.9336C61.6723 22.8973 68.4424 25.91 75.5458 27.8717C95.4466 33.3242 117.002 30.1885 136.553 19.736C136.948 20.0241 137.339 20.3163 137.75 20.6126Z",fill:"white"}),t.createElement("path",{d:"M156.396 42.0196C153.652 43.6656 150.847 45.2102 147.98 46.6532C133.95 53.7623 118.704 58.1601 103.043 59.6159C99.3093 59.9588 95.5686 60.1303 91.8211 60.1303C83.9243 60.13 76.0458 59.3693 68.2948 57.8587C58.6763 55.9698 49.2998 53.009 40.3407 49.0318C37.7646 47.8932 35.2228 46.6738 32.7153 45.3734C32.9129 44.9619 33.1268 44.5504 33.3285 44.1389C50.2664 52.937 74.1713 60.8587 102.92 58.2167C124.853 56.2003 142.75 48.505 155.688 40.7686C155.931 41.1965 156.165 41.608 156.396 42.0196Z",fill:"white"}),t.createElement("path",{d:"M165.342 78.3687C165.342 78.9161 165.305 79.4593 165.276 80.0148C162.079 81.5786 158.832 83.0394 155.565 84.381C136.549 92.1997 116.985 96.1338 97.2572 96.1338C93.2024 96.1338 89.1421 95.9665 85.0764 95.6318C64.2199 93.8738 43.9495 87.8361 25.5303 77.8955C25.5303 77.377 25.5303 76.8503 25.5303 76.3276C43.9568 86.3909 64.2791 92.5016 85.1998 94.2697C117.998 96.9198 145.688 88.0558 165.342 78.3687Z",fill:"white"}),t.createElement("path",{d:"M153.083 115.919C152.626 116.586 152.153 117.245 151.672 117.895C133.336 124.374 114.133 128.07 94.7017 128.857C92.101 128.964 89.4947 129.017 86.883 129.014C72.6689 129.01 58.4981 127.448 44.6246 124.355C44.0759 123.774 43.5368 123.184 43.0073 122.586C57.372 125.94 72.0744 127.633 86.8254 127.631C89.4014 127.631 92.0022 127.582 94.6441 127.475C114.603 126.66 134.316 122.763 153.083 115.919Z",fill:"white"}),t.createElement("path",{d:"M4.74072 180.173C9.21388 174.655 16.4689 167.573 26.8966 164.947C41.0404 161.375 47.3612 169.441 64.2868 167.717C82.1959 165.894 81.9572 156.166 97.5207 155.256C116.187 154.162 118.179 168.058 140.45 169.104C156.215 169.844 162.33 163.211 175.066 167.717C183.671 170.762 189.469 176.824 193.07 181.564L4.74072 180.173Z",fill:"#F4F4F4"}),t.createElement("path",{d:"M50.9208 180.173H47.353C45.0711 177.41 42.9404 174.525 40.9704 171.531C38.8552 168.178 38.6001 166.692 39.1227 166.116C40.0733 165.066 43.7975 166.782 45.9703 168.494C48.0613 170.182 49.5663 172.486 50.2706 175.079C50.7504 176.733 50.9697 178.452 50.9208 180.173Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M49.2129 180.482C49.1415 180.481 49.0725 180.456 49.0178 180.41C48.963 180.364 48.9258 180.301 48.9124 180.231C48.3854 177.421 47.2258 174.769 45.5216 172.474C44.4001 170.976 43.0569 169.658 41.5381 168.564C41.4715 168.516 41.4268 168.444 41.4136 168.363C41.4005 168.282 41.4201 168.199 41.4682 168.132C41.5162 168.066 41.5887 168.021 41.6697 168.008C41.7507 167.995 41.8337 168.014 41.9002 168.062C43.4679 169.194 44.8553 170.557 46.0154 172.103C47.7741 174.475 48.9716 177.214 49.5174 180.116C49.5318 180.196 49.5139 180.278 49.4677 180.346C49.4214 180.413 49.3505 180.459 49.2705 180.474L49.2129 180.482Z",fill:"#30354F"}),t.createElement("path",{d:"M54.114 180.214C60.8917 160.626 60.9246 154.91 59.1674 153.988C57.2703 152.989 52.8589 157.371 50.6532 160.943C45.4146 169.428 49.1717 178.939 49.6944 180.194L54.114 180.214Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M52.1553 179.972C52.0833 179.972 52.0133 179.947 51.9577 179.901C51.9021 179.855 51.8643 179.791 51.8508 179.72C51.0407 175.21 51.2972 170.572 52.5998 166.178C53.4404 163.385 54.7017 160.738 56.3404 158.326C56.3882 158.263 56.4583 158.221 56.5361 158.208C56.614 158.195 56.6938 158.213 56.7592 158.257C56.8245 158.301 56.8704 158.369 56.8874 158.446C56.9045 158.523 56.8913 158.604 56.8507 158.672C55.2471 161.032 54.0121 163.622 53.1882 166.355C51.9084 170.663 51.6575 175.211 52.4557 179.634C52.4689 179.714 52.4499 179.796 52.4029 179.863C52.3559 179.929 52.2847 179.974 52.2047 179.988L52.1553 179.972Z",fill:"#30354F"}),t.createElement("path",{d:"M194.93 180.305H0.740725C0.331634 180.305 0 180.636 0 181.045C0 181.455 0.331634 181.786 0.740725 181.786H194.93C195.339 181.786 195.671 181.455 195.671 181.045C195.671 180.636 195.339 180.305 194.93 180.305Z",fill:"#5F6386"}),t.createElement("path",{d:"M36.1433 91.6608L25.0942 101.562L24.1106 102.294L24.7197 103.529L40.0321 134.034L42.8757 139.717L32.4026 145.376L28.9871 140.952L2.55552 106.698C1.69055 105.548 1.06504 104.237 0.716056 102.842C0.510627 101.972 0.412505 101.081 0.423881 100.187C0.384408 98.8303 0.623282 97.4796 1.12578 96.2184C1.62828 94.9572 2.38375 93.8122 3.34563 92.8542L32.4479 64.6367C32.4479 64.6367 52.2829 50.3612 79.5293 64.5626",fill:"#D0D3D9"}),t.createElement("path",{d:"M36.1433 91.6608L25.0942 101.562L24.1106 102.294L24.7197 103.529L40.0321 134.034L42.8757 139.717L32.4026 145.376L28.9871 140.952L2.55552 106.698C1.69055 105.548 1.06504 104.237 0.716056 102.842C0.510627 101.972 0.412505 101.081 0.423881 100.187C0.384408 98.8303 0.623282 97.4796 1.12578 96.2184C1.62828 94.9572 2.38375 93.8122 3.34563 92.8542L32.4479 64.6367C32.4479 64.6367 52.2829 50.3612 79.5293 64.5626",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),t.createElement("path",{d:"M86.3356 180.243H60.5007C59.9946 166.515 59.3279 152.725 58.5172 139.87C58.3883 137.829 58.2511 135.812 58.1057 133.82L59.5419 133.775L85.0558 132.952C85.9241 146.302 86.3109 162.799 86.3356 180.243Z",fill:"#5D6476"}),t.createElement("path",{d:"M60.1181 130.277C59.9411 131.421 59.7518 132.586 59.5584 133.775C59.2319 135.75 58.8849 137.782 58.5173 139.87C56.3856 152.005 53.5503 165.882 50.3281 180.243H24.2793C26.6414 168.112 28.7278 156.643 30.9211 142.948C31.4931 139.372 39.6123 137.187 40.1349 133.734L39.5177 131.895L60.1181 130.277Z",fill:"#5D6476"}),t.createElement("path",{d:"M72.3442 160.865L49.0237 160.56L55.682 137.038L66.7435 135.092L72.3442 160.865Z",fill:"#5D6476"}),t.createElement("path",{d:"M57.7066 149.915L64.2743 149.153L61.8999 133.895L61.4472 133.964L63.7476 148.75L57.6531 149.458L57.7066 149.915Z",fill:"#251138"}),t.createElement("path",{d:"M85.8295 156.717L86.1217 156.363L83.1505 153.898L81.4304 133.03L80.9736 133.067L82.7061 154.129L85.8295 156.717Z",fill:"#251138"}),t.createElement("path",{d:"M28.3615 158.268L32.847 156.672L37.4642 136.52L37.0156 136.425L32.4519 156.326L28.2092 157.836L28.3615 158.268Z",fill:"#251138"}),t.createElement("path",{d:"M148.956 117.43C149.063 115.063 144.894 113.681 141.281 112.858C142.828 111.562 144.018 109.92 143.618 109.08C143.042 107.874 139.405 108.784 137.071 109.903C136.656 110.099 136.259 110.329 135.882 110.59C134.783 110.571 133.702 110.88 132.779 111.478C131.856 112.075 131.132 112.934 130.7 113.945C130.268 114.956 130.146 116.073 130.352 117.153C130.557 118.234 131.08 119.228 131.853 120.01C132.099 120.254 132.366 120.476 132.652 120.672C133.843 121.776 135.328 122.51 136.927 122.788C140.73 123.504 148.709 122.804 148.956 117.43Z",fill:"#F3A268"}),t.createElement("path",{d:"M83.776 122.059C84.2966 122.149 84.8237 122.197 85.3521 122.203H93.3931L128.874 122.174H134.223L136.104 110.413L130.981 109.421L93.7387 102.191L93.3889 102.125L91.6277 101.784L90.7264 101.611L87.2039 100.924C86.6363 100.834 86.0625 100.788 85.4879 100.788C82.7871 100.77 80.1795 101.774 78.1884 103.599C76.1974 105.424 74.9701 107.935 74.7529 110.627C74.5358 113.319 75.3447 115.993 77.0175 118.114C78.6903 120.234 81.1032 121.644 83.7718 122.059H83.776Z",fill:"#D0D3D9",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),t.createElement("path",{d:"M85.3028 121.878H85.237C84.7555 121.974 84.2669 122.031 83.7761 122.047C81.6269 122.139 79.5053 121.536 77.7261 120.327C75.9469 119.118 74.6051 117.367 73.8998 115.335L61.6202 80.0724C61.0247 78.4131 60.7796 76.6483 60.9003 74.8895C61.0211 73.1307 61.5051 71.416 62.3217 69.8536C63.1384 68.2913 64.2701 66.9151 65.6453 65.8121C67.0205 64.709 68.6094 63.9029 70.3118 63.4447C72.0142 62.9865 73.793 62.8862 75.5361 63.15C77.2792 63.4138 78.9487 64.036 80.4393 64.9774C81.9299 65.9187 83.2091 67.1589 84.1964 68.6195C85.1836 70.08 85.8574 71.7294 86.1752 73.4635L91.315 100.117L91.6319 101.763L91.422 101.467",fill:"#D0D3D9"}),t.createElement("path",{d:"M85.3028 121.878H85.237C84.7555 121.974 84.2669 122.031 83.7761 122.047C81.6269 122.139 79.5053 121.536 77.7261 120.327C75.9469 119.118 74.6051 117.367 73.8998 115.335L61.6202 80.0724C61.0247 78.4131 60.7796 76.6483 60.9003 74.8895C61.0211 73.1307 61.5051 71.416 62.3217 69.8536C63.1384 68.2913 64.2701 66.9151 65.6453 65.8121C67.0205 64.709 68.6094 63.9029 70.3118 63.4447C72.0142 62.9865 73.793 62.8862 75.5361 63.15C77.2792 63.4138 78.9487 64.036 80.4393 64.9774C81.9299 65.9187 83.2091 67.1589 84.1964 68.6195C85.1836 70.08 85.8574 71.7294 86.1752 73.4635L91.315 100.117L91.6319 101.763L91.422 101.467",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),t.createElement("path",{d:"M33.6373 63.9987C44.8881 56.3939 64.2375 56.6449 79.4552 64.9492L81.1548 85.0229L83.3934 111.516L85.1959 132.796C77.7104 145.742 60.8013 137.507 41.9869 134.359C38.8512 133.833 37.6866 127.602 35.2298 123.919L32.7607 119.002L33.3327 93.459",fill:"#D0D3D9"}),t.createElement("path",{d:"M33.6373 63.9987C44.8881 56.3939 64.2375 56.6449 79.4552 64.9492L81.1548 85.0229L83.3934 111.516L85.1959 132.796C77.7104 145.742 60.8013 137.507 41.9869 134.359C38.8512 133.833 37.6866 127.602 35.2298 123.919L32.7607 119.002L33.3327 93.459",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),t.createElement("path",{d:"M82 121.5L78.5 65.5H80L82 69L88.5 121.5H82Z",fill:"#D0D3D9"}),t.createElement("path",{d:"M48.8139 35.2625C48.8781 34.7758 47.7574 34.2266 46.3108 34.0359C44.8643 33.8452 43.6396 34.0852 43.5754 34.5719C43.5112 35.0586 44.6319 35.6077 46.0785 35.7984C47.5251 35.9891 48.7498 35.7492 48.8139 35.2625Z",fill:"#202738"}),t.createElement("path",{d:"M47.0182 37.4299C47.3379 37.3254 47.2294 36.1164 46.7758 34.7296C46.3223 33.3428 45.6955 32.3033 45.3758 32.4079C45.056 32.5124 45.1645 33.7214 45.6181 35.1082C46.0716 36.495 46.6985 37.5345 47.0182 37.4299Z",fill:"#202738"}),t.createElement("path",{d:"M63.7517 60.8134C63.5541 64.1055 62.4431 67.8955 58.3608 67.698C51.2005 67.3523 49.468 59.8257 49.468 59.8257C49.468 59.8257 50.0524 49.0564 50.2211 48.9453H63.5212V56.118C63.7576 57.6712 63.8348 59.2445 63.7517 60.8134Z",fill:"#F3A268"}),t.createElement("path",{d:"M63.7518 60.8134C53.4639 58.6776 51.9907 53.2498 51.9907 53.2498L62.3362 48.9453H63.5213V56.118C63.7578 57.6712 63.835 59.2445 63.7518 60.8134Z",fill:"#E56542"}),t.createElement("path",{d:"M48.2705 45.0444C48.2705 45.0444 51.3569 60.1306 62.8669 57.0442C64.1746 56.6944 65.3669 56.0059 66.3236 55.0484C67.178 54.1893 67.7972 53.1251 68.122 51.9579C69.2824 47.7728 69.0767 40.9416 67.8298 32.02L48.2705 33.6661V45.0444Z",fill:"#F3A268"}),t.createElement("path",{d:"M47.5381 46.18C47.5792 46.18 49.8343 43.711 51.8055 47.0319C51.8055 47.0319 48.3241 45.3858 47.5792 46.18H47.5381Z",fill:"#F35757"}),t.createElement("path",{d:"M52.8879 39.6082C62.0317 41.2131 69.5583 38.9333 71.5295 33.4355C71.7091 32.9274 71.7625 32.3832 71.6851 31.8498C71.6076 31.3165 71.4017 30.81 71.0851 30.3739C70.7684 29.9378 70.3505 29.5852 69.8674 29.3464C69.3842 29.1077 68.8502 28.99 68.3115 29.0035C64.1099 29.1146 56.9866 30.6495 50.0485 31.8841C49.5312 31.9749 49.0287 32.1355 48.5547 32.3614C44.5013 34.3079 43.3614 38.0115 44.279 42.9579C45.8346 50.3117 48.2337 51.6326 50.818 51.5997C50.6534 47.2006 54.0031 43.748 52.8879 39.6082Z",fill:"#202738"}),t.createElement("path",{d:"M49.6286 50.9701C51.3172 50.9701 52.6861 49.2069 52.6861 47.0319C52.6861 44.8569 51.3172 43.0938 49.6286 43.0938C47.94 43.0938 46.571 44.8569 46.571 47.0319C46.571 49.2069 47.94 50.9701 49.6286 50.9701Z",fill:"#F3A268"}),t.createElement("path",{d:"M47.5382 46.4227C47.497 46.4433 49.6904 44.1059 51.3406 46.7314C51.3323 46.7149 48.9455 45.7026 47.5382 46.4227Z",fill:"#E56542"}),t.createElement("path",{d:"M45.1596 154.162C47.102 152.804 45.6535 148.656 44.0979 145.293C46.0691 145.726 48.0979 145.668 48.5176 144.837C49.1225 143.643 46.1802 141.318 43.8757 140.15C43.466 139.942 43.0409 139.765 42.6041 139.623C41.8988 138.664 40.9021 137.958 39.7628 137.612C38.6236 137.266 37.4029 137.297 36.2831 137.702C35.1633 138.107 34.2043 138.862 33.5495 139.857C32.8946 140.851 32.5789 142.031 32.6496 143.219C32.4995 144.835 32.8196 146.46 33.5714 147.898C35.3245 151.351 40.7482 157.248 45.1596 154.162Z",fill:"#F3A268"}),t.createElement("path",{d:"M58.0523 67.7022H58.2457C60.2662 67.6651 61.83 66.6652 62.8917 64.7269C63.8793 62.9245 64.1962 60.7394 64.2867 59.2291L63.8299 59.2003C63.3978 66.373 59.7765 67.2125 58.2374 67.2413H58.0564C50.6491 67.2413 48.9742 58.727 48.9578 58.6406L48.5051 58.727C48.5216 58.8258 50.2705 67.7022 58.0523 67.7022Z",fill:"#251138"}),t.createElement("path",{d:"M58.4638 67.4733L58.0032 67.4897L60.4935 137.403L60.9541 137.386L58.4638 67.4733Z",fill:"#251138"}),t.createElement("path",{d:"M60.9042 76.6116C61.3201 76.6116 61.6573 76.2744 61.6573 75.8585C61.6573 75.4426 61.3201 75.1055 60.9042 75.1055C60.4883 75.1055 60.1511 75.4426 60.1511 75.8585C60.1511 76.2744 60.4883 76.6116 60.9042 76.6116Z",fill:"black"}),t.createElement("path",{d:"M61.4762 87.4632C61.8921 87.4632 62.2293 87.126 62.2293 86.7101C62.2293 86.2942 61.8921 85.957 61.4762 85.957C61.0603 85.957 60.7231 86.2942 60.7231 86.7101C60.7231 87.126 61.0603 87.4632 61.4762 87.4632Z",fill:"black"}),t.createElement("path",{d:"M62.048 98.3108C62.4639 98.3108 62.8011 97.9737 62.8011 97.5578C62.8011 97.1419 62.4639 96.8047 62.048 96.8047C61.6321 96.8047 61.2949 97.1419 61.2949 97.5578C61.2949 97.9737 61.6321 98.3108 62.048 98.3108Z",fill:"black"}),t.createElement("path",{d:"M62.62 109.158C63.0359 109.158 63.3731 108.821 63.3731 108.405C63.3731 107.99 63.0359 107.652 62.62 107.652C62.2041 107.652 61.8669 107.99 61.8669 108.405C61.8669 108.821 62.2041 109.158 62.62 109.158Z",fill:"black"}),t.createElement("path",{d:"M63.192 120.01C63.6079 120.01 63.9451 119.673 63.9451 119.257C63.9451 118.841 63.6079 118.504 63.192 118.504C62.7761 118.504 62.439 118.841 62.439 119.257C62.439 119.673 62.7761 120.01 63.192 120.01Z",fill:"black"}),t.createElement("path",{d:"M63.7641 130.857C64.18 130.857 64.5171 130.52 64.5171 130.104C64.5171 129.688 64.18 129.351 63.7641 129.351C63.3481 129.351 63.011 129.688 63.011 130.104C63.011 130.52 63.3481 130.857 63.7641 130.857Z",fill:"#001065"}),t.createElement("path",{d:"M136.108 110.409L134.224 122.158L128.878 122.162L130.985 109.417L136.108 110.409Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M42.8757 139.717L32.4026 145.376L28.9871 140.927C31.7277 139.166 39.5671 134.158 40.028 134.022L42.8757 139.717Z",fill:"#DFE0E4"}),t.createElement("path",{d:"M19.5264 101.701L24.1682 102.319V101.858L19.5264 101.245V101.701Z",fill:"#251138"}),t.createElement("path",{d:"M91.8474 101.31L87.0142 106.144L87.3401 106.469L92.1733 101.636L91.8474 101.31Z",fill:"#251138"}),t.createElement("path",{d:"M151.128 58.7766C151.223 58.5915 150.989 58.4804 150.882 58.6491C149.647 60.5791 149.38 62.8589 149.124 65.1057C148.812 67.8629 148.635 70.6365 148.359 73.3936C147.351 83.27 143.964 92.7636 141.717 102.405C139.548 111.726 137.573 121.969 140.359 131.401C140.413 131.582 140.623 131.368 140.623 131.253C140.051 125.993 139.388 120.911 139.89 115.615C140.808 105.669 144.005 95.9816 146.474 86.3522C147.698 81.8261 148.558 77.2092 149.046 72.5459C149.458 68.0769 149.149 62.863 151.133 58.7561L151.128 58.7766Z",fill:"#E0E0E0"}),t.createElement("path",{d:"M152.775 60.7687C152.873 60.7234 152.956 60.4271 152.775 60.4683C151.59 60.7399 150.409 61.7645 150.767 63.0855C151.125 64.4065 153.038 64.7604 154.17 64.2953C154.82 64.0484 155.293 63.4147 154.705 62.8756C153.824 62.032 152.614 62.9291 152.285 63.7892C151.898 64.8139 152.116 66.1513 153.289 66.4434C153.836 66.5834 155.692 66.3899 155.347 65.4105C155.129 64.7439 154.199 65.0608 153.853 65.4105C152.738 66.5545 154.108 67.8796 155.129 68.3817C155.264 68.4516 155.375 68.1924 155.264 68.106C154.886 67.8878 154.552 67.6002 154.281 67.2582C154.425 66.0525 153.894 65.2212 152.664 64.7892L152.754 64.0896C153.063 63.9497 153.063 63.9085 152.754 63.9085C152.325 63.8882 151.913 63.7294 151.581 63.4559C150.664 62.4394 151.906 61.1473 152.783 60.7687H152.775Z",fill:"#E0E0E0"}),t.createElement("path",{d:"M168.071 41.1517C168.145 40.9419 167.898 40.9419 167.824 41.1106C166.351 44.4027 165.511 47.9664 164.301 51.2297C163.091 54.493 161.503 57.6205 160.388 60.9497C158.33 67.0483 157.474 73.435 156.12 79.6983C155.523 82.6843 154.664 85.6119 153.552 88.4471C152.404 91.2947 151.001 94.0231 149.668 96.7884C147.026 102.27 144.355 107.821 142.557 113.661C141.651 116.607 140.911 119.627 140.207 122.619C139.45 125.862 138.833 129.125 139.034 132.471C139.034 132.697 139.326 132.528 139.326 132.364C139.539 128.543 140.167 124.757 141.199 121.072C142.042 117.78 142.845 114.459 143.981 111.245C146.014 105.513 148.734 100.015 151.388 94.5539C152.705 91.9827 153.873 89.3377 154.886 86.6323C155.888 83.5888 156.673 80.4782 157.235 77.3238C158.503 70.9906 159.569 64.6451 161.853 58.5752C162.881 55.8634 164.207 53.2749 165.145 50.5343C166.19 47.4191 166.988 44.2299 168.079 41.1435L168.071 41.1517Z",fill:"#E0E0E0"}),t.createElement("path",{d:"M163.75 89.4636C163.865 89.2743 163.614 89.1632 163.503 89.3237C162.351 90.9698 161.663 92.764 160.733 94.5211C159.429 96.9902 157.404 98.9778 155.519 100.978C152.585 104.089 149.524 107.06 147.289 110.78C145.055 114.5 143.816 118.681 142.763 122.854C142.182 125.158 141.676 127.492 141.088 129.796C140.85 130.929 140.49 132.033 140.014 133.088C139.54 134.035 138.919 134.878 138.499 135.854C138.347 136.212 138.952 136.347 139.088 136.035C139.499 135.059 140.125 134.212 140.606 133.265C141.038 132.337 141.365 131.364 141.581 130.364C142.182 128.076 142.68 125.73 143.265 123.368C144.442 118.673 145.849 113.945 148.548 109.871C151.149 105.978 154.688 102.793 157.812 99.307C158.904 98.1412 159.887 96.8765 160.746 95.5293C161.919 93.5952 162.581 91.4142 163.758 89.4842L163.75 89.4636Z",fill:"#E0E0E0"}),t.createElement("path",{d:"M163.89 91.4018C163.976 91.2537 163.82 91.1179 163.709 91.2537C162.91 92.2454 162.622 93.6487 163.561 94.6857C164.133 95.3154 165.54 95.9738 166.289 95.0973C167.038 94.2207 165.877 93.5911 165.054 93.5911C164.512 93.6317 164 93.8588 163.607 94.2339C163.213 94.609 162.961 95.1089 162.894 95.6487C162.892 95.6774 162.892 95.7063 162.894 95.7351C162.865 95.9962 162.887 96.2605 162.961 96.5128C163.034 96.7651 163.156 97.0005 163.321 97.2054C163.485 97.4103 163.688 97.5808 163.919 97.707C164.149 97.8332 164.402 97.9126 164.663 97.9408C165.322 98.0108 166.865 97.4429 166.281 96.5046C165.322 94.9614 161.643 98.5951 164.951 99.6074C165.165 99.6609 165.363 99.3605 165.165 99.2618H165.104C164.729 99.1237 164.424 98.8426 164.256 98.4801C164.087 98.1175 164.07 97.7031 164.207 97.3277L163.569 96.6816C163.02 95.3702 163.631 94.5019 165.4 94.0767L164.223 94.6652C163.433 94.5664 163.351 92.7763 163.433 92.3854C163.52 92.0402 163.669 91.7139 163.873 91.4224L163.89 91.4018Z",fill:"#E0E0E0"}),t.createElement("path",{d:"M166.556 41.7402C166.508 41.9639 166.52 42.1966 166.593 42.4139C166.665 42.6311 166.795 42.8248 166.968 42.9747C167.424 43.4121 167.977 43.7349 168.583 43.9166C169.188 44.0983 169.828 44.1337 170.449 44.02C170.68 43.994 170.899 43.9056 171.083 43.7641C171.268 43.6227 171.41 43.4337 171.494 43.2175C171.832 42.1393 170.729 38.7402 170.322 38.6168C169.914 38.4933 166.898 40.7032 166.585 41.7402H166.556Z",fill:"#BA68C8"}),t.createElement("path",{opacity:"0.1",d:"M166.556 41.7402C166.508 41.9639 166.52 42.1966 166.593 42.4139C166.665 42.6311 166.795 42.8248 166.968 42.9747C167.424 43.4121 167.977 43.7349 168.583 43.9166C169.188 44.0983 169.828 44.1337 170.449 44.02C170.68 43.994 170.899 43.9056 171.083 43.7641C171.268 43.6227 171.41 43.4337 171.494 43.2175C171.832 42.1393 170.729 38.7402 170.322 38.6168C169.914 38.4933 166.898 40.7032 166.585 41.7402H166.556Z",fill:"black"}),t.createElement("path",{d:"M164.466 32.9049L169.634 40.4603L178.116 37.0036C186.169 33.7115 196.284 28.0819 198.691 20.078C199.435 17.5808 199.206 14.8947 198.049 12.5596V12.5185C197.363 11.1393 196.4 9.91609 195.221 8.92496C194.041 7.93384 192.67 7.19598 191.194 6.75729C187.461 5.62562 183.305 7.40337 180.416 10.2099C180.181 10.4371 179.89 10.5976 179.572 10.6749C179.255 10.7521 178.922 10.7434 178.609 10.6495C178.296 10.5556 178.014 10.38 177.791 10.1407C177.568 9.90143 177.413 9.60713 177.342 9.2881C176.486 5.37048 174.013 1.60925 170.26 0.481697C168.787 0.0321725 167.238 -0.109566 165.708 0.0652961C164.178 0.240158 162.7 0.727881 161.367 1.49814H161.318C159.059 2.80389 157.38 4.91915 156.622 7.41571C154.24 15.4402 159.561 25.6869 164.466 32.9049Z",fill:"#BA68C8"}),t.createElement("path",{d:"M164.466 32.9049L169.634 40.4603L178.116 37.0036C186.169 33.7115 196.284 28.0819 198.691 20.078C199.435 17.5808 199.206 14.8947 198.049 12.5596V12.5185C197.363 11.1393 196.4 9.91609 195.221 8.92496C194.041 7.93384 192.67 7.19598 191.194 6.75729C187.461 5.62562 183.305 7.40337 180.416 10.2099C180.181 10.4371 179.89 10.5976 179.572 10.6749C179.255 10.7521 178.922 10.7434 178.609 10.6495C178.296 10.5556 178.014 10.38 177.791 10.1407C177.568 9.90143 177.413 9.60713 177.342 9.2881C176.486 5.37048 174.013 1.60925 170.26 0.481697C168.787 0.0321725 167.238 -0.109566 165.708 0.0652961C164.178 0.240158 162.7 0.727881 161.367 1.49814H161.318C159.059 2.80389 157.38 4.91915 156.622 7.41571C154.24 15.4402 159.561 25.6869 164.466 32.9049Z",fill:"#128749"}),t.createElement("path",{opacity:"0.1",d:"M164.458 32.8884L169.63 40.4438L178.112 36.9871C186.165 33.6949 196.276 28.0654 198.687 20.0574C199.427 17.5662 199.196 14.8875 198.041 12.5596C198.798 21.2014 185.572 31.3699 173.791 30.6662C163.914 30.0366 157.104 16.7323 156.277 14.7776C157.252 21.0738 160.968 27.7609 164.458 32.8884Z",fill:"black"}),t.createElement("path",{d:"M161.89 89.2001C161.789 89.405 161.744 89.6332 161.761 89.8611C161.778 90.089 161.855 90.3083 161.984 90.4964C162.314 91.0337 162.765 91.4856 163.302 91.8152C163.839 92.1449 164.447 92.343 165.075 92.3935C165.298 92.4184 165.523 92.3848 165.728 92.296C165.934 92.2072 166.113 92.0664 166.248 91.8873C166.873 90.9038 166.659 87.3606 166.285 87.1343C165.91 86.908 162.458 88.2742 161.869 89.1919H161.89V89.2001Z",fill:"#BA68C8"}),t.createElement("path",{d:"M161.89 89.2001C161.789 89.405 161.744 89.6332 161.761 89.8611C161.778 90.089 161.855 90.3083 161.984 90.4964C162.314 91.0337 162.765 91.4856 163.302 91.8152C163.839 92.1449 164.447 92.343 165.075 92.3935C165.298 92.4184 165.523 92.3848 165.728 92.296C165.934 92.2072 166.113 92.0664 166.248 91.8873C166.873 90.9038 166.659 87.3606 166.285 87.1343C165.91 86.908 162.458 88.2742 161.869 89.1919H161.89V89.2001Z",fill:"#B4DD64"}),t.createElement("path",{d:"M162.112 80.1179L165.174 88.7597L174.256 87.5827C182.897 86.4799 194.103 83.624 198.481 76.5007C199.842 74.2872 200.31 71.6391 199.79 69.0934V69.0399C199.478 67.5326 198.859 66.1055 197.972 64.8475C197.085 63.5895 195.949 62.5274 194.634 61.7273C191.301 59.6697 186.86 60.3446 183.342 62.3158C183.046 62.4809 182.71 62.562 182.371 62.5503C181.882 62.5311 181.422 62.3187 181.09 61.9599C180.758 61.601 180.582 61.1252 180.601 60.6368C180.782 56.6122 179.367 52.3448 176.017 50.2954C174.709 49.4819 173.247 48.9463 171.723 48.7218C170.198 48.4974 168.644 48.589 167.157 48.9909H167.112C164.598 49.6821 162.44 51.2994 161.071 53.5176C156.68 60.5998 159.223 71.904 162.112 80.1179Z",fill:"#BA68C8"}),t.createElement("path",{d:"M162.112 80.1179L165.174 88.7597L174.256 87.5827C182.897 86.4799 194.103 83.624 198.481 76.5007C199.842 74.2872 200.31 71.6391 199.79 69.0934V69.0399C199.478 67.5326 198.859 66.1055 197.972 64.8475C197.085 63.5895 195.949 62.5274 194.634 61.7273C191.301 59.6697 186.86 60.3446 183.342 62.3158C183.046 62.4809 182.71 62.562 182.371 62.5503C181.882 62.5311 181.422 62.3187 181.09 61.9599C180.758 61.601 180.582 61.1252 180.601 60.6368C180.782 56.6122 179.367 52.3448 176.017 50.2954C174.709 49.4819 173.247 48.9463 171.723 48.7218C170.198 48.4974 168.644 48.589 167.157 48.9909H167.112C164.598 49.6821 162.44 51.2994 161.071 53.5176C156.68 60.5998 159.223 71.904 162.112 80.1179Z",fill:"#B4DD64"}),t.createElement("path",{opacity:"0.05",d:"M162.112 80.1177L165.169 88.7595L174.247 87.5826C182.889 86.4797 194.099 83.6238 198.477 76.5005C199.836 74.2863 200.304 71.639 199.786 69.0933C198.3 77.6445 182.914 84.0806 171.708 80.3564C162.293 77.233 159.153 62.6078 158.861 60.5132C158.178 66.8382 160.05 74.2495 162.112 80.1177Z",fill:"black"}),t.createElement("path",{d:"M148.602 59.0607C148.547 59.2798 148.552 59.5094 148.615 59.7262C148.677 59.943 148.797 60.1393 148.96 60.2952C149.392 60.7565 149.927 61.1089 150.521 61.3235C151.116 61.5381 151.753 61.6088 152.38 61.5298C152.606 61.5095 152.823 61.43 153.008 61.2992C153.194 61.1685 153.342 60.9911 153.437 60.7849C153.828 59.6985 152.861 56.2583 152.491 56.1307C152.12 56.0031 148.968 58.0442 148.602 59.0648V59.0607Z",fill:"#BA68C8"}),t.createElement("path",{d:"M148.602 59.0607C148.547 59.2798 148.552 59.5094 148.615 59.7262C148.677 59.943 148.797 60.1393 148.96 60.2952C149.392 60.7565 149.927 61.1089 150.521 61.3235C151.116 61.5381 151.753 61.6088 152.38 61.5298C152.606 61.5095 152.823 61.43 153.008 61.2992C153.194 61.1685 153.342 60.9911 153.437 60.7849C153.828 59.6985 152.861 56.2583 152.491 56.1307C152.12 56.0031 148.968 58.0442 148.602 59.0648V59.0607Z",fill:"#1F9999"}),t.createElement("path",{d:"M146.952 50.1146L151.721 57.9334L160.363 54.917C168.573 52.0364 178.963 46.9377 181.762 39.0696C182.63 36.6145 182.54 33.9225 181.511 31.5306V31.4895C180.894 30.08 179.994 28.8123 178.867 27.7647C177.74 26.7171 176.41 25.9119 174.959 25.3991C171.256 24.074 167.05 25.6336 164.021 28.2797C163.774 28.4938 163.474 28.6383 163.153 28.6983C162.831 28.7583 162.499 28.7316 162.191 28.621C161.883 28.5104 161.61 28.3199 161.4 28.069C161.191 27.8181 161.051 27.5158 160.997 27.1933C160.338 23.2222 158.067 19.3416 154.371 18.0247C152.924 17.4997 151.385 17.2781 149.849 17.3737C148.312 17.4693 146.812 17.88 145.441 18.5803L145.396 18.6091C143.082 19.801 141.305 21.8259 140.425 24.2756C137.635 32.1438 142.441 42.6662 146.952 50.1146Z",fill:"#1F9999"}),t.createElement("path",{opacity:"0.1",d:"M146.964 50.1142L151.734 57.933L160.375 54.9166C168.585 52.036 178.972 46.9374 181.774 39.0692C182.642 36.6142 182.553 33.9221 181.523 31.5303C181.832 40.2009 168.104 49.6739 156.367 48.3489C146.516 47.2337 140.425 33.5755 139.697 31.5838C140.376 37.9376 143.742 44.8057 146.964 50.1142Z",fill:"black"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip0_5504_25779"},t.createElement("rect",{width:"200",height:"181.79",fill:"white"})))),y=({question:e,formValues:n,onChangeHandler:r,autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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 --widget-container-width: 350px;\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-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 .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 .action-buttons {\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 .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 .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-components .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-components .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components {\n display: flex;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\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}\ndiv.widget-survey-components .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n padding: 12px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .action-buttons {\n margin: 0px auto;\n justify-content: end;\n flex-direction: row-reverse;\n grid-gap: 16px;\n gap: 16px;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n background-color: #fff;\n}\ndiv.widget-survey-components .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components svg {\n width: 140px;\n height: 120px;\n}\n\n.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\n.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\n.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\n.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\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 .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=()=>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"})),E=()=>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"})),k=["RANGE","NPS","RADIO","DROPDOWN"],L=300,q=({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(v,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))));exports.AUTO_REDIRECT_DELAY=1e4,exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=b,exports.CheckboxGroup=m,exports.Input=u,exports.NPS=a,exports.ProgressBar=x,exports.Radio=C,exports.RadioGroup=h,exports.Survey=({survey:e,placeholders:o,onSubmit:a,widget:i,surveyContainerWidth:c="0px",npsValue:s,widgetStyle:l,widgetNavigatorQuerySelector:u,preview:d,mobilePreview:p})=>{const{meta:{blocks:m},question_details:{questions:f}}=e,[h,C]=n.useState(null),[g,v]=n.useState({}),[_,N]=n.useState(!1),[M,Z]=n.useState([]),[z,R]=n.useState(0),[F,H]=n.useState(!1),[S,D]=n.useState(null),A=n.useRef(null),O=n.useRef(null),T=n.useRef(-1),$=n.useRef(null),B=n.useRef(0),V=n.useRef(!1),I=n.useRef([]),j=n.useRef(null),P=n.useRef([]);n.useEffect((()=>{m&&(j.current=m.find((e=>"T_1"===e.name)),C(m.filter((e=>"T_1"!==e.name))))}),[m]),n.useEffect((()=>{if(h)if(O.current=f.find((e=>e.pivot_question))??f.find((e=>"RANGE"===e.type_info.question_type))??f[0],null!=s){T.current=s;const e=f.find((e=>e.name===h[0].question_names[0]));A.current={...h[0],question:e},I.current=[...I.current,{...h[0],question:e}],Z(I.current),v({Q_1:s})}else if(!A.current&&h.length>0)return A.current=h[0],void G(h[0])}),[h,s]),t.useEffect((()=>{i||$.current?.scrollIntoView({block:"center",behavior:"smooth"}),M.length&&(I.current=M),$.current&&($.current.style.maxHeight="unset"),P.current[B.current]=$.current?.scrollHeight||P.current[B.current]||0,R(M.length-1),$.current&&($.current.style.maxHeight="100%")}),[M]),n.useEffect((()=>{Object.keys(g).length>0&&A.current.question&&(k.includes(A.current.question.type_info.question_type)||V.current)&&!U()&&Q()}),[g]),n.useEffect((()=>{if(null!=g?.[O.current?.name])if(j.current?.is_based_on_score){const e=O.current?.type_info?.choices[g?.[O.current?.name]]?.dependent_question_names,n=j.current?.question_names.find((n=>e?.includes(n))),t=f.find((e=>e.name===n));D(t)}else{const e=f.find((e=>e.name==j.current?.question_names[0]));D(e)}}),[g?.[O.current?.name]]);const U=()=>B.current===h.length-1||"end"===A.current.branchOption,Y=e=>{if(e){let t={"{{nps.score}}":T.current};o&&(t={...t,...o});var n=new RegExp(Object.keys(t).join("|"),"gi");e=e.replace(n,(function(e){return t[e.toLowerCase()]}))}return e},G=e=>{let n={};if(e.is_based_on_score){const t=O.current?.type_info?.choices[g?.[O.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]));A.current.question=n;const t=I.current.find((e=>e.question.name===n.name));Z(t?[...I.current]:[...I.current,{...e,question:n}])},Q=()=>{if(U())N(!0);else{if(A.current.nextBlock)B.current=h.findIndex((e=>e.name===A.current.nextBlock));else if(A.current.question.type_info?.meta?.branches){const e=A.current.question.type_info?.meta?.branches,n=g[A.current.question.name];let t;t="RANGE"===A.current.type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?B.current=h.findIndex((e=>e.name===t.nextBlock)):B.current+=1}else B.current+=1;A.current=h[B.current],G(h[B.current])}},W=(e,n)=>{V.current=!0,delete g[n.name],v({...g})},X=(e,n,t)=>{if(t){if(V.current=!0,null!=g[e.question.name]&&e.name!==M[M.length-1].name){const[t,r]=(e=>{const n=M.findIndex((n=>n.name===e.name)),t=M.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=g[n.question.name],e)),{});return B.current=h.findIndex((n=>n.name===e.name)),[t,r]})(e);v({...r,...null!=n&&{[e.question.name]:n}}),I.current=t}else v({...g,...null!=n&&{[e.question.name]:n}});O?.current?.name==e?.question?.name&&(T.current=n)}else v({...g,...null!=n&&{[e.question.name]:n}})};return A.current&&A.current.question?_?t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style`},t.createElement(q,{thankYouQuestion:S,preview:d})):t.createElement("div",{className:`freemium-survey-components ${i?"widget-survey-components":""} ${l}-style ${p?"mobile-preview":""}`,style:{"--widget-container-width":c}},!i&&t.createElement(x,{totalSteps:h.length,completedSteps:B.current}),i&&document.querySelector(u)&&t.createElement(t.Fragment,null,r.createPortal(t.createElement("div",{className:"navigation","data-navigation-element":"1",style:0!==B.current?{paddingLeft:"18px"}:{}},t.createElement("button",{style:0==B.current?{display:"none"}:{},className:"navigate-button",onClick:()=>{B.current=Math.max(B.current-1,0),R(B.current)}},t.createElement(E,null)),t.createElement("span",{className:"navigation-text"},"Question ",B.current+1," of"," ",M.length," "),t.createElement("button",{className:"navigate-button",style:B.current>=M.length-1?{visibility:"hidden"}:{},onClick:()=>{B.current=Math.min(B.current+1,M.length-1),R(B.current)}},t.createElement(w,null))),document.querySelector(u))),t.createElement("div",{style:i?{transform:`translateX(calc(-${z} * 100%))`,height:`${P.current[B.current]}px`,transition:M?.length>1?`all ${L}ms linear 0ms`:`transform ${L}ms linear 0ms`}:{},className:"questions"},M.map(((e,n)=>{return t.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 100ms ease-out",opacity:i&&B.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)}}),t.createElement(y,{question:e.question,formValues:g,autoFocus:A.current.name===e.name,onChangeHandler:n=>{V.current=!1,B.current=h.findIndex((n=>n.name===e.name)),A.current=e,X(e,n,k.includes(e.question.type_info.question_type)&&!U())}}),t.createElement("div",{className:"action-buttons"},(r=e.question,r.name===A.current.question.name&&!k.includes(r.type_info.question_type)&&!U()&&t.createElement(b,{onClick:()=>{V.current?(B.current=Math.min(B.current+1,M.length-1),A.current=M[n+1],R(B.current)):X(e,null,!0)},disabled:!g[A.current.question.name]||Array.isArray(g[A.current.question.name])&&0===g[A.current.question.name].length,className:"next-button"},"Next")),((e,n)=>"RANGE"!==n.type_info.question_type&&!n.required&&n.name===A.current.question.name&&!U())(0,e.question)&&t.createElement("button",{className:"skip-button",onClick:()=>W(0,e.question)},"Skip"),((e,n)=>"DROPDOWN"===n.type_info.question_type&&n.name!==A.current.question.name&&!n.required&&null!=g[n.name])(0,e.question)&&t.createElement("button",{className:"skip-button",onClick:()=>{A.current=e,B.current=h.findIndex((n=>n.name===e.name)),W(0,e.question)}},"Clear selection"),i&&(e=>U()&&e.name===A.current.question.name)(e.question)&&t.createElement("div",{className:"submit"},t.createElement(b,{disabled:(A.current.question.required||A.current.question.type_info.pivot_question)&&void 0===g[A.current.question.name]||F,onClick:()=>{H(!0),a(g,(()=>{S?.type_info.meta?.skipThankYouPage||N(!0)}))}},F?"Submitting":"Submit Survey"))));var r})),!i&&U()&&t.createElement("div",{className:"submit"},t.createElement(b,{disabled:A.current.question.required&&void 0===g[A.current.question.name]||F,onClick:()=>{H(!0),a(g,(()=>{d||S?.type_info.meta?.skipThankYouPage&&(window.location.href=S?.type_info.meta?.redirectUrl),S?.type_info.meta?.skipThankYouPage||N(!0)}))}},F?"Submitting Survey":"Submit Survey")))):null},exports.TRANSITION_DELAY=L,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 .widget {\n position: relative;\n}\n.freemium-survey-components .nps-container .widget .button-container {\n display: flex;\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 .widget .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 .widget .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 .widget span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .widget 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 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 .widget button:hover {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .widget.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .widget.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .widget.highlighted button:hover, .freemium-survey-components .nps-container .widget.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 .widget .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .widget.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .widget.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 .widget.standard .choice.active,\n.freemium-survey-components .nps-container .widget.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .widget .button-container {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .widget .button-container,\n.card-survey-style .nps-container .widget .button-container {\n background: transparent;\n }\n .freemium-survey-components .nps-container .widget .choices,\n.card-survey-style .nps-container .widget .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 .widget button,\n.card-survey-style .nps-container .widget button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .widget .button-container {\n background: transparent;\n}\n.widget-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}");const a=e=>{const{type_info:{linear_scale:{button_shape:r,button_style:o},score_presets:{start:a,end:i},validation:{min:s},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===s?1:0)},((e,n)=>n+s)));return t.createElement("div",{className:"nps-container"},t.createElement("div",{className:`widget ${r} ${o}`},t.createElement("div",{className:"button-container"},t.createElement("span",{className:"negative-text"},a),t.createElement("div",{className:"choices"},u.current.map((n=>t.createElement("button",{key:n,onClick:t=>{e.onChangeHandler(n)},className:`choice ${l(n)} ${e.npsValue===n&&"active"}`},n)))),t.createElement("span",{className:"positive-text"},i))),t.createElement("div",{className:"footer"},c))},i=(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 s={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocus:!0},c=n.forwardRef(((e,r)=>{const o=n.useRef(null);n.useEffect((()=>{e.autoFocus&&setTimeout((()=>{o.current?.focus()}),k+20)}),[e.autoFocus]);const{inputStyle:a,style:i,className:s,showCount:c,isErrored:l,startLabel:u,isRequired:d,errorText:p,endLabel:m,maxLength:f,autoFocus:h,...v}=e;return t.createElement("div",{className:"input-container",style:i},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":""}${s||""}`},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.autoFocus&&setTimeout((()=>{o.current?.focus()}),k+20)}),[]);const{inputStyle:a,style:i,className:s,showCount:c,maxLength:l,isErrored:u,startLabel:d,isRequired:p,autoFocus:m,...f}=e;return t.createElement(t.Fragment,null,t.createElement("div",{className:"textarea-container",style:i},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":""} ${s||""}`},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=i(c,s),d=i(l,s);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,autoFocus:o,onChangeHandler:a,othersOption:i,othersRequired:s})=>{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"}),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))),i&&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=i((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,autoFocus:a,onChangeHandler:i,othersOption:s,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))&&i(p)}),[p]),t.createElement("div",{className:"radio-group"},t.createElement("button",{ref:f,className:"autofocus-button"}),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))),s&&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(b,{disabled:c&&0===l.length,onClick:()=>i(l)},"Next")))},v=i((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 g=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}");const x=()=>t.createElement(t.Fragment,null,"..."),b=e=>{const{inline:n=!1,children:r,disabled:o,className:a="",htmlType:i,type:s="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:i,onClick:c},p),d?t.createElement(x,null):r)},y=()=>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,autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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}\n.freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #b5b5b5;\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 margin-top: -12px;\n margin-left: -12px;\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 .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 height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 4px 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 .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 .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(y,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)));exports.AUTO_REDIRECT_DELAY=1e4,exports.BUTTON_SIZE_VARIANTS={LARGE:"large",MINI:"mini",NORMAL:"normal"},exports.Button=b,exports.CheckboxGroup=m,exports.Input=u,exports.NPS=a,exports.ProgressBar=g,exports.Radio=v,exports.RadioGroup=h,exports.Survey=({survey:e,surveyStyle:o="classic",placeholders:a,onSubmit:i,widget:s,npsValue:c,widgetStyle:l,widgetNavigatorQuerySelector:u,preview:d,mobilePreview:p})=>{const{meta:{blocks:m},question_details:{questions:f}}=e,[h,v]=n.useState(null),[x,y]=n.useState({}),[L,q]=n.useState(!1),[N,M]=n.useState([]),[z,Z]=n.useState(0),[R,S]=n.useState(!1),[D,F]=n.useState(null),H=n.useRef(null),O=n.useRef(null),T=n.useRef(-1),$=n.useRef(null),B=n.useRef(0),A=n.useRef(0),I=n.useRef(!1),j=n.useRef([]),P=n.useRef(null),U=n.useRef([]);n.useEffect((()=>{m&&(P.current=m.find((e=>"T_1"===e.name)),v(m.filter((e=>"T_1"!==e.name))))}),[m]),n.useEffect((()=>{if(h)if(O.current=f.find((e=>e.pivot_question))??f.find((e=>"RANGE"===e.type_info.question_type))??f[0],null!=c){T.current=c;const e=f.find((e=>e.name===h[0].question_names[0]));H.current={...h[0],question:e},j.current=[...j.current,{...h[0],question:e}],M(j.current),y({Q_1:c})}else if(!H.current&&h.length>0)return H.current=h[0],void Y(h[0])}),[h,c]),t.useEffect((()=>{s||"classic"!==o||$.current?.scrollIntoView({block:"center",behavior:"smooth"}),N.length&&(j.current=N,A.current=N.length-1),$.current&&($.current.style.maxHeight="unset"),U.current[B.current]=$.current?.scrollHeight||U.current[B.current]||0,Z(N.length-1),$.current&&($.current.style.maxHeight="100%")}),[N]),n.useEffect((()=>{Object.keys(x).length>0&&H.current.question&&(w.includes(H.current.question.type_info.question_type)||I.current)&&!V()&&G()}),[x]),n.useEffect((()=>{if(null!=x?.[O.current?.name])if(P.current?.is_based_on_score){const e=O.current?.type_info?.choices[x?.[O.current?.name]]?.dependent_question_names,n=P.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==P.current?.question_names[0]));F(e)}}),[x?.[O.current?.name]]);const V=()=>B.current===h.length-1||"end"===H.current.branchOption,Q=e=>{if(e){let t={"{{nps.score}}":T.current};a&&(t={...t,...a});var n=new RegExp(Object.keys(t).join("|"),"gi");e=e.replace(n,(function(e){return t[e.toLowerCase()]}))}return e},Y=e=>{let n={};if(e.is_based_on_score){const t=O.current?.type_info?.choices[x?.[O.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]));H.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(V())q(!0);else{if(H.current.nextBlock)B.current=h.findIndex((e=>e.name===H.current.nextBlock));else if(H.current.question.type_info?.meta?.branches){const e=H.current.question.type_info?.meta?.branches,n=x[H.current.question.name];let t;t="RANGE"===H.current.type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?B.current=h.findIndex((e=>e.name===t.nextBlock)):B.current+=1}else B.current+=1;H.current=h[B.current],Y(h[B.current])}},W=e=>{I.current=!0,delete x[e.name],y({...x})},X=(e,n,t)=>{if(t){if(I.current=!0,null!=x[e.question.name]&&e.name!==N[N.length-1].name){const[t,r]=(e=>{const n=N.findIndex((n=>n.name===e.name)),t=N.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=x[n.question.name],e)),{});return B.current=h.findIndex((n=>n.name===e.name)),[t,r]})(e);y({...r,...null!=n&&{[e.question.name]:n}}),j.current=t}else y({...x,...null!=n&&{[e.question.name]:n}});O?.current?.name==e?.question?.name&&(T.current=n)}else y({...x,...null!=n&&{[e.question.name]:n}})},K=e=>{const n=e.blockIndex??A.current,r=e.question??N[n].question;return t.createElement("div",{className:"question-footer"},!(!s&&"classic"===o||0===n&&!x[r.name]||"compact"===l)&&t.createElement(_,{currentBlockIndex:B,currentBlockIndexOfBlocksWithQns:A,blocksWithQns:N,setHorizontalScrollUnits:Z}),t.createElement("div",{className:"action-buttons"},r.name===H.current.question.name&&!w.includes(r.type_info.question_type)&&!V()&&t.createElement(b,{onClick:()=>{I.current?(B.current=Math.min(B.current+1,N.length-1),H.current=N[n+1],Z(B.current)):X(N[n],null,!0)},disabled:!x[H.current.question.name]||Array.isArray(x[H.current.question.name])&&0===x[H.current.question.name].length,className:"next-button"},"Next"),"RANGE"!==r.type_info.question_type&&!r.required&&r.name===H.current.question.name&&!V()&&t.createElement("button",{className:"skip-button",onClick:()=>W(r)},"Skip"),"DROPDOWN"===r.type_info.question_type&&r.name!==H.current.question.name&&!r.required&&null!=x[r.name]&&t.createElement("button",{className:"skip-button",onClick:()=>{H.current=N[n],B.current=h.findIndex((e=>e.name===N[n].name)),W(r)}},"Clear selection"),V()&&(s||"classic"!==o)&&r.name===H.current.question.name&&t.createElement("div",{className:"submit"},t.createElement(b,{disabled:(H.current.question.required||H.current.question.type_info.pivot_question)&&void 0===x[H.current.question.name]||R,onClick:()=>{S(!0),i(x,(()=>{D?.type_info.meta?.skipThankYouPage||q(!0)}))}},R?"Submitting":"Submit Survey"))))};return H.current&&H.current.question?L?t.createElement("div",{className:`freemium-survey-components ${s?"widget-survey-components":""} ${l}-style`},t.createElement(E,{thankYouQuestion:D,preview:d})):t.createElement("div",{className:`freemium-survey-components ${s?"widget-survey-components":""} ${l}-style ${p?"mobile-preview":""} ${o}-survey-style`},t.createElement(g,{totalSteps:h.length,completedSteps:B.current}),s&&"compact"===l&&document.querySelector(u)&&t.createElement(t.Fragment,null,r.createPortal(t.createElement(_,{currentBlockIndex:B,currentBlockIndexOfBlocksWithQns:A,blocksWithQns:N,setHorizontalScrollUnits:Z}),document.querySelector(u))),t.createElement("div",{style:s||"card"===o?{transform:`translateX(calc(-${z} * 100%))`,height:`${U.current[B.current]}px`,transition:N?.length>1?`all ${k}ms ease-out 0ms`:`transform ${k}ms ease-out 0ms`}:{},className:"questions"},N.map(((e,n)=>t.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(s||"card"===o)&&B.current!==n?0:1},ref:$,id:e.question.name,key:e.question.name},t.createElement("div",{className:"question-text "+(0===n?"nps":""),dangerouslySetInnerHTML:{__html:Q(e.question.text)}}),t.createElement(C,{question:e.question,formValues:x,autoFocus:H.current.name===e.name,onChangeHandler:n=>{I.current=!1,B.current=h.findIndex((n=>n.name===e.name)),H.current=e,X(e,n,w.includes(e.question.type_info.question_type)&&!V())}}),("classic"===o||s)&&t.createElement(K,{question:e.question,blockIndex:n})))),!s&&"card"!==o&&V()&&t.createElement("div",{className:"submit"},t.createElement(b,{disabled:H.current.question.required&&void 0===x[H.current.question.name]||R,onClick:()=>{S(!0),i(x,(()=>{d||D?.type_info.meta?.skipThankYouPage&&(window.location.href=D?.type_info.meta?.redirectUrl),D?.type_info.meta?.skipThankYouPage||q(!0)}))}},R?"Submitting Survey":"Submit Survey"))),N.length&&"card"===o&&!s&&t.createElement(K,null)):null},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 .widget {\n position: relative;\n}\n.freemium-survey-components .nps-container .widget .button-container {\n display: flex;\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 .widget .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 .widget .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 .widget span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .widget 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 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 .widget button:hover {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .widget.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .widget.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .widget.highlighted button:hover, .freemium-survey-components .nps-container .widget.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 .widget .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .widget.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .widget.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 .widget.standard .choice.active,\n.freemium-survey-components .nps-container .widget.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .widget .button-container {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .widget .button-container {\n background: transparent;\n }\n .freemium-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .widget .button-container {\n background: transparent;\n}\n.widget-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}");const c=t=>{const{type_info:{linear_scale:{button_shape:r,button_style:o},score_presets:{start:a,end:i},validation:{min:c},footer_text:l}}=t,s=e=>{switch(e){case e<=6:return"detractor";case e<=8:return"passive";default:return"promoter"}},d=n(Array.from({length:10+(0===c?1:0)},((e,n)=>n+c)));return e.createElement("div",{className:"nps-container"},e.createElement("div",{className:`widget ${r} ${o}`},e.createElement("div",{className:"button-container"},e.createElement("span",{className:"negative-text"},a),e.createElement("div",{className:"choices"},d.current.map((n=>e.createElement("button",{key:n,onClick:e=>{t.onChangeHandler(n)},className:`choice ${s(n)} ${t.npsValue===n&&"active"}`},n)))),e.createElement("span",{className:"positive-text"},i))),e.createElement("div",{className:"footer"},l))},l=(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 s={isRequired:!1,showCount:!1,isErrored:!1,inline:!1,spellCheck:!1,autoFocus:!0},d=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocus&&setTimeout((()=>{a.current?.focus()}),M+20)}),[t.autoFocus]);const{inputStyle:i,style:c,className:l,showCount:s,isErrored:d,startLabel:u,isRequired:m,errorText:p,endLabel:f,maxLength:h,autoFocus:C,...g}=t;return e.createElement("div",{className:"input-container",style:c},t.label&&e.createElement("label",{className:"input-label "+(m?"required":"")},t.label),e.createElement("div",null,u&&e.createElement("div",{className:"start-label"},u),e.createElement("div",{className:`input-basic ${d?"error":""}${l||""}`},e.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:a,style:i},g)),s&&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)),d&&p&&e.createElement("span",{className:"input-error"},t.errorText))})),u=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocus&&setTimeout((()=>{a.current?.focus()}),M+20)}),[]);const{inputStyle:i,style:c,className:l,showCount:s,maxLength:d,isErrored:u,startLabel:m,isRequired:p,autoFocus:f,...h}=t;return e.createElement(e.Fragment,null,e.createElement("div",{className:"textarea-container",style:c},t.label&&e.createElement("label",{className:"input-label "+(p?"required":"")},t.label),m&&e.createElement("div",{className:"start-label"},m),e.createElement("div",{className:`input-basic ${u?"error":""} ${l||""}`},e.createElement("textarea",Object.assign({autoComplete:"off",ref:a,style:i},h)),s&&d&&d>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))})),m=l(d,s),p=l(u,s);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:n=[],options:t,autoFocus:r,onChangeHandler:a,othersOption:i,othersRequired:c})=>{const l=(()=>{let e=-1;return n.map(((n,r)=>{const o=t.find((e=>e.value===n));return o||(e=r),o})),e})(),[s,d]=o(!1);return e.createElement("div",{className:"checkbox-group"},t?.map(((t,o)=>e.createElement(C,{key:t.value,checked:n?.includes(t.value),name:t.value,id:t.value,autoFocus:0===o&&r,onChange:(e,r)=>{if(r)a([...n||[],t.value]);else{const e=n.indexOf(t.value);e>-1&&n.splice(e,1),a([...n])}}},t.value))),i&&e.createElement(C,{key:"others",checked:s,name:"others",id:"others",onChange:(e,n)=>{d(n)}},"Others"),s&&e.createElement(e.Fragment,null,e.createElement(m,{placeholder:"Enter your comment",value:n[l],onChange:e=>{-1!==l?(n[l]=e.target.value,a(n)):a(n.concat(e.target.value))},label:""})))},C=l((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),M+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 g=({name:n,options:t,value:a,autoFocus:i,onChangeHandler:c,othersOption:l,othersRequired:s})=>{const[d,u]=o(""),[p,f]=o("");return r((()=>{a||(f(""),u(""))}),[a]),r((()=>{p&&t.find((e=>e.value===p))&&c(p)}),[p]),e.createElement("div",{className:"radio-group"},t?.map(((t,r)=>e.createElement(x,{key:t.value,value:t.value,name:n,onChange:e=>{f(e.currentTarget.value)},autoFocus:0===r&&i,checked:p===t.value},t.value))),l&&e.createElement(x,{key:"others",value:"others",name:n,onChange:e=>{f("others")},checked:"others"===p},"Others"),"others"===p&&e.createElement(e.Fragment,null,e.createElement(m,{value:d,onChange:e=>u(e.target.value),placeholder:"Enter your comment",label:""}),d!==a&&e.createElement(w,{disabled:s&&0===d.length,onClick:()=>c(d)},"Next")))},x=l((t=>{const o=n(null);return r((()=>{t.autoFocus&&setTimeout((()=>{o.current?.focus()}),M+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 b=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}");const v=()=>e.createElement(e.Fragment,null,"..."),y={LARGE:"large",MINI:"mini",NORMAL:"normal"},w=n=>{const{inline:t=!1,children:r,disabled:o,className:a="",htmlType:i,type:c="primary",onClick:l,size:s,overrideStyleClassName:d="",loading:u=!1,...m}=n;return e.createElement("button",Object.assign({style:t?{display:"inline-block"}:{},disabled:o,className:`action-button ${a} ${d}`,type:i,onClick:l},m),u?e.createElement(v,null):r)},E=()=>e.createElement("svg",{width:"200",height:"182",viewBox:"0 0 200 182",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{"clip-path":"url(#clip0_5504_25779)"},e.createElement("g",{opacity:"0.8"},e.createElement("path",{opacity:"0.8",d:"M165.375 76.3154C165.375 77.0026 165.375 77.6857 165.342 78.3729C165.342 78.9202 165.305 79.4634 165.276 80.019C165.039 84.6023 164.35 89.1511 163.219 93.599C162.483 96.5028 161.558 99.3552 160.449 102.138C158.518 106.993 156.047 111.616 153.083 115.919C152.627 116.586 152.153 117.245 151.672 117.895C149.529 120.792 147.165 123.519 144.602 126.051C143.702 126.94 142.779 127.804 141.832 128.644C136.335 133.522 130.104 137.505 123.368 140.446C122.458 140.857 121.532 141.223 120.598 141.582C114.818 143.816 108.764 145.265 102.599 145.89C101.677 145.985 100.755 146.063 99.8292 146.116C98.3752 146.207 96.913 146.252 95.4425 146.252C89.6055 146.257 83.7909 145.531 78.1342 144.092C77.2014 143.856 76.2783 143.601 75.3647 143.326C68.9961 141.419 62.9333 138.61 57.361 134.985C56.4227 134.372 55.4968 133.75 54.5915 133.088C51.0031 130.499 47.6661 127.578 44.6246 124.364C44.0759 123.782 43.5368 123.192 43.0073 122.594C40.6559 119.932 38.5099 117.096 36.5877 114.109C35.6083 112.583 34.6851 111.017 33.8182 109.409C28.597 99.7056 25.7564 88.9001 25.5303 77.8832C25.5303 77.3647 25.5303 76.838 25.5303 76.3154C25.5167 65.5894 27.9828 55.0054 32.7359 45.3901C32.9335 44.9786 33.1475 44.567 33.3491 44.1555C33.5096 43.8428 33.6742 43.53 33.8388 43.2214C34.703 41.6165 35.6261 40.05 36.6083 38.5219C41.2923 31.2474 47.2786 24.8998 54.2664 19.798L54.612 19.547C54.9001 19.3371 55.1882 19.1355 55.4803 18.9297C56.1058 18.4935 56.7396 18.0655 57.3815 17.6458C62.9478 14.0235 69.0035 11.216 75.3647 9.30851C76.2783 9.03416 77.2014 8.77903 78.1342 8.54309C83.7911 7.10508 89.6057 6.38067 95.4425 6.38676C96.9157 6.38676 98.378 6.43202 99.8292 6.52256C100.757 6.58017 101.68 6.65561 102.599 6.74889C108.764 7.37169 114.818 8.81801 120.598 11.0492C121.532 11.4072 122.458 11.7858 123.368 12.185C128.019 14.2174 132.434 16.7508 136.536 19.7404C136.948 20.0285 137.326 20.3206 137.713 20.6169C139.126 21.6869 140.498 22.8103 141.828 23.9872C142.775 24.8267 143.698 25.6923 144.598 26.5839C148.891 30.8221 152.617 35.5983 155.684 40.7935C155.927 41.205 156.161 41.6165 156.392 42.028C159.408 47.3707 161.702 53.0899 163.215 59.0359C164.651 64.6834 165.377 70.4881 165.375 76.3154Z",fill:"#F4F4F4"})),e.createElement("path",{d:"M137.75 20.6126C133.225 23.0657 128.514 25.1586 123.66 26.8717C114.533 30.1296 104.92 31.8174 95.2285 31.8634C88.4636 31.8759 81.7275 30.9818 75.2001 29.205C67.7764 27.1585 60.7097 23.9874 54.2458 19.8019L54.5915 19.5509C54.8796 19.341 55.1676 19.1394 55.4598 18.9336C61.6723 22.8973 68.4424 25.91 75.5458 27.8717C95.4466 33.3242 117.002 30.1885 136.553 19.736C136.948 20.0241 137.339 20.3163 137.75 20.6126Z",fill:"white"}),e.createElement("path",{d:"M156.396 42.0196C153.652 43.6656 150.847 45.2102 147.98 46.6532C133.95 53.7623 118.704 58.1601 103.043 59.6159C99.3093 59.9588 95.5686 60.1303 91.8211 60.1303C83.9243 60.13 76.0458 59.3693 68.2948 57.8587C58.6763 55.9698 49.2998 53.009 40.3407 49.0318C37.7646 47.8932 35.2228 46.6738 32.7153 45.3734C32.9129 44.9619 33.1268 44.5504 33.3285 44.1389C50.2664 52.937 74.1713 60.8587 102.92 58.2167C124.853 56.2003 142.75 48.505 155.688 40.7686C155.931 41.1965 156.165 41.608 156.396 42.0196Z",fill:"white"}),e.createElement("path",{d:"M165.342 78.3687C165.342 78.9161 165.305 79.4593 165.276 80.0148C162.079 81.5786 158.832 83.0394 155.565 84.381C136.549 92.1997 116.985 96.1338 97.2572 96.1338C93.2024 96.1338 89.1421 95.9665 85.0764 95.6318C64.2199 93.8738 43.9495 87.8361 25.5303 77.8955C25.5303 77.377 25.5303 76.8503 25.5303 76.3276C43.9568 86.3909 64.2791 92.5016 85.1998 94.2697C117.998 96.9198 145.688 88.0558 165.342 78.3687Z",fill:"white"}),e.createElement("path",{d:"M153.083 115.919C152.626 116.586 152.153 117.245 151.672 117.895C133.336 124.374 114.133 128.07 94.7017 128.857C92.101 128.964 89.4947 129.017 86.883 129.014C72.6689 129.01 58.4981 127.448 44.6246 124.355C44.0759 123.774 43.5368 123.184 43.0073 122.586C57.372 125.94 72.0744 127.633 86.8254 127.631C89.4014 127.631 92.0022 127.582 94.6441 127.475C114.603 126.66 134.316 122.763 153.083 115.919Z",fill:"white"}),e.createElement("path",{d:"M4.74072 180.173C9.21388 174.655 16.4689 167.573 26.8966 164.947C41.0404 161.375 47.3612 169.441 64.2868 167.717C82.1959 165.894 81.9572 156.166 97.5207 155.256C116.187 154.162 118.179 168.058 140.45 169.104C156.215 169.844 162.33 163.211 175.066 167.717C183.671 170.762 189.469 176.824 193.07 181.564L4.74072 180.173Z",fill:"#F4F4F4"}),e.createElement("path",{d:"M50.9208 180.173H47.353C45.0711 177.41 42.9404 174.525 40.9704 171.531C38.8552 168.178 38.6001 166.692 39.1227 166.116C40.0733 165.066 43.7975 166.782 45.9703 168.494C48.0613 170.182 49.5663 172.486 50.2706 175.079C50.7504 176.733 50.9697 178.452 50.9208 180.173Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M49.2129 180.482C49.1415 180.481 49.0725 180.456 49.0178 180.41C48.963 180.364 48.9258 180.301 48.9124 180.231C48.3854 177.421 47.2258 174.769 45.5216 172.474C44.4001 170.976 43.0569 169.658 41.5381 168.564C41.4715 168.516 41.4268 168.444 41.4136 168.363C41.4005 168.282 41.4201 168.199 41.4682 168.132C41.5162 168.066 41.5887 168.021 41.6697 168.008C41.7507 167.995 41.8337 168.014 41.9002 168.062C43.4679 169.194 44.8553 170.557 46.0154 172.103C47.7741 174.475 48.9716 177.214 49.5174 180.116C49.5318 180.196 49.5139 180.278 49.4677 180.346C49.4214 180.413 49.3505 180.459 49.2705 180.474L49.2129 180.482Z",fill:"#30354F"}),e.createElement("path",{d:"M54.114 180.214C60.8917 160.626 60.9246 154.91 59.1674 153.988C57.2703 152.989 52.8589 157.371 50.6532 160.943C45.4146 169.428 49.1717 178.939 49.6944 180.194L54.114 180.214Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M52.1553 179.972C52.0833 179.972 52.0133 179.947 51.9577 179.901C51.9021 179.855 51.8643 179.791 51.8508 179.72C51.0407 175.21 51.2972 170.572 52.5998 166.178C53.4404 163.385 54.7017 160.738 56.3404 158.326C56.3882 158.263 56.4583 158.221 56.5361 158.208C56.614 158.195 56.6938 158.213 56.7592 158.257C56.8245 158.301 56.8704 158.369 56.8874 158.446C56.9045 158.523 56.8913 158.604 56.8507 158.672C55.2471 161.032 54.0121 163.622 53.1882 166.355C51.9084 170.663 51.6575 175.211 52.4557 179.634C52.4689 179.714 52.4499 179.796 52.4029 179.863C52.3559 179.929 52.2847 179.974 52.2047 179.988L52.1553 179.972Z",fill:"#30354F"}),e.createElement("path",{d:"M194.93 180.305H0.740725C0.331634 180.305 0 180.636 0 181.045C0 181.455 0.331634 181.786 0.740725 181.786H194.93C195.339 181.786 195.671 181.455 195.671 181.045C195.671 180.636 195.339 180.305 194.93 180.305Z",fill:"#5F6386"}),e.createElement("path",{d:"M36.1433 91.6608L25.0942 101.562L24.1106 102.294L24.7197 103.529L40.0321 134.034L42.8757 139.717L32.4026 145.376L28.9871 140.952L2.55552 106.698C1.69055 105.548 1.06504 104.237 0.716056 102.842C0.510627 101.972 0.412505 101.081 0.423881 100.187C0.384408 98.8303 0.623282 97.4796 1.12578 96.2184C1.62828 94.9572 2.38375 93.8122 3.34563 92.8542L32.4479 64.6367C32.4479 64.6367 52.2829 50.3612 79.5293 64.5626",fill:"#D0D3D9"}),e.createElement("path",{d:"M36.1433 91.6608L25.0942 101.562L24.1106 102.294L24.7197 103.529L40.0321 134.034L42.8757 139.717L32.4026 145.376L28.9871 140.952L2.55552 106.698C1.69055 105.548 1.06504 104.237 0.716056 102.842C0.510627 101.972 0.412505 101.081 0.423881 100.187C0.384408 98.8303 0.623282 97.4796 1.12578 96.2184C1.62828 94.9572 2.38375 93.8122 3.34563 92.8542L32.4479 64.6367C32.4479 64.6367 52.2829 50.3612 79.5293 64.5626",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),e.createElement("path",{d:"M86.3356 180.243H60.5007C59.9946 166.515 59.3279 152.725 58.5172 139.87C58.3883 137.829 58.2511 135.812 58.1057 133.82L59.5419 133.775L85.0558 132.952C85.9241 146.302 86.3109 162.799 86.3356 180.243Z",fill:"#5D6476"}),e.createElement("path",{d:"M60.1181 130.277C59.9411 131.421 59.7518 132.586 59.5584 133.775C59.2319 135.75 58.8849 137.782 58.5173 139.87C56.3856 152.005 53.5503 165.882 50.3281 180.243H24.2793C26.6414 168.112 28.7278 156.643 30.9211 142.948C31.4931 139.372 39.6123 137.187 40.1349 133.734L39.5177 131.895L60.1181 130.277Z",fill:"#5D6476"}),e.createElement("path",{d:"M72.3442 160.865L49.0237 160.56L55.682 137.038L66.7435 135.092L72.3442 160.865Z",fill:"#5D6476"}),e.createElement("path",{d:"M57.7066 149.915L64.2743 149.153L61.8999 133.895L61.4472 133.964L63.7476 148.75L57.6531 149.458L57.7066 149.915Z",fill:"#251138"}),e.createElement("path",{d:"M85.8295 156.717L86.1217 156.363L83.1505 153.898L81.4304 133.03L80.9736 133.067L82.7061 154.129L85.8295 156.717Z",fill:"#251138"}),e.createElement("path",{d:"M28.3615 158.268L32.847 156.672L37.4642 136.52L37.0156 136.425L32.4519 156.326L28.2092 157.836L28.3615 158.268Z",fill:"#251138"}),e.createElement("path",{d:"M148.956 117.43C149.063 115.063 144.894 113.681 141.281 112.858C142.828 111.562 144.018 109.92 143.618 109.08C143.042 107.874 139.405 108.784 137.071 109.903C136.656 110.099 136.259 110.329 135.882 110.59C134.783 110.571 133.702 110.88 132.779 111.478C131.856 112.075 131.132 112.934 130.7 113.945C130.268 114.956 130.146 116.073 130.352 117.153C130.557 118.234 131.08 119.228 131.853 120.01C132.099 120.254 132.366 120.476 132.652 120.672C133.843 121.776 135.328 122.51 136.927 122.788C140.73 123.504 148.709 122.804 148.956 117.43Z",fill:"#F3A268"}),e.createElement("path",{d:"M83.776 122.059C84.2966 122.149 84.8237 122.197 85.3521 122.203H93.3931L128.874 122.174H134.223L136.104 110.413L130.981 109.421L93.7387 102.191L93.3889 102.125L91.6277 101.784L90.7264 101.611L87.2039 100.924C86.6363 100.834 86.0625 100.788 85.4879 100.788C82.7871 100.77 80.1795 101.774 78.1884 103.599C76.1974 105.424 74.9701 107.935 74.7529 110.627C74.5358 113.319 75.3447 115.993 77.0175 118.114C78.6903 120.234 81.1032 121.644 83.7718 122.059H83.776Z",fill:"#D0D3D9",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),e.createElement("path",{d:"M85.3028 121.878H85.237C84.7555 121.974 84.2669 122.031 83.7761 122.047C81.6269 122.139 79.5053 121.536 77.7261 120.327C75.9469 119.118 74.6051 117.367 73.8998 115.335L61.6202 80.0724C61.0247 78.4131 60.7796 76.6483 60.9003 74.8895C61.0211 73.1307 61.5051 71.416 62.3217 69.8536C63.1384 68.2913 64.2701 66.9151 65.6453 65.8121C67.0205 64.709 68.6094 63.9029 70.3118 63.4447C72.0142 62.9865 73.793 62.8862 75.5361 63.15C77.2792 63.4138 78.9487 64.036 80.4393 64.9774C81.9299 65.9187 83.2091 67.1589 84.1964 68.6195C85.1836 70.08 85.8574 71.7294 86.1752 73.4635L91.315 100.117L91.6319 101.763L91.422 101.467",fill:"#D0D3D9"}),e.createElement("path",{d:"M85.3028 121.878H85.237C84.7555 121.974 84.2669 122.031 83.7761 122.047C81.6269 122.139 79.5053 121.536 77.7261 120.327C75.9469 119.118 74.6051 117.367 73.8998 115.335L61.6202 80.0724C61.0247 78.4131 60.7796 76.6483 60.9003 74.8895C61.0211 73.1307 61.5051 71.416 62.3217 69.8536C63.1384 68.2913 64.2701 66.9151 65.6453 65.8121C67.0205 64.709 68.6094 63.9029 70.3118 63.4447C72.0142 62.9865 73.793 62.8862 75.5361 63.15C77.2792 63.4138 78.9487 64.036 80.4393 64.9774C81.9299 65.9187 83.2091 67.1589 84.1964 68.6195C85.1836 70.08 85.8574 71.7294 86.1752 73.4635L91.315 100.117L91.6319 101.763L91.422 101.467",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),e.createElement("path",{d:"M33.6373 63.9987C44.8881 56.3939 64.2375 56.6449 79.4552 64.9492L81.1548 85.0229L83.3934 111.516L85.1959 132.796C77.7104 145.742 60.8013 137.507 41.9869 134.359C38.8512 133.833 37.6866 127.602 35.2298 123.919L32.7607 119.002L33.3327 93.459",fill:"#D0D3D9"}),e.createElement("path",{d:"M33.6373 63.9987C44.8881 56.3939 64.2375 56.6449 79.4552 64.9492L81.1548 85.0229L83.3934 111.516L85.1959 132.796C77.7104 145.742 60.8013 137.507 41.9869 134.359C38.8512 133.833 37.6866 127.602 35.2298 123.919L32.7607 119.002L33.3327 93.459",stroke:"#251138","stroke-width":"1.49","stroke-miterlimit":"10"}),e.createElement("path",{d:"M82 121.5L78.5 65.5H80L82 69L88.5 121.5H82Z",fill:"#D0D3D9"}),e.createElement("path",{d:"M48.8139 35.2625C48.8781 34.7758 47.7574 34.2266 46.3108 34.0359C44.8643 33.8452 43.6396 34.0852 43.5754 34.5719C43.5112 35.0586 44.6319 35.6077 46.0785 35.7984C47.5251 35.9891 48.7498 35.7492 48.8139 35.2625Z",fill:"#202738"}),e.createElement("path",{d:"M47.0182 37.4299C47.3379 37.3254 47.2294 36.1164 46.7758 34.7296C46.3223 33.3428 45.6955 32.3033 45.3758 32.4079C45.056 32.5124 45.1645 33.7214 45.6181 35.1082C46.0716 36.495 46.6985 37.5345 47.0182 37.4299Z",fill:"#202738"}),e.createElement("path",{d:"M63.7517 60.8134C63.5541 64.1055 62.4431 67.8955 58.3608 67.698C51.2005 67.3523 49.468 59.8257 49.468 59.8257C49.468 59.8257 50.0524 49.0564 50.2211 48.9453H63.5212V56.118C63.7576 57.6712 63.8348 59.2445 63.7517 60.8134Z",fill:"#F3A268"}),e.createElement("path",{d:"M63.7518 60.8134C53.4639 58.6776 51.9907 53.2498 51.9907 53.2498L62.3362 48.9453H63.5213V56.118C63.7578 57.6712 63.835 59.2445 63.7518 60.8134Z",fill:"#E56542"}),e.createElement("path",{d:"M48.2705 45.0444C48.2705 45.0444 51.3569 60.1306 62.8669 57.0442C64.1746 56.6944 65.3669 56.0059 66.3236 55.0484C67.178 54.1893 67.7972 53.1251 68.122 51.9579C69.2824 47.7728 69.0767 40.9416 67.8298 32.02L48.2705 33.6661V45.0444Z",fill:"#F3A268"}),e.createElement("path",{d:"M47.5381 46.18C47.5792 46.18 49.8343 43.711 51.8055 47.0319C51.8055 47.0319 48.3241 45.3858 47.5792 46.18H47.5381Z",fill:"#F35757"}),e.createElement("path",{d:"M52.8879 39.6082C62.0317 41.2131 69.5583 38.9333 71.5295 33.4355C71.7091 32.9274 71.7625 32.3832 71.6851 31.8498C71.6076 31.3165 71.4017 30.81 71.0851 30.3739C70.7684 29.9378 70.3505 29.5852 69.8674 29.3464C69.3842 29.1077 68.8502 28.99 68.3115 29.0035C64.1099 29.1146 56.9866 30.6495 50.0485 31.8841C49.5312 31.9749 49.0287 32.1355 48.5547 32.3614C44.5013 34.3079 43.3614 38.0115 44.279 42.9579C45.8346 50.3117 48.2337 51.6326 50.818 51.5997C50.6534 47.2006 54.0031 43.748 52.8879 39.6082Z",fill:"#202738"}),e.createElement("path",{d:"M49.6286 50.9701C51.3172 50.9701 52.6861 49.2069 52.6861 47.0319C52.6861 44.8569 51.3172 43.0938 49.6286 43.0938C47.94 43.0938 46.571 44.8569 46.571 47.0319C46.571 49.2069 47.94 50.9701 49.6286 50.9701Z",fill:"#F3A268"}),e.createElement("path",{d:"M47.5382 46.4227C47.497 46.4433 49.6904 44.1059 51.3406 46.7314C51.3323 46.7149 48.9455 45.7026 47.5382 46.4227Z",fill:"#E56542"}),e.createElement("path",{d:"M45.1596 154.162C47.102 152.804 45.6535 148.656 44.0979 145.293C46.0691 145.726 48.0979 145.668 48.5176 144.837C49.1225 143.643 46.1802 141.318 43.8757 140.15C43.466 139.942 43.0409 139.765 42.6041 139.623C41.8988 138.664 40.9021 137.958 39.7628 137.612C38.6236 137.266 37.4029 137.297 36.2831 137.702C35.1633 138.107 34.2043 138.862 33.5495 139.857C32.8946 140.851 32.5789 142.031 32.6496 143.219C32.4995 144.835 32.8196 146.46 33.5714 147.898C35.3245 151.351 40.7482 157.248 45.1596 154.162Z",fill:"#F3A268"}),e.createElement("path",{d:"M58.0523 67.7022H58.2457C60.2662 67.6651 61.83 66.6652 62.8917 64.7269C63.8793 62.9245 64.1962 60.7394 64.2867 59.2291L63.8299 59.2003C63.3978 66.373 59.7765 67.2125 58.2374 67.2413H58.0564C50.6491 67.2413 48.9742 58.727 48.9578 58.6406L48.5051 58.727C48.5216 58.8258 50.2705 67.7022 58.0523 67.7022Z",fill:"#251138"}),e.createElement("path",{d:"M58.4638 67.4733L58.0032 67.4897L60.4935 137.403L60.9541 137.386L58.4638 67.4733Z",fill:"#251138"}),e.createElement("path",{d:"M60.9042 76.6116C61.3201 76.6116 61.6573 76.2744 61.6573 75.8585C61.6573 75.4426 61.3201 75.1055 60.9042 75.1055C60.4883 75.1055 60.1511 75.4426 60.1511 75.8585C60.1511 76.2744 60.4883 76.6116 60.9042 76.6116Z",fill:"black"}),e.createElement("path",{d:"M61.4762 87.4632C61.8921 87.4632 62.2293 87.126 62.2293 86.7101C62.2293 86.2942 61.8921 85.957 61.4762 85.957C61.0603 85.957 60.7231 86.2942 60.7231 86.7101C60.7231 87.126 61.0603 87.4632 61.4762 87.4632Z",fill:"black"}),e.createElement("path",{d:"M62.048 98.3108C62.4639 98.3108 62.8011 97.9737 62.8011 97.5578C62.8011 97.1419 62.4639 96.8047 62.048 96.8047C61.6321 96.8047 61.2949 97.1419 61.2949 97.5578C61.2949 97.9737 61.6321 98.3108 62.048 98.3108Z",fill:"black"}),e.createElement("path",{d:"M62.62 109.158C63.0359 109.158 63.3731 108.821 63.3731 108.405C63.3731 107.99 63.0359 107.652 62.62 107.652C62.2041 107.652 61.8669 107.99 61.8669 108.405C61.8669 108.821 62.2041 109.158 62.62 109.158Z",fill:"black"}),e.createElement("path",{d:"M63.192 120.01C63.6079 120.01 63.9451 119.673 63.9451 119.257C63.9451 118.841 63.6079 118.504 63.192 118.504C62.7761 118.504 62.439 118.841 62.439 119.257C62.439 119.673 62.7761 120.01 63.192 120.01Z",fill:"black"}),e.createElement("path",{d:"M63.7641 130.857C64.18 130.857 64.5171 130.52 64.5171 130.104C64.5171 129.688 64.18 129.351 63.7641 129.351C63.3481 129.351 63.011 129.688 63.011 130.104C63.011 130.52 63.3481 130.857 63.7641 130.857Z",fill:"#001065"}),e.createElement("path",{d:"M136.108 110.409L134.224 122.158L128.878 122.162L130.985 109.417L136.108 110.409Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M42.8757 139.717L32.4026 145.376L28.9871 140.927C31.7277 139.166 39.5671 134.158 40.028 134.022L42.8757 139.717Z",fill:"#DFE0E4"}),e.createElement("path",{d:"M19.5264 101.701L24.1682 102.319V101.858L19.5264 101.245V101.701Z",fill:"#251138"}),e.createElement("path",{d:"M91.8474 101.31L87.0142 106.144L87.3401 106.469L92.1733 101.636L91.8474 101.31Z",fill:"#251138"}),e.createElement("path",{d:"M151.128 58.7766C151.223 58.5915 150.989 58.4804 150.882 58.6491C149.647 60.5791 149.38 62.8589 149.124 65.1057C148.812 67.8629 148.635 70.6365 148.359 73.3936C147.351 83.27 143.964 92.7636 141.717 102.405C139.548 111.726 137.573 121.969 140.359 131.401C140.413 131.582 140.623 131.368 140.623 131.253C140.051 125.993 139.388 120.911 139.89 115.615C140.808 105.669 144.005 95.9816 146.474 86.3522C147.698 81.8261 148.558 77.2092 149.046 72.5459C149.458 68.0769 149.149 62.863 151.133 58.7561L151.128 58.7766Z",fill:"#E0E0E0"}),e.createElement("path",{d:"M152.775 60.7687C152.873 60.7234 152.956 60.4271 152.775 60.4683C151.59 60.7399 150.409 61.7645 150.767 63.0855C151.125 64.4065 153.038 64.7604 154.17 64.2953C154.82 64.0484 155.293 63.4147 154.705 62.8756C153.824 62.032 152.614 62.9291 152.285 63.7892C151.898 64.8139 152.116 66.1513 153.289 66.4434C153.836 66.5834 155.692 66.3899 155.347 65.4105C155.129 64.7439 154.199 65.0608 153.853 65.4105C152.738 66.5545 154.108 67.8796 155.129 68.3817C155.264 68.4516 155.375 68.1924 155.264 68.106C154.886 67.8878 154.552 67.6002 154.281 67.2582C154.425 66.0525 153.894 65.2212 152.664 64.7892L152.754 64.0896C153.063 63.9497 153.063 63.9085 152.754 63.9085C152.325 63.8882 151.913 63.7294 151.581 63.4559C150.664 62.4394 151.906 61.1473 152.783 60.7687H152.775Z",fill:"#E0E0E0"}),e.createElement("path",{d:"M168.071 41.1517C168.145 40.9419 167.898 40.9419 167.824 41.1106C166.351 44.4027 165.511 47.9664 164.301 51.2297C163.091 54.493 161.503 57.6205 160.388 60.9497C158.33 67.0483 157.474 73.435 156.12 79.6983C155.523 82.6843 154.664 85.6119 153.552 88.4471C152.404 91.2947 151.001 94.0231 149.668 96.7884C147.026 102.27 144.355 107.821 142.557 113.661C141.651 116.607 140.911 119.627 140.207 122.619C139.45 125.862 138.833 129.125 139.034 132.471C139.034 132.697 139.326 132.528 139.326 132.364C139.539 128.543 140.167 124.757 141.199 121.072C142.042 117.78 142.845 114.459 143.981 111.245C146.014 105.513 148.734 100.015 151.388 94.5539C152.705 91.9827 153.873 89.3377 154.886 86.6323C155.888 83.5888 156.673 80.4782 157.235 77.3238C158.503 70.9906 159.569 64.6451 161.853 58.5752C162.881 55.8634 164.207 53.2749 165.145 50.5343C166.19 47.4191 166.988 44.2299 168.079 41.1435L168.071 41.1517Z",fill:"#E0E0E0"}),e.createElement("path",{d:"M163.75 89.4636C163.865 89.2743 163.614 89.1632 163.503 89.3237C162.351 90.9698 161.663 92.764 160.733 94.5211C159.429 96.9902 157.404 98.9778 155.519 100.978C152.585 104.089 149.524 107.06 147.289 110.78C145.055 114.5 143.816 118.681 142.763 122.854C142.182 125.158 141.676 127.492 141.088 129.796C140.85 130.929 140.49 132.033 140.014 133.088C139.54 134.035 138.919 134.878 138.499 135.854C138.347 136.212 138.952 136.347 139.088 136.035C139.499 135.059 140.125 134.212 140.606 133.265C141.038 132.337 141.365 131.364 141.581 130.364C142.182 128.076 142.68 125.73 143.265 123.368C144.442 118.673 145.849 113.945 148.548 109.871C151.149 105.978 154.688 102.793 157.812 99.307C158.904 98.1412 159.887 96.8765 160.746 95.5293C161.919 93.5952 162.581 91.4142 163.758 89.4842L163.75 89.4636Z",fill:"#E0E0E0"}),e.createElement("path",{d:"M163.89 91.4018C163.976 91.2537 163.82 91.1179 163.709 91.2537C162.91 92.2454 162.622 93.6487 163.561 94.6857C164.133 95.3154 165.54 95.9738 166.289 95.0973C167.038 94.2207 165.877 93.5911 165.054 93.5911C164.512 93.6317 164 93.8588 163.607 94.2339C163.213 94.609 162.961 95.1089 162.894 95.6487C162.892 95.6774 162.892 95.7063 162.894 95.7351C162.865 95.9962 162.887 96.2605 162.961 96.5128C163.034 96.7651 163.156 97.0005 163.321 97.2054C163.485 97.4103 163.688 97.5808 163.919 97.707C164.149 97.8332 164.402 97.9126 164.663 97.9408C165.322 98.0108 166.865 97.4429 166.281 96.5046C165.322 94.9614 161.643 98.5951 164.951 99.6074C165.165 99.6609 165.363 99.3605 165.165 99.2618H165.104C164.729 99.1237 164.424 98.8426 164.256 98.4801C164.087 98.1175 164.07 97.7031 164.207 97.3277L163.569 96.6816C163.02 95.3702 163.631 94.5019 165.4 94.0767L164.223 94.6652C163.433 94.5664 163.351 92.7763 163.433 92.3854C163.52 92.0402 163.669 91.7139 163.873 91.4224L163.89 91.4018Z",fill:"#E0E0E0"}),e.createElement("path",{d:"M166.556 41.7402C166.508 41.9639 166.52 42.1966 166.593 42.4139C166.665 42.6311 166.795 42.8248 166.968 42.9747C167.424 43.4121 167.977 43.7349 168.583 43.9166C169.188 44.0983 169.828 44.1337 170.449 44.02C170.68 43.994 170.899 43.9056 171.083 43.7641C171.268 43.6227 171.41 43.4337 171.494 43.2175C171.832 42.1393 170.729 38.7402 170.322 38.6168C169.914 38.4933 166.898 40.7032 166.585 41.7402H166.556Z",fill:"#BA68C8"}),e.createElement("path",{opacity:"0.1",d:"M166.556 41.7402C166.508 41.9639 166.52 42.1966 166.593 42.4139C166.665 42.6311 166.795 42.8248 166.968 42.9747C167.424 43.4121 167.977 43.7349 168.583 43.9166C169.188 44.0983 169.828 44.1337 170.449 44.02C170.68 43.994 170.899 43.9056 171.083 43.7641C171.268 43.6227 171.41 43.4337 171.494 43.2175C171.832 42.1393 170.729 38.7402 170.322 38.6168C169.914 38.4933 166.898 40.7032 166.585 41.7402H166.556Z",fill:"black"}),e.createElement("path",{d:"M164.466 32.9049L169.634 40.4603L178.116 37.0036C186.169 33.7115 196.284 28.0819 198.691 20.078C199.435 17.5808 199.206 14.8947 198.049 12.5596V12.5185C197.363 11.1393 196.4 9.91609 195.221 8.92496C194.041 7.93384 192.67 7.19598 191.194 6.75729C187.461 5.62562 183.305 7.40337 180.416 10.2099C180.181 10.4371 179.89 10.5976 179.572 10.6749C179.255 10.7521 178.922 10.7434 178.609 10.6495C178.296 10.5556 178.014 10.38 177.791 10.1407C177.568 9.90143 177.413 9.60713 177.342 9.2881C176.486 5.37048 174.013 1.60925 170.26 0.481697C168.787 0.0321725 167.238 -0.109566 165.708 0.0652961C164.178 0.240158 162.7 0.727881 161.367 1.49814H161.318C159.059 2.80389 157.38 4.91915 156.622 7.41571C154.24 15.4402 159.561 25.6869 164.466 32.9049Z",fill:"#BA68C8"}),e.createElement("path",{d:"M164.466 32.9049L169.634 40.4603L178.116 37.0036C186.169 33.7115 196.284 28.0819 198.691 20.078C199.435 17.5808 199.206 14.8947 198.049 12.5596V12.5185C197.363 11.1393 196.4 9.91609 195.221 8.92496C194.041 7.93384 192.67 7.19598 191.194 6.75729C187.461 5.62562 183.305 7.40337 180.416 10.2099C180.181 10.4371 179.89 10.5976 179.572 10.6749C179.255 10.7521 178.922 10.7434 178.609 10.6495C178.296 10.5556 178.014 10.38 177.791 10.1407C177.568 9.90143 177.413 9.60713 177.342 9.2881C176.486 5.37048 174.013 1.60925 170.26 0.481697C168.787 0.0321725 167.238 -0.109566 165.708 0.0652961C164.178 0.240158 162.7 0.727881 161.367 1.49814H161.318C159.059 2.80389 157.38 4.91915 156.622 7.41571C154.24 15.4402 159.561 25.6869 164.466 32.9049Z",fill:"#128749"}),e.createElement("path",{opacity:"0.1",d:"M164.458 32.8884L169.63 40.4438L178.112 36.9871C186.165 33.6949 196.276 28.0654 198.687 20.0574C199.427 17.5662 199.196 14.8875 198.041 12.5596C198.798 21.2014 185.572 31.3699 173.791 30.6662C163.914 30.0366 157.104 16.7323 156.277 14.7776C157.252 21.0738 160.968 27.7609 164.458 32.8884Z",fill:"black"}),e.createElement("path",{d:"M161.89 89.2001C161.789 89.405 161.744 89.6332 161.761 89.8611C161.778 90.089 161.855 90.3083 161.984 90.4964C162.314 91.0337 162.765 91.4856 163.302 91.8152C163.839 92.1449 164.447 92.343 165.075 92.3935C165.298 92.4184 165.523 92.3848 165.728 92.296C165.934 92.2072 166.113 92.0664 166.248 91.8873C166.873 90.9038 166.659 87.3606 166.285 87.1343C165.91 86.908 162.458 88.2742 161.869 89.1919H161.89V89.2001Z",fill:"#BA68C8"}),e.createElement("path",{d:"M161.89 89.2001C161.789 89.405 161.744 89.6332 161.761 89.8611C161.778 90.089 161.855 90.3083 161.984 90.4964C162.314 91.0337 162.765 91.4856 163.302 91.8152C163.839 92.1449 164.447 92.343 165.075 92.3935C165.298 92.4184 165.523 92.3848 165.728 92.296C165.934 92.2072 166.113 92.0664 166.248 91.8873C166.873 90.9038 166.659 87.3606 166.285 87.1343C165.91 86.908 162.458 88.2742 161.869 89.1919H161.89V89.2001Z",fill:"#B4DD64"}),e.createElement("path",{d:"M162.112 80.1179L165.174 88.7597L174.256 87.5827C182.897 86.4799 194.103 83.624 198.481 76.5007C199.842 74.2872 200.31 71.6391 199.79 69.0934V69.0399C199.478 67.5326 198.859 66.1055 197.972 64.8475C197.085 63.5895 195.949 62.5274 194.634 61.7273C191.301 59.6697 186.86 60.3446 183.342 62.3158C183.046 62.4809 182.71 62.562 182.371 62.5503C181.882 62.5311 181.422 62.3187 181.09 61.9599C180.758 61.601 180.582 61.1252 180.601 60.6368C180.782 56.6122 179.367 52.3448 176.017 50.2954C174.709 49.4819 173.247 48.9463 171.723 48.7218C170.198 48.4974 168.644 48.589 167.157 48.9909H167.112C164.598 49.6821 162.44 51.2994 161.071 53.5176C156.68 60.5998 159.223 71.904 162.112 80.1179Z",fill:"#BA68C8"}),e.createElement("path",{d:"M162.112 80.1179L165.174 88.7597L174.256 87.5827C182.897 86.4799 194.103 83.624 198.481 76.5007C199.842 74.2872 200.31 71.6391 199.79 69.0934V69.0399C199.478 67.5326 198.859 66.1055 197.972 64.8475C197.085 63.5895 195.949 62.5274 194.634 61.7273C191.301 59.6697 186.86 60.3446 183.342 62.3158C183.046 62.4809 182.71 62.562 182.371 62.5503C181.882 62.5311 181.422 62.3187 181.09 61.9599C180.758 61.601 180.582 61.1252 180.601 60.6368C180.782 56.6122 179.367 52.3448 176.017 50.2954C174.709 49.4819 173.247 48.9463 171.723 48.7218C170.198 48.4974 168.644 48.589 167.157 48.9909H167.112C164.598 49.6821 162.44 51.2994 161.071 53.5176C156.68 60.5998 159.223 71.904 162.112 80.1179Z",fill:"#B4DD64"}),e.createElement("path",{opacity:"0.05",d:"M162.112 80.1177L165.169 88.7595L174.247 87.5826C182.889 86.4797 194.099 83.6238 198.477 76.5005C199.836 74.2863 200.304 71.639 199.786 69.0933C198.3 77.6445 182.914 84.0806 171.708 80.3564C162.293 77.233 159.153 62.6078 158.861 60.5132C158.178 66.8382 160.05 74.2495 162.112 80.1177Z",fill:"black"}),e.createElement("path",{d:"M148.602 59.0607C148.547 59.2798 148.552 59.5094 148.615 59.7262C148.677 59.943 148.797 60.1393 148.96 60.2952C149.392 60.7565 149.927 61.1089 150.521 61.3235C151.116 61.5381 151.753 61.6088 152.38 61.5298C152.606 61.5095 152.823 61.43 153.008 61.2992C153.194 61.1685 153.342 60.9911 153.437 60.7849C153.828 59.6985 152.861 56.2583 152.491 56.1307C152.12 56.0031 148.968 58.0442 148.602 59.0648V59.0607Z",fill:"#BA68C8"}),e.createElement("path",{d:"M148.602 59.0607C148.547 59.2798 148.552 59.5094 148.615 59.7262C148.677 59.943 148.797 60.1393 148.96 60.2952C149.392 60.7565 149.927 61.1089 150.521 61.3235C151.116 61.5381 151.753 61.6088 152.38 61.5298C152.606 61.5095 152.823 61.43 153.008 61.2992C153.194 61.1685 153.342 60.9911 153.437 60.7849C153.828 59.6985 152.861 56.2583 152.491 56.1307C152.12 56.0031 148.968 58.0442 148.602 59.0648V59.0607Z",fill:"#1F9999"}),e.createElement("path",{d:"M146.952 50.1146L151.721 57.9334L160.363 54.917C168.573 52.0364 178.963 46.9377 181.762 39.0696C182.63 36.6145 182.54 33.9225 181.511 31.5306V31.4895C180.894 30.08 179.994 28.8123 178.867 27.7647C177.74 26.7171 176.41 25.9119 174.959 25.3991C171.256 24.074 167.05 25.6336 164.021 28.2797C163.774 28.4938 163.474 28.6383 163.153 28.6983C162.831 28.7583 162.499 28.7316 162.191 28.621C161.883 28.5104 161.61 28.3199 161.4 28.069C161.191 27.8181 161.051 27.5158 160.997 27.1933C160.338 23.2222 158.067 19.3416 154.371 18.0247C152.924 17.4997 151.385 17.2781 149.849 17.3737C148.312 17.4693 146.812 17.88 145.441 18.5803L145.396 18.6091C143.082 19.801 141.305 21.8259 140.425 24.2756C137.635 32.1438 142.441 42.6662 146.952 50.1146Z",fill:"#1F9999"}),e.createElement("path",{opacity:"0.1",d:"M146.964 50.1142L151.734 57.933L160.375 54.9166C168.585 52.036 178.972 46.9374 181.774 39.0692C182.642 36.6142 182.553 33.9221 181.523 31.5303C181.832 40.2009 168.104 49.6739 156.367 48.3489C146.516 47.2337 140.425 33.5755 139.697 31.5838C140.376 37.9376 143.742 44.8057 146.964 50.1142Z",fill:"black"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_5504_25779"},e.createElement("rect",{width:"200",height:"181.79",fill:"white"})))),k=({question:n,formValues:t,onChangeHandler:r,autoFocus:o})=>{switch(n.type_info.question_type){case"RANGE":return e.createElement(c,{type_info:n.type_info,onChangeHandler:r,npsValue:t[n.name]});case"CHECKBOX":case"MULTI_SELECT":return e.createElement(h,{autoFocus: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(g,{autoFocus: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(m,{autoFocus: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(p,{autoFocus: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(p,{autoFocus: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 --widget-container-width: 350px;\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-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 .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 .action-buttons {\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 .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 .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-components .responsive-text-field .input-container {\n display: none;\n }\n .freemium-survey-components .responsive-text-field .textarea-container {\n display: flex;\n }\n}\ndiv.widget-survey-components {\n display: flex;\n flex-grow: 1;\n font-size: 0.875rem;\n overflow: hidden;\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}\ndiv.widget-survey-components .questions {\n min-width: 100%;\n max-width: 100%;\n display: flex;\n height: 100%;\n max-height: 560px;\n max-height: var(--compact-widget-max-height);\n}\ndiv.widget-survey-components .question-text {\n font-size: 0.875rem;\n width: 100%;\n text-align: left;\n}\ndiv.widget-survey-components .question-container {\n box-shadow: none;\n height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n padding: 12px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .action-buttons {\n margin: 0px auto;\n justify-content: end;\n flex-direction: row-reverse;\n grid-gap: 16px;\n gap: 16px;\n position: -webkit-sticky;\n position: sticky;\n bottom: 0;\n background-color: #fff;\n}\ndiv.widget-survey-components .submit {\n padding-bottom: 0;\n margin: unset;\n}\ndiv.widget-survey-components .nps-container .footer {\n padding-top: 12px;\n}\ndiv.widget-survey-components .nps-container .widget .choices {\n grid-gap: 8px;\n gap: 8px;\n}\ndiv.widget-survey-components .radio-group {\n overflow: auto;\n width: 100%;\n}\ndiv.widget-survey-components .checkbox-group {\n overflow: auto;\n width: 100%;\n flex-wrap: nowrap;\n}\ndiv.widget-survey-components div.thankyou {\n grid-gap: 36px;\n gap: 36px;\n}\ndiv.widget-survey-components svg {\n width: 140px;\n height: 120px;\n}\n\n.widget-survey-components.default-style .questions {\n max-height: 400px;\n max-height: var(--default-widget-max-height);\n}\n.widget-survey-components.default-style .question-container {\n padding: 12px 28px;\n}\n.widget-survey-components.default-style .nps-container .footer {\n padding-top: 12px;\n}\n.widget-survey-components.default-style .action-button {\n line-height: 1.2;\n}\n.widget-survey-components.default-style .radio-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.default-style .radio-group .radio-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.default-style .checkbox-group {\n flex-direction: row;\n flex-wrap: wrap;\n overflow: auto;\n}\n.widget-survey-components.default-style .checkbox-group .checkbox-label {\n padding: 12px 16px;\n min-width: 160px;\n font-size: 0.9rem;\n}\n.widget-survey-components.default-style textarea {\n min-height: 84px;\n}\n.widget-survey-components.default-style .end-max-length {\n font-size: 0.8rem;\n font-weight: 300;\n padding: 4px;\n}\n.widget-survey-components.default-style div.thankyou {\n flex-direction: row;\n}\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 .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=()=>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"})),q=()=>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"})),_=["RANGE","NPS","RADIO","DROPDOWN"],M=300,N=1e4,Z=({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(E,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=({survey:t,placeholders:i,onSubmit:c,widget:l,surveyContainerWidth:s="0px",npsValue:d,widgetStyle:u,widgetNavigatorQuerySelector:m,preview:p,mobilePreview:f})=>{const{meta:{blocks:h},question_details:{questions:C}}=t,[g,x]=o(null),[v,y]=o({}),[E,N]=o(!1),[z,F]=o([]),[H,D]=o(0),[$,O]=o(!1),[R,A]=o(null),S=n(null),T=n(null),B=n(-1),V=n(null),j=n(0),I=n(!1),P=n([]),U=n(null),Y=n([]);r((()=>{h&&(U.current=h.find((e=>"T_1"===e.name)),x(h.filter((e=>"T_1"!==e.name))))}),[h]),r((()=>{if(g)if(T.current=C.find((e=>e.pivot_question))??C.find((e=>"RANGE"===e.type_info.question_type))??C[0],null!=d){B.current=d;const e=C.find((e=>e.name===g[0].question_names[0]));S.current={...g[0],question:e},P.current=[...P.current,{...g[0],question:e}],F(P.current),y({Q_1:d})}else if(!S.current&&g.length>0)return S.current=g[0],void W(g[0])}),[g,d]),e.useEffect((()=>{l||V.current?.scrollIntoView({block:"center",behavior:"smooth"}),z.length&&(P.current=z),V.current&&(V.current.style.maxHeight="unset"),Y.current[j.current]=V.current?.scrollHeight||Y.current[j.current]||0,D(z.length-1),V.current&&(V.current.style.maxHeight="100%")}),[z]),r((()=>{Object.keys(v).length>0&&S.current.question&&(_.includes(S.current.question.type_info.question_type)||I.current)&&!G()&&X()}),[v]),r((()=>{if(null!=v?.[T.current?.name])if(U.current?.is_based_on_score){const e=T.current?.type_info?.choices[v?.[T.current?.name]]?.dependent_question_names,n=U.current?.question_names.find((n=>e?.includes(n))),t=C.find((e=>e.name===n));A(t)}else{const e=C.find((e=>e.name==U.current?.question_names[0]));A(e)}}),[v?.[T.current?.name]]);const G=()=>j.current===g.length-1||"end"===S.current.branchOption,Q=e=>{if(e){let t={"{{nps.score}}":B.current};i&&(t={...t,...i});var n=new RegExp(Object.keys(t).join("|"),"gi");e=e.replace(n,(function(e){return t[e.toLowerCase()]}))}return e},W=e=>{let n={};if(e.is_based_on_score){const t=T.current?.type_info?.choices[v?.[T.current?.name]]?.dependent_question_names,r=e.question_names.find((e=>t?.includes(e)));n=C.find((e=>e.name===r))}else n=C.find((n=>n.name===e.question_names[0]));S.current.question=n;const t=P.current.find((e=>e.question.name===n.name));F(t?[...P.current]:[...P.current,{...e,question:n}])},X=()=>{if(G())N(!0);else{if(S.current.nextBlock)j.current=g.findIndex((e=>e.name===S.current.nextBlock));else if(S.current.question.type_info?.meta?.branches){const e=S.current.question.type_info?.meta?.branches,n=v[S.current.question.name];let t;t="RANGE"===S.current.type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?j.current=g.findIndex((e=>e.name===t.nextBlock)):j.current+=1}else j.current+=1;S.current=g[j.current],W(g[j.current])}},K=(e,n)=>{I.current=!0,delete v[n.name],y({...v})},J=(e,n,t)=>{if(t){if(I.current=!0,null!=v[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]=v[n.question.name],e)),{});return j.current=g.findIndex((n=>n.name===e.name)),[t,r]})(e);y({...r,...null!=n&&{[e.question.name]:n}}),P.current=t}else y({...v,...null!=n&&{[e.question.name]:n}});T?.current?.name==e?.question?.name&&(B.current=n)}else y({...v,...null!=n&&{[e.question.name]:n}})};return S.current&&S.current.question?E?e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${u}-style`},e.createElement(Z,{thankYouQuestion:R,preview:p})):e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${u}-style ${f?"mobile-preview":""}`,style:{"--widget-container-width":s}},!l&&e.createElement(b,{totalSteps:g.length,completedSteps:j.current}),l&&document.querySelector(m)&&e.createElement(e.Fragment,null,a.createPortal(e.createElement("div",{className:"navigation","data-navigation-element":"1",style:0!==j.current?{paddingLeft:"18px"}:{}},e.createElement("button",{style:0==j.current?{display:"none"}:{},className:"navigate-button",onClick:()=>{j.current=Math.max(j.current-1,0),D(j.current)}},e.createElement(q,null)),e.createElement("span",{className:"navigation-text"},"Question ",j.current+1," of"," ",z.length," "),e.createElement("button",{className:"navigate-button",style:j.current>=z.length-1?{visibility:"hidden"}:{},onClick:()=>{j.current=Math.min(j.current+1,z.length-1),D(j.current)}},e.createElement(L,null))),document.querySelector(m))),e.createElement("div",{style:l?{transform:`translateX(calc(-${H} * 100%))`,height:`${Y.current[j.current]}px`,transition:z?.length>1?`all ${M}ms linear 0ms`:`transform ${M}ms linear 0ms`}:{},className:"questions"},z.map(((n,t)=>{return e.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 100ms ease-out",opacity:l&&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:Q(n.question.text)}}),e.createElement(k,{question:n.question,formValues:v,autoFocus:S.current.name===n.name,onChangeHandler:e=>{I.current=!1,j.current=g.findIndex((e=>e.name===n.name)),S.current=n,J(n,e,_.includes(n.question.type_info.question_type)&&!G())}}),e.createElement("div",{className:"action-buttons"},(r=n.question,r.name===S.current.question.name&&!_.includes(r.type_info.question_type)&&!G()&&e.createElement(w,{onClick:()=>{I.current?(j.current=Math.min(j.current+1,z.length-1),S.current=z[t+1],D(j.current)):J(n,null,!0)},disabled:!v[S.current.question.name]||Array.isArray(v[S.current.question.name])&&0===v[S.current.question.name].length,className:"next-button"},"Next")),((e,n)=>"RANGE"!==n.type_info.question_type&&!n.required&&n.name===S.current.question.name&&!G())(0,n.question)&&e.createElement("button",{className:"skip-button",onClick:()=>K(0,n.question)},"Skip"),((e,n)=>"DROPDOWN"===n.type_info.question_type&&n.name!==S.current.question.name&&!n.required&&null!=v[n.name])(0,n.question)&&e.createElement("button",{className:"skip-button",onClick:()=>{S.current=n,j.current=g.findIndex((e=>e.name===n.name)),K(0,n.question)}},"Clear selection"),l&&(e=>G()&&e.name===S.current.question.name)(n.question)&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:(S.current.question.required||S.current.question.type_info.pivot_question)&&void 0===v[S.current.question.name]||$,onClick:()=>{O(!0),c(v,(()=>{R?.type_info.meta?.skipThankYouPage||N(!0)}))}},$?"Submitting":"Submit Survey"))));var r})),!l&&G()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:S.current.question.required&&void 0===v[S.current.question.name]||$,onClick:()=>{O(!0),c(v,(()=>{p||R?.type_info.meta?.skipThankYouPage&&(window.location.href=R?.type_info.meta?.redirectUrl),R?.type_info.meta?.skipThankYouPage||N(!0)}))}},$?"Submitting Survey":"Submit Survey")))):null};export{N as AUTO_REDIRECT_DELAY,y as BUTTON_SIZE_VARIANTS,w as Button,h as CheckboxGroup,m as Input,c as NPS,b as ProgressBar,x as Radio,g as RadioGroup,z as Survey,M as TRANSITION_DELAY,p 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 .widget {\n position: relative;\n}\n.freemium-survey-components .nps-container .widget .button-container {\n display: flex;\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 .widget .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 .widget .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 .widget span {\n color: #aaa;\n font-size: 0.75rem;\n}\n.freemium-survey-components .nps-container .widget 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 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 .widget button:hover {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget button.active {\n color: white;\n transform: scale(1.2);\n z-index: 2;\n position: relative;\n}\n.freemium-survey-components .nps-container .widget.rounded button {\n border-radius: 50%;\n}\n.freemium-survey-components .nps-container .widget.square button {\n border-radius: 0;\n}\n.freemium-survey-components .nps-container .widget.curved button {\n border-radius: 3px;\n}\n.freemium-survey-components .nps-container .widget.highlighted button:hover, .freemium-survey-components .nps-container .widget.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 .widget .choices {\n width: 100%;\n display: flex;\n justify-content: space-between;\n}\n.freemium-survey-components .nps-container .widget.standard .button-container {\n background-color: transparent;\n}\n.freemium-survey-components .nps-container .widget.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 .widget.standard .choice.active,\n.freemium-survey-components .nps-container .widget.standard .choice:hover {\n color: #fff;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(1):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(1).active {\n background: #eb5b56;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(2):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(2).active {\n background: #fb8774;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(3):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(3).active {\n background: #f58f6b;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(4):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(4).active {\n background: #f6996a;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(5):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(5).active {\n background: #eab268;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(6):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(6).active {\n background: #cebb69;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(7):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(7).active {\n background: #bdc46c;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(8):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(8).active {\n background: #a4cd72;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(9):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(9).active {\n background: #77c955;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(10):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(10).active {\n background: #37c248;\n}\n.freemium-survey-components .nps-container .widget.standard .choice:nth-child(11):hover, .freemium-survey-components .nps-container .widget.standard .choice:nth-child(11).active {\n background: #1ebf31;\n}\n\n.freemium-survey-components.mobile-preview .nps-container .widget .button-container {\n background: transparent;\n}\n.freemium-survey-components.mobile-preview .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}\n\n@media (max-width: 550px) {\n .freemium-survey-components .nps-container .widget .button-container,\n.card-survey-style .nps-container .widget .button-container {\n background: transparent;\n }\n .freemium-survey-components .nps-container .widget .choices,\n.card-survey-style .nps-container .widget .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 .widget button,\n.card-survey-style .nps-container .widget button {\n border-radius: 50%;\n background: #ebeff3;\n }\n}\n.widget-survey-components .nps-container .widget .button-container {\n background: transparent;\n}\n.widget-survey-components .nps-container .widget .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 .widget button {\n border-radius: 50%;\n background: #ebeff3;\n}");const c=t=>{const{type_info:{linear_scale:{button_shape:r,button_style:o},score_presets:{start:a,end:i},validation:{min:c},footer_text:s}}=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===c?1:0)},((e,n)=>n+c)));return e.createElement("div",{className:"nps-container"},e.createElement("div",{className:`widget ${r} ${o}`},e.createElement("div",{className:"button-container"},e.createElement("span",{className:"negative-text"},a),e.createElement("div",{className:"choices"},u.current.map((n=>e.createElement("button",{key:n,onClick:e=>{t.onChangeHandler(n)},className:`choice ${l(n)} ${t.npsValue===n&&"active"}`},n)))),e.createElement("span",{className:"positive-text"},i))),e.createElement("div",{className:"footer"},s))},s=(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,autoFocus:!0},u=t(((t,o)=>{const a=n(null);r((()=>{t.autoFocus&&setTimeout((()=>{a.current?.focus()}),q+20)}),[t.autoFocus]);const{inputStyle:i,style:c,className:s,showCount:l,isErrored:u,startLabel:d,isRequired:p,errorText:m,endLabel:f,maxLength:h,autoFocus:v,...g}=t;return e.createElement("div",{className:"input-container",style:c},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":""}${s||""}`},e.createElement("input",Object.assign({type:"text",autoComplete:"off",ref:a,style:i},g)),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.autoFocus&&setTimeout((()=>{a.current?.focus()}),q+20)}),[]);const{inputStyle:i,style:c,className:s,showCount:l,maxLength:u,isErrored:d,startLabel:p,isRequired:m,autoFocus:f,...h}=t;return e.createElement(e.Fragment,null,e.createElement("div",{className:"textarea-container",style:c},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":""} ${s||""}`},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=s(u,l),m=s(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,autoFocus:i,onChangeHandler:c,othersOption:s,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"}),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)c([...t||[],n.value]);else{const e=t.indexOf(n.value);e>-1&&t.splice(e,1),c([...t])}}},n.value))),s&&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,c(t)):c(t.concat(e.target.value))},label:""})))},v=s((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 g=({name:t,options:a,value:i,autoFocus:c,onChangeHandler:s,othersOption:l,othersRequired:u})=>{const[d,m]=o(""),[f,h]=o(""),v=n(null);return r((()=>{c&&setTimeout((()=>{v.current?.focus()}),q+20)}),[]),r((()=>{i||(h(""),m(""))}),[i]),r((()=>{f&&a.find((e=>e.value===f))&&s(f)}),[f]),e.createElement("div",{className:"radio-group"},e.createElement("button",{ref:v,className:"autofocus-button"}),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:()=>s(d)},"Next")))},x=s((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 b=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}");const y=()=>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:c="primary",onClick:s,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:s},p),d?e.createElement(y,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,autoFocus:o})=>{switch(n.type_info.question_type){case"RANGE":return e.createElement(c,{type_info:n.type_info,onChangeHandler:r,npsValue:t[n.name]});case"CHECKBOX":case"MULTI_SELECT":return e.createElement(h,{autoFocus: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(g,{autoFocus: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,{autoFocus: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,{autoFocus: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,{autoFocus: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}\n.freemium-survey-step-navigation .navigation-button:first-of-type {\n border-right: 1px solid #b5b5b5;\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 margin-top: -12px;\n margin-left: -12px;\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 .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 height: 100%;\n min-width: 100%;\n max-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n padding: 16px 28px;\n grid-gap: 16px;\n gap: 16px;\n flex-grow: 1;\n}\ndiv.widget-survey-components .progressbar-container {\n position: absolute;\n}\ndiv.widget-survey-components .progressbar-container .progressbar {\n border-radius: 4px 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 .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 .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,N=1e4,_=({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)))),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:"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"})),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:"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(z,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(M,null))),F=({survey:t,surveyStyle:i="classic",placeholders:c,onSubmit:s,widget:l,npsValue:u,widgetStyle:d,widgetNavigatorQuerySelector:p,preview:m,mobilePreview:f})=>{const{meta:{blocks:h},question_details:{questions:v}}=t,[g,x]=o(null),[y,C]=o({}),[k,N]=o(!1),[M,z]=o([]),[F,D]=o(0),[H,O]=o(!1),[$,S]=o(null),R=n(null),B=n(null),T=n(-1),I=n(null),A=n(0),j=n(0),P=n(!1),V=n([]),U=n(null),Q=n([]);r((()=>{h&&(U.current=h.find((e=>"T_1"===e.name)),x(h.filter((e=>"T_1"!==e.name))))}),[h]),r((()=>{if(g)if(B.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===g[0].question_names[0]));R.current={...g[0],question:e},V.current=[...V.current,{...g[0],question:e}],z(V.current),C({Q_1:u})}else if(!R.current&&g.length>0)return R.current=g[0],void G(g[0])}),[g,u]),e.useEffect((()=>{l||"classic"!==i||I.current?.scrollIntoView({block:"center",behavior:"smooth"}),M.length&&(V.current=M,j.current=M.length-1),I.current&&(I.current.style.maxHeight="unset"),Q.current[A.current]=I.current?.scrollHeight||Q.current[A.current]||0,D(M.length-1),I.current&&(I.current.style.maxHeight="100%")}),[M]),r((()=>{Object.keys(y).length>0&&R.current.question&&(L.includes(R.current.question.type_info.question_type)||P.current)&&!W()&&X()}),[y]),r((()=>{if(null!=y?.[B.current?.name])if(U.current?.is_based_on_score){const e=B.current?.type_info?.choices[y?.[B.current?.name]]?.dependent_question_names,n=U.current?.question_names.find((n=>e?.includes(n))),t=v.find((e=>e.name===n));S(t)}else{const e=v.find((e=>e.name==U.current?.question_names[0]));S(e)}}),[y?.[B.current?.name]]);const W=()=>A.current===g.length-1||"end"===R.current.branchOption,Y=e=>{if(e){let t={"{{nps.score}}":T.current};c&&(t={...t,...c});var n=new RegExp(Object.keys(t).join("|"),"gi");e=e.replace(n,(function(e){return t[e.toLowerCase()]}))}return e},G=e=>{let n={};if(e.is_based_on_score){const t=B.current?.type_info?.choices[y?.[B.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]));R.current.question=n;const t=V.current.find((e=>e.question.name===n.name));z(t?[...V.current]:[...V.current,{...e,question:n}])},X=()=>{if(W())N(!0);else{if(R.current.nextBlock)A.current=g.findIndex((e=>e.name===R.current.nextBlock));else if(R.current.question.type_info?.meta?.branches){const e=R.current.question.type_info?.meta?.branches,n=y[R.current.question.name];let t;t="RANGE"===R.current.type?e.find((e=>n>=e.min&&n<=e.max)):e.find((e=>n===e.value)),t?.nextBlock?A.current=g.findIndex((e=>e.name===t.nextBlock)):A.current+=1}else A.current+=1;R.current=g[A.current],G(g[A.current])}},K=e=>{P.current=!0,delete y[e.name],C({...y})},J=(e,n,t)=>{if(t){if(P.current=!0,null!=y[e.question.name]&&e.name!==M[M.length-1].name){const[t,r]=(e=>{const n=M.findIndex((n=>n.name===e.name)),t=M.slice(0,n+1),r=t.reduce(((e,n)=>(e[n.question.name]=y[n.question.name],e)),{});return A.current=g.findIndex((n=>n.name===e.name)),[t,r]})(e);C({...r,...null!=n&&{[e.question.name]:n}}),V.current=t}else C({...y,...null!=n&&{[e.question.name]:n}});B?.current?.name==e?.question?.name&&(T.current=n)}else C({...y,...null!=n&&{[e.question.name]:n}})},ee=n=>{const t=n.blockIndex??j.current,r=n.question??M[t].question;return e.createElement("div",{className:"question-footer"},!(!l&&"classic"===i||0===t&&!y[r.name]||"compact"===d)&&e.createElement(Z,{currentBlockIndex:A,currentBlockIndexOfBlocksWithQns:j,blocksWithQns:M,setHorizontalScrollUnits:D}),e.createElement("div",{className:"action-buttons"},r.name===R.current.question.name&&!L.includes(r.type_info.question_type)&&!W()&&e.createElement(w,{onClick:()=>{P.current?(A.current=Math.min(A.current+1,M.length-1),R.current=M[t+1],D(A.current)):J(M[t],null,!0)},disabled:!y[R.current.question.name]||Array.isArray(y[R.current.question.name])&&0===y[R.current.question.name].length,className:"next-button"},"Next"),"RANGE"!==r.type_info.question_type&&!r.required&&r.name===R.current.question.name&&!W()&&e.createElement("button",{className:"skip-button",onClick:()=>K(r)},"Skip"),"DROPDOWN"===r.type_info.question_type&&r.name!==R.current.question.name&&!r.required&&null!=y[r.name]&&e.createElement("button",{className:"skip-button",onClick:()=>{R.current=M[t],A.current=g.findIndex((e=>e.name===M[t].name)),K(r)}},"Clear selection"),W()&&(l||"classic"!==i)&&r.name===R.current.question.name&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:(R.current.question.required||R.current.question.type_info.pivot_question)&&void 0===y[R.current.question.name]||H,onClick:()=>{O(!0),s(y,(()=>{$?.type_info.meta?.skipThankYouPage||N(!0)}))}},H?"Submitting":"Submit Survey"))))};return R.current&&R.current.question?k?e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style`},e.createElement(_,{thankYouQuestion:$,preview:m})):e.createElement("div",{className:`freemium-survey-components ${l?"widget-survey-components":""} ${d}-style ${f?"mobile-preview":""} ${i}-survey-style`},e.createElement(b,{totalSteps:g.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:M,setHorizontalScrollUnits:D}),document.querySelector(p))),e.createElement("div",{style:l||"card"===i?{transform:`translateX(calc(-${F} * 100%))`,height:`${Q.current[A.current]}px`,transition:M?.length>1?`all ${q}ms ease-out 0ms`:`transform ${q}ms ease-out 0ms`}:{},className:"questions"},M.map(((n,t)=>e.createElement("div",{className:"question-container",style:{height:"fit-content",transition:"opacity 50ms ease-out",opacity:(l||"card"===i)&&A.current!==t?0:1},ref:I,id:n.question.name,key:n.question.name},e.createElement("div",{className:"question-text "+(0===t?"nps":""),dangerouslySetInnerHTML:{__html:Y(n.question.text)}}),e.createElement(E,{question:n.question,formValues:y,autoFocus:R.current.name===n.name,onChangeHandler:e=>{P.current=!1,A.current=g.findIndex((e=>e.name===n.name)),R.current=n,J(n,e,L.includes(n.question.type_info.question_type)&&!W())}}),("classic"===i||l)&&e.createElement(ee,{question:n.question,blockIndex:t})))),!l&&"card"!==i&&W()&&e.createElement("div",{className:"submit"},e.createElement(w,{disabled:R.current.question.required&&void 0===y[R.current.question.name]||H,onClick:()=>{O(!0),s(y,(()=>{m||$?.type_info.meta?.skipThankYouPage&&(window.location.href=$?.type_info.meta?.redirectUrl),$?.type_info.meta?.skipThankYouPage||N(!0)}))}},H?"Submitting Survey":"Submit Survey"))),M.length&&"card"===i&&!l&&e.createElement(ee,null)):null};export{N as AUTO_REDIRECT_DELAY,C as BUTTON_SIZE_VARIANTS,w as Button,h as CheckboxGroup,p as Input,c as NPS,b as ProgressBar,x as Radio,g as RadioGroup,F as Survey,q as TRANSITION_DELAY,m as TextArea};
|
package/lib/types/mock.d.ts
CHANGED
|
@@ -1,25 +1,73 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
id: string;
|
|
3
2
|
name: string;
|
|
4
3
|
desc: string;
|
|
5
4
|
type: string;
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
header_message: string;
|
|
6
|
+
gratitude_message: string;
|
|
7
|
+
ui_branding: {
|
|
8
|
+
footer_html: string;
|
|
9
|
+
};
|
|
10
|
+
meta: {
|
|
11
|
+
blocks: ({
|
|
12
|
+
name: string;
|
|
13
|
+
title: string;
|
|
14
|
+
order: number;
|
|
15
|
+
question_names: string[];
|
|
16
|
+
type: string;
|
|
17
|
+
required: boolean;
|
|
18
|
+
is_based_on_score: boolean;
|
|
19
|
+
is_same_for_all: boolean;
|
|
20
|
+
jump_logic: null;
|
|
21
|
+
question_score_category?: undefined;
|
|
22
|
+
position?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
name: string;
|
|
25
|
+
order: number;
|
|
26
|
+
type: string;
|
|
27
|
+
title: string;
|
|
28
|
+
question_names: string[];
|
|
29
|
+
question_score_category: {
|
|
30
|
+
promoter: string;
|
|
31
|
+
passive: string;
|
|
32
|
+
detractor: string;
|
|
33
|
+
};
|
|
34
|
+
required: boolean;
|
|
35
|
+
is_based_on_score: boolean;
|
|
36
|
+
is_same_for_all: boolean;
|
|
37
|
+
jump_logic: null;
|
|
38
|
+
position?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
name: string;
|
|
41
|
+
order: number;
|
|
42
|
+
type: string;
|
|
43
|
+
title: string;
|
|
44
|
+
question_names: string[];
|
|
45
|
+
position: number;
|
|
46
|
+
required: boolean;
|
|
47
|
+
is_based_on_score: boolean;
|
|
48
|
+
is_same_for_all: boolean;
|
|
49
|
+
jump_logic: null;
|
|
50
|
+
question_score_category?: undefined;
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
8
53
|
question_details: {
|
|
9
54
|
questions: ({
|
|
10
|
-
id: string;
|
|
11
55
|
text: string;
|
|
12
56
|
name: string;
|
|
13
57
|
position: number;
|
|
14
58
|
type_info: {
|
|
59
|
+
pivot_question: boolean;
|
|
15
60
|
question_type: string;
|
|
16
61
|
validation: {
|
|
17
62
|
min: number;
|
|
18
63
|
max: number;
|
|
19
64
|
};
|
|
65
|
+
choices: {
|
|
66
|
+
value: number;
|
|
67
|
+
position: number;
|
|
68
|
+
dependent_question_names: string[];
|
|
69
|
+
}[];
|
|
20
70
|
linear_scale: {
|
|
21
|
-
point_scale: null;
|
|
22
|
-
scale_order: null;
|
|
23
71
|
button_style: string;
|
|
24
72
|
button_shape: string;
|
|
25
73
|
};
|
|
@@ -27,11 +75,6 @@ declare const _default: {
|
|
|
27
75
|
start: string;
|
|
28
76
|
end: string;
|
|
29
77
|
};
|
|
30
|
-
choices: {
|
|
31
|
-
position: string;
|
|
32
|
-
value: string;
|
|
33
|
-
dependent_question_names: string[];
|
|
34
|
-
}[];
|
|
35
78
|
footer_text: string;
|
|
36
79
|
meta: {
|
|
37
80
|
branches: {
|
|
@@ -40,261 +83,149 @@ declare const _default: {
|
|
|
40
83
|
id: string;
|
|
41
84
|
}[];
|
|
42
85
|
branchType: string;
|
|
43
|
-
othersOption?: undefined;
|
|
44
|
-
othersRequired?: undefined;
|
|
45
86
|
placeholder?: undefined;
|
|
46
87
|
readOnly?: undefined;
|
|
47
88
|
};
|
|
48
|
-
|
|
89
|
+
text?: undefined;
|
|
90
|
+
type_info?: undefined;
|
|
49
91
|
};
|
|
50
|
-
required: boolean;
|
|
51
92
|
} | {
|
|
52
|
-
id: string;
|
|
53
93
|
text: string;
|
|
54
94
|
name: string;
|
|
55
95
|
position: number;
|
|
56
96
|
type_info: {
|
|
57
|
-
question_type: string;
|
|
58
|
-
validation: null;
|
|
59
|
-
linear_scale: null;
|
|
60
|
-
score_presets: null;
|
|
61
|
-
choices: {
|
|
62
|
-
id: string;
|
|
63
|
-
position: string;
|
|
64
|
-
value: string;
|
|
65
|
-
}[];
|
|
66
|
-
footer_text: null;
|
|
67
|
-
meta: null;
|
|
68
97
|
pivot_question: boolean;
|
|
69
|
-
};
|
|
70
|
-
required: boolean;
|
|
71
|
-
} | {
|
|
72
|
-
id: string;
|
|
73
|
-
text: string;
|
|
74
|
-
name: string;
|
|
75
|
-
position: number;
|
|
76
|
-
type_info: {
|
|
77
98
|
question_type: string;
|
|
78
|
-
validation: null;
|
|
79
|
-
linear_scale: null;
|
|
80
|
-
score_presets: null;
|
|
81
99
|
choices: {
|
|
82
|
-
id: string;
|
|
83
|
-
position: string;
|
|
84
100
|
value: string;
|
|
101
|
+
position: number;
|
|
85
102
|
}[];
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
readOnly?: undefined;
|
|
94
|
-
};
|
|
95
|
-
pivot_question: boolean;
|
|
103
|
+
validation?: undefined;
|
|
104
|
+
linear_scale?: undefined;
|
|
105
|
+
score_presets?: undefined;
|
|
106
|
+
footer_text?: undefined;
|
|
107
|
+
meta?: undefined;
|
|
108
|
+
text?: undefined;
|
|
109
|
+
type_info?: undefined;
|
|
96
110
|
};
|
|
97
|
-
required: boolean;
|
|
98
111
|
} | {
|
|
99
|
-
id: string;
|
|
100
112
|
text: string;
|
|
101
113
|
name: string;
|
|
102
114
|
position: number;
|
|
103
115
|
type_info: {
|
|
116
|
+
pivot_question: boolean;
|
|
104
117
|
question_type: string;
|
|
105
|
-
validation: null;
|
|
106
|
-
linear_scale: null;
|
|
107
|
-
score_presets: null;
|
|
108
|
-
choices: {
|
|
109
|
-
id: string;
|
|
110
|
-
position: string;
|
|
111
|
-
value: string;
|
|
112
|
-
}[];
|
|
113
|
-
footer_text: null;
|
|
114
118
|
meta: {
|
|
115
119
|
placeholder: string;
|
|
116
|
-
othersOption: boolean;
|
|
117
120
|
branches?: undefined;
|
|
118
121
|
branchType?: undefined;
|
|
119
|
-
othersRequired?: undefined;
|
|
120
122
|
readOnly?: undefined;
|
|
121
123
|
};
|
|
122
|
-
|
|
124
|
+
validation?: undefined;
|
|
125
|
+
choices?: undefined;
|
|
126
|
+
linear_scale?: undefined;
|
|
127
|
+
score_presets?: undefined;
|
|
128
|
+
footer_text?: undefined;
|
|
129
|
+
text?: undefined;
|
|
130
|
+
type_info?: undefined;
|
|
123
131
|
};
|
|
124
|
-
required: boolean;
|
|
125
132
|
} | {
|
|
126
|
-
id: string;
|
|
127
133
|
text: string;
|
|
128
134
|
name: string;
|
|
129
135
|
position: number;
|
|
130
136
|
type_info: {
|
|
137
|
+
pivot_question: boolean;
|
|
131
138
|
question_type: string;
|
|
132
|
-
validation: null;
|
|
133
|
-
linear_scale: null;
|
|
134
|
-
score_presets: null;
|
|
135
|
-
choices: null;
|
|
136
|
-
footer_text: null;
|
|
137
139
|
meta: {
|
|
138
140
|
readOnly: boolean;
|
|
139
141
|
branches?: undefined;
|
|
140
142
|
branchType?: undefined;
|
|
141
|
-
othersOption?: undefined;
|
|
142
|
-
othersRequired?: undefined;
|
|
143
143
|
placeholder?: undefined;
|
|
144
144
|
};
|
|
145
|
-
|
|
145
|
+
validation?: undefined;
|
|
146
|
+
choices?: undefined;
|
|
147
|
+
linear_scale?: undefined;
|
|
148
|
+
score_presets?: undefined;
|
|
149
|
+
footer_text?: undefined;
|
|
150
|
+
text?: undefined;
|
|
151
|
+
type_info?: undefined;
|
|
146
152
|
};
|
|
147
|
-
required: boolean;
|
|
148
153
|
} | {
|
|
149
|
-
id: string;
|
|
150
|
-
text: string;
|
|
151
154
|
name: string;
|
|
152
155
|
position: number;
|
|
156
|
+
text: string;
|
|
153
157
|
type_info: {
|
|
154
|
-
question_type: string;
|
|
155
|
-
validation: null;
|
|
156
|
-
linear_scale: null;
|
|
157
|
-
score_presets: null;
|
|
158
|
-
choices: null;
|
|
159
|
-
footer_text: null;
|
|
160
|
-
meta: null;
|
|
161
|
-
pivot_question: boolean;
|
|
162
|
-
};
|
|
163
|
-
required: boolean;
|
|
164
|
-
})[];
|
|
165
|
-
};
|
|
166
|
-
created_at: string;
|
|
167
|
-
updated_at: string;
|
|
168
|
-
gratitude_message: string;
|
|
169
|
-
schedule_info: null;
|
|
170
|
-
throttle_info: null;
|
|
171
|
-
contact_info: {
|
|
172
|
-
list_id: string;
|
|
173
|
-
segment_id: null;
|
|
174
|
-
};
|
|
175
|
-
ui_branding: {
|
|
176
|
-
logo_url: string;
|
|
177
|
-
footer_html: string;
|
|
178
|
-
};
|
|
179
|
-
ui_theme: {
|
|
180
|
-
body_background_color: null;
|
|
181
|
-
primary_font: null;
|
|
182
|
-
secondary_font: null;
|
|
183
|
-
primary_background_color: null;
|
|
184
|
-
secondary_background_color: null;
|
|
185
|
-
primary_button_color: null;
|
|
186
|
-
secondary_button_color: null;
|
|
187
|
-
brand_color: string;
|
|
188
|
-
primary_button_text_color: null;
|
|
189
|
-
button_style: null;
|
|
190
|
-
secondary_button_text_color: string;
|
|
191
|
-
question_background_color: string;
|
|
192
|
-
question_text_color: string;
|
|
193
|
-
css_url: null;
|
|
194
|
-
};
|
|
195
|
-
meta: {
|
|
196
|
-
created_by: string;
|
|
197
|
-
blocks: ({
|
|
198
|
-
name: string;
|
|
199
|
-
title: string;
|
|
200
|
-
order: number;
|
|
201
|
-
question_names: string[];
|
|
202
|
-
type: string;
|
|
203
|
-
required: boolean;
|
|
204
|
-
is_based_on_score: boolean;
|
|
205
|
-
is_same_for_all: boolean;
|
|
206
|
-
question: {
|
|
207
|
-
id: string;
|
|
208
158
|
text: string;
|
|
209
|
-
name: string;
|
|
210
|
-
position: number;
|
|
211
159
|
type_info: {
|
|
212
|
-
question_type: string;
|
|
213
|
-
validation: {
|
|
214
|
-
min: number;
|
|
215
|
-
max: number;
|
|
216
|
-
};
|
|
217
|
-
linear_scale: {
|
|
218
|
-
point_scale: null;
|
|
219
|
-
scale_order: null;
|
|
220
|
-
button_style: string;
|
|
221
|
-
button_shape: string;
|
|
222
|
-
};
|
|
223
|
-
score_presets: {
|
|
224
|
-
start: string;
|
|
225
|
-
end: string;
|
|
226
|
-
};
|
|
227
|
-
choices: {
|
|
228
|
-
position: string;
|
|
229
|
-
value: string;
|
|
230
|
-
dependent_question_names: string[];
|
|
231
|
-
}[];
|
|
232
|
-
footer_text: string;
|
|
233
|
-
meta: {
|
|
234
|
-
branches: {
|
|
235
|
-
min: number;
|
|
236
|
-
max: number;
|
|
237
|
-
id: string;
|
|
238
|
-
}[];
|
|
239
|
-
branchType: string;
|
|
240
|
-
};
|
|
241
160
|
pivot_question: boolean;
|
|
161
|
+
question_type: string;
|
|
242
162
|
};
|
|
243
|
-
|
|
163
|
+
question_type: string;
|
|
164
|
+
choices: {
|
|
165
|
+
value: string;
|
|
166
|
+
position: number;
|
|
167
|
+
}[];
|
|
168
|
+
pivot_question?: undefined;
|
|
169
|
+
validation?: undefined;
|
|
170
|
+
linear_scale?: undefined;
|
|
171
|
+
score_presets?: undefined;
|
|
172
|
+
footer_text?: undefined;
|
|
173
|
+
meta?: undefined;
|
|
244
174
|
};
|
|
245
|
-
question_score_category?: undefined;
|
|
246
|
-
position?: undefined;
|
|
247
175
|
} | {
|
|
248
176
|
name: string;
|
|
249
|
-
order: number;
|
|
250
|
-
type: string;
|
|
251
|
-
title: string;
|
|
252
|
-
question_names: string[];
|
|
253
|
-
question_score_category: {
|
|
254
|
-
promoter: string;
|
|
255
|
-
passive: string;
|
|
256
|
-
detractor: string;
|
|
257
|
-
};
|
|
258
|
-
required: boolean;
|
|
259
|
-
is_based_on_score: boolean;
|
|
260
|
-
is_same_for_all: boolean;
|
|
261
|
-
question?: undefined;
|
|
262
|
-
position?: undefined;
|
|
263
|
-
} | {
|
|
264
|
-
name: string;
|
|
265
|
-
order: number;
|
|
266
|
-
type: string;
|
|
267
|
-
title: string;
|
|
268
|
-
question_names: string[];
|
|
269
177
|
position: number;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
178
|
+
text: string;
|
|
179
|
+
type_info: {
|
|
180
|
+
text: string;
|
|
181
|
+
meta: {
|
|
182
|
+
placeholder: string;
|
|
183
|
+
branches?: undefined;
|
|
184
|
+
branchType?: undefined;
|
|
185
|
+
readOnly?: undefined;
|
|
186
|
+
};
|
|
187
|
+
pivot_question: boolean;
|
|
188
|
+
question_type: string;
|
|
189
|
+
validation?: undefined;
|
|
190
|
+
choices?: undefined;
|
|
191
|
+
linear_scale?: undefined;
|
|
192
|
+
score_presets?: undefined;
|
|
193
|
+
footer_text?: undefined;
|
|
194
|
+
type_info?: undefined;
|
|
195
|
+
};
|
|
275
196
|
})[];
|
|
276
197
|
};
|
|
277
198
|
channels: string[];
|
|
199
|
+
state: string;
|
|
200
|
+
ui_theme: {
|
|
201
|
+
primary_text_color: string;
|
|
202
|
+
question_background: string;
|
|
203
|
+
question_text_color: string;
|
|
204
|
+
};
|
|
278
205
|
channel_info: {
|
|
279
206
|
email_channel_info: {
|
|
280
|
-
|
|
207
|
+
dkim_settings: null;
|
|
208
|
+
email_body: string;
|
|
209
|
+
email_body_bottom: string;
|
|
210
|
+
footer: string;
|
|
281
211
|
from_email: string;
|
|
282
|
-
|
|
212
|
+
from_name: string;
|
|
213
|
+
preheader: string;
|
|
283
214
|
reply_to: string;
|
|
284
215
|
reply_to_name: string;
|
|
285
|
-
|
|
286
|
-
email_body: string;
|
|
287
|
-
footer: string;
|
|
216
|
+
subject: string;
|
|
288
217
|
unsubscribe: string;
|
|
289
|
-
email_body_bottom: string;
|
|
290
|
-
copyright: null;
|
|
291
|
-
dkim_settings: null;
|
|
292
218
|
};
|
|
293
|
-
web_in_app_info: null;
|
|
294
219
|
link_channel_info: null;
|
|
220
|
+
web_in_app_info: null;
|
|
221
|
+
};
|
|
222
|
+
schedule_info: null;
|
|
223
|
+
contact_info: null;
|
|
224
|
+
throttle_info: null;
|
|
225
|
+
email_channel_info: {
|
|
226
|
+
email_body: string;
|
|
227
|
+
email_body_bottom: string;
|
|
228
|
+
subject: string;
|
|
295
229
|
};
|
|
296
|
-
header_message: string;
|
|
297
|
-
product_client_id: string;
|
|
298
|
-
is_recurring: boolean;
|
|
299
230
|
};
|
|
300
231
|
export default _default;
|
|
@@ -6,6 +6,7 @@ interface SurveyProps {
|
|
|
6
6
|
survey: {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
|
+
surveyStyle?: 'classic' | 'card';
|
|
9
10
|
placeholders: any;
|
|
10
11
|
npsValue?: number;
|
|
11
12
|
widget?: boolean;
|
|
@@ -13,10 +14,9 @@ interface SurveyProps {
|
|
|
13
14
|
onSubmit: (data: {
|
|
14
15
|
[key: string]: any;
|
|
15
16
|
}, callback?: Function) => void;
|
|
16
|
-
surveyContainerWidth?: string;
|
|
17
17
|
widgetStyle?: 'default' | 'cozy' | 'compact';
|
|
18
18
|
preview?: boolean;
|
|
19
19
|
mobilePreview?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const Survey: ({ survey, placeholders, onSubmit, widget,
|
|
21
|
+
declare const Survey: ({ survey, surveyStyle, placeholders, onSubmit, widget, npsValue, widgetStyle, widgetNavigatorQuerySelector, preview, mobilePreview, }: SurveyProps) => JSX.Element | null;
|
|
22
22
|
export { Survey };
|