{"version":3,"file":"LiquidGradient.CpPKPODq.mjs","names":["useRef","useCallback","useRef","useMemo","useCallback","__esmMin","de","init_npm_react_18_3_1","pe","ce","ee","ne","c","init_jsx_runtime","motionValue","useMotionValueEvent","MotionValue","init_framer_motion_DhsWWWsN","animate","RenderTarget","defineShader","init_framer_CKT6jEEQ","addPropertyControls","ControlType","useIsInCurrentNavigationTarget","useIsBrowserSafari","useOnEnter","defaultEvents","useRadius","init_useConstant","borderRadiusControl","useIsOnCanvas","useOnExit","useConstant","init_default_utils_js__0_45","isMotionValue","init_isMotionValue","v","useAutoMotionValue","optionsRef","options","animation","didInitialMount","isOnCanvas","onChangeDeps","onChange","transformer","value","value1","inputValue","ref","newValue","init_useAutoMotionValue","init_useAutoMotionValue_js__0_3","getProps","rest","props","Video","newProps","VideoMemo","ObjectFitType","SrcType","isMountedAndReadyForProgressChanges","init_Video","\"Fill\"","\"Contain\"","\"Cover\"","\"None\"","\"ScaleDown\"","\"Video\"","\"Url\"","startTimeProp","isInCurrentNavigationTarget","videoRef","isSafari","requestingPlay","wasPausedOnLeave","wasEndedOnLeave","borderRadius","startTime","shouldPlay","canvasPlay","autoPlay","playing","isMuted","muted","setProgress","newProgress","rawProgress","isAlreadySet","play","pause","srcFile","srcUrl","videoProgress","progress","latest","loop","src","srcType","volume","onSeeked","onPause","onPlay","onEnd","posterEnabled","poster","playsinline","onClick","LiquidGradient_default","init_LiquidGradient"],"sources":["https:/framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/TbXI1XaZFNevVKcgIt7G/isMotionValue.js","https:/framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/V4SPg9g59hF1vFH3ZTF0/useAutoMotionValue.js","https:/framer.com/m/framer/useAutoMotionValue.js@^0.3.0","https:/framerusercontent.com/modules/lRDHiNWNVWmE0lqtoVHP/0jtlswBvrookcx7EpjBD/Video.js","https:/framerusercontent.com/modules/QEytd7xyjUsL7yuVUzSs/O7s2vxltmhiskELYwyrY/LiquidGradient.js"],"sourcesContent":["import{MotionValue}from\"framer\";// Basic MotionValue check\nexport const isMotionValue=v=>v instanceof MotionValue;\nexport const __FramerMetadata__ = {\"exports\":{\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./isMotionValue.map","import{useCallback,useEffect,useRef}from\"react\";import{motionValue,animate,RenderTarget}from\"framer\";import{isMotionValue}from\"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/TbXI1XaZFNevVKcgIt7G/isMotionValue.js\";import{useConstant}from\"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";export function useAutoMotionValue(inputValue,options){// Put options on a local ref\n// Might wanna just memo instead but it works for now\nconst optionsRef=useRef(options);const animation=useRef();const didInitialMount=useRef(false);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;// in-progress - trying to figure out effect hooks\nconst onChangeDeps=(options===null||options===void 0?void 0:options.onChangeDeps)?options.onChangeDeps:[];// Memoize the onChange handler\nconst onChange=useCallback(options===null||options===void 0?void 0:options.onChange,[...onChangeDeps,]);// Optionally scale the value from props\nconst transformer=useCallback(value=>{var ref;return((ref=optionsRef.current)===null||ref===void 0?void 0:ref.transform)?optionsRef.current.transform(value):value;},[]);// Create new MotionValue from inputValue\nconst value1=useConstant(()=>isMotionValue(inputValue)?inputValue:motionValue(transformer(inputValue)));// Setting value from prop change\nuseEffect(()=>{if(!isMotionValue(inputValue)&&didInitialMount.current){var ref,ref1;const newValue=transformer(inputValue);(ref=animation.current)===null||ref===void 0?void 0:ref.stop();// Call change callback\nif(onChange)onChange(newValue,value1);// Trigger animation to new value\nif(((ref1=optionsRef.current)===null||ref1===void 0?void 0:ref1.animate)&&!isOnCanvas){var ref2;// @ts-ignore\nanimation.current=animate(value1,newValue,(ref2=optionsRef.current)===null||ref2===void 0?void 0:ref2.transition);}else{value1.set(newValue);}}didInitialMount.current=true;},[inputValue,...onChangeDeps]);return value1;}\nexport const __FramerMetadata__ = {\"exports\":{\"useAutoMotionValue\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./useAutoMotionValue.map","/*\n * useAutoMotionValue (framer/useAutoMotionValue@0.3.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/V4SPg9g59hF1vFH3ZTF0/useAutoMotionValue.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{useMotionValueEvent}from\"framer-motion\";import{useRef,useEffect,useMemo,useCallback,memo}from\"react\";import{ControlType,addPropertyControls,useIsInCurrentNavigationTarget}from\"framer\";import{useOnEnter,useOnExit,defaultEvents,useIsOnCanvas,useIsBrowserSafari,useRadius,borderRadiusControl}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{useAutoMotionValue}from\"https://framer.com/m/framer/useAutoMotionValue.js@^0.3.0\";var ObjectFitType;(function(ObjectFitType){ObjectFitType[\"Fill\"]=\"fill\";ObjectFitType[\"Contain\"]=\"contain\";ObjectFitType[\"Cover\"]=\"cover\";ObjectFitType[\"None\"]=\"none\";ObjectFitType[\"ScaleDown\"]=\"scale-down\";})(ObjectFitType||(ObjectFitType={}));var SrcType;(function(SrcType){SrcType[\"Video\"]=\"Upload\";SrcType[\"Url\"]=\"URL\";})(SrcType||(SrcType={}));// Reduce renders\nfunction getProps(props){const{width,height,topLeft,topRight,bottomRight,bottomLeft,id,children,...rest}=props;return rest;}/**\n * VIDEO\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 112\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */ export function Video(props){const newProps=getProps(props);return /*#__PURE__*/ _jsx(VideoMemo,{...newProps});}/**\n * For the useEffect hook to change progress of the video on state change.\n * It was causing the video to restart on hydration\n */ let isMountedAndReadyForProgressChanges=false;const VideoMemo=/*#__PURE__*/ memo(function VideoInner(props){const{srcType,srcFile,srcUrl,playing,canvasPlay,muted,playsinline,controls,progress,objectFit,backgroundColor,radius,topLeft,topRight,bottomRight,bottomLeft,isMixed,onSeeked,onPause,onPlay,onEnd,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,poster,restartOnEnter,posterEnabled,startTime:startTimeProp,volume,loop}=props;const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const videoRef=useRef();const isSafari=useIsBrowserSafari();const requestingPlay=useRef(false);const wasPausedOnLeave=useRef(null);const wasEndedOnLeave=useRef(null);const isOnCanvas=useIsOnCanvas();const borderRadius=useRadius(props);// Video elements behave oddly at 100% duration\nconst startTime=useMemo(()=>startTimeProp===100?99.9:startTimeProp,[startTimeProp]);const shouldPlay=!isOnCanvas||canvasPlay;const autoPlay=useMemo(()=>playing,[]);const isMuted=useMemo(()=>isOnCanvas?true:muted,[isOnCanvas,muted]);const setProgress=useCallback(rawProgress=>{if(!videoRef.current)return;const newProgress=(rawProgress===1?.999:rawProgress)*videoRef.current.duration;const isAlreadySet=Math.abs(videoRef.current.currentTime-newProgress)<.1;if(videoRef.current.duration>0&&!isAlreadySet){videoRef.current.currentTime=newProgress;}},[]);const play=useCallback(()=>{const isPlaying=videoRef.current.currentTime>0&&videoRef.current.onplaying&&!videoRef.current.paused&&!videoRef.current.ended&&videoRef.current.readyState>videoRef.current.HAVE_CURRENT_DATA;if(!isPlaying&&videoRef.current&&!requestingPlay.current&&isInCurrentNavigationTarget){requestingPlay.current=true;videoRef.current.play().catch(e=>{}) // It's likely fine, swallow error\n.finally(()=>requestingPlay.current=false);}},[]);const pause=useCallback(()=>{if(!videoRef.current||requestingPlay.current)return;videoRef.current.pause();},[]);// Pause/play via props\nuseEffect(()=>{if(playing&&shouldPlay)play();else pause();},[playing,canvasPlay]);// Change progress via prop\nuseEffect(()=>{if(isMountedAndReadyForProgressChanges)setProgress(startTime*.01);else isMountedAndReadyForProgressChanges=true;},[startTime,srcFile,srcUrl]);const videoProgress=useAutoMotionValue(progress,{transform:value=>value*.01,onChange:newValue=>{setProgress(newValue);}});// Allow scrubbing with MotionValue\nuseMotionValueEvent(videoProgress,\"change\",latest=>{if(!isOnCanvas)setProgress(latest);});// (Prototyping) Checking if we need to play on navigation enter\nuseOnEnter(()=>{if(wasPausedOnLeave.current===null)return;if(videoRef.current){// if (restartOnEnter) setProgress(0)\nif(!wasEndedOnLeave&&loop||!wasPausedOnLeave.current)play();}});// (Prototyping) Pausing & saving playing state on navigation exit\nuseOnExit(()=>{if(videoRef.current){wasEndedOnLeave.current=videoRef.current.ended;wasPausedOnLeave.current=videoRef.current.paused;pause();}});const src=useMemo(()=>{let fragment=\"\";// if (\n//     startTime > 0 &&\n//     videoRef.current &&\n//     !isNaN(videoRef.current.duration) &&\n//     !isOnCanvas\n// ) {\n//     console.log(startTime, videoRef.current.duration)\n//     fragment = `#t=${startTime * videoRef.current.duration}`\n// }\nif(srcType===SrcType.Url)return srcUrl+fragment;if(srcType===SrcType.Video)return srcFile+fragment;},[srcType,srcFile,srcUrl,startTime]);// Autoplay via JS to work in Safari\nuseEffect(()=>{if(isSafari&&videoRef.current&&autoPlay){setTimeout(()=>play(),50);}},[]);// Volume Control\nuseEffect(()=>{if(videoRef.current&&!muted)videoRef.current.volume=volume/100;},[volume]);// When video is ready, set start-time, then autoplay if needed\nconst handleReady=()=>{if(videoRef.current&&videoRef.current.currentTime<.3)setProgress(startTime*.01);if(shouldPlay&&videoRef.current&&autoPlay)play();};return /*#__PURE__*/ _jsx(\"video\",{onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,src:src,loop:loop,ref:videoRef,onSeeked:e=>{return onSeeked===null||onSeeked===void 0?void 0:onSeeked(e);},onPause:e=>{return onPause===null||onPause===void 0?void 0:onPause(e);},onPlay:e=>{return onPlay===null||onPlay===void 0?void 0:onPlay(e);},onEnded:e=>{return onEnd===null||onEnd===void 0?void 0:onEnd(e);},autoPlay:autoPlay&&shouldPlay,poster:posterEnabled?poster:undefined,onLoadedData:handleReady,controls:controls,muted:isMuted,playsInline:playsinline,style:{cursor:!!onClick?\"pointer\":\"auto\",width:\"100%\",height:\"100%\",borderRadius,display:\"block\",objectFit:objectFit,backgroundColor:backgroundColor,objectPosition:\"50% 50%\"}});});Video.displayName=\"Video\";Video.defaultProps={srcType:SrcType.Url,srcUrl:\"https://assets.mixkit.co/videos/preview/mixkit-ice-cream-glass-of-red-soda-5094-small.mp4\",srcFile:\"\",posterEnabled:false,controls:false,autoPlay:true,canvasPlay:false,loop:true,muted:true,playsinline:true,restartOnEnter:false,objectFit:ObjectFitType.Cover,backgroundColor:\"rgba(0,0,0,0)\",radius:0,volume:25,startTime:0};addPropertyControls(Video,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[SrcType.Url,SrcType.Video]},srcUrl:{type:ControlType.String,title:\" \",placeholder:\"../example.mp4\",hidden(props){return props.srcType===SrcType.Video;},description:\"Hosted video file URL. For Youtube, use the Youtube component.\"},srcFile:{type:ControlType.File,title:\" \",allowedFileTypes:[\"mp4\"],hidden(props){return props.srcType===SrcType.Url;}},playing:{type:ControlType.Boolean,title:\"Playing\",enabledTitle:\"Yes\",disabledTitle:\"No\"},posterEnabled:{type:ControlType.Boolean,title:\"Poster\",enabledTitle:\"Yes\",disabledTitle:\"No\"},poster:{type:ControlType.Image,title:\" \",hidden:({posterEnabled})=>!posterEnabled},backgroundColor:{type:ControlType.Color,title:\"Background\"},...borderRadiusControl,startTime:{title:\"Start Time\",type:ControlType.Number,min:0,max:100,step:.1,unit:\"%\"},loop:{type:ControlType.Boolean,title:\"Loop\",enabledTitle:\"Yes\",disabledTitle:\"No\"},objectFit:{type:ControlType.Enum,title:\"Fit\",options:[ObjectFitType.Cover,ObjectFitType.Fill,ObjectFitType.Contain,ObjectFitType.ScaleDown,ObjectFitType.None,]},canvasPlay:{type:ControlType.Boolean,title:\"On Canvas\",enabledTitle:\"Play\",disabledTitle:\"Pause\",hidden(props){return props.autoPlay===false;}},// restartOnEnter: {\n//     type: ControlType.Boolean,\n//     title: \"On ReEnter\",\n//     enabledTitle: \"Restart\",\n//     disabledTitle: \"Resume\",\n// },\ncontrols:{type:ControlType.Boolean,title:\"Controls\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},muted:{type:ControlType.Boolean,title:\"Muted\",enabledTitle:\"Yes\",disabledTitle:\"No\"},volume:{type:ControlType.Number,max:100,min:0,unit:\"%\",hidden:({muted})=>muted},onEnd:{type:ControlType.EventHandler},onSeeked:{type:ControlType.EventHandler},onPause:{type:ControlType.EventHandler},onPlay:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"VideoProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Video\":{\"type\":\"reactComponent\",\"name\":\"Video\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"112\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video.map","// Liquid Gradient\nimport{defineShader,ControlType}from\"framer\";export default defineShader({title:\"Liquid Gradient\",resolutionScale:\"consistent\",fragment:`\n// === CONSTANTS ===\nconst float GOLDEN_ANGLE = 2.3999632;\nconst float TAU = 6.28318530;\n\n// === PCG hash - https://www.jcgt.org/published/0009/03/02/\nuvec3 hash3(uvec3 v) {\n    v = v * 1664525u + 1013904223u;\n    v.x += v.y * v.z;\n    v.y += v.z * v.x;\n    v.z += v.x * v.y;\n    v ^= v >> 16u;\n    v.x += v.y * v.z;\n    v.y += v.z * v.x;\n    v.z += v.x * v.y;\n    return v;\n}\n\n// Seed\nvec3 seedRandom(float seedVal) {\n    uvec3 s = uvec3(\n        floatBitsToUint(seedVal),\n        floatBitsToUint(seedVal * 1.5 + 7.31),\n        floatBitsToUint(seedVal * 2.7 + 13.37)\n    );\n    s = hash3(s);\n    return vec3(s) / float(0xFFFFFFFFu);\n}\n\n// === COLOR SPACE UTILITIES ===\nvec3 toLinear(vec3 c) {\n    return pow(c, vec3(2.2));\n}\n\nvec3 toSrgb(vec3 c) {\n    return pow(clamp(c, 0.0, 1.0), vec3(0.4545));\n}\n\nvec3 linearToOklab(vec3 c) {\n    float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;\n    float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;\n    float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;\n    \n    l = pow(max(l, 0.0), 1.0/3.0);\n    m = pow(max(m, 0.0), 1.0/3.0);\n    s = pow(max(s, 0.0), 1.0/3.0);\n    \n    return vec3(\n        0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s,\n        1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s,\n        0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s\n    );\n}\n\nvec3 oklabToLinear(vec3 c) {\n    float l = c.x + 0.3963377774 * c.y + 0.2158037573 * c.z;\n    float m = c.x - 0.1055613458 * c.y - 0.0638541728 * c.z;\n    float s = c.x - 0.0894841775 * c.y - 1.2914855480 * c.z;\n    \n    l = l * l * l;\n    m = m * m * m;\n    s = s * s * s;\n    \n    return vec3(\n        +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n        -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n        -0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s\n    );\n}\n\nvec3 oklabToLch(vec3 lab) {\n    return vec3(lab.x, length(lab.yz), atan(lab.z, lab.y));\n}\n\nvec3 lchToOklab(vec3 lch) {\n    return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\nvec3 mixLch(vec3 lab0, vec3 lab1, float t) {\n    vec3 lch0 = oklabToLch(lab0);\n    vec3 lch1 = oklabToLch(lab1);\n    \n    if (lch0.y < 0.05) lch0.z = lch1.z;\n    if (lch1.y < 0.05) lch1.z = lch0.z;\n    \n    float dh = lch1.z - lch0.z;\n    if (dh > 3.14159265) dh -= 6.28318530;\n    if (dh < -3.14159265) dh += 6.28318530;\n    \n    return lchToOklab(vec3(\n        mix(lch0.x, lch1.x, t),\n        mix(lch0.y, lch1.y, t),\n        lch0.z + dh * t\n    ));\n}\n\n// === PALETTE SAMPLING ===\nvec3 getColor(int idx) {\n    if (u_colors_length < 1) return vec3(0.0);\n    int safeIdx = clamp(idx, 0, u_colors_length - 1);\n    return u_colors[safeIdx].rgb;\n}\n\nvec3 paletteN(float t, int count) {\n    if (count < 1) return vec3(0.0);\n    if (count < 2) return toLinear(getColor(0));\n    \n    float segmentSize = 1.0 / float(count - 1);\n    t = clamp(t, 0.0, 1.0);\n    int idx = min(int(floor(t / segmentSize)), count - 2);\n    float localT = clamp((t - float(idx) * segmentSize) / segmentSize, 0.0, 1.0);\n    \n    vec3 lab0 = linearToOklab(toLinear(getColor(idx)));\n    vec3 lab1 = linearToOklab(toLinear(getColor(idx + 1)));\n    \n    return oklabToLinear(mixLch(lab0, lab1, localT));\n}\n\n// === DITHER ===\nfloat IGN(vec2 uv) {\n    return fract(52.9829189 * fract(dot(uv, vec2(0.06711056, 0.00583715))));\n}\n\nfloat quickNoise(vec2 I) {\n    return fract(sin(dot(I, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\n// Dither Mode: 0=Off, 1=IGN, 2=quickNoise\nfloat getDither(vec2 I, float mode) {\n    if (mode < 0.5) return 0.5;          // 0: Off\n    if (mode < 1.5) return IGN(I);       // 1: Smooth\n    return quickNoise(I);                // 2: Grain\n}\n\n// === POST-PROCESS ===\nvec3 softGamutMap(vec3 linearRgb) {\n    float maxC = max(linearRgb.r, max(linearRgb.g, linearRgb.b));\n    float minC = min(linearRgb.r, min(linearRgb.g, linearRgb.b));\n    \n    if (minC >= 0.0 && maxC <= 1.0) return linearRgb;\n    \n    vec3 lab = linearToOklab(max(linearRgb, 0.0));\n    float L = clamp(lab.x, 0.0, 1.0);\n    float C = length(lab.yz);\n    float h = atan(lab.z, lab.y);\n    \n    float maxChroma = 0.4 * (1.0 - pow(abs(2.0 * L - 1.0), 2.0));\n    \n    if (C > maxChroma * 0.7) {\n        float knee = maxChroma * 0.7;\n        C = knee + (maxChroma - knee) * tanh((C - knee) / (maxChroma - knee + 0.001));\n    }\n    \n    return clamp(oklabToLinear(vec3(L, C * cos(h), C * sin(h))), 0.0, 1.0);\n}\n\nvec3 applyContrastSaturation(vec3 linearRgb, float contrast, float saturation) {\n    vec3 lab = linearToOklab(linearRgb);\n    float C = length(lab.yz);\n    float h = atan(lab.z, lab.y);\n    \n    lab.x = clamp((lab.x - 0.5) * contrast + 0.5, 0.0, 1.0);\n    C *= saturation;\n    lab.y = C * cos(h);\n    lab.z = C * sin(h);\n    \n    return oklabToLinear(lab);\n}\n\n// === MAIN ===\nvoid main() {\n    vec2 fragCoord = v_uv * u_resolution;\n    vec2 r = u_resolution;\n    vec2 p = (fragCoord * 2.0 - r) / r.y;\n    \n    int colorCount = u_colors_length;\n    \n    // Early out: no colors -> black\n    if (colorCount < 1) {\n        fragColor = vec4(0.0, 0.0, 0.0, 1.0);\n        return;\n    }\n\n    float t = u_time * 0.3;\n    \n    // Map time onto a circle so animation seamlessly wraps.\n    float looping = step(0.5, u_loop);\n    float phase = TAU * u_time / max(u_loop, 0.01);\n    float radius = u_loop * u_speed * 0.3 / TAU;\n    float tA = sin(phase) * radius;\n    float tB = (1.0 - cos(phase)) * radius;\n    \n    // Seed-based offsets\n    vec3 seedOffset = seedRandom(u_seed);\n    vec3 seedOffset2 = seedRandom(u_seed + 100.0);\n    \n    // Golden angle rotation\n    float seedAngle = u_seed * GOLDEN_ANGLE;\n    vec2 seedPhase = (seedOffset2.xy - 0.5) * TAU;\n    \n    // Seed-based rotation\n    float cs = cos(seedAngle);\n    float sn = sin(seedAngle);\n    p = mat2(cs, -sn, sn, cs) * p;\n    \n    // Get dither value\n    float dither = getDither(floor(fragCoord / u_pixelRatio), u_ditherMode);\n    \n    // === TURBULENCE ===\n    float totalVal = 0.0;\n    float totalWeight = 0.0;\n    int turbIter = int(u_turbIter);\n    \n    float freq = 1.0 / max(u_turbFreq, 0.01);\n    \n    for (float i = 0.0; i < 4.0; i++) {\n        float eph = i / 4.0;\n       \n        vec2 q = p * u_scale;\n        float sq = eph * eph;\n        \n        if (u_jellify > 0.5) {\n            q.yx *= mix(1.0, 0.5, 1.0 - exp(-sq));\n        }\n        \n        float a = seedPhase.x;\n        float d = seedPhase.y;\n        \n        for (int j = 2; j < 13; j++) {\n            if (j >= turbIter) break;\n            float fj = float(j);\n            // When looping, use circular time. Otherwise original t.\n            float t1 = mix(t * u_speed, tA, looping);\n            float t2 = mix(t * u_speed, tB, looping);\n            q += u_turbAmp * sin(q.yx / freq * fj + t1 + vec2(a, d) + seedOffset.xy * fj) / fj;\n            a += cos(fj + d * 1.2 + q.x * 2.0 - t1 + seedOffset2.z + t2 * 0.3 * looping);\n            d += sin(fj * q.y + a + seedOffset.z + t1 + seedOffset2.y + t2 * 0.3 * looping);\n        }\n        \n        float v = 0.5 + 0.5 * sin(length(q.yx + vec2(a, d) * 0.2) * u_waveFreq + i * i + seedOffset.x);\n        float weight = smoothstep(0.0, 0.5, eph) * smoothstep(1.0, 0.5, eph);\n        totalVal += v * weight;\n        totalWeight += weight;\n    }\n    \n    float val = totalVal / totalWeight;\n    val = clamp((val - 0.3) / 0.4, 0.0, 1.0);\n    val = pow(val, exp(-u_distBias));\n    val = clamp(val + (dither - 0.5) * u_dither, 0.0, 1.0);\n    \n    vec3 col = paletteN(val, colorCount);\n    col *= u_exposure;\n    col = applyContrastSaturation(col, u_contrast, u_saturation);\n    col = softGamutMap(col);\n    col = toSrgb(col);\n    \n    fragColor = vec4(col, 1.0);\n}\n`,propertyControls:{colors:{type:ControlType.Array,title:\"Colors\",control:{type:ControlType.Color},maxCount:8,defaultValue:[\"#00001A\",\"#2962FF\",\"#40BCFF\",\"#FFB8B5\",\"#FFC14F\"]},seed:{type:ControlType.Number,title:\"Seed\",defaultValue:648,min:0,max:1e3,step:1},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:.3,min:0,max:2,step:.01},loop:{type:ControlType.Number,title:\"Loop\",defaultValue:0,min:0,max:60,step:.5,hiddenWhenUnset:true,displayStepper:true},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:.42,min:.1,max:2,step:.01},turbAmp:{type:ControlType.Number,title:\"Amplitude\",defaultValue:.6,min:0,max:1,step:.01},turbFreq:{type:ControlType.Number,title:\"Frequency\",defaultValue:.1,min:.1,max:2,step:.01},turbIter:{type:ControlType.Number,title:\"Definition\",defaultValue:7,min:3,max:10,step:1,displayStepper:true},waveFreq:{type:ControlType.Number,title:\"Bands\",defaultValue:3.8,min:.1,max:5,step:.1},distBias:{type:ControlType.Number,title:\"Bias\",defaultValue:0,min:-1,max:1,step:.1,hiddenWhenUnset:true},jellify:{type:ControlType.Boolean,title:\"Jellify\",defaultValue:false,hiddenWhenUnset:true},ditherMode:{type:ControlType.Enum,title:\"Noise\",options:[0,1,2],optionTitles:[\"Off\",\"Smooth\",\"Grain\"],defaultValue:0},dither:{type:ControlType.Number,title:\"Amount\",defaultValue:.05,min:0,max:.2,step:.01,hidden:props=>props.ditherMode===0},exposure:{type:ControlType.Number,title:\"Exposure\",defaultValue:1.1,min:.5,max:2,step:.1,section:\"Filters\",displayStepper:true,hiddenWhenUnset:true},contrast:{type:ControlType.Number,title:\"Contrast\",defaultValue:1.1,min:.5,max:2,step:.1,section:\"Filters\",displayStepper:true,hiddenWhenUnset:true},saturation:{type:ControlType.Number,title:\"Saturation\",defaultValue:1,min:0,max:2,step:.1,section:\"Filters\",displayStepper:true,hiddenWhenUnset:true}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"shader\",\"name\":null,\"annot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