 
     // MARK: - Private
 
-    private var maskSymbol: Character {
-        return type(of: self).maskSymbol
-    }
     private let placeholderLabel: UILabel
 
     private lazy var delegateProxy: TextFieldDelegateProxy = {

        super.delegate = delegateProxy

        if let unformattedText = unformattedText {
            var cursorPosition = 0
            text = formattedText(fromText: unformattedText, textMask: text, cursorPosition: &cursorPosition)
        }

        placeholderLabel.font = font

                return false
            }
        }
        let text = self.text ?? ""
        let charactersRange = text.range(fromUtf16NsRange: range)!

        let unformattedText: String
        var unformattedRange: Range<String.Index>
        if let formatter = textFormatter {
            (unformattedText, unformattedRange) = formatter.unformattedText(from: text, range: charactersRange)
        } else {
            unformattedText = text
            unformattedRange = charactersRange
        }

        let isBackspace = (string.characters.count == 0 && unformattedRange.isEmpty)
        if isBackspace && unformattedRange.lowerBound != unformattedText.startIndex {
            unformattedRange = unformattedText.index(before: unformattedRange.lowerBound)..<unformattedRange.upperBound
        }

        if let originDelegate = (delegateProxy.delegate as? FormattedTextFieldDelegate),
            originDelegate.responds(to: #selector(FormattedTextFieldDelegate.textField(_:shouldChangeUnformattedText:in:replacementString:))) {
            let utf16UnformattedRange = unformattedText.utf16Nsrange(fromRange: unformattedRange)
            if !originDelegate.textField!(self, shouldChangeUnformattedText:unformattedText, in:utf16UnformattedRange, replacementString: string) {
                return false
            }
        }

        let newUnformattedText = unformattedText.replacingCharacters(in: unformattedRange, with: string)
        let selectionOffset = unformattedText.distance(from: unformattedText.startIndex, to: unformattedRange.lowerBound)
        let cursorPosition = newUnformattedText.index(newUnformattedText.startIndex, offsetBy: selectionOffset + string.characters.count)

        let formattedText: String
        let formattedRange: Range<String.Index>
        if let formatter = textFormatter {
            (formattedText, formattedRange) = formatter.formattedText(from: newUnformattedText, range: cursorPosition..<cursorPosition)
        } else {
            formattedText = newUnformattedText
            formattedRange = cursorPosition..<cursorPosition
        }
        self.text = formattedText
        selectedCharactersRange = formattedRange.upperBound..<formattedRange.upperBound

        placeholderLabel.isHidden = (newUnformattedText.characters.count > 0)

        sendActions(for: .editingChanged)

        return false
    }
}

