# Path: src/formpack/constants.py
# KOBO_LOCK_ALL = 'kobo--lock_all'


import json
import re
from collections import defaultdict, OrderedDict
from copy import deepcopy
from pyxform import aliases as pyxform_aliases
from pyxform.question_type_dictionary import QUESTION_TYPE_DICT
from ..constants import KOBO_LOCK_ALL
# coding: utf-8



# This file is a mishmash of things which culminate in the
# "replace_aliases" method which iterates through a survey and
# replaces xlsform aliases with a standardized set of colunns,
# question types, and values.


TF_COLUMNS = [
    'required',
]

KOBO_SPECIFIC_SUB_PATTERN = r'^kobo(–|—)'
KOBO_SPECIFIC_PREFERRED = 'kobo--'



# Path: src/formpack/constants.py
# KOBO_LOCK_ALL = 'kobo--lock_all'


# Path: src/formpack/utils/replace_aliases.py
import json
import re
from collections import defaultdict, OrderedDict
from copy import deepcopy
from pyxform import aliases as pyxform_aliases
from pyxform.question_type_dictionary import QUESTION_TYPE_DICT
from ..constants import KOBO_LOCK_ALL

# coding: utf-8



# This file is a mishmash of things which culminate in the
# "replace_aliases" method which iterates through a survey and
# replaces xlsform aliases with a standardized set of colunns,
# question types, and values.


TF_COLUMNS = [
    'required',
]

KOBO_SPECIFIC_SUB_PATTERN = r'^kobo(–|—)'
KOBO_SPECIFIC_PREFERRED = 'kobo--'



def aliases_to_ordered_dict(_d):