code: public static function fromString($str)
      {
          $src = CDataReader::fromString($str);
          $inverted = $src->eat('@');
          $num = $src->eatCSpan(':');
          if (empty($num) || $num == '~') {
              $num = null;
          } else {
              $num = floatval($num);
          }
          if ($src->eat(':')) {
              $max = $src->eatToFullConsumption();
              if (empty($max)) {
                  $max = null;
              } else {
                  $max = floatval($max);
              }
              $min = $num;
          } else {
              $min = 0;
              $max = $num;
          }
  
          return new static($min, $max, $inverted);
      }
docs: @param string $str
  
  @return static