1"use strict";(self.webpackChunkulearn_abroad=self.webpackChunkulearn_abroad||[]).push([[5221],{1317:(e,t,s)=>{s.d(t,{k:()=>r});const r=e=>{if(!e||"string"!==typeof e)return e||"";let t=e;for(let r=0;r<3&&/\\\\/.test(t);r++)t=t.replace(/\\\\/g,"\\");/\\(?:frac|sqrt|text|mathbb|binom|overline|underline)\s*\\\{/.test(t)&&(t=t.replace(/\\([{}])/g,"$1"));const s=t.match(/^\s*\$\$([\s\S]*)\$\$\s*$/);return s&&/\\\(/.test(s[1])&&(t=s[1].trim()),t}},4601:(e,t,s)=>{s.d(t,{A:()=>c});var r=s(5043),a=s(6965),n=s(1317),l=(s(7104),s(579));const c=e=>{let{question:t,options:s=[],onAnswerSelect:c,selectedAnswer:i,language:o,questionNumber:p,isMathTest:g=!1}=e;const u=String(o||"").toLowerCase().startsWith("ar"),d=(0,r.useRef)(null),h=["\u0623","\u0628","\u062c","\u062f","\u0647\u0640","\u0648"];var m,f;((0,r.useEffect)(()=>{const e=e=>(e.preventDefault(),!1),t=d.current;return t&&(t.addEventListener("contextmenu",e),t.addEventListener("copy",e),t.addEventListener("cut",e),t.addEventListener("dragstart",e),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.MozUserSelect="none",t.style.msUserSelect="none"),()=>{t&&(t.removeEventListener("contextmenu",e),t.removeEventListener("copy",e),t.removeEventListener("cut",e),t.removeEventListener("dragstart",e))}},[]),g&&1===p)&&console.log("\ud83d\udd0d MathQuestion Component Received:",{isMathTest:g,question:null===t||void 0===t?void 0:t.substring(0,100),optionsCount:null===s||void 0===s?void 0:s.length,firstOption:null===s||void 0===s||null===(m=s[0])||void 0===m||null===(f=m.text)||void 0===f?void 0:f.substring(0,50)});const b=e=>{if(!e)return"";e=(0,n.k)(e);const t=/\\\[|\\\(|\$/.test(e);if(!g&&!t)return e.trim();let s=e.trim().replace(/\\frac\\\{/g,"\\frac{").replace(/\\sqrt\\\{/g,"\\sqrt{").replace(/\\mathbb\\\{/g,"\\mathbb{").replace(/\\text\\\{/g,"\\text{").replace(/(\\(?:frac|sqrt|mathbb|text|left|right))\\\{/g,"$1{").replace(/\\frac\s*([^{\s])([^{\s])/g,"\\frac{$1}{$2}").replace(/x\+3>0x\+3>0/g,"x+3>0").replace(/\)\s*\u0647\u064a:\s*([^A-D])/g,") \u0647\u064a: $1").replace(/\\\(\s*\\\(/g,"\\(").replace(/\\\)\s*\\\)/g,"\\)").replace(/\\frac\s*([^{\s]+)\s*\\\)/g,"\\frac{$1}").replace(/\\sqrt\s*([^{\s]+)\s*\\\)/g,"\\sqrt{$1}").replace(/\\\]\s*\\\]/g,"\\]");const r=/\\\[([\s\S]*?)\\\]|\\\(([\s\S]*?)\\\)|\$([^$]*)\$/g;if(r.test(s)){r.lastIndex=0;const e=[];let t,n=0;for(;null!==(t=r.exec(s));){t.index>n&&e.push(s.substring(n,t.index));const r=t[1]||t[2]||t[3],c=!!t[1];e.push((0,l.jsx)(a.r,{isArabic:u,expression:r,inline:!c,className:u?"question-math-ar question-math":"question-math"},t.index)),n=t.index+t[0].length}return n<s.length&&e.push(s.substring(n)),e}if(g){const e=/\\[a-zA-Z]+/.test(s),t=/^\s*-?\d+\s*\/\s*\d+\s*$/.test(s),r=/^[\\a-zA-Z0-9{}_^\/\s\-+*()\[\].,:;|]+$/.test(s),n=s.length<=40;if(e&&r&&n||t)return(0,l.jsx)(a.r,{expression:s,inline:!0,isArabic:u,className:u?"question-math-ar question-math":"question-math"})}return s};return(0,l.jsxs)("div",{className:"math-question-container ".concat(u?"rtl":"ltr"),children:[(0,l.jsx)("div",{className:"question-content",children:(0,l.jsx)("div",{className:"question-text ".concat(u?"rtl":"ltr"),children:(e=>{if(!e)return"";e=(0,n.k)(e);const t=/\\\[|\\\(|\$/.test(e);if(!g&&!t)return e;let s=e.replace(/\\frac\\\{/g,"\\frac{").replace(/\\sqrt\\\{/g,"\\sqrt{").replace(/\\mathbb\\\{/g,"\\mathbb{").replace(/\\text\\\{/g,"\\text{").replace(/(\\(?:frac|sqrt|mathbb|text|left|right))\\\{/g,"$1{").replace(/\\frac\s*([^{\s])([^{\s])/g,"\\frac{$1}{$2}").replace(/\\frac\{([^}]*)\}([^{])/g,(e,t,s)=>" "===s||"\\"===s?e:"\\frac{".concat(t,"}{").concat(s,"}"));const r=/\\\[([\s\S]*?)\\\]|\\\(([\s\S]*?)\\\)|\$([^$]*)\$/g;if(r.test(s)){r.lastIndex=0;const e=[];let t,n=0;for(;null!==(t=r.exec(s));){t.index>n&&e.push(s.substring(n,t.index));const r=t[1]||t[2]||t[3],c=!!t[1];e.push((0,l.jsx)(a.r,{isArabic:u,expression:r,inline:!c,className:u?"question-math-ar question-math":"question-math"},t.index)),n=t.index+t[0].length}return n<s.length&&e.push(s.substring(n)),e}return s})(t)})}),s.length>0&&(0,l.jsx)("div",{className:"options-container",children:s.map((e,t)=>{const s=e.id||String.fromCharCode(97+t),r=i===s;return(0,l.jsxs)("div",{className:"option-item ".concat(r?"selected":""," ").concat(u?"rtl":"ltr"),onClick:()=>c&&c(s),children:[(0,l.jsx)("div",{className:"option-label",children:"".concat(u&&h[t]||s.toUpperCase(),")")}),(0,l.jsx)("div",{className:"option-content",children:b(e.text||e)})]},s)})})]})}},5221:(e,t,s)=>{s.d(t,{ZQ:()=>o,rE:()=>g.r,vs:()=>u.v});s(5043),s(2388);var r=s(579);var a=s(2555),n=s(45),l=s(9853),c=s(3516);const i=["label"];function o(e){let{label:t}=e,s=(0,n.A)(e,i);const[o,g]=(0,c.Mt)(s);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.A.Group,{className:s.contact?"d-flex justify-content-end":"",style:{marginBottom:12},onClick:s.onClick,children:[s.noLabel?null:(0,r.jsxs)(l.A.Label,{className:"input-title",style:s.style,children:[s.required?(0,r.jsx)("span",{style:{color:"red"},children:"*"}):null," ",t]}),(0,r.jsx)(l.A.Control,(0,a.A)((0,a.A)({},o),{},{style:(0,a.A)({width:s.contact?306:"100%"},s.style),className:"res-input-100 input-form",size:"lg",id:s.id,value:s.value,type:s.type,onCh
1ange:e=>s.onChange(e),name:s.name,placeholder:s.placeholder}))]}),g.touched&&g.error?(0,r.jsx)("div",{className:"error",style:p.error,children:g.error}):null]})}const p={error:{fontStyle:"normal",fontWeight:"normal",fontSize:"12px",color:"#FB000A",marginTop:-8}};s(1204),s(802);var g=s(6965),u=s(5627);s(8517)},5627:(e,t,s)=>{s.d(t,{v:()=>r.A});var r=s(4601)},6965:(e,t,s)=>{s.d(t,{r:()=>l});s(5043);var r=s(3927),a=(s(3159),s(579));const n=e=>{const t=/[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/;if(t.test(e))return!0;const s=e.match(/\\text\{([^}]*)\}/g);if(s)for(const a of s)if(t.test(a))return!0;const r=["\u062a\u0633\u0627\u0648\u064a","\u062d\u064a\u062b","\u0625\u0630\u0627","\u0643\u0627\u0646\u062a","\u0623\u0648\u062c\u062f","\u0642\u064a\u0645\u0629","\u0627\u0644\u062f\u0627\u0644\u0629","\u0627\u0644\u0645\u062c\u0627\u0644","\u0627\u0644\u0645\u062f\u0649","\u0627\u0644\u0639\u062f\u062f","\u0627\u0644\u062d\u0644","\u0627\u0644\u0645\u0639\u0627\u062f\u0644\u0629","\u0627\u0644\u0645\u062a\u0628\u0627\u064a\u0646\u0629"];for(const a of r)if(e.includes(a))return!0;return!1},l=e=>{let{expression:t,inline:s=!1,className:l,displayMode:c=!1}=e;if(!t)return null;let i=t.trim();i=i.replace(/\\frac\\\{/g,"\\frac{").replace(/\\sqrt\\\{/g,"\\sqrt{").replace(/\\mathbb\\\{/g,"\\mathbb{").replace(/\\text\\\{/g,"\\text{").replace(/(\\(?:frac|sqrt|mathbb|text|left|right))\\\{/g,"$1{").replace(/([^>]+>0)\1/g,"$1").replace(/\^{\s*-\s*(\d+)\s*\}/g,"^{-$1}").replace(/\^{\s*(\d+)\s*\}/g,"^{$1}").replace(/\^{\s*-\s*(\d+)\s*\\\}/g,"^{-$1}").replace(/\^{\s*(\d+)\s*\\\}/g,"^{$1}").replace(/\\Re\\backslash/g,"\\mathbb{R}\\setminus").replace(/\\Re\\\\/g,"\\mathbb{R}\\setminus").replace(/\\backslash/g,"\\setminus").replace(/\\mathbb\{R\}\\setminus\\{0\\}/g,"\\mathbb{R}\\setminus\\{0\\}").replace(/\\infty/g,"\\infty").replace(/\u221e/g,"\\infty").replace(/\u222a/g,"\\cup").replace(/\u2229/g,"\\cap").replace(/\u2212/g,"-").replace(/(?<![a-zA-Z\\^_}])\{(\d+)\}/g,"\\{$1\\}").replace(/(?<![a-zA-Z\\^_}])\{(\d+,\s*-?\s*\d+)\}/g,"\\{$1\\}").replace(/(\d+)\s*\/\s*(\d+)/g,"\\frac{$1}{$2}").replace(/\\frac\{([^{}]*)\}\s*\\?\{([^{}]*)\}/g,"\\frac{$1}{$2}").replace(/\\frac\s*\{\s*([^{}]*)\s*\}\s*\{\s*([^{}]*)\s*\}/g,"\\frac{$1}{$2}").replace(/\\frac\{([^{}]*)\}(?!\s*\\?\{)/g,"$1").replace(/\\sqrt\\\{([^}]*)\\\}/g,"\\sqrt{$1}").replace(/\\\{([^}\\]*)\}(?!\\)/g,"\\{$1\\}").replace(/\\mathb(?![b])/g,"\\mathbb").replace(/\\mathbb\{R\}\\setminus\\{0\}/g,"\\mathbb{R}\\setminus\\{0\\}").replace(/\\mathbb\{R\}\\setminus/g,"\\mathbb{R}\\setminus").replace(/\\cup/g,"\\cup").replace(/\\infty/g,"\\infty").replace(/(\([^()]*\))\s*\1/g,"$1").replace(/([0-9A-Za-z\s\-+*=<>\u2264\u2265\[\],.]{8,})\1/g,"$1").replace(/f\(([^)]+)\)\s*=\s*([^{]+)\{([^}]+)\}\s*-\s*([^\\]+)\\\\\s*\(f\(([^)]+)\)\\\\\s*\u062a\u0633\u0627\u0648\u064a:/g,"f($1) = $2\\{$3\\} - $4\\\\ f($5) \\text{ \u062a\u0633\u0627\u0648\u064a}:").replace(/\u0625\u0630\u0627 \u0643\u0627\u0646\u062a\s+([^\\]+)\\\\\s*\(f\(([^)]+)\)\\\\\s*\u062a\u0633\u0627\u0648\u064a:/g,"\\text{\u0625\u0630\u0627 \u0643\u0627\u0646\u062a } $1\\\\ f($2) \\text{ \u062a\u0633\u0627\u0648\u064a}:").replace(/\(\s*-\s*\\infty\s*,/g,"(-\\infty,").replace(/,\s*\\infty\s*\)/g,",\\infty)").replace(/\s*-\s*/g," - ").replace(/\s*\+\s*/g," + ").replace(/\s*=\s*/g," = ").replace(/\\left\s*\(/g,"\\left(").replace(/\)\s*\\right/g,")\\right").replace(/\\left\s*\[/g,"\\left[").replace(/\]\s*\\right/g,"]\\right").replace(/\\left\s*\{/g,"\\left\\{").replace(/\}\s*\\right/g,"\\}\\right").replace(/\\\s*$/g,"").replace(/\s+/g," ").trim();const o=n(i)?"rtl":"ltr";try{return s?(0,a.jsx)("span",{className:"math-display-inline ".concat(l),dir:o,style:{display:"inline-block"},children:(0,a.jsx)(r.InlineMath,{math:i,errorColor:"#ff0000",throwOnError:!1})}):(0,a.jsx)("div",{className:"math-display-block ".concat(l),dir:o,children:(0,a.jsx)(r.BlockMath,{math:i,errorColor:"#ff0000",throwOnError:!1})})}catch(p){console.warn("\u26a0\ufe0f KaTeX rendering error:",p.message);try{let e=i.replace(/\\left\(/g,"\\left(").replace(/\\right\)/g,"\\right)").replace(/\\frac\s*\{\s*/g,"\\frac{").replace(/\s*\}\s*\{\s*/g,"}{").replace(/\s*\}\s*([^{])/g,"}$1").replace(/\s+/g," ").trim();return s?(0,a.jsx)("span",{className:"math-display-inline ".concat(l),dir:o,style:{display:"inline-block"},children:(0,a.jsx)(r.InlineMath,{math:e})}):(0,a.jsx)("div",{className:"math-display-block ".concat(l),dir:o,children:(0,a.jsx)(r.BlockMath,{math:e})})}catch(g){return console.error("KaTeX rendering failed after fixes:",g),console.error("Expression that failed:",i),(0,a.jsx)("span",{className:"math-display-text ".concat(l),dir:o,style:{display:"inline-block"},children:i})}}}},7104:()=>{}}]); 2//# sourceMappingURL=5221.6cdc7fb9.chunk.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.