"use client";

import React, { useMemo, useRef } from 'react';
import { Canvas, useFrame, RootState } from '@react-three/fiber';
import { Color, Mesh, ShaderMaterial, IUniform } from 'three';

interface UniformValue<T = number | Color> {
  value: T;
}

interface SilkUniforms {
  uSpeed: UniformValue<number>;
  uScale: UniformValue<number>;
  uNoiseIntensity: UniformValue<number>;
  uColor: UniformValue<Color>;
  uRotation: UniformValue<number>;
  uTime: UniformValue<number>;
  [uniform: string]: IUniform;
}

const vertexShader = `
varying vec2 vUv;
varying vec3 vPosition;

void main() {
  vPosition = position;
  vUv = uv;
  // Fullscreen quad without camera projection
  gl_Position = vec4(position.xy, 0.0, 1.0);
}
`;

const fragmentShader = `
varying vec2 vUv;
varying vec3 vPosition;

uniform float uTime;
uniform vec3  uColor;
uniform float uSpeed;
uniform float uScale;
uniform float uRotation;
uniform float uNoiseIntensity;

const float e = 2.71828182845904523536;

float noise(vec2 texCoord) {
  float G = e;
  vec2  r = (G * sin(G * texCoord));
  return fract(r.x * r.y * (1.0 + texCoord.x));
}

vec2 rotateUvs(vec2 uv, float angle) {
  float c = cos(angle);
  float s = sin(angle);
  mat2  rot = mat2(c, -s, s, c);
  return rot * uv;
}

void main() {
  float rnd        = noise(gl_FragCoord.xy);
  vec2  uv         = rotateUvs(vUv * uScale, uRotation);
  vec2  tex        = uv * uScale;
  float tOffset    = uSpeed * uTime;

  tex.y += 0.03 * sin(8.0 * tex.x - tOffset);

  float pattern = 0.6 +
                  0.4 * sin(5.0 * (tex.x + tex.y +
                                   cos(3.0 * tex.x + 5.0 * tex.y) +
                                   0.02 * tOffset) +
                           sin(20.0 * (tex.x + tex.y - 0.1 * tOffset)));

  vec4 col = vec4(uColor, 1.0) * vec4(pattern) - rnd / 15.0 * uNoiseIntensity;
  col.a = 1.0;
  gl_FragColor = col;
}
`;

interface SilkPlaneProps {
  uniforms: SilkUniforms;
}

const SilkPlane = function SilkPlane({ uniforms }: SilkPlaneProps) {
  const ref = useRef<Mesh>(null);

  useFrame((_state: RootState, delta: number) => {
    const mesh = ref.current;
    if (mesh) {
      const material = mesh.material as ShaderMaterial & {
        uniforms: SilkUniforms;
      };
      material.uniforms.uTime.value += 0.1 * delta;
    }
  });

  return (
    <mesh ref={ref}>
      <planeGeometry args={[2, 2]} />
      <shaderMaterial uniforms={uniforms} vertexShader={vertexShader} fragmentShader={fragmentShader} />
    </mesh>
  );
};

export interface SilkProps {
  speed?: number;
  scale?: number;
  color?: string;
  noiseIntensity?: number;
  rotation?: number;
}

