// Minify minifies JS data, it reads from r and writes to w.
188644
func (o *Minifier) Minify(_ *minify.M, w io.Writer, r io.Reader, _ map[string]string) error {
	prev := js.LineTerminatorToken
	prevLast := byte(' ')
	lineTerminatorQueued := false
	whitespaceQueued := false

	l := js.NewLexer(r)
	defer l.Restore()

	for {
		tt, data := l.Next()
		if tt == js.ErrorToken {
			if l.Err() != io.EOF {
				return l.Err()
			}
			return nil
		} else if tt == js.LineTerminatorToken {
			lineTerminatorQueued = true
		} else if tt == js.WhitespaceToken {
			whitespaceQueued = true
		} else if tt == js.SingleLineCommentToken || tt == js.MultiLineCommentToken {
			if len(data) > 5 && data[1] == '*' && data[2] == '!' {
				if _, err := w.Write(data[:3]); err != nil {
					return err
				}
				comment := parse.ReplaceMultipleWhitespace(data[3 : len(data)-2])
				if tt != js.MultiLineCommentToken {
					// don't trim newlines in multiline comments as that might change ASI
					// (we could do a more expensive check post-factum but it's not worth it)
					comment = parse.TrimWhitespace(comment)
				}
				if _, err := w.Write(comment); err != nil {
					return err
				}
				if _, err := w.Write(data[len(data)-2:]); err != nil {
					return err
				}
			} else if tt == js.MultiLineCommentToken {
				lineTerminatorQueued = true
			} else {
				whitespaceQueued = true
			}
		} else {
			first := data[0]
			if (prev == js.IdentifierToken || prev == js.NumericToken || prev == js.PunctuatorToken || prev == js.StringToken || prev == js.TemplateToken || prev == js.RegexpToken) &&
				(tt == js.IdentifierToken || tt == js.NumericToken || tt == js.StringToken || tt == js.TemplateToken || tt == js.PunctuatorToken || tt == js.RegexpToken) {
				if lineTerminatorQueued && (prev != js.PunctuatorToken || prevLast == '}' || prevLast == ']' || prevLast == ')' || prevLast == '+' || prevLast == '-' || prevLast == '"' || prevLast == '\'') &&
					(tt != js.PunctuatorToken || first == '{' || first == '[' || first == '(' || first == '+' || first == '-' || first == '!' || first == '~') {
					if _, err := w.Write(newlineBytes); err != nil {
						return err
					}
				} else if whitespaceQueued && (prev != js.StringToken && prev != js.PunctuatorToken && tt != js.PunctuatorToken || (prevLast == '+' || prevLast == '-' || prevLast == '/') && first == prevLast) {
					if _, err := w.Write(spaceBytes); err != nil {
						return err
					}
				}
			}
			if _, err := w.Write(data); err != nil {
				return err
			}
			prev = tt
			prevLast = data[len(data)-1]
			lineTerminatorQueued = false
			whitespaceQueued = false
		}
	}
}
520495
func minifyUUID(s string) string {
	authRegexp := regexp.MustCompile(`^([0-9a-fA-F]*)`)
	if str := authRegexp.FindString(s); len(str) > 0 {
		return strings.TrimLeft(str, "0")
	}

	return s
}
130543
func compact(ctx context.Context, client *clientv3.Client, t, rev int64) (int64, int64, error) {
	resp, err := client.KV.Txn(ctx).If(
		clientv3.Compare(clientv3.Version(compactRevKey), "=", t),
	).Then(
		clientv3.OpPut(compactRevKey, strconv.FormatInt(rev, 10)), // Expect side effect: increment Version
	).Else(
		clientv3.OpGet(compactRevKey),
	).Commit()
	if err != nil {
		return t, rev, err
	}

	curRev := resp.Header.Revision

	if !resp.Succeeded {
		curTime := resp.Responses[0].GetResponseRange().Kvs[0].Version
		return curTime, curRev, nil
	}
	curTime := t + 1

	if rev == 0 {
		// We don't compact on bootstrap.
		return curTime, curRev, nil
	}
	if _, err = client.Compact(ctx, rev); err != nil {
		return curTime, curRev, err
	}
	klog.V(4).Infof("etcd: compacted rev (%d), endpoints (%v)", rev, client.Endpoints())
	return curTime, curRev, nil
}
292406
func less(a, b uint32) bool {
	if a < b {
		return (b - a) <= MaxSerialIncrement
	}
	return (a - b) > MaxSerialIncrement
}
864751
func (ns *Namespace) Minify(r resource.Resource) (resource.Resource, error) {
	return ns.minifyClient.Minify(r)
}
1181575
func (m Client) Minify(mediatype media.Type, dst io.Writer, src io.Reader) error {
	return m.m.Minify(mediatype.Type(), dst, src)
}
748908
func (err Error) Less(i, j int) bool {
	return err.Errors[i].Error() < err.Errors[j].Error()
}
504800
func (sa *SuffixArrayZ) less(i, j, d int64) bool {
	if i == j {
		return false
	}
	i = i + d
	j = j + d
	for i < sa.n && j < sa.n {
		if sa.input[i] < sa.input[j] {
			return true
		}
		if sa.input[i] > sa.input[j] {
			return false
		}
		i++
		j++
	}
	return i > j
}
573097
func Resize(s string, length uint, rightAlign bool) string {
	slen := runewidth.StringWidth(s)
	n := int(length)
	if slen == n {
		return s
	}
	// Pads only when length of the string smaller than len needed
	if rightAlign {
		s = PadLeft(s, n, ' ')
	} else {
		s = PadRight(s, n, ' ')
	}
	if slen > n {
		rs := []rune(s)
		var buf bytes.Buffer
		w := 0
		for _, r := range rs {
			buf.WriteRune(r)
			rw := runewidth.RuneWidth(r)
			if w+rw >= n-3 {
				break
			}
			w += rw
		}
		buf.WriteString("...")
		s = buf.String()
	}
	return s
}
1002476
func (s Float32Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
1087304
func (s Uint8Slice) Less(i, j int) bool {
	return s[i] < s[j]
}
835343
func Resize(buf []byte, o Options) ([]byte, error) {
	// Required in order to prevent premature garbage collection. See:
	// https://github.com/h2non/bimg/pull/162
	defer runtime.KeepAlive(buf)
	return resizer(buf, o)
}
19636
func (a *MovAvgAggregation) Minimize(minimize bool) *MovAvgAggregation {
	a.minimize = &minimize
	return a
}
1309828
func (s *CreateRestApiInput) SetMinimumCompressionSize(v int64) *CreateRestApiInput {
	s.MinimumCompressionSize = &v
	return s
}
732506
func (s *jobSorter) Less(i, j int) bool {
	return s.by(s.jobs[i], s.jobs[j])
}
872196
func (m mathUtil) MinInt(values ...int) int {
	min := math.MaxInt32
	for _, v := range values {
		if v < min {
			min = v
		}
	}
	return min
}
1175455
func (b *block) resize(n int) {
	if n > cap(b.data) {
		b.reserve(n)
	}
	b.data = b.data[0:n]
}