1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5795],{45795:(e,t,n)=>{n.d(t,{A:()=>f});var l=n(91848),c=n(76420),o=n(65010);let a=RegExp("(?:".concat(o.sm,"|[#ï¼])"),"u"),r=/[a-z0-9_@]/i,i=/^@([a-z0-9_]{3,20})/;function s(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function u(e){let t=[],n=0;for(;n<e.length;){let l=e.slice(n),c=/^`([^`\n]+)`/.exec(l);if(c){t.push({type:"code",text:c[0]}),n+=c[0].length;continue}let s=/^!\[[^\]\n]*\]\([^)\n]+\)/.exec(l);if(s){t.push({type:"image",text:s[0]}),n+=s[0].length;continue}let u=/^\[[^\]\n]+\]\([^)\n]+\)/.exec(l);if(u){t.push({type:"link",text:u[0]}),n+=u[0].length;continue}let p=/^https?:\/\/[^\s)]+/.exec(l);if(p){t.push({type:"autolink",text:p[0]}),n+=p[0].length;continue}if(("#"===e[n]||"ï¼"===e[n])&&(0===n||!a.test(e[n-1]))){let e=o.hJ.exec(l);if(e&&RegExp("\\p{L}","u").test(e[1])){t.push({type:"hashtag",text:e[0]}),n+=e[0].length;continue}}if("@"===e[n]&&(0===n||!r.test(e[n-1]))){let e=i.exec(l);if(e){t.push({type:"mention",text:e[0]}),n+=e[0].length;continue}}let h=/^(\*\*|__)(?=\S)([\s\S]+?)\1/.exec(l);if(h){t.push({type:"bold",text:h[0]}),n+=h[0].length;continue}let g=/^(\*|_)(?=\S)([^*_\n]+?)\1/.exec(l);if(g){t.push({type:"italic",text:g[0]}),n+=g[0].length;continue}t.push({type:"text",text:e[n]}),n+=1}let l=[];for(let e of t){let t=l[l.length-1];"text"===e.type&&t&&"text"===t.type?t.text+=e.text:l.push(e)}return l.map(p).join("")}function p(e){let t=s(e.text);switch(e.type){case"text":return t;case"code":return'<span style="color:#34d399">'.concat(t,"</span>");case"bold":return'<span style="color:var(--foreground);font-weight:700">'.concat(t,"</span>");case"italic":return'<span style="color:var(--muted);font-style:italic">'.concat(t,"</span>");case"link":case"autolink":return'<span style="color:#60a5fa">'.concat(t,"</span>");case"image":return'<span style="color:#a78bfa">'.concat(t,"</span>");case"hashtag":case"mention":return'<span style="color:var(--foreground);font-weight:500">'.concat(t,"</span>")}}let h="#71717a";function g(e,t,n,l){let c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:l,o=e.slice(0,t),a=e.slice(t,n),r=e.slice(n);if(0===a.length&&o.endsWith(l)&&r.startsWith(c))return{value:o.slice(0,-l.length)+r.slice(c.length),selectionStart:t-l.length,selectionEnd:t-l.length};if(a.startsWith(l)&&a.endsWith(c)&&a.length>=l.length+c.length){let e=a.slice(l.length,a.length-c.length);return{value:o+e+r,selectionStart:t,selectionEnd:t+e.length}}return{value:o+l+a+c+r,selectionStart:t+l.length,selectionEnd:t+l.length+a.length}}let f=(0,c.forwardRef)(function(e,t){var n;let{value:o,onChange:a,onKeyDown:r,onScroll:i,className:p="",style:f,...d}=e,{ref:y}=function(e){let t=(0,c.useRef)(null),n=(0,c.useCallback)(()=>{let e=t.current;e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"))},[]);return(0,c.useEffect)(()=>{n()},[e,n]),{ref:(0,c.useCallback)(e=>{t.current=e,e&&requestAnimationFrame(()=>{e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px")})},[]),resize:n}}(o),x=(0,c.useRef)(null),m=(0,c.useRef)(null),[S,b]=(0,c.useState)({}),[v,w]=(0,c.useState)({}),k=(0,c.useCallback)(e=>{y(e),x.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[y,t]),E=(0,c.useCallback)((e,t)=>{e.value=t.value,a({target:e,currentTarget:e}),requestAnimationFrame(()=>{e.setSelectionRange(t.selectionStart,t.selectionEnd)})},[a]),C=(0,c.useCallback)(()=>{let e=x.current,t=m.current;if(!e)return;let n=window.getComputedStyle(e);b({boxSizing:n.boxSizing,paddingTop:n.paddingTop,paddingRight:n.paddingRight,paddingBottom:n.paddingBottom,paddingLeft:n.paddingLeft,borderTopWidth:n.borderTopWidth,borderRightWidth:n.borderRightWidth,borderBottomWidth:n.borderBottomWidth,borderLeftWidth:n.borderLeftWidth,fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,fontStyle:n.fontStyle,whiteSpace:"normal"===n.whiteSpace?"pre-wrap":n.whiteSpace,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,wordSpacing:n.wordSpacing,tabSize:n.tabSize,textIndent:n.textIndent,textTransform:n.textTransform,wordBreak:n.wordBreak,overflowWrap:n.overflowWrap}),w({marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft}),t&&(t.scrollTop=e.scrollTop,t.scrollLeft=e.scrollLeft)},[]);(0,c.useLayoutEffect)(()=>{let e=x.current;if(!e)return;C();let t=new ResizeObserver(C);t.observe(e);let n=!1;return"undefined"!=typeof document&&"fonts"in document&&document.fonts.ready.then(()=>{n||C()}),()=>{n=!0,t.disconnect()}},[C,p]);let L=(0,c.useCallback)(e=>{var t,n;if(null==r||r(e),e.defaultPrevented)return;let l=e.currentTarget,c=null!=(t=l.selectionStart)?t:0,a=null!=(n=l.selectionEnd)?n:c,i=e.metaKey||e.ctrlKey;if(i&&!e.altKey){let t=e.key.toLowerCase();if("b"===t||"i"===t||"e"===t||"k"===t){e.preventDefault(),E(l,function(e,t,n,l){if("b"===e)return g(t,n,l,"**");if("i"===e)return g(t,n,l,"*");if("e"===e)return g(t,n,l,"`");let c=t.slice(0,n),o=t.slice(n,l)||"龿¥æå",a=t.slice(l),r="".concat(c,"[").concat(o,"](url)").concat(a),i=c.length+o.length+3;return{value:r,selectionStart:i,selectionEnd:i+3}}(t,o,c,a));return}}if("Enter"===e.key&&!e.shiftKey&&!i&&!e.altKey){let t=function(e,t,n){if(t!==n)return null;let l=e.lastIndexOf("\n",t-1)+1,c=(()=>{let n=e.indexOf("\n",t);return -1===n?e.length:n})(),o=e.slice(l,c),a=/^(\s*)([-*+])(\s+)(.*)$/.exec(o);if(a){let[,n,o,r,i]=a;if(0===i.length)return{value:e.slice(0,l)+e.slice(c),selectionStart:l,selectionEnd:l};let s="\n".concat(n).concat(o).concat(r);return{value:e.slice(0,t)+s+e.slice(t),selectionStart:t+s.length,selectionEnd:t+s.length}}let r=/^(\s*)(\d+)(\.|\))(\s+)(.*)$/.exec(o);if(r){let[,n,o,a,i,s]=r;if(0===s.length)return{value:e.slice(0,l)+e.slice(c),selectionStart:l,selectionEnd:l};
1let u=String(Number(o)+1),p="\n".concat(n).concat(u).concat(a).concat(i);return{value:e.slice(0,t)+p+e.slice(t),selectionStart:t+p.length,selectionEnd:t+p.length}}let i=/^(\s*)(>+)(\s?)(.*)$/.exec(o);if(i){let[,n,o,a,r]=i;if(0===r.length)return{value:e.slice(0,l)+e.slice(c),selectionStart:l,selectionEnd:l};let s="\n".concat(n).concat(o).concat(a||" ");return{value:e.slice(0,t)+s+e.slice(t),selectionStart:t+s.length,selectionEnd:t+s.length}}return null}(o,c,a);t&&(e.preventDefault(),E(l,t))}},[E,r,o]),T=(0,c.useCallback)(e=>{null==i||i(e);let t=m.current;t&&(t.scrollTop=e.currentTarget.scrollTop,t.scrollLeft=e.currentTarget.scrollLeft)},[i]);return(0,l.jsxs)("div",{className:"relative",style:v,children:[(0,l.jsx)("textarea",{...d,ref:k,value:o,onChange:a,onKeyDown:L,onScroll:T,spellCheck:null!=(n=d.spellCheck)&&n,className:p,style:{...f,margin:0}}),(0,l.jsx)("pre",{ref:m,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 m-0 overflow-hidden",style:{...S,background:"transparent",borderStyle:"solid",borderColor:"transparent",color:"transparent",margin:0},dangerouslySetInnerHTML:{__html:function(e){let t=e.split("\n"),n=[],l=null;for(let e of t){let t=/^(?:```+|~~~+)/.exec(e);if(t&&(null===l||t[0][0]===l)){l=null===l?t[0][0]:null,n.push('<span style="color:'.concat(h,'">').concat(s(e),"</span>"));continue}if(null!==l){n.push('<span style="color:'.concat("#34d399",'">').concat(s(e),"</span>"));continue}if(/^\s*([-*_])\1{2,}\s*$/.test(e)){n.push('<span style="color:'.concat(h,'">').concat(s(e),"</span>"));continue}let c=/^(\s*)(#{1,6})(\s+)(.*)$/.exec(e);if(c){let[,e,t,l,o]=c;n.push("".concat(s(e),'<span style="color:').concat(h,'">').concat(s(t),"</span>").concat(s(l),'<span style="color:').concat("var(--foreground)",';font-weight:600">').concat(u(o),"</span>"));continue}let o=/^(\s*)(>+)(\s?)(.*)$/.exec(e);if(o){let[,e,t,l,c]=o;n.push("".concat(s(e),'<span style="color:').concat(h,'">').concat(s(t),"</span>").concat(s(l),'<span style="color:').concat("#a1a1aa",'">').concat(u(c),"</span>"));continue}let a=/^(\s*)([-*+]|\d+\.)(\s+)(.*)$/.exec(e);if(a){let[,e,t,l,c]=a;n.push("".concat(s(e),'<span style="color:').concat(h,'">').concat(s(t),"</span>").concat(s(l)).concat(u(c)));continue}n.push(u(e))}return n.join("\n")+"\n"}(o)}})]})})},65010:(e,t,n)=>{n.d(t,{gX:()=>o,hJ:()=>c,sm:()=>l});let l="[\\p{L}\\p{N}_]",c=RegExp("^[#ï¼](".concat(l,"{1,").concat(64,"})"),"u");function o(e){return e.normalize("NFKC").toLowerCase()}RegExp("(?:^|[^\\p{L}\\p{N}_#ï¼])[#ï¼](".concat(l,"{1,").concat(64,"})"),"gu")}}]);
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.