PageSourceSearch

https://www.freecodecamp.org/3042-5b0b84e4a301d9dbffd8.js

js freecodecamp.org collected 2026-09-24 07:57:06 UTC 2,975 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_freecodecamp_client=self.webpackChunk_freecodecamp_client||[]).push([[3042],{13042:function(e,a,t){t.r(a);var c=t(7378),r=t(61550),l=t(31255),n=t(42109),s=t(88852);const o=e=>{let{innerRef:a}=e;const{t:t}=(0,r.Bd)(),o=t("search-bar:placeholder").startsWith("search.placeholder.")?t("search.placeholder"):t("search-bar:placeholder"),i=s.z,[m,h]=(0,c.useState)(""),u=(0,c.useRef)(null);return c.createElement("div",{className:"fcc_searchBar","data-testid":"fcc_searchBar",ref:a},c.createElement("div",{className:"fcc_search_wrapper"},c.createElement("div",{className:"ais-SearchBox"},c.createElement("form",{action:"",className:"ais-SearchBox-form",onSubmit:e=>{var a;(e.preventDefault(),m&&m.length>1)&&(window.open(`${i}?query=${encodeURIComponent(m)}`,"_blank"),h(""),null===(a=u.current)||void 0===a||a.blur())},role:"search"},c.createElement("label",{className:"sr-only",htmlFor:"ais-SearchBox-input"},t("search.label")),c.createElement("input",{autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",id:"ais-SearchBox-input",className:"ais-SearchBox-input",maxLength:512,onChange:e=>h(e.target.value),placeholder:o,spellCheck:"false",type:"search",value:m,ref:u}),c.createElement("button",{className:"ais-SearchBox-submit",type:"submit"},c.createElement(l.A,null)),m&&c.createElement("button",{className:"ais-SearchBox-reset",onClick:()=>{var e;h(""),null===(e=u.current)||void 0===e||e.focus()},type:"button"},c.createElement(n.A,null))))))};o.displayName="SearchBarOptimized",a.default=o},31255:function(e,a,t){var c=t(7378),r=t(61550);const l=()=>{const{t:e}=(0,r.Bd)();return c.createElement(c.Fragment,null,c.createElement("span",{className:"sr-only"},e("icons.magnifier")),c.createElement("svg",{className:"ais-SearchBox-submitIcon",height:"10",viewBox:"0 0 40 40",width:"10",xmlns:"http://www.w3.org/2000/svg"},c.createElement("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"})))};l.displayName="Magnifier",a.A=l},42109:function(e,a,t){var c=t(7378),r=t(61550);const l=()=>{const{t:e}=(0,r.Bd)();return c.createElement(c.Fragment,null,c.createElement("span",{className:"sr-only"},e("icons.input-reset")),c.createElement("svg",{className:"ais-SearchBox-resetIcon",height:"10",viewBox:"0 0 20 20",width:"10",xmlns:"http://www.w3.org/2000/svg"},c.createElement("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"})))};l.displayName="InputReset",a.A=l}}]);
2//# sourceMappingURL=3042-5b0b84e4a301d9dbffd8.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.