(()=>{var e={186(e,t,r){"use strict";var n=r(985);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,s){if(s!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},489(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(!e(t[o],r[o]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],r.get(o[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(o of t.entries())if(!r.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(t[o]!==r[o])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;0!==o--;){var s=a[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},500(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=s(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=s(t,r));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},736(e,t,r){e.exports=r(186)()},985(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React;var t=r(736),n=r.n(t);const o=window.lodash;var a=r(500),s=r.n(a);window.wp.blocks;const i=window.wp.i18n,l=(Object.freeze({THANK_YOU:"thank-you",CUSTOM_TEXT:"custom-text",REDIRECT:"redirect",RESULTS:"results"}),Object.freeze({THEME_DEFAULT:"theme-default",GEORGIA:"georgia",PALATINO:"palatino",TIMES_NEW_ROMAN:"times-new-roman",ARIAL:"arial",IMPACT:"impact",LUCIDA:"lucida",TAHOMA:"tahoma",TREBUCHET:"trebuchet",VERDANA:"verdana",COURIER:"courier",CABIN:"Cabin",CHIVO:"Chivo",OPEN_SANS:"Open+Sans",FIRA_SANS:"Fira+Sans",ROBOTO:"Roboto",NUNITO:"Nunito",OVERPASS:"Overpass",LATO:"Lato",LIBRE_FRANKLIN:"Libre+Franklin",MONTSERRAT:"Montserrat",POPPINS:"Poppins",RUBIK:"Rubik",RALEWAY:"Raleway",JOSEFIN_SANS:"Josefin+Sans",ALEGREYA_SANS:"Alegreya+Sans",OSWALD:"Oswald"})),c=(Object.freeze([l.CABIN,l.CHIVO,l.OPEN_SANS,l.FIRA_SANS,l.ROBOTO,l.NUNITO,l.OVERPASS,l.LATO,l.LIBRE_FRANKLIN,l.MONTSERRAT,l.POPPINS,l.RUBIK,l.RALEWAY,l.JOSEFIN_SANS,l.ALEGREYA_SANS,l.OSWALD]),Object.freeze({[l.THEME_DEFAULT]:null,[l.GEORGIA]:"Georgia, serif",[l.PALATINO]:'"Palatino Linotype", "Book Antiqua", Palatino, serif',[l.TIMES_NEW_ROMAN]:'"Times New Roman", Times, serif',[l.ARIAL]:"Arial, Helvetica, sans-serif",[l.IMPACT]:"Impact, Charcoal, sans-serif",[l.LUCIDA]:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',[l.TAHOMA]:"Tahoma, Geneva, sans-serif",[l.TREBUCHET]:'"Trebuchet MS", Helvetica, sans-serif',[l.VERDANA]:"Verdana, Geneva, sans-serif",[l.COURIER]:'"Courier New", Courier, monospace',[l.CABIN]:'"Cabin", sans-serif',[l.CHIVO]:'"Chivo", sans-serif',[l.OPEN_SANS]:'"Open Sans", sans-serif',[l.FIRA_SANS]:'"Fira Sans", sans-serif',[l.ROBOTO]:'"Roboto", sans-serif',[l.NUNITO]:'"Nunito", sans-serif',[l.OVERPASS]:'"Overpass", sans-serif',[l.LATO]:'"Lato", sans-serif',[l.LIBRE_FRANKLIN]:'"Libre Franklin", sans-serif',[l.MONTSERRAT]:'"Montserrat", sans-serif',[l.POPPINS]:'"Poppins", sans-serif',[l.RUBIK]:'"Rubik", sans-serif',[l.RALEWAY]:'"Raleway", sans-serif',[l.JOSEFIN_SANS]:'"Josefin Sans", sans-serif',[l.ALEGREYA_SANS]:'"Alegreya Sans", sans-serif',[l.OSWALD]:'"Oswald", sans-serif'}),Object.freeze({OPEN:"open",CLOSED:"closed",CLOSED_AFTER:"closed-after"}));Object.freeze({SHOW_RESULTS:"show-results",SHOW_CLOSED_BANNER:"show-closed-banner",HIDDEN:"hidden"}),Object.freeze({RADIO:"radio",BUTTON:"button"}),Object.freeze({LIST:"list",INLINE:"inline"});var u=r(489),d=r.n(u);const f=window.wp.element,p=window.wp.compose,m=e=>{const t=e.ownerDocument.defaultView;let r=t.getComputedStyle(e).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&e.parentNode&&1===e.parentNode.nodeType;)e=e.parentNode,r=t.getComputedStyle(e).backgroundColor;return r},C=()=>(0,e.createElement)("div",{className:"crowdsignal-forms__style-probe"},(0,e.createElement)("p",null),(0,e.createElement)("h3",null,"Text"),(0,e.createElement)("div",{className:"wp-block-button"},(0,e.createElement)("div",{className:"wp-block-button__link"})),(0,e.createElement)("div",{className:"entry-content"},(0,e.createElement)("div",{className:"alignwide"}))),w=e=>{if(null===e)return{};const t=e.querySelector(".wp-block-button__link"),r=e.querySelector("p"),n=e.querySelector("h3"),o=e.querySelector(".alignwide"),a=e.ownerDocument.defaultView;let s=m(t);const i=m(r),l=a.getComputedStyle(r).color;if(s===i){const e=(e=>{const t=e.ownerDocument.defaultView;return"0px"!==t.getComputedStyle(e).borderBlockStartWidth?t.getComputedStyle(e).borderBlockStartColor:null})(t);s=e||l}return{accentColor:s,backgroundColor:i,textColor:l,textColorInverted:a.getComputedStyle(t).color,textFont:a.getComputedStyle(r).fontFamily,textSize:a.getComputedStyle(r).fontSize,headingFont:a.getComputedStyle(n).fontFamily,contentWideWidth:a.getComputedStyle(o).maxWidth}};function h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var S=function e(t,r){function n(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=h({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+a}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var a=r[o].split("="),s=a.slice(1).join("=");try{var i=decodeURIComponent(a[0]);if(n[i]=t.read(s,i),e===i)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",h({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,h({},this.attributes,t))},withConverter:function(t){return e(h({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});window.wp.apiFetch;class g extends Error{}class b extends g{constructor(){super((0,i.__)("Server error. Please try again.","crowdsignal-forms"))}}const y=(t,r=!0)=>{const{data:n,error:o,loading:a}=((n,o)=>{const[a,s]=(0,e.useState)(null),[i,l]=(0,e.useState)(null),[c,u]=(0,e.useState)(!0);return(0,e.useEffect)(()=>{u(!0),l(null),s(null),(async(e,t=!0)=>t?window.fetch(`https://api.crowdsignal.com/v3/polls/${e}/results`,{method:"GET",headers:{"content-type":"application/json"}}).then(e=>{if(e.status>=200&&e.status<300)return e.json();throw e}).then(e=>{if(404===e.status)return{};if(e.error)throw new Error(e.message);return e.results.votes_by_answer}):null)(t,r).then(s).catch(l).finally(()=>u(!1))},o),{data:a,error:i,loading:c}})(0,[t]);return{error:o,loading:a,results:n}},E=({showBranding:t,referralCode:r})=>(0,e.createElement)("div",{className:"crowdsignal-forms__branding"},t&&(0,e.createElement)("a",{className:"crowdsignal-forms__branding-link with-external-icon",href:`https://crowdsignal.com?ref=${r}`,target:"blank",rel:"noopener noreferrer"},(0,i.__)("Powered by Crowdsignal","crowdsignal-forms")),!t&&(0,e.createElement)("span",{className:"crowdsignal-forms__branding-link"}," "));E.propTypes={showBranding:n().bool,referralCode:n().string.isRequired};const O=E,v=({active:t,className:r})=>{const n=s()("crowdsignal-forms-applause__animation",r,{"is-active":t});return(0,e.createElement)("svg",{className:n,width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",{className:"crowdsignal-forms-applause__animation-right"},(0,e.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813Z"}),(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.5287 18.5813L21.719 22.432C20.771 23.7312 18.9509 24.0157 17.6517 23.0676L9.50948 17.1265C8.6982 16.5345 8.52021 15.3957 9.11218 14.5844C9.18511 14.4845 9.26979 14.3931 9.35606 14.3119L9.19145 14.1918C8.38017 13.5998 8.20218 12.461 8.79415 11.6497C8.93571 11.4557 9.10825 11.2933 9.30319 11.1743C9.10822 10.6266 9.17716 10.0013 9.54606 9.49567C10.1123 8.71967 11.1811 8.52659 11.9839 9.03133C12.0392 8.91852 12.1004 8.81 12.1733 8.71006C12.7653 7.89878 13.9042 7.72079 14.7154 8.31276L20.3297 12.4094L20.611 10.4435C20.6949 9.84704 21.1499 9.35925 21.7392 9.23069L23.703 8.79878L25.0454 16.3547C25.1822 17.1302 24.992 17.9464 24.5287 18.5813ZM23.6104 16.605L22.538 10.5434L22.0547 10.6502L21.4234 15.0093L13.8574 9.48855C13.8574 9.48855 13.4691 9.4034 13.349 9.56801C13.2288 9.73262 13.2638 9.95632 13.4284 10.0764L17.667 13.1693L16.8091 14.345L11.2301 10.2742C11.0655 10.1541 10.8418 10.189 10.7217 10.3536C10.6016 10.5182 10.6365 10.7419 10.8012 10.862L16.3802 14.9329L15.5222 16.1087L10.4782 12.4282C10.3136 12.3081 10.0899 12.343 9.96978 12.5076C9.84967 12.6722 9.88463 12.8959 10.0492 13.0161L15.0933 16.6966L14.2353 17.8723L10.7962 15.3629C10.6316 15.2428 10.4079 15.2777 10.2878 15.4423C10.1677 15.607 10.2027 15.8307 10.3673 15.9508L18.5094 21.8919C19.1561 22.3638 20.0713 22.2207 20.5431 21.5741L23.3571 17.7175C23.5888 17.4001 23.6766 16.9957 23.6104 16.605Z"})),(0,e.createElement)("g",{className:"crowdsignal-forms-applause__animation-left"},(0,e.createElement)("path",{className:"crowdsignal-forms-applause__animation-inner-fill",fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813Z"}),(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2292 18.7813L18.4195 22.632C17.4715 23.9312 15.6513 24.2157 14.3521 23.2676L6.20992 17.3265C5.39864 16.7345 5.22065 15.5957 5.81262 14.7844C5.88554 14.6845 5.97023 14.5931 6.0565 14.5119L5.89189 14.3918C5.08061 13.7998 4.90262 12.661 5.49459 11.8497C5.63615 11.6557 5.80869 11.4933 6.00363 11.3743C5.80866 10.8266 5.8776 10.2013 6.2465 9.69567C6.81274 8.91967 7.88153 8.72658 8.68439 9.23133C8.73968 9.11852 8.80084 9.01 8.87377 8.91006C9.46573 8.09878 10.6046 7.92079 11.4159 8.51276L17.0302 12.6094L17.3115 10.6435C17.3953 10.047 17.8504 9.55925 18.4397 9.43069L20.4034 8.99877L21.7458 16.5547C21.8826 17.3302 21.6925 18.1464 21.2292 18.7813ZM20.3108 16.805L19.2384 10.7434L18.7551 10.8502L18.1239 15.2093L10.5578 9.68854C10.5578 9.68854 10.1695 9.6034 10.0494 9.76801C9.92928 9.93261 9.96425 10.1563 10.1289 10.2764L14.3675 13.3692L13.5096 14.545L7.93056 10.4742C7.76595 10.354 7.54224 10.389 7.42213 10.5536C7.30202 10.7182 7.33699 10.9419 7.50159 11.062L13.0806 15.1329L12.2227 16.3087L7.17864 12.6282C7.01403 12.5081 6.79033 12.543 6.67022 12.7076C6.55011 12.8722 6.58507 13.0959 6.74968 13.216L11.7937 16.8965L10.9358 18.0723L7.49667 15.5629C7.33206 15.4428 7.10836 15.4777 6.98825 15.6423C6.86814 15.8069 6.9031 16.0307 7.06771 16.1508L15.2099 22.0919C15.8566 22.5638 16.7717 22.4207 17.2436 21.7741L20.0576 17.9175C20.2892 17.6001 20.3771 17.1957 20.3108 16.805Z"})),(0,e.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-small"},(0,e.createElement)("rect",{x:"15.4854",y:"4.42176",width:"1.5",height:"3",transform:"rotate(8 15.4854 4.42176)"}),(0,e.createElement)("rect",{x:"19.9369",y:"5.15548",width:"1.5",height:"3",transform:"rotate(43 19.9369 5.15548)"}),(0,e.createElement)("rect",{x:"11.1523",y:"4.78963",width:"1.5",height:"3",transform:"rotate(-27 11.1523 4.78963)"})),(0,e.createElement)("g",{className:"crowdsignal-forms-applause__animation-wave-large"},(0,e.createElement)("rect",{x:"23.453",y:"2.41095",width:"1.5",height:"3",transform:"rotate(38 23.453 2.41095)"}),(0,e.createElement)("rect",{x:"26.9413",y:"5.27211",width:"1.5",height:"3",transform:"rotate(73 26.9413 5.27211)"}),(0,e.createElement)("rect",{x:"19.5165",y:"0.562988",width:"1.5",height:"3",transform:"rotate(3 19.5165 0.562988)"}),(0,e.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.788011 0.615662 0.615662 0.788011 8.52597 2.41095)"}),(0,e.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.292372 0.956305 0.956305 0.292372 5.03775 5.27211)"}),(0,e.createElement)("rect",{width:"1.5",height:"3",transform:"matrix(-0.99863 0.052336 0.052336 0.99863 12.4625 0.562988)"})))},L=t=>{const{attributes:r,fallbackStyles:n,fallbackStylesRef:a,renderStyleProbe:i}=t,l=r.apiPollData?r.apiPollData.id:null,{hasVoted:u,vote:d}=((t,r=!1,n=!1)=>{const o=`cs-poll-${t}`,[a,s]=(0,e.useState)(!1),[i,l]=(0,e.useState)(!1),[c,u]=(0,e.useState)("");return(0,e.useEffect)(()=>{r&&void 0!==S.get(o)&&(l(!0),u(S.get(o)))},[]),{hasVoted:i,isVoting:a,vote:async(e,a=1)=>{try{s(!0);const i=await(async e=>{const t=(new Date).getTime(),r=await window.fetch(`https://poll.fm/n/5430eeac3911395001d731d9702fc38b/${e}?${t}&format=json`);if(!r.ok)throw new b;const n=await r.json();if(!n.nonce)throw new b;return n.nonce})(t);if(await(async(e,t,r,n)=>{const o=r.join(","),a=await window.fetch(`https://polls.polldaddy.com/vote-js.php?format=json&p=${t}&b=1&a=${o}&o=&va=16&cookie=0&n=${e}&url=${encodeURIComponent(window.location)}&vi=${n}`);if(!a.ok)throw new b;const s=await a.json();if("error"===s.status)throw new g(s.error)})(i,t,e,a),l(!0),r){const t=n?e.join(","):(new Date).getTime();S.set(o,t,{sameSite:"Strict",expires:365}),u(t)}}finally{s(!1)}},storedCookieValue:c}})(l,!0),[f,p]=(0,e.useState)(0),[m,C]=(0,e.useState)(0),[w,h]=(0,e.useState)(null),[E,L]=(0,e.useState)(!1),[R,A]=(0,e.useState)(null),{results:N}=y(l),_=((e,t,r=new Date)=>c.CLOSED===e||c.CLOSED_AFTER===e&&new Date(t)<r)(r.pollStatus,r.closedAfterDateTime),T=()=>{if(null===l||_)return;R&&clearTimeout(R),L(!0),A(setTimeout(()=>{L(!1)},200));const e=m+1;C(e),p(f+1);const t=r.apiPollData.answers[0].id;null!==w&&clearTimeout(w);const n=setTimeout(()=>{d([t],e),h(null),C(0)},1e3);h(n)},I=((e,...t)=>s()({"has-bg-color":e.backgroundColor,"has-text-color":e.textColor,"has-border-color":e.borderColor},t))(r,"crowdsignal-forms-applause",r.className,`size-${r.size}`,{"is-closed":_}),k=((e,t)=>{const r=(0,o.isEmpty)(e.textColor)?t.textColor:e.textColor,n=t.accentColor!==t.textColorInverted;return(0,o.mapKeys)({bgColor:e.backgroundColor||t.backgroundColor,textColor:r,hoverColor:n?t.accentColor:void 0,borderRadius:`${e.borderRadius||0}px`,borderWidth:`${e.borderWidth||0}px`,borderColor:e.borderColor},(e,t)=>`--crowdsignal-forms-applause-${(0,o.kebabCase)(t)}`)})(r,n),x=(null!==N?(0,o.values)(N)[0]:0)+f;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{ref:a,className:I,style:k,onClick:T,onKeyPress:T,role:"button",tabIndex:0},(0,e.createElement)(v,{active:E}),(0,e.createElement)("p",{className:"crowdsignal-forms-applause__count"},(P=x)?P>=1e7?`${(0,o.round)(P/1e6)}M`:P>=1e6?`${(P/1e6).toFixed(1)}M`:P>=1e4?`${(0,o.round)(P/1e3)}K`:P>=1e3?`${(P/1e3).toFixed(1)}K`:P.toString():"0"," Claps"),i()),(0,e.createElement)(O,{showBranding:u&&!r.hideBranding,referralCode:"cs-forms-applause"}));var P};L.propTypes={className:n().string};const R=(N=L,(A=e=>({fallbackStyles:w(e.querySelector(".crowdsignal-forms__style-probe"))}),(0,p.createHigherOrderComponent)(t=>class extends f.Component{constructor(e){super(e),this.nodeRef=this.props.node,this.state={fallbackStyles:void 0,grabStylesCompleted:!1},this.bindRef=this.bindRef.bind(this)}bindRef(e){e&&(this.nodeRef=e)}componentDidMount(){this.grabFallbackStyles()}componentDidUpdate(){this.grabFallbackStyles()}grabFallbackStyles(){const{grabStylesCompleted:e,fallbackStyles:t}=this.state;if(this.nodeRef&&!e){const e=A(this.nodeRef,this.props);d()(e,t)||this.setState({fallbackStyles:e,grabStylesCompleted:Object.values(e).every(Boolean)})}}render(){return(0,e.createElement)(t,{...this.props,...this.state.fallbackStyles,fallbackStylesRef:this.bindRef})}},"withFallbackStyles"))(({fallbackStyles:t,fallbackStylesRef:r,...n})=>(0,e.createElement)(N,{fallbackStyles:t||{},fallbackStylesRef:r,renderStyleProbe:()=>t?null:(0,e.createElement)(C,null),...n})));var A,N;const _=window.ReactDOM,T=(e,t)=>(0,o.forEach)(document.querySelectorAll(`div[${e}]`),r=>{try{const n=JSON.parse(r.dataset[(0,o.camelCase)(e.substr(5))]),a=t(n,r);r.removeAttribute(e),(0,_.render)(a,r)}catch(t){console.error("Crowdsignal Forms: Failed to parse block data for: %s",e)}}),I=(e,t)=>{((0,o.isEmpty)(window.CrowdsignalMutationObservers)||!0!==window.CrowdsignalMutationObservers[e])&&(new window.MutationObserver(()=>T(e,t)).observe(document.body,{attributes:!0,attributeFilter:[e],childList:!0,subtree:!0}),(0,o.isEmpty)(window.CrowdsignalMutationObservers)&&(window.CrowdsignalMutationObservers=[]),window.CrowdsignalMutationObservers[e]=!0,T(e,t))};((e,t)=>{if("complete"===document.readyState||"interactive"===document.readyState)return I(e,t);document.addEventListener("DOMContentLoaded",()=>I(e,t))})("data-crowdsignal-applause",t=>(0,e.createElement)(R,{attributes:t}))})()})();