@web-site-utilities/feedback 0.0.9 → 0.0.10

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.
@@ -1,5 +1,1224 @@
1
- var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co(){if(Tr)return ut;Tr=1;var e=lo;return ut.createRoot=e.createRoot,ut.hydrateRoot=e.hydrateRoot,ut}var uo=co(),W=function(){return W=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},W.apply(this,arguments)};function dt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var k="-ms-",qe="-moz-",C="-webkit-",wr="comm",mt="rule",Bt="decl",mo="@import",xr="@keyframes",fo="@layer",Cr=Math.abs,Ut=String.fromCharCode,Vt=Object.assign;function ho(e,t){return z(e,0)^45?(((t<<2^z(e,0))<<2^z(e,1))<<2^z(e,2))<<2^z(e,3):0}function Ar(e){return e.trim()}function ue(e,t){return(e=t.exec(e))?e[0]:e}function g(e,t,r){return e.replace(t,r)}function ft(e,t,r){return e.indexOf(t,r)}function z(e,t){return e.charCodeAt(t)|0}function Pe(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function _r(e){return e.length}function Ke(e,t){return t.push(e),e}function po(e,t){return e.map(t).join("")}function Ir(e,t){return e.filter(function(r){return!ue(r,t)})}var ht=1,Oe=1,kr=0,Z=0,L=0,Ne="";function pt(e,t,r,n,o,a,l,d){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:ht,column:Oe,length:l,return:"",siblings:d}}function ge(e,t){return Vt(pt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function $e(e){for(;e.root;)e=ge(e.root,{children:[e]});Ke(e,e.siblings)}function go(){return L}function bo(){return L=Z>0?z(Ne,--Z):0,Oe--,L===10&&(Oe=1,ht--),L}function J(){return L=Z<kr?z(Ne,Z++):0,Oe++,L===10&&(Oe=1,ht++),L}function Ee(){return z(Ne,Z)}function gt(){return Z}function bt(e,t){return Pe(Ne,e,t)}function Wt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yo(e){return ht=Oe=1,kr=ae(Ne=e),Z=0,[]}function vo(e){return Ne="",e}function Ht(e){return Ar(bt(Z-1,Gt(e===91?e+2:e===40?e+1:e)))}function Eo(e){for(;(L=Ee())&&L<33;)J();return Wt(e)>2||Wt(L)>3?"":" "}function So(e,t){for(;--t&&J()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return bt(e,gt()+(t<6&&Ee()==32&&J()==32))}function Gt(e){for(;J();)switch(L){case e:return Z;case 34:case 39:e!==34&&e!==39&&Gt(L);break;case 40:e===41&&Gt(e);break;case 92:J();break}return Z}function To(e,t){for(;J()&&e+L!==57;)if(e+L===84&&Ee()===47)break;return"/*"+bt(t,Z-1)+"*"+Ut(e===47?e:J())}function wo(e){for(;!Wt(Ee());)J();return bt(e,Z)}function xo(e){return vo(yt("",null,null,null,[""],e=yo(e),0,[0],e))}function yt(e,t,r,n,o,a,l,d,u){for(var f=0,p=0,T=l,w=0,S=0,A=0,D=1,q=1,M=1,O=0,_="",y=o,P=a,x=n,v=_;q;)switch(A=O,O=J()){case 40:if(A!=108&&z(v,T-1)==58){ft(v+=g(Ht(O),"&","&\f"),"&\f",Cr(f?d[f-1]:0))!=-1&&(M=-1);break}case 34:case 39:case 91:v+=Ht(O);break;case 9:case 10:case 13:case 32:v+=Eo(A);break;case 92:v+=So(gt()-1,7);continue;case 47:switch(Ee()){case 42:case 47:Ke(Co(To(J(),gt()),t,r,u),u);break;default:v+="/"}break;case 123*D:d[f++]=ae(v)*M;case 125*D:case 59:case 0:switch(O){case 0:case 125:q=0;case 59+p:M==-1&&(v=g(v,/\f/g,"")),S>0&&ae(v)-T&&Ke(S>32?Or(v+";",n,r,T-1,u):Or(g(v," ","")+";",n,r,T-2,u),u);break;case 59:v+=";";default:if(Ke(x=Pr(v,t,r,f,p,o,d,_,y=[],P=[],T,a),a),O===123)if(p===0)yt(v,t,x,x,y,a,T,d,P);else switch(w===99&&z(v,3)===110?100:w){case 100:case 108:case 109:case 115:yt(e,x,x,n&&Ke(Pr(e,x,x,0,0,o,d,_,o,y=[],T,P),P),o,P,T,d,n?y:P);break;default:yt(v,x,x,x,[""],P,0,d,P)}}f=p=S=0,D=M=1,_=v="",T=l;break;case 58:T=1+ae(v),S=A;default:if(D<1){if(O==123)--D;else if(O==125&&D++==0&&bo()==125)continue}switch(v+=Ut(O),O*D){case 38:M=p>0?1:(v+="\f",-1);break;case 44:d[f++]=(ae(v)-1)*M,M=1;break;case 64:Ee()===45&&(v+=Ht(J())),w=Ee(),p=T=ae(_=v+=wo(gt())),O++;break;case 45:A===45&&ae(v)==2&&(D=0)}}return a}function Pr(e,t,r,n,o,a,l,d,u,f,p,T){for(var w=o-1,S=o===0?a:[""],A=_r(S),D=0,q=0,M=0;D<n;++D)for(var O=0,_=Pe(e,w+1,w=Cr(q=l[D])),y=e;O<A;++O)(y=Ar(q>0?S[O]+" "+_:g(_,/&\f/g,S[O])))&&(u[M++]=y);return pt(e,t,r,o===0?mt:d,u,f,p,T)}function Co(e,t,r,n){return pt(e,t,r,wr,Ut(go()),Pe(e,2,-2),0,n)}function Or(e,t,r,n,o){return pt(e,t,r,Bt,Pe(e,0,n),Pe(e,n+1,-1),n,o)}function Nr(e,t,r){switch(ho(e,t)){case 5103:return C+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return C+e+e;case 4789:return qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return C+e+qe+e+k+e+e;case 5936:switch(z(e,t+11)){case 114:return C+e+k+g(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return C+e+k+g(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return C+e+k+g(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return C+e+k+e+e;case 6165:return C+e+k+"flex-"+e+e;case 5187:return C+e+g(e,/(\w+).+(:[^]+)/,C+"box-$1$2"+k+"flex-$1$2")+e;case 5443:return C+e+k+"flex-item-"+g(e,/flex-|-self/g,"")+(ue(e,/flex-|baseline/)?"":k+"grid-row-"+g(e,/flex-|-self/g,""))+e;case 4675:return C+e+k+"flex-line-pack"+g(e,/align-content|flex-|-self/g,"")+e;case 5548:return C+e+k+g(e,"shrink","negative")+e;case 5292:return C+e+k+g(e,"basis","preferred-size")+e;case 6060:return C+"box-"+g(e,"-grow","")+C+e+k+g(e,"grow","positive")+e;case 4554:return C+g(e,/([^-])(transform)/g,"$1"+C+"$2")+e;case 6187:return g(g(g(e,/(zoom-|grab)/,C+"$1"),/(image-set)/,C+"$1"),e,"")+e;case 5495:case 3959:return g(e,/(image-set\([^]*)/,C+"$1$`$1");case 4968:return g(g(e,/(.+:)(flex-)?(.*)/,C+"box-pack:$3"+k+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+C+e+e;case 4200:if(!ue(e,/flex-|baseline/))return k+"grid-column-align"+Pe(e,t)+e;break;case 2592:case 3360:return k+g(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,ue(n.props,/grid-\w+-end/)})?~ft(e+(r=r[t].value),"span",0)?e:k+g(e,"-start","")+e+k+"grid-row-span:"+(~ft(r,"span",0)?ue(r,/\d+/):+ue(r,/\d+/)-+ue(e,/\d+/))+";":k+g(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return ue(n.props,/grid-\w+-start/)})?e:k+g(g(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return g(e,/(.+)-inline(.+)/,C+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ae(e)-1-t>6)switch(z(e,t+1)){case 109:if(z(e,t+4)!==45)break;case 102:return g(e,/(.+:)(.+)-([^]+)/,"$1"+C+"$2-$3$1"+qe+(z(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ft(e,"stretch",0)?Nr(g(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return g(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,l,d,u,f){return k+o+":"+a+f+(l?k+o+"-span:"+(d?u:+u-+a)+f:"")+e});case 4949:if(z(e,t+6)===121)return g(e,":",":"+C)+e;break;case 6444:switch(z(e,z(e,14)===45?18:11)){case 120:return g(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+C+(z(e,14)===45?"inline-":"")+"box$3$1"+C+"$2$3$1"+k+"$2box$3")+e;case 100:return g(e,":",":"+k)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return g(e,"scroll-","scroll-snap-")+e}return e}function vt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Ao(e,t,r,n){switch(e.type){case fo:if(e.children.length)break;case mo:case Bt:return e.return=e.return||e.value;case wr:return"";case xr:return e.return=e.value+"{"+vt(e.children,n)+"}";case mt:if(!ae(e.value=e.props.join(",")))return""}return ae(r=vt(e.children,n))?e.return=e.value+"{"+r+"}":""}function _o(e){var t=_r(e);return function(r,n,o,a){for(var l="",d=0;d<t;d++)l+=e[d](r,n,o,a)||"";return l}}function Io(e){return function(t){t.root||(t=t.return)&&e(t)}}function ko(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Bt:e.return=Nr(e.value,e.length,r);return;case xr:return vt([ge(e,{value:g(e.value,"@","@"+C)})],n);case mt:if(e.length)return po(r=e.props,function(o){switch(ue(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":$e(ge(e,{props:[g(o,/:(read-\w+)/,":"+qe+"$1")]})),$e(ge(e,{props:[o]})),Vt(e,{props:Ir(r,n)});break;case"::placeholder":$e(ge(e,{props:[g(o,/:(plac\w+)/,":"+C+"input-$1")]})),$e(ge(e,{props:[g(o,/:(plac\w+)/,":"+qe+"$1")]})),$e(ge(e,{props:[g(o,/:(plac\w+)/,k+"input-$1")]})),$e(ge(e,{props:[o]})),Vt(e,{props:Ir(r,n)});break}return""})}}var Po={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},De=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",$r="active",Dr="data-styled-version",Et="6.1.19",jt=`/*!sc*/
2
- `,St=typeof window<"u"&&typeof document<"u",Oo=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""&&process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY),Tt=Object.freeze([]),Me=Object.freeze({});function No(e,t,r){return r===void 0&&(r=Me),e.theme!==r.theme&&e.theme||t||r.theme}var Mr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),$o=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Do=/(^-|-$)/g;function Lr(e){return e.replace($o,"-").replace(Do,"")}var Mo=/(a)(d)/gi,wt=52,Fr=function(e){return String.fromCharCode(e+(e>25?39:97))};function Yt(e){var t,r="";for(t=Math.abs(e);t>wt;t=t/wt|0)r=Fr(t%wt)+r;return(Fr(t%wt)+r).replace(Mo,"$1-$2")}var qt,Rr=5381,Le=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},zr=function(e){return Le(Rr,e)};function Lo(e){return Yt(zr(e)>>>0)}function Fo(e){return e.displayName||e.name||"Component"}function Kt(e){return typeof e=="string"&&!0}var Br=typeof Symbol=="function"&&Symbol.for,Ur=Br?Symbol.for("react.memo"):60115,Ro=Br?Symbol.for("react.forward_ref"):60112,zo={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Bo={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Uo=((qt={})[Ro]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qt[Ur]=Vr,qt);function Wr(e){return("type"in(t=e)&&t.type.$$typeof)===Ur?Vr:"$$typeof"in e?Uo[e.$$typeof]:zo;var t}var Vo=Object.defineProperty,Wo=Object.getOwnPropertyNames,Hr=Object.getOwnPropertySymbols,Ho=Object.getOwnPropertyDescriptor,Go=Object.getPrototypeOf,Gr=Object.prototype;function jr(e,t,r){if(typeof t!="string"){if(Gr){var n=Go(t);n&&n!==Gr&&jr(e,n,r)}var o=Wo(t);Hr&&(o=o.concat(Hr(t)));for(var a=Wr(e),l=Wr(t),d=0;d<o.length;++d){var u=o[d];if(!(u in Bo||r&&r[u]||l&&u in l||a&&u in a)){var f=Ho(t,u);try{Vo(e,u,f)}catch{}}}}return e}function Se(e){return typeof e=="function"}function Xt(e){return typeof e=="object"&&"styledComponentId"in e}function Te(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Yr(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Xe(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Zt(e,t,r){if(r===void 0&&(r=!1),!r&&!Xe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Zt(e[n],t[n]);else if(Xe(t))for(var n in t)e[n]=Zt(e[n],t[n]);return e}function Qt(e,t){Object.defineProperty(e,"toString",{value:t})}function we(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var jo=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw we(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=o;l<a;l++)this.groupSizes[l]=0}for(var d=this.indexOfGroup(t+1),u=(l=0,r.length);l<u;l++)this.tag.insertRule(d,r[l])&&(this.groupSizes[t]++,d++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,l=o;l<a;l++)r+="".concat(this.tag.getRule(l)).concat(jt);return r},e})(),xt=new Map,Ct=new Map,At=1,_t=function(e){if(xt.has(e))return xt.get(e);for(;Ct.has(At);)At++;var t=At++;return xt.set(e,t),Ct.set(t,e),t},Yo=function(e,t){At=t+1,xt.set(e,t),Ct.set(t,e)},qo="style[".concat(De,"][").concat(Dr,'="').concat(Et,'"]'),Ko=new RegExp("^".concat(De,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Xo=function(e,t,r){for(var n,o=r.split(","),a=0,l=o.length;a<l;a++)(n=o[a])&&e.registerName(t,n)},Zo=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(jt),o=[],a=0,l=n.length;a<l;a++){var d=n[a].trim();if(d){var u=d.match(Ko);if(u){var f=0|parseInt(u[1],10),p=u[2];f!==0&&(Yo(p,f),Xo(e,p,u[3]),e.getTag().insertRules(f,o)),o.length=0}else o.push(d)}}},qr=function(e){for(var t=document.querySelectorAll(qo),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(De)!==$r&&(Zo(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Qo(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Kr=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(d){var u=Array.from(d.querySelectorAll("style[".concat(De,"]")));return u[u.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(De,$r),n.setAttribute(Dr,Et);var l=Qo();return l&&n.setAttribute("nonce",l),r.insertBefore(n,a),n},Jo=(function(){function e(t){this.element=Kr(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var l=n[o];if(l.ownerNode===r)return l}throw we(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),ei=(function(){function e(t){this.element=Kr(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),ti=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Xr=St,ri={isServer:!St,useCSSOMInjection:!Oo},Zr=(function(){function e(t,r,n){t===void 0&&(t=Me),r===void 0&&(r={});var o=this;this.options=W(W({},ri),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&St&&Xr&&(Xr=!1,qr(this)),Qt(this,function(){return(function(a){for(var l=a.getTag(),d=l.length,u="",f=function(T){var w=(function(M){return Ct.get(M)})(T);if(w===void 0)return"continue";var S=a.names.get(w),A=l.getGroup(T);if(S===void 0||!S.size||A.length===0)return"continue";var D="".concat(De,".g").concat(T,'[id="').concat(w,'"]'),q="";S!==void 0&&S.forEach(function(M){M.length>0&&(q+="".concat(M,","))}),u+="".concat(A).concat(D,'{content:"').concat(q,'"}').concat(jt)},p=0;p<d;p++)f(p);return u})(o)})}return e.registerId=function(t){return _t(t)},e.prototype.rehydrate=function(){!this.server&&St&&qr(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(W(W({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new ti(o):n?new Jo(o):new ei(o)})(this.options),new jo(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(_t(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(_t(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(_t(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),ni=/&/g,oi=/^\s*\/\/.*$/gm;function Qr(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Qr(r.children,t)),r})}function ii(e){var t,r,n,o=Me,a=o.options,l=a===void 0?Me:a,d=o.plugins,u=d===void 0?Tt:d,f=function(w,S,A){return A.startsWith(r)&&A.endsWith(r)&&A.replaceAll(r,"").length>0?".".concat(t):w},p=u.slice();p.push(function(w){w.type===mt&&w.value.includes("&")&&(w.props[0]=w.props[0].replace(ni,r).replace(n,f))}),l.prefix&&p.push(ko),p.push(Ao);var T=function(w,S,A,D){S===void 0&&(S=""),A===void 0&&(A=""),D===void 0&&(D="&"),t=D,r=S,n=new RegExp("\\".concat(r,"\\b"),"g");var q=w.replace(oi,""),M=xo(A||S?"".concat(A," ").concat(S," { ").concat(q," }"):q);l.namespace&&(M=Qr(M,l.namespace));var O=[];return vt(M,_o(p.concat(Io(function(_){return O.push(_)})))),O};return T.hash=u.length?u.reduce(function(w,S){return S.name||we(15),Le(w,S.name)},Rr).toString():"",T}var ai=new Zr,Jt=ii(),Jr=s.createContext({shouldForwardProp:void 0,styleSheet:ai,stylis:Jt});Jr.Consumer,s.createContext(void 0);function en(){return s.useContext(Jr)}var si=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Jt);var l=n.name+a.hash;o.hasNameForId(n.id,l)||o.insertRules(n.id,l,a(n.rules,l,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Qt(this,function(){throw we(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Jt),this.name+t.hash},e})(),li=function(e){return e>="A"&&e<="Z"};function tn(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;li(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var rn=function(e){return e==null||e===!1||e===""},nn=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!rn(a)&&(Array.isArray(a)&&a.isCss||Se(a)?n.push("".concat(tn(o),":"),a,";"):Xe(a)?n.push.apply(n,dt(dt(["".concat(o," {")],nn(a),!1),["}"],!1)):n.push("".concat(tn(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in Po||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function xe(e,t,r,n){if(rn(e))return[];if(Xt(e))return[".".concat(e.styledComponentId)];if(Se(e)){if(!Se(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return xe(o,t,r,n)}var a;return e instanceof si?r?(e.inject(r,n),[e.getName(n)]):[e]:Xe(e)?nn(e):Array.isArray(e)?Array.prototype.concat.apply(Tt,e.map(function(l){return xe(l,t,r,n)})):[e.toString()]}function ci(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Se(r)&&!Xt(r))return!1}return!0}var ui=zr(Et),di=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&ci(t),this.componentId=r,this.baseHash=Le(ui,r),this.baseStyle=n,Zr.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=Te(o,this.staticRulesId);else{var a=Yr(xe(this.rules,t,r,n)),l=Yt(Le(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,l)){var d=n(a,".".concat(l),void 0,this.componentId);r.insertRules(this.componentId,l,d)}o=Te(o,l),this.staticRulesId=l}else{for(var u=Le(this.baseHash,n.hash),f="",p=0;p<this.rules.length;p++){var T=this.rules[p];if(typeof T=="string")f+=T;else if(T){var w=Yr(xe(T,t,r,n));u=Le(u,w+p),f+=w}}if(f){var S=Yt(u>>>0);r.hasNameForId(this.componentId,S)||r.insertRules(this.componentId,S,n(f,".".concat(S),void 0,this.componentId)),o=Te(o,S)}}return o},e})(),It=s.createContext(void 0);It.Consumer;function mi(e){var t=s.useContext(It),r=s.useMemo(function(){return(function(n,o){if(!n)throw we(14);if(Se(n)){var a=n(o);return a}if(Array.isArray(n)||typeof n!="object")throw we(8);return o?W(W({},o),n):n})(e.theme,t)},[e.theme,t]);return e.children?s.createElement(It.Provider,{value:r},e.children):null}var er={};function fi(e,t,r){var n=Xt(e),o=e,a=!Kt(e),l=t.attrs,d=l===void 0?Tt:l,u=t.componentId,f=u===void 0?(function(y,P){var x=typeof y!="string"?"sc":Lr(y);er[x]=(er[x]||0)+1;var v="".concat(x,"-").concat(Lo(Et+x+er[x]));return P?"".concat(P,"-").concat(v):v})(t.displayName,t.parentComponentId):u,p=t.displayName,T=p===void 0?(function(y){return Kt(y)?"styled.".concat(y):"Styled(".concat(Fo(y),")")})(e):p,w=t.displayName&&t.componentId?"".concat(Lr(t.displayName),"-").concat(t.componentId):t.componentId||f,S=n&&o.attrs?o.attrs.concat(d).filter(Boolean):d,A=t.shouldForwardProp;if(n&&o.shouldForwardProp){var D=o.shouldForwardProp;if(t.shouldForwardProp){var q=t.shouldForwardProp;A=function(y,P){return D(y,P)&&q(y,P)}}else A=D}var M=new di(r,w,n?o.componentStyle:void 0);function O(y,P){return(function(x,v,be){var ze=x.attrs,ur=x.componentStyle,U=x.defaultProps,nt=x.foldedComponentIds,ot=x.styledComponentId,it=x.target,dr=s.useContext(It),mr=en(),at=x.shouldForwardProp||mr.shouldForwardProp,st=No(v,dr,U)||Me,re=(function(I,oe,ye){for(var ve,ie=W(W({},oe),{className:void 0,theme:ye}),Ue=0;Ue<I.length;Ue+=1){var _e=Se(ve=I[Ue])?ve(ie):ve;for(var K in _e)ie[K]=K==="className"?Te(ie[K],_e[K]):K==="style"?W(W({},ie[K]),_e[K]):_e[K]}return oe.className&&(ie.className=Te(ie.className,oe.className)),ie})(ze,v,st),Ae=re.as||it,N={};for(var ne in re)re[ne]===void 0||ne[0]==="$"||ne==="as"||ne==="theme"&&re.theme===st||(ne==="forwardedAs"?N.as=re.forwardedAs:at&&!at(ne,Ae)||(N[ne]=re[ne]));var F=(function(I,oe){var ye=en(),ve=I.generateAndInjectStyles(oe,ye.styleSheet,ye.stylis);return ve})(ur,re),Be=Te(nt,ot);return F&&(Be+=" "+F),re.className&&(Be+=" "+re.className),N[Kt(Ae)&&!Mr.has(Ae)?"class":"className"]=Be,be&&(N.ref=be),s.createElement(Ae,N)})(_,y,P)}O.displayName=T;var _=s.forwardRef(O);return _.attrs=S,_.componentStyle=M,_.displayName=T,_.shouldForwardProp=A,_.foldedComponentIds=n?Te(o.foldedComponentIds,o.styledComponentId):"",_.styledComponentId=w,_.target=n?o.target:e,Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(y){this._foldedDefaultProps=n?(function(P){for(var x=[],v=1;v<arguments.length;v++)x[v-1]=arguments[v];for(var be=0,ze=x;be<ze.length;be++)Zt(P,ze[be],!0);return P})({},o.defaultProps,y):y}}),Qt(_,function(){return".".concat(_.styledComponentId)}),a&&jr(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),_}function on(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var an=function(e){return Object.assign(e,{isCss:!0})};function hi(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Se(e)||Xe(e))return an(xe(on(Tt,dt([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?xe(n):an(xe(on(n,t)))}function tr(e,t,r){if(r===void 0&&(r=Me),!t)throw we(1,t);var n=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];return e(t,r,hi.apply(void 0,dt([o],a,!1)))};return n.attrs=function(o){return tr(e,t,W(W({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return tr(e,t,W(W({},r),o))},n}var sn=function(e){return tr(fi,e)},b=sn;Mr.forEach(function(e){b[e]=sn(e)});const Fe={primary:"#422ad5",primaryContent:"#e0e7ff",secondary:"#f43098",secondaryContent:"#f9e4f0",accent:"#00d3bb",accentContent:"#084d49",neutral:"#09090b",neutralContent:"#e4e4e7",base100:"#ffffff",base200:"#f8f8f8",base300:"#eeeeee",baseContent:"#18181b",info:"#00bafe",infoContent:"#042e49",success:"#00d390",successContent:"#004c39",warning:"#fcb700",warningContent:"#793205",error:"#ff627d",errorContent:"#4d0218",radiusSelectors:"0.25rem",radiusField:"0.25rem",radiusBox:"0.25rem",borderWidth:"1px",fontSize:"1rem",sizeField:".3rem",sizeSelector:".3rem",allFieldsSize:"20rem",spacing:".3rem",depth:1},pi={selectedVariant:"primary",getDefaultVariantOrSelected:()=>"primary",...Fe},ln=s.createContext({...Fe,...pi}),gi=b.div`
1
+ var SiteUtilsFeedback = (function(exports, React2, require$$02) {
2
+ "use strict";
3
+ var client = {};
4
+ var hasRequiredClient;
5
+ function requireClient() {
6
+ if (hasRequiredClient) return client;
7
+ hasRequiredClient = 1;
8
+ var m2 = require$$02;
9
+ {
10
+ client.createRoot = m2.createRoot;
11
+ client.hydrateRoot = m2.hydrateRoot;
12
+ }
13
+ return client;
14
+ }
15
+ var clientExports = requireClient();
16
+ var __assign = function() {
17
+ __assign = Object.assign || function __assign2(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
26
+ function __spreadArray(to, from2, pack) {
27
+ if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
28
+ if (ar || !(i in from2)) {
29
+ if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
30
+ ar[i] = from2[i];
31
+ }
32
+ }
33
+ return to.concat(ar || Array.prototype.slice.call(from2));
34
+ }
35
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
36
+ var e = new Error(message);
37
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
38
+ };
39
+ var MS = "-ms-";
40
+ var MOZ = "-moz-";
41
+ var WEBKIT = "-webkit-";
42
+ var COMMENT = "comm";
43
+ var RULESET = "rule";
44
+ var DECLARATION = "decl";
45
+ var IMPORT = "@import";
46
+ var KEYFRAMES = "@keyframes";
47
+ var LAYER = "@layer";
48
+ var abs = Math.abs;
49
+ var from = String.fromCharCode;
50
+ var assign = Object.assign;
51
+ function hash(value, length2) {
52
+ return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
53
+ }
54
+ function trim(value) {
55
+ return value.trim();
56
+ }
57
+ function match(value, pattern) {
58
+ return (value = pattern.exec(value)) ? value[0] : value;
59
+ }
60
+ function replace(value, pattern, replacement) {
61
+ return value.replace(pattern, replacement);
62
+ }
63
+ function indexof(value, search, position2) {
64
+ return value.indexOf(search, position2);
65
+ }
66
+ function charat(value, index) {
67
+ return value.charCodeAt(index) | 0;
68
+ }
69
+ function substr(value, begin, end) {
70
+ return value.slice(begin, end);
71
+ }
72
+ function strlen(value) {
73
+ return value.length;
74
+ }
75
+ function sizeof(value) {
76
+ return value.length;
77
+ }
78
+ function append(value, array) {
79
+ return array.push(value), value;
80
+ }
81
+ function combine(array, callback) {
82
+ return array.map(callback).join("");
83
+ }
84
+ function filter(array, pattern) {
85
+ return array.filter(function(value) {
86
+ return !match(value, pattern);
87
+ });
88
+ }
89
+ var line = 1;
90
+ var column = 1;
91
+ var length = 0;
92
+ var position = 0;
93
+ var character = 0;
94
+ var characters = "";
95
+ function node(value, root, parent, type, props, children, length2, siblings) {
96
+ return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
97
+ }
98
+ function copy(root, props) {
99
+ return assign(node("", null, null, "", null, null, 0, root.siblings), root, { length: -root.length }, props);
100
+ }
101
+ function lift(root) {
102
+ while (root.root)
103
+ root = copy(root.root, { children: [root] });
104
+ append(root, root.siblings);
105
+ }
106
+ function char() {
107
+ return character;
108
+ }
109
+ function prev() {
110
+ character = position > 0 ? charat(characters, --position) : 0;
111
+ if (column--, character === 10)
112
+ column = 1, line--;
113
+ return character;
114
+ }
115
+ function next() {
116
+ character = position < length ? charat(characters, position++) : 0;
117
+ if (column++, character === 10)
118
+ column = 1, line++;
119
+ return character;
120
+ }
121
+ function peek() {
122
+ return charat(characters, position);
123
+ }
124
+ function caret() {
125
+ return position;
126
+ }
127
+ function slice(begin, end) {
128
+ return substr(characters, begin, end);
129
+ }
130
+ function token(type) {
131
+ switch (type) {
132
+ // \0 \t \n \r \s whitespace token
133
+ case 0:
134
+ case 9:
135
+ case 10:
136
+ case 13:
137
+ case 32:
138
+ return 5;
139
+ // ! + , / > @ ~ isolate token
140
+ case 33:
141
+ case 43:
142
+ case 44:
143
+ case 47:
144
+ case 62:
145
+ case 64:
146
+ case 126:
147
+ // ; { } breakpoint token
148
+ case 59:
149
+ case 123:
150
+ case 125:
151
+ return 4;
152
+ // : accompanied token
153
+ case 58:
154
+ return 3;
155
+ // " ' ( [ opening delimit token
156
+ case 34:
157
+ case 39:
158
+ case 40:
159
+ case 91:
160
+ return 2;
161
+ // ) ] closing delimit token
162
+ case 41:
163
+ case 93:
164
+ return 1;
165
+ }
166
+ return 0;
167
+ }
168
+ function alloc(value) {
169
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
170
+ }
171
+ function dealloc(value) {
172
+ return characters = "", value;
173
+ }
174
+ function delimit(type) {
175
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
176
+ }
177
+ function whitespace(type) {
178
+ while (character = peek())
179
+ if (character < 33)
180
+ next();
181
+ else
182
+ break;
183
+ return token(type) > 2 || token(character) > 3 ? "" : " ";
184
+ }
185
+ function escaping(index, count) {
186
+ while (--count && next())
187
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
188
+ break;
189
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
190
+ }
191
+ function delimiter(type) {
192
+ while (next())
193
+ switch (character) {
194
+ // ] ) " '
195
+ case type:
196
+ return position;
197
+ // " '
198
+ case 34:
199
+ case 39:
200
+ if (type !== 34 && type !== 39)
201
+ delimiter(character);
202
+ break;
203
+ // (
204
+ case 40:
205
+ if (type === 41)
206
+ delimiter(type);
207
+ break;
208
+ // \
209
+ case 92:
210
+ next();
211
+ break;
212
+ }
213
+ return position;
214
+ }
215
+ function commenter(type, index) {
216
+ while (next())
217
+ if (type + character === 47 + 10)
218
+ break;
219
+ else if (type + character === 42 + 42 && peek() === 47)
220
+ break;
221
+ return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
222
+ }
223
+ function identifier(index) {
224
+ while (!token(peek()))
225
+ next();
226
+ return slice(index, position);
227
+ }
228
+ function compile(value) {
229
+ return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
230
+ }
231
+ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
232
+ var index = 0;
233
+ var offset = 0;
234
+ var length2 = pseudo;
235
+ var atrule = 0;
236
+ var property = 0;
237
+ var previous = 0;
238
+ var variable = 1;
239
+ var scanning = 1;
240
+ var ampersand = 1;
241
+ var character2 = 0;
242
+ var type = "";
243
+ var props = rules;
244
+ var children = rulesets;
245
+ var reference = rule;
246
+ var characters2 = type;
247
+ while (scanning)
248
+ switch (previous = character2, character2 = next()) {
249
+ // (
250
+ case 40:
251
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
252
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
253
+ ampersand = -1;
254
+ break;
255
+ }
256
+ // " ' [
257
+ case 34:
258
+ case 39:
259
+ case 91:
260
+ characters2 += delimit(character2);
261
+ break;
262
+ // \t \n \r \s
263
+ case 9:
264
+ case 10:
265
+ case 13:
266
+ case 32:
267
+ characters2 += whitespace(previous);
268
+ break;
269
+ // \
270
+ case 92:
271
+ characters2 += escaping(caret() - 1, 7);
272
+ continue;
273
+ // /
274
+ case 47:
275
+ switch (peek()) {
276
+ case 42:
277
+ case 47:
278
+ append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
279
+ break;
280
+ default:
281
+ characters2 += "/";
282
+ }
283
+ break;
284
+ // {
285
+ case 123 * variable:
286
+ points[index++] = strlen(characters2) * ampersand;
287
+ // } ; \0
288
+ case 125 * variable:
289
+ case 59:
290
+ case 0:
291
+ switch (character2) {
292
+ // \0 }
293
+ case 0:
294
+ case 125:
295
+ scanning = 0;
296
+ // ;
297
+ case 59 + offset:
298
+ if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
299
+ if (property > 0 && strlen(characters2) - length2)
300
+ append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
301
+ break;
302
+ // @ ;
303
+ case 59:
304
+ characters2 += ";";
305
+ // { rule/at-rule
306
+ default:
307
+ append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
308
+ if (character2 === 123)
309
+ if (offset === 0)
310
+ parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
311
+ else
312
+ switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
313
+ // d l m s
314
+ case 100:
315
+ case 108:
316
+ case 109:
317
+ case 115:
318
+ parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
319
+ break;
320
+ default:
321
+ parse(characters2, reference, reference, reference, [""], children, 0, points, children);
322
+ }
323
+ }
324
+ index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
325
+ break;
326
+ // :
327
+ case 58:
328
+ length2 = 1 + strlen(characters2), property = previous;
329
+ default:
330
+ if (variable < 1) {
331
+ if (character2 == 123)
332
+ --variable;
333
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
334
+ continue;
335
+ }
336
+ switch (characters2 += from(character2), character2 * variable) {
337
+ // &
338
+ case 38:
339
+ ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
340
+ break;
341
+ // ,
342
+ case 44:
343
+ points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
344
+ break;
345
+ // @
346
+ case 64:
347
+ if (peek() === 45)
348
+ characters2 += delimit(next());
349
+ atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
350
+ break;
351
+ // -
352
+ case 45:
353
+ if (previous === 45 && strlen(characters2) == 2)
354
+ variable = 0;
355
+ }
356
+ }
357
+ return rulesets;
358
+ }
359
+ function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2, siblings) {
360
+ var post = offset - 1;
361
+ var rule = offset === 0 ? rules : [""];
362
+ var size = sizeof(rule);
363
+ for (var i = 0, j2 = 0, k2 = 0; i < index; ++i)
364
+ for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i])), z2 = value; x2 < size; ++x2)
365
+ if (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2])))
366
+ props[k2++] = z2;
367
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2, siblings);
368
+ }
369
+ function comment(value, root, parent, siblings) {
370
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
371
+ }
372
+ function declaration(value, root, parent, length2, siblings) {
373
+ return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
374
+ }
375
+ function prefix(value, length2, children) {
376
+ switch (hash(value, length2)) {
377
+ // color-adjust
378
+ case 5103:
379
+ return WEBKIT + "print-" + value + value;
380
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
381
+ case 5737:
382
+ case 4201:
383
+ case 3177:
384
+ case 3433:
385
+ case 1641:
386
+ case 4457:
387
+ case 2921:
388
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
389
+ case 5572:
390
+ case 6356:
391
+ case 5844:
392
+ case 3191:
393
+ case 6645:
394
+ case 3005:
395
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
396
+ case 6391:
397
+ case 5879:
398
+ case 5623:
399
+ case 6135:
400
+ case 4599:
401
+ case 4855:
402
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
403
+ case 4215:
404
+ case 6389:
405
+ case 5109:
406
+ case 5365:
407
+ case 5621:
408
+ case 3829:
409
+ return WEBKIT + value + value;
410
+ // tab-size
411
+ case 4789:
412
+ return MOZ + value + value;
413
+ // appearance, user-select, transform, hyphens, text-size-adjust
414
+ case 5349:
415
+ case 4246:
416
+ case 4810:
417
+ case 6968:
418
+ case 2756:
419
+ return WEBKIT + value + MOZ + value + MS + value + value;
420
+ // writing-mode
421
+ case 5936:
422
+ switch (charat(value, length2 + 11)) {
423
+ // vertical-l(r)
424
+ case 114:
425
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
426
+ // vertical-r(l)
427
+ case 108:
428
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
429
+ // horizontal(-)tb
430
+ case 45:
431
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
432
+ }
433
+ // flex, flex-direction, scroll-snap-type, writing-mode
434
+ case 6828:
435
+ case 4268:
436
+ case 2903:
437
+ return WEBKIT + value + MS + value + value;
438
+ // order
439
+ case 6165:
440
+ return WEBKIT + value + MS + "flex-" + value + value;
441
+ // align-items
442
+ case 5187:
443
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
444
+ // align-self
445
+ case 5443:
446
+ return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (!match(value, /flex-|baseline/) ? MS + "grid-row-" + replace(value, /flex-|-self/g, "") : "") + value;
447
+ // align-content
448
+ case 4675:
449
+ return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value;
450
+ // flex-shrink
451
+ case 5548:
452
+ return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
453
+ // flex-basis
454
+ case 5292:
455
+ return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
456
+ // flex-grow
457
+ case 6060:
458
+ return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
459
+ // transition
460
+ case 4554:
461
+ return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
462
+ // cursor
463
+ case 6187:
464
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
465
+ // background, background-image
466
+ case 5495:
467
+ case 3959:
468
+ return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
469
+ // justify-content
470
+ case 4968:
471
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
472
+ // justify-self
473
+ case 4200:
474
+ if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length2) + value;
475
+ break;
476
+ // grid-template-(columns|rows)
477
+ case 2592:
478
+ case 3360:
479
+ return MS + replace(value, "template-", "") + value;
480
+ // grid-(row|column)-start
481
+ case 4384:
482
+ case 3616:
483
+ if (children && children.some(function(element, index) {
484
+ return length2 = index, match(element.props, /grid-\w+-end/);
485
+ })) {
486
+ return ~indexof(value + (children = children[length2].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";";
487
+ }
488
+ return MS + replace(value, "-start", "") + value;
489
+ // grid-(row|column)-end
490
+ case 4896:
491
+ case 4128:
492
+ return children && children.some(function(element) {
493
+ return match(element.props, /grid-\w+-start/);
494
+ }) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value;
495
+ // (margin|padding)-inline-(start|end)
496
+ case 4095:
497
+ case 3583:
498
+ case 4068:
499
+ case 2532:
500
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
501
+ // (min|max)?(width|height|inline-size|block-size)
502
+ case 8116:
503
+ case 7059:
504
+ case 5753:
505
+ case 5535:
506
+ case 5445:
507
+ case 5701:
508
+ case 4933:
509
+ case 4677:
510
+ case 5533:
511
+ case 5789:
512
+ case 5021:
513
+ case 4765:
514
+ if (strlen(value) - 1 - length2 > 6)
515
+ switch (charat(value, length2 + 1)) {
516
+ // (m)ax-content, (m)in-content
517
+ case 109:
518
+ if (charat(value, length2 + 4) !== 45)
519
+ break;
520
+ // (f)ill-available, (f)it-content
521
+ case 102:
522
+ return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
523
+ // (s)tretch
524
+ case 115:
525
+ return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length2, children) + value : value;
526
+ }
527
+ break;
528
+ // grid-(column|row)
529
+ case 5152:
530
+ case 5920:
531
+ return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_2, a, b, c, d, e, f2) {
532
+ return MS + a + ":" + b + f2 + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f2 : "") + value;
533
+ });
534
+ // position: sticky
535
+ case 4949:
536
+ if (charat(value, length2 + 6) === 121)
537
+ return replace(value, ":", ":" + WEBKIT) + value;
538
+ break;
539
+ // display: (flex|inline-flex|grid|inline-grid)
540
+ case 6444:
541
+ switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
542
+ // (inline-)?fle(x)
543
+ case 120:
544
+ return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
545
+ // (inline-)?gri(d)
546
+ case 100:
547
+ return replace(value, ":", ":" + MS) + value;
548
+ }
549
+ break;
550
+ // scroll-margin, scroll-margin-(top|right|bottom|left)
551
+ case 5719:
552
+ case 2647:
553
+ case 2135:
554
+ case 3927:
555
+ case 2391:
556
+ return replace(value, "scroll-", "scroll-snap-") + value;
557
+ }
558
+ return value;
559
+ }
560
+ function serialize(children, callback) {
561
+ var output = "";
562
+ for (var i = 0; i < children.length; i++)
563
+ output += callback(children[i], i, children, callback) || "";
564
+ return output;
565
+ }
566
+ function stringify(element, index, children, callback) {
567
+ switch (element.type) {
568
+ case LAYER:
569
+ if (element.children.length) break;
570
+ case IMPORT:
571
+ case DECLARATION:
572
+ return element.return = element.return || element.value;
573
+ case COMMENT:
574
+ return "";
575
+ case KEYFRAMES:
576
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
577
+ case RULESET:
578
+ if (!strlen(element.value = element.props.join(","))) return "";
579
+ }
580
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
581
+ }
582
+ function middleware(collection) {
583
+ var length2 = sizeof(collection);
584
+ return function(element, index, children, callback) {
585
+ var output = "";
586
+ for (var i = 0; i < length2; i++)
587
+ output += collection[i](element, index, children, callback) || "";
588
+ return output;
589
+ };
590
+ }
591
+ function rulesheet(callback) {
592
+ return function(element) {
593
+ if (!element.root) {
594
+ if (element = element.return)
595
+ callback(element);
596
+ }
597
+ };
598
+ }
599
+ function prefixer(element, index, children, callback) {
600
+ if (element.length > -1) {
601
+ if (!element.return)
602
+ switch (element.type) {
603
+ case DECLARATION:
604
+ element.return = prefix(element.value, element.length, children);
605
+ return;
606
+ case KEYFRAMES:
607
+ return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback);
608
+ case RULESET:
609
+ if (element.length)
610
+ return combine(children = element.props, function(value) {
611
+ switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
612
+ // :read-(only|write)
613
+ case ":read-only":
614
+ case ":read-write":
615
+ lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] }));
616
+ lift(copy(element, { props: [value] }));
617
+ assign(element, { props: filter(children, callback) });
618
+ break;
619
+ // :placeholder
620
+ case "::placeholder":
621
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] }));
622
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] }));
623
+ lift(copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] }));
624
+ lift(copy(element, { props: [value] }));
625
+ assign(element, { props: filter(children, callback) });
626
+ break;
627
+ }
628
+ return "";
629
+ });
630
+ }
631
+ }
632
+ }
633
+ var unitlessKeys = {
634
+ animationIterationCount: 1,
635
+ aspectRatio: 1,
636
+ borderImageOutset: 1,
637
+ borderImageSlice: 1,
638
+ borderImageWidth: 1,
639
+ boxFlex: 1,
640
+ boxFlexGroup: 1,
641
+ boxOrdinalGroup: 1,
642
+ columnCount: 1,
643
+ columns: 1,
644
+ flex: 1,
645
+ flexGrow: 1,
646
+ flexPositive: 1,
647
+ flexShrink: 1,
648
+ flexNegative: 1,
649
+ flexOrder: 1,
650
+ gridRow: 1,
651
+ gridRowEnd: 1,
652
+ gridRowSpan: 1,
653
+ gridRowStart: 1,
654
+ gridColumn: 1,
655
+ gridColumnEnd: 1,
656
+ gridColumnSpan: 1,
657
+ gridColumnStart: 1,
658
+ msGridRow: 1,
659
+ msGridRowSpan: 1,
660
+ msGridColumn: 1,
661
+ msGridColumnSpan: 1,
662
+ fontWeight: 1,
663
+ lineHeight: 1,
664
+ opacity: 1,
665
+ order: 1,
666
+ orphans: 1,
667
+ tabSize: 1,
668
+ widows: 1,
669
+ zIndex: 1,
670
+ zoom: 1,
671
+ WebkitLineClamp: 1,
672
+ // SVG-related properties
673
+ fillOpacity: 1,
674
+ floodOpacity: 1,
675
+ stopOpacity: 1,
676
+ strokeDasharray: 1,
677
+ strokeDashoffset: 1,
678
+ strokeMiterlimit: 1,
679
+ strokeOpacity: 1,
680
+ strokeWidth: 1
681
+ };
682
+ var f = "undefined" != typeof process && void 0 !== process.env && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.19", g = "/*!sc*/\n", S = "undefined" != typeof window && "undefined" != typeof document, w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.REACT_APP_SC_DISABLE_SPEEDY && "" !== process.env.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== process.env.REACT_APP_SC_DISABLE_SPEEDY && process.env.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== process.env && void 0 !== process.env.SC_DISABLE_SPEEDY && "" !== process.env.SC_DISABLE_SPEEDY ? "false" !== process.env.SC_DISABLE_SPEEDY && process.env.SC_DISABLE_SPEEDY : false), _ = Object.freeze([]), C = Object.freeze({});
683
+ function I(e2, t2, n2) {
684
+ return void 0 === n2 && (n2 = C), e2.theme !== n2.theme && e2.theme || t2 || n2.theme;
685
+ }
686
+ var A = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, D = /(^-|-$)/g;
687
+ function R(e2) {
688
+ return e2.replace(O, "-").replace(D, "");
689
+ }
690
+ var T = /(a)(d)/gi, k = 52, j = function(e2) {
691
+ return String.fromCharCode(e2 + (e2 > 25 ? 39 : 97));
692
+ };
693
+ function x(e2) {
694
+ var t2, n2 = "";
695
+ for (t2 = Math.abs(e2); t2 > k; t2 = t2 / k | 0) n2 = j(t2 % k) + n2;
696
+ return (j(t2 % k) + n2).replace(T, "$1-$2");
697
+ }
698
+ var V, F = 5381, M = function(e2, t2) {
699
+ for (var n2 = t2.length; n2; ) e2 = 33 * e2 ^ t2.charCodeAt(--n2);
700
+ return e2;
701
+ }, z = function(e2) {
702
+ return M(F, e2);
703
+ };
704
+ function $(e2) {
705
+ return x(z(e2) >>> 0);
706
+ }
707
+ function B(e2) {
708
+ return e2.displayName || e2.name || "Component";
709
+ }
710
+ function L(e2) {
711
+ return "string" == typeof e2 && true;
712
+ }
713
+ var G = "function" == typeof Symbol && Symbol.for, Y = G ? Symbol.for("react.memo") : 60115, W = G ? Symbol.for("react.forward_ref") : 60112, q = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }, H = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }, U = { $$typeof: true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }, J = ((V = {})[W] = { $$typeof: true, render: true, defaultProps: true, displayName: true, propTypes: true }, V[Y] = U, V);
714
+ function X(e2) {
715
+ return ("type" in (t2 = e2) && t2.type.$$typeof) === Y ? U : "$$typeof" in e2 ? J[e2.$$typeof] : q;
716
+ var t2;
717
+ }
718
+ var Z = Object.defineProperty, K = Object.getOwnPropertyNames, Q = Object.getOwnPropertySymbols, ee = Object.getOwnPropertyDescriptor, te = Object.getPrototypeOf, ne = Object.prototype;
719
+ function oe(e2, t2, n2) {
720
+ if ("string" != typeof t2) {
721
+ if (ne) {
722
+ var o2 = te(t2);
723
+ o2 && o2 !== ne && oe(e2, o2, n2);
724
+ }
725
+ var r2 = K(t2);
726
+ Q && (r2 = r2.concat(Q(t2)));
727
+ for (var s2 = X(e2), i2 = X(t2), a2 = 0; a2 < r2.length; ++a2) {
728
+ var c2 = r2[a2];
729
+ if (!(c2 in H || n2 && n2[c2] || i2 && c2 in i2 || s2 && c2 in s2)) {
730
+ var l2 = ee(t2, c2);
731
+ try {
732
+ Z(e2, c2, l2);
733
+ } catch (e3) {
734
+ }
735
+ }
736
+ }
737
+ }
738
+ return e2;
739
+ }
740
+ function re(e2) {
741
+ return "function" == typeof e2;
742
+ }
743
+ function se(e2) {
744
+ return "object" == typeof e2 && "styledComponentId" in e2;
745
+ }
746
+ function ie(e2, t2) {
747
+ return e2 && t2 ? "".concat(e2, " ").concat(t2) : e2 || t2 || "";
748
+ }
749
+ function ae(e2, t2) {
750
+ if (0 === e2.length) return "";
751
+ for (var n2 = e2[0], o2 = 1; o2 < e2.length; o2++) n2 += e2[o2];
752
+ return n2;
753
+ }
754
+ function ce(e2) {
755
+ return null !== e2 && "object" == typeof e2 && e2.constructor.name === Object.name && !("props" in e2 && e2.$$typeof);
756
+ }
757
+ function le(e2, t2, n2) {
758
+ if (void 0 === n2 && (n2 = false), !n2 && !ce(e2) && !Array.isArray(e2)) return t2;
759
+ if (Array.isArray(t2)) for (var o2 = 0; o2 < t2.length; o2++) e2[o2] = le(e2[o2], t2[o2]);
760
+ else if (ce(t2)) for (var o2 in t2) e2[o2] = le(e2[o2], t2[o2]);
761
+ return e2;
762
+ }
763
+ function ue(e2, t2) {
764
+ Object.defineProperty(e2, "toString", { value: t2 });
765
+ }
766
+ function he(t2) {
767
+ for (var n2 = [], o2 = 1; o2 < arguments.length; o2++) n2[o2 - 1] = arguments[o2];
768
+ return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t2, " for more information.").concat(n2.length > 0 ? " Args: ".concat(n2.join(", ")) : ""));
769
+ }
770
+ var fe = (function() {
771
+ function e2(e3) {
772
+ this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = e3;
773
+ }
774
+ return e2.prototype.indexOfGroup = function(e3) {
775
+ for (var t2 = 0, n2 = 0; n2 < e3; n2++) t2 += this.groupSizes[n2];
776
+ return t2;
777
+ }, e2.prototype.insertRules = function(e3, t2) {
778
+ if (e3 >= this.groupSizes.length) {
779
+ for (var n2 = this.groupSizes, o2 = n2.length, r2 = o2; e3 >= r2; ) if ((r2 <<= 1) < 0) throw he(16, "".concat(e3));
780
+ this.groupSizes = new Uint32Array(r2), this.groupSizes.set(n2), this.length = r2;
781
+ for (var s2 = o2; s2 < r2; s2++) this.groupSizes[s2] = 0;
782
+ }
783
+ for (var i2 = this.indexOfGroup(e3 + 1), a2 = (s2 = 0, t2.length); s2 < a2; s2++) this.tag.insertRule(i2, t2[s2]) && (this.groupSizes[e3]++, i2++);
784
+ }, e2.prototype.clearGroup = function(e3) {
785
+ if (e3 < this.length) {
786
+ var t2 = this.groupSizes[e3], n2 = this.indexOfGroup(e3), o2 = n2 + t2;
787
+ this.groupSizes[e3] = 0;
788
+ for (var r2 = n2; r2 < o2; r2++) this.tag.deleteRule(n2);
789
+ }
790
+ }, e2.prototype.getGroup = function(e3) {
791
+ var t2 = "";
792
+ if (e3 >= this.length || 0 === this.groupSizes[e3]) return t2;
793
+ for (var n2 = this.groupSizes[e3], o2 = this.indexOfGroup(e3), r2 = o2 + n2, s2 = o2; s2 < r2; s2++) t2 += "".concat(this.tag.getRule(s2)).concat(g);
794
+ return t2;
795
+ }, e2;
796
+ })(), ye = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ge = 1, Se = function(e2) {
797
+ if (ye.has(e2)) return ye.get(e2);
798
+ for (; ve.has(ge); ) ge++;
799
+ var t2 = ge++;
800
+ return ye.set(e2, t2), ve.set(t2, e2), t2;
801
+ }, we = function(e2, t2) {
802
+ ge = t2 + 1, ye.set(e2, t2), ve.set(t2, e2);
803
+ }, be = "style[".concat(f, "][").concat(y, '="').concat(v, '"]'), Ee = new RegExp("^".concat(f, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Ne = function(e2, t2, n2) {
804
+ for (var o2, r2 = n2.split(","), s2 = 0, i2 = r2.length; s2 < i2; s2++) (o2 = r2[s2]) && e2.registerName(t2, o2);
805
+ }, Pe = function(e2, t2) {
806
+ for (var n2, o2 = (null !== (n2 = t2.textContent) && void 0 !== n2 ? n2 : "").split(g), r2 = [], s2 = 0, i2 = o2.length; s2 < i2; s2++) {
807
+ var a2 = o2[s2].trim();
808
+ if (a2) {
809
+ var c2 = a2.match(Ee);
810
+ if (c2) {
811
+ var l2 = 0 | parseInt(c2[1], 10), u2 = c2[2];
812
+ 0 !== l2 && (we(u2, l2), Ne(e2, u2, c2[3]), e2.getTag().insertRules(l2, r2)), r2.length = 0;
813
+ } else r2.push(a2);
814
+ }
815
+ }
816
+ }, _e = function(e2) {
817
+ for (var t2 = document.querySelectorAll(be), n2 = 0, o2 = t2.length; n2 < o2; n2++) {
818
+ var r2 = t2[n2];
819
+ r2 && r2.getAttribute(f) !== m && (Pe(e2, r2), r2.parentNode && r2.parentNode.removeChild(r2));
820
+ }
821
+ };
822
+ function Ce() {
823
+ return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null;
824
+ }
825
+ var Ie = function(e2) {
826
+ var t2 = document.head, n2 = e2 || t2, o2 = document.createElement("style"), r2 = (function(e3) {
827
+ var t3 = Array.from(e3.querySelectorAll("style[".concat(f, "]")));
828
+ return t3[t3.length - 1];
829
+ })(n2), s2 = void 0 !== r2 ? r2.nextSibling : null;
830
+ o2.setAttribute(f, m), o2.setAttribute(y, v);
831
+ var i2 = Ce();
832
+ return i2 && o2.setAttribute("nonce", i2), n2.insertBefore(o2, s2), o2;
833
+ }, Ae = (function() {
834
+ function e2(e3) {
835
+ this.element = Ie(e3), this.element.appendChild(document.createTextNode("")), this.sheet = (function(e4) {
836
+ if (e4.sheet) return e4.sheet;
837
+ for (var t2 = document.styleSheets, n2 = 0, o2 = t2.length; n2 < o2; n2++) {
838
+ var r2 = t2[n2];
839
+ if (r2.ownerNode === e4) return r2;
840
+ }
841
+ throw he(17);
842
+ })(this.element), this.length = 0;
843
+ }
844
+ return e2.prototype.insertRule = function(e3, t2) {
845
+ try {
846
+ return this.sheet.insertRule(t2, e3), this.length++, true;
847
+ } catch (e4) {
848
+ return false;
849
+ }
850
+ }, e2.prototype.deleteRule = function(e3) {
851
+ this.sheet.deleteRule(e3), this.length--;
852
+ }, e2.prototype.getRule = function(e3) {
853
+ var t2 = this.sheet.cssRules[e3];
854
+ return t2 && t2.cssText ? t2.cssText : "";
855
+ }, e2;
856
+ })(), Oe = (function() {
857
+ function e2(e3) {
858
+ this.element = Ie(e3), this.nodes = this.element.childNodes, this.length = 0;
859
+ }
860
+ return e2.prototype.insertRule = function(e3, t2) {
861
+ if (e3 <= this.length && e3 >= 0) {
862
+ var n2 = document.createTextNode(t2);
863
+ return this.element.insertBefore(n2, this.nodes[e3] || null), this.length++, true;
864
+ }
865
+ return false;
866
+ }, e2.prototype.deleteRule = function(e3) {
867
+ this.element.removeChild(this.nodes[e3]), this.length--;
868
+ }, e2.prototype.getRule = function(e3) {
869
+ return e3 < this.length ? this.nodes[e3].textContent : "";
870
+ }, e2;
871
+ })(), De = (function() {
872
+ function e2(e3) {
873
+ this.rules = [], this.length = 0;
874
+ }
875
+ return e2.prototype.insertRule = function(e3, t2) {
876
+ return e3 <= this.length && (this.rules.splice(e3, 0, t2), this.length++, true);
877
+ }, e2.prototype.deleteRule = function(e3) {
878
+ this.rules.splice(e3, 1), this.length--;
879
+ }, e2.prototype.getRule = function(e3) {
880
+ return e3 < this.length ? this.rules[e3] : "";
881
+ }, e2;
882
+ })(), Re = S, Te = { isServer: !S, useCSSOMInjection: !w }, ke = (function() {
883
+ function e2(e3, n2, o2) {
884
+ void 0 === e3 && (e3 = C), void 0 === n2 && (n2 = {});
885
+ var r2 = this;
886
+ this.options = __assign(__assign({}, Te), e3), this.gs = n2, this.names = new Map(o2), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
887
+ return (function(e4) {
888
+ for (var t2 = e4.getTag(), n3 = t2.length, o3 = "", r3 = function(n4) {
889
+ var r4 = (function(e5) {
890
+ return ve.get(e5);
891
+ })(n4);
892
+ if (void 0 === r4) return "continue";
893
+ var s3 = e4.names.get(r4), i2 = t2.getGroup(n4);
894
+ if (void 0 === s3 || !s3.size || 0 === i2.length) return "continue";
895
+ var a2 = "".concat(f, ".g").concat(n4, '[id="').concat(r4, '"]'), c2 = "";
896
+ void 0 !== s3 && s3.forEach(function(e5) {
897
+ e5.length > 0 && (c2 += "".concat(e5, ","));
898
+ }), o3 += "".concat(i2).concat(a2, '{content:"').concat(c2, '"}').concat(g);
899
+ }, s2 = 0; s2 < n3; s2++) r3(s2);
900
+ return o3;
901
+ })(r2);
902
+ });
903
+ }
904
+ return e2.registerId = function(e3) {
905
+ return Se(e3);
906
+ }, e2.prototype.rehydrate = function() {
907
+ !this.server && S && _e(this);
908
+ }, e2.prototype.reconstructWithOptions = function(n2, o2) {
909
+ return void 0 === o2 && (o2 = true), new e2(__assign(__assign({}, this.options), n2), this.gs, o2 && this.names || void 0);
910
+ }, e2.prototype.allocateGSInstance = function(e3) {
911
+ return this.gs[e3] = (this.gs[e3] || 0) + 1;
912
+ }, e2.prototype.getTag = function() {
913
+ return this.tag || (this.tag = (e3 = (function(e4) {
914
+ var t2 = e4.useCSSOMInjection, n2 = e4.target;
915
+ return e4.isServer ? new De(n2) : t2 ? new Ae(n2) : new Oe(n2);
916
+ })(this.options), new fe(e3)));
917
+ var e3;
918
+ }, e2.prototype.hasNameForId = function(e3, t2) {
919
+ return this.names.has(e3) && this.names.get(e3).has(t2);
920
+ }, e2.prototype.registerName = function(e3, t2) {
921
+ if (Se(e3), this.names.has(e3)) this.names.get(e3).add(t2);
922
+ else {
923
+ var n2 = /* @__PURE__ */ new Set();
924
+ n2.add(t2), this.names.set(e3, n2);
925
+ }
926
+ }, e2.prototype.insertRules = function(e3, t2, n2) {
927
+ this.registerName(e3, t2), this.getTag().insertRules(Se(e3), n2);
928
+ }, e2.prototype.clearNames = function(e3) {
929
+ this.names.has(e3) && this.names.get(e3).clear();
930
+ }, e2.prototype.clearRules = function(e3) {
931
+ this.getTag().clearGroup(Se(e3)), this.clearNames(e3);
932
+ }, e2.prototype.clearTag = function() {
933
+ this.tag = void 0;
934
+ }, e2;
935
+ })(), je = /&/g, xe = /^\s*\/\/.*$/gm;
936
+ function Ve(e2, t2) {
937
+ return e2.map(function(e3) {
938
+ return "rule" === e3.type && (e3.value = "".concat(t2, " ").concat(e3.value), e3.value = e3.value.replaceAll(",", ",".concat(t2, " ")), e3.props = e3.props.map(function(e4) {
939
+ return "".concat(t2, " ").concat(e4);
940
+ })), Array.isArray(e3.children) && "@keyframes" !== e3.type && (e3.children = Ve(e3.children, t2)), e3;
941
+ });
942
+ }
943
+ function Fe(e2) {
944
+ var t2, n2, o2, r2 = C, s2 = r2.options, i2 = void 0 === s2 ? C : s2, a2 = r2.plugins, c2 = void 0 === a2 ? _ : a2, l2 = function(e3, o3, r3) {
945
+ return r3.startsWith(n2) && r3.endsWith(n2) && r3.replaceAll(n2, "").length > 0 ? ".".concat(t2) : e3;
946
+ }, u2 = c2.slice();
947
+ u2.push(function(e3) {
948
+ e3.type === RULESET && e3.value.includes("&") && (e3.props[0] = e3.props[0].replace(je, n2).replace(o2, l2));
949
+ }), i2.prefix && u2.push(prefixer), u2.push(stringify);
950
+ var p2 = function(e3, r3, s3, a3) {
951
+ void 0 === r3 && (r3 = ""), void 0 === s3 && (s3 = ""), void 0 === a3 && (a3 = "&"), t2 = a3, n2 = r3, o2 = new RegExp("\\".concat(n2, "\\b"), "g");
952
+ var c3 = e3.replace(xe, ""), l3 = compile(s3 || r3 ? "".concat(s3, " ").concat(r3, " { ").concat(c3, " }") : c3);
953
+ i2.namespace && (l3 = Ve(l3, i2.namespace));
954
+ var p3 = [];
955
+ return serialize(l3, middleware(u2.concat(rulesheet(function(e4) {
956
+ return p3.push(e4);
957
+ })))), p3;
958
+ };
959
+ return p2.hash = c2.length ? c2.reduce(function(e3, t3) {
960
+ return t3.name || he(15), M(e3, t3.name);
961
+ }, F).toString() : "", p2;
962
+ }
963
+ var Me = new ke(), ze = Fe(), $e = React2.createContext({ shouldForwardProp: void 0, styleSheet: Me, stylis: ze });
964
+ $e.Consumer;
965
+ React2.createContext(void 0);
966
+ function Ge() {
967
+ return React2.useContext($e);
968
+ }
969
+ var We = (function() {
970
+ function e2(e3, t2) {
971
+ var n2 = this;
972
+ this.inject = function(e4, t3) {
973
+ void 0 === t3 && (t3 = ze);
974
+ var o2 = n2.name + t3.hash;
975
+ e4.hasNameForId(n2.id, o2) || e4.insertRules(n2.id, o2, t3(n2.rules, o2, "@keyframes"));
976
+ }, this.name = e3, this.id = "sc-keyframes-".concat(e3), this.rules = t2, ue(this, function() {
977
+ throw he(12, String(n2.name));
978
+ });
979
+ }
980
+ return e2.prototype.getName = function(e3) {
981
+ return void 0 === e3 && (e3 = ze), this.name + e3.hash;
982
+ }, e2;
983
+ })(), qe = function(e2) {
984
+ return e2 >= "A" && e2 <= "Z";
985
+ };
986
+ function He(e2) {
987
+ for (var t2 = "", n2 = 0; n2 < e2.length; n2++) {
988
+ var o2 = e2[n2];
989
+ if (1 === n2 && "-" === o2 && "-" === e2[0]) return e2;
990
+ qe(o2) ? t2 += "-" + o2.toLowerCase() : t2 += o2;
991
+ }
992
+ return t2.startsWith("ms-") ? "-" + t2 : t2;
993
+ }
994
+ var Ue = function(e2) {
995
+ return null == e2 || false === e2 || "" === e2;
996
+ }, Je = function(t2) {
997
+ var n2, o2, r2 = [];
998
+ for (var s2 in t2) {
999
+ var i2 = t2[s2];
1000
+ t2.hasOwnProperty(s2) && !Ue(i2) && (Array.isArray(i2) && i2.isCss || re(i2) ? r2.push("".concat(He(s2), ":"), i2, ";") : ce(i2) ? r2.push.apply(r2, __spreadArray(__spreadArray(["".concat(s2, " {")], Je(i2), false), ["}"], false)) : r2.push("".concat(He(s2), ": ").concat((n2 = s2, null == (o2 = i2) || "boolean" == typeof o2 || "" === o2 ? "" : "number" != typeof o2 || 0 === o2 || n2 in unitlessKeys || n2.startsWith("--") ? String(o2).trim() : "".concat(o2, "px")), ";")));
1001
+ }
1002
+ return r2;
1003
+ };
1004
+ function Xe(e2, t2, n2, o2) {
1005
+ if (Ue(e2)) return [];
1006
+ if (se(e2)) return [".".concat(e2.styledComponentId)];
1007
+ if (re(e2)) {
1008
+ if (!re(s2 = e2) || s2.prototype && s2.prototype.isReactComponent || !t2) return [e2];
1009
+ var r2 = e2(t2);
1010
+ return Xe(r2, t2, n2, o2);
1011
+ }
1012
+ var s2;
1013
+ return e2 instanceof We ? n2 ? (e2.inject(n2, o2), [e2.getName(o2)]) : [e2] : ce(e2) ? Je(e2) : Array.isArray(e2) ? Array.prototype.concat.apply(_, e2.map(function(e3) {
1014
+ return Xe(e3, t2, n2, o2);
1015
+ })) : [e2.toString()];
1016
+ }
1017
+ function Ze(e2) {
1018
+ for (var t2 = 0; t2 < e2.length; t2 += 1) {
1019
+ var n2 = e2[t2];
1020
+ if (re(n2) && !se(n2)) return false;
1021
+ }
1022
+ return true;
1023
+ }
1024
+ var Ke = z(v), Qe = (function() {
1025
+ function e2(e3, t2, n2) {
1026
+ this.rules = e3, this.staticRulesId = "", this.isStatic = (void 0 === n2 || n2.isStatic) && Ze(e3), this.componentId = t2, this.baseHash = M(Ke, t2), this.baseStyle = n2, ke.registerId(t2);
1027
+ }
1028
+ return e2.prototype.generateAndInjectStyles = function(e3, t2, n2) {
1029
+ var o2 = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e3, t2, n2) : "";
1030
+ if (this.isStatic && !n2.hash) if (this.staticRulesId && t2.hasNameForId(this.componentId, this.staticRulesId)) o2 = ie(o2, this.staticRulesId);
1031
+ else {
1032
+ var r2 = ae(Xe(this.rules, e3, t2, n2)), s2 = x(M(this.baseHash, r2) >>> 0);
1033
+ if (!t2.hasNameForId(this.componentId, s2)) {
1034
+ var i2 = n2(r2, ".".concat(s2), void 0, this.componentId);
1035
+ t2.insertRules(this.componentId, s2, i2);
1036
+ }
1037
+ o2 = ie(o2, s2), this.staticRulesId = s2;
1038
+ }
1039
+ else {
1040
+ for (var a2 = M(this.baseHash, n2.hash), c2 = "", l2 = 0; l2 < this.rules.length; l2++) {
1041
+ var u2 = this.rules[l2];
1042
+ if ("string" == typeof u2) c2 += u2;
1043
+ else if (u2) {
1044
+ var p2 = ae(Xe(u2, e3, t2, n2));
1045
+ a2 = M(a2, p2 + l2), c2 += p2;
1046
+ }
1047
+ }
1048
+ if (c2) {
1049
+ var d2 = x(a2 >>> 0);
1050
+ t2.hasNameForId(this.componentId, d2) || t2.insertRules(this.componentId, d2, n2(c2, ".".concat(d2), void 0, this.componentId)), o2 = ie(o2, d2);
1051
+ }
1052
+ }
1053
+ return o2;
1054
+ }, e2;
1055
+ })(), et = React2.createContext(void 0);
1056
+ et.Consumer;
1057
+ function ot(e2) {
1058
+ var n2 = React2.useContext(et), r2 = React2.useMemo(function() {
1059
+ return (function(e3, n3) {
1060
+ if (!e3) throw he(14);
1061
+ if (re(e3)) {
1062
+ var o2 = e3(n3);
1063
+ return o2;
1064
+ }
1065
+ if (Array.isArray(e3) || "object" != typeof e3) throw he(8);
1066
+ return n3 ? __assign(__assign({}, n3), e3) : e3;
1067
+ })(e2.theme, n2);
1068
+ }, [e2.theme, n2]);
1069
+ return e2.children ? React2.createElement(et.Provider, { value: r2 }, e2.children) : null;
1070
+ }
1071
+ var rt = {};
1072
+ function it(e2, r2, s2) {
1073
+ var i2 = se(e2), a2 = e2, c2 = !L(e2), p2 = r2.attrs, d2 = void 0 === p2 ? _ : p2, h2 = r2.componentId, f2 = void 0 === h2 ? (function(e3, t2) {
1074
+ var n2 = "string" != typeof e3 ? "sc" : R(e3);
1075
+ rt[n2] = (rt[n2] || 0) + 1;
1076
+ var o2 = "".concat(n2, "-").concat($(v + n2 + rt[n2]));
1077
+ return t2 ? "".concat(t2, "-").concat(o2) : o2;
1078
+ })(r2.displayName, r2.parentComponentId) : h2, m2 = r2.displayName, y2 = void 0 === m2 ? (function(e3) {
1079
+ return L(e3) ? "styled.".concat(e3) : "Styled(".concat(B(e3), ")");
1080
+ })(e2) : m2, g2 = r2.displayName && r2.componentId ? "".concat(R(r2.displayName), "-").concat(r2.componentId) : r2.componentId || f2, S2 = i2 && a2.attrs ? a2.attrs.concat(d2).filter(Boolean) : d2, w2 = r2.shouldForwardProp;
1081
+ if (i2 && a2.shouldForwardProp) {
1082
+ var b2 = a2.shouldForwardProp;
1083
+ if (r2.shouldForwardProp) {
1084
+ var E2 = r2.shouldForwardProp;
1085
+ w2 = function(e3, t2) {
1086
+ return b2(e3, t2) && E2(e3, t2);
1087
+ };
1088
+ } else w2 = b2;
1089
+ }
1090
+ var N2 = new Qe(s2, g2, i2 ? a2.componentStyle : void 0);
1091
+ function O2(e3, r3) {
1092
+ return (function(e4, r4, s3) {
1093
+ var i3 = e4.attrs, a3 = e4.componentStyle, c3 = e4.defaultProps, p3 = e4.foldedComponentIds, d3 = e4.styledComponentId, h3 = e4.target, f3 = React2.useContext(et), m3 = Ge(), y3 = e4.shouldForwardProp || m3.shouldForwardProp;
1094
+ var v2 = I(r4, f3, c3) || C, g3 = (function(e5, n2, o2) {
1095
+ for (var r5, s4 = __assign(__assign({}, n2), { className: void 0, theme: o2 }), i4 = 0; i4 < e5.length; i4 += 1) {
1096
+ var a4 = re(r5 = e5[i4]) ? r5(s4) : r5;
1097
+ for (var c4 in a4) s4[c4] = "className" === c4 ? ie(s4[c4], a4[c4]) : "style" === c4 ? __assign(__assign({}, s4[c4]), a4[c4]) : a4[c4];
1098
+ }
1099
+ return n2.className && (s4.className = ie(s4.className, n2.className)), s4;
1100
+ })(i3, r4, v2), S3 = g3.as || h3, w3 = {};
1101
+ for (var b3 in g3) void 0 === g3[b3] || "$" === b3[0] || "as" === b3 || "theme" === b3 && g3.theme === v2 || ("forwardedAs" === b3 ? w3.as = g3.forwardedAs : y3 && !y3(b3, S3) || (w3[b3] = g3[b3], y3 || true));
1102
+ var E3 = (function(e5, t2) {
1103
+ var n2 = Ge(), o2 = e5.generateAndInjectStyles(t2, n2.styleSheet, n2.stylis);
1104
+ return o2;
1105
+ })(a3, g3);
1106
+ var N3 = ie(p3, d3);
1107
+ return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[L(S3) && !A.has(S3) ? "class" : "className"] = N3, s3 && (w3.ref = s3), React2.createElement(S3, w3);
1108
+ })(D2, e3, r3);
1109
+ }
1110
+ O2.displayName = y2;
1111
+ var D2 = React2.forwardRef(O2);
1112
+ return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i2 ? ie(a2.foldedComponentIds, a2.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i2 ? a2.target : e2, Object.defineProperty(D2, "defaultProps", { get: function() {
1113
+ return this._foldedDefaultProps;
1114
+ }, set: function(e3) {
1115
+ this._foldedDefaultProps = i2 ? (function(e4) {
1116
+ for (var t2 = [], n2 = 1; n2 < arguments.length; n2++) t2[n2 - 1] = arguments[n2];
1117
+ for (var o2 = 0, r3 = t2; o2 < r3.length; o2++) le(e4, r3[o2], true);
1118
+ return e4;
1119
+ })({}, a2.defaultProps, e3) : e3;
1120
+ } }), ue(D2, function() {
1121
+ return ".".concat(D2.styledComponentId);
1122
+ }), c2 && oe(D2, e2, { attrs: true, componentStyle: true, displayName: true, foldedComponentIds: true, shouldForwardProp: true, styledComponentId: true, target: true }), D2;
1123
+ }
1124
+ function at(e2, t2) {
1125
+ for (var n2 = [e2[0]], o2 = 0, r2 = t2.length; o2 < r2; o2 += 1) n2.push(t2[o2], e2[o2 + 1]);
1126
+ return n2;
1127
+ }
1128
+ var ct = function(e2) {
1129
+ return Object.assign(e2, { isCss: true });
1130
+ };
1131
+ function lt(t2) {
1132
+ for (var n2 = [], o2 = 1; o2 < arguments.length; o2++) n2[o2 - 1] = arguments[o2];
1133
+ if (re(t2) || ce(t2)) return ct(Xe(at(_, __spreadArray([t2], n2, true))));
1134
+ var r2 = t2;
1135
+ return 0 === n2.length && 1 === r2.length && "string" == typeof r2[0] ? Xe(r2) : ct(Xe(at(r2, n2)));
1136
+ }
1137
+ function ut(n2, o2, r2) {
1138
+ if (void 0 === r2 && (r2 = C), !o2) throw he(1, o2);
1139
+ var s2 = function(t2) {
1140
+ for (var s3 = [], i2 = 1; i2 < arguments.length; i2++) s3[i2 - 1] = arguments[i2];
1141
+ return n2(o2, r2, lt.apply(void 0, __spreadArray([t2], s3, false)));
1142
+ };
1143
+ return s2.attrs = function(e2) {
1144
+ return ut(n2, o2, __assign(__assign({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
1145
+ }, s2.withConfig = function(e2) {
1146
+ return ut(n2, o2, __assign(__assign({}, r2), e2));
1147
+ }, s2;
1148
+ }
1149
+ var pt = function(e2) {
1150
+ return ut(it, e2);
1151
+ }, dt = pt;
1152
+ A.forEach(function(e2) {
1153
+ dt[e2] = pt(e2);
1154
+ });
1155
+ const theme = {
1156
+ // Main colors usually to be modified by the user
1157
+ primary: "#422ad5",
1158
+ // Primary brand color, The main color of your brand
1159
+ primaryContent: "#e0e7ff",
1160
+ // --color-primary-content Foreground content color to use on primary color
1161
+ secondary: "#f43098",
1162
+ // --color-secondary Secondary brand color, The optional, secondary color of your brand
1163
+ secondaryContent: "#f9e4f0",
1164
+ // --color-secondary-content Foreground content color to use on secondary color
1165
+ accent: "#00d3bb",
1166
+ // --color-accent Accent brand color, The optional, accent color of your brand
1167
+ accentContent: "#084d49",
1168
+ // --color-accent-content Foreground content color to use on accent color
1169
+ neutral: "#09090b",
1170
+ // --color-neutral Neutral dark color, For not-saturated parts of UI
1171
+ neutralContent: "#e4e4e7",
1172
+ // --color-neutral-content Foreground content color to use on neutral color
1173
+ base100: "#ffffff",
1174
+ // --color-base-100 Base surface color of page, used for blank backgrounds
1175
+ base200: "#f8f8f8",
1176
+ // --color-base-200 Base color, darker shade, to create elevations
1177
+ base300: "#eeeeee",
1178
+ // --color-base-300 Base color, even more darker shade, to create elevations
1179
+ baseContent: "#18181b",
1180
+ // --color-base-content Foreground content color to use on base color
1181
+ info: "#00bafe",
1182
+ // --color-info Info color, For informative/helpful messages
1183
+ infoContent: "#042e49",
1184
+ // --color-info-content Foreground content color to use on info color
1185
+ success: "#00d390",
1186
+ // --color-success Success color, For success/safe messages
1187
+ successContent: "#004c39",
1188
+ // --color-success-content Foreground content color to use on success color
1189
+ warning: "#fcb700",
1190
+ // --color-warning Warning color, For warning/caution messages
1191
+ warningContent: "#793205",
1192
+ // --color-warning-content Foreground content color to use on warning color
1193
+ error: "#ff627d",
1194
+ // --color-error Error color, For error/danger/destructive messages
1195
+ errorContent: "#4d0218",
1196
+ // --color-error-content Foreground content color to use on error color
1197
+ radiusSelectors: "0.25rem",
1198
+ // checkbox, toggle, badge
1199
+ radiusField: "0.25rem",
1200
+ // button, input, select, tab
1201
+ radiusBox: "0.25rem",
1202
+ // card, modal, alert
1203
+ borderWidth: "1px",
1204
+ fontSize: "1rem",
1205
+ sizeField: `.3rem`,
1206
+ sizeSelector: `.3rem`,
1207
+ allFieldsSize: `20rem`,
1208
+ // radio/checkbox item element width
1209
+ spacing: ".3rem",
1210
+ depth: 1
1211
+ };
1212
+ const themeContextInitialValues = {
1213
+ selectedVariant: "primary",
1214
+ getDefaultVariantOrSelected: () => "primary",
1215
+ ...theme
1216
+ };
1217
+ const ThemeContext = React2.createContext({
1218
+ ...theme,
1219
+ ...themeContextInitialValues
1220
+ });
1221
+ const CssVariables = dt.div`
3
1222
  font-family:
4
1223
  ui-sans-serif,
5
1224
  system-ui,
@@ -17,48 +1236,393 @@ var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co()
17
1236
  Segoe UI Symbol,
18
1237
  Noto Color Emoji;
19
1238
  color-scheme: light;
20
- --color-base-100: ${e=>e.$theme.base100};
21
- --color-base-200: ${e=>e.$theme.base200};
22
- --color-base-300: ${e=>e.$theme.base300};
23
- --color-base-content: ${e=>e.$theme.baseContent};
24
- --color-primary: ${e=>e.$theme.primary};
25
- --color-primary-content: ${e=>e.$theme.primaryContent};
26
- --color-secondary: ${e=>e.$theme.secondary};
27
- --color-secondary-content: ${e=>e.$theme.secondaryContent};
28
- --color-accent: ${e=>e.$theme.accent};
29
- --color-accent-content: ${e=>e.$theme.accentContent};
30
- --color-neutral: ${e=>e.$theme.neutral};
31
- --color-neutral-content: ${e=>e.$theme.neutralContent};
32
- --color-info: ${e=>e.$theme.info};
33
- --color-info-content: ${e=>e.$theme.infoContent};
34
- --color-success: ${e=>e.$theme.success};
35
- --color-success-content: ${e=>e.$theme.successContent};
36
- --color-warning: ${e=>e.$theme.warning};
37
- --color-warning-content: ${e=>e.$theme.warningContent};
38
- --color-error: ${e=>e.$theme.error};
39
- --color-error-content: ${e=>e.$theme.errorContent};
1239
+ --color-base-100: ${(props) => props.$theme["base100"]};
1240
+ --color-base-200: ${(props) => props.$theme["base200"]};
1241
+ --color-base-300: ${(props) => props.$theme["base300"]};
1242
+ --color-base-content: ${(props) => props.$theme["baseContent"]};
1243
+ --color-primary: ${(props) => props.$theme["primary"]};
1244
+ --color-primary-content: ${(props) => props.$theme["primaryContent"]};
1245
+ --color-secondary: ${(props) => props.$theme["secondary"]};
1246
+ --color-secondary-content: ${(props) => props.$theme["secondaryContent"]};
1247
+ --color-accent: ${(props) => props.$theme["accent"]};
1248
+ --color-accent-content: ${(props) => props.$theme["accentContent"]};
1249
+ --color-neutral: ${(props) => props.$theme["neutral"]};
1250
+ --color-neutral-content: ${(props) => props.$theme["neutralContent"]};
1251
+ --color-info: ${(props) => props.$theme["info"]};
1252
+ --color-info-content: ${(props) => props.$theme["infoContent"]};
1253
+ --color-success: ${(props) => props.$theme["success"]};
1254
+ --color-success-content: ${(props) => props.$theme["successContent"]};
1255
+ --color-warning: ${(props) => props.$theme["warning"]};
1256
+ --color-warning-content: ${(props) => props.$theme["warningContent"]};
1257
+ --color-error: ${(props) => props.$theme["error"]};
1258
+ --color-error-content: ${(props) => props.$theme["errorContent"]};
40
1259
 
41
- --radius-selector: ${e=>e.$theme.radiusSelectors};
42
- --radius-field: ${e=>e.$theme.radiusField};
43
- --radius-box: ${e=>e.$theme.radiusBox};
1260
+ --radius-selector: ${(props) => props.$theme["radiusSelectors"]};
1261
+ --radius-field: ${(props) => props.$theme["radiusField"]};
1262
+ --radius-box: ${(props) => props.$theme["radiusBox"]};
44
1263
 
45
- --border-width: ${e=>e.$theme.borderWidth};
1264
+ --border-width: ${(props) => props.$theme["borderWidth"]};
46
1265
 
47
- --font-size: ${e=>e.$theme.fontSize};
48
- --size-field: ${e=>e.$theme.sizeField};
49
- --size-selector: ${e=>e.$theme.sizeSelector};
50
- --depth: ${e=>e.$theme.depth};
51
- --spacing: ${e=>e.$theme.spacing};
52
- --all-fields-size: ${e=>e.$theme.allFieldsSize};
53
- `,se=e=>{const t=e.selectedVariant??"primary";return console.log("ThemeProvider_theme",e.theme??Fe),s.createElement(mi,{theme:e.theme??Fe,children:s.createElement(gi,{$theme:e.theme??Fe,children:s.createElement(ln.Provider,{value:{selectedVariant:t,getDefaultVariantOrSelected:()=>t,...e.theme??Fe},children:e.children})})})},cn=()=>s.useContext(ln),le=e=>{const{getDefaultVariantOrSelected:t,...r}=cn(),n=t();return r[e??n]},un=e=>{const{getDefaultVariantOrSelected:t,...r}=cn(),n=t(),o=e?`${e}Content`:`${n}Content`;return r[o]},bi=()=>{const e="http://localhost:4000/external",t=async r=>{const n=await r;if(!n.ok)switch(n.status){case 404:throw new Error("Not found");case 400:throw new Error("Bad request");default:throw new Error("Unknown error")}return(await r).json()};return{post:async(r,n,o)=>{var a;try{return t(fetch(`${e}${r}`,{method:"POST",body:JSON.stringify(n),signal:((a=o==null?void 0:o.abortController)==null?void 0:a.signal)??null,headers:{"Content-Type":"application/json",...(o==null?void 0:o.headers)??{}}}))}catch(l){throw console.log(l),l}},get:async(r,n)=>{var o;try{return t(fetch(`${e}${r}`,{method:"GET",signal:((o=n==null?void 0:n.abortController)==null?void 0:o.signal)??null,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}}))}catch(a){throw console.log(a),a}}}},dn={meta:{name:"asd"},steps:[{title:"Overall altitude",meta:{name:"overall"},fields:[{type:"matrix",meta:{name:"asd",fieldKey:"recommendationChance"},validations:{required:!0},label:{default:"How likely are you to recommend this company to a friend or colleague?"},max:10},{type:"radio-group",meta:{name:"asd",fieldKey:"satisfactionLevel"},label:{default:"Overall, how satisfied or dissatisfied are you with our company?"},validations:{required:!0},options:[{label:"Very satisfied",id:"1"},{label:"Somewhat satisfied",id:"2"},{label:"Neither satisfied nor dissatisfied",id:"3"},{label:"Somewhat dissatisfied",id:"4"},{label:"Very dissatisfied",id:"5"}]},{type:"rating",icon:"star2",max:5,meta:{name:"asd",fieldKey:"satisfactionRating"},label:{default:"What is your general satisfaction?"},validations:{required:!0}}]},{meta:{name:"products"},title:"Product questions",fields:[{type:"checkbox-group",meta:{name:"asd",fieldKey:"productDescribeWords"},label:{default:"Which of the following words best describes your experience with our products?"},validations:{required:!0},options:[{label:"Reliable",id:"1"},{label:"High quality",id:"2"},{label:"Useful",id:"3"},{label:"Unique",id:"4"},{label:"Value for money",id:"5"},{label:"Overpriced",id:"6"},{label:"Ineffective",id:"7"},{label:"Poor quality",id:"8"},{label:"Unreliable",id:"9"}]},{type:"radio-group",meta:{name:"asd",fieldKey:"productExpectations"},label:{default:"How well products meet your expectations?"},validations:{required:!0},options:[{label:"Extremely well",id:"1"},{label:"Well",id:"2"},{label:"Somewhat well",id:"3"},{label:"Not well",id:"4"},{label:"Not at all well",id:"5"}]},{type:"matrix",meta:{name:"asd",fieldKey:"productQuality"},label:{default:"How would you rate the quality of our products?"},validations:{required:!0},max:10,minText:"Poor quality",maxText:"Good quality"}]},{meta:{name:"final-questions"},title:"Final questions",fields:[{type:"range-slide",defaultValue:77,meta:{name:"asd",fieldKey:"productsImpressionLevel"},label:{default:"What is your overall impression level of our products?"}},{type:"rating",icon:"heart",max:5,meta:{name:"asd",fieldKey:"productExpectations"},label:{default:"Do you like our service and products?"},validations:{required:!0}},{type:"select",meta:{name:"asd",fieldKey:"fromWhereDidYouHearAboutUs"},label:{default:"From where did you hear about us?"},validations:{required:!0},options:[{label:"Facebook",id:"1"},{label:"Instagram",id:"2"},{label:"Google search",id:"3"},{label:"AD",id:"4"},{label:"Other",id:"5"}]},{type:"textarea",meta:{name:"asd",fieldKey:"lastComments"},validations:{required:!1},label:{values:[{conditions:[{fieldName:"satisfactionRating",lessThan:4}],value:"How can we improve our service? (optional)"}],default:"What you would like to tell us about your experience with this company? (optional)?"}}]}]},yi=(e,t)=>new Promise(r=>{r({id:"",domainId:"",attributes:{theme:{},useSystemTheme:!0,variant:"primary"},popupForm:{meta:{name:"popupForm"},config:{canReturnToPreviousStep:!0,nextButtonText:"Next",previousButtonText:"Previous",submitButtonText:"Submit",formTitle:"We are looking forward to hear from you!",buttonText:"Feedback"},styles:{left:null,top:0,bottom:-20,right:0},form:dn},inlineForm:{meta:{name:"asd"},config:{canReturnToPreviousStep:!0,nextButtonText:"Next",previousButtonText:"Previous",submitButtonText:"Submit",formTitle:"We are looking forward to hear from you!"},form:dn}})}),vi=e=>{const[t,r]=s.useState(),[n,o]=s.useState(!0),[a,l]=s.useState(null);return s.useEffect(()=>{const d=new AbortController;return o(!0),e(d).then(r).catch(l).finally(()=>o(!1)),()=>{d.abort()}},[]),{data:t,loading:n,error:a}},Re=b.button(e=>{const t=le(),r=un(),o=!e.$outlined?t:"#fff",a=e.$outlined?t:r,l=e.$outlined?a:o,d=`calc(${e.theme.sizeField} * 10)`;return{borderRadius:e.theme.radiusField,borderColor:e.disabled?"#cfcfcf":l,borderStyle:e.$dashed?"dashed":"solid",cursor:"pointer",boxShadow:"inset 0 0 20px 20px transparent",height:d,fontWeight:"600",opacity:e.disabled?.5:1,paddingInline:"1.2rem",transition:"all 0.2s ease-in-out",background:e.disabled?"#cfcfcf":o,borderWidth:e.theme.borderWidth,userSelect:e.disabled?"none":void 0,color:e.disabled?"#888888":a,"&:active":{transform:e.disabled?void 0:"scale(0.97)"},"&:hover":{opacity:e.disabled?void 0:.8,cursor:e.disabled?"auto":"pointer",boxShadow:e.disabled?void 0:"inset 0 0 20px 20px #00000017"},"@media (max-width: 900px)":{paddingInline:"0.5rem"},"@media (max-width: 700px)":{paddingInline:"0.7rem"},"@media (max-width: 400px)":{paddingInline:"0.7rem"}}}),Ei=b.div`
54
- visibility: ${e=>e.$isVisible&&e.$height?"visible":"hidden"};
55
- opacity: ${e=>e.$isVisible?1:0};
1266
+ --font-size: ${(props) => props.$theme["fontSize"]};
1267
+ --size-field: ${(props) => props.$theme["sizeField"]};
1268
+ --size-selector: ${(props) => props.$theme["sizeSelector"]};
1269
+ --depth: ${(props) => props.$theme["depth"]};
1270
+ --spacing: ${(props) => props.$theme["spacing"]};
1271
+ --all-fields-size: ${(props) => props.$theme["allFieldsSize"]};
1272
+ `;
1273
+ const ThemeProvider = (props) => {
1274
+ const selectedVariant = props.selectedVariant ?? "primary";
1275
+ console.log("ThemeProvider_theme", props.theme ?? theme);
1276
+ return React2.createElement(ot, {
1277
+ theme: props.theme ?? theme,
1278
+ children: React2.createElement(CssVariables, {
1279
+ $theme: props.theme ?? theme,
1280
+ children: React2.createElement(ThemeContext.Provider, {
1281
+ value: {
1282
+ selectedVariant,
1283
+ getDefaultVariantOrSelected: () => {
1284
+ return selectedVariant;
1285
+ },
1286
+ ...props.theme ?? theme
1287
+ },
1288
+ children: props.children
1289
+ })
1290
+ })
1291
+ });
1292
+ };
1293
+ const useThemeContext = () => React2.useContext(ThemeContext);
1294
+ const useDefaultVariantColor = (override) => {
1295
+ const { getDefaultVariantOrSelected, ...theme2 } = useThemeContext();
1296
+ const defaultVariant = getDefaultVariantOrSelected();
1297
+ return theme2[override ?? defaultVariant];
1298
+ };
1299
+ const useDefaultVariantContentColor = (override) => {
1300
+ const { getDefaultVariantOrSelected, ...theme2 } = useThemeContext();
1301
+ const defaultVariant = getDefaultVariantOrSelected();
1302
+ const colorVariantKey = override ? `${override}Content` : `${defaultVariant}Content`;
1303
+ return theme2[colorVariantKey];
1304
+ };
1305
+ const createBaseApi = () => {
1306
+ const apiUrl = "http://localhost:4000/external";
1307
+ const unwrap = async (req) => {
1308
+ const unwrapped = await req;
1309
+ if (!unwrapped.ok) {
1310
+ switch (unwrapped.status) {
1311
+ case 404:
1312
+ throw new Error("Not found");
1313
+ case 400:
1314
+ throw new Error("Bad request");
1315
+ default:
1316
+ throw new Error("Unknown error");
1317
+ }
1318
+ }
1319
+ return (await req).json();
1320
+ };
1321
+ return {
1322
+ post: async (path, body, options) => {
1323
+ var _a;
1324
+ try {
1325
+ return unwrap(
1326
+ fetch(`${apiUrl}${path}`, {
1327
+ method: "POST",
1328
+ body: JSON.stringify(body),
1329
+ signal: ((_a = options == null ? void 0 : options.abortController) == null ? void 0 : _a.signal) ?? null,
1330
+ headers: {
1331
+ "Content-Type": "application/json",
1332
+ ...(options == null ? void 0 : options.headers) ?? {}
1333
+ }
1334
+ })
1335
+ );
1336
+ } catch (e) {
1337
+ console.log(e);
1338
+ throw e;
1339
+ }
1340
+ },
1341
+ get: async (path, options) => {
1342
+ var _a;
1343
+ try {
1344
+ return unwrap(
1345
+ fetch(`${apiUrl}${path}`, {
1346
+ method: "GET",
1347
+ signal: ((_a = options == null ? void 0 : options.abortController) == null ? void 0 : _a.signal) ?? null,
1348
+ headers: {
1349
+ "Content-Type": "application/json",
1350
+ ...(options == null ? void 0 : options.headers) ?? {}
1351
+ }
1352
+ })
1353
+ );
1354
+ } catch (e) {
1355
+ console.log(e);
1356
+ throw e;
1357
+ }
1358
+ }
1359
+ };
1360
+ };
1361
+ const formMock = {
1362
+ meta: { name: "asd" },
1363
+ steps: [
1364
+ {
1365
+ title: "Overall altitude",
1366
+ meta: { name: "overall" },
1367
+ fields: [
1368
+ {
1369
+ type: "matrix",
1370
+ meta: { name: "asd", fieldKey: "recommendationChance" },
1371
+ validations: {
1372
+ required: true
1373
+ },
1374
+ label: {
1375
+ default: "How likely are you to recommend this company to a friend or colleague?"
1376
+ },
1377
+ max: 10
1378
+ },
1379
+ {
1380
+ type: "radio-group",
1381
+ meta: { name: "asd", fieldKey: "satisfactionLevel" },
1382
+ label: {
1383
+ default: "Overall, how satisfied or dissatisfied are you with our company?"
1384
+ },
1385
+ validations: { required: true },
1386
+ options: [
1387
+ { label: "Very satisfied", id: "1" },
1388
+ { label: "Somewhat satisfied", id: "2" },
1389
+ { label: "Neither satisfied nor dissatisfied", id: "3" },
1390
+ { label: "Somewhat dissatisfied", id: "4" },
1391
+ { label: "Very dissatisfied", id: "5" }
1392
+ ]
1393
+ },
1394
+ {
1395
+ type: "rating",
1396
+ icon: "star2",
1397
+ max: 5,
1398
+ meta: { name: "asd", fieldKey: "satisfactionRating" },
1399
+ label: { default: "What is your general satisfaction?" },
1400
+ validations: { required: true }
1401
+ }
1402
+ ]
1403
+ },
1404
+ {
1405
+ meta: { name: "products" },
1406
+ title: "Product questions",
1407
+ fields: [
1408
+ {
1409
+ type: "checkbox-group",
1410
+ meta: { name: "asd", fieldKey: "productDescribeWords" },
1411
+ label: {
1412
+ default: "Which of the following words best describes your experience with our products?"
1413
+ },
1414
+ validations: { required: true },
1415
+ options: [
1416
+ { label: "Reliable", id: "1" },
1417
+ { label: "High quality", id: "2" },
1418
+ { label: "Useful", id: "3" },
1419
+ { label: "Unique", id: "4" },
1420
+ { label: "Value for money", id: "5" },
1421
+ { label: "Overpriced", id: "6" },
1422
+ { label: "Ineffective", id: "7" },
1423
+ { label: "Poor quality", id: "8" },
1424
+ { label: "Unreliable", id: "9" }
1425
+ ]
1426
+ },
1427
+ {
1428
+ type: "radio-group",
1429
+ meta: { name: "asd", fieldKey: "productExpectations" },
1430
+ label: {
1431
+ default: "How well products meet your expectations?"
1432
+ },
1433
+ validations: { required: true },
1434
+ options: [
1435
+ { label: "Extremely well", id: "1" },
1436
+ { label: "Well", id: "2" },
1437
+ { label: "Somewhat well", id: "3" },
1438
+ { label: "Not well", id: "4" },
1439
+ { label: "Not at all well", id: "5" }
1440
+ ]
1441
+ },
1442
+ {
1443
+ type: "matrix",
1444
+ meta: { name: "asd", fieldKey: "productQuality" },
1445
+ label: {
1446
+ default: "How would you rate the quality of our products?"
1447
+ },
1448
+ validations: { required: true },
1449
+ max: 10,
1450
+ minText: "Poor quality",
1451
+ maxText: "Good quality"
1452
+ }
1453
+ ]
1454
+ },
1455
+ {
1456
+ meta: { name: "final-questions" },
1457
+ title: "Final questions",
1458
+ fields: [
1459
+ {
1460
+ type: "range-slide",
1461
+ defaultValue: 77,
1462
+ meta: { name: "asd", fieldKey: "productsImpressionLevel" },
1463
+ label: {
1464
+ default: "What is your overall impression level of our products?"
1465
+ }
1466
+ },
1467
+ {
1468
+ type: "rating",
1469
+ icon: "heart",
1470
+ max: 5,
1471
+ meta: { name: "asd", fieldKey: "productExpectations" },
1472
+ label: {
1473
+ default: "Do you like our service and products?"
1474
+ },
1475
+ validations: { required: true }
1476
+ },
1477
+ {
1478
+ type: "select",
1479
+ meta: { name: "asd", fieldKey: "fromWhereDidYouHearAboutUs" },
1480
+ label: {
1481
+ default: "From where did you hear about us?"
1482
+ },
1483
+ validations: { required: true },
1484
+ options: [
1485
+ { label: "Facebook", id: "1" },
1486
+ { label: "Instagram", id: "2" },
1487
+ { label: "Google search", id: "3" },
1488
+ { label: "AD", id: "4" },
1489
+ { label: "Other", id: "5" }
1490
+ ]
1491
+ },
1492
+ {
1493
+ type: "textarea",
1494
+ meta: { name: "asd", fieldKey: "lastComments" },
1495
+ validations: { required: false },
1496
+ label: {
1497
+ values: [
1498
+ {
1499
+ conditions: [
1500
+ {
1501
+ fieldName: "satisfactionRating",
1502
+ lessThan: 4
1503
+ }
1504
+ ],
1505
+ value: "How can we improve our service? (optional)"
1506
+ }
1507
+ ],
1508
+ default: "What you would like to tell us about your experience with this company? (optional)?"
1509
+ }
1510
+ }
1511
+ ]
1512
+ }
1513
+ ]
1514
+ };
1515
+ const getFormConfigMock = (_payload, _options) => {
1516
+ return new Promise((resolve) => {
1517
+ resolve({
1518
+ id: "",
1519
+ domainId: "",
1520
+ attributes: {
1521
+ theme: {},
1522
+ useSystemTheme: true,
1523
+ variant: "primary"
1524
+ },
1525
+ popupForm: {
1526
+ meta: {
1527
+ name: "popupForm"
1528
+ },
1529
+ config: {
1530
+ canReturnToPreviousStep: true,
1531
+ nextButtonText: "Next",
1532
+ previousButtonText: "Previous",
1533
+ submitButtonText: "Submit",
1534
+ formTitle: "We are looking forward to hear from you!",
1535
+ buttonText: "Feedback"
1536
+ },
1537
+ styles: {
1538
+ left: null,
1539
+ top: 0,
1540
+ bottom: -20,
1541
+ right: 0
1542
+ },
1543
+ form: formMock
1544
+ },
1545
+ inlineForm: {
1546
+ meta: {
1547
+ name: "asd"
1548
+ },
1549
+ config: {
1550
+ canReturnToPreviousStep: true,
1551
+ nextButtonText: "Next",
1552
+ previousButtonText: "Previous",
1553
+ submitButtonText: "Submit",
1554
+ formTitle: "We are looking forward to hear from you!"
1555
+ },
1556
+ form: formMock
1557
+ }
1558
+ });
1559
+ });
1560
+ };
1561
+ const useRequest = (request) => {
1562
+ const [data, setData] = React2.useState();
1563
+ const [loading, setLoading] = React2.useState(true);
1564
+ const [error, setError] = React2.useState(null);
1565
+ React2.useEffect(() => {
1566
+ const abortController = new AbortController();
1567
+ setLoading(true);
1568
+ request(abortController).then(setData).catch(setError).finally(() => setLoading(false));
1569
+ return () => {
1570
+ abortController.abort();
1571
+ };
1572
+ }, []);
1573
+ return { data, loading, error };
1574
+ };
1575
+ const Button = dt.button((props) => {
1576
+ const variantColor = useDefaultVariantColor();
1577
+ const variantContentColor = useDefaultVariantContentColor();
1578
+ const withBackground = !props.$outlined;
1579
+ const background = withBackground ? variantColor : "#fff";
1580
+ const color = props.$outlined ? variantColor : variantContentColor;
1581
+ const borderColor = props.$outlined ? color : background;
1582
+ const height = `calc(${props.theme.sizeField} * 10)`;
1583
+ return {
1584
+ borderRadius: props.theme.radiusField,
1585
+ borderColor: props.disabled ? "#cfcfcf" : borderColor,
1586
+ borderStyle: props.$dashed ? "dashed" : "solid",
1587
+ cursor: "pointer",
1588
+ boxShadow: `inset 0 0 20px 20px transparent`,
1589
+ height,
1590
+ fontWeight: "600",
1591
+ opacity: props.disabled ? 0.5 : 1,
1592
+ paddingInline: "1.2rem",
1593
+ transition: "all 0.2s ease-in-out",
1594
+ background: props.disabled ? "#cfcfcf" : background,
1595
+ borderWidth: props.theme.borderWidth,
1596
+ userSelect: props.disabled ? "none" : void 0,
1597
+ color: props.disabled ? "#888888" : color,
1598
+ "&:active": {
1599
+ transform: props.disabled ? void 0 : "scale(0.97)"
1600
+ },
1601
+ "&:hover": {
1602
+ opacity: !props.disabled ? 0.8 : void 0,
1603
+ cursor: props.disabled ? "auto" : "pointer",
1604
+ boxShadow: !props.disabled ? `inset 0 0 20px 20px #00000017` : void 0
1605
+ },
1606
+ "@media (max-width: 900px)": {
1607
+ paddingInline: "0.5rem"
1608
+ },
1609
+ "@media (max-width: 700px)": {
1610
+ paddingInline: "0.7rem"
1611
+ },
1612
+ "@media (max-width: 400px)": {
1613
+ paddingInline: "0.7rem"
1614
+ }
1615
+ };
1616
+ });
1617
+ const Div$3 = dt.div`
1618
+ visibility: ${(props) => props.$isVisible && props.$height ? "visible" : "hidden"};
1619
+ opacity: ${(props) => props.$isVisible ? 1 : 0};
56
1620
  display: flex;
57
- min-height: ${e=>e.$height?`${e.$height}px`:"auto"};
1621
+ min-height: ${(props) => props.$height ? `${props.$height}px` : "auto"};
58
1622
  gap: calc(var(--spacing) * 7);
59
1623
  top: 0;
60
1624
  left: 0;
61
- position: ${e=>e.$isVisible?"relative":"absolute"};
1625
+ position: ${(props) => props.$isVisible ? "relative" : "absolute"};
62
1626
  flex-direction: column;
63
1627
  justify-content: flex-start;
64
1628
  flex-wrap: wrap;
@@ -66,10 +1630,25 @@ var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co()
66
1630
  max-width: 100%;
67
1631
  @media (max-width: 900px) {
68
1632
  min-height: auto;
69
- height: ${e=>e.$isVisible?"auto":"0"};
70
- width: ${e=>e.$isVisible?"auto":"0"};
1633
+ height: ${(props) => props.$isVisible ? "auto" : "0"};
1634
+ width: ${(props) => props.$isVisible ? "auto" : "0"};
71
1635
  }
72
- `,mn=e=>{const t=s.useRef(null);return s.useEffect(()=>{t.current&&e.onSetMaxHeight(t.current.clientHeight)},[t]),s.createElement(Ei,{ref:t,$height:e.height,$isVisible:e.isVisible,children:e.children})},Si=b.ul`
1636
+ `;
1637
+ const Step = (props) => {
1638
+ const ref = React2.useRef(null);
1639
+ React2.useEffect(() => {
1640
+ if (ref.current) {
1641
+ props.onSetMaxHeight(ref.current.clientHeight);
1642
+ }
1643
+ }, [ref, props.onSetMaxHeight]);
1644
+ return React2.createElement(Div$3, {
1645
+ ref,
1646
+ $height: props.height,
1647
+ $isVisible: props.isVisible,
1648
+ children: props.children
1649
+ });
1650
+ };
1651
+ const StepsContainer = dt.ul`
73
1652
  counter-reset: step;
74
1653
  grid-auto-columns: 1fr;
75
1654
  grid-auto-flow: column;
@@ -78,8 +1657,1371 @@ var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co()
78
1657
  @media (max-width: 900px) {
79
1658
  display: none;
80
1659
  }
81
- `,Ti=b.li(e=>{const t=le(e.colorVariant),r=un(e.colorVariant),n=e.shouldBeFilled?t:"var(--color-base-300)",o=e.shouldBeFilled?r:"var(--color-base-content)";return{textAlign:"center","--step-bg":n,"--step-fg":o,gridTemplateRows:"40px 1fr",gridTemplateColumns:"auto",gap:".5rem",placeItems:"center",minWidth:"4rem",display:"grid","&:not(:first-of-type):before":{width:"100%",height:"0.5rem",color:"var(--step-bg)",backgroundColor:"var(--step-bg)","--tw-content":"''",content:"var(--tw-content)",border:"1px solid",gridRowStart:"1",gridColumnStart:"1",marginInlineStart:"-100%"},"&:after":{content:"counter(step)",counterIncrement:"step",zIndex:"1",color:"var(--step-fg)",backgroundColor:"var(--step-bg)",border:"1px solid var(--step-bg)",borderRadius:"3.40282e38px",gridRowStart:"1",gridColumnStart:"1",placeSelf:"center",placeItems:"center",width:"2rem",height:"2rem",display:"grid",position:"relative"}}}),fn=e=>(console.log("props.currentStepIndex",e.currentStepIndex),s.createElement(Si,{children:[e.steps.map((t,r)=>s.createElement(Ti,{key:t.title,colorVariant:e.colorVariant,shouldBeFilled:e.currentStepIndex>=r,children:t.title}))]})),wi={title:{marginTop:"0",marginBottom:".888889em",fontWeight:"700",fontSize:"2.25em",lineHeight:"1.11111"},subtitle:{marginTop:"2em",fontWeight:"700",marginBottom:"1em",fontSize:"1.5em",lineHeight:"1.33333"},section:{marginBottom:"1em",fontWeight:"600",fontSize:"1.25em",lineHeight:"1.6"},subsection:{marginTop:"1.5em",marginBottom:".5em",fontWeight:"600",fontSize:"1rem"},paragraph:{marginTop:"0",marginBottom:"1.25em",fontSize:"1rem"}},xi=b.div(e=>({...wi[e.$variant??"paragraph"],color:e.theme.baseContent,...e.$linear?{margin:"0"}:{}})),ee=e=>s.createElement(xi,{$variant:e.variant,$linear:e.linear,children:e.children}),Ci=e=>{switch(e){case"textarea":return"";case"select":return"";case"checkbox-group":return[];case"radio-group":return"";case"matrix":return null;case"range-slide":return null;case"rating":return null;default:return null}},hn=e=>{const t=s.useMemo(()=>e.form.steps.reduce((l,d,u)=>(l.validationsPerStep[u]={},l.steps=[...l.steps,{...d,fields:d.fields.map(f=>{const p=f.meta.fieldKey;return p?(l.validationsPerStep[u][p]={fieldType:f.type,validations:f.validations},l.state={...l.state,[p]:Ci(f.type)},{dataField:p,...f}):{...f,dataField:null}})}],l),{validationsPerStep:{},state:{},steps:[]}),[e.form]),[r,n]=s.useState(t.state),o=s.useCallback((l,d)=>{l!==null&&n(u=>({...u,[l]:d}))},[n]),a=s.useCallback(l=>l?r[l]:null,[r]);return{steps:t.steps,validationsPerStep:t.validationsPerStep,state:r,setStateByKey:o,getStateByKey:a}},Ai=bi(),_i=(e,t)=>Ai.post("/feedback-receiver",e,t);/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */const{entries:pn,setPrototypeOf:gn,isFrozen:Ii,getPrototypeOf:ki,getOwnPropertyDescriptor:Pi}=Object;let{freeze:G,seal:Q,create:bn}=Object,{apply:rr,construct:nr}=typeof Reflect<"u"&&Reflect;G||(G=function(t){return t}),Q||(Q=function(t){return t}),rr||(rr=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return t.apply(r,o)}),nr||(nr=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return new t(...n)});const kt=Y(Array.prototype.forEach),Oi=Y(Array.prototype.lastIndexOf),yn=Y(Array.prototype.pop),Ze=Y(Array.prototype.push),Ni=Y(Array.prototype.splice),Pt=Y(String.prototype.toLowerCase),or=Y(String.prototype.toString),ir=Y(String.prototype.match),Qe=Y(String.prototype.replace),$i=Y(String.prototype.indexOf),Di=Y(String.prototype.trim),te=Y(Object.prototype.hasOwnProperty),j=Y(RegExp.prototype.test),Je=Mi(TypeError);function Y(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return rr(e,t,n)}}function Mi(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nr(e,r)}}function E(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pt;gn&&gn(e,null);let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){const a=r(o);a!==o&&(Ii(t)||(t[n]=a),o=a)}e[o]=!0}return e}function Li(e){for(let t=0;t<e.length;t++)te(e,t)||(e[t]=null);return e}function de(e){const t=bn(null);for(const[r,n]of pn(e))te(e,r)&&(Array.isArray(n)?t[r]=Li(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=de(n):t[r]=n);return t}function et(e,t){for(;e!==null;){const n=Pi(e,t);if(n){if(n.get)return Y(n.get);if(typeof n.value=="function")return Y(n.value)}e=ki(e)}function r(){return null}return r}const vn=G(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ar=G(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","slot","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sr=G(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fi=G(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lr=G(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ri=G(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),En=G(["#text"]),Sn=G(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),cr=G(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tn=G(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ot=G(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zi=Q(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bi=Q(/<%[\w\W]*|[\w\W]*%>/gm),Ui=Q(/\$\{[\w\W]*/gm),Vi=Q(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wi=Q(/^aria-[\-\w]+$/),wn=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hi=Q(/^(?:\w+script|data):/i),Gi=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xn=Q(/^html$/i),ji=Q(/^[a-z][.\w]*(-[.\w]+)+$/i);var Cn=Object.freeze({__proto__:null,ARIA_ATTR:Wi,ATTR_WHITESPACE:Gi,CUSTOM_ELEMENT:ji,DATA_ATTR:Vi,DOCTYPE_NAME:xn,ERB_EXPR:Bi,IS_ALLOWED_URI:wn,IS_SCRIPT_OR_DATA:Hi,MUSTACHE_EXPR:zi,TMPLIT_EXPR:Ui});const tt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Yi=function(){return typeof window>"u"?null:window},qi=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(n=r.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},An=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yi();const t=h=>_n(h);if(t.version="3.2.7",t.removed=[],!e||!e.document||e.document.nodeType!==tt.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,o=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:d,Element:u,NodeFilter:f,NamedNodeMap:p=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:T,DOMParser:w,trustedTypes:S}=e,A=u.prototype,D=et(A,"cloneNode"),q=et(A,"remove"),M=et(A,"nextSibling"),O=et(A,"childNodes"),_=et(A,"parentNode");if(typeof l=="function"){const h=r.createElement("template");h.content&&h.content.ownerDocument&&(r=h.content.ownerDocument)}let y,P="";const{implementation:x,createNodeIterator:v,createDocumentFragment:be,getElementsByTagName:ze}=r,{importNode:ur}=n;let U=An();t.isSupported=typeof pn=="function"&&typeof _=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:nt,ERB_EXPR:ot,TMPLIT_EXPR:it,DATA_ATTR:dr,ARIA_ATTR:mr,IS_SCRIPT_OR_DATA:at,ATTR_WHITESPACE:st,CUSTOM_ELEMENT:re}=Cn;let{IS_ALLOWED_URI:Ae}=Cn,N=null;const ne=E({},[...vn,...ar,...sr,...lr,...En]);let F=null;const Be=E({},[...Sn,...cr,...Tn,...Ot]);let I=Object.seal(bn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,ye=null,ve=!0,ie=!0,Ue=!1,_e=!0,K=!1,$t=!0,Ie=!1,fr=!1,hr=!1,Ve=!1,Dt=!1,Mt=!1,Hn=!0,Gn=!1;const za="user-content-";let pr=!0,lt=!1,We={},He=null;const jn=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Yn=null;const qn=E({},["audio","video","img","source","image","track"]);let gr=null;const Kn=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",Ft="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let Ge=me,br=!1,yr=null;const Ba=E({},[Lt,Ft,me],or);let Rt=E({},["mi","mo","mn","ms","mtext"]),zt=E({},["annotation-xml"]);const Ua=E({},["title","style","font","a","script"]);let ct=null;const Va=["application/xhtml+xml","text/html"],Wa="text/html";let B=null,je=null;const Ha=r.createElement("form"),Xn=function(i){return i instanceof RegExp||i instanceof Function},vr=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(je&&je===i)){if((!i||typeof i!="object")&&(i={}),i=de(i),ct=Va.indexOf(i.PARSER_MEDIA_TYPE)===-1?Wa:i.PARSER_MEDIA_TYPE,B=ct==="application/xhtml+xml"?or:Pt,N=te(i,"ALLOWED_TAGS")?E({},i.ALLOWED_TAGS,B):ne,F=te(i,"ALLOWED_ATTR")?E({},i.ALLOWED_ATTR,B):Be,yr=te(i,"ALLOWED_NAMESPACES")?E({},i.ALLOWED_NAMESPACES,or):Ba,gr=te(i,"ADD_URI_SAFE_ATTR")?E(de(Kn),i.ADD_URI_SAFE_ATTR,B):Kn,Yn=te(i,"ADD_DATA_URI_TAGS")?E(de(qn),i.ADD_DATA_URI_TAGS,B):qn,He=te(i,"FORBID_CONTENTS")?E({},i.FORBID_CONTENTS,B):jn,oe=te(i,"FORBID_TAGS")?E({},i.FORBID_TAGS,B):de({}),ye=te(i,"FORBID_ATTR")?E({},i.FORBID_ATTR,B):de({}),We=te(i,"USE_PROFILES")?i.USE_PROFILES:!1,ve=i.ALLOW_ARIA_ATTR!==!1,ie=i.ALLOW_DATA_ATTR!==!1,Ue=i.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=i.SAFE_FOR_TEMPLATES||!1,$t=i.SAFE_FOR_XML!==!1,Ie=i.WHOLE_DOCUMENT||!1,Ve=i.RETURN_DOM||!1,Dt=i.RETURN_DOM_FRAGMENT||!1,Mt=i.RETURN_TRUSTED_TYPE||!1,hr=i.FORCE_BODY||!1,Hn=i.SANITIZE_DOM!==!1,Gn=i.SANITIZE_NAMED_PROPS||!1,pr=i.KEEP_CONTENT!==!1,lt=i.IN_PLACE||!1,Ae=i.ALLOWED_URI_REGEXP||wn,Ge=i.NAMESPACE||me,Rt=i.MATHML_TEXT_INTEGRATION_POINTS||Rt,zt=i.HTML_INTEGRATION_POINTS||zt,I=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&Xn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(I.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&Xn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(I.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(ie=!1),Dt&&(Ve=!0),We&&(N=E({},En),F=[],We.html===!0&&(E(N,vn),E(F,Sn)),We.svg===!0&&(E(N,ar),E(F,cr),E(F,Ot)),We.svgFilters===!0&&(E(N,sr),E(F,cr),E(F,Ot)),We.mathMl===!0&&(E(N,lr),E(F,Tn),E(F,Ot))),i.ADD_TAGS&&(N===ne&&(N=de(N)),E(N,i.ADD_TAGS,B)),i.ADD_ATTR&&(F===Be&&(F=de(F)),E(F,i.ADD_ATTR,B)),i.ADD_URI_SAFE_ATTR&&E(gr,i.ADD_URI_SAFE_ATTR,B),i.FORBID_CONTENTS&&(He===jn&&(He=de(He)),E(He,i.FORBID_CONTENTS,B)),pr&&(N["#text"]=!0),Ie&&E(N,["html","head","body"]),N.table&&(E(N,["tbody"]),delete oe.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=i.TRUSTED_TYPES_POLICY,P=y.createHTML("")}else y===void 0&&(y=qi(S,o)),y!==null&&typeof P=="string"&&(P=y.createHTML(""));G&&G(i),je=i}},Zn=E({},[...ar,...sr,...Fi]),Qn=E({},[...lr,...Ri]),Ga=function(i){let c=_(i);(!c||!c.tagName)&&(c={namespaceURI:Ge,tagName:"template"});const m=Pt(i.tagName),$=Pt(c.tagName);return yr[i.namespaceURI]?i.namespaceURI===Ft?c.namespaceURI===me?m==="svg":c.namespaceURI===Lt?m==="svg"&&($==="annotation-xml"||Rt[$]):!!Zn[m]:i.namespaceURI===Lt?c.namespaceURI===me?m==="math":c.namespaceURI===Ft?m==="math"&&zt[$]:!!Qn[m]:i.namespaceURI===me?c.namespaceURI===Ft&&!zt[$]||c.namespaceURI===Lt&&!Rt[$]?!1:!Qn[m]&&(Ua[m]||!Zn[m]):!!(ct==="application/xhtml+xml"&&yr[i.namespaceURI]):!1},ce=function(i){Ze(t.removed,{element:i});try{_(i).removeChild(i)}catch{q(i)}},ke=function(i,c){try{Ze(t.removed,{attribute:c.getAttributeNode(i),from:c})}catch{Ze(t.removed,{attribute:null,from:c})}if(c.removeAttribute(i),i==="is")if(Ve||Dt)try{ce(c)}catch{}else try{c.setAttribute(i,"")}catch{}},Jn=function(i){let c=null,m=null;if(hr)i="<remove></remove>"+i;else{const R=ir(i,/^[\r\n\t ]+/);m=R&&R[0]}ct==="application/xhtml+xml"&&Ge===me&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const $=y?y.createHTML(i):i;if(Ge===me)try{c=new w().parseFromString($,ct)}catch{}if(!c||!c.documentElement){c=x.createDocument(Ge,"template",null);try{c.documentElement.innerHTML=br?P:$}catch{}}const H=c.body||c.documentElement;return i&&m&&H.insertBefore(r.createTextNode(m),H.childNodes[0]||null),Ge===me?ze.call(c,Ie?"html":"body")[0]:Ie?c.documentElement:H},eo=function(i){return v.call(i.ownerDocument||i,i,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},Er=function(i){return i instanceof T&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof p)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},to=function(i){return typeof d=="function"&&i instanceof d};function fe(h,i,c){kt(h,m=>{m.call(t,i,c,je)})}const ro=function(i){let c=null;if(fe(U.beforeSanitizeElements,i,null),Er(i))return ce(i),!0;const m=B(i.nodeName);if(fe(U.uponSanitizeElement,i,{tagName:m,allowedTags:N}),$t&&i.hasChildNodes()&&!to(i.firstElementChild)&&j(/<[/\w!]/g,i.innerHTML)&&j(/<[/\w!]/g,i.textContent)||i.nodeType===tt.progressingInstruction||$t&&i.nodeType===tt.comment&&j(/<[/\w]/g,i.data))return ce(i),!0;if(!N[m]||oe[m]){if(!oe[m]&&oo(m)&&(I.tagNameCheck instanceof RegExp&&j(I.tagNameCheck,m)||I.tagNameCheck instanceof Function&&I.tagNameCheck(m)))return!1;if(pr&&!He[m]){const $=_(i)||i.parentNode,H=O(i)||i.childNodes;if(H&&$){const R=H.length;for(let X=R-1;X>=0;--X){const he=D(H[X],!0);he.__removalCount=(i.__removalCount||0)+1,$.insertBefore(he,M(i))}}}return ce(i),!0}return i instanceof u&&!Ga(i)||(m==="noscript"||m==="noembed"||m==="noframes")&&j(/<\/no(script|embed|frames)/i,i.innerHTML)?(ce(i),!0):(K&&i.nodeType===tt.text&&(c=i.textContent,kt([nt,ot,it],$=>{c=Qe(c,$," ")}),i.textContent!==c&&(Ze(t.removed,{element:i.cloneNode()}),i.textContent=c)),fe(U.afterSanitizeElements,i,null),!1)},no=function(i,c,m){if(Hn&&(c==="id"||c==="name")&&(m in r||m in Ha))return!1;if(!(ie&&!ye[c]&&j(dr,c))){if(!(ve&&j(mr,c))){if(!F[c]||ye[c]){if(!(oo(i)&&(I.tagNameCheck instanceof RegExp&&j(I.tagNameCheck,i)||I.tagNameCheck instanceof Function&&I.tagNameCheck(i))&&(I.attributeNameCheck instanceof RegExp&&j(I.attributeNameCheck,c)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(c,i))||c==="is"&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&j(I.tagNameCheck,m)||I.tagNameCheck instanceof Function&&I.tagNameCheck(m))))return!1}else if(!gr[c]){if(!j(Ae,Qe(m,st,""))){if(!((c==="src"||c==="xlink:href"||c==="href")&&i!=="script"&&$i(m,"data:")===0&&Yn[i])){if(!(Ue&&!j(at,Qe(m,st,"")))){if(m)return!1}}}}}}return!0},oo=function(i){return i!=="annotation-xml"&&ir(i,re)},io=function(i){fe(U.beforeSanitizeAttributes,i,null);const{attributes:c}=i;if(!c||Er(i))return;const m={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let $=c.length;for(;$--;){const H=c[$],{name:R,namespaceURI:X,value:he}=H,Ye=B(R),Sr=he;let V=R==="value"?Sr:Di(Sr);if(m.attrName=Ye,m.attrValue=V,m.keepAttr=!0,m.forceKeepAttr=void 0,fe(U.uponSanitizeAttribute,i,m),V=m.attrValue,Gn&&(Ye==="id"||Ye==="name")&&(ke(R,i),V=za+V),$t&&j(/((--!?|])>)|<\/(style|title|textarea)/i,V)){ke(R,i);continue}if(Ye==="attributename"&&ir(V,"href")){ke(R,i);continue}if(m.forceKeepAttr)continue;if(!m.keepAttr){ke(R,i);continue}if(!_e&&j(/\/>/i,V)){ke(R,i);continue}K&&kt([nt,ot,it],so=>{V=Qe(V,so," ")});const ao=B(i.nodeName);if(!no(ao,Ye,V)){ke(R,i);continue}if(y&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!X)switch(S.getAttributeType(ao,Ye)){case"TrustedHTML":{V=y.createHTML(V);break}case"TrustedScriptURL":{V=y.createScriptURL(V);break}}if(V!==Sr)try{X?i.setAttributeNS(X,R,V):i.setAttribute(R,V),Er(i)?ce(i):yn(t.removed)}catch{ke(R,i)}}fe(U.afterSanitizeAttributes,i,null)},ja=function h(i){let c=null;const m=eo(i);for(fe(U.beforeSanitizeShadowDOM,i,null);c=m.nextNode();)fe(U.uponSanitizeShadowNode,c,null),ro(c),io(c),c.content instanceof a&&h(c.content);fe(U.afterSanitizeShadowDOM,i,null)};return t.sanitize=function(h){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,m=null,$=null,H=null;if(br=!h,br&&(h="<!-->"),typeof h!="string"&&!to(h))if(typeof h.toString=="function"){if(h=h.toString(),typeof h!="string")throw Je("dirty is not a string, aborting")}else throw Je("toString is not a function");if(!t.isSupported)return h;if(fr||vr(i),t.removed=[],typeof h=="string"&&(lt=!1),lt){if(h.nodeName){const he=B(h.nodeName);if(!N[he]||oe[he])throw Je("root node is forbidden and cannot be sanitized in-place")}}else if(h instanceof d)c=Jn("<!---->"),m=c.ownerDocument.importNode(h,!0),m.nodeType===tt.element&&m.nodeName==="BODY"||m.nodeName==="HTML"?c=m:c.appendChild(m);else{if(!Ve&&!K&&!Ie&&h.indexOf("<")===-1)return y&&Mt?y.createHTML(h):h;if(c=Jn(h),!c)return Ve?null:Mt?P:""}c&&hr&&ce(c.firstChild);const R=eo(lt?h:c);for(;$=R.nextNode();)ro($),io($),$.content instanceof a&&ja($.content);if(lt)return h;if(Ve){if(Dt)for(H=be.call(c.ownerDocument);c.firstChild;)H.appendChild(c.firstChild);else H=c;return(F.shadowroot||F.shadowrootmode)&&(H=ur.call(n,H,!0)),H}let X=Ie?c.outerHTML:c.innerHTML;return Ie&&N["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&j(xn,c.ownerDocument.doctype.name)&&(X="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
82
- `+X),K&&kt([nt,ot,it],he=>{X=Qe(X,he," ")}),y&&Mt?y.createHTML(X):X},t.setConfig=function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vr(h),fr=!0},t.clearConfig=function(){je=null,fr=!1},t.isValidAttribute=function(h,i,c){je||vr({});const m=B(h),$=B(i);return no(m,$,c)},t.addHook=function(h,i){typeof i=="function"&&Ze(U[h],i)},t.removeHook=function(h,i){if(i!==void 0){const c=Oi(U[h],i);return c===-1?void 0:Ni(U[h],c,1)[0]}return yn(U[h])},t.removeHooks=function(h){U[h]=[]},t.removeAllHooks=function(){U=An()},t}var Ki=_n();const Xi=e=>e==null,rt=e=>!Xi(e),Zi=(e,t)=>t?t.required&&(e==null||e==="")?"Field is required":t.basicEmailValidation&&(e==null||e==="")?"Field should be email":null:null,In=(e,t)=>t?Object.keys(t).map(o=>{const a=Zi(e[o],t[o].validations);return a?{field:o,error:a}:null},{}).filter(rt):[],kn=e=>{const[t,r]=s.useState(0),[n,o]=s.useState([]),a=s.useCallback(async()=>{try{await _i({feedbackFormId:e.formId,link:window.location.pathname,rawHtml:Ki.sanitize(document.getElementsByTagName("html")[0]??""),domainId:e.domainId,data:e.state,formType:e.formType,viewport:{first:document.body.clientWidth,second:document.body.clientHeight},browser:{productSub:navigator.productSub,vendor:navigator.vendor,pdfViewerEnabled:navigator.pdfViewerEnabled,maxTouchPoints:navigator.maxTouchPoints,hardwareConcurrency:navigator.hardwareConcurrency,cookieEnabled:navigator.cookieEnabled,appVersion:navigator.appVersion,platform:navigator.platform,userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,webdriver:navigator.webdriver,deviceMemory:navigator.deviceMemory}})}catch(u){console.log(u)}},[e.state,e.formType]),l=s.useCallback(()=>{const u=In(e.state,e.validationsPerStep[t]);o(u),u.length||(t<e.stepsCount-1?r(f=>f+1):a())},[e.state,e.validationsPerStep,t,a]),d=s.useCallback(()=>{t!==0&&(o([]),r(u=>u-1))},[t]);return s.useEffect(()=>{o(u=>{if(u.length){const f=In(e.state,e.validationsPerStep[t]);if(f.length!==u.length)return f}return u})},[n,e.state,t]),{step:t,errors:n,onContinue:l,onBack:d}},Qi=b.div({marginTop:"1rem",color:"var(--color-error)",height:"20px"}),Ce=({errors:e})=>{var t;return s.createElement(Qi,{children:((t=(e||[])[0])==null?void 0:t.error)??null})},Ji=b.input(({theme:e,colorVariant:t,selected:r})=>{const n=`calc(${e.sizeSelector} * 6);`,o=le(t);return{cursor:"pointer",appearance:"none",borderRadius:"var(--radius-selector)",verticalAlign:"middle",color:"var(--color-base-content)",width:n,border:`1px solid ${o}`,height:n,flexShrink:"0",padding:".25rem",transition:"background-color .2s,box-shadow .2s",display:"inline-block",position:"relative","&::before":{content:'""',opacity:"0",clipPath:"polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%)",width:"100%",height:"100%",boxShadow:"0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset",backgroundColor:`${o}`,fontSize:"1rem",lineHeight:".75",transition:"clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s",display:"block",rotate:"45deg",...r?{clipPath:"polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%)",opacity:"1"}:{}}}}),ea=b.label(e=>({display:"flex",fontWeight:e.selected?"500":"normal",transition:".2s ease-in-out",alignItems:"center",cursor:"pointer",gap:"calc(var(--spacing) * 2)"})),ta=e=>{const t=s.useMemo(()=>`${e.id}-${e.label.replace(/\s/g,"-").toLowerCase()}`,[]),r=o=>{e.onSelect(e.value.includes(o)?e.value.filter(a=>a!==o):[...e.value,o])},n=e.value.includes(t);return s.createElement(ea,{selected:n,children:[s.createElement(Ji,{id:t,type:"checkbox",selected:n,colorVariant:e.colorVariant,onChange:()=>r(t),name:e.name}),s.createElement(ee,{children:e.label,linear:!0})]})},ra=b.div`
1660
+ `;
1661
+ const StepEl = dt.li((props) => {
1662
+ const defaultColor = useDefaultVariantColor(props.colorVariant);
1663
+ const defaultColorContent = useDefaultVariantContentColor(props.colorVariant);
1664
+ const backgroundColor = props.shouldBeFilled ? defaultColor : "var(--color-base-300)";
1665
+ const contentColor = props.shouldBeFilled ? defaultColorContent : "var(--color-base-content)";
1666
+ return {
1667
+ textAlign: "center",
1668
+ "--step-bg": backgroundColor,
1669
+ "--step-fg": contentColor,
1670
+ gridTemplateRows: "40px 1fr",
1671
+ gridTemplateColumns: "auto",
1672
+ gap: ".5rem",
1673
+ placeItems: "center",
1674
+ minWidth: "4rem",
1675
+ display: "grid",
1676
+ "&:not(:first-of-type):before": {
1677
+ width: "100%",
1678
+ height: "0.5rem",
1679
+ color: "var(--step-bg)",
1680
+ backgroundColor: "var(--step-bg)",
1681
+ "--tw-content": "''",
1682
+ content: "var(--tw-content)",
1683
+ border: "1px solid",
1684
+ gridRowStart: "1",
1685
+ gridColumnStart: "1",
1686
+ marginInlineStart: "-100%"
1687
+ },
1688
+ "&:after": {
1689
+ content: "counter(step)",
1690
+ counterIncrement: "step",
1691
+ zIndex: "1",
1692
+ color: "var(--step-fg)",
1693
+ backgroundColor: "var(--step-bg)",
1694
+ border: "1px solid var(--step-bg)",
1695
+ borderRadius: "3.40282e38px",
1696
+ gridRowStart: "1",
1697
+ gridColumnStart: "1",
1698
+ placeSelf: "center",
1699
+ placeItems: "center",
1700
+ width: "2rem",
1701
+ height: "2rem",
1702
+ display: "grid",
1703
+ position: "relative"
1704
+ }
1705
+ };
1706
+ });
1707
+ const StepsProgress = (props) => {
1708
+ console.log("props.currentStepIndex", props.currentStepIndex);
1709
+ return React2.createElement(StepsContainer, {
1710
+ children: [
1711
+ props.steps.map(
1712
+ (step, index) => React2.createElement(StepEl, {
1713
+ key: step.title,
1714
+ colorVariant: props.colorVariant,
1715
+ shouldBeFilled: props.currentStepIndex >= index,
1716
+ children: step.title
1717
+ })
1718
+ )
1719
+ ]
1720
+ });
1721
+ };
1722
+ const styles = {
1723
+ title: {
1724
+ marginTop: "0",
1725
+ marginBottom: ".888889em",
1726
+ fontWeight: "700",
1727
+ fontSize: "2.25em",
1728
+ lineHeight: "1.11111"
1729
+ },
1730
+ subtitle: {
1731
+ marginTop: "2em",
1732
+ fontWeight: "700",
1733
+ marginBottom: "1em",
1734
+ fontSize: "1.5em",
1735
+ lineHeight: "1.33333"
1736
+ },
1737
+ section: {
1738
+ marginBottom: "1em",
1739
+ fontWeight: "600",
1740
+ fontSize: "1.25em",
1741
+ lineHeight: "1.6"
1742
+ },
1743
+ subsection: {
1744
+ marginTop: "1.5em",
1745
+ marginBottom: ".5em",
1746
+ fontWeight: "600",
1747
+ fontSize: "1rem"
1748
+ },
1749
+ paragraph: {
1750
+ marginTop: "0",
1751
+ marginBottom: "1.25em",
1752
+ fontSize: "1rem"
1753
+ }
1754
+ };
1755
+ const TypographyMain = dt.div((props) => ({
1756
+ ...styles[props.$variant ?? "paragraph"],
1757
+ color: props.theme.baseContent,
1758
+ ...props.$linear ? { margin: "0" } : {}
1759
+ }));
1760
+ const Typography = (props) => {
1761
+ return React2.createElement(TypographyMain, {
1762
+ $variant: props.variant,
1763
+ $linear: props.linear,
1764
+ children: props.children
1765
+ });
1766
+ };
1767
+ const initialStateByType = (type) => {
1768
+ switch (type) {
1769
+ case "textarea":
1770
+ return "";
1771
+ case "select":
1772
+ return "";
1773
+ case "checkbox-group":
1774
+ return [];
1775
+ case "radio-group":
1776
+ return "";
1777
+ case "matrix":
1778
+ return null;
1779
+ case "range-slide":
1780
+ return null;
1781
+ case "rating":
1782
+ return null;
1783
+ default:
1784
+ return null;
1785
+ }
1786
+ };
1787
+ const useForm = (props) => {
1788
+ const formData = React2.useMemo(
1789
+ () => props.form.steps.reduce(
1790
+ (acc, step, index) => {
1791
+ acc.validationsPerStep[index] = {};
1792
+ acc.steps = [
1793
+ ...acc.steps,
1794
+ {
1795
+ ...step,
1796
+ fields: step.fields.map((field) => {
1797
+ const dataField = field.meta.fieldKey;
1798
+ if (dataField) {
1799
+ acc.validationsPerStep[index][dataField] = {
1800
+ fieldType: field.type,
1801
+ validations: field.validations
1802
+ };
1803
+ acc.state = {
1804
+ ...acc.state,
1805
+ [dataField]: initialStateByType(field.type)
1806
+ };
1807
+ return {
1808
+ dataField,
1809
+ ...field
1810
+ };
1811
+ }
1812
+ return {
1813
+ ...field,
1814
+ dataField: null
1815
+ };
1816
+ })
1817
+ }
1818
+ ];
1819
+ return acc;
1820
+ },
1821
+ {
1822
+ validationsPerStep: {},
1823
+ state: {},
1824
+ steps: []
1825
+ }
1826
+ ),
1827
+ [props.form]
1828
+ );
1829
+ const [state, setState] = React2.useState(formData.state);
1830
+ const setStateByKey = React2.useCallback(
1831
+ (key, value) => {
1832
+ if (key === null) return;
1833
+ setState((prevState) => ({
1834
+ ...prevState,
1835
+ [key]: value
1836
+ }));
1837
+ },
1838
+ [setState]
1839
+ );
1840
+ const getStateByKey = React2.useCallback(
1841
+ (key) => {
1842
+ return key ? state[key] : null;
1843
+ },
1844
+ [state]
1845
+ );
1846
+ return {
1847
+ steps: formData.steps,
1848
+ validationsPerStep: formData.validationsPerStep,
1849
+ state,
1850
+ setStateByKey,
1851
+ getStateByKey
1852
+ };
1853
+ };
1854
+ const baseApi = createBaseApi();
1855
+ const saveForm = (body, options) => baseApi.post(`/feedback-receiver`, body, options);
1856
+ /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
1857
+ const {
1858
+ entries,
1859
+ setPrototypeOf,
1860
+ isFrozen,
1861
+ getPrototypeOf,
1862
+ getOwnPropertyDescriptor
1863
+ } = Object;
1864
+ let {
1865
+ freeze,
1866
+ seal,
1867
+ create
1868
+ } = Object;
1869
+ let {
1870
+ apply,
1871
+ construct
1872
+ } = typeof Reflect !== "undefined" && Reflect;
1873
+ if (!freeze) {
1874
+ freeze = function freeze2(x2) {
1875
+ return x2;
1876
+ };
1877
+ }
1878
+ if (!seal) {
1879
+ seal = function seal2(x2) {
1880
+ return x2;
1881
+ };
1882
+ }
1883
+ if (!apply) {
1884
+ apply = function apply2(func, thisArg) {
1885
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1886
+ args[_key - 2] = arguments[_key];
1887
+ }
1888
+ return func.apply(thisArg, args);
1889
+ };
1890
+ }
1891
+ if (!construct) {
1892
+ construct = function construct2(Func) {
1893
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1894
+ args[_key2 - 1] = arguments[_key2];
1895
+ }
1896
+ return new Func(...args);
1897
+ };
1898
+ }
1899
+ const arrayForEach = unapply(Array.prototype.forEach);
1900
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
1901
+ const arrayPop = unapply(Array.prototype.pop);
1902
+ const arrayPush = unapply(Array.prototype.push);
1903
+ const arraySplice = unapply(Array.prototype.splice);
1904
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
1905
+ const stringToString = unapply(String.prototype.toString);
1906
+ const stringMatch = unapply(String.prototype.match);
1907
+ const stringReplace = unapply(String.prototype.replace);
1908
+ const stringIndexOf = unapply(String.prototype.indexOf);
1909
+ const stringTrim = unapply(String.prototype.trim);
1910
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
1911
+ const regExpTest = unapply(RegExp.prototype.test);
1912
+ const typeErrorCreate = unconstruct(TypeError);
1913
+ function unapply(func) {
1914
+ return function(thisArg) {
1915
+ if (thisArg instanceof RegExp) {
1916
+ thisArg.lastIndex = 0;
1917
+ }
1918
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
1919
+ args[_key3 - 1] = arguments[_key3];
1920
+ }
1921
+ return apply(func, thisArg, args);
1922
+ };
1923
+ }
1924
+ function unconstruct(Func) {
1925
+ return function() {
1926
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
1927
+ args[_key4] = arguments[_key4];
1928
+ }
1929
+ return construct(Func, args);
1930
+ };
1931
+ }
1932
+ function addToSet(set, array) {
1933
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
1934
+ if (setPrototypeOf) {
1935
+ setPrototypeOf(set, null);
1936
+ }
1937
+ let l = array.length;
1938
+ while (l--) {
1939
+ let element = array[l];
1940
+ if (typeof element === "string") {
1941
+ const lcElement = transformCaseFunc(element);
1942
+ if (lcElement !== element) {
1943
+ if (!isFrozen(array)) {
1944
+ array[l] = lcElement;
1945
+ }
1946
+ element = lcElement;
1947
+ }
1948
+ }
1949
+ set[element] = true;
1950
+ }
1951
+ return set;
1952
+ }
1953
+ function cleanArray(array) {
1954
+ for (let index = 0; index < array.length; index++) {
1955
+ const isPropertyExist = objectHasOwnProperty(array, index);
1956
+ if (!isPropertyExist) {
1957
+ array[index] = null;
1958
+ }
1959
+ }
1960
+ return array;
1961
+ }
1962
+ function clone(object) {
1963
+ const newObject = create(null);
1964
+ for (const [property, value] of entries(object)) {
1965
+ const isPropertyExist = objectHasOwnProperty(object, property);
1966
+ if (isPropertyExist) {
1967
+ if (Array.isArray(value)) {
1968
+ newObject[property] = cleanArray(value);
1969
+ } else if (value && typeof value === "object" && value.constructor === Object) {
1970
+ newObject[property] = clone(value);
1971
+ } else {
1972
+ newObject[property] = value;
1973
+ }
1974
+ }
1975
+ }
1976
+ return newObject;
1977
+ }
1978
+ function lookupGetter(object, prop) {
1979
+ while (object !== null) {
1980
+ const desc = getOwnPropertyDescriptor(object, prop);
1981
+ if (desc) {
1982
+ if (desc.get) {
1983
+ return unapply(desc.get);
1984
+ }
1985
+ if (typeof desc.value === "function") {
1986
+ return unapply(desc.value);
1987
+ }
1988
+ }
1989
+ object = getPrototypeOf(object);
1990
+ }
1991
+ function fallbackValue() {
1992
+ return null;
1993
+ }
1994
+ return fallbackValue;
1995
+ }
1996
+ const html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
1997
+ const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
1998
+ const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
1999
+ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
2000
+ const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
2001
+ const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
2002
+ const text = freeze(["#text"]);
2003
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
2004
+ const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
2005
+ const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
2006
+ const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
2007
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
2008
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
2009
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
2010
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
2011
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
2012
+ const IS_ALLOWED_URI = seal(
2013
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2014
+ // eslint-disable-line no-useless-escape
2015
+ );
2016
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
2017
+ const ATTR_WHITESPACE = seal(
2018
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2019
+ // eslint-disable-line no-control-regex
2020
+ );
2021
+ const DOCTYPE_NAME = seal(/^html$/i);
2022
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
2023
+ var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
2024
+ __proto__: null,
2025
+ ARIA_ATTR,
2026
+ ATTR_WHITESPACE,
2027
+ CUSTOM_ELEMENT,
2028
+ DATA_ATTR,
2029
+ DOCTYPE_NAME,
2030
+ ERB_EXPR,
2031
+ IS_ALLOWED_URI,
2032
+ IS_SCRIPT_OR_DATA,
2033
+ MUSTACHE_EXPR,
2034
+ TMPLIT_EXPR
2035
+ });
2036
+ const NODE_TYPE = {
2037
+ element: 1,
2038
+ text: 3,
2039
+ // Deprecated
2040
+ progressingInstruction: 7,
2041
+ comment: 8,
2042
+ document: 9
2043
+ };
2044
+ const getGlobal = function getGlobal2() {
2045
+ return typeof window === "undefined" ? null : window;
2046
+ };
2047
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
2048
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
2049
+ return null;
2050
+ }
2051
+ let suffix = null;
2052
+ const ATTR_NAME = "data-tt-policy-suffix";
2053
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
2054
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
2055
+ }
2056
+ const policyName = "dompurify" + (suffix ? "#" + suffix : "");
2057
+ try {
2058
+ return trustedTypes.createPolicy(policyName, {
2059
+ createHTML(html2) {
2060
+ return html2;
2061
+ },
2062
+ createScriptURL(scriptUrl) {
2063
+ return scriptUrl;
2064
+ }
2065
+ });
2066
+ } catch (_2) {
2067
+ console.warn("TrustedTypes policy " + policyName + " could not be created.");
2068
+ return null;
2069
+ }
2070
+ };
2071
+ const _createHooksMap = function _createHooksMap2() {
2072
+ return {
2073
+ afterSanitizeAttributes: [],
2074
+ afterSanitizeElements: [],
2075
+ afterSanitizeShadowDOM: [],
2076
+ beforeSanitizeAttributes: [],
2077
+ beforeSanitizeElements: [],
2078
+ beforeSanitizeShadowDOM: [],
2079
+ uponSanitizeAttribute: [],
2080
+ uponSanitizeElement: [],
2081
+ uponSanitizeShadowNode: []
2082
+ };
2083
+ };
2084
+ function createDOMPurify() {
2085
+ let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
2086
+ const DOMPurify = (root) => createDOMPurify(root);
2087
+ DOMPurify.version = "3.2.7";
2088
+ DOMPurify.removed = [];
2089
+ if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
2090
+ DOMPurify.isSupported = false;
2091
+ return DOMPurify;
2092
+ }
2093
+ let {
2094
+ document: document2
2095
+ } = window2;
2096
+ const originalDocument = document2;
2097
+ const currentScript = originalDocument.currentScript;
2098
+ const {
2099
+ DocumentFragment,
2100
+ HTMLTemplateElement,
2101
+ Node,
2102
+ Element,
2103
+ NodeFilter,
2104
+ NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
2105
+ HTMLFormElement,
2106
+ DOMParser,
2107
+ trustedTypes
2108
+ } = window2;
2109
+ const ElementPrototype = Element.prototype;
2110
+ const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
2111
+ const remove = lookupGetter(ElementPrototype, "remove");
2112
+ const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
2113
+ const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
2114
+ const getParentNode = lookupGetter(ElementPrototype, "parentNode");
2115
+ if (typeof HTMLTemplateElement === "function") {
2116
+ const template = document2.createElement("template");
2117
+ if (template.content && template.content.ownerDocument) {
2118
+ document2 = template.content.ownerDocument;
2119
+ }
2120
+ }
2121
+ let trustedTypesPolicy;
2122
+ let emptyHTML = "";
2123
+ const {
2124
+ implementation,
2125
+ createNodeIterator,
2126
+ createDocumentFragment,
2127
+ getElementsByTagName
2128
+ } = document2;
2129
+ const {
2130
+ importNode
2131
+ } = originalDocument;
2132
+ let hooks = _createHooksMap();
2133
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
2134
+ const {
2135
+ MUSTACHE_EXPR: MUSTACHE_EXPR2,
2136
+ ERB_EXPR: ERB_EXPR2,
2137
+ TMPLIT_EXPR: TMPLIT_EXPR2,
2138
+ DATA_ATTR: DATA_ATTR2,
2139
+ ARIA_ATTR: ARIA_ATTR2,
2140
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
2141
+ ATTR_WHITESPACE: ATTR_WHITESPACE2,
2142
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT2
2143
+ } = EXPRESSIONS;
2144
+ let {
2145
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
2146
+ } = EXPRESSIONS;
2147
+ let ALLOWED_TAGS = null;
2148
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
2149
+ let ALLOWED_ATTR = null;
2150
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
2151
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
2152
+ tagNameCheck: {
2153
+ writable: true,
2154
+ configurable: false,
2155
+ enumerable: true,
2156
+ value: null
2157
+ },
2158
+ attributeNameCheck: {
2159
+ writable: true,
2160
+ configurable: false,
2161
+ enumerable: true,
2162
+ value: null
2163
+ },
2164
+ allowCustomizedBuiltInElements: {
2165
+ writable: true,
2166
+ configurable: false,
2167
+ enumerable: true,
2168
+ value: false
2169
+ }
2170
+ }));
2171
+ let FORBID_TAGS = null;
2172
+ let FORBID_ATTR = null;
2173
+ let ALLOW_ARIA_ATTR = true;
2174
+ let ALLOW_DATA_ATTR = true;
2175
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
2176
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
2177
+ let SAFE_FOR_TEMPLATES = false;
2178
+ let SAFE_FOR_XML = true;
2179
+ let WHOLE_DOCUMENT = false;
2180
+ let SET_CONFIG = false;
2181
+ let FORCE_BODY = false;
2182
+ let RETURN_DOM = false;
2183
+ let RETURN_DOM_FRAGMENT = false;
2184
+ let RETURN_TRUSTED_TYPE = false;
2185
+ let SANITIZE_DOM = true;
2186
+ let SANITIZE_NAMED_PROPS = false;
2187
+ const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
2188
+ let KEEP_CONTENT = true;
2189
+ let IN_PLACE = false;
2190
+ let USE_PROFILES = {};
2191
+ let FORBID_CONTENTS = null;
2192
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
2193
+ let DATA_URI_TAGS = null;
2194
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
2195
+ let URI_SAFE_ATTRIBUTES = null;
2196
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
2197
+ const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
2198
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
2199
+ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
2200
+ let NAMESPACE = HTML_NAMESPACE;
2201
+ let IS_EMPTY_INPUT = false;
2202
+ let ALLOWED_NAMESPACES = null;
2203
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
2204
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
2205
+ let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
2206
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
2207
+ let PARSER_MEDIA_TYPE = null;
2208
+ const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
2209
+ const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
2210
+ let transformCaseFunc = null;
2211
+ let CONFIG = null;
2212
+ const formElement = document2.createElement("form");
2213
+ const isRegexOrFunction = function isRegexOrFunction2(testValue) {
2214
+ return testValue instanceof RegExp || testValue instanceof Function;
2215
+ };
2216
+ const _parseConfig = function _parseConfig2() {
2217
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2218
+ if (CONFIG && CONFIG === cfg) {
2219
+ return;
2220
+ }
2221
+ if (!cfg || typeof cfg !== "object") {
2222
+ cfg = {};
2223
+ }
2224
+ cfg = clone(cfg);
2225
+ PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
2226
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
2227
+ transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
2228
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
2229
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
2230
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
2231
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
2232
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
2233
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
2234
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
2235
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
2236
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
2237
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
2238
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
2239
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
2240
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
2241
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
2242
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
2243
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
2244
+ RETURN_DOM = cfg.RETURN_DOM || false;
2245
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
2246
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
2247
+ FORCE_BODY = cfg.FORCE_BODY || false;
2248
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
2249
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
2250
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
2251
+ IN_PLACE = cfg.IN_PLACE || false;
2252
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
2253
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
2254
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
2255
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
2256
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
2257
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
2258
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
2259
+ }
2260
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
2261
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
2262
+ }
2263
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
2264
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
2265
+ }
2266
+ if (SAFE_FOR_TEMPLATES) {
2267
+ ALLOW_DATA_ATTR = false;
2268
+ }
2269
+ if (RETURN_DOM_FRAGMENT) {
2270
+ RETURN_DOM = true;
2271
+ }
2272
+ if (USE_PROFILES) {
2273
+ ALLOWED_TAGS = addToSet({}, text);
2274
+ ALLOWED_ATTR = [];
2275
+ if (USE_PROFILES.html === true) {
2276
+ addToSet(ALLOWED_TAGS, html$1);
2277
+ addToSet(ALLOWED_ATTR, html);
2278
+ }
2279
+ if (USE_PROFILES.svg === true) {
2280
+ addToSet(ALLOWED_TAGS, svg$1);
2281
+ addToSet(ALLOWED_ATTR, svg);
2282
+ addToSet(ALLOWED_ATTR, xml);
2283
+ }
2284
+ if (USE_PROFILES.svgFilters === true) {
2285
+ addToSet(ALLOWED_TAGS, svgFilters);
2286
+ addToSet(ALLOWED_ATTR, svg);
2287
+ addToSet(ALLOWED_ATTR, xml);
2288
+ }
2289
+ if (USE_PROFILES.mathMl === true) {
2290
+ addToSet(ALLOWED_TAGS, mathMl$1);
2291
+ addToSet(ALLOWED_ATTR, mathMl);
2292
+ addToSet(ALLOWED_ATTR, xml);
2293
+ }
2294
+ }
2295
+ if (cfg.ADD_TAGS) {
2296
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
2297
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
2298
+ }
2299
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
2300
+ }
2301
+ if (cfg.ADD_ATTR) {
2302
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
2303
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
2304
+ }
2305
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
2306
+ }
2307
+ if (cfg.ADD_URI_SAFE_ATTR) {
2308
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
2309
+ }
2310
+ if (cfg.FORBID_CONTENTS) {
2311
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
2312
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
2313
+ }
2314
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
2315
+ }
2316
+ if (KEEP_CONTENT) {
2317
+ ALLOWED_TAGS["#text"] = true;
2318
+ }
2319
+ if (WHOLE_DOCUMENT) {
2320
+ addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
2321
+ }
2322
+ if (ALLOWED_TAGS.table) {
2323
+ addToSet(ALLOWED_TAGS, ["tbody"]);
2324
+ delete FORBID_TAGS.tbody;
2325
+ }
2326
+ if (cfg.TRUSTED_TYPES_POLICY) {
2327
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
2328
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2329
+ }
2330
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
2331
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2332
+ }
2333
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
2334
+ emptyHTML = trustedTypesPolicy.createHTML("");
2335
+ } else {
2336
+ if (trustedTypesPolicy === void 0) {
2337
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
2338
+ }
2339
+ if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
2340
+ emptyHTML = trustedTypesPolicy.createHTML("");
2341
+ }
2342
+ }
2343
+ if (freeze) {
2344
+ freeze(cfg);
2345
+ }
2346
+ CONFIG = cfg;
2347
+ };
2348
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
2349
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
2350
+ const _checkValidNamespace = function _checkValidNamespace2(element) {
2351
+ let parent = getParentNode(element);
2352
+ if (!parent || !parent.tagName) {
2353
+ parent = {
2354
+ namespaceURI: NAMESPACE,
2355
+ tagName: "template"
2356
+ };
2357
+ }
2358
+ const tagName = stringToLowerCase(element.tagName);
2359
+ const parentTagName = stringToLowerCase(parent.tagName);
2360
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
2361
+ return false;
2362
+ }
2363
+ if (element.namespaceURI === SVG_NAMESPACE) {
2364
+ if (parent.namespaceURI === HTML_NAMESPACE) {
2365
+ return tagName === "svg";
2366
+ }
2367
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
2368
+ return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
2369
+ }
2370
+ return Boolean(ALL_SVG_TAGS[tagName]);
2371
+ }
2372
+ if (element.namespaceURI === MATHML_NAMESPACE) {
2373
+ if (parent.namespaceURI === HTML_NAMESPACE) {
2374
+ return tagName === "math";
2375
+ }
2376
+ if (parent.namespaceURI === SVG_NAMESPACE) {
2377
+ return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
2378
+ }
2379
+ return Boolean(ALL_MATHML_TAGS[tagName]);
2380
+ }
2381
+ if (element.namespaceURI === HTML_NAMESPACE) {
2382
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
2383
+ return false;
2384
+ }
2385
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
2386
+ return false;
2387
+ }
2388
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
2389
+ }
2390
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
2391
+ return true;
2392
+ }
2393
+ return false;
2394
+ };
2395
+ const _forceRemove = function _forceRemove2(node2) {
2396
+ arrayPush(DOMPurify.removed, {
2397
+ element: node2
2398
+ });
2399
+ try {
2400
+ getParentNode(node2).removeChild(node2);
2401
+ } catch (_2) {
2402
+ remove(node2);
2403
+ }
2404
+ };
2405
+ const _removeAttribute = function _removeAttribute2(name, element) {
2406
+ try {
2407
+ arrayPush(DOMPurify.removed, {
2408
+ attribute: element.getAttributeNode(name),
2409
+ from: element
2410
+ });
2411
+ } catch (_2) {
2412
+ arrayPush(DOMPurify.removed, {
2413
+ attribute: null,
2414
+ from: element
2415
+ });
2416
+ }
2417
+ element.removeAttribute(name);
2418
+ if (name === "is") {
2419
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
2420
+ try {
2421
+ _forceRemove(element);
2422
+ } catch (_2) {
2423
+ }
2424
+ } else {
2425
+ try {
2426
+ element.setAttribute(name, "");
2427
+ } catch (_2) {
2428
+ }
2429
+ }
2430
+ }
2431
+ };
2432
+ const _initDocument = function _initDocument2(dirty) {
2433
+ let doc = null;
2434
+ let leadingWhitespace = null;
2435
+ if (FORCE_BODY) {
2436
+ dirty = "<remove></remove>" + dirty;
2437
+ } else {
2438
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
2439
+ leadingWhitespace = matches && matches[0];
2440
+ }
2441
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) {
2442
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
2443
+ }
2444
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
2445
+ if (NAMESPACE === HTML_NAMESPACE) {
2446
+ try {
2447
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
2448
+ } catch (_2) {
2449
+ }
2450
+ }
2451
+ if (!doc || !doc.documentElement) {
2452
+ doc = implementation.createDocument(NAMESPACE, "template", null);
2453
+ try {
2454
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
2455
+ } catch (_2) {
2456
+ }
2457
+ }
2458
+ const body = doc.body || doc.documentElement;
2459
+ if (dirty && leadingWhitespace) {
2460
+ body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
2461
+ }
2462
+ if (NAMESPACE === HTML_NAMESPACE) {
2463
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
2464
+ }
2465
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
2466
+ };
2467
+ const _createNodeIterator = function _createNodeIterator2(root) {
2468
+ return createNodeIterator.call(
2469
+ root.ownerDocument || root,
2470
+ root,
2471
+ // eslint-disable-next-line no-bitwise
2472
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
2473
+ null
2474
+ );
2475
+ };
2476
+ const _isClobbered = function _isClobbered2(element) {
2477
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
2478
+ };
2479
+ const _isNode = function _isNode2(value) {
2480
+ return typeof Node === "function" && value instanceof Node;
2481
+ };
2482
+ function _executeHooks(hooks2, currentNode, data) {
2483
+ arrayForEach(hooks2, (hook) => {
2484
+ hook.call(DOMPurify, currentNode, data, CONFIG);
2485
+ });
2486
+ }
2487
+ const _sanitizeElements = function _sanitizeElements2(currentNode) {
2488
+ let content = null;
2489
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
2490
+ if (_isClobbered(currentNode)) {
2491
+ _forceRemove(currentNode);
2492
+ return true;
2493
+ }
2494
+ const tagName = transformCaseFunc(currentNode.nodeName);
2495
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
2496
+ tagName,
2497
+ allowedTags: ALLOWED_TAGS
2498
+ });
2499
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
2500
+ _forceRemove(currentNode);
2501
+ return true;
2502
+ }
2503
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
2504
+ _forceRemove(currentNode);
2505
+ return true;
2506
+ }
2507
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
2508
+ _forceRemove(currentNode);
2509
+ return true;
2510
+ }
2511
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
2512
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
2513
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
2514
+ return false;
2515
+ }
2516
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
2517
+ return false;
2518
+ }
2519
+ }
2520
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
2521
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
2522
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
2523
+ if (childNodes && parentNode) {
2524
+ const childCount = childNodes.length;
2525
+ for (let i = childCount - 1; i >= 0; --i) {
2526
+ const childClone = cloneNode(childNodes[i], true);
2527
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
2528
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
2529
+ }
2530
+ }
2531
+ }
2532
+ _forceRemove(currentNode);
2533
+ return true;
2534
+ }
2535
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
2536
+ _forceRemove(currentNode);
2537
+ return true;
2538
+ }
2539
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
2540
+ _forceRemove(currentNode);
2541
+ return true;
2542
+ }
2543
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
2544
+ content = currentNode.textContent;
2545
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2546
+ content = stringReplace(content, expr, " ");
2547
+ });
2548
+ if (currentNode.textContent !== content) {
2549
+ arrayPush(DOMPurify.removed, {
2550
+ element: currentNode.cloneNode()
2551
+ });
2552
+ currentNode.textContent = content;
2553
+ }
2554
+ }
2555
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
2556
+ return false;
2557
+ };
2558
+ const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
2559
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
2560
+ return false;
2561
+ }
2562
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
2563
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
2564
+ else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
2565
+ if (
2566
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2567
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2568
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2569
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2570
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2571
+ lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
2572
+ ) ;
2573
+ else {
2574
+ return false;
2575
+ }
2576
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
2577
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
2578
+ else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
2579
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
2580
+ else if (value) {
2581
+ return false;
2582
+ } else ;
2583
+ return true;
2584
+ };
2585
+ const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
2586
+ return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
2587
+ };
2588
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
2589
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
2590
+ const {
2591
+ attributes
2592
+ } = currentNode;
2593
+ if (!attributes || _isClobbered(currentNode)) {
2594
+ return;
2595
+ }
2596
+ const hookEvent = {
2597
+ attrName: "",
2598
+ attrValue: "",
2599
+ keepAttr: true,
2600
+ allowedAttributes: ALLOWED_ATTR,
2601
+ forceKeepAttr: void 0
2602
+ };
2603
+ let l = attributes.length;
2604
+ while (l--) {
2605
+ const attr = attributes[l];
2606
+ const {
2607
+ name,
2608
+ namespaceURI,
2609
+ value: attrValue
2610
+ } = attr;
2611
+ const lcName = transformCaseFunc(name);
2612
+ const initValue = attrValue;
2613
+ let value = name === "value" ? initValue : stringTrim(initValue);
2614
+ hookEvent.attrName = lcName;
2615
+ hookEvent.attrValue = value;
2616
+ hookEvent.keepAttr = true;
2617
+ hookEvent.forceKeepAttr = void 0;
2618
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
2619
+ value = hookEvent.attrValue;
2620
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
2621
+ _removeAttribute(name, currentNode);
2622
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
2623
+ }
2624
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
2625
+ _removeAttribute(name, currentNode);
2626
+ continue;
2627
+ }
2628
+ if (lcName === "attributename" && stringMatch(value, "href")) {
2629
+ _removeAttribute(name, currentNode);
2630
+ continue;
2631
+ }
2632
+ if (hookEvent.forceKeepAttr) {
2633
+ continue;
2634
+ }
2635
+ if (!hookEvent.keepAttr) {
2636
+ _removeAttribute(name, currentNode);
2637
+ continue;
2638
+ }
2639
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
2640
+ _removeAttribute(name, currentNode);
2641
+ continue;
2642
+ }
2643
+ if (SAFE_FOR_TEMPLATES) {
2644
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2645
+ value = stringReplace(value, expr, " ");
2646
+ });
2647
+ }
2648
+ const lcTag = transformCaseFunc(currentNode.nodeName);
2649
+ if (!_isValidAttribute(lcTag, lcName, value)) {
2650
+ _removeAttribute(name, currentNode);
2651
+ continue;
2652
+ }
2653
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
2654
+ if (namespaceURI) ;
2655
+ else {
2656
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
2657
+ case "TrustedHTML": {
2658
+ value = trustedTypesPolicy.createHTML(value);
2659
+ break;
2660
+ }
2661
+ case "TrustedScriptURL": {
2662
+ value = trustedTypesPolicy.createScriptURL(value);
2663
+ break;
2664
+ }
2665
+ }
2666
+ }
2667
+ }
2668
+ if (value !== initValue) {
2669
+ try {
2670
+ if (namespaceURI) {
2671
+ currentNode.setAttributeNS(namespaceURI, name, value);
2672
+ } else {
2673
+ currentNode.setAttribute(name, value);
2674
+ }
2675
+ if (_isClobbered(currentNode)) {
2676
+ _forceRemove(currentNode);
2677
+ } else {
2678
+ arrayPop(DOMPurify.removed);
2679
+ }
2680
+ } catch (_2) {
2681
+ _removeAttribute(name, currentNode);
2682
+ }
2683
+ }
2684
+ }
2685
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
2686
+ };
2687
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
2688
+ let shadowNode = null;
2689
+ const shadowIterator = _createNodeIterator(fragment);
2690
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
2691
+ while (shadowNode = shadowIterator.nextNode()) {
2692
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
2693
+ _sanitizeElements(shadowNode);
2694
+ _sanitizeAttributes(shadowNode);
2695
+ if (shadowNode.content instanceof DocumentFragment) {
2696
+ _sanitizeShadowDOM2(shadowNode.content);
2697
+ }
2698
+ }
2699
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2700
+ };
2701
+ DOMPurify.sanitize = function(dirty) {
2702
+ let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2703
+ let body = null;
2704
+ let importedNode = null;
2705
+ let currentNode = null;
2706
+ let returnNode = null;
2707
+ IS_EMPTY_INPUT = !dirty;
2708
+ if (IS_EMPTY_INPUT) {
2709
+ dirty = "<!-->";
2710
+ }
2711
+ if (typeof dirty !== "string" && !_isNode(dirty)) {
2712
+ if (typeof dirty.toString === "function") {
2713
+ dirty = dirty.toString();
2714
+ if (typeof dirty !== "string") {
2715
+ throw typeErrorCreate("dirty is not a string, aborting");
2716
+ }
2717
+ } else {
2718
+ throw typeErrorCreate("toString is not a function");
2719
+ }
2720
+ }
2721
+ if (!DOMPurify.isSupported) {
2722
+ return dirty;
2723
+ }
2724
+ if (!SET_CONFIG) {
2725
+ _parseConfig(cfg);
2726
+ }
2727
+ DOMPurify.removed = [];
2728
+ if (typeof dirty === "string") {
2729
+ IN_PLACE = false;
2730
+ }
2731
+ if (IN_PLACE) {
2732
+ if (dirty.nodeName) {
2733
+ const tagName = transformCaseFunc(dirty.nodeName);
2734
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
2735
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
2736
+ }
2737
+ }
2738
+ } else if (dirty instanceof Node) {
2739
+ body = _initDocument("<!---->");
2740
+ importedNode = body.ownerDocument.importNode(dirty, true);
2741
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
2742
+ body = importedNode;
2743
+ } else if (importedNode.nodeName === "HTML") {
2744
+ body = importedNode;
2745
+ } else {
2746
+ body.appendChild(importedNode);
2747
+ }
2748
+ } else {
2749
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
2750
+ dirty.indexOf("<") === -1) {
2751
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
2752
+ }
2753
+ body = _initDocument(dirty);
2754
+ if (!body) {
2755
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
2756
+ }
2757
+ }
2758
+ if (body && FORCE_BODY) {
2759
+ _forceRemove(body.firstChild);
2760
+ }
2761
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
2762
+ while (currentNode = nodeIterator.nextNode()) {
2763
+ _sanitizeElements(currentNode);
2764
+ _sanitizeAttributes(currentNode);
2765
+ if (currentNode.content instanceof DocumentFragment) {
2766
+ _sanitizeShadowDOM(currentNode.content);
2767
+ }
2768
+ }
2769
+ if (IN_PLACE) {
2770
+ return dirty;
2771
+ }
2772
+ if (RETURN_DOM) {
2773
+ if (RETURN_DOM_FRAGMENT) {
2774
+ returnNode = createDocumentFragment.call(body.ownerDocument);
2775
+ while (body.firstChild) {
2776
+ returnNode.appendChild(body.firstChild);
2777
+ }
2778
+ } else {
2779
+ returnNode = body;
2780
+ }
2781
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
2782
+ returnNode = importNode.call(originalDocument, returnNode, true);
2783
+ }
2784
+ return returnNode;
2785
+ }
2786
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
2787
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
2788
+ serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
2789
+ }
2790
+ if (SAFE_FOR_TEMPLATES) {
2791
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2792
+ serializedHTML = stringReplace(serializedHTML, expr, " ");
2793
+ });
2794
+ }
2795
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
2796
+ };
2797
+ DOMPurify.setConfig = function() {
2798
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2799
+ _parseConfig(cfg);
2800
+ SET_CONFIG = true;
2801
+ };
2802
+ DOMPurify.clearConfig = function() {
2803
+ CONFIG = null;
2804
+ SET_CONFIG = false;
2805
+ };
2806
+ DOMPurify.isValidAttribute = function(tag, attr, value) {
2807
+ if (!CONFIG) {
2808
+ _parseConfig({});
2809
+ }
2810
+ const lcTag = transformCaseFunc(tag);
2811
+ const lcName = transformCaseFunc(attr);
2812
+ return _isValidAttribute(lcTag, lcName, value);
2813
+ };
2814
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
2815
+ if (typeof hookFunction !== "function") {
2816
+ return;
2817
+ }
2818
+ arrayPush(hooks[entryPoint], hookFunction);
2819
+ };
2820
+ DOMPurify.removeHook = function(entryPoint, hookFunction) {
2821
+ if (hookFunction !== void 0) {
2822
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
2823
+ return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
2824
+ }
2825
+ return arrayPop(hooks[entryPoint]);
2826
+ };
2827
+ DOMPurify.removeHooks = function(entryPoint) {
2828
+ hooks[entryPoint] = [];
2829
+ };
2830
+ DOMPurify.removeAllHooks = function() {
2831
+ hooks = _createHooksMap();
2832
+ };
2833
+ return DOMPurify;
2834
+ }
2835
+ var purify = createDOMPurify();
2836
+ const isNil = (value) => value === void 0 || value === null;
2837
+ const isNotNil = (value) => !isNil(value);
2838
+ const validate = (value, validations) => {
2839
+ if (!validations) return null;
2840
+ if (validations.required) {
2841
+ if (value === null || value === void 0 || value === "") {
2842
+ return "Field is required";
2843
+ }
2844
+ }
2845
+ if (validations.basicEmailValidation) {
2846
+ if (value === null || value === void 0 || value === "") {
2847
+ return "Field should be email";
2848
+ }
2849
+ }
2850
+ return null;
2851
+ };
2852
+ const validateAll = (state, validations) => {
2853
+ if (validations) {
2854
+ const fieldsToBeValid = Object.keys(validations);
2855
+ const foundErrors = fieldsToBeValid.map(
2856
+ (f2) => {
2857
+ const error = validate(state[f2], validations[f2].validations);
2858
+ return error ? {
2859
+ field: f2,
2860
+ error
2861
+ } : null;
2862
+ },
2863
+ {}
2864
+ ).filter(isNotNil);
2865
+ return foundErrors;
2866
+ }
2867
+ return [];
2868
+ };
2869
+ const useStepper = (props) => {
2870
+ const [step, setStep] = React2.useState(0);
2871
+ const [errors, setErrors] = React2.useState([]);
2872
+ const saveData = React2.useCallback(async () => {
2873
+ try {
2874
+ await saveForm({
2875
+ feedbackFormId: props.formId,
2876
+ link: window.location.pathname,
2877
+ rawHtml: purify.sanitize(document.getElementsByTagName("html")[0] ?? ""),
2878
+ domainId: props.domainId,
2879
+ data: props.state,
2880
+ formType: props.formType,
2881
+ viewport: {
2882
+ first: document.body.clientWidth,
2883
+ second: document.body.clientHeight
2884
+ },
2885
+ browser: {
2886
+ productSub: navigator.productSub,
2887
+ vendor: navigator.vendor,
2888
+ pdfViewerEnabled: navigator.pdfViewerEnabled,
2889
+ maxTouchPoints: navigator.maxTouchPoints,
2890
+ hardwareConcurrency: navigator.hardwareConcurrency,
2891
+ cookieEnabled: navigator.cookieEnabled,
2892
+ appVersion: navigator.appVersion,
2893
+ platform: navigator.platform,
2894
+ userAgent: navigator.userAgent,
2895
+ language: navigator.language,
2896
+ onLine: navigator.onLine,
2897
+ webdriver: navigator.webdriver,
2898
+ // @ts-ignore
2899
+ deviceMemory: navigator.deviceMemory
2900
+ }
2901
+ });
2902
+ } catch (e) {
2903
+ console.log(e);
2904
+ }
2905
+ }, [props.state, props.formType]);
2906
+ const onContinue = React2.useCallback(() => {
2907
+ const foundErrors = validateAll(props.state, props.validationsPerStep[step]);
2908
+ setErrors(foundErrors);
2909
+ if (!foundErrors.length) {
2910
+ if (step < props.stepsCount - 1) {
2911
+ setStep((prevStep) => prevStep + 1);
2912
+ } else {
2913
+ saveData();
2914
+ }
2915
+ }
2916
+ }, [props.state, props.validationsPerStep, step, saveData]);
2917
+ const onBack = React2.useCallback(() => {
2918
+ if (step !== 0) {
2919
+ setErrors([]);
2920
+ setStep((prevStep) => prevStep - 1);
2921
+ }
2922
+ }, [step]);
2923
+ React2.useEffect(() => {
2924
+ setErrors((errorsState) => {
2925
+ if (errorsState.length) {
2926
+ const validated = validateAll(props.state, props.validationsPerStep[step]);
2927
+ if (validated.length !== errorsState.length) return validated;
2928
+ }
2929
+ return errorsState;
2930
+ });
2931
+ }, [errors, props.state, step]);
2932
+ return {
2933
+ step,
2934
+ errors,
2935
+ onContinue,
2936
+ onBack
2937
+ };
2938
+ };
2939
+ const Div$2 = dt.div({
2940
+ marginTop: "1rem",
2941
+ color: "var(--color-error)",
2942
+ height: "20px"
2943
+ });
2944
+ const ErrorMessage = ({ errors }) => {
2945
+ var _a;
2946
+ return React2.createElement(Div$2, { children: ((_a = (errors || [])[0]) == null ? void 0 : _a.error) ?? null });
2947
+ };
2948
+ const CheckboxCmp = dt.input(
2949
+ ({ theme: theme2, colorVariant, selected }) => {
2950
+ const size = `calc(${theme2.sizeSelector} * 6);`;
2951
+ const defaultVariantColor = useDefaultVariantColor(colorVariant);
2952
+ return {
2953
+ cursor: "pointer",
2954
+ appearance: "none",
2955
+ borderRadius: "var(--radius-selector)",
2956
+ verticalAlign: "middle",
2957
+ color: "var(--color-base-content)",
2958
+ width: size,
2959
+ border: `1px solid ${defaultVariantColor}`,
2960
+ height: size,
2961
+ flexShrink: "0",
2962
+ padding: ".25rem",
2963
+ transition: "background-color .2s,box-shadow .2s",
2964
+ display: "inline-block",
2965
+ position: "relative",
2966
+ "&::before": {
2967
+ content: '""',
2968
+ opacity: "0",
2969
+ clipPath: "polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%)",
2970
+ width: "100%",
2971
+ height: "100%",
2972
+ boxShadow: "0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset",
2973
+ backgroundColor: `${defaultVariantColor}`,
2974
+ fontSize: "1rem",
2975
+ lineHeight: ".75",
2976
+ transition: "clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s",
2977
+ display: "block",
2978
+ rotate: "45deg",
2979
+ ...selected ? {
2980
+ clipPath: "polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%)",
2981
+ opacity: "1"
2982
+ } : {}
2983
+ }
2984
+ };
2985
+ }
2986
+ );
2987
+ const CheckboxRow = dt.label((props) => ({
2988
+ display: "flex",
2989
+ fontWeight: props.selected ? "500" : "normal",
2990
+ transition: ".2s ease-in-out",
2991
+ alignItems: "center",
2992
+ cursor: "pointer",
2993
+ gap: "calc(var(--spacing) * 2)"
2994
+ }));
2995
+ const Checkbox = (props) => {
2996
+ const id = React2.useMemo(
2997
+ () => `${props.id}-${props.label.replace(/\s/g, "-").toLowerCase()}`,
2998
+ []
2999
+ );
3000
+ const onSelect = (value) => {
3001
+ props.onSelect(
3002
+ props.value.includes(value) ? props.value.filter((v2) => v2 !== value) : [...props.value, value]
3003
+ );
3004
+ };
3005
+ const isSelected = props.value.includes(id);
3006
+ return React2.createElement(CheckboxRow, {
3007
+ selected: isSelected,
3008
+ children: [
3009
+ React2.createElement(CheckboxCmp, {
3010
+ id,
3011
+ type: "checkbox",
3012
+ selected: isSelected,
3013
+ colorVariant: props.colorVariant,
3014
+ onChange: () => onSelect(id),
3015
+ name: props.name
3016
+ }),
3017
+ React2.createElement(Typography, {
3018
+ children: props.label,
3019
+ linear: true
3020
+ })
3021
+ ]
3022
+ });
3023
+ };
3024
+ const checkboxList = dt.div`
83
3025
  display: flex;
84
3026
  flex-direction: column;
85
3027
  width: var(--all-fields-size);
@@ -87,14 +3029,213 @@ var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co()
87
3029
  @media (max-width: 900px) {
88
3030
  width: 100%;
89
3031
  }
90
- `,na=b.div`
3032
+ `;
3033
+ const columnGroup$1 = dt.div`
91
3034
  display: flex;
92
3035
  gap: calc(var(--spacing) * 10);
93
3036
  @media (max-width: 900px) {
94
3037
  gap: var(--spacing);
95
3038
  flex-direction: column;
96
3039
  }
97
- `,Pn=e=>{const t=e.label.replace(/\s/g,"-").toLowerCase(),r=e.elementsPerCol||4,n=s.useMemo(()=>e.options.reduce((o,a,l)=>{var u;return(l%r===0||l===0)&&o.push([]),(u=o[o.length-1])==null||u.push(a),o},[]),[r,e.options]);return s.createElement("div",{children:[s.createElement(ee,{children:e.label,variant:"section"}),s.createElement(na,{children:n.map((o,a)=>s.createElement(ra,{key:a,children:o.map(l=>s.createElement(ta,{onSelect:e.onChange,colorVariant:e.colorVariant,value:e.value,id:e.formClientId,name:t,label:l.label}))}))}),s.createElement(Ce,{errors:e.errors})]})},oa=b(Re)(()=>({"&:not(:last-of-type):not(:first-of-type)":{borderRadius:"0",marginRight:"-1px",marginLeft:"-1px"},"&:first-of-type":{borderTopRightRadius:"0",borderBottomRightRadius:"0"},"&:last-of-type":{borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},"@media (max-width: 900px)":{}})),ia=e=>s.createElement(oa,{onClick:e.onChange,$outlined:!e.selected,children:e.label}),On=b("span")(({min:e,variant:t})=>{const r=t||le();return{position:"absolute",left:e?"0":void 0,right:e?void 0:"0",bottom:"-2px",opacity:"0.5",fontWeight:"300",transform:"translateY(100%)",textTransform:"uppercase",color:r}}),aa=b.div(e=>({verticalAlign:"middle",display:"inline-flex",position:"relative",marginBottom:e.withText?"calc(var(--spacing) * 6)":"0"})),Nn=e=>s.createElement("div",{children:[s.createElement(ee,{children:e.label,variant:"section"}),s.createElement(aa,{withText:e.maxText||e.minText,children:[e.maxText?s.createElement(On,{min:!1,children:e.maxText}):null,e.minText?s.createElement(On,{min:!0,children:e.minText}):null,Array(e.max).fill(1).map((t,r)=>s.createElement(ia,{onChange:()=>e.onChange(r+1),selected:r+1===e.value,key:`${r}`,label:`${r+1}`}))]}),s.createElement(Ce,{errors:e.errors})]}),sa=b.input(({theme:e,selected:t,colorVariant:r})=>{const n=`calc(${e.sizeSelector} * 6);`,o=le(r);return{width:n,height:n,color:e.neutral,margin:"0",cursor:"pointer",appearance:"none",verticalAlign:"middle",borderRadius:"3.40282e38px",border:`1px solid ${o}`,flexShrink:"0",padding:t?".25rem":"0.4rem",transition:".2s ease-in-out",display:"inline-block",position:"relative",boxSizing:"border-box","&::before":{content:'""',borderRadius:"3.40282e38px",background:t?o:"transparent",width:"100%",height:"100%",display:"block"}}}),la=b.label(e=>({display:"flex",fontWeight:e.selected?"500":"normal",transition:".2s ease-in-out",alignItems:"center",cursor:"pointer",gap:"calc(var(--spacing) * 2)"})),ca=e=>{const t=s.useMemo(()=>`${e.id}-${e.label.replace(/\s/g,"-").toLowerCase()}`,[e.id]),r=o=>{e.onSelect(o)},n=e.value===t;return s.createElement(la,{selected:n,htmlFor:t,children:[s.createElement(sa,{id:t,type:"radio",variant:e.colorVariant,selected:n,onChange:()=>r(t),name:e.name}),s.createElement(ee,{children:e.label,linear:!0})]})},ua=b.div`
3040
+ `;
3041
+ const CheckboxGroup = (props) => {
3042
+ const name = props.label.replace(/\s/g, "-").toLowerCase();
3043
+ const elementsPerCol = props.elementsPerCol || 4;
3044
+ const columns = React2.useMemo(() => {
3045
+ return props.options.reduce(
3046
+ (acc, o, i) => {
3047
+ var _a;
3048
+ const shouldCreateNewCol = i % elementsPerCol === 0 || i === 0;
3049
+ if (shouldCreateNewCol) {
3050
+ acc.push([]);
3051
+ }
3052
+ (_a = acc[acc.length - 1]) == null ? void 0 : _a.push(o);
3053
+ return acc;
3054
+ },
3055
+ []
3056
+ );
3057
+ }, [elementsPerCol, props.options]);
3058
+ return React2.createElement("div", {
3059
+ children: [
3060
+ React2.createElement(Typography, {
3061
+ children: props.label,
3062
+ variant: "section"
3063
+ }),
3064
+ React2.createElement(columnGroup$1, {
3065
+ children: columns.map(
3066
+ (col, i) => React2.createElement(checkboxList, {
3067
+ key: i,
3068
+ children: col.map(
3069
+ (o) => React2.createElement(Checkbox, {
3070
+ onSelect: props.onChange,
3071
+ colorVariant: props.colorVariant,
3072
+ value: props.value,
3073
+ id: props.formClientId,
3074
+ name,
3075
+ label: o.label
3076
+ })
3077
+ )
3078
+ })
3079
+ )
3080
+ }),
3081
+ React2.createElement(ErrorMessage, {
3082
+ errors: props.errors
3083
+ })
3084
+ ]
3085
+ });
3086
+ };
3087
+ const MatrixEl = dt(Button)(() => {
3088
+ return {
3089
+ "&:not(:last-of-type):not(:first-of-type)": {
3090
+ borderRadius: "0",
3091
+ marginRight: "-1px",
3092
+ marginLeft: "-1px"
3093
+ },
3094
+ "&:first-of-type": {
3095
+ borderTopRightRadius: "0",
3096
+ borderBottomRightRadius: "0"
3097
+ },
3098
+ "&:last-of-type": {
3099
+ borderTopLeftRadius: "0",
3100
+ borderBottomLeftRadius: "0"
3101
+ },
3102
+ "@media (max-width: 900px)": {
3103
+ // display: 'none',
3104
+ }
3105
+ };
3106
+ });
3107
+ const QuestionMatrixItem = (props) => {
3108
+ return React2.createElement(MatrixEl, {
3109
+ onClick: props.onChange,
3110
+ $outlined: !props.selected,
3111
+ children: props.label
3112
+ });
3113
+ };
3114
+ const TextIndicator = dt("span")(({
3115
+ min,
3116
+ variant
3117
+ }) => {
3118
+ const color = variant || useDefaultVariantColor();
3119
+ return {
3120
+ position: "absolute",
3121
+ left: min ? "0" : void 0,
3122
+ right: min ? void 0 : "0",
3123
+ bottom: "-2px",
3124
+ opacity: "0.5",
3125
+ fontWeight: "300",
3126
+ transform: "translateY(100%)",
3127
+ textTransform: "uppercase",
3128
+ color
3129
+ };
3130
+ });
3131
+ const QuestionMatrixContainer = dt.div((props) => {
3132
+ return {
3133
+ verticalAlign: "middle",
3134
+ display: "inline-flex",
3135
+ position: "relative",
3136
+ marginBottom: props.withText ? "calc(var(--spacing) * 6)" : "0"
3137
+ };
3138
+ });
3139
+ const QuestionMatrix = (props) => {
3140
+ return React2.createElement("div", {
3141
+ children: [
3142
+ React2.createElement(Typography, {
3143
+ children: props.label,
3144
+ variant: "section"
3145
+ }),
3146
+ React2.createElement(QuestionMatrixContainer, {
3147
+ withText: props.maxText || props.minText,
3148
+ children: [
3149
+ props.maxText ? React2.createElement(TextIndicator, {
3150
+ min: false,
3151
+ children: props.maxText
3152
+ }) : null,
3153
+ props.minText ? React2.createElement(TextIndicator, {
3154
+ min: true,
3155
+ children: props.minText
3156
+ }) : null,
3157
+ Array(props.max).fill(1).map((_2, i) => {
3158
+ return React2.createElement(QuestionMatrixItem, {
3159
+ onChange: () => props.onChange(i + 1),
3160
+ selected: i + 1 === props.value,
3161
+ key: `${i}`,
3162
+ label: `${i + 1}`
3163
+ });
3164
+ })
3165
+ ]
3166
+ }),
3167
+ React2.createElement(ErrorMessage, {
3168
+ errors: props.errors
3169
+ })
3170
+ ]
3171
+ });
3172
+ };
3173
+ const RadioCmp = dt.input(({ theme: theme2, selected, colorVariant }) => {
3174
+ const size = `calc(${theme2.sizeSelector} * 6);`;
3175
+ const defaultVariantColor = useDefaultVariantColor(colorVariant);
3176
+ return {
3177
+ width: size,
3178
+ height: size,
3179
+ color: theme2.neutral,
3180
+ margin: "0",
3181
+ cursor: "pointer",
3182
+ appearance: "none",
3183
+ verticalAlign: "middle",
3184
+ borderRadius: "3.40282e38px",
3185
+ border: `1px solid ${defaultVariantColor}`,
3186
+ flexShrink: "0",
3187
+ padding: selected ? ".25rem" : "0.4rem",
3188
+ transition: ".2s ease-in-out",
3189
+ display: "inline-block",
3190
+ position: "relative",
3191
+ boxSizing: "border-box",
3192
+ "&::before": {
3193
+ content: '""',
3194
+ borderRadius: "3.40282e38px",
3195
+ background: selected ? defaultVariantColor : "transparent",
3196
+ width: "100%",
3197
+ height: "100%",
3198
+ display: "block"
3199
+ }
3200
+ };
3201
+ });
3202
+ const RadioRow = dt.label((props) => ({
3203
+ display: "flex",
3204
+ fontWeight: props.selected ? "500" : "normal",
3205
+ transition: ".2s ease-in-out",
3206
+ alignItems: "center",
3207
+ cursor: "pointer",
3208
+ gap: "calc(var(--spacing) * 2)"
3209
+ }));
3210
+ const Radio = (props) => {
3211
+ const id = React2.useMemo(
3212
+ () => `${props.id}-${props.label.replace(/\s/g, "-").toLowerCase()}`,
3213
+ [props.id]
3214
+ );
3215
+ const onSelect = (value) => {
3216
+ props.onSelect(value);
3217
+ };
3218
+ const isSelected = props.value === id;
3219
+ return React2.createElement(RadioRow, {
3220
+ selected: isSelected,
3221
+ htmlFor: id,
3222
+ children: [
3223
+ React2.createElement(RadioCmp, {
3224
+ id,
3225
+ type: "radio",
3226
+ variant: props.colorVariant,
3227
+ selected: isSelected,
3228
+ onChange: () => onSelect(id),
3229
+ name: props.name
3230
+ }),
3231
+ React2.createElement(Typography, {
3232
+ children: props.label,
3233
+ linear: true
3234
+ })
3235
+ ]
3236
+ });
3237
+ };
3238
+ const radioList = dt.div`
98
3239
  display: flex;
99
3240
  flex-direction: column;
100
3241
  width: var(--all-fields-size);
@@ -102,47 +3243,931 @@ var SiteUtilsFeedback=(function(pe,s,lo){"use strict";var ut={},Tr;function co()
102
3243
  @media (max-width: 900px) {
103
3244
  width: 100%;
104
3245
  }
105
- `,da=b.div`
3246
+ `;
3247
+ const columnGroup = dt.div`
106
3248
  display: flex;
107
3249
  gap: calc(var(--spacing) * 10);
108
3250
  @media (max-width: 900px) {
109
3251
  gap: var(--spacing);
110
3252
  flex-direction: column;
111
3253
  }
112
- `,$n=e=>{const t=e.elementsPerCol||4,r=s.useMemo(()=>e.options.reduce((n,o,a)=>{var d;return(a%t===0||a===0)&&n.push([]),(d=n[n.length-1])==null||d.push(o),n},[]),[t,e.options]);return s.createElement("div",{children:[s.createElement(ee,{children:e.label,variant:"section"}),s.createElement(da,{children:r.map(n=>s.createElement(ua,{children:n.map(o=>s.createElement(ca,{colorVariant:e.colorVariant,onSelect:e.onChange,value:e.value,id:e.formClientId,name:`${o.id}-${e.formClientId}`,label:o.label}))}))}),s.createElement(Ce,{errors:e.errors})]})},ma=b.input(e=>{const t=le(e.colorVariant);return{cursor:"text",border:`var(--border-width)solid ${t}`,appearance:"none",backgroundColor:"var(--color-base-100)",verticalAlign:"middle",whiteSpace:"nowrap",width:"clamp(3rem,30rem,100%)",height:"calc(var(--size-field, .25rem) * 10)",fontSize:"max(var(--font-size,.875rem),.875rem)",touchAction:"manipulation",borderColor:t,borderStartStartRadius:"var(--join-ss,var(--radius-field))",borderStartEndRadius:"var(--join-se,var(--radius-field))",borderEndEndRadius:"var(--join-ee,var(--radius-field))",borderEndStartRadius:"var(--join-es,var(--radius-field))",alignItems:"center",boxSizing:"border-box",paddingInline:".75rem","&:focus":{outline:`2px solid ${t}`,outlineOffset:"3px",isolation:"isolate"}}}),fa=b.input(e=>{const r=le(e.colorVariant);return{cursor:"pointer",flex:"1",verticalAlign:"middle","--radius-selector-max":"calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector))",borderRadius:"calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",height:"var(--range-thumb-size)",backgroundColor:"#0000",border:"none",overflow:"hidden",appearance:"none",webkitAppearance:"none",margin:"0","--range-thumb":"var(--color-base-100)","--range-thumb-size":"calc(var(--size-selector,.25rem)*6)","--range-progress":r,"--range-fill":"1","--range-p":".25rem","--range-bg":r,font:"inherit",fontFeatureSettings:"inherit",fontVariationSettings:"inherit",letterSpacing:"inherit",color:"inherit",opacity:"1","&::-webkit-slider-runnable-track":{backgroundColor:"var(--range-bg)",borderRadius:"var(--radius-selector)",width:"100%",height:"calc(var(--range-thumb-size)*.5)","--range-bg":"color-mix(in oklab,currentColor 10%,#0000)"},"&::-webkit-slider-thumb":{boxSizing:"border-box",borderRadius:"calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",height:"var(--range-thumb-size)",width:"var(--range-thumb-size)",border:"var(--range-p)solid",appearance:"none",webkitAppearance:"none",color:"var(--range-progress)",boxShadow:"0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 0 1px 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir, 1) * -100rem) - (var(--range-dir, 1) * var(--range-thumb-size) / 2)) 0 0 calc(100rem * var(--range-fill))",backgroundColor:r,position:"relative",top:"50%",transform:"translateY(-50%)"}}}),ha=b.div`
3254
+ `;
3255
+ const RadioGroup = (props) => {
3256
+ const elementsPerCol = props.elementsPerCol || 4;
3257
+ const columns = React2.useMemo(() => {
3258
+ return props.options.reduce(
3259
+ (acc, o, i) => {
3260
+ var _a;
3261
+ const shouldCreateNewCol = i % elementsPerCol === 0 || i === 0;
3262
+ if (shouldCreateNewCol) {
3263
+ acc.push([]);
3264
+ }
3265
+ (_a = acc[acc.length - 1]) == null ? void 0 : _a.push(o);
3266
+ return acc;
3267
+ },
3268
+ []
3269
+ );
3270
+ }, [elementsPerCol, props.options]);
3271
+ return React2.createElement("div", {
3272
+ children: [
3273
+ React2.createElement(Typography, {
3274
+ children: props.label,
3275
+ variant: "section"
3276
+ }),
3277
+ React2.createElement(columnGroup, {
3278
+ children: columns.map(
3279
+ (col) => React2.createElement(radioList, {
3280
+ children: col.map(
3281
+ (o) => React2.createElement(Radio, {
3282
+ colorVariant: props.colorVariant,
3283
+ onSelect: props.onChange,
3284
+ value: props.value,
3285
+ id: props.formClientId,
3286
+ name: `${o.id}-${props.formClientId}`,
3287
+ label: o.label
3288
+ })
3289
+ )
3290
+ })
3291
+ )
3292
+ }),
3293
+ React2.createElement(ErrorMessage, {
3294
+ errors: props.errors
3295
+ })
3296
+ ]
3297
+ });
3298
+ };
3299
+ const TextInputStyled = dt.input((props) => {
3300
+ const color = useDefaultVariantColor(props.colorVariant);
3301
+ return {
3302
+ cursor: "text",
3303
+ border: `var(--border-width)solid ${color}`,
3304
+ appearance: "none",
3305
+ backgroundColor: "var(--color-base-100)",
3306
+ verticalAlign: "middle",
3307
+ whiteSpace: "nowrap",
3308
+ width: "clamp(3rem,30rem,100%)",
3309
+ height: "calc(var(--size-field, .25rem) * 10)",
3310
+ fontSize: "max(var(--font-size,.875rem),.875rem)",
3311
+ touchAction: "manipulation",
3312
+ borderColor: color,
3313
+ borderStartStartRadius: "var(--join-ss,var(--radius-field))",
3314
+ borderStartEndRadius: "var(--join-se,var(--radius-field))",
3315
+ borderEndEndRadius: "var(--join-ee,var(--radius-field))",
3316
+ borderEndStartRadius: "var(--join-es,var(--radius-field))",
3317
+ alignItems: "center",
3318
+ boxSizing: "border-box",
3319
+ paddingInline: ".75rem",
3320
+ "&:focus": {
3321
+ outline: `2px solid ${color}`,
3322
+ outlineOffset: "3px",
3323
+ isolation: "isolate"
3324
+ }
3325
+ };
3326
+ });
3327
+ const RangeInput = dt.input((props) => {
3328
+ const defaultVariant = useDefaultVariantColor(props.colorVariant);
3329
+ const color = defaultVariant;
3330
+ return {
3331
+ cursor: "pointer",
3332
+ flex: "1",
3333
+ verticalAlign: "middle",
3334
+ "--radius-selector-max": "calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector))",
3335
+ borderRadius: "calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",
3336
+ height: "var(--range-thumb-size)",
3337
+ backgroundColor: "#0000",
3338
+ border: "none",
3339
+ overflow: "hidden",
3340
+ appearance: "none",
3341
+ webkitAppearance: "none",
3342
+ margin: "0",
3343
+ "--range-thumb": "var(--color-base-100)",
3344
+ "--range-thumb-size": "calc(var(--size-selector,.25rem)*6)",
3345
+ "--range-progress": color,
3346
+ "--range-fill": "1",
3347
+ "--range-p": ".25rem",
3348
+ "--range-bg": color,
3349
+ font: "inherit",
3350
+ fontFeatureSettings: "inherit",
3351
+ fontVariationSettings: "inherit",
3352
+ letterSpacing: "inherit",
3353
+ color: "inherit",
3354
+ opacity: "1",
3355
+ "&::-webkit-slider-runnable-track": {
3356
+ backgroundColor: "var(--range-bg)",
3357
+ borderRadius: "var(--radius-selector)",
3358
+ width: "100%",
3359
+ height: "calc(var(--range-thumb-size)*.5)",
3360
+ "--range-bg": "color-mix(in oklab,currentColor 10%,#0000)"
3361
+ },
3362
+ "&::-webkit-slider-thumb": {
3363
+ boxSizing: "border-box",
3364
+ borderRadius: "calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))",
3365
+ height: "var(--range-thumb-size)",
3366
+ width: "var(--range-thumb-size)",
3367
+ border: "var(--range-p)solid",
3368
+ appearance: "none",
3369
+ webkitAppearance: "none",
3370
+ color: "var(--range-progress)",
3371
+ boxShadow: "0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 0 1px 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir, 1) * -100rem) - (var(--range-dir, 1) * var(--range-thumb-size) / 2)) 0 0 calc(100rem * var(--range-fill))",
3372
+ backgroundColor: color,
3373
+ position: "relative",
3374
+ top: "50%",
3375
+ transform: "translateY(-50%)"
3376
+ }
3377
+ };
3378
+ });
3379
+ const RangeSliderContainer = dt.div`
113
3380
  width: clamp(3rem, 30rem, 100%);
114
- `,pa=b(ma)`
3381
+ `;
3382
+ const RangeTextInput = dt(TextInputStyled)`
115
3383
  width: calc(var(--size-field) * 15);
116
- `,ga=b.div`
3384
+ `;
3385
+ const RangeSlideContainer = dt.div`
117
3386
  display: flex;
118
3387
  align-items: center;
119
3388
  gap: calc(var(--spacing) * 2);
120
- `,Dn=e=>{var o;const t=e.min||0,r=e.max||100,n=a=>{const l=Number.parseInt(a.target.value);Number.isNaN(l)?console.error("RangeSlide must be a number"):e.onChange(l)};return s.useEffect(()=>{e.onChange(e.value||e.initialValue||0)},[]),s.createElement(ha,{children:[s.createElement(ee,{children:e.label,variant:"section"}),s.createElement(ga,{children:[s.createElement(fa,{type:"range",min:t,max:r,useThemeColors:e.colorVariant,value:e.value,onChange:n}),s.createElement(pa,{type:"number",value:((o=e.value)==null?void 0:o.toString())??"",max:r,min:t,colorVariant:e.colorVariant,onChange:a=>e.onChange(+a.target.value)})]}),s.createElement(Ce,{errors:e.errors})]})},ba={heart:encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="200" height="185"><path d="M100 184.606a15.384 15.384 0 0 1-8.653-2.678C53.565 156.28 37.205 138.695 28.182 127.7 8.952 104.264-.254 80.202.005 54.146.308 24.287 24.264 0 53.406 0c21.192 0 35.869 11.937 44.416 21.879a2.884 2.884 0 0 0 4.356 0C110.725 11.927 125.402 0 146.594 0c29.142 0 53.098 24.287 53.4 54.151.26 26.061-8.956 50.122-28.176 73.554-9.023 10.994-25.383 28.58-63.165 54.228a15.384 15.384 0 0 1-8.653 2.673Z" fill="black" fill-rule="nonzero"/></svg>'),star:encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 137.263-58.779 42.024 22.163-68.389L.894 68.481l72.476-.243L96 0l22.63 68.238 72.476.243-58.49 42.417 22.163 68.389z" fill-rule="evenodd"/></svg>'),star2:encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 153.044-58.779 26.243 7.02-63.513L.894 68.481l63.117-13.01L96 0l31.989 55.472 63.117 13.01-43.347 47.292 7.02 63.513z" fill-rule="evenodd"/></svg>')},Mn={small:"1rem",medium:"1.5rem",large:"2rem"},ya=b.input(e=>{const t=ba[e.icon??"star2"],r=le(e.colorVariant);return{maskImage:`url(data:image/svg+xml,${t})`,backgroundColor:r,appearance:"none",transform:e.selected?"scale(1.1)":"scale(1)",transition:"transform 0.3s",border:"none",opacity:e.selected?"1":.2,verticalAlign:"middle",display:"inline-block",WebkitMaskPosition:"50%",maskPosition:"50%",cursor:"pointer",WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",borderRadius:"0",width:Mn[e.size??"medium"],height:Mn[e.size??"medium"]}}),va=b.div(()=>({verticalAlign:"middle",position:"relative"})),Ln=({value:e,max:t,errors:r,label:n,onChange:o})=>s.createElement(va,{value:1,max:5,children:[s.createElement(ee,{variant:"section",children:n}),Array(t).fill(1).map((a,l)=>s.createElement(ya,{selected:l<e,name:`rating-${l+1}`,key:`${l}`,onChange:()=>{o(l+1)},type:"radio"})),s.createElement(Ce,{errors:r})]}),Ea=b.div`
3389
+ `;
3390
+ const RangeSlide = (props) => {
3391
+ var _a;
3392
+ const min = props.min || 0;
3393
+ const max = props.max || 100;
3394
+ const onChange = (event) => {
3395
+ const value = Number.parseInt(event.target.value);
3396
+ if (Number.isNaN(value)) {
3397
+ console.error("RangeSlide must be a number");
3398
+ } else {
3399
+ props.onChange(value);
3400
+ }
3401
+ };
3402
+ React2.useEffect(() => {
3403
+ props.onChange(props.value || props.initialValue || 0);
3404
+ }, []);
3405
+ return React2.createElement(RangeSliderContainer, {
3406
+ children: [
3407
+ React2.createElement(Typography, {
3408
+ children: props.label,
3409
+ variant: "section"
3410
+ }),
3411
+ React2.createElement(RangeSlideContainer, {
3412
+ children: [
3413
+ React2.createElement(RangeInput, {
3414
+ type: "range",
3415
+ min,
3416
+ max,
3417
+ useThemeColors: props.colorVariant,
3418
+ value: props.value,
3419
+ onChange
3420
+ }),
3421
+ React2.createElement(RangeTextInput, {
3422
+ type: "number",
3423
+ value: ((_a = props.value) == null ? void 0 : _a.toString()) ?? "",
3424
+ max,
3425
+ min,
3426
+ colorVariant: props.colorVariant,
3427
+ onChange: (e) => props.onChange(+e.target.value)
3428
+ })
3429
+ ]
3430
+ }),
3431
+ React2.createElement(ErrorMessage, {
3432
+ errors: props.errors
3433
+ })
3434
+ ]
3435
+ });
3436
+ };
3437
+ const heartSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="200" height="185"><path d="M100 184.606a15.384 15.384 0 0 1-8.653-2.678C53.565 156.28 37.205 138.695 28.182 127.7 8.952 104.264-.254 80.202.005 54.146.308 24.287 24.264 0 53.406 0c21.192 0 35.869 11.937 44.416 21.879a2.884 2.884 0 0 0 4.356 0C110.725 11.927 125.402 0 146.594 0c29.142 0 53.098 24.287 53.4 54.151.26 26.061-8.956 50.122-28.176 73.554-9.023 10.994-25.383 28.58-63.165 54.228a15.384 15.384 0 0 1-8.653 2.673Z" fill="black" fill-rule="nonzero"/></svg>`;
3438
+ const starSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 137.263-58.779 42.024 22.163-68.389L.894 68.481l72.476-.243L96 0l22.63 68.238 72.476.243-58.49 42.417 22.163 68.389z" fill-rule="evenodd"/></svg>`;
3439
+ const star2Svg = `<svg xmlns="http://www.w3.org/2000/svg" width="192" height="180"><path fill="black" d="m96 153.044-58.779 26.243 7.02-63.513L.894 68.481l63.117-13.01L96 0l31.989 55.472 63.117 13.01-43.347 47.292 7.02 63.513z" fill-rule="evenodd"/></svg>`;
3440
+ const allIcons = {
3441
+ heart: encodeURIComponent(heartSvg),
3442
+ star: encodeURIComponent(starSvg),
3443
+ star2: encodeURIComponent(star2Svg)
3444
+ };
3445
+ const sizes = {
3446
+ small: "1rem",
3447
+ medium: "1.5rem",
3448
+ large: "2rem"
3449
+ };
3450
+ const RatingItem = dt.input((props) => {
3451
+ const icon = allIcons[props.icon ?? "star2"];
3452
+ const defaultColorVariant = useDefaultVariantColor(props.colorVariant);
3453
+ return {
3454
+ maskImage: `url(data:image/svg+xml,${icon})`,
3455
+ backgroundColor: defaultColorVariant,
3456
+ appearance: "none",
3457
+ transform: props.selected ? "scale(1.1)" : "scale(1)",
3458
+ transition: "transform 0.3s",
3459
+ border: "none",
3460
+ opacity: props.selected ? "1" : 0.2,
3461
+ verticalAlign: "middle",
3462
+ display: "inline-block",
3463
+ WebkitMaskPosition: "50%",
3464
+ maskPosition: "50%",
3465
+ cursor: "pointer",
3466
+ WebkitMaskSize: "contain",
3467
+ maskSize: "contain",
3468
+ WebkitMaskRepeat: "no-repeat",
3469
+ maskRepeat: "no-repeat",
3470
+ borderRadius: "0",
3471
+ width: sizes[props.size ?? "medium"],
3472
+ height: sizes[props.size ?? "medium"]
3473
+ };
3474
+ });
3475
+ const RatingContainer = dt.div(() => {
3476
+ return {
3477
+ verticalAlign: "middle",
3478
+ position: "relative"
3479
+ };
3480
+ });
3481
+ const Rating = ({ value, max, errors, label, onChange }) => {
3482
+ return React2.createElement(RatingContainer, {
3483
+ value: 1,
3484
+ max: 5,
3485
+ children: [
3486
+ React2.createElement(Typography, {
3487
+ variant: "section",
3488
+ children: label
3489
+ }),
3490
+ Array(max).fill(1).map(
3491
+ (_2, i) => React2.createElement(RatingItem, {
3492
+ selected: i < value,
3493
+ name: `rating-${i + 1}`,
3494
+ key: `${i}`,
3495
+ onChange: () => {
3496
+ onChange(i + 1);
3497
+ },
3498
+ type: "radio"
3499
+ })
3500
+ ),
3501
+ React2.createElement(ErrorMessage, {
3502
+ errors
3503
+ })
3504
+ ]
3505
+ });
3506
+ };
3507
+ const TextareaContainer = dt.div`
121
3508
  width: 100%;
122
- `,Sa=b.textarea(e=>{const t=le(e.colorVariant);return{border:"var(--border-width)solid #0000",appearance:"none",borderRadius:"var(--radius-field)",backgroundColor:"var(--color-base-100)",verticalAlign:"middle",width:"clamp(3rem,30rem,100%)",maxWidth:"100%",minWidth:"3rem",minHeight:"5rem",fontSize:"max(var(--font-size,.875rem),.875rem)",touchAction:"manipulation",borderColor:t,flexShrink:"1",paddingBlock:".5rem",boxSizing:"border-box",paddingInline:".75rem","&:focus":{outline:`2px solid ${t}`,outlineOffset:"3px",isolation:"isolate"}}}),Fn=e=>{const t=r=>e.onChange(r.target.value);return s.createElement(Ea,{children:[s.createElement(ee,{variant:"section",children:e.label}),s.createElement(Sa,{value:e.value??"",useThemeColors:e.colorVariant,rows:e.rows??3,onChange:t}),s.createElement(Ce,{errors:e.errors})]})},Ta=b.div`
3509
+ `;
3510
+ const TextareaStyled = dt.textarea((props) => {
3511
+ const color = useDefaultVariantColor(props.colorVariant);
3512
+ return {
3513
+ border: "var(--border-width)solid #0000",
3514
+ appearance: "none",
3515
+ borderRadius: "var(--radius-field)",
3516
+ backgroundColor: "var(--color-base-100)",
3517
+ verticalAlign: "middle",
3518
+ width: "clamp(3rem,30rem,100%)",
3519
+ maxWidth: "100%",
3520
+ minWidth: "3rem",
3521
+ minHeight: "5rem",
3522
+ fontSize: "max(var(--font-size,.875rem),.875rem)",
3523
+ touchAction: "manipulation",
3524
+ borderColor: color,
3525
+ flexShrink: "1",
3526
+ paddingBlock: ".5rem",
3527
+ boxSizing: "border-box",
3528
+ paddingInline: ".75rem",
3529
+ "&:focus": {
3530
+ outline: `2px solid ${color}`,
3531
+ outlineOffset: "3px",
3532
+ isolation: "isolate"
3533
+ }
3534
+ };
3535
+ });
3536
+ const Textarea = (props) => {
3537
+ const onChange = (e) => props.onChange(e.target.value);
3538
+ return React2.createElement(TextareaContainer, {
3539
+ children: [
3540
+ React2.createElement(Typography, {
3541
+ variant: "section",
3542
+ children: props.label
3543
+ }),
3544
+ React2.createElement(TextareaStyled, {
3545
+ value: props.value ?? "",
3546
+ useThemeColors: props.colorVariant,
3547
+ rows: props.rows ?? 3,
3548
+ onChange
3549
+ }),
3550
+ React2.createElement(ErrorMessage, {
3551
+ errors: props.errors
3552
+ })
3553
+ ]
3554
+ });
3555
+ };
3556
+ const Div$1 = dt.div`
123
3557
  width: 100%;
124
- `,Nt=e=>e!=null,wa=(e,t)=>(n=>{if(!n)return e.default;const o=n.find(a=>a.conditions.every(l=>{const d=t(l.fieldName);if(!Nt(d))return!1;const u=[];return Nt(l.eq)?l.eq===d?u.push(!0):u.push(!1):Nt(l.lessThan)?l.lessThan>d?u.push(!0):u.push(!1):Nt(l.moreThan)&&(l.moreThan<d?u.push(!0):u.push(!1)),u.every(Boolean)}));return(o==null?void 0:o.value)??e.default})(e.values),Rn=e=>{const t=()=>{const r=a=>e.setStateByKey(e.dataField,a),n=wa(e.fieldProps.label,e.getStateByKey),o={formClientId:e.formClientId,label:n,errors:e.errors,onChange:r,value:e.getStateByKey(e.dataField),key:`${e.type}-${e.fieldProps.label}-${e.fieldProps.meta.name}`};switch(e.type){case"matrix":{const a=e.fieldProps;return s.createElement(Nn,{...a,...o,max:10})}case"radio-group":{const a=e.fieldProps;return s.createElement($n,{...a,...o})}case"checkbox-group":{const a=e.fieldProps;return s.createElement(Pn,{...a,...o})}case"range-slide":{const a=e.fieldProps;return s.createElement(Dn,{...a,...o})}case"rating":{const a=e.fieldProps;return s.createElement(Ln,{...a,...o})}case"textarea":{const a=e.fieldProps;return s.createElement(Fn,{...a,...o})}default:return null}};return s.createElement(Ta,{children:t()})},xa=b.div({position:"relative",fontSize:"var(--font-size)"}),Ca=b.div`
3558
+ `;
3559
+ const isPresent = (v2) => v2 !== void 0 && v2 !== null;
3560
+ const getDynamicValue = (conditions, getStateByKey) => {
3561
+ const byCondition = (values) => {
3562
+ if (!values) return conditions.default;
3563
+ const foundValue = values.find((val) => {
3564
+ return val.conditions.every((c) => {
3565
+ const state = getStateByKey(c.fieldName);
3566
+ if (!isPresent(state)) return false;
3567
+ const results = [];
3568
+ if (isPresent(c.eq)) {
3569
+ if (c.eq === state) {
3570
+ results.push(true);
3571
+ } else {
3572
+ results.push(false);
3573
+ }
3574
+ } else if (isPresent(c.lessThan)) {
3575
+ if (c.lessThan > state) {
3576
+ results.push(true);
3577
+ } else {
3578
+ results.push(false);
3579
+ }
3580
+ } else if (isPresent(c.moreThan)) {
3581
+ if (c.moreThan < state) {
3582
+ results.push(true);
3583
+ } else {
3584
+ results.push(false);
3585
+ }
3586
+ }
3587
+ return results.every(Boolean);
3588
+ });
3589
+ });
3590
+ return (foundValue == null ? void 0 : foundValue.value) ?? conditions.default;
3591
+ };
3592
+ return byCondition(conditions.values);
3593
+ };
3594
+ const Field = (props) => {
3595
+ const getElement = () => {
3596
+ const onChange = (value) => props.setStateByKey(props.dataField, value);
3597
+ const label = getDynamicValue(props.fieldProps.label, props.getStateByKey);
3598
+ const commonFields = {
3599
+ formClientId: props.formClientId,
3600
+ label,
3601
+ errors: props.errors,
3602
+ onChange,
3603
+ value: props.getStateByKey(props.dataField),
3604
+ key: `${props.type}-${props.fieldProps.label}-${props.fieldProps.meta.name}`
3605
+ };
3606
+ switch (props.type) {
3607
+ case "matrix": {
3608
+ const fieldProps = props.fieldProps;
3609
+ return React2.createElement(QuestionMatrix, {
3610
+ ...fieldProps,
3611
+ ...commonFields,
3612
+ max: 10
3613
+ });
3614
+ }
3615
+ case "radio-group": {
3616
+ const fieldProps = props.fieldProps;
3617
+ return React2.createElement(RadioGroup, {
3618
+ ...fieldProps,
3619
+ ...commonFields
3620
+ });
3621
+ }
3622
+ case "checkbox-group": {
3623
+ const fieldProps = props.fieldProps;
3624
+ return React2.createElement(CheckboxGroup, {
3625
+ ...fieldProps,
3626
+ ...commonFields
3627
+ });
3628
+ }
3629
+ case "range-slide": {
3630
+ const fieldProps = props.fieldProps;
3631
+ return React2.createElement(RangeSlide, {
3632
+ ...fieldProps,
3633
+ ...commonFields
3634
+ });
3635
+ }
3636
+ case "rating": {
3637
+ const fieldProps = props.fieldProps;
3638
+ return React2.createElement(Rating, {
3639
+ ...fieldProps,
3640
+ ...commonFields
3641
+ });
3642
+ }
3643
+ case "textarea": {
3644
+ const fieldProps = props.fieldProps;
3645
+ return React2.createElement(Textarea, {
3646
+ ...fieldProps,
3647
+ ...commonFields
3648
+ });
3649
+ }
3650
+ default:
3651
+ return null;
3652
+ }
3653
+ };
3654
+ return React2.createElement(Div$1, {
3655
+ children: getElement()
3656
+ });
3657
+ };
3658
+ const Div = dt.div({
3659
+ position: "relative",
3660
+ fontSize: "var(--font-size)"
3661
+ });
3662
+ const Footer$1 = dt.div`
125
3663
  display: flex;
126
3664
  align-items: center;
127
3665
  justify-content: space-between;
128
3666
  margin-top: calc(var(--spacing) * 10);
129
- `,zn=e=>{const t=s.useMemo(()=>Math.random().toString(36).substring(2,10),[]),[r,n]=s.useState(null),o=d=>{n(u=>!u||u<d?d:u)},a=hn({form:e.inlineForm.form,formId:e.formId,domainId:e.domainId}),l=kn({domainId:e.domainId,formType:"inlineForm",stepsCount:a.steps.length,validationsPerStep:a.validationsPerStep,formId:e.formId,state:a.state});return s.createElement(xa,{children:[e.inlineForm.config.formTitle&&s.createElement(ee,{variant:"title",children:e.inlineForm.config.formTitle}),a.steps.map((d,u)=>{var f;return s.createElement(mn,{key:u+`${(f=d.meta)==null?void 0:f.name}`,height:r,onSetMaxHeight:o,isVisible:u===l.step,children:d.fields.map(p=>s.createElement(Rn,{type:p.type,fieldProps:p,dataField:p.dataField,formClientId:t,onContinue:l.onContinue,errors:l.errors.filter(T=>T.field===p.dataField),getStateByKey:a.getStateByKey,setStateByKey:a.setStateByKey}))})}),s.createElement(Ca,{children:[s.createElement(Re,{children:"Back",disabled:l.step===0,onClick:l.onBack}),s.createElement(fn,{steps:a.steps,currentStepIndex:l.step}),s.createElement(Re,{children:"Continue",onClick:l.onContinue})]})]})},Aa=b.div(e=>({backgroundColor:"var(--color-base-100)",borderTopLeftRadius:"var(--modal-tl,var(--radius-box))",borderTopRightRadius:"var(--modal-tr,var(--radius-box))",borderBottomLeftRadius:"var(--modal-bl,var(--radius-box))",borderBottomRightRadius:"var(--modal-br,var(--radius-box))",opacity:e.$visible?"1":"0",overscrollBehavior:"contain",gridRowStart:"1",gridColumnStart:"1",width:"91.6667%",maxWidth:"1080px",margin:"auto",maxHeight:"100vh",padding:"1.5rem",transition:"translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out",overflowY:"auto",scale:"95%",boxShadow:"0 25px 50px -12px #00000040","@media (max-width: 900px)":{maxWidth:"initial",width:"auto"}})),_a=b.div(()=>({})),Ia=b.dialog(({$visible:e})=>({pointerEvents:e?"auto":"none",visibility:e?"visible":"hidden",width:"100%",maxWidth:"none",height:"100%",maxHeight:"none",color:"inherit",transition:"visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out",overscrollBehavior:"contain",zIndex:"99",scrollbarGutter:"auto",backgroundColor:e?"#0006":"#0000",placeItems:"center",margin:"0",padding:"0",display:"grid",position:"fixed",overflow:"clip",top:0,border:0,outline:0})),ka=e=>{const t=s.useRef(null),r=Math.random().toString(36).substring(2,16),n=s.useCallback(a=>{a.target===t.current&&e.onClose(),a.preventDefault(),a.stopPropagation()},[e]),o=s.useCallback(a=>{a.key==="Escape"&&e.onClose(),a.preventDefault()},[]);return s.useEffect(()=>{t.current&&e.isOpen?t.current.show():t.current&&!e.isOpen&&t.current.close()},[t,e.isOpen]),s.useEffect(()=>(document.addEventListener("keyup",o),()=>{document.removeEventListener("keyup",o)}),[]),s.createElement(Ia,{$visible:e.isOpen,onClick:n,ref:t,id:r,children:s.createElement(Aa,{$visible:e.isOpen,children:[s.createElement(ee,{children:e.heading,variant:"title"}),e.children,s.createElement(_a,{children:e.footer})]})})},Pa=b.div`
3667
+ `;
3668
+ const InPlaceForm = (props) => {
3669
+ const formClientRandomId = React2.useMemo(
3670
+ () => Math.random().toString(36).substring(2, 10),
3671
+ []
3672
+ );
3673
+ const [maxHeight, setMaxHeight] = React2.useState(null);
3674
+ const onSetMaxHeight = React2.useCallback((h) => {
3675
+ setMaxHeight((stateHeight) => {
3676
+ if (!stateHeight || stateHeight < h) return h;
3677
+ return stateHeight;
3678
+ });
3679
+ }, [setMaxHeight]);
3680
+ const populatedForm = useForm({
3681
+ form: props.inlineForm.form,
3682
+ formId: props.formId,
3683
+ domainId: props.domainId
3684
+ });
3685
+ const stepper = useStepper({
3686
+ domainId: props.domainId,
3687
+ formType: "inlineForm",
3688
+ stepsCount: populatedForm.steps.length,
3689
+ validationsPerStep: populatedForm.validationsPerStep,
3690
+ formId: props.formId,
3691
+ state: populatedForm.state
3692
+ });
3693
+ return React2.createElement(Div, {
3694
+ children: [
3695
+ props.inlineForm.config.formTitle && React2.createElement(Typography, {
3696
+ variant: "title",
3697
+ children: props.inlineForm.config.formTitle
3698
+ }),
3699
+ populatedForm.steps.map(
3700
+ (step, index) => {
3701
+ var _a;
3702
+ return React2.createElement(Step, {
3703
+ key: index + `${(_a = step.meta) == null ? void 0 : _a.name}`,
3704
+ height: maxHeight,
3705
+ onSetMaxHeight,
3706
+ isVisible: index === stepper.step,
3707
+ children: step.fields.map(
3708
+ (field) => React2.createElement(Field, {
3709
+ type: field.type,
3710
+ fieldProps: field,
3711
+ dataField: field.dataField,
3712
+ formClientId: formClientRandomId,
3713
+ onContinue: stepper.onContinue,
3714
+ errors: stepper.errors.filter((e) => e.field === field.dataField),
3715
+ getStateByKey: populatedForm.getStateByKey,
3716
+ setStateByKey: populatedForm.setStateByKey
3717
+ })
3718
+ )
3719
+ });
3720
+ }
3721
+ ),
3722
+ React2.createElement(Footer$1, {
3723
+ children: [
3724
+ React2.createElement(Button, {
3725
+ children: "Back",
3726
+ disabled: stepper.step === 0,
3727
+ onClick: stepper.onBack
3728
+ }),
3729
+ React2.createElement(StepsProgress, {
3730
+ steps: populatedForm.steps,
3731
+ currentStepIndex: stepper.step
3732
+ }),
3733
+ React2.createElement(Button, {
3734
+ children: "Continue",
3735
+ onClick: stepper.onContinue
3736
+ })
3737
+ ]
3738
+ })
3739
+ ]
3740
+ });
3741
+ };
3742
+ const ModalBox = dt.div((props) => {
3743
+ return {
3744
+ backgroundColor: "var(--color-base-100)",
3745
+ borderTopLeftRadius: "var(--modal-tl,var(--radius-box))",
3746
+ borderTopRightRadius: "var(--modal-tr,var(--radius-box))",
3747
+ borderBottomLeftRadius: "var(--modal-bl,var(--radius-box))",
3748
+ borderBottomRightRadius: "var(--modal-br,var(--radius-box))",
3749
+ opacity: props.$visible ? "1" : "0",
3750
+ overscrollBehavior: "contain",
3751
+ gridRowStart: "1",
3752
+ gridColumnStart: "1",
3753
+ width: "91.6667%",
3754
+ maxWidth: "1080px",
3755
+ margin: "auto",
3756
+ maxHeight: "100vh",
3757
+ padding: "1.5rem",
3758
+ transition: "translate .3s ease-out,scale .3s ease-out,opacity .2s ease-out 50ms,box-shadow .3s ease-out",
3759
+ overflowY: "auto",
3760
+ scale: "95%",
3761
+ boxShadow: "0 25px 50px -12px #00000040",
3762
+ "@media (max-width: 900px)": {
3763
+ maxWidth: "initial",
3764
+ width: "auto"
3765
+ }
3766
+ };
3767
+ });
3768
+ const ModalFooter = dt.div(() => {
3769
+ return {};
3770
+ });
3771
+ const ModalStyled = dt.dialog(({ $visible }) => {
3772
+ return {
3773
+ pointerEvents: $visible ? "auto" : "none",
3774
+ visibility: $visible ? "visible" : "hidden",
3775
+ width: "100%",
3776
+ maxWidth: "none",
3777
+ height: "100%",
3778
+ maxHeight: "none",
3779
+ color: "inherit",
3780
+ transition: "visibility .3s allow-discrete,background-color .3s ease-out,opacity .1s ease-out",
3781
+ overscrollBehavior: "contain",
3782
+ zIndex: "99",
3783
+ scrollbarGutter: "auto",
3784
+ backgroundColor: $visible ? "#0006" : "#0000",
3785
+ placeItems: "center",
3786
+ margin: "0",
3787
+ padding: "0",
3788
+ display: "grid",
3789
+ position: "fixed",
3790
+ overflow: "clip",
3791
+ top: 0,
3792
+ border: 0,
3793
+ outline: 0
3794
+ };
3795
+ });
3796
+ const Modal = (props) => {
3797
+ const modalRef = React2.useRef(null);
3798
+ const randomId = Math.random().toString(36).substring(2, 16);
3799
+ const onClick = React2.useCallback(
3800
+ (e) => {
3801
+ if (e.target === modalRef.current) {
3802
+ props.onClose();
3803
+ }
3804
+ e.preventDefault();
3805
+ e.stopPropagation();
3806
+ },
3807
+ [props]
3808
+ );
3809
+ const onEscClick = React2.useCallback((e) => {
3810
+ if (e.key === "Escape") {
3811
+ props.onClose();
3812
+ }
3813
+ e.preventDefault();
3814
+ }, []);
3815
+ React2.useEffect(() => {
3816
+ if (modalRef.current && props.isOpen) {
3817
+ modalRef.current.show();
3818
+ } else if (modalRef.current && !props.isOpen) {
3819
+ modalRef.current.close();
3820
+ }
3821
+ }, [modalRef, props.isOpen]);
3822
+ React2.useEffect(() => {
3823
+ document.addEventListener("keyup", onEscClick);
3824
+ return () => {
3825
+ document.removeEventListener("keyup", onEscClick);
3826
+ };
3827
+ }, []);
3828
+ return React2.createElement(ModalStyled, {
3829
+ $visible: props.isOpen,
3830
+ onClick,
3831
+ ref: modalRef,
3832
+ id: randomId,
3833
+ children: React2.createElement(ModalBox, {
3834
+ $visible: props.isOpen,
3835
+ children: [
3836
+ React2.createElement(Typography, {
3837
+ children: props.heading,
3838
+ variant: "title"
3839
+ }),
3840
+ props.children,
3841
+ React2.createElement(ModalFooter, {
3842
+ children: props.footer
3843
+ })
3844
+ ]
3845
+ })
3846
+ });
3847
+ };
3848
+ const Footer = dt.div`
130
3849
  display: flex;
131
3850
  align-items: center;
132
3851
  justify-content: space-between;
133
3852
  margin-top: calc(var(--spacing) * 10);
134
- `,Oa=b(Re)`
3853
+ `;
3854
+ const ShowPopupButton = dt(Button)`
135
3855
  position: fixed;
136
3856
  width: fit-content;
137
3857
  height: fit-content;
138
3858
  transform: rotate(-90deg) translateY(calc(100% - 15px));
139
3859
  padding: 10px 20px 30px 20px;
140
3860
  margin: auto;
141
- left: ${e=>rt(e.$left)?`${e.$left}px`:null};
142
- right: ${e=>rt(e.$right)?`${e.$right}px`:null};
143
- top: ${e=>rt(e.$top)?`${e.$top}px`:null};
144
- bottom: ${e=>rt(e.$bottom)?`${e.$bottom}px`:null};
3861
+ left: ${(props) => isNotNil(props.$left) ? `${props.$left}px` : null};
3862
+ right: ${(props) => isNotNil(props.$right) ? `${props.$right}px` : null};
3863
+ top: ${(props) => isNotNil(props.$top) ? `${props.$top}px` : null};
3864
+ bottom: ${(props) => isNotNil(props.$bottom) ? `${props.$bottom}px` : null};
145
3865
  &:active {
146
3866
  transform: rotate(-90deg) translateY(calc(100% - 18px));
147
3867
  }
148
- `,Bn=e=>{const[t,r]=s.useState(!1),[n,o]=s.useState(null),a=s.useMemo(()=>Math.random().toString(36).substring(2,10),[]),l=f=>{o(p=>!p||p<f?f:p)},d=hn({form:e.popupForm.form,formId:e.formId,domainId:e.domainId}),u=kn({domainId:e.domainId,formType:"inlineForm",stepsCount:d.steps.length,validationsPerStep:d.validationsPerStep,formId:e.formId,state:d.state});return s.createElement(s.Fragment,{children:[s.createElement(Oa,{children:e.popupForm.config.buttonText,onClick:()=>r(!0),$left:e.popupForm.styles.left??null,$right:e.popupForm.styles.right??null,$top:e.popupForm.styles.top??null,$bottom:e.popupForm.styles.bottom??null}),s.createElement(ka,{onClose:()=>r(!1),heading:e.popupForm.config.formTitle,isOpen:t,footer:s.createElement(Pa,{children:[s.createElement(Re,{children:"Back",disabled:u.step===0,onClick:u.onBack}),s.createElement(fn,{steps:d.steps,currentStepIndex:u.step}),s.createElement(Re,{children:"Continue",onClick:u.onContinue})]}),children:d.steps.map((f,p)=>{var T;return s.createElement(mn,{key:p+`${(T=f.meta)==null?void 0:T.name}`,height:n,onSetMaxHeight:l,isVisible:p===u.step,children:f.fields.map(w=>s.createElement(Rn,{type:w.type,fieldProps:w,formClientId:a,dataField:w.dataField,onContinue:u.onContinue,errors:u.errors.filter(S=>S.field===w.dataField),getStateByKey:d.getStateByKey,setStateByKey:d.setStateByKey}))})})})]})},Un=e=>{e.locale;let{data:t,loading:r,error:n}=vi(()=>yi({formId:e.formId}));const o=s.useMemo(()=>t!=null&&t.inlineForm?s.createElement(zn,{key:`inline-form-${e.formId}`,formId:e.formId,domainId:t.domainId,formTheme:t.attributes.theme,inlineForm:t.inlineForm}):null,[t==null?void 0:t.attributes.theme,t==null?void 0:t.domainId,t==null?void 0:t.inlineForm,e.formId]),a=s.useMemo(()=>t!=null&&t.popupForm?s.createElement(Bn,{key:`popup-form-${e.formId}`,formId:e.formId,domainId:t.domainId,formTheme:t.attributes.theme,popupForm:t.popupForm}):null,[t==null?void 0:t.attributes.theme,t==null?void 0:t.domainId,t==null?void 0:t.inlineForm,e.formId]);return!t&&r?"Loading...":!t||n?n?n.message:"Unknown error":s.createElement(se,{theme:t.attributes.theme,selectedVariant:t.attributes.variant,children:[o,a]})},Vn=b.option(()=>({borderRadius:"var(--radius-field)",whiteSpace:"normal",paddingBlock:".375rem",paddingInline:".75rem",transitionProperty:"color,background-color",transitionDuration:".2s",transitionTimingFunction:"cubic-bezier(0,0,.2,1)"})),Na=b.select(e=>({border:`var(--border-width)solid ${le(e.colorVariant)}`,backgroundColor:"var(--color-base-100)",verticalAlign:"middle",width:"clamp(3rem,30rem,100%)",height:"calc(var(--size-field,.25rem)*10)",touchAction:"manipulation",whiteSpace:"nowrap",textOverflow:"ellipsis",borderStartStartRadius:"var(--radius-field)",borderStartEndRadius:"var(--radius-field)",borderEndEndRadius:"var(--radius-field)",borderEndStartRadius:"var(--radius-field)",flexShrink:"1",alignItems:"center",gap:".375rem",paddingInline:".75rem 1.75rem",fontSize:".875rem",display:"inline-flex",position:"relative",overflow:"hidden"})),$a=e=>{const t=r=>e.onChange(r.target.value);return s.createElement("div",{children:[s.createElement(ee,{children:e.label,variant:"section"}),s.createElement(Na,{colorVariant:e.colorVariant,value:e.value??null,defaultChecked:!1,defaultValue:null,onChange:t,children:[s.createElement(Vn,{value:"",selected:!e.value,children:"Select an option",key:""}),e.options.map(r=>s.createElement(Vn,{value:r.id,selected:r.id===e.value,children:r.label,key:r.id}))]}),s.createElement(Ce,{errors:e.errors})]})},Da=e=>{if(!e){console.error("options must be provided. Feedback module deactivated");return}if(!e.formId){console.error("formId must be provided. Feedback module deactivated");return}const t=uo.createRoot(e.container||document);typeof window<"u"&&t.render(s.createElement(Un,{formId:e.formId}))},Wn=e=>e?e.formId?typeof window>"u"?null:s.createElement(Un,{formId:e.formId}):(console.error("formId must be provided. Feedback module deactivated"),null):(console.error("options must be provided. Feedback module deactivated"),null),Ma=e=>Wn(e),La=e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.variant,children:[s.createElement(zn,e)]}),Fa=e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.variant,children:[s.createElement(Bn,e)]}),Ra={Checkbox:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement(Pn,e.cmpProps)]}),QuestionMatrix:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement(Nn,e.cmpProps)]}),Radio:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement($n,e.cmpProps)]}),Rating:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement(Ln,e.cmpProps)]}),Select:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement($a,e.cmpProps)]}),Textarea:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement(Fn,e.cmpProps)]}),RangeSlide:e=>s.createElement(se,{theme:e.formTheme,selectedVariant:e.formVariant,children:[s.createElement(Dn,e.cmpProps)]})};return pe.FeedbackModule=Ma,pe.PreviewInPlaceForm=La,pe.PreviewPopupForm=Fa,pe.SurveyFormComponents=Ra,pe.initiateFeedbackModule=Da,pe.renderFeedbackModule=Wn,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"}),pe})({},React,require$$0);
3868
+ `;
3869
+ const PopupForm = (props) => {
3870
+ const [isVisible, setIsVisible] = React2.useState(false);
3871
+ const [maxHeight, setMaxHeight] = React2.useState(null);
3872
+ const formClientRandomId = React2.useMemo(
3873
+ () => Math.random().toString(36).substring(2, 10),
3874
+ []
3875
+ );
3876
+ const onSetMaxHeight = React2.useCallback((h) => {
3877
+ setMaxHeight((stateHeight) => {
3878
+ if (!stateHeight || stateHeight < h) return h;
3879
+ return stateHeight;
3880
+ });
3881
+ }, [setMaxHeight]);
3882
+ const populatedForm = useForm({
3883
+ form: props.popupForm.form,
3884
+ formId: props.formId,
3885
+ domainId: props.domainId
3886
+ });
3887
+ const stepper = useStepper({
3888
+ domainId: props.domainId,
3889
+ formType: "inlineForm",
3890
+ stepsCount: populatedForm.steps.length,
3891
+ validationsPerStep: populatedForm.validationsPerStep,
3892
+ formId: props.formId,
3893
+ state: populatedForm.state
3894
+ });
3895
+ return React2.createElement(React2.Fragment, {
3896
+ children: [
3897
+ React2.createElement(ShowPopupButton, {
3898
+ children: props.popupForm.config.buttonText,
3899
+ onClick: () => setIsVisible(true),
3900
+ $left: props.popupForm.styles.left ?? null,
3901
+ $right: props.popupForm.styles.right ?? null,
3902
+ $top: props.popupForm.styles.top ?? null,
3903
+ $bottom: props.popupForm.styles.bottom ?? null
3904
+ }),
3905
+ React2.createElement(Modal, {
3906
+ onClose: () => setIsVisible(false),
3907
+ heading: props.popupForm.config.formTitle,
3908
+ isOpen: isVisible,
3909
+ footer: React2.createElement(Footer, {
3910
+ children: [
3911
+ React2.createElement(Button, {
3912
+ children: "Back",
3913
+ disabled: stepper.step === 0,
3914
+ onClick: stepper.onBack
3915
+ }),
3916
+ React2.createElement(StepsProgress, {
3917
+ steps: populatedForm.steps,
3918
+ currentStepIndex: stepper.step
3919
+ }),
3920
+ React2.createElement(Button, {
3921
+ children: "Continue",
3922
+ onClick: stepper.onContinue
3923
+ })
3924
+ ]
3925
+ }),
3926
+ children: populatedForm.steps.map(
3927
+ (step, index) => {
3928
+ var _a;
3929
+ return React2.createElement(Step, {
3930
+ key: index + `${(_a = step.meta) == null ? void 0 : _a.name}`,
3931
+ height: maxHeight,
3932
+ onSetMaxHeight,
3933
+ isVisible: index === stepper.step,
3934
+ children: step.fields.map(
3935
+ (field) => React2.createElement(Field, {
3936
+ type: field.type,
3937
+ fieldProps: field,
3938
+ formClientId: formClientRandomId,
3939
+ dataField: field.dataField,
3940
+ onContinue: stepper.onContinue,
3941
+ errors: stepper.errors.filter((e) => e.field === field.dataField),
3942
+ getStateByKey: populatedForm.getStateByKey,
3943
+ setStateByKey: populatedForm.setStateByKey
3944
+ })
3945
+ )
3946
+ });
3947
+ }
3948
+ )
3949
+ })
3950
+ // populatedForm.steps.map((step, index) =>
3951
+ // React.createElement(Step, {
3952
+ // key: index + `${step.meta?.name}`,
3953
+ // isVisible: index === stepper.step,
3954
+ // children: [
3955
+ // // step.fields.map((field) =>
3956
+ // // React.createElement(Field, {
3957
+ // // type: field.type,
3958
+ // // dataField: field.dataField,
3959
+ // // onContinue: stepper.onContinue,
3960
+ // // errors: stepper.errors.filter((e) => e.field === field.dataField),
3961
+ // // getStateByKey: populatedForm.getStateByKey,
3962
+ // // setStateByKey: populatedForm.setStateByKey,
3963
+ // // })
3964
+ // // )
3965
+ // ],
3966
+ // })
3967
+ // ),
3968
+ ]
3969
+ });
3970
+ };
3971
+ const App = (props) => {
3972
+ props.locale ?? "en-US";
3973
+ let { data, loading, error } = useRequest(
3974
+ () => getFormConfigMock({
3975
+ formId: props.formId
3976
+ })
3977
+ );
3978
+ const inPlaceForm = React2.useMemo(() => {
3979
+ if (!(data == null ? void 0 : data.inlineForm)) return null;
3980
+ return React2.createElement(InPlaceForm, {
3981
+ key: `inline-form-${props.formId}`,
3982
+ formId: props.formId,
3983
+ domainId: data.domainId,
3984
+ formTheme: data.attributes.theme,
3985
+ inlineForm: data.inlineForm
3986
+ });
3987
+ }, [data == null ? void 0 : data.attributes.theme, data == null ? void 0 : data.domainId, data == null ? void 0 : data.inlineForm, props.formId]);
3988
+ const popupForm = React2.useMemo(() => {
3989
+ if (!(data == null ? void 0 : data.popupForm)) return null;
3990
+ return React2.createElement(PopupForm, {
3991
+ key: `popup-form-${props.formId}`,
3992
+ formId: props.formId,
3993
+ domainId: data.domainId,
3994
+ formTheme: data.attributes.theme,
3995
+ popupForm: data.popupForm
3996
+ });
3997
+ }, [data == null ? void 0 : data.attributes.theme, data == null ? void 0 : data.domainId, data == null ? void 0 : data.inlineForm, props.formId]);
3998
+ if (!data && loading) return "Loading...";
3999
+ if (!data || error) return error ? error.message : "Unknown error";
4000
+ return React2.createElement(ThemeProvider, {
4001
+ theme: data.attributes.theme,
4002
+ selectedVariant: data.attributes.variant,
4003
+ children: [inPlaceForm, popupForm]
4004
+ });
4005
+ };
4006
+ const StyledOption = dt.option(() => {
4007
+ return {
4008
+ borderRadius: "var(--radius-field)",
4009
+ whiteSpace: "normal",
4010
+ paddingBlock: ".375rem",
4011
+ paddingInline: ".75rem",
4012
+ transitionProperty: "color,background-color",
4013
+ transitionDuration: ".2s",
4014
+ transitionTimingFunction: "cubic-bezier(0,0,.2,1)"
4015
+ };
4016
+ });
4017
+ const SelectStyled = dt.select((props) => {
4018
+ const color = useDefaultVariantColor(props.colorVariant);
4019
+ return {
4020
+ border: `var(--border-width)solid ${color}`,
4021
+ backgroundColor: "var(--color-base-100)",
4022
+ verticalAlign: "middle",
4023
+ width: "clamp(3rem,30rem,100%)",
4024
+ height: "calc(var(--size-field,.25rem)*10)",
4025
+ touchAction: "manipulation",
4026
+ whiteSpace: "nowrap",
4027
+ textOverflow: "ellipsis",
4028
+ borderStartStartRadius: "var(--radius-field)",
4029
+ borderStartEndRadius: "var(--radius-field)",
4030
+ borderEndEndRadius: "var(--radius-field)",
4031
+ borderEndStartRadius: "var(--radius-field)",
4032
+ flexShrink: "1",
4033
+ alignItems: "center",
4034
+ gap: ".375rem",
4035
+ paddingInline: ".75rem 1.75rem",
4036
+ fontSize: ".875rem",
4037
+ display: "inline-flex",
4038
+ position: "relative",
4039
+ overflow: "hidden"
4040
+ };
4041
+ });
4042
+ const Select = (props) => {
4043
+ const onChange = (e) => props.onChange(e.target.value);
4044
+ return React2.createElement("div", {
4045
+ children: [
4046
+ React2.createElement(Typography, {
4047
+ children: props.label,
4048
+ variant: "section"
4049
+ }),
4050
+ React2.createElement(SelectStyled, {
4051
+ colorVariant: props.colorVariant,
4052
+ value: props.value ?? null,
4053
+ defaultChecked: false,
4054
+ defaultValue: null,
4055
+ onChange,
4056
+ children: [
4057
+ React2.createElement(StyledOption, {
4058
+ value: "",
4059
+ selected: !props.value,
4060
+ children: "Select an option",
4061
+ key: ""
4062
+ }),
4063
+ props.options.map(
4064
+ (o) => React2.createElement(StyledOption, {
4065
+ value: o.id,
4066
+ selected: o.id === props.value,
4067
+ children: o.label,
4068
+ key: o.id
4069
+ })
4070
+ )
4071
+ ]
4072
+ }),
4073
+ React2.createElement(ErrorMessage, {
4074
+ errors: props.errors
4075
+ })
4076
+ ]
4077
+ });
4078
+ };
4079
+ const initiateFeedbackModule = (options) => {
4080
+ if (!options) {
4081
+ console.error("options must be provided. Feedback module deactivated");
4082
+ return;
4083
+ }
4084
+ if (!options.formId) {
4085
+ console.error("formId must be provided. Feedback module deactivated");
4086
+ return;
4087
+ }
4088
+ const root = clientExports.createRoot(options.container || document);
4089
+ if (typeof window !== "undefined") {
4090
+ root.render(
4091
+ React2.createElement(App, {
4092
+ formId: options.formId
4093
+ })
4094
+ );
4095
+ }
4096
+ };
4097
+ const renderFeedbackModule = (options) => {
4098
+ if (!options) {
4099
+ console.error("options must be provided. Feedback module deactivated");
4100
+ return null;
4101
+ }
4102
+ if (!options.formId) {
4103
+ console.error("formId must be provided. Feedback module deactivated");
4104
+ return null;
4105
+ }
4106
+ if (typeof window === "undefined") return null;
4107
+ return React2.createElement(App, {
4108
+ formId: options.formId
4109
+ });
4110
+ };
4111
+ const FeedbackModule = (options) => {
4112
+ return renderFeedbackModule(options);
4113
+ };
4114
+ const PreviewInPlaceForm = (props) => {
4115
+ return React2.createElement(ThemeProvider, {
4116
+ theme: props.formTheme,
4117
+ selectedVariant: props.variant,
4118
+ children: [React2.createElement(InPlaceForm, props)]
4119
+ });
4120
+ };
4121
+ const PreviewPopupForm = (props) => {
4122
+ return React2.createElement(ThemeProvider, {
4123
+ theme: props.formTheme,
4124
+ selectedVariant: props.variant,
4125
+ children: [React2.createElement(PopupForm, props)]
4126
+ });
4127
+ };
4128
+ const SurveyFormComponents = {
4129
+ Checkbox: (props) => React2.createElement(ThemeProvider, {
4130
+ theme: props.formTheme,
4131
+ selectedVariant: props.formVariant,
4132
+ children: [React2.createElement(CheckboxGroup, props.cmpProps)]
4133
+ }),
4134
+ QuestionMatrix: (props) => React2.createElement(ThemeProvider, {
4135
+ theme: props.formTheme,
4136
+ selectedVariant: props.formVariant,
4137
+ children: [React2.createElement(QuestionMatrix, props.cmpProps)]
4138
+ }),
4139
+ Radio: (props) => React2.createElement(ThemeProvider, {
4140
+ theme: props.formTheme,
4141
+ selectedVariant: props.formVariant,
4142
+ children: [React2.createElement(RadioGroup, props.cmpProps)]
4143
+ }),
4144
+ Rating: (props) => React2.createElement(ThemeProvider, {
4145
+ theme: props.formTheme,
4146
+ selectedVariant: props.formVariant,
4147
+ children: [React2.createElement(Rating, props.cmpProps)]
4148
+ }),
4149
+ Select: (props) => React2.createElement(ThemeProvider, {
4150
+ theme: props.formTheme,
4151
+ selectedVariant: props.formVariant,
4152
+ children: [React2.createElement(Select, props.cmpProps)]
4153
+ }),
4154
+ Textarea: (props) => React2.createElement(ThemeProvider, {
4155
+ theme: props.formTheme,
4156
+ selectedVariant: props.formVariant,
4157
+ children: [React2.createElement(Textarea, props.cmpProps)]
4158
+ }),
4159
+ RangeSlide: (props) => React2.createElement(ThemeProvider, {
4160
+ theme: props.formTheme,
4161
+ selectedVariant: props.formVariant,
4162
+ children: [React2.createElement(RangeSlide, props.cmpProps)]
4163
+ })
4164
+ };
4165
+ exports.FeedbackModule = FeedbackModule;
4166
+ exports.PreviewInPlaceForm = PreviewInPlaceForm;
4167
+ exports.PreviewPopupForm = PreviewPopupForm;
4168
+ exports.SurveyFormComponents = SurveyFormComponents;
4169
+ exports.initiateFeedbackModule = initiateFeedbackModule;
4170
+ exports.renderFeedbackModule = renderFeedbackModule;
4171
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4172
+ return exports;
4173
+ })({}, React, require$$0);