You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
489 lines
188 KiB
JavaScript
489 lines
188 KiB
JavaScript
1 year ago
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3959],{81822:function(e,t,n){e=n.nmd(e);var r=n(83454),a={679:(e,t,n)=>{var r=n(296),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||a}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=m(n);a&&a!==p&&e(t,a,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var c=l(t),h=l(n),b=0;b<i.length;++b){var v=i[b];if(!(o[v]||r&&r[v]||h&&h[v]||c&&c[v])){var g=d(n,v);try{s(t,v,g)}catch(e){}}}}return t}},103:(e,t)=>{var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,b=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case o:case c:case i:case m:return e;default:switch(e=e&&e.$$typeof){case s:case d:case b:case h:case l:return e;default:return t}}case a:return t}}}function x(e){return k(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=b,t.Memo=h,t.Portal=a,t.Profiler=c,t.StrictMode=i,t.Suspense=m,t.isAsyncMode=function(e){return x(e)||k(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===s},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===b},t.isMemo=function(e){return k(e)===h},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===c},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===c||e===i||e===m||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===y||e.$$typeof===w||e.$$typeof===v)},t.typeOf=k},296:(e,t,n)=>{e.exports=n(103)},703:(e,t,n)=>{var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:e=>{var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;function o(e,i){i
|
||
|
display: flex;
|
||
|
${({gap:e,gapY:t})=>{const n=b(e,t,"x","desktop"),r=b(e,t,"y","desktop"),a=b(e,t,"x","tablet"),o=b(e,t,"y","tablet"),i=b(e,t,"x","mobile"),c=b(e,t,"y","mobile");return d.css`
|
||
|
margin: ${-1*r}rem 0 0 ${-1*n}rem;
|
||
|
|
||
|
@media screen and ${u.tablet} {
|
||
|
margin: ${-1*o}rem 0 0 ${-1*a}rem;
|
||
|
}
|
||
|
|
||
|
@media screen and ${u.mobileL} {
|
||
|
margin: ${-1*c}rem 0 0 ${-1*i}rem;
|
||
|
}
|
||
|
`}}
|
||
|
|
||
|
${({justify:e,align:t,wrap:n,flexDirection:r})=>d.css`
|
||
|
justify-content: ${h(e,"desktop","flex-start")};
|
||
|
align-items: ${h(t,"desktop","flex-start")};
|
||
|
flex-wrap: ${h(n,"desktop","wrap")};
|
||
|
flex-direction: ${h(r,"desktop","row")};
|
||
|
|
||
|
@media screen and ${u.tablet} {
|
||
|
justify-content: ${h(e,"tablet","flex-start")};
|
||
|
align-items: ${h(t,"tablet","flex-start")};
|
||
|
flex-wrap: ${h(n,"tablet","wrap")};
|
||
|
flex-direction: ${h(r,"tablet","row")};
|
||
|
}
|
||
|
|
||
|
@media screen and ${u.mobileL} {
|
||
|
justify-content: ${h(e,"mobile","flex-start")};
|
||
|
align-items: ${h(t,"mobile","flex-start")};
|
||
|
flex-wrap: ${h(n,"mobile","wrap")};
|
||
|
flex-direction: ${h(r,"mobile","column")};
|
||
|
}
|
||
|
`}
|
||
|
`,g=d.css`
|
||
|
width: auto;
|
||
|
flex-basis: auto;
|
||
|
`,y=p.div`
|
||
|
overflow: hidden;
|
||
|
white-space: pre-wrap;
|
||
|
word-break: break-word;
|
||
|
//flex: ${({desktop:e=12})=>e};
|
||
|
box-sizing: border-box;
|
||
|
${({desktop:e=12})=>"auto"===e?g:d.css`
|
||
|
width: 100%;
|
||
|
max-width: ${100/12*e}%;
|
||
|
flex-basis: ${100/12*e}%;
|
||
|
`}
|
||
|
|
||
|
${({tablet:e})=>e&&d.css`
|
||
|
@media screen and ${u.tablet} {
|
||
|
${"auto"===e?g:d.css`
|
||
|
max-width: ${100/12*e}%;
|
||
|
flex-basis: ${100/12*e}%;
|
||
|
`}
|
||
|
`}
|
||
|
|
||
|
${({mobile:e=12})=>d.css`
|
||
|
@media screen and ${u.mobileL} {
|
||
|
${"auto"===e?g:d.css`
|
||
|
max-width: ${100/12*e}%;
|
||
|
flex-basis: ${100/12*e}%;
|
||
|
`}
|
||
|
}
|
||
|
`}
|
||
|
|
||
|
${({gap:e,gapY:t})=>{const n=b(e,t,"x","desktop"),r=b(e,t,"y","desktop"),a=b(e,t,"x","tablet"),o=b(e,t,"y","tablet"),i=b(e,t,"x","mobile"),c=b(e,t,"y","mobile");return d.css`
|
||
|
padding: ${r}rem 0 0 ${n}rem;
|
||
|
|
||
|
@media screen and ${u.tablet} {
|
||
|
padding: ${o}rem 0 0 ${a}rem;
|
||
|
}
|
||
|
|
||
|
@media screen and ${u.mobileL} {
|
||
|
padding: ${c}rem 0 0 ${i}rem;
|
||
|
}
|
||
|
`}}
|
||
|
`,w={0:0,1:"0.4285rem",2:"0.8571428571rem",3:"1.1428571429rem",4:"1.4285714286rem",5:"1.7857142857rem",6:"2.1428571429rem",7:"2.8571428571rem",8:"3.5714285714rem",9:"4.2857142857rem",10:"5.7142857143rem",11:"7.1428571429rem",12:"8.5714285714rem"},k={l:"left",r:"right",t:"top",b:"bottom"},x=(e,t)=>n=>`${"m"===e?"margin":"padding"}${t&&k[t]?`-${k[t]}`:""}: ${w[n]};`,E=e=>Object.entries(e).reduce(((e,[t,n])=>{if(t.length>2)return e;const r=t[0],a=t[1];return"m"===r||"p"===r?"number"==typeof n?[...e,x(r,a)(n)]:[...e,(o=n,i=x(r,a),Object.entries(o).map((([e,t])=>`\n ${"desktop"===u[e]?i(t):`@media ${u[e]} { ${i(t)} }`}\n `)))]:e;var o,i}),[]),_=d.css`
|
||
|
${e=>E(e)}
|
||
|
`,j=(d.css`
|
||
|
${e=>E(e)}
|
||
|
`,d.css`
|
||
|
${e=>E(e)}
|
||
|
`);p.div`
|
||
|
width: 100%;
|
||
|
height: 0;
|
||
|
${j}
|
||
|
`;const O={xxs:{default:{lineHeight:"1.5rem",fontSize:"1.143rem"},tablet:{lineHeight:"1.5rem",fontSize:"1.143rem"},mobile:{lineHeight:"1.5rem",fontSize:"1.143rem"}},xs:{default:{lineHeight:"1.86rem",fontSize:"1.29rem"},tablet:{lineHeight:"1.571rem",fontSize:"1.1428rem"},mobile:{lineHeight:"1.571rem",fontSize:"1.1428rem"}},sm:{default:{lineHeight:"2.42rem",fontSize:"1.71rem"},tablet:{lineHeight:"1.75rem",fontSize:"1.25rem"},mobile:{lineHeight:"1.5rem",fontSize:"1.286rem"}},md:{default:{lineHeight:"3.14rem",fontSize:"2.28rem"},tablet:{lineHeight:"2.5rem",fontSize:"2rem"},mobile:{lineHeight:"1.75rem",fontSize:"1.57rem"}},lg:{default:{lineHeight:"3.42rem",fontSize:"2.57rem"},tablet:{lineHeight:"2.25rem",fontSize:"1.75rem"},mobile:{lineHeight:"2.14rem",fontSize:"1.57rem"}},xl:{default:{lineHeight:"4rem",fontSize:"3.42rem"},tablet:{lineHeight:"3rem",fontSize:"2.75rem"},mobile:{lineHeight:"2.5rem",fontSize:"2rem"}},xxl:{default:{lineHeight:"5.14rem",fontSize:"4.28rem"},tablet:{lineHeight:"4rem",fontSize:"3.75rem"},mobile:{lineHeight:"3.5rem",fontSize:"2.57142rem"}}},C=p.h2`
|
||
|
font-size: ${({size:e="md"})=>O[e].default.fontSize};
|
||
|
line-height: ${({size:e="md"})=>O[e].default.lineHeight};
|
||
|
text-align: ${({position:e})=>"string"==typeof e?e:e.desktop};
|
||
|
color: ${({theme:e,color:t})=>e.colors?.[t]??"inherit"};
|
||
|
|
||
|
@media ${u.tablet} {
|
||
|
font-size: ${({size:e="md"})=>O[e].tablet.fontSize};
|
||
|
line-height: ${({size:e="md"})=>O[e].tablet.lineHeight};
|
||
|
${({position:e})=>"string"!=typeof e&&`text-align: ${e.tablet};`}
|
||
|
}
|
||
|
|
||
|
@media ${u.mobileL} {
|
||
|
font-size: ${({size:e="md"})=>O[e].mobile.fontSize};
|
||
|
line-height: ${({size:e="md"})=>O[e].mobile.lineHeight};
|
||
|
}
|
||
|
|
||
|
${j}
|
||
|
`;C.defaultProps={size:"md",position:"left"};const z={colors:{white:"#ffffff",brand:"#fa6831",brandDark:"#e05d2d",yellow:"#F2BA0E",yellow400:"#F2BA0E",yellow500:"#9c8408",gray100:"#F5F5F5",gray200:"#E0E0E0",gray300:"#B3B3B3",gray400:"#8C8C8C",gray500:"#808080",gray700:"#5C5C5C",gray800:"#2A2A2A",blue400:"#40C8E8",blue500:"#26B4D5",green400:"#65C900",green500:"#5DAF0B",red300:"#E05D2D",red400:"#E84040",red500:"#CB2C2C",red700:"#FF0000",black:"#000000"},zIndex:{modal:40,list:41,tooltip:44,loader:100},text:{baseSize:14,fontWeight:{normal:"normal",bold:"bold",900:900},size:{xs:"0.7857142857rem",sm:"1rem",md:"1.1428571429rem",lg:"1.2857142857rem",xl:"1.7142857143rem"},lineHeight:{xs:"1.0714285714rem",sm:"1.125rem",md:"1.4285714286rem",lg:"1.8571428571rem",xl:"2.4285714286"}}},S=()=>"undefined"!=typeof window;var A={shop:"SHOP",help:"HELP",pp:"PRUSAPRINTERS",blog:"BLOG",forum:"FORUM",external:"",academy:""};const $={BACKEND:{url:"https://backend.prusa3d.com",apiUrl:"https://cache.prusa3d.com/be/api/v1"},BLOG:{url:"https://blog.prusa3d.com",apiUrl:"https://cache.prusa3d.com/blog/wp-json/wp/v2",imageGetter:function(e){var t,n,r,a,o,i;return((null===(i=null===(o=null===(a=null===(r=null===(n=null===(t=null==e?void 0:e._embedded)||void 0===t?void 0:t["wp:featuredmedia"])||void 0===n?void 0:n[0])||void 0===r?void 0:r.media_details)||void 0===a?void 0:a.sizes)||void 0===o?void 0:o["inline-image"])||void 0===i?void 0:i.source_url)||"").replace("https://blog","https://cdn.blog")}},PRUSAPRINTERS:{url:"https://www.printables.com",apiUrl:"https://cache.prusa3d.com/pp/graphql/"},FORUM:{url:"https://forum.prusa3d.com",apiUrl:"https://cache.prusa3d.com/forum/wp-json/wp/v2",apiUrlBase:"https://cache.prusa3d.com/forum"},HELP:{url:"https://help.prusa3d.com",apiUrl:"https://cache.prusa3d.com/help/api/v1"},PRINTABLES:{url:"https://www.printables.com",apiUrl:"https://cache.prusa3d.com/pp/graphql/",imagePrefix:"https://media.printables.com/",imageGetter:function(e,t){return void 0===t&&(t="images"),e[t]?"https://media.printables.com/".concat(e[t]):""},imageThumbnailGetter:function(e){var t=e.lastIndexOf("/"),n=e.substr(t).lastIndexOf("."),r=e.substr(t).substr(n+1);return"https://media.printables.com/".concat(e.substr(0,t),"/thumbs/cover/640x480/").concat(r).concat(e.substr(t,n),".webp")},queries:{featured:"\n query PrintList {\n prints(limit: 10, featuredNow: true) {\n id\n slug\n name\n images { filePath }\n stls { name, filePath }\n }\n }\n "}},SHOP:{url:"https://www.prusa3d.com",apiUrl:"https://cache.prusa3d.com/shop/graphql/",links:{policy:{en:"privacy-policy_231258",es:"politica-de-privacidad_231258",it:"politica-sulla-privacy_231258",de:"datenschutzerklarung_231258",fr:"politique-de-confidentialite_231258",pl:"polityka-prywatnosci_231258",cs:"zasady-ochrany-soukromi_231258"},newsletter:{en:"consent-to-receive-newsletters_233592",es:"consentimiento-para-recibir-newsletters_233592",it:"consenso-a-ricevere-newsletter_233592",de:"zustimmung-zum-erhalt-von-newslettern_233592",fr:"consentement-a-recevoir-des-newsletters_233592",pl:"zgoda-na-otrzymywanie-newsletterow_233592",cs:"souhlas-se-zasilanim-newsletteru_233592"}},friendlyUrls:{product:{en:"product",cs:"produkt",de:"produkt",fr:"produit",it:"prodotto",pl:"produkt",es:"producto"},category:{en:"category",cs:"kategorie",de:"kategorie",fr:"categorie",it:"categoria",pl:"kategoria",es:"categoria"},page:{en:"page",cs:"stranka",de:"page",fr:"page",it:"pagina",pl:"strona",es:"pagina"},jobs:{en:"careers",cs:"volna-mista",de:"careers",fr:"careers",it:"careers",pl:"careers",es:"careers"}}}};var P=function(e,t){var n=(0,a.useState)("idle"),r=n[0],o=n[1],i=(0,a.useState)(null),c=i[0],l=i[1],s=(0,a.useState)(null),u=s[0],f=s[1],d=(0,a.useState)(null),m=d[0],p=d[1];return(0,a.useEffect)((function(){null!==e&&function(e,t,n,r){new(n||(n=Promise))((function(e,t){function a(e){try{i(r.next(e))}catch(e){t(e)}}function o(e){try{i(r.throw(e))}catch(e){t(e)}}function i(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r
|
||
|
${({display:e})=>"block"===e?"\n display: block;\n width: 100%;\n ":"display: inline-block;"}
|
||
|
|
||
|
${_}
|
||
|
`,ee=({width:e="100%",height:t=50,children:n,display:r="block",...o})=>a.createElement(Q,{width:e,height:t,display:r,...o},n??a.createElement("rect",{x:"0",y:"0",rx:"0",ry:"0",width:e,height:t}));var te=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ne=m().ul(se||(se=te(["\n padding: 0;\n margin: 0;\n"],["\n padding: 0;\n margin: 0;\n"]))),re=m().li(fe||(fe=te(["\n list-style: none;\n padding: 0;\n ","\n a {\n color: white;\n text-decoration: none;\n }\n a:hover {\n text-decoration: underline;\n }\n"],["\n list-style: none;\n padding: 0;\n ","\n a {\n color: white;\n text-decoration: none;\n }\n a:hover {\n text-decoration: underline;\n }\n"])),(function(e){var t=e.horizontal,n=e.slim;return t&&(0,d.css)(ue||(ue=te(["\n display: inline-block;\n ","\n "],["\n display: inline-block;\n ","\n "])),n?"\n &:not(:first-child):before {\n content: '\\00a0|\\00a0';\n opacity: 0.5;\n color: white;\n }\n ":"margin-right: 3.75em;\n @media screen and ".concat(f.device.laptop," {\n margin-right: 2em;\n }"))})),ae=m().strong(de||(de=te(["\n font-size: 1em;\n margin: 0 0 1em;\n display: inline-block;\n"],["\n font-size: 1em;\n margin: 0 0 1em;\n display: inline-block;\n"]))),oe=function(){return o().createElement(ee,{height:80,backgroundColor:z.colors.gray200,backgroundOpacity:.4,foregroundColor:z.colors.gray200},o().createElement("rect",{x:"0",y:"5",rx:"3",ry:"3",width:M(80,110),height:"12"}),o().createElement("rect",{x:"0",y:"35",rx:"3",ry:"3",width:M(80,110),height:"12"}),o().createElement("rect",{x:"0",y:"65",rx:"3",ry:"3",width:M(80,110),height:"12"}))},ie=function(){return o().createElement(ee,{backgroundColor:z.colors.gray200,backgroundOpacity:.4,foregroundColor:z.colors.gray200},o().createElement("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"80",height:"12"}),o().createElement("rect",{x:"100",y:"0",rx:"3",ry:"3",width:"80",height:"12"}),o().createElement("rect",{x:"200",y:"0",rx:"3",ry:"3",width:"80",height:"12"}))};function ce(e,t,n,r){var a,o,i,c,l,s,u,f,d,m,p,h,b,v,g,y,w=t;return(null===(a=e.fields)||void 0===a?void 0:a.website)&&!w&&!(null===(o=e.fields)||void 0===o?void 0:o.link.startsWith("http"))&&r&&(w="".concat(null===(c=$[A[null===(i=e.fields)||void 0===i?void 0:i.website]])||void 0===c?void 0:c.url)||""),(null===(l=e.fields)||void 0===l?void 0:l.link)?r&&(null===(u=null===(s=e.fields)||void 0===s?void 0:s.link)||void 0===u?void 0:u.startsWith("http"))?null===(f=e.fields)||void 0===f?void 0:f.link:"en"===n||(null===(m=null===(d=e.fields)||void 0===d?void 0:d.link)||void 0===m?void 0:m.startsWith("/".concat(n,"/")))?"".concat(w).concat(null===(h=e.fields)||void 0===h?void 0:h.link):"".concat(w,"/").concat(n).concat(null===(p=e.fields)||void 0===p?void 0:p.link):(null===(b=e.fields)||void 0===b?void 0:b.page)?"".concat(w,"/").concat(n,"/").concat($.SHOP.friendlyUrls.page[n],"/").concat(null===(g=null===(v=e.fields)||void 0===v?void 0:v.page)||void 0===g?void 0:g.replace("".concat($.BACKEND.url,"/en/"),"")):"".concat(t,"/").concat(n,"/").concat(null===(y=$.SHOP.friendlyUrls[e.type])||void 0===y?void 0:y[n],"/").concat(e.slug)}const le=function(e){var t=e.items,n=e.titleKey,r=e.title,a=e.horizontal,i=void 0!==a&&a,c=e.slim,l=void 0!==c&&c,s=e.className,u=e.children,f=N(),d=f.locale,m=f.formatMessage,p=xs().website;return o().createElement(o().Fragment,null,o().createElement("nav",{"aria-label":n&&m({id:n}),className:s},n&&o().createElement(ae,null,m({id:n})),t&&t.length>0?o().createElement(ne,null,r&&o().createElement(re,{horizontal:i,slim:l},r),null==t?void 0:t.map((function(e){var t,n=!(null===(t=e.fields)||void 0===t?void 0:t.website)||e.fields.website!==p,r=ce(e,"",d,n);return o().createElement(re,{key:e.id,horizontal:i,slim:l},o().createElement("a",{href:r},e.title))})),u):i?o().createElement(ie,null):o().createElement(oe,null)))};var se,ue,fe,de,me=i(590),pe=i.n(me),he=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!funct
|
||
|
//margin-top: 3px; // the margin-top is needed on Linux due to different font rendering across platforms, how to achieve this?
|
||
|
vertical-align: top;
|
||
|
display: inline-block;
|
||
|
line-height: 1.4rem;
|
||
|
|
||
|
@media ${u.mobileL} {
|
||
|
font-size: 0.857rem;
|
||
|
}
|
||
|
`,br=p.span`
|
||
|
border: 1px solid #d0d0d0;
|
||
|
border-radius: 2px;
|
||
|
width: 22px;
|
||
|
height: 22px;
|
||
|
flex: 0 0 auto;
|
||
|
display: inline-block;
|
||
|
background-color: ${({theme:e,disabled:t})=>t?e.colors.gray100:e.colors.white};
|
||
|
position: relative;
|
||
|
margin-right: 1rem;
|
||
|
svg {
|
||
|
display: none;
|
||
|
position: absolute;
|
||
|
color: ${({theme:e})=>e.colors.gray800};
|
||
|
margin: auto;
|
||
|
top: 0;
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
right: 0;
|
||
|
overflow: visible;
|
||
|
box-sizing: content-box;
|
||
|
vertical-align: -0.2em;
|
||
|
font-size: 1.25em;
|
||
|
line-height: 0.05em;
|
||
|
height: 1em;
|
||
|
}
|
||
|
`,vr=p.label`
|
||
|
display: flex;
|
||
|
justify-content: flex-start;
|
||
|
align-items: center;
|
||
|
vertical-align: middle;
|
||
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
||
|
font-size: 1rem;
|
||
|
color: ${({theme:e,disabled:t})=>t?e.colors.gray500:"inherit"};
|
||
|
& > input {
|
||
|
display: none;
|
||
|
& ~ ${br} {
|
||
|
transition: border-color 300ms;
|
||
|
}
|
||
|
|
||
|
&:hover ~ ${br} {
|
||
|
border-color: ${({theme:e,disabled:t})=>t?"#d0d0d0":e.colors.brand};
|
||
|
}
|
||
|
&:checked ~ ${br} {
|
||
|
border-color: ${({theme:e})=>e.colors.brand};
|
||
|
svg {
|
||
|
color: ${({theme:e})=>e.colors.brand};
|
||
|
display: block;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
&:focus-within ${br} {
|
||
|
border-width: 2px;
|
||
|
border-color: ${({theme:e})=>e.colors.brand} !important;
|
||
|
}
|
||
|
`,gr=({label:e,name:t,value:n,onChange:r,checked:o,useScrollToError:i,inputRef:c,...l})=>{const{disabled:s=!1}=l;return a.createElement(vr,{...l},i&&a.createElement(pr,{inputRef:c,name:t}),a.createElement("input",{type:"checkbox",name:t,value:n,onChange:r,checked:o,disabled:s}),a.createElement(br,{disabled:s},a.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"check",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},a.createElement("path",{fill:"currentColor",d:"M440.1 103C450.3 112.4 450.3 127.6 440.1 136.1L176.1 400.1C167.6 410.3 152.4 410.3 143 400.1L7.029 264.1C-2.343 255.6-2.343 240.4 7.029 231C16.4 221.7 31.6 221.7 40.97 231L160 350.1L407 103C416.4 93.66 431.6 93.66 440.1 103V103z"}))),a.createElement(hr,null,e))};var yr={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM371.8 211.8C382.7 200.9 382.7 183.1 371.8 172.2C360.9 161.3 343.1 161.3 332.2 172.2L224 280.4L179.8 236.2C168.9 225.3 151.1 225.3 140.2 236.2C129.3 247.1 129.3 264.9 140.2 275.8L204.2 339.8C215.1 350.7 232.9 350.7 243.8 339.8L371.8 211.8z"]},wr={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z"]},kr={prefix:"fas",iconName:"lock-keyhole",icon:[448,512,["lock-alt"],"f30d","M224 0C303.5 0 368 64.47 368 144V192H384C419.3 192 448 220.7 448 256V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V256C0 220.7 28.65 192 64 192H80V144C80 64.47 144.5 0 224 0zM224 64C179.8 64 144 99.82 144 144V192H304V144C304 99.82 268.2 64 224 64zM256 320C256 302.3 241.7 288 224 288C206.3 288 192 302.3 192 320V384C192 401.7 206.3 416 224 416C241.7 416 256 401.7 256 384V320z"]};const xr=d.keyframes`
|
||
|
from {
|
||
|
transform: rotate(0deg);
|
||
|
}
|
||
|
|
||
|
to {
|
||
|
transform: rotate(360deg);
|
||
|
}
|
||
|
`,Er=d.css`
|
||
|
position: absolute;
|
||
|
width: 1px;
|
||
|
height: 1px;
|
||
|
padding: 0;
|
||
|
margin: -1px;
|
||
|
overflow: hidden;
|
||
|
clip: rect(0, 0, 0, 0);
|
||
|
white-space: nowrap;
|
||
|
border: 0;
|
||
|
`,_r=p.span`
|
||
|
${Er}
|
||
|
`,jr={left:"start",center:"center",right:"end"},Or=p.span`
|
||
|
display: inline-flex;
|
||
|
position: relative;
|
||
|
justify-content: ${({position:e})=>jr[e??"center"]};
|
||
|
vertical-align: middle;
|
||
|
|
||
|
${_}
|
||
|
`,Cr=p.span`
|
||
|
width: ${({size:e=100})=>e/14+"rem"};
|
||
|
height: ${({size:e=100})=>e/14+"rem"};
|
||
|
content: '';
|
||
|
border-radius: 50%;
|
||
|
border: ${({size:e,color:t,theme:n})=>`${(e=>e/19<2?2:Math.round(e/19))(e??100)}px solid ${t??n.colors.red300}80`};
|
||
|
border-left-color: ${({color:e,theme:t})=>e??t.colors.red300};
|
||
|
transform: translateZ(0);
|
||
|
animation: ${xr} 1s infinite running linear;
|
||
|
`,zr=({label:e="loading",size:t=50,position:n,color:r,className:o,...i})=>a.createElement(Or,{...i,position:n},a.createElement(Cr,{size:t,color:r,className:o,role:"status"}),a.createElement(_r,null,e)),Sr=p.div`
|
||
|
color: ${({theme:e})=>e.colors.red400}; //#cb2c2c;
|
||
|
font-size: 1rem;
|
||
|
text-align: left;
|
||
|
padding-top: 0.4rem;
|
||
|
`;var Ar=p.label`
|
||
|
box-shadow: 0 0 0 1px ${({theme:e,valid:t})=>t?e.colors.gray300:e.colors.red400};
|
||
|
border-radius: 3px;
|
||
|
position: relative;
|
||
|
// Bottom padding is smaller because input text have line-height more than real line height
|
||
|
padding: 0.1rem 0.7rem 0.7rem;
|
||
|
display: block;
|
||
|
letter-spacing: -0.07px;
|
||
|
background-color: ${({theme:e,disabled:t})=>t?e.colors.gray100:e.colors.white};
|
||
|
color: ${({theme:e,valid:t})=>t?e.colors.gray500:e.colors.red400};
|
||
|
font-size: 1rem;
|
||
|
margin: 1px;
|
||
|
transition: box-shadow 300ms;
|
||
|
|
||
|
input,
|
||
|
textarea {
|
||
|
font-family: 'Atlas Grotesk', sans-serif;
|
||
|
margin: -5px 0;
|
||
|
caret-color: ${({theme:e})=>e.colors.brand};
|
||
|
appearance: inherit !important;
|
||
|
border: none;
|
||
|
display: block;
|
||
|
font-weight: bold;
|
||
|
font-size: 1.14rem;
|
||
|
line-height: 1.8571;
|
||
|
|
||
|
@media ${u.mobileL} {
|
||
|
font-size: 1rem;
|
||
|
}
|
||
|
|
||
|
padding: 0.3rem 0 0; // zeroes because of stupid default browser values
|
||
|
width: 100%;
|
||
|
background: transparent;
|
||
|
color: ${({theme:e})=>e.colors.gray800};
|
||
|
resize: none; // Disable resize of textarea
|
||
|
|
||
|
&:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
}
|
||
|
${({theme:e,valid:t,disabled:n})=>!n&&`\n &:hover {\n box-shadow: 0 0 0 1px ${e.colors.brand};\n }\n\n &:focus-within {\n box-shadow: 0 0 0 2px ${t?e.colors.brand:e.colors.red400};\n }\n `}
|
||
|
|
||
|
${Or} {
|
||
|
position: absolute;
|
||
|
right: 0.7142rem;
|
||
|
top: 0;
|
||
|
bottom: 0;
|
||
|
margin: auto;
|
||
|
}
|
||
|
`;const $r=({value:e,inputRef:t,...n})=>a.createElement("textarea",{...n,ref:t,onChangeCapture:()=>{if(t?.current){t.current.style.height="60px";const e=t.current.scrollHeight;t.current.style.height=e+"px"}},value:e});function Pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(n),!0).forEach((function(t){Lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw a}}return o}}(e,t)||Ir(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(e){return function(e){if(Array.isArray(e))return Fr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ir(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(e,t){if(e){if("string"==typeof e)return Fr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fr(e,t):void 0}}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hr=function(){},Vr={},Dr={},Br=null,Ur={mark:Hr,measure:Hr};try{"undefined"!=typeof window&&(Vr=window),"undefined"!=typeof document&&(Dr=document),"undefined"!=typeof MutationObserver&&(Br=MutationObserver),"undefined"!=typeof performance&&(Ur=performance)}catch(a){}var Wr=(Vr.navigator||{}).userAgent,qr=void 0===Wr?"":Wr,Yr=Vr,Zr=Dr,Gr=Br,Xr=Ur,Kr=(Yr.document,!!Zr.documentElement&&!!Zr.head&&"function"==typeof Zr.addEventListener&&"function"==typeof Zr.createElement),Jr=~qr.indexOf("MSIE")||~qr.indexOf("Trident/"),Qr="svg-inline--fa",ea="data-fa-i2svg",ta="data-fa-pseudo-element",na="data-prefix",ra="data-icon",aa="fontawesome-i2svg",oa=["HTML","HEAD","STYLE","SCRIPT"],ia=function(){try{return!0}catch(a){return!1}}(),ca={fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit",fa:"solid"},la={solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"},sa={fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},ua={"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},fa=/fa[srltdbk]?[\-\ ]/,da="fa-layers-text",ma=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i,pa={900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},ha=[1,2,3,4,5,6,7,8,9,10],ba=ha.concat([11,12,13,14,15,16,17,18,19,20]),va=["class","data-prefix","data-icon","data-fa-
|
||
|
margin-left: 0.25em;
|
||
|
color: ${({theme:e})=>e.colors.gray300};
|
||
|
`,Yi=p(qi)`
|
||
|
color: ${e=>e.$isValid?e.theme.colors.green400:e.theme.colors.red400} !important;
|
||
|
`,Zi=({valid:e})=>a.createElement(Yi,{icon:e?yr:wr,$isValid:e}),Gi=({value:e,touched:t,error:n,label:r,disabled:o=!1,className:i,isTextarea:c=!1,type:l="text",style:s,rewriteValue:u,loading:f=!1,description:d,useScrollToError:m,...p})=>{const h=(0,a.useRef)(null),b=!n||!t;return"hidden"==l?a.createElement("input",{...p,type:l,value:u||e}):a.createElement("div",{className:i,style:s,onClick:p.onClick},m&&a.createElement(pr,{inputRef:h,name:p.name}),a.createElement(Ar,{valid:b,disabled:o},r,o&&a.createElement(qi,{icon:kr}),!o&&t&&a.createElement(Zi,{valid:b}),c?a.createElement($r,{...p,value:e,inputRef:h}):a.createElement("input",{...p,type:l,disabled:o,value:u||e,ref:h}),f&&a.createElement(zr,{size:30,color:"brandDark"})),t&&n&&a.createElement(Sr,null,n),d&&a.createElement("small",{dangerouslySetInnerHTML:{__html:d}}))},Xi=d.css`
|
||
|
font-size: ${({theme:e,size:t})=>e.text.size[t??"sm"]};
|
||
|
line-height: ${({theme:e,lineHeight:t,size:n})=>e.text.lineHeight[t??n??"sm"]};
|
||
|
font-weight: ${({theme:e,fontWeight:t})=>e.text.fontWeight[t??"normal"]};
|
||
|
`,Ki={brand:"brand",light:"white",dark:"gray800",danger:"red400",black:"black"},Ji={xs:{default:"font-size: 1rem; line-height: 1.2857; padding: 0.0714rem 0.5714rem 0.2857rem;"},sm:{default:"font-size: 1rem; line-height: 1.2857; padding: 0.2857rem 0.6428rem 0.5rem;"},md:{default:"font-size: 1.1428rem; line-height: 1.3125; font-weight: bold; padding: 0.5rem 1.2857rem 0.7143rem;"},lg:{default:"font-size: 1.1428rem; line-height: 1.3125; font-weight: bold; padding: 1rem 1.7857rem 1.2143rem;"}},Qi=d.css`
|
||
|
display: ${({display:e})=>"block"===e?"block":"inline-block"};
|
||
|
appearance: none;
|
||
|
outline: none;
|
||
|
cursor: pointer;
|
||
|
border-radius: 2px;
|
||
|
font-family: 'Atlas Grotesk', sans-serif;
|
||
|
border: 1px solid;
|
||
|
text-align: center;
|
||
|
transition: background-color 300ms;
|
||
|
font-weight: ${({size:e,theme:t})=>"lg"===e?t.text.fontWeight.bold:t.text.fontWeight.normal};
|
||
|
${({size:e})=>e?Ji[e]?.default:Ji.md.default}
|
||
|
text-decoration: none;
|
||
|
|
||
|
&:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
|
||
|
${Or} {
|
||
|
position: relative;
|
||
|
margin-top: -4px;
|
||
|
}
|
||
|
|
||
|
${_}
|
||
|
`,ec=d.css`
|
||
|
${Qi}
|
||
|
|
||
|
background: transparent;
|
||
|
color: ${({color:e,theme:t})=>t.colors[Ki[e??"brand"]]};
|
||
|
|
||
|
${Cr} {
|
||
|
border-color: ${({color:e,theme:t})=>`${t.colors[Ki[e??"brand"]]}80`};
|
||
|
border-left-color: ${({color:e,theme:t})=>t.colors[Ki[e??"brand"]]};
|
||
|
}
|
||
|
|
||
|
&:hover {
|
||
|
background-color: ${({color:e,theme:t})=>`${t.colors[Ki[e??"brand"]]}15`};
|
||
|
}
|
||
|
|
||
|
&:disabled {
|
||
|
color: ${({theme:e})=>e.colors.gray500};
|
||
|
background-color: transparent;
|
||
|
cursor: not-allowed;
|
||
|
|
||
|
${Cr} {
|
||
|
border-color: ${({theme:e})=>e.colors.gray500};
|
||
|
border-left-color: ${({theme:e})=>e.colors.gray800};
|
||
|
}
|
||
|
}
|
||
|
`,tc=d.css`
|
||
|
${Qi}
|
||
|
|
||
|
text-decoration: none;
|
||
|
|
||
|
${Cr} {
|
||
|
border-color: ${({theme:e,color:t})=>`${"light"===t?e.colors.brand:e.colors.white}80`};
|
||
|
border-left-color: ${({theme:e,color:t})=>"light"===t?e.colors.brand:e.colors.white};
|
||
|
}
|
||
|
|
||
|
${({color:e,theme:t})=>("brand"===e||void 0===e)&&d.css`
|
||
|
border-color: ${t.colors.red300};
|
||
|
color: ${t.colors.white};
|
||
|
background: ${t.colors.brand};
|
||
|
|
||
|
&:hover {
|
||
|
background: ${t.colors.red300};
|
||
|
}
|
||
|
`}
|
||
|
|
||
|
${({color:e,theme:t})=>"light"===e&&d.css`
|
||
|
border-color: ${t.colors.white};
|
||
|
color: ${t.colors.brand};
|
||
|
background: ${t.colors.white};
|
||
|
|
||
|
&:hover {
|
||
|
background: ${t.colors.gray200};
|
||
|
border-color: ${t.colors.gray200};
|
||
|
}
|
||
|
`}
|
||
|
|
||
|
${({color:e,theme:t})=>"dark"===e&&d.css`
|
||
|
border-color: ${t.colors.gray800};
|
||
|
color: ${t.colors.white};
|
||
|
background: ${t.colors.gray800};
|
||
|
|
||
|
&:hover {
|
||
|
background: ${t.colors.gray700};
|
||
|
border-color: ${t.colors.gray700};
|
||
|
}
|
||
|
`}
|
||
|
|
||
|
${({color:e,theme:t})=>"danger"===e&&d.css`
|
||
|
border-color: ${t.colors.red400};
|
||
|
color: ${t.colors.white};
|
||
|
background: ${t.colors.red400};
|
||
|
|
||
|
&:hover {
|
||
|
background: ${t.colors.red300};
|
||
|
border-color: ${t.colors.red300};
|
||
|
}
|
||
|
`}
|
||
|
|
||
|
&:disabled {
|
||
|
background-color: ${({theme:e})=>e.colors.gray400};
|
||
|
border: 1px solid ${({theme:e})=>e.colors.gray400};
|
||
|
cursor: not-allowed;
|
||
|
}
|
||
|
`,nc=d.css`
|
||
|
display: inline-block;
|
||
|
text-decoration: ${({isRevertUnderline:e})=>e?"none":"underline"};
|
||
|
cursor: pointer;
|
||
|
background-color: transparent;
|
||
|
border: none;
|
||
|
appearance: none;
|
||
|
padding: 0;
|
||
|
color: ${({color:e,theme:t})=>e?t.colors[Ki[e]]:"inherit"};
|
||
|
|
||
|
${Cr} {
|
||
|
border-color: ${({color:e,theme:t})=>`${t.colors[Ki[e??"brand"]]}80`};
|
||
|
border-left-color: ${({color:e,theme:t})=>t.colors[Ki[e??"brand"]]};
|
||
|
}
|
||
|
|
||
|
${Xi}
|
||
|
${_}
|
||
|
|
||
|
&:hover,
|
||
|
&:focus {
|
||
|
text-decoration: none;
|
||
|
text-decoration: ${({isRevertUnderline:e})=>e?"underline":"none"};
|
||
|
}
|
||
|
`,rc={xs:10,sm:15,md:20,lg:25},ac=p.button`
|
||
|
${e=>"link"===e.like?nc:"outline"===e.kind?ec:tc}
|
||
|
`;ac.defaultProps={like:"button",kind:"background",type:"button"};const oc=({type:e,loadingLabel:t,color:n,isLoading:r=!1,loadingChildren:o,children:i,...c})=>a.createElement(ac,{type:e,color:n,disabled:c.disabled??r,...c},r?a.createElement(zr,{label:t,size:"button"===c.like?rc[c.size??"sm"]:15,mr:2}):null,r&&o?o:i),ic=p(Ui)`
|
||
|
vertical-align: middle;
|
||
|
${_}
|
||
|
${({theme:e,color:t})=>t&&d.css`
|
||
|
color: ${e.colors[t]};
|
||
|
`}
|
||
|
`,cc={brand:"red300",light:"gray200",dark:"gray700",danger:"red500"},lc=d.css`
|
||
|
display: inline-block;
|
||
|
appearance: none;
|
||
|
background: transparent;
|
||
|
line-height: 0;
|
||
|
cursor: pointer;
|
||
|
|
||
|
&:disabled {
|
||
|
cursor: not-allowed;
|
||
|
}
|
||
|
`,sc=p.button`
|
||
|
padding: ${({padding:e})=>e??"0.5714rem 0.6428rem"};
|
||
|
color: ${({theme:e,color:t})=>e.colors[t??"brand"]};
|
||
|
border: none;
|
||
|
transition: color 200ms;
|
||
|
|
||
|
${lc}
|
||
|
|
||
|
&:hover {
|
||
|
color: ${({theme:e,hoverColor:t})=>e.colors[t??"brand"]};
|
||
|
}
|
||
|
`,uc=d.css`
|
||
|
border: 1px solid ${({theme:e,color:t})=>e.colors[Ki[t??"brand"]]};
|
||
|
color: ${({theme:e,color:t})=>e.colors[Ki[t??"brand"]]};
|
||
|
transition: background-color 200ms, color 200ms;
|
||
|
|
||
|
&:hover {
|
||
|
background: ${({theme:e,color:t})=>e.colors[Ki[t??"brand"]]};
|
||
|
color: ${({color:e,theme:t})=>t.colors[e??"white"]};
|
||
|
}
|
||
|
`,fc=d.css`
|
||
|
border: 1px solid transparent;
|
||
|
background: ${({theme:e,color:t})=>e.colors[Ki[t??"brand"]]};
|
||
|
color: ${({color:e,theme:t})=>t.colors[e??"white"]};
|
||
|
transition: background-color 200ms;
|
||
|
|
||
|
&:hover {
|
||
|
background-color: ${({theme:e,color:t})=>e.colors[cc[t??"brand"]]};
|
||
|
}
|
||
|
`,dc=(p.button`
|
||
|
border-radius: 3px;
|
||
|
padding: 0;
|
||
|
${lc}
|
||
|
|
||
|
${({kind:e})=>"background"===e?fc:uc}
|
||
|
|
||
|
svg {
|
||
|
padding: ${({spacing:e})=>dc[e??"md"]};
|
||
|
}
|
||
|
`,{sm:"0.2em 0.263em",md:"0.4em 0.463em",lg:"1em 1.063em"}),mc={info:{background:"blue400",text:"blue500"},success:{background:"green400",text:"green500"},notice:{background:"yellow400",text:"yellow500"},error:{background:"red400",text:"red500"}},pc=p.div`
|
||
|
position: relative;
|
||
|
border-radius: 2px;
|
||
|
padding: 0.9rem 1.45rem;
|
||
|
${({withIcon:e})=>e&&"padding-right: 3rem;"}
|
||
|
background-color: ${({type:e,theme:t})=>`${t.colors[mc[e||"info"]?.background]}12`};
|
||
|
color: ${({type:e,theme:t})=>t.colors[mc[e||"info"]?.text]};
|
||
|
text-align: ${({textAlign:e})=>e??"left"};
|
||
|
p:first-child {
|
||
|
margin-top: 0;
|
||
|
}
|
||
|
p:last-child {
|
||
|
margin-bottom: 0;
|
||
|
}
|
||
|
|
||
|
${_}
|
||
|
|
||
|
@media ${u.mobileL} {
|
||
|
font-size: 0.857rem;
|
||
|
}
|
||
|
`,hc=p(sc)`
|
||
|
position: absolute;
|
||
|
right: 1rem;
|
||
|
top: 0;
|
||
|
bottom: 0;
|
||
|
margin-bottom: auto;
|
||
|
margin-top: auto;
|
||
|
display: inline-block;
|
||
|
`,bc=({onClose:e,children:t,type:n,...r})=>a.createElement(pc,{...r,withIcon:!!e,type:n},t,e&&a.createElement(hc,{onClick:e,color:mc[n].text,hoverColor:mc[n].background},a.createElement(ic,{icon:wr})));var vc,gc=function(){return(gc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},yc=function(e){"undefined"!=typeof r&&r.env,console.warn(e)};(vc||(vc={})).SCRIPT_NOT_AVAILABLE="Recaptcha script is not available";var wc=(0,a.createContext)({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}});function kc(e){var t=e.reCaptchaKey,n=e.useEnterprise,r=void 0!==n&&n,i=e.useRecaptchaNet,c=void 0!==i&&i,l=e.scriptProps,s=e.language,u=e.container,f=e.children,d=(0,a.useState)(null),m=d[0],p=d[1],h=(0,a.useRef)(t),b=JSON.stringify(l),v=JSON.stringify(null==u?void 0:u.parameters);(0,a.useEffect)((function(){if(t){var e=(null==l?void 0:l.id)||"google-recaptcha-v3",n=(null==l?void 0:l.onLoadCallbackName)||"onRecaptchaLoadCallback";return window[n]=function(){var e=r?window.grecaptcha.enterprise:window.grecaptcha,n=gc({badge:"inline",size:"invisible",sitekey:t},(null==u?void 0:u.parameters)||{});h.current=e.render(null==u?void 0:u.element,n)},function(e){var t=e.render,n=e.onLoadCallbackName,r=e.language,a=e.onLoad,o=e.useRecaptchaNet,i=e.useEnterprise,c=e.scriptProps,l=void 0===c?{}:c,s=l.nonce,u=void 0===s?"":s,f=l.defer,d=void 0!==f&&f,m=l.async,p=void 0!==m&&m,h=l.id,b=void 0===h?"":h,v=l.appendTo,g=b||"google-recaptcha-v3";if(function(e){return!!document.querySelector("#"+e)}(g))a();else{var y=function(e){return"https://www."+(e.useRecaptchaNet?"recaptcha.net":"google.com")+"/recaptcha/"+(e.useEnterprise?"enterprise.js":"api.js")}({useEnterprise:i,useRecaptchaNet:o}),w=document.createElement("script");w.id=g,w.src=y+"?render="+t+("explicit"===t?"&onload="+n:"")+(r?"&hl="+r:""),u&&(w.nonce=u),w.defer=!!d,w.async=!!p,w.onload=a,("body"===v?document.body:document.getElementsByTagName("head")[0]).appendChild(w)}}({render:(null==u?void 0:u.element)?"explicit":t,onLoadCallbackName:n,useEnterprise:r,useRecaptchaNet:c,scriptProps:l,language:s,onLoad:function(){if(window&&window.grecaptcha){var e=r?window.grecaptcha.enterprise:window.grecaptcha;e.ready((function(){p(e)}))}else yc("<GoogleRecaptchaProvider /> "+vc.SCRIPT_NOT_AVAILABLE)},onError:function(){yc("Error loading google recaptcha script")}}),function(){!function(e,t){(function(e){var t;e?function(e){if(e)for(;e.lastChild;)e.lastChild.remove()}("string"==typeof e?document.getElementById(e):e):(t=document.querySelector(".grecaptcha-badge"))&&t.parentNode&&document.body.removeChild(t.parentNode)})(t),window.___grecaptcha_cfg=void 0;var n=document.querySelector("#"+e);n&&n.remove(),function(){var e=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]');e&&e.remove()}()}(e,null==u?void 0:u.element)}}yc("<GoogleReCaptchaProvider /> recaptcha key not provided")}),[r,c,b,v,s,t,null==u?void 0:u.element]);var g=(0,a.useCallback)((function(e){if(!m||!m.execute)throw new Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return m.execute(h.current,{action:e})}),[m,h]),y=(0,a.useMemo)((function(){return{executeRecaptcha:m?g:void 0,container:null==u?void 0:u.element}}),[g,m,null==u?void 0:u.element]);return o().createElement(wc.Provider,{value:y},f)}function xc(e,t){return e(t={exports:{}},t.exports),t.exports}wc.Consumer;var Ec="function"==typeof Symbol&&Symbol.for,_c=Ec?Symbol.for("react.element"):60103,jc=Ec?Symbol.for("react.portal"):60106,Oc=Ec?Symbol.for("react.fragment"):60107,Cc=Ec?Symbol.for("react.strict_mode"):60108,zc=Ec?Symbol.for("react.profiler"):60114,Sc=Ec?Symbol.for("react.provider"):60109,Ac=Ec?Symbol.for("react.context"):60110,$c=Ec?Symbol.for("react.async_mode"):60111,Pc=Ec?Symbol.for("react.concurrent_mode"):60111,Mc=Ec?S
|
||
|
//# sourceMappingURL=35430761-76c775a888a63b01.js.map
|