@apolitical/component-library 4.1.3-beta.0 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ Check the top-level render call using <`+le+">.")}return re}}function Do(O,re){{
|
|
|
32
32
|
|
|
33
33
|
Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
|
|
34
34
|
|
|
35
|
-
Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Write a {action}...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_likes_show:"Show who liked this {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_responses_placeholder:"Write a comment...",discussion_thread_show:"Show {count} {count, select, 1 {reply} other {replies}}",discussion_thread_hide:"Hide replies",discussion_thread_loadMore:"Load more replies",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",dropdown_menu_multiselect_all:"All",dropdown_menu_multiselect_none:"None",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_cancel:"Cancel",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",form_success:"Thank you for submitting the form!",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",inputAutocomplete_placeholder:"Start typing...",passwordRules_unmatched_text:"Passwords do not match",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",passwordRules_currentPassword_label:"Current password",passwordRules_newPassword_label:"New password",passwordRules_confirmPassword_label:"Confirm new password",profile_image_change_uploading_text:"Uploading image...",profile_image_change_cta_with_picture:"Change photo",profile_image_change_cta_without_picture:"+ Add profile photo",profile_image_change_error:"There was an error uploading the image. Please try a different file format or reduce the file size to less than 5MB. Contact us if problem persists.",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",richTextEditor_placeholder:"Write something...",richTextEditor_toolbar:"Formatting options",richTextEditor_bold:"Bold",richTextEditor_italic:"Italic",richTextEditor_strikeThrough:"Strikethrough",richTextEditor_link:"Link",richTextEditor_link_placeholder:"Type or paste URL",richTextEditor_link_error_required:"Please enter a URL to link to",richTextEditor_link_open:"Open: {link}",richTextEditor_link_open_text:"Opens in a new window",richTextEditor_link_edit:"Edit",richTextEditor_link_remove:"Remove",richTextEditor_link_button:"Add link",richTextEditor_ol_list:"Numbered list",richTextEditor_ul_list:"Bullet-point list",richTextEditor_block_quote:"Quote",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",showpassword_show:"Show",showpassword_hide:"Hide",showpassword_aria_show:"Your password is hidden. Click to show.",showpassword_aria_hide:"Your password is visible. Click to hide.",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",tableOfContents:"Table of contents",timeToComplete_hours:"{time, plural, =0 {} one {1 hour} other {# hours}}",timeToComplete_hours_short:"{time}h",timeToComplete_minutes:"{time, plural, =0 {} one {1 minute} other {# minutes}}",timeToComplete_minutes_short:"{time}m",timeToComplete_range:"{early} - {late}",timeToComplete_range_aria:"between {early} and {late}",tooltip_loading:"Loading...",return_to_nav_button:"Back to top",progressTracker:"Step {current} of {total}",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_platform_communities:"Communities",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_news:"News",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_ai:"AI principles",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_explore_communities:"Communities",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",progressBar:"{number}% loaded",inviteModal_title:"You’re registered",inviteModal_formTitle:"Know someone who might like to join this workshop?",inviteModal_formLabel:"Invite your colleagues by typing or pasting their emails below.",inviteModal_cta:"Send",overlay_close:"Close",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",filters_all:"Show all",filters_disabled:"{name} - no results",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",moreMenu:"See more options",navigationMenu_links_homepage:"Home",navigationMenu_links_events:"Events",navigationMenu_links_microcourses:"Courses","navigationMenu_links_q-and-a":"Q&A",navigationMenu_links_articles:"Articles",navigationMenu_links_communities:"Communities",navigationMenu_profile:"My profile",shareLinks_label:"Share",shareLinks_link_linkedin:"Share on LinkedIn",shareLinks_link_twitter:"Share on Twitter",shareLinks_link_facebook:"Share on Facebook",shareLinks_link_email:"Share by email","shareLinks_link_clipboard-copy":"Copy the link",tags_community:"From the community",edit_section_placeholder_description:"Add some details",edit_section_placeholder_cta:"add",notFoundError_title:"We can't find that page",notFoundError_text:"Sorry about that. We all mess up sometimes - read some ‘fail’ stories below.",notFoundError_post_1:"Why public servants must learn to fail — and 3 tips for how to do it",notFoundError_post_2:"What failure has taught me",notFoundError_post_3:"How to learn from failure without causing a scandal",notFoundError_cta:"View more articles",collapsibleSection_summary:"Find out more",contentTypeLabel_event:"Event",contentTypeLabel_learningHub:"Programme",contentTypeLabel_listPage:"List",contentTypeLabel_microcourse:"Course",contentTypeLabel_qaQuestion:"Q&A",contentTypeLabel_solutionArticle:"Article",contentTypeLabel_communityPage:"Community",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll"},mh={...Zn,languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},ph={...Zn,languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>",collapsibleSection_summary:"En savoir plus"},gh={...Zn,languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},vh=Object.freeze(Object.defineProperty({__proto__:null,en:Zn,es:mh,fr:ph,pt:gh},Symbol.toStringTag,{value:"Module"})),Na=(e,t=Zn)=>e in t,Bt=(e,t,n,r,a={})=>{let i="";return Na(`${t}_${n}`)?i=e({id:`${t}_${n}`},a):i=e({id:t},{[r]:n,...a}),i},bh=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let a=n.length-1;a>=0;a--){const i=Math.pow(10,(a+1)*3);if(i<=e){e=Math.round(e*t/i)/t,e===1e3&&a<n.length-1&&(e=1,a++),r=`${e}${n[a]}`;break}}return r},ra=(e,t)=>C.Children.map(e,n=>Object.is(n,null)?n:C.cloneElement(n,{...t})),yc=(e=0)=>{setTimeout(()=>{const t=document.querySelector(".splash-screen");t&&t.remove(),window.prerenderReady=!0},e)},Dc=e=>{let t=e,n=t;return t.includes("//")?n=t.split("//")[1]:t=`https://${t}`,n.includes("/")&&(n=n.split("/")[0]),{full:t,pretty:n}},yh=(e="")=>e.replace(/\s+/g,"").length>0,Qi=e=>{const t=e.length>8,n=/[0-9]/.test(e)&&/[`!@#$%^&*()_+\-=[\]{}£;':"\\|,.<>/?~]/.test(e),r=new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])").test(e);return{isValid:t&&n&&r,matchingRules:{isMoreThanEightCharacters:t,includesNumberAndSymbol:n,includesLowerAndUppercase:r}}},xe=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:a=!1,element:i="button",onClick:s=!1,className:o="",disabled:l=!1,screenreaderText:u=!1,children:c=!1,...f})=>{const p=Kn(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const D=Object.assign({},t),b=dc(Object.keys(D));t=fc(p,b,D)}const g=[];typeof t=="string"&&g.push(t),r&&(g.push("icon"),typeof r=="object"?(g.push(r.icon),r.position?g.push(r.position):g.push("left"),r.hover&&g.push(`hover_${r.hover}`),r.animate&&(g.push("animate"),typeof r.animate=="string"&&g.push(r.animate))):(g.push(r),!r.includes("right")&&!r.includes("left")&&g.push("left"))),n.muted&&g.push("muted"),n.fullWidth&&g.push("full-width");const h={...f,className:V(e,o,g,{"no-text":!c,disabled:l,button:a}),onClick:D=>{(!a||a[0]==="#")&&s&&(D.preventDefault(),D.stopPropagation()),s&&s(D)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return a&&(i="a",h.href=a),C.createElement(i,h,c||(u?d.jsx(Ie,{showOnFocus:!1,children:u}):null))},yn=({buttons:e,wrappers:t=[],className:n="",...r})=>{const a=e.length>1?"ul":"p",i=e.map((s,o)=>{var l;return a==="p"?d.jsx(xe,{...s},o):d.jsx("li",{className:((l=t[o])==null?void 0:l.className)||"",children:d.jsx(xe,{...s})},o)});return C.createElement(a,{className:V("button-wrapper",n),...r,children:i})};const Qt=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return d.jsx("hr",{className:V(e,{"has-max-width":t}),style:n})},ko={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Dh=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:a}=e?ko[e]:ko.fallback;return{range:t&&t.length>0?t:r,sizes:n||a}},Ch=({format:e,height:t,query:n,width:r})=>{let a=`w=${r}&h=${t}`;return a=e?`${a}&fm=${e}`:a,a=n?`${a}&${n}`:a,a},ei=({format:e,range:t,url:n,query:r})=>t.map(({height:a,width:i})=>`${n}?${Ch({format:e,height:a,query:r,width:i})} ${i}w`).join(", ");const Yn=({image:e,className:t,testId:n})=>{const{description:r,height:a,type:i,query:s,url:o,width:l,loading:u,decoding:c,fetchPriority:f}=e,{range:m,sizes:p}=Dh(e),g=ei({format:"avif",query:s,range:m,url:o}),h=ei({format:"webp",query:s,range:m,url:o}),D=ei({format:"",query:s,range:m,url:o});return i&&i.includes("svg")?d.jsx("picture",{className:t,children:d.jsx("img",{src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})}):d.jsxs("picture",{className:t,children:[i!=="image/gif"&&d.jsx("source",{type:"image/avif",srcSet:g,sizes:p,"data-testid":"source"}),d.jsx("source",{type:"image/webp",srcSet:h,sizes:p,"data-testid":"source"}),d.jsx("img",{srcSet:D,sizes:p,src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})]})};const xh=({image:e,className:t="",testId:n})=>d.jsx("div",{className:`image-container ${t}`,"data-testid":n||"image-container",children:e&&d.jsx(Yn,{image:{...e},className:"image"})}),Dn=({href:e,children:t,fallbackElement:n,className:r="",onClick:a,gtmContext:i,gtmType:s,...o})=>{if(e){const l={...o};return a&&(l.onClick=a),i&&(l["data-gtm-event-context"]=i),s&&(l["data-gtm-event-type"]=s),d.jsx("a",{href:e,className:V("gtm-trackable",r),...l,children:t})}return n?C.createElement(n,{children:t,className:r,...o}):d.jsx(d.Fragment,{children:t})},Cc=({children:e})=>typeof document=="object"?rc.createPortal(e,document.body):null;const wh=({currentStep:e=1,steps:t=1})=>d.jsxs(d.Fragment,{children:[d.jsx(Ie,{children:d.jsx(oe.FormattedMessage,{id:"progressTracker",values:{current:e,total:t}})}),d.jsx("div",{className:"progress-tracker",children:d.jsx("div",{className:"dots-wrapper",children:new Array(t).fill("").map((n,r)=>{const a=r+1;return d.jsxs("div",{className:"dot-wrapper",children:[d.jsx("div",{className:V("dot",{active:a===e,completed:a<e}),"data-testid":"progress-dot"}),d.jsx("div",{className:V("line",{active:a<e})})]},r)})})})]});const Eh=({elementId:e,offset:t=20})=>{const n=oe.useIntl(),r=()=>{const a=document.getElementById(e);if(!a)return;const i=document.getElementById("header");i&&window.scrollTo({top:a.offsetTop-i.clientHeight-t})};return d.jsx(xe,{variant:"secondary",className:"return-to-nav",onClick:r,"data-gtm-event-context":"ListPageMobile","data-gtm-event-type":"back-to-nav-button-click",screenreaderText:n.formatMessage({id:"return_to_nav_button"})})};const _h=({items:e,className:t="",...n})=>d.jsx("ul",{className:V("buckets",t),...n,children:e.map(({title:r,text:a,link:i,...s},o)=>d.jsx("li",{className:"bucket text-medium",children:d.jsxs("a",{href:i,...s,children:[d.jsx("p",{className:"title",children:r}),d.jsx("p",{children:a})]})},o))}),Bo=300,Ao="ease-in-out";class kh{constructor(t){this.el=t,this.summary=t.querySelector("summary"),this.content=t.querySelector(".content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",n=>this.onClick(n))}cleanUp(){this.summary.removeEventListener("click",t=>this.onClick(t))}onClick(t){t.preventDefault(),t.stopPropagation(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){this.isClosing=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Bo,easing:Ao}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Bo,easing:Ao}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}const Ra=({label:e=!1,className:t="",children:n,shouldAnimate:r=!1})=>{const a=oe.useIntl(),i=C.useRef(null);return C.useEffect(()=>{let s;return r&&(s=new kh(i.current)),()=>{r&&s&&s.cleanUp()}},[]),d.jsxs("details",{ref:i,className:V("collapsible-section",t,{"should-animate":r}),children:[d.jsx("summary",{children:e||a.formatMessage({id:"collapsibleSection_summary"})}),d.jsx("div",{className:"content",children:n})]})},Fo={cube:"box",graduationCap:"graduation-cap",person:"user",speech:"speech-bubble_round",star:"star_empty_thin"},Bh=e=>{let t=e;return Object.keys(Fo).includes(e)&&(t=Fo[e]),`url(${zt}icons/${t}.svg)`};const To={customCard:"custom",microcourse:"course",solutionArticle:"article",qaQuestion:"question",listPage:"list",learningHub:"learning-hub",communityPage:"communityPage"},xc=({contentType:e,customIcon:t,customLabel:n,className:r=""})=>{const a=oe.useIntl(),i=t?{"--custom-icon":Bh(t)}:{},s=Na(`contentTypeLabel_${e}`)?a.formatMessage({id:`contentTypeLabel_${e}`}):!1;return!n&&!s?null:d.jsx("small",{className:V("content-type-label text-small",e in To?To[e]:e,r,{"has-custom-icon":t}),style:i,"data-testid":"content-type-label",children:n||s})};const St=({variant:e="primary",icon:t,styling:n={},className:r="",children:a,...i})=>{const{showHighlight:s=!1,background:o="default"}=n,l=t?{"--icon":`url(${zt}icons/${t}.svg)`}:{};return d.jsx("div",{className:V("highlighted-text-box",e,r,{"has-icon":t,"show-highlight":s,[o]:o!=="default"}),style:l,...i,children:a})};const en=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let a=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Kn(i);if(i&&typeof n=="object"&&typeof s=="number"){const f=Object.assign({},n.breakpoints),m=dc(Object.keys(f));a=fc(s,m,f)}const{breakpoints:o,text:l="",component:u,...c}=n;return d.jsx(St,{variant:"subtle",className:V("empty-state-box",e,r),children:d.jsxs(d.Fragment,{children:[t&&typeof t=="string"?d.jsx(Lt,{options:{forceBlock:!0},children:t}):t,a&&typeof n=="object"&&(u||d.jsx(xe,{...c,variant:n.variant?n.variant:"secondary",children:l}))]})})};const Ji=({children:e,...t})=>d.jsx("p",{...t,children:e}),wc={q:Ji,blockquote:Ji};for(let e=1;e<=6;e++)wc[`h${e}`]={component:Ji,props:{className:"title"}};const Ec=({type:e="default",className:t="",heading:n=!1,children:r})=>d.jsxs("div",{className:V("helper-text-box text-small",e,t),children:[n&&d.jsx("p",{className:"title",children:n}),typeof r=="string"?d.jsx(Lt,{options:{wrapper:C.Fragment,forceBlock:!0,overrides:wc},children:r}):d.jsx("p",{children:r})]});const _c=({id:e,className:t="",show:n=!1,hide:r=!1,text:a,markdownOptions:i,children:s})=>{const o=oe.useIntl(),l=C.useRef(null);e||(e=Date.now().toString());const[u,c]=C.useState(""),[f,m]=C.useState("closed");C.useEffect(()=>{const h=l.current;if(h)return h.addEventListener("transitionend",p),()=>{h.removeEventListener("transitionend",p)}},[]),C.useEffect(()=>{if(!a||typeof a!="string")return;const h=a.split(`
|
|
35
|
+
Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Write a {action}...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_likes_show:"Show who liked this {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_responses_placeholder:"Write a comment...",discussion_thread_show:"Show {count} {count, select, 1 {reply} other {replies}}",discussion_thread_hide:"Hide replies",discussion_thread_loadMore:"Load more replies",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",dropdown_menu_multiselect_all:"All",dropdown_menu_multiselect_none:"None",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_cancel:"Cancel",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",form_success:"Thank you for submitting the form!",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",inputAutocomplete_placeholder:"Start typing...",passwordRules_unmatched_text:"Passwords do not match",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",passwordRules_currentPassword_label:"Current password",passwordRules_newPassword_label:"New password",passwordRules_confirmPassword_label:"Confirm new password",profile_image_change_uploading_text:"Uploading image...",profile_image_change_cta_with_picture:"Change photo",profile_image_change_cta_without_picture:"+ Add profile photo",profile_image_change_error:"There was an error uploading the image. Please try a different file format or reduce the file size to less than 5MB. Contact us if problem persists.",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",richTextEditor_placeholder:"Write something...",richTextEditor_toolbar:"Formatting options",richTextEditor_bold:"Bold",richTextEditor_italic:"Italic",richTextEditor_strikeThrough:"Strikethrough",richTextEditor_link:"Link",richTextEditor_link_placeholder:"Type or paste URL",richTextEditor_link_error_required:"Please enter a URL to link to",richTextEditor_link_open:"Open: {link}",richTextEditor_link_open_text:"Opens in a new window",richTextEditor_link_edit:"Edit",richTextEditor_link_remove:"Remove",richTextEditor_link_button:"Add link",richTextEditor_ol_list:"Numbered list",richTextEditor_ul_list:"Bullet-point list",richTextEditor_block_quote:"Quote",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",showpassword_show:"Show",showpassword_hide:"Hide",showpassword_aria_show:"Your password is hidden. Click to show.",showpassword_aria_hide:"Your password is visible. Click to hide.",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",tableOfContents:"Table of contents",timeToComplete_hours:"{time, plural, =0 {} one {1 hour} other {# hours}}",timeToComplete_hours_short:"{time}h",timeToComplete_minutes:"{time, plural, =0 {} one {1 minute} other {# minutes}}",timeToComplete_minutes_short:"{time}m",timeToComplete_range:"{early} - {late}",timeToComplete_range_aria:"between {early} and {late}",tooltip_loading:"Loading...",return_to_nav_button:"Back to top",progressTracker:"Step {current} of {total}",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_platform_communities:"Communities",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_news:"News",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_ai:"AI principles",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_explore_communities:"Communities",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",progressBar:"{number}% loaded",inviteModal_title:"You’re registered",inviteModal_formTitle:"Know someone who might like to join this workshop?",inviteModal_formLabel:"Invite your colleagues by typing or pasting their emails below.",inviteModal_cta:"Send",overlay_close:"Close",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",filters_all:"Show all",filters_disabled:"{name} - no results",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",moreMenu:"See more options",navigationMenu_links_homepage:"Home",navigationMenu_links_events:"Events",navigationMenu_links_microcourses:"Courses","navigationMenu_links_q-and-a":"Q&A",navigationMenu_links_articles:"Articles",navigationMenu_links_communities:"Communities",navigationMenu_profile:"My profile",shareLinks_label:"Share",shareLinks_link_linkedin:"Share on LinkedIn",shareLinks_link_twitter:"Share on Twitter",shareLinks_link_facebook:"Share on Facebook",shareLinks_link_email:"Share by email","shareLinks_link_clipboard-copy":"Copy the link",tags_community:"From the community",edit_section_placeholder_description:"Add some details",edit_section_placeholder_cta:"add",notFoundError_title:"We can't find that page",notFoundError_text:"Sorry about that. We all mess up sometimes - read some ‘fail’ stories below.",notFoundError_post_1:"Why public servants must learn to fail — and 3 tips for how to do it",notFoundError_post_2:"What failure has taught me",notFoundError_post_3:"How to learn from failure without causing a scandal",notFoundError_cta:"View more articles",collapsibleSection_summary:"Find out more",contentTypeLabel_event:"Event",contentTypeLabel_learningHub:"Programme",contentTypeLabel_listPage:"List",contentTypeLabel_microcourse:"Course",contentTypeLabel_qaQuestion:"Q&A",contentTypeLabel_solutionArticle:"Article",contentTypeLabel_communityPage:"Community",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll"},mh={...Zn,languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},ph={...Zn,languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>",collapsibleSection_summary:"En savoir plus"},gh={...Zn,languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},vh=Object.freeze(Object.defineProperty({__proto__:null,en:Zn,es:mh,fr:ph,pt:gh},Symbol.toStringTag,{value:"Module"})),Na=(e,t=Zn)=>e in t,Bt=(e,t,n,r,a={})=>{let i="";return Na(`${t}_${n}`)?i=e({id:`${t}_${n}`},a):i=e({id:t},{[r]:n,...a}),i},bh=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let a=n.length-1;a>=0;a--){const i=Math.pow(10,(a+1)*3);if(i<=e){e=Math.round(e*t/i)/t,e===1e3&&a<n.length-1&&(e=1,a++),r=`${e}${n[a]}`;break}}return r},ra=(e,t)=>C.Children.map(e,n=>Object.is(n,null)?n:C.cloneElement(n,{...t})),yc=(e=0)=>{setTimeout(()=>{const t=document.querySelector(".splash-screen");t&&t.remove(),window.prerenderReady=!0},e)},Dc=e=>{const t=e.startsWith("http")?e:`https://${e}`,r=new URL(t).hostname;return{full:t,pretty:r}},yh=(e="")=>e.replace(/\s+/g,"").length>0,Qi=e=>{const t=e.length>8,n=/[0-9]/.test(e)&&/[`!@#$%^&*()_+\-=[\]{}£;':"\\|,.<>/?~]/.test(e),r=new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])").test(e);return{isValid:t&&n&&r,matchingRules:{isMoreThanEightCharacters:t,includesNumberAndSymbol:n,includesLowerAndUppercase:r}}},xe=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:a=!1,element:i="button",onClick:s=!1,className:o="",disabled:l=!1,screenreaderText:u=!1,children:c=!1,...f})=>{const p=Kn(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const D=Object.assign({},t),b=dc(Object.keys(D));t=fc(p,b,D)}const g=[];typeof t=="string"&&g.push(t),r&&(g.push("icon"),typeof r=="object"?(g.push(r.icon),r.position?g.push(r.position):g.push("left"),r.hover&&g.push(`hover_${r.hover}`),r.animate&&(g.push("animate"),typeof r.animate=="string"&&g.push(r.animate))):(g.push(r),!r.includes("right")&&!r.includes("left")&&g.push("left"))),n.muted&&g.push("muted"),n.fullWidth&&g.push("full-width");const h={...f,className:V(e,o,g,{"no-text":!c,disabled:l,button:a}),onClick:D=>{(!a||a[0]==="#")&&s&&(D.preventDefault(),D.stopPropagation()),s&&s(D)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return a&&(i="a",h.href=a),C.createElement(i,h,c||(u?d.jsx(Ie,{showOnFocus:!1,children:u}):null))},yn=({buttons:e,wrappers:t=[],className:n="",...r})=>{const a=e.length>1?"ul":"p",i=e.map((s,o)=>{var l;return a==="p"?d.jsx(xe,{...s},o):d.jsx("li",{className:((l=t[o])==null?void 0:l.className)||"",children:d.jsx(xe,{...s})},o)});return C.createElement(a,{className:V("button-wrapper",n),...r,children:i})};const Qt=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return d.jsx("hr",{className:V(e,{"has-max-width":t}),style:n})},ko={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Dh=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:a}=e?ko[e]:ko.fallback;return{range:t&&t.length>0?t:r,sizes:n||a}},Ch=({format:e,height:t,query:n,width:r})=>{let a=`w=${r}&h=${t}`;return a=e?`${a}&fm=${e}`:a,a=n?`${a}&${n}`:a,a},ei=({format:e,range:t,url:n,query:r})=>t.map(({height:a,width:i})=>`${n}?${Ch({format:e,height:a,query:r,width:i})} ${i}w`).join(", ");const Yn=({image:e,className:t,testId:n})=>{const{description:r,height:a,type:i,query:s,url:o,width:l,loading:u,decoding:c,fetchPriority:f}=e,{range:m,sizes:p}=Dh(e),g=ei({format:"avif",query:s,range:m,url:o}),h=ei({format:"webp",query:s,range:m,url:o}),D=ei({format:"",query:s,range:m,url:o});return i&&i.includes("svg")?d.jsx("picture",{className:t,children:d.jsx("img",{src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})}):d.jsxs("picture",{className:t,children:[i!=="image/gif"&&d.jsx("source",{type:"image/avif",srcSet:g,sizes:p,"data-testid":"source"}),d.jsx("source",{type:"image/webp",srcSet:h,sizes:p,"data-testid":"source"}),d.jsx("img",{srcSet:D,sizes:p,src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})]})};const xh=({image:e,className:t="",testId:n})=>d.jsx("div",{className:`image-container ${t}`,"data-testid":n||"image-container",children:e&&d.jsx(Yn,{image:{...e},className:"image"})}),Dn=({href:e,children:t,fallbackElement:n,className:r="",onClick:a,gtmContext:i,gtmType:s,...o})=>{if(e){const l={...o};return a&&(l.onClick=a),i&&(l["data-gtm-event-context"]=i),s&&(l["data-gtm-event-type"]=s),d.jsx("a",{href:e,className:V("gtm-trackable",r),...l,children:t})}return n?C.createElement(n,{children:t,className:r,...o}):d.jsx(d.Fragment,{children:t})},Cc=({children:e})=>typeof document=="object"?rc.createPortal(e,document.body):null;const wh=({currentStep:e=1,steps:t=1})=>d.jsxs(d.Fragment,{children:[d.jsx(Ie,{children:d.jsx(oe.FormattedMessage,{id:"progressTracker",values:{current:e,total:t}})}),d.jsx("div",{className:"progress-tracker",children:d.jsx("div",{className:"dots-wrapper",children:new Array(t).fill("").map((n,r)=>{const a=r+1;return d.jsxs("div",{className:"dot-wrapper",children:[d.jsx("div",{className:V("dot",{active:a===e,completed:a<e}),"data-testid":"progress-dot"}),d.jsx("div",{className:V("line",{active:a<e})})]},r)})})})]});const Eh=({elementId:e,offset:t=20})=>{const n=oe.useIntl(),r=()=>{const a=document.getElementById(e);if(!a)return;const i=document.getElementById("header");i&&window.scrollTo({top:a.offsetTop-i.clientHeight-t})};return d.jsx(xe,{variant:"secondary",className:"return-to-nav",onClick:r,"data-gtm-event-context":"ListPageMobile","data-gtm-event-type":"back-to-nav-button-click",screenreaderText:n.formatMessage({id:"return_to_nav_button"})})};const _h=({items:e,className:t="",...n})=>d.jsx("ul",{className:V("buckets",t),...n,children:e.map(({title:r,text:a,link:i,...s},o)=>d.jsx("li",{className:"bucket text-medium",children:d.jsxs("a",{href:i,...s,children:[d.jsx("p",{className:"title",children:r}),d.jsx("p",{children:a})]})},o))}),Bo=300,Ao="ease-in-out";class kh{constructor(t){this.el=t,this.summary=t.querySelector("summary"),this.content=t.querySelector(".content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",n=>this.onClick(n))}cleanUp(){this.summary.removeEventListener("click",t=>this.onClick(t))}onClick(t){t.preventDefault(),t.stopPropagation(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){this.isClosing=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Bo,easing:Ao}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Bo,easing:Ao}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}const Ra=({label:e=!1,className:t="",children:n,shouldAnimate:r=!1})=>{const a=oe.useIntl(),i=C.useRef(null);return C.useEffect(()=>{let s;return r&&(s=new kh(i.current)),()=>{r&&s&&s.cleanUp()}},[]),d.jsxs("details",{ref:i,className:V("collapsible-section",t,{"should-animate":r}),children:[d.jsx("summary",{children:e||a.formatMessage({id:"collapsibleSection_summary"})}),d.jsx("div",{className:"content",children:n})]})},Fo={cube:"box",graduationCap:"graduation-cap",person:"user",speech:"speech-bubble_round",star:"star_empty_thin"},Bh=e=>{let t=e;return Object.keys(Fo).includes(e)&&(t=Fo[e]),`url(${zt}icons/${t}.svg)`};const To={customCard:"custom",microcourse:"course",solutionArticle:"article",qaQuestion:"question",listPage:"list",learningHub:"learning-hub",communityPage:"communityPage"},xc=({contentType:e,customIcon:t,customLabel:n,className:r=""})=>{const a=oe.useIntl(),i=t?{"--custom-icon":Bh(t)}:{},s=Na(`contentTypeLabel_${e}`)?a.formatMessage({id:`contentTypeLabel_${e}`}):!1;return!n&&!s?null:d.jsx("small",{className:V("content-type-label text-small",e in To?To[e]:e,r,{"has-custom-icon":t}),style:i,"data-testid":"content-type-label",children:n||s})};const St=({variant:e="primary",icon:t,styling:n={},className:r="",children:a,...i})=>{const{showHighlight:s=!1,background:o="default"}=n,l=t?{"--icon":`url(${zt}icons/${t}.svg)`}:{};return d.jsx("div",{className:V("highlighted-text-box",e,r,{"has-icon":t,"show-highlight":s,[o]:o!=="default"}),style:l,...i,children:a})};const en=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let a=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Kn(i);if(i&&typeof n=="object"&&typeof s=="number"){const f=Object.assign({},n.breakpoints),m=dc(Object.keys(f));a=fc(s,m,f)}const{breakpoints:o,text:l="",component:u,...c}=n;return d.jsx(St,{variant:"subtle",className:V("empty-state-box",e,r),children:d.jsxs(d.Fragment,{children:[t&&typeof t=="string"?d.jsx(Lt,{options:{forceBlock:!0},children:t}):t,a&&typeof n=="object"&&(u||d.jsx(xe,{...c,variant:n.variant?n.variant:"secondary",children:l}))]})})};const Ji=({children:e,...t})=>d.jsx("p",{...t,children:e}),wc={q:Ji,blockquote:Ji};for(let e=1;e<=6;e++)wc[`h${e}`]={component:Ji,props:{className:"title"}};const Ec=({type:e="default",className:t="",heading:n=!1,children:r})=>d.jsxs("div",{className:V("helper-text-box text-small",e,t),children:[n&&d.jsx("p",{className:"title",children:n}),typeof r=="string"?d.jsx(Lt,{options:{wrapper:C.Fragment,forceBlock:!0,overrides:wc},children:r}):d.jsx("p",{children:r})]});const _c=({id:e,className:t="",show:n=!1,hide:r=!1,text:a,markdownOptions:i,children:s})=>{const o=oe.useIntl(),l=C.useRef(null);e||(e=Date.now().toString());const[u,c]=C.useState(""),[f,m]=C.useState("closed");C.useEffect(()=>{const h=l.current;if(h)return h.addEventListener("transitionend",p),()=>{h.removeEventListener("transitionend",p)}},[]),C.useEffect(()=>{if(!a||typeof a!="string")return;const h=a.split(`
|
|
36
36
|
`);c(h.length<3?`${a.substring(0,400)}...`:h.slice(0,3).join(`
|
|
37
37
|
`))},[a]),C.useEffect(()=>{f==="ready-to-close"&&m("closing")},[f]);const p=({propertyName:h})=>{h==="max-height"&&m(D=>D==="opening"?"open":D==="closing"?"closed":D)};if(!a)return null;const g=["opening","open"].includes(f);return d.jsxs(St,{variant:"subtle",className:V("hide-show-text-box",t),children:[d.jsxs("div",{ref:l,id:e,className:V("content",f),children:[d.jsx(Lt,{options:{forceBlock:!0,...i},children:f==="closed"?u:a}),f!=="closed"&&s]}),d.jsx("p",{className:"cta",children:d.jsx(xe,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:V({"rotate-180":g}),onClick:()=>{m(g?"ready-to-close":"opening")},"aria-expanded":g,"aria-controls":e,children:g?r||o.formatMessage({id:"hideShowTextBox_hide"}):n||o.formatMessage({id:"hideShowTextBox_show"})})})]})};const Ah=({element:e="ul",layout:t="vertical",variant:n="default",items:r=[],styling:a={},className:i=""})=>{const{hasBorder:s=!1,zebraStriping:o=!1}=a;return C.createElement(e,{className:V("icon-bulleted-list text-medium",n,i,{"has-border":s,"has-zebra-stripes":o,[t]:e!=="dl"}),children:r.map((l,u)=>{const c={wrapper:C.Fragment,forceInline:!0},f={"--icon":`url(${zt}icons/${l.icon}.svg)`};return e==="dl"?d.jsxs(C.Fragment,{children:[d.jsx("dt",{style:f,children:d.jsx(Lt,{options:c,children:l.dt||""})},`dt-${u}`),d.jsx("dd",{children:typeof l.text=="string"?d.jsx(Lt,{options:c,children:l.text}):l.text},`dd-${u}`)]},`dl-${u}`):d.jsx("li",{style:f,children:typeof l.text=="string"?d.jsx(Lt,{options:c,children:l.text}):l.text},u)})})},Xe=()=>C.Fragment,Fh=({children:e})=>d.jsx(St,{variant:"secondary",children:e}),Th=({children:e})=>typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{className:"center",children:e}):d.jsx("div",{className:"center",children:e}),Sh=["span","strong","h1","h2","h3","h4","h5","h6","p"],jh=({children:e})=>{const t=oe.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(C.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of C.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&C.isValidElement(s)){const o=s.type;if(Sh.includes(o)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const a=n?n.toString():"";return d.jsx(Ra,{label:a,className:["Sources","Resources"].includes(a)?"discrete-links":"",children:r.map(i=>i)})},Oh=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return d.jsx(St,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return d.jsx(St,{variant:"primary",children:e});case"pink-textbox":return d.jsx(St,{variant:"tertiary",children:e});case"content":return typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{children:e}):e;default:return d.jsx("div",{...t,children:e})}return d.jsx("div",{...t,children:e})},Ph=e=>{const t=oe.useIntl(),n=Date.now().toString();let r="default";const a=e.src;return a.includes("youtube")||a.includes("vimeo")?r="video":a.includes("riddle")||a.includes("sli.do")?r="poll":a.includes("padlet")&&(r="padlet"),d.jsxs(d.Fragment,{children:[d.jsx(Ie,{element:"a",href:`#content-after-iframe-${n}`,onClick:i=>{var s;i.preventDefault(),i.stopPropagation(),(s=document.getElementById(`content-after-iframe-${n}`))==null||s.scrollIntoView({behavior:"smooth"})},children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})}),d.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),d.jsx("span",{id:`content-after-iframe-${n}`})]})},So=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Nh=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,a=!1;for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&C.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||So(i.props.children[0])==="button")&&(a=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!C.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&So(r)==="button"&&(a=!0);else break}return a?(n={...n,className:"button primary medium"},d.jsx("p",{className:"center",children:d.jsx(xe,{variant:"primary",size:"medium",...n,children:r})})):d.jsx("a",{...n,children:r})},Xi=({children:e,...t})=>d.jsx("span",{className:V({url:t==null?void 0:t.href}),children:e});const Rh={default:{a:Nh,CollapsibleSection:Ra,TextBox:St,CaseStudy:Fh,style:Xe,details:jh,div:Oh,iframe:Ph,center:Th},"text-only":{h1:Xe,h2:Xe,h3:Xe,h4:Xe,h5:Xe,h6:Xe,style:Xe,details:Xe,div:Xe,TextBox:Xe,CollapsibleSection:Xe,CaseStudy:Xe,blockquote:Xe,iframe:Xe,button:Xe}},zn=({className:e="",options:t={},children:n,overrideType:r="default",styling:a={}})=>{const{highlightTitles:i=!1}=a;n=n.replace(/^<br\/?>/,"");const s={wrapper:C.Fragment,forceBlock:!0,overrides:Rh[r]};return d.jsx("div",{className:V("markdown-text",e,{"highlight-titles":i}),children:d.jsx(Lt,{options:{...s,...t},children:n})})};const kc=({maxWidth:e=!1,title:t,subtitle:n,children:r,className:a=""})=>{const i=e?{"--max-width":`${e/16}rem`}:{};return d.jsxs("section",{className:V("page-heading",a),children:[d.jsxs("div",{className:V("content",{"has-max-width":e}),style:i,children:[t&&t.text&&C.createElement(t.element||"h1",{className:"title"},t.text),n&&n.text&&C.createElement(n.element||"h2",{className:"text-medium"},n.text)]}),r]})};const Rn=({size:e="medium",variant:t="default",className:n="",icon:r,children:a,...i})=>{const s={"--icon":`url(${zt}icons/${r}.svg)`};return d.jsx("span",{className:V("pill",e,t,n,{"has-icon":r}),style:s,...i,children:a})};const yr=({element:e="p",children:t=null,className:n="",...r})=>C.createElement(e,{...r,className:V("status-banner text-small",n),"aria-live":"assertive"},t);const Mh=({styling:e={},progress:t=0,text:n=!1,className:r=""})=>{const a=oe.useIntl(),{showText:i=!1,layout:s="bar",size:o="default",color:l="default"}=e,u=t>75?100:t>50?75:t>25?50:t>5?25:0,c={"--progress":`${t}%`};return d.jsx("span",{className:V(`progress-bar section-${u}`,s,r,{[o]:o!=="default",[l!=="default"?l:""]:l!=="default"}),style:c,children:C.createElement(i?"span":Ie,{className:i?"text":"",children:n||a.formatMessage({id:"progressBar"},{number:t})})})},Fs=C.memo(Mh);const ti="loadingBlock_",Ih=({progress:e=0,steps:t=!1,className:n=""})=>{const r=oe.useIntl();t||(t={0:{text:r.formatMessage({id:`${ti}loading`})},75:{text:r.formatMessage({id:`${ti}almostDone`})},100:{text:r.formatMessage({id:`${ti}complete`})}});let a=null;const i=Object.keys(t);for(let o=0;o<i.length&&!(e<parseInt(i[o]));o++)a=i[o];const s=a&&t[a].icon?{"--icon":`url(${zt}icons/${t[a].icon}.svg)`}:{};return d.jsxs(St,{className:V("loading-block",n,{"has-icon":a&&t[a].icon}),variant:"subtle",style:s,children:[a&&d.jsx("span",{className:"step",children:t[a].text}),d.jsx(Fs,{progress:e})]})},$h=C.memo(Ih);const Ct=({element:e="div",className:t="",...n})=>d.jsx(Pa,{element:e,className:V("loading-placeholder",t),...n});const es={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],heading:["title"],cards:["card","card","card","card"],carousel:["cards","controls"],"carousel-with-title":["title","cards","controls"],answers:["text","text","text"],"text-page":["title","text","text","text","text","subtitle","text","text","text","text","subtitle","text","text","text","text"],"form-with-answers":["question","subtitle","form","answers","answers","answers","answers","answers"],"general-website-page":["banner","text-page"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"],"course-navigation":["button","button"],"course-lesson-page":["breadcrumb","course-navigation","text-page"],"course-lesson-quiz":["text-page","quiz-box"]},Bc=(e,t)=>e in es?d.jsx("div",{className:e,children:es[e].map((n,r)=>Bc(n,r))},t):d.jsx(Ct,{className:e},t),Ts=({layout:e="overview-page",...t})=>d.jsx("div",{className:V("loading-state",e),...t,children:es[e].map((n,r)=>Bc(n,r))}),Ac=e=>{const t=e&&e.toUpperCase().trim().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},Rr=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Lh=e=>{const t=Math.ceil(26/Rr.length),n=Ac(e).toLowerCase();if(n==="")return Rr[0];const r=n.charCodeAt(0)-96;for(let a=0;a<Rr.length;a++)if(r<=t*(a+1))return Rr[a]};const jo=256,tn=({className:e="",src:t="",name:n,alt:r,width:a=jo,height:i=jo,...s})=>{const[o,l]=C.useState(!1),u=C.useRef(null);C.useEffect(()=>{const f=u.current;if(!f)return;const m=f.getContext("2d");if(!m)return;const p=a,g=i;typeof window<"u"&&window.devicePixelRatio&&(f.width=p*window.devicePixelRatio,f.height=g*window.devicePixelRatio,m.scale(window.devicePixelRatio,window.devicePixelRatio)),m.fillStyle=Lh(n),m.fillRect(0,0,p,g),m.font=`${p/3}px Arial`,m.textAlign="center",m.fillStyle="white",m.fillText(Ac(n),p/2,g/1.6)},[n]);let c=!1;return t&&t!==""&&!o&&(t.includes("http")||t.includes("//"))&&(c=!0),d.jsx("figure",{className:V("profile-picture",e,{error:o}),...s,children:c?d.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:a,height:i}):d.jsx("canvas",{ref:u})})},Ss=e=>e==="apolitical"?{image:`${zt}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${zt}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},zh=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const a=e!=="",i=t!=="",s=n!=="";if(!a&&!i&&!s)return"";const o=`${e}${a&&i?` — ${t}`:t}`;let l=`${o}${(a||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=o),l.length>r&&(l=$n(l,r)),l};const Fr=({element:e="div",member:t="community",additionalContent:n=!1,styling:r={},gtmContext:a="member",gtmType:i="member-click",className:s=""})=>{const o=oe.useIntl(),{size:l="medium"}=r,u=Ss(t);u.name||(u.name=o.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:c,image:f}=u;let{url:m}=u;t.link!==void 0&&(t.link===!1?m=void 0:m=t.link);const p=zh(u),g=n&&n.createdAt?Gi(n.createdAt):!1,h=n&&n.createdAt?As(n.createdAt):"";return C.createElement(e,{className:V("member text-medium",l,s),children:d.jsxs(Dn,{href:m,gtmType:i,gtmContext:a,onClick:D=>{D==null||D.stopPropagation()},children:[d.jsx(tn,{name:c,src:f}),d.jsxs("p",{className:"details",children:[d.jsx("strong",{children:c}),n&&d.jsxs("span",{className:"additional-content",children:[n.createdAt&&g&&d.jsx("span",{className:"date",title:h,"aria-label":h,children:o.formatMessage({id:`dates_${g.path}`},{number:g.number})}),n.didEdit&&d.jsx("em",{children:o.formatMessage({id:"discussion_edited"})})]}),p&&d.jsx("small",{className:V({"text-medium":l==="large"}),children:p})]})]})})};const Oo={small:24,medium:48},js=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:a,showGap:i,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,multipleText:l,className:u="",...c})=>{const f=oe.useIntl();return!n||n.length===0?null:C.createElement(e,{...c,className:V("contributors",u,a,{"has-gap":i}),children:d.jsxs(d.Fragment,{children:[d.jsx("ul",{children:n.map((m,p)=>{let g,h="";if(p<o){const{name:D="",image:b=""}=Ss(m);if(s)return d.jsx(Ct,{element:"li",className:"contributor"},p);g=d.jsx(tn,{name:D,src:b,width:Oo[a||"medium"],height:Oo[a||"medium"]})}else if(p===o){const D=(t||n.length)-o;g=d.jsxs("small",{className:V({"large-number":D>99}),children:["+",bh(D,0)]}),h="number-left"}return g?d.jsx("li",{className:V("contributor",h),children:g},p):null})}),r&&d.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?f.formatMessage({id:`member_${n[0]}`}):$n(n[0].name||"",20):l||null})]})})};const Mr="emailHelperTextBox_",Fc=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const a=oe.useIntl(),[i,s]=C.useState({path:`${Mr}default`,type:"default",link:{},mail:{},error:""}),[o,l]=C.useState(!1),u=C.useCallback(p=>{p.preventDefault(),p.stopPropagation();const g=h=>{s({path:`${Mr}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:D=>u(D),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:h})};if(typeof r!="function"){g(a.formatMessage({id:`${Mr}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(h=>{g(h.message)}).finally(()=>{l(!1)})},[t,n,r]);C.useEffect(()=>{let p=Mr,g="default",h={},D={};switch(e){case"gov":p+="autoApproved",g="success";break;case"nonGov":p+="unrecognisedEmail",g="error",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",g="error",D={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",g="error",h={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:b=>u(b),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",g="error",h={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},D={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:p,type:g,link:h,mail:D})},[e]);const c={};return["link","mail"].forEach(p=>{c[p]=Object.keys(i[p]).length?g=>d.jsx("a",{...i[p],children:g}):g=>g}),d.jsx(Ec,{type:i.type,heading:o?!1:a.formatMessage({id:`${i.path}_title`}),children:o?d.jsxs(d.Fragment,{children:[d.jsx(Ct,{element:"span"}),d.jsx(Ct,{element:"span"})]}):a.formatMessage({id:`${i.path}_text`},{...c,strong:p=>d.jsx("strong",{children:p}),em:p=>d.jsx("em",{children:p}),br:d.jsxs(d.Fragment,{children:[d.jsx("br",{}),d.jsx("br",{})]}),error:i.error})})},Tn=({className:e="",element:t="input",id:n,inputRef:r,functions:a={onChange:()=>{}},name:i=n,placeholder:s,type:o="text",value:l,...u})=>{const c=C.useRef(),f=r||c;return C.createElement(t,{ref:f,...u,type:o,id:n,name:i,className:V(e,t,{"has-scrollbar":o==="textarea"&&f.current&&f.current.clientHeight<f.current.scrollHeight}),value:l,placeholder:s,...a,onChange:m=>{const p=m.target;a.onChange(p.value)}})};const En={UP:"ArrowUp",DOWN:"ArrowDown",ENTER:"Enter"},qh=500,Wh=({id:e,name:t=e,value:n,placeholder:r,functions:a={onChange:()=>{},onKeyInput:async()=>new Promise(()=>{})},...i})=>{const{onChange:s=()=>{},onKeyInput:o=async()=>{}}=a,[{input:l,displayInput:u,debouncedInput:c},f]=C.useState({input:n,displayInput:n,debouncedInput:n}),[{predictions:m,activePredictionIndex:p,isPredictionSelected:g},h]=C.useState({predictions:[],activePredictionIndex:-1,isPredictionSelected:!!n}),{formatMessage:D}=oe.useIntl();r||(r=D({id:"inputAutocomplete_placeholder"})),C.useEffect(()=>{const _=setTimeout(()=>{g||f(E=>({...E,debouncedInput:l}))},qh);return()=>{clearTimeout(_)}},[l,g]),C.useEffect(()=>{c&&!g?(async()=>{try{const E=await o(c)||[];h(k=>({...k,predictions:E}))}catch(E){console.error("Error fetching predictions:",E),h(k=>({...k,predictions:[]}))}})():h(_=>({..._,predictions:[]}))},[c,g]),C.useEffect(()=>{p>=0&&m[p]&&f(_=>({..._,displayInput:m[p].description}))},[p,m]);const b=_=>{[En.DOWN,En.UP,En.ENTER].includes(_.key)&&(_.preventDefault(),_.key===En.DOWN&&p<m.length-1?h(E=>({...E,activePredictionIndex:p+1})):_.key===En.UP&&p>0?h(E=>({...E,activePredictionIndex:p-1})):_.key===En.ENTER&&p>-1&&(s(m[p].description),f(E=>({...E,input:m[p].description})),h(E=>({...E,predictions:[],isPredictionSelected:!0}))))},x=_=>{s(_.target.value),f(E=>({...E,input:_.target.value,displayInput:_.target.value})),h(E=>({...E,activePredictionIndex:-1,isPredictionSelected:!1}))},A=_=>{s(_.description),f(E=>({...E,input:_.description,displayInput:_.description})),h(E=>({...E,isPredictionSelected:!0,predictions:[]}))};return d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:u,onChange:x,onKeyDown:b,placeholder:r,name:t,id:e,...i}),d.jsx("ul",{className:"predictions-list",children:m.map((_,E)=>d.jsx("li",{onClick:()=>A(_),onMouseEnter:()=>h(k=>({...k,activePredictionIndex:E})),className:V("predictions-list-item",{active:E===p}),children:_.description},E))})]})};const Tc=({className:e="",disabled:t,element:n="p",functions:r={onChange:()=>{}},id:a,inputRef:i,intlPath:s=!1,label:o,shownValue:l=!0,type:u="checkbox",value:c,...f})=>{const m=oe.useIntl(),{onChange:p,...g}=r,h=()=>{t||p(c?null:l)},D=d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:i,id:a,name:a,type:u,value:l,checked:c,onKeyDown:b=>{(b.key==="Enter"||b.code==="Space")&&(b.preventDefault(),b.stopPropagation(),h())},readOnly:!0,disabled:t}),d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("label",{htmlFor:a,children:o||m.formatMessage({id:s?`${s}_${a}`:a})})]});return C.createElement(n,{onClick:b=>{const x=b.target;x.nodeName.toLowerCase()==="a"||x.parentNode&&x.parentNode.nodeName.toLowerCase()==="a"||(b.preventDefault(),b.stopPropagation(),h())},className:V("checkbox-wrapper",e),...f,...g},D)};const Hh=C.memo(function({direction:t="down"}){return d.jsx(Pa,{className:V("rotating-chevron",`direction-${t}`)})});const Uh=({className:e,options:t,initialValue:n,value:r,functions:a={onChange:()=>{},onMultiSelectSubmit:()=>{}},gtm:{context:i}={context:""},placeholder:s,multiSelect:o,multiSelectOptions:l,id:u})=>{const c=oe.useIntl(),[f,m]=C.useState(!1),p=r||n,g=Array.isArray(p)?[...p]:p?[p]:[],[h,D]=C.useState(g);let b;Array.isArray(h)&&h.length===1&&typeof h[0]=="string"?b=t&&h?t.find(F=>F.id===h[0]):t?t[0]:{id:"",label:""}:Array.isArray(h)&&h.length===1&&typeof h[0]!="string"?b=h[0]:b={id:"",label:""},C.useEffect(()=>{D(g)},[r,n]);const{onChange:x,onMultiSelectSubmit:A,..._}=a,E=F=>{if(o){let z=[];h!=null&&h.includes(F.id)?z=h.filter($=>$!==F.id):z=[...h,F.id],D([...z]),x&&x([...z])}else D([F]),x&&x(F.id),m(!1)},k=F=>{if(F==="all"){const z=(t==null?void 0:t.map($=>$.id))||[];D(z),x&&x(z)}else D([]),x&&x([])};return d.jsxs("div",{className:V("dropdown-wrapper",e),children:[d.jsxs("button",{className:"input","aria-expanded":f,"aria-haspopup":"listbox","aria-controls":"dropdown-list",onClick:F=>{F.preventDefault(),F.stopPropagation(),m(!f)},"data-testid":"dropdown-selector",..._,children:[o?`${s} · ${h.length}`:b.label,d.jsx(Hh,{direction:f?"up":"down"})]}),d.jsx("select",{defaultValue:b.id,onChange:F=>{F.preventDefault(),F.stopPropagation();const z=t&&t.find($=>$.id===F.target.value);E(z)},hidden:!f,..._,children:t==null?void 0:t.map(F=>d.jsx("option",{value:F.id,children:F.label},F.id))}),d.jsxs("div",{className:"menu-options input dropdown-menu",role:"menu",hidden:!f,children:[d.jsxs("div",{className:"dropdown-menu-list",children:[(l==null?void 0:l.topbar)&&d.jsxs("div",{className:"action-bar",children:[d.jsx("p",{children:`${h==null?void 0:h.length} selected`}),d.jsxs("ul",{children:[d.jsx("li",{children:d.jsx(xe,{variant:"tertiary",size:"small",onClick:()=>k("all"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_all"})})}),d.jsx("li",{children:d.jsx(xe,{variant:"tertiary",size:"small",onClick:()=>k("none"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_none"})})})]})]}),d.jsx("ul",{children:t==null?void 0:t.map(F=>{const z=F.id===b.id||(h==null?void 0:h.includes(F))||(h==null?void 0:h.includes(F.id));return d.jsx("li",{"data-testid":"dropdown-options",children:d.jsxs("button",{className:V("gtm-trackable",{selected:z,"selected-single":z&&!o}),"data-gtm-event-type":`${F}-click`,"data-gtm-event-context":i,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(F)},role:"menuitem","aria-current":z,"data-testid":z?"current-selection":"",children:[o&&d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("span",{className:V({"menu-option-label":o}),children:F.label})]})},F.id)})})]}),(l==null?void 0:l.submitSection)&&d.jsx("p",{className:"submit",children:d.jsx(xe,{variant:"secondary",onClick:()=>{A&&A(h),document.dispatchEvent(new CustomEvent("dropdownMultiSelectSubmit",{detail:{id:u||"dropdown-multi-select",value:h}})),m(!1)},children:c.formatMessage({id:"form_submit"})})})]})]})};const Vh=({className:e="",functions:t={onChange:()=>{}},intlPath:n=!1,id:r,label:a,multiSelect:i=!1,name:s,options:o,required:l,type:u="checkboxes",value:c,...f})=>{const m=oe.useIntl(),p=i?c:[],g=c;return d.jsx("ul",{...f,className:V("options-wrapper",e),"data-testid":`ul-${r}`,children:o==null?void 0:o.map(({id:h,label:D=!1,value:b=h,disabled:x=!1})=>{const A=`${r}_${h}`,_=()=>{if(x)return;let E;if(i){const k=p==null?void 0:p.indexOf(b);Array.isArray(p)&&k>=0?(E=p,E.splice(k,1)):(!p||p.length===0?E=[]:E=p,E.push(b))}else E=g===b?void 0:b;t.onChange(E)};return d.jsx(Tc,{element:"li",id:A,type:u==="checkboxes"?"checkbox":"radio",shownValue:b,value:i?p==null?void 0:p.includes(b):g===b,functions:{...t,onChange:_},intlPath:n,label:D||m.formatMessage({id:n?`${n}_${h}`:h}),disabled:x},A)})})};const Kh=({inputRef:e,type:t="password",gtm:{context:n}={context:void 0},...r})=>{const a=oe.useIntl(),i=C.useRef(),s=e||i,[o,l]=C.useState(!1),[u,c]=C.useState(t),f=()=>{var m;l(!o),c(o?"password":"text"),(m=s.current)==null||m.focus()};return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:V("show-password gtm-trackable",{"password-visible":o}),"data-gtm-event-context":n,"data-gtm-event-type":`${o?"hide":"show"}-password-click`,onClick:f,"aria-label":a.formatMessage({id:`showpassword_aria_${o?"hide":"show"}`}),children:a.formatMessage({id:`showpassword_${o?"hide":"show"}`})}),d.jsx(Tn,{inputRef:s,type:u,...r})]})};const _n={text:{component:Tn},email:{component:Tn},url:{component:Tn},textarea:{component:Tn,props:{element:"textarea",rows:4,cols:10}},checkbox:{component:Tc},checkboxes:{component:Vh,props:{multiSelect:!0}},select:{component:Uh},password:{component:Kh},autocomplete:{component:Wh}},Zh=({id:e,intlPath:t=!1,className:n="",error:r,functions:a={onChange:()=>{}},limit:i=0,showRequiredLabels:s=!0,type:o,validation:l,value:u,submitOnEnter:c,...f})=>{const m=oe.useIntl(),p=l&&l.some(({condition:E})=>E==="required"),g=(u==null?void 0:u.toString().length)||0,h=o&&_n[o]&&_n[o].component?_n[o].component:Tn,D={};o&&["checkboxes"].includes(o)?D.element="span":D.htmlFor=e;let b={...f,id:e,name:e,className:r?"error":"",type:o,required:p,"aria-required":p,functions:cn(a),value:u};i>0&&(b["data-character-limit"]=i,b.functions&&(b.functions.onChange=E=>{((E==null?void 0:E.toString().length)||0)>i&&(E=E==null?void 0:E.toString().slice(0,i)),a.onChange(E)})),o&&_n[o]&&_n[o].props&&(b={...b,..._n[o].props}),o&&["checkboxes"].includes(o)&&(b.intlPath=`${t}_${e}`),r&&(b["aria-invalid"]=!0,b["aria-describedby"]=`error-${e}`);const x=f.label||m.formatMessage({id:t?`${t}_${e}`:e}),A=({...E})=>r?C.createElement(E.as||"dd",{id:`error-${e}`,className:"error text-small",role:"alert","aria-live":"assertive",...E},r):null;if(o&&["checkbox"].includes(o))return d.jsxs(d.Fragment,{children:[d.jsx(h,{...b,label:x,className:V("field-wrapper",n)}),d.jsx(A,{as:"p"})]});const _=E=>C.createElement(E.element||"label",{...E,className:"checkboxes-label text-small","data-testid":`label-${e}`});return d.jsxs("dl",{className:V("field-wrapper text-medium",n),children:[d.jsx("dt",{children:d.jsxs(_,{...D,children:[x,p&&s&&d.jsxs(d.Fragment,{children:[" ",d.jsxs("small",{children:["(",m.formatMessage({id:"form_fieldWrapper_required"}),")"]})]})]})}),d.jsxs("dd",{children:[d.jsx(h,{...b}),i>0?d.jsxs("small",{className:V("character-limit",{"near-limit":g>=.99*i,"approaching-limit":g>=.9*i&&g<.99*i}),children:[d.jsx("span",{className:"hidden",children:m.formatMessage({id:"form_fieldWrapper_characterLimit"})}),g," / ",i]}):null]}),d.jsx(A,{})]})},Yh=(e,t)=>{const{type:n,payload:r}=t,a=e.errors?cn(e.errors):{},i=e.values?cn(e.values):{};switch(n){case"toggleSubmitting":return{...e,isSubmitting:!e.isSubmitting};case"updateValue":if(r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],r!=null&&r.key){if(["isSubmitting","formSubmitted","errors"].includes(r==null?void 0:r.key))return{...e,errors:a,[r==null?void 0:r.key]:r==null?void 0:r.value};i[r==null?void 0:r.key]=r==null?void 0:r.value}return{...e,errors:a,values:i};case"addError":return r!=null&&r.key&&!a[r==null?void 0:r.key]&&(a[r==null?void 0:r.key]=r==null?void 0:r.value),{...e,errors:a};case"removeError":return r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],{...e,errors:a};case"submitForm":{const{fields:s=[],dispatch:o=()=>{},onSuccess:l=()=>{},onFailure:u=()=>{},intl:c}=r,f=cn(Object.keys(a));for(const m of s)if(m.validation)for(let p=0;p<m.validation.length;p++){const{condition:g="required",error:h=!1}=m.validation[p];let D=!1;if(typeof g=="function"){const b=g(i);b&&(D=h||b)}else{const b=i[m.id];switch(g){case"required":(!b||typeof b=="string"&&b.trim().length===0)&&(D=h||(c==null?void 0:c.formatMessage({id:"form_error_required"})));break;case"no-numbers":{b&&!/^([^0-9]*)$/.test(b)&&(D=h||(c==null?void 0:c.formatMessage({id:"form_error_numbers"})));break}case"valid-email":{b&&!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(b)&&(D=h||(c==null?void 0:c.formatMessage({id:"form_error_email"})));break}case"valid-url":{b&&!/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(b)&&(D=h||(c==null?void 0:c.formatMessage({id:"form_error_url"})));break}default:console.warn("WARNING! No field validation condition has been set")}}if(D){o({type:"addError",payload:{key:m.id,value:D}}),f.push(m.id);break}}return f.length===0?l(i):u(i,f),{...e,isSubmitting:!1}}case"formSubmitted":return{...e,isSubmitting:!1,formSubmitted:!0,errors:{}};case"formSubmittedAndReset":return{isSubmitting:!1,formSubmitted:!0,errors:{}};default:return e}};let ni=null;const Gn=({element:e="form",fields:t,className:n="",id:r=t.length?`form__${t[0].id}`:"form",formRef:a,intlPath:i=!1,button:s={variant:"primary",size:"large",customOnSubmit:!1},secondaryActionButton:o={variant:"secondary",size:"large"},meta:l,gtm:u={context:"Form",event:"form-submit-click"},functions:{onSuccess:c=async()=>{},onCancel:f=()=>{},onCatch:m=()=>{},onFailure:p=()=>{}}={onSuccess:async()=>{},onCancel:()=>{},onCatch:()=>{},onFailure:()=>{}},...g})=>{const{customOnSubmit:h,hideButton:D,...b}=s,x=40,{shouldShowCancelButton:A=!1,shouldReset:_=!0,showRequiredLabels:E=!0,showSuccessMessage:k=!1}=l||{},F=oe.useIntl(),z={};t.length&&t.forEach(y=>{const q=y.id||y.name;q&&(z[q]=y.value||"")});const[$,j]=C.useReducer(Yh,{isSubmitting:!1,formSubmitted:!1,errors:{},values:z}),{errors:N,isSubmitting:w,formSubmitted:T,values:R}=$;C.useEffect(()=>{_&&T&&(ni=setTimeout(()=>{j({type:"updateValue",payload:{key:"formSubmitted",value:!1}})},3e3))},[T]),C.useEffect(()=>()=>{ni&&clearTimeout(ni)},[]),C.useEffect(()=>{const y=q=>{j({type:"updateValue",payload:{key:q.detail.id,value:q.detail.value}})};return document.addEventListener("dropdownMultiSelectSubmit",y),()=>{document.removeEventListener("dropdownMultiSelectSubmit",y)}},[]);const M=C.useRef(null),Y=a||M;if(!t.length)return null;s.text||(s.text=F.formatMessage({id:"form_submit"}));const K=()=>{if(!w){if(j({type:"toggleSubmitting"}),s.disabled){typeof s.disabled=="object"&&s.disabled.isClickable&&j({type:"submitForm",payload:{fields:t,dispatch:j,intl:F}});return}j({type:"submitForm",payload:{fields:t,dispatch:j,onSuccess:async y=>{try{await c(y),j({type:_?"formSubmittedAndReset":"formSubmitted"})}catch(q){m(q),j({type:"updateValue",payload:{key:"isSubmitting",value:!1}})}},onFailure:(y,q)=>{p(y,q),j({type:"updateValue",payload:{key:"isSubmitting",value:!1}})},intl:F}})}},ne=[{...b,icon:T?{icon:"tick",position:"left"}:!1,className:"gtm-trackable",onClick:y=>{var B;if(y.preventDefault(),y.stopPropagation(),w)return;let q=0;if((B=Y==null?void 0:Y.current)!=null&&B.id){const S=document.getElementById(Y.current.id);S&&(q=S.getBoundingClientRect().top+window.scrollY)}const X=document.getElementById("header");X&&(q=q-X.offsetHeight-x),q<0&&(q=0),window.scrollTo({top:q,behavior:"smooth"}),K()},disabled:w||T||s.disabled,"data-gtm-event-context":u.context,"data-gtm-event-type":u.event,children:w||T?F.formatMessage({id:`form_${w?"submitting":"submitted"}`}):s.text}];return A&&ne.unshift({...o,className:"gtm-trackable","data-gtm-event-context":u.context,"data-gtm-event-type":u.event,disabled:w||T,onClick:f,children:o.text||F.formatMessage({id:"form_cancel"})}),d.jsxs(d.Fragment,{children:[C.createElement(e,{...g,id:r,className:V("form",n),ref:Y},d.jsxs(d.Fragment,{children:[N!=null&&N.general?d.jsx(en,{variant:"error",text:F.formatMessage({id:"form_error_generalError"})}):null,(!_||!w&&!T||h)&&t.map((y,q)=>{const{id:X=y.name||q,component:B,functions:S={onChange:()=>{}},submitOnEnter:L=!1}=y;if(B)return d.jsx(B,{...y.props||{}},`component-${X}-${q}`);const I=R?R[X]:"",U={...S,onChange:te=>{j({type:"updateValue",payload:{key:X,value:te}}),S.onChange(te&&te.toString(),j)}};return L&&(U.onKeyDown=te=>{te.key==="Enter"&&(te.stopPropagation(),te.preventDefault(),K()),S.onKeyDown&&S.onKeyDown(te)}),d.jsx(Zh,{intlPath:i,...y,showRequiredLabels:E,value:I,error:N==null?void 0:N[X],functions:U},X)}),D?null:(w||T)&&h?h:d.jsx(yn,{className:V("cta",{center:w||T,submitted:T}),buttons:ne})]})),k&&T&&d.jsx(yr,{className:"success",children:typeof k=="string"?k:F.formatMessage({id:"form_success"})})]})};const Ir="passwordRules_",Sc="isMoreThanEightCharacters",jc="includesNumberAndSymbol",Oc="includesLowerAndUppercase",Gh={[Sc]:"8Characters",[jc]:"numberSymbol",[Oc]:"lowercaseUppercase"},Qh=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=oe.useIntl();return d.jsxs("aside",{className:V("password-rules",t),children:[d.jsx("small",{children:n.formatMessage({id:`${Ir}intro`})}),d.jsx("ul",{children:[Sc,jc,Oc].map(r=>d.jsxs("li",{className:V({matches:e[r]}),children:[d.jsxs(Ie,{children:[n.formatMessage({id:`${Ir}rule_label`})," "]}),d.jsx("span",{children:n.formatMessage({id:`${Ir}rule_${Gh[r]}`})}),!e[r]&&d.jsxs(Ie,{element:"strong",children:[" ",n.formatMessage({id:`${Ir}notMet`})]})]},`rule-${r}`))})]})},Pc=C.memo(Qh);const Jh=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:a=()=>{}},className:i="",hasLoaded:s=!1})=>{const o=oe.useIntl(),[l,u]=C.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const b=await n();u(x=>({...x,setUp:!0,id:b&&b.id,disabled:!1}))}catch(b){u(x=>({...x,setUp:!0,disabled:!0})),a(b)}};if(C.useEffect(()=>{s&&!l.setUp&&c()},[s]),!s)return d.jsx(Ct,{className:"rating-placeholder"});const{id:f,rating:m,disabled:p}=l,g="ratings_",h={text:o.formatMessage({id:`${g}text`}),low:o.formatMessage({id:`${g}low`}),high:o.formatMessage({id:`${g}high`}),success:o.formatMessage({id:`${g}success`}),...e},D=async b=>{if(!(!f||p))try{u(x=>({...x,rating:b,disabled:!0})),await r({id:f,value:b})}catch(x){u(A=>({...A,rating:null})),a(x)}finally{u(x=>({...x,disabled:!1}))}};return d.jsxs("div",{className:V("rating",i),children:[d.jsx("span",{className:"label",children:h[m?"success":"text"]}),d.jsx("ol",{children:Array.from(new Array(t).keys()).map(b=>{const x=b+1;return d.jsx("li",{className:V({selected:m&&x<=m}),children:d.jsx(xe,{variant:"tertiary",size:"small",icon:{icon:`star${!m||x>m?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${o.formatMessage({id:`${g}stars`},{number:x,total:t})}${x===1||x===t?` - ${h[x===1?"low":"high"]}`:""}`,onClick:A=>{A.preventDefault(),A.stopPropagation(),D(x)},disabled:p})},`rating-${x}`)})})]})};var Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});var Xh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),ri={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Nc={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Xh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Os={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var $r=1;$r<20;$r++)Os["f"+$r]=111+$r;function Ma(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(s){return Rc(s,t)}),a=function(o){return r.some(function(l){return Mc(l,o)})},i=n==null?a:a(n);return i}function em(e,t){return Ma(e,t)}function tm(e,t){return Ma(e,{byKey:!0},t)}function Rc(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var a=e.split("+"),i=a.length;for(var s in ri)r[ri[s]]=!1;var o=!0,l=!1,u=void 0;try{for(var c=a[Symbol.iterator](),f;!(o=(f=c.next()).done);o=!0){var m=f.value,p=m.endsWith("?")&&m.length>1;p&&(m=m.slice(0,-1));var g=Ps(m),h=ri[g];if(m.length>1&&!h&&!Nc[m]&&!Os[g])throw new TypeError('Unknown modifier: "'+m+'"');(i===1||!h)&&(n?r.key=g:r.which=Ic(m)),h&&(r[h]=p?null:!0)}}catch(D){l=!0,u=D}finally{try{!o&&c.return&&c.return()}finally{if(l)throw u}}return r}function Mc(e,t){for(var n in e){var r=e[n],a=void 0;if(r!=null&&(n==="key"&&t.key!=null?a=t.key.toLowerCase():n==="which"?a=r===91&&t.which===93?91:t.which:a=t[n],!(a==null&&r===!1)&&a!==r))return!1}return!0}function Ic(e){e=Ps(e);var t=Os[e]||e.toUpperCase().charCodeAt(0);return t}function Ps(e){return e=e.toLowerCase(),e=Nc[e]||e,e}var nm=Wt.default=Ma,ai=Wt.isHotkey=Ma;Wt.isCodeHotkey=em;Wt.isKeyHotkey=tm;Wt.parseHotkey=Rc;Wt.compareHotkey=Mc;Wt.toKeyCode=Ic;Wt.toKeyName=Ps;function rm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function ts(e,t){return Array(t+1).join(e)}function am(e){return e.replace(/^\n*/,"")}function im(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
38
38
|
`;)t--;return e.substring(0,t)}var sm=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Ns(e){return Rs(e,sm)}var $c=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Lc(e){return Rs(e,$c)}function om(e){return qc(e,$c)}var zc=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function um(e){return Rs(e,zc)}function lm(e){return qc(e,zc)}function Rs(e,t){return t.indexOf(e.nodeName)>=0}function qc(e,t){return e.getElementsByTagName&&t.some(function(n){return e.getElementsByTagName(n).length})}var et={};et.paragraph={filter:"p",replacement:function(e){return`
|
package/index.mjs
CHANGED
|
@@ -1452,8 +1452,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1452
1452
|
t && t.remove(), window.prerenderReady = !0;
|
|
1453
1453
|
}, e);
|
|
1454
1454
|
}, hc = (e) => {
|
|
1455
|
-
|
|
1456
|
-
return
|
|
1455
|
+
const t = e.startsWith("http") ? e : `https://${e}`, r = new URL(t).hostname;
|
|
1456
|
+
return { full: t, pretty: r };
|
|
1457
1457
|
}, ch = (e = "") => e.replace(/\s+/g, "").length > 0, xo = (e) => {
|
|
1458
1458
|
const t = e.length > 8, n = /[0-9]/.test(e) && /[`!@#$%^&*()_+\-=[\]{}£;':"\\|,.<>/?~]/.test(e), r = new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])").test(
|
|
1459
1459
|
e
|