const Silk: React.FC<SilkProps> = ({ speed = 5, scale = 1, color = '#FFC529', noiseIntensity = 1.5, rotation = 0 }) => {
  const uniforms = useMemo<SilkUniforms>(
    () => ({
      uSpeed: { value: speed },
      uScale: { value: scale },
      uNoiseIntensity: { value: noiseIntensity },
      uColor: { value: new Color(color) },
      uRotation: { value: rotation },
      uTime: { value: 0 }
    }),
    [speed, scale, noiseIntensity, color, rotation]
  );

  return (
    <div className="relative w-full h-full overflow-hidden">
      <div className="absolute inset-0">
        <Canvas dpr={[1, 2]} frameloop="always">
          <SilkPlane uniforms={uniforms} />
        </Canvas>
      </div>

      <div className="absolute inset-0 pointer-events-none flex items-center justify-center mix-blend-overlay opacity-80">
        <style>{`
          @keyframes drawTukan {
            0% { stroke-dashoffset: 100; fill: transparent; opacity: 0; stroke-width: 0.5px; }
            5% { opacity: 0.8; stroke-width: 1.5px; }
            35% { stroke-dashoffset: 0; fill: rgba(255, 255, 255, 0.08); }
            65% { stroke-dashoffset: 0; fill: rgba(255, 255, 255, 0.08); opacity: 0.8; }
            95% { stroke-dashoffset: -100; fill: transparent; opacity: 0; stroke-width: 0.5px; }
            100% { stroke-dashoffset: -100; opacity: 0; fill: transparent; }
          }
          .animate-draw-tukan {
            stroke-dasharray: 100;
            animation: drawTukan 16s ease-in-out infinite;
          }
        `}</style>
                <svg 
          viewBox="0 0 439 255" 
          className="w-[130%] max-w-[1400px] -rotate-[25deg] text-white drop-shadow-[0_0_15px_rgba(255,255,255,0.4)]"
          fill="transparent" 
          stroke="currentColor" 
          strokeWidth="1"
        >

<mask id="path-1-outside-1_204_2" maskUnits="userSpaceOnUse" x="0" y="-0.429688" width="439" height="255" fill="black">
<rect fill="white" y="-0.429688" width="439" height="255"/>
<path d="M118.345 201.634C123.819 189.413 126.556 174.583 126.556 157.144C126.556 141.55 125.188 128.12 122.45 116.855C119.713 105.589 116.467 95.4692 112.711 86.4948H111.279C108.733 94.1326 105.105 102.63 100.395 111.986C95.7479 121.278 91.5786 128.534 87.8867 133.753C100.554 140.627 109.752 146.26 115.48 150.652C121.273 154.98 124.169 158.099 124.169 160.008C124.169 163.509 121.273 167.041 115.48 170.605C109.688 174.17 101.827 177.129 91.8969 179.484C82.0306 181.776 71.305 182.921 59.7201 182.921C43.5522 182.921 31.5536 180.184 23.7242 174.711C15.8949 169.173 11.9802 160.772 11.9802 149.506C11.9802 140.277 14.0489 129.457 18.1864 117.046H15.7994C10.7708 128.693 7.04706 140.086 4.62824 151.225C2.20941 162.299 1 173.342 1 184.353C1 195.81 3.13238 205.644 7.39715 213.854C11.6619 222.065 17.9318 228.334 26.2067 232.662C34.4816 237.054 44.5388 239.25 56.3783 239.25C71.2732 239.25 83.972 236.035 94.4748 229.607C104.978 223.242 112.934 213.918 118.345 201.634Z"/>
<path d="M44.7298 128.693C50.0767 132.767 54.1187 136.522 56.8557 139.959L80.2483 115.136C77.6385 111.127 73.6602 106.862 68.3133 102.343C63.0301 97.7605 58.097 94.3872 53.5139 92.2231L31.5536 118.955V120.387C35.0545 121.851 39.4466 124.62 44.7298 128.693Z"/>
<path d="M345.309 131.844C335.825 134.072 323.254 135.185 307.595 135.185C302.375 135.185 297.729 134.931 293.655 134.422C289.581 133.849 286.43 133.117 284.202 132.226C281.974 131.335 280.861 130.412 280.861 129.457C280.861 128.311 282.07 127.038 284.489 125.638C286.971 124.174 290.218 122.933 294.228 121.915C298.302 120.896 302.598 120.387 307.117 120.387C315.456 120.387 322.967 121.437 329.651 123.538C336.398 125.638 341.618 128.407 345.309 131.844Z"/>
<path d="M367.491 44.2963C370.801 46.3331 376.147 47.3514 383.531 47.3514C388.751 47.3514 395.498 47.1605 403.773 46.7786C412.048 46.3967 419.623 45.9512 426.497 45.442C427.452 41.0503 429.075 35.4493 431.367 28.639C433.722 21.765 435.6 17.0233 437 14.4137C431.144 14.9229 423.474 15.3684 413.989 15.7503C404.505 16.1322 396.58 16.3231 390.215 16.3231H389.737C384.709 16.3231 380.794 16.1004 377.993 15.6548C375.193 15.1456 373.188 14.35 371.978 13.268C370.769 12.186 370.164 10.6585 370.164 8.6854H368.732C368.414 10.5948 367.936 12.727 367.3 15.082C366.663 17.437 366.027 19.6646 365.39 21.765C364.435 24.6292 363.735 27.0478 363.29 29.0209C362.78 30.994 362.526 32.7443 362.526 34.2718C362.526 38.9181 364.181 42.2596 367.491 44.2963Z"/>
</mask>
<path d="M167.069 186.072L167.329 185.644V185.644L167.069 186.072ZM153.511 166.596L153.036 166.75L153.036 166.751L153.511 166.596ZM147.591 125.638L147.092 125.662L147.092 125.663L147.591 125.638ZM134.224 35.8948L133.899 35.5155L133.653 35.7264L133.745 36.0368L134.224 35.8948ZM151.602 18.9009L151.966 19.2428L151.968 19.2411L151.602 18.9009ZM166.687 0.570312V0.0703125H166.422L166.273 0.29056L166.687 0.570312ZM168.12 0.570312H168.62V0.0703125H168.12V0.570312ZM168.883 15.6548L169.383 15.6255L169.382 15.6165L168.883 15.6548ZM168.215 88.5952L167.716 88.5601L167.716 88.5615L168.215 88.5952ZM169.934 124.684L169.493 124.92L169.497 124.926L169.934 124.684ZM240.963 131.653L241.033 132.148L241.036 132.148L240.963 131.653ZM248.602 115.518L248.829 115.073H248.829L248.602 115.518ZM220.149 103.775L219.979 104.246L219.982 104.246L220.149 103.775ZM182.434 92.0322L181.983 91.8162L181.723 92.3593L182.305 92.5152L182.434 92.0322ZM192.364 66.9231L192.834 67.0944V67.0944L192.364 66.9231ZM201.53 40.1911L201.053 40.0419L201.051 40.0494L201.53 40.1911ZM206.018 32.076L206.396 32.4031L206.4 32.398L206.018 32.076ZM212.51 27.3024L212.356 26.8269L212.352 26.828L212.51 27.3024ZM294.623 0.570312L294.977 0.216746L294.76 -3.42131e-05L294.468 0.0948729L294.623 0.570312ZM295.578 1.52502L296.008 1.77922L296.205 1.44549L295.931 1.17145L295.578 1.52502ZM284.98 23.388L285.439 23.5846L285.44 23.5835L284.98 23.388ZM276.959 45.442L277.039 45.9357L277.362 45.8836L277.444 45.5659L276.959 45.442ZM205.731 56.8986L205.652 56.4049L205.202 56.4773L205.232 56.9319L205.731 56.8986ZM205.827 58.3307L205.328 58.3639L205.349 58.6818L205.646 58.7969L205.827 58.3307ZM240.581 75.6111L240.292 76.0188L240.294 76.0199L240.581 75.6111ZM257.099 94.419L256.642 94.6205L256.643 94.6221L257.099 94.419ZM254.604 217.768L254.511 217.277L254.104 217.354V217.768H254.604ZM296.519 207.553L296.374 207.075L296.373 207.075L296.519 207.553ZM330.606 194.76L330.393 194.307L330.392 194.308L330.606 194.76ZM351.993 181.489L352.334 181.855L352.493 181.707V181.489H351.993ZM351.993 180.057H352.493V179.223L351.758 179.616L351.993 180.057ZM331.178 187.981L331.294 188.468L331.297 188.467L331.178 187.981ZM284.584 181.012L284.2 181.332L284.203 181.336L284.584 181.012ZM281.72 114.754L282.198 114.902L282.198 114.901L281.72 114.754ZM295.946 88.6907L295.589 88.3408L295.589 88.3408L295.946 88.6907ZM343.495 93.0824L343.091 93.377L343.094 93.3801L343.495 93.0824ZM357.244 134.231L356.749 134.296L356.806 134.731H357.244V134.231ZM357.531 191.514V191.014H357.099L357.036 191.441L357.531 191.514ZM346.646 225.693L346.211 225.447L346.21 225.449L346.646 225.693ZM328.6 246.601L328.321 246.186L328.319 246.188L328.6 246.601ZM295.183 250.802L295.392 250.347L295.386 250.345L295.183 250.802ZM284.393 244.214L284.076 244.601V244.601L284.393 244.214ZM272.936 233.808L273.284 233.449L273.284 233.449L272.936 233.808ZM262.91 224.547L263.235 224.167L263.23 224.163L262.91 224.547ZM254.604 219.2H254.104V219.519L254.392 219.654L254.604 219.2ZM417.045 174.997L416.659 174.678L416.659 174.679L417.045 174.997ZM402.723 133.18L402.77 133.678L402.774 133.678L402.723 133.18ZM421.15 130.412L421.259 130.9L421.266 130.898L421.15 130.412ZM423.537 120.674L423.195 121.038L423.199 121.041L423.537 120.674ZM410.648 110.649L410.36 111.058L410.366 111.062L410.648 110.649ZM393.557 99.8609L393.158 99.5592L392.814 100.014L393.31 100.296L393.557 99.8609ZM406.255 79.239L405.815 79.0015L405.815 79.0027L406.255 79.239ZM415.994 58.3307V57.8307H415.635L415.521 58.1708L415.994 58.3307ZM417.427 58.3307L417.902 58.1772L417.791 57.8307H417.427V58.3307ZM419.336 64.2499L418.86 64.4035L418.864 64.415L419.336 64.2499ZM427.452 92.1277L426.965 92.242L426.965 92.2428L427.452 92.1277ZM191.99 191.514V191.014C181.407 191.014 173.203 189.206 167.329 185.644L167.069 186.072L166.81 186.499C172.902 190.193 181.312 192.014 191.99 192.014V191.514ZM167.069 186.072L167.329 185.644C161.482 182.099 157.02 175.729 153.987 166.44L153.511 166.596L153.036 166.751C156.113 176.175 160.69 182.788 166.81 186.499L167.069 186.072ZM153.511 166.596L153.987 166.441C150.952 157.084 148.981 143.484 148.091 125.613L147.591 125.638L147.092 125.663C147.984 143.563 149.96 157.267 153.036 166.75L153.511 166.596ZM147.591 125.638L148.091 125.614C147.136 105.873 145.639 89.243 143.598 75.7274L143.104 75.802L142.61 75.8766C144.643 89.3477 146.138 105.942 147.092 125.662L147.591 125.638ZM143.104 75.802L143.598 75.7274C141.558 62.2112 138.593 48.8863 134.704 35.7529L134.224 35.8948L133.745 36.0368C137.621 49.1262 140.576 62.4061 142.61 75.8766L143.104 75.802ZM134.224 35.8948L134.55 36.2741C139.534 31.9939 145.339 26.3152 151.966 19.2427L151.602 18.9009L151.237 18.559C144.624 25.6163 138.845 31.267 133.899 35.5155L134.224 35.8948ZM151.602 18.9009L151.968 19.2411C158.597 12.1032 163.644 5.97186 167.102 0.850065L166.687 0.570312L166.273 0.29056C162.856 5.35241 157.847 11.4414 151.235 18.5606L151.602 18.9009ZM166.687 0.570312V1.07031H168.12V0.570312V0.0703125H166.687V0.570312ZM168.12 0.570312H167.62C167.62 4.02693 167.875 9.07046 168.385 15.6932L168.883 15.6548L169.382 15.6165C168.873 9.00046 168.62 3.98764 168.62 0.570312H168.12ZM168.883 15.6548L168.384 15.6842C168.639 20.0107 168.893 24.6874 169.148 29.7145L169.647 29.6892L170.147 29.6639C169.892 24.6346 169.637 19.9551 169.383 15.6255L168.883 15.6548ZM169.647 29.6892L169.148 29.7145C169.402 34.7358 169.529 39.3417 169.529 43.5326H170.029H170.529C170.529 39.3219 170.402 34.6989 170.147 29.6639L169.647 29.6892ZM170.029 43.5326H169.529C169.529 56.3746 168.925 71.3832 167.716 88.5601L168.215 88.5952L168.714 88.6303C169.924 71.4374 170.529 56.4043 170.529 43.5326H170.029ZM168.215 88.5952L167.716 88.5615C167.016 98.9356 166.665 106.207 166.665 110.363H167.165H167.665C167.665 106.244 168.014 99.004 168.714 88.6289L168.215 88.5952ZM167.165 110.363H166.665C166.665 116.513 167.592 121.381 169.493 124.92L169.934 124.684L170.374 124.447C168.583 121.113 167.665 116.433 167.665 110.363H167.165ZM169.934 124.684L169.497 124.926C171.475 128.487 174.67 131.01 179.033 132.508L179.195 132.035L179.358 131.562C175.191 130.132 172.212 127.754 170.371 124.441L169.934 124.684ZM179.195 132.035L179.033 132.508C183.373 133.997 189.292 134.731 196.764 134.731V134.231V133.731C189.34 133.731 183.547 133 179.358 131.562L179.195 132.035ZM261.682 120.865H261.182C261.182 135.564 258.236 148.174 252.366 158.715L252.803 158.958L253.24 159.201C259.209 148.483 262.182 135.698 262.182 120.865H261.682ZM252.803 158.958L252.366 158.715C246.492 169.261 238.351 177.274 227.936 182.765L228.169 183.208L228.402 183.65C238.993 178.066 247.274 169.913 253.24 159.201L252.803 158.958ZM228.169 183.208L227.936 182.765C217.515 188.26 205.535 191.014 191.982 191.014V191.514V192.014C205.673 192.014 217.818 189.23 228.402 183.65L228.169 183.208ZM196.756 134.231V134.731C214.085 134.731 228.845 133.871 241.033 132.148L240.963 131.653L240.893 131.158C228.766 132.872 214.055 133.731 196.756 133.731V134.231ZM240.963 131.653L241.036 132.148C247.159 131.255 251.794 130.141 254.911 128.794C257.98 127.468 259.796 125.814 259.796 123.729H259.296H258.796C258.796 125.145 257.555 126.562 254.514 127.876C251.52 129.171 246.989 130.269 240.891 131.158L240.963 131.653ZM259.296 123.729H259.796C259.796 123.108 259.499 122.484 259.022 121.87C258.54 121.251 257.835 120.593 256.927 119.895C255.108 118.499 252.403 116.892 248.829 115.073L248.602 115.518L248.375 115.964C251.93 117.773 254.571 119.348 256.318 120.688C257.191 121.359 257.823 121.958 258.232 122.484C258.646 123.017 258.796 123.426 258.796 123.729H259.296ZM248.602 115.518L248.829 115.073C241.672 111.431 232.166 107.508 220.316 103.304L220.149 103.775L219.982 104.246C231.811 108.444 241.273 112.35 248.375 115.964L248.602 115.518ZM220.149 103.775L220.318 103.305C208.464 99.0352 195.879 95.1168 182.564 91.5492L182.434 92.0322L182.305 92.5152C195.596 96.0761 208.154 99.9864 219.979 104.246L220.149 103.775ZM182.434 92.0322L182.885 92.2482C185.061 87.7045 188.379 79.3135 192.834 67.0944L192.364 66.9231L191.894 66.7519C187.438 78.9735 184.136 87.3219 181.983 91.8162L182.434 92.0322ZM192.364 66.9231L192.834 67.0944C197.29 54.8731 200.35 45.9499 202.01 40.3327L201.53 40.1911L201.051 40.0494C199.4 45.6343 196.35 54.5324 191.894 66.7519L192.364 66.9231ZM201.53 40.1911L202.007 40.3402C202.942 37.3487 204.405 34.7047 206.396 32.4031L206.018 32.076L205.64 31.7489C203.556 34.1572 202.028 36.9232 201.053 40.0419L201.53 40.1911ZM206.018 32.076L206.4 32.398C208.396 30.0286 210.487 28.5037 212.668 27.7767L212.51 27.3024L212.352 26.828C209.95 27.6286 207.714 29.2861 205.635 31.7539L206.018 32.076ZM212.51 27.3024L212.665 27.7778L294.778 1.04575L294.623 0.570312L294.468 0.0948729L212.356 26.8269L212.51 27.3024ZM294.623 0.570312L294.27 0.923879L295.224 1.87858L295.578 1.52502L295.931 1.17145L294.977 0.216746L294.623 0.570312ZM295.578 1.52502L295.147 1.27081C292.012 6.58063 288.47 13.8909 284.519 23.1926L284.98 23.388L285.44 23.5835C289.382 14.3 292.905 7.03495 296.008 1.77922L295.578 1.52502ZM284.98 23.388L284.52 23.1915C280.57 32.4289 277.885 39.8076 276.475 45.3181L276.959 45.442L277.444 45.5659C278.835 40.129 281.496 32.8051 285.439 23.5846L284.98 23.388ZM276.959 45.442L276.88 44.9483L205.652 56.4049L205.731 56.8986L205.811 57.3923L277.039 45.9357L276.959 45.442ZM205.731 56.8986L205.232 56.9319L205.328 58.3639L205.827 58.3307L206.326 58.2974L206.23 56.8653L205.731 56.8986ZM205.827 58.3307L205.646 58.7969C220.907 64.71 232.448 70.4526 240.292 76.0188L240.581 75.6111L240.871 75.2033C232.929 69.5675 221.3 63.7899 206.007 57.8645L205.827 58.3307ZM240.581 75.6111L240.294 76.0199C248.197 81.5832 253.632 87.7867 256.642 94.6205L257.099 94.419L257.557 94.2175C254.456 87.1761 248.88 80.841 240.869 75.2022L240.581 75.6111ZM257.099 94.419L256.643 94.6221C259.66 101.411 261.182 110.15 261.182 120.865H261.682H262.182C262.182 110.066 260.65 101.175 257.556 94.2159L257.099 94.419ZM254.604 217.768L254.696 218.26C269.544 215.456 283.534 212.047 296.665 208.031L296.519 207.553L296.373 207.075C283.28 211.079 269.326 214.48 254.511 217.277L254.604 217.768ZM296.519 207.553L296.665 208.031C309.858 204.016 321.244 199.744 330.819 195.212L330.606 194.76L330.392 194.308C320.871 198.814 309.533 203.07 296.374 207.075L296.519 207.553ZM330.606 194.76L330.818 195.212C340.45 190.684 347.632 186.234 352.334 181.855L351.993 181.489L351.652 181.123C347.061 185.4 339.985 189.798 330.393 194.307L330.606 194.76ZM351.993 181.489H352.493V180.057H351.993H351.493V181.489H351.993ZM351.993 180.057L351.758 179.616C345.239 183.097 338.34 185.723 331.06 187.495L331.178 187.981L331.297 188.467C338.657 186.675 345.635 184.019 352.229 180.498L351.993 180.057ZM331.178 187.981L331.063 187.495C323.845 189.204 316.5 190.059 309.027 190.059V190.559V191.059C316.577 191.059 323.999 190.195 331.294 188.468L331.178 187.981ZM309.027 190.559V190.059C298.242 190.059 290.254 186.909 284.965 180.688L284.584 181.012L284.203 181.336C289.736 187.844 298.043 191.059 309.027 191.059V190.559ZM284.584 181.012L284.969 180.692C279.725 174.388 277.064 165.132 277.064 152.848H276.564H276.064C276.064 165.258 278.75 174.779 284.2 181.332L284.584 181.012ZM276.564 152.848H277.064C277.064 138.63 278.778 125.983 282.198 114.902L281.72 114.754L281.242 114.607C277.787 125.802 276.064 138.551 276.064 152.848H276.564ZM281.72 114.754L282.198 114.901C285.62 103.75 290.329 95.1406 296.304 89.0406L295.946 88.6907L295.589 88.3408C289.47 94.5884 284.695 103.355 281.242 114.608L281.72 114.754ZM295.946 88.6907L296.304 89.0406C302.334 82.8851 309.116 79.8345 316.665 79.8345V79.3345V78.8345C308.811 78.8345 301.78 82.0213 295.589 88.3408L295.946 88.6907ZM316.665 79.3345V79.8345C327.706 79.8345 336.5 84.3389 343.091 93.377L343.495 93.0824L343.899 92.7878C337.123 83.4953 328.031 78.8345 316.665 78.8345V79.3345ZM343.495 93.0824L343.094 93.3801C349.768 102.383 354.335 116.002 356.749 134.296L357.244 134.231L357.74 134.165C355.316 115.798 350.717 101.985 343.897 92.7846L343.495 93.0824ZM357.244 134.231V134.731H371.089V134.231V133.731H357.244V134.231ZM366.315 191.514V191.014H357.531V191.514V192.014H366.315V191.514ZM357.531 191.514L357.036 191.441C355.07 204.825 351.457 216.156 346.211 225.447L346.646 225.693L347.082 225.938C352.402 216.517 356.046 205.062 358.026 191.586L357.531 191.514ZM346.646 225.693L346.21 225.449C341.017 234.757 335.05 241.659 328.321 246.186L328.6 246.601L328.88 247.016C335.773 242.378 341.836 235.341 347.083 225.936L346.646 225.693ZM328.6 246.601L328.319 246.188C321.574 250.789 314.828 253.07 308.072 253.07V253.57V254.07C315.066 254.07 322.005 251.705 328.882 247.014L328.6 246.601ZM308.072 253.57V253.07C303.559 253.07 299.334 252.162 295.392 250.347L295.183 250.802L294.973 251.256C299.052 253.133 303.42 254.07 308.072 254.07V253.57ZM295.183 250.802L295.386 250.345C291.414 248.58 287.856 246.407 284.71 243.827L284.393 244.214L284.076 244.601C287.296 247.241 290.931 249.459 294.979 251.259L295.183 250.802ZM284.393 244.214L284.71 243.827C281.542 241.23 277.734 237.772 273.284 233.449L272.936 233.808L272.587 234.166C277.049 238.5 280.879 241.979 284.076 244.601L284.393 244.214ZM272.936 233.808L273.284 233.449C269.206 229.499 265.856 226.404 263.235 224.167L262.91 224.547L262.586 224.927C265.184 227.145 268.517 230.224 272.588 234.167L272.936 233.808ZM262.91 224.547L263.23 224.163C260.527 221.91 257.722 220.104 254.815 218.747L254.604 219.2L254.392 219.654C257.214 220.97 259.947 222.728 262.59 224.931L262.91 224.547ZM254.604 219.2H255.104V217.768H254.604H254.104V219.2H254.604ZM430.794 122.297H430.294C430.294 146.311 425.716 163.736 416.659 174.678L417.045 174.997L417.43 175.316C426.706 164.108 431.294 146.4 431.294 122.297H430.794ZM417.045 174.997L416.659 174.679C407.678 185.544 394.122 191.014 375.893 191.014V191.514V192.014C394.328 192.014 408.207 186.473 417.43 175.316L417.045 174.997ZM375.893 191.514V191.014H366.345V191.514V192.014H375.893V191.514ZM371.119 134.231V134.731H380.667V134.231V133.731H371.119V134.231ZM380.667 134.231V134.731C387.939 134.731 395.307 134.38 402.769 133.678L402.723 133.18L402.676 132.683C395.244 133.381 387.907 133.731 380.667 133.731V134.231ZM402.723 133.18L402.774 133.678C410.232 132.913 416.396 131.988 421.259 130.9L421.15 130.412L421.041 129.924C416.23 131 410.108 131.92 402.672 132.683L402.723 133.18ZM421.15 130.412L421.266 130.898C423.694 130.323 425.547 129.749 426.802 129.171C427.428 128.883 427.933 128.581 428.289 128.258C428.643 127.937 428.907 127.54 428.907 127.07H428.407H427.907C427.907 127.141 427.868 127.29 427.617 127.518C427.369 127.743 426.967 127.994 426.384 128.263C425.22 128.799 423.444 129.355 421.035 129.925L421.15 130.412ZM428.407 127.07H428.907C428.907 126.255 428.405 125.288 427.587 124.214C426.75 123.114 425.509 121.811 423.876 120.306L423.537 120.674L423.199 121.041C424.812 122.528 426.005 123.787 426.792 124.819C427.597 125.877 427.907 126.612 427.907 127.07H428.407ZM423.537 120.674L423.88 120.309C420.671 117.294 416.352 113.936 410.929 110.236L410.648 110.649L410.366 111.062C415.764 114.746 420.038 118.071 423.195 121.038L423.537 120.674ZM410.648 110.649L410.935 110.24C405.574 106.475 399.864 102.871 393.804 99.4262L393.557 99.8609L393.31 100.296C399.344 103.725 405.027 107.313 410.36 111.058L410.648 110.649ZM393.557 99.8609L393.955 100.163C397.733 95.1688 401.98 88.2697 406.696 79.4753L406.255 79.239L405.815 79.0027C401.11 87.7751 396.891 94.6238 393.158 99.5592L393.557 99.8609ZM406.255 79.239L406.695 79.4764C411.473 70.622 414.736 63.623 416.468 58.4906L415.994 58.3307L415.521 58.1708C413.816 63.222 410.585 70.1619 405.815 79.0015L406.255 79.239ZM415.994 58.3307V58.8307H417.427V58.3307V57.8307H415.994V58.3307ZM417.427 58.3307L416.951 58.4842L418.86 64.4034L419.336 64.2499L419.812 64.0964L417.902 58.1772L417.427 58.3307ZM419.336 64.2499L418.864 64.415C422.041 73.4998 424.741 82.7755 426.965 92.242L427.452 92.1277L427.939 92.0133C425.707 82.5128 422.997 73.2033 419.808 64.0849L419.336 64.2499ZM427.452 92.1277L426.965 92.2428C429.184 101.621 430.294 111.639 430.294 122.297H430.794H431.294C431.294 111.569 430.176 101.474 427.939 92.0126L427.452 92.1277ZM118.345 201.634L117.432 201.225L117.43 201.231L118.345 201.634ZM94.4748 229.607L93.9566 228.752L93.9528 228.754L94.4748 229.607ZM26.2067 232.662L26.6755 231.779L26.6702 231.776L26.2067 232.662ZM7.39715 213.854L6.50973 214.315V214.315L7.39715 213.854ZM4.62824 151.225L5.60521 151.438L5.60546 151.437L4.62824 151.225ZM15.7994 117.046V116.046H15.1419L14.8813 116.649L15.7994 117.046ZM18.1864 117.046L19.1351 117.362L19.5738 116.046H18.1864V117.046ZM23.7242 174.711L23.1468 175.527L23.1512 175.53L23.7242 174.711ZM91.8969 179.484L92.1231 180.458L92.1276 180.457L91.8969 179.484ZM115.48 150.652L114.872 151.446L114.882 151.453L115.48 150.652ZM87.8867 133.753L87.0703 133.176L86.42 134.095L87.4098 134.632L87.8867 133.753ZM100.395 111.986L99.5014 111.536L99.5002 111.539L100.395 111.986ZM111.279 86.4948V85.4948H110.559L110.331 86.1786L111.279 86.4948ZM112.711 86.4948L113.634 86.1088L113.377 85.4948H112.711V86.4948ZM122.45 116.855L121.479 117.091V117.091L122.45 116.855ZM56.8557 139.959L56.0735 140.582L56.7922 141.484L57.5835 140.645L56.8557 139.959ZM44.7298 128.693L44.1192 129.485L44.1238 129.489L44.7298 128.693ZM31.5536 120.387H30.5536V121.053L31.1678 121.31L31.5536 120.387ZM31.5536 118.955L30.7809 118.32L30.5536 118.597V118.955H31.5536ZM53.5139 92.2231L53.9409 91.3189L53.236 90.986L52.7412 91.5884L53.5139 92.2231ZM68.3133 102.343L67.658 103.099L67.6678 103.107L68.3133 102.343ZM80.2483 115.136L80.9761 115.822L81.5154 115.25L81.0864 114.591L80.2483 115.136ZM345.309 131.844L345.538 132.817L347.362 132.389L345.991 131.112L345.309 131.844ZM329.651 123.538L329.351 124.492L329.354 124.493L329.651 123.538ZM294.228 121.915L293.985 120.945L293.982 120.946L294.228 121.915ZM284.489 125.638L284.99 126.504L284.997 126.5L284.489 125.638ZM293.655 134.422L293.516 135.412L293.523 135.413L293.531 135.414L293.655 134.422ZM367.491 44.2963L366.967 45.148V45.148L367.491 44.2963ZM363.29 29.0209L364.258 29.2708L364.262 29.256L364.265 29.2412L363.29 29.0209ZM365.39 21.765L366.339 22.0813L366.343 22.0682L366.347 22.055L365.39 21.765ZM367.3 15.082L368.265 15.3429V15.3429L367.3 15.082ZM368.732 8.6854V7.6854H367.885L367.745 8.52099L368.732 8.6854ZM370.164 8.6854H371.164V7.6854H370.164V8.6854ZM377.993 15.6548L377.815 16.6387L377.825 16.6407L377.836 16.6424L377.993 15.6548ZM437 14.4137L437.881 14.8865L438.755 13.2573L436.913 13.4175L437 14.4137ZM431.367 28.639L430.421 28.3149L430.419 28.3201L431.367 28.639ZM426.497 45.442L426.571 46.4393L427.316 46.3841L427.474 45.6544L426.497 45.442ZM403.773 46.7786L403.819 47.7775V47.7775L403.773 46.7786ZM126.556 157.144H125.556C125.556 174.483 122.834 189.166 117.432 201.225L118.345 201.634L119.257 202.043C124.804 189.661 127.556 174.684 127.556 157.144H126.556ZM118.345 201.634L117.43 201.231C112.094 213.345 104.267 222.503 93.9566 228.752L94.4748 229.607L94.9931 230.462C105.688 223.981 113.775 214.49 119.26 202.037L118.345 201.634ZM94.4748 229.607L93.9528 228.754C83.6372 235.068 71.1277 238.25 56.3783 238.25V239.25V240.25C71.4187 240.25 84.3069 237.003 94.9969 230.46L94.4748 229.607ZM56.3783 239.25V238.25C44.6601 238.25 34.7729 236.076 26.6755 231.779L26.2067 232.662L25.7379 233.545C34.1903 238.031 44.4175 240.25 56.3783 240.25V239.25ZM26.2067 232.662L26.6702 231.776C18.575 227.542 12.454 221.42 8.28458 213.393L7.39715 213.854L6.50973 214.315C10.8699 222.709 17.2886 229.126 25.7432 233.548L26.2067 232.662ZM7.39715 213.854L8.28458 213.393C4.10934 205.355 2 195.687 2 184.353H1H0C0 195.933 2.15543 205.932 6.50973 214.315L7.39715 213.854ZM1 184.353H2C2 173.416 3.20124 162.445 5.60521 151.438L4.62824 151.225L3.65127 151.011C1.21759 162.154 0 173.268 0 184.353H1ZM4.62824 151.225L5.60546 151.437C8.00913 140.368 11.7116 129.037 16.7175 117.442L15.7994 117.046L14.8813 116.649C9.8299 128.35 6.08499 139.804 3.65101 151.012L4.62824 151.225ZM15.7994 117.046V118.046H18.1864V117.046V116.046H15.7994V117.046ZM18.1864 117.046L17.2377 116.73C13.0793 129.204 10.9802 140.135 10.9802 149.506H11.9802H12.9802C12.9802 140.419 15.0186 129.71 19.1351 117.362L18.1864 117.046ZM11.9802 149.506H10.9802C10.9802 161.032 15.0035 169.768 23.1468 175.527L23.7242 174.711L24.3016 173.894C16.7862 168.579 12.9802 160.512 12.9802 149.506H11.9802ZM23.7242 174.711L23.1512 175.53C31.2292 181.178 43.4746 183.921 59.7201 183.921V182.921V181.921C43.6299 181.921 31.878 179.191 24.2972 173.891L23.7242 174.711ZM59.7201 182.921V183.921C71.3705 183.921 82.1729 182.769 92.1231 180.458L91.8969 179.484L91.6706 178.51C81.8883 180.782 71.2395 181.921 59.7201 181.921V182.921ZM91.8969 179.484L92.1276 180.457C102.115 178.089 110.088 175.098 116.004 171.457L115.48 170.605L114.956 169.754C109.288 173.242 101.539 176.17 91.6661 178.511L91.8969 179.484ZM115.48 170.605L116.004 171.457C121.827 167.874 125.169 164.082 125.169 160.008H124.169H123.169C123.169 162.935 120.719 166.208 114.956 169.754L115.48 170.605ZM124.169 160.008H125.169C125.169 159.287 124.9 158.558 124.493 157.85C124.08 157.134 123.484 156.368 122.73 155.556C121.222 153.933 118.995 152.03 116.079 149.851L115.48 150.652L114.882 151.453C117.758 153.602 119.876 155.422 121.264 156.917C121.958 157.665 122.448 158.308 122.759 158.848C123.076 159.398 123.169 159.774 123.169 160.008H124.169ZM115.48 150.652L116.089 149.858C110.295 145.417 101.041 139.754 88.3637 132.874L87.8867 133.753L87.4098 134.632C100.067 141.501 109.208 147.103 114.872 151.445L115.48 150.652ZM87.8867 133.753L88.7031 134.331C92.4366 129.053 96.6318 121.747 101.289 112.433L100.395 111.986L99.5002 111.539C94.864 120.81 90.7206 128.016 87.0703 133.176L87.8867 133.753ZM100.395 111.986L101.288 112.435C106.014 103.048 109.663 94.5058 112.228 86.8111L111.279 86.4948L110.331 86.1786C107.803 93.7593 104.196 102.211 99.5014 111.536L100.395 111.986ZM111.279 86.4948V87.4948H112.711V86.4948V85.4948H111.279V86.4948ZM112.711 86.4948L111.789 86.8809C115.521 95.7984 118.752 105.867 121.479 117.091L122.45 116.855L123.422 116.619C120.675 105.311 117.413 95.1399 113.634 86.1088L112.711 86.4948ZM122.45 116.855L121.479 117.091C124.192 128.258 125.556 141.604 125.556 157.144H126.556H127.556C127.556 141.496 126.183 127.983 123.422 116.619L122.45 116.855ZM56.8557 139.959L57.638 139.336C54.83 135.81 50.7176 131.998 45.3358 127.898L44.7298 128.693L44.1238 129.489C49.4357 133.536 53.4073 137.234 56.0735 140.582L56.8557 139.959ZM44.7298 128.693L45.3404 127.901C40.0319 123.808 35.5591 120.978 31.9393 119.465L31.5536 120.387L31.1678 121.31C34.5499 122.724 38.8613 125.431 44.1192 129.485L44.7298 128.693ZM31.5536 120.387H32.5536V118.955H31.5536H30.5536V120.387H31.5536ZM31.5536 118.955L32.3263 119.59L54.2866 92.8579L53.5139 92.2231L52.7412 91.5884L30.7809 118.32L31.5536 118.955ZM53.5139 92.2231L53.087 93.1274C57.5629 95.2408 62.4197 98.5548 67.6581 103.099L68.3133 102.343L68.9686 101.588C63.6405 96.9662 58.6311 93.5335 53.9409 91.3189L53.5139 92.2231ZM68.3133 102.343L67.6678 103.107C72.9713 107.589 76.8721 111.782 79.4102 115.682L80.2483 115.136L81.0864 114.591C78.405 110.471 74.3491 106.135 68.9588 101.579L68.3133 102.343ZM80.2483 115.136L79.5206 114.451L56.128 139.273L56.8557 139.959L57.5835 140.645L80.9761 115.822L80.2483 115.136ZM307.595 135.185V136.185C323.29 136.185 335.948 135.07 345.538 132.817L345.309 131.844L345.081 130.87C335.703 133.073 323.217 134.185 307.595 134.185V135.185ZM345.309 131.844L345.991 131.112C342.154 127.54 336.785 124.711 329.948 122.583L329.651 123.538L329.354 124.493C336.011 126.565 341.081 129.273 344.628 132.576L345.309 131.844ZM329.651 123.538L329.951 122.584C323.154 120.448 315.539 119.387 307.117 119.387V120.387V121.387C315.373 121.387 322.781 122.427 329.351 124.492L329.651 123.538ZM307.117 120.387V119.387C302.523 119.387 298.144 119.905 293.985 120.945L294.228 121.915L294.47 122.885C298.459 121.888 302.674 121.387 307.117 121.387V120.387ZM294.228 121.915L293.982 120.946C289.916 121.978 286.572 123.249 283.981 124.777L284.489 125.638L284.997 126.5C287.37 125.1 290.519 123.888 294.474 122.884L294.228 121.915ZM284.489 125.638L283.988 124.773C282.738 125.496 281.74 126.22 281.043 126.954C280.353 127.68 279.861 128.52 279.861 129.457H280.861H281.861C281.861 129.248 281.973 128.879 282.493 128.332C283.004 127.793 283.82 127.181 284.99 126.504L284.489 125.638ZM280.861 129.457H279.861C279.861 130.359 280.392 131.083 281.058 131.635C281.73 132.192 282.675 132.692 283.831 133.154L284.202 132.226L284.574 131.297C283.502 130.868 282.775 130.461 282.334 130.095C281.886 129.724 281.861 129.51 281.861 129.457H280.861ZM284.202 132.226L283.831 133.154C286.168 134.089 289.41 134.835 293.516 135.412L293.655 134.422L293.794 133.431C289.752 132.863 286.693 132.145 284.574 131.297L284.202 132.226ZM293.655 134.422L293.531 135.414C297.655 135.929 302.344 136.185 307.595 136.185V135.185V134.185C302.406 134.185 297.802 133.932 293.779 133.429L293.655 134.422ZM383.531 47.3514V46.3514C376.193 46.3514 371.08 45.3307 368.015 43.4447L367.491 44.2963L366.967 45.148C370.521 47.3354 376.102 48.3514 383.531 48.3514V47.3514ZM367.491 44.2963L368.015 43.4447C365.062 41.6279 363.526 38.6501 363.526 34.2718H362.526H361.526C361.526 39.1861 363.299 42.8913 366.967 45.148L367.491 44.2963ZM362.526 34.2718H363.526C363.526 32.8512 363.763 31.1876 364.258 29.2708L363.29 29.0209L362.321 28.771C361.798 30.8003 361.526 32.6373 361.526 34.2718H362.526ZM363.29 29.0209L364.265 29.2412C364.701 27.3121 365.39 24.9276 366.339 22.0813L365.39 21.765L364.441 21.4488C363.481 24.3307 362.77 26.7835 362.314 28.8006L363.29 29.0209ZM365.39 21.765L366.347 22.055C366.987 19.944 367.626 17.7066 368.265 15.3429L367.3 15.082L366.334 14.8211C365.7 17.1674 365.066 19.3853 364.433 21.475L365.39 21.765ZM367.3 15.082L368.265 15.3429C368.908 12.9639 369.393 10.7988 369.718 8.84981L368.732 8.6854L367.745 8.52099C367.434 10.3909 366.964 12.4902 366.334 14.8211L367.3 15.082ZM368.732 8.6854V9.6854H370.164V8.6854V7.6854H368.732V8.6854ZM370.164 8.6854H369.164C369.164 10.8763 369.845 12.7013 371.311 14.0133L371.978 13.268L372.645 12.5228C371.693 11.6708 371.164 10.4406 371.164 8.6854H370.164ZM371.978 13.268L371.311 14.0133C372.727 15.2798 374.952 16.1182 377.815 16.6387L377.993 15.6548L378.172 14.671C375.434 14.1731 373.648 13.4203 372.645 12.5228L371.978 13.268ZM377.993 15.6548L377.836 16.6424C380.714 17.1002 384.69 17.3231 389.737 17.3231V16.3231V15.3231C384.728 15.3231 380.874 15.1005 378.151 14.6672L377.993 15.6548ZM389.737 16.3231V17.3231H390.215V16.3231V15.3231H389.737V16.3231ZM390.215 16.3231V17.3231C396.598 17.3231 404.538 17.1317 414.03 16.7495L413.989 15.7503L413.949 14.7511C404.472 15.1327 396.562 15.3231 390.215 15.3231V16.3231ZM413.989 15.7503L414.03 16.7495C423.521 16.3673 431.209 15.921 437.087 15.4099L437 14.4137L436.913 13.4175C431.079 13.9247 423.426 14.3695 413.949 14.7511L413.989 15.7503ZM437 14.4137L436.119 13.9408C434.676 16.63 432.775 21.4421 430.421 28.3149L431.367 28.639L432.313 28.9631C434.668 22.088 436.523 17.4165 437.881 14.8865L437 14.4137ZM431.367 28.639L430.419 28.3201C428.122 35.1473 426.486 40.7871 425.52 45.2296L426.497 45.442L427.474 45.6544C428.418 41.3135 430.029 35.7513 432.314 28.9579L431.367 28.639ZM426.497 45.442L426.423 44.4447C419.56 44.9531 411.994 45.3981 403.727 45.7797L403.773 46.7786L403.819 47.7775C412.102 47.3953 419.686 46.9493 426.571 46.4393L426.497 45.442ZM403.773 46.7786L403.727 45.7797C395.46 46.1612 388.729 46.3514 383.531 46.3514V47.3514V48.3514C388.772 48.3514 395.537 48.1598 403.819 47.7775L403.773 46.7786Z" pathLength="100" className="animate-draw-tukan" fill="transparent" mask="url(#path-1-outside-1_204_2)"/>

        </svg>
      </div>

    </div>
  );
}

export default Silk;
