PageSourceSearch

https://www.mercor.com/_next/static/chunks/5124.4f4a6b645b372325.js

js mercor.com collected 2026-09-24 18:52:28 UTC 13,537 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b77364c4-3b51-47d9-b4e5-1c0e4036b80c",e._sentryDebugIdIdentifier="sentry-dbid-b77364c4-3b51-47d9-b4e5-1c0e4036b80c")}()}catch(e){}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:mercor-site":!0})}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5124],{5124:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(60072),o=n(675),r=n(44600),i=n(93628),l=n(83496),s=n(60004),h=n(25315);let d="#version 300 es\nprecision highp float;\n\nout vec4 outColor;\n\nuniform vec2 uCssSize;\nuniform vec2 uBufferSize;\nuniform float uTime;\nuniform float uMirrored;\n\nconst float PI = 3.14159265358979323846;\nconst float TAU = 6.28318530717958647692;\n\nconst float NARROW_MAX_WIDTH = 640.0;\nconst float NARROW_PITCH = 46.0;\n// How far below the box's top the narrow layout's tallest column is capped. The climb hangs off\n// this, so it is what decides how much of the skyline clears the fold on a phone, where the box\n// runs well past one screen. Low enough that most of the climb is in view, and still clear of the\n// copy above it on the narrowest phone, where the heading takes the most lines.\nconst float NARROW_CAP_TOP = 510.0;\n\nconst float INTERMEDIATE_MAX_WIDTH = 1100.0;\nconst float WIDE_PITCH = 90.0;\n\nconst float MIN_COLUMNS = 6.0;\nconst float MAX_COLUMNS = 40.0;\nconst float MAX_BLUR = 60.0;\nconst float MIN_WIDE_HEIGHT = 0.06;\n\n// Rise over run of the skyline's climb, from its shortest column to its tallest. Both layouts\n// take their rise from this against their own width, so the angle is the same on a phone as on a\n// desktop and holds as either dimension changes.\n//\n// Neither used to have an angle it kept. The wide climb spanned whatever the field's box made it,\n// and the bars are fractions of that box, so a taller one tilted the diagonal up — and the box is\n// the hero and the value props together, whose height moves with the copy: 39 to 51 degrees across\n// the sizes it actually takes. The narrow climb rose a flat 384px, measured off the 640 breakpoint\n// rather than the phone's own width, so the narrower the phone the steeper it got.\nconst float CLIMB_SLOPE = 0.54;\n\nconst vec3 COLOR_START = vec3(142.0, 151.0, 247.0) / 255.0;\nconst vec3 COLOR_END = vec3(59.0, 43.0, 232.0) / 255.0;\n\nfloat saturate(float value) {\n  return clamp(value, 0.0, 1.0);\n}\n\nfloat rounded(float value) {\n  return floor(value + 0.5);\n}\n\nfloat softVerticalEdge(float distanceFromEdge, float blur) {\n  // The old SVG Gaussian was vertical-only and visually clipped around its 3-sigma halo.\n  // A cubic edge over the same band is extremely close at this scale and avoids an exp() for\n  // every fragment on every frame.\n  float extent = max(0.1, blur) * 2.75;\n  return smoothstep(-extent, extent, distanceFromEdge);\n}\n\nfloat falloff(float t) {\n  // Zero slope at both ends like the previous raised-cosine fade, but polynomial-only.\n  float base = 1.0 - smoothstep(0.0, 1.0, saturate(t));\n  return base * (1.0 + 0.55 * (1.0 - base));\n}\n\nfloat getColumnCount(float width) {\n  float target;\n\n  if (width <= NARROW_MAX_WIDTH) {\n    target = width / NARROW_PITCH;\n  } else if (width <= INTERMEDIATE_MAX_WIDTH) {\n    float blend = saturate(\n      (width - NARROW_MAX_WIDTH) / (INTERMEDIATE_MAX_WIDTH - NARROW_MAX_WIDTH)\n    );\n    float narrowBoundaryColumns = NARROW_MAX_WIDTH / NARROW_PITCH;\n    float wideBoundaryColumns = INTERMEDIATE_MAX_WIDTH / WIDE_PITCH;\n    target = mix(narrowBoundaryColumns, wideBoundaryColumns, blend);\n  } else {\n    target = width / WIDE_PITCH;\n  }\n\n  return clamp(rounded(target), MIN_COLUMNS, MAX_COLUMNS);\n}\n\nvoid getHeightRange(\n  float width,\n  float height,\n  float blur,\n  out float minHeightFraction,\n  out float maxHeightFraction\n) {\n  float edgeGuard = 3.0 * blur;\n\n  float narrowCapTop = max(edgeGuard, NARROW_CAP_TOP);\n  float narrowRise = min(CLIMB_SLOPE * width, height * 0.5);\n  float narrowMax = clamp(1.0 - narrowCapTop / height, 0.25, 0.97);\n  float narrowMin = clamp(narrowMax - narrowRise / height, 0.02, narrowMax);\n\n  float wideMax = clamp(1.0 - edgeGuard / height, 0.25, 0.97);\n  // Anchored at the top right, where the tallest column already sits under its edge guard, and\n  // the floor follows from the slope. MIN_WIDE_HEIGHT is the backstop for a box wide enough that\n  // the climb would otherwise want to start below the floor.\n  float wideMin = clamp(wideMax - (CLIMB_SLOPE * width) / height, MIN_WIDE_HEIGHT, wideMax);\n\n  if (width <= NARROW_MAX_WIDTH) {\n    minHeightFraction = narrowMin;\n    maxHeightFraction = narrowMax;\n    return;\n  }\n\n  if (width <= INTERMEDIATE_MAX_WIDTH) {\n    float blend = saturate(\n      (width - NARROW_MAX_WIDTH) / (INTERMEDIATE_MAX_WIDTH - NARROW_MAX_WIDTH)\n    );\n    minHeightFraction = mix(narrowMin, wideMin, blend);\n    maxHeightFraction = mix(narrowMax, wideMax, blend);\n    return;\n  }\n\n  minHeightFraction = wideMin;\n  maxHeightFraction = wideMax;\n}
1\n\nfloat roundedCapTop(float localX, float barWidth, float top, float height) {\n  float halfWidth = barWidth * 0.5;\n  float radius = min(halfWidth, (height - top) * 0.5);\n  float flatHalfWidth = max(0.0, halfWidth - radius);\n  float curveX = max(abs(localX - halfWidth) - flatHalfWidth, 0.0);\n  float circleY = sqrt(max(radius * radius - curveX * curveX, 0.0));\n  return top + radius - circleY;\n}\n\nfloat radialOverlayAlpha(vec2 point, vec2 size) {\n  float centerX = mix(0.24, 0.76, uMirrored) * size.x;\n  vec2 center = vec2(centerX, 0.24 * size.y);\n  vec2 radii = vec2(0.58 * size.x, 0.32 * size.y);\n  float distance = length((point - center) / max(radii, vec2(1.0)));\n\n  if (distance <= 0.58) {\n    return mix(0.70, 0.28, distance / 0.58);\n  }\n\n  if (distance <= 1.0) {\n    return mix(0.28, 0.0, (distance - 0.58) / 0.42);\n  }\n\n  return 0.0;\n}\n\nvoid compositeWhite(inout vec3 premultipliedColor, inout float alpha, float overlayAlpha) {\n  float a = saturate(overlayAlpha);\n  premultipliedColor = vec3(a) + premultipliedColor * (1.0 - a);\n  alpha = a + alpha * (1.0 - a);\n}\n\nvoid main() {\n  vec2 uv = gl_FragCoord.xy / max(uBufferSize, vec2(1.0));\n  vec2 point = vec2(uv.x * uCssSize.x, (1.0 - uv.y) * uCssSize.y);\n\n  float width = max(1.0, uCssSize.x);\n  float height = max(1.0, uCssSize.y);\n  float columns = getColumnCount(width);\n  float barWidth = width / columns;\n\n  float column = clamp(floor(point.x / max(barWidth, 0.0001)), 0.0, columns - 1.0);\n  float localX = point.x - column * barWidth;\n\n  float progress = column / max(columns - 1.0, 1.0);\n  progress = mix(progress, 1.0 - progress, uMirrored);\n\n  float blur = max(0.1, min(MAX_BLUR, height / 6.0));\n  float edgeGuard = 3.0 * blur;\n\n  float minHeightFraction;\n  float maxHeightFraction;\n  getHeightRange(width, height, blur, minHeightFraction, maxHeightFraction);\n\n  float heightFraction = clamp(\n    minHeightFraction + progress * (maxHeightFraction - minHeightFraction),\n    0.02,\n    maxHeightFraction\n  );\n\n  float top = height * (1.0 - heightFraction);\n  float capTop = roundedCapTop(localX, barWidth, top, height);\n\n  // Analytic equivalent of the original vertically stretched Gaussian silhouette blur.\n  float silhouetteAlpha = softVerticalEdge(point.y - capTop, blur);\n\n  float run = max(1.0, height - top);\n  float verticalProgress = saturate((point.y - top) / run);\n  float tailProgress = saturate(\n    (point.y - (height - edgeGuard)) / max(1.0, edgeGuard)\n  );\n\n  float fadeAlpha = min(falloff(verticalProgress), falloff(tailProgress));\n  float barAlpha = silhouetteAlpha * fadeAlpha;\n\n  // The original CSS ramp tile is twice the overhanging field width and travels by one complete\n  // period every RAMP_SECONDS. Keeping this mathematical means no DOM layer moves at all.\n  float fieldWidth = barWidth * (columns + 2.0);\n  float period = max(1.0, fieldWidth * 2.0);\n  float phase = fract((point.x + (uTime / ".concat("6.0",") * period) / period);\n  float ramp = 0.5 - 0.5 * cos(TAU * phase);\n\n  // These two indigos are close enough that direct sRGB interpolation is visually equivalent here\n  // and avoids nine pow() operations per fragment.\n  vec3 barColor = mix(COLOR_START, COLOR_END, ramp);\n\n  // Compose the two inexpensive white overlays into this same pass. Keeping the result\n  // premultiplied matches the WebGL canvas compositing mode and avoids light halos in Safari.\n  vec3 premultipliedColor = barColor * barAlpha;\n  float alpha = barAlpha;\n\n  float topOverlay = 0.14 * (1.0 - saturate(point.y / max(1.0, height * 0.30)));\n  compositeWhite(premultipliedColor, alpha, topOverlay);\n  compositeWhite(premultipliedColor, alpha, radialOverlayAlpha(point, vec2(width, height)));\n\n  outColor = vec4(premultipliedColor, alpha);\n}\n");function u(e,t){let{fragmentShader:n,vertexShader:a}=t;t.remove(),e.deleteShader(a),e.deleteShader(n)}function c(e){let{mirrored:t=!1}=e,n=(0,s.useRef)(null),c=(0,s.useRef)(null),f=(0,s.useRef)(t),p=(0,s.useRef)(null);return(0,s.useEffect)(()=>{var e;f.current=t,null==(e=p.current)||e.call(p)},[t]),(0,s.useEffect)(()=>{let e=n.current,t=c.current;if(!e||!t)return;let a=null,s=null,h=null,m=!0,g=!1,w=!1,v=performance.now(),b=()=>{null!==s&&(cancelAnimationFrame(s),s=null)},x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now();if(!a||w)return;let t=g?0:(e-v)/1e3;a.draw(t)},M=e=>{s=null,x(e),!m||g||w||(s=requestAnimationFrame(M))},y=()=>{b(),x(),!m||g||w||(s=requestAnimationFrame(M))},_=()=>{h=null,null==a||a.commitBufferSize(),x()},A=()=>{null!==h&&window.clearTimeout(h),h=window.setTimeout(_,120)},T=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!a||e<=0||t<=0||(a.setCssSize(e,t),n?a.commitBufferSize():A(),x())},C=()=>{null==a||a.dispose(),a=null;try{a=function(e,t){let n=new o.A({canvas:e,width:1,height:1,dpr:1,alpha:!0,antialias:!1,depth:!1,stencil:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"high-performance",autoClear:!1,webgl:2});if(e.style.removeProperty("width"),e.style.removeProperty("height"),!n.isWebgl2)return null;let a=n.gl,s={uCssSize:{value:new Float32Array([1,1])},uBufferSize:{value:new Float32Array([1,1])},uTime:{value:0},uMirrored:{value:+!!t.current}},h=new r.l(a),c=new i.B(a,{vertex:"#version 300 es\nprecision highp float;\n\nin vec2 position;\n\nvoid main() {\n  gl_Position = vec4(position, 0.0, 1.0);\n}\n",fragment:d,uniforms:s,transparent:!1,cullFace:!1,depthTest:!1,depthWrite:!1});try{!function(e,t){if(e.getProgramParameter(t.program,e.LINK_STATUS))return;let n=e.getProgramInfoLog(t.program);throw Error(null!=n?n:"Unable to link OGL program.")}(a,c)}catch(e){throw u(a,c),h.remove(),e}let f=new l.e(a,{geometry:h,program:c,frustumCulled:!1}),p=1,m=1;return{setCssSize(e,t){p=Math.max(1,e),m=Math.max(1,t)},commitBufferSize:()=>{let t=function(e,t){let n=Math.min(window.devicePixelRatio||1,1.25);return Math.max(.5,Math.min(n,Math.sqrt(175e4/Math.max(1,e*t))))}(p,m),a=Math.max(1,Math.round(p*t)),o=Math.max(1,Math.round(m*t));
1(e.width!==a||e.height!==o)&&(e.width=a,e.height=o),n.setViewport(e.width,e.height),s.uBufferSize.value[0]=e.width,s.uBufferSize.value[1]=e.height},draw(e){a.isContextLost()||(s.uCssSize.value[0]=p,s.uCssSize.value[1]=m,s.uTime.value=e,s.uMirrored.value=+!!t.current,f.draw())},dispose(){u(a,c),h.remove()}}}(t,f)}catch(e){console.error("FlutedGlassField WebGL initialization failed:",e)}if(!a){t.style.display="none";return}t.style.display="block";let n=e.getBoundingClientRect();T(n.width,n.height,!0),v=performance.now(),y()},I=new ResizeObserver(e=>{let t=e[0];if(!t)return;let{width:n,height:a}=t.contentRect;T(n,a)}),R=new IntersectionObserver(e=>{var t;let n=e[0];m=null==(t=null==n?void 0:n.isIntersecting)||t,y()},{threshold:.01}),W=window.matchMedia("(prefers-reduced-motion: reduce)"),E=()=>{g=W.matches,v=performance.now(),y()},H=e=>{e.preventDefault(),b()},O=()=>{C()},N=()=>{A()};return p.current=()=>x(),t.addEventListener("webglcontextlost",H),t.addEventListener("webglcontextrestored",O),window.addEventListener("resize",N,{passive:!0}),W.addEventListener("change",E),C(),I.observe(e),R.observe(e),E(),()=>{w=!0,p.current=null,b(),null!==h&&window.clearTimeout(h),I.disconnect(),R.disconnect(),W.removeEventListener("change",E),window.removeEventListener("resize",N),t.removeEventListener("webglcontextlost",H),t.removeEventListener("webglcontextrestored",O),null==a||a.dispose()}},[]),(0,a.jsx)("div",{ref:n,className:h.M,"aria-hidden":!0,children:(0,a.jsx)("canvas",{ref:c,className:"absolute inset-0 block size-full"})})}},44600:(e,t,n)=>{n.d(t,{l:()=>o});var a=n(73040);class o extends a.V{constructor(e,{attributes:t={}}={}){Object.assign(t,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,t)}}}}]);

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.