/*! For license information please see main.22fc3e30.js.LICENSE.txt */ (()=>{var e={32292:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});n(65043);var r=n(70579);const i=e=>{let{text:t=""}=e;return(0,r.jsx)("div",{className:"c-banner",children:(0,r.jsx)("span",{children:t})})}},10746:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(64600),i=n.n(r),o=n(60170);const a=new Headers({"Content-Type":"application/vnd.api+json"});var s=n(65043),u=n(47065),l=n(38784);var c=n(70579);const f=(0,u.Tl)("translations")((e=>{let{text:t,userID:n,projectSlug:r,t:u}=e;const[f,p]=(0,s.useState)(!1),[d,h]=(0,s.useState)(""),[g,v]=(0,s.useState)("prompt"),y=(0,s.useRef)(null),m="string"===typeof r,b=r?"https://github.com/RaspberryPiLearning/".concat(r):null,w=m?"URL: ".concat(window.location.pathname,"\n\n\n").concat(d):d,_=e=>i()({["c-project-footer__feedback-".concat(e)]:!0,["c-project-footer__feedback-".concat(e,"--hidden")]:e!==g}),S=(0,s.useCallback)((async()=>{const e={message:w,userID:n};m&&(e.project_slug=r,e.step_number=5),await(e=>{const t="".concat("https://learning-admin.raspberrypi.org","/api/v1/feedbacks");return Promise.resolve(fetch(t,{method:"POST",headers:a,body:JSON.stringify({data:{type:"api/v1/feedbacks",attributes:e}})}).then((e=>{if(e.status===o.A.createdStatus)return e.json();const t=new Error(e.statusText);throw t.response=e,t})).catch((e=>console.error("Request failed:",e))))})(e),v("thanks")}),[w,m,r,n]);return(0,s.useEffect)((()=>{f&&S()}),[f,S]),(0,s.useEffect)((()=>{"form"===g&&y.current.focus()}),[g,y]),(0,c.jsxs)("footer",{className:"c-project-footer",children:[(0,c.jsx)("p",{children:u(t)}),(0,c.jsxs)("button",{className:_("prompt"),onClick:()=>v("form"),children:[u("project.footer.feedback.button.text")," "]}),(0,c.jsxs)("form",{className:_("form"),onSubmit:e=>{e.preventDefault(),p(!0)},children:[(0,c.jsx)("textarea",{ref:y,className:"c-project-footer__feedback-textarea","aria-labelledby":"textarea-label",cols:"40",disabled:f,onChange:e=>{h(e.target.value)},placeholder:"".concat(u("project.footer.feedback.placeholder.text")),rows:"6",value:d}),(0,c.jsx)("p",{id:"textarea-label",children:u("project.footer.feedback.prompt.text")}),(0,c.jsx)("button",{className:"c-project-footer__feedback-submit",disabled:f||!d,type:"submit",children:u(f?"project.footer.feedback.button.disabled.text":"project.footer.feedback.button.text")})]}),(0,c.jsx)("div",{className:_("thanks"),children:u("project.footer.feedback.thank-you.text")}),(0,c.jsx)(l.A,{projectRepoUrl:b}),(0,c.jsx)("div",{className:"c-project-footer-policy",children:[{key:"accessibility",text:"project.footer.license.accessibility",href:"https://www.raspberrypi.org/accessibility/"},{key:"cookies",text:"project.footer.license.cookies",href:"https://www.raspberrypi.org/cookies/"},{key:"privacy",text:"project.footer.license.privacy",href:"https://www.raspberrypi.org/privacy/"},{key:"translations",text:"project.footer.translations.text",href:"/en/projects/translating-for-raspberry-pi"}].map((e=>(0,c.jsx)("p",{children:(0,c.jsx)("a",{className:"c-project-footer__link",href:e.href,children:u(e.text)})},e.key)))})]})}))},79728:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u});n(65043);var r=n(41591),i=n(47065),o=n(22166),a=n(74080),s=n(70579);const u=(0,o.Ng)((e=>{var t,n;return{profile:(null===e||void 0===e||null===(t=e.authentication)||void 0===t||null===(n=t.user)||void 0===n?void 0:n.profile)||!1}}))((0,i.Tl)("translations")((e=>{let{t:t,title:n,description:i,image:o,i18n:u}=e;const l=(e=>{const t=a.parse(e);var n="".concat(t.protocol,"//").concat(t.hostname);return n=t.port?"".concat(n,":").concat(t.port):n,(n=t.path?"".concat(n).concat(t.pathname):n).replace(/\/+$/,"")})(window.location.href);return(0,s.jsxs)(r.m,{htmlAttributes:{lang:u.language},children:[(0,s.jsx)("title",{children:n||t("meta.default.title")}),(0,s.jsx)("meta",{name:"description",content:i||t("meta.default.description")}),(0,s.jsx)("meta",{property:"og:title",content:n||t("meta.default.title")}),(0,s.jsx)("meta",{property:"og:description",content:i||t("meta.default.description")}),(0,s.jsx)("link",{rel:"canonical",href:l}),(0,s.jsx)("meta",{property:"og:url",content:l}),o&&(0,s.jsx)("meta",{property:"og:image",content:o})]})})))},47896:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(65043);var r=n(70579);const i=e=>{let{type:t,className:n=""}=e;switch(t){case"arrow-down":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M12 15.375L6 9.37501L7.4 7.97501L12 12.575L16.6 7.97501L18 9.37501L12 15.375Z",fill:"#212121"})});case"cross":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",fill:"white"})});case"magnifying-glass":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M19.6 21L13.3 14.7C12.8 15.1 12.225 15.4167 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16C7.68333 16 6.146 15.371 4.888 14.113C3.62933 12.8543 3 11.3167 3 9.5C3 7.68333 3.62933 6.14567 4.888 4.887C6.146 3.629 7.68333 3 9.5 3C11.3167 3 12.8543 3.629 14.113 4.887C15.371 6.14567 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.4167 12.225 15.1 12.8 14.7 13.3L21 19.6L19.6 21ZM9.5 14C10.75 14 11.8127 13.5627 12.688 12.688C13.5627 11.8127 14 10.75 14 9.5C14 8.25 13.5627 7.18733 12.688 6.312C11.8127 5.43733 10.75 5 9.5 5C8.25 5 7.18733 5.43733 6.312 6.312C5.43733 7.18733 5 8.25 5 9.5C5 10.75 5.43733 11.8127 6.312 12.688C7.18733 13.5627 8.25 14 9.5 14Z",fill:"white"})});case"tick":return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M9.54998 18L3.84998 12.3L5.27498 10.875L9.54998 15.15L18.725 5.97501L20.15 7.40001L9.54998 18Z",fill:"#ffffff"})});case"sync":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M14 4H20V6H17.25L17.65 6.35C18.4667 7.16667 19.0627 8.054 19.438 9.012C19.8127 9.97067 20 10.95 20 11.95C20 13.8 19.4457 15.4457 18.337 16.887C17.229 18.329 15.7833 19.2833 14 19.75V17.65C15.2 17.2167 16.1667 16.4793 16.9 15.438C17.6333 14.396 18 13.2333 18 11.95C18 11.2 17.8583 10.4707 17.575 9.762C17.2917 9.054 16.85 8.4 16.25 7.8L16 7.55V10H14V4ZM10 20H4V18H6.75L6.35 17.65C5.48333 16.8833 4.875 16.0083 4.525 15.025C4.175 14.0417 4 13.05 4 12.05C4 10.2 4.554 8.554 5.662 7.112C6.77067 5.67067 8.21667 4.71667 10 4.25V6.35C8.8 6.78333 7.83333 7.52067 7.1 8.562C6.36667 9.604 6 10.7667 6 12.05C6 12.8 6.14167 13.529 6.425 14.237C6.70833 14.9457 7.15 15.6 7.75 16.2L8 16.45V14H10V20Z",fill:"#ffffff"})});case"print":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M16 8V5H8V8H6V3H18V8H16ZM18 12.5C18.2833 12.5 18.5207 12.404 18.712 12.212C18.904 12.0207 19 11.7833 19 11.5C19 11.2167 18.904 10.979 18.712 10.787C18.5207 10.5957 18.2833 10.5 18 10.5C17.7167 10.5 17.4793 10.5957 17.288 10.787C17.096 10.979 17 11.2167 17 11.5C17 11.7833 17.096 12.0207 17.288 12.212C17.4793 12.404 17.7167 12.5 18 12.5ZM16 19V15H8V19H16ZM18 21H6V17H2V8H22V17H18V21ZM20 15V10H4V15H6V13H18V15H20ZM4 10H20H6H4Z",fill:"#212121"})});case"compass":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"compass",children:(0,r.jsx)("path",{d:"M6.5 17.5L14 14L17.5 6.5L10 10L6.5 17.5ZM12 13C11.7167 13 11.4793 12.904 11.288 12.712C11.096 12.5207 11 12.2833 11 12C11 11.7167 11.096 11.479 11.288 11.287C11.4793 11.0957 11.7167 11 12 11C12.2833 11 12.521 11.0957 12.713 11.287C12.9043 11.479 13 11.7167 13 12C13 12.2833 12.9043 12.5207 12.713 12.712C12.521 12.904 12.2833 13 12 13ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:"#212121"})});case"palette":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"palette",children:(0,r.jsx)("path",{d:"M12 22C10.6333 22 9.34167 21.7373 8.125 21.212C6.90833 20.6873 5.846 19.9707 4.938 19.062C4.02933 18.154 3.31267 17.0917 2.788 15.875C2.26267 14.6583 2 13.3667 2 12C2 10.6167 2.27067 9.31667 2.812 8.1C3.354 6.88333 4.08767 5.825 5.013 4.925C5.93767 4.025 7.01667 3.31233 8.25 2.787C9.48333 2.26233 10.8 2 12.2 2C13.5333 2 14.7917 2.22933 15.975 2.688C17.1583 3.146 18.1957 3.77933 19.087 4.588C19.979 5.396 20.6873 6.35433 21.212 7.463C21.7373 8.571 22 9.76667 22 11.05C22 12.9667 21.4167 14.4373 20.25 15.462C19.0833 16.4873 17.6667 17 16 17H14.15C14 17 13.896 17.0417 13.838 17.125C13.7793 17.2083 13.75 17.3 13.75 17.4C13.75 17.6 13.875 17.8873 14.125 18.262C14.375 18.6373 14.5 19.0667 14.5 19.55C14.5 20.3833 14.2707 21 13.812 21.4C13.354 21.8 12.75 22 12 22ZM6.5 13C6.93333 13 7.29167 12.8583 7.575 12.575C7.85833 12.2917 8 11.9333 8 11.5C8 11.0667 7.85833 10.7083 7.575 10.425C7.29167 10.1417 6.93333 10 6.5 10C6.06667 10 5.70833 10.1417 5.425 10.425C5.14167 10.7083 5 11.0667 5 11.5C5 11.9333 5.14167 12.2917 5.425 12.575C5.70833 12.8583 6.06667 13 6.5 13ZM9.5 9C9.93333 9 10.2917 8.85833 10.575 8.575C10.8583 8.29167 11 7.93333 11 7.5C11 7.06667 10.8583 6.70833 10.575 6.425C10.2917 6.14167 9.93333 6 9.5 6C9.06667 6 8.70833 6.14167 8.425 6.425C8.14167 6.70833 8 7.06667 8 7.5C8 7.93333 8.14167 8.29167 8.425 8.575C8.70833 8.85833 9.06667 9 9.5 9ZM14.5 9C14.9333 9 15.2917 8.85833 15.575 8.575C15.8583 8.29167 16 7.93333 16 7.5C16 7.06667 15.8583 6.70833 15.575 6.425C15.2917 6.14167 14.9333 6 14.5 6C14.0667 6 13.7083 6.14167 13.425 6.425C13.1417 6.70833 13 7.06667 13 7.5C13 7.93333 13.1417 8.29167 13.425 8.575C13.7083 8.85833 14.0667 9 14.5 9ZM17.5 13C17.9333 13 18.2917 12.8583 18.575 12.575C18.8583 12.2917 19 11.9333 19 11.5C19 11.0667 18.8583 10.7083 18.575 10.425C18.2917 10.1417 17.9333 10 17.5 10C17.0667 10 16.7083 10.1417 16.425 10.425C16.1417 10.7083 16 11.0667 16 11.5C16 11.9333 16.1417 12.2917 16.425 12.575C16.7083 12.8583 17.0667 13 17.5 13ZM12 20C12.15 20 12.271 19.9583 12.363 19.875C12.4543 19.7917 12.5 19.6833 12.5 19.55C12.5 19.3167 12.375 19.0417 12.125 18.725C11.875 18.4083 11.75 17.9333 11.75 17.3C11.75 16.6 11.9917 16.0417 12.475 15.625C12.9583 15.2083 13.55 15 14.25 15H16C17.1 15 18.0417 14.679 18.825 14.037C19.6083 13.3957 20 12.4 20 11.05C20 9.03333 19.2293 7.354 17.688 6.012C16.146 4.67067 14.3167 4 12.2 4C9.93333 4 8 4.775 6.4 6.325C4.8 7.875 4 9.76667 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z",fill:"#212121"})});case"rocket":return(0,r.jsx)("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"rocket",children:(0,r.jsx)("path",{d:"M5.64999 10.025L7.59999 10.85C7.83332 10.3833 8.07499 9.93332 8.32499 9.49998C8.57499 9.06665 8.84999 8.63332 9.14999 8.19998L7.74999 7.92498L5.64999 10.025ZM9.19999 12.1L12.05 14.925C12.75 14.6583 13.5 14.25 14.3 13.7C15.1 13.15 15.85 12.525 16.55 11.825C17.7167 10.6583 18.6293 9.36265 19.288 7.93798C19.946 6.51265 20.2333 5.19998 20.15 3.99998C18.95 3.91665 17.6333 4.20398 16.2 4.86198C14.7667 5.52065 13.4667 6.43332 12.3 7.59998C11.6 8.29998 10.975 9.04998 10.425 9.84998C9.87499 10.65 9.46665 11.4 9.19999 12.1ZM13.65 10.475C13.2667 10.0917 13.075 9.62065 13.075 9.06198C13.075 8.50398 13.2667 8.03332 13.65 7.64998C14.0333 7.26665 14.5083 7.07498 15.075 7.07498C15.6417 7.07498 16.1167 7.26665 16.5 7.64998C16.8833 8.03332 17.075 8.50398 17.075 9.06198C17.075 9.62065 16.8833 10.0917 16.5 10.475C16.1167 10.8583 15.6417 11.05 15.075 11.05C14.5083 11.05 14.0333 10.8583 13.65 10.475ZM14.125 18.5L16.225 16.4L15.95 15C15.5167 15.3 15.0833 15.5707 14.65 15.812C14.2167 16.054 13.7667 16.2916 13.3 16.525L14.125 18.5ZM21.95 2.17498C22.2667 4.19165 22.071 6.15398 21.363 8.06198C20.6543 9.97065 19.4333 11.7916 17.7 13.525L18.2 16C18.2667 16.3333 18.25 16.6583 18.15 16.975C18.05 17.2917 17.8833 17.5666 17.65 17.8L13.45 22L11.35 17.075L7.07499 12.8L2.14999 10.7L6.32499 6.49998C6.55832 6.26665 6.83765 6.09998 7.16299 5.99998C7.48765 5.89998 7.81665 5.88332 8.14999 5.94998L10.625 6.44998C12.3583 4.71665 14.175 3.49165 16.075 2.77498C17.975 2.05832 19.9333 1.85832 21.95 2.17498ZM3.92499 15.975C4.50832 15.3917 5.22065 15.0957 6.06199 15.087C6.90399 15.079 7.61665 15.3667 8.19999 15.95C8.78332 16.5333 9.07065 17.2456 9.06199 18.087C9.05399 18.929 8.75832 19.6416 8.17499 20.225C7.75832 20.6416 7.06265 21 6.08799 21.3C5.11265 21.6 3.76665 21.8666 2.04999 22.1C2.28332 20.3833 2.54999 19.0373 2.84999 18.062C3.14999 17.0873 3.50832 16.3917 3.92499 15.975ZM5.34999 17.375C5.18332 17.5417 5.01665 17.846 4.84999 18.288C4.68332 18.7293 4.56665 19.175 4.49999 19.625C4.94999 19.5583 5.39599 19.446 5.83799 19.288C6.27932 19.1293 6.58332 18.9666 6.74999 18.8C6.94999 18.6 7.05832 18.3583 7.07499 18.075C7.09165 17.7916 6.99999 17.55 6.79999 17.35C6.59999 17.15 6.35832 17.054 6.07499 17.062C5.79165 17.0707 5.54999 17.175 5.34999 17.375Z",fill:"#212121"})});case"chevron-right":return(0,r.jsx)("svg",{className:n,width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M15.6667 30L13.3333 27.6667L21 20L13.3333 12.3333L15.6667 10L25.6667 20L15.6667 30Z",fill:"#212121"})});case"copy":return(0,r.jsx)("svg",{className:n,width:"17",height:"20",viewBox:"0 0 17 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M6 16C5.45 16 4.97933 15.8043 4.588 15.413C4.196 15.021 4 14.55 4 14V2C4 1.45 4.196 0.979 4.588 0.587C4.97933 0.195667 5.45 0 6 0H15C15.55 0 16.021 0.195667 16.413 0.587C16.8043 0.979 17 1.45 17 2V14C17 14.55 16.8043 15.021 16.413 15.413C16.021 15.8043 15.55 16 15 16H6ZM6 14H15V2H6V14ZM2 20C1.45 20 0.979 19.8043 0.587 19.413C0.195667 19.021 0 18.55 0 18V4H2V18H13V20H2ZM6 2V14V2Z",fill:"white"})});case"external-link":return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,r.jsx)("path",{d:"M5 3.5C3.90694 3.5 3 4.40694 3 5.5V19.5C3 20.5931 3.90694 21.5 5 21.5H19C20.0931 21.5 21 20.5931 21 19.5V12.5H19V19.5H5V5.5H12V3.5H5ZM14 3.5V5.5H17.5859L8.29297 14.793L9.70703 16.207L19 6.91406V10.5H21V3.5H14Z",fill:"white"})});default:return null}}},38784:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(60170),i=n(65043),o=n(47065),a=n(70579);const s=(0,o.Tl)("translations")((e=>{let{projectRepoUrl:t,t:n}=e;return(0,a.jsxs)("p",{children:[n("project.footer.license.published")," ",(0,a.jsx)("a",{className:"c-project-footer__link c-project-footer__link--rpi",href:r.A.raspberryPiUrl,children:"Raspberry Pi Foundation"}),t?(0,a.jsxs)(i.Fragment,{children:[" ",n("project.footer.license.under")," ",(0,a.jsx)("a",{className:"c-project-footer__link c-project-footer__link--creative-commons",href:r.A.creativeCommonsUrl,children:"Creative Commons license"}),".",(0,a.jsx)("br",{}),(0,a.jsx)("a",{className:"c-project-footer__link c-project-footer__link--github",href:t,children:n("project.footer.license.link.text")})]}):null]})}))},66915:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(65043);class i extends r.Component{constructor(){super(...arguments),this.state={waiting:!0}}componentDidMount(){this.timer=setTimeout((()=>{this.setState({waiting:!1})}),this.props.wait)}componentWillUnmount(){clearTimeout(this.timer)}render(){return this.state.waiting?null:this.props.children}}i.defaultProps={wait:250};const o=i;var a=n(70579);const s=250,u=e=>{let{display:t=!0,delay:n=s}=e;return(0,a.jsx)(o,{wait:n,children:(0,a.jsx)("div",{className:"computer display-".concat(t),children:(0,a.jsx)("div",{className:"screen"})})})}},10509:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(60170),i=n(15792),o=(n(65043),n(47065));var a=n(70579);const s=()=>{let e,t,n=[],r=Math.ceil(10*Math.random())+5;for(let i=0;i{let{error:t,t:n}=e;if(!t)return(0,a.jsx)("div",{});let o=n("no-match.title.text");return t.status!==r.A.notFoundStatus&&(o=n("error-boundary.message")),(0,a.jsx)("div",{className:"c-error c-error--".concat(t.status),children:(0,a.jsxs)("div",{className:"c-error__wrapper u-clearfix",children:[(0,a.jsx)("div",{className:"c-error__image",children:(0,a.jsx)("span",{className:"c-error__screen",children:s()})}),(0,a.jsxs)("div",{className:"c-error__body",children:[(0,a.jsx)(i.tw,{element:"h1",children:o}),t.status===r.A.notFoundStatus?"":(0,a.jsx)(i.Ab,{element:"p",children:n("no-match.message.notified")}),(0,a.jsx)(i.Ab,{element:"p",children:n("no-match.message.text")}),(0,a.jsx)(i.$n,{to:"/",children:n("no-match.button.text")})]})]})})}))},15814:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c});var r=n(64600),i=n.n(r);n(65043);var o=n(70579);const a=e=>Object.keys(e).map((t=>(0,o.jsx)("option",{value:t,children:e[t]},t))),s=e=>{let{changeHandler:t,className:n,label:r,name:s,options:u,value:l,blankText:c}=e;return(0,o.jsxs)("select",{"aria-label":r,className:i()(n,"c-dropdown"),name:s,onChange:e=>t(e.target.value),value:l,children:[Boolean(c)&&(0,o.jsxs)("option",{children:["-- ",c," --"]}),a(u)]})};var u=n(77629),l=n(47065);const c=(0,l.Tl)("translations")((e=>{let{i18n:t,t:n,filter:r}=e;const i=n("language-selector.options",{returnObjects:!0});let a=r?r(i):i;return(0,o.jsx)(s,{changeHandler:e=>((e,t)=>{if(!t)return null;let n=window.location.pathname.split("/");return n[1]=t,n=n.join("/"),(0,u.A)(e).push({pathname:n}),null})(t,e),label:n("language-selector.label"),name:"locale",options:{...a},value:t.language,blankText:n("language-selector.label")})}))},92910:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(65043),i=n(32292),o=n(47896),a=n(47065),s=n(35475),u=n(15814),l=n(64600),c=n.n(l),f=n(70579);const p=e=>{const{listKey:t,locale:n,linkTo:r,external:i=!1,onClick:o,className:a="",translateKey:u,t:l}=e,p=n?"/".concat(n,"/").concat(r):r,d={className:c()("c-site-header__nav-link",a),...i||o?{href:p}:{to:p},...o&&{onClick:o}},h=i||o?(0,f.jsx)("a",{...d,children:l("navigation.".concat(u))}):(0,f.jsx)(s.N_,{...d,children:l("navigation.".concat(u))});return(0,f.jsx)("li",{className:"c-site-header-nav__item","data-js":"nav-item","data-section":t,children:h})};var d=n(40500),h=n(43761),g=n(22166),v=n(10936),y=n(63114);const m=e=>{e.preventDefault(),localStorage.setItem("authReturnUrl",window.location.href),d.NU.signinRedirect()},b=(e,t)=>n=>{var r;n.preventDefault(),e("sessionProgress",{path:"/"}),d.NU.signoutRedirect({id_token_hint:null===t||void 0===t||null===(r=t.user)||void 0===r?void 0:r.id_token}),d.NU.removeUser()},w=(0,a.Tl)("translations")((0,g.Ng)((e=>{const{authentication:t}=e;return{authentication:t}}))((e=>{let{authentication:t,dispatch:n,locale:i,t:o}=e;const[a,s,u]=(0,h.A)(["sessionProgress"]),[l,c]=(0,r.useState)("loggedOut"),d={loggedIn:{yourProjects:{to:"projects/progress",locale:i,className:"c-site-header__nav-link--button"},profile:{to:"https://my.raspberrypi.org/profile/edit",external:!0},logout:{to:"logout",onClick:b(u,t)}},loggedOut:{login:{to:"login",onClick:m}}};return(0,r.useEffect)((()=>{var e;null!==t&&void 0!==t&&null!==(e=t.user)&&void 0!==e&&e.access_token&&a.sessionProgress&&n((e=>{let{session_progress:t,authToken:n}=e;return(0,y.j)({endpoint:"/reconcile_users_badges",method:"POST",types:[v.ob,v.dw,v.TU],data:{session_progress:t},authToken:n})})({session_progress:a.sessionProgress,authToken:t.user.access_token}))}),[t,a.sessionProgress,n]),(0,r.useEffect)((()=>{t.user?c("loggedIn"):c("loggedOut")}),[t.user]),(0,f.jsx)(f.Fragment,{children:Object.entries(d[l]).map((e=>{let[t,n]=e;return(0,f.jsx)(p,{listKey:"".concat(t,"-item"),linkTo:n.to,translateKey:t,t:o,...n.external&&{external:n.external},...n.onClick&&{onClick:n.onClick},...n.locale&&{locale:i},...n.className&&{className:n.className}},"".concat(t,"-item"))}))})})));const _=n.p+"static/media/rpf.4913a547895720ff30c1e24890f9b0e8.svg",S={pathways:{to:"paths"},projects:{to:"projects"}},E=e=>{let{navItemKey:t,locale:n,t:i}=e;const a=(0,r.useRef)(null);return(0,f.jsx)("div",{role:"button",onKeyDown:e=>{var t;return"Enter"===e.key?null===(t=a.current)||void 0===t?void 0:t.click():null},tabIndex:0,children:(0,f.jsxs)("label",{className:"c-site-header__dropdown",children:[(0,f.jsx)("input",{className:"c-site-header__nav-link c-site-header__dropdown-button u-hidden",type:"checkbox",ref:a}),(0,f.jsxs)("div",{className:"c-site-header__dropdown-background",children:[i("navigation.".concat(t)),(0,f.jsx)(o.A,{type:"arrow-down",className:"c-site-header__toggle-trigger-icon"})]}),(0,f.jsx)("ul",{className:"c-site-header__dropdown-content",children:Object.entries(S[t].dropdown).map((e=>{let[r,o]=e;return(0,f.jsx)(p,{listKey:"".concat(t,"__").concat(r,"-dropdown-link"),locale:n,linkTo:o.to,translateKey:r,t:i},"".concat(t,"__").concat(r,"-dropdown-link"))}))}),(0,f.jsx)("ul",{className:"c-site-header__nested-links",children:Object.entries(S[t].dropdown).map((e=>{let[r,o]=e;return(0,f.jsx)(p,{listKey:"".concat(t,"__").concat(r,"-nested-link"),locale:n,linkTo:o.to,translateKey:r,t:i},"".concat(t,"__").concat(r,"-nested-link"))}))})]})})},x=(0,a.Tl)("translations")((e=>{let{i18n:t,t:n}=e;const o=(0,s.ok)()[0].get("branch")||"",[a,l]=(0,r.useState)(!1);return(0,f.jsxs)("header",{className:"c-site-header",id:"c-site-header",role:"banner","data-nav-open":a,children:[(0,f.jsx)("a",{className:"c-site-header__skiptocontent-link",href:"#skiptocontent",children:"Skip to main content"}),(0,f.jsxs)("div",{className:"c-site-header__container",children:[(0,f.jsx)("div",{className:"c-site-header__home-link",children:(0,f.jsx)("a",{className:"c-site-header__rpf-link",href:"https://raspberrypi.org",children:(0,f.jsx)("img",{alt:"Raspberry Pi Foundation",className:"c-site-header__rpf-logomark",src:_,"aria-label":"Raspberry Pi Foundation home page"})})}),(0,f.jsx)("div",{className:"c-site-header__toggle",children:(0,f.jsx)("button",{"aria-label":"Open Navigation",onClick:()=>{l(!a)},"aria-pressed":a,className:"c-site-header__toggle-button",type:"button"})}),(0,f.jsx)("div",{className:"site-header__nav",children:(0,f.jsx)("nav",{"aria-label":"Navigation",className:"site-header-nav","data-js":"nav","data-active-panel":"",children:(0,f.jsxs)("ul",{className:"c-site-header-nav__list",children:[(0,f.jsx)(p,{listKey:"home-item",locale:t.language,linkTo:"",translateKey:"home",t:n},"home-item"),(0,f.jsxs)(r.Fragment,{children:[Object.entries(S).map((e=>{let[r,i]=e;return null!==i&&void 0!==i&&i.to?(0,f.jsx)(p,{listKey:"".concat(r,"-item"),locale:t.language,linkTo:i.to,translateKey:r,t:n},"".concat(r,"-item")):(0,f.jsx)("li",{className:"c-site-header-nav__item","data-js":"nav-item","data-section":r,children:(null===i||void 0===i?void 0:i.dropdown)&&(0,f.jsx)(E,{navItemKey:r,locale:t.language,t:n})},"".concat(r,"-item"))})),(0,f.jsx)(w,{className:"c-site-header__nav-link",locale:t.language})]})]})})}),(0,f.jsxs)("div",{className:"c-site-header__language-selector",children:[(0,f.jsx)("span",{className:"c-site-header__language-selector--language",children:n("language-selector.language")}),(0,f.jsx)(u.Ay,{})]})]}),o&&(0,f.jsx)(i.l,{text:"".concat(n("dev.branch_banner"),": ").concat(o)})]})}))},7146:(e,t,n)=>{"use strict";n.d(t,{Cb:()=>l,DB:()=>f,If:()=>d,OM:()=>c,Rv:()=>a,gJ:()=>o,lm:()=>y,q$:()=>s,sJ:()=>v,t8:()=>g});const r=n(10617),i="syntax-highlighted",o=()=>{window.Prism.plugins.NormalizeWhitespace.setDefaults({"left-trim":!1,"remove-indent":!1}),window.Prism.hooks.add("before-highlight",(e=>{e.code=e.code.replace(/^\n+/,"")})),window.Prism.hooks.add("after-highlight",(e=>{e.element.classList.add(i)}))},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=['pre code:not([class*="language-blocks"])','code[class*="language-"]:not([class*="language-blocks"])'].join(", "),r=e.querySelectorAll(n);if(r.length>0)for(const o of r)!t&&o.classList.contains(i)||Prism.highlightElement(o)},s=e=>"undefined"!==typeof e.challenge&&e.challenge,u=e=>e.classList.contains("js-project-panel--initialise-swiper")||e.classList.contains("js-project-panel--swiper-initialised"),l=e=>"string"===typeof(null===e||void 0===e?void 0:e.knowledgeQuiz),c=e=>{var t,n;return"undefined"!==typeof e.completion&&"Array"===(null===(t=e.completion)||void 0===t||null===(n=t.constructor)||void 0===n?void 0:n.name)&&e.completion.includes("external")&&!e.quiz&&"string"!==typeof e.knowledgeQuiz},f=e=>"string"===typeof(null===e||void 0===e?void 0:e.badgeTemplateId)&&"string"===typeof(null===e||void 0===e?void 0:e.providerId),p=e=>{const t=e.target;if(!t.classList.contains("js-project-panel__toggle"))return;t.classList.toggle("c-project-panel__heading--has-close-icon");const n=t.nextElementSibling;n.classList.toggle("u-hidden"),n.classList.contains("u-hidden")||a(n,!0),u(n)&&(e=>{const t=e.querySelector(".c-project-panel__swiper");null!==t&&(new r(t,{a11y:!0,containerModifierClass:"c-project-panel__swiper--",navigation:{disabledClass:"c-project-panel__swiper-button--disabled",nextEl:t.querySelector(".c-project-panel__swiper-button--next"),prevEl:t.querySelector(".c-project-panel__swiper-button--prev")},pagination:{clickable:!0,bulletActiveClass:"c-project-panel__swiper-bullet--active",bulletClass:"c-project-panel__swiper-bullet",el:t.querySelector(".c-project-panel__swiper-pagination"),hideOnClick:!1,type:"bullets"},setWrapperSize:!0,slideClass:"c-project-panel__swiper-slide",spaceBetween:80,wrapperClass:"c-project-panel__swiper-wrapper"}),e.classList.remove("js-project-panel--initialise-swiper"),e.classList.add("js-project-panel--swiper-initialised"))})(n),m(e,u(n))},d=()=>{const e=document.querySelectorAll(".scratch-preview iframe");for(let t of e)t.parentNode.removeChild(t)},h=e=>{const t=e.target,n=document.querySelector(".c-project-quiz__content"),r=document.querySelectorAll(".c-project-quiz__label"),i=document.querySelectorAll(".c-project-quiz__input"),o=document.createElement("div");if(t.classList.contains("c-project-quiz__label")){t.classList.add("c-project-quiz__label--active"),t.nextElementSibling.classList.add("c-project-quiz__input--active");for(let e of r)e.classList.contains("c-project-quiz__label--active")||e.classList.add("c-project-quiz__label--disabled");for(let e of i)e.classList.contains("c-project-quiz__input--active")||(e.disabled=!0,n.removeEventListener("click",h));o.classList.add("c-project-quiz__thank-you-box"),o.innerHTML="Thank you!",n.appendChild(o)}},g=()=>{a(),(()=>{const e=document.querySelector(".c-project-quiz__content");null!==e&&e.addEventListener("click",h)})(),(()=>{const e=document.querySelector(".c-project__content");null!==e&&e.addEventListener("click",p)})()},v=e=>e?parseInt(e,10):0,y=(e,t)=>e>t?"left":"right",m=(e,t)=>{const n=e.target.textContent.trim();window.ga&&window.ga("send",{hitType:"event",eventCategory:"Project ".concat(t?"hint":"ingredient"),eventAction:"Clicked ".concat(t?"hint":"ingredient ".concat(n)),eventLabel:e.target.baseURI})}},40500:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,F0:()=>i.OidcProvider,Ff:()=>i.reducer,Fq:()=>i.CallbackComponent,JM:()=>s,NU:()=>u});var r=n(66958),i=n(41817);const o="".concat(window.location.protocol,"//").concat(window.location.hostname).concat(window.location.port?":".concat(window.location.port):""),a={client_id:"projects",redirect_uri:"".concat(o,"/rpi/callback"),post_logout_redirect_uri:o,response_type:"code",scope:"openid profile force-consent allow-u13-login",authority:"https://auth-v1.raspberrypi.org",silent_redirect_uri:"".concat(o,"/rpi/silent_renew"),automaticSilentRenew:!0,filterProtocolClaims:!1,loadUserInfo:!1,monitorSession:!1,userStore:new r.WebStorageStateStore({store:window.localStorage}),extraQueryParams:{brand:"projects",login_options:"v1_signup"}},s={brand:"projects",login_options:"force_signup,v1_signup"},u=(0,i.createUserManager)(a);u.events.addAccessTokenExpired((()=>{u.signinSilent()}));const l=e=>{(0,i.loadUser)(e,u)}},60170:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={okStatus:200,createdStatus:201,noContentStatus:204,redirectedStatus:300,notFoundStatus:404,internalServerErrorStatus:500,initialScrollDuration:150,stepScrollDuration:250,transitionEnterTimeout:325,transitionExitTimeout:325,creativeCommonsUrl:"https://creativecommons.org/licenses/by-sa/4.0/",raspberryPiUrl:"https://www.raspberrypi.org",projectCompleteSlug:"complete",projectCompleteTitle:"Project Complete",reducers:{badge:{initialState:{badge:{},badgeFetched:!1,error:null,loading:!1,issued:!1}},collections:{initialState:{entities:{},error:null,ids:[],links:{},loading:!0,meta:{}}},collection:{initialState:{currentLocale:"en",error:null,loading:!0,title:"",description:"",pathways:[],additionalPathways:[]}},featured:{initialState:{currentLocale:"en",error:null,ids:[],loading:!1,entities:{}}},pathway:{initialState:{currentLocale:"en",description:"",error:null,loading:!0,projectsIds:[],title:"",slug:"",header:[]}},progress:{initialState:{currentLocale:"en",currentStep:0,error:null,loading:!1,sending:!1,sent:!0,slug:null}},project:{initialState:{currentLocale:"en",currentStepPosition:0,error:null,loading:!0,project:{},projectFetched:0,slideDirection:"left",slug:null}},quiz:{initialState:{currentLocale:"en",error:null,fullPath:"",loading:!1,passScore:0,questions:[],slideDirection:"left"}},quizAttempt:{initialState:{user_id:0,session_id:"0",id:null,locale:"en",quiz_length:0,quiz_version:1,skipped:0,correct:0,incorrect:0,completed:!1,currentQuestion:0,answers:{}}},user:{initialState:{error:null,loading:!1}}}}},77629:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(40344),i=n.n(r),o=n(22740),a=n.n(o);function s(e){return"/"===e.charAt(0)}function u(e,t){for(var n=t,r=n+1,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],r=t&&t.split("/")||[],i=e&&s(e),o=t&&s(t),a=i||o;if(e&&s(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var l=void 0;if(r.length){var c=r[r.length-1];l="."===c||".."===c||""===c}else l=!1;for(var f=0,p=r.length;p>=0;p--){var d=r[p];"."===d?u(r,p):".."===d?(u(r,p),f++):f&&(u(r,p),f--)}if(!a)for(;f--;f)r.unshift("..");!a||""===r[0]||r[0]&&s(r[0])||r.unshift("");var h=r.join("/");return l&&"/"!==h.substr(-1)&&(h+="/"),h};"function"===typeof Symbol&&Symbol.iterator;var c=function(e){return"/"===e.charAt(0)?e:"/"+e},f=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};a()(g,"Browser history needs a DOM");var t,n=window.history,r=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),o=!(-1===window.navigator.userAgent.indexOf("Trident")),s=e.forceRefresh,u=void 0!==s&&s,l=e.getUserConfirmation,p=void 0===l?m:l,x=e.keyLength,T=void 0===x?6:x,k=e.basename?"/"===(t=c(e.basename)).charAt(t.length-1)?t.slice(0,-1):t:"",C=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return i()(!k||f(a,k),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+k+'".'),k&&(a=function(e,t){return f(e,t)?e.substr(t.length):e}(a,k)),d(a,r,n)},O=function(){return Math.random().toString(36).substr(2,T)},A=h(),P=function(e){w(V,e),V.length=n.length,A.notifyListeners(V.location,V.action)},I=function(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(C(e.state))},j=function(){N(C(E()))},M=!1,N=function(e){if(M)M=!1,P();else{A.confirmTransitionTo(e,"POP",p,(function(t){t?P({action:"POP",location:e}):F(e)}))}},F=function(e){var t=V.location,n=L.indexOf(t.key);-1===n&&(n=0);var r=L.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(M=!0,U(i))},R=C(E()),L=[R.key],D=function(e){return k+function(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}(e)},U=function(e){n.go(e)},z=0,B=function(e){1===(z+=e)?(v(window,_,I),o&&v(window,S,j)):0===z&&(y(window,_,I),o&&y(window,S,j))},H=!1,V={length:n.length,action:"POP",location:R,createHref:D,push:function(e,t){i()(!("object"===("undefined"===typeof e?"undefined":b(e))&&void 0!==e.state&&void 0!==t),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o="PUSH",a=d(e,t,O(),V.location);A.confirmTransitionTo(a,o,p,(function(e){if(e){var t=D(a),s=a.key,l=a.state;if(r)if(n.pushState({key:s,state:l},null,t),u)window.location.href=t;else{var c=L.indexOf(V.location.key),f=L.slice(0,-1===c?0:c+1);f.push(a.key),L=f,P({action:o,location:a})}else i()(void 0===l,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=t}}))},replace:function(e,t){i()(!("object"===("undefined"===typeof e?"undefined":b(e))&&void 0!==e.state&&void 0!==t),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o="REPLACE",a=d(e,t,O(),V.location);A.confirmTransitionTo(a,o,p,(function(e){if(e){var t=D(a),s=a.key,l=a.state;if(r)if(n.replaceState({key:s,state:l},null,t),u)window.location.replace(t);else{var c=L.indexOf(V.location.key);-1!==c&&(L[c]=a.key),P({action:o,location:a})}else i()(void 0===l,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(t)}}))},go:U,goBack:function(){return U(-1)},goForward:function(){return U(1)},block:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=A.setPrompt(e);return H||(B(1),H=!0),function(){return H&&(H=!1,B(-1)),t()}},listen:function(e){var t=A.appendListener(e);return B(1),function(){B(-1),t()}}};return V};Object.assign;"function"===typeof Symbol&&Symbol.iterator,Object.assign;let T;const k=e=>(T||(T=x(),T.listen((t=>{const n=e.language,r=t.pathname.split("/")[1];r!==n&&e.changeLanguage(r)}))),T)},88844:(e,t,n)=>{"use strict";var r=n(32605),i=n(64600),o=n.n(i),a=n(65043),s=n(66915),u=n(10509),l=n(51554),c=n.n(l);const f=c()({loader:()=>Promise.all([n.e(735),n.e(412)]).then(n.bind(n,84094)),error:u.A,loading:s.A}),p=c()({loader:()=>n.e(709).then(n.bind(n,53704)),error:u.A,loading:s.A}),d=c()({loader:()=>Promise.all([n.e(35),n.e(382),n.e(922),n.e(831)]).then(n.bind(n,74148)),error:u.A,loading:s.A}),h=c()({loader:()=>Promise.all([n.e(35),n.e(382),n.e(922),n.e(831)]).then(n.bind(n,1344)),error:u.A,loading:s.A}),g=c()({loader:()=>Promise.all([n.e(875),n.e(624)]).then(n.bind(n,73270)),error:u.A,loading:s.A}),v=(c()({loader:()=>n.e(359).then(n.bind(n,61880)),error:u.A,loading:s.A}),c()({loader:()=>Promise.all([n.e(735),n.e(348),n.e(875),n.e(543)]).then(n.bind(n,33243)),error:u.A,loading:s.A})),y=c()({loader:()=>Promise.all([n.e(382),n.e(419)]).then(n.bind(n,3526)),error:u.A,loading:s.A}),m=c()({loader:()=>n.e(675).then(n.bind(n,67986)),error:u.A,loading:s.A}),b=c()({loader:()=>Promise.all([n.e(922),n.e(206)]).then(n.bind(n,21286)),error:u.A,loading:s.A}),w=c()({loader:()=>Promise.all([n.e(382),n.e(419)]).then(n.bind(n,43233)),error:u.A,loading:s.A}),_=c()({loader:()=>Promise.all([n.e(735),n.e(412)]).then(n.bind(n,47263)),error:u.A,loading:s.A}),S=c()({loader:()=>n.e(582).then(n.bind(n,17228)),error:u.A,loading:s.A});var E=n(65173),x=n.n(E),T=n(73216),k=n(70579);const C=["microbit-game-controller","n-days-of-christmas","sweet-shop-reaction-game"],O=e=>{let{to:t}=e;return window.location.replace(t),null};O.propTypes={to:x().string};const A=()=>C.map(((e,t)=>(0,k.jsx)(T.qh,{path:"/:locale/projects/".concat(e),element:(0,k.jsx)(O,{to:"https://github.com/raspberrypilearning/".concat(e)})},t))),P=e=>e.map((e=>(0,k.jsx)(T.qh,{path:e.from,element:(0,k.jsx)(T.C5,{to:e.to})},e.from))),I=[{from:"/en/projects/rpi-python-build-an-octapi",to:"/en/projects/build-an-octapi"},{from:"/en/projects/rpi-python-tweeting-babbage",to:"/en/projects/tweeting-babbage"},{from:"/en/projects/rpi-python-tweeting-babbage",to:"/en/projects/tweeting-babbage"},{from:"/en/projects/rpi-python-google-aiy",to:"/en/projects/google-voice-aiy"},{from:"/en/projects/rpi-python-gpio-music-box",to:"/en/projects/gpio-music-box"},{from:"/en/projects/rpi-python-hamster-party-cam",to:"/en/projects/hamster-party-cam"},{from:"/en/projects/rpi-python-octapi-public-key-cryptography",to:"/en/projects/octapi-public-key-cryptography"},{from:"/en/projects/rpi-python-parent-detector",to:"/en/projects/parent-detector"},{from:"/en/projects/rpi-python-whoopi-cushion",to:"/en/projects/whoopi-cushion"},{from:"/en/projects/generic-javascript-cat-meme-generator",to:"/en/projects/cat-meme-generator"},{from:"/en/projects/generic-scratch-space-maze",to:"/en/projects/space-maze"},{from:"/en/projects/rpi-python-people-in-space-indicator",to:"/en/projects/people-in-space-indicator"}],j=()=>P(I),M=["codeclub","coderdojo"],N=e=>{let{to:t}=e;return window.location.replace(t),null};N.propTypes={to:x().string};const F=()=>M.map(((e,t)=>(0,k.jsx)(T.qh,{path:"/:locale/".concat(e),element:(0,k.jsx)(N,{to:"https://codeclub.org/learn-to-code"})},t)));var R=n(10746),L=n(92910),D=n(60170),U=n(77629),z=n(47065),B=n(35475);const H=(0,z.Tl)("translations")((e=>{let{t:t}=e;return(0,k.jsxs)("div",{children:[(0,k.jsx)(L.A,{locale:"en"}),(0,k.jsx)(u.A,{error:{status:D.A.notFoundStatus,message:t("no-match.title.text")}}),(0,k.jsx)(R.A,{text:"project.footer.feedback.homepage.text",userID:"no-match-footer-user-id"})]})})),V=(0,z.Tl)("translations")((e=>{let{i18n:t}=e;return(0,k.jsx)(B.Kd,{history:(0,U.A)(t),children:(0,k.jsx)(a.Suspense,{fallback:(0,k.jsx)("p",{children:" Loading..."}),children:(0,k.jsxs)(T.BV,{children:[(0,k.jsx)(T.qh,{path:"rpi/silent_renew",element:(0,k.jsx)(p,{})}),j(),A(),(0,k.jsx)(T.qh,{path:"/",element:(0,k.jsx)(T.C5,{to:"/en"})}),(0,k.jsx)(T.qh,{path:"/:locale",element:(0,k.jsx)(d,{})}),(0,k.jsx)(T.qh,{path:"/:locale/exercises/:slug/:complete?",element:(0,k.jsx)(h,{})}),F(),(0,k.jsx)(T.qh,{path:"/:locale/paths",element:(0,k.jsx)(b,{})}),(0,k.jsx)(T.qh,{path:":locale/jam",element:(0,k.jsx)(T.C5,{to:"jam"})}),(0,k.jsx)(T.qh,{path:":locale/collections",element:(0,k.jsx)(b,{})}),(0,k.jsx)(T.qh,{path:":locale/collections/:slug",element:(0,k.jsx)(m,{})}),(0,k.jsx)(T.qh,{path:":locale/projects",element:(0,k.jsx)(w,{})}),(0,k.jsx)(T.qh,{path:":locale/projects/favourites",element:(0,k.jsx)(y,{tab:"favourites"})}),(0,k.jsx)(T.qh,{path:":locale/projects/progress",element:(0,k.jsx)(y,{tab:"progress"})}),(0,k.jsx)(T.qh,{path:":locale/projects/finished",element:(0,k.jsx)(y,{tab:"finished"})}),(0,k.jsx)(T.qh,{path:":locale/projects/:slug/print",element:(0,k.jsx)(_,{})}),(0,k.jsx)(T.qh,{path:":locale/projects/:slug/complete",element:(0,k.jsx)(v,{})}),(0,k.jsxs)(T.qh,{path:":locale/projects/:slug",children:[(0,k.jsx)(T.qh,{path:":position",element:(0,k.jsx)(v,{})}),(0,k.jsx)(T.qh,{path:"editor",element:(0,k.jsx)(S,{})}),(0,k.jsx)(T.qh,{index:!0,element:(0,k.jsx)(v,{})})]}),(0,k.jsx)(T.qh,{path:":locale/:pathwayType/:slug",element:(0,k.jsx)(g,{})}),(0,k.jsx)(T.qh,{path:"rpi/callback",element:(0,k.jsx)(f,{})}),(0,k.jsx)(T.qh,{element:(0,k.jsx)(H,{})})]})})})}));var q=n(43761),W=n(92073);const K=()=>{const[e,t]=(0,q.A)(["sessionProgress"]);return e.sessionProgress||t("sessionProgress",(0,W.A)(),{path:"/"}),null};var G=n(79728);const Y=(0,z.Tl)("translations")((e=>{let{i18n:t}=e;const n=o()("c-i18n-root",{"c-i18n-root--rtl":"rtl"===t.dir()});return(0,k.jsx)(r.u_,{state:{id:"GTM-PXJKRGC"},children:(0,k.jsxs)("div",{className:n,dir:t.dir(),children:[(0,k.jsx)(K,{}),(0,k.jsx)(G.Ay,{i18n:t}),(0,k.jsx)(V,{})]})})}));n(85393),n(89410),n(84312),n(68634),n(71450),n(81556),n(58414);const $="8.34.0",J=globalThis;function Q(e,t,n){const r=n||J,i=r.__SENTRY__=r.__SENTRY__||{},o=i[$]=i[$]||{};return o[e]||(o[e]=t())}const Z="production";function X(){return ee(J),J}function ee(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||$,t[$]=t[$]||{}}const te=Object.prototype.toString;function ne(e){switch(te.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return pe(e,Error)}}function re(e,t){return te.call(e)==="[object ".concat(t,"]")}function ie(e){return re(e,"ErrorEvent")}function oe(e){return re(e,"DOMError")}function ae(e){return re(e,"String")}function se(e){return"object"===typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ue(e){return null===e||se(e)||"object"!==typeof e&&"function"!==typeof e}function le(e){return re(e,"Object")}function ce(e){return"undefined"!==typeof Event&&pe(e,Event)}function fe(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function pe(e,t){try{return e instanceof t}catch(n){return!1}}function de(e){return!("object"!==typeof e||null===e||!e.__isVue&&!e._isVue)}const he=J,ge=80;function ve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",u=s.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||ge;for(;n&&o++1&&a+i.length*u+l.length>=f));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch(n){return""}}function ye(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(he.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(i&&i.length)i.forEach((e=>{r.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else{n.id&&r.push("#".concat(n.id));const e=n.className;if(e&&ae(e)){const t=e.split(/\s+/);for(const e of t)r.push(".".concat(e))}}const o=["aria-label","type","name","title","alt"];for(const a of o){const e=n.getAttribute(a);e&&r.push("[".concat(a,'="').concat(e,'"]'))}return r.join("")}const me="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,be=["debug","info","warn","error","log","assert","trace"],we={};function _e(e){if(!("console"in J))return e();const t=J.console,n={},r=Object.keys(we);r.forEach((e=>{const r=we[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const Se=Q("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return me?be.forEach((n=>{t[n]=function(){for(var t=arguments.length,r=new Array(t),i=0;i{J.console[n]("".concat("Sentry Logger ","[").concat(n,"]:"),...r)}))}})):be.forEach((e=>{t[e]=()=>{}})),t}));function Ee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.slice(0,t),"...")}function xe(e,t){if(!Array.isArray(e))return"";const n=[];for(let i=0;i2&&void 0!==arguments[2]&&arguments[2];return!!ae(e)&&(re(t,"RegExp")?t.test(e):!!ae(t)&&(n?e===t:e.includes(t)))}function ke(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).some((n=>Te(e,n,t)))}function Ce(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"===typeof i&&Ae(i,r),e[t]=i}function Oe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){me&&Se.log('Failed to add non-enumerable property "'.concat(t,'" to object'),e)}}function Ae(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Oe(e,"__sentry_original__",t)}catch(n){}}function Pe(e){return e.__sentry_original__}function Ie(e){if(ne(e))return{message:e.message,name:e.name,stack:e.stack,...Me(e)};if(ce(e)){const t={type:e.type,target:je(e.target),currentTarget:je(e.currentTarget),...Me(e)};return"undefined"!==typeof CustomEvent&&pe(e,CustomEvent)&&(t.detail=e.detail),t}return e}function je(e){try{return t=e,"undefined"!==typeof Element&&pe(t,Element)?ve(e):Object.prototype.toString.call(e)}catch(n){return""}var t}function Me(e){if("object"===typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Ne(e){return Fe(e,new Map)}function Fe(e,t){if(function(e){if(!le(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(t){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))"undefined"!==typeof e[i]&&(r[i]=Fe(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(Fe(e,t))})),r}return e}function Re(){const e=J,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(r){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function Le(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function De(e){const{message:t,event_id:n}=e;if(t)return t;const r=Le(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"":n||""}function Ue(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function ze(e,t){const n=Le(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function Be(e){if(e&&e.__sentry_captured__)return!0;try{Oe(e,"__sentry_captured__",!0)}catch(t){}return!1}function He(e){return Array.isArray(e)?e:[e]}function Ve(){return{traceId:Re(),spanId:Re().substring(16)}}const qe=1e3;function We(){return Date.now()/qe}const Ke=function(){const{performance:e}=J;if(!e||!e.now)return We;const t=Date.now()-e.now(),n=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/qe}();let Ge;(()=>{const{performance:e}=J;if(!e||!e.now)return void(Ge="none");const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=ifunction(e){return Ne({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&$e(n,e),n}function $e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ke(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Re()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}const Je="_sentrySpan";function Qe(e,t){t?Oe(e,Je,t):delete e[Je]}function Ze(e){return e[Je]}class Xe{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ve()}clone(){const e=new Xe;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Qe(e,Ze(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&$e(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"===typeof e?e(this):e,[n,r]=t instanceof et?[t.getScopeData(),t.getRequestSession()]:le(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:s,level:u,fingerprint:l=[],propagationContext:c}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),c&&(this._propagationContext=c),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Qe(this,void 0),this._attachments=[],this._propagationContext=Ve(),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"===typeof t?t:100;if(n<=0)return this;const r={timestamp:We(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ze(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Re();if(!this._client)return Se.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Re();if(!this._client)return Se.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Re();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Se.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const et=Xe;class tt{constructor(e,t){let n,r;n=e||new et,r=t||new et,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(r){throw this._popScope(),r}return fe(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function nt(){const e=ee(X());return e.stack=e.stack||new tt(Q("defaultCurrentScope",(()=>new et)),Q("defaultIsolationScope",(()=>new et)))}function rt(e){return nt().withScope(e)}function it(e,t){const n=nt();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function ot(e){return nt().withScope((()=>e(nt().getIsolationScope())))}function at(e){const t=ee(e);return t.acs?t.acs:{withIsolationScope:ot,withScope:rt,withSetScope:it,withSetIsolationScope:(e,t)=>ot(t),getCurrentScope:()=>nt().getScope(),getIsolationScope:()=>nt().getIsolationScope()}}function st(){return at(X()).getCurrentScope()}function ut(){return at(X()).getIsolationScope()}function lt(){return st().getClient()}const ct=50,ft="?",pt=/\(error: (.*)\)/,dt=/captureMessage|captureException/;function ht(){for(var e=arguments.length,t=new Array(e),n=0;ne[0]-t[0])).map((e=>e[1]));return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const i=[],o=e.split("\n");for(let a=t;a1024)continue;const t=pt.test(e)?e.replace(pt,"$1"):e;if(!t.match(/\S*Error: /)){for(const e of r){const n=e(t);if(n){i.push(n);break}}if(i.length>=ct+n)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(gt(t).function||"")&&t.pop();t.reverse(),dt.test(gt(t).function||"")&&(t.pop(),dt.test(gt(t).function||"")&&t.pop());return t.slice(0,ct).map((e=>({...e,filename:e.filename||gt(t).filename,function:e.function||ft})))}(i.slice(n))}}function gt(e){return e[e.length-1]||{}}const vt="";function yt(e){try{return e&&"function"===typeof e&&e.name||vt}catch(t){return vt}}function mt(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(n){return}}}function bt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return _t("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function wt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400;const r=bt(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wt(e,t-1,n):r;var i}function _t(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){const e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e=r){c[h]="[MaxProperties ~]";break}const e=p[h];c[h]=_t(h,e,u-1,r,i),f++}return a(t),c}var St;function Et(e){return new Tt((t=>{t(e)}))}function xt(e){return new Tt(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(St||(St={}));class Tt{constructor(e){Tt.prototype.__init.call(this),Tt.prototype.__init2.call(this),Tt.prototype.__init3.call(this),Tt.prototype.__init4.call(this),this._state=St.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new Tt(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Tt(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(St.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(St.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===St.PENDING&&(fe(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===St.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===St.RESOLVED&&e[1](this._value),this._state===St.REJECTED&&e[2](this._value),e[0]=!0)}))}}}const kt="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ct(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Tt(((i,o)=>{const a=e[r];if(null===t||"function"!==typeof a)i(t);else{const s=a({...t},n);kt&&a.id&&null===s&&Se.log('Event processor "'.concat(a.id,'" dropped event')),fe(s)?s.then((t=>Ct(e,t,n,r+1).then(i))).then(null,o):Ct(e,s,n,r+1).then(i).then(null,o)}}))}const Ot="sentry-",At=/^sentry-/;function Pt(e){const t=function(e){if(!e||!ae(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce(((e,t)=>{const n=It(t);return Object.entries(n).forEach((t=>{let[n,r]=t;e[n]=r})),e}),{});return It(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,t)=>{let[n,r]=t;if(n.match(At)){e[n.slice(Ot.length)]=r}return e}),{});return Object.keys(n).length>0?n:void 0}function It(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,t)=>{let[n,r]=t;return n&&r&&(e[n]=r),e}),{})}const jt="sentry.source",Mt="sentry.sample_rate",Nt="sentry.op",Ft="sentry.origin";const Rt="_sentryMetrics";function Lt(e){const t=e[Rt];if(!t)return;const n={};for(const[,[r,i]]of t){(n[r]||(n[r]=[])).push(Ne(i))}return n}const Dt=0,Ut=1;const zt=1;function Bt(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=qt(e);return Ne({parent_span_id:r,span_id:t,trace_id:n})}function Ht(e){return"number"===typeof e?Vt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Vt(e.getTime()):Ke()}function Vt(e){return e>9999999999?e/1e3:e}function qt(e){if(function(e){return"function"===typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}(e)){const{attributes:r,startTime:i,name:o,endTime:a,parentSpanId:s,status:u}=e;return Ne({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:Ht(i),timestamp:Ht(a)||void 0,status:Kt(u),op:r[Nt],origin:r[Ft],_metrics_summary:Lt(e)})}return{span_id:t,trace_id:n}}catch(t){return{}}}function Wt(e){const{traceFlags:t}=e.spanContext();return t===zt}function Kt(e){if(e&&e.code!==Dt)return e.code===Ut?"ok":e.message||"unknown_error"}const Gt="_sentryRootSpan";function Yt(e){return e[Gt]||e}const $t="_frozenDsc";function Jt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=Ne({environment:n.environment||Z,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Qt(e){const t=lt();if(!t)return{};const n=Jt(qt(e).trace_id||"",t),r=Yt(e),i=r[$t];if(i)return i;const o=r.spanContext().traceState,a=o&&o.get("sentry.dsc"),s=a&&Pt(a);if(s)return s;const u=qt(r),l=u.data||{},c=l[Mt];null!=c&&(n.sample_rate="".concat(c));const f=l[jt],p=u.description;return"url"!==f&&p&&(n.transaction=p),function(e){if("boolean"===typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=lt(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}()&&(n.sampled=String(Wt(r))),t.emit("createDsc",n,r),n}function Zt(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=t,u=Ne(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=Ne(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const c=Ne(i);c&&Object.keys(c).length&&(e.user={...c,...e.user});const f=Ne(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts});a&&(e.level=a);s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Bt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Qt(t),...e.sdkProcessingMetadata};const n=Yt(t),r=qt(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?He(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function Xt(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:u,fingerprint:l,eventProcessors:c,attachments:f,propagationContext:p,transactionName:d,span:h}=t;en(e,"extra",n),en(e,"tags",r),en(e,"user",i),en(e,"contexts",o),en(e,"sdkProcessingMetadata",s),a&&(e.level=a),d&&(e.transactionName=d),h&&(e.span=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function en(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function tn(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,u={...t,event_id:t.event_id||n.event_id||Re(),timestamp:t.timestamp||We()},l=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Z);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==i&&(e.dist=i);e.message&&(e.message=Ee(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=Ee(a.value,o));const s=e.request;s&&s.url&&(s.url=Ee(s.url,o))}(u,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(u,l),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=J._sentryDebugIds;if(!n)return;let r;const i=nn.get(t);i?r=i:(r=new Map,nn.set(t,r));const o=Object.entries(n).reduce(((e,n)=>{let i,[o,a]=n;const s=r.get(o);s?i=s:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const n=i[t];if(n.filename){e[n.filename]=a;break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=o[e.filename])}))}))}catch(a){}}(u,e.stackParser);const c=function(e,t){if(!t)return e;const n=e?e.clone():new et;return n.update(t),n}(r,n.captureContext);n.mechanism&&ze(u,n.mechanism);const f=i?i.getEventProcessors():[],p=Q("globalScope",(()=>new et)).getScopeData();if(o){Xt(p,o.getScopeData())}if(c){Xt(p,c.getScopeData())}const d=[...n.attachments||[],...p.attachments];d.length&&(n.attachments=d),Zt(u,p);return Ct([...f,...p.eventProcessors],u,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(r){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((e=>{let[t,r]=e;n.push({type:"sourcemap",code_file:t,debug_id:r})}))}(e),"number"===typeof a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:bt(e.data,t,n)}})))},...e.user&&{user:bt(e.user,t,n)},...e.contexts&&{contexts:bt(e.contexts,t,n)},...e.extra&&{extra:bt(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=bt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:bt(e.data,t,n)}}))));return r}(e,a,s):e)))}const nn=new WeakMap;function rn(e){if(e)return function(e){return e instanceof et||"function"===typeof e}(e)||function(e){return Object.keys(e).some((e=>on.includes(e)))}(e)?{captureContext:e}:e}const on=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function an(e,t){return st().captureException(e,rn(t))}function sn(e,t){return st().captureEvent(e,t)}function un(e){const t=lt(),n=ut(),r=st(),{release:i,environment:o=Z}=t&&t.getOptions()||{},{userAgent:a}=J.navigator||{},s=Ye({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),u=n.getSession();return u&&"ok"===u.status&&$e(u,{status:"exited"}),ln(),n.setSession(s),r.setSession(s),s}function ln(){const e=ut(),t=st(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),$e(e,n)}(n),cn(),e.setSession(),t.setSession()}function cn(){const e=ut(),t=st(),n=lt(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function fn(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ln():cn()}const pn=[];function dn(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach((e=>{e.isDefaultInstance=!0})),r=Array.isArray(n)?[...t,...n]:"function"===typeof n?He(n(t)):t;const i=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r),o=i.findIndex((e=>"Debug"===e.name));if(o>-1){const[e]=i.splice(o,1);i.push(e)}return i}function hn(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function gn(e,t,n){if(n[t.name])kt&&Se.log("Integration skipped because it was already installed: ".concat(t.name));else{if(n[t.name]=t,-1===pn.indexOf(t.name)&&"function"===typeof t.setupOnce&&(t.setupOnce(),pn.push(t.name)),t.setup&&"function"===typeof t.setup&&t.setup(e),"function"===typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"===typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}kt&&Se.log("Integration installed: ".concat(t.name))}}const vn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],yn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:vn],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(t){}return!1}(e))return kt&&Se.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(De(e))),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(r){}n&&n.value&&(t.push(n.value),n.type&&t.push("".concat(n.type,": ").concat(n.value)));return t}(e).some((e=>ke(e,t)))}(e,t.ignoreErrors))return kt&&Se.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(De(e))),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return kt&&Se.warn("Event dropped due to not having an error message, error type or stacktrace.\nEvent: ".concat(De(e))),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&ke(n,t)}(e,t.ignoreTransactions))return kt&&Se.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(De(e))),!0;if(function(e,t){if(!t||!t.length)return!1;const n=mn(e);return!!n&&ke(n,t)}(e,t.denyUrls))return kt&&Se.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(De(e),".\nUrl: ").concat(mn(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=mn(e);return!n||ke(n,t)}(e,t.allowUrls))return kt&&Se.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(De(e),".\nUrl: ").concat(mn(e))),!0;return!1}(t,o)?null:t}}};function mn(e){try{let n;try{n=e.exception.values[0].stacktrace.frames}catch(t){}return n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch(n){return kt&&Se.error("Cannot extract url for event ".concat(De(e))),null}}let bn;const wn=new WeakMap,_n=()=>({name:"FunctionToString",setupOnce(){bn=Function.prototype.toString;try{Function.prototype.toString=function(){const e=Pe(this),t=wn.has(lt())&&void 0!==e?e:this;for(var n=arguments.length,r=new Array(n),i=0;i{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!xn(e,t))return!1;if(!En(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Tn(t),r=Tn(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!xn(e,t))return!1;if(!En(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return kt&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}};function En(e,t){let n=mt(e),r=mt(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let i=0;i{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));st().update(t.initialScope);const n=new e(t);return function(e){st().setClient(e)}(n),n.init(),n}const Cn=J;function On(){if(!("fetch"in Cn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function An(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Pn={},In={};function jn(e,t){Pn[e]=Pn[e]||[],Pn[e].push(t)}function Mn(e,t){In[e]||(t(),In[e]=!0)}function Nn(e,t){const n=e&&Pn[e];if(n)for(const i of n)try{i(t)}catch(r){me&&Se.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(yt(i),"\nError:"),r)}}const Fn=J;const Rn=J;let Ln;function Dn(e){const t="history";jn(t,e),Mn(t,Un)}function Un(){if(!function(){const e=Fn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Fn&&!!Fn.history.pushState&&!!Fn.history.replaceState;return!t&&n}())return;const e=Rn.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r2?n[2]:void 0;if(i){const e=Ln,t=String(i);Ln=t;Nn("history",{from:e,to:t})}return e.apply(this,n)}}Rn.onpopstate=function(){const t=Rn.location.href,n=Ln;Ln=t;if(Nn("history",{from:n,to:t}),e)try{for(var r=arguments.length,i=new Array(r),o=0;o1&&void 0!==arguments[1]&&arguments[1];const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:u}=e;return"".concat(s,"://").concat(u).concat(t&&i?":".concat(i):"")+"@".concat(n).concat(o?":".concat(o):"","/").concat(r?"".concat(r,"/"):r).concat(a)}function Hn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Vn(e){const t="string"===typeof e?function(e){const t=zn.exec(e);if(!t)return void _e((()=>{console.error("Invalid Sentry Dsn: ".concat(e))}));const[n,r,i="",o="",a="",s=""]=t.slice(1);let u="",l=s;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Hn({host:o,pass:i,path:u,projectId:l,port:a,protocol:n,publicKey:r})}(e):Hn(e);if(t&&function(e){if(!me)return!0;const{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(Se.error("Invalid Sentry Dsn: ".concat(t," missing")),!0)))&&(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?!t||!isNaN(parseInt(t,10))||(Se.error("Invalid Sentry Dsn: Invalid port ".concat(t)),!1):(Se.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(Se.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1))}(t))return t}function qn(e){return[e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]]}function Wn(e,t){const[n,r]=e;return[n,[...r,t]]}function Kn(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Gn(e){return J.__SENTRY__&&J.__SENTRY__.encodePolyfill?J.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function Yn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"===typeof r?r="string"===typeof e?r+e:[Gn(r),e]:r.push("string"===typeof e?Gn(e):e)}for(const a of n){const[e,t]=a;if(i("\n".concat(JSON.stringify(e),"\n")),"string"===typeof t||t instanceof Uint8Array)i(t);else{let e;try{e=JSON.stringify(t)}catch(o){e=JSON.stringify(bt(t))}i(e)}}return"string"===typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(r)}function $n(e){const t="string"===typeof e.data?Gn(e.data):e.data;return[Ne({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Jn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Qn(e){return Jn[e]}function Zn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}class Xn extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warn";super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const er="7";function tr(e){const t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function nr(e,t){return n={sentry_key:e.publicKey,sentry_version:er,...t&&{sentry_client:"".concat(t.name,"/").concat(t.version)}},Object.keys(n).map((e=>"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n[e])))).join("&");var n}function rr(e,t,n){return t||"".concat(function(e){return"".concat(tr(e)).concat(e.projectId,"/envelope/")}(e),"?").concat(nr(e,n))}function ir(e,t,n,r){const i=Zn(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const a=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Bn(r)},...i&&{trace:Ne({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return qn(a,[[{type:o},e]])}const or="Not capturing exception because it's already been captured.";class ar{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Vn(e.dsn):kt&&Se.warn("No DSN provided, client will not send events."),this._dsn){const t=rr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){const r=Re();if(Be(e))return kt&&Se.log(or),r;const i={event_id:r,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){const i={event_id:Re(),...n},o=se(e)?e:String(e),a=ue(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(a.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){const r=Re();if(t&&t.originalException&&Be(t.originalException))return kt&&Se.log(or),r;const i={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){"string"!==typeof e.release?kt&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),$e(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):Et(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((e=>{let{name:t}=e;return t.startsWith("Spotlight")})))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];gn(this,e,this._integrations),t||hn(this,[e])}sendEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.emit("beforeSendEvent",e,t);let n=ir(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])n=Wn(n,$n(i));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const i=Zn(n);return qn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Bn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"===typeof n?n:1,i="".concat(e,":").concat(t);kt&&Se.log('Recording outcome: "'.concat(i,'"').concat(r>1?" (".concat(r," times)"):"")),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re(...n)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(kt&&Se.error("Error while sending event:",e),e))):(kt&&Se.error("Transport disabled"),Et({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&gn(e,t,n)})),n}(this,e),hn(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&($e(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Tt((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ut();const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),tn(i,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:n,spanId:r,parentSpanId:i,dsc:o}=t;e.contexts={trace:Ne({trace_id:n,span_id:r,parent_span_id:i}),...e.contexts};const a=o||Jt(n,this);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(kt){const t=e;"log"===t.logLevel?Se.log(t.message):Se.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=ur(e),a=sr(e),s=e.type||"error",u="before send for type `".concat(s,"`"),l="undefined"===typeof i?void 0:function(e){if("boolean"===typeof e)return Number(e);const t="string"===typeof e?parseFloat(e):e;if(!("number"!==typeof t||isNaN(t)||t<0||t>1))return t;kt&&Se.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(e)," of type ").concat(JSON.stringify(typeof e),"."))}(i);if(a&&"number"===typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),xt(new Xn("Discarding event because it's not included in the random sample (sampling rate = ".concat(i,")"),"log"));const c="replay_event"===s?"replay":s,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,f).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",c,e),new Xn("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:a}=t;if(sr(n)&&i)return i(n,r);if(ur(n)){if(n.spans&&a){const t=[];for(const r of n.spans){const n=a(r);n?t.push(n):e.recordDroppedEvent("before_send","span")}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}(this,r,n,t);return function(e,t){const n="".concat(t," must return `null` or a valid event.");if(fe(e))return e.then((e=>{if(!le(e)&&null!==e)throw new Xn(n);return e}),(e=>{throw new Xn("".concat(t," rejected with ").concat(e))}));if(!le(e)&&null!==e)throw new Xn(n);return e}(i,u)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",c,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new Xn("".concat(u," returned `null`, will not send event."),"log")}const i=n&&n.getSession();if(!o&&i&&this._updateSessionFromEvent(i,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof Xn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Xn("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((e=>{let[t,n]=e;const[r,i]=t.split(":");return{reason:r,category:i,quantity:n}}))}_flushOutcomes(){kt&&Se.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(kt&&Se.log("No outcomes to send"));if(!this._dsn)return void(kt&&Se.log("No dsn provided, will not send outcomes"));kt&&Se.log("Sending outcomes:",e);const t=(n=e,qn((r=this._options.tunnel&&Bn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||We(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}}function sr(e){return void 0===e.type}function ur(e){return"transaction"===e.type}function lr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[t],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"npm";const i=e._metadata||{};i.sdk||(i.sdk={name:"sentry.javascript.".concat(t),packages:n.map((e=>({name:"".concat(r,":@sentry/").concat(e),version:$}))),version:$}),e._metadata=i}const cr="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function fr(e,t){const n=hr(e,t),r={type:yr(t),value:mr(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function pr(e,t,n,r){const i=lt(),o=i&&i.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),s={__serialized__:wt(t,o)};if(a)return{exception:{values:[fr(e,a)]},extra:s};const u={exception:{values:[{type:ce(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:_r(t,{isUnhandledRejection:r})}]},extra:s};if(n){const t=hr(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function dr(e,t){return{exception:{values:[fr(e,t)]}}}function hr(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&gr.test(e.message))return 1;return 0}(t),i=function(e){if("number"===typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch(o){}return[]}const gr=/Minified React error #\d+;/i;function vr(e){return"undefined"!==typeof WebAssembly&&"undefined"!==typeof WebAssembly.Exception&&e instanceof WebAssembly.Exception}function yr(e){const t=e&&e.name;if(!t&&vr(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function mr(e){const t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:vr(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function br(e,t,n,r,i){let o;if(ie(t)&&t.error){return dr(e,t.error)}if(oe(t)||re(t,"DOMException")){const i=t;if("stack"in t)o=dr(e,t);else{const t=i.name||(oe(i)?"DOMError":"DOMException"),a=i.message?"".concat(t,": ").concat(i.message):t;o=wr(e,a,n,r),Ue(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":"".concat(i.code)}),o}if(ne(t))return dr(e,t);if(le(t)||ce(t)){return o=pr(e,t,n,i),ze(o,{synthetic:!0}),o}return o=wr(e,t,n,r),Ue(o,"".concat(t),void 0),ze(o,{synthetic:!0}),o}function wr(e,t,n,r){const i={};if(r&&n){const r=hr(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(se(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function _r(e,t){let{isUnhandledRejection:n}=t;const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const n=Object.keys(Ie(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Ee(r,t);for(let i=n.length;i>0;i--){const e=n.slice(0,i).join(", ");if(!(e.length>t))return i===n.length?e:Ee(e,t)}return""}(e),i=n?"promise rejection":"exception";if(ie(e))return"Event `ErrorEvent` captured as ".concat(i," with message `").concat(e.message,"`");if(ce(e)){const t=function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}(e);return"Event `".concat(t,"` (type=").concat(e.type,") captured as ").concat(i)}return"Object captured as ".concat(i," with keys: ").concat(r)}const Sr=J;let Er=0;function xr(){return Er>0}function Tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"===typeof t?t:e;if(Pe(e))return e}catch(i){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);const i=r.map((e=>Tr(e,t)));return e.apply(this,i)}catch(i){throw Er++,setTimeout((()=>{Er--})),function(){const e=at(X());for(var t=arguments.length,n=new Array(t),r=0;r{e.addEventProcessor((e=>(t.mechanism&&(Ue(e,void 0,void 0),ze(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),an(i)})),i}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(o){}Ae(r,e),Oe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(o){}return r}class kr extends ar{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};lr(t,"browser",["browser"],Sr.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Sr.document&&Sr.document.addEventListener("visibilitychange",(()=>{"hidden"===Sr.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=br(e,t,n&&n.syntheticException||void 0,r);return ze(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Et(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const o=wr(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Et(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(cr&&Se.warn("SDK not enabled, will not capture user feedback."));const t=function(e,t){let{metadata:n,tunnel:r,dsn:i}=t;const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!r&&!!i&&{dsn:Bn(i)}},a=function(e){return[{type:"user_report"},e]}(e);return qn(o,[a])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const Cr=1e3;let Or,Ar,Pr;function Ir(){if(!Rn.document)return;const e=Nn.bind(null,"dom"),t=jr(e,!0);Rn.document.addEventListener("click",t,!1),Rn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Rn[t]&&Rn[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Ce(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=jr(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(o){}return t.call(this,n,r,i)}})),Ce(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(i){}return e.call(this,t,n,r)}})))}))}function jr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(t){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Oe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Oe(r,"_sentryId",Re());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Ar)return!1;try{if(!e.target||e.target._sentryId!==Pr)return!1}catch(t){}return!0}(n)){e({event:n,name:i,global:t}),Ar=n.type,Pr=r?r._sentryId:void 0}clearTimeout(Or),Or=Rn.setTimeout((()=>{Pr=void 0,Ar=void 0}),Cr)}}const Mr="__sentry_xhr_v3__";function Nr(){if(!Rn.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=1e3*Ke(),i=ae(n[0])?n[0].toUpperCase():void 0,o=function(e){if(ae(e))return e;try{return e.toString()}catch(t){}return}(n[1]);if(!i||!o)return e.apply(t,n);t[Mr]={method:i,url:o,request_headers:{}},"POST"===i&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[Mr];if(e&&4===t.readyState){try{e.status_code=t.status}catch(n){}Nn("xhr",{endTimestamp:1e3*Ke(),startTimestamp:r,xhr:t})}};return"onreadystatechange"in t&&"function"===typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,o=t[Mr];return o&&ae(r)&&ae(i)&&(o.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[Mr];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return Nn("xhr",{startTimestamp:1e3*Ke(),xhr:t}),e.apply(t,n)}})}const Fr=100;function Rr(e,t){const n=lt(),r=ut();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Fr}=n.getOptions();if(o<=0)return;const a={timestamp:We(),...e},s=i?_e((()=>i(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}function Lr(){"console"in J&&be.forEach((function(e){e in J.console&&Ce(J.console,e,(function(t){return we[e]=t,function(){for(var t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]&&arguments[1]&&!function(){if("string"===typeof EdgeRuntime)return!0;if(!On())return!1;if(An(Cn.fetch))return!0;let e=!1;const t=Cn.document;if(t&&"function"===typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=An(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){me&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}()||Ce(J,"fetch",(function(t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i(e?e(t):Nn("fetch",{...s,endTimestamp:1e3*Ke(),response:t}),t)),(e=>{throw Nn("fetch",{...s,endTimestamp:1e3*Ke(),error:e}),ne(e)&&void 0===e.stack&&(e.stack=u,Oe(e,"framesToPop",1)),e}))}}))}function Ur(e,t){return!!e&&"object"===typeof e&&!!e[t]}function zr(e){return"string"===typeof e?e:e?Ur(e,"url")?e.url:e.toString?e.toString():"":""}const Br=["fatal","error","warning","log","info","debug"];function Hr(e){return"warn"===e?"warning":Br.includes(e)?e:"log"}function Vr(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function qr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Wr=1024,Kr=function(){const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}};return{name:"Breadcrumbs",setup(t){var n;e.console&&function(e){const t="console";jn(t,e),Mn(t,Lr)}(function(e){return function(t){if(lt()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Hr(t.level),message:xe(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message="Assertion failed: ".concat(xe(t.args.slice(1)," ")||"console.assert"),n.data.arguments=t.args.slice(1)}Rr(n,{input:t.args,level:t.level})}}(t)),e.dom&&(n=function(e,t){return function(n){if(lt()!==e)return;let r,i,o="object"===typeof t?t.serializeAttribute:void 0,a="object"===typeof t&&"number"===typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>Wr&&(cr&&Se.warn("`dom.maxStringLength` cannot exceed ".concat(Wr,", but a value of ").concat(a," was configured. Sentry will use ").concat(Wr," instead.")),a=Wr),"string"===typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ve(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!he.HTMLElement)return null;let t=e;for(let n=0;n<5;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(u){r=""}if(0===r.length)return;const s={category:"ui.".concat(n.name),message:r};i&&(s.data={"ui.component_name":i}),Rr(s,{event:n.event,name:n.name,global:n.global})}}(t,e.dom),jn("dom",n),Mn("dom",Ir)),e.xhr&&function(e){jn("xhr",e),Mn("xhr",Nr)}(function(e){return function(t){if(lt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Mr];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:u}=i,l={method:o,url:a,status_code:s},c={xhr:t.xhr,input:u,startTimestamp:n,endTimestamp:r};Rr({category:"xhr",data:l,type:"http",level:Vr(s)},c)}}(t)),e.fetch&&function(e,t){const n="fetch";jn(n,e),Mn(n,(()=>Dr(void 0,t)))}(function(e){return function(t){if(lt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Rr({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,i={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Rr({category:"fetch",data:i,type:"http",level:Vr(i.status_code)},o)}}}(t)),e.history&&Dn(function(e){return function(t){if(lt()!==e)return;let n=t.from,r=t.to;const i=qr(Sr.location.href);let o=n?qr(n):void 0;const a=qr(r);o&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),Rr({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(e){return function(t){lt()===e&&Rr({category:"sentry.".concat("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:De(t)},{event:t})}}(t))}}};const Gr=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yr=function(){const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&Ce(Sr,"setTimeout",$r),e.setInterval&&Ce(Sr,"setInterval",$r),e.requestAnimationFrame&&Ce(Sr,"requestAnimationFrame",Jr),e.XMLHttpRequest&&"XMLHttpRequest"in Sr&&Ce(XMLHttpRequest.prototype,"send",Qr);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Gr).forEach(Zr)}}}};function $r(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r{e in t&&"function"===typeof t[e]&&Ce(t,e,(function(t){const n={mechanism:{data:{function:e,handler:yt(t)},handled:!1,type:"instrument"}},r=Pe(t);return r&&(n.mechanism.data.handler=yt(r)),Tr(t,n)}))}));for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:{}};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(!function(e){!function(e){const t="error";jn(t,e),Mn(t,ei)}((t=>{const{stackParser:n,attachStacktrace:r}=oi();if(lt()!==e||xr())return;const{msg:i,url:o,line:a,column:s,error:u}=t,l=function(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,f=ae(t)&&t.length>0?t:function(){try{return he.document.location.href}catch(e){return""}}();0===u.length&&u.push({colno:l,filename:f,function:ft,in_app:!0,lineno:c});return e}(br(n,u||i,void 0,r,!1),o,a,s);l.level="error",sn(l,{originalException:u,mechanism:{handled:!1,type:"onerror"}})}))}(t),ii("onerror")),e.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";jn(t,e),Mn(t,ni)}((t=>{const{stackParser:n,attachStacktrace:r}=oi();if(lt()!==e||xr())return;const i=function(e){if(ue(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return e}(t),o=ue(i)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(i))}]}}:br(n,i,void 0,r,!0);o.level="error",sn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t),ii("onunhandledrejection"))}}};function ii(e){cr&&Se.log("Global Handler attached: ".concat(e))}function oi(){const e=lt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ai=()=>({name:"HttpContext",preprocessEvent(e){if(!Sr.navigator&&!Sr.location&&!Sr.document)return;const t=e.request&&e.request.url||Sr.location&&Sr.location.href,{referrer:n}=Sr.document||{},{userAgent:r}=Sr.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}});function si(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;if(!o.exception||!o.exception.values||!a||!pe(a.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var u,l;s&&(o.exception.values=(u=ui(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,u.map((e=>(e.value&&(e.value=Ee(e.value,l)),e)))))}function ui(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let u=[...o];if(pe(r[i],Error)){li(a,s);const o=e(t,r[i]),l=u.length;ci(o,i,l,s),u=ui(e,t,n,r[i],i,[o,...u],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(pe(r,Error)){li(a,s);const l=e(t,r),c=u.length;ci(l,"errors[".concat(o,"]"),c,s),u=ui(e,t,n,r,i,[l,...u],l,c)}})),u}function li(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function ci(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const fi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();si(fr,o.stackParser,o.maxValueLength,n,t,e,r)}}};function pi(e,t,n,r){const i={filename:e,function:""===t?ft:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const di=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,hi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gi=/\((\S*)(?::(\d+))(?::(\d+))\)/,vi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,mi=ht(...[[30,e=>{const t=di.exec(e);if(t){const[,e,n,r]=t;return pi(e,ft,+n,+r)}const n=hi.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=gi.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=bi(n[1]||ft,n[2]);return pi(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=vi.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=yi.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||ft;return[n,e]=bi(n,e),pi(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),bi=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ft,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},wi="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,_i={};function Si(e){const t=_i[e];if(t)return t;let n=Rn[e];if(An(n))return _i[e]=n.bind(Rn);const r=Rn.document;if(r&&"function"===typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(i){wi&&Se.warn("Could not create sandbox iframe for ".concat(e," check, bailing to window.").concat(e,": "),i)}return n?_i[e]=n.bind(Rn):n}function Ei(e){_i[e]=void 0}function xi(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new Tt(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Et(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}const Ti=6e4;function ki(e,t){let{statusCode:n,headers:r}=t,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();const o={...e},a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a)for(const u of a.trim().split(",")){const[e,t,,,n]=u.split(":",5),r=parseInt(e,10),a=1e3*(isNaN(r)?60:r);if(t)for(const s of t.split(";"))"metric_bucket"===s&&n&&!n.split(";").includes("custom")||(o[s]=i+a);else o.all=i+a}else s?o.all=i+function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();const n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;const r=Date.parse("".concat(e));return isNaN(r)?Ti:r-t}(s,i):429===n&&(o.all=i+6e4);return o}const Ci=64;function Oi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:xi(e.bufferSize||Ci),r={};return{send:function(i){const o=[];if(Kn(i,((t,n)=>{const i=Qn(n);if(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=Ai(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return Et({});const a=qn(i[0],o),s=t=>{Kn(a,((n,r)=>{const i=Ai(n,r);e.recordDroppedEvent(t,Qn(r),i)}))};return n.add((()=>t({body:Yn(a)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&kt&&Se.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=ki(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof Xn)return kt&&Se.error("Skipped sending event because buffer is full."),s("queue_overflow"),Et({});throw e}))},flush:e=>n.drain(e)}}function Ai(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function Pi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Si("fetch"),n=0,r=0;return Oi(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Ei("fetch"),xt("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(s){return Ei("fetch"),n-=o,r--,xt(s)}}))}function Ii(){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={defaultIntegrations:[yn(),_n(),Yr(),Kr(),ri(),fi(),Sn(),ai()],release:"string"===typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Sr.SENTRY_RELEASE&&Sr.SENTRY_RELEASE.id?Sr.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});if(function(){const e="undefined"!==typeof Sr.window&&Sr;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,r=Sr.location&&Sr.location.href||"",i=!!n&&Sr===Sr.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>r.startsWith("".concat(e,"//")))),o="undefined"!==typeof e.nw;return!!n&&!i&&!o}())return void _e((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));cr&&(On()||Se.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const t={...e,stackParser:(n=e.stackParser||mi,Array.isArray(n)?ht(...n):n),integrations:dn(e),transport:e.transport||Pi};var n;const r=kn(kr,t);return e.autoSessionTracking&&function(){if("undefined"===typeof Sr.document)return void(cr&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));un({ignoreDuration:!0}),fn(),Dn((e=>{let{from:t,to:n}=e;void 0!==t&&t!==n&&(un({ignoreDuration:!0}),fn())}))}(),r}n(9454);var ji=n(84391),Mi=n(22166),Ni=n(64303),Fi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ri={INIT:"@@redux/INIT"+Fi(),REPLACE:"@@redux/REPLACE"+Fi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Fi()}};function Li(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Di(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zi(){for(var e=arguments.length,t=new Array(e),n=0;nt=>n=>{var r,i;const{authentication:o={}}=e.getState();Boolean(null===o||void 0===o||null===(r=o.user)||void 0===r||null===(i=r.profile)||void 0===i?void 0:i.uuid)&&(localStorage.setItem("authReturnUrl","/"),Bi.NU.signinRedirect());const a=(0,Hi.get)(n,"actions",{});if(a&&null!==n&&void 0!==n&&n.type&&(0,Hi.has)(a,n.type)){const r=(0,Hi.get)(a,n.type);if(null!==r&&void 0!==r&&r.action)return t(n),e.dispatch(r.action)}return t(n)},qi=e=>e.json().catch((()=>{})),Wi=e=>{if(e.status>=D.A.okStatus&&e.status1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data.attributes";if(!e.data)return null;if(!Array.isArray(e.data))return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data.attributes";const n={...(0,Hi.get)(e,t)};return e.data.relationships&&Object.keys(e.data.relationships).map((t=>n["".concat(t,"Ids")]=e.data.relationships[t].data.map((e=>e.id)))),n}(e,n);const r={meta:{},links:{}};return e.data&&e.data.forEach(((e,n)=>{r[e.type]=r[e.type]||{},e.attributes.id=e.id,t?r[e.type][e.id]=e.attributes:r[e.type][n]=e.attributes})),e.links&&(r.links=e.links),r},Yi="".concat("https://learning-admin.raspberrypi.org","/api/v1"),$i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"data.attributes",s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"included";const u=(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(t)?t:"".concat(Yi).concat(t),l={method:e,headers:{}},c=(e=>{let{data:t,parseResponse:n=!1}=e;return e=>n?{...t,...e}:t})({data:i,parseResponse:o.parseResponse});n&&(l.headers={Authorization:n});let f={};return"GET"===e?f=fetch(u,l).then(Wi).then(qi).then((e=>{const t=Object.assign({},Gi(e,r,a));return s in e&&(t.included=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"type",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"attributes";const r={};return Array.isArray(e)&&e.forEach((e=>{e[t]in r||(r[e[t]]=[]),r[e[t]].push(e[n])})),r}(e[s])),t})):(l.headers["Content-Type"]="application/json",l.body=JSON.stringify(i),f=fetch(u,l).then(Wi).then(qi).then(c)),f.catch((e=>(e.status&&e.status===D.A.notFoundStatus||function(e,t){const n="string"===typeof t?t:void 0,r="string"!==typeof t?{captureContext:t}:void 0;st().captureMessage(e,n,r)}("API Error",{extra:{error:e}}),e.status&&e.response?e.response.json().then((t=>Promise.reject({message:e.message,status:e.status,body:Object.assign({},Gi(t))}))):Promise.reject({message:e.message,status:null,body:{}}))))},Ji=(e,t)=>{const n=t[Ki.oE];if("undefined"===typeof n)return e(t);const{types:r,method:i,endpoint:o,authToken:a,mapIds:s,data:u,options:l={},normalizePath:c="data.attributes",actions:f,...p}=n;if(!Array.isArray(r)||3!==r.length)throw new Error("Expected an array of three action types.");if("string"!==typeof o)throw new Error("Specify a string endpoint URL.");const d=e=>{const n=Object.assign({},t,e);return delete n[Ki.oE],n},[h,g,v]=r;return e(d({type:h,...n})),$i(i,o,a,s,u,l,c).then((t=>{e(d({response:t,type:g,extras:p,actions:f}))}),(t=>{e(d({type:v,error:t||{message:"Something went wrong",status:500},actions:f}))}))},Qi=(e,t)=>{const r=t[Ki.uS];if("undefined"===typeof r)return e(t);const{types:i,slug:o,options:a={},actions:s,...u}=r;if(!Array.isArray(i)||3!==i.length)throw new Error("Expected an array of three action types.");const l=e=>{const n=Object.assign({},t,e);return delete n[Ki.uS],n},[c,f,p]=i;return e(l({type:c,...r})),(e=>{const t=new Promise(((t,r)=>{n(68524)("./".concat(e,"/manifest.json")).then((e=>{setTimeout((()=>t(e)),500)})).catch((()=>{r("manifest not found")}))})),r=new Promise(((t,r)=>{n(53351)("./".concat(e,"/code.js")).then((e=>{t(e.default)})).catch((()=>{r("Code not found")}))}));return Promise.all([t,r]).then((e=>{const t={...e[0],code:e[1]};return Promise.resolve(t)})).catch((e=>Promise.reject({message:"Not found",status:404,body:{}})))})(o).then((t=>{e(l({response:t,type:f,extras:u,actions:s}))}),(t=>{e(l({type:p,error:t||{message:"Something went wrong",status:500},actions:s}))}))},Zi=[()=>(0,Hi.curry)(Ji),()=>(0,Hi.curry)(Qi),Vi],Xi=(e,t)=>Object.assign({},e,t),eo=D.A.reducers.badge.initialState;const to=D.A.reducers.collection.initialState;const no=D.A.reducers.collections.initialState;const ro=D.A.reducers.collection.initialState;const io=D.A.reducers.collections.initialState;const oo=D.A.reducers.featured.initialState;const ao=D.A.reducers.pathway.initialState;const so=D.A.reducers.collections.initialState;const uo=D.A.reducers.collections.initialState;var lo=n(7146),co=n(81197);const fo=D.A.reducers.project.initialState;const po=D.A.reducers.progress.initialState;const ho=D.A.reducers.collections.initialState;const go=D.A.reducers.quiz.initialState;const vo=D.A.reducers.quizAttempt.initialState;const yo=function(e){for(var t=Object.keys(e),n={},r=0;r0&&void 0!==arguments[0]?arguments[0]:io,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.aJ:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.Bv:{const n=t.response.project||{},r=Object.values(n).map((e=>e.id));return Xi(e,{entities:n,ids:r,loading:!1})}case Ki.Wz:return Xi(e,{entities:{},error:t.error,ids:[],loading:!1});case Ki.Wf:case Ki.Gp:return Xi(e,{loading:!0});case Ki.Dm:{const n=e.ids.slice();return n.includes(t.response.id)||n.push(t.response.id.toString()),Xi(e,{entities:{...e.entities,[t.response.id]:{...e.entities[t.response.id]}},loading:!1,ids:n})}case Ki.VJ:{const n=e.ids.filter((e=>e!==t.response.id.toString())),{[t.response.id]:r,...i}=e.entities;return Xi(e,{entities:i,loading:!1,ids:n})}case Ki.vj:return Xi(e,{error:t.error,loading:!1});default:return e}},featured:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.op:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.dM:{const n=t.response.projects||[],r=Object.values(n).map((e=>e.id));return Xi(e,{entities:n,ids:r,loading:!1})}case Ki.MF:return Xi(e,{entities:{},error:t.error,ids:[],loading:!1});default:return e}},badge:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.Ez:return Xi(e,eo);case Ki.XB:return Xi(e,{error:null,loading:!0,badge:{},badgeFetched:!1,issued:!1});case Ki.Oz:return Xi(e,{badge:t.response,badgeFetched:!0,issued:!0,loading:!1});case Ki.b3:return Xi(e,{badge:t.response,badgeFetched:!0,issued:!1,loading:!1});case Ki.Nb:{const n=t.error.body||{};return Xi(e,{error:t.error,loading:!1,badge:n})}case Ki.QR:{const n=t.error.body||{};return Xi(e,{error:t.error,loading:!1,badge:n})}default:return e}},collection:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:to,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.o0:return Xi(e,{...D.A.reducers.collection.initialState,currentLocale:t.currentLocale||e.currentLocale,loading:!0});case Ki.Vj:{const{pathways:{data:n=[]}={},additionalPathways:{data:r=[]}={},pathwayProgress:i={},additionalPathwayProgress:o={},...a}=t.response||{},s=n.map((e=>{var t;let{id:n,attributes:r,relationships:o}=e;return{id:n,linkUrl:"/pathways/".concat(r.slug),heroImage:r.heroImage||"https://projects-static.raspberrypi.org/pathways/assets/".concat(r.slug,".png"),...r,relationships:o,progress:(null===(t=i[n])||void 0===t?void 0:t.steps)||[]}})),u=r.map((e=>{var t;let{id:n,attributes:r,relationships:i}=e;return{id:n,linkUrl:"/pathways/".concat(r.slug),heroImage:r.heroImage||"https://projects-static.raspberrypi.org/collections/assets/".concat(a.slug,"_placeholder.png"),...r,relationships:i,progress:(null===(t=o[n])||void 0===t?void 0:t.steps)||[]}}));return Xi(e,{...a,pathways:s,additionalPathways:u,loading:!1})}case Ki.Aq:return Xi(e,{...D.A.reducers.collection.initialState,error:t.error,loading:!1});default:return e}},collections:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:no,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.N1:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.Su:{const n=t.response.collections||{},r=Object.assign(...Object.entries(n).map((e=>{let[t,n]=e;return{[t]:{heroImage:"https://projects-static.raspberrypi.org/collections/assets/".concat(n.slug,".png"),...n}}})));return Xi(e,{entities:r,links:t.response.links,loading:!1,meta:t.response.meta})}case Ki.$Z:return Xi(e,{entities:{},error:t.error,links:{},loading:!1,meta:{}});default:return e}},exercise:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ro,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.i6:return Xi(e,{...D.A.reducers.collection.initialState,currentLocale:t.currentLocale||e.currentLocale,loading:!0});case Ki.po:{const{slug:n,...r}=t.response||{};return Xi(e,{...r,loading:!1})}case Ki.gT:return Xi(e,{...D.A.reducers.collection.initialState,error:t.error,loading:!1});default:return e}},pathway:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ao,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.If:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,description:"",error:null,loading:!0,projectsIds:[],title:"",slug:"",header:[]});case Ki.xX:{const n=t.response||{};return Xi(e,{...n,loading:!1})}case Ki.s:return Xi(e,{error:t.error,loading:!1,projectsIds:[]});default:return e}},pathways:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:so,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.nt:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.cp:{const n=t.response.pathways||{},r=Object.assign(...Object.entries(n).map((e=>{let[t,n]=e;return{[t]:{linkUrl:"/pathways/".concat(n.slug),heroImage:"https://projects-static.raspberrypi.org/pathways/assets/".concat(n.slug,".png"),...n}}})));return Xi(e,{entities:r,links:t.response.links,loading:!1,meta:t.response.meta})}case Ki.L3:return Xi(e,{entities:{},error:t.error,links:{},loading:!1,meta:{}});default:return e}},projectProgress:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:po,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.jm:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.kE:return Xi(e,{slug:t.response.repositoryName,currentStep:t.response.step,loading:!1});case Ki.d$:return Xi(e,{error:t.error,loading:!1});case Ki.jv:return Xi(e,{error:null,sending:!0,sent:!1});case Ki.U6:return Xi(e,{sending:!1,sent:!0,currentStep:t.response.step});case Ki.ul:return Xi(e,{error:t.error,sending:!1,sent:!0});case Ki.qi:return Xi(e,{sent:!1});default:return e}},progress:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:uo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.BC:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.kv:{const n=t.response.project||{},r=Object.values(n).map((e=>e.id));return Xi(e,{entities:n,ids:r,loading:!1})}case Ki.Lv:return Xi(e,{entities:{},error:t.error,ids:[],loading:!1});case Ki.jv:return Xi(e,{error:null,sending:!0,sent:!1});case Ki.U6:{const n=e.ids.slice(),r=t.response.projectId.toString();let i=n.indexOf(r);return-1===i&&(i=n.length,n.push(r)),Xi(e,{entities:{...e.entities,[i]:{...e.entities[i],currentStep:t.response.step,quizCompleted:t.response.quizCompleted||!1}},loading:!1,ids:n})}case Ki.ul:return Xi(e,{error:t.error,loading:!1});default:return e}},project:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.Fn:{const n=(0,lo.sJ)(t.currentStepPosition);return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,currentStepPosition:n,error:null,loading:!0,project:{},projectFetched:0,slideDirection:"left",slug:t.slug})}case Ki.qQ:{var n,r,i;const o=Xi(t.response.content,{id:t.response.id,locale:t.response.locale,archived:t.response.archived,unskippable:t.response.unskippable,included:null===(n=t.response)||void 0===n?void 0:n.included,pathwayStep:null===(r=t.response)||void 0===r?void 0:r.pathwayStep});return Xi(e,{nextStepTitle:o.steps[e.currentStepPosition+1]?o.steps[e.currentStepPosition+1].title:co.Ay.t("project.steps.navigation.whats-next"),previousStepTitle:null===(i=o.steps[e.currentStepPosition-1])||void 0===i?void 0:i.title,project:o,projectFetched:1,loading:!1})}case Ki.Tl:{const n=t.error.body||{},r=!!t.error.body;return Xi(e,{currentStepPosition:null,error:t.error,loading:!1,project:n,projectFetched:r&&t.error.body.availableLocales?1:-1,slug:null})}case Ki.qi:{var o;const n=(0,lo.sJ)(t.currentStepPosition),r=e.project.steps&&e.project.steps[n+1]?e.project.steps[n+1].title:co.Ay.t("project.steps.navigation.whats-next"),i=e.project.steps&&(null===(o=e.project.steps[n-1])||void 0===o?void 0:o.title),a=(0,lo.lm)(n,e.currentStepPosition);return Xi(e,{currentStepPosition:n,nextStepTitle:r,previousStepTitle:i,slideDirection:a})}default:return e}},projects:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ho,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.wD:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.jj:return Xi(e,{entities:t.response.projects||{},links:t.response.links,loading:!1,meta:t.response.meta});case Ki._w:return Xi(e,{entities:{},error:t.error,links:{},loading:!1,meta:{}});case Ki.mB:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.OF:return Xi(e,{entities:t.response.projects||{},links:t.response.links,loading:!1,meta:t.response.meta});case Ki.D9:return Xi(e,{entities:{},error:t.error,links:{},loading:!1,meta:{}});default:return e}},quiz:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:go,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.Bj:return Xi(e,{currentLocale:t.currentLocale||e.currentLocale,error:null,loading:!0});case Ki.qD:{const n=t.response.content||{};return Xi(n,{currentLocale:t.extras.currentLocale||e.currentLocale,fullPath:"".concat(t.extras.currentProject,"/quizzes/").concat(n.path),id:t.response.id,loading:!1,slideDirection:"left"})}case Ki.pf:return Xi(e,{error:t.error,loading:!1,questions:[]});default:return e}},quizAttempt:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ki.TA:return Xi(vo,{user_id:t.userId,session_id:t.sessionId,quiz_length:t.quizLength,quiz_version:t.quizVersion,locale:t.currentLocale||e.currentLocale});case Ki.gq:{const n=e.quiz_length,{questionNumber:r}=t,i=Math.min(Math.max(0,r),n);return Xi(e,{currentQuestion:i})}case Ki.lO:{const{question:n,answer:r,result:i,attempt:o}=t;return Xi(e,{...o,answers:{...e.answers,[n]:[...e.answers[n]||[],{answer:r,result:i}]}})}case Ki.OZ:return Xi(e,{error:null});case Ki.LY:{const n=t.response.attempt_id||e.id;return Xi(e,{id:n,error:null})}case Ki.FK:return Xi(e,{error:t.error});default:return e}},authentication:Bi.Ff});class mo extends a.Component{constructor(e){super(e),this.state={hasError:!1}}componentDidCatch(e,t){this.setState({hasError:!0}),an(e,{extra:t})}render(){return this.state.hasError?(0,k.jsx)(u.A,{error:{status:500,message:this.props.t("error-boundary.message")}}):this.props.children}}const bo=(0,z.Tl)("translations")(mo);var wo=n(48801),_o=n.n(wo),So=n(75641),Eo=n.n(So);const xo={name:"customDetector",lookup:()=>window.location.pathname.split("/")[1]},To=new(_o());To.addDetector(xo),co.Ay.use(Eo()).use(To).use(z.Rh).init({fallbackLng:"en",ns:["translations"],defaultNS:"translations",debug:!1,detection:{order:["customDetector"]},interpolation:{escapeValue:!1},react:{useSuspense:!0}});"container"in document.documentElement.style||n.e(119).then(n.bind(n,30119)),window.addEventListener("CookiebotOnConsentReady",(()=>{window.Cookiebot.consent.statistics&&n.e(621).then(n.bind(n,95621)).then((e=>e.init()))})),function(e){const t={...e};var n,r;lr(t,"react"),n="react",r={version:a.version},ut().setContext(n,r),Ii(t)}({dsn:"https://d40346592202445d84f573aae73cff38@sentry.io/182298"});const ko=function e(t,n,r){var i;if("function"===typeof n&&"function"===typeof r||"function"===typeof r&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"===typeof n&&"undefined"===typeof r&&(r=n,n=void 0),"undefined"!==typeof r){if("function"!==typeof r)throw new Error("Expected the enhancer to be a function.");return r(e)(t,n)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var o=t,a=n,s=[],u=s,l=!1;function c(){u===s&&(u=s.slice())}function f(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function p(e){if("function"!==typeof e)throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return c(),u.push(e),function(){if(t){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,c();var n=u.indexOf(e);u.splice(n,1)}}}function d(e){if(!Li(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,a=o(a,e)}finally{l=!1}for(var t=s=u,n=0;n{"use strict";n.d(t,{j:()=>i});var r=n(10936);const i=e=>{let{method:t="GET",endpoint:n,types:i,data:o={},...a}=e;return{[r.oE]:{method:t,endpoint:n,types:i,data:o,...a}}}},10936:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>f,Aq:()=>j,BC:()=>C,Bj:()=>Q,Bv:()=>b,D9:()=>k,Dm:()=>te,Ez:()=>H,FK:()=>de,Fn:()=>U,Gp:()=>ne,If:()=>R,L3:()=>h,LY:()=>pe,Lv:()=>A,MF:()=>E,N1:()=>l,Nb:()=>K,OF:()=>T,OZ:()=>fe,Oz:()=>q,QR:()=>G,Su:()=>c,TA:()=>i,TU:()=>ce,Tl:()=>B,U6:()=>ae,VJ:()=>re,Vj:()=>I,Wf:()=>ee,Wz:()=>w,XB:()=>V,_w:()=>y,aJ:()=>m,b3:()=>W,cp:()=>d,d$:()=>J,dM:()=>S,dw:()=>le,gT:()=>F,gq:()=>a,i6:()=>M,jj:()=>v,jm:()=>Y,jv:()=>oe,kE:()=>$,kv:()=>O,lO:()=>o,mB:()=>x,nt:()=>p,o0:()=>P,oE:()=>s,ob:()=>ue,op:()=>_,pf:()=>X,po:()=>N,qD:()=>Z,qQ:()=>z,qi:()=>r,s:()=>D,uS:()=>u,ul:()=>se,vj:()=>ie,wD:()=>g,xX:()=>L});const r="SET_PROJECT_STEP",i="INIT_QUIZ_ATTEMPT",o="ADD_ANSWER_TO_CURRENT_ATTEMPT",a="SET_CURRENT_QUESTION",s="CALL_API",u="LOAD_FILE",l="FETCH_COLLECTIONS_REQUEST",c="RECEIVE_COLLECTIONS",f="RECEIVE_COLLECTIONS_ERROR",p="FETCH_PATHWAYS_REQUEST",d="RECEIVE_PATHWAYS",h="RECEIVE_PATHWAYS_ERROR",g="FETCH_PROJECTS_REQUEST",v="RECEIVE_PROJECTS",y="RECEIVE_PROJECTS_ERROR",m="FETCH_FAVOURITES_REQUEST",b="RECEIVE_FAVOURITES",w="RECEIVE_FAVOURITES_ERROR",_="FETCH_FEATURED_REQUEST",S="RECEIVE_FEATURED",E="RECEIVE_FEATURED_ERROR",x="SEARCH_PROJECTS_REQUEST",T="SEARCH_PROJECTS_RESPONSE",k="SEARCH_PROJECTS_ERROR",C="FETCH_PROGRESS_REQUEST",O="RECEIVE_PROGRESS",A="RECEIVE_PROGRESS_ERROR",P="FETCH_COLLECTION_REQUEST",I="RECEIVE_COLLECTION",j="RECEIVE_COLLECTION_ERROR",M="FETCH_EXERCISE_REQUEST",N="RECEIVE_EXERCISE",F="RECEIVE_EXERCISE_ERROR",R="FETCH_PATHWAY_REQUEST",L="RECEIVE_PATHWAY",D="RECEIVE_PATHWAY_ERROR",U="FETCH_PROJECT_REQUEST",z="RECEIVE_PROJECT",B="RECEIVE_PROJECT_ERROR",H="CLEAR_BADGE_STATE",V="FETCH_BADGE_REQUEST",q="RECEIVE_ISSUED_BADGE",W="RECEIVE_BADGE_TEMPLATE",K="RECEIVE_ISSUED_BADGE_ERROR",G="RECEIVE_BADGE_TEMPLATE_ERROR",Y="FETCH_PROJECT_PROGRESS_REQUEST",$="RECEIVE_PROJECT_PROGRESS",J="RECEIVE_PROJECT_PROGRESS_ERROR",Q="FETCH_QUIZ_REQUEST",Z="RECEIVE_QUIZ",X="RECEIVE_QUIZ_ERROR",ee="SEND_FAVOURITES_REQUEST",te="SENT_FAVOURITES_OK",ne="SEND_DELETE_FAVOURITES_REQUEST",re="SENT_DELETE_FAVOURITES_OK",ie="SEND_FAVOURITES_ERROR",oe="SEND_PROGRESS_REQUEST",ae="SENT_PROGRESS_OK",se="SEND_PROGRESS_ERROR",ue="SEND_RECONCILE_USER_REQUEST",le="SENT_RECONCILE_USER_OK",ce="SEND_RECONCILE_USER_ERROR",fe="SEND_QUIZ_ANSWER_REQUEST",pe="SENT_QUIZ_ANSWER_OK",de="SEND_QUIZ_ANSWER_ERROR"},32605:(e,t,n)=>{"use strict";n.d(t,{CI:()=>h,u_:()=>d});var r=n(65043);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